@carbon/charts 0.34.1 → 0.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/bundle.js +1 -1
- package/components/axes/axis.js +11 -2
- package/components/axes/axis.js.map +1 -1
- package/components/axes/ruler.js +3 -1
- package/components/axes/ruler.js.map +1 -1
- package/components/graphs/bar-stacked.js +3 -2
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/pie.js +12 -3
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/skeleton.js +1 -2
- package/components/graphs/skeleton.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +5 -5
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,c,l,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",t.DOCUMENT="document"}(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"}(c||(c={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(l||(l={})),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.MOVE="move-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,O,E,T,S,M,A,C,P,k,D,L,R,I,N=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 c},get Bar(){return l},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"}(O||(O={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(E||(E={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(S||(S={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(M||(M={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(A||(A={})),function(t){t.LEFT="left",t.RIGHT="right"}(C||(C={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(P||(P={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(k||(k={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(D||(D={})),function(t){t.SEMI="semi",t.FULL="full"}(L||(L={})),function(t){t.UP="up",t.DOWN="down"}(R||(R={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(I||(I={}));var U=Object.freeze({__proto__:null,get Roles(){return r},Events:N,get ChartTheme(){return _},get AxisPositions(){return b},get TruncationTypes(){return x},get CartesianOrientations(){return w},get ScaleTypes(){return O},get TooltipPosition(){return E},get LegendPositions(){return T},get LegendOrientations(){return S},get LayoutDirection(){return M},get LayoutGrowth(){return A},get CalloutDirections(){return C},get Skeletons(){return P},get TextAnchor(){return k},get DominantBaseline(){return D},get GaugeTypes(){return L},get ArrowDirections(){return R},get Statuses(){return I}}),j="object"==typeof global&&global&&global.Object===Object&&global,V="object"==typeof self&&self&&self.Object===Object&&self,H=j||V||Function("return this")(),G=H.Symbol,B=Object.prototype,F=B.hasOwnProperty,z=B.toString,W=G?G.toStringTag:void 0;var Y=Object.prototype.toString;var q=G?G.toStringTag:void 0;function X(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":q&&q in Object(t)?function(t){var e=F.call(t,W),n=t[W];try{t[W]=void 0;var r=!0}catch(t){}var i=z.call(t);return r&&(e?t[W]=n:delete t[W]),i}(t):function(t){return Y.call(t)}(t)}function K(t){return null!=t&&"object"==typeof t}function Z(t){return"symbol"==typeof t||K(t)&&"[object Symbol]"==X(t)}function $(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Q=Array.isArray,J=G?G.prototype:void 0,tt=J?J.toString:void 0;function et(t){if("string"==typeof t)return t;if(Q(t))return $(t,et)+"";if(Z(t))return tt?tt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function nt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var rt=/^\s+|\s+$/g,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^0o[0-7]+$/i,st=parseInt;function ut(t){if("number"==typeof t)return t;if(Z(t))return NaN;if(nt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=nt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(rt,"");var n=ot.test(t);return n||at.test(t)?st(t.slice(2),n?2:8):it.test(t)?NaN:+t}function ct(t){return t}function lt(t){if(!nt(t))return!1;var e=X(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ht,ft=H["__core-js_shared__"],dt=(ht=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||""))?"Symbol(src)_1."+ht:"";var pt=Function.prototype.toString;function gt(t){if(null!=t){try{return pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var vt=/^\[object .+?Constructor\]$/,mt=Function.prototype,yt=Object.prototype,_t=mt.toString,bt=yt.hasOwnProperty,xt=RegExp("^"+_t.call(bt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wt(t){return!(!nt(t)||(e=t,dt&&dt in e))&&(lt(t)?xt:vt).test(gt(t));var e}function Ot(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return wt(n)?n:void 0}var Et=Ot(H,"WeakMap"),Tt=Object.create,St=function(){function t(){}return function(e){if(!nt(e))return{};if(Tt)return Tt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Mt(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 At(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Ct=Date.now;var Pt=function(){try{var t=Ot(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),kt=function(t){var e=0,n=0;return function(){var r=Ct(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Pt?function(t,e){return Pt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ct);function Dt(t){return t!=t}function Lt(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 Rt=/^(?:0|[1-9]\d*)$/;function It(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Rt.test(t))&&t>-1&&t%1==0&&t<e}function Nt(t,e,n){"__proto__"==e&&Pt?Pt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ut(t,e){return t===e||t!=t&&e!=e}var jt=Object.prototype.hasOwnProperty;function Vt(t,e,n){var r=t[e];jt.call(t,e)&&Ut(r,n)&&(void 0!==n||e in t)||Nt(t,e,n)}function Ht(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?Nt(n,s,u):Vt(n,s,u)}return n}var Gt=Math.max;function Bt(t,e){return kt(function(t,e,n){return e=Gt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Gt(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),Mt(t,this,s)}}(t,e,ct),t+"")}function Ft(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function zt(t){return null!=t&&Ft(t.length)&&!lt(t)}function Wt(t,e,n){if(!nt(n))return!1;var r=typeof e;return!!("number"==r?zt(n)&&It(e,n.length):"string"==r&&e in n)&&Ut(n[e],t)}var Yt=Object.prototype;function qt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Yt)}function Xt(t){return K(t)&&"[object Arguments]"==X(t)}var Kt=Object.prototype,Zt=Kt.hasOwnProperty,$t=Kt.propertyIsEnumerable,Qt=Xt(function(){return arguments}())?Xt:function(t){return K(t)&&Zt.call(t,"callee")&&!$t.call(t,"callee")};var Jt="object"==typeof t&&t&&!t.nodeType&&t,te=Jt&&"object"==typeof module&&module&&!module.nodeType&&module,ee=te&&te.exports===Jt?H.Buffer:void 0,ne=(ee?ee.isBuffer:void 0)||function(){return!1},re={};function ie(t){return function(e){return t(e)}}re["[object Float32Array]"]=re["[object Float64Array]"]=re["[object Int8Array]"]=re["[object Int16Array]"]=re["[object Int32Array]"]=re["[object Uint8Array]"]=re["[object Uint8ClampedArray]"]=re["[object Uint16Array]"]=re["[object Uint32Array]"]=!0,re["[object Arguments]"]=re["[object Array]"]=re["[object ArrayBuffer]"]=re["[object Boolean]"]=re["[object DataView]"]=re["[object Date]"]=re["[object Error]"]=re["[object Function]"]=re["[object Map]"]=re["[object Number]"]=re["[object Object]"]=re["[object RegExp]"]=re["[object Set]"]=re["[object String]"]=re["[object WeakMap]"]=!1;var oe="object"==typeof t&&t&&!t.nodeType&&t,ae=oe&&"object"==typeof module&&module&&!module.nodeType&&module,se=ae&&ae.exports===oe&&j.process,ue=function(){try{var t=ae&&ae.require&&ae.require("util").types;return t||se&&se.binding&&se.binding("util")}catch(t){}}(),ce=ue&&ue.isTypedArray,le=ce?ie(ce):function(t){return K(t)&&Ft(t.length)&&!!re[X(t)]},he=Object.prototype.hasOwnProperty;function fe(t,e){var n=Q(t),r=!n&&Qt(t),i=!n&&!r&&ne(t),o=!n&&!r&&!i&&le(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var c in t)!e&&!he.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||It(c,u))||s.push(c);return s}function de(t,e){return function(n){return t(e(n))}}var pe=de(Object.keys,Object),ge=Object.prototype.hasOwnProperty;function ve(t){return zt(t)?fe(t):function(t){if(!qt(t))return pe(t);var e=[];for(var n in Object(t))ge.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var me=Object.prototype.hasOwnProperty;function ye(t){if(!nt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=qt(t),n=[];for(var r in t)("constructor"!=r||!e&&me.call(t,r))&&n.push(r);return n}function _e(t){return zt(t)?fe(t,!0):ye(t)}var be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xe=/^\w*$/;function we(t,e){if(Q(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Z(t))||(xe.test(t)||!be.test(t)||null!=e&&t in Object(e))}var Oe=Ot(Object,"create");var Ee=Object.prototype.hasOwnProperty;var Te=Object.prototype.hasOwnProperty;function Se(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 Me(t,e){for(var n=t.length;n--;)if(Ut(t[n][0],e))return n;return-1}Se.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},Se.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Se.prototype.get=function(t){var e=this.__data__;if(Oe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Ee.call(e,t)?e[t]:void 0},Se.prototype.has=function(t){var e=this.__data__;return Oe?void 0!==e[t]:Te.call(e,t)},Se.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Oe&&void 0===e?"__lodash_hash_undefined__":e,this};var Ae=Array.prototype.splice;function Ce(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])}}Ce.prototype.clear=function(){this.__data__=[],this.size=0},Ce.prototype.delete=function(t){var e=this.__data__,n=Me(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ae.call(e,n,1),--this.size,!0)},Ce.prototype.get=function(t){var e=this.__data__,n=Me(e,t);return n<0?void 0:e[n][1]},Ce.prototype.has=function(t){return Me(this.__data__,t)>-1},Ce.prototype.set=function(t,e){var n=this.__data__,r=Me(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Pe=Ot(H,"Map");function ke(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 Se,map:new(Pe||Ce),string:new Se}},De.prototype.delete=function(t){var e=ke(this,t).delete(t);return this.size-=e?1:0,e},De.prototype.get=function(t){return ke(this,t).get(t)},De.prototype.has=function(t){return ke(this,t).has(t)},De.prototype.set=function(t,e){var n=ke(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Le(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(Le.Cache||De),n}Le.Cache=De;var Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ie=/\\(\\)?/g,Ne=function(t){var e=Le(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(Re,(function(t,n,r,i){e.push(r?i.replace(Ie,"$1"):n||t)})),e}));function Ue(t){return null==t?"":et(t)}function je(t,e){return Q(t)?t:we(t,e)?[t]:Ne(Ue(t))}function Ve(t){if("string"==typeof t||Z(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function He(t,e){for(var n=0,r=(e=je(e,t)).length;null!=t&&n<r;)t=t[Ve(e[n++])];return n&&n==r?t:void 0}function Ge(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Be=G?G.isConcatSpreadable:void 0;function Fe(t){return Q(t)||Qt(t)||!!(Be&&t&&t[Be])}var ze=de(Object.getPrototypeOf,Object),We=Function.prototype,Ye=Object.prototype,qe=We.toString,Xe=Ye.hasOwnProperty,Ke=qe.call(Object);var Ze=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),$e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Je=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var tn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var en="\\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",nn="["+en+"]",rn="\\d+",on="[\\u2700-\\u27bf]",an="[a-z\\xdf-\\xf6\\xf8-\\xff]",sn="[^\\ud800-\\udfff"+en+rn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",un="(?:\\ud83c[\\udde6-\\uddff]){2}",cn="[\\ud800-\\udbff][\\udc00-\\udfff]",ln="[A-Z\\xc0-\\xd6\\xd8-\\xde]",hn="(?:"+an+"|"+sn+")",fn="(?:"+ln+"|"+sn+")",dn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",pn="[\\ufe0e\\ufe0f]?"+dn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",un,cn].join("|")+")[\\ufe0e\\ufe0f]?"+dn+")*"),gn="(?:"+[on,un,cn].join("|")+")"+pn,vn=RegExp([ln+"?"+an+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[nn,ln,"$"].join("|")+")",fn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[nn,ln+hn,"$"].join("|")+")",ln+"?"+hn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ln+"+(?:['’](?: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_])",rn,gn].join("|"),"g");function mn(t,e,n){return t=Ue(t),void 0===(e=n?void 0:e)?function(t){return tn.test(t)}(t)?function(t){return t.match(vn)||[]}(t):function(t){return t.match(Je)||[]}(t):t.match(e)||[]}var yn=RegExp("['’]","g");function _n(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ut(n))==n?n:0),void 0!==e&&(e=(e=ut(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}(ut(t),e,n)}function bn(t){var e=this.__data__=new Ce(t);this.size=e.size}bn.prototype.clear=function(){this.__data__=new Ce,this.size=0},bn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},bn.prototype.get=function(t){return this.__data__.get(t)},bn.prototype.has=function(t){return this.__data__.has(t)},bn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ce){var r=n.__data__;if(!Pe||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 xn="object"==typeof t&&t&&!t.nodeType&&t,wn=xn&&"object"==typeof module&&module&&!module.nodeType&&module,On=wn&&wn.exports===xn?H.Buffer:void 0,En=On?On.allocUnsafe:void 0;function Tn(t,e){if(e)return t.slice();var n=t.length,r=En?En(n):new t.constructor(n);return t.copy(r),r}function Sn(){return[]}var Mn=Object.prototype.propertyIsEnumerable,An=Object.getOwnPropertySymbols,Cn=An?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}(An(t),(function(e){return Mn.call(t,e)})))}:Sn;var Pn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ge(e,Cn(t)),t=ze(t);return e}:Sn;function kn(t,e,n){var r=e(t);return Q(t)?r:Ge(r,n(t))}function Dn(t){return kn(t,ve,Cn)}function Ln(t){return kn(t,_e,Pn)}var Rn=Ot(H,"DataView"),In=Ot(H,"Promise"),Nn=Ot(H,"Set"),Un=gt(Rn),jn=gt(Pe),Vn=gt(In),Hn=gt(Nn),Gn=gt(Et),Bn=X;(Rn&&"[object DataView]"!=Bn(new Rn(new ArrayBuffer(1)))||Pe&&"[object Map]"!=Bn(new Pe)||In&&"[object Promise]"!=Bn(In.resolve())||Nn&&"[object Set]"!=Bn(new Nn)||Et&&"[object WeakMap]"!=Bn(new Et))&&(Bn=function(t){var e=X(t),n="[object Object]"==e?t.constructor:void 0,r=n?gt(n):"";if(r)switch(r){case Un:return"[object DataView]";case jn:return"[object Map]";case Vn:return"[object Promise]";case Hn:return"[object Set]";case Gn:return"[object WeakMap]"}return e});var Fn=Bn,zn=Object.prototype.hasOwnProperty;var Wn=H.Uint8Array;function Yn(t){var e=new t.constructor(t.byteLength);return new Wn(e).set(new Wn(t)),e}var qn=/\w*$/;var Xn=G?G.prototype:void 0,Kn=Xn?Xn.valueOf:void 0;function Zn(t,e){var n=e?Yn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function $n(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Yn(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Yn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Zn(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,qn.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,Kn?Object(Kn.call(r)):{}}}function Qn(t){return"function"!=typeof t.constructor||qt(t)?{}:St(ze(t))}var Jn=ue&&ue.isMap,tr=Jn?ie(Jn):function(t){return K(t)&&"[object Map]"==Fn(t)};var er=ue&&ue.isSet,nr=er?ie(er):function(t){return K(t)&&"[object Set]"==Fn(t)},rr={};function ir(t,e,n,r,i,o){var a,s=1&e,u=2&e,c=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!nt(t))return t;var l=Q(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&zn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return At(t,a)}else{var h=Fn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(ne(t))return Tn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Qn(t),!s)return u?function(t,e){return Ht(t,Pn(t),e)}(t,function(t,e){return t&&Ht(e,_e(e),t)}(a,t)):function(t,e){return Ht(t,Cn(t),e)}(t,function(t,e){return t&&Ht(e,ve(e),t)}(a,t))}else{if(!rr[h])return i?t:{};a=$n(t,h,s)}}o||(o=new bn);var d=o.get(t);if(d)return d;o.set(t,a),nr(t)?t.forEach((function(r){a.add(ir(r,e,n,r,t,o))})):tr(t)&&t.forEach((function(r,i){a.set(i,ir(r,e,n,i,t,o))}));var p=c?u?Ln:Dn:u?keysIn:ve,g=l?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Vt(a,i,ir(r,e,n,i,t,o))})),a}rr["[object Arguments]"]=rr["[object Array]"]=rr["[object ArrayBuffer]"]=rr["[object DataView]"]=rr["[object Boolean]"]=rr["[object Date]"]=rr["[object Float32Array]"]=rr["[object Float64Array]"]=rr["[object Int8Array]"]=rr["[object Int16Array]"]=rr["[object Int32Array]"]=rr["[object Map]"]=rr["[object Number]"]=rr["[object Object]"]=rr["[object RegExp]"]=rr["[object Set]"]=rr["[object String]"]=rr["[object Symbol]"]=rr["[object Uint8Array]"]=rr["[object Uint8ClampedArray]"]=rr["[object Uint16Array]"]=rr["[object Uint32Array]"]=!0,rr["[object Error]"]=rr["[object Function]"]=rr["[object WeakMap]"]=!1;function or(t){return ir(t,5)}function ar(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new De;++e<n;)this.add(t[e])}function sr(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 ur(t,e){return t.has(e)}ar.prototype.add=ar.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ar.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 c=o.get(t);if(c&&o.get(e))return c==e;var l=-1,h=!0,f=2&n?new ar:void 0;for(o.set(t,e),o.set(e,t);++l<s;){var d=t[l],p=e[l];if(r)var g=a?r(p,d,l,e,t,o):r(d,p,l,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!sr(e,(function(t,e){if(!ur(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 lr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var fr=G?G.prototype:void 0,dr=fr?fr.valueOf:void 0;var pr=Object.prototype.hasOwnProperty;var gr=Object.prototype.hasOwnProperty;function vr(t,e,n,r,i,o){var a=Q(t),s=Q(e),u=a?"[object Array]":Fn(t),c=s?"[object Array]":Fn(e),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&ne(t)){if(!ne(e))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new bn),a||le(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 Wn(t),new Wn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ut(+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=lr;case"[object Set]":var u=1&r;if(s||(s=hr),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=cr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(dr)return dr.call(t)==dr.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=l&&gr.call(t,"__wrapped__"),p=h&&gr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new bn),i(g,v,n,r,o)}}return!!f&&(o||(o=new bn),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 c=u;c--;){var l=s[c];if(!(a?l in e:pr.call(e,l)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++c<u;){var p=t[l=s[c]],g=e[l];if(r)var v=a?r(g,p,l,e,t,o):r(p,g,l,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==l)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function mr(t,e,n,r,i){return t===e||(null==t||null==e||!K(t)&&!K(e)?t!=t&&e!=e:vr(t,e,n,r,mr,i))}function yr(t){return t==t&&!nt(t)}function _r(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function br(t){var e=function(t){for(var e=ve(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,yr(i)]}return e}(t);return 1==e.length&&e[0][2]?_r(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],c=t[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in t))return!1}else{var h=new bn;if(r)var f=r(c,l,u,t,e,h);if(!(void 0===f?mr(l,c,3,r,h):f))return!1}}return!0}(n,t,e)}}function xr(t,e){return null!=t&&e in Object(t)}function wr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=je(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)&&Ft(i)&&It(a,i)&&(Q(t)||Qt(t))}(t,e,xr)}function Or(t,e){return we(t)&&yr(e)?_r(Ve(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:He(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?wr(n,t):mr(e,r,3)}}function Er(t){return we(t)?(e=Ve(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return He(e,t)}}(t);var e}function Tr(t){return"function"==typeof t?t:null==t?ct:"object"==typeof t?Q(t)?Or(t[0],t[1]):br(t):Er(t)}var Sr,Mr=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Sr?a:++r];if(!1===e(i[s],s,i))break}return t};var Ar=function(t,e){return function(n,r){if(null==n)return n;if(!zt(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&Mr(t,e,ve)})),Cr=function(){return H.Date.now()},Pr=Math.max,kr=Math.min;function Dr(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function v(){var t=Cr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?kr(n,o-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=Cr(),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=ut(e)||0,nt(n)&&(l=!!n.leading,o=(h="maxWait"in n)?Pr(ut(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(Cr())},y}function Lr(t,e,n){(void 0===n||Ut(t[e],n))&&(void 0!==n||e in t)||Nt(t,e,n)}function Rr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Ir(t,e,n,r,i,o,a){var s=Rr(t,n),u=Rr(e,n),c=a.get(u);if(c)Lr(t,n,c);else{var l,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=Q(u),p=!d&&ne(u),g=!d&&!p&&le(u);h=u,d||p||g?Q(s)?h=s:K(l=s)&&zt(l)?h=At(s):p?(f=!1,h=Tn(u,!0)):g?(f=!1,h=Zn(u,!0)):h=[]:function(t){if(!K(t)||"[object Object]"!=X(t))return!1;var e=ze(t);if(null===e)return!0;var n=Xe.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&qe.call(n)==Ke}(u)||Qt(u)?(h=s,Qt(s)?h=function(t){return Ht(t,_e(t))}(s):nt(s)&&!lt(s)||(h=Qn(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Lr(t,n,h)}}function Nr(t,e,n,r,i){t!==e&&Mr(e,(function(o,a){if(i||(i=new bn),nt(o))Ir(t,e,a,n,Nr,r,i);else{var s=r?r(Rr(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Lr(t,a,s)}}),_e)}function Ur(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 jr(t,e){var n=-1,r=zt(t)?Array(t.length):[];return Ar(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=Fe),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):Ge(o,u):i||(o[o.length]=u)}return o}(function(t,e){return(Q(t)?$:jr)(t,Tr(e))}(t,e),1/0)}function Hr(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 Gr(t,e){return mr(t,e)}var Br,Fr,zr=(Br=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}(mn(function(t){return(t=Ue(t))&&t.replace($e,Ze).replace(Qe,"")}(t).replace(yn,"")),Br,"")}),Wr=(Fr=function(t,e,n){Nr(t,e,n)},Bt((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=Fr.length>3&&"function"==typeof i?(r--,i):void 0,o&&Wt(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&Fr(t,a,n,i)}return t})));function Yr(t,e){var n;return Ar(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function qr(t,e,n){var r=Q(t)?sr:Yr;return n&&Wt(t,e,n)&&(e=void 0),r(t,Tr(e))}var Xr,Kr=Nn&&1/hr(new Nn([,-0]))[1]==1/0?function(t){return new Nn(t)}:function(){};function Zr(t){return t&&t.length?function(t,e,n){var r=-1,i=Lt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ur;else if(o>=200){var c=e?null:Kr(t);if(c)return hr(c);a=!1,i=ur,u=new ar}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}function $r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Qr(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=Dr,t.clone=or,t.merge=Wr,t.removeArrayDuplicates=Zr,t.clamp=_n,t.isEqual=Gr,t.flatMapDeep=Vr,t.kebabCase=zr,t.fromPairs=Hr,t.some=qr,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===O.TIME?o.mapsTo="date":s===O.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)}}(Xr||(Xr={}));var Jr=Qr((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}));$r(Jr);var ti=Qr((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}));$r(ti);var ei=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ti)&&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}));$r(ei);var ni=Qr((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}));$r(ni);var ri=Qr((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}));$r(ri);var ii=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ri)&&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}));$r(ii);var oi=Qr((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}));$r(oi);var ai=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));$r(ai);var si=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(oi),r=i(ai);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}));$r(si);var ui=$r(Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Jr),r=s(ei),i=s(ni),o=s(ii),a=s(si);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},li={position:T.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4},truncation:ci},hi={x:{numberOfTicks:5},y:{numberOfTicks:5}},fi={horizontalOffset:10,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:ci},di={top:{includeZero:!0,truncation:ci},bottom:{includeZero:!0,truncation:ci},left:{includeZero:!0,truncation:ci},right:{includeZero:!0,truncation:ci}},pi={addSpaceOnEdges:1,showDayName:!1,localeObject:ui,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"}}},gi={width:null,height:null,resizable:!0,tooltip:fi,legend:li,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null}},vi=Xr.merge({},gi,{axes:di,timeScale:pi,grid:hi}),mi=Xr.merge({},vi,{bars:{maxWidth:16},timeScale:Xr.merge(pi,{addSpaceOnEdges:1})}),yi=Xr.merge({},mi,{}),_i=Xr.merge({},mi,{}),bi=Xr.merge({},mi,{bars:Xr.merge({},mi.bars,{dividerSize:1.5})}),xi=Xr.merge({},vi,{points:{radius:3,filled:!1}}),wi=Xr.merge({},xi,{timeScale:Xr.merge(pi,{addSpaceOnEdges:0})}),Oi=wi,Ei=Xr.merge({},vi,{points:{radius:4,fillOpacity:.3,filled:!0}}),Ti=Xr.merge({},vi,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Si=Xr.merge({},gi,{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}}}),Mi=Xr.merge({},gi,{legend:{enabled:!1},gauge:{type:L.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()}}}),Ai={chart:gi,axisChart:vi,simpleBarChart:yi,groupedBarChart:_i,stackedBarChart:bi,bubbleChart:Ti,lineChart:xi,areaChart:wi,stackedAreaChart:Oi,scatterChart:Ei,pieChart:Si,donutChart:Xr.merge({},Si,{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:Xr.merge({},gi,{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:Mi},Ci={opacity:{unselected:.3,selected:1}},Pi={opacity:{unselected:0,selected:.4}},ki={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}},Di={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},Li={default:{size:24}},Ri=Object.freeze({__proto__:null,legend:li,grid:hi,baseTooltip:fi,timeScale:pi,options:Ai,lines:Ci,area:Pi,areas:{opacity:{unselected:.3,selected:1}},transitions:ki,axis:Di,spacers:Li,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),Ii={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Ni={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Ui={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},ji={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Vi={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Hi={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},Gi={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Bi=function(t,e){return t[e]},Fi=function(t){return Bi(ji,t)},zi=function(t){return Bi(Vi,t)},Wi=function(t){return Bi(Gi,t)},Yi=function(t){return Bi(Ni,t)},qi=function(t){return Bi(Ui,t)},Xi=function(t){return Bi(Ii,t)},Ki=function(t){return Bi(Hi,t)},Zi=[qi(70),zi(50),Ki(70),Yi(70),Xi(50),Xi(90),Wi(60),Fi(80),Yi(50),"#b28600",Ki(50),zi(90),"#8a3800",qi(50)],$i=[qi(60),zi(40),Ki(60),Yi(40),Xi(50),Xi(10),Wi(30),Fi(50),Yi(60),"#d2a106",Ki(40),zi(20),"#ba4e00",qi(30)],Qi=Zi,Ji=$i,to=$i,eo=Zi,no=Object.freeze({__proto__:null,WHITE:Zi,DARK:$i,G10:Qi,G90:Ji,G100:to,DEFAULT:eo});function ro(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function io(t){var e;return 1===t.length&&(e=t,t=function(t,n){return ro(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 oo=io(ro).right;function ao(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 so(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 uo=Math.sqrt(50),co=Math.sqrt(10),lo=Math.sqrt(2);function ho(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=fo(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 fo(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>=uo?10:o>=co?5:o>=lo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=uo?10:o>=co?5:o>=lo?2:1)}function po(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>=uo?i*=10:o>=co?i*=5:o>=lo&&(i*=2),e<t?-i:i}function go(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 vo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function mo(){}function yo(t,e){var n=new mo;if(t instanceof mo)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 _o(){}mo.prototype=yo.prototype={constructor:mo,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var bo=yo.prototype;_o.prototype=function(t,e){var n=new _o;if(t instanceof _o)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:_o,has:bo.has,add:function(t){return this["$"+(t+="")]=t,this},remove:bo.remove,clear:bo.clear,values:bo.keys,size:bo.size,empty:bo.empty,each:bo.each};var xo=Array.prototype,wo=xo.map,Oo=xo.slice,Eo={name:"implicit"};function To(){var t=yo(),e=[],n=[],r=Eo;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Eo)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=yo();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=Oo.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return To(e,n).unknown(r)},vo.apply(i,arguments),i}function So(){var t,e,n=To().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=o[1]<o[0],h=o[l-0],f=o[1-l];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=so(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],l()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,l()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return So(r(),o).round(a).paddingInner(s).paddingOuter(u).align(c)},vo.apply(l(),arguments)}function Mo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ao(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Co(){}var Po="\\s*([+-]?\\d+)\\s*",ko="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Do="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lo=/^#([0-9a-f]{3,8})$/,Ro=new RegExp("^rgb\\("+[Po,Po,Po]+"\\)$"),Io=new RegExp("^rgb\\("+[Do,Do,Do]+"\\)$"),No=new RegExp("^rgba\\("+[Po,Po,Po,ko]+"\\)$"),Uo=new RegExp("^rgba\\("+[Do,Do,Do,ko]+"\\)$"),jo=new RegExp("^hsl\\("+[ko,Do,Do]+"\\)$"),Vo=new RegExp("^hsla\\("+[ko,Do,Do,ko]+"\\)$"),Ho={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 Go(){return this.rgb().formatHex()}function Bo(){return this.rgb().formatRgb()}function Fo(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Lo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?zo(e):3===n?new Xo(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Xo(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Xo(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=Ro.exec(t))?new Xo(e[1],e[2],e[3],1):(e=Io.exec(t))?new Xo(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=No.exec(t))?Wo(e[1],e[2],e[3],e[4]):(e=Uo.exec(t))?Wo(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=jo.exec(t))?Qo(e[1],e[2]/100,e[3]/100,1):(e=Vo.exec(t))?Qo(e[1],e[2]/100,e[3]/100,e[4]):Ho.hasOwnProperty(t)?zo(Ho[t]):"transparent"===t?new Xo(NaN,NaN,NaN,0):null}function zo(t){return new Xo(t>>16&255,t>>8&255,255&t,1)}function Wo(t,e,n,r){return r<=0&&(t=e=n=NaN),new Xo(t,e,n,r)}function Yo(t){return t instanceof Co||(t=Fo(t)),t?new Xo((t=t.rgb()).r,t.g,t.b,t.opacity):new Xo}function qo(t,e,n,r){return 1===arguments.length?Yo(t):new Xo(t,e,n,null==r?1:r)}function Xo(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ko(){return"#"+$o(this.r)+$o(this.g)+$o(this.b)}function Zo(){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 $o(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qo(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ta(t,e,n,r)}function Jo(t){if(t instanceof ta)return new ta(t.h,t.s,t.l,t.opacity);if(t instanceof Co||(t=Fo(t)),!t)return new ta;if(t instanceof ta)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 ta(a,s,u,t.opacity)}function ta(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ea(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 na(t){return function(){return t}}function ra(t){return 1==(t=+t)?ia: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):na(isNaN(e)?n:e)}}function ia(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):na(isNaN(t)?e:t)}Mo(Co,Fo,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Go,formatHex:Go,formatHsl:function(){return Jo(this).formatHsl()},formatRgb:Bo,toString:Bo}),Mo(Xo,qo,Ao(Co,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xo(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xo(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:Ko,formatHex:Ko,formatRgb:Zo,toString:Zo})),Mo(ta,(function(t,e,n,r){return 1===arguments.length?Jo(t):new ta(t,e,n,null==r?1:r)}),Ao(Co,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ta(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ta(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 Xo(ea(t>=240?t-240:t+120,i,r),ea(t,i,r),ea(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 oa=function t(e){var n=ra(e);function r(t,e){var r=n((t=qo(t)).r,(e=qo(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ia(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 aa(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 sa(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]=pa(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 ua(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ca(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function la(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]=pa(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var ha=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fa=new RegExp(ha.source,"g");function da(t,e){var n,r,i,o=ha.lastIndex=fa.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=ha.exec(t))&&(r=fa.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:ca(n,r)})),o=fa.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 pa(t,e){var n,r=typeof e;return null==e||"boolean"===r?na(e):("number"===r?ca:"string"===r?(n=Fo(e))?(e=n,oa):da:e instanceof Fo?oa:e instanceof Date?ua:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?aa:Array.isArray(e)?sa:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?la:ca)(t,e)}function ga(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var va,ma,ya,_a,ba=180/Math.PI,xa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wa(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)*ba,skewX:Math.atan(u)*ba,scaleX:a,scaleY:s}}function Oa(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:ca(t,i)},{i:u-2,x:ca(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:ca(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:ca(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:ca(t,n)},{i:s-2,x:ca(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 Ea=Oa((function(t){return"none"===t?xa:(va||(va=document.createElement("DIV"),ma=document.documentElement,ya=document.defaultView),va.style.transform=t,t=ya.getComputedStyle(ma.appendChild(va),null).getPropertyValue("transform"),ma.removeChild(va),wa(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ta=Oa((function(t){return null==t?xa:(_a||(_a=document.createElementNS("http://www.w3.org/2000/svg","g")),_a.setAttribute("transform",t),(t=_a.transform.baseVal.consolidate())?wa((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):xa)}),", ",")",")");function Sa(t){return+t}var Ma=[0,1];function Aa(t){return t}function Ca(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Pa(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function ka(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ca(i,r),o=n(a,o)):(r=Ca(r,i),o=n(o,a)),function(t){return o(r(t))}}function Da(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]=Ca(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=oo(t,e,1,r)-1;return o[n](i[n](e))}}function La(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ra(){var t,e,n,r,i,o,a=Ma,s=Ma,u=pa,c=Aa;function l(){return r=Math.min(a.length,s.length)>2?Da:ka,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=r(s,a.map(t),ca)))(n)))},h.domain=function(t){return arguments.length?(a=wo.call(t,Sa),c===Aa||(c=Pa(a)),l()):a.slice()},h.range=function(t){return arguments.length?(s=Oo.call(t),l()):s.slice()},h.rangeRound=function(t){return s=Oo.call(t),u=ga,l()},h.clamp=function(t){return arguments.length?(c=t?Pa(a):Aa,h):c!==Aa},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Ia(t,e){return Ra()(t,e)}function Na(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 Ua(t){return(t=Na(Math.abs(t)))?t[1]:NaN}var ja,Va=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ha(t){if(!(e=Va.exec(t)))throw new Error("invalid format: "+t);var e;return new Ga({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 Ga(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 Ba(t,e){var n=Na(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")}Ha.prototype=Ga.prototype,Ga.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 Fa={"%":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 Ba(100*t,e)},r:Ba,s:function(t,e){var n=Na(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ja=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")+Na(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 za(t){return t}var Wa,Ya,qa,Xa=Array.prototype.map,Ka=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Za(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?za:(e=Xa.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?za:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Xa.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ha(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"):Fa[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=Fa[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,f=_,O=b;if("c"===y)O=x(t)+O,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:x(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:c:"-"===h||"("===h?"":h)+f,O=("s"===y?Ka[8+ja/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var T=f.length+t.length+O.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&d&&(t=r(S+t,S.length?p-O.length:1/0),S=""),n){case"<":t=f+t+O+S;break;case"=":t=f+S+t+O;break;case"^":t=S.slice(0,T=S.length>>1)+f+t+O+S.slice(T);break;default:t=S+f+t+O}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ha(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ua(e)/3))),i=Math.pow(10,-r),o=Ka[8+r/3];return function(t){return n(i*t)+o}}}}function $a(t,e,n,r){var i,o=po(t,e,n);switch((r=Ha(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(Ua(e)/3)))-Ua(Math.abs(t)))}(o,a))||(r.precision=i),qa(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,Ua(e)-Ua(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,-Ua(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Ya(r)}function Qa(t){var e=t.domain;return t.ticks=function(t){var n=e();return ho(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return $a(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=fo(s,u,n))>0?r=fo(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=fo(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 Ja(){var t=Ia(Aa,Aa);return t.copy=function(){return La(t,Ja())},vo.apply(t,arguments),Qa(t)}function ts(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 es(t){return Math.log(t)}function ns(t){return Math.exp(t)}function rs(t){return-Math.log(-t)}function is(t){return-Math.exp(-t)}function os(t){return isFinite(t)?+("1e"+t):t<0?0:t}function as(t){return function(e){return-t(-e)}}function ss(t){var e,n,r=t(es,ns),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?os:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=as(e),n=as(n),t(rs,is)):t(es,ns),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<o;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=o-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=ho(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=Ya(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(ts(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Wa=Za({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ya=Wa.format,qa=Wa.formatPrefix;var us=new Date,cs=new Date;function ls(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 ls((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 us.setTime(+e),cs.setTime(+r),t(us),t(cs),Math.floor(n(us,cs))},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 hs=ls((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));hs.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ls((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):hs:null};var fs=ls((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()})),ds=ls((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()})),ps=ls((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()})),gs=ls((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 vs(t){return ls((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 ms=vs(0),ys=vs(1),_s=(vs(2),vs(3),vs(4)),bs=(vs(5),vs(6),ls((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()}))),xs=ls((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()}));xs.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ls((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 ws=ls((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 Os(t){return ls((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 Es=Os(0),Ts=Os(1),Ss=(Os(2),Os(3),Os(4)),Ms=(Os(5),Os(6),ls((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 As(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 Cs(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ps(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ms.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ls((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 ks,Ds,Ls={"-":"",_:" ",0:"0"},Rs=/^\s*\d+/,Is=/^%/,Ns=/[\\^$*+?|[\]().{}]/g;function Us(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 js(t){return t.replace(Ns,"\\$&")}function Vs(t){return new RegExp("^(?:"+t.map(js).join("|")+")","i")}function Hs(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Gs(t,e,n){var r=Rs.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Bs(t,e,n){var r=Rs.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Fs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function zs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ws(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ys(t,e,n){var r=Rs.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xs(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 Ks(t,e,n){var r=Rs.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Zs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function $s(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Qs(t,e,n){var r=Rs.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Js(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function tu(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function eu(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function nu(t,e,n){var r=Rs.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ru(t,e,n){var r=Rs.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iu(t,e,n){var r=Is.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ou(t,e,n){var r=Rs.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function au(t,e,n){var r=Rs.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function su(t,e){return Us(t.getDate(),e,2)}function uu(t,e){return Us(t.getHours(),e,2)}function cu(t,e){return Us(t.getHours()%12||12,e,2)}function lu(t,e){return Us(1+gs.count(xs(t),t),e,3)}function hu(t,e){return Us(t.getMilliseconds(),e,3)}function fu(t,e){return hu(t,e)+"000"}function du(t,e){return Us(t.getMonth()+1,e,2)}function pu(t,e){return Us(t.getMinutes(),e,2)}function gu(t,e){return Us(t.getSeconds(),e,2)}function vu(t){var e=t.getDay();return 0===e?7:e}function mu(t,e){return Us(ms.count(xs(t)-1,t),e,2)}function yu(t,e){var n=t.getDay();return t=n>=4||0===n?_s(t):_s.ceil(t),Us(_s.count(xs(t),t)+(4===xs(t).getDay()),e,2)}function _u(t){return t.getDay()}function bu(t,e){return Us(ys.count(xs(t)-1,t),e,2)}function xu(t,e){return Us(t.getFullYear()%100,e,2)}function wu(t,e){return Us(t.getFullYear()%1e4,e,4)}function Ou(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Us(e/60|0,"0",2)+Us(e%60,"0",2)}function Eu(t,e){return Us(t.getUTCDate(),e,2)}function Tu(t,e){return Us(t.getUTCHours(),e,2)}function Su(t,e){return Us(t.getUTCHours()%12||12,e,2)}function Mu(t,e){return Us(1+ws.count(Ms(t),t),e,3)}function Au(t,e){return Us(t.getUTCMilliseconds(),e,3)}function Cu(t,e){return Au(t,e)+"000"}function Pu(t,e){return Us(t.getUTCMonth()+1,e,2)}function ku(t,e){return Us(t.getUTCMinutes(),e,2)}function Du(t,e){return Us(t.getUTCSeconds(),e,2)}function Lu(t){var e=t.getUTCDay();return 0===e?7:e}function Ru(t,e){return Us(Es.count(Ms(t)-1,t),e,2)}function Iu(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Ss(t):Ss.ceil(t),Us(Ss.count(Ms(t),t)+(4===Ms(t).getUTCDay()),e,2)}function Nu(t){return t.getUTCDay()}function Uu(t,e){return Us(Ts.count(Ms(t)-1,t),e,2)}function ju(t,e){return Us(t.getUTCFullYear()%100,e,2)}function Vu(t,e){return Us(t.getUTCFullYear()%1e4,e,4)}function Hu(){return"+0000"}function Gu(){return"%"}function Bu(t){return+t}function Fu(t){return Math.floor(+t/1e3)}!function(t){ks=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Vs(i),l=Hs(i),h=Vs(o),f=Hs(o),d=Vs(a),p=Hs(a),g=Vs(s),v=Hs(s),m=Vs(u),y=Hs(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:su,e:su,f:fu,H:uu,I:cu,j:lu,L:hu,m:du,M:pu,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Bu,s:Fu,S:gu,u:vu,U:mu,V:yu,w:_u,W:bu,x:null,X:null,y:xu,Y:wu,Z:Ou,"%":Gu},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:Eu,e:Eu,f:Cu,H:Tu,I:Su,j:Mu,L:Au,m:Pu,M:ku,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Bu,s:Fu,S:Du,u:Lu,U:Ru,V:Iu,w:Nu,W:Uu,x:null,X:null,y:ju,Y:Vu,Z:Hu,"%":Gu},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:$s,e:$s,f:ru,H:Js,I:Js,j:Qs,L:nu,m:Zs,M:tu,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Ks,Q:ou,s:au,S:eu,u:Bs,U:Fs,V:zs,w:Gs,W:Ws,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:qs,Y:Ys,Z:Xs,"%":iu};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Ls[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 O(t,e){return function(n){var r,i,o=Ps(1900,void 0,1);if(E(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Cs(Ps(o.y,0,1))).getUTCDay(),r=i>4||0===i?Ts.ceil(r):Ts(r),r=ws.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=As(Ps(o.y,0,1))).getDay(),r=i>4||0===i?ys.ceil(r):ys(r),r=gs.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?Cs(Ps(o.y,0,1)).getUTCDay():As(Ps(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Cs(o)):As(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 Ls?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=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),Ds=ks.format,ks.parse,ks.utcFormat,ks.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 zu(t){return new Date(t)}function Wu(t){return t instanceof Date?+t:+new Date(+t)}function Yu(t,e,n,r,i,o,a,s,u){var c=Ia(Aa,Aa),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=io((function(t){return t[2]})).right(b,o);a===b.length?(i=po(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(po(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(wo.call(t,Wu)):h().map(zu)},c.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(t,e){return null==e?x:u(e)},c.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(ts(n,t)):c},c.copy=function(){return La(c,Yu(t,e,n,r,i,o,a,s,u))},c}var qu=Math.PI,Xu=2*qu,Ku=Xu-1e-6;function Zu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function $u(){return new Zu}function Qu(t){return function(){return t}}Zu.prototype=$u.prototype={constructor:Zu,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,c=o-t,l=a-e,h=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((qu-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%Xu+Xu),h>Ku?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=qu)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ju=Math.abs,tc=Math.atan2,ec=Math.cos,nc=Math.max,rc=Math.min,ic=Math.sin,oc=Math.sqrt,ac=Math.PI,sc=ac/2,uc=2*ac;function cc(t){return t>1?0:t<-1?ac:Math.acos(t)}function lc(t){return t>=1?sc:t<=-1?-sc:Math.asin(t)}function hc(t){return t.innerRadius}function fc(t){return t.outerRadius}function dc(t){return t.startAngle}function pc(t){return t.endAngle}function gc(t){return t&&t.padAngle}function vc(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-o)-h*(t-i))/f)*u,e+f*c]}function mc(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/oc(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,O=(_<0?-1:1)*oc(nc(0,x*x*b-w*w)),E=(w*_-y*O)/b,T=(-w*y-_*O)/b,S=(w*_+y*O)/b,M=(-w*y+_*O)/b,A=E-v,C=T-m,P=S-v,k=M-m;return A*A+C*C>P*P+k*k&&(E=S,T=M),{cx:E,cy:T,x01:-l,y01:-h,x11:E*(i/x-1),y11:T*(i/x-1)}}function yc(){var t=hc,e=fc,n=Qu(0),r=null,i=dc,o=pc,a=gc,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-sc,d=o.apply(this,arguments)-sc,p=Ju(d-f),g=d>f;if(s||(s=u=$u()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>uc-1e-12)s.moveTo(h*ec(f),h*ic(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*ec(d),l*ic(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,O=p,E=a.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):oc(l*l+h*h)),S=rc(Ju(h-l)/2,+n.apply(this,arguments)),M=S,A=S;if(T>1e-12){var C=lc(T/l*ic(E)),P=lc(T/h*ic(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(O-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(O=0,y=_=(f+d)/2)}var k=h*ec(y),D=h*ic(y),L=l*ec(x),R=l*ic(x);if(S>1e-12){var I,N=h*ec(_),U=h*ic(_),j=l*ec(b),V=l*ic(b);if(p<ac&&(I=vc(k,D,j,V,N,U,L,R))){var H=k-I[0],G=D-I[1],B=N-I[0],F=U-I[1],z=1/ic(cc((H*B+G*F)/(oc(H*H+G*G)*oc(B*B+F*F)))/2),W=oc(I[0]*I[0]+I[1]*I[1]);M=rc(S,(l-W)/(z-1)),A=rc(S,(h-W)/(z+1))}}O>1e-12?A>1e-12?(v=mc(j,V,k,D,h,A,g),m=mc(N,U,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<S?s.arc(v.cx,v.cy,A,tc(v.y01,v.x01),tc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,tc(v.y01,v.x01),tc(v.y11,v.x11),!g),s.arc(0,0,h,tc(v.cy+v.y11,v.cx+v.x11),tc(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,tc(m.y11,m.x11),tc(m.y01,m.x01),!g))):(s.moveTo(k,D),s.arc(0,0,h,y,_,!g)):s.moveTo(k,D),l>1e-12&&w>1e-12?M>1e-12?(v=mc(L,R,N,U,l,-M,g),m=mc(k,D,j,V,l,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,tc(v.y01,v.x01),tc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,tc(v.y01,v.x01),tc(v.y11,v.x11),!g),s.arc(0,0,l,tc(v.cy+v.y11,v.cx+v.x11),tc(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,tc(m.y11,m.x11),tc(m.y01,m.x01),!g))):s.arc(0,0,l,x,b,g):s.lineTo(L,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ac/2;return[ec(r)*n,ic(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Qu(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Qu(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qu(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qu(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Qu(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Qu(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function _c(t){this._context=t}function bc(t){return new _c(t)}function xc(t){return t[0]}function wc(t){return t[1]}function Oc(){var t=xc,e=wc,n=Qu(!0),r=null,i=bc,o=null;function a(a){var s,u,c,l=a.length,h=!1;for(null==r&&(o=i(c=$u())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Qu(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Qu(!!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 Ec(){var t=xc,e=null,n=Qu(0),r=wc,i=Qu(!0),o=null,a=bc,s=null;function u(u){var c,l,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(d=$u())),c=0;c<=p;++c){if(!(c<p&&i(f=u[c],c,u))===g)if(g=!g)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=l;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[c]=+t(f,c,u),m[c]=+n(f,c,u),s.point(e?+e(f,c,u):v[c],r?+r(f,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return Oc().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Qu(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Qu(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Qu(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:Qu(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qu(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Qu(!!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 Tc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Sc(t){return t}_c.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 Mc=Cc(bc);function Ac(t){this._curve=t}function Cc(t){function e(e){return new Ac(t(e))}return e._curve=t,e}function Pc(){return t=Oc().curve(Mc),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(Cc(t)):e()._curve},t;var t,e}Ac.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 kc=Array.prototype.slice;function Dc(){}function Lc(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 Rc(t){this._context=t}function Ic(t){return new Rc(t)}function Nc(t){this._context=t}function Uc(t){return new Nc(t)}function jc(t){this._context=t}function Vc(t){return new jc(t)}function Hc(t,e){this._basis=new Rc(t),this._beta=e}Rc.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:Lc(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:Lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Nc.prototype={areaStart:Dc,areaEnd:Dc,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:Lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},jc.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:Lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Hc.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 Gc=function t(e){function n(t){return 1===e?new Rc(t):new Hc(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Bc(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 Fc(t,e){this._context=t,this._k=(1-e)/6}Fc.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:Bc(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:Bc(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 zc=function t(e){function n(t){return new Fc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Wc(t,e){this._context=t,this._k=(1-e)/6}Wc.prototype={areaStart:Dc,areaEnd:Dc,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:Bc(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 Yc=function t(e){function n(t){return new Wc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function qc(t,e){this._context=t,this._k=(1-e)/6}qc.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:Bc(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 Xc=function t(e){function n(t){return new qc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Kc(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Zc(t,e){this._context=t,this._alpha=e}Zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Kc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var $c=function t(e){function n(t){return e?new Zc(t,e):new Fc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Qc(t,e){this._context=t,this._alpha=e}Qc.prototype={areaStart:Dc,areaEnd:Dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Kc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Jc=function t(e){function n(t){return e?new Qc(t,e):new Wc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function tl(t,e){this._context=t,this._alpha=e}tl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Kc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var el=function t(e){function n(t){return e?new tl(t,e):new qc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function nl(t){this._context=t}function rl(t){return new nl(t)}function il(t){return t<0?-1:1}function ol(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(il(o)+il(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function al(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function sl(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 ul(t){this._context=t}function cl(t){this._context=new ll(t)}function ll(t){this._context=t}function hl(t){return new ul(t)}function fl(t){return new cl(t)}function dl(t){this._context=t}function pl(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 gl(t){return new dl(t)}function vl(t,e){this._context=t,this._t=e}function ml(t){return new vl(t,.5)}function yl(t){return new vl(t,0)}function _l(t){return new vl(t,1)}function bl(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 xl(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function wl(t,e){return t[e]}nl.prototype={areaStart:Dc,areaEnd:Dc,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))}},ul.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:sl(this,this._t0,al(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,sl(this,al(this,n=ol(this,t,e)),n);break;default:sl(this,this._t0,n=ol(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(cl.prototype=Object.create(ul.prototype)).point=function(t,e){ul.prototype.point.call(this,e,t)},ll.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)}},dl.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=pl(t),i=pl(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)}},vl.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 Ol=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=Xr.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===O.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=li.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(Xr.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=li.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=yo(n,(function(t){return t[r]})).keys(),a=this.services.cartesianScales.domainAxisPosition,s=t.axes[a].scaleType;s===O.TIME?o.sort((function(t,e){return new Date(t)-new Date(e)})):s!==O.LOG&&s!==O.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=Xr.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=Qu([]),e=xl,n=bl,r=wl;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(o=0;o<c;++o){for(var h,f=s[o],d=l[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(l);o<c;++o)l[a[o]].index=o;return n(l,a),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Qu(kc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Qu(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?xl:"function"==typeof t?t:Qu(kc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?bl: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:Xr.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(N.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=li.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})),c=this.getOptions(),l=i.some((function(t){return t.status===r}));c.data.selectedGroups=l?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(N.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=Xr.getProperty(t,"label");if(null===a){var s=Xr.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=li.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=yo(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=eo,e=this.getOptions(),n=Xr.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=To().range(r).domain(this.allDataGroups)}else this.colorScale=To().range(t).domain(this.allDataGroups)},t}(),El=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}(),Tl="http://www.w3.org/1999/xhtml",Sl={svg:"http://www.w3.org/2000/svg",xhtml:Tl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ml(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Sl.hasOwnProperty(e)?{space:Sl[e],local:t}:t}function Al(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Tl&&e.documentElement.namespaceURI===Tl?e.createElement(t):e.createElementNS(n,t)}}function Cl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Pl(t){var e=Ml(t);return(e.local?Cl:Al)(e)}function kl(){}function Dl(t){return null==t?kl:function(){return this.querySelector(t)}}function Ll(){return[]}function Rl(t){return null==t?Ll:function(){return this.querySelectorAll(t)}}function Il(t){return function(){return this.matches(t)}}function Nl(t){return new Array(t.length)}function Ul(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ul.prototype={constructor:Ul,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 jl(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Ul(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function Vl(t,e,n,r,i,o,a){var s,u,c,l={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new Ul(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function Hl(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Gl(t){return function(){this.removeAttribute(t)}}function Bl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fl(t,e){return function(){this.setAttribute(t,e)}}function zl(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Wl(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Yl(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 ql(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Xl(t){return function(){this.style.removeProperty(t)}}function Kl(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Zl(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function $l(t,e){return t.style.getPropertyValue(e)||ql(t).getComputedStyle(t,null).getPropertyValue(e)}function Ql(t){return function(){delete this[t]}}function Jl(t,e){return function(){this[t]=e}}function th(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function eh(t){return t.trim().split(/^|\s+/)}function nh(t){return t.classList||new rh(t)}function rh(t){this._node=t,this._names=eh(t.getAttribute("class")||"")}function ih(t,e){for(var n=nh(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function oh(t,e){for(var n=nh(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ah(t){return function(){ih(this,t)}}function sh(t){return function(){oh(this,t)}}function uh(t,e){return function(){(e.apply(this,arguments)?ih:oh)(this,t)}}function ch(){this.textContent=""}function lh(t){return function(){this.textContent=t}}function hh(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function fh(){this.innerHTML=""}function dh(t){return function(){this.innerHTML=t}}function ph(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function gh(){this.nextSibling&&this.parentNode.appendChild(this)}function vh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mh(){return null}function yh(){var t=this.parentNode;t&&t.removeChild(this)}function _h(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bh(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}rh.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 xh={},wh=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(xh={mouseenter:"mouseover",mouseleave:"mouseout"}));function Oh(t,e,n){return t=Eh(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Eh(t,e,n){return function(r){var i=wh;wh=r;try{t.call(this,this.__data__,e,n)}finally{wh=i}}}function Th(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 Sh(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 Mh(t,e,n){var r=xh.hasOwnProperty(t.type)?Oh:Eh;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function Ah(t,e,n){var r=ql(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 Ch(t,e){return function(){return Ah(this,t,e)}}function Ph(t,e){return function(){return Ah(this,t,e.apply(this,arguments))}}var kh=[null];function Dh(t,e){this._groups=t,this._parents=e}function Lh(){return new Dh([[document.documentElement]],kh)}function Rh(t){return"string"==typeof t?new Dh([[document.querySelector(t)]],[document.documentElement]):new Dh([[t]],kh)}function Ih(){for(var t,e=wh;t=e.sourceEvent;)e=t;return e}function Nh(t){var e=Ih();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)}Dh.prototype=Lh.prototype={constructor:Dh,select:function(t){"function"!=typeof t&&(t=Dl(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(o=s[l])&&(a=t.call(o,o.__data__,l,s))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new Dh(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Rl(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,c=0;c<u;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new Dh(r,i)},filter:function(t){"function"!=typeof t&&(t=Il(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new Dh(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?Vl:jl,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=a[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new Dh(a,r))._enter=s,a._exit=u,a},enter:function(){return new Dh(this._enter||this._groups.map(Nl),this._parents)},exit:function(){return new Dh(this._exit||this._groups.map(Nl),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Dh(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=Hl);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),l=0;l<u;++l)(a=s[l])&&(c[l]=a);c.sort(e)}return new Dh(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=Ml(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?Bl:Gl:"function"==typeof e?n.local?Yl:Wl:n.local?zl:Fl)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Xl:"function"==typeof e?Zl:Kl)(t,e,null==n?"":n)):$l(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ql:"function"==typeof e?th:Jl)(t,e)):this.node()[t]},classed:function(t,e){var n=eh(t+"");if(arguments.length<2){for(var r=nh(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?uh:e?ah:sh)(n,e))},text:function(t){return arguments.length?this.each(null==t?ch:("function"==typeof t?hh:lh)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?fh:("function"==typeof t?ph:dh)(t)):this.node().innerHTML},raise:function(){return this.each(gh)},lower:function(){return this.each(vh)},append:function(t){var e="function"==typeof t?t:Pl(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Pl(t),r=null==e?mh:"function"==typeof e?e:Dl(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(yh)},clone:function(t){return this.select(t?bh:_h)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Th(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Mh:Sh,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ph:Ch)(t,e))}};var Uh={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 "},jh=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}()}(),Vh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Hh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Gh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Hh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Bh=["top","right","bottom","left","width","height","size","weight"],Fh="undefined"!=typeof MutationObserver,zh=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(){Gh(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)};zh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},zh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},zh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},zh.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},zh.prototype.connect_=function(){Vh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Fh?(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)},zh.prototype.disconnect_=function(){Vh&&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)},zh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Bh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},zh.getInstance=function(){return this.instance_||(this.instance_=new zh),this.instance_},zh.instance_=null;var Wh=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},Yh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Hh},qh=Jh(0,0,0,0);function Xh(t){return parseFloat(t)||0}function Kh(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Xh(t["border-"+n+"-width"])}),0)}function Zh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return qh;var r=Yh(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]=Xh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Xh(r.width),u=Xh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Kh(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Kh(r,"top","bottom")+a)),!function(t){return t===Yh(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Jh(i.left,i.top,s,u)}var $h="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Yh(t).SVGGraphicsElement}:function(t){return t instanceof Yh(t).SVGElement&&"function"==typeof t.getBBox};function Qh(t){return Vh?$h(t)?function(t){var e=t.getBBox();return Jh(0,0,e.width,e.height)}(t):Zh(t):qh}function Jh(t,e,n,r){return{x:t,y:e,width:n,height:r}}var tf=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Jh(0,0,0,0),this.target=t};tf.prototype.isActive=function(){var t=Qh(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},tf.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var ef=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Wh(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Wh(this,{target:t,contentRect:n})},nf=function(t,e,n){if(this.activeObservations_=[],this.observations_=new jh,"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};nf.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 Yh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new tf(t)),this.controller_.addObserver(this),this.controller_.refresh())}},nf.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 Yh(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))}},nf.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},nf.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},nf.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new ef(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},nf.prototype.clearActive=function(){this.activeObservations_.splice(0)},nf.prototype.hasActive=function(){return this.activeObservations_.length>0};var rf="undefined"!=typeof WeakMap?new WeakMap:new jh,of=function(t){if(!(this instanceof of))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=zh.getInstance(),n=new nf(t,e,this);rf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){of.prototype[t]=function(){return(e=rf.get(this))[t].apply(e,arguments);var e}}));var af=void 0!==Hh.ResizeObserver?Hh.ResizeObserver:of,sf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=Rh(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var c={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(c),a.width>0&&a.height>0))return c;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Xr.getProperty(t.node(),"width","baseVal","value"),height:Xr.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Rh(this.getHolder()).classed(Uh.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"style","prefix"),n=Rh(this.getHolder()).append("svg").classed(Uh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("title").text(Xr.getProperty(t,"title")||"Chart"),this.svg=n.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Rh(e).on("mouseover",(function(){t.services.events.dispatchEvent(N.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(N.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Xr.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(N.Chart.RESIZE))}),12.5);new af(i).observe(e)}},e}(El),uf=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}(El),cf={value:function(){}};function lf(){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 hf(r)}function hf(t){this._=t}function ff(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 df(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function pf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=cf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}hf.prototype=lf.prototype={constructor:hf,on:function(t,e){var n,r=this._,i=ff(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]=pf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=pf(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=df(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new hf(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 gf,vf,mf=0,yf=0,_f=0,bf=0,xf=0,wf=0,Of="object"==typeof performance&&performance.now?performance:Date,Ef="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Tf(){return xf||(Ef(Sf),xf=Of.now()+wf)}function Sf(){xf=0}function Mf(){this._call=this._time=this._next=null}function Af(t,e,n){var r=new Mf;return r.restart(t,e,n),r}function Cf(){xf=(bf=Of.now())+wf,mf=yf=0;try{!function(){Tf(),++mf;for(var t,e=gf;e;)(t=xf-e._time)>=0&&e._call.call(null,t),e=e._next;--mf}()}finally{mf=0,function(){var t,e,n=gf,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:gf=e);vf=t,kf(r)}(),xf=0}}function Pf(){var t=Of.now(),e=t-bf;e>1e3&&(wf-=e,bf=t)}function kf(t){mf||(yf&&(yf=clearTimeout(yf)),t-xf>24?(t<1/0&&(yf=setTimeout(Cf,t-Of.now()-wf)),_f&&(_f=clearInterval(_f))):(_f||(bf=Of.now(),_f=setInterval(Pf,1e3)),mf=1,Ef(Cf)))}function Df(t,e,n){var r=new Mf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Mf.prototype=Af.prototype={constructor:Mf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Tf():+n)+(null==e?0:+e),this._next||vf===this||(vf?vf._next=this:gf=this,vf=this),this._call=t,this._time=n,kf()},stop:function(){this._call&&(this._call=null,this._time=1/0,kf())}};var Lf=lf("start","end","cancel","interrupt"),Rf=[];function If(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Df(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(Df((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Af((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:Lf,tween:Rf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Nf(t,e){var n=jf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Uf(t,e){var n=jf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function jf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Vf(t,e){var n,r;return function(){var i=Uf(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 Hf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Uf(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function Gf(t,e,n){var r=t._id;return t.each((function(){var t=Uf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return jf(t,r).value[e]}}function Bf(t,e){var n;return("number"==typeof e?ca:e instanceof Fo?oa:(n=Fo(e))?(e=n,oa):da)(t,e)}function Ff(t){return function(){this.removeAttribute(t)}}function zf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wf(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 Yf(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 qf(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 Xf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Kf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Zf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function $f(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Zf(t,i)),n}return i._value=e,i}function Qf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Kf(t,i)),n}return i._value=e,i}function Jf(t,e){return function(){Nf(this,t).delay=+e.apply(this,arguments)}}function td(t,e){return e=+e,function(){Nf(this,t).delay=e}}function ed(t,e){return function(){Uf(this,t).duration=+e.apply(this,arguments)}}function nd(t,e){return e=+e,function(){Uf(this,t).duration=e}}function rd(t,e){if("function"!=typeof e)throw new Error;return function(){Uf(this,t).ease=e}}function id(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)?Nf:Uf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var od=Lh.prototype.constructor;function ad(t){return function(){this.style.removeProperty(t)}}function sd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ud(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&sd(t,o,n)),r}return o._value=e,o}function cd(t){return function(e){this.textContent=t.call(this,e)}}function ld(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&cd(r)),e}return r._value=t,r}var hd=0;function fd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function dd(t){return Lh().transition(t)}function pd(){return++hd}var gd=Lh.prototype;function vd(t){return+t}fd.prototype=dd.prototype={constructor:fd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Dl(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,c=r[a],l=c.length,h=o[a]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,If(h[f],e,n,f,h,jf(s,n)));return new fd(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Rl(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=jf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&If(f,e,n,g,d,p);o.push(d),a.push(u)}return new fd(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=Il(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new fd(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new fd(a,this._parents,this._name,this._id)},selection:function(){return new od(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=pd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var l=jf(a,e);If(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new fd(r,this._parents,t,n)},call:gd.call,nodes:gd.nodes,node:gd.node,size:gd.size,empty:gd.empty,each:gd.each,on:function(t,e){var n=this._id;return arguments.length<2?jf(this.node(),n).on.on(t):this.each(id(n,t,e))},attr:function(t,e){var n=Ml(t),r="transform"===n?Ta:Bf;return this.attrTween(t,"function"==typeof e?(n.local?Xf:qf)(n,r,Gf(this,"attr."+t,e)):null==e?(n.local?zf:Ff)(n):(n.local?Yf:Wf)(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=Ml(t);return this.tween(n,(r.local?$f:Qf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ea:Bf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=$l(this,t),a=(this.style.removeProperty(t),$l(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ad(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=$l(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=$l(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Gf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Uf(this,t),c=u.on,l=null==u.value[a]?o||(o=ad(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=$l(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,ud(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}}(Gf(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,ld(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=jf(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?Vf:Hf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Jf:td)(e,t)):jf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ed:nd)(e,t)):jf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(rd(e,t)):jf(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=Uf(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 md={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function yd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return md.time=Tf(),md;return n}Lh.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)}))},Lh.prototype.transition=function(t){var e,n;t instanceof fd?(e=t._id,t=t._name):(e=pd(),(n=md).time=Tf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)(a=s[c])&&If(a,t,e,c,s,n||yd(a,e));return new fd(r,this._parents,t,e)};var _d=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(N.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=dd(t).duration(Xr.getProperty(ki,t,"duration")||ki.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=dd(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}(El);function bd(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 xd(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 wd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=xd(e);return n.setDate(n.getDate()+r),n}function Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t).getTime(),r=xd(e);return new Date(n+r)}function Ed(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,36e5*n)}function Td(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Sd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(t);return e.setHours(0,0,0,0),e}function Md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(t),r=Sd(e),i=n.getTime()-Td(n),o=r.getTime()-Td(r);return Math.round((i-o)/864e5)}function Ad(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,6e4*n)}function Cd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(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 Pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=xd(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Cd(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,1e3*n)}function Dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Pd(t,12*n)}function Ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Rd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(t);return!isNaN(e)}function Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e);return n.getFullYear()-r.getFullYear()}function Ud(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e);return n.getTime()-r.getTime()}function jd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Hd={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 Gd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Bd={date:Gd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Gd({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:Gd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function zd(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 Wd(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var Yd,qd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Hd[t]?Hd[t]:1===e?Hd[t].one:Hd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Bd,formatRelative:function(t,e,n,r){return Fd[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:zd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:zd({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:zd({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:zd({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:zd({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:(Yd={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(Yd.matchPattern);if(!i)return null;var o=i[0],a=n.match(Yd.parsePattern);if(!a)return null;var s=Yd.valueCallback?Yd.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Wd({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:Wd({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:Wd({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:Wd({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:Wd({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 Xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,-n)}function Kd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Zd=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Kd("yy"===e?r%100:r,e.length)},$d=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Kd(n+1,2)},Qd=function(t,e){return Kd(t.getUTCDate(),e.length)},Jd=function(t,e){return Kd(t.getUTCHours()%12||12,e.length)},tp=function(t,e){return Kd(t.getUTCHours(),e.length)},ep=function(t,e){return Kd(t.getUTCMinutes(),e.length)},np=function(t,e){return Kd(t.getUTCSeconds(),e.length)},rp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Kd(Math.floor(r*Math.pow(10,n-3)),e.length)};function ip(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=bd(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 op(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=ip(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=ip(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=op(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=ip(n);return r}function sp(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:xd(i),a=null==n.weekStartsOn?o:xd(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=bd(t),u=s.getUTCDay(),c=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function up(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=bd(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:xd(a),u=null==i.firstWeekContainsDate?s:xd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=sp(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=sp(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}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.firstWeekContainsDate,o=null==i?1:xd(i),a=null==n.firstWeekContainsDate?o:xd(n.firstWeekContainsDate),s=up(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var c=sp(u,e);return c}var lp="midnight",hp="noon",fp="morning",dp="afternoon",pp="evening",gp="night",vp={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 Zd(t,e)},Y:function(t,e,n,r){var i=up(t,r),o=i>0?i:1-i;return"YY"===e?Kd(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Kd(o,e.length)},R:function(t,e){return Kd(op(t),e.length)},u:function(t,e){return Kd(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 Kd(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 Kd(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 $d(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 Kd(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=bd(t),r=sp(n,e).getTime()-cp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Kd(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=bd(t),n=ip(e).getTime()-ap(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Kd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Qd(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=bd(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"}):Kd(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 Kd(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 Kd(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 Kd(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?hp:0===i?lp: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?pp:i>=12?dp:i>=4?fp:gp,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 Jd(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):tp(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ep(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):np(t,e)},S:function(t,e){return rp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return yp(i);case"XXXX":case"XX":return _p(i);case"XXXXX":case"XXX":default:return _p(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return yp(i);case"xxxx":case"xx":return _p(i);case"xxxxx":case"xxx":default:return _p(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+mp(i,":");case"OOOO":default:return"GMT"+_p(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+mp(i,":");case"zzzz":default:return"GMT"+_p(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Kd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Kd((r._originalDate||t).getTime(),e.length)}};function mp(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+Kd(o,2)}function yp(t,e){return t%60==0?(t>0?"-":"+")+Kd(Math.abs(t)/60,2):_p(t,e)}function _p(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Kd(Math.floor(i/60),2)+n+Kd(i%60,2)}function bp(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 xp(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 wp={p:xp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return bp(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}}",bp(i,e)).replace("{{time}}",xp(o,e))}},Op=["D","DD"],Ep=["YY","YYYY"];function Tp(t){return-1!==Op.indexOf(t)}function Sp(t){return-1!==Ep.indexOf(t)}function Mp(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 Ap=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Cp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pp=/^'([^]*?)'?$/,kp=/''/g,Dp=/[a-zA-Z]/;function Lp(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||qd,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:xd(a),u=null==i.firstWeekContainsDate?s:xd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=o.options&&o.options.weekStartsOn,l=null==c?0:xd(c),h=null==i.weekStartsOn?l:xd(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=bd(t);if(!Rd(f))throw new RangeError("Invalid time value");var d=Td(f),p=Xd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(Cp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,wp[e])(t,o.formatLong,g):t})).join("").match(Ap).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Rp(t);var n=vp[e];if(n)return!i.useAdditionalWeekYearTokens&&Sp(t)&&Mp(t),!i.useAdditionalDayOfYearTokens&&Tp(t)&&Mp(t),n(p,t,o.localize,g);if(e.match(Dp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Rp(t){return t.match(Pp)[1].replace(kp,"'")}function Ip(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return wd(t,-n)}function Np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Ed(t,-n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Ad(t,-n)}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Pd(t,-n)}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return kd(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Dd(t,-n)}var Gp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return n(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return Xr.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(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.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[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=Xr.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===O.LABELS?a(u)+a.step()/2:o===O.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 Xr.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return Xr.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===O.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 Xr.getProperty(n,"axes",t).scaleType===O.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=bd(t),r=bd(e),i=Ld(n,r),o=Math.abs(Nd(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Ld(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Hp(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=bd(t),r=bd(e),i=Ld(n,r),o=Math.abs(Id(n,r));n.setMonth(n.getMonth()-i*o);var a=Ld(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[jp(n,e),Pd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e),i=Ld(n,r),o=Math.abs(Md(n,r));n.setDate(n.getDate()-i*o);var a=Ld(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Ip(n,e),wd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Np(n,e),Ed(r,e)];if(jd(r,n)>30)return[Up(n,30*e),Ad(r,30*e)];if(jd(r,n)>1)return[Up(n,e),Ad(r,e)];if(Vd(r,n)>15)return[Vp(n,15*e),kd(r,15*e)];if(Vd(r,n)>1)return[Vp(n,e),kd(r,e)];return[n,r]}(e,Xr.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,Di.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"axes");return null===Xr.getProperty(e,b.LEFT)&&null!==Xr.getProperty(e,b.RIGHT)||!0===Xr.getProperty(e,b.RIGHT,"main")?b.RIGHT:b.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"axes");return null===Xr.getProperty(e,b.BOTTOM)&&null!==Xr.getProperty(e,b.TOP)||!0===Xr.getProperty(e,b.TOP,"main")?b.TOP:b.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Xr.getProperty(n,"axes",t),i=Xr.getProperty(n,"axes",e),o=r.scaleType||O.LINEAR,a=i.scaleType||O.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===O.LABELS||a===O.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===O.LABELS||o===O.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=Xr.getProperty(e,"axes",t),r=n.includeZero,i=Xr.getProperty(n,"scaleType")||O.LINEAR;if(this.model.isDataEmpty())return[];var o,a,s=this.model.getDisplayData(),u=n.mapsTo,c=n.percentage;if(n.domain)return i===O.LABELS?n.domain:this.extendsDomain(t,n.domain);if(c)return[0,100];if(n&&i===O.LABELS)return yo(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!==O.TIME&&r&&a.push(0),o=ao(a),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Xr.getProperty(e,"axes",t);if(!n)return null;var r,i=Xr.getProperty(n,"scaleType")||O.LINEAR;return this.scaleTypes[t]=i,(r=i===O.TIME?function(){return vo.apply(Yu(xs,bs,ms,gs,ps,ds,fs,hs,Ds).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===O.LOG?function t(){var e=ss(Ra()).domain([1,10]);return e.copy=function(){return La(e,t()).base(e.base())},vo.apply(e,arguments),e}().base(n.base||10):i===O.LABELS?So():Ja()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Xr.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)!==O.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=Xr.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}(El);var Bp,Fp,zp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:bc,curveLinearClosed:rl,curveBasis:Ic,curveBasisClosed:Uc,curveBasisOpen:Vc,curveBundle:Gc,curveCardinal:zc,curveCardinalClosed:Yc,curveCardinalOpen:Xc,curveCatmullRom:$c,curveCatmullRomClosed:Jc,curveCatmullRomOpen:el,curveMonotoneX:hl,curveMonotoneY:fl,curveNatural:gl,curveStep:ml,curveStepAfter:_l,curveStepBefore:yl},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}(El),Wp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(Rh(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=Xr.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Uh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Uh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=Xr.getProperty(this.model.getOptions(),"style","prefix");return sf.appendOrSelect(this.parent,"g."+Uh.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Yp=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+" "+r.DOCUMENT),n=this.model.getOptions(),i=Xr.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=Xr.getProperty(i,"truncation","type"),c=Xr.getProperty(i,"truncation","threshold"),l=Xr.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>c?Xr.truncateLabel(t.name,u,l):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=Xr.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,c=r.legend.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=Xr.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=Rh(this),g=Rh(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===S.VERTICAL)h===S.VERTICAL&&0!==r&&d++;else{var v=sf.getSVGElementSize(e.parent,{useAttr:!0}),m=sf.getSVGElementSize(Rh(this).select("text"),{useBBox:!0}),y=sf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;c.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===S.HORIZONTAL)&&"0"===c.select("rect.checkbox").attr("y"),x=h===S.VERTICAL&&"0"===c.select("rect.checkbox").attr("x"),w=b||x;l&&c.select("g.check").empty()&&w?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=Xr.getProperty(n,"legend"),i=Xr.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(N.Legend.ITEM_HOVER,{hoveredElement:Rh(this)});var e=n.legend.checkbox.radius,r=Rh(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();var o=r.datum();o.name.length>i&&t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,content:o.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(N.Legend.ITEM_CLICK,{clickedElement:Rh(this)});var e=Rh(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Rh(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(N.Tooltip.HIDE),t.services.events.dispatchEvent(N.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(Wp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Fp||(Fp={}));var qp=((Bp={})[Fp.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)}},Bp[Fp.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)}},Bp[Fp.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)}},Bp[Fp.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)}},Bp),Xp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Kp=function(){function t(t){void 0===t&&(t={}),this.positions=qp,this.positions=Object.assign({},qp,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:Xp.innerHeight-Xp.scrollY,height:Xp.innerWidth-Xp.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}(),Zp=(new Kp,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function $p(t,e,n,r){var i=0===e,o=2===Number(Lp(new Date(t),"c")),a=1===Number(Lp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||eg(t)||ng(t)||rg(t);case"daily":return r?i||o||rg(t):i||ng(t)||rg(t);case"monthly":return i||rg(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function Qp(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=Xr.getProperty(r,"timeIntervalFormats")[o],u=Xr.getProperty(s,"primary"),c=Xr.getProperty(s,"secondary");return Lp(a,$p(t,e,n,i)?u:c,{locale:r.localeObject})}function Jp(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function tg(t){return 1===t.length?"15seconds":function(t){var e=Zp.reduce((function(e,n,r){n[0];var i=n[1],o=Zp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Zp[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 eg(t){var e=Jp(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function ng(t){var e=Jp(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function rg(t){var e=Jp(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 ig=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new Kp,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=Xr.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Uh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=o+"-"+a,this.threshold=sf.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=sf.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),c=sf.appendOrSelect(this.threshold,"line.threshold-line");c.style("stroke",i);var l=this.services.cartesianScales.getScaleByPosition(o),h=this.services.cartesianScales.getScaleTypeByPosition(o),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===O.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],x=y[1],w=this.services.cartesianScales,E=w.getOrientation(),T=Xr.flipDomainAndRangeBasedOnOrientation((function(t){return w.getDomainValue(t)}),(function(t){return w.getRangeValue(t)}),E),S=T[0],M=T[1];if(o===b.TOP||o===b.BOTTOM){var A=S(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+x+")"),c.attr("y2",_-x),u.attr("width",_-x).classed("rotate",!0)}else{A=M(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),c.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(N.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(N.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)===O.TIME){var i=[b.LEFT,b.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=Xr.getProperty(r,"timeScale");return Qp(e,0,tg(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=Rh(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=sf.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=Nh(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[Fp.RIGHT,Fp.LEFT,Fp.TOP,Fp.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;sf.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(N.Threshold.SHOW,{hoveredElement:Rh(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(N.Threshold.HIDE,{hoveredElement:Rh(t.threshold)})}))},e}(Wp),og=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=sf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=sf.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=sf.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("mouseover",(function(){a.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:e,content:i})})).on("mousemove",(function(){a.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("mouseout",(function(){a.services.events.dispatchEvent(N.Tooltip.HIDE)}))}},e.prototype.render=function(){var t=this.getContainerSVG();sf.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}(Wp),ag=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Kp,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=Rh(this.services.domUtils.getHolder()),n=Xr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=sf.appendOrSelect(e,"div."+Uh.prefix+"--"+n+"--tooltip");var r=sf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(N.Tooltip.MOVE,(function(){t.positionTooltip()})),this.services.events.addEventListener(N.Tooltip.SHOW,(function(e){var n=e.detail.data,i=t.getTooltipHTML(e);Xr.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(n,i)):r.html(i),t.positionTooltip(),t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(N.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this.model.getOptions(),n=Xr.getProperty(e,"tooltip","truncation","type"),r=Xr.getProperty(e,"tooltip","truncation","threshold"),i=Xr.getProperty(e,"tooltip","truncation","numCharacter");return n!==x.NONE?t.map((function(t){return t.label&&t.label.length>r&&(t.label=Xr.truncateLabel(t.label,n,i)),t.value&&t.value.length>r&&(t.value=Xr.truncateLabel(t.value,n,i)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</div>";else{var n=this.getItems(t);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.color?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<p class="label">'+t.label+'</p>\n\t\t\t\t\t\t\t\t<p class="value">'+t.value+"</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t){var e=this.model.getOptions(),n=Xr.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Nh(n);if(t){var o=t.placement===E.TOP?Fp.TOP:Fp.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Fp.RIGHT,Fp.LEFT,Fp.TOP,Fp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.horizontalOffset;a===Fp.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(Wp),sg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=this.model.getOptions(),r=t.detail.data,i=this.services.cartesianScales,o=i.getDomainAxisOptions(),a=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),c=i.getRangeIdentifier(),l=i.getRangeAxisScaleType(),h=n.data.groupMapsTo,f=o.title;if(!f){var d=i.getDomainAxisPosition();f=d===b.BOTTOM||d===b.TOP?"x-value":"y-value"}var p,g=r[0][a];if(s===O.TIME?g=Lp(new Date(r[0][a]),"MMM d, yyyy"):s===O.LINEAR&&(g=g.toLocaleString()),1===r.length){var v=r[0],m=u.title;if(!m){var y=i.getRangeAxisPosition();m=y===b.LEFT||y===b.RIGHT?"y-value":"x-value"}var _=v[c];l===O.LINEAR&&(_=_.toLocaleString()),p=[{label:f,value:g},{label:m,value:_},{label:"Group",value:v[h],color:this.model.getStrokeColor(v[h])}]}else r.length>1&&(p=(p=[{label:f,value:this.valueFormatter(g)}]).concat(r.map((function(t){return{label:t[h],value:e.valueFormatter(t[c]),color:e.model.getStrokeColor(t[h])}})).sort((function(t,e){return e.value-t.value}))),!0===Xr.getProperty(n,"tooltip","showTotal")&&p.push({label:"Total",value:this.valueFormatter(r.reduce((function(t,e){return t+e[c]}),0)),bold:!0}));return p},e}(ag),ug=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?Pi.opacity.unselected:Pi.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Pi.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=Ec().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",Pi.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wp),cg=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?Pi.opacity.unselected:Pi.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Pi.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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)===O.TIME){var c=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),l=this.model.getStackedData({percentage:c}),h=e.selectAll("path.area").data(l,(function(t){return t[0][o]}));this.areaGenerator=Ec().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(l,(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",Pi.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}(Wp),lg=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}(Wp),hg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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 Xr.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=Rh(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(t){Rh(this);e.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:Rh(this),datum:t}),e.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Rh(this),datum:t})})).on("mouseout",(function(n){var r=Rh(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(N.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(lg),fg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=yo(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 c=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)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return 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 Xr.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=Rh(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fo(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(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(N.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.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=Xr.getProperty(t,"bars","width"),n=Xr.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=So().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(lg),dg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=(this.model.getDisplayData(),this.model.getOptions()),o=i.data.groupMapsTo,a=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(a,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[o])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,o=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-o/2,s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===w.VERTICAL?c+=1:c-=1),Xr.generateSVGPathString({x0:a,x1:s,y0:u,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,i=Rh(this);i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:i,datum:n});var o=e.model.getDisplayData(),a=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=o.find((function(e){return e[s]===n.data[n.group]&&e[a].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[a]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=Rh(this);e.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Rh(this),datum:t})})).on("mouseout",(function(n){var r=Rh(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(N.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(lg),pg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(N.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(N.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 c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(c,t),this.addEventListeners()},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=Xr.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Xr.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],c=s[1],l=u(t,e),h=c(t,e);return a&&o?h<=a.scaleValue&&l>=o.scaleValue:a?h<=a.scaleValue:o?l>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,u=this.services,c=u.cartesianScales,l=u.transitions,h=i.data.groupMapsTo,f=c.getDomainIdentifier(),d=c.getRangeIdentifier(),p=Xr.flipDomainAndRangeBasedOnOrientation((function(t,e){return c.getDomainValue(t,e)}),(function(t,e){return c.getRangeValue(t,e)}),c.getOrientation()),g=p[0],v=p[1],m=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[h],t[f],t,a)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,a)})).transition(l.getTransition("scatter-update-enter",e)).attr("cx",g).attr("cy",v).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[h],t[f],t,a))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",a?s:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[h],t[f],t)})).attr("opacity",m?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[d]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=Rh(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(N.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Scatter.SCATTER_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(N.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(N.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Wp),gg=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=sf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?ao(i):[1,1];return Ja().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}(pg),vg=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?Ci.opacity.unselected:Ci.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Ci.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=Xr.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],c=s[1],l=this.model.getOptions(),h=Oc().x(u).y(c).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(l.axes).some((function(t){return l.axes[t].percentage})),p=l.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:!Xr.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wp),mg=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}),c=e.selectAll("g.dots").data(u,(function(t){return t[0][i]}));c.exit().attr("opacity",0).remove();var l=c.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(c).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var h=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).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}(pg);function yg(t,e){var n=this,r=pa(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var _g=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=yc().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=yc().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=Sc,e=Tc,n=null,r=Qu(0),i=Qu(uc),o=Qu(0);function a(a){var s,u,c,l,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(uc,Math.max(-uc,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+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:Qu(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qu(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Qu(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=sf.appendOrSelect(n,"g.slices").attr("role",r.GROUP).selectAll("path.slice").data(u,(function(t){return t.data[a]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return 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+", "+Xr.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return yg.bind(this)(t,e.arc)}));var l=u.filter((function(t){return t.value>0})),h=sf.appendOrSelect(n,"g.labels").attr("role",r.GROUP).selectAll("text.pie-label").data(l,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Xr.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=l.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,a=t.yPosition-o.pie.callout.offsetY,t.direction=C.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=C.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=sf.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===C.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 Rh(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 Rh(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){var n=Rh(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEOVER,{element:Rh(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value,color:t.model.getStrokeColor(e.data[r])}]})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Pie.SLICE_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=sf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e}(Wp),bg=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 Xr.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 Xr.getProperty(t,"gauge","type")===L.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(Xr.getProperty(e,"gauge","deltaArrow","direction")){case R.UP:return"4,10 8,6 12,10";case R.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(),c=u+a*s,l=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=yc().innerRadius(f).outerRadius(h).startAngle(c).endAngle(l),this.arc=yc().innerRadius(f).outerRadius(h).startAngle(u).endAngle(c),sf.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=Xr.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=Xr.getProperty(e,"gauge","valueFontSize"),s=Xr.getProperty(e,"gauge","deltaFontSize"),u=Xr.getProperty(e,"gauge","numberSpacing"),c=0;n!==L.FULL||i?n===L.SEMI&&i&&(c=-(s(o)+u)):c=s(o);var l=sf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),h=sf.appendOrSelect(l,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=Xr.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=sf.getSVGElementSize(sf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;sf.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?Xr.getProperty(e,"gauge","deltaFontSize"):function(){return 0},o=n?Xr.getProperty(e,"gauge","numberFormatter"):function(){return null},a=Xr.getProperty(e,"gauge","deltaArrow","size"),s=Xr.getProperty(e,"gauge","numberSpacing"),u=sf.appendOrSelect(t,"g.gauge-numbers"),c=sf.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),l=sf.appendOrSelect(c,"text.gauge-delta-number");l.data(null===n?[]:[n]),l.enter().append("text").classed("gauge-delta-number",!0).merge(l).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return o(t)+"%"}));var h=sf.getSVGElementSize(sf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=Xr.getProperty(e,"gauge","deltaArrow","enabled"),d=c.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"),sf.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=Xr.getProperty(e,"gauge","status");sf.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(),l.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-Xr.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(N.Gauge.ARC_MOUSEOVER,{element:Rh(this),datum:e})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(N.Gauge.ARC_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"gauge","type"),n=sf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===L.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Wp),xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this;if(this.model.isDataEmpty())this.getContainerSVG().select("g.center").remove();else{var r=sf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();sf.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(Rh(this))})),sf.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(Xr.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=Xr.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?ga:ca)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(_g),wg=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=sf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var o=this.model.isDataEmpty(),a=Xr.getProperty(this.model.getOptions(),"data","loading");o||a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===P.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===P.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===P.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==P.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=Ja().domain([0,1]).range(t),this.yScale=Ja().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=sf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;this.backdrop=sf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",o);var a=sf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],c=(s[1],this.yScale.range()),l=(c[0],c[1]);this.backdrop.merge(a).attr("x",u).attr("y",l),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=Xr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),o=sf.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=Xr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=sf.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=sf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),o=i.width,a=i.height,s=sf.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=this.model.getOptions().pie,c=(sf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none"),yc().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI)),l=t+Math.abs(u.radiusOffset),h=t+(Math.min(o,a)-2*t)/2;sf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+l+", "+h+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n)},e.prototype.computeOuterRadius=function(){var t=this.model.getOptions(),e=sf.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=sf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=sf.appendOrSelect(e,"defs").lower(),o=sf.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(vd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Wp),Og=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||Li.default.size).attr("height",this.configs.size||Li.default.size).attr("opacity",0)},e}(Wp);function Eg(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 Tg(t,e){var n,r,i,o,a,s=new Cg(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Sg);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new Cg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ag)}function Sg(t){return t.children}function Mg(t){t.data=t.data.data}function Ag(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Cg(t){this.data=t,this.depth=this.height=0,this.parent=null}function Pg(t){if("function"!=typeof t)throw new Error;return t}function kg(){return 0}function Dg(t){return function(){return t}}function Lg(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 Rg(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}function Ig(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}Cg.prototype=Tg.prototype={constructor:Cg,count:function(){return this.eachAfter(Eg)},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 Tg(this).eachBefore(Mg)}};var Ng=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,c=o-r;do{l=y[b++].value}while(!l&&b<x);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(a={value:l,dice:u<c,children:y.slice(_,b)}),a.dice?Rg(a,n,r,i,w?r+=c*l/w:o):Ig(a,n,r,w?n+=u*l/w:i,o),w-=l,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Ug(){var t=Ng,e=!1,n=1,r=1,i=[0],o=kg,a=kg,s=kg,u=kg,c=kg;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Lg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Pg(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:Dg(+t),l):o},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Dg(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Dg(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Dg(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:Dg(+t),l):c},l}var jg=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===M.ROW_REVERSE||a.configs.direction===M.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return 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=Xr.getProperty(t,"data","growth","x");return e===A.PREFERRED||e===A.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 Xr.getProperty(t,"data","growth","x")===A.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=sf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=Tg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===M.ROW||this.configs.direction===M.ROW_REVERSE?Rg:Ig;Ug().tile(s).size([i,o])(a);var u=this.configs.direction===M.ROW||this.configs.direction===M.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(Rh(n));var i=Xr.getProperty(e,"data","growth","x");i!==A.PREFERRED&&i!==A.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Xr.getProperty(t,"data","growth","x"),n=sf.getSVGElementSize(Rh(this),{useBBox:!0});if("legend"===t.data.id){var r=sf.getSVGElementSize(Rh(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===A.PREFERRED){var a=u?n.width:n.height,s=u?i:o;t.data.size=a/s*100}})),c.exit().remove(),this.children.filter((function(t){return Xr.getProperty(t,"growth","x")===A.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=Tg({children:this.children}).sum((function(t){return t.size})),Ug().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){Xr.getProperty(e,"data","growth","x")===A.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}(Wp),Vg=Array.prototype.slice;function Hg(t){return t}function Gg(t){return"translate("+(t+.5)+",0)"}function Bg(t){return"translate(0,"+(t+.5)+")"}function Fg(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 Wg(){return!this.__axis}function Yg(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?Gg:Bg;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):Hg:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?zg:Fg)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),T=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),T=T.merge(O.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),E=E.transition(h),T=T.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?l(t):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(y(t))})),E.attr(c+"2",u*o),T.attr(c,u*p).text(d),_.filter(Wg).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=Vg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Vg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Vg.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 qg(t){return Yg(1,t)}function Xg(t){return Yg(2,t)}function Kg(t){return Yg(3,t)}function Zg(t){return Yg(4,t)}var $g=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=Xr.getProperty(o,"axes",i),s=Xr.getProperty(a,"scaleType"),u=Xr.getProperty(o,"data","loading"),c=Xr.getProperty(a,"ticks","number"),l=Xr.getProperty(a,"truncation","type"),h=Xr.getProperty(a,"truncation","threshold"),f=Xr.getProperty(a,"truncation","numCharacter"),d=null!==c,p=i===b.LEFT||i===b.RIGHT,g=Xr.getProperty(o,"timeScale"),v=this.getContainerSVG(),m=sf.getSVGElementSize(this.parent,{useAttrs:!0}),y=m.width,_=m.height;i===b.BOTTOM||i===b.TOP?(e=this.configs.axes[b.LEFT]?this.margins.left:0,n=this.configs.axes[b.RIGHT]?y-this.margins.right:y):(e=_-this.margins.bottom,n=this.margins.top);var w,E=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===O.LABELS?E.rangeRound([e,n]):E.range([e,n]),i){case b.LEFT:w=Zg;break;case b.BOTTOM:w=Kg;break;case b.RIGHT:w=Xg;break;case b.TOP:w=qg}var T=sf.appendOrSelect(v,"g.axis."+i),S=!T.select("g.ticks").empty(),M=sf.appendOrSelect(T,"g.ticks");S||M.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP);var A=sf.appendOrSelect(T,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0),C=sf.appendOrSelect(A,"g.tick"),P=sf.appendOrSelect(C,"text").text("0"),k=sf.getSVGElementSize(P.node(),{useBBox:!0}).height;C.remove();var D,L=this.scaleType===O.TIME||a.scaleType===O.TIME,R=this.scaleType||a.scaleType||O.LINEAR,I=w(E).tickSizeOuter(0);if(E.ticks){var N=void 0;if(d?N=c:(N=Di.ticks.number,p&&(N=this.getNumberOfFittingTicks(_,k,2.5))),1===E.ticks().length&&0===E.ticks()[0]&&(N=0),I.ticks(N),L)if(E.ticks(N).length){var U=Xr.getProperty(o,"timeScale","addSpaceOnEdges"),j=void 0;U&&(j=E.nice(N)),j=E.ticks(N),U&&j.length>2&&(j.splice(j.length-1,1),j.splice(0,1)),I.tickValues(j)}else I.tickValues([])}var V=Xr.getProperty(a,"ticks","formatter");if(L){var H=tg(I.tickValues());D=null===V?function(t,e){return Qp(t,e,H,g)}:function(t,e){var n=Qp(t,e,H,g);return V(t,e,n)}}else null===V?R===O.LINEAR&&(D=function(t){return t.toLocaleString()}):D=V;switch(I.tickFormat(D),i){case b.LEFT:M.attr("transform","translate("+this.margins.left+", 0)");break;case b.BOTTOM:M.attr("transform","translate(0, "+(_-this.margins.bottom)+")");break;case b.RIGHT:M.attr("transform","translate("+(y-this.margins.right)+", 0)");break;case b.TOP:M.attr("transform","translate(0, "+this.margins.top+")")}var G=this.model.isDataEmpty();if(a.title){var B=sf.appendOrSelect(T,"text.axis-title").html(G||u?"":a.title);switch(i){case b.LEFT:B.attr("transform","rotate(-90)").attr("y",0).attr("x",-E.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.BOTTOM:B.attr("transform","translate("+(this.margins.left/2+E.range()[1]/2)+", "+_+")").style("text-anchor","middle");break;case b.RIGHT:B.attr("transform","rotate(90)").attr("y",-y).attr("x",E.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.TOP:var F=sf.getSVGElementSize(B,{useBBox:!0}).height;B.attr("transform","translate("+(this.margins.left/2+E.range()[1]/2)+", "+F/2+")").style("text-anchor","middle")}}if(L){var z=tg(I.tickValues()),W=g.showDayName,Y=M;t&&(M=M.transition(this.services.transitions.getTransition("axis-update",t))),M=M.call(I),Y.selectAll(".tick").data(I.tickValues(),E).order().select("text").style("font-weight",(function(t,e){return $p(t,e,z,W)?"bold":"normal"}))}else M=t&&S?M.transition(this.services.transitions.getTransition("axis-update")).call(I):M.call(I);if(A.call(I),i===b.BOTTOM||i===b.TOP){var q=!1;if(E.step){q=A.selectAll("g.tick text").nodes().some((function(t){return sf.getSVGElementSize(t,{useBBox:!0}).width>=E.step()}))}else{var X=Xr.getProperty(a,"ticks","rotateIfSmallerThan")||Di.ticks.rotateIfSmallerThan;q=y/(L?I.tickValues().length:E.ticks().length)/2<X}q?(d||(I.ticks(this.getNumberOfFittingTicks(y,k,3.5)),A.call(I),M.call(I)),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((G||u)&&T.attr("opacity",0),l!==x.NONE&&s===O.LABELS){var K=this.model.getDataValuesGroupedByKeys();if(K.length>0){var Z=K.map((function(t){return t.sharedStackKey})),$=v.select("g.axis."+i+" g.ticks g.tick").html();T.selectAll("g.ticks g.tick").html($),T.selectAll("g.tick text").data(Z).text((function(t){return t.length>h?Xr.truncateLabel(t,l,f):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(Z).text((function(t){return t.length>h?Xr.truncateLabel(t,l,f):t})),T.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),T.selectAll("g.tick text").data(Z)}}this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=sf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=Xr.getProperty(r,"axes",e),o=Xr.getProperty(i,"scaleType"),a=Xr.getProperty(i,"truncation","threshold"),s=(this.scaleType===O.TIME||(i.scaleType,O.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEOVER,{element:Rh(this),datum:t}),o===O.LABELS&&t.length>a&&s.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:Rh(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEMOVE,{element:Rh(this),datum:t}),o===O.LABELS&&t.length>a&&s.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_CLICK,{element:Rh(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEOUT,{element:Rh(this),datum:t}),o===O.LABELS&&s.services.events.dispatchEvent(N.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 Xr.clamp(r,2,Di.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;sf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wp),Qg=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=Xr.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 $g(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=sf.getSVGElementSize(s,{useBBox:!0}),c=u.width,l=u.height;switch(r=i.getTitleRef().empty()?0:sf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,a){case b.TOP:o.top=l+r;break;case b.BOTTOM:o.bottom=l+r;break;case b.LEFT:o.left=c+r;break;case b.RIGHT:o.right=c+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=Xr.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new ig(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}(Wp),Jg=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(),sf.appendOrSelect(this.backdrop,"g.x.grid"),sf.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=Kg(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=Xr.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=Zg(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=Xr.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(Xr.getTranslationValues(t).tx)-Number(Xr.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Xr.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=+Xr.getTranslationValues(s).tx-+Xr.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=sf.getSVGElementSize(u).width-+Xr.getTranslationValues(a).tx}else o=+Xr.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Xr.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Xr.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=sf.appendOrSelect(t,"svg.chart-grid-backdrop");var c=sf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Wp);var tv,ev=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.formatTooltipData=function(t){return t},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=sf.appendOrSelect(i,"g.ruler"),u=sf.appendOrSelect(s,"line.ruler-line"),c=i.selectAll("[role=graphics-symbol]"),l=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=l.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(N.Tooltip.MOVE);this.pointsWithinLine=p;var g=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=this.services.cartesianScales.getRangeIdentifier(),m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[v];return null!=e})),y=g.map((function(t){return t.domainValue})),_=c.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Xr.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===o?u.attr("x1",d).attr("x2",f).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=sf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(N.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this;this.backdrop.on("mousemove mouseover",(function(){var e=Nh(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=sf.appendOrSelect(t,"svg.chart-grid-backdrop");var c=sf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e}(Wp),nv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(ev),rv=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 c=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(c).range()[0]}var l=Xr.flipSVGCoordinatesBasedOnOrientation({x0:a,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());sf.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",l.y0).attr("y2",l.y1).attr("x1",l.x0).attr("x2",l.x1)}},e}(Wp),iv=function(){function t(t,e){this.services={domUtils:sf,events:uf,transitions:_d},this.model=new Ol(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(N.Model.UPDATE,(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener(N.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(N.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 og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},n={id:"legend",components:[new Yp(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},r={id:"graph-frame",components:t,growth:{x:A.STRETCH,y:A.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=M.COLUMN;if(i){var a=Xr.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=M.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):"right"===a?(o=M.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):"bottom"===a&&(o=M.COLUMN_REVERSE)}var s={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},u={id:"full-frame",components:[new jg(this.model,this.services,y(i?[n]:[],i?[s]:[],[r]),{direction:o})],growth:{x:A.STRETCH,y:A.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}};c.push(l)}return c.push(u),[new ag(this.model,this.services),new jg(this.model,this.services,c,{direction:M.COLUMN})]},t}(),ov=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Gp,curves:zp}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},n={id:"legend",components:[new Yp(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},r={id:"graph-frame",components:t,growth:{x:A.STRETCH,y:A.FIXED}},i=Xr.getProperty(this.model.getOptions(),"data","loading"),o=!1!==this.model.getOptions().legend.enabled&&!i,a=M.COLUMN;if(o){var s=Xr.getProperty(this.model.getOptions(),"legend","position");s===T.LEFT?(a=M.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):s===T.RIGHT?(a=M.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):s===T.BOTTOM&&(a=M.COLUMN_REVERSE)}var u={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},c={id:"full-frame",components:[new jg(this.model,this.services,y(o?[n]:[],o?[u]:[],[r]),{direction:a})],growth:{x:A.STRETCH,y:A.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var h={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}};l.push(h)}return l.push(c),[new sg(this.model,this.services),new jg(this.model,this.services,l,{direction:M.COLUMN})]},e}(iv),av=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Xr.clone(Ai.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new vg(this.model,this.services),new ug(this.model,this.services),new pg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(ov),sv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new cg(this.model,this.services),new vg(this.model,this.services,{stacked:!0}),new mg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(ov),uv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new hg(this.model,this.services),new rv(this.model,this.services),new wg(this.model,this.services,{skeleton:P.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ov),cv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new fg(this.model,this.services),new rv(this.model,this.services),new wg(this.model,this.services,{skeleton:P.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ov),lv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new nv(this.model,this.services),new dg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ov),hv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new gg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.GRID})];return this.getAxisChartComponents(t)},e}(ov),fv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new vg(this.model,this.services),new pg(this.model,this.services,{handleThresholds:!0}),new wg(this.model,this.services,{skeleton:P.GRID})];return this.getAxisChartComponents(t)},e}(ov),dv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new pg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.GRID})];return this.getAxisChartComponents(t)},e}(ov),pv=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}(Ol),gv=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new pv(i.services),r?i:(i.model.setOptions(Xr.mergeDefaultChartOptions(Ai.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new _g(this.model,this.services),new wg(this.model,this.services,{skeleton:P.PIE})];return this.getChartComponents(t)},e}(iv),vv=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new xg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.DONUT})];return this.getChartComponents(t)},e}(gv);function mv(t){var e,n=(_v(t)%(e=360)+e)%e;return yv(n,[0,10])||yv(n,[350,0])?{textAnchor:k.START,dominantBaseline:D.MIDDLE}:yv(n,[10,80])?{textAnchor:k.START,dominantBaseline:D.HANGING}:yv(n,[80,100])?{textAnchor:k.MIDDLE,dominantBaseline:D.HANGING}:yv(n,[100,170])?{textAnchor:k.END,dominantBaseline:D.HANGING}:yv(n,[170,190])?{textAnchor:k.END,dominantBaseline:D.MIDDLE}:yv(n,[190,260])?{textAnchor:k.END,dominantBaseline:D.BASELINE}:yv(n,[260,280])?{textAnchor:k.MIDDLE,dominantBaseline:D.BASELINE}:{textAnchor:k.START,dominantBaseline:D.BASELINE}}function yv(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function _v(t){return t*(180/Math.PI)}function bv(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 xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=sf.appendOrSelect(e.svg,"g.tmp-tick"),r=sf.appendOrSelect(n,"text").text(t),i=sf.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=Xr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Xr.getProperty(n,"data","groupMapsTo"),s=Xr.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 Xr.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=Xr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Xr.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:Xr.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=Xr.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?Xr.getProperty(r,"unselected"):Xr.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=Xr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",Xr.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0),this.svg=this.getContainerSVG();var n=sf.getSVGElementSize(this.parent,{useAttrs:!0}),i=n.width,o=n.height,a=this.model.getData(),s=this.model.getDisplayData(),u=this.model.getGroupedData(),c=this.model.getOptions(),l=Xr.getProperty(c,"radar","axes"),h=l.angle,f=l.value,d=Xr.getProperty(c,"data","groupMapsTo"),p=Xr.getProperty(c,"radar"),g=p.xLabelPadding,v=p.yLabelPadding,m=p.yTicksNumber,y=p.minRange,_=p.xAxisRectHeight,b=p.opacity;this.uniqueKeys=Array.from(new Set(a.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(a.map((function(t){return t[d]})))),this.displayDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),w=(Math.min(i,o)-x)/2;if(!(w<=0)){var O=So().domain(this.displayDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=Ja().domain([0,go(this.displayDataNormalized.map((function(t){return t[f]})))]).range([y,w]).nice(m),T=E.ticks(m),S=function(t){return e.model.getFillColor(t)},M=Pc().angle((function(t){return O(t[h])+Math.PI/2})).radius((function(t){return E(t[f])})).curve(rl),A=Pc().angle(M.angle()).radius((function(t){return tv?tv(t[f]):y})).curve(M.curve()),C={x:go(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=O(t),w*Math.sin(n-Math.PI/2))})))+g,y:o/2},P=sf.appendOrSelect(this.svg,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(T,(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()}))})),sf.appendOrSelect(this.svg,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(ao(T)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return bv(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return bv(-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 bv(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return bv(-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()}))})),sf.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-"+Xr.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return bv(O(t),0,C).x})).attr("y1",(function(t){return bv(O(t),0,C).y})).attr("x2",(function(t){return bv(O(t),0,C).x})).attr("y2",(function(t){return bv(O(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 bv(O(t),E.range()[0],C).x})).attr("y1",(function(t){return bv(O(t),E.range()[0],C).y})).attr("x2",(function(t){return bv(O(t),E.range()[1],C).x})).attr("y2",(function(t){return bv(O(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 bv(O(t),E.range()[0],C).x})).attr("y1",(function(t){return bv(O(t),E.range()[0],C).y})).attr("x2",(function(t){return bv(O(t),E.range()[1],C).x})).attr("y2",(function(t){return bv(O(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()}))})),sf.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 bv(O(t),E.range()[1]+g,C).x})).attr("y",(function(t){return bv(O(t),E.range()[1]+g,C).y})).style("text-anchor",(function(t){return mv(O(t)).textAnchor})).style("dominant-baseline",(function(t){return mv(O(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 bv(O(t),E.range()[1]+g,C).x})).attr("y",(function(t){return bv(O(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()}))})),sf.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()}))})),sf.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 Xr.kebabCase(t[h])})).attr("cx",(function(t){return bv(O(t[h]),E(t[f]),C).x})).attr("cy",(function(t){return bv(O(t[h]),E(t[f]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return S(t[d])})),sf.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("+_v(O(t))+", "+C.x+", "+C.y+")"})),this.addEventListeners(),tv=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Xr.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){var i=Rh(this);t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEOVER,{element:i,datum:e});var o=t.parent.select(".x-axes .x-axis-"+Xr.kebabCase(e)),a=t.parent.selectAll(".dots circle."+Xr.kebabCase(e));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",r);var s=t.displayDataNormalized.filter((function(t){return t[n]===e})),u=t.model.getOptions(),c=u.data.groupMapsTo,l=Xr.getProperty(u,"radar","axes","value");t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:i,items:s.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[c],value:e[l],color:t.model.getStrokeColor(e[c])}}))})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Radar.X_AXIS_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this),r=t.parent.select(".x-axes .x-axis-"+Xr.kebabCase(e)),i=t.parent.selectAll(".dots circle."+Xr.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.HIDE)}))},e}(Wp),wv=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(Xr.mergeDefaultChartOptions(Ai.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new xv(this.model,this.services)];return this.getChartComponents(t)},e}(iv),Ov=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new bg(this.model,this.services)];return this.getChartComponents(t)},e}(iv),Ev=eo;t.AreaChart=av,t.BubbleChart=hv,t.DonutChart=vv,t.GaugeChart=Ov,t.GroupedBarChart=cv,t.LineChart=fv,t.PieChart=gv,t.RadarChart=wv,t.ScatterChart=dv,t.SimpleBarChart=uv,t.StackedAreaChart=sv,t.StackedBarChart=lv,t.colorPalettes=no,t.configurations=Ri,t.defaultColors=Ev,t.interfaces=U,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,c,l,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",t.DOCUMENT="document"}(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"}(c||(c={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(l||(l={})),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.MOVE="move-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,O,E,T,S,M,A,C,P,k,D,L,R,I,N=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 c},get Bar(){return l},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"}(O||(O={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(E||(E={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(S||(S={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(M||(M={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(A||(A={})),function(t){t.LEFT="left",t.RIGHT="right"}(C||(C={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(P||(P={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(k||(k={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(D||(D={})),function(t){t.SEMI="semi",t.FULL="full"}(L||(L={})),function(t){t.UP="up",t.DOWN="down"}(R||(R={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(I||(I={}));var U=Object.freeze({__proto__:null,get Roles(){return r},Events:N,get ChartTheme(){return _},get AxisPositions(){return b},get TruncationTypes(){return x},get CartesianOrientations(){return w},get ScaleTypes(){return O},get TooltipPosition(){return E},get LegendPositions(){return T},get LegendOrientations(){return S},get LayoutDirection(){return M},get LayoutGrowth(){return A},get CalloutDirections(){return C},get Skeletons(){return P},get TextAnchor(){return k},get DominantBaseline(){return D},get GaugeTypes(){return L},get ArrowDirections(){return R},get Statuses(){return I}}),j="object"==typeof global&&global&&global.Object===Object&&global,V="object"==typeof self&&self&&self.Object===Object&&self,H=j||V||Function("return this")(),G=H.Symbol,B=Object.prototype,F=B.hasOwnProperty,z=B.toString,W=G?G.toStringTag:void 0;var Y=Object.prototype.toString;var q=G?G.toStringTag:void 0;function X(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":q&&q in Object(t)?function(t){var e=F.call(t,W),n=t[W];try{t[W]=void 0;var r=!0}catch(t){}var i=z.call(t);return r&&(e?t[W]=n:delete t[W]),i}(t):function(t){return Y.call(t)}(t)}function K(t){return null!=t&&"object"==typeof t}function Z(t){return"symbol"==typeof t||K(t)&&"[object Symbol]"==X(t)}function $(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Q=Array.isArray,J=G?G.prototype:void 0,tt=J?J.toString:void 0;function et(t){if("string"==typeof t)return t;if(Q(t))return $(t,et)+"";if(Z(t))return tt?tt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function nt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var rt=/^\s+|\s+$/g,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^0o[0-7]+$/i,st=parseInt;function ut(t){if("number"==typeof t)return t;if(Z(t))return NaN;if(nt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=nt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(rt,"");var n=ot.test(t);return n||at.test(t)?st(t.slice(2),n?2:8):it.test(t)?NaN:+t}function ct(t){return t}function lt(t){if(!nt(t))return!1;var e=X(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ht,ft=H["__core-js_shared__"],dt=(ht=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||""))?"Symbol(src)_1."+ht:"";var pt=Function.prototype.toString;function gt(t){if(null!=t){try{return pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var vt=/^\[object .+?Constructor\]$/,mt=Function.prototype,yt=Object.prototype,_t=mt.toString,bt=yt.hasOwnProperty,xt=RegExp("^"+_t.call(bt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wt(t){return!(!nt(t)||(e=t,dt&&dt in e))&&(lt(t)?xt:vt).test(gt(t));var e}function Ot(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return wt(n)?n:void 0}var Et=Ot(H,"WeakMap"),Tt=Object.create,St=function(){function t(){}return function(e){if(!nt(e))return{};if(Tt)return Tt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Mt(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 At(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Ct=Date.now;var Pt=function(){try{var t=Ot(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),kt=function(t){var e=0,n=0;return function(){var r=Ct(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Pt?function(t,e){return Pt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ct);function Dt(t){return t!=t}function Lt(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 Rt=/^(?:0|[1-9]\d*)$/;function It(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Rt.test(t))&&t>-1&&t%1==0&&t<e}function Nt(t,e,n){"__proto__"==e&&Pt?Pt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ut(t,e){return t===e||t!=t&&e!=e}var jt=Object.prototype.hasOwnProperty;function Vt(t,e,n){var r=t[e];jt.call(t,e)&&Ut(r,n)&&(void 0!==n||e in t)||Nt(t,e,n)}function Ht(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?Nt(n,s,u):Vt(n,s,u)}return n}var Gt=Math.max;function Bt(t,e){return kt(function(t,e,n){return e=Gt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Gt(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),Mt(t,this,s)}}(t,e,ct),t+"")}function Ft(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function zt(t){return null!=t&&Ft(t.length)&&!lt(t)}function Wt(t,e,n){if(!nt(n))return!1;var r=typeof e;return!!("number"==r?zt(n)&&It(e,n.length):"string"==r&&e in n)&&Ut(n[e],t)}var Yt=Object.prototype;function qt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Yt)}function Xt(t){return K(t)&&"[object Arguments]"==X(t)}var Kt=Object.prototype,Zt=Kt.hasOwnProperty,$t=Kt.propertyIsEnumerable,Qt=Xt(function(){return arguments}())?Xt:function(t){return K(t)&&Zt.call(t,"callee")&&!$t.call(t,"callee")};var Jt="object"==typeof t&&t&&!t.nodeType&&t,te=Jt&&"object"==typeof module&&module&&!module.nodeType&&module,ee=te&&te.exports===Jt?H.Buffer:void 0,ne=(ee?ee.isBuffer:void 0)||function(){return!1},re={};function ie(t){return function(e){return t(e)}}re["[object Float32Array]"]=re["[object Float64Array]"]=re["[object Int8Array]"]=re["[object Int16Array]"]=re["[object Int32Array]"]=re["[object Uint8Array]"]=re["[object Uint8ClampedArray]"]=re["[object Uint16Array]"]=re["[object Uint32Array]"]=!0,re["[object Arguments]"]=re["[object Array]"]=re["[object ArrayBuffer]"]=re["[object Boolean]"]=re["[object DataView]"]=re["[object Date]"]=re["[object Error]"]=re["[object Function]"]=re["[object Map]"]=re["[object Number]"]=re["[object Object]"]=re["[object RegExp]"]=re["[object Set]"]=re["[object String]"]=re["[object WeakMap]"]=!1;var oe="object"==typeof t&&t&&!t.nodeType&&t,ae=oe&&"object"==typeof module&&module&&!module.nodeType&&module,se=ae&&ae.exports===oe&&j.process,ue=function(){try{var t=ae&&ae.require&&ae.require("util").types;return t||se&&se.binding&&se.binding("util")}catch(t){}}(),ce=ue&&ue.isTypedArray,le=ce?ie(ce):function(t){return K(t)&&Ft(t.length)&&!!re[X(t)]},he=Object.prototype.hasOwnProperty;function fe(t,e){var n=Q(t),r=!n&&Qt(t),i=!n&&!r&&ne(t),o=!n&&!r&&!i&&le(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var c in t)!e&&!he.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||It(c,u))||s.push(c);return s}function de(t,e){return function(n){return t(e(n))}}var pe=de(Object.keys,Object),ge=Object.prototype.hasOwnProperty;function ve(t){return zt(t)?fe(t):function(t){if(!qt(t))return pe(t);var e=[];for(var n in Object(t))ge.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var me=Object.prototype.hasOwnProperty;function ye(t){if(!nt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=qt(t),n=[];for(var r in t)("constructor"!=r||!e&&me.call(t,r))&&n.push(r);return n}function _e(t){return zt(t)?fe(t,!0):ye(t)}var be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xe=/^\w*$/;function we(t,e){if(Q(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Z(t))||(xe.test(t)||!be.test(t)||null!=e&&t in Object(e))}var Oe=Ot(Object,"create");var Ee=Object.prototype.hasOwnProperty;var Te=Object.prototype.hasOwnProperty;function Se(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 Me(t,e){for(var n=t.length;n--;)if(Ut(t[n][0],e))return n;return-1}Se.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},Se.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Se.prototype.get=function(t){var e=this.__data__;if(Oe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Ee.call(e,t)?e[t]:void 0},Se.prototype.has=function(t){var e=this.__data__;return Oe?void 0!==e[t]:Te.call(e,t)},Se.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Oe&&void 0===e?"__lodash_hash_undefined__":e,this};var Ae=Array.prototype.splice;function Ce(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])}}Ce.prototype.clear=function(){this.__data__=[],this.size=0},Ce.prototype.delete=function(t){var e=this.__data__,n=Me(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ae.call(e,n,1),--this.size,!0)},Ce.prototype.get=function(t){var e=this.__data__,n=Me(e,t);return n<0?void 0:e[n][1]},Ce.prototype.has=function(t){return Me(this.__data__,t)>-1},Ce.prototype.set=function(t,e){var n=this.__data__,r=Me(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Pe=Ot(H,"Map");function ke(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 Se,map:new(Pe||Ce),string:new Se}},De.prototype.delete=function(t){var e=ke(this,t).delete(t);return this.size-=e?1:0,e},De.prototype.get=function(t){return ke(this,t).get(t)},De.prototype.has=function(t){return ke(this,t).has(t)},De.prototype.set=function(t,e){var n=ke(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Le(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(Le.Cache||De),n}Le.Cache=De;var Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ie=/\\(\\)?/g,Ne=function(t){var e=Le(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(Re,(function(t,n,r,i){e.push(r?i.replace(Ie,"$1"):n||t)})),e}));function Ue(t){return null==t?"":et(t)}function je(t,e){return Q(t)?t:we(t,e)?[t]:Ne(Ue(t))}function Ve(t){if("string"==typeof t||Z(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function He(t,e){for(var n=0,r=(e=je(e,t)).length;null!=t&&n<r;)t=t[Ve(e[n++])];return n&&n==r?t:void 0}function Ge(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Be=G?G.isConcatSpreadable:void 0;function Fe(t){return Q(t)||Qt(t)||!!(Be&&t&&t[Be])}var ze=de(Object.getPrototypeOf,Object),We=Function.prototype,Ye=Object.prototype,qe=We.toString,Xe=Ye.hasOwnProperty,Ke=qe.call(Object);var Ze=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),$e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Je=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var tn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var en="\\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",nn="["+en+"]",rn="\\d+",on="[\\u2700-\\u27bf]",an="[a-z\\xdf-\\xf6\\xf8-\\xff]",sn="[^\\ud800-\\udfff"+en+rn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",un="(?:\\ud83c[\\udde6-\\uddff]){2}",cn="[\\ud800-\\udbff][\\udc00-\\udfff]",ln="[A-Z\\xc0-\\xd6\\xd8-\\xde]",hn="(?:"+an+"|"+sn+")",fn="(?:"+ln+"|"+sn+")",dn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",pn="[\\ufe0e\\ufe0f]?"+dn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",un,cn].join("|")+")[\\ufe0e\\ufe0f]?"+dn+")*"),gn="(?:"+[on,un,cn].join("|")+")"+pn,vn=RegExp([ln+"?"+an+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[nn,ln,"$"].join("|")+")",fn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[nn,ln+hn,"$"].join("|")+")",ln+"?"+hn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ln+"+(?:['’](?: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_])",rn,gn].join("|"),"g");function mn(t,e,n){return t=Ue(t),void 0===(e=n?void 0:e)?function(t){return tn.test(t)}(t)?function(t){return t.match(vn)||[]}(t):function(t){return t.match(Je)||[]}(t):t.match(e)||[]}var yn=RegExp("['’]","g");function _n(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ut(n))==n?n:0),void 0!==e&&(e=(e=ut(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}(ut(t),e,n)}function bn(t){var e=this.__data__=new Ce(t);this.size=e.size}bn.prototype.clear=function(){this.__data__=new Ce,this.size=0},bn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},bn.prototype.get=function(t){return this.__data__.get(t)},bn.prototype.has=function(t){return this.__data__.has(t)},bn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ce){var r=n.__data__;if(!Pe||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 xn="object"==typeof t&&t&&!t.nodeType&&t,wn=xn&&"object"==typeof module&&module&&!module.nodeType&&module,On=wn&&wn.exports===xn?H.Buffer:void 0,En=On?On.allocUnsafe:void 0;function Tn(t,e){if(e)return t.slice();var n=t.length,r=En?En(n):new t.constructor(n);return t.copy(r),r}function Sn(){return[]}var Mn=Object.prototype.propertyIsEnumerable,An=Object.getOwnPropertySymbols,Cn=An?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}(An(t),(function(e){return Mn.call(t,e)})))}:Sn;var Pn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ge(e,Cn(t)),t=ze(t);return e}:Sn;function kn(t,e,n){var r=e(t);return Q(t)?r:Ge(r,n(t))}function Dn(t){return kn(t,ve,Cn)}function Ln(t){return kn(t,_e,Pn)}var Rn=Ot(H,"DataView"),In=Ot(H,"Promise"),Nn=Ot(H,"Set"),Un=gt(Rn),jn=gt(Pe),Vn=gt(In),Hn=gt(Nn),Gn=gt(Et),Bn=X;(Rn&&"[object DataView]"!=Bn(new Rn(new ArrayBuffer(1)))||Pe&&"[object Map]"!=Bn(new Pe)||In&&"[object Promise]"!=Bn(In.resolve())||Nn&&"[object Set]"!=Bn(new Nn)||Et&&"[object WeakMap]"!=Bn(new Et))&&(Bn=function(t){var e=X(t),n="[object Object]"==e?t.constructor:void 0,r=n?gt(n):"";if(r)switch(r){case Un:return"[object DataView]";case jn:return"[object Map]";case Vn:return"[object Promise]";case Hn:return"[object Set]";case Gn:return"[object WeakMap]"}return e});var Fn=Bn,zn=Object.prototype.hasOwnProperty;var Wn=H.Uint8Array;function Yn(t){var e=new t.constructor(t.byteLength);return new Wn(e).set(new Wn(t)),e}var qn=/\w*$/;var Xn=G?G.prototype:void 0,Kn=Xn?Xn.valueOf:void 0;function Zn(t,e){var n=e?Yn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function $n(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Yn(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Yn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Zn(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,qn.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,Kn?Object(Kn.call(r)):{}}}function Qn(t){return"function"!=typeof t.constructor||qt(t)?{}:St(ze(t))}var Jn=ue&&ue.isMap,tr=Jn?ie(Jn):function(t){return K(t)&&"[object Map]"==Fn(t)};var er=ue&&ue.isSet,nr=er?ie(er):function(t){return K(t)&&"[object Set]"==Fn(t)},rr={};function ir(t,e,n,r,i,o){var a,s=1&e,u=2&e,c=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!nt(t))return t;var l=Q(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&zn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return At(t,a)}else{var h=Fn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(ne(t))return Tn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Qn(t),!s)return u?function(t,e){return Ht(t,Pn(t),e)}(t,function(t,e){return t&&Ht(e,_e(e),t)}(a,t)):function(t,e){return Ht(t,Cn(t),e)}(t,function(t,e){return t&&Ht(e,ve(e),t)}(a,t))}else{if(!rr[h])return i?t:{};a=$n(t,h,s)}}o||(o=new bn);var d=o.get(t);if(d)return d;o.set(t,a),nr(t)?t.forEach((function(r){a.add(ir(r,e,n,r,t,o))})):tr(t)&&t.forEach((function(r,i){a.set(i,ir(r,e,n,i,t,o))}));var p=c?u?Ln:Dn:u?keysIn:ve,g=l?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Vt(a,i,ir(r,e,n,i,t,o))})),a}rr["[object Arguments]"]=rr["[object Array]"]=rr["[object ArrayBuffer]"]=rr["[object DataView]"]=rr["[object Boolean]"]=rr["[object Date]"]=rr["[object Float32Array]"]=rr["[object Float64Array]"]=rr["[object Int8Array]"]=rr["[object Int16Array]"]=rr["[object Int32Array]"]=rr["[object Map]"]=rr["[object Number]"]=rr["[object Object]"]=rr["[object RegExp]"]=rr["[object Set]"]=rr["[object String]"]=rr["[object Symbol]"]=rr["[object Uint8Array]"]=rr["[object Uint8ClampedArray]"]=rr["[object Uint16Array]"]=rr["[object Uint32Array]"]=!0,rr["[object Error]"]=rr["[object Function]"]=rr["[object WeakMap]"]=!1;function or(t){return ir(t,5)}function ar(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new De;++e<n;)this.add(t[e])}function sr(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 ur(t,e){return t.has(e)}ar.prototype.add=ar.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ar.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 c=o.get(t);if(c&&o.get(e))return c==e;var l=-1,h=!0,f=2&n?new ar:void 0;for(o.set(t,e),o.set(e,t);++l<s;){var d=t[l],p=e[l];if(r)var g=a?r(p,d,l,e,t,o):r(d,p,l,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!sr(e,(function(t,e){if(!ur(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 lr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var fr=G?G.prototype:void 0,dr=fr?fr.valueOf:void 0;var pr=Object.prototype.hasOwnProperty;var gr=Object.prototype.hasOwnProperty;function vr(t,e,n,r,i,o){var a=Q(t),s=Q(e),u=a?"[object Array]":Fn(t),c=s?"[object Array]":Fn(e),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&ne(t)){if(!ne(e))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new bn),a||le(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 Wn(t),new Wn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ut(+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=lr;case"[object Set]":var u=1&r;if(s||(s=hr),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=cr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(dr)return dr.call(t)==dr.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=l&&gr.call(t,"__wrapped__"),p=h&&gr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new bn),i(g,v,n,r,o)}}return!!f&&(o||(o=new bn),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 c=u;c--;){var l=s[c];if(!(a?l in e:pr.call(e,l)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++c<u;){var p=t[l=s[c]],g=e[l];if(r)var v=a?r(g,p,l,e,t,o):r(p,g,l,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==l)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function mr(t,e,n,r,i){return t===e||(null==t||null==e||!K(t)&&!K(e)?t!=t&&e!=e:vr(t,e,n,r,mr,i))}function yr(t){return t==t&&!nt(t)}function _r(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function br(t){var e=function(t){for(var e=ve(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,yr(i)]}return e}(t);return 1==e.length&&e[0][2]?_r(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],c=t[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in t))return!1}else{var h=new bn;if(r)var f=r(c,l,u,t,e,h);if(!(void 0===f?mr(l,c,3,r,h):f))return!1}}return!0}(n,t,e)}}function xr(t,e){return null!=t&&e in Object(t)}function wr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=je(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)&&Ft(i)&&It(a,i)&&(Q(t)||Qt(t))}(t,e,xr)}function Or(t,e){return we(t)&&yr(e)?_r(Ve(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:He(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?wr(n,t):mr(e,r,3)}}function Er(t){return we(t)?(e=Ve(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return He(e,t)}}(t);var e}function Tr(t){return"function"==typeof t?t:null==t?ct:"object"==typeof t?Q(t)?Or(t[0],t[1]):br(t):Er(t)}var Sr,Mr=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Sr?a:++r];if(!1===e(i[s],s,i))break}return t};var Ar=function(t,e){return function(n,r){if(null==n)return n;if(!zt(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&Mr(t,e,ve)})),Cr=function(){return H.Date.now()},Pr=Math.max,kr=Math.min;function Dr(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function v(){var t=Cr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?kr(n,o-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=Cr(),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=ut(e)||0,nt(n)&&(l=!!n.leading,o=(h="maxWait"in n)?Pr(ut(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(Cr())},y}function Lr(t,e,n){(void 0===n||Ut(t[e],n))&&(void 0!==n||e in t)||Nt(t,e,n)}function Rr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Ir(t,e,n,r,i,o,a){var s=Rr(t,n),u=Rr(e,n),c=a.get(u);if(c)Lr(t,n,c);else{var l,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=Q(u),p=!d&&ne(u),g=!d&&!p&&le(u);h=u,d||p||g?Q(s)?h=s:K(l=s)&&zt(l)?h=At(s):p?(f=!1,h=Tn(u,!0)):g?(f=!1,h=Zn(u,!0)):h=[]:function(t){if(!K(t)||"[object Object]"!=X(t))return!1;var e=ze(t);if(null===e)return!0;var n=Xe.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&qe.call(n)==Ke}(u)||Qt(u)?(h=s,Qt(s)?h=function(t){return Ht(t,_e(t))}(s):nt(s)&&!lt(s)||(h=Qn(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Lr(t,n,h)}}function Nr(t,e,n,r,i){t!==e&&Mr(e,(function(o,a){if(i||(i=new bn),nt(o))Ir(t,e,a,n,Nr,r,i);else{var s=r?r(Rr(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Lr(t,a,s)}}),_e)}function Ur(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 jr(t,e){var n=-1,r=zt(t)?Array(t.length):[];return Ar(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=Fe),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):Ge(o,u):i||(o[o.length]=u)}return o}(function(t,e){return(Q(t)?$:jr)(t,Tr(e))}(t,e),1/0)}function Hr(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 Gr(t,e){return mr(t,e)}var Br,Fr,zr=(Br=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}(mn(function(t){return(t=Ue(t))&&t.replace($e,Ze).replace(Qe,"")}(t).replace(yn,"")),Br,"")}),Wr=(Fr=function(t,e,n){Nr(t,e,n)},Bt((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=Fr.length>3&&"function"==typeof i?(r--,i):void 0,o&&Wt(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&Fr(t,a,n,i)}return t})));function Yr(t,e){var n;return Ar(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function qr(t,e,n){var r=Q(t)?sr:Yr;return n&&Wt(t,e,n)&&(e=void 0),r(t,Tr(e))}var Xr,Kr=Nn&&1/hr(new Nn([,-0]))[1]==1/0?function(t){return new Nn(t)}:function(){};function Zr(t){return t&&t.length?function(t,e,n){var r=-1,i=Lt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ur;else if(o>=200){var c=e?null:Kr(t);if(c)return hr(c);a=!1,i=ur,u=new ar}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}function $r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Qr(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=Dr,t.clone=or,t.merge=Wr,t.removeArrayDuplicates=Zr,t.clamp=_n,t.isEqual=Gr,t.flatMapDeep=Vr,t.kebabCase=zr,t.fromPairs=Hr,t.some=qr,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===O.TIME?o.mapsTo="date":s===O.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)}}(Xr||(Xr={}));var Jr=Qr((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}));$r(Jr);var ti=Qr((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}));$r(ti);var ei=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ti)&&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}));$r(ei);var ni=Qr((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}));$r(ni);var ri=Qr((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}));$r(ri);var ii=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ri)&&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}));$r(ii);var oi=Qr((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}));$r(oi);var ai=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));$r(ai);var si=Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(oi),r=i(ai);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}));$r(si);var ui=$r(Qr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Jr),r=s(ei),i=s(ni),o=s(ii),a=s(si);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},li={position:T.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4},truncation:ci},hi={x:{numberOfTicks:5},y:{numberOfTicks:5}},fi={horizontalOffset:10,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:ci},di={top:{includeZero:!0,truncation:ci},bottom:{includeZero:!0,truncation:ci},left:{includeZero:!0,truncation:ci},right:{includeZero:!0,truncation:ci}},pi={addSpaceOnEdges:1,showDayName:!1,localeObject:ui,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"}}},gi={width:null,height:null,resizable:!0,tooltip:fi,legend:li,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null}},vi=Xr.merge({},gi,{axes:di,timeScale:pi,grid:hi}),mi=Xr.merge({},vi,{bars:{maxWidth:16},timeScale:Xr.merge(pi,{addSpaceOnEdges:1})}),yi=Xr.merge({},mi,{}),_i=Xr.merge({},mi,{}),bi=Xr.merge({},mi,{bars:Xr.merge({},mi.bars,{dividerSize:1.5})}),xi=Xr.merge({},vi,{points:{radius:3,filled:!1}}),wi=Xr.merge({},xi,{timeScale:Xr.merge(pi,{addSpaceOnEdges:0})}),Oi=wi,Ei=Xr.merge({},vi,{points:{radius:4,fillOpacity:.3,filled:!0}}),Ti=Xr.merge({},vi,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Si=Xr.merge({},gi,{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}}}),Mi=Xr.merge({},gi,{legend:{enabled:!1},gauge:{type:L.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()}}}),Ai={chart:gi,axisChart:vi,simpleBarChart:yi,groupedBarChart:_i,stackedBarChart:bi,bubbleChart:Ti,lineChart:xi,areaChart:wi,stackedAreaChart:Oi,scatterChart:Ei,pieChart:Si,donutChart:Xr.merge({},Si,{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:Xr.merge({},gi,{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:Mi},Ci={opacity:{unselected:.3,selected:1}},Pi={opacity:{unselected:0,selected:.4}},ki={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}},Di={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},Li={default:{size:24}},Ri=Object.freeze({__proto__:null,legend:li,grid:hi,baseTooltip:fi,timeScale:pi,options:Ai,lines:Ci,area:Pi,areas:{opacity:{unselected:.3,selected:1}},transitions:ki,axis:Di,spacers:Li,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),Ii={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Ni={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Ui={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},ji={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Vi={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Hi={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},Gi={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Bi=function(t,e){return t[e]},Fi=function(t){return Bi(ji,t)},zi=function(t){return Bi(Vi,t)},Wi=function(t){return Bi(Gi,t)},Yi=function(t){return Bi(Ni,t)},qi=function(t){return Bi(Ui,t)},Xi=function(t){return Bi(Ii,t)},Ki=function(t){return Bi(Hi,t)},Zi=[qi(70),zi(50),Ki(70),Yi(70),Xi(50),Xi(90),Wi(60),Fi(80),Yi(50),"#b28600",Ki(50),zi(90),"#8a3800",qi(50)],$i=[qi(60),zi(40),Ki(60),Yi(40),Xi(50),Xi(10),Wi(30),Fi(50),Yi(60),"#d2a106",Ki(40),zi(20),"#ba4e00",qi(30)],Qi=Zi,Ji=$i,to=$i,eo=Zi,no=Object.freeze({__proto__:null,WHITE:Zi,DARK:$i,G10:Qi,G90:Ji,G100:to,DEFAULT:eo});function ro(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function io(t){var e;return 1===t.length&&(e=t,t=function(t,n){return ro(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 oo=io(ro).right;function ao(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 so(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 uo=Math.sqrt(50),co=Math.sqrt(10),lo=Math.sqrt(2);function ho(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=fo(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 fo(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>=uo?10:o>=co?5:o>=lo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=uo?10:o>=co?5:o>=lo?2:1)}function po(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>=uo?i*=10:o>=co?i*=5:o>=lo&&(i*=2),e<t?-i:i}function go(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 vo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function mo(){}function yo(t,e){var n=new mo;if(t instanceof mo)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 _o(){}mo.prototype=yo.prototype={constructor:mo,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var bo=yo.prototype;_o.prototype=function(t,e){var n=new _o;if(t instanceof _o)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:_o,has:bo.has,add:function(t){return this["$"+(t+="")]=t,this},remove:bo.remove,clear:bo.clear,values:bo.keys,size:bo.size,empty:bo.empty,each:bo.each};var xo=Array.prototype,wo=xo.map,Oo=xo.slice,Eo={name:"implicit"};function To(){var t=yo(),e=[],n=[],r=Eo;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Eo)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=yo();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=Oo.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return To(e,n).unknown(r)},vo.apply(i,arguments),i}function So(){var t,e,n=To().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=o[1]<o[0],h=o[l-0],f=o[1-l];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=so(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],l()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,l()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return So(r(),o).round(a).paddingInner(s).paddingOuter(u).align(c)},vo.apply(l(),arguments)}function Mo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ao(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Co(){}var Po="\\s*([+-]?\\d+)\\s*",ko="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Do="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lo=/^#([0-9a-f]{3,8})$/,Ro=new RegExp("^rgb\\("+[Po,Po,Po]+"\\)$"),Io=new RegExp("^rgb\\("+[Do,Do,Do]+"\\)$"),No=new RegExp("^rgba\\("+[Po,Po,Po,ko]+"\\)$"),Uo=new RegExp("^rgba\\("+[Do,Do,Do,ko]+"\\)$"),jo=new RegExp("^hsl\\("+[ko,Do,Do]+"\\)$"),Vo=new RegExp("^hsla\\("+[ko,Do,Do,ko]+"\\)$"),Ho={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 Go(){return this.rgb().formatHex()}function Bo(){return this.rgb().formatRgb()}function Fo(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Lo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?zo(e):3===n?new Xo(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Xo(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Xo(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=Ro.exec(t))?new Xo(e[1],e[2],e[3],1):(e=Io.exec(t))?new Xo(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=No.exec(t))?Wo(e[1],e[2],e[3],e[4]):(e=Uo.exec(t))?Wo(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=jo.exec(t))?Qo(e[1],e[2]/100,e[3]/100,1):(e=Vo.exec(t))?Qo(e[1],e[2]/100,e[3]/100,e[4]):Ho.hasOwnProperty(t)?zo(Ho[t]):"transparent"===t?new Xo(NaN,NaN,NaN,0):null}function zo(t){return new Xo(t>>16&255,t>>8&255,255&t,1)}function Wo(t,e,n,r){return r<=0&&(t=e=n=NaN),new Xo(t,e,n,r)}function Yo(t){return t instanceof Co||(t=Fo(t)),t?new Xo((t=t.rgb()).r,t.g,t.b,t.opacity):new Xo}function qo(t,e,n,r){return 1===arguments.length?Yo(t):new Xo(t,e,n,null==r?1:r)}function Xo(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ko(){return"#"+$o(this.r)+$o(this.g)+$o(this.b)}function Zo(){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 $o(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qo(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ta(t,e,n,r)}function Jo(t){if(t instanceof ta)return new ta(t.h,t.s,t.l,t.opacity);if(t instanceof Co||(t=Fo(t)),!t)return new ta;if(t instanceof ta)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 ta(a,s,u,t.opacity)}function ta(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ea(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 na(t){return function(){return t}}function ra(t){return 1==(t=+t)?ia: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):na(isNaN(e)?n:e)}}function ia(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):na(isNaN(t)?e:t)}Mo(Co,Fo,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Go,formatHex:Go,formatHsl:function(){return Jo(this).formatHsl()},formatRgb:Bo,toString:Bo}),Mo(Xo,qo,Ao(Co,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xo(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xo(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:Ko,formatHex:Ko,formatRgb:Zo,toString:Zo})),Mo(ta,(function(t,e,n,r){return 1===arguments.length?Jo(t):new ta(t,e,n,null==r?1:r)}),Ao(Co,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ta(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ta(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 Xo(ea(t>=240?t-240:t+120,i,r),ea(t,i,r),ea(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 oa=function t(e){var n=ra(e);function r(t,e){var r=n((t=qo(t)).r,(e=qo(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ia(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 aa(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 sa(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]=pa(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 ua(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ca(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function la(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]=pa(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var ha=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fa=new RegExp(ha.source,"g");function da(t,e){var n,r,i,o=ha.lastIndex=fa.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=ha.exec(t))&&(r=fa.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:ca(n,r)})),o=fa.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 pa(t,e){var n,r=typeof e;return null==e||"boolean"===r?na(e):("number"===r?ca:"string"===r?(n=Fo(e))?(e=n,oa):da:e instanceof Fo?oa:e instanceof Date?ua:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?aa:Array.isArray(e)?sa:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?la:ca)(t,e)}function ga(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var va,ma,ya,_a,ba=180/Math.PI,xa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wa(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)*ba,skewX:Math.atan(u)*ba,scaleX:a,scaleY:s}}function Oa(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:ca(t,i)},{i:u-2,x:ca(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:ca(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:ca(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:ca(t,n)},{i:s-2,x:ca(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 Ea=Oa((function(t){return"none"===t?xa:(va||(va=document.createElement("DIV"),ma=document.documentElement,ya=document.defaultView),va.style.transform=t,t=ya.getComputedStyle(ma.appendChild(va),null).getPropertyValue("transform"),ma.removeChild(va),wa(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ta=Oa((function(t){return null==t?xa:(_a||(_a=document.createElementNS("http://www.w3.org/2000/svg","g")),_a.setAttribute("transform",t),(t=_a.transform.baseVal.consolidate())?wa((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):xa)}),", ",")",")");function Sa(t){return+t}var Ma=[0,1];function Aa(t){return t}function Ca(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Pa(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function ka(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ca(i,r),o=n(a,o)):(r=Ca(r,i),o=n(o,a)),function(t){return o(r(t))}}function Da(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]=Ca(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=oo(t,e,1,r)-1;return o[n](i[n](e))}}function La(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ra(){var t,e,n,r,i,o,a=Ma,s=Ma,u=pa,c=Aa;function l(){return r=Math.min(a.length,s.length)>2?Da:ka,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=r(s,a.map(t),ca)))(n)))},h.domain=function(t){return arguments.length?(a=wo.call(t,Sa),c===Aa||(c=Pa(a)),l()):a.slice()},h.range=function(t){return arguments.length?(s=Oo.call(t),l()):s.slice()},h.rangeRound=function(t){return s=Oo.call(t),u=ga,l()},h.clamp=function(t){return arguments.length?(c=t?Pa(a):Aa,h):c!==Aa},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Ia(t,e){return Ra()(t,e)}function Na(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 Ua(t){return(t=Na(Math.abs(t)))?t[1]:NaN}var ja,Va=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ha(t){if(!(e=Va.exec(t)))throw new Error("invalid format: "+t);var e;return new Ga({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 Ga(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 Ba(t,e){var n=Na(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")}Ha.prototype=Ga.prototype,Ga.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 Fa={"%":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 Ba(100*t,e)},r:Ba,s:function(t,e){var n=Na(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ja=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")+Na(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 za(t){return t}var Wa,Ya,qa,Xa=Array.prototype.map,Ka=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Za(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?za:(e=Xa.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?za:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Xa.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ha(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"):Fa[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=Fa[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,f=_,O=b;if("c"===y)O=x(t)+O,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:x(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:c:"-"===h||"("===h?"":h)+f,O=("s"===y?Ka[8+ja/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var T=f.length+t.length+O.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&d&&(t=r(S+t,S.length?p-O.length:1/0),S=""),n){case"<":t=f+t+O+S;break;case"=":t=f+S+t+O;break;case"^":t=S.slice(0,T=S.length>>1)+f+t+O+S.slice(T);break;default:t=S+f+t+O}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ha(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ua(e)/3))),i=Math.pow(10,-r),o=Ka[8+r/3];return function(t){return n(i*t)+o}}}}function $a(t,e,n,r){var i,o=po(t,e,n);switch((r=Ha(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(Ua(e)/3)))-Ua(Math.abs(t)))}(o,a))||(r.precision=i),qa(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,Ua(e)-Ua(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,-Ua(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Ya(r)}function Qa(t){var e=t.domain;return t.ticks=function(t){var n=e();return ho(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return $a(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=fo(s,u,n))>0?r=fo(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=fo(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 Ja(){var t=Ia(Aa,Aa);return t.copy=function(){return La(t,Ja())},vo.apply(t,arguments),Qa(t)}function ts(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 es(t){return Math.log(t)}function ns(t){return Math.exp(t)}function rs(t){return-Math.log(-t)}function is(t){return-Math.exp(-t)}function os(t){return isFinite(t)?+("1e"+t):t<0?0:t}function as(t){return function(e){return-t(-e)}}function ss(t){var e,n,r=t(es,ns),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?os:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=as(e),n=as(n),t(rs,is)):t(es,ns),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<o;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=o-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=ho(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=Ya(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(ts(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Wa=Za({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ya=Wa.format,qa=Wa.formatPrefix;var us=new Date,cs=new Date;function ls(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 ls((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 us.setTime(+e),cs.setTime(+r),t(us),t(cs),Math.floor(n(us,cs))},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 hs=ls((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));hs.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ls((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):hs:null};var fs=ls((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()})),ds=ls((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()})),ps=ls((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()})),gs=ls((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 vs(t){return ls((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 ms=vs(0),ys=vs(1),_s=(vs(2),vs(3),vs(4)),bs=(vs(5),vs(6),ls((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()}))),xs=ls((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()}));xs.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ls((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 ws=ls((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 Os(t){return ls((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 Es=Os(0),Ts=Os(1),Ss=(Os(2),Os(3),Os(4)),Ms=(Os(5),Os(6),ls((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 As(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 Cs(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ps(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ms.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ls((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 ks,Ds,Ls={"-":"",_:" ",0:"0"},Rs=/^\s*\d+/,Is=/^%/,Ns=/[\\^$*+?|[\]().{}]/g;function Us(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 js(t){return t.replace(Ns,"\\$&")}function Vs(t){return new RegExp("^(?:"+t.map(js).join("|")+")","i")}function Hs(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Gs(t,e,n){var r=Rs.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Bs(t,e,n){var r=Rs.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Fs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function zs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ws(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ys(t,e,n){var r=Rs.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xs(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 Ks(t,e,n){var r=Rs.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Zs(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function $s(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Qs(t,e,n){var r=Rs.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Js(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function tu(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function eu(t,e,n){var r=Rs.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function nu(t,e,n){var r=Rs.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ru(t,e,n){var r=Rs.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iu(t,e,n){var r=Is.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ou(t,e,n){var r=Rs.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function au(t,e,n){var r=Rs.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function su(t,e){return Us(t.getDate(),e,2)}function uu(t,e){return Us(t.getHours(),e,2)}function cu(t,e){return Us(t.getHours()%12||12,e,2)}function lu(t,e){return Us(1+gs.count(xs(t),t),e,3)}function hu(t,e){return Us(t.getMilliseconds(),e,3)}function fu(t,e){return hu(t,e)+"000"}function du(t,e){return Us(t.getMonth()+1,e,2)}function pu(t,e){return Us(t.getMinutes(),e,2)}function gu(t,e){return Us(t.getSeconds(),e,2)}function vu(t){var e=t.getDay();return 0===e?7:e}function mu(t,e){return Us(ms.count(xs(t)-1,t),e,2)}function yu(t,e){var n=t.getDay();return t=n>=4||0===n?_s(t):_s.ceil(t),Us(_s.count(xs(t),t)+(4===xs(t).getDay()),e,2)}function _u(t){return t.getDay()}function bu(t,e){return Us(ys.count(xs(t)-1,t),e,2)}function xu(t,e){return Us(t.getFullYear()%100,e,2)}function wu(t,e){return Us(t.getFullYear()%1e4,e,4)}function Ou(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Us(e/60|0,"0",2)+Us(e%60,"0",2)}function Eu(t,e){return Us(t.getUTCDate(),e,2)}function Tu(t,e){return Us(t.getUTCHours(),e,2)}function Su(t,e){return Us(t.getUTCHours()%12||12,e,2)}function Mu(t,e){return Us(1+ws.count(Ms(t),t),e,3)}function Au(t,e){return Us(t.getUTCMilliseconds(),e,3)}function Cu(t,e){return Au(t,e)+"000"}function Pu(t,e){return Us(t.getUTCMonth()+1,e,2)}function ku(t,e){return Us(t.getUTCMinutes(),e,2)}function Du(t,e){return Us(t.getUTCSeconds(),e,2)}function Lu(t){var e=t.getUTCDay();return 0===e?7:e}function Ru(t,e){return Us(Es.count(Ms(t)-1,t),e,2)}function Iu(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Ss(t):Ss.ceil(t),Us(Ss.count(Ms(t),t)+(4===Ms(t).getUTCDay()),e,2)}function Nu(t){return t.getUTCDay()}function Uu(t,e){return Us(Ts.count(Ms(t)-1,t),e,2)}function ju(t,e){return Us(t.getUTCFullYear()%100,e,2)}function Vu(t,e){return Us(t.getUTCFullYear()%1e4,e,4)}function Hu(){return"+0000"}function Gu(){return"%"}function Bu(t){return+t}function Fu(t){return Math.floor(+t/1e3)}!function(t){ks=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Vs(i),l=Hs(i),h=Vs(o),f=Hs(o),d=Vs(a),p=Hs(a),g=Vs(s),v=Hs(s),m=Vs(u),y=Hs(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:su,e:su,f:fu,H:uu,I:cu,j:lu,L:hu,m:du,M:pu,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Bu,s:Fu,S:gu,u:vu,U:mu,V:yu,w:_u,W:bu,x:null,X:null,y:xu,Y:wu,Z:Ou,"%":Gu},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:Eu,e:Eu,f:Cu,H:Tu,I:Su,j:Mu,L:Au,m:Pu,M:ku,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Bu,s:Fu,S:Du,u:Lu,U:Ru,V:Iu,w:Nu,W:Uu,x:null,X:null,y:ju,Y:Vu,Z:Hu,"%":Gu},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:$s,e:$s,f:ru,H:Js,I:Js,j:Qs,L:nu,m:Zs,M:tu,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Ks,Q:ou,s:au,S:eu,u:Bs,U:Fs,V:zs,w:Gs,W:Ws,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:qs,Y:Ys,Z:Xs,"%":iu};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Ls[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 O(t,e){return function(n){var r,i,o=Ps(1900,void 0,1);if(E(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Cs(Ps(o.y,0,1))).getUTCDay(),r=i>4||0===i?Ts.ceil(r):Ts(r),r=ws.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=As(Ps(o.y,0,1))).getDay(),r=i>4||0===i?ys.ceil(r):ys(r),r=gs.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?Cs(Ps(o.y,0,1)).getUTCDay():As(Ps(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Cs(o)):As(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 Ls?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=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),Ds=ks.format,ks.parse,ks.utcFormat,ks.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 zu(t){return new Date(t)}function Wu(t){return t instanceof Date?+t:+new Date(+t)}function Yu(t,e,n,r,i,o,a,s,u){var c=Ia(Aa,Aa),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=io((function(t){return t[2]})).right(b,o);a===b.length?(i=po(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(po(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(wo.call(t,Wu)):h().map(zu)},c.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(t,e){return null==e?x:u(e)},c.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(ts(n,t)):c},c.copy=function(){return La(c,Yu(t,e,n,r,i,o,a,s,u))},c}var qu=Math.PI,Xu=2*qu,Ku=Xu-1e-6;function Zu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function $u(){return new Zu}function Qu(t){return function(){return t}}Zu.prototype=$u.prototype={constructor:Zu,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,c=o-t,l=a-e,h=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((qu-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%Xu+Xu),h>Ku?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=qu)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ju=Math.abs,tc=Math.atan2,ec=Math.cos,nc=Math.max,rc=Math.min,ic=Math.sin,oc=Math.sqrt,ac=Math.PI,sc=ac/2,uc=2*ac;function cc(t){return t>1?0:t<-1?ac:Math.acos(t)}function lc(t){return t>=1?sc:t<=-1?-sc:Math.asin(t)}function hc(t){return t.innerRadius}function fc(t){return t.outerRadius}function dc(t){return t.startAngle}function pc(t){return t.endAngle}function gc(t){return t&&t.padAngle}function vc(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-o)-h*(t-i))/f)*u,e+f*c]}function mc(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/oc(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,O=(_<0?-1:1)*oc(nc(0,x*x*b-w*w)),E=(w*_-y*O)/b,T=(-w*y-_*O)/b,S=(w*_+y*O)/b,M=(-w*y+_*O)/b,A=E-v,C=T-m,P=S-v,k=M-m;return A*A+C*C>P*P+k*k&&(E=S,T=M),{cx:E,cy:T,x01:-l,y01:-h,x11:E*(i/x-1),y11:T*(i/x-1)}}function yc(){var t=hc,e=fc,n=Qu(0),r=null,i=dc,o=pc,a=gc,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-sc,d=o.apply(this,arguments)-sc,p=Ju(d-f),g=d>f;if(s||(s=u=$u()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>uc-1e-12)s.moveTo(h*ec(f),h*ic(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*ec(d),l*ic(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,O=p,E=a.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):oc(l*l+h*h)),S=rc(Ju(h-l)/2,+n.apply(this,arguments)),M=S,A=S;if(T>1e-12){var C=lc(T/l*ic(E)),P=lc(T/h*ic(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(O-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(O=0,y=_=(f+d)/2)}var k=h*ec(y),D=h*ic(y),L=l*ec(x),R=l*ic(x);if(S>1e-12){var I,N=h*ec(_),U=h*ic(_),j=l*ec(b),V=l*ic(b);if(p<ac&&(I=vc(k,D,j,V,N,U,L,R))){var H=k-I[0],G=D-I[1],B=N-I[0],F=U-I[1],z=1/ic(cc((H*B+G*F)/(oc(H*H+G*G)*oc(B*B+F*F)))/2),W=oc(I[0]*I[0]+I[1]*I[1]);M=rc(S,(l-W)/(z-1)),A=rc(S,(h-W)/(z+1))}}O>1e-12?A>1e-12?(v=mc(j,V,k,D,h,A,g),m=mc(N,U,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<S?s.arc(v.cx,v.cy,A,tc(v.y01,v.x01),tc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,tc(v.y01,v.x01),tc(v.y11,v.x11),!g),s.arc(0,0,h,tc(v.cy+v.y11,v.cx+v.x11),tc(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,tc(m.y11,m.x11),tc(m.y01,m.x01),!g))):(s.moveTo(k,D),s.arc(0,0,h,y,_,!g)):s.moveTo(k,D),l>1e-12&&w>1e-12?M>1e-12?(v=mc(L,R,N,U,l,-M,g),m=mc(k,D,j,V,l,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,tc(v.y01,v.x01),tc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,tc(v.y01,v.x01),tc(v.y11,v.x11),!g),s.arc(0,0,l,tc(v.cy+v.y11,v.cx+v.x11),tc(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,tc(m.y11,m.x11),tc(m.y01,m.x01),!g))):s.arc(0,0,l,x,b,g):s.lineTo(L,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ac/2;return[ec(r)*n,ic(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Qu(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Qu(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qu(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qu(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Qu(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Qu(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function _c(t){this._context=t}function bc(t){return new _c(t)}function xc(t){return t[0]}function wc(t){return t[1]}function Oc(){var t=xc,e=wc,n=Qu(!0),r=null,i=bc,o=null;function a(a){var s,u,c,l=a.length,h=!1;for(null==r&&(o=i(c=$u())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Qu(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Qu(!!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 Ec(){var t=xc,e=null,n=Qu(0),r=wc,i=Qu(!0),o=null,a=bc,s=null;function u(u){var c,l,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(d=$u())),c=0;c<=p;++c){if(!(c<p&&i(f=u[c],c,u))===g)if(g=!g)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=l;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[c]=+t(f,c,u),m[c]=+n(f,c,u),s.point(e?+e(f,c,u):v[c],r?+r(f,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return Oc().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Qu(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Qu(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Qu(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:Qu(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qu(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Qu(!!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 Tc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Sc(t){return t}_c.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 Mc=Cc(bc);function Ac(t){this._curve=t}function Cc(t){function e(e){return new Ac(t(e))}return e._curve=t,e}function Pc(){return t=Oc().curve(Mc),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(Cc(t)):e()._curve},t;var t,e}Ac.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 kc=Array.prototype.slice;function Dc(){}function Lc(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 Rc(t){this._context=t}function Ic(t){return new Rc(t)}function Nc(t){this._context=t}function Uc(t){return new Nc(t)}function jc(t){this._context=t}function Vc(t){return new jc(t)}function Hc(t,e){this._basis=new Rc(t),this._beta=e}Rc.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:Lc(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:Lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Nc.prototype={areaStart:Dc,areaEnd:Dc,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:Lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},jc.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:Lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Hc.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 Gc=function t(e){function n(t){return 1===e?new Rc(t):new Hc(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Bc(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 Fc(t,e){this._context=t,this._k=(1-e)/6}Fc.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:Bc(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:Bc(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 zc=function t(e){function n(t){return new Fc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Wc(t,e){this._context=t,this._k=(1-e)/6}Wc.prototype={areaStart:Dc,areaEnd:Dc,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:Bc(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 Yc=function t(e){function n(t){return new Wc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function qc(t,e){this._context=t,this._k=(1-e)/6}qc.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:Bc(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 Xc=function t(e){function n(t){return new qc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Kc(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Zc(t,e){this._context=t,this._alpha=e}Zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Kc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var $c=function t(e){function n(t){return e?new Zc(t,e):new Fc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Qc(t,e){this._context=t,this._alpha=e}Qc.prototype={areaStart:Dc,areaEnd:Dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Kc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Jc=function t(e){function n(t){return e?new Qc(t,e):new Wc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function tl(t,e){this._context=t,this._alpha=e}tl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Kc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var el=function t(e){function n(t){return e?new tl(t,e):new qc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function nl(t){this._context=t}function rl(t){return new nl(t)}function il(t){return t<0?-1:1}function ol(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(il(o)+il(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function al(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function sl(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 ul(t){this._context=t}function cl(t){this._context=new ll(t)}function ll(t){this._context=t}function hl(t){return new ul(t)}function fl(t){return new cl(t)}function dl(t){this._context=t}function pl(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 gl(t){return new dl(t)}function vl(t,e){this._context=t,this._t=e}function ml(t){return new vl(t,.5)}function yl(t){return new vl(t,0)}function _l(t){return new vl(t,1)}function bl(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 xl(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function wl(t,e){return t[e]}nl.prototype={areaStart:Dc,areaEnd:Dc,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))}},ul.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:sl(this,this._t0,al(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,sl(this,al(this,n=ol(this,t,e)),n);break;default:sl(this,this._t0,n=ol(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(cl.prototype=Object.create(ul.prototype)).point=function(t,e){ul.prototype.point.call(this,e,t)},ll.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)}},dl.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=pl(t),i=pl(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)}},vl.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 Ol=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=Xr.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===O.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=li.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(Xr.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=li.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=yo(n,(function(t){return t[r]})).keys(),a=this.services.cartesianScales.domainAxisPosition,s=t.axes[a].scaleType;s===O.TIME?o.sort((function(t,e){return new Date(t)-new Date(e)})):s!==O.LOG&&s!==O.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=Xr.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=Qu([]),e=xl,n=bl,r=wl;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(o=0;o<c;++o){for(var h,f=s[o],d=l[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(l);o<c;++o)l[a[o]].index=o;return n(l,a),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Qu(kc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Qu(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?xl:"function"==typeof t?t:Qu(kc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?bl: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:Xr.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(N.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=li.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})),c=this.getOptions(),l=i.some((function(t){return t.status===r}));c.data.selectedGroups=l?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(N.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=Xr.getProperty(t,"label");if(null===a){var s=Xr.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=li.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=yo(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=eo,e=this.getOptions(),n=Xr.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=To().range(r).domain(this.allDataGroups)}else this.colorScale=To().range(t).domain(this.allDataGroups)},t}(),El=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}(),Tl="http://www.w3.org/1999/xhtml",Sl={svg:"http://www.w3.org/2000/svg",xhtml:Tl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ml(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Sl.hasOwnProperty(e)?{space:Sl[e],local:t}:t}function Al(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Tl&&e.documentElement.namespaceURI===Tl?e.createElement(t):e.createElementNS(n,t)}}function Cl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Pl(t){var e=Ml(t);return(e.local?Cl:Al)(e)}function kl(){}function Dl(t){return null==t?kl:function(){return this.querySelector(t)}}function Ll(){return[]}function Rl(t){return null==t?Ll:function(){return this.querySelectorAll(t)}}function Il(t){return function(){return this.matches(t)}}function Nl(t){return new Array(t.length)}function Ul(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ul.prototype={constructor:Ul,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 jl(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Ul(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function Vl(t,e,n,r,i,o,a){var s,u,c,l={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new Ul(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function Hl(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Gl(t){return function(){this.removeAttribute(t)}}function Bl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fl(t,e){return function(){this.setAttribute(t,e)}}function zl(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Wl(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Yl(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 ql(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Xl(t){return function(){this.style.removeProperty(t)}}function Kl(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Zl(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function $l(t,e){return t.style.getPropertyValue(e)||ql(t).getComputedStyle(t,null).getPropertyValue(e)}function Ql(t){return function(){delete this[t]}}function Jl(t,e){return function(){this[t]=e}}function th(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function eh(t){return t.trim().split(/^|\s+/)}function nh(t){return t.classList||new rh(t)}function rh(t){this._node=t,this._names=eh(t.getAttribute("class")||"")}function ih(t,e){for(var n=nh(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function oh(t,e){for(var n=nh(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ah(t){return function(){ih(this,t)}}function sh(t){return function(){oh(this,t)}}function uh(t,e){return function(){(e.apply(this,arguments)?ih:oh)(this,t)}}function ch(){this.textContent=""}function lh(t){return function(){this.textContent=t}}function hh(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function fh(){this.innerHTML=""}function dh(t){return function(){this.innerHTML=t}}function ph(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function gh(){this.nextSibling&&this.parentNode.appendChild(this)}function vh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mh(){return null}function yh(){var t=this.parentNode;t&&t.removeChild(this)}function _h(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bh(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}rh.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 xh={},wh=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(xh={mouseenter:"mouseover",mouseleave:"mouseout"}));function Oh(t,e,n){return t=Eh(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Eh(t,e,n){return function(r){var i=wh;wh=r;try{t.call(this,this.__data__,e,n)}finally{wh=i}}}function Th(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 Sh(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 Mh(t,e,n){var r=xh.hasOwnProperty(t.type)?Oh:Eh;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function Ah(t,e,n){var r=ql(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 Ch(t,e){return function(){return Ah(this,t,e)}}function Ph(t,e){return function(){return Ah(this,t,e.apply(this,arguments))}}var kh=[null];function Dh(t,e){this._groups=t,this._parents=e}function Lh(){return new Dh([[document.documentElement]],kh)}function Rh(t){return"string"==typeof t?new Dh([[document.querySelector(t)]],[document.documentElement]):new Dh([[t]],kh)}function Ih(){for(var t,e=wh;t=e.sourceEvent;)e=t;return e}function Nh(t){var e=Ih();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)}Dh.prototype=Lh.prototype={constructor:Dh,select:function(t){"function"!=typeof t&&(t=Dl(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(o=s[l])&&(a=t.call(o,o.__data__,l,s))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new Dh(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Rl(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,c=0;c<u;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new Dh(r,i)},filter:function(t){"function"!=typeof t&&(t=Il(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new Dh(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?Vl:jl,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=a[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new Dh(a,r))._enter=s,a._exit=u,a},enter:function(){return new Dh(this._enter||this._groups.map(Nl),this._parents)},exit:function(){return new Dh(this._exit||this._groups.map(Nl),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Dh(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=Hl);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),l=0;l<u;++l)(a=s[l])&&(c[l]=a);c.sort(e)}return new Dh(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=Ml(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?Bl:Gl:"function"==typeof e?n.local?Yl:Wl:n.local?zl:Fl)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Xl:"function"==typeof e?Zl:Kl)(t,e,null==n?"":n)):$l(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ql:"function"==typeof e?th:Jl)(t,e)):this.node()[t]},classed:function(t,e){var n=eh(t+"");if(arguments.length<2){for(var r=nh(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?uh:e?ah:sh)(n,e))},text:function(t){return arguments.length?this.each(null==t?ch:("function"==typeof t?hh:lh)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?fh:("function"==typeof t?ph:dh)(t)):this.node().innerHTML},raise:function(){return this.each(gh)},lower:function(){return this.each(vh)},append:function(t){var e="function"==typeof t?t:Pl(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Pl(t),r=null==e?mh:"function"==typeof e?e:Dl(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(yh)},clone:function(t){return this.select(t?bh:_h)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Th(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Mh:Sh,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ph:Ch)(t,e))}};var Uh={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 "},jh=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}()}(),Vh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Hh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Gh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Hh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Bh=["top","right","bottom","left","width","height","size","weight"],Fh="undefined"!=typeof MutationObserver,zh=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(){Gh(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)};zh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},zh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},zh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},zh.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},zh.prototype.connect_=function(){Vh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Fh?(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)},zh.prototype.disconnect_=function(){Vh&&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)},zh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Bh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},zh.getInstance=function(){return this.instance_||(this.instance_=new zh),this.instance_},zh.instance_=null;var Wh=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},Yh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Hh},qh=Jh(0,0,0,0);function Xh(t){return parseFloat(t)||0}function Kh(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Xh(t["border-"+n+"-width"])}),0)}function Zh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return qh;var r=Yh(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]=Xh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Xh(r.width),u=Xh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Kh(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Kh(r,"top","bottom")+a)),!function(t){return t===Yh(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Jh(i.left,i.top,s,u)}var $h="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Yh(t).SVGGraphicsElement}:function(t){return t instanceof Yh(t).SVGElement&&"function"==typeof t.getBBox};function Qh(t){return Vh?$h(t)?function(t){var e=t.getBBox();return Jh(0,0,e.width,e.height)}(t):Zh(t):qh}function Jh(t,e,n,r){return{x:t,y:e,width:n,height:r}}var tf=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Jh(0,0,0,0),this.target=t};tf.prototype.isActive=function(){var t=Qh(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},tf.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var ef=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Wh(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Wh(this,{target:t,contentRect:n})},nf=function(t,e,n){if(this.activeObservations_=[],this.observations_=new jh,"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};nf.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 Yh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new tf(t)),this.controller_.addObserver(this),this.controller_.refresh())}},nf.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 Yh(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))}},nf.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},nf.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},nf.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new ef(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},nf.prototype.clearActive=function(){this.activeObservations_.splice(0)},nf.prototype.hasActive=function(){return this.activeObservations_.length>0};var rf="undefined"!=typeof WeakMap?new WeakMap:new jh,of=function(t){if(!(this instanceof of))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=zh.getInstance(),n=new nf(t,e,this);rf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){of.prototype[t]=function(){return(e=rf.get(this))[t].apply(e,arguments);var e}}));var af=void 0!==Hh.ResizeObserver?Hh.ResizeObserver:of,sf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=Rh(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var c={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(c),a.width>0&&a.height>0))return c;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Xr.getProperty(t.node(),"width","baseVal","value"),height:Xr.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Rh(this.getHolder()).classed(Uh.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"style","prefix"),n=Rh(this.getHolder()).append("svg").classed(Uh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("title").text(Xr.getProperty(t,"title")||"Chart"),this.svg=n.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Rh(e).on("mouseover",(function(){t.services.events.dispatchEvent(N.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(N.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Xr.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(N.Chart.RESIZE))}),12.5);new af(i).observe(e)}},e}(El),uf=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}(El),cf={value:function(){}};function lf(){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 hf(r)}function hf(t){this._=t}function ff(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 df(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function pf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=cf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}hf.prototype=lf.prototype={constructor:hf,on:function(t,e){var n,r=this._,i=ff(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]=pf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=pf(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=df(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new hf(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 gf,vf,mf=0,yf=0,_f=0,bf=0,xf=0,wf=0,Of="object"==typeof performance&&performance.now?performance:Date,Ef="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Tf(){return xf||(Ef(Sf),xf=Of.now()+wf)}function Sf(){xf=0}function Mf(){this._call=this._time=this._next=null}function Af(t,e,n){var r=new Mf;return r.restart(t,e,n),r}function Cf(){xf=(bf=Of.now())+wf,mf=yf=0;try{!function(){Tf(),++mf;for(var t,e=gf;e;)(t=xf-e._time)>=0&&e._call.call(null,t),e=e._next;--mf}()}finally{mf=0,function(){var t,e,n=gf,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:gf=e);vf=t,kf(r)}(),xf=0}}function Pf(){var t=Of.now(),e=t-bf;e>1e3&&(wf-=e,bf=t)}function kf(t){mf||(yf&&(yf=clearTimeout(yf)),t-xf>24?(t<1/0&&(yf=setTimeout(Cf,t-Of.now()-wf)),_f&&(_f=clearInterval(_f))):(_f||(bf=Of.now(),_f=setInterval(Pf,1e3)),mf=1,Ef(Cf)))}function Df(t,e,n){var r=new Mf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Mf.prototype=Af.prototype={constructor:Mf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Tf():+n)+(null==e?0:+e),this._next||vf===this||(vf?vf._next=this:gf=this,vf=this),this._call=t,this._time=n,kf()},stop:function(){this._call&&(this._call=null,this._time=1/0,kf())}};var Lf=lf("start","end","cancel","interrupt"),Rf=[];function If(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Df(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(Df((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Af((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:Lf,tween:Rf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Nf(t,e){var n=jf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Uf(t,e){var n=jf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function jf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Vf(t,e){var n,r;return function(){var i=Uf(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 Hf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Uf(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function Gf(t,e,n){var r=t._id;return t.each((function(){var t=Uf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return jf(t,r).value[e]}}function Bf(t,e){var n;return("number"==typeof e?ca:e instanceof Fo?oa:(n=Fo(e))?(e=n,oa):da)(t,e)}function Ff(t){return function(){this.removeAttribute(t)}}function zf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wf(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 Yf(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 qf(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 Xf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Kf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Zf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function $f(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Zf(t,i)),n}return i._value=e,i}function Qf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Kf(t,i)),n}return i._value=e,i}function Jf(t,e){return function(){Nf(this,t).delay=+e.apply(this,arguments)}}function td(t,e){return e=+e,function(){Nf(this,t).delay=e}}function ed(t,e){return function(){Uf(this,t).duration=+e.apply(this,arguments)}}function nd(t,e){return e=+e,function(){Uf(this,t).duration=e}}function rd(t,e){if("function"!=typeof e)throw new Error;return function(){Uf(this,t).ease=e}}function id(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)?Nf:Uf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var od=Lh.prototype.constructor;function ad(t){return function(){this.style.removeProperty(t)}}function sd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ud(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&sd(t,o,n)),r}return o._value=e,o}function cd(t){return function(e){this.textContent=t.call(this,e)}}function ld(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&cd(r)),e}return r._value=t,r}var hd=0;function fd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function dd(t){return Lh().transition(t)}function pd(){return++hd}var gd=Lh.prototype;function vd(t){return+t}fd.prototype=dd.prototype={constructor:fd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Dl(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,c=r[a],l=c.length,h=o[a]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,If(h[f],e,n,f,h,jf(s,n)));return new fd(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Rl(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=jf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&If(f,e,n,g,d,p);o.push(d),a.push(u)}return new fd(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=Il(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new fd(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new fd(a,this._parents,this._name,this._id)},selection:function(){return new od(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=pd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var l=jf(a,e);If(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new fd(r,this._parents,t,n)},call:gd.call,nodes:gd.nodes,node:gd.node,size:gd.size,empty:gd.empty,each:gd.each,on:function(t,e){var n=this._id;return arguments.length<2?jf(this.node(),n).on.on(t):this.each(id(n,t,e))},attr:function(t,e){var n=Ml(t),r="transform"===n?Ta:Bf;return this.attrTween(t,"function"==typeof e?(n.local?Xf:qf)(n,r,Gf(this,"attr."+t,e)):null==e?(n.local?zf:Ff)(n):(n.local?Yf:Wf)(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=Ml(t);return this.tween(n,(r.local?$f:Qf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ea:Bf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=$l(this,t),a=(this.style.removeProperty(t),$l(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ad(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=$l(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=$l(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Gf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Uf(this,t),c=u.on,l=null==u.value[a]?o||(o=ad(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=$l(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,ud(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}}(Gf(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,ld(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=jf(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?Vf:Hf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Jf:td)(e,t)):jf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ed:nd)(e,t)):jf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(rd(e,t)):jf(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=Uf(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 md={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function yd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return md.time=Tf(),md;return n}Lh.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)}))},Lh.prototype.transition=function(t){var e,n;t instanceof fd?(e=t._id,t=t._name):(e=pd(),(n=md).time=Tf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)(a=s[c])&&If(a,t,e,c,s,n||yd(a,e));return new fd(r,this._parents,t,e)};var _d=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(N.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=dd(t).duration(Xr.getProperty(ki,t,"duration")||ki.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=dd(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}(El);function bd(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 xd(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 wd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=xd(e);return n.setDate(n.getDate()+r),n}function Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t).getTime(),r=xd(e);return new Date(n+r)}function Ed(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,36e5*n)}function Td(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Sd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(t);return e.setHours(0,0,0,0),e}function Md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(t),r=Sd(e),i=n.getTime()-Td(n),o=r.getTime()-Td(r);return Math.round((i-o)/864e5)}function Ad(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,6e4*n)}function Cd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(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 Pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=xd(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Cd(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,1e3*n)}function Dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Pd(t,12*n)}function Ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Rd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(t);return!isNaN(e)}function Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e);return n.getFullYear()-r.getFullYear()}function Ud(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e);return n.getTime()-r.getTime()}function jd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Hd={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 Gd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Bd={date:Gd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Gd({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:Gd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function zd(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 Wd(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var Yd,qd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Hd[t]?Hd[t]:1===e?Hd[t].one:Hd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Bd,formatRelative:function(t,e,n,r){return Fd[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:zd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:zd({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:zd({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:zd({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:zd({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:(Yd={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(Yd.matchPattern);if(!i)return null;var o=i[0],a=n.match(Yd.parsePattern);if(!a)return null;var s=Yd.valueCallback?Yd.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Wd({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:Wd({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:Wd({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:Wd({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:Wd({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 Xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Od(t,-n)}function Kd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Zd=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Kd("yy"===e?r%100:r,e.length)},$d=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Kd(n+1,2)},Qd=function(t,e){return Kd(t.getUTCDate(),e.length)},Jd=function(t,e){return Kd(t.getUTCHours()%12||12,e.length)},tp=function(t,e){return Kd(t.getUTCHours(),e.length)},ep=function(t,e){return Kd(t.getUTCMinutes(),e.length)},np=function(t,e){return Kd(t.getUTCSeconds(),e.length)},rp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Kd(Math.floor(r*Math.pow(10,n-3)),e.length)};function ip(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=bd(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 op(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=bd(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=ip(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=ip(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=op(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=ip(n);return r}function sp(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:xd(i),a=null==n.weekStartsOn?o:xd(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=bd(t),u=s.getUTCDay(),c=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function up(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=bd(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:xd(a),u=null==i.firstWeekContainsDate?s:xd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=sp(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=sp(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}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.firstWeekContainsDate,o=null==i?1:xd(i),a=null==n.firstWeekContainsDate?o:xd(n.firstWeekContainsDate),s=up(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var c=sp(u,e);return c}var lp="midnight",hp="noon",fp="morning",dp="afternoon",pp="evening",gp="night",vp={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 Zd(t,e)},Y:function(t,e,n,r){var i=up(t,r),o=i>0?i:1-i;return"YY"===e?Kd(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Kd(o,e.length)},R:function(t,e){return Kd(op(t),e.length)},u:function(t,e){return Kd(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 Kd(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 Kd(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 $d(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 Kd(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=bd(t),r=sp(n,e).getTime()-cp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Kd(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=bd(t),n=ip(e).getTime()-ap(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Kd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Qd(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=bd(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"}):Kd(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 Kd(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 Kd(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 Kd(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?hp:0===i?lp: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?pp:i>=12?dp:i>=4?fp:gp,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 Jd(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):tp(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ep(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):np(t,e)},S:function(t,e){return rp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return yp(i);case"XXXX":case"XX":return _p(i);case"XXXXX":case"XXX":default:return _p(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return yp(i);case"xxxx":case"xx":return _p(i);case"xxxxx":case"xxx":default:return _p(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+mp(i,":");case"OOOO":default:return"GMT"+_p(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+mp(i,":");case"zzzz":default:return"GMT"+_p(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Kd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Kd((r._originalDate||t).getTime(),e.length)}};function mp(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+Kd(o,2)}function yp(t,e){return t%60==0?(t>0?"-":"+")+Kd(Math.abs(t)/60,2):_p(t,e)}function _p(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Kd(Math.floor(i/60),2)+n+Kd(i%60,2)}function bp(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 xp(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 wp={p:xp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return bp(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}}",bp(i,e)).replace("{{time}}",xp(o,e))}},Op=["D","DD"],Ep=["YY","YYYY"];function Tp(t){return-1!==Op.indexOf(t)}function Sp(t){return-1!==Ep.indexOf(t)}function Mp(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 Ap=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Cp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pp=/^'([^]*?)'?$/,kp=/''/g,Dp=/[a-zA-Z]/;function Lp(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||qd,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:xd(a),u=null==i.firstWeekContainsDate?s:xd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=o.options&&o.options.weekStartsOn,l=null==c?0:xd(c),h=null==i.weekStartsOn?l:xd(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=bd(t);if(!Rd(f))throw new RangeError("Invalid time value");var d=Td(f),p=Xd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(Cp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,wp[e])(t,o.formatLong,g):t})).join("").match(Ap).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Rp(t);var n=vp[e];if(n)return!i.useAdditionalWeekYearTokens&&Sp(t)&&Mp(t),!i.useAdditionalDayOfYearTokens&&Tp(t)&&Mp(t),n(p,t,o.localize,g);if(e.match(Dp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Rp(t){return t.match(Pp)[1].replace(kp,"'")}function Ip(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return wd(t,-n)}function Np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Ed(t,-n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Ad(t,-n)}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Pd(t,-n)}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return kd(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(e);return Dd(t,-n)}var Gp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return n(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return Xr.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(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.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[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=Xr.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===O.LABELS?a(u)+a.step()/2:o===O.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 Xr.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return Xr.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===O.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 Xr.getProperty(n,"axes",t).scaleType===O.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=bd(t),r=bd(e),i=Ld(n,r),o=Math.abs(Nd(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Ld(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Hp(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=bd(t),r=bd(e),i=Ld(n,r),o=Math.abs(Id(n,r));n.setMonth(n.getMonth()-i*o);var a=Ld(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[jp(n,e),Pd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(t),r=bd(e),i=Ld(n,r),o=Math.abs(Md(n,r));n.setDate(n.getDate()-i*o);var a=Ld(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Ip(n,e),wd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Np(n,e),Ed(r,e)];if(jd(r,n)>30)return[Up(n,30*e),Ad(r,30*e)];if(jd(r,n)>1)return[Up(n,e),Ad(r,e)];if(Vd(r,n)>15)return[Vp(n,15*e),kd(r,15*e)];if(Vd(r,n)>1)return[Vp(n,e),kd(r,e)];return[n,r]}(e,Xr.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,Di.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"axes");return null===Xr.getProperty(e,b.LEFT)&&null!==Xr.getProperty(e,b.RIGHT)||!0===Xr.getProperty(e,b.RIGHT,"main")?b.RIGHT:b.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"axes");return null===Xr.getProperty(e,b.BOTTOM)&&null!==Xr.getProperty(e,b.TOP)||!0===Xr.getProperty(e,b.TOP,"main")?b.TOP:b.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Xr.getProperty(n,"axes",t),i=Xr.getProperty(n,"axes",e),o=r.scaleType||O.LINEAR,a=i.scaleType||O.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===O.LABELS||a===O.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===O.LABELS||o===O.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=Xr.getProperty(e,"axes",t),r=n.includeZero,i=Xr.getProperty(n,"scaleType")||O.LINEAR;if(this.model.isDataEmpty())return[];var o,a,s=this.model.getDisplayData(),u=n.mapsTo,c=n.percentage;if(n.domain)return i===O.LABELS?n.domain:this.extendsDomain(t,n.domain);if(c)return[0,100];if(n&&i===O.LABELS)return yo(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!==O.TIME&&r&&a.push(0),o=ao(a),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Xr.getProperty(e,"axes",t);if(!n)return null;var r,i=Xr.getProperty(n,"scaleType")||O.LINEAR;return this.scaleTypes[t]=i,(r=i===O.TIME?function(){return vo.apply(Yu(xs,bs,ms,gs,ps,ds,fs,hs,Ds).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===O.LOG?function t(){var e=ss(Ra()).domain([1,10]);return e.copy=function(){return La(e,t()).base(e.base())},vo.apply(e,arguments),e}().base(n.base||10):i===O.LABELS?So():Ja()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Xr.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)!==O.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=Xr.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}(El);var Bp,Fp,zp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:bc,curveLinearClosed:rl,curveBasis:Ic,curveBasisClosed:Uc,curveBasisOpen:Vc,curveBundle:Gc,curveCardinal:zc,curveCardinalClosed:Yc,curveCardinalOpen:Xc,curveCatmullRom:$c,curveCatmullRomClosed:Jc,curveCatmullRomOpen:el,curveMonotoneX:hl,curveMonotoneY:fl,curveNatural:gl,curveStep:ml,curveStepAfter:_l,curveStepBefore:yl},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}(El),Wp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(Rh(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=Xr.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Uh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Uh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=Xr.getProperty(this.model.getOptions(),"style","prefix");return sf.appendOrSelect(this.parent,"g."+Uh.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Yp=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+" "+r.DOCUMENT),n=this.model.getOptions(),i=Xr.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=Xr.getProperty(i,"truncation","type"),c=Xr.getProperty(i,"truncation","threshold"),l=Xr.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>c?Xr.truncateLabel(t.name,u,l):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=Xr.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,c=r.legend.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=Xr.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=Rh(this),g=Rh(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===S.VERTICAL)h===S.VERTICAL&&0!==r&&d++;else{var v=sf.getSVGElementSize(e.parent,{useAttr:!0}),m=sf.getSVGElementSize(Rh(this).select("text"),{useBBox:!0}),y=sf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;c.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===S.HORIZONTAL)&&"0"===c.select("rect.checkbox").attr("y"),x=h===S.VERTICAL&&"0"===c.select("rect.checkbox").attr("x"),w=b||x;l&&c.select("g.check").empty()&&w?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=Xr.getProperty(n,"legend"),i=Xr.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(N.Legend.ITEM_HOVER,{hoveredElement:Rh(this)});var e=n.legend.checkbox.radius,r=Rh(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();var o=r.datum();o.name.length>i&&t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,content:o.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(N.Legend.ITEM_CLICK,{clickedElement:Rh(this)});var e=Rh(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Rh(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(N.Tooltip.HIDE),t.services.events.dispatchEvent(N.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(Wp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Fp||(Fp={}));var qp=((Bp={})[Fp.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)}},Bp[Fp.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)}},Bp[Fp.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)}},Bp[Fp.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)}},Bp),Xp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Kp=function(){function t(t){void 0===t&&(t={}),this.positions=qp,this.positions=Object.assign({},qp,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:Xp.innerHeight-Xp.scrollY,height:Xp.innerWidth-Xp.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}(),Zp=(new Kp,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function $p(t,e,n,r){var i=0===e,o=2===Number(Lp(new Date(t),"c")),a=1===Number(Lp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||eg(t)||ng(t)||rg(t);case"daily":return r?i||o||rg(t):i||ng(t)||rg(t);case"monthly":return i||rg(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function Qp(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=Xr.getProperty(r,"timeIntervalFormats")[o],u=Xr.getProperty(s,"primary"),c=Xr.getProperty(s,"secondary");return Lp(a,$p(t,e,n,i)?u:c,{locale:r.localeObject})}function Jp(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function tg(t){return 1===t.length?"15seconds":function(t){var e=Zp.reduce((function(e,n,r){n[0];var i=n[1],o=Zp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Zp[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 eg(t){var e=Jp(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function ng(t){var e=Jp(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function rg(t){var e=Jp(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 ig=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new Kp,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=Xr.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Uh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=o+"-"+a,this.threshold=sf.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=sf.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),c=sf.appendOrSelect(this.threshold,"line.threshold-line");c.style("stroke",i);var l=this.services.cartesianScales.getScaleByPosition(o),h=this.services.cartesianScales.getScaleTypeByPosition(o),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===O.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],x=y[1],w=this.services.cartesianScales,E=w.getOrientation(),T=Xr.flipDomainAndRangeBasedOnOrientation((function(t){return w.getDomainValue(t)}),(function(t){return w.getRangeValue(t)}),E),S=T[0],M=T[1];if(o===b.TOP||o===b.BOTTOM){var A=S(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+x+")"),c.attr("y2",_-x),u.attr("width",_-x).classed("rotate",!0)}else{A=M(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),c.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(N.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(N.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)===O.TIME){var i=[b.LEFT,b.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=Xr.getProperty(r,"timeScale");return Qp(e,0,tg(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=Rh(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=sf.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=Nh(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[Fp.RIGHT,Fp.LEFT,Fp.TOP,Fp.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;sf.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(N.Threshold.SHOW,{hoveredElement:Rh(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(N.Threshold.HIDE,{hoveredElement:Rh(t.threshold)})}))},e}(Wp),og=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=sf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=sf.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=sf.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("mouseover",(function(){a.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:e,content:i})})).on("mousemove",(function(){a.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("mouseout",(function(){a.services.events.dispatchEvent(N.Tooltip.HIDE)}))}},e.prototype.render=function(){var t=this.getContainerSVG();sf.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}(Wp),ag=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Kp,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=Rh(this.services.domUtils.getHolder()),n=Xr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=sf.appendOrSelect(e,"div."+Uh.prefix+"--"+n+"--tooltip");var r=sf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(N.Tooltip.MOVE,(function(){t.positionTooltip()})),this.services.events.addEventListener(N.Tooltip.SHOW,(function(e){var n=e.detail.data,i=t.getTooltipHTML(e);Xr.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(n,i)):r.html(i),t.positionTooltip(),t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(N.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this.model.getOptions(),n=Xr.getProperty(e,"tooltip","truncation","type"),r=Xr.getProperty(e,"tooltip","truncation","threshold"),i=Xr.getProperty(e,"tooltip","truncation","numCharacter");return n!==x.NONE?t.map((function(t){return t.label&&t.label.length>r&&(t.label=Xr.truncateLabel(t.label,n,i)),t.value&&t.value.length>r&&(t.value=Xr.truncateLabel(t.value,n,i)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</div>";else{var n=this.getItems(t);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.color?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<p class="label">'+t.label+'</p>\n\t\t\t\t\t\t\t\t<p class="value">'+t.value+"</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t){var e=this.model.getOptions(),n=Xr.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Nh(n);if(t){var o=t.placement===E.TOP?Fp.TOP:Fp.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Fp.RIGHT,Fp.LEFT,Fp.TOP,Fp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.horizontalOffset;a===Fp.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(Wp),sg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=this.model.getOptions(),r=t.detail.data,i=this.services.cartesianScales,o=i.getDomainAxisOptions(),a=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),c=i.getRangeIdentifier(),l=i.getRangeAxisScaleType(),h=n.data.groupMapsTo,f=o.title;if(!f){var d=i.getDomainAxisPosition();f=d===b.BOTTOM||d===b.TOP?"x-value":"y-value"}var p,g=r[0][a];if(s===O.TIME?g=Lp(new Date(r[0][a]),"MMM d, yyyy"):s===O.LINEAR&&(g=g.toLocaleString()),1===r.length){var v=r[0],m=u.title;if(!m){var y=i.getRangeAxisPosition();m=y===b.LEFT||y===b.RIGHT?"y-value":"x-value"}var _=v[c];l===O.LINEAR&&(_=_.toLocaleString()),p=[{label:f,value:g},{label:m,value:_},{label:"Group",value:v[h],color:this.model.getStrokeColor(v[h])}]}else r.length>1&&(p=(p=[{label:f,value:this.valueFormatter(g)}]).concat(r.map((function(t){return{label:t[h],value:e.valueFormatter(t[c]),color:e.model.getStrokeColor(t[h])}})).sort((function(t,e){return e.value-t.value}))),!0===Xr.getProperty(n,"tooltip","showTotal")&&p.push({label:"Total",value:this.valueFormatter(r.reduce((function(t,e){return t+e[c]}),0)),bold:!0}));return p},e}(ag),ug=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?Pi.opacity.unselected:Pi.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Pi.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=Ec().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",Pi.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wp),cg=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?Pi.opacity.unselected:Pi.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Pi.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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)===O.TIME){var c=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),l=this.model.getStackedData({percentage:c}),h=e.selectAll("path.area").data(l,(function(t){return t[0][o]}));this.areaGenerator=Ec().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(l,(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",Pi.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}(Wp),lg=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}(Wp),hg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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 Xr.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=Rh(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(t){Rh(this);e.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:Rh(this),datum:t}),e.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Rh(this),datum:t})})).on("mouseout",(function(n){var r=Rh(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(N.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(lg),fg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=yo(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 c=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)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return 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 Xr.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=Rh(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fo(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(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(N.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.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=Xr.getProperty(t,"bars","width"),n=Xr.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=So().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(lg),dg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=(this.model.getDisplayData(),this.model.getOptions()),o=i.data.groupMapsTo,a=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(a,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-label","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[o])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,o=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-o/2,s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===w.VERTICAL?c+=1:c-=1),Xr.generateSVGPathString({x0:a,x1:s,y0:u,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[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=Rh(this);i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:i,datum:n});var o=e.model.getDisplayData(),a=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=o.find((function(e){return e[s]===n.data[n.group]&&e[a].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[a]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=Rh(this);e.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Rh(this),datum:t})})).on("mouseout",(function(n){var r=Rh(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(N.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(lg),pg=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(N.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(N.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 c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(c,t),this.addEventListeners()},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=Xr.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Xr.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],c=s[1],l=u(t,e),h=c(t,e);return a&&o?h<=a.scaleValue&&l>=o.scaleValue:a?h<=a.scaleValue:o?l>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,u=this.services,c=u.cartesianScales,l=u.transitions,h=i.data.groupMapsTo,f=c.getDomainIdentifier(),d=c.getRangeIdentifier(),p=Xr.flipDomainAndRangeBasedOnOrientation((function(t,e){return c.getDomainValue(t,e)}),(function(t,e){return c.getRangeValue(t,e)}),c.getOrientation()),g=p[0],v=p[1],m=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[h],t[f],t,a)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,a)})).transition(l.getTransition("scatter-update-enter",e)).attr("cx",g).attr("cy",v).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[h],t[f],t,a))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",a?s:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[h],t[f],t)})).attr("opacity",m?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[d]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=Rh(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(N.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Scatter.SCATTER_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(N.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(N.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Wp),gg=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=sf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?ao(i):[1,1];return Ja().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}(pg),vg=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?Ci.opacity.unselected:Ci.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Ci.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=Xr.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],c=s[1],l=this.model.getOptions(),h=Oc().x(u).y(c).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(l.axes).some((function(t){return l.axes[t].percentage})),p=l.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:!Xr.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wp),mg=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}),c=e.selectAll("g.dots").data(u,(function(t){return t[0][i]}));c.exit().attr("opacity",0).remove();var l=c.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(c).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var h=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).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}(pg);function yg(t,e){var n=this,r=pa(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var _g=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.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=yc().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=yc().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=Sc,e=Tc,n=null,r=Qu(0),i=Qu(uc),o=Qu(0);function a(a){var s,u,c,l,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(uc,Math.max(-uc,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Qu(+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:Qu(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qu(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Qu(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=sf.appendOrSelect(n,"g.slices").attr("role",r.GROUP).attr("aria-label","slices").selectAll("path.slice").data(u,(function(t){return t.data[a]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return 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+", "+Xr.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return yg.bind(this)(t,e.arc)}));var l=u.filter((function(t){return t.value>0})),h=sf.appendOrSelect(n,"g.labels").attr("role",r.GROUP).attr("aria-label","labels").selectAll("text.pie-label").data(l,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Xr.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=l.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,a=t.yPosition-o.pie.callout.offsetY,t.direction=C.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=C.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=sf.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP).attr("aria-label","callouts"),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===C.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 Rh(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 Rh(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){var n=Rh(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEOVER,{element:Rh(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value,color:t.model.getStrokeColor(e.data[r])}]})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Pie.SLICE_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=sf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e}(Wp),bg=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 Xr.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 Xr.getProperty(t,"gauge","type")===L.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(Xr.getProperty(e,"gauge","deltaArrow","direction")){case R.UP:return"4,10 8,6 12,10";case R.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(),c=u+a*s,l=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=yc().innerRadius(f).outerRadius(h).startAngle(c).endAngle(l),this.arc=yc().innerRadius(f).outerRadius(h).startAngle(u).endAngle(c),sf.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=Xr.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=Xr.getProperty(e,"gauge","valueFontSize"),s=Xr.getProperty(e,"gauge","deltaFontSize"),u=Xr.getProperty(e,"gauge","numberSpacing"),c=0;n!==L.FULL||i?n===L.SEMI&&i&&(c=-(s(o)+u)):c=s(o);var l=sf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),h=sf.appendOrSelect(l,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=Xr.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=sf.getSVGElementSize(sf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;sf.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?Xr.getProperty(e,"gauge","deltaFontSize"):function(){return 0},o=n?Xr.getProperty(e,"gauge","numberFormatter"):function(){return null},a=Xr.getProperty(e,"gauge","deltaArrow","size"),s=Xr.getProperty(e,"gauge","numberSpacing"),u=sf.appendOrSelect(t,"g.gauge-numbers"),c=sf.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),l=sf.appendOrSelect(c,"text.gauge-delta-number");l.data(null===n?[]:[n]),l.enter().append("text").classed("gauge-delta-number",!0).merge(l).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return o(t)+"%"}));var h=sf.getSVGElementSize(sf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=Xr.getProperty(e,"gauge","deltaArrow","enabled"),d=c.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"),sf.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=Xr.getProperty(e,"gauge","status");sf.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(),l.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-Xr.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(N.Gauge.ARC_MOUSEOVER,{element:Rh(this),datum:e})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(N.Gauge.ARC_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Xr.getProperty(t,"gauge","type"),n=sf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===L.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Wp),xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this;if(this.model.isDataEmpty())this.getContainerSVG().select("g.center").remove();else{var r=sf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();sf.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(Rh(this))})),sf.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(Xr.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=Xr.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?ga:ca)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(_g),wg=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=sf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var o=Xr.getProperty(this.model.getOptions(),"data","loading");o?this.renderSkeleton(o):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===P.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===P.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===P.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==P.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=Ja().domain([0,1]).range(t),this.yScale=Ja().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=sf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;this.backdrop=sf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",o);var a=sf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],c=(s[1],this.yScale.range()),l=(c[0],c[1]);this.backdrop.merge(a).attr("x",u).attr("y",l),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=Xr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),o=sf.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=Xr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=sf.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=sf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),o=i.width,a=i.height,s=sf.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=this.model.getOptions().pie,c=(sf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none"),yc().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI)),l=t+Math.abs(u.radiusOffset),h=t+(Math.min(o,a)-2*t)/2;sf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+l+", "+h+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n)},e.prototype.computeOuterRadius=function(){var t=this.model.getOptions(),e=sf.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=sf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=sf.appendOrSelect(e,"defs").lower(),o=sf.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(vd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Wp),Og=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||Li.default.size).attr("height",this.configs.size||Li.default.size).attr("opacity",0)},e}(Wp);function Eg(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 Tg(t,e){var n,r,i,o,a,s=new Cg(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Sg);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new Cg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ag)}function Sg(t){return t.children}function Mg(t){t.data=t.data.data}function Ag(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Cg(t){this.data=t,this.depth=this.height=0,this.parent=null}function Pg(t){if("function"!=typeof t)throw new Error;return t}function kg(){return 0}function Dg(t){return function(){return t}}function Lg(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 Rg(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}function Ig(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}Cg.prototype=Tg.prototype={constructor:Cg,count:function(){return this.eachAfter(Eg)},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 Tg(this).eachBefore(Mg)}};var Ng=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,c=o-r;do{l=y[b++].value}while(!l&&b<x);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(a={value:l,dice:u<c,children:y.slice(_,b)}),a.dice?Rg(a,n,r,i,w?r+=c*l/w:o):Ig(a,n,r,w?n+=u*l/w:i,o),w-=l,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Ug(){var t=Ng,e=!1,n=1,r=1,i=[0],o=kg,a=kg,s=kg,u=kg,c=kg;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Lg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Pg(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:Dg(+t),l):o},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Dg(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Dg(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Dg(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:Dg(+t),l):c},l}var jg=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===M.ROW_REVERSE||a.configs.direction===M.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return 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=Xr.getProperty(t,"data","growth","x");return e===A.PREFERRED||e===A.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 Xr.getProperty(t,"data","growth","x")===A.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=sf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=Tg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===M.ROW||this.configs.direction===M.ROW_REVERSE?Rg:Ig;Ug().tile(s).size([i,o])(a);var u=this.configs.direction===M.ROW||this.configs.direction===M.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(Rh(n));var i=Xr.getProperty(e,"data","growth","x");i!==A.PREFERRED&&i!==A.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Xr.getProperty(t,"data","growth","x"),n=sf.getSVGElementSize(Rh(this),{useBBox:!0});if("legend"===t.data.id){var r=sf.getSVGElementSize(Rh(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===A.PREFERRED){var a=u?n.width:n.height,s=u?i:o;t.data.size=a/s*100}})),c.exit().remove(),this.children.filter((function(t){return Xr.getProperty(t,"growth","x")===A.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=Tg({children:this.children}).sum((function(t){return t.size})),Ug().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){Xr.getProperty(e,"data","growth","x")===A.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}(Wp),Vg=Array.prototype.slice;function Hg(t){return t}function Gg(t){return"translate("+(t+.5)+",0)"}function Bg(t){return"translate(0,"+(t+.5)+")"}function Fg(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 Wg(){return!this.__axis}function Yg(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?Gg:Bg;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):Hg:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?zg:Fg)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),T=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),T=T.merge(O.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),E=E.transition(h),T=T.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?l(t):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(y(t))})),E.attr(c+"2",u*o),T.attr(c,u*p).text(d),_.filter(Wg).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=Vg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Vg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Vg.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 qg(t){return Yg(1,t)}function Xg(t){return Yg(2,t)}function Kg(t){return Yg(3,t)}function Zg(t){return Yg(4,t)}var $g=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=Xr.getProperty(o,"axes",i),s=Xr.getProperty(a,"scaleType"),u=Xr.getProperty(o,"data","loading"),c=Xr.getProperty(a,"ticks","number"),l=Xr.getProperty(a,"truncation","type"),h=Xr.getProperty(a,"truncation","threshold"),f=Xr.getProperty(a,"truncation","numCharacter"),d=null!==c,p=i===b.LEFT||i===b.RIGHT,g=Xr.getProperty(o,"timeScale"),v=this.getContainerSVG(),m=sf.getSVGElementSize(this.parent,{useAttrs:!0}),y=m.width,_=m.height;i===b.BOTTOM||i===b.TOP?(e=this.configs.axes[b.LEFT]?this.margins.left:0,n=this.configs.axes[b.RIGHT]?y-this.margins.right:y):(e=_-this.margins.bottom,n=this.margins.top);var w,E=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===O.LABELS?E.rangeRound([e,n]):E.range([e,n]),i){case b.LEFT:w=Zg;break;case b.BOTTOM:w=Kg;break;case b.RIGHT:w=Xg;break;case b.TOP:w=qg}var T=sf.appendOrSelect(v,"g.axis."+i);T.attr("aria-label",i+" axis");var S=!T.select("g.ticks").empty(),M=sf.appendOrSelect(T,"g.ticks");S||(M.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),M.attr("aria-label",i+" ticks"));var A=sf.appendOrSelect(T,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),C=sf.appendOrSelect(A,"g.tick"),P=sf.appendOrSelect(C,"text").text("0"),k=sf.getSVGElementSize(P.node(),{useBBox:!0}).height;C.remove();var D,L=this.scaleType===O.TIME||a.scaleType===O.TIME,R=this.scaleType||a.scaleType||O.LINEAR,I=w(E).tickSizeOuter(0);if(E.ticks){var N=void 0;if(d?N=c:(N=Di.ticks.number,p&&(N=this.getNumberOfFittingTicks(_,k,2.5))),1===E.ticks().length&&0===E.ticks()[0]&&(N=0),I.ticks(N),L)if(E.ticks(N).length){var U=Xr.getProperty(o,"timeScale","addSpaceOnEdges"),j=void 0;U&&(j=E.nice(N)),j=E.ticks(N),U&&j.length>2&&(j.splice(j.length-1,1),j.splice(0,1)),I.tickValues(j)}else I.tickValues([])}var V=Xr.getProperty(a,"ticks","formatter");if(L){var H=tg(I.tickValues());D=null===V?function(t,e){return Qp(t,e,H,g)}:function(t,e){var n=Qp(t,e,H,g);return V(t,e,n)}}else null===V?R===O.LINEAR&&(D=function(t){return t.toLocaleString()}):D=V;switch(I.tickFormat(D),i){case b.LEFT:M.attr("transform","translate("+this.margins.left+", 0)");break;case b.BOTTOM:M.attr("transform","translate(0, "+(_-this.margins.bottom)+")");break;case b.RIGHT:M.attr("transform","translate("+(y-this.margins.right)+", 0)");break;case b.TOP:M.attr("transform","translate(0, "+this.margins.top+")")}var G=this.model.isDataEmpty();if(a.title){var B=sf.appendOrSelect(T,"text.axis-title").html(G||u?"":a.title);switch(i){case b.LEFT:B.attr("transform","rotate(-90)").attr("y",0).attr("x",-E.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.BOTTOM:B.attr("transform","translate("+(this.margins.left/2+E.range()[1]/2)+", "+_+")").style("text-anchor","middle");break;case b.RIGHT:B.attr("transform","rotate(90)").attr("y",-y).attr("x",E.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.TOP:var F=sf.getSVGElementSize(B,{useBBox:!0}).height;B.attr("transform","translate("+(this.margins.left/2+E.range()[1]/2)+", "+F/2+")").style("text-anchor","middle")}}if(L){var z=tg(I.tickValues()),W=g.showDayName,Y=M;t&&(M=M.transition(this.services.transitions.getTransition("axis-update",t))),M=M.call(I),Y.selectAll(".tick").data(I.tickValues(),E).order().select("text").style("font-weight",(function(t,e){return $p(t,e,z,W)?"bold":"normal"}))}else M=t&&S?M.transition(this.services.transitions.getTransition("axis-update")).call(I):M.call(I);if(A.call(I),i===b.BOTTOM||i===b.TOP){var q=!1;if(E.step){q=A.selectAll("g.tick text").nodes().some((function(t){return sf.getSVGElementSize(t,{useBBox:!0}).width>=E.step()}))}else{var X=Xr.getProperty(a,"ticks","rotateIfSmallerThan")||Di.ticks.rotateIfSmallerThan;q=y/(L?I.tickValues().length:E.ticks().length)/2<X}q?(d||(I.ticks(this.getNumberOfFittingTicks(y,k,3.5)),A.call(I),M.call(I)),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(u&&T.attr("opacity",0),M.selectAll("g.tick").attr("aria-label",(function(t){return t})),A.selectAll("g.tick").attr("aria-label",(function(t){return t})),l!==x.NONE&&s===O.LABELS){var K=this.model.getDataValuesGroupedByKeys();if(K.length>0){var Z=K.map((function(t){return t.sharedStackKey})),$=v.select("g.axis."+i+" g.ticks g.tick").html();T.selectAll("g.ticks g.tick").html($),T.selectAll("g.tick text").data(Z).text((function(t){return t.length>h?Xr.truncateLabel(t,l,f):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(Z).text((function(t){return t.length>h?Xr.truncateLabel(t,l,f):t})),T.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),T.selectAll("g.tick text").data(Z)}}this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=sf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=Xr.getProperty(r,"axes",e),o=Xr.getProperty(i,"scaleType"),a=Xr.getProperty(i,"truncation","threshold"),s=(this.scaleType===O.TIME||(i.scaleType,O.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEOVER,{element:Rh(this),datum:t}),o===O.LABELS&&t.length>a&&s.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:Rh(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEMOVE,{element:Rh(this),datum:t}),o===O.LABELS&&t.length>a&&s.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_CLICK,{element:Rh(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEOUT,{element:Rh(this),datum:t}),o===O.LABELS&&s.services.events.dispatchEvent(N.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 Xr.clamp(r,2,Di.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;sf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wp),Qg=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=Xr.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 $g(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=sf.getSVGElementSize(s,{useBBox:!0}),c=u.width,l=u.height;switch(r=i.getTitleRef().empty()?0:sf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,a){case b.TOP:o.top=l+r;break;case b.BOTTOM:o.bottom=l+r;break;case b.LEFT:o.left=c+r;break;case b.RIGHT:o.right=c+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=Xr.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new ig(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}(Wp),Jg=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(),sf.appendOrSelect(this.backdrop,"g.x.grid"),sf.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=Kg(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=Xr.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=Zg(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=Xr.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(Xr.getTranslationValues(t).tx)-Number(Xr.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Xr.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=+Xr.getTranslationValues(s).tx-+Xr.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=sf.getSVGElementSize(u).width-+Xr.getTranslationValues(a).tx}else o=+Xr.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Xr.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Xr.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=sf.appendOrSelect(t,"svg.chart-grid-backdrop");var c=sf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Wp);var tv,ev=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.formatTooltipData=function(t){return t},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=sf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=sf.appendOrSelect(s,"line.ruler-line"),c=i.selectAll("[role=graphics-symbol]"),l=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=l.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(N.Tooltip.MOVE);this.pointsWithinLine=p;var g=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=this.services.cartesianScales.getRangeIdentifier(),m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[v];return null!=e})),y=g.map((function(t){return t.domainValue})),_=c.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Xr.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===o?u.attr("x1",d).attr("x2",f).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=sf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(N.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this;this.backdrop.on("mousemove mouseover",(function(){var e=Nh(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=sf.appendOrSelect(t,"svg.chart-grid-backdrop");var c=sf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e}(Wp),nv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(ev),rv=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 c=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(c).range()[0]}var l=Xr.flipSVGCoordinatesBasedOnOrientation({x0:a,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());sf.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",l.y0).attr("y2",l.y1).attr("x1",l.x0).attr("x2",l.x1)}},e}(Wp),iv=function(){function t(t,e){this.services={domUtils:sf,events:uf,transitions:_d},this.model=new Ol(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(N.Model.UPDATE,(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener(N.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(N.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 og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},n={id:"legend",components:[new Yp(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},r={id:"graph-frame",components:t,growth:{x:A.STRETCH,y:A.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=M.COLUMN;if(i){var a=Xr.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=M.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):"right"===a?(o=M.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):"bottom"===a&&(o=M.COLUMN_REVERSE)}var s={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},u={id:"full-frame",components:[new jg(this.model,this.services,y(i?[n]:[],i?[s]:[],[r]),{direction:o})],growth:{x:A.STRETCH,y:A.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}};c.push(l)}return c.push(u),[new ag(this.model,this.services),new jg(this.model,this.services,c,{direction:M.COLUMN})]},t}(),ov=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Gp,curves:zp}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},n={id:"legend",components:[new Yp(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},r={id:"graph-frame",components:t,growth:{x:A.STRETCH,y:A.FIXED}},i=Xr.getProperty(this.model.getOptions(),"data","loading"),o=!1!==this.model.getOptions().legend.enabled&&!i,a=M.COLUMN;if(o){var s=Xr.getProperty(this.model.getOptions(),"legend","position");s===T.LEFT?(a=M.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):s===T.RIGHT?(a=M.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=S.VERTICAL)):s===T.BOTTOM&&(a=M.COLUMN_REVERSE)}var u={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}},c={id:"full-frame",components:[new jg(this.model,this.services,y(o?[n]:[],o?[u]:[],[r]),{direction:a})],growth:{x:A.STRETCH,y:A.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var h={id:"spacer",components:[new Og(this.model,this.services)],growth:{x:A.PREFERRED,y:A.FIXED}};l.push(h)}return l.push(c),[new sg(this.model,this.services),new jg(this.model,this.services,l,{direction:M.COLUMN})]},e}(iv),av=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Xr.clone(Ai.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new vg(this.model,this.services),new ug(this.model,this.services),new pg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(ov),sv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new cg(this.model,this.services),new vg(this.model,this.services,{stacked:!0}),new mg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(ov),uv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new hg(this.model,this.services),new rv(this.model,this.services),new wg(this.model,this.services,{skeleton:P.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ov),cv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new fg(this.model,this.services),new rv(this.model,this.services),new wg(this.model,this.services,{skeleton:P.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ov),lv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new nv(this.model,this.services),new dg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ov),hv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new gg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.GRID})];return this.getAxisChartComponents(t)},e}(ov),fv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new vg(this.model,this.services),new pg(this.model,this.services,{handleThresholds:!0}),new wg(this.model,this.services,{skeleton:P.GRID})];return this.getAxisChartComponents(t)},e}(ov),dv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services),new Jg(this.model,this.services),new ev(this.model,this.services),new pg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.GRID})];return this.getAxisChartComponents(t)},e}(ov),pv=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}(Ol),gv=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new pv(i.services),r?i:(i.model.setOptions(Xr.mergeDefaultChartOptions(Ai.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new _g(this.model,this.services),new wg(this.model,this.services,{skeleton:P.PIE})];return this.getChartComponents(t)},e}(iv),vv=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new xg(this.model,this.services),new wg(this.model,this.services,{skeleton:P.DONUT})];return this.getChartComponents(t)},e}(gv);function mv(t){var e,n=(_v(t)%(e=360)+e)%e;return yv(n,[0,10])||yv(n,[350,0])?{textAnchor:k.START,dominantBaseline:D.MIDDLE}:yv(n,[10,80])?{textAnchor:k.START,dominantBaseline:D.HANGING}:yv(n,[80,100])?{textAnchor:k.MIDDLE,dominantBaseline:D.HANGING}:yv(n,[100,170])?{textAnchor:k.END,dominantBaseline:D.HANGING}:yv(n,[170,190])?{textAnchor:k.END,dominantBaseline:D.MIDDLE}:yv(n,[190,260])?{textAnchor:k.END,dominantBaseline:D.BASELINE}:yv(n,[260,280])?{textAnchor:k.MIDDLE,dominantBaseline:D.BASELINE}:{textAnchor:k.START,dominantBaseline:D.BASELINE}}function yv(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function _v(t){return t*(180/Math.PI)}function bv(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 xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=sf.appendOrSelect(e.svg,"g.tmp-tick"),r=sf.appendOrSelect(n,"text").text(t),i=sf.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=Xr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Xr.getProperty(n,"data","groupMapsTo"),s=Xr.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 Xr.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=Xr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Xr.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:Xr.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=Xr.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?Xr.getProperty(r,"unselected"):Xr.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=Xr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",Xr.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0),this.svg=this.getContainerSVG();var n=sf.getSVGElementSize(this.parent,{useAttrs:!0}),i=n.width,o=n.height,a=this.model.getData(),s=this.model.getDisplayData(),u=this.model.getGroupedData(),c=this.model.getOptions(),l=Xr.getProperty(c,"radar","axes"),h=l.angle,f=l.value,d=Xr.getProperty(c,"data","groupMapsTo"),p=Xr.getProperty(c,"radar"),g=p.xLabelPadding,v=p.yLabelPadding,m=p.yTicksNumber,y=p.minRange,_=p.xAxisRectHeight,b=p.opacity;this.uniqueKeys=Array.from(new Set(a.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(a.map((function(t){return t[d]})))),this.displayDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),w=(Math.min(i,o)-x)/2;if(!(w<=0)){var O=So().domain(this.displayDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=Ja().domain([0,go(this.displayDataNormalized.map((function(t){return t[f]})))]).range([y,w]).nice(m),T=E.ticks(m),S=function(t){return e.model.getFillColor(t)},M=Pc().angle((function(t){return O(t[h])+Math.PI/2})).radius((function(t){return E(t[f])})).curve(rl),A=Pc().angle(M.angle()).radius((function(t){return tv?tv(t[f]):y})).curve(M.curve()),C={x:go(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=O(t),w*Math.sin(n-Math.PI/2))})))+g,y:o/2},P=sf.appendOrSelect(this.svg,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(T,(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()}))})),sf.appendOrSelect(this.svg,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(ao(T)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return bv(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return bv(-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 bv(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return bv(-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()}))})),sf.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-"+Xr.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return bv(O(t),0,C).x})).attr("y1",(function(t){return bv(O(t),0,C).y})).attr("x2",(function(t){return bv(O(t),0,C).x})).attr("y2",(function(t){return bv(O(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 bv(O(t),E.range()[0],C).x})).attr("y1",(function(t){return bv(O(t),E.range()[0],C).y})).attr("x2",(function(t){return bv(O(t),E.range()[1],C).x})).attr("y2",(function(t){return bv(O(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 bv(O(t),E.range()[0],C).x})).attr("y1",(function(t){return bv(O(t),E.range()[0],C).y})).attr("x2",(function(t){return bv(O(t),E.range()[1],C).x})).attr("y2",(function(t){return bv(O(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()}))})),sf.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 bv(O(t),E.range()[1]+g,C).x})).attr("y",(function(t){return bv(O(t),E.range()[1]+g,C).y})).style("text-anchor",(function(t){return mv(O(t)).textAnchor})).style("dominant-baseline",(function(t){return mv(O(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 bv(O(t),E.range()[1]+g,C).x})).attr("y",(function(t){return bv(O(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()}))})),sf.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()}))})),sf.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 Xr.kebabCase(t[h])})).attr("cx",(function(t){return bv(O(t[h]),E(t[f]),C).x})).attr("cy",(function(t){return bv(O(t[h]),E(t[f]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return S(t[d])})),sf.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("+_v(O(t))+", "+C.x+", "+C.y+")"})),this.addEventListeners(),tv=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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Xr.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){var i=Rh(this);t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEOVER,{element:i,datum:e});var o=t.parent.select(".x-axes .x-axis-"+Xr.kebabCase(e)),a=t.parent.selectAll(".dots circle."+Xr.kebabCase(e));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",r);var s=t.displayDataNormalized.filter((function(t){return t[n]===e})),u=t.model.getOptions(),c=u.data.groupMapsTo,l=Xr.getProperty(u,"radar","axes","value");t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:i,items:s.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[c],value:e[l],color:t.model.getStrokeColor(e[c])}}))})})).on("mousemove",(function(e){var n=Rh(this);t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Radar.X_AXIS_CLICK,{element:Rh(this),datum:e})})).on("mouseout",(function(e){var n=Rh(this),r=t.parent.select(".x-axes .x-axis-"+Xr.kebabCase(e)),i=t.parent.selectAll(".dots circle."+Xr.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.HIDE)}))},e}(Wp),wv=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(Xr.mergeDefaultChartOptions(Ai.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new xv(this.model,this.services)];return this.getChartComponents(t)},e}(iv),Ov=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Xr.mergeDefaultChartOptions(Ai.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new bg(this.model,this.services)];return this.getChartComponents(t)},e}(iv),Ev=eo;t.AreaChart=av,t.BubbleChart=hv,t.DonutChart=vv,t.GaugeChart=Ov,t.GroupedBarChart=cv,t.LineChart=fv,t.PieChart=gv,t.RadarChart=wv,t.ScatterChart=dv,t.SimpleBarChart=uv,t.StackedAreaChart=sv,t.StackedBarChart=lv,t.colorPalettes=no,t.configurations=Ri,t.defaultColors=Ev,t.interfaces=U,Object.defineProperty(t,"__esModule",{value:!0})}));
|