@carbon/charts 0.24.2 → 0.25.0
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
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.25.0](https://github.com/IBM/carbon-charts/compare/v0.24.5...v0.25.0) (2020-01-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.24.5](https://github.com/IBM/carbon-charts/compare/v0.24.4...v0.24.5) (2020-01-10)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **core:** fix to allow chart to toggle on and off using attribute/css properties ([77e26af](https://github.com/IBM/carbon-charts/commit/77e26af))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [0.24.4](https://github.com/IBM/carbon-charts/compare/v0.24.3...v0.24.4) (2020-01-06)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **demos:** add IBM Plex Sans Condensed to the core demo site ([1761a36](https://github.com/IBM/carbon-charts/commit/1761a36))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [0.24.3](https://github.com/IBM/carbon-charts/compare/v0.24.2...v0.24.3) (2019-12-19)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @carbon/charts
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## [0.24.2](https://github.com/IBM/carbon-charts/compare/v0.24.1...v0.24.2) (2019-12-19)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package @carbon/charts
|
package/bundle.js
CHANGED
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
23
23
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
24
24
|
*/
|
|
25
|
-
var Sp,kp,Lp=Array.prototype,Cp=Object.prototype.hasOwnProperty,jp=m?m.iterator:void 0,Dp=Math.max,Pp=Math.min,Rp=function(t){return function(e,n,r){if(null==r){var i=W(n),o=i&&Fn(n),a=o&&o.length&&$u(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(yl);Ht.after=pp.after,Ht.ary=pp.ary,Ht.assign=mp.assign,Ht.assignIn=mp.assignIn,Ht.assignInWith=mp.assignInWith,Ht.assignWith=mp.assignWith,Ht.at=mp.at,Ht.before=pp.before,Ht.bind=pp.bind,Ht.bindAll=wp.bindAll,Ht.bindKey=pp.bindKey,Ht.castArray=dp.castArray,Ht.chain=bp.chain,Ht.chunk=lp.chunk,Ht.compact=lp.compact,Ht.concat=lp.concat,Ht.cond=wp.cond,Ht.conforms=wp.conforms,Ht.constant=wp.constant,Ht.countBy=fp.countBy,Ht.create=mp.create,Ht.curry=pp.curry,Ht.curryRight=pp.curryRight,Ht.debounce=pp.debounce,Ht.defaults=mp.defaults,Ht.defaultsDeep=mp.defaultsDeep,Ht.defer=pp.defer,Ht.delay=pp.delay,Ht.difference=lp.difference,Ht.differenceBy=lp.differenceBy,Ht.differenceWith=lp.differenceWith,Ht.drop=lp.drop,Ht.dropRight=lp.dropRight,Ht.dropRightWhile=lp.dropRightWhile,Ht.dropWhile=lp.dropWhile,Ht.fill=lp.fill,Ht.filter=fp.filter,Ht.flatMap=fp.flatMap,Ht.flatMapDeep=fp.flatMapDeep,Ht.flatMapDepth=fp.flatMapDepth,Ht.flatten=lp.flatten,Ht.flattenDeep=lp.flattenDeep,Ht.flattenDepth=lp.flattenDepth,Ht.flip=pp.flip,Ht.flow=wp.flow,Ht.flowRight=wp.flowRight,Ht.fromPairs=lp.fromPairs,Ht.functions=mp.functions,Ht.functionsIn=mp.functionsIn,Ht.groupBy=fp.groupBy,Ht.initial=lp.initial,Ht.intersection=lp.intersection,Ht.intersectionBy=lp.intersectionBy,Ht.intersectionWith=lp.intersectionWith,Ht.invert=mp.invert,Ht.invertBy=mp.invertBy,Ht.invokeMap=fp.invokeMap,Ht.iteratee=wp.iteratee,Ht.keyBy=fp.keyBy,Ht.keys=Fn,Ht.keysIn=mp.keysIn,Ht.map=fp.map,Ht.mapKeys=mp.mapKeys,Ht.mapValues=mp.mapValues,Ht.matches=wp.matches,Ht.matchesProperty=wp.matchesProperty,Ht.memoize=pp.memoize,Ht.merge=mp.merge,Ht.mergeWith=mp.mergeWith,Ht.method=wp.method,Ht.methodOf=wp.methodOf,Ht.mixin=Rp,Ht.negate=bl,Ht.nthArg=wp.nthArg,Ht.omit=mp.omit,Ht.omitBy=mp.omitBy,Ht.once=pp.once,Ht.orderBy=fp.orderBy,Ht.over=wp.over,Ht.overArgs=pp.overArgs,Ht.overEvery=wp.overEvery,Ht.overSome=wp.overSome,Ht.partial=pp.partial,Ht.partialRight=pp.partialRight,Ht.partition=fp.partition,Ht.pick=mp.pick,Ht.pickBy=mp.pickBy,Ht.property=wp.property,Ht.propertyOf=wp.propertyOf,Ht.pull=lp.pull,Ht.pullAll=lp.pullAll,Ht.pullAllBy=lp.pullAllBy,Ht.pullAllWith=lp.pullAllWith,Ht.pullAt=lp.pullAt,Ht.range=wp.range,Ht.rangeRight=wp.rangeRight,Ht.rearg=pp.rearg,Ht.reject=fp.reject,Ht.remove=lp.remove,Ht.rest=pp.rest,Ht.reverse=lp.reverse,Ht.sampleSize=fp.sampleSize,Ht.set=mp.set,Ht.setWith=mp.setWith,Ht.shuffle=fp.shuffle,Ht.slice=lp.slice,Ht.sortBy=fp.sortBy,Ht.sortedUniq=lp.sortedUniq,Ht.sortedUniqBy=lp.sortedUniqBy,Ht.split=xp.split,Ht.spread=pp.spread,Ht.tail=lp.tail,Ht.take=lp.take,Ht.takeRight=lp.takeRight,Ht.takeRightWhile=lp.takeRightWhile,Ht.takeWhile=lp.takeWhile,Ht.tap=bp.tap,Ht.throttle=pp.throttle,Ht.thru=Eh,Ht.toArray=dp.toArray,Ht.toPairs=mp.toPairs,Ht.toPairsIn=mp.toPairsIn,Ht.toPath=wp.toPath,Ht.toPlainObject=dp.toPlainObject,Ht.transform=mp.transform,Ht.unary=pp.unary,Ht.union=lp.union,Ht.unionBy=lp.unionBy,Ht.unionWith=lp.unionWith,Ht.uniq=lp.uniq,Ht.uniqBy=lp.uniqBy,Ht.uniqWith=lp.uniqWith,Ht.unset=mp.unset,Ht.unzip=lp.unzip,Ht.unzipWith=lp.unzipWith,Ht.update=mp.update,Ht.updateWith=mp.updateWith,Ht.values=mp.values,Ht.valuesIn=mp.valuesIn,Ht.without=lp.without,Ht.words=xp.words,Ht.wrap=pp.wrap,Ht.xor=lp.xor,Ht.xorBy=lp.xorBy,Ht.xorWith=lp.xorWith,Ht.zip=lp.zip,Ht.zipObject=lp.zipObject,Ht.zipObjectDeep=lp.zipObjectDeep,Ht.zipWith=lp.zipWith,Ht.entries=mp.toPairs,Ht.entriesIn=mp.toPairsIn,Ht.extend=mp.assignIn,Ht.extendWith=mp.assignInWith,Rp(Ht,Ht),Ht.add=vp.add,Ht.attempt=wp.attempt,Ht.camelCase=xp.camelCase,Ht.capitalize=xp.capitalize,Ht.ceil=vp.ceil,Ht.clamp=gp,Ht.clone=dp.clone,Ht.cloneDeep=dp.cloneDeep,Ht.cloneDeepWith=dp.cloneDeepWith,Ht.cloneWith=dp.cloneWith,Ht.conformsTo=dp.conformsTo,Ht.deburr=xp.deburr,Ht.defaultTo=wp.defaultTo,Ht.divide=vp.divide,Ht.endsWith=xp.endsWith,Ht.eq=dp.eq,Ht.escape=xp.escape,Ht.escapeRegExp=xp.escapeRegExp,Ht.every=fp.every,Ht.find=fp.find,Ht.findIndex=lp.findIndex,Ht.findKey=mp.findKey,Ht.findLast=fp.findLast,Ht.findLastIndex=lp.findLastIndex,Ht.findLastKey=mp.findLastKey,Ht.floor=vp.floor,Ht.forEach=fp.forEach,Ht.forEachRight=fp.forEachRight,Ht.forIn=mp.forIn,Ht.forInRight=mp.forInRight,Ht.forOwn=mp.forOwn,Ht.forOwnRight=mp.forOwnRight,Ht.get=mp.get,Ht.gt=dp.gt,Ht.gte=dp.gte,Ht.has=mp.has,Ht.hasIn=mp.hasIn,Ht.head=lp.head,Ht.identity=et,Ht.includes=fp.includes,Ht.indexOf=lp.indexOf,Ht.inRange=yp,Ht.invoke=mp.invoke,Ht.isArguments=dp.isArguments,Ht.isArray=R,Ht.isArrayBuffer=dp.isArrayBuffer,Ht.isArrayLike=dp.isArrayLike,Ht.isArrayLikeObject=dp.isArrayLikeObject,Ht.isBoolean=dp.isBoolean,Ht.isBuffer=dp.isBuffer,Ht.isDate=dp.isDate,Ht.isElement=dp.isElement,Ht.isEmpty=dp.isEmpty,Ht.isEqual=dp.isEqual,Ht.isEqualWith=dp.isEqualWith,Ht.isError=dp.isError,Ht.isFinite=dp.isFinite,Ht.isFunction=dp.isFunction,Ht.isInteger=dp.isInteger,Ht.isLength=dp.isLength,Ht.isMap=dp.isMap,Ht.isMatch=dp.isMatch,Ht.isMatchWith=dp.isMatchWith,Ht.isNaN=dp.isNaN,Ht.isNative=dp.isNative,Ht.isNil=dp.isNil,Ht.isNull=dp.isNull,Ht.isNumber=dp.isNumber,Ht.isObject=W,Ht.isObjectLike=dp.isObjectLike,Ht.isPlainObject=dp.isPlainObject,Ht.isRegExp=dp.isRegExp,Ht.isSafeInteger=dp.isSafeInteger,Ht.isSet=dp.isSet,Ht.isString=dp.isString,Ht.isSymbol=dp.isSymbol,Ht.isTypedArray=dp.isTypedArray,Ht.isUndefined=dp.isUndefined,Ht.isWeakMap=dp.isWeakMap,Ht.isWeakSet=dp.isWeakSet,Ht.join=lp.join,Ht.kebabCase=xp.kebabCase,Ht.last=Ks,Ht.lastIndexOf=lp.lastIndexOf,Ht.lowerCase=xp.lowerCase,Ht.lowerFirst=xp.lowerFirst,Ht.lt=dp.lt,Ht.lte=dp.lte,Ht.max=vp.max,Ht.maxBy=vp.maxBy,Ht.mean=vp.mean,Ht.meanBy=vp.meanBy,Ht.min=vp.min,Ht.minBy=vp.minBy,Ht.stubArray=wp.stubArray,Ht.stubFalse=wp.stubFalse,Ht.stubObject=wp.stubObject,Ht.stubString=wp.stubString,Ht.stubTrue=wp.stubTrue,Ht.multiply=vp.multiply,Ht.nth=lp.nth,Ht.noop=wp.noop,Ht.now=hp.now,Ht.pad=xp.pad,Ht.padEnd=xp.padEnd,Ht.padStart=xp.padStart,Ht.parseInt=xp.parseInt,Ht.random=_p,Ht.reduce=fp.reduce,Ht.reduceRight=fp.reduceRight,Ht.repeat=xp.repeat,Ht.replace=xp.replace,Ht.result=mp.result,Ht.round=vp.round,Ht.sample=fp.sample,Ht.size=fp.size,Ht.snakeCase=xp.snakeCase,Ht.some=fp.some,Ht.sortedIndex=lp.sortedIndex,Ht.sortedIndexBy=lp.sortedIndexBy,Ht.sortedIndexOf=lp.sortedIndexOf,Ht.sortedLastIndex=lp.sortedLastIndex,Ht.sortedLastIndexBy=lp.sortedLastIndexBy,Ht.sortedLastIndexOf=lp.sortedLastIndexOf,Ht.startCase=xp.startCase,Ht.startsWith=xp.startsWith,Ht.subtract=vp.subtract,Ht.sum=vp.sum,Ht.sumBy=vp.sumBy,Ht.template=xp.template,Ht.times=wp.times,Ht.toFinite=dp.toFinite,Ht.toInteger=Q,Ht.toLength=dp.toLength,Ht.toLower=xp.toLower,Ht.toNumber=dp.toNumber,Ht.toSafeInteger=dp.toSafeInteger,Ht.toString=dp.toString,Ht.toUpper=xp.toUpper,Ht.trim=xp.trim,Ht.trimEnd=xp.trimEnd,Ht.trimStart=xp.trimStart,Ht.truncate=xp.truncate,Ht.unescape=xp.unescape,Ht.uniqueId=wp.uniqueId,Ht.upperCase=xp.upperCase,Ht.upperFirst=xp.upperFirst,Ht.each=fp.forEach,Ht.eachRight=fp.forEachRight,Ht.first=lp.head,Rp(Ht,(Sp={},gs(Ht,(function(t,e){Cp.call(Ht.prototype,e)||(Sp[e]=t)})),Sp),{chain:!1}),Ht.VERSION="4.17.15",(Ht.templateSettings=xp.templateSettings).imports._=Ht,re(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Ht[t].placeholder=Ht})),re(["drop","take"],(function(t,e){Pt.prototype[t]=function(n){n=void 0===n?1:Dp(Q(n),0);var r=this.__filtered__&&!e?new Pt(this):this.clone();return r.__filtered__?r.__takeCount__=Pp(n,r.__takeCount__):r.__views__.push({size:Pp(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Pt.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),re(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Pt.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:cs(t),type:n}),e.__filtered__=e.__filtered__||r,e}})),re(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Pt.prototype[t]=function(){return this[n](1).value()[0]}})),re(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Pt.prototype[t]=function(){return this.__filtered__?new Pt(this):this[n](1)}})),Pt.prototype.compact=function(){return this.filter(et)},Pt.prototype.find=function(t){return this.filter(t).head()},Pt.prototype.findLast=function(t){return this.reverse().find(t)},Pt.prototype.invokeMap=on((function(t,e){return"function"==typeof t?new Pt(this):this.map((function(n){return Mc(n,t,e)}))})),Pt.prototype.reject=function(t){return this.filter(bl(cs(t)))},Pt.prototype.slice=function(t,e){t=Q(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Pt(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=Q(e))<0?n.dropRight(-e):n.take(e-t)),n)},Pt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Pt.prototype.toArray=function(){return this.take(4294967295)},gs(Pt.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Ht[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Ht.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,s=e instanceof Pt,u=a[0],c=s||R(e),l=function(t){var e=i.apply(Ht,wr([t],a));return r&&f?e[0]:e};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,h=!!this.__actions__.length,p=o&&!f,d=s&&!h;if(!o&&c){e=d?e:new Pt(this);var v=t.apply(e,a);return v.__actions__.push({func:Eh,args:[l],thisArg:void 0}),new zt(v,f)}return p&&d?t.apply(this,a):(v=this.thru(l),p?r?v.value()[0]:v.value():v)})})),re(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Lp[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Ht.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(R(i)?i:[],t)}return this[n]((function(n){return e.apply(R(n)?n:[],t)}))}})),gs(Pt.prototype,(function(t,e){var n=Ht[e];if(n){var r=n.name+"";Cp.call(Nt,r)||(Nt[r]=[]),Nt[r].push({name:e,func:n})}})),Nt[Le(void 0,2).name]=[{name:"wrapper",func:void 0}],Pt.prototype.clone=function(){var t=new Pt(this.__wrapped__);return t.__actions__=Gt(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Gt(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Gt(this.__views__),t},Pt.prototype.reverse=function(){if(this.__filtered__){var t=new Pt(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Pt.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=R(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Ep(e,t+a);break;case"takeRight":t=Op(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,p=Ap(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return Sh(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var v=-1,g=t[c+=e];++v<f;){var y=l[v],_=y.iteratee,m=y.type,b=_(g);if(m==Mp)g=b;else if(!b){if(m==Tp)continue t;break t}}d[h++]=g}return d},Ht.prototype.at=bp.at,Ht.prototype.chain=bp.wrapperChain,Ht.prototype.commit=bp.commit,Ht.prototype.next=bp.next,Ht.prototype.plant=bp.plant,Ht.prototype.reverse=bp.reverse,Ht.prototype.toJSON=Ht.prototype.valueOf=Ht.prototype.value=bp.value,Ht.prototype.first=Ht.prototype.head,jp&&(Ht.prototype[jp]=bp.toIterator),function(t){t.debounce=Cs,t.clone=fa,t.merge=dl,t.removeArrayDuplicates=qh,t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n<1?n.toPrecision(1):Math.floor(n)},t.arrayDifferences=function(t,e){var n={missing:[],added:[]};return t.forEach((function(t){-1===e.indexOf(t)&&n.missing.push(t)})),e.forEach((function(e){-1===t.indexOf(e)&&n.added.push(e)})),n},t.getDuplicateValues=function(t){var e=[],n=[];return t.forEach((function(t){-1!==e.indexOf(t)&&-1===n.indexOf(t)&&n.push(t),e.push(t)})),n},t.moveToFront=function(t){return t.each((function(){this.parentNode.appendChild(this)}))},t.getProperty=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(!r[a])return null;r=r[a]}return r}return null}}(kp||(kp={}));var Ip={position:u.BOTTOM,clickable:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Np={x:{numberOfTicks:5},y:{numberOfTicks:5}},Bp={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},Fp=kp.merge({},Bp,{gridline:{enabled:!0,threshold:.25}}),zp=kp.merge({},Fp,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),Gp={addSpaceOnEdges:!0},Wp={width:"100%",height:"100%",resizable:!0,theme:n.DEFAULT,tooltip:Bp,legend:Ip,style:{prefix:"cc"}},Vp=kp.merge({},Wp,{axes:{},timeScale:Gp,grid:Np,tooltip:Fp}),Hp=kp.merge({},Vp,{bars:{maxWidth:16},timeScale:kp.merge(Gp,{addSpaceOnEdges:!0}),tooltip:zp}),Up=kp.merge({},Hp,{}),Yp=kp.merge({},Hp,{}),Xp=kp.merge({},Hp,{bars:kp.merge({},Hp.bars,{dividerSize:1.5})}),qp=kp.merge({},Vp,{points:{radius:3,filled:!1}}),$p=kp.merge({},Vp,{points:{radius:4,fillOpacity:.3,filled:!0}}),Zp=kp.merge({},Wp,{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}}}),Kp={chart:Wp,axisChart:Vp,simpleBarChart:Up,groupedBarChart:Yp,stackedBarChart:Xp,lineChart:qp,scatterChart:$p,pieChart:Zp,donutChart:kp.merge({},Zp,{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()}}}})},Jp={opacity:{unselected:.3,selected:1}},Qp={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}},td={ticks:{number:7,rotateIfSmallerThan:30}},ed={default:{size:24}},nd=Object.freeze({__proto__:null,legend:Ip,grid:Np,baseTooltip:Bp,axisChartTooltip:Fp,barChartTooltip:zp,options:Kp,lines:Jp,transitions:Qp,axis:td,spacers:ed});var rd=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},r={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},i={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},o={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},a={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},s={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},u={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},c={10:"#f2f4f8",20:"#d5d9e0",30:"#b9bfc7",40:"#9fa5ad",50:"#868d95",60:"#697077",70:"#50565b",80:"#373d42",90:"#242a2e",100:"#13171a"},l={10:"#f3f3f3",20:"#dcdcdc",30:"#bebebe",40:"#a4a4a4",50:"#8c8c8c",60:"#6f6f6f",70:"#565656",80:"#3d3d3d",90:"#282828",100:"#171717"},f={10:"#f7f3f1",20:"#e0dbda",30:"#c1bcbb",40:"#a7a2a2",50:"#8f8b8b",60:"#726e6e",70:"#595555",80:"#403c3c",90:"#2b2828",100:"#1a1717"},h={black:{100:"#000000"},blue:o,coolGray:c,cyan:a,gray:l,green:u,magenta:r,orange:{40:"#fc7b1e"},purple:i,red:n,teal:s,warmGray:f,white:{0:"#ffffff"},yellow:{20:"#fdd13a"}};e.black="#000000",e.black100="#000000",e.white="#ffffff",e.white0="#ffffff",e.yellow="#fdd13a",e.yellow20="#fdd13a",e.orange="#fc7b1e",e.orange40="#fc7b1e",e.red10="#fff0f1",e.red20="#fcd0d3",e.red30="#ffa4a9",e.red40="#ff767c",e.red50="#fb4b53",e.red60="#da1e28",e.red70="#a51920",e.red80="#750e13",e.red90="#570408",e.red100="#2c080a",e.red=n,e.magenta10="#fff0f6",e.magenta20="#ffcfe1",e.magenta30="#ffa0c2",e.magenta40="#fa75a6",e.magenta50="#ee538b",e.magenta60="#d12765",e.magenta70="#a11950",e.magenta80="#760a3a",e.magenta90="#57002b",e.magenta100="#2a0a16",e.magenta=r,e.purple10="#f7f1ff",e.purple20="#e6d6ff",e.purple30="#d0b0ff",e.purple40="#bb8eff",e.purple50="#a66efa",e.purple60="#8a3ffc",e.purple70="#6e32c9",e.purple80="#4f2196",e.purple90="#38146b",e.purple100="#1e1033",e.purple=i,e.blue10="#edf4ff",e.blue20="#c9deff",e.blue30="#97c1ff",e.blue40="#6ea6ff",e.blue50="#408bfc",e.blue60="#0062ff",e.blue70="#054ada",e.blue80="#0530ad",e.blue90="#061f80",e.blue100="#051243",e.blue=o,e.cyan10="#e3f6ff",e.cyan20="#b3e6ff",e.cyan30="#6ccaff",e.cyan40="#30b0ff",e.cyan50="#1191e6",e.cyan60="#0072c3",e.cyan70="#0058a1",e.cyan80="#003d73",e.cyan90="#002b50",e.cyan100="#07192b",e.cyan=a,e.teal10="#dbfbfb",e.teal20="#92eeee",e.teal30="#20d5d2",e.teal40="#00bab6",e.teal50="#009c98",e.teal60="#007d79",e.teal70="#006161",e.teal80="#004548",e.teal90="#003137",e.teal100="#081a1c",e.teal=s,e.green10="#dafbe4",e.green20="#9deeb2",e.green30="#56d679",e.green40="#3dbb61",e.green50="#24a148",e.green60="#198038",e.green70="#10642a",e.green80="#054719",e.green90="#01330f",e.green100="#081b09",e.green=u,e.coolGray10="#f2f4f8",e.coolGray20="#d5d9e0",e.coolGray30="#b9bfc7",e.coolGray40="#9fa5ad",e.coolGray50="#868d95",e.coolGray60="#697077",e.coolGray70="#50565b",e.coolGray80="#373d42",e.coolGray90="#242a2e",e.coolGray100="#13171a",e.coolGray=c,e.gray10="#f3f3f3",e.gray20="#dcdcdc",e.gray30="#bebebe",e.gray40="#a4a4a4",e.gray50="#8c8c8c",e.gray60="#6f6f6f",e.gray70="#565656",e.gray80="#3d3d3d",e.gray90="#282828",e.gray100="#171717",e.gray=l,e.warmGray10="#f7f3f1",e.warmGray20="#e0dbda",e.warmGray30="#c1bcbb",e.warmGray40="#a7a2a2",e.warmGray50="#8f8b8b",e.warmGray60="#726e6e",e.warmGray70="#595555",e.warmGray80="#403c3c",e.warmGray90="#2b2828",e.warmGray100="#1a1717",e.warmGray=f,e.colors=h,e.rgba=function(t,e){var n=[t.substring(1,3),t.substring(3,5),t.substring(5,7)].map((function(t){return parseInt(t,16)}));return"rgba(".concat(n[0],", ").concat(n[1],", ").concat(n[2],", ").concat(e,")")}}));!function(t){t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")&&t.default}(rd);rd.black,rd.black100,rd.white,rd.white0,rd.yellow,rd.yellow20,rd.orange,rd.orange40,rd.red10,rd.red20,rd.red30,rd.red40,rd.red50,rd.red60,rd.red70,rd.red80,rd.red90,rd.red100;var id=rd.red,od=(rd.magenta10,rd.magenta20,rd.magenta30,rd.magenta40,rd.magenta50,rd.magenta60,rd.magenta70,rd.magenta80,rd.magenta90,rd.magenta100,rd.magenta),ad=(rd.purple10,rd.purple20,rd.purple30,rd.purple40,rd.purple50,rd.purple60,rd.purple70,rd.purple80,rd.purple90,rd.purple100,rd.purple),sd=(rd.blue10,rd.blue20,rd.blue30,rd.blue40,rd.blue50,rd.blue60,rd.blue70,rd.blue80,rd.blue90,rd.blue100,rd.blue),ud=(rd.cyan10,rd.cyan20,rd.cyan30,rd.cyan40,rd.cyan50,rd.cyan60,rd.cyan70,rd.cyan80,rd.cyan90,rd.cyan100,rd.cyan),cd=(rd.teal10,rd.teal20,rd.teal30,rd.teal40,rd.teal50,rd.teal60,rd.teal70,rd.teal80,rd.teal90,rd.teal100,rd.teal),ld=(rd.green10,rd.green20,rd.green30,rd.green40,rd.green50,rd.green60,rd.green70,rd.green80,rd.green90,rd.green100,rd.green),fd=(rd.coolGray10,rd.coolGray20,rd.coolGray30,rd.coolGray40,rd.coolGray50,rd.coolGray60,rd.coolGray70,rd.coolGray80,rd.coolGray90,rd.coolGray100,rd.coolGray,rd.gray10,rd.gray20,rd.gray30,rd.gray40,rd.gray50,rd.gray60,rd.gray70,rd.gray80,rd.gray90,rd.gray100,rd.gray,rd.warmGray10,rd.warmGray20,rd.warmGray30,rd.warmGray40,rd.warmGray50,rd.warmGray60,rd.warmGray70,rd.warmGray80,rd.warmGray90,rd.warmGray100,rd.warmGray,rd.colors,rd.rgba,function(t,e){return t[e]}),hd=function(t){return fd(sd,t)},pd=function(t){return fd(ud,t)},dd=function(t){return fd(ld,t)},vd=function(t){return fd(od,t)},gd=function(t){return fd(ad,t)},yd=function(t){return fd(id,t)},_d=function(t){return fd(cd,t)},md=[gd(70),pd(50),_d(70),vd(70),yd(50),yd(90),dd(60),hd(80),vd(50),"#b28600",_d(50),pd(90),"#8a3800",gd(50)],bd=[gd(60),pd(40),_d(60),vd(40),yd(50),yd(10),dd(30),hd(50),vd(60),"#d2a106",_d(40),pd(20),"#ba4e00",gd(30)],xd=md,wd=bd,Od=bd,Ed=md,Td=Object.freeze({__proto__:null,WHITE:md,DARK:bd,G10:xd,G90:wd,G100:Od,DEFAULT:Ed});function Md(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ad(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Md(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 Sd=Ad(Md).right;function kd(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]}var Ld=Math.sqrt(50),Cd=Math.sqrt(10),jd=Math.sqrt(2);function Dd(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=Pd(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 Pd(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>=Ld?10:o>=Cd?5:o>=jd?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Ld?10:o>=Cd?5:o>=jd?2:1)}function Rd(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>=Ld?i*=10:o>=Cd?i*=5:o>=jd&&(i*=2),e<t?-i:i}function Id(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Nd(){}function Bd(t,e){var n=new Nd;if(t instanceof Nd)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 Fd(){}Nd.prototype=Bd.prototype={constructor:Nd,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 zd=Bd.prototype;Fd.prototype=function(t,e){var n=new Fd;if(t instanceof Fd)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:Fd,has:zd.has,add:function(t){return this["$"+(t+="")]=t,this},remove:zd.remove,clear:zd.clear,values:zd.keys,size:zd.size,empty:zd.empty,each:zd.each};var Gd=Array.prototype,Wd=Gd.map,Vd=Gd.slice,Hd={name:"implicit"};function Ud(){var t=Bd(),e=[],n=[],r=Hd;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Hd)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=Bd();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=Vd.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ud(e,n).unknown(r)},Id.apply(i,arguments),i}function Yd(){var t,e,n=Ud().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],f=o[l-0],h=o[1-l];t=(h-f)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),f+=(h-f-t*(n-s))*c,e=t*(1-s),a&&(f=Math.round(f),e=Math.round(e));var p=function(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}(n).map((function(e){return f+t*e}));return i(l?p.reverse():p)}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 Yd(r(),o).round(a).paddingInner(s).paddingOuter(u).align(c)},Id.apply(l(),arguments)}function Xd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function qd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $d(){}var Zd="\\s*([+-]?\\d+)\\s*",Kd="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jd="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qd=/^#([0-9a-f]{3,8})$/,tv=new RegExp("^rgb\\("+[Zd,Zd,Zd]+"\\)$"),ev=new RegExp("^rgb\\("+[Jd,Jd,Jd]+"\\)$"),nv=new RegExp("^rgba\\("+[Zd,Zd,Zd,Kd]+"\\)$"),rv=new RegExp("^rgba\\("+[Jd,Jd,Jd,Kd]+"\\)$"),iv=new RegExp("^hsl\\("+[Kd,Jd,Jd]+"\\)$"),ov=new RegExp("^hsla\\("+[Kd,Jd,Jd,Kd]+"\\)$"),av={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 sv(){return this.rgb().formatHex()}function uv(){return this.rgb().formatRgb()}function cv(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Qd.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?lv(e):3===n?new pv(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new pv(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new pv(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=tv.exec(t))?new pv(e[1],e[2],e[3],1):(e=ev.exec(t))?new pv(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=nv.exec(t))?fv(e[1],e[2],e[3],e[4]):(e=rv.exec(t))?fv(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=iv.exec(t))?yv(e[1],e[2]/100,e[3]/100,1):(e=ov.exec(t))?yv(e[1],e[2]/100,e[3]/100,e[4]):av.hasOwnProperty(t)?lv(av[t]):"transparent"===t?new pv(NaN,NaN,NaN,0):null}function lv(t){return new pv(t>>16&255,t>>8&255,255&t,1)}function fv(t,e,n,r){return r<=0&&(t=e=n=NaN),new pv(t,e,n,r)}function hv(t,e,n,r){return 1===arguments.length?((i=t)instanceof $d||(i=cv(i)),i?new pv((i=i.rgb()).r,i.g,i.b,i.opacity):new pv):new pv(t,e,n,null==r?1:r);var i}function pv(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function dv(){return"#"+gv(this.r)+gv(this.g)+gv(this.b)}function vv(){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 gv(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function yv(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new mv(t,e,n,r)}function _v(t){if(t instanceof mv)return new mv(t.h,t.s,t.l,t.opacity);if(t instanceof $d||(t=cv(t)),!t)return new mv;if(t instanceof mv)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 mv(a,s,u,t.opacity)}function mv(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function bv(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 xv(t){return function(){return t}}function wv(t){return 1==(t=+t)?Ov: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):xv(isNaN(e)?n:e)}}function Ov(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):xv(isNaN(t)?e:t)}Xd($d,cv,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:sv,formatHex:sv,formatHsl:function(){return _v(this).formatHsl()},formatRgb:uv,toString:uv}),Xd(pv,hv,qd($d,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new pv(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new pv(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:dv,formatHex:dv,formatRgb:vv,toString:vv})),Xd(mv,(function(t,e,n,r){return 1===arguments.length?_v(t):new mv(t,e,n,null==r?1:r)}),qd($d,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new mv(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new mv(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 pv(bv(t>=240?t-240:t+120,i,r),bv(t,i,r),bv(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 Ev=function t(e){var n=wv(e);function r(t,e){var r=n((t=hv(t)).r,(e=hv(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Ov(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 Tv(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]=jv(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 Mv(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}}function Av(t,e){return e-=t=+t,function(n){return t+e*n}}function Sv(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]=jv(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var kv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Lv=new RegExp(kv.source,"g");function Cv(t,e){var n,r,i,o=kv.lastIndex=Lv.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=kv.exec(t))&&(r=Lv.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:Av(n,r)})),o=Lv.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 jv(t,e){var n,r=typeof e;return null==e||"boolean"===r?xv(e):("number"===r?Av:"string"===r?(n=cv(e))?(e=n,Ev):Cv:e instanceof cv?Ev:e instanceof Date?Mv:Array.isArray(e)?Tv:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Sv:Av)(t,e)}function Dv(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}}var Pv,Rv,Iv,Nv,Bv=180/Math.PI,Fv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zv(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)*Bv,skewX:Math.atan(u)*Bv,scaleX:a,scaleY:s}}function Gv(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:Av(t,i)},{i:u-2,x:Av(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:Av(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:Av(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:Av(t,n)},{i:s-2,x:Av(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 Wv=Gv((function(t){return"none"===t?Fv:(Pv||(Pv=document.createElement("DIV"),Rv=document.documentElement,Iv=document.defaultView),Pv.style.transform=t,t=Iv.getComputedStyle(Rv.appendChild(Pv),null).getPropertyValue("transform"),Rv.removeChild(Pv),zv(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Vv=Gv((function(t){return null==t?Fv:(Nv||(Nv=document.createElementNS("http://www.w3.org/2000/svg","g")),Nv.setAttribute("transform",t),(t=Nv.transform.baseVal.consolidate())?zv((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Fv)}),", ",")",")");function Hv(t){return+t}var Uv=[0,1];function Yv(t){return t}function Xv(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function qv(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 $v(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Xv(i,r),o=n(a,o)):(r=Xv(r,i),o=n(o,a)),function(t){return o(r(t))}}function Zv(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]=Xv(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Sd(t,e,1,r)-1;return o[n](i[n](e))}}function Kv(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Jv(){var t,e,n,r,i,o,a=Uv,s=Uv,u=jv,c=Yv;function l(){return r=Math.min(a.length,s.length)>2?Zv:$v,i=o=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return f.invert=function(n){return c(e((o||(o=r(s,a.map(t),Av)))(n)))},f.domain=function(t){return arguments.length?(a=Wd.call(t,Hv),c===Yv||(c=qv(a)),l()):a.slice()},f.range=function(t){return arguments.length?(s=Vd.call(t),l()):s.slice()},f.rangeRound=function(t){return s=Vd.call(t),u=Dv,l()},f.clamp=function(t){return arguments.length?(c=t?qv(a):Yv,f):c!==Yv},f.interpolate=function(t){return arguments.length?(u=t,l()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,l()}}function Qv(t,e){return Jv()(t,e)}function tg(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 eg(t){return(t=tg(Math.abs(t)))?t[1]:NaN}var ng,rg=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ig(t){if(!(e=rg.exec(t)))throw new Error("invalid format: "+t);var e;return new og({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 og(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 ag(t,e){var n=tg(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")}ig.prototype=og.prototype,og.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 sg={"%":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 ag(100*t,e)},r:ag,s:function(t,e){var n=tg(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ng=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")+tg(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 ug(t){return t}var cg,lg,fg,hg=Array.prototype.map,pg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dg(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ug:(e=hg.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?ug:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(hg.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 f(t){var e=(t=ig(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,v=t.comma,g=t.precision,y=t.trim,_=t.type;"n"===_?(v=!0,_="g"):sg[_]||(void 0===g&&(g=12),y=!0,_="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",b="$"===h?o:/[%p]/.test(_)?u:"",x=sg[_],w=/[defgprs%]/.test(_);function O(t){var i,o,u,h=m,O=b;if("c"===_)O=x(t)+O,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:c:"-"===f||"("===f?"":f)+h,O=("s"===_?pg[8+ng/3]:"")+O+(E&&"("===f?")":""),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}}v&&!p&&(t=r(t,1/0));var T=h.length+t.length+O.length,M=T<d?new Array(d-T+1).join(e):"";switch(v&&p&&(t=r(M+t,M.length?d-O.length:1/0),M=""),n){case"<":t=h+t+O+M;break;case"=":t=h+M+t+O;break;case"^":t=M.slice(0,T=M.length>>1)+h+t+O+M.slice(T);break;default:t=M+h+t+O}return s(t)}return g=void 0===g?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),O.toString=function(){return t+""},O}return{format:f,formatPrefix:function(t,e){var n=f(((t=ig(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(eg(e)/3))),i=Math.pow(10,-r),o=pg[8+r/3];return function(t){return n(i*t)+o}}}}function vg(t,e,n,r){var i,o=Rd(t,e,n);switch((r=ig(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(eg(e)/3)))-eg(Math.abs(t)))}(o,a))||(r.precision=i),fg(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,eg(e)-eg(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,-eg(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return lg(r)}function gg(){var t=Qv(Yv,Yv);return t.copy=function(){return Kv(t,gg())},Id.apply(t,arguments),function(t){var e=t.domain;return t.ticks=function(t){var n=e();return Dd(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return vg(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=Pd(s,u,n))>0?r=Pd(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Pd(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}(t)}function yg(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 _g(t){return Math.log(t)}function mg(t){return Math.exp(t)}function bg(t){return-Math.log(-t)}function xg(t){return-Math.exp(-t)}function wg(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Og(t){return function(e){return-t(-e)}}function Eg(t){var e,n,r=t(_g,mg),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?wg:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Og(e),n=Og(n),t(bg,xg)):t(_g,mg),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)&&(h=s,s=u,u=h);var c,l,f,h=e(s),p=e(u),d=null==t?10:+t,v=[];if(!(o%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,s>0){for(;h<p;++h)for(l=1,c=n(h);l<o;++l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else for(;h<p;++h)for(l=o-1,c=n(h);l>=1;--l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else v=Dd(h,p,Math.min(p-h,d)).map(n);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=lg(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(yg(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}cg=dg({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),lg=cg.format,fg=cg.formatPrefix;var Tg=new Date,Mg=new Date;function Ag(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 Ag((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 Tg.setTime(+e),Mg.setTime(+r),t(Tg),t(Mg),Math.floor(n(Tg,Mg))},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 Sg=Ag((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Sg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ag((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Sg:null};var kg=6e4,Lg=6048e5,Cg=Ag((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()})),jg=Ag((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*kg)}),(function(t,e){return(e-t)/kg}),(function(t){return t.getMinutes()})),Dg=Ag((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*kg)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),Pg=Ag((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*kg)/864e5}),(function(t){return t.getDate()-1}));function Rg(t){return Ag((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-(e.getTimezoneOffset()-t.getTimezoneOffset())*kg)/Lg}))}var Ig=Rg(0),Ng=Rg(1),Bg=(Rg(2),Rg(3),Rg(4)),Fg=(Rg(5),Rg(6),Ag((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()}))),zg=Ag((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()}));zg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ag((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 Gg=Ag((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 Wg(t){return Ag((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)/Lg}))}var Vg=Wg(0),Hg=Wg(1),Ug=(Wg(2),Wg(3),Wg(4)),Yg=(Wg(5),Wg(6),Ag((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 Xg(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 qg(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 $g(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}Yg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ag((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 Zg,Kg,Jg,Qg,ty={"-":"",_:" ",0:"0"},ey=/^\s*\d+/,ny=/^%/,ry=/[\\^$*+?|[\]().{}]/g;function iy(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 oy(t){return t.replace(ry,"\\$&")}function ay(t){return new RegExp("^(?:"+t.map(oy).join("|")+")","i")}function sy(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function uy(t,e,n){var r=ey.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function cy(t,e,n){var r=ey.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function ly(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function fy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function hy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function py(t,e,n){var r=ey.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function dy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function vy(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 gy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function yy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function _y(t,e,n){var r=ey.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function my(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function by(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function xy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function wy(t,e,n){var r=ey.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Oy(t,e,n){var r=ey.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ey(t,e,n){var r=ny.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ty(t,e,n){var r=ey.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function My(t,e,n){var r=ey.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function Ay(t,e){return iy(t.getDate(),e,2)}function Sy(t,e){return iy(t.getHours(),e,2)}function ky(t,e){return iy(t.getHours()%12||12,e,2)}function Ly(t,e){return iy(1+Pg.count(zg(t),t),e,3)}function Cy(t,e){return iy(t.getMilliseconds(),e,3)}function jy(t,e){return Cy(t,e)+"000"}function Dy(t,e){return iy(t.getMonth()+1,e,2)}function Py(t,e){return iy(t.getMinutes(),e,2)}function Ry(t,e){return iy(t.getSeconds(),e,2)}function Iy(t){var e=t.getDay();return 0===e?7:e}function Ny(t,e){return iy(Ig.count(zg(t),t),e,2)}function By(t,e){var n=t.getDay();return t=n>=4||0===n?Bg(t):Bg.ceil(t),iy(Bg.count(zg(t),t)+(4===zg(t).getDay()),e,2)}function Fy(t){return t.getDay()}function zy(t,e){return iy(Ng.count(zg(t),t),e,2)}function Gy(t,e){return iy(t.getFullYear()%100,e,2)}function Wy(t,e){return iy(t.getFullYear()%1e4,e,4)}function Vy(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+iy(e/60|0,"0",2)+iy(e%60,"0",2)}function Hy(t,e){return iy(t.getUTCDate(),e,2)}function Uy(t,e){return iy(t.getUTCHours(),e,2)}function Yy(t,e){return iy(t.getUTCHours()%12||12,e,2)}function Xy(t,e){return iy(1+Gg.count(Yg(t),t),e,3)}function qy(t,e){return iy(t.getUTCMilliseconds(),e,3)}function $y(t,e){return qy(t,e)+"000"}function Zy(t,e){return iy(t.getUTCMonth()+1,e,2)}function Ky(t,e){return iy(t.getUTCMinutes(),e,2)}function Jy(t,e){return iy(t.getUTCSeconds(),e,2)}function Qy(t){var e=t.getUTCDay();return 0===e?7:e}function t_(t,e){return iy(Vg.count(Yg(t),t),e,2)}function e_(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Ug(t):Ug.ceil(t),iy(Ug.count(Yg(t),t)+(4===Yg(t).getUTCDay()),e,2)}function n_(t){return t.getUTCDay()}function r_(t,e){return iy(Hg.count(Yg(t),t),e,2)}function i_(t,e){return iy(t.getUTCFullYear()%100,e,2)}function o_(t,e){return iy(t.getUTCFullYear()%1e4,e,4)}function a_(){return"+0000"}function s_(){return"%"}function u_(t){return+t}function c_(t){return Math.floor(+t/1e3)}function l_(t){return Zg=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=ay(i),l=sy(i),f=ay(o),h=sy(o),p=ay(a),d=sy(a),v=ay(s),g=sy(s),y=ay(u),_=sy(u),m={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:Ay,e:Ay,f:jy,H:Sy,I:ky,j:Ly,L:Cy,m:Dy,M:Py,p:function(t){return i[+(t.getHours()>=12)]},Q:u_,s:c_,S:Ry,u:Iy,U:Ny,V:By,w:Fy,W:zy,x:null,X:null,y:Gy,Y:Wy,Z:Vy,"%":s_},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:Hy,e:Hy,f:$y,H:Uy,I:Yy,j:Xy,L:qy,m:Zy,M:Ky,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:u_,s:c_,S:Jy,u:Qy,U:t_,V:e_,w:n_,W:r_,x:null,X:null,y:i_,Y:o_,Z:a_,"%":s_},x={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=_[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:yy,e:yy,f:Oy,H:my,I:my,j:_y,L:wy,m:gy,M:by,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:Ty,s:My,S:xy,u:cy,U:ly,V:fy,w:uy,W:hy,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:dy,Y:py,Z:vy,"%":Ey};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=ty[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=$g(1900);if(E(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=qg($g(o.y))).getUTCDay(),r=i>4||0===i?Hg.ceil(r):Hg(r),r=Gg.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=e($g(o.y))).getDay(),r=i>4||0===i?Ng.ceil(r):Ng(r),r=Pg.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?qg($g(o.y)).getUTCDay():e($g(o.y)).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,qg(o)):e(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 ty?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(m.x=w(n,m),m.X=w(r,m),m.c=w(e,m),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",Xg);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,qg);return e.toString=function(){return t},e}})}(t),Kg=Zg.format,Zg.parse,Jg=Zg.utcFormat,Qg=Zg.utcParse,Zg}l_({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"]});Date.prototype.toISOString||Jg("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||Qg("%Y-%m-%dT%H:%M:%S.%LZ");var f_=1e3,h_=60*f_,p_=60*h_,d_=24*p_,v_=7*d_,g_=30*d_,y_=365*d_;function __(t){return new Date(t)}function m_(t){return t instanceof Date?+t:+new Date(+t)}function b_(){return Id.apply(function t(e,n,r,i,o,a,s,u,c){var l=Qv(Yv,Yv),f=l.invert,h=l.domain,p=c(".%L"),d=c(":%S"),v=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),_=c("%b %d"),m=c("%B"),b=c("%Y"),x=[[s,1,f_],[s,5,5*f_],[s,15,15*f_],[s,30,30*f_],[a,1,h_],[a,5,5*h_],[a,15,15*h_],[a,30,30*h_],[o,1,p_],[o,3,3*p_],[o,6,6*p_],[o,12,12*p_],[i,1,d_],[i,2,2*d_],[r,1,v_],[n,1,g_],[n,3,3*g_],[e,1,y_]];function w(t){return(s(t)<t?p:a(t)<t?d:o(t)<t?v:i(t)<t?g:n(t)<t?r(t)<t?y:_:e(t)<t?m:b)(t)}function O(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Ad((function(t){return t[2]})).right(x,o);a===x.length?(i=Rd(n/y_,r/y_,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(Rd(n,r,t),1),t=u)}return null==i?t:t.every(i)}return l.invert=function(t){return new Date(f(t))},l.domain=function(t){return arguments.length?h(Wd.call(t,m_)):h().map(__)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=O(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:c(e)},l.nice=function(t,e){var n=h();return(t=O(t,n[0],n[n.length-1],e))?h(yg(n,t)):l},l.copy=function(){return Kv(l,t(e,n,r,i,o,a,s,u,c))},l}(zg,Fg,Ig,Pg,Dg,jg,Cg,Sg,Kg).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var x_=function(){function t(t){this.state={options:{}},this.patternScale={},this.colorScale={},this.services=t}return t.prototype.getDisplayData=function(){var t=Ip.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=kp.clone(this.get("data"));return n.datasets=n.datasets.filter((function(n){return e[n.label]===t})),n},t.prototype.getData=function(){return this.get("data")},t.prototype.setData=function(t){var e=this.generateDataLabels(t);return this.set({data:t,dataLabels:e}),this.state.data},t.prototype.generateDataLabels=function(t){var e={};return t.datasets.forEach((function(t){e[t.label]=Ip.items.status.ACTIVE})),e},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:kp.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataLabels(),this.setColorScale(),this.services.events.dispatchEvent("model-update"))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Ip.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},t.prototype.setColorScale=function(){var t=this;if(this.getDisplayData().datasets[0].fillColors)this.getDisplayData().datasets.forEach((function(e){t.colorScale[e.label]=Ud().range(e.fillColors).domain(t.allDataLabels)}));else{var e=Ed;this.getData().datasets.forEach((function(n,r){t.colorScale[n.label]=Ud().range([e[r]]).domain(t.allDataLabels)}))}},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions();return r.getFillColor?r.getFillColor(t,e,n):this.getFillScale()[t](e)},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions();return r.getStrokeColor?r.getStrokeColor(t,e,n):this.colorScale[t](e)},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.updateAllDataLabels=function(){var t=this;this.allDataLabels?this.getDisplayData().labels.forEach((function(e){-1===t.allDataLabels.indexOf(e)&&t.allDataLabels.push(e)})):this.allDataLabels=this.getDisplayData().labels},t}(),w_=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}(),O_="http://www.w3.org/1999/xhtml",E_={svg:"http://www.w3.org/2000/svg",xhtml:O_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function T_(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),E_.hasOwnProperty(e)?{space:E_[e],local:t}:t}function M_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===O_&&e.documentElement.namespaceURI===O_?e.createElement(t):e.createElementNS(n,t)}}function A_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function S_(t){var e=T_(t);return(e.local?A_:M_)(e)}function k_(){}function L_(t){return null==t?k_:function(){return this.querySelector(t)}}function C_(){return[]}function j_(t){return null==t?C_:function(){return this.querySelectorAll(t)}}function D_(t){return function(){return this.matches(t)}}function P_(t){return new Array(t.length)}function R_(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}R_.prototype={constructor:R_,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)}};var I_="$";function N_(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 R_(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function B_(t,e,n,r,i,o,a){var s,u,c,l={},f=e.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(p[s]=c=I_+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<h;++s)(u=l[c=I_+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new R_(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&l[p[s]]===u&&(i[s]=u)}function F_(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function z_(t){return function(){this.removeAttribute(t)}}function G_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W_(t,e){return function(){this.setAttribute(t,e)}}function V_(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H_(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function U_(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 Y_(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function X_(t){return function(){this.style.removeProperty(t)}}function q_(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $_(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Z_(t,e){return t.style.getPropertyValue(e)||Y_(t).getComputedStyle(t,null).getPropertyValue(e)}function K_(t){return function(){delete this[t]}}function J_(t,e){return function(){this[t]=e}}function Q_(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function tm(t){return t.trim().split(/^|\s+/)}function em(t){return t.classList||new nm(t)}function nm(t){this._node=t,this._names=tm(t.getAttribute("class")||"")}function rm(t,e){for(var n=em(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function im(t,e){for(var n=em(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function om(t){return function(){rm(this,t)}}function am(t){return function(){im(this,t)}}function sm(t,e){return function(){(e.apply(this,arguments)?rm:im)(this,t)}}function um(){this.textContent=""}function cm(t){return function(){this.textContent=t}}function lm(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function fm(){this.innerHTML=""}function hm(t){return function(){this.innerHTML=t}}function pm(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function dm(){this.nextSibling&&this.parentNode.appendChild(this)}function vm(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gm(){return null}function ym(){var t=this.parentNode;t&&t.removeChild(this)}function _m(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function mm(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}nm.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 bm={},xm=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(bm={mouseenter:"mouseover",mouseleave:"mouseout"}));function wm(t,e,n){return t=Om(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Om(t,e,n){return function(r){var i=xm;xm=r;try{t.call(this,this.__data__,e,n)}finally{xm=i}}}function Em(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 Tm(t,e,n){var r=bm.hasOwnProperty(t.type)?wm:Om;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,f=u.length;l<f;++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 Mm(t,e,n){var r=Y_(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 Am(t,e){return function(){return Mm(this,t,e)}}function Sm(t,e){return function(){return Mm(this,t,e.apply(this,arguments))}}var km=[null];function Lm(t,e){this._groups=t,this._parents=e}function Cm(){return new Lm([[document.documentElement]],km)}function jm(t){return"string"==typeof t?new Lm([[document.querySelector(t)]],[document.documentElement]):new Lm([[t]],km)}function Dm(){for(var t,e=xm;t=e.sourceEvent;)e=t;return e}function Pm(t){var e=Dm();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)}Lm.prototype=Cm.prototype={constructor:Lm,select:function(t){"function"!=typeof t&&(t=L_(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 Lm(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=j_(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 Lm(r,i)},filter:function(t){"function"!=typeof t&&(t=D_(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 Lm(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n=e?B_:N_,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],f=i[c],h=f.length,p=t.call(l,l&&l.__data__,c,r),d=p.length,v=s[c]=new Array(d),g=a[c]=new Array(d);n(l,f,v,g,u[c]=new Array(h),p,e);for(var y,_,m=0,b=0;m<d;++m)if(y=v[m]){for(m>=b&&(b=m+1);!(_=g[b])&&++b<d;);y._next=_||null}}return(a=new Lm(a,r))._enter=s,a._exit=u,a},enter:function(){return new Lm(this._enter||this._groups.map(P_),this._parents)},exit:function(){return new Lm(this._exit||this._groups.map(P_),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],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new Lm(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=F_);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 Lm(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=T_(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?G_:z_:"function"==typeof e?n.local?U_:H_:n.local?V_:W_)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?X_:"function"==typeof e?$_:q_)(t,e,null==n?"":n)):Z_(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?K_:"function"==typeof e?Q_:J_)(t,e)):this.node()[t]},classed:function(t,e){var n=tm(t+"");if(arguments.length<2){for(var r=em(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?sm:e?om:am)(n,e))},text:function(t){return arguments.length?this.each(null==t?um:("function"==typeof t?lm:cm)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?fm:("function"==typeof t?pm:hm)(t)):this.node().innerHTML},raise:function(){return this.each(dm)},lower:function(){return this.each(vm)},append:function(t){var e="function"==typeof t?t:S_(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:S_(t),r=null==e?gm:"function"==typeof e?e:L_(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ym)},clone:function(t){return this.select(t?mm:_m)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(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}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Tm:Em,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?Sm:Am)(t,e))}};var Rm={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 "},Im=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}()}(),Nm="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Bm="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Fm="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Bm):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},zm=2,Gm=["top","right","bottom","left","width","height","size","weight"],Wm="undefined"!=typeof MutationObserver,Vm=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(){Fm(o)}function s(){var t=Date.now();if(n){if(t-i<zm)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};Vm.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Vm.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Vm.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Vm.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},Vm.prototype.connect_=function(){Nm&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Wm?(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)},Vm.prototype.disconnect_=function(){Nm&&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)},Vm.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Gm.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Vm.getInstance=function(){return this.instance_||(this.instance_=new Vm),this.instance_},Vm.instance_=null;var Hm=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},Um=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Bm},Ym=Jm(0,0,0,0);function Xm(t){return parseFloat(t)||0}function qm(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Xm(t["border-"+n+"-width"])}),0)}function $m(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Ym;var r=Um(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]=Xm(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Xm(r.width),u=Xm(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=qm(r,"left","right")+o),Math.round(u+a)!==n&&(u-=qm(r,"top","bottom")+a)),!function(t){return t===Um(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 Jm(i.left,i.top,s,u)}var Zm="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Um(t).SVGGraphicsElement}:function(t){return t instanceof Um(t).SVGElement&&"function"==typeof t.getBBox};function Km(t){return Nm?Zm(t)?function(t){var e=t.getBBox();return Jm(0,0,e.width,e.height)}(t):$m(t):Ym}function Jm(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Qm=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Jm(0,0,0,0),this.target=t};Qm.prototype.isActive=function(){var t=Km(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Qm.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var tb=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 Hm(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Hm(this,{target:t,contentRect:n})},eb=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Im,"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};eb.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 Um(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Qm(t)),this.controller_.addObserver(this),this.controller_.refresh())}},eb.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 Um(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))}},eb.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},eb.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},eb.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new tb(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},eb.prototype.clearActive=function(){this.activeObservations_.splice(0)},eb.prototype.hasActive=function(){return this.activeObservations_.length>0};var nb="undefined"!=typeof WeakMap?new WeakMap:new Im,rb=function(t){if(!(this instanceof rb))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=Vm.getInstance(),n=new eb(t,e,this);nb.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){rb.prototype[t]=function(){return(e=nb.get(this))[t].apply(e,arguments);var e}}));var ib=void 0!==Bm.ResizeObserver?Bm.ResizeObserver:rb,ob=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=jm(t));var n,r,i,o,a={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var s={width:t.node().clientWidth,height:t.node().clientHeight},u=function(t){return!!(t&&t.width&&t.height&&!isNaN(t.height)&&!isNaN(t.width)&&-1===(""+t.width+t.height).indexOf("%")&&t.width>0&&t.height>0)};if(e){if(e.useAttrs&&u(a))return a;if(e.useClientDimensions&&u(s))return s;if(e.useBBox&&u(r))return r;if(e.useBoundingRect&&u(o))return o}try{var c={width:kp.getProperty(t.node(),"width","baseVal","value"),height:kp.getProperty(t.node(),"height","baseVal","value")};if(u(c))return c}catch(t){if(u(s))return s;if(u(r))return r;if(u(a))return a}return{width:0,height:0}},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();jm(this.getHolder()).classed(Rm.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=kp.getProperty(this.model.getOptions(),"style","prefix"),e=jm(this.getHolder()).append("svg").classed(Rm.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=kp.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent("chart-resize"))}),12.5);new ib(i).observe(e)}},e}(w_),ab=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(w_),sb={value:function(){}};function ub(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new cb(r)}function cb(t){this._=t}function lb(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 fb(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function hb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=sb,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}cb.prototype=ub.prototype={constructor:cb,on:function(t,e){var n,r=this._,i=lb(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]=hb(r[n],t.name,e);else if(null==e)for(n in r)r[n]=hb(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=fb(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new cb(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 pb,db,vb=0,gb=0,yb=0,_b=1e3,mb=0,bb=0,xb=0,wb="object"==typeof performance&&performance.now?performance:Date,Ob="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Eb(){return bb||(Ob(Tb),bb=wb.now()+xb)}function Tb(){bb=0}function Mb(){this._call=this._time=this._next=null}function Ab(t,e,n){var r=new Mb;return r.restart(t,e,n),r}function Sb(){bb=(mb=wb.now())+xb,vb=gb=0;try{!function(){Eb(),++vb;for(var t,e=pb;e;)(t=bb-e._time)>=0&&e._call.call(null,t),e=e._next;--vb}()}finally{vb=0,function(){var t,e,n=pb,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:pb=e);db=t,Lb(r)}(),bb=0}}function kb(){var t=wb.now(),e=t-mb;e>_b&&(xb-=e,mb=t)}function Lb(t){vb||(gb&&(gb=clearTimeout(gb)),t-bb>24?(t<1/0&&(gb=setTimeout(Sb,t-wb.now()-xb)),yb&&(yb=clearInterval(yb))):(yb||(mb=wb.now(),yb=setInterval(kb,_b)),vb=1,Ob(Sb)))}function Cb(t,e,n){var r=new Mb;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Mb.prototype=Ab.prototype={constructor:Mb,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Eb():+n)+(null==e?0:+e),this._next||db===this||(db?db._next=this:pb=this,db=this),this._call=t,this._time=n,Lb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lb())}};var jb=ub("start","end","cancel","interrupt"),Db=[],Pb=0,Rb=1,Ib=2,Nb=3,Bb=4,Fb=5,zb=6;function Gb(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,f,h;if(n.state!==Rb)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===Nb)return Cb(o);h.state===Bb?(h.state=zb,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=zb,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(Cb((function(){n.state===Nb&&(n.state=Bb,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=Ib,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ib){for(n.state=Nb,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);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=Fb,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);n.state===Fb&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=zb,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Ab((function(t){n.state=Rb,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:jb,tween:Db,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Pb})}function Wb(t,e){var n=Hb(t,e);if(n.state>Pb)throw new Error("too late; already scheduled");return n}function Vb(t,e){var n=Hb(t,e);if(n.state>Nb)throw new Error("too late; already running");return n}function Hb(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ub(t,e){var n,r;return function(){var i=Vb(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 Yb(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Vb(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 Xb(t,e,n){var r=t._id;return t.each((function(){var t=Vb(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Hb(t,r).value[e]}}function qb(t,e){var n;return("number"==typeof e?Av:e instanceof cv?Ev:(n=cv(e))?(e=n,Ev):Cv)(t,e)}function $b(t){return function(){this.removeAttribute(t)}}function Zb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Kb(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 Jb(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 Qb(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 tx(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 ex(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e(n))}}(t,i)),n}return i._value=e,i}function nx(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e(n))}}(t,i)),n}return i._value=e,i}function rx(t,e){return function(){Wb(this,t).delay=+e.apply(this,arguments)}}function ix(t,e){return e=+e,function(){Wb(this,t).delay=e}}function ox(t,e){return function(){Vb(this,t).duration=+e.apply(this,arguments)}}function ax(t,e){return e=+e,function(){Vb(this,t).duration=e}}var sx=Cm.prototype.constructor;function ux(t){return function(){this.style.removeProperty(t)}}var cx=0;function lx(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function fx(t){return Cm().transition(t)}function hx(){return++cx}var px=Cm.prototype;lx.prototype=fx.prototype={constructor:lx,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=L_(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,f=o[a]=new Array(l),h=0;h<l;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,Gb(f[h],e,n,h,f,Hb(s,n)));return new lx(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=j_(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,f=0;f<l;++f)if(u=c[f]){for(var h,p=t.call(u,u.__data__,f,c),d=Hb(u,n),v=0,g=p.length;v<g;++v)(h=p[v])&&Gb(h,e,n,v,p,d);o.push(p),a.push(u)}return new lx(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=D_(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 lx(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],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new lx(a,this._parents,this._name,this._id)},selection:function(){return new sx(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=hx(),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=Hb(a,e);Gb(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new lx(r,this._parents,t,n)},call:px.call,nodes:px.nodes,node:px.node,size:px.size,empty:px.empty,each:px.each,on:function(t,e){var n=this._id;return arguments.length<2?Hb(this.node(),n).on.on(t):this.each(function(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)?Wb:Vb;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=T_(t),r="transform"===n?Vv:qb;return this.attrTween(t,"function"==typeof e?(n.local?tx:Qb)(n,r,Xb(this,"attr."+t,e)):null==e?(n.local?Zb:$b)(n):(n.local?Jb:Kb)(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=T_(t);return this.tween(n,(r.local?ex:nx)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Wv:qb;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Z_(this,t),a=(this.style.removeProperty(t),Z_(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ux(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Z_(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Z_(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Xb(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Vb(this,t),c=u.on,l=null==u.value[a]?o||(o=ux(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=Z_(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,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,o,n)),r}return o._value=e,o}(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}}(Xb(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":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=Hb(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?Ub:Yb)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?rx:ix)(e,t)):Hb(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ox:ax)(e,t)):Hb(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Vb(this,t).ease=e}}(e,t)):Hb(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=Vb(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 dx={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function vx(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return dx.time=Eb(),dx;return n}Cm.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>Ib&&n.state<Fb,n.state=zb,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)}))},Cm.prototype.transition=function(t){var e,n;t instanceof lx?(e=t._id,t=t._name):(e=hx(),(n=dx).time=Eb(),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])&&Gb(a,t,e,c,s,n||vx(a,e));return new lx(r,this._parents,t,e)};var gx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return d(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener("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=fx(t).duration(kp.getProperty(Qp,t,"duration")||Qp.default.duration);return this.pendingTransitions[r._id]=r,r.on("end",(function(){delete n.pendingTransitions[r._id]})),r},e.prototype.getInstantTransition=function(t){var e=this,n=fx(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(w_),yx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getMainXAxis=function(){var t=this.model.get(i.PRIMARY),e=this.model.get(i.SECONDARY);return t===this.model.get(r.TOP)||t===this.model.get(r.BOTTOM)?t:e===this.model.get(r.TOP)||e===this.model.get(r.BOTTOM)?e:this.model.get(r.BOTTOM)},e.prototype.getMainYAxis=function(){var t=this.model.get(i.PRIMARY),e=this.model.get(i.SECONDARY);return t===this.model.get(r.LEFT)||t===this.model.get(r.RIGHT)?t:e===this.model.get(r.LEFT)||e===this.model.get(r.RIGHT)?e:this.model.get(r.LEFT)},e.prototype.getXValue=function(t,e){return this.getMainXAxis().getValueFromScale(t,e)},e.prototype.getYValue=function(t,e){return this.getMainYAxis().getValueFromScale(t,e)},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=[];switch(this.getMainXAxis().scaleType){case o.LABELS:var r=e.labels.indexOf(t);e.datasets.forEach((function(t){n.push({datasetLabel:t.label,value:t.data[r]})}));break;case o.TIME:var i=Object.keys(e.datasets[0].data[0]).filter((function(t){return"value"!==t}))[0];e.datasets.forEach((function(e){var r=e.label;e.data.filter((function(e){var n=new Date(e[i]),r=new Date(t);return n.getTime()===r.getTime()})).forEach((function(t){n.push(Object.assign({datasetLabel:r,value:t.value},t))}))}))}return n},e}(w_),_x=Math.PI,mx=2*_x,bx=mx-1e-6;function xx(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function wx(){return new xx}function Ox(t){return function(){return t}}xx.prototype=wx.prototype={constructor:xx,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,f=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(f>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var h=n-o,p=r-a,d=s*s+u*u,v=h*h+p*p,g=Math.sqrt(d),y=Math.sqrt(f),_=i*Math.tan((_x-Math.acos((d+f-v)/(2*g*y)))/2),m=_/y,b=_/g;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*c)+","+(e+m*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*p)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,f=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&&(f<0&&(f=f%mx+mx),f>bx?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=_x)+","+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 Ex=Math.abs,Tx=Math.atan2,Mx=Math.cos,Ax=Math.max,Sx=Math.min,kx=Math.sin,Lx=Math.sqrt,Cx=1e-12,jx=Math.PI,Dx=jx/2,Px=2*jx;function Rx(t){return t>=1?Dx:t<=-1?-Dx:Math.asin(t)}function Ix(t){return t.innerRadius}function Nx(t){return t.outerRadius}function Bx(t){return t.startAngle}function Fx(t){return t.endAngle}function zx(t){return t&&t.padAngle}function Gx(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/Lx(s*s+u*u),l=c*u,f=-c*s,h=t+l,p=e+f,d=n+l,v=r+f,g=(h+d)/2,y=(p+v)/2,_=d-h,m=v-p,b=_*_+m*m,x=i-o,w=h*v-d*p,O=(m<0?-1:1)*Lx(Ax(0,x*x*b-w*w)),E=(w*m-_*O)/b,T=(-w*_-m*O)/b,M=(w*m+_*O)/b,A=(-w*_+m*O)/b,S=E-g,k=T-y,L=M-g,C=A-y;return S*S+k*k>L*L+C*C&&(E=M,T=A),{cx:E,cy:T,x01:-l,y01:-f,x11:E*(i/x-1),y11:T*(i/x-1)}}function Wx(){var t=Ix,e=Nx,n=Ox(0),r=null,i=Bx,o=Fx,a=zx,s=null;function u(){var u,c,l=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-Dx,p=o.apply(this,arguments)-Dx,d=Ex(p-h),v=p>h;if(s||(s=u=wx()),f<l&&(c=f,f=l,l=c),f>Cx)if(d>Px-Cx)s.moveTo(f*Mx(h),f*kx(h)),s.arc(0,0,f,h,p,!v),l>Cx&&(s.moveTo(l*Mx(p),l*kx(p)),s.arc(0,0,l,p,h,v));else{var g,y,_=h,m=p,b=h,x=p,w=d,O=d,E=a.apply(this,arguments)/2,T=E>Cx&&(r?+r.apply(this,arguments):Lx(l*l+f*f)),M=Sx(Ex(f-l)/2,+n.apply(this,arguments)),A=M,S=M;if(T>Cx){var k=Rx(T/l*kx(E)),L=Rx(T/f*kx(E));(w-=2*k)>Cx?(b+=k*=v?1:-1,x-=k):(w=0,b=x=(h+p)/2),(O-=2*L)>Cx?(_+=L*=v?1:-1,m-=L):(O=0,_=m=(h+p)/2)}var C=f*Mx(_),j=f*kx(_),D=l*Mx(x),P=l*kx(x);if(M>Cx){var R,I=f*Mx(m),N=f*kx(m),B=l*Mx(b),F=l*kx(b);if(d<jx&&(R=function(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,f=s-o,h=f*u-l*c;if(!(h*h<Cx))return[t+(h=(l*(e-o)-f*(t-i))/h)*u,e+h*c]}(C,j,B,F,I,N,D,P))){var z=C-R[0],G=j-R[1],W=I-R[0],V=N-R[1],H=1/kx(function(t){return t>1?0:t<-1?jx:Math.acos(t)}((z*W+G*V)/(Lx(z*z+G*G)*Lx(W*W+V*V)))/2),U=Lx(R[0]*R[0]+R[1]*R[1]);A=Sx(M,(l-U)/(H-1)),S=Sx(M,(f-U)/(H+1))}}O>Cx?S>Cx?(g=Gx(B,F,C,j,f,S,v),y=Gx(I,N,D,P,f,S,v),s.moveTo(g.cx+g.x01,g.cy+g.y01),S<M?s.arc(g.cx,g.cy,S,Tx(g.y01,g.x01),Tx(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,S,Tx(g.y01,g.x01),Tx(g.y11,g.x11),!v),s.arc(0,0,f,Tx(g.cy+g.y11,g.cx+g.x11),Tx(y.cy+y.y11,y.cx+y.x11),!v),s.arc(y.cx,y.cy,S,Tx(y.y11,y.x11),Tx(y.y01,y.x01),!v))):(s.moveTo(C,j),s.arc(0,0,f,_,m,!v)):s.moveTo(C,j),l>Cx&&w>Cx?A>Cx?(g=Gx(D,P,I,N,l,-A,v),y=Gx(C,j,B,F,l,-A,v),s.lineTo(g.cx+g.x01,g.cy+g.y01),A<M?s.arc(g.cx,g.cy,A,Tx(g.y01,g.x01),Tx(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,A,Tx(g.y01,g.x01),Tx(g.y11,g.x11),!v),s.arc(0,0,l,Tx(g.cy+g.y11,g.cx+g.x11),Tx(y.cy+y.y11,y.cx+y.x11),v),s.arc(y.cx,y.cy,A,Tx(y.y11,y.x11),Tx(y.y01,y.x01),!v))):s.arc(0,0,l,x,b,v):s.lineTo(D,P)}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-jx/2;return[Mx(r)*n,kx(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ox(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ox(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ox(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ox(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ox(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ox(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ox(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Vx(t){this._context=t}function Hx(t){return new Vx(t)}function Ux(t){return t[0]}function Yx(t){return t[1]}function Xx(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function qx(t){return t}Vx.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 $x=Array.prototype.slice;function Zx(){}function Kx(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 Jx(t){this._context=t}function Qx(t){return new Jx(t)}function tw(t){this._context=t}function ew(t){return new tw(t)}function nw(t){this._context=t}function rw(t){return new nw(t)}function iw(t,e){this._basis=new Jx(t),this._beta=e}Jx.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:Kx(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:Kx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},tw.prototype={areaStart:Zx,areaEnd:Zx,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:Kx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},nw.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:Kx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},iw.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 ow=function t(e){function n(t){return 1===e?new Jx(t):new iw(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function aw(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 sw(t,e){this._context=t,this._k=(1-e)/6}sw.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:aw(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:aw(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 uw=function t(e){function n(t){return new sw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function cw(t,e){this._context=t,this._k=(1-e)/6}cw.prototype={areaStart:Zx,areaEnd:Zx,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:aw(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 lw=function t(e){function n(t){return new cw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function fw(t,e){this._context=t,this._k=(1-e)/6}fw.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:aw(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 hw=function t(e){function n(t){return new fw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function pw(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Cx){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>Cx){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 dw(t,e){this._context=t,this._alpha=e}dw.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:pw(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 vw=function t(e){function n(t){return e?new dw(t,e):new sw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gw(t,e){this._context=t,this._alpha=e}gw.prototype={areaStart:Zx,areaEnd:Zx,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:pw(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 yw=function t(e){function n(t){return e?new gw(t,e):new cw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function _w(t,e){this._context=t,this._alpha=e}_w.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:pw(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 mw=function t(e){function n(t){return e?new _w(t,e):new fw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function bw(t){this._context=t}function xw(t){return new bw(t)}function ww(t){return t<0?-1:1}function Ow(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(ww(o)+ww(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ew(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Tw(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 Mw(t){this._context=t}function Aw(t){this._context=new Sw(t)}function Sw(t){this._context=t}function kw(t){return new Mw(t)}function Lw(t){return new Aw(t)}function Cw(t){this._context=t}function jw(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 Dw(t){return new Cw(t)}function Pw(t,e){this._context=t,this._t=e}function Rw(t){return new Pw(t,.5)}function Iw(t){return new Pw(t,0)}function Nw(t){return new Pw(t,1)}function Bw(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 Fw(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function zw(t,e){return t[e]}bw.prototype={areaStart:Zx,areaEnd:Zx,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))}},Mw.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:Tw(this,this._t0,Ew(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,Tw(this,Ew(this,n=Ow(this,t,e)),n);break;default:Tw(this,this._t0,n=Ow(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Aw.prototype=Object.create(Mw.prototype)).point=function(t,e){Mw.prototype.point.call(this,e,t)},Sw.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)}},Cw.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=jw(t),i=jw(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)}},Pw.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 Gw,Ww,Vw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Hx,curveLinearClosed:xw,curveBasis:Qx,curveBasisClosed:ew,curveBasisOpen:rw,curveBundle:ow,curveCardinal:uw,curveCardinalClosed:lw,curveCardinalOpen:hw,curveCatmullRom:vw,curveCatmullRomClosed:yw,curveCatmullRomOpen:mw,curveMonotoneX:kw,curveMonotoneY:Lw,curveNatural:Dw,curveStep:Rw,curveStepAfter:Nw,curveStepBefore:Iw},e}return d(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(w_),Hw=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(jm(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=kp.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Rm.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Rm.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=kp.getProperty(this.model.getOptions(),"style","prefix");return ob.appendOrSelect(this.parent,"g."+Rm.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Uw=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return d(n,t),n.prototype.render=function(){var t=this,n=this.getContainerSVG().attr("role",e.GRAPHICS_DOCUMENT),r=this.model.getOptions(),i=n.selectAll("g.legend-item").data(this.getLegendItemArray()),o=i.enter().append("g").classed("legend-item",!0),a=r.legend.checkbox.radius;o.append("rect").classed("checkbox",!0).merge(i.select("rect.checkbox")).attr("width",2*a).attr("height",2*a).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.value===r.legend.items.status.ACTIVE?t.model.getStrokeColor(e.key):null})).classed("active",(function(t,e){return t.value===r.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).text((function(t){return t.key})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=kp.getProperty(this.model.getOptions(),"legend","clickable");n.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},n.prototype.breakItemsIntoLines=function(t){var e,n=this,r=this.getContainerSVG(),i=this.model.getOptions(),o=i.legend.checkbox.radius,a=i.legend.items.horizontalSpace,s=i.legend.items.verticalSpace,u=i.legend.items.textYOffset,l=2*o+i.legend.checkbox.spaceAfter,f=i.legend.items.status.DISABLED,h=this.model.get("dataLabels"),p=Object.keys(h).some((function(t){return h[t]===f})),d=kp.getProperty(i,"legend","orientation"),v=0,g=0,y=0;t.merge(r.selectAll("g.legend-item")).each((function(t,i){var f=jm(this),h=jm(r.selectAll("g.legend-item").nodes()[i-1]);if(0===y||h.empty()||d===c.VERTICAL)d===c.VERTICAL&&0!==i&&g++;else{var _=ob.getSVGElementSize(n.parent,{useAttr:!0}),m=ob.getSVGElementSize(jm(this).select("text"),{useBBox:!0}),b=ob.getSVGElementSize(h.select("text"),{useBBox:!0});(v=v+b.width+l+a)+l+m.width>_.width&&(g++,v=0,y=0)}f.select("rect.checkbox").attr("x",v).attr("y",0+g*s);var x=u+g*s;f.select("text").attr("x",v+l).attr("y",0+x),e=x,p&&f.select("g.check").empty()?(f.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'),f.select("g.check svg").attr("width",2*o-1).attr("height",2*o-1).attr("x",parseFloat(f.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(f.select("rect.checkbox").attr("y"))+.5)):p||f.select("g.check").empty()||f.select("g.check").remove(),y++})),ob.appendOrSelect(r,"rect.spacer").attr("x",0).attr("y",e).attr("width",16).attr("height",16).attr("fill","none")},n.prototype.getLegendItemArray=function(){var t=this.model.get("dataLabels");return Object.keys(t).map((function(e){return{key:e,value:t[e]}}))},n.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions();e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent("legend-item-onhover",{hoveredElement:jm(this)});var e=n.legend.checkbox.radius,r=jm(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent("legend-item-onclick",{clickedElement:jm(this)});var e=jm(this).datum();t.model.toggleDataLabel(e.key)})).on("mouseout",(function(){var e=jm(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent("legend-item-onmouseout",{hoveredElement:e})}))},n}(Hw),Yw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return d(e,t),e.prototype.truncateTitle=function(){var t=ob.getSVGElementSize(this.parent).width,e=ob.appendOrSelect(this.parent,"text.title");if(e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=ob.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.text(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();ob.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).text(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Hw);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Ww||(Ww={}));var Xw=((Gw={})[Ww.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)}},Gw[Ww.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)}},Gw[Ww.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)}},Gw[Ww.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)}},Gw),qw="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},$w=function(){function t(t){void 0===t&&(t={}),this.positions=Xw,this.positions=Object.assign({},Xw,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,f=l-u*c;return{placement:n,weight:(f=0===f?l:f)/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:qw.innerHeight-qw.scrollY,height:qw.innerWidth-qw.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}(),Zw=(new $w,function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new $w,i.init(),i}return d(e,t),e.prototype.init=function(){var t=this,e=jm(this.services.domUtils.getHolder()),n=kp.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=ob.appendOrSelect(e,"div."+Rm.prefix+"--"+n+"--tooltip");var r=ob.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(i){if(i.detail.type===s.DATAPOINT&&kp.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===s.GRIDLINE&&kp.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=jm(xm.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,s.DATAPOINT),kp.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===s.TITLE){var u=ob.appendOrSelect(e,"svg."+Rm.prefix+"--"+n+"--chart-svg"),c=ob.getSVGElementSize(u).width*kp.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",c),r.html(t.getTooltipHTML(i.detail.hoveredElement,s.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===s.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=kp.getProperty(t,"data")?t.data:t,r=kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+(n.datasetLabel?n.datasetLabel:n.label)+'</p>\n\t\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.sort((function(t,e){return e.value-t.value}));var r=this.services.axes.getMainXAxis().scaleType;return"<ul class='multi-tooltip'>"+n.map((function(t){var n=t.value;n instanceof Object&&(n=r===o.TIME?t.value.date:t.value.value);var i=kp.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(n):n.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t){var e=jm(this.services.domUtils.getHolder()).node().getBoundingClientRect(),n=t.getBoundingClientRect(),r=this.model.getOptions().tooltip.title.verticalOffset,i={left:n.left-e.left+n.width/2,top:n.top-e.top-r};return{placement:a.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Pm(n);if(t){var o=t.placement===a.TOP?Ww.TOP:Ww.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Ww.RIGHT,Ww.LEFT,Ww.TOP,Ww.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),u=this.model.getOptions().tooltip.datapoint.horizontalOffset;s===Ww.LEFT&&(u*=-1),e=this.positionService.findPositionAt({left:i[0]+u,top:i[1]},r,s)}this.positionService.setElement(r,e)},e}(Hw)),Kw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){var e=this,n=jm(this.services.domUtils.getHolder()),r=kp.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=ob.appendOrSelect(n,"div."+Rm.prefix+"--"+r+"--tooltip");var i=ob.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(o){if(o.detail.type===s.DATAPOINT&&kp.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===s.GRIDLINE&&kp.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")){var a=o.detail.hoveredElement.node(),u=void 0;u=o.detail.multidata?e.getMultilineTooltipHTML(o.detail.multidata):e.getTooltipHTML(o.detail.hoveredElement.datum()),kp.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var c=e.getTooltipPosition(a);e.positionTooltip(o.detail.multidata?void 0:c)}else if(o.detail.type===s.TITLE){var l=ob.appendOrSelect(n,"svg."+Rm.prefix+"--"+r+"--chart-svg"),f=ob.getSVGElementSize(l).width*kp.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",f),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,s.TITLE));c=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(c)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t){var e=jm(t).datum(),n=jm(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:a.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:a.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=kp.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label,t.value)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(Zw),Jw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===s.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(e.value):e.value.toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e.datasetLabel,e.label,e.value)+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e.datasetLabel+'</p>\n\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t</div>"},e}(Zw),Qw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getBarWidth=function(){var t=this.services.axes.getMainXAxis(),e=this.model.getOptions();return t.scale.step?Math.min(e.bars.maxWidth,t.scale.step()/2):Math.min(e.bars.maxWidth,5/t.scale.ticks().length*e.bars.maxWidth)},e}(Hw),tO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("rect.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("rect.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.getContainerSVG().selectAll("g.bars").data(this.model.getDisplayData().datasets,(function(t){return t.label}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("bars",!0).attr("role",e.GROUP).merge(r).selectAll("rect.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}),(function(t){return t.label}));i.exit().attr("opacity",0).remove(),i.enter().append("rect").attr("opacity",0).merge(i).classed("bar",!0).attr("x",(function(t,e){var r=n.getBarWidth();return n.services.axes.getXValue(t,e)-r/2})).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("y",(function(t,e){return n.services.axes.getYValue(Math.max(0,t.value))})).attr("fill",(function(t){return n.model.getFillScale()(t.label)})).attr("height",(function(t,e){return Math.abs(n.services.axes.getYValue(t,e)-n.services.axes.getYValue(0))})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.bar").on("mouseover",(function(){var e=jm(this);e.classed("hovered",!0),e.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",cv(e.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),e.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()(e.label)})),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("rect.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Qw),eO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("rect.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("rect.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getGroupWidth=function(){var t=this.model.getDisplayData().datasets;return t.length*this.getBarWidth()+5*(t.length-1)},n.prototype.setGroupScale=function(){var t=this.model.getDisplayData().datasets;this.groupScale=Yd().domain(t.map((function(t){return t.label}))).rangeRound([0,this.getGroupWidth()])},n.prototype.getBarWidth=function(){var e=this.model.getDisplayData().datasets;return Math.min(this.services.axes.getMainXAxis().scale.step()/2/e.length,t.prototype.getBarWidth.call(this))},n.prototype.render=function(t){var n=this,r=this.model.getDisplayData();this.setGroupScale();var i=this.getContainerSVG().selectAll("g.bars").data(r.labels);i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("bars",!0).attr("role",e.GROUP).attr("aria-labelledby",(function(t){return t})).merge(i).attr("transform",(function(t,e){return"translate("+(n.services.axes.getXValue(t,e)-n.getGroupWidth()/2)+", 0)"})).selectAll("rect.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}));o.exit().attr("opacity",0).remove(),o.enter().append("rect").attr("opacity",0).merge(o).classed("bar",!0).attr("x",(function(t){return n.groupScale(t.datasetLabel)})).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("y",(function(t,e){return n.services.axes.getYValue(Math.max(0,t.value))})).attr("height",(function(t,e){return Math.abs(n.services.axes.getYValue(t,e)-n.services.axes.getYValue(0))})).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){return this.model.getDisplayData().datasets.map((function(n){return{label:t,datasetLabel:n.label,value:n.data[e].value?n.data[e].value:n.data[e]}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.bar").on("mouseover",(function(){var e=jm(this);e.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",cv(e.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),e.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("rect.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Qw),nO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("rect.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("rect.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getStackData=function(){var t,e=this.model.getDisplayData();if(this.services.axes.getMainXAxis().scaleType===o.TIME){var n=[];e.datasets.forEach((function(t){n=n.concat(t.data.map((function(t){return Number(t.date)})))})),t=(n=kp.removeArrayDuplicates(n).sort()).map((function(t,n){var r={};return e.datasets.forEach((function(e){var n=e.data.find((function(e){return Number(e.date)===Number(t)}));r[e.label]=n?n.value:0})),r.label=t,r}))}else t=e.labels.map((function(t,n){var r={};return e.datasets.forEach((function(t){r[t.label]=isNaN(t.data[n])?t.data[n].value:t.data[n]})),r.label=t,r}));return t},n.prototype.render=function(t){var n=this,r=this.model.getOptions(),i=this.getContainerSVG(),o=this.model.getDisplayData(),a=this.getStackData(),s=o.datasets.map((function(t){return t.label})),u=i.selectAll("g.bars").data(function(){var t=Ox([]),e=Fw,n=Bw,r=zw;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 f,h=s[o],p=l[o]=new Array(u),d=0;d<u;++d)p[d]=f=[0,+r(i[d],h,d,i)],f.data=i[d];p.key=h}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:Ox($x.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Ox(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Fw:"function"==typeof t?t:Ox($x.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Bw:t,i):n},i}().keys(s)(a),(function(t){return t.key}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",e.GROUP);var c=i.selectAll("g.bars").selectAll("rect.bar").data((function(t){return function(t){return Object.keys(t).map((function(e){"object"==typeof t[e]&&(t[e].datasetLabel=t.key,t[e].label=t[e].data.label,t[e].value=t[e].data[t.key])})),t}(t)}),(function(t){return t.label}));c.exit().remove(),c.enter().append("rect").merge(c).classed("bar",!0).attr("x",(function(t,e){var r=n.getBarWidth();return n.services.axes.getXValue(t,e)-r/2})).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("y",(function(t,e){return n.services.axes.getYValue(t[1],e)})).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("height",(function(t,e){var i=t.datasetLabel,o=s.indexOf(i),a=n.services.axes.getYValue(t[0])-n.services.axes.getYValue(t[1]);return o>0&&a>=r.bars.dividerSize?a-r.bars.dividerSize:a})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.bar").on("mouseover",(function(){var e=jm(this);e.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",cv(e.attr("fill")).darker(.7).toString())})).on("mousemove",(function(){var e=jm(this),n=jm(this).datum();e.classed("hovered",!0);var r=n.data,i=r.label;delete r.label;var o=Object.keys(r).map((function(t){return{datasetLabel:t,value:r[t],label:i}}));t.services.events.dispatchEvent("show-tooltip",{multidata:o,hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),e.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("rect.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Qw),rO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return d(n,t),n.prototype.init=function(){var t=this;this.services.events.addEventListener("legend-item-onhover",(function(e){var n=e.detail.hoveredElement;t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.label!==n.datum().key?Jp.opacity.unselected:Jp.opacity.selected}))})),this.services.events.addEventListener("legend-item-onmouseout",(function(e){t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Jp.opacity.selected)}))},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this.getContainerSVG();this.lineGenerator=function(){var t=Ux,e=Yx,n=Ox(!0),r=null,i=Hx,o=null;function a(a){var s,u,c,l=a.length,f=!1;for(null==r&&(o=i(c=wx())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&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:Ox(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Ox(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ox(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().x((function(t,e){return n.services.axes.getXValue(t,e)})).y((function(t,e){return n.services.axes.getYValue(t,e)})).curve(this.services.curves.getD3Curve());var i=r.selectAll("g.lines").data(this.model.getDisplayData().datasets,(function(t){return t.label}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("lines",!0),a=this;o.append("path").attr("opacity",0).merge(r.selectAll("g.lines path")).attr("stroke",(function(t){var e=jm(this.parentNode).datum();return a.model.getStrokeColor(e.label)})).datum((function(t){var e=jm(this.parentNode).datum();return this._datasetLabel=e.label,e.data})).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.map((function(t){return t.value||t})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("class","line").attr("d",this.lineGenerator)},n}(Hw),iO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.model.getOptions(),i=this.getContainerSVG().selectAll("g.dots").data(this.model.getDisplayData().datasets,(function(t){return t.label}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("dots",!0).attr("role",e.GROUP).merge(i).selectAll("circle.dot").data((function(t,e){return n.addLabelsToDataPoints(t,e)})),a=o.enter().append("circle").attr("opacity",0),s=r.points.filled;a.merge(o).raise().classed("dot",!0).classed("filled",s).classed("unfilled",!s).attr("cx",(function(t,e){return n.services.axes.getXValue(t,e)})).transition(this.services.transitions.getTransition("scatter-update-enter",t)).attr("cy",(function(t,e){return n.services.axes.getYValue(t,e)})).attr("r",r.points.radius).attr("fill",(function(t){if(s)return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("fill-opacity",s?.2:1).attr("stroke",(function(t){return n.model.getStrokeColor(t.datasetLabel,t.label,t.value)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle").on("mouseover mousemove",(function(){var e=jm(this);e.classed("hovered",!0),e.style("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),t.configs.filled||e.style("fill",null),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Hw);function oO(t,e){var n=this,r=jv(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var aO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getDataList=function(){var t=this.model.getDisplayData();return t.datasets[0].data.map((function(e,n){return{label:t.labels[n],value:e.value?e.value:e}}))},n.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this,i=this.getContainerSVG(),o=this.model.getOptions(),a=this.getDataList(),s=this.computeRadius();this.arc=Wx().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=Wx().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=qx,e=Xx,n=null,r=Ox(0),i=Ox(Px),o=Ox(0);function a(a){var s,u,c,l,f,h=a.length,p=0,d=new Array(h),v=new Array(h),g=+r.apply(this,arguments),y=Math.min(Px,Math.max(-Px,i.apply(this,arguments)-g)),_=Math.min(Math.abs(y)/h,o.apply(this,arguments)),m=_*(y<0?-1:1);for(s=0;s<h;++s)(f=v[d[s]=s]=+t(a[s],s,a))>0&&(p+=f);for(null!=e?d.sort((function(t,n){return e(v[t],v[n])})):null!=n&&d.sort((function(t,e){return n(a[t],a[e])})),s=0,c=p?(y-h*m)/p:0;s<h;++s,g=l)u=d[s],l=g+((f=v[u])>0?f*c:0)+m,v[u]={data:a[u],index:s,value:f,startAngle:g,endAngle:l,padAngle:_};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Ox(+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:Ox(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ox(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ox(+t),a):o},a}().value((function(t){return t.value})).sort((function(t,e){return e.value-t.value})).padAngle(o.pie.padAngle)(a).sort((function(t,e){return t.index-e.index})),c=ob.appendOrSelect(i,"g.slices").attr("role",e.GROUP).selectAll("path.slice").data(u,(function(t){return t.data.label}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return n.model.getFillScale()(t.data.label)})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+kp.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return oO.bind(this)(t,r.arc)}));var l=ob.appendOrSelect(i,"g.labels").attr("role",e.GROUP).selectAll("text.pie-label").data(u,(function(t){return t.data.label}));l.exit().attr("opacity",0).remove();var f=l.enter().append("text").classed("pie-label",!0),p=[];f.merge(l).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):kp.convertValueToPercentage(t.data.value,a)+"%"})).datum((function(t){var e=this.getComputedTextLength();t.textOffsetX=e/2,t.textOffsetY=parseFloat(getComputedStyle(this).fontSize)/2;var n=s+7,r=(t.endAngle-t.startAngle)/2+t.startAngle;return t.xPosition=(t.textOffsetX+n)*Math.sin(r),t.yPosition=(t.textOffsetY+n)*-Math.cos(r),t})).attr("transform",(function(t,e){var n=a.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,s=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,s=t.yPosition-o.pie.callout.offsetY,t.direction=h.RIGHT,p.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,s=t.yPosition-o.pie.callout.offsetY,t.direction=h.LEFT,p.push(t)),"translate("+i+", "+s+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(p);var d=s+o.pie.xOffset,v=s+o.pie.yOffset;p.length>0&&(v+=o.pie.yOffsetCallout),i.attr("transform","translate("+d+", "+v+")"),this.addEventListeners()},n.prototype.renderCallouts=function(t){var n=ob.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",e.GROUP),r=this.model.getOptions(),i=n.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",e.GRAPHICS_SYMBOL+" "+e.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===h.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-r.pie.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+r.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum((function(t){return jm(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(i.selectAll("line.horizontal-line")).datum((function(t){return jm(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mousemove",(function(){var e=jm(this);e.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent("pie-slice-mouseover",e),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent("pie-slice-mouseout",e),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})})).on("click",(function(e){return t.services.events.dispatchEvent("pie-slice-click",e)}))},n.prototype.computeRadius=function(){var t=this.model.getOptions(),e=ob.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},n}(Hw),sO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return d(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this,r=ob.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();ob.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(jm(this))})),ob.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(kp.getProperty(i,"donut","center","label"))},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=kp.getProperty(e,"donut","center","number");n||(n=this.getDataList().reduce((function(t,e){return t+e.value}),0));var r=Av(parseInt(t.text().replace(/[, ]+/g,""),10)||0,n);return function(n){var i=e.donut.center.numberFormatter;t.text(i(r(n)))}},e}(aO),uO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return d(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||ed.default.size).attr("height",this.configs.size||ed.default.size).attr("opacity",0)},e}(Hw);function cO(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 lO(t,e){var n,r,i,o,a,s=new dO(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=fO);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 dO(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(pO)}function fO(t){return t.children}function hO(t){t.data=t.data.data}function pO(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dO(t){this.data=t,this.depth=this.height=0,this.parent=null}function vO(t){if("function"!=typeof t)throw new Error;return t}function gO(){return 0}function yO(t){return function(){return t}}function _O(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 mO(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 bO(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}dO.prototype=lO.prototype={constructor:dO,count:function(){return this.eachAfter(cO)},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 lO(this).eachBefore(hO)}};var xO=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,c,l,f,h,p,d,v,g,y=[],_=e.children,m=0,b=0,x=_.length,w=e.value;m<x;){u=i-n,c=o-r;do{l=_[b++].value}while(!l&&b<x);for(f=h=l,g=l*l*(v=Math.max(c/u,u/c)/(w*t)),d=Math.max(h/g,g/f);b<x;++b){if(l+=s=_[b].value,s<f&&(f=s),s>h&&(h=s),g=l*l*v,(p=Math.max(h/g,g/f))>d){l-=s;break}d=p}y.push(a={value:l,dice:u<c,children:_.slice(m,b)}),a.dice?mO(a,n,r,i,w?r+=c*l/w:o):bO(a,n,r,w?n+=u*l/w:i,o),w-=l,m=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 wO(){var t=xO,e=!1,n=1,r=1,i=[0],o=gO,a=gO,s=gO,u=gO,c=gO;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(_O),t}function f(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),e.x0=r,e.y0=l,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,(f-=s(e)-n)<r&&(r=f=(r+f)/2),(h-=u(e)-n)<l&&(l=h=(l+h)/2),t(e,r,l,f,h))}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=vO(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:yO(+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:yO(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:yO(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:yO(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:yO(+t),l):c},l}var OO=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===l.ROW_REVERSE||a.configs.direction===l.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return d(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=kp.getProperty(t,"data","growth","x");return e===f.PREFERRED||e===f.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 kp.getProperty(t,"data","growth","x")===f.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=ob.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=lO({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===l.ROW||this.configs.direction===l.ROW_REVERSE?mO:bO;wO().tile(s).size([i,o])(a);var u=this.configs.direction===l.ROW||this.configs.direction===l.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(jm(n));var i=kp.getProperty(e,"data","growth","x");i!==f.PREFERRED&&i!==f.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=kp.getProperty(t,"data","growth","x"),n=ob.getSVGElementSize(jm(this),{useBBox:!0});if(e===f.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),c.exit().remove(),this.children.filter((function(t){return kp.getProperty(t,"growth","x")===f.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=lO({children:this.children}).sum((function(t){return t.size})),wO().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){kp.getProperty(e,"data","growth","x")===f.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}(Hw),EO=Array.prototype.slice;function TO(t){return t}var MO=1,AO=2,SO=3,kO=4,LO=1e-6;function CO(t){return"translate("+(t+.5)+",0)"}function jO(t){return"translate(0,"+(t+.5)+")"}function DO(t){return function(e){return+t(e)}}function PO(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function RO(){return!this.__axis}function IO(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=t===MO||t===kO?-1:1,c=t===kO||t===AO?"x":"y",l=t===MO||t===SO?CO:jO;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):TO:i,d=Math.max(o,0)+s,v=e.range(),g=+v[0]+.5,y=+v[v.length-1]+.5,_=(e.bandwidth?PO:DO)(e.copy()),m=f.selection?f.selection():f,b=m.selectAll(".domain").data([null]),x=m.selectAll(".tick").data(h,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*d).attr("dy",t===MO?"0em":t===SO?"0.71em":"0.32em")),f!==m&&(b=b.transition(f),x=x.transition(f),E=E.transition(f),T=T.transition(f),w=w.transition(f).attr("opacity",LO).attr("transform",(function(t){return isFinite(t=_(t))?l(t):this.getAttribute("transform")})),O.attr("opacity",LO).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:_(t))}))),w.remove(),b.attr("d",t===kO||t==AO?a?"M"+u*a+","+g+"H0.5V"+y+"H"+u*a:"M0.5,"+g+"V"+y:a?"M"+g+","+u*a+"V0.5H"+y+"V"+u*a:"M"+g+",0.5H"+y),x.attr("opacity",1).attr("transform",(function(t){return l(_(t))})),E.attr(c+"2",u*o),T.attr(c,u*d).text(p),m.filter(RO).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===AO?"start":t===kO?"end":"middle"),m.each((function(){this.__axis=_}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=EO.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:EO.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:EO.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f}function NO(t){return IO(MO,t)}function BO(t){return IO(AO,t)}function FO(t){return IO(SO,t)}function zO(t){return IO(kO,t)}var GO=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return d(n,t),n.prototype.createOrGetScale=function(){var t,e,n=this.configs.position,r=kp.getProperty(this.model.getOptions(),"axes",n);if(this.scaleType=r&&r.scaleType?r.scaleType:o.LINEAR,e=this.scaleType===o.TIME?b_():this.scaleType===o.LOG?function t(){var e=Eg(Jv()).domain([1,10]);return e.copy=function(){return Kv(e,t()).base(e.base())},Id.apply(e,arguments),e}().base(r.base||10):this.scaleType===o.LABELS?Yd():gg(),!this.model.get(n)){var a=((t={})[n]=this,t);r&&(!0===r.primary&&(a[i.PRIMARY]=this),!0===r.secondary&&(a[i.SECONDARY]=this)),this.model.set(a,!0)}return this.scale=e,e},n.prototype.getScale=function(){return this.scale?this.scale:this.createOrGetScale()},n.prototype.getScaleDomain=function(){var t,e=this.model.getOptions(),n=this.configs.position,r=kp.getProperty(e,"axes",n),i=this.model.getDisplayData(),a=i.datasets,s=i.labels;if(r&&r.scaleType===o.LABELS)return s||this.model.getDisplayData().datasets[0].data.map((function(t,e){return e+1}));if(r.stacked)t=kd(s.reduce((function(t,e,n){var r=a.map((function(t){return isNaN(t.data[n])?t.data[n].value:t.data[n]})),i=r.reduce((function(t,e){return t+e}),0);return t.concat(i,function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(r))}),[]).concat(0));else{var u=a.reduce((function(t,e){return e.data.forEach((function(e){t=r.scaleType===o.TIME?t.concat(e.date):t.concat(isNaN(e)?e.value:e)})),t}),[]);r.scaleType!==o.TIME&&(u=u.concat(0)),t=kd(u)}if(r.scaleType===o.TIME){if(kp.getProperty(e,"timeScale","addSpaceOnEdges")){var c=t[0],l=t[1];c.setDate(c.getDate()-1),l.setDate(l.getDate()+1)}return[new Date(t[0]),new Date(t[1])]}return t[1]=1.1*t[1],t},n.prototype.render=function(t){void 0===t&&(t=!0);var n,i,a=this.configs.position,s=this.model.getOptions(),u=kp.getProperty(s,"axes",a),c=this.getContainerSVG(),l=ob.getSVGElementSize(this.parent,{useAttrs:!0}),f=l.width,h=l.height;a===r.BOTTOM||a===r.TOP?(n=this.configs.axes[r.LEFT]?this.margins.left:0,i=this.configs.axes[r.RIGHT]?f-this.margins.right:f):(n=h-this.margins.bottom,i=this.margins.top);var p,d=this.createOrGetScale().domain(this.getScaleDomain());switch(this.scaleType===o.LABELS?d.rangeRound([n,i]):d.range([n,i]),a){case r.LEFT:p=zO;break;case r.BOTTOM:p=FO;break;case r.RIGHT:p=BO;break;case r.TOP:p=NO}if(this.scaleType===o.TIME){var v=kp.getProperty(s,"locale","time");v&&l_(v)}var g=p(d).tickSizeOuter(0).tickFormat(kp.getProperty(u,"ticks","formatter"));if(d.ticks){var y=kp.getProperty(u,"ticks","number")||td.ticks.number;if(g.ticks(y),this.scaleType===o.TIME){var _=d.ticks(y).concat(d.domain()).map((function(t){return+t})).sort();_=kp.removeArrayDuplicates(_),kp.getProperty(s,"timeScale","addSpaceOnEdges")&&_.length>2&&(_.splice(_.length-1,1),_.splice(0,1)),g.tickValues(_)}}var m=ob.appendOrSelect(c,"g.axis."+a),b=!m.select("g.ticks").empty(),x=ob.appendOrSelect(m,"g.ticks");b||x.attr("role",e.GRAPHICS_OBJECT+" "+e.GROUP);var w=ob.appendOrSelect(m,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0);switch(a){case r.LEFT:x.attr("transform","translate("+this.margins.left+", 0)");break;case r.BOTTOM:x.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case r.RIGHT:x.attr("transform","translate("+(f-this.margins.right)+", 0)");break;case r.TOP:x.attr("transform","translate(0, "+this.margins.top+")")}if(u.title){var O=ob.appendOrSelect(m,"text.axis-title").text(u.title);switch(a){case r.LEFT:O.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case r.BOTTOM:O.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+h+")").style("text-anchor","middle");break;case r.RIGHT:O.attr("transform","rotate(90)").attr("y",-f).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case r.TOP:var E=ob.getSVGElementSize(O,{useBBox:!0}).height;O.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+E/2+")").style("text-anchor","middle")}}if(x=t&&b?x.transition(this.services.transitions.getTransition("axis-update")).call(g):x.call(g),w.call(g),a===r.BOTTOM||a===r.TOP){var T=!1;if(d.step){T=w.selectAll("g.tick text").nodes().some((function(t){return ob.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var M=kp.getProperty(u,"ticks","rotateIfSmallerThan")||td.ticks.rotateIfSmallerThan;T=f/d.ticks().length/2<M}T?m.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",a===r.TOP?"end":"start"):m.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}},n.prototype.getValueFromScale=function(t,e){var n=isNaN(t)?t.value:t;if(this.scaleType===o.LABELS){var r=this.model.getDisplayData().labels[e];return this.scale(r)+this.scale.step()/2}return this.scaleType===o.TIME?this.scale(new Date(t.date||t.label)):this.scale(n)},n.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},n.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},n}(Hw),WO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.children={},e.margins={top:0,right:0,bottom:0,left:0},e}return d(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},i=Object.keys(r),a=kp.getProperty(this.model.getOptions(),"axes");a?i.forEach((function(t){var e=a[r[t]];e&&(n[r[t]]=!0,!0===e.primary||e.secondary)})):(this.model.getOptions().axes={left:{primary:!0},bottom:{secondary:!0,type:this.model.getDisplayData().labels?o.LABELS:void 0}},n[r.LEFT]=!0,n[r.BOTTOM]=!0),this.configs.axes=n,i.forEach((function(t){var n=r[t];if(e.configs.axes[n]&&!e.children[n]){var i=new GO(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});i.setModel(e.model),i.setServices(e.services),i.setParent(e.parent),e.children[n]=i}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var s={};Object.keys(this.children).forEach((function(t){var n,i=e.children[t],o=i.configs.position,a=i.getInvisibleAxisRef(),u=ob.getSVGElementSize(a,{useBBox:!0}),c=u.width,l=u.height;switch(n=i.getTitleRef().empty()?0:ob.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o){case r.TOP:s.top=l+n;break;case r.BOTTOM:s.bottom=l+n;break;case r.LEFT:s.left=c+n;break;case r.RIGHT:s.right=c+n}})),Object.keys(s).some((function(t){return e.margins[t]!==s[t]}))&&(this.margins=Object.assign(this.margins,s),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Hw),VO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return d(e,t),e.prototype.render=function(){this.drawBackdrop(),ob.appendOrSelect(this.backdrop,"g.x.grid"),ob.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(),this.drawYGrid(),kp.getProperty(this.model.getOptions(),"tooltip","gridline","enabled")&&this.addGridEventListeners()},e.prototype.drawXGrid=function(){var t=this.parent,e=this.backdrop.attr("height"),n=FO(this.services.axes.getMainXAxis().getScale()).tickSizeInner(-e).tickSizeOuter(0),r=kp.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");n.ticks(r);var i=t.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+e+")").call(n);this.cleanGrid(i)},e.prototype.drawYGrid=function(){var t=this.parent,e=this.backdrop.attr("width"),n=zO(this.services.axes.getMainYAxis().getScale()).tickSizeInner(-e).tickSizeOuter(0),r=kp.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");n.ticks(r);var i=t.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")").call(n);this.cleanGrid(i)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(kp.getTranslationValues(t).tx)-Number(kp.getTranslationValues(e).tx)})),i=-1;r.forEach((function(e,n){t[0]>=+kp.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=+kp.getTranslationValues(s).tx-+kp.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=ob.getSVGElementSize(u).width-+kp.getTranslationValues(a).tx}else o=+kp.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold},e.prototype.getActiveGridline=function(t){var e=kp.getProperty(this.model.getOptions,"tooltip","gridline","threshold")?kp.getProperty(this.model.getOptions,"tooltip","gridline","threshold"):this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var n=kp.getTranslationValues(this),r=Number(n.tx)-e,i=Number(n.tx)+e;return r<=t[0]&&t[0]<=i}))},e.prototype.addGridEventListeners=function(){var t=this,e=this.parent;ob.appendOrSelect(e,"rect.chart-grid-backdrop").on("mousemove mouseover",(function(){var n=Pm(t.services.domUtils.getMainSVG()),r=jm(this);e.selectAll(".x.grid .tick").classed("active",!1);var i,o=t.getActiveGridline(n);o.empty()?t.services.events.dispatchEvent("hide-tooltip",{}):(o.classed("active",!0),o.each((function(e){i=t.services.axes.getDataFromDomain(e)})),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:r,multidata:i,type:s.GRIDLINE}))})).on("mouseout",(function(){e.selectAll(".x.grid .tick").classed("active",!1),t.services.events.dispatchEvent("hide-tooltip",{})}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.axes.getMainXAxis().getScale(),n=this.services.axes.getMainYAxis().getScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=ob.appendOrSelect(t,"svg.chart-grid-backdrop");var c=ob.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}(Hw),HO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="horizontal-zero-line",e}return d(e,t),e.prototype.render=function(t){var e=this.getContainerSVG(),n=this.services.axes.getMainXAxis().scale.range(),r=n[0],i=n[1],o=this.services.axes.getYValue(0)+.5;ob.appendOrSelect(e,"line.domain").transition(this.services.transitions.getTransition("horizontal-line-update",t)).attr("y1",o).attr("y2",o).attr("x1",r).attr("x2",i)},e}(Hw),UO=function(){function t(t,e){this.services={domUtils:ob,events:ab,transitions:gx},this.model=new x_(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener("model-update",(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener("chart-resize",(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent("render-finished")}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new Yw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},n={id:"legend",components:[new Uw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},r={id:"graph-frame",components:t,growth:{x:f.STRETCH,y:f.FIXED}},i=l.COLUMN,o=kp.getProperty(this.model.getOptions(),"legend","position");"left"===o?(i=l.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):"right"===o?(i=l.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):"bottom"===o&&(i=l.COLUMN_REVERSE);var a={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},s={id:"full-frame",components:[new OO(this.model,this.services,[n,a,r],{direction:i})],growth:{x:f.STRETCH,y:f.FIXED}},u=[];if(this.model.getOptions().title){u.push(e);var h={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}};u.push(h)}return u.push(s),[new OO(this.model,this.services,u,{direction:l.COLUMN})]},t}(),YO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{axes:yx,curves:Vw}),r}return d(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new Yw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},n={id:"legend",components:[new Uw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},r={id:"graph-frame",components:t,growth:{x:f.STRETCH,y:f.FIXED}},i=l.COLUMN,o=kp.getProperty(this.model.getOptions(),"legend","position");o===u.LEFT?(i=l.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):o===u.RIGHT?(i=l.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):o===u.BOTTOM&&(i=l.COLUMN_REVERSE);var a={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},s={id:"full-frame",components:[new OO(this.model,this.services,[n,a,r],{direction:i})],growth:{x:f.STRETCH,y:f.FIXED}},h=[];if(this.model.getOptions().title){h.push(e);var p={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}};h.push(p)}return h.push(s),[new OO(this.model,this.services,h,{direction:l.COLUMN})]},e}(UO),XO=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Ip.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Ip.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=kp.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Ud().range(t.fillColors).domain(this.allDataLabels);else{var e=Ed;this.colorScale=Ud().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(x_),qO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new XO(r.services),r.model.setOptions(kp.merge(kp.clone(Kp.simpleBarChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new tO(this.model,this.services),new HO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Kw(this.model,this.services)),e},e}(YO),$O=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.groupedBarChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new eO(this.model,this.services),new HO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Kw(this.model,this.services)),e},e}(YO),ZO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.stackedBarChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new nO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Kw(this.model,this.services)),e},e}(YO),KO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.lineChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new rO(this.model,this.services),new iO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Jw(this.model,this.services)),e},e}(YO),JO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.scatterChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new iO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Jw(this.model,this.services)),e},e}(YO),QO=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Ip.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Ip.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=kp.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.toggleDataLabel=function(t){var e=Ip.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Ud().range(t.fillColors).domain(this.allDataLabels);else{var e=Ed;this.colorScale=Ud().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(x_),tE=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new QO(i.services),r?i:(i.model.setOptions(kp.merge(kp.clone(Kp.pieChart),n.options)),i.init(e,n),i)}return d(e,t),e.prototype.getComponents=function(){var t=[new aO(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Zw(this.model,this.services)),e},e}(UO),eE=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.donutChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new sO(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Zw(this.model,this.services)),e},e}(tE),nE=Ed;t.DonutChart=eE,t.GroupedBarChart=$O,t.LineChart=KO,t.PieChart=tE,t.ScatterChart=JO,t.SimpleBarChart=qO,t.StackedBarChart=ZO,t.colorPalettes=Td,t.configurations=nd,t.defaultColors=nE,t.interfaces=v,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
25
|
+
var Sp,kp,Lp=Array.prototype,Cp=Object.prototype.hasOwnProperty,jp=m?m.iterator:void 0,Dp=Math.max,Pp=Math.min,Rp=function(t){return function(e,n,r){if(null==r){var i=W(n),o=i&&Fn(n),a=o&&o.length&&$u(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(yl);Ht.after=pp.after,Ht.ary=pp.ary,Ht.assign=mp.assign,Ht.assignIn=mp.assignIn,Ht.assignInWith=mp.assignInWith,Ht.assignWith=mp.assignWith,Ht.at=mp.at,Ht.before=pp.before,Ht.bind=pp.bind,Ht.bindAll=wp.bindAll,Ht.bindKey=pp.bindKey,Ht.castArray=dp.castArray,Ht.chain=bp.chain,Ht.chunk=lp.chunk,Ht.compact=lp.compact,Ht.concat=lp.concat,Ht.cond=wp.cond,Ht.conforms=wp.conforms,Ht.constant=wp.constant,Ht.countBy=fp.countBy,Ht.create=mp.create,Ht.curry=pp.curry,Ht.curryRight=pp.curryRight,Ht.debounce=pp.debounce,Ht.defaults=mp.defaults,Ht.defaultsDeep=mp.defaultsDeep,Ht.defer=pp.defer,Ht.delay=pp.delay,Ht.difference=lp.difference,Ht.differenceBy=lp.differenceBy,Ht.differenceWith=lp.differenceWith,Ht.drop=lp.drop,Ht.dropRight=lp.dropRight,Ht.dropRightWhile=lp.dropRightWhile,Ht.dropWhile=lp.dropWhile,Ht.fill=lp.fill,Ht.filter=fp.filter,Ht.flatMap=fp.flatMap,Ht.flatMapDeep=fp.flatMapDeep,Ht.flatMapDepth=fp.flatMapDepth,Ht.flatten=lp.flatten,Ht.flattenDeep=lp.flattenDeep,Ht.flattenDepth=lp.flattenDepth,Ht.flip=pp.flip,Ht.flow=wp.flow,Ht.flowRight=wp.flowRight,Ht.fromPairs=lp.fromPairs,Ht.functions=mp.functions,Ht.functionsIn=mp.functionsIn,Ht.groupBy=fp.groupBy,Ht.initial=lp.initial,Ht.intersection=lp.intersection,Ht.intersectionBy=lp.intersectionBy,Ht.intersectionWith=lp.intersectionWith,Ht.invert=mp.invert,Ht.invertBy=mp.invertBy,Ht.invokeMap=fp.invokeMap,Ht.iteratee=wp.iteratee,Ht.keyBy=fp.keyBy,Ht.keys=Fn,Ht.keysIn=mp.keysIn,Ht.map=fp.map,Ht.mapKeys=mp.mapKeys,Ht.mapValues=mp.mapValues,Ht.matches=wp.matches,Ht.matchesProperty=wp.matchesProperty,Ht.memoize=pp.memoize,Ht.merge=mp.merge,Ht.mergeWith=mp.mergeWith,Ht.method=wp.method,Ht.methodOf=wp.methodOf,Ht.mixin=Rp,Ht.negate=bl,Ht.nthArg=wp.nthArg,Ht.omit=mp.omit,Ht.omitBy=mp.omitBy,Ht.once=pp.once,Ht.orderBy=fp.orderBy,Ht.over=wp.over,Ht.overArgs=pp.overArgs,Ht.overEvery=wp.overEvery,Ht.overSome=wp.overSome,Ht.partial=pp.partial,Ht.partialRight=pp.partialRight,Ht.partition=fp.partition,Ht.pick=mp.pick,Ht.pickBy=mp.pickBy,Ht.property=wp.property,Ht.propertyOf=wp.propertyOf,Ht.pull=lp.pull,Ht.pullAll=lp.pullAll,Ht.pullAllBy=lp.pullAllBy,Ht.pullAllWith=lp.pullAllWith,Ht.pullAt=lp.pullAt,Ht.range=wp.range,Ht.rangeRight=wp.rangeRight,Ht.rearg=pp.rearg,Ht.reject=fp.reject,Ht.remove=lp.remove,Ht.rest=pp.rest,Ht.reverse=lp.reverse,Ht.sampleSize=fp.sampleSize,Ht.set=mp.set,Ht.setWith=mp.setWith,Ht.shuffle=fp.shuffle,Ht.slice=lp.slice,Ht.sortBy=fp.sortBy,Ht.sortedUniq=lp.sortedUniq,Ht.sortedUniqBy=lp.sortedUniqBy,Ht.split=xp.split,Ht.spread=pp.spread,Ht.tail=lp.tail,Ht.take=lp.take,Ht.takeRight=lp.takeRight,Ht.takeRightWhile=lp.takeRightWhile,Ht.takeWhile=lp.takeWhile,Ht.tap=bp.tap,Ht.throttle=pp.throttle,Ht.thru=Eh,Ht.toArray=dp.toArray,Ht.toPairs=mp.toPairs,Ht.toPairsIn=mp.toPairsIn,Ht.toPath=wp.toPath,Ht.toPlainObject=dp.toPlainObject,Ht.transform=mp.transform,Ht.unary=pp.unary,Ht.union=lp.union,Ht.unionBy=lp.unionBy,Ht.unionWith=lp.unionWith,Ht.uniq=lp.uniq,Ht.uniqBy=lp.uniqBy,Ht.uniqWith=lp.uniqWith,Ht.unset=mp.unset,Ht.unzip=lp.unzip,Ht.unzipWith=lp.unzipWith,Ht.update=mp.update,Ht.updateWith=mp.updateWith,Ht.values=mp.values,Ht.valuesIn=mp.valuesIn,Ht.without=lp.without,Ht.words=xp.words,Ht.wrap=pp.wrap,Ht.xor=lp.xor,Ht.xorBy=lp.xorBy,Ht.xorWith=lp.xorWith,Ht.zip=lp.zip,Ht.zipObject=lp.zipObject,Ht.zipObjectDeep=lp.zipObjectDeep,Ht.zipWith=lp.zipWith,Ht.entries=mp.toPairs,Ht.entriesIn=mp.toPairsIn,Ht.extend=mp.assignIn,Ht.extendWith=mp.assignInWith,Rp(Ht,Ht),Ht.add=vp.add,Ht.attempt=wp.attempt,Ht.camelCase=xp.camelCase,Ht.capitalize=xp.capitalize,Ht.ceil=vp.ceil,Ht.clamp=gp,Ht.clone=dp.clone,Ht.cloneDeep=dp.cloneDeep,Ht.cloneDeepWith=dp.cloneDeepWith,Ht.cloneWith=dp.cloneWith,Ht.conformsTo=dp.conformsTo,Ht.deburr=xp.deburr,Ht.defaultTo=wp.defaultTo,Ht.divide=vp.divide,Ht.endsWith=xp.endsWith,Ht.eq=dp.eq,Ht.escape=xp.escape,Ht.escapeRegExp=xp.escapeRegExp,Ht.every=fp.every,Ht.find=fp.find,Ht.findIndex=lp.findIndex,Ht.findKey=mp.findKey,Ht.findLast=fp.findLast,Ht.findLastIndex=lp.findLastIndex,Ht.findLastKey=mp.findLastKey,Ht.floor=vp.floor,Ht.forEach=fp.forEach,Ht.forEachRight=fp.forEachRight,Ht.forIn=mp.forIn,Ht.forInRight=mp.forInRight,Ht.forOwn=mp.forOwn,Ht.forOwnRight=mp.forOwnRight,Ht.get=mp.get,Ht.gt=dp.gt,Ht.gte=dp.gte,Ht.has=mp.has,Ht.hasIn=mp.hasIn,Ht.head=lp.head,Ht.identity=et,Ht.includes=fp.includes,Ht.indexOf=lp.indexOf,Ht.inRange=yp,Ht.invoke=mp.invoke,Ht.isArguments=dp.isArguments,Ht.isArray=R,Ht.isArrayBuffer=dp.isArrayBuffer,Ht.isArrayLike=dp.isArrayLike,Ht.isArrayLikeObject=dp.isArrayLikeObject,Ht.isBoolean=dp.isBoolean,Ht.isBuffer=dp.isBuffer,Ht.isDate=dp.isDate,Ht.isElement=dp.isElement,Ht.isEmpty=dp.isEmpty,Ht.isEqual=dp.isEqual,Ht.isEqualWith=dp.isEqualWith,Ht.isError=dp.isError,Ht.isFinite=dp.isFinite,Ht.isFunction=dp.isFunction,Ht.isInteger=dp.isInteger,Ht.isLength=dp.isLength,Ht.isMap=dp.isMap,Ht.isMatch=dp.isMatch,Ht.isMatchWith=dp.isMatchWith,Ht.isNaN=dp.isNaN,Ht.isNative=dp.isNative,Ht.isNil=dp.isNil,Ht.isNull=dp.isNull,Ht.isNumber=dp.isNumber,Ht.isObject=W,Ht.isObjectLike=dp.isObjectLike,Ht.isPlainObject=dp.isPlainObject,Ht.isRegExp=dp.isRegExp,Ht.isSafeInteger=dp.isSafeInteger,Ht.isSet=dp.isSet,Ht.isString=dp.isString,Ht.isSymbol=dp.isSymbol,Ht.isTypedArray=dp.isTypedArray,Ht.isUndefined=dp.isUndefined,Ht.isWeakMap=dp.isWeakMap,Ht.isWeakSet=dp.isWeakSet,Ht.join=lp.join,Ht.kebabCase=xp.kebabCase,Ht.last=Ks,Ht.lastIndexOf=lp.lastIndexOf,Ht.lowerCase=xp.lowerCase,Ht.lowerFirst=xp.lowerFirst,Ht.lt=dp.lt,Ht.lte=dp.lte,Ht.max=vp.max,Ht.maxBy=vp.maxBy,Ht.mean=vp.mean,Ht.meanBy=vp.meanBy,Ht.min=vp.min,Ht.minBy=vp.minBy,Ht.stubArray=wp.stubArray,Ht.stubFalse=wp.stubFalse,Ht.stubObject=wp.stubObject,Ht.stubString=wp.stubString,Ht.stubTrue=wp.stubTrue,Ht.multiply=vp.multiply,Ht.nth=lp.nth,Ht.noop=wp.noop,Ht.now=hp.now,Ht.pad=xp.pad,Ht.padEnd=xp.padEnd,Ht.padStart=xp.padStart,Ht.parseInt=xp.parseInt,Ht.random=_p,Ht.reduce=fp.reduce,Ht.reduceRight=fp.reduceRight,Ht.repeat=xp.repeat,Ht.replace=xp.replace,Ht.result=mp.result,Ht.round=vp.round,Ht.sample=fp.sample,Ht.size=fp.size,Ht.snakeCase=xp.snakeCase,Ht.some=fp.some,Ht.sortedIndex=lp.sortedIndex,Ht.sortedIndexBy=lp.sortedIndexBy,Ht.sortedIndexOf=lp.sortedIndexOf,Ht.sortedLastIndex=lp.sortedLastIndex,Ht.sortedLastIndexBy=lp.sortedLastIndexBy,Ht.sortedLastIndexOf=lp.sortedLastIndexOf,Ht.startCase=xp.startCase,Ht.startsWith=xp.startsWith,Ht.subtract=vp.subtract,Ht.sum=vp.sum,Ht.sumBy=vp.sumBy,Ht.template=xp.template,Ht.times=wp.times,Ht.toFinite=dp.toFinite,Ht.toInteger=Q,Ht.toLength=dp.toLength,Ht.toLower=xp.toLower,Ht.toNumber=dp.toNumber,Ht.toSafeInteger=dp.toSafeInteger,Ht.toString=dp.toString,Ht.toUpper=xp.toUpper,Ht.trim=xp.trim,Ht.trimEnd=xp.trimEnd,Ht.trimStart=xp.trimStart,Ht.truncate=xp.truncate,Ht.unescape=xp.unescape,Ht.uniqueId=wp.uniqueId,Ht.upperCase=xp.upperCase,Ht.upperFirst=xp.upperFirst,Ht.each=fp.forEach,Ht.eachRight=fp.forEachRight,Ht.first=lp.head,Rp(Ht,(Sp={},gs(Ht,(function(t,e){Cp.call(Ht.prototype,e)||(Sp[e]=t)})),Sp),{chain:!1}),Ht.VERSION="4.17.15",(Ht.templateSettings=xp.templateSettings).imports._=Ht,re(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Ht[t].placeholder=Ht})),re(["drop","take"],(function(t,e){Pt.prototype[t]=function(n){n=void 0===n?1:Dp(Q(n),0);var r=this.__filtered__&&!e?new Pt(this):this.clone();return r.__filtered__?r.__takeCount__=Pp(n,r.__takeCount__):r.__views__.push({size:Pp(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Pt.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),re(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Pt.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:cs(t),type:n}),e.__filtered__=e.__filtered__||r,e}})),re(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Pt.prototype[t]=function(){return this[n](1).value()[0]}})),re(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Pt.prototype[t]=function(){return this.__filtered__?new Pt(this):this[n](1)}})),Pt.prototype.compact=function(){return this.filter(et)},Pt.prototype.find=function(t){return this.filter(t).head()},Pt.prototype.findLast=function(t){return this.reverse().find(t)},Pt.prototype.invokeMap=on((function(t,e){return"function"==typeof t?new Pt(this):this.map((function(n){return Mc(n,t,e)}))})),Pt.prototype.reject=function(t){return this.filter(bl(cs(t)))},Pt.prototype.slice=function(t,e){t=Q(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Pt(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=Q(e))<0?n.dropRight(-e):n.take(e-t)),n)},Pt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Pt.prototype.toArray=function(){return this.take(4294967295)},gs(Pt.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Ht[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Ht.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,s=e instanceof Pt,u=a[0],c=s||R(e),l=function(t){var e=i.apply(Ht,wr([t],a));return r&&f?e[0]:e};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,h=!!this.__actions__.length,p=o&&!f,d=s&&!h;if(!o&&c){e=d?e:new Pt(this);var v=t.apply(e,a);return v.__actions__.push({func:Eh,args:[l],thisArg:void 0}),new zt(v,f)}return p&&d?t.apply(this,a):(v=this.thru(l),p?r?v.value()[0]:v.value():v)})})),re(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Lp[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Ht.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(R(i)?i:[],t)}return this[n]((function(n){return e.apply(R(n)?n:[],t)}))}})),gs(Pt.prototype,(function(t,e){var n=Ht[e];if(n){var r=n.name+"";Cp.call(Nt,r)||(Nt[r]=[]),Nt[r].push({name:e,func:n})}})),Nt[Le(void 0,2).name]=[{name:"wrapper",func:void 0}],Pt.prototype.clone=function(){var t=new Pt(this.__wrapped__);return t.__actions__=Gt(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Gt(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Gt(this.__views__),t},Pt.prototype.reverse=function(){if(this.__filtered__){var t=new Pt(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Pt.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=R(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Ep(e,t+a);break;case"takeRight":t=Op(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,p=Ap(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return Sh(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var v=-1,g=t[c+=e];++v<f;){var y=l[v],_=y.iteratee,m=y.type,b=_(g);if(m==Mp)g=b;else if(!b){if(m==Tp)continue t;break t}}d[h++]=g}return d},Ht.prototype.at=bp.at,Ht.prototype.chain=bp.wrapperChain,Ht.prototype.commit=bp.commit,Ht.prototype.next=bp.next,Ht.prototype.plant=bp.plant,Ht.prototype.reverse=bp.reverse,Ht.prototype.toJSON=Ht.prototype.valueOf=Ht.prototype.value=bp.value,Ht.prototype.first=Ht.prototype.head,jp&&(Ht.prototype[jp]=bp.toIterator),function(t){t.debounce=Cs,t.clone=fa,t.merge=dl,t.removeArrayDuplicates=qh,t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n<1?n.toPrecision(1):Math.floor(n)},t.arrayDifferences=function(t,e){var n={missing:[],added:[]};return t.forEach((function(t){-1===e.indexOf(t)&&n.missing.push(t)})),e.forEach((function(e){-1===t.indexOf(e)&&n.added.push(e)})),n},t.getDuplicateValues=function(t){var e=[],n=[];return t.forEach((function(t){-1!==e.indexOf(t)&&-1===n.indexOf(t)&&n.push(t),e.push(t)})),n},t.moveToFront=function(t){return t.each((function(){this.parentNode.appendChild(this)}))},t.getProperty=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(!r[a])return null;r=r[a]}return r}return null}}(kp||(kp={}));var Ip={position:u.BOTTOM,clickable:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Np={x:{numberOfTicks:5},y:{numberOfTicks:5}},Bp={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},Fp=kp.merge({},Bp,{gridline:{enabled:!0,threshold:.25}}),zp=kp.merge({},Fp,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),Gp={addSpaceOnEdges:!0},Wp={width:"100%",height:"100%",resizable:!0,theme:n.DEFAULT,tooltip:Bp,legend:Ip,style:{prefix:"cc"}},Vp=kp.merge({},Wp,{axes:{},timeScale:Gp,grid:Np,tooltip:Fp}),Hp=kp.merge({},Vp,{bars:{maxWidth:16},timeScale:kp.merge(Gp,{addSpaceOnEdges:!0}),tooltip:zp}),Up=kp.merge({},Hp,{}),Yp=kp.merge({},Hp,{}),Xp=kp.merge({},Hp,{bars:kp.merge({},Hp.bars,{dividerSize:1.5})}),qp=kp.merge({},Vp,{points:{radius:3,filled:!1}}),$p=kp.merge({},Vp,{points:{radius:4,fillOpacity:.3,filled:!0}}),Zp=kp.merge({},Wp,{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}}}),Kp={chart:Wp,axisChart:Vp,simpleBarChart:Up,groupedBarChart:Yp,stackedBarChart:Xp,lineChart:qp,scatterChart:$p,pieChart:Zp,donutChart:kp.merge({},Zp,{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()}}}})},Jp={opacity:{unselected:.3,selected:1}},Qp={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}},td={ticks:{number:7,rotateIfSmallerThan:30}},ed={default:{size:24}},nd=Object.freeze({__proto__:null,legend:Ip,grid:Np,baseTooltip:Bp,axisChartTooltip:Fp,barChartTooltip:zp,options:Kp,lines:Jp,transitions:Qp,axis:td,spacers:ed});var rd=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},r={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},i={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},o={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},a={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},s={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},u={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},c={10:"#f2f4f8",20:"#d5d9e0",30:"#b9bfc7",40:"#9fa5ad",50:"#868d95",60:"#697077",70:"#50565b",80:"#373d42",90:"#242a2e",100:"#13171a"},l={10:"#f3f3f3",20:"#dcdcdc",30:"#bebebe",40:"#a4a4a4",50:"#8c8c8c",60:"#6f6f6f",70:"#565656",80:"#3d3d3d",90:"#282828",100:"#171717"},f={10:"#f7f3f1",20:"#e0dbda",30:"#c1bcbb",40:"#a7a2a2",50:"#8f8b8b",60:"#726e6e",70:"#595555",80:"#403c3c",90:"#2b2828",100:"#1a1717"},h={black:{100:"#000000"},blue:o,coolGray:c,cyan:a,gray:l,green:u,magenta:r,orange:{40:"#fc7b1e"},purple:i,red:n,teal:s,warmGray:f,white:{0:"#ffffff"},yellow:{20:"#fdd13a"}};e.black="#000000",e.black100="#000000",e.white="#ffffff",e.white0="#ffffff",e.yellow="#fdd13a",e.yellow20="#fdd13a",e.orange="#fc7b1e",e.orange40="#fc7b1e",e.red10="#fff0f1",e.red20="#fcd0d3",e.red30="#ffa4a9",e.red40="#ff767c",e.red50="#fb4b53",e.red60="#da1e28",e.red70="#a51920",e.red80="#750e13",e.red90="#570408",e.red100="#2c080a",e.red=n,e.magenta10="#fff0f6",e.magenta20="#ffcfe1",e.magenta30="#ffa0c2",e.magenta40="#fa75a6",e.magenta50="#ee538b",e.magenta60="#d12765",e.magenta70="#a11950",e.magenta80="#760a3a",e.magenta90="#57002b",e.magenta100="#2a0a16",e.magenta=r,e.purple10="#f7f1ff",e.purple20="#e6d6ff",e.purple30="#d0b0ff",e.purple40="#bb8eff",e.purple50="#a66efa",e.purple60="#8a3ffc",e.purple70="#6e32c9",e.purple80="#4f2196",e.purple90="#38146b",e.purple100="#1e1033",e.purple=i,e.blue10="#edf4ff",e.blue20="#c9deff",e.blue30="#97c1ff",e.blue40="#6ea6ff",e.blue50="#408bfc",e.blue60="#0062ff",e.blue70="#054ada",e.blue80="#0530ad",e.blue90="#061f80",e.blue100="#051243",e.blue=o,e.cyan10="#e3f6ff",e.cyan20="#b3e6ff",e.cyan30="#6ccaff",e.cyan40="#30b0ff",e.cyan50="#1191e6",e.cyan60="#0072c3",e.cyan70="#0058a1",e.cyan80="#003d73",e.cyan90="#002b50",e.cyan100="#07192b",e.cyan=a,e.teal10="#dbfbfb",e.teal20="#92eeee",e.teal30="#20d5d2",e.teal40="#00bab6",e.teal50="#009c98",e.teal60="#007d79",e.teal70="#006161",e.teal80="#004548",e.teal90="#003137",e.teal100="#081a1c",e.teal=s,e.green10="#dafbe4",e.green20="#9deeb2",e.green30="#56d679",e.green40="#3dbb61",e.green50="#24a148",e.green60="#198038",e.green70="#10642a",e.green80="#054719",e.green90="#01330f",e.green100="#081b09",e.green=u,e.coolGray10="#f2f4f8",e.coolGray20="#d5d9e0",e.coolGray30="#b9bfc7",e.coolGray40="#9fa5ad",e.coolGray50="#868d95",e.coolGray60="#697077",e.coolGray70="#50565b",e.coolGray80="#373d42",e.coolGray90="#242a2e",e.coolGray100="#13171a",e.coolGray=c,e.gray10="#f3f3f3",e.gray20="#dcdcdc",e.gray30="#bebebe",e.gray40="#a4a4a4",e.gray50="#8c8c8c",e.gray60="#6f6f6f",e.gray70="#565656",e.gray80="#3d3d3d",e.gray90="#282828",e.gray100="#171717",e.gray=l,e.warmGray10="#f7f3f1",e.warmGray20="#e0dbda",e.warmGray30="#c1bcbb",e.warmGray40="#a7a2a2",e.warmGray50="#8f8b8b",e.warmGray60="#726e6e",e.warmGray70="#595555",e.warmGray80="#403c3c",e.warmGray90="#2b2828",e.warmGray100="#1a1717",e.warmGray=f,e.colors=h,e.rgba=function(t,e){var n=[t.substring(1,3),t.substring(3,5),t.substring(5,7)].map((function(t){return parseInt(t,16)}));return"rgba(".concat(n[0],", ").concat(n[1],", ").concat(n[2],", ").concat(e,")")}}));!function(t){t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")&&t.default}(rd);rd.black,rd.black100,rd.white,rd.white0,rd.yellow,rd.yellow20,rd.orange,rd.orange40,rd.red10,rd.red20,rd.red30,rd.red40,rd.red50,rd.red60,rd.red70,rd.red80,rd.red90,rd.red100;var id=rd.red,od=(rd.magenta10,rd.magenta20,rd.magenta30,rd.magenta40,rd.magenta50,rd.magenta60,rd.magenta70,rd.magenta80,rd.magenta90,rd.magenta100,rd.magenta),ad=(rd.purple10,rd.purple20,rd.purple30,rd.purple40,rd.purple50,rd.purple60,rd.purple70,rd.purple80,rd.purple90,rd.purple100,rd.purple),sd=(rd.blue10,rd.blue20,rd.blue30,rd.blue40,rd.blue50,rd.blue60,rd.blue70,rd.blue80,rd.blue90,rd.blue100,rd.blue),ud=(rd.cyan10,rd.cyan20,rd.cyan30,rd.cyan40,rd.cyan50,rd.cyan60,rd.cyan70,rd.cyan80,rd.cyan90,rd.cyan100,rd.cyan),cd=(rd.teal10,rd.teal20,rd.teal30,rd.teal40,rd.teal50,rd.teal60,rd.teal70,rd.teal80,rd.teal90,rd.teal100,rd.teal),ld=(rd.green10,rd.green20,rd.green30,rd.green40,rd.green50,rd.green60,rd.green70,rd.green80,rd.green90,rd.green100,rd.green),fd=(rd.coolGray10,rd.coolGray20,rd.coolGray30,rd.coolGray40,rd.coolGray50,rd.coolGray60,rd.coolGray70,rd.coolGray80,rd.coolGray90,rd.coolGray100,rd.coolGray,rd.gray10,rd.gray20,rd.gray30,rd.gray40,rd.gray50,rd.gray60,rd.gray70,rd.gray80,rd.gray90,rd.gray100,rd.gray,rd.warmGray10,rd.warmGray20,rd.warmGray30,rd.warmGray40,rd.warmGray50,rd.warmGray60,rd.warmGray70,rd.warmGray80,rd.warmGray90,rd.warmGray100,rd.warmGray,rd.colors,rd.rgba,function(t,e){return t[e]}),hd=function(t){return fd(sd,t)},pd=function(t){return fd(ud,t)},dd=function(t){return fd(ld,t)},vd=function(t){return fd(od,t)},gd=function(t){return fd(ad,t)},yd=function(t){return fd(id,t)},_d=function(t){return fd(cd,t)},md=[gd(70),pd(50),_d(70),vd(70),yd(50),yd(90),dd(60),hd(80),vd(50),"#b28600",_d(50),pd(90),"#8a3800",gd(50)],bd=[gd(60),pd(40),_d(60),vd(40),yd(50),yd(10),dd(30),hd(50),vd(60),"#d2a106",_d(40),pd(20),"#ba4e00",gd(30)],xd=md,wd=bd,Od=bd,Ed=md,Td=Object.freeze({__proto__:null,WHITE:md,DARK:bd,G10:xd,G90:wd,G100:Od,DEFAULT:Ed});function Md(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ad(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Md(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 Sd=Ad(Md).right;function kd(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]}var Ld=Math.sqrt(50),Cd=Math.sqrt(10),jd=Math.sqrt(2);function Dd(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=Pd(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 Pd(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>=Ld?10:o>=Cd?5:o>=jd?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Ld?10:o>=Cd?5:o>=jd?2:1)}function Rd(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>=Ld?i*=10:o>=Cd?i*=5:o>=jd&&(i*=2),e<t?-i:i}function Id(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Nd(){}function Bd(t,e){var n=new Nd;if(t instanceof Nd)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 Fd(){}Nd.prototype=Bd.prototype={constructor:Nd,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 zd=Bd.prototype;Fd.prototype=function(t,e){var n=new Fd;if(t instanceof Fd)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:Fd,has:zd.has,add:function(t){return this["$"+(t+="")]=t,this},remove:zd.remove,clear:zd.clear,values:zd.keys,size:zd.size,empty:zd.empty,each:zd.each};var Gd=Array.prototype,Wd=Gd.map,Vd=Gd.slice,Hd={name:"implicit"};function Ud(){var t=Bd(),e=[],n=[],r=Hd;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Hd)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=Bd();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=Vd.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ud(e,n).unknown(r)},Id.apply(i,arguments),i}function Yd(){var t,e,n=Ud().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],f=o[l-0],h=o[1-l];t=(h-f)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),f+=(h-f-t*(n-s))*c,e=t*(1-s),a&&(f=Math.round(f),e=Math.round(e));var p=function(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}(n).map((function(e){return f+t*e}));return i(l?p.reverse():p)}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 Yd(r(),o).round(a).paddingInner(s).paddingOuter(u).align(c)},Id.apply(l(),arguments)}function Xd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function qd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $d(){}var Zd="\\s*([+-]?\\d+)\\s*",Kd="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jd="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qd=/^#([0-9a-f]{3,8})$/,tv=new RegExp("^rgb\\("+[Zd,Zd,Zd]+"\\)$"),ev=new RegExp("^rgb\\("+[Jd,Jd,Jd]+"\\)$"),nv=new RegExp("^rgba\\("+[Zd,Zd,Zd,Kd]+"\\)$"),rv=new RegExp("^rgba\\("+[Jd,Jd,Jd,Kd]+"\\)$"),iv=new RegExp("^hsl\\("+[Kd,Jd,Jd]+"\\)$"),ov=new RegExp("^hsla\\("+[Kd,Jd,Jd,Kd]+"\\)$"),av={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 sv(){return this.rgb().formatHex()}function uv(){return this.rgb().formatRgb()}function cv(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Qd.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?lv(e):3===n?new pv(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new pv(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new pv(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=tv.exec(t))?new pv(e[1],e[2],e[3],1):(e=ev.exec(t))?new pv(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=nv.exec(t))?fv(e[1],e[2],e[3],e[4]):(e=rv.exec(t))?fv(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=iv.exec(t))?yv(e[1],e[2]/100,e[3]/100,1):(e=ov.exec(t))?yv(e[1],e[2]/100,e[3]/100,e[4]):av.hasOwnProperty(t)?lv(av[t]):"transparent"===t?new pv(NaN,NaN,NaN,0):null}function lv(t){return new pv(t>>16&255,t>>8&255,255&t,1)}function fv(t,e,n,r){return r<=0&&(t=e=n=NaN),new pv(t,e,n,r)}function hv(t,e,n,r){return 1===arguments.length?((i=t)instanceof $d||(i=cv(i)),i?new pv((i=i.rgb()).r,i.g,i.b,i.opacity):new pv):new pv(t,e,n,null==r?1:r);var i}function pv(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function dv(){return"#"+gv(this.r)+gv(this.g)+gv(this.b)}function vv(){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 gv(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function yv(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new mv(t,e,n,r)}function _v(t){if(t instanceof mv)return new mv(t.h,t.s,t.l,t.opacity);if(t instanceof $d||(t=cv(t)),!t)return new mv;if(t instanceof mv)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 mv(a,s,u,t.opacity)}function mv(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function bv(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 xv(t){return function(){return t}}function wv(t){return 1==(t=+t)?Ov: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):xv(isNaN(e)?n:e)}}function Ov(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):xv(isNaN(t)?e:t)}Xd($d,cv,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:sv,formatHex:sv,formatHsl:function(){return _v(this).formatHsl()},formatRgb:uv,toString:uv}),Xd(pv,hv,qd($d,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new pv(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new pv(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:dv,formatHex:dv,formatRgb:vv,toString:vv})),Xd(mv,(function(t,e,n,r){return 1===arguments.length?_v(t):new mv(t,e,n,null==r?1:r)}),qd($d,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new mv(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new mv(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 pv(bv(t>=240?t-240:t+120,i,r),bv(t,i,r),bv(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 Ev=function t(e){var n=wv(e);function r(t,e){var r=n((t=hv(t)).r,(e=hv(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Ov(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 Tv(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]=jv(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 Mv(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}}function Av(t,e){return e-=t=+t,function(n){return t+e*n}}function Sv(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]=jv(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var kv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Lv=new RegExp(kv.source,"g");function Cv(t,e){var n,r,i,o=kv.lastIndex=Lv.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=kv.exec(t))&&(r=Lv.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:Av(n,r)})),o=Lv.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 jv(t,e){var n,r=typeof e;return null==e||"boolean"===r?xv(e):("number"===r?Av:"string"===r?(n=cv(e))?(e=n,Ev):Cv:e instanceof cv?Ev:e instanceof Date?Mv:Array.isArray(e)?Tv:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Sv:Av)(t,e)}function Dv(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}}var Pv,Rv,Iv,Nv,Bv=180/Math.PI,Fv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zv(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)*Bv,skewX:Math.atan(u)*Bv,scaleX:a,scaleY:s}}function Gv(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:Av(t,i)},{i:u-2,x:Av(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:Av(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:Av(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:Av(t,n)},{i:s-2,x:Av(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 Wv=Gv((function(t){return"none"===t?Fv:(Pv||(Pv=document.createElement("DIV"),Rv=document.documentElement,Iv=document.defaultView),Pv.style.transform=t,t=Iv.getComputedStyle(Rv.appendChild(Pv),null).getPropertyValue("transform"),Rv.removeChild(Pv),zv(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Vv=Gv((function(t){return null==t?Fv:(Nv||(Nv=document.createElementNS("http://www.w3.org/2000/svg","g")),Nv.setAttribute("transform",t),(t=Nv.transform.baseVal.consolidate())?zv((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Fv)}),", ",")",")");function Hv(t){return+t}var Uv=[0,1];function Yv(t){return t}function Xv(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function qv(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 $v(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Xv(i,r),o=n(a,o)):(r=Xv(r,i),o=n(o,a)),function(t){return o(r(t))}}function Zv(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]=Xv(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Sd(t,e,1,r)-1;return o[n](i[n](e))}}function Kv(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Jv(){var t,e,n,r,i,o,a=Uv,s=Uv,u=jv,c=Yv;function l(){return r=Math.min(a.length,s.length)>2?Zv:$v,i=o=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return f.invert=function(n){return c(e((o||(o=r(s,a.map(t),Av)))(n)))},f.domain=function(t){return arguments.length?(a=Wd.call(t,Hv),c===Yv||(c=qv(a)),l()):a.slice()},f.range=function(t){return arguments.length?(s=Vd.call(t),l()):s.slice()},f.rangeRound=function(t){return s=Vd.call(t),u=Dv,l()},f.clamp=function(t){return arguments.length?(c=t?qv(a):Yv,f):c!==Yv},f.interpolate=function(t){return arguments.length?(u=t,l()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,l()}}function Qv(t,e){return Jv()(t,e)}function tg(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 eg(t){return(t=tg(Math.abs(t)))?t[1]:NaN}var ng,rg=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ig(t){if(!(e=rg.exec(t)))throw new Error("invalid format: "+t);var e;return new og({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 og(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 ag(t,e){var n=tg(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")}ig.prototype=og.prototype,og.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 sg={"%":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 ag(100*t,e)},r:ag,s:function(t,e){var n=tg(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ng=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")+tg(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 ug(t){return t}var cg,lg,fg,hg=Array.prototype.map,pg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dg(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ug:(e=hg.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?ug:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(hg.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 f(t){var e=(t=ig(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,v=t.comma,g=t.precision,y=t.trim,_=t.type;"n"===_?(v=!0,_="g"):sg[_]||(void 0===g&&(g=12),y=!0,_="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",b="$"===h?o:/[%p]/.test(_)?u:"",x=sg[_],w=/[defgprs%]/.test(_);function O(t){var i,o,u,h=m,O=b;if("c"===_)O=x(t)+O,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:c:"-"===f||"("===f?"":f)+h,O=("s"===_?pg[8+ng/3]:"")+O+(E&&"("===f?")":""),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}}v&&!p&&(t=r(t,1/0));var T=h.length+t.length+O.length,M=T<d?new Array(d-T+1).join(e):"";switch(v&&p&&(t=r(M+t,M.length?d-O.length:1/0),M=""),n){case"<":t=h+t+O+M;break;case"=":t=h+M+t+O;break;case"^":t=M.slice(0,T=M.length>>1)+h+t+O+M.slice(T);break;default:t=M+h+t+O}return s(t)}return g=void 0===g?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),O.toString=function(){return t+""},O}return{format:f,formatPrefix:function(t,e){var n=f(((t=ig(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(eg(e)/3))),i=Math.pow(10,-r),o=pg[8+r/3];return function(t){return n(i*t)+o}}}}function vg(t,e,n,r){var i,o=Rd(t,e,n);switch((r=ig(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(eg(e)/3)))-eg(Math.abs(t)))}(o,a))||(r.precision=i),fg(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,eg(e)-eg(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,-eg(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return lg(r)}function gg(){var t=Qv(Yv,Yv);return t.copy=function(){return Kv(t,gg())},Id.apply(t,arguments),function(t){var e=t.domain;return t.ticks=function(t){var n=e();return Dd(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return vg(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=Pd(s,u,n))>0?r=Pd(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Pd(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}(t)}function yg(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 _g(t){return Math.log(t)}function mg(t){return Math.exp(t)}function bg(t){return-Math.log(-t)}function xg(t){return-Math.exp(-t)}function wg(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Og(t){return function(e){return-t(-e)}}function Eg(t){var e,n,r=t(_g,mg),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?wg:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Og(e),n=Og(n),t(bg,xg)):t(_g,mg),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)&&(h=s,s=u,u=h);var c,l,f,h=e(s),p=e(u),d=null==t?10:+t,v=[];if(!(o%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,s>0){for(;h<p;++h)for(l=1,c=n(h);l<o;++l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else for(;h<p;++h)for(l=o-1,c=n(h);l>=1;--l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else v=Dd(h,p,Math.min(p-h,d)).map(n);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=lg(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(yg(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}cg=dg({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),lg=cg.format,fg=cg.formatPrefix;var Tg=new Date,Mg=new Date;function Ag(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 Ag((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 Tg.setTime(+e),Mg.setTime(+r),t(Tg),t(Mg),Math.floor(n(Tg,Mg))},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 Sg=Ag((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Sg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ag((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Sg:null};var kg=6e4,Lg=6048e5,Cg=Ag((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()})),jg=Ag((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*kg)}),(function(t,e){return(e-t)/kg}),(function(t){return t.getMinutes()})),Dg=Ag((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*kg)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),Pg=Ag((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*kg)/864e5}),(function(t){return t.getDate()-1}));function Rg(t){return Ag((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-(e.getTimezoneOffset()-t.getTimezoneOffset())*kg)/Lg}))}var Ig=Rg(0),Ng=Rg(1),Bg=(Rg(2),Rg(3),Rg(4)),Fg=(Rg(5),Rg(6),Ag((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()}))),zg=Ag((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()}));zg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ag((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 Gg=Ag((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 Wg(t){return Ag((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)/Lg}))}var Vg=Wg(0),Hg=Wg(1),Ug=(Wg(2),Wg(3),Wg(4)),Yg=(Wg(5),Wg(6),Ag((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 Xg(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 qg(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 $g(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}Yg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ag((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 Zg,Kg,Jg,Qg,ty={"-":"",_:" ",0:"0"},ey=/^\s*\d+/,ny=/^%/,ry=/[\\^$*+?|[\]().{}]/g;function iy(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 oy(t){return t.replace(ry,"\\$&")}function ay(t){return new RegExp("^(?:"+t.map(oy).join("|")+")","i")}function sy(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function uy(t,e,n){var r=ey.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function cy(t,e,n){var r=ey.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function ly(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function fy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function hy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function py(t,e,n){var r=ey.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function dy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function vy(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 gy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function yy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function _y(t,e,n){var r=ey.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function my(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function by(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function xy(t,e,n){var r=ey.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function wy(t,e,n){var r=ey.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Oy(t,e,n){var r=ey.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ey(t,e,n){var r=ny.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ty(t,e,n){var r=ey.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function My(t,e,n){var r=ey.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function Ay(t,e){return iy(t.getDate(),e,2)}function Sy(t,e){return iy(t.getHours(),e,2)}function ky(t,e){return iy(t.getHours()%12||12,e,2)}function Ly(t,e){return iy(1+Pg.count(zg(t),t),e,3)}function Cy(t,e){return iy(t.getMilliseconds(),e,3)}function jy(t,e){return Cy(t,e)+"000"}function Dy(t,e){return iy(t.getMonth()+1,e,2)}function Py(t,e){return iy(t.getMinutes(),e,2)}function Ry(t,e){return iy(t.getSeconds(),e,2)}function Iy(t){var e=t.getDay();return 0===e?7:e}function Ny(t,e){return iy(Ig.count(zg(t),t),e,2)}function By(t,e){var n=t.getDay();return t=n>=4||0===n?Bg(t):Bg.ceil(t),iy(Bg.count(zg(t),t)+(4===zg(t).getDay()),e,2)}function Fy(t){return t.getDay()}function zy(t,e){return iy(Ng.count(zg(t),t),e,2)}function Gy(t,e){return iy(t.getFullYear()%100,e,2)}function Wy(t,e){return iy(t.getFullYear()%1e4,e,4)}function Vy(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+iy(e/60|0,"0",2)+iy(e%60,"0",2)}function Hy(t,e){return iy(t.getUTCDate(),e,2)}function Uy(t,e){return iy(t.getUTCHours(),e,2)}function Yy(t,e){return iy(t.getUTCHours()%12||12,e,2)}function Xy(t,e){return iy(1+Gg.count(Yg(t),t),e,3)}function qy(t,e){return iy(t.getUTCMilliseconds(),e,3)}function $y(t,e){return qy(t,e)+"000"}function Zy(t,e){return iy(t.getUTCMonth()+1,e,2)}function Ky(t,e){return iy(t.getUTCMinutes(),e,2)}function Jy(t,e){return iy(t.getUTCSeconds(),e,2)}function Qy(t){var e=t.getUTCDay();return 0===e?7:e}function t_(t,e){return iy(Vg.count(Yg(t),t),e,2)}function e_(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Ug(t):Ug.ceil(t),iy(Ug.count(Yg(t),t)+(4===Yg(t).getUTCDay()),e,2)}function n_(t){return t.getUTCDay()}function r_(t,e){return iy(Hg.count(Yg(t),t),e,2)}function i_(t,e){return iy(t.getUTCFullYear()%100,e,2)}function o_(t,e){return iy(t.getUTCFullYear()%1e4,e,4)}function a_(){return"+0000"}function s_(){return"%"}function u_(t){return+t}function c_(t){return Math.floor(+t/1e3)}function l_(t){return Zg=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=ay(i),l=sy(i),f=ay(o),h=sy(o),p=ay(a),d=sy(a),v=ay(s),g=sy(s),y=ay(u),_=sy(u),m={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:Ay,e:Ay,f:jy,H:Sy,I:ky,j:Ly,L:Cy,m:Dy,M:Py,p:function(t){return i[+(t.getHours()>=12)]},Q:u_,s:c_,S:Ry,u:Iy,U:Ny,V:By,w:Fy,W:zy,x:null,X:null,y:Gy,Y:Wy,Z:Vy,"%":s_},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:Hy,e:Hy,f:$y,H:Uy,I:Yy,j:Xy,L:qy,m:Zy,M:Ky,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:u_,s:c_,S:Jy,u:Qy,U:t_,V:e_,w:n_,W:r_,x:null,X:null,y:i_,Y:o_,Z:a_,"%":s_},x={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=_[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:yy,e:yy,f:Oy,H:my,I:my,j:_y,L:wy,m:gy,M:by,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:Ty,s:My,S:xy,u:cy,U:ly,V:fy,w:uy,W:hy,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:dy,Y:py,Z:vy,"%":Ey};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=ty[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=$g(1900);if(E(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=qg($g(o.y))).getUTCDay(),r=i>4||0===i?Hg.ceil(r):Hg(r),r=Gg.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=e($g(o.y))).getDay(),r=i>4||0===i?Ng.ceil(r):Ng(r),r=Pg.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?qg($g(o.y)).getUTCDay():e($g(o.y)).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,qg(o)):e(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 ty?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(m.x=w(n,m),m.X=w(r,m),m.c=w(e,m),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",Xg);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,qg);return e.toString=function(){return t},e}})}(t),Kg=Zg.format,Zg.parse,Jg=Zg.utcFormat,Qg=Zg.utcParse,Zg}l_({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"]});Date.prototype.toISOString||Jg("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||Qg("%Y-%m-%dT%H:%M:%S.%LZ");var f_=1e3,h_=60*f_,p_=60*h_,d_=24*p_,v_=7*d_,g_=30*d_,y_=365*d_;function __(t){return new Date(t)}function m_(t){return t instanceof Date?+t:+new Date(+t)}function b_(){return Id.apply(function t(e,n,r,i,o,a,s,u,c){var l=Qv(Yv,Yv),f=l.invert,h=l.domain,p=c(".%L"),d=c(":%S"),v=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),_=c("%b %d"),m=c("%B"),b=c("%Y"),x=[[s,1,f_],[s,5,5*f_],[s,15,15*f_],[s,30,30*f_],[a,1,h_],[a,5,5*h_],[a,15,15*h_],[a,30,30*h_],[o,1,p_],[o,3,3*p_],[o,6,6*p_],[o,12,12*p_],[i,1,d_],[i,2,2*d_],[r,1,v_],[n,1,g_],[n,3,3*g_],[e,1,y_]];function w(t){return(s(t)<t?p:a(t)<t?d:o(t)<t?v:i(t)<t?g:n(t)<t?r(t)<t?y:_:e(t)<t?m:b)(t)}function O(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Ad((function(t){return t[2]})).right(x,o);a===x.length?(i=Rd(n/y_,r/y_,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(Rd(n,r,t),1),t=u)}return null==i?t:t.every(i)}return l.invert=function(t){return new Date(f(t))},l.domain=function(t){return arguments.length?h(Wd.call(t,m_)):h().map(__)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=O(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:c(e)},l.nice=function(t,e){var n=h();return(t=O(t,n[0],n[n.length-1],e))?h(yg(n,t)):l},l.copy=function(){return Kv(l,t(e,n,r,i,o,a,s,u,c))},l}(zg,Fg,Ig,Pg,Dg,jg,Cg,Sg,Kg).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var x_=function(){function t(t){this.state={options:{}},this.patternScale={},this.colorScale={},this.services=t}return t.prototype.getDisplayData=function(){var t=Ip.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=kp.clone(this.get("data"));return n.datasets=n.datasets.filter((function(n){return e[n.label]===t})),n},t.prototype.getData=function(){return this.get("data")},t.prototype.setData=function(t){var e=this.generateDataLabels(t);return this.set({data:t,dataLabels:e}),this.state.data},t.prototype.generateDataLabels=function(t){var e={};return t.datasets.forEach((function(t){e[t.label]=Ip.items.status.ACTIVE})),e},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:kp.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataLabels(),this.setColorScale(),this.services.events.dispatchEvent("model-update"))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Ip.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},t.prototype.setColorScale=function(){var t=this;if(this.getDisplayData().datasets[0].fillColors)this.getDisplayData().datasets.forEach((function(e){t.colorScale[e.label]=Ud().range(e.fillColors).domain(t.allDataLabels)}));else{var e=Ed;this.getData().datasets.forEach((function(n,r){t.colorScale[n.label]=Ud().range([e[r]]).domain(t.allDataLabels)}))}},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions();return r.getFillColor?r.getFillColor(t,e,n):this.getFillScale()[t](e)},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions();return r.getStrokeColor?r.getStrokeColor(t,e,n):this.colorScale[t](e)},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.updateAllDataLabels=function(){var t=this;this.allDataLabels?this.getDisplayData().labels.forEach((function(e){-1===t.allDataLabels.indexOf(e)&&t.allDataLabels.push(e)})):this.allDataLabels=this.getDisplayData().labels},t}(),w_=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}(),O_="http://www.w3.org/1999/xhtml",E_={svg:"http://www.w3.org/2000/svg",xhtml:O_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function T_(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),E_.hasOwnProperty(e)?{space:E_[e],local:t}:t}function M_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===O_&&e.documentElement.namespaceURI===O_?e.createElement(t):e.createElementNS(n,t)}}function A_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function S_(t){var e=T_(t);return(e.local?A_:M_)(e)}function k_(){}function L_(t){return null==t?k_:function(){return this.querySelector(t)}}function C_(){return[]}function j_(t){return null==t?C_:function(){return this.querySelectorAll(t)}}function D_(t){return function(){return this.matches(t)}}function P_(t){return new Array(t.length)}function R_(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}R_.prototype={constructor:R_,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)}};var I_="$";function N_(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 R_(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function B_(t,e,n,r,i,o,a){var s,u,c,l={},f=e.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(p[s]=c=I_+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<h;++s)(u=l[c=I_+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new R_(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&l[p[s]]===u&&(i[s]=u)}function F_(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function z_(t){return function(){this.removeAttribute(t)}}function G_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W_(t,e){return function(){this.setAttribute(t,e)}}function V_(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H_(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function U_(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 Y_(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function X_(t){return function(){this.style.removeProperty(t)}}function q_(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $_(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Z_(t,e){return t.style.getPropertyValue(e)||Y_(t).getComputedStyle(t,null).getPropertyValue(e)}function K_(t){return function(){delete this[t]}}function J_(t,e){return function(){this[t]=e}}function Q_(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function tm(t){return t.trim().split(/^|\s+/)}function em(t){return t.classList||new nm(t)}function nm(t){this._node=t,this._names=tm(t.getAttribute("class")||"")}function rm(t,e){for(var n=em(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function im(t,e){for(var n=em(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function om(t){return function(){rm(this,t)}}function am(t){return function(){im(this,t)}}function sm(t,e){return function(){(e.apply(this,arguments)?rm:im)(this,t)}}function um(){this.textContent=""}function cm(t){return function(){this.textContent=t}}function lm(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function fm(){this.innerHTML=""}function hm(t){return function(){this.innerHTML=t}}function pm(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function dm(){this.nextSibling&&this.parentNode.appendChild(this)}function vm(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gm(){return null}function ym(){var t=this.parentNode;t&&t.removeChild(this)}function _m(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function mm(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}nm.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 bm={},xm=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(bm={mouseenter:"mouseover",mouseleave:"mouseout"}));function wm(t,e,n){return t=Om(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Om(t,e,n){return function(r){var i=xm;xm=r;try{t.call(this,this.__data__,e,n)}finally{xm=i}}}function Em(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 Tm(t,e,n){var r=bm.hasOwnProperty(t.type)?wm:Om;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,f=u.length;l<f;++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 Mm(t,e,n){var r=Y_(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 Am(t,e){return function(){return Mm(this,t,e)}}function Sm(t,e){return function(){return Mm(this,t,e.apply(this,arguments))}}var km=[null];function Lm(t,e){this._groups=t,this._parents=e}function Cm(){return new Lm([[document.documentElement]],km)}function jm(t){return"string"==typeof t?new Lm([[document.querySelector(t)]],[document.documentElement]):new Lm([[t]],km)}function Dm(){for(var t,e=xm;t=e.sourceEvent;)e=t;return e}function Pm(t){var e=Dm();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)}Lm.prototype=Cm.prototype={constructor:Lm,select:function(t){"function"!=typeof t&&(t=L_(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 Lm(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=j_(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 Lm(r,i)},filter:function(t){"function"!=typeof t&&(t=D_(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 Lm(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n=e?B_:N_,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],f=i[c],h=f.length,p=t.call(l,l&&l.__data__,c,r),d=p.length,v=s[c]=new Array(d),g=a[c]=new Array(d);n(l,f,v,g,u[c]=new Array(h),p,e);for(var y,_,m=0,b=0;m<d;++m)if(y=v[m]){for(m>=b&&(b=m+1);!(_=g[b])&&++b<d;);y._next=_||null}}return(a=new Lm(a,r))._enter=s,a._exit=u,a},enter:function(){return new Lm(this._enter||this._groups.map(P_),this._parents)},exit:function(){return new Lm(this._exit||this._groups.map(P_),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],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new Lm(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=F_);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 Lm(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=T_(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?G_:z_:"function"==typeof e?n.local?U_:H_:n.local?V_:W_)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?X_:"function"==typeof e?$_:q_)(t,e,null==n?"":n)):Z_(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?K_:"function"==typeof e?Q_:J_)(t,e)):this.node()[t]},classed:function(t,e){var n=tm(t+"");if(arguments.length<2){for(var r=em(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?sm:e?om:am)(n,e))},text:function(t){return arguments.length?this.each(null==t?um:("function"==typeof t?lm:cm)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?fm:("function"==typeof t?pm:hm)(t)):this.node().innerHTML},raise:function(){return this.each(dm)},lower:function(){return this.each(vm)},append:function(t){var e="function"==typeof t?t:S_(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:S_(t),r=null==e?gm:"function"==typeof e?e:L_(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ym)},clone:function(t){return this.select(t?mm:_m)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(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}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Tm:Em,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?Sm:Am)(t,e))}};var Rm={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 "},Im=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}()}(),Nm="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Bm="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Fm="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Bm):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},zm=2,Gm=["top","right","bottom","left","width","height","size","weight"],Wm="undefined"!=typeof MutationObserver,Vm=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(){Fm(o)}function s(){var t=Date.now();if(n){if(t-i<zm)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};Vm.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Vm.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Vm.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Vm.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},Vm.prototype.connect_=function(){Nm&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Wm?(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)},Vm.prototype.disconnect_=function(){Nm&&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)},Vm.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Gm.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Vm.getInstance=function(){return this.instance_||(this.instance_=new Vm),this.instance_},Vm.instance_=null;var Hm=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},Um=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Bm},Ym=Jm(0,0,0,0);function Xm(t){return parseFloat(t)||0}function qm(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Xm(t["border-"+n+"-width"])}),0)}function $m(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Ym;var r=Um(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]=Xm(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Xm(r.width),u=Xm(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=qm(r,"left","right")+o),Math.round(u+a)!==n&&(u-=qm(r,"top","bottom")+a)),!function(t){return t===Um(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 Jm(i.left,i.top,s,u)}var Zm="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Um(t).SVGGraphicsElement}:function(t){return t instanceof Um(t).SVGElement&&"function"==typeof t.getBBox};function Km(t){return Nm?Zm(t)?function(t){var e=t.getBBox();return Jm(0,0,e.width,e.height)}(t):$m(t):Ym}function Jm(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Qm=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Jm(0,0,0,0),this.target=t};Qm.prototype.isActive=function(){var t=Km(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Qm.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var tb=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 Hm(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Hm(this,{target:t,contentRect:n})},eb=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Im,"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};eb.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 Um(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Qm(t)),this.controller_.addObserver(this),this.controller_.refresh())}},eb.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 Um(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))}},eb.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},eb.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},eb.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new tb(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},eb.prototype.clearActive=function(){this.activeObservations_.splice(0)},eb.prototype.hasActive=function(){return this.activeObservations_.length>0};var nb="undefined"!=typeof WeakMap?new WeakMap:new Im,rb=function(t){if(!(this instanceof rb))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=Vm.getInstance(),n=new eb(t,e,this);nb.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){rb.prototype[t]=function(){return(e=nb.get(this))[t].apply(e,arguments);var e}}));var ib=void 0!==Bm.ResizeObserver?Bm.ResizeObserver:rb,ob=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=jm(t));var n,r,i,o,a={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var s={width:t.node().clientWidth,height:t.node().clientHeight},u=function(t){return!!(t&&t.width&&t.height&&!isNaN(t.height)&&!isNaN(t.width)&&-1===(""+t.width+t.height).indexOf("%")&&t.width>0&&t.height>0)};if(e){if(e.useAttrs&&u(a))return a;if(e.useClientDimensions&&u(s))return s;if(e.useBBox&&u(r))return r;if(e.useBoundingRect&&u(o))return o}try{var c={width:kp.getProperty(t.node(),"width","baseVal","value"),height:kp.getProperty(t.node(),"height","baseVal","value")};if(u(c))return c}catch(t){if(u(s))return s;if(u(r))return r;if(u(a))return a}return{width:0,height:0}},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();jm(this.getHolder()).classed(Rm.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=kp.getProperty(this.model.getOptions(),"style","prefix"),e=jm(this.getHolder()).append("svg").classed(Rm.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=kp.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent("chart-resize"))}),12.5);new ib(i).observe(e)}},e}(w_),ab=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(w_),sb={value:function(){}};function ub(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new cb(r)}function cb(t){this._=t}function lb(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 fb(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function hb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=sb,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}cb.prototype=ub.prototype={constructor:cb,on:function(t,e){var n,r=this._,i=lb(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]=hb(r[n],t.name,e);else if(null==e)for(n in r)r[n]=hb(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=fb(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new cb(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 pb,db,vb=0,gb=0,yb=0,_b=1e3,mb=0,bb=0,xb=0,wb="object"==typeof performance&&performance.now?performance:Date,Ob="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Eb(){return bb||(Ob(Tb),bb=wb.now()+xb)}function Tb(){bb=0}function Mb(){this._call=this._time=this._next=null}function Ab(t,e,n){var r=new Mb;return r.restart(t,e,n),r}function Sb(){bb=(mb=wb.now())+xb,vb=gb=0;try{!function(){Eb(),++vb;for(var t,e=pb;e;)(t=bb-e._time)>=0&&e._call.call(null,t),e=e._next;--vb}()}finally{vb=0,function(){var t,e,n=pb,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:pb=e);db=t,Lb(r)}(),bb=0}}function kb(){var t=wb.now(),e=t-mb;e>_b&&(xb-=e,mb=t)}function Lb(t){vb||(gb&&(gb=clearTimeout(gb)),t-bb>24?(t<1/0&&(gb=setTimeout(Sb,t-wb.now()-xb)),yb&&(yb=clearInterval(yb))):(yb||(mb=wb.now(),yb=setInterval(kb,_b)),vb=1,Ob(Sb)))}function Cb(t,e,n){var r=new Mb;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Mb.prototype=Ab.prototype={constructor:Mb,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Eb():+n)+(null==e?0:+e),this._next||db===this||(db?db._next=this:pb=this,db=this),this._call=t,this._time=n,Lb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lb())}};var jb=ub("start","end","cancel","interrupt"),Db=[],Pb=0,Rb=1,Ib=2,Nb=3,Bb=4,Fb=5,zb=6;function Gb(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,f,h;if(n.state!==Rb)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===Nb)return Cb(o);h.state===Bb?(h.state=zb,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=zb,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(Cb((function(){n.state===Nb&&(n.state=Bb,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=Ib,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ib){for(n.state=Nb,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);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=Fb,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);n.state===Fb&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=zb,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Ab((function(t){n.state=Rb,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:jb,tween:Db,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Pb})}function Wb(t,e){var n=Hb(t,e);if(n.state>Pb)throw new Error("too late; already scheduled");return n}function Vb(t,e){var n=Hb(t,e);if(n.state>Nb)throw new Error("too late; already running");return n}function Hb(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ub(t,e){var n,r;return function(){var i=Vb(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 Yb(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Vb(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 Xb(t,e,n){var r=t._id;return t.each((function(){var t=Vb(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Hb(t,r).value[e]}}function qb(t,e){var n;return("number"==typeof e?Av:e instanceof cv?Ev:(n=cv(e))?(e=n,Ev):Cv)(t,e)}function $b(t){return function(){this.removeAttribute(t)}}function Zb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Kb(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 Jb(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 Qb(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 tx(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 ex(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e(n))}}(t,i)),n}return i._value=e,i}function nx(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e(n))}}(t,i)),n}return i._value=e,i}function rx(t,e){return function(){Wb(this,t).delay=+e.apply(this,arguments)}}function ix(t,e){return e=+e,function(){Wb(this,t).delay=e}}function ox(t,e){return function(){Vb(this,t).duration=+e.apply(this,arguments)}}function ax(t,e){return e=+e,function(){Vb(this,t).duration=e}}var sx=Cm.prototype.constructor;function ux(t){return function(){this.style.removeProperty(t)}}var cx=0;function lx(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function fx(t){return Cm().transition(t)}function hx(){return++cx}var px=Cm.prototype;lx.prototype=fx.prototype={constructor:lx,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=L_(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,f=o[a]=new Array(l),h=0;h<l;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,Gb(f[h],e,n,h,f,Hb(s,n)));return new lx(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=j_(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,f=0;f<l;++f)if(u=c[f]){for(var h,p=t.call(u,u.__data__,f,c),d=Hb(u,n),v=0,g=p.length;v<g;++v)(h=p[v])&&Gb(h,e,n,v,p,d);o.push(p),a.push(u)}return new lx(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=D_(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 lx(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],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new lx(a,this._parents,this._name,this._id)},selection:function(){return new sx(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=hx(),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=Hb(a,e);Gb(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new lx(r,this._parents,t,n)},call:px.call,nodes:px.nodes,node:px.node,size:px.size,empty:px.empty,each:px.each,on:function(t,e){var n=this._id;return arguments.length<2?Hb(this.node(),n).on.on(t):this.each(function(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)?Wb:Vb;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=T_(t),r="transform"===n?Vv:qb;return this.attrTween(t,"function"==typeof e?(n.local?tx:Qb)(n,r,Xb(this,"attr."+t,e)):null==e?(n.local?Zb:$b)(n):(n.local?Jb:Kb)(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=T_(t);return this.tween(n,(r.local?ex:nx)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Wv:qb;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Z_(this,t),a=(this.style.removeProperty(t),Z_(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ux(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Z_(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Z_(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Xb(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Vb(this,t),c=u.on,l=null==u.value[a]?o||(o=ux(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=Z_(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,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,o,n)),r}return o._value=e,o}(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}}(Xb(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":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=Hb(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?Ub:Yb)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?rx:ix)(e,t)):Hb(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ox:ax)(e,t)):Hb(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Vb(this,t).ease=e}}(e,t)):Hb(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=Vb(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 dx={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function vx(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return dx.time=Eb(),dx;return n}Cm.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>Ib&&n.state<Fb,n.state=zb,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)}))},Cm.prototype.transition=function(t){var e,n;t instanceof lx?(e=t._id,t=t._name):(e=hx(),(n=dx).time=Eb(),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])&&Gb(a,t,e,c,s,n||vx(a,e));return new lx(r,this._parents,t,e)};var gx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return d(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener("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=fx(t).duration(kp.getProperty(Qp,t,"duration")||Qp.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=fx(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}(w_),yx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getMainXAxis=function(){var t=this.model.get(i.PRIMARY),e=this.model.get(i.SECONDARY);return t===this.model.get(r.TOP)||t===this.model.get(r.BOTTOM)?t:e===this.model.get(r.TOP)||e===this.model.get(r.BOTTOM)?e:this.model.get(r.BOTTOM)},e.prototype.getMainYAxis=function(){var t=this.model.get(i.PRIMARY),e=this.model.get(i.SECONDARY);return t===this.model.get(r.LEFT)||t===this.model.get(r.RIGHT)?t:e===this.model.get(r.LEFT)||e===this.model.get(r.RIGHT)?e:this.model.get(r.LEFT)},e.prototype.getXValue=function(t,e){return this.getMainXAxis().getValueFromScale(t,e)},e.prototype.getYValue=function(t,e){return this.getMainYAxis().getValueFromScale(t,e)},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=[];switch(this.getMainXAxis().scaleType){case o.LABELS:var r=e.labels.indexOf(t);e.datasets.forEach((function(t){n.push({datasetLabel:t.label,value:t.data[r]})}));break;case o.TIME:var i=Object.keys(e.datasets[0].data[0]).filter((function(t){return"value"!==t}))[0];e.datasets.forEach((function(e){var r=e.label;e.data.filter((function(e){var n=new Date(e[i]),r=new Date(t);return n.getTime()===r.getTime()})).forEach((function(t){n.push(Object.assign({datasetLabel:r,value:t.value},t))}))}))}return n},e}(w_),_x=Math.PI,mx=2*_x,bx=mx-1e-6;function xx(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function wx(){return new xx}function Ox(t){return function(){return t}}xx.prototype=wx.prototype={constructor:xx,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,f=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(f>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var h=n-o,p=r-a,d=s*s+u*u,v=h*h+p*p,g=Math.sqrt(d),y=Math.sqrt(f),_=i*Math.tan((_x-Math.acos((d+f-v)/(2*g*y)))/2),m=_/y,b=_/g;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*c)+","+(e+m*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*p)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,f=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&&(f<0&&(f=f%mx+mx),f>bx?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=_x)+","+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 Ex=Math.abs,Tx=Math.atan2,Mx=Math.cos,Ax=Math.max,Sx=Math.min,kx=Math.sin,Lx=Math.sqrt,Cx=1e-12,jx=Math.PI,Dx=jx/2,Px=2*jx;function Rx(t){return t>=1?Dx:t<=-1?-Dx:Math.asin(t)}function Ix(t){return t.innerRadius}function Nx(t){return t.outerRadius}function Bx(t){return t.startAngle}function Fx(t){return t.endAngle}function zx(t){return t&&t.padAngle}function Gx(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/Lx(s*s+u*u),l=c*u,f=-c*s,h=t+l,p=e+f,d=n+l,v=r+f,g=(h+d)/2,y=(p+v)/2,_=d-h,m=v-p,b=_*_+m*m,x=i-o,w=h*v-d*p,O=(m<0?-1:1)*Lx(Ax(0,x*x*b-w*w)),E=(w*m-_*O)/b,T=(-w*_-m*O)/b,M=(w*m+_*O)/b,A=(-w*_+m*O)/b,S=E-g,k=T-y,L=M-g,C=A-y;return S*S+k*k>L*L+C*C&&(E=M,T=A),{cx:E,cy:T,x01:-l,y01:-f,x11:E*(i/x-1),y11:T*(i/x-1)}}function Wx(){var t=Ix,e=Nx,n=Ox(0),r=null,i=Bx,o=Fx,a=zx,s=null;function u(){var u,c,l=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-Dx,p=o.apply(this,arguments)-Dx,d=Ex(p-h),v=p>h;if(s||(s=u=wx()),f<l&&(c=f,f=l,l=c),f>Cx)if(d>Px-Cx)s.moveTo(f*Mx(h),f*kx(h)),s.arc(0,0,f,h,p,!v),l>Cx&&(s.moveTo(l*Mx(p),l*kx(p)),s.arc(0,0,l,p,h,v));else{var g,y,_=h,m=p,b=h,x=p,w=d,O=d,E=a.apply(this,arguments)/2,T=E>Cx&&(r?+r.apply(this,arguments):Lx(l*l+f*f)),M=Sx(Ex(f-l)/2,+n.apply(this,arguments)),A=M,S=M;if(T>Cx){var k=Rx(T/l*kx(E)),L=Rx(T/f*kx(E));(w-=2*k)>Cx?(b+=k*=v?1:-1,x-=k):(w=0,b=x=(h+p)/2),(O-=2*L)>Cx?(_+=L*=v?1:-1,m-=L):(O=0,_=m=(h+p)/2)}var C=f*Mx(_),j=f*kx(_),D=l*Mx(x),P=l*kx(x);if(M>Cx){var R,I=f*Mx(m),N=f*kx(m),B=l*Mx(b),F=l*kx(b);if(d<jx&&(R=function(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,f=s-o,h=f*u-l*c;if(!(h*h<Cx))return[t+(h=(l*(e-o)-f*(t-i))/h)*u,e+h*c]}(C,j,B,F,I,N,D,P))){var z=C-R[0],G=j-R[1],W=I-R[0],V=N-R[1],H=1/kx(function(t){return t>1?0:t<-1?jx:Math.acos(t)}((z*W+G*V)/(Lx(z*z+G*G)*Lx(W*W+V*V)))/2),U=Lx(R[0]*R[0]+R[1]*R[1]);A=Sx(M,(l-U)/(H-1)),S=Sx(M,(f-U)/(H+1))}}O>Cx?S>Cx?(g=Gx(B,F,C,j,f,S,v),y=Gx(I,N,D,P,f,S,v),s.moveTo(g.cx+g.x01,g.cy+g.y01),S<M?s.arc(g.cx,g.cy,S,Tx(g.y01,g.x01),Tx(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,S,Tx(g.y01,g.x01),Tx(g.y11,g.x11),!v),s.arc(0,0,f,Tx(g.cy+g.y11,g.cx+g.x11),Tx(y.cy+y.y11,y.cx+y.x11),!v),s.arc(y.cx,y.cy,S,Tx(y.y11,y.x11),Tx(y.y01,y.x01),!v))):(s.moveTo(C,j),s.arc(0,0,f,_,m,!v)):s.moveTo(C,j),l>Cx&&w>Cx?A>Cx?(g=Gx(D,P,I,N,l,-A,v),y=Gx(C,j,B,F,l,-A,v),s.lineTo(g.cx+g.x01,g.cy+g.y01),A<M?s.arc(g.cx,g.cy,A,Tx(g.y01,g.x01),Tx(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,A,Tx(g.y01,g.x01),Tx(g.y11,g.x11),!v),s.arc(0,0,l,Tx(g.cy+g.y11,g.cx+g.x11),Tx(y.cy+y.y11,y.cx+y.x11),v),s.arc(y.cx,y.cy,A,Tx(y.y11,y.x11),Tx(y.y01,y.x01),!v))):s.arc(0,0,l,x,b,v):s.lineTo(D,P)}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-jx/2;return[Mx(r)*n,kx(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ox(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ox(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ox(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ox(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ox(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ox(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ox(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Vx(t){this._context=t}function Hx(t){return new Vx(t)}function Ux(t){return t[0]}function Yx(t){return t[1]}function Xx(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function qx(t){return t}Vx.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 $x=Array.prototype.slice;function Zx(){}function Kx(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 Jx(t){this._context=t}function Qx(t){return new Jx(t)}function tw(t){this._context=t}function ew(t){return new tw(t)}function nw(t){this._context=t}function rw(t){return new nw(t)}function iw(t,e){this._basis=new Jx(t),this._beta=e}Jx.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:Kx(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:Kx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},tw.prototype={areaStart:Zx,areaEnd:Zx,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:Kx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},nw.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:Kx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},iw.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 ow=function t(e){function n(t){return 1===e?new Jx(t):new iw(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function aw(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 sw(t,e){this._context=t,this._k=(1-e)/6}sw.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:aw(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:aw(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 uw=function t(e){function n(t){return new sw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function cw(t,e){this._context=t,this._k=(1-e)/6}cw.prototype={areaStart:Zx,areaEnd:Zx,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:aw(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 lw=function t(e){function n(t){return new cw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function fw(t,e){this._context=t,this._k=(1-e)/6}fw.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:aw(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 hw=function t(e){function n(t){return new fw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function pw(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Cx){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>Cx){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 dw(t,e){this._context=t,this._alpha=e}dw.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:pw(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 vw=function t(e){function n(t){return e?new dw(t,e):new sw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gw(t,e){this._context=t,this._alpha=e}gw.prototype={areaStart:Zx,areaEnd:Zx,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:pw(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 yw=function t(e){function n(t){return e?new gw(t,e):new cw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function _w(t,e){this._context=t,this._alpha=e}_w.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:pw(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 mw=function t(e){function n(t){return e?new _w(t,e):new fw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function bw(t){this._context=t}function xw(t){return new bw(t)}function ww(t){return t<0?-1:1}function Ow(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(ww(o)+ww(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ew(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Tw(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 Mw(t){this._context=t}function Aw(t){this._context=new Sw(t)}function Sw(t){this._context=t}function kw(t){return new Mw(t)}function Lw(t){return new Aw(t)}function Cw(t){this._context=t}function jw(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 Dw(t){return new Cw(t)}function Pw(t,e){this._context=t,this._t=e}function Rw(t){return new Pw(t,.5)}function Iw(t){return new Pw(t,0)}function Nw(t){return new Pw(t,1)}function Bw(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 Fw(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function zw(t,e){return t[e]}bw.prototype={areaStart:Zx,areaEnd:Zx,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))}},Mw.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:Tw(this,this._t0,Ew(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,Tw(this,Ew(this,n=Ow(this,t,e)),n);break;default:Tw(this,this._t0,n=Ow(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Aw.prototype=Object.create(Mw.prototype)).point=function(t,e){Mw.prototype.point.call(this,e,t)},Sw.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)}},Cw.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=jw(t),i=jw(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)}},Pw.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 Gw,Ww,Vw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Hx,curveLinearClosed:xw,curveBasis:Qx,curveBasisClosed:ew,curveBasisOpen:rw,curveBundle:ow,curveCardinal:uw,curveCardinalClosed:lw,curveCardinalOpen:hw,curveCatmullRom:vw,curveCatmullRomClosed:yw,curveCatmullRomOpen:mw,curveMonotoneX:kw,curveMonotoneY:Lw,curveNatural:Dw,curveStep:Rw,curveStepAfter:Nw,curveStepBefore:Iw},e}return d(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(w_),Hw=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(jm(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=kp.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Rm.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Rm.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=kp.getProperty(this.model.getOptions(),"style","prefix");return ob.appendOrSelect(this.parent,"g."+Rm.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Uw=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return d(n,t),n.prototype.render=function(){var t=this,n=this.getContainerSVG().attr("role",e.GRAPHICS_DOCUMENT),r=this.model.getOptions(),i=n.selectAll("g.legend-item").data(this.getLegendItemArray()),o=i.enter().append("g").classed("legend-item",!0),a=r.legend.checkbox.radius;o.append("rect").classed("checkbox",!0).merge(i.select("rect.checkbox")).attr("width",2*a).attr("height",2*a).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.value===r.legend.items.status.ACTIVE?t.model.getStrokeColor(e.key):null})).classed("active",(function(t,e){return t.value===r.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).text((function(t){return t.key})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=kp.getProperty(this.model.getOptions(),"legend","clickable");n.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},n.prototype.breakItemsIntoLines=function(t){var e,n=this,r=this.getContainerSVG(),i=this.model.getOptions(),o=i.legend.checkbox.radius,a=i.legend.items.horizontalSpace,s=i.legend.items.verticalSpace,u=i.legend.items.textYOffset,l=2*o+i.legend.checkbox.spaceAfter,f=i.legend.items.status.DISABLED,h=this.model.get("dataLabels"),p=Object.keys(h).some((function(t){return h[t]===f})),d=kp.getProperty(i,"legend","orientation"),v=0,g=0,y=0;t.merge(r.selectAll("g.legend-item")).each((function(t,i){var f=jm(this),h=jm(r.selectAll("g.legend-item").nodes()[i-1]);if(0===y||h.empty()||d===c.VERTICAL)d===c.VERTICAL&&0!==i&&g++;else{var _=ob.getSVGElementSize(n.parent,{useAttr:!0}),m=ob.getSVGElementSize(jm(this).select("text"),{useBBox:!0}),b=ob.getSVGElementSize(h.select("text"),{useBBox:!0});(v=v+b.width+l+a)+l+m.width>_.width&&(g++,v=0,y=0)}f.select("rect.checkbox").attr("x",v).attr("y",0+g*s);var x=u+g*s;f.select("text").attr("x",v+l).attr("y",0+x),e=x,p&&f.select("g.check").empty()?(f.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'),f.select("g.check svg").attr("width",2*o-1).attr("height",2*o-1).attr("x",parseFloat(f.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(f.select("rect.checkbox").attr("y"))+.5)):p||f.select("g.check").empty()||f.select("g.check").remove(),y++})),ob.appendOrSelect(r,"rect.spacer").attr("x",0).attr("y",e).attr("width",16).attr("height",16).attr("fill","none")},n.prototype.getLegendItemArray=function(){var t=this.model.get("dataLabels");return Object.keys(t).map((function(e){return{key:e,value:t[e]}}))},n.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions();e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent("legend-item-onhover",{hoveredElement:jm(this)});var e=n.legend.checkbox.radius,r=jm(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent("legend-item-onclick",{clickedElement:jm(this)});var e=jm(this).datum();t.model.toggleDataLabel(e.key)})).on("mouseout",(function(){var e=jm(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent("legend-item-onmouseout",{hoveredElement:e})}))},n}(Hw),Yw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return d(e,t),e.prototype.truncateTitle=function(){var t=ob.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=ob.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=ob.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.text(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();ob.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).text(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Hw);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Ww||(Ww={}));var Xw=((Gw={})[Ww.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)}},Gw[Ww.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)}},Gw[Ww.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)}},Gw[Ww.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)}},Gw),qw="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},$w=function(){function t(t){void 0===t&&(t={}),this.positions=Xw,this.positions=Object.assign({},Xw,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,f=l-u*c;return{placement:n,weight:(f=0===f?l:f)/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:qw.innerHeight-qw.scrollY,height:qw.innerWidth-qw.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}(),Zw=(new $w,function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new $w,i.init(),i}return d(e,t),e.prototype.init=function(){var t=this,e=jm(this.services.domUtils.getHolder()),n=kp.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=ob.appendOrSelect(e,"div."+Rm.prefix+"--"+n+"--tooltip");var r=ob.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(i){if(i.detail.type===s.DATAPOINT&&kp.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===s.GRIDLINE&&kp.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=jm(xm.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,s.DATAPOINT),kp.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===s.TITLE){var u=ob.appendOrSelect(e,"svg."+Rm.prefix+"--"+n+"--chart-svg"),c=ob.getSVGElementSize(u).width*kp.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",c),r.html(t.getTooltipHTML(i.detail.hoveredElement,s.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===s.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=kp.getProperty(t,"data")?t.data:t,r=kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+(n.datasetLabel?n.datasetLabel:n.label)+'</p>\n\t\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.sort((function(t,e){return e.value-t.value}));var r=this.services.axes.getMainXAxis().scaleType;return"<ul class='multi-tooltip'>"+n.map((function(t){var n=t.value;n instanceof Object&&(n=r===o.TIME?t.value.date:t.value.value);var i=kp.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(n):n.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t){var e=jm(this.services.domUtils.getHolder()).node().getBoundingClientRect(),n=t.getBoundingClientRect(),r=this.model.getOptions().tooltip.title.verticalOffset,i={left:n.left-e.left+n.width/2,top:n.top-e.top-r};return{placement:a.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Pm(n);if(t){var o=t.placement===a.TOP?Ww.TOP:Ww.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Ww.RIGHT,Ww.LEFT,Ww.TOP,Ww.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),u=this.model.getOptions().tooltip.datapoint.horizontalOffset;s===Ww.LEFT&&(u*=-1),e=this.positionService.findPositionAt({left:i[0]+u,top:i[1]},r,s)}this.positionService.setElement(r,e)},e}(Hw)),Kw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){var e=this,n=jm(this.services.domUtils.getHolder()),r=kp.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=ob.appendOrSelect(n,"div."+Rm.prefix+"--"+r+"--tooltip");var i=ob.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(o){if(o.detail.type===s.DATAPOINT&&kp.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===s.GRIDLINE&&kp.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")){var a=o.detail.hoveredElement.node(),u=void 0;u=o.detail.multidata?e.getMultilineTooltipHTML(o.detail.multidata):e.getTooltipHTML(o.detail.hoveredElement.datum()),kp.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var c=e.getTooltipPosition(a);e.positionTooltip(o.detail.multidata?void 0:c)}else if(o.detail.type===s.TITLE){var l=ob.appendOrSelect(n,"svg."+Rm.prefix+"--"+r+"--chart-svg"),f=ob.getSVGElementSize(l).width*kp.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",f),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,s.TITLE));c=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(c)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t){var e=jm(t).datum(),n=jm(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:a.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:a.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=kp.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label,t.value)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(Zw),Jw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===s.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=kp.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(e.value):e.value.toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e.datasetLabel,e.label,e.value)+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e.datasetLabel+'</p>\n\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t</div>"},e}(Zw),Qw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getBarWidth=function(){var t=this.services.axes.getMainXAxis(),e=this.model.getOptions();return t.scale.step?Math.min(e.bars.maxWidth,t.scale.step()/2):Math.min(e.bars.maxWidth,5/t.scale.ticks().length*e.bars.maxWidth)},e}(Hw),tO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("rect.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("rect.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.getContainerSVG().selectAll("g.bars").data(this.model.getDisplayData().datasets,(function(t){return t.label}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("bars",!0).attr("role",e.GROUP).merge(r).selectAll("rect.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}),(function(t){return t.label}));i.exit().attr("opacity",0).remove(),i.enter().append("rect").attr("opacity",0).merge(i).classed("bar",!0).attr("x",(function(t,e){var r=n.getBarWidth();return n.services.axes.getXValue(t,e)-r/2})).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("y",(function(t,e){return n.services.axes.getYValue(Math.max(0,t.value))})).attr("fill",(function(t){return n.model.getFillScale()(t.label)})).attr("height",(function(t,e){return Math.abs(n.services.axes.getYValue(t,e)-n.services.axes.getYValue(0))})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.bar").on("mouseover",(function(){var e=jm(this);e.classed("hovered",!0),e.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",cv(e.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),e.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()(e.label)})),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("rect.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Qw),eO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("rect.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("rect.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getGroupWidth=function(){var t=this.model.getDisplayData().datasets;return t.length*this.getBarWidth()+5*(t.length-1)},n.prototype.setGroupScale=function(){var t=this.model.getDisplayData().datasets;this.groupScale=Yd().domain(t.map((function(t){return t.label}))).rangeRound([0,this.getGroupWidth()])},n.prototype.getBarWidth=function(){var e=this.model.getDisplayData().datasets;return Math.min(this.services.axes.getMainXAxis().scale.step()/2/e.length,t.prototype.getBarWidth.call(this))},n.prototype.render=function(t){var n=this,r=this.model.getDisplayData();this.setGroupScale();var i=this.getContainerSVG().selectAll("g.bars").data(r.labels);i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("bars",!0).attr("role",e.GROUP).attr("aria-labelledby",(function(t){return t})).merge(i).attr("transform",(function(t,e){return"translate("+(n.services.axes.getXValue(t,e)-n.getGroupWidth()/2)+", 0)"})).selectAll("rect.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}));o.exit().attr("opacity",0).remove(),o.enter().append("rect").attr("opacity",0).merge(o).classed("bar",!0).attr("x",(function(t){return n.groupScale(t.datasetLabel)})).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("y",(function(t,e){return n.services.axes.getYValue(Math.max(0,t.value))})).attr("height",(function(t,e){return Math.abs(n.services.axes.getYValue(t,e)-n.services.axes.getYValue(0))})).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){return this.model.getDisplayData().datasets.map((function(n){return{label:t,datasetLabel:n.label,value:n.data[e].value?n.data[e].value:n.data[e]}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.bar").on("mouseover",(function(){var e=jm(this);e.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",cv(e.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),e.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("rect.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Qw),nO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("rect.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("rect.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getStackData=function(){var t,e=this.model.getDisplayData();if(this.services.axes.getMainXAxis().scaleType===o.TIME){var n=[];e.datasets.forEach((function(t){n=n.concat(t.data.map((function(t){return Number(t.date)})))})),t=(n=kp.removeArrayDuplicates(n).sort()).map((function(t,n){var r={};return e.datasets.forEach((function(e){var n=e.data.find((function(e){return Number(e.date)===Number(t)}));r[e.label]=n?n.value:0})),r.label=t,r}))}else t=e.labels.map((function(t,n){var r={};return e.datasets.forEach((function(t){r[t.label]=isNaN(t.data[n])?t.data[n].value:t.data[n]})),r.label=t,r}));return t},n.prototype.render=function(t){var n=this,r=this.model.getOptions(),i=this.getContainerSVG(),o=this.model.getDisplayData(),a=this.getStackData(),s=o.datasets.map((function(t){return t.label})),u=i.selectAll("g.bars").data(function(){var t=Ox([]),e=Fw,n=Bw,r=zw;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 f,h=s[o],p=l[o]=new Array(u),d=0;d<u;++d)p[d]=f=[0,+r(i[d],h,d,i)],f.data=i[d];p.key=h}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:Ox($x.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Ox(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Fw:"function"==typeof t?t:Ox($x.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Bw:t,i):n},i}().keys(s)(a),(function(t){return t.key}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",e.GROUP);var c=i.selectAll("g.bars").selectAll("rect.bar").data((function(t){return function(t){return Object.keys(t).map((function(e){"object"==typeof t[e]&&(t[e].datasetLabel=t.key,t[e].label=t[e].data.label,t[e].value=t[e].data[t.key])})),t}(t)}),(function(t){return t.label}));c.exit().remove(),c.enter().append("rect").merge(c).classed("bar",!0).attr("x",(function(t,e){var r=n.getBarWidth();return n.services.axes.getXValue(t,e)-r/2})).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("y",(function(t,e){return n.services.axes.getYValue(t[1],e)})).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("height",(function(t,e){var i=t.datasetLabel,o=s.indexOf(i),a=n.services.axes.getYValue(t[0])-n.services.axes.getYValue(t[1]);return o>0&&a>=r.bars.dividerSize?a-r.bars.dividerSize:a})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.bar").on("mouseover",(function(){var e=jm(this);e.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",cv(e.attr("fill")).darker(.7).toString())})).on("mousemove",(function(){var e=jm(this),n=jm(this).datum();e.classed("hovered",!0);var r=n.data,i=r.label;delete r.label;var o=Object.keys(r).map((function(t){return{datasetLabel:t,value:r[t],label:i}}));t.services.events.dispatchEvent("show-tooltip",{multidata:o,hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),e.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("rect.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Qw),rO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return d(n,t),n.prototype.init=function(){var t=this;this.services.events.addEventListener("legend-item-onhover",(function(e){var n=e.detail.hoveredElement;t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.label!==n.datum().key?Jp.opacity.unselected:Jp.opacity.selected}))})),this.services.events.addEventListener("legend-item-onmouseout",(function(e){t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Jp.opacity.selected)}))},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this.getContainerSVG();this.lineGenerator=function(){var t=Ux,e=Yx,n=Ox(!0),r=null,i=Hx,o=null;function a(a){var s,u,c,l=a.length,f=!1;for(null==r&&(o=i(c=wx())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&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:Ox(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Ox(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ox(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().x((function(t,e){return n.services.axes.getXValue(t,e)})).y((function(t,e){return n.services.axes.getYValue(t,e)})).curve(this.services.curves.getD3Curve());var i=r.selectAll("g.lines").data(this.model.getDisplayData().datasets,(function(t){return t.label}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("lines",!0),a=this;o.append("path").attr("opacity",0).merge(r.selectAll("g.lines path")).attr("stroke",(function(t){var e=jm(this.parentNode).datum();return a.model.getStrokeColor(e.label)})).datum((function(t){var e=jm(this.parentNode).datum();return this._datasetLabel=e.label,e.data})).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.map((function(t){return t.value||t})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("class","line").attr("d",this.lineGenerator)},n}(Hw),iO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.model.getOptions(),i=this.getContainerSVG().selectAll("g.dots").data(this.model.getDisplayData().datasets,(function(t){return t.label}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("dots",!0).attr("role",e.GROUP).merge(i).selectAll("circle.dot").data((function(t,e){return n.addLabelsToDataPoints(t,e)})),a=o.enter().append("circle").attr("opacity",0),s=r.points.filled;a.merge(o).raise().classed("dot",!0).classed("filled",s).classed("unfilled",!s).attr("cx",(function(t,e){return n.services.axes.getXValue(t,e)})).transition(this.services.transitions.getTransition("scatter-update-enter",t)).attr("cy",(function(t,e){return n.services.axes.getYValue(t,e)})).attr("r",r.points.radius).attr("fill",(function(t){if(s)return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("fill-opacity",s?.2:1).attr("stroke",(function(t){return n.model.getStrokeColor(t.datasetLabel,t.label,t.value)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle").on("mouseover mousemove",(function(){var e=jm(this);e.classed("hovered",!0),e.style("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1),t.configs.filled||e.style("fill",null),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))},n.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Hw);function oO(t,e){var n=this,r=jv(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var aO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getDataList=function(){var t=this.model.getDisplayData();return t.datasets[0].data.map((function(e,n){return{label:t.labels[n],value:e.value?e.value:e}}))},n.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this,i=this.getContainerSVG(),o=this.model.getOptions(),a=this.getDataList(),s=this.computeRadius();this.arc=Wx().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=Wx().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=qx,e=Xx,n=null,r=Ox(0),i=Ox(Px),o=Ox(0);function a(a){var s,u,c,l,f,h=a.length,p=0,d=new Array(h),v=new Array(h),g=+r.apply(this,arguments),y=Math.min(Px,Math.max(-Px,i.apply(this,arguments)-g)),_=Math.min(Math.abs(y)/h,o.apply(this,arguments)),m=_*(y<0?-1:1);for(s=0;s<h;++s)(f=v[d[s]=s]=+t(a[s],s,a))>0&&(p+=f);for(null!=e?d.sort((function(t,n){return e(v[t],v[n])})):null!=n&&d.sort((function(t,e){return n(a[t],a[e])})),s=0,c=p?(y-h*m)/p:0;s<h;++s,g=l)u=d[s],l=g+((f=v[u])>0?f*c:0)+m,v[u]={data:a[u],index:s,value:f,startAngle:g,endAngle:l,padAngle:_};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Ox(+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:Ox(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ox(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ox(+t),a):o},a}().value((function(t){return t.value})).sort((function(t,e){return e.value-t.value})).padAngle(o.pie.padAngle)(a).sort((function(t,e){return t.index-e.index})),c=ob.appendOrSelect(i,"g.slices").attr("role",e.GROUP).selectAll("path.slice").data(u,(function(t){return t.data.label}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return n.model.getFillScale()(t.data.label)})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+kp.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return oO.bind(this)(t,r.arc)}));var l=ob.appendOrSelect(i,"g.labels").attr("role",e.GROUP).selectAll("text.pie-label").data(u,(function(t){return t.data.label}));l.exit().attr("opacity",0).remove();var f=l.enter().append("text").classed("pie-label",!0),p=[];f.merge(l).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):kp.convertValueToPercentage(t.data.value,a)+"%"})).datum((function(t){var e=this.getComputedTextLength();t.textOffsetX=e/2,t.textOffsetY=parseFloat(getComputedStyle(this).fontSize)/2;var n=s+7,r=(t.endAngle-t.startAngle)/2+t.startAngle;return t.xPosition=(t.textOffsetX+n)*Math.sin(r),t.yPosition=(t.textOffsetY+n)*-Math.cos(r),t})).attr("transform",(function(t,e){var n=a.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,s=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,s=t.yPosition-o.pie.callout.offsetY,t.direction=h.RIGHT,p.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,s=t.yPosition-o.pie.callout.offsetY,t.direction=h.LEFT,p.push(t)),"translate("+i+", "+s+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(p);var d=s+o.pie.xOffset,v=s+o.pie.yOffset;p.length>0&&(v+=o.pie.yOffsetCallout),i.attr("transform","translate("+d+", "+v+")"),this.addEventListeners()},n.prototype.renderCallouts=function(t){var n=ob.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",e.GROUP),r=this.model.getOptions(),i=n.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",e.GRAPHICS_SYMBOL+" "+e.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===h.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-r.pie.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+r.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum((function(t){return jm(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(i.selectAll("line.horizontal-line")).datum((function(t){return jm(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mousemove",(function(){var e=jm(this);e.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent("pie-slice-mouseover",e),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:s.DATAPOINT})})).on("mouseout",(function(){var e=jm(this);e.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent("pie-slice-mouseout",e),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})})).on("click",(function(e){return t.services.events.dispatchEvent("pie-slice-click",e)}))},n.prototype.computeRadius=function(){var t=this.model.getOptions(),e=ob.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},n}(Hw),sO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return d(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this,r=ob.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();ob.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(jm(this))})),ob.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(kp.getProperty(i,"donut","center","label"))},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=kp.getProperty(e,"donut","center","number");n||(n=this.getDataList().reduce((function(t,e){return t+e.value}),0));var r=Av(parseInt(t.text().replace(/[, ]+/g,""),10)||0,n);return function(n){var i=e.donut.center.numberFormatter;t.text(i(r(n)))}},e}(aO),uO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return d(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||ed.default.size).attr("height",this.configs.size||ed.default.size).attr("opacity",0)},e}(Hw);function cO(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 lO(t,e){var n,r,i,o,a,s=new dO(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=fO);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 dO(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(pO)}function fO(t){return t.children}function hO(t){t.data=t.data.data}function pO(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dO(t){this.data=t,this.depth=this.height=0,this.parent=null}function vO(t){if("function"!=typeof t)throw new Error;return t}function gO(){return 0}function yO(t){return function(){return t}}function _O(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 mO(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 bO(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}dO.prototype=lO.prototype={constructor:dO,count:function(){return this.eachAfter(cO)},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 lO(this).eachBefore(hO)}};var xO=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,c,l,f,h,p,d,v,g,y=[],_=e.children,m=0,b=0,x=_.length,w=e.value;m<x;){u=i-n,c=o-r;do{l=_[b++].value}while(!l&&b<x);for(f=h=l,g=l*l*(v=Math.max(c/u,u/c)/(w*t)),d=Math.max(h/g,g/f);b<x;++b){if(l+=s=_[b].value,s<f&&(f=s),s>h&&(h=s),g=l*l*v,(p=Math.max(h/g,g/f))>d){l-=s;break}d=p}y.push(a={value:l,dice:u<c,children:_.slice(m,b)}),a.dice?mO(a,n,r,i,w?r+=c*l/w:o):bO(a,n,r,w?n+=u*l/w:i,o),w-=l,m=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 wO(){var t=xO,e=!1,n=1,r=1,i=[0],o=gO,a=gO,s=gO,u=gO,c=gO;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(_O),t}function f(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),e.x0=r,e.y0=l,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,(f-=s(e)-n)<r&&(r=f=(r+f)/2),(h-=u(e)-n)<l&&(l=h=(l+h)/2),t(e,r,l,f,h))}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=vO(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:yO(+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:yO(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:yO(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:yO(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:yO(+t),l):c},l}var OO=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===l.ROW_REVERSE||a.configs.direction===l.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return d(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=kp.getProperty(t,"data","growth","x");return e===f.PREFERRED||e===f.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 kp.getProperty(t,"data","growth","x")===f.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=ob.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=lO({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===l.ROW||this.configs.direction===l.ROW_REVERSE?mO:bO;wO().tile(s).size([i,o])(a);var u=this.configs.direction===l.ROW||this.configs.direction===l.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(jm(n));var i=kp.getProperty(e,"data","growth","x");i!==f.PREFERRED&&i!==f.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=kp.getProperty(t,"data","growth","x"),n=ob.getSVGElementSize(jm(this),{useBBox:!0});if(e===f.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),c.exit().remove(),this.children.filter((function(t){return kp.getProperty(t,"growth","x")===f.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=lO({children:this.children}).sum((function(t){return t.size})),wO().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){kp.getProperty(e,"data","growth","x")===f.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}(Hw),EO=Array.prototype.slice;function TO(t){return t}var MO=1,AO=2,SO=3,kO=4,LO=1e-6;function CO(t){return"translate("+(t+.5)+",0)"}function jO(t){return"translate(0,"+(t+.5)+")"}function DO(t){return function(e){return+t(e)}}function PO(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function RO(){return!this.__axis}function IO(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=t===MO||t===kO?-1:1,c=t===kO||t===AO?"x":"y",l=t===MO||t===SO?CO:jO;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):TO:i,d=Math.max(o,0)+s,v=e.range(),g=+v[0]+.5,y=+v[v.length-1]+.5,_=(e.bandwidth?PO:DO)(e.copy()),m=f.selection?f.selection():f,b=m.selectAll(".domain").data([null]),x=m.selectAll(".tick").data(h,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*d).attr("dy",t===MO?"0em":t===SO?"0.71em":"0.32em")),f!==m&&(b=b.transition(f),x=x.transition(f),E=E.transition(f),T=T.transition(f),w=w.transition(f).attr("opacity",LO).attr("transform",(function(t){return isFinite(t=_(t))?l(t):this.getAttribute("transform")})),O.attr("opacity",LO).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:_(t))}))),w.remove(),b.attr("d",t===kO||t==AO?a?"M"+u*a+","+g+"H0.5V"+y+"H"+u*a:"M0.5,"+g+"V"+y:a?"M"+g+","+u*a+"V0.5H"+y+"V"+u*a:"M"+g+",0.5H"+y),x.attr("opacity",1).attr("transform",(function(t){return l(_(t))})),E.attr(c+"2",u*o),T.attr(c,u*d).text(p),m.filter(RO).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===AO?"start":t===kO?"end":"middle"),m.each((function(){this.__axis=_}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=EO.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:EO.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:EO.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f}function NO(t){return IO(MO,t)}function BO(t){return IO(AO,t)}function FO(t){return IO(SO,t)}function zO(t){return IO(kO,t)}var GO=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return d(n,t),n.prototype.createOrGetScale=function(){var t,e,n=this.configs.position,r=kp.getProperty(this.model.getOptions(),"axes",n);if(this.scaleType=r&&r.scaleType?r.scaleType:o.LINEAR,e=this.scaleType===o.TIME?b_():this.scaleType===o.LOG?function t(){var e=Eg(Jv()).domain([1,10]);return e.copy=function(){return Kv(e,t()).base(e.base())},Id.apply(e,arguments),e}().base(r.base||10):this.scaleType===o.LABELS?Yd():gg(),!this.model.get(n)){var a=((t={})[n]=this,t);r&&(!0===r.primary&&(a[i.PRIMARY]=this),!0===r.secondary&&(a[i.SECONDARY]=this)),this.model.set(a,!0)}return this.scale=e,e},n.prototype.getScale=function(){return this.scale?this.scale:this.createOrGetScale()},n.prototype.getScaleDomain=function(){var t,e=this.model.getOptions(),n=this.configs.position,r=kp.getProperty(e,"axes",n),i=this.model.getDisplayData(),a=i.datasets,s=i.labels;if(r&&r.scaleType===o.LABELS)return s||this.model.getDisplayData().datasets[0].data.map((function(t,e){return e+1}));if(r.stacked)t=kd(s.reduce((function(t,e,n){var r=a.map((function(t){return isNaN(t.data[n])?t.data[n].value:t.data[n]})),i=r.reduce((function(t,e){return t+e}),0);return t.concat(i,function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(r))}),[]).concat(0));else{var u=a.reduce((function(t,e){return e.data.forEach((function(e){t=r.scaleType===o.TIME?t.concat(e.date):t.concat(isNaN(e)?e.value:e)})),t}),[]);r.scaleType!==o.TIME&&(u=u.concat(0)),t=kd(u)}if(r.scaleType===o.TIME){if(kp.getProperty(e,"timeScale","addSpaceOnEdges")){var c=t[0],l=t[1];c.setDate(c.getDate()-1),l.setDate(l.getDate()+1)}return[new Date(t[0]),new Date(t[1])]}return t[1]=1.1*t[1],t},n.prototype.render=function(t){void 0===t&&(t=!0);var n,i,a=this.configs.position,s=this.model.getOptions(),u=kp.getProperty(s,"axes",a),c=this.getContainerSVG(),l=ob.getSVGElementSize(this.parent,{useAttrs:!0}),f=l.width,h=l.height;a===r.BOTTOM||a===r.TOP?(n=this.configs.axes[r.LEFT]?this.margins.left:0,i=this.configs.axes[r.RIGHT]?f-this.margins.right:f):(n=h-this.margins.bottom,i=this.margins.top);var p,d=this.createOrGetScale().domain(this.getScaleDomain());switch(this.scaleType===o.LABELS?d.rangeRound([n,i]):d.range([n,i]),a){case r.LEFT:p=zO;break;case r.BOTTOM:p=FO;break;case r.RIGHT:p=BO;break;case r.TOP:p=NO}if(this.scaleType===o.TIME){var v=kp.getProperty(s,"locale","time");v&&l_(v)}var g=p(d).tickSizeOuter(0).tickFormat(kp.getProperty(u,"ticks","formatter"));if(d.ticks){var y=kp.getProperty(u,"ticks","number")||td.ticks.number;if(g.ticks(y),this.scaleType===o.TIME){var _=d.ticks(y).concat(d.domain()).map((function(t){return+t})).sort();_=kp.removeArrayDuplicates(_),kp.getProperty(s,"timeScale","addSpaceOnEdges")&&_.length>2&&(_.splice(_.length-1,1),_.splice(0,1)),g.tickValues(_)}}var m=ob.appendOrSelect(c,"g.axis."+a),b=!m.select("g.ticks").empty(),x=ob.appendOrSelect(m,"g.ticks");b||x.attr("role",e.GRAPHICS_OBJECT+" "+e.GROUP);var w=ob.appendOrSelect(m,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0);switch(a){case r.LEFT:x.attr("transform","translate("+this.margins.left+", 0)");break;case r.BOTTOM:x.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case r.RIGHT:x.attr("transform","translate("+(f-this.margins.right)+", 0)");break;case r.TOP:x.attr("transform","translate(0, "+this.margins.top+")")}if(u.title){var O=ob.appendOrSelect(m,"text.axis-title").text(u.title);switch(a){case r.LEFT:O.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case r.BOTTOM:O.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+h+")").style("text-anchor","middle");break;case r.RIGHT:O.attr("transform","rotate(90)").attr("y",-f).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case r.TOP:var E=ob.getSVGElementSize(O,{useBBox:!0}).height;O.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+E/2+")").style("text-anchor","middle")}}if(x=t&&b?x.transition(this.services.transitions.getTransition("axis-update")).call(g):x.call(g),w.call(g),a===r.BOTTOM||a===r.TOP){var T=!1;if(d.step){T=w.selectAll("g.tick text").nodes().some((function(t){return ob.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var M=kp.getProperty(u,"ticks","rotateIfSmallerThan")||td.ticks.rotateIfSmallerThan;T=f/d.ticks().length/2<M}T?m.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",a===r.TOP?"end":"start"):m.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}},n.prototype.getValueFromScale=function(t,e){var n=isNaN(t)?t.value:t;if(this.scaleType===o.LABELS){var r=this.model.getDisplayData().labels[e];return this.scale(r)+this.scale.step()/2}return this.scaleType===o.TIME?this.scale(new Date(t.date||t.label)):this.scale(n)},n.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},n.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},n}(Hw),WO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.children={},e.margins={top:0,right:0,bottom:0,left:0},e}return d(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},i=Object.keys(r),a=kp.getProperty(this.model.getOptions(),"axes");a?i.forEach((function(t){var e=a[r[t]];e&&(n[r[t]]=!0,!0===e.primary||e.secondary)})):(this.model.getOptions().axes={left:{primary:!0},bottom:{secondary:!0,type:this.model.getDisplayData().labels?o.LABELS:void 0}},n[r.LEFT]=!0,n[r.BOTTOM]=!0),this.configs.axes=n,i.forEach((function(t){var n=r[t];if(e.configs.axes[n]&&!e.children[n]){var i=new GO(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});i.setModel(e.model),i.setServices(e.services),i.setParent(e.parent),e.children[n]=i}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var s={};Object.keys(this.children).forEach((function(t){var n,i=e.children[t],o=i.configs.position,a=i.getInvisibleAxisRef(),u=ob.getSVGElementSize(a,{useBBox:!0}),c=u.width,l=u.height;switch(n=i.getTitleRef().empty()?0:ob.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o){case r.TOP:s.top=l+n;break;case r.BOTTOM:s.bottom=l+n;break;case r.LEFT:s.left=c+n;break;case r.RIGHT:s.right=c+n}})),Object.keys(s).some((function(t){return e.margins[t]!==s[t]}))&&(this.margins=Object.assign(this.margins,s),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Hw),VO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return d(e,t),e.prototype.render=function(){this.drawBackdrop(),ob.appendOrSelect(this.backdrop,"g.x.grid"),ob.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(),this.drawYGrid(),kp.getProperty(this.model.getOptions(),"tooltip","gridline","enabled")&&this.addGridEventListeners()},e.prototype.drawXGrid=function(){var t=this.parent,e=this.backdrop.attr("height"),n=FO(this.services.axes.getMainXAxis().getScale()).tickSizeInner(-e).tickSizeOuter(0),r=kp.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");n.ticks(r);var i=t.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+e+")").call(n);this.cleanGrid(i)},e.prototype.drawYGrid=function(){var t=this.parent,e=this.backdrop.attr("width"),n=zO(this.services.axes.getMainYAxis().getScale()).tickSizeInner(-e).tickSizeOuter(0),r=kp.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");n.ticks(r);var i=t.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")").call(n);this.cleanGrid(i)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(kp.getTranslationValues(t).tx)-Number(kp.getTranslationValues(e).tx)})),i=-1;r.forEach((function(e,n){t[0]>=+kp.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=+kp.getTranslationValues(s).tx-+kp.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=ob.getSVGElementSize(u).width-+kp.getTranslationValues(a).tx}else o=+kp.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold},e.prototype.getActiveGridline=function(t){var e=kp.getProperty(this.model.getOptions,"tooltip","gridline","threshold")?kp.getProperty(this.model.getOptions,"tooltip","gridline","threshold"):this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var n=kp.getTranslationValues(this),r=Number(n.tx)-e,i=Number(n.tx)+e;return r<=t[0]&&t[0]<=i}))},e.prototype.addGridEventListeners=function(){var t=this,e=this.parent;ob.appendOrSelect(e,"rect.chart-grid-backdrop").on("mousemove mouseover",(function(){var n=Pm(t.services.domUtils.getMainSVG()),r=jm(this);e.selectAll(".x.grid .tick").classed("active",!1);var i,o=t.getActiveGridline(n);o.empty()?t.services.events.dispatchEvent("hide-tooltip",{}):(o.classed("active",!0),o.each((function(e){i=t.services.axes.getDataFromDomain(e)})),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:r,multidata:i,type:s.GRIDLINE}))})).on("mouseout",(function(){e.selectAll(".x.grid .tick").classed("active",!1),t.services.events.dispatchEvent("hide-tooltip",{})}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.axes.getMainXAxis().getScale(),n=this.services.axes.getMainYAxis().getScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=ob.appendOrSelect(t,"svg.chart-grid-backdrop");var c=ob.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}(Hw),HO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="horizontal-zero-line",e}return d(e,t),e.prototype.render=function(t){var e=this.getContainerSVG(),n=this.services.axes.getMainXAxis().scale.range(),r=n[0],i=n[1],o=this.services.axes.getYValue(0)+.5;ob.appendOrSelect(e,"line.domain").transition(this.services.transitions.getTransition("horizontal-line-update",t)).attr("y1",o).attr("y2",o).attr("x1",r).attr("x2",i)},e}(Hw),UO=function(){function t(t,e){this.services={domUtils:ob,events:ab,transitions:gx},this.model=new x_(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener("model-update",(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener("chart-resize",(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent("render-finished")}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new Yw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},n={id:"legend",components:[new Uw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},r={id:"graph-frame",components:t,growth:{x:f.STRETCH,y:f.FIXED}},i=l.COLUMN,o=kp.getProperty(this.model.getOptions(),"legend","position");"left"===o?(i=l.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):"right"===o?(i=l.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):"bottom"===o&&(i=l.COLUMN_REVERSE);var a={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},s={id:"full-frame",components:[new OO(this.model,this.services,[n,a,r],{direction:i})],growth:{x:f.STRETCH,y:f.FIXED}},u=[];if(this.model.getOptions().title){u.push(e);var h={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}};u.push(h)}return u.push(s),[new OO(this.model,this.services,u,{direction:l.COLUMN})]},t}(),YO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{axes:yx,curves:Vw}),r}return d(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new Yw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},n={id:"legend",components:[new Uw(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},r={id:"graph-frame",components:t,growth:{x:f.STRETCH,y:f.FIXED}},i=l.COLUMN,o=kp.getProperty(this.model.getOptions(),"legend","position");o===u.LEFT?(i=l.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):o===u.RIGHT?(i=l.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=c.VERTICAL)):o===u.BOTTOM&&(i=l.COLUMN_REVERSE);var a={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}},s={id:"full-frame",components:[new OO(this.model,this.services,[n,a,r],{direction:i})],growth:{x:f.STRETCH,y:f.FIXED}},h=[];if(this.model.getOptions().title){h.push(e);var p={id:"spacer",components:[new uO(this.model,this.services)],growth:{x:f.PREFERRED,y:f.FIXED}};h.push(p)}return h.push(s),[new OO(this.model,this.services,h,{direction:l.COLUMN})]},e}(UO),XO=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Ip.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Ip.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=kp.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Ud().range(t.fillColors).domain(this.allDataLabels);else{var e=Ed;this.colorScale=Ud().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(x_),qO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new XO(r.services),r.model.setOptions(kp.merge(kp.clone(Kp.simpleBarChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new tO(this.model,this.services),new HO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Kw(this.model,this.services)),e},e}(YO),$O=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.groupedBarChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new eO(this.model,this.services),new HO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Kw(this.model,this.services)),e},e}(YO),ZO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.stackedBarChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new nO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Kw(this.model,this.services)),e},e}(YO),KO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.lineChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new rO(this.model,this.services),new iO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Jw(this.model,this.services)),e},e}(YO),JO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.scatterChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new WO(this.model,this.services),new VO(this.model,this.services),new iO(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Jw(this.model,this.services)),e},e}(YO),QO=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Ip.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Ip.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=kp.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.toggleDataLabel=function(t){var e=Ip.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Ud().range(t.fillColors).domain(this.allDataLabels);else{var e=Ed;this.colorScale=Ud().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(x_),tE=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new QO(i.services),r?i:(i.model.setOptions(kp.merge(kp.clone(Kp.pieChart),n.options)),i.init(e,n),i)}return d(e,t),e.prototype.getComponents=function(){var t=[new aO(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Zw(this.model,this.services)),e},e}(UO),eE=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(kp.merge(kp.clone(Kp.donutChart),n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new sO(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Zw(this.model,this.services)),e},e}(tE),nE=Ed;t.DonutChart=eE,t.GroupedBarChart=$O,t.LineChart=KO,t.PieChart=tE,t.ScatterChart=JO,t.SimpleBarChart=qO,t.StackedBarChart=ZO,t.colorPalettes=Td,t.configurations=nd,t.defaultColors=nE,t.interfaces=v,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
@@ -26,8 +26,13 @@ var Title = /** @class */ (function (_super) {
|
|
|
26
26
|
* Truncates title creating ellipses and attaching tooltip for exposing full title.
|
|
27
27
|
*/
|
|
28
28
|
Title.prototype.truncateTitle = function () {
|
|
29
|
-
|
|
29
|
+
// get a reference to the title elements to calculate the size the title can be
|
|
30
|
+
var containerWidth = DOMUtils.getSVGElementSize(this.services.domUtils.getMainSVG(), { useAttr: true }).width;
|
|
30
31
|
var title = DOMUtils.appendOrSelect(this.parent, "text.title");
|
|
32
|
+
// sanity check to prevent stack overflow on binary search
|
|
33
|
+
if (containerWidth <= 0) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
31
36
|
// check if the title is too big for the containing svg
|
|
32
37
|
if (title.node().getComputedTextLength() > containerWidth) {
|
|
33
38
|
// append the ellipses to their own tspan to calculate the text length
|
|
@@ -46,7 +51,8 @@ var Title = /** @class */ (function (_super) {
|
|
|
46
51
|
.text("...");
|
|
47
52
|
// add events for displaying the tooltip with the title
|
|
48
53
|
var self_1 = this;
|
|
49
|
-
title
|
|
54
|
+
title
|
|
55
|
+
.on("mouseenter", function () {
|
|
50
56
|
self_1.services.events.dispatchEvent("show-tooltip", {
|
|
51
57
|
hoveredElement: title,
|
|
52
58
|
type: TooltipTypes.TITLE
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","sourceRoot":"","sources":["title.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;IAA2B,yBAAS;IAApC;QAAA,
|
|
1
|
+
{"version":3,"file":"title.js","sourceRoot":"","sources":["title.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;IAA2B,yBAAS;IAApC;QAAA,qEAqFC;QApFA,UAAI,GAAG,OAAO,CAAC;;IAoFhB,CAAC;IAlFA;;OAEG;IACH,6BAAa,GAAb;QACC,+EAA+E;QAC/E,IAAM,cAAc,GAAG,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC;QAChH,IAAM,KAAK,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAEjE,0DAA0D;QAC1D,IAAI,cAAc,IAAI,CAAC,EAAE;YACxB,OAAO;SACP;QAED,uDAAuD;QACvD,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,qBAAqB,EAAE,GAAG,cAAc,EAAE;YAC1D,sEAAsE;YACtE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;iBACnB,IAAI,CAAC,KAAK,CAAC,CAAC;YAEd,qDAAqD;YACrD,IAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,qBAAqB,EAAE,CAAC;YAC3F,IAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,WAAW,CAAC,CAAC;YAC/D,IAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC;YAElD,8EAA8E;YAC9E,8DAA8D;YAC9D,IAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;YAEtG,iCAAiC;YACjC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;iBACtD,MAAM,CAAC,OAAO,CAAC;iBACf,IAAI,CAAC,KAAK,CAAC,CAAC;YAEd,uDAAuD;YACvD,IAAM,MAAI,GAAG,IAAI,CAAC;YAClB,KAAK;iBACH,EAAE,CAAC,YAAY,EAAE;gBACjB,MAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,EAAE;oBAClD,cAAc,EAAE,KAAK;oBACrB,IAAI,EAAE,YAAY,CAAC,KAAK;iBACxB,CAAC,CAAC;YACJ,CAAC,CAAC;iBACD,EAAE,CAAC,UAAU,EAAE;gBACf,MAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,EAAE;oBAClD,cAAc,EAAE,KAAK;iBACrB,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;IACF,CAAC;IAED,sBAAM,GAAN;QACC,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEnC,IAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;aACf,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;aACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC;QAEtC,gEAAgE;QAChE,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACO,iCAAiB,GAA3B,UAA4B,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK;QACnD,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1C,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,EAAE;YAC7C,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;SACxD;aAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,EAAE;YACpD,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE;gBACjD,OAAO,GAAG,CAAC;aACX;YACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;SACtD;aAAM;YACN,OAAO,GAAG,CAAC;SACX;IACF,CAAC;IACF,YAAC;AAAD,CAAC,AArFD,CAA2B,SAAS,GAqFnC","sourcesContent":["// Internal Imports\nimport { Component } from \"../component\";\nimport { DOMUtils } from \"../../services\";\nimport { TooltipTypes } from \"./../../interfaces\";\n\nexport class Title extends Component {\n\ttype = \"title\";\n\n\t/**\n\t * Truncates title creating ellipses and attaching tooltip for exposing full title.\n\t */\n\ttruncateTitle() {\n\t\t// get a reference to the title elements to calculate the size the title can be\n\t\tconst containerWidth = DOMUtils.getSVGElementSize(this.services.domUtils.getMainSVG(), { useAttr: true }).width;\n\t\tconst title = DOMUtils.appendOrSelect(this.parent, \"text.title\");\n\n\t\t// sanity check to prevent stack overflow on binary search\n\t\tif (containerWidth <= 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// check if the title is too big for the containing svg\n\t\tif (title.node().getComputedTextLength() > containerWidth) {\n\t\t\t// append the ellipses to their own tspan to calculate the text length\n\t\t\ttitle.append(\"tspan\")\n\t\t\t\t.text(\"...\");\n\n\t\t\t// get the bounding width including the elipses '...'\n\t\t\tconst tspanLength = DOMUtils.appendOrSelect(title, \"tspan\").node().getComputedTextLength();\n\t\t\tconst truncatedSize = Math.floor(containerWidth - tspanLength);\n\t\t\tconst titleString = this.model.getOptions().title;\n\n\t\t\t// get the index for creating the max length substring that fit within the svg\n\t\t\t// use one less than the index to avoid crowding (the elipsis)\n\t\t\tconst substringIndex = this.getSubstringIndex(title.node(), 0, titleString.length - 1, truncatedSize);\n\n\t\t\t// use the substring as the title\n\t\t\ttitle.text(titleString.substring(0, substringIndex - 1))\n\t\t\t\t.append(\"tspan\")\n\t\t\t\t.text(\"...\");\n\n\t\t\t// add events for displaying the tooltip with the title\n\t\t\tconst self = this;\n\t\t\ttitle\n\t\t\t\t.on(\"mouseenter\", function() {\n\t\t\t\t\tself.services.events.dispatchEvent(\"show-tooltip\", {\n\t\t\t\t\t\thoveredElement: title,\n\t\t\t\t\t\ttype: TooltipTypes.TITLE\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.on(\"mouseout\", function() {\n\t\t\t\t\tself.services.events.dispatchEvent(\"hide-tooltip\", {\n\t\t\t\t\t\thoveredElement: title,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t}\n\t}\n\n\trender() {\n\t\tconst svg = this.getContainerSVG();\n\n\t\tconst text = DOMUtils.appendOrSelect(svg, \"text.title\");\n\t\ttext.attr(\"x\", 0)\n\t\t\t.attr(\"y\", 20)\n\t\t\t.text(this.model.getOptions().title);\n\n\t\t// title needs to first render so that we can check for overflow\n\t\tthis.truncateTitle();\n\t}\n\n\t/**\n\t * Returns the index for a maximum length substring that is less than the width parameter.\n\t * @param title the title node used for getting the text lengths of substrings\n\t * @param start the start index for the binary search\n\t * @param end the end index for the binary search\n\t * @param width the width of the svg container that holds the title\n\t */\n\tprotected getSubstringIndex(title, start, end, width) {\n\t\tconst mid = Math.floor((end + start) / 2);\n\t\tif (title.getSubStringLength(0, mid) > width) {\n\t\t\treturn this.getSubstringIndex(title, start, mid, width);\n\t\t} else if (title.getSubStringLength(0, mid) < width) {\n\t\t\tif (title.getSubStringLength(0, mid + 1) > width) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\treturn this.getSubstringIndex(title, mid, end, width);\n\t\t} else {\n\t\t\treturn mid;\n\t\t}\n\t}\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/charts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Carbon charting components",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"resize-observer-polyfill": "1.5.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"d3": ">=5.0.0 <=5.
|
|
53
|
+
"d3": ">=5.0.0 <=5.14.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@carbon/colors": "10.4.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"babel-polyfill": "6.26.0",
|
|
67
67
|
"copy-webpack-plugin": "4.5.2",
|
|
68
68
|
"css-loader": "0.28.7",
|
|
69
|
-
"d3": "5.
|
|
69
|
+
"d3": "5.14.2",
|
|
70
70
|
"extract-text-webpack-plugin": "3.0.2",
|
|
71
71
|
"file-loader": "1.1.5",
|
|
72
72
|
"html-loader": "0.5.1",
|
|
@@ -40,7 +40,7 @@ var Transitions = /** @class */ (function (_super) {
|
|
|
40
40
|
var t = transition(name)
|
|
41
41
|
.duration(Tools.getProperty(Configuration.transitions, name, "duration") || Configuration.transitions.default.duration);
|
|
42
42
|
this.pendingTransitions[t._id] = t;
|
|
43
|
-
t.on("end", function () {
|
|
43
|
+
t.on("end interrupt cancel", function () {
|
|
44
44
|
delete _this.pendingTransitions[t._id];
|
|
45
45
|
});
|
|
46
46
|
return t;
|
|
@@ -49,7 +49,7 @@ var Transitions = /** @class */ (function (_super) {
|
|
|
49
49
|
var _this = this;
|
|
50
50
|
var t = transition(name).duration(0);
|
|
51
51
|
this.pendingTransitions[t._id] = t;
|
|
52
|
-
t.on("end", function () {
|
|
52
|
+
t.on("end interrupt cancel", function () {
|
|
53
53
|
delete _this.pendingTransitions[t._id];
|
|
54
54
|
});
|
|
55
55
|
return t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["transitions.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,aAAa;AACb,OAAO,EAAc,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD;IAAiC,+BAAO;IAAxC;QAAA,qEAyCC;QAxCA,wBAAkB,GAAG,EAAE,CAAC;;IAwCzB,CAAC;IAvCA,iDAAiD;IAEjD,0BAAI,GAAJ;QAAA,iBAKC;QAJA,IAAI,CAAC,QAAQ,CAAC,MAAM;aAClB,gBAAgB,CAAC,cAAc,EAAE;YACjC,KAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mCAAa,GAAb,UAAc,IAAa,EAAE,OAAiB;QAA9C,iBAcC;QAbA,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,UAAU,KAAK,KAAK,IAAI,OAAO,KAAK,KAAK,EAAE;YACtE,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;SACvC;QAED,IAAM,CAAC,GAAQ,UAAU,CAAC,IAAI,CAAC;aAC7B,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEzH,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["transitions.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,aAAa;AACb,OAAO,EAAc,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD;IAAiC,+BAAO;IAAxC;QAAA,qEAyCC;QAxCA,wBAAkB,GAAG,EAAE,CAAC;;IAwCzB,CAAC;IAvCA,iDAAiD;IAEjD,0BAAI,GAAJ;QAAA,iBAKC;QAJA,IAAI,CAAC,QAAQ,CAAC,MAAM;aAClB,gBAAgB,CAAC,cAAc,EAAE;YACjC,KAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mCAAa,GAAb,UAAc,IAAa,EAAE,OAAiB;QAA9C,iBAcC;QAbA,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,UAAU,KAAK,KAAK,IAAI,OAAO,KAAK,KAAK,EAAE;YACtE,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;SACvC;QAED,IAAM,CAAC,GAAQ,UAAU,CAAC,IAAI,CAAC;aAC7B,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEzH,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC,CAAC,EAAE,CAAC,sBAAsB,EAAE;YAC5B,OAAO,KAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,CAAC;IACV,CAAC;IAED,0CAAoB,GAApB,UAAqB,IAAa;QAAlC,iBASC;QARA,IAAM,CAAC,GAAS,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAE7C,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC,CAAC,EAAE,CAAC,sBAAsB,EAAE;YAC5B,OAAO,KAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,CAAC;IACV,CAAC;IAED,2CAAqB,GAArB;QACC,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;IACF,kBAAC;AAAD,CAAC,AAzCD,CAAiC,OAAO,GAyCvC","sourcesContent":["// Internal Imports\nimport { Service } from \"../service\";\nimport * as Configuration from \"../../configuration\";\nimport { Tools } from \"../../tools\";\n\n// D3 Imports\nimport { Transition, transition } from \"d3-transition\";\n\nexport class Transitions extends Service {\n\tpendingTransitions = {};\n\t// transitions: Transition<any, any, any, any>[];\n\n\tinit() {\n\t\tthis.services.events\n\t\t\t.addEventListener(\"model-update\", () => {\n\t\t\t\tthis.pendingTransitions = {};\n\t\t\t});\n\t}\n\n\tgetTransition(name?: string, animate?: boolean): Transition<any, any, any, any> {\n\t\tif (this.model.getOptions().animations === false || animate === false) {\n\t\t\treturn this.getInstantTransition(name);\n\t\t}\n\n\t\tconst t: any = transition(name)\n\t\t\t.duration(Tools.getProperty(Configuration.transitions, name, \"duration\") || Configuration.transitions.default.duration);\n\n\t\tthis.pendingTransitions[t._id] = t;\n\t\tt.on(\"end interrupt cancel\", () => {\n\t\t\tdelete this.pendingTransitions[t._id];\n\t\t});\n\n\t\treturn t;\n\t}\n\n\tgetInstantTransition(name?: string): Transition<any, any, any, any> {\n\t\tconst t: any = transition(name).duration(0);\n\n\t\tthis.pendingTransitions[t._id] = t;\n\t\tt.on(\"end interrupt cancel\", () => {\n\t\t\tdelete this.pendingTransitions[t._id];\n\t\t});\n\n\t\treturn t;\n\t}\n\n\tgetPendingTransitions() {\n\t\treturn this.pendingTransitions;\n\t}\n}\n"]}
|