@nova-ui/charts 11.12.0 → 12.0.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.
Files changed (49) hide show
  1. package/bundles/css/styles.css +1 -1
  2. package/bundles/nova-ui-charts.umd.js +203 -199
  3. package/bundles/nova-ui-charts.umd.js.map +1 -1
  4. package/chart/chart.component.d.ts +0 -1
  5. package/esm2015/chart/chart.component.js +1 -2
  6. package/esm2015/chart-donut-content/chart-donut-content.component.js +2 -2
  7. package/esm2015/chart-marker/chart-marker.component.js +1 -1
  8. package/esm2015/chart-popover/chart-popover.component.js +2 -2
  9. package/esm2015/chart-tooltips/chart-tooltip.component.js +1 -1
  10. package/esm2015/chart-tooltips/chart-tooltips.component.js +2 -2
  11. package/esm2015/core/chart-assists/chart-assist.js +1 -1
  12. package/esm2015/core/chart-collection.js +1 -1
  13. package/esm2015/core/chart.js +1 -1
  14. package/esm2015/core/common/data-manager.js +1 -1
  15. package/esm2015/core/common/data-series.js +2 -3
  16. package/esm2015/core/common/mouse-interactive-area.js +1 -1
  17. package/esm2015/core/common/palette/palettes.js +3 -3
  18. package/esm2015/core/common/renderer.js +1 -1
  19. package/esm2015/core/grid/default-text-overflow-handler.js +1 -1
  20. package/esm2015/core/grid/grid.js +3 -3
  21. package/esm2015/core/grid/xy-grid.js +1 -1
  22. package/esm2015/core/plugins/chart-popover-plugin.js +1 -1
  23. package/esm2015/core/plugins/gauge/donut-gauge-labels-plugin.js +1 -1
  24. package/esm2015/core/plugins/gauge/linear-gauge-labels-plugin.js +1 -1
  25. package/esm2015/core/plugins/radial-popover-plugin.js +1 -1
  26. package/esm2015/core/plugins/tooltips/chart-tooltips-plugin.js +1 -1
  27. package/esm2015/gauge/gauge-util.js +6 -3
  28. package/esm2015/legend/legend-series/legend-series.component.js +1 -1
  29. package/esm2015/legend/legend-tile/basic-legend-tile/basic-legend-tile.component.js +1 -1
  30. package/esm2015/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.js +1 -1
  31. package/esm2015/renderers/area/area-accessors.js +1 -1
  32. package/esm2015/renderers/area/area-renderer.js +1 -1
  33. package/esm2015/renderers/bar/bar-renderer.js +5 -3
  34. package/esm2015/renderers/bar/highlight-strategies/bar-highlight-strategy.js +1 -1
  35. package/esm2015/renderers/bar/highlight-strategies/bar-series-highlight-strategy.js +1 -1
  36. package/esm2015/renderers/bar/linear-gauge-thresholds-renderer.js +1 -1
  37. package/esm2015/renderers/bar/preprocessor-utils.js +1 -1
  38. package/esm2015/renderers/line/line-renderer.js +1 -1
  39. package/esm2015/renderers/marker-utils.js +1 -1
  40. package/esm2015/renderers/radial/radial-renderer.js +3 -2
  41. package/esm2015/renderers/xy-renderer.js +1 -1
  42. package/esm2015/thresholds/thresholds-service.js +1 -1
  43. package/fesm2015/nova-ui-charts.js +23 -19
  44. package/fesm2015/nova-ui-charts.js.map +1 -1
  45. package/nova-ui-charts.metadata.json +1 -1
  46. package/package.json +5 -6
  47. package/sdk/locale/messages.en.xlf +353 -0
  48. package/bundles/nova-ui-charts.umd.min.js +0 -2
  49. package/bundles/nova-ui-charts.umd.min.js.map +0 -1
@@ -1,2 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/core"),require("@angular/animations"),require("d3-force"),require("d3-selection"),require("lodash/each"),require("lodash/isEqual"),require("lodash/isNil"),require("rxjs"),require("rxjs/operators"),require("@nova-ui/bits"),require("lodash/isFunction"),require("d3-selection-multi"),require("lodash/isUndefined"),require("lodash/findKey"),require("lodash/debounce"),require("resize-observer-polyfill"),require("lodash/isEmpty"),require("lodash/cloneDeep"),require("lodash/sortBy"),require("lodash/unionWith"),require("lodash/values"),require("d3-color"),require("lodash/isArray"),require("lodash/startsWith"),require("lodash/trim"),require("lodash/trimEnd"),require("lodash/trimStart"),require("d3-array"),require("lodash/defaultsDeep"),require("lodash/flatten"),require("lodash/uniq"),require("lodash/get"),require("lodash/identity"),require("d3-shape"),require("d3-scale"),require("lodash/toString"),require("lodash/indexOf"),require("lodash/keyBy"),require("lodash/unionBy"),require("lodash/filter"),require("lodash/includes"),require("lodash/orderBy"),require("d3-axis"),require("lodash/clone"),require("lodash/find"),require("d3-time"),require("moment/moment"),require("lodash/pickBy"),require("d3-brush"),require("lodash/findIndex")):"function"==typeof define&&define.amd?define("@nova-ui/charts",["exports","@angular/cdk/overlay","@angular/cdk/portal","@angular/core","@angular/animations","d3-force","d3-selection","lodash/each","lodash/isEqual","lodash/isNil","rxjs","rxjs/operators","@nova-ui/bits","lodash/isFunction","d3-selection-multi","lodash/isUndefined","lodash/findKey","lodash/debounce","resize-observer-polyfill","lodash/isEmpty","lodash/cloneDeep","lodash/sortBy","lodash/unionWith","lodash/values","d3-color","lodash/isArray","lodash/startsWith","lodash/trim","lodash/trimEnd","lodash/trimStart","d3-array","lodash/defaultsDeep","lodash/flatten","lodash/uniq","lodash/get","lodash/identity","d3-shape","d3-scale","lodash/toString","lodash/indexOf","lodash/keyBy","lodash/unionBy","lodash/filter","lodash/includes","lodash/orderBy","d3-axis","lodash/clone","lodash/find","d3-time","moment/moment","lodash/pickBy","d3-brush","lodash/findIndex"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).nui=t.nui||{},t.nui.charts={}),t.ng.cdk.overlay,t.ng.cdk.portal,t.ng.core,t.ng.animations,t.d3,t.d3,t._.each,t._.isEqual,t._.isNil,t.rxjs,t.rxjs.operators,t.nui.bits,t._.isFunction,t.d3,t._.isUndefined,t._.findKey,t._.debounce,t.ResizeObserver,t._.isEmpty,t._.cloneDeep,t._.sortBy,t._.unionWith,t._.values,t.d3,t._.isArray,t._.startsWith,t._.trim,t._.trimEnd,t._.trimStart,t.d3,t._.defaultsDeep,t._.flatten,t._.uniq,t._.get,t._.identity,t.d3,t.d3,t._.toString,t._.indexOf,t._.keyBy,t._.unionBy,t._.filter,t._.includes,t._.orderBy,t.d3,t._.clone,t._.find,t.d3,t.moment,t._.pickBy,t.d3,t._.findIndex)}(this,(function(t,e,i,n,r,a,o,s,d,c,l,u,h,p,f,g,v,y,m,b,S,x,_,C,E,w,I,A,T,R,k,L,D,P,O,M,N,G,j,B,F,U,H,V,z,Y,W,q,X,$,K,Z,Q){"use strict";function J(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var tt=J(s),et=J(d),it=J(c),nt=J(p),rt=J(g),at=J(v),ot=J(y),st=J(m),dt=J(b),ct=J(S),lt=J(x),ut=J(_),ht=J(C),pt=J(w),ft=J(I),gt=J(A),vt=J(T),yt=J(R),mt=J(L),bt=J(D),St=J(P),xt=J(O),_t=J(M),Ct=J(j),Et=J(B),wt=J(F),It=J(U),At=J(H),Tt=J(V),Rt=J(z),kt=J(W),Lt=J(q),Dt=J($),Pt=J(K),Ot=J(Q),Mt=function(){};Mt.decorators=[{type:n.Component,args:[{selector:"nui-chart-tooltip",template:"<div>\n <div @tooltip class='nui-chart-tooltip px-2 py-1 nui-text-small'>\n <ng-container *ngTemplateOutlet='template'></ng-container>\n </div>\n</div>\n",changeDetection:n.ChangeDetectionStrategy.OnPush,animations:[r.trigger("tooltip",[r.transition(":enter",[r.style({opacity:0}),r.animate(300,r.style({opacity:1}))]),r.transition(":leave",[r.animate(300,r.style({opacity:0}))])])],styles:[":host{display:block;pointer-events:none}.nui-chart-tooltip{background-color:var(--nui-color-bg-inverse,#111);color:var(--nui-color-text-inverse,#fff);line-height:normal}"]}]}],Mt.propDecorators={template:[{type:n.Input}]};var Nt=function(){function t(t,e,i,n){this.overlay=t,this.overlayPositionBuilder=e,this.scrollStrategyOptions=i,this.elementRef=n}return t.prototype.ngOnInit=function(){var t=this;this.positionStrategy=this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions(this.positions).withFlexibleDimensions(!1).withPush(!0),this.overlayRef=this.overlay.create({panelClass:"nui-chart-tooltip-pane",positionStrategy:this.positionStrategy,scrollStrategy:this.scrollStrategyOptions.close()}),this.openRemoteControl&&(this.openSubscription=this.openRemoteControl.subscribe((function(){t.show()}))),this.closeRemoteControl&&(this.closeSubscription=this.closeRemoteControl.subscribe((function(){t.hide()})))},t.prototype.show=function(){this.overlayRef.hasAttached()?this.positionStrategy.apply():this.overlayRef.attach(new i.ComponentPortal(Mt)).instance.template=this.template},t.prototype.hide=function(){this.overlayRef.detach()},t.prototype.ngOnDestroy=function(){this.hide(),this.openSubscription&&this.openSubscription.unsubscribe(),this.closeSubscription&&this.closeSubscription.unsubscribe()},t.prototype.getOverlayElement=function(){return this.overlayRef.overlayElement},t}();Nt.decorators=[{type:n.Directive,args:[{selector:"[nuiChartTooltip]"}]}],Nt.ctorParameters=function(){return[{type:e.Overlay},{type:e.OverlayPositionBuilder},{type:e.ScrollStrategyOptions},{type:n.ElementRef}]},Nt.propDecorators={template:[{type:n.Input}],openRemoteControl:[{type:n.Input}],closeRemoteControl:[{type:n.Input}],positions:[{type:n.Input}]};var Gt=function(){function t(){}return t.prototype.ngOnChanges=function(t){var e,i=this;t.plugin&&(null===(e=this.contentPositionUpdateSubscription)||void 0===e||e.unsubscribe(),this.contentPositionUpdateSubscription=this.plugin.contentPositionUpdateSubject.subscribe((function(t){i.contentPosition=t})),this.plugin.chart.updateDimensions())},t.prototype.ngOnDestroy=function(){this.contentPositionUpdateSubscription&&this.contentPositionUpdateSubscription.unsubscribe()},t}();Gt.decorators=[{type:n.Component,args:[{selector:"nui-chart-donut-content",template:'<div *ngIf="plugin && contentPosition"\n class="nui-chart-donut-content d-flex justify-content-center align-items-center text-center"\n [style.top.px]="contentPosition.top"\n [style.left.px]="contentPosition.left"\n [style.height.px]="contentPosition.height"\n [style.width.px]="contentPosition.width">\n <ng-content></ng-content>\n</div>\n',styles:[".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}"]}]}],Gt.propDecorators={plugin:[{type:n.Input}]};var jt=function(){function t(t){this.changeDetector=t,this.openTooltips=new l.Subject,this.closeTooltips=new l.Subject,this.unsubscribe$=new l.Subject,this.tooltipDirectivesIndex={},this.closePending=!1,this.isOpen=!1}return t.prototype.ngOnChanges=function(t){var e=this;t.plugin&&t.plugin.currentValue&&(this.unsubscribe$.next(),this.plugin.showSubject.pipe(u.takeUntil(this.unsubscribe$)).subscribe((function(){return e.handleOpen()})),this.plugin.hideSubject.pipe(u.takeUntil(this.unsubscribe$)).subscribe((function(){return e.handleClose()})))},t.prototype.ngOnDestroy=function(){this.unsubscribe$.next(),this.unsubscribe$.complete()},t.prototype.trackByFn=function(t,e){return e.value.seriesId},t.prototype.handleOpen=function(){var t=this;this.changeDetector.detectChanges();var e={};this.tooltips.forEach((function(t){var i,n=null!==(i=t.elementRef.nativeElement.getAttribute("series-id"))&&void 0!==i?i:void 0;if(!n)throw new Error("SeriesId is not defined");e[n]=t}));var i=!et.default(e,this.tooltipDirectivesIndex);this.closePending||i||!this.isOpen?(clearTimeout(this.openTimeout),this.openTimeout=setTimeout((function(){t.openTooltips.next(),clearTimeout(t.collisionTimeout),t.collisionTimeout=setTimeout((function(){t.avoidTooltipCollisions(),t.isOpen=!0}))}))):(this.openTooltips.next(),this.avoidTooltipCollisions(),this.isOpen=!0)},t.prototype.handleClose=function(){var t=this;this.simulation&&this.simulation.stop(),this.closePending=!0,clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout((function(){t.closeTooltips.next(),t.closePending=!1,t.isOpen=!1}))},t.prototype.avoidTooltipCollisions=function(){var t=this,e={};this.tooltips.forEach((function(i){var n,r=i.getOverlayElement(),a=null!==(n=i.elementRef.nativeElement.getAttribute("series-id"))&&void 0!==n?n:void 0;if(!a)throw new Error("SeriesId is not defined");t.tooltipDirectivesIndex[a]=i,e[a]={x:r.offsetLeft,y:r.offsetTop,width:r.clientWidth,height:r.clientHeight}})),this.simulation&&this.simulation.stop(),this.simulation=this.startSimulation(this.tooltipDirectivesIndex,e)},t.prototype.startSimulation=function(t,e){var i=this,n=Object.keys(e).map((function(t){var n=e[t];if(it.default(n.height)||it.default(n.width))throw new Error("Position height or width are not defined");var r={seriesId:t,x:n.x,y:n.y,radius:i.isVertical()?n.height/2:n.width/2};return i.isVertical()?r.fx=n.x:r.fy=n.y,r})),r=a.forceCollide((function(t){return t.radius})).strength(.5).iterations(20),s=a.forceSimulation(n).alphaDecay(.3).force("collisionForce",r);return s.on("tick",(function(){tt.default(n,(function(e){var n=t[e.seriesId];o.select(n.getOverlayElement()).style(i.isVertical()?"top":"left",(i.isVertical()?e.y:e.x)+"px")}))})),s},t.prototype.isVertical=function(){return"right"===this.plugin.orientation},t}();jt.decorators=[{type:n.Component,args:[{selector:"nui-chart-tooltips",template:'<div *ngIf="plugin && plugin.dataPoints">\n <div *ngFor="let item of plugin.dataPoints | keyvalue; trackBy: trackByFn">\n <ng-template #tooltipTemplate>\n <ng-container *ngTemplateOutlet="template; context: {dataPoint:item.value}"></ng-container>\n </ng-template>\n\n <div nuiChartTooltip\n *ngIf="plugin.dataPointPositions[item.key]"\n [attr.series-id]="item.key"\n [template]="tooltipTemplate"\n [openRemoteControl]="openTooltips"\n [closeRemoteControl]="closeTooltips"\n [positions]="plugin.dataPointPositions[item.key].overlayPositions"\n class="chart-tooltips__popover"\n [style.left.px]="plugin.dataPointPositions[item.key].x"\n [style.top.px]="plugin.dataPointPositions[item.key].y"\n [style.height.px]="plugin.dataPointPositions[item.key].height"\n [style.width.px]="plugin.dataPointPositions[item.key].width"\n ></div>\n </div>\n</div>\n',styles:[".chart-tooltips__popover{position:absolute;pointer-events:none}"]}]}],jt.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},jt.propDecorators={plugin:[{type:n.Input}],template:[{type:n.Input}],tooltips:[{type:n.ViewChildren,args:[Nt]}]};var Bt=function(){function t(t,e){this.changeDetector=t,this.element=e,this.update=new n.EventEmitter,this.destroy$=new l.Subject,this.initPlugin$=new l.Subject}return t.prototype.ngOnChanges=function(t){t.plugin&&!t.plugin.isFirstChange()&&this.initPlugin()},t.prototype.ngOnInit=function(){this.initPlugin()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.initPlugin$.complete()},t.prototype.initPlugin=function(){var t,e,i=this;this.initPlugin$.next(),null===(t=this.plugin)||void 0===t||t.openPopoverSubject.pipe(u.takeUntil(this.initPlugin$),u.takeUntil(this.destroy$)).subscribe((function(){i.changeDetector.markForCheck()})),null===(e=this.plugin)||void 0===e||e.updatePositionSubject.pipe(u.takeUntil(this.initPlugin$),u.takeUntil(this.destroy$)).subscribe((function(t){var e,n,r;null===(e=i.popover)||void 0===e||e.resetSize();var a=t.width/2;i.element.nativeElement.style.left=t.left+a+"px",i.element.nativeElement.style.top=t.top+"px",null===(n=i.popover)||void 0===n||n.updatePosition(),i.update.next(null===(r=i.plugin)||void 0===r?void 0:r.dataPoints)}))},t}();Bt.decorators=[{type:n.Component,args:[{selector:"nui-chart-popover",template:'<div *ngIf="plugin && plugin.dataPoints">\n <nui-popover class="chart-popover__popover"\n trigger="openPopoverSubject"\n placement="top"\n [unlimited]="true"\n [template]="popoverTemplate"\n [openPopover]="plugin.openPopoverSubject"\n [closePopover]="plugin.closePopoverSubject"\n [hasPadding]="false"\n [container]="element.nativeElement"\n [style.height.px]="plugin.popoverTargetPosition.height"\n [withGrowAfterOpen]="true">\n </nui-popover>\n\n <ng-template #popoverTemplate>\n <ng-container *ngTemplateOutlet="template; context: {dataPoints:plugin.dataPoints}"></ng-container>\n </ng-template>\n</div>\n',styles:[":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}"]}]}],Bt.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:n.ElementRef}]},Bt.propDecorators={plugin:[{type:n.Input}],template:[{type:n.Input}],update:[{type:n.Output}],popover:[{type:n.ViewChild,args:[h.PopoverComponent]}]};var Ft,Ut,Ht,Vt=function(){function t(t){this.changeDetector=t,this.maxSize=20,this.height="10px",this.width="10px",this.svg=new l.BehaviorSubject("")}return t.prototype.ngAfterViewInit=function(){var t=this;this.svg.subscribe((function(e){t.renderMarkerSvg(e)}))},t.prototype.ngOnChanges=function(t){(t.marker||t.color)&&(t.color&&this.marker.setColor(this.color),this.marker&&this.marker.getSvg&&nt.default(this.marker.getSvg)&&this.svg.next(this.marker.getSvg()))},t.prototype.ngOnDestroy=function(){this.svg.complete()},t.prototype.renderMarkerSvg=function(t){var e=this,i=this.svgContent.nativeElement,n='<line x1="-10" y1="0" x2="10" y2="0" style="stroke:'+this.color+';stroke-width:2" />';i.innerHTML="",this.drawLine&&i.insertAdjacentHTML("beforeend",n),i.insertAdjacentHTML("beforeend",t),setTimeout((function(){var t=i.getBBox();e.viewBox=t.x-3+" "+(t.y-3)+" "+(t.width+6)+" "+(t.height+6),e.width=Math.min(t.width+6,e.maxSize)+"px",e.height=Math.min(t.height+6,e.maxSize)+"px",e.changeDetector.markForCheck()}))},t}();Vt.decorators=[{type:n.Component,args:[{selector:"nui-chart-marker",template:'<svg [attr.width]="width" [attr.height]="height" [attr.viewBox]="viewBox">\n <g #svgContent></g>\n</svg>\n',styles:[":host{font-size:0}"]}]}],Vt.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Vt.propDecorators={marker:[{type:n.Input}],drawLine:[{type:n.Input}],color:[{type:n.Input}],maxSize:[{type:n.Input}],svgContent:[{type:n.ViewChild,args:["svgContent"]}]},t.RenderState=void 0,(Ft=t.RenderState||(t.RenderState={})).hidden="hidden",Ft.deemphasized="deemphasized",Ft.emphasized="emphasized",Ft.default="default",t.RenderLayerName=void 0,(Ut=t.RenderLayerName||(t.RenderLayerName={})).background="background",Ut.data="data",Ut.unclippedData="unclipped-data",Ut.foreground="foreground";var zt="mouse_active",Yt="interaction_values_active",Wt="interaction_values",qt="interaction_coordinates",Xt="highlight_data_point",$t="select_data_point",Kt="highlight_series",Zt="interaction_series",Qt="interaction_data_points",Jt="interaction_data_point",te="destroy",ee="set_domain",ie="refresh",ne="chart_view_status",re="series_state_change",ae="axes_style_change",oe=new n.InjectionToken("chart_component"),se=((Ht={})[t.RenderLayerName.background]={name:t.RenderLayerName.background,order:0,clipped:!0},Ht[t.RenderLayerName.data]={name:t.RenderLayerName.data,order:50,clipped:!0},Ht[t.RenderLayerName.unclippedData]={name:t.RenderLayerName.unclippedData,order:51,clipped:!1},Ht[t.RenderLayerName.foreground]={name:t.RenderLayerName.foreground,order:1e3,clipped:!1},Ht),de=-1,ce=-2,le="ignore-interaction",ue=function(t,e){return(ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function he(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}ue(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}Object.create;function pe(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function fe(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function ge(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(fe(arguments[e]));return t}Object.create;var ve=function(){function t(){this.streams={}}return t.prototype.getStream=function(t){return this.streams[t]||(this.streams[t]=new l.Subject),this.streams[t]},t.prototype.destroy=function(){var t=this;tt.default(Object.keys(this.streams),(function(e){t.streams[e].complete()}))},t}(),ye=function(){function t(){this.lastIndex=-1,this.events=[Wt,qt,zt,ie],this.charts={},this.subscriptions={}}return t.prototype.addChart=function(t){var e=this,i=(++this.lastIndex).toString();this.charts[i]=t,this.eventBus||this.initializeEventBus(),tt.default(this.events,(function(n){e.subscribe(i,t.getEventBus().getStream(n),(function(t){var r;t.broadcast||null===(r=e.eventBus)||void 0===r||r.getStream(n).next({chartIndex:i,event:t})}))})),this.subscribe(i,t.getEventBus().getStream(te),(function(i){e.removeChart(t),0===Object.keys(e.charts).length&&e.destroy()}))},t.prototype.removeChart=function(t){var e=this.getChartKey(t);if(rt.default(e))throw new Error("Chart not registered!");this.unsubscribeChart(e),delete this.charts[e]},t.prototype.destroy=function(){var t;null===(t=this.eventBus)||void 0===t||t.destroy(),this.eventBus=void 0},t.prototype.initializeEventBus=function(){var t,e,i=this;this.eventBus=new ve;var n=function(t){r.eventBus.getStream(t).subscribe((function(e){var n,r;try{for(var a=(n=void 0,pe(Object.keys(i.charts))),o=a.next();!o.done;o=a.next()){var s=o.value;s!==e.chartIndex&&(e.event.broadcast=!0,i.charts[s].getEventBus().getStream(t).next(e.event))}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}))},r=this;try{for(var a=pe(this.events),o=a.next();!o.done;o=a.next()){n(o.value)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}},t.prototype.subscribe=function(t,e,i){var n=e.subscribe(i),r=this.subscriptions[t];rt.default(r)&&(r=[],this.subscriptions[t]=r),r.push(n)},t.prototype.unsubscribeChart=function(t){tt.default(this.subscriptions[t],(function(t){t.unsubscribe()})),delete this.subscriptions[t]},t.prototype.getChartKey=function(t){return at.default(this.charts,(function(e){return e===t}))},t}(),me=function(){function t(){this.collections={}}return t.prototype.getChartCollection=function(t){var e=this.collections[t];return rt.default(e)&&(e=new ye,this.collections[t]=e),e},t}();me.decorators=[{type:n.Injectable}];var be=function(){function t(t,e){this.chartComponent=t,this.chartCollectionService=e}return t.prototype.ngAfterViewInit=function(){this.chartCollectionService.getChartCollection(this.collectionId).addChart(this.chartComponent.chart)},t}();be.decorators=[{type:n.Directive,args:[{selector:"[nuiChartCollectionId]"}]}],be.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[oe]}]},{type:me}]},be.propDecorators={collectionId:[{type:n.Input,args:["nuiChartCollectionId"]}]};var Se,xe=function(){function t(t,e,i){var n=this;this.elRef=t,this.ngZone=e,this.cd=i,this.redraw=function(){n.chart.updateDimensions(),n.cd.detectChanges()},this.intersectionObserverCallback=function(t,e){var i={isChartInView:t[0].isIntersecting};n.chart.getEventBus().getStream(ne).next({data:i})}}return t.prototype.ngOnInit=function(){this.intersectionObserver=new IntersectionObserver(this.intersectionObserverCallback),this.intersectionObserver.observe(this.elRef.nativeElement)},t.prototype.ngOnChanges=function(t){if(t.chart){var e=t.chart.previousValue;e&&e.destroy(),this.chart&&(this.chart.build(this.elRef.nativeElement),this.redraw())}},t.prototype.ngAfterContentInit=function(){var t=this;this.chart.getEventBus().getStream(ie).subscribe((function(){t.chart.updateDimensions()}))},t.prototype.ngAfterViewInit=function(){var t=this;this.resizeHandler=ot.default((function(){return t.redraw()}),10),this.resizeObserver=new st.default((function(){t.ngZone.run((function(){return t.resizeHandler()}))})),this.ngZone.runOutsideAngular((function(){var e;return null===(e=t.resizeObserver)||void 0===e?void 0:e.observe(t.elRef.nativeElement)}))},t.prototype.ngOnDestroy=function(){var t,e,i;null===(t=this.intersectionObserver)||void 0===t||t.unobserve(this.elRef.nativeElement),null===(e=this.resizeObserver)||void 0===e||e.unobserve(this.elRef.nativeElement),null===(i=this.chart)||void 0===i||i.destroy()},t}();xe.decorators=[{type:n.Component,args:[{selector:"nui-chart",template:"",providers:[{provide:oe,useExisting:n.forwardRef((function(){return xe}))}]}]}],xe.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone},{type:n.ChangeDetectorRef}]},xe.propDecorators={chart:[{type:n.Input}]},function(t){t.vertical="vertical",t.horizontal="horizontal"}(Se||(Se={}));var _e=function(){function t(){this.activeChanged=new n.EventEmitter,this.active=!1,this.interactive=!1,this.orientation=Se.vertical}return t.prototype.ngOnChanges=function(t){t.active&&this.activeChanged.emit(this.active)},t.prototype.ngOnDestroy=function(){this.activeChanged.complete()},t}();_e.decorators=[{type:n.Component,args:[{selector:"nui-legend",host:{class:"d-inline-block"},template:'<div class="nui-legend d-flex flex-wrap"\n [class.flex-column]="orientation === \'vertical\'">\n <ng-content></ng-content>\n</div>\n',encapsulation:n.ViewEncapsulation.Emulated}]}],_e.propDecorators={active:[{type:n.Input}],interactive:[{type:n.Input}],orientation:[{type:n.Input}],seriesColor:[{type:n.Input}],seriesIcon:[{type:n.Input}],seriesUnitLabel:[{type:n.Input}]};var Ce="nui-legend-series",Ee=function(){function e(t){this.legend=t,this.isSelected=!0,this.isSelectedChange=new n.EventEmitter,this.isHorizontalClassApplied=!1,this._active=!1}return Object.defineProperty(e.prototype,"active",{set:function(t){this._active=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"interactive",{get:function(){return this._interactive},set:function(t){this._interactive=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seriesRenderState",{get:function(){return this._seriesRenderState||t.RenderState.default},set:function(t){this._seriesRenderState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInteractiveClassApplied",{get:function(){return this._interactive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActiveClassApplied",{get:function(){return this._active&&this.seriesRenderState!==t.RenderState.hidden},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var t,e=this;this.legend&&(this.legend.activeChanged.subscribe((function(t){return e._active=t})),this.icon=this.icon||this.legend.seriesIcon,this._active=this.legend.active,this.interactive=null!==(t=this.interactive)&&void 0!==t?t:this.legend.interactive,this.isHorizontalClassApplied=this.legend.orientation===Se.horizontal)},e.prototype.onClick=function(){this.interactive&&this.isSelectedChange.next(!this.isSelected)},e.prototype.hasInputDescription=function(){return!dt.default(this.descriptionPrimary)||!dt.default(this.descriptionSecondary)},e.prototype.hasProjectedDescription=function(){return!!this.projectedDescription&&0!==this.projectedDescription.nativeElement.children.length},e}();Ee.decorators=[{type:n.Component,args:[{host:{class:Ce},selector:"nui-legend-series",template:'<div class="d-flex"\n [ngClass]="[\'nui-legend-series--state-\' + seriesRenderState]"\n [class.nui-legend-series--deselected]="!isSelected">\n <div class="nui-legend-series__tile-wrapper">\n <div class="nui-legend-series__tile">\n <ng-content></ng-content>\n </div>\n <div class="nui-legend-series__checkbox-wrapper"\n [class.nui-legend-series__checkbox--checked]="isSelected">\n <div class="nui-legend-series__checkbox-mark">\n <i class="nui-legend-series__checkbox-glyph"></i>\n </div>\n </div>\n </div>\n <div *ngIf="hasInputDescription(); else descriptionTemplate"\n class="description-container nui-text-small d-flex flex-column justify-content-center">\n <div *ngIf="!!descriptionPrimary" class="description description-primary" [title]="descriptionPrimary">{{ descriptionPrimary }}</div>\n <div *ngIf="!!descriptionSecondary" class="description description-secondary" [title]="descriptionSecondary">{{ descriptionSecondary }}</div>\n </div>\n</div>\n<ng-template #descriptionTemplate>\n <div class="d-flex" #projectedDescription>\n <ng-content select="[description]"></ng-content>\n </div>\n</ng-template>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Ee.ctorParameters=function(){return[{type:_e,decorators:[{type:n.Optional},{type:n.Host}]}]},Ee.propDecorators={active:[{type:n.Input}],interactive:[{type:n.Input}],isSelected:[{type:n.Input}],isSelectedChange:[{type:n.Output}],descriptionPrimary:[{type:n.Input}],descriptionSecondary:[{type:n.Input}],icon:[{type:n.Input}],color:[{type:n.Input}],seriesRenderState:[{type:n.Input}],projectedDescription:[{type:n.ViewChild,args:["projectedDescription"]}],isInteractiveClassApplied:[{type:n.HostBinding,args:["class.nui-legend-series--interactive"]}],isHorizontalClassApplied:[{type:n.HostBinding,args:["class.nui-legend-series--horizontal"]}],isActiveClassApplied:[{type:n.HostBinding,args:["class.inverse"]}],onClick:[{type:n.HostListener,args:["click"]}]};var we=function(){};we.decorators=[{type:n.Component,args:[{selector:"nui-basic-legend-tile",template:'<div class="nui-basic-legend-tile">\n <ng-content></ng-content>\n</div>\n',encapsulation:n.ViewEncapsulation.Emulated,styles:[".nui-basic-legend-tile{height:100%;min-height:30px;min-width:30px;display:flex;align-items:center;justify-content:center}"]}]}];var Ie=function(){function t(t,e,i){this.legendSeries=t,this.legend=e,this.changeDetector=i}return t.prototype.ngAfterContentInit=function(){this.legend&&(this.unitLabel=this.unitLabel||this.legend.seriesUnitLabel,this.backgroundColor=this.backgroundColor||this.legend.seriesColor||"white")},t.prototype.ngAfterViewInit=function(){this.legendSeries&&(this.seriesHasAdditionalContent=this.legendSeries.hasInputDescription()||this.legendSeries.hasProjectedDescription(),this.changeDetector.detectChanges())},t.prototype.hasInputValue=function(){return!it.default(this.value)},t.prototype.hasInputUnitLabel=function(){return!it.default(this.unitLabel)},t}();Ie.decorators=[{type:n.Component,args:[{selector:"nui-rich-legend-tile",template:'<div class="nui-rich-legend-tile"\n [class.nui-rich-legend-tile--has-point-marker]="rightEdge.children.length > 0"\n [class.nui-rich-legend-tile--series-has-additional-content]="seriesHasAdditionalContent">\n <div class="nui-rich-legend-tile__tilebox d-flex justify-content-center align-items-end flex-column"\n [ngStyle]="{\'background-color\': backgroundColor}"\n [style.color]="color">\n <div *ngIf="hasInputValue(); else projectedTopContent"\n class="nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified">\n {{ value }}\n </div>\n <div *ngIf="hasInputUnitLabel(); else projectedBottomContent"\n class="nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified">\n {{ unitLabel }}\n </div>\n <ng-content></ng-content>\n </div>\n <div class="nui-rich-legend-tile__icon" #icon>\n <ng-content select="[leftEdge]"></ng-content>\n </div>\n <div class="nui-rich-legend-tile__point-marker" #rightEdge>\n <ng-content select="[rightEdge]"></ng-content>\n </div>\n</div>\n<ng-template #projectedTopContent>\n <ng-content select="[top]"></ng-content>\n</ng-template>\n<ng-template #projectedBottomContent>\n <ng-content select="[bottom]"></ng-content>\n</ng-template>\n',encapsulation:n.ViewEncapsulation.Emulated,styles:[".nui-rich-legend-tile{position:relative;width:60px;height:100%;line-height:18px}.nui-rich-legend-tile :empty{display:none}.nui-rich-legend-tile__tilebox{width:100%;height:100%;padding:0 5px;background-color:var(--nui-color-bg-light,#fff)}.nui-rich-legend-tile__ellipsified{max-width:100%;overflow:hidden;text-overflow:ellipsis}.nui-rich-legend-tile__tilebox-value{text-align:right;font-weight:600}.nui-rich-legend-tile__tilebox-value:not(:last-child){margin-bottom:-3px}.nui-rich-legend-tile__tilebox-unit{text-align:right;font-size:11px}.nui-rich-legend-tile__tilebox-unit:not(:first-child){margin-top:-3px}.nui-rich-legend-tile__icon,.nui-rich-legend-tile__point-marker{position:absolute;line-height:0;top:50%;pointer-events:none}.nui-rich-legend-tile__point-marker{right:0;transform:translate(50%,-50%)}.nui-rich-legend-tile__icon{left:0;transform:translate(-50%,-50%)}.nui-rich-legend-tile--has-point-marker.nui-rich-legend-tile--series-has-additional-content{margin-right:5px}.nui-rich-legend-tile--has-point-marker .nui-rich-legend-tile__tilebox{padding-right:7px}"]}]}],Ie.ctorParameters=function(){return[{type:Ee,decorators:[{type:n.Host}]},{type:_e,decorators:[{type:n.Optional},{type:n.Host}]},{type:n.ChangeDetectorRef}]},Ie.propDecorators={unitLabel:[{type:n.Input}],value:[{type:n.Input}],backgroundColor:[{type:n.Input}],color:[{type:n.Input}]};var Ae=[0,0],Te=[0,1];function Re(t){return!!t.domainWithTicks}function ke(t){return"function"==typeof t.bandwidth}function Le(t){return void 0!==t.innerScale}function De(t){if(!ft.default(t,"var("))return t;var e=gt.default(vt.default(yt.default(t,"var("),")"));return getComputedStyle(document.body).getPropertyValue(e)}var Pe=function(){function t(t,e){var i=this;this.sourceProvider=t,this.fn=e,this.get=function(t){var e=i.sourceProvider.get(t);if(!e)throw new Error("clr is not defined");var n=i.processedColors[e];return n||(n=i.fn(e),i.processedColors[e]=n),n},this.reset()}return t.prototype.reset=function(){this.processedColors={}},t}(),Oe=function(){function t(t){var e=this;this.values=t,this.get=function(t){var i=e.providedValues[t];if(!i){var n=++e.lastUsedIndex%e.values.length;i=e.values[n],e.providedValues[t]=i}return i},this.reset()}return t.prototype.reset=function(){this.providedValues={},this.lastUsedIndex=-1},t}(),Me=function(t){function e(e){var i=t.call(this,e)||this;return i.colors=e,i}return he(e,t),e}(Oe),Ne=1/12.92,Ge=function(t){function e(e,i){var n=t.call(this,e,(function(t){var e=De(t),r=E.rgb(e),a=n.getContrastRatio(r,E.rgb(i.light));return n.getContrastRatio(r,E.rgb(i.dark))>a?i.dark:i.light}))||this;return n}return he(e,t),e.prototype.getContrastRatio=function(t,e){var i,n,r=this.getRelativeLuminance(t),a=this.getRelativeLuminance(e);return r>a?(i=r,n=a):(i=a,n=r),(i+.05)/(n+.05)},e.prototype.getRelativeLuminance=function(t){var e=t.r/255,i=t.g/255,n=t.b/255;return.2126*(e<=.03928?e*Ne:this.adjustGamma(e))+.7152*(i<=.03928?i*Ne:this.adjustGamma(i))+.0722*(n<=.03928?n*Ne:this.adjustGamma(n))},e.prototype.adjustGamma=function(t){return Math.pow((t+.055)/1.055,2.4)},e}(Pe),je=function(){function t(t,e){void 0===e&&(e={backgroundOpacity:.15}),pt.default(t)?this._standardColors=new Me(t):this._standardColors=t,this._textColors=new Ge(this.standardColors,{light:"white",dark:"black"}),this._backgroundColors=new Pe(this.standardColors,(function(t){var i=De(t),n=E.rgb(i);return n.opacity=e.backgroundOpacity,n.toString()}))}return Object.defineProperty(t.prototype,"standardColors",{get:function(){return this._standardColors},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundColors",{get:function(){return this._backgroundColors},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textColors",{get:function(){return this._textColors},enumerable:!1,configurable:!0}),t}(),Be=function(){function t(t){this.svg=t}return t.prototype.getSvg=function(){return this.styledSvg||this.svg},t.prototype.setColor=function(t){this.styledSvg=rt.default(t)?t:'<g fill="'+t+'">'+this.svg+"</g>"},t}(),Fe=["var(--nui-color-chart-one)","var(--nui-color-chart-two)","var(--nui-color-chart-three)","var(--nui-color-chart-four)","var(--nui-color-chart-five)","var(--nui-color-chart-six)","var(--nui-color-chart-seven)","var(--nui-color-chart-eight)","var(--nui-color-chart-nine)","var(--nui-color-chart-ten)"],Ue=["m0 0m-4 0a4 4 0 1 0 8 0 4 4 0 1 0-8 0z","m-4,-4l8,0l0,8l-8,0l0,-8z","m0-4 4 8-8 0z","m0-4.95 4.95 4.95-4.95 4.95-4.95-4.95 4.95-4.95z","m0 4-4-8 8 0z","m0-3.805 4.001 2.907-1.528 4.703-4.945 0-1.528-4.703z"],He=ge(Ue.map((function(t){return'<path class="nui-chart--path__outline" d="'+t+'"></path>'})),["m0 2c1.105 0 2-.895 2-2 0-1.105-.895-2-2-2-1.105 0-2 .895-2 2 0 1.105.895 2 2 2zm0 2c-2.209 0-4-1.791-4-4 0-2.209 1.791-4 4-4 2.209 0 4 1.791 4 4 0 2.209-1.791 4-4 4z","m-2-2 0 4 4 0 0-4-4 0zm-2-2 8 0 0 8-8 0 0-8z","m0-4-4 8 8.001 0-4.001-8zm0 3.354 1.573 3.146-3.145 0 1.572-3.146z","m0-2.121-2.121 2.121 2.121 2.121 2.121-2.121-2.121-2.121zm0-2.828 4.95 4.95-4.95 4.95-4.95-4.95 4.95-4.95z","m0 4-4-8 8.001 0-4.001 8zm0-3.354 1.573-3.146-3.145 0 1.572 3.146z","m0-1.951-2.237 1.626.855 2.63 2.766 0 .855-2.63-2.237-1.626zm0-1.854 4.001 2.907-1.528 4.703-4.945 0-1.528-4.703 4.001-2.907z"].map((function(t,e){return'<path class="nui-chart--path__outline-fill" stroke="none" d="'+Ue[e]+'"></path>\n <path class="nui-chart--path__outline" d="'+t+'"></path>'}))).map((function(t){return new Be(t)})),Ve=function(t){function e(e){var i=t.call(this,e)||this;return i.markers=e,i}return he(e,t),e}(Oe);function ze(){return new Me(Fe)}function Ye(){return new je(ze())}function We(){return new Ve(He)}var qe=function(t,e){var i=this;void 0===t&&(t=ze()),void 0===e&&(e=We()),this.colorProvider=t,this.markerProvider=e,this.data={x:function(t,e,i,n){return t.x},x0:function(t,e,n,r){return i.data.x(t,e,n,r)},x1:function(t,e,n,r){return i.data.x(t,e,n,r)},y:function(t,e,i,n){return t.y},y0:function(t,e,n,r){return i.data.y(t,e,n,r)},y1:function(t,e,n,r){return i.data.y(t,e,n,r)},absoluteX0:function(t,e,n,r){var a,o;return null!==(o=null===(a=t.__stack_x)||void 0===a?void 0:a.start)&&void 0!==o?o:i.data.x0(t,e,n,r)},absoluteX1:function(t,e,n,r){var a,o;return null!==(o=null===(a=t.__stack_x)||void 0===a?void 0:a.end)&&void 0!==o?o:i.data.x1(t,e,n,r)},absoluteY0:function(t,e,n,r){var a,o;return null!==(o=null===(a=t.__stack_y)||void 0===a?void 0:a.start)&&void 0!==o?o:i.data.y0(t,e,n,r)},absoluteY1:function(t,e,n,r){var a,o;return null!==(o=null===(a=t.__stack_y)||void 0===a?void 0:a.end)&&void 0!==o?o:i.data.y1(t,e,n,r)}},this.series={color:this.colorProvider?this.colorProvider.get:void 0,marker:this.markerProvider?this.markerProvider.get:void 0}},Xe=function(){},$e=function(t){function e(e,i){void 0===e&&(e=ze()),void 0===i&&(i=We());var n=t.call(this)||this;return n.colorProvider=e,n.markerProvider=i,n.data={value:function(t){return t.value},category:function(t,e,i,r){return t.category?t.category:n.series.category?n.series.category(r.id,r):null},start:function(t,e,i,r){if(t.__bar)return t.__bar.start;if(void 0!==t.start)return t.start;var a=n.getSingleValue(t,e,i,r);return Number.isFinite(a)?Math.min(0,a):null},end:function(t,e,i,r){if(t.__bar)return t.__bar.end;if(void 0!==t.end)return t.end;var a=n.getSingleValue(t,e,i,r);return Number.isFinite(a)?Math.max(0,a):null}},n.series={color:n.colorProvider?n.colorProvider.get:void 0,marker:n.markerProvider?n.markerProvider.get:void 0,category:function(t,e){return e.name||e.id}},n}return he(e,t),e.prototype.getSingleValue=function(t,e,i,n){var r;return this.data.value&&void 0===(r=this.data.value(t,e,i,n))&&(r=t),r},e}(Xe),Ke=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.data=Object.assign(Object.assign({},n.data),{startX:function(t,e,i,r){return n.data.start(t,e,i,r)},endX:function(t,e,i,r){return n.data.end(t,e,i,r)},startY:function(t,e,i,r){return n.data.category(t,e,i,r)},endY:function(t,e,i,r){return n.data.category(t,e,i,r)},thicknessY:function(t,e,i,r){return n.data.thickness?n.data.thickness(t,e,i,r):void 0}}),n}return he(e,t),e}($e),Ze=function(){function t(t){this.barAccessors=t,t.data.status=function(t){return t.status}}return Object.defineProperty(t.prototype,"data",{get:function(){return this.barAccessors.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"series",{get:function(){return this.barAccessors.series},enumerable:!1,configurable:!0}),t}();function Qe(t,e){var i=new Ze(new Ke(t,e));return i.data.color=function(e,n,r,a){return t.get(i.data.status(e,n,r,a))},i.data.category=function(){return Ze.STATUS_CATEGORY},i}Ze.STATUS_CATEGORY="status",Ze.STATUS_DOMAIN=[Ze.STATUS_CATEGORY];var Je;function ti(t,e,i,n){if(void 0===i&&(i=.5),void 0===n&&(n=Number.MAX_VALUE),!t)return 0;if(!ke(t))return t.convert(e);var r=t;if(!pt.default(e))return r.convert(e,i);var a=e;return 1===a.length||!r.innerScale||n<=1?r.convert(a[0],i):r.convert(a[0],0)+ti(r.innerScale,a.slice(1),i,n-1)}var ei=function(){function e(i){var n=this;void 0===i&&(i={}),this.config=i,this.interaction={},this.getContainerStateStyles=function(e){if(!n.config.stateStyles)throw new Error("stateStyles property is not defined");return n.config.stateStyles[e||t.RenderState.default]},this.config=mt.default(this.config,e.DEFAULT_CONFIG)}return e.prototype.getDataPointIndex=function(t,e,i){return de},e.prototype.highlightDataPoint=function(t,e,i){},e.prototype.setSeriesState=function(t,e){},e.prototype.setDataPointState=function(t,e){},e.prototype.getDomainOfFilteredData=function(t,e,i,n){var r,a,o=t.data;try{for(var s=pe(Object.keys(e)),d=s.next();!d.done;d=s.next()){var c=d.value,l=e[c];l.isDomainFixed&&l.isContinuous()&&(o=this.filterDataByDomain(o,t,c,l.domain()))}}catch(t){r={error:t}}finally{try{d&&!d.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}return this.getDomain(o,t,i,n)},e.prototype.getDomain=function(t,e,i,n){return t&&0!==t.length?k.extent(t,(function(t,n,r){var a,o;return null===(o=null===(a=e.accessors.data)||void 0===a?void 0:a[i])||void 0===o?void 0:o.call(a,t,n,Array.from(r),e)})):Ae},e.prototype.filterDataByDomain=function(t,e,i,n){var r,a=null===(r=e.accessors.data)||void 0===r?void 0:r[i];return t.filter((function(i,r){var o=a(i,r,t,e);return o>=n[0]&&o<=n[1]}))},e.prototype.getRequiredLayers=function(){return[se[t.RenderLayerName.data]]},e.prototype.setupInteraction=function(t,e,i,n,r){var a=xt.default(this.interaction,t,{})[e];a&&tt.default(a,(function(t){i.on(e,(function(){var e=i.node().getBoundingClientRect();n.next({eventName:t,data:Object.assign(Object.assign({},r),{position:e})})}))}))},e}();function ii(t,e){if(!t)return 0;var i=t.invert(e);if(!ke(t)||rt.default(i))return i;var n=t;if(!n.innerScale)return i;var r=ii(n.innerScale,e-n.convert(i,0));return pt.default(r)?ge([i],r):[i,r]}ei.DEFAULT_CONFIG={stateStyles:(Je={},Je[t.RenderState.default]={opacity:1},Je[t.RenderState.hidden]={opacity:0},Je[t.RenderState.deemphasized]={opacity:.1},Je[t.RenderState.emphasized]={opacity:1},Je)};var ni,ri,ai=function(){function t(){}return t.getValueAccessor=function(t,e){var i=t(e,0);if("number"==typeof i||"string"==typeof i)return t;if(i.valueOf&&"number"==typeof i.valueOf())return function(e,i){return t(e,i).valueOf()};throw new Error("Value in the data series does not return numeric valueOf().")},t.getClosestIndex=function(e,i,n){if(1===e.length)return 0;if(0!==e.length){var r=t.getValueAccessor(i,e[0]);if("string"==typeof n)return e.findIndex((function(t){return r(t,0)===n}));var a=this.findNearestIndex(e,n,i);return(a=(a=a>0?a-1:a)>=e.length-1&&1!==e.length?e.length-2:a)+t.getCloser(r(e[a],a),r(e[a+1],a+1),n)}},t.getCloser=function(t,e,i){return Math.abs(i-t)<=Math.abs(i-e)?0:1},t.clampToRange=function(t,e){return t<e[0]?e[0]:t>e[1]?e[1]:t},t.uuid=function(){var t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?i:3&i|8).toString(16)}))},t.cssEscape=function(t){if(0===arguments.length)throw new TypeError("`cssEscape` requires an argument.");for(var e,i=String(t),n=i.length,r=-1,a="",o=i.charCodeAt(0);++r<n;)0!==(e=i.charCodeAt(r))?a+=e>=1&&e<=31||127===e||0===r&&e>=48&&e<=57||1===r&&e>=48&&e<=57&&45===o?"\\"+e.toString(16)+" ":(0!==r||1!==n||45!==e)&&(e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122)?i.charAt(r):"\\"+i.charAt(r):a+="�";return a},t.findNearestIndex=function(t,e,i){void 0===i&&(i=_t.default);for(var n=0,r=null==t?n:t.length;n<r;){var a=n+r>>>1,o=i(t[a],a);null!==o&&o<e?n=a+1:r=a}return Math.round(n)},t.getXYValues=function(e,i,n,r){var a=t.getScaleValues(e,n),o=t.getScaleValues(i,r),s={};return dt.default(a)||(s.x=a),dt.default(o)||(s.y=o),s},t.getScaleValues=function(t,e){return t.reduce((function(t,i){var n=ii(i,e);return rt.default(n)||(t[i.id]=n),t}),{})},t}(),oi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return he(e,t),e.prototype.draw=function(t,e){},e.prototype.getDataPointPosition=function(t,e,i){var n,r;if(!(e<0||e>=t.data.length)){var a=t.data[e];if(!(null===(n=t.accessors.data)||void 0===n?void 0:n.x)||!(null===(r=t.accessors.data)||void 0===r?void 0:r.y))throw new Error("Can't get dataPointPosition");return{x:i.x.convert(t.accessors.data.x(a,e,t.data,t)),y:i.y.convert(t.accessors.data.y(a,e,t.data,t))}}},e.prototype.getDataPointIndex=function(t,e,i){if(rt.default(e.x))return ce;var n=ai.getClosestIndex(t.data,(function(e,i){var n,r;return null===(r=null===(n=t.accessors.data)||void 0===n?void 0:n.x)||void 0===r?void 0:r.call(n,e,i,t.data,t)}),e.x);if(rt.default(n))throw new Error("Unable to get data point index");return n},e}(ei),si=function(e){function i(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.config=t,i.DEFAULT_CONFIG={transitionDuration:300,padding:1,barClass:"bar-outline",highlightStrategy:void 0,pointerEvents:!0,enableMinBarThickness:!0},i.barContainerClass="bar-container",i.config=mt.default(i.config,i.DEFAULT_CONFIG),i}return he(i,e),i.prototype.draw=function(e,n){var r,a,s,d=this,c=e.containers[t.RenderLayerName.data],l=e.dataSeries,u=l.accessors,h=this.getAttrsGenerator(l,e.scales),p=o.local(),f=c.selectAll("g."+this.barContainerClass).data(l.data);f.exit().remove();var g=f.enter().append("g").classed(this.barContainerClass,!0);g.append("rect").on("click",(function(t,i){d.emitBarClick(e,t,i,n)}));g.merge(f).property(p,(function(t,e){return h(t,e)})).select("rect").attr("class",(function(t,e){return i.BAR_RECT_CLASS+" "+d.config.barClass+(d.config.pointerEvents?" pointer-events":"")+function(t,e){var i;return void 0!==(null===(i=u.data)||void 0===i?void 0:i.cssClass)&&" "+u.data.cssClass(t,e,l.data,l)||""}(t,e)})).style("cursor",null!==(r=this.config.cursor)&&void 0!==r?r:"").style("stroke-width",null!==(s=null===(a=this.config)||void 0===a?void 0:a.strokeWidth)&&void 0!==s?s:"").style("fill",(function(t,e){var i,n;return u.data.color?u.data.color(t,e,l.data,l):null===(n=(i=u.series).color)||void 0===n?void 0:n.call(i,l.id,l)})).attrs((function(){return p.get(this)})).select("rect").style("fill",(function(t,e){var i,n;return u.data.color?u.data.color(t,e,l.data,l):null===(n=(i=u.series).color)||void 0===n?void 0:n.call(i,l.id,l)})).attrs(p.get),u.data.marker&&(g.append("g").classed("bar-icon",!0),g.merge(f).select("g.bar-icon").html((function(t,e){var n,r,a=p.get(this);if(!a||rt.default(null==a?void 0:a.height)||rt.default(null==a?void 0:a.width))throw new Error("barSize is undefined");if(Math.min(a.height,a.width)-1>=i.MIN_BAR_SIZE_FOR_ICON)return null===(r=(n=u.data).marker)||void 0===r?void 0:r.call(n,t,e,l.data,l)})).attr("transform",(function(){var t=p.get(this);if(!t||rt.default(null==t?void 0:t.height)||rt.default(null==t?void 0:t.width))throw new Error("barAttrs is undefined");return"translate("+(t.x+t.width/2)+", "+(t.y+t.height/2)+")"})))},i.prototype.getDataPointIndex=function(t,e,i){return this.config.highlightStrategy?this.config.highlightStrategy.getDataPointIndex(this,t,e,i):ce},i.prototype.highlightDataPoint=function(t,e,i){this.config.highlightStrategy&&this.config.highlightStrategy.highlightDataPoint(this,t,e,i)},i.prototype.getDataPointPosition=function(t,e,i){var n=t.data[e];return n&&this.getAttrsGenerator(t,i)(n,e)},i.prototype.getDataPoint=function(t,e,i){return{seriesId:t.dataSeries.id,dataSeries:t.dataSeries,index:i,data:e,position:e?this.getDataPointPosition(t.dataSeries,i,t.scales):void 0}},i.prototype.filterDataByDomain=function(t){return t},i.prototype.getDomain=function(t,e,i,n){var r=e.accessors.data,a=i.toUpperCase(),o=function(t){return function(i,n,o){var s;return null===(s=r[t+a])||void 0===s?void 0:s.call(r,i,n,Array.from(o),e)}};if(n.isContinuous())return t&&0!==t.length?[k.min(t,o("start")),k.max(t,o("end"))]:Ae;var s=t&&t.length>0?t.map(o("start")):[],d=Math.max.apply(Math,ge(s.map((function(t){return pt.default(t)?t.length:-1}))));return d>=0?Array.from(Array(d)).map((function(t,e){var i=s.map((function(t){return e<t.length?t[e]:[]}));return St.default(bt.default(i))})):[St.default(s)]},i.prototype.emitBarClick=function(t,e,i,n){n.next({eventName:$t,data:this.getDataPoint(t,e,i)})},i.prototype.getAttrsGenerator=function(t,e){var i=this,n=t.accessors.data;return function(r,a){var o=i.getDimensions(n,r,a,t,e.x,"X"),s=i.getDimensions(n,r,a,t,e.y,"Y");return{x:o.start,width:o.thickness,y:s.start,height:s.thickness}}},i.prototype.getDimensions=function(t,e,n,r,a,o){var s,d,c=t["thickness"+o],l=r.accessors.data["start"+o],u=r.accessors.data["end"+o];if(d=null==c?void 0:c(e,n,r.data,r),rt.default(d)){if(!l||!u)throw new Error("Can't compute dimensions");var h=ti(a,l(e,n,r.data,r),0),p=ti(a,u(e,n,r.data,r),1);if(s=Math.min(h,p),d=Math.abs(h-p),ke(a)){if(rt.default(this.config.padding))throw new Error("Config is not defined");s+=this.config.padding,d-=2*this.config.padding}this.config.enableMinBarThickness&&(d=Math.max(d,i.MIN_BAR_THICKNESS))}else{if(!l)throw new Error("Can't compute dimensions");s=ti(a,l(e,n,r.data,r),.5)-d/2}return{start:s,thickness:d}},i}(oi);si.THICK=11,si.THIN=3,si.MIN_BAR_SIZE_FOR_ICON=10,si.MIN_BAR_THICKNESS=2,si.BAR_RECT_CLASS="bar";var di,ci={stateStyles:(ni={},ni[t.RenderState.default]={opacity:0},ni[t.RenderState.hidden]={opacity:0},ni[t.RenderState.deemphasized]={opacity:0},ni[t.RenderState.emphasized]={opacity:1},ni),ignoreForDomainCalculation:!0},li={stateStyles:(ri={},ri[t.RenderState.default]={opacity:.3},ri[t.RenderState.hidden]={opacity:0},ri[t.RenderState.deemphasized]={opacity:0},ri[t.RenderState.emphasized]={opacity:1},ri),ignoreForDomainCalculation:!0},ui={enabled:!1,clickable:!1},hi="gauge-threshold-marker",pi=function(){this.data={x:function(t){return t.x},y:function(t){return t.y}}},fi=function(t){function e(e,i){void 0===e&&(e=ze()),void 0===i&&(i=We());var n=t.call(this)||this;return n.colorProvider=e,n.markerProvider=i,n.data.defined=function(t,e){return!t.hasOwnProperty("defined")||t.defined},n.series={color:n.colorProvider?n.colorProvider.get:void 0,marker:n.markerProvider?n.markerProvider.get:void 0},n}return he(e,t),e}(pi);function gi(t,e){var i=t.range().map((function(t){return t})),n=Math.min(i[0],i[1]),r=Math.max(i[0],i[1]);return e>=n&&e<=r}t.InteractionType=void 0,(di=t.InteractionType||(t.InteractionType={})).Click="click",di.Hover="hover",di.MouseDown="mousedown",di.MouseEnter="mouseenter",di.MouseLeave="mouseleave",di.MouseMove="mousemove",di.MouseUp="mouseup";var vi=function(){function e(){}return e.manageMarker=function(t,i,n,r,a,o){var s,d,c;if(void 0===o&&(o=ui),!r)throw new Error("Container doesn't exist!");if(0!==t.data.length){var l=t.accessors;n<0&&(n=t.data.length-1);var u=t.data[n];if(!(null===(s=l.data)||void 0===s?void 0:s.x)||!l.data.y)throw new Error("Color or marker are undefined");var h=i.x.convert(l.data.x(u,n,t.data,t)),p=i.y.convert(l.data.y(u,n,t.data,t));if(void 0!==h&&void 0!==p&&gi(i.x,h)&&gi(i.y,p)){var f=t.id,g={index:n,data:u,seriesId:f,position:{x:h,y:p},dataSeries:t};if(!(null===(d=l.series)||void 0===d?void 0:d.marker)||!(null===(c=l.series)||void 0===c?void 0:c.color))throw new Error("Color or marker are undefined");e.drawMarker(g,l.series.marker(f,t),l.series.color(f,t),r,a,e.DEFAULT_MARKER_CONTAINER_CLASS,o)}else e.removeMarker(r)}else e.removeMarker(r)},e.drawMarker=function(i,n,r,a,o,s,d){var c,l,u,p,f;void 0===s&&(s=e.DEFAULT_MARKER_CONTAINER_CLASS),void 0===d&&(d=ui);var g=a.select("g."+s),v={transform:"translate("+(null===(c=null==i?void 0:i.position)||void 0===c?void 0:c.x)+", "+(null===(l=null==i?void 0:i.position)||void 0===l?void 0:l.y)+")",cursor:"crosshair"};g.empty()&&(g=a.append("g").classed(s+(d.enabled?" pointer-events":"")+(d.enabled&&d.clickable?" pointer-events-click":""),!0)),n.setColor(r),g.attrs(v),g.on("mouseenter",(function(){o.next({eventName:Jt,data:{interactionType:t.InteractionType.Hover,dataPoint:i}})})),g.on("mouseleave",(function(){o.next({eventName:Jt,data:{interactionType:t.InteractionType.Hover,dataPoint:Object.assign(Object.assign({},i),{index:ce})}})})),g.on("click",(function(){o.next({eventName:Jt,data:{interactionType:t.InteractionType.Click,dataPoint:i}})})),!g.selectAll("g > *").size()&&g.node()&&(null===(u=g.node())||void 0===u||u.appendChild(h.UtilService.getSvgFromString(n.getSvg())),g.select("path").classed(e.MARKER_PATH_CLASS,!0));var y=g.select("path").node();if(y&&d.enabled){var m=y.getBoundingClientRect();y.setAttribute("x",Math.ceil((null===(p=null==i?void 0:i.position)||void 0===p?void 0:p.x)-m.width/2).toString()),y.setAttribute("y",Math.ceil((null===(f=null==i?void 0:i.position)||void 0===f?void 0:f.y)-m.height/2).toString())}},e.removeMarker=function(t,i){void 0===i&&(i=e.DEFAULT_MARKER_CONTAINER_CLASS),t.select("g."+i).remove()},e}();vi.DEFAULT_MARKER_CONTAINER_CLASS="marker",vi.MARKER_PATH_CLASS="marker-path";var yi=function(e){function i(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.config=t,i.DEFAULT_CONFIG={strokeWidth:2,curveType:N.curveLinear,interactive:!0,strokeStyle:"",strokeLinecap:"round",markerInteraction:ui,useEnhancedLineCaps:!1,enhancedLineCap:{radius:3}},i.config=mt.default(i.config,i.DEFAULT_CONFIG),i}return he(i,e),i.getStrokeStyleDashed=function(t){var e=2*t;return e+","+e},i.getStrokeStyleDotted=function(t){return t+","+t},i.prototype.draw=function(e,i){var n,r,a,o,s,d=e.containers[t.RenderLayerName.data],c=null===(r=(n=e.dataSeries.accessors.series).color)||void 0===r?void 0:r.call(n,e.dataSeries.id,e.dataSeries),l=d.select("path.main");l.empty()&&(l=d.append("path").classed("main",!0).attrs({stroke:null!=c?c:null,"stroke-width":null!==(a=this.config.strokeWidth)&&void 0!==a?a:null,"stroke-dasharray":null!==(o=this.config.strokeStyle)&&void 0!==o?o:null,"stroke-linecap":null!==(s=this.config.strokeLinecap)&&void 0!==s?s:null,fill:"none"})),this.drawLine(e,l),this.config.interactionStrategy&&this.config.interactionStrategy.draw(this,e,i)},i.prototype.isInfiniteLineData=function(t){var e=t.dataSeries;return 1===e.data.length&&void 0===e.accessors.data.x(e.data[0],0,e.data,e)},i.prototype.drawLine=function(t,e){this.isInfiniteLineData(t)?this.drawInfiniteLine(t,e):this.drawStandardLine(t,e)},i.prototype.highlightDataPoint=function(e,i,n){if(this.config.interactive){var r=e.dataSeries;r.accessors.series.marker&&vi.manageMarker(r,e.scales,i,e.containers[t.RenderLayerName.foreground],n,this.config.markerInteraction)}},i.prototype.getRequiredLayers=function(){return[se[t.RenderLayerName.data],se[t.RenderLayerName.foreground],se[t.RenderLayerName.unclippedData]]},i.prototype.getDataPointPosition=function(t,i,n){return e.prototype.getDataPointPosition.call(this,t,i,n)},i.prototype.drawStandardLine=function(t,e){var i,n,r=t.dataSeries,a=r.accessors,o=!1,s=r.data.filter((function(t,e){var i=void 0!==a.data.x(t,e,r.data,r)&&void 0!==a.data.y(t,e,r.data,r);return i||o||(console.warn("Data point",t,"was skipped as accessors didn't manage to extract any data."),console.warn(" -> accessors.data.x:",a.data.x),console.warn(" -> accessors.data.y:",a.data.y),o=!0),i}));if(!this.config.curveType)throw new Error("curveType is not defined");var d=N.line().x((function(e,i){return t.scales.x.convert(a.data.x(e,i,r.data,r))})).y((function(e,i){return t.scales.y.convert(a.data.y(e,i,r.data,r))})).defined((function(t,e){return!a.data.defined||a.data.defined(t,e,r.data,r)})).curve(this.config.curveType);e.attr("d",null!==(i=d(s))&&void 0!==i?i:""),this.config.useEnhancedLineCaps&&this.updateLineCaps(s,t,(null===(n=this.config.enhancedLineCap)||void 0===n?void 0:n.fill)||e.attr("stroke"))},i.prototype.drawInfiniteLine=function(t,e){var i=t.dataSeries,n=i.accessors,r=t.scales.y.convert(n.data.y(i.data[0],0,i.data,i)),a=[[t.scales.x.range()[0],r],[t.scales.x.range()[1],r]],o=N.line().x((function(t){return t[0]})).y((function(t){return t[1]}))(a);if(!o)throw new Error("Line cannot be computed");e.attr("shape-rendering","crispEdges").attr("d",o)},i.prototype.updateLineCaps=function(e,n,r){var a,o,s,d=n.dataSeries,c=d.accessors,l=e.filter((function(t,e){var i,n;return!(null===(i=null==c?void 0:c.data)||void 0===i?void 0:i.defined)||(null===(n=null==c?void 0:c.data)||void 0===n?void 0:n.defined(t,e,d.data,d))})),u=function(t,e){return n.scales.x.convert(c.data.x(t,e,d.data,d))},h=function(t,e){return n.scales.y.convert(c.data.y(t,e,d.data,d))},p=n.containers[t.RenderLayerName.unclippedData].selectAll("."+i.LINE_CAP_CLASS_NAME).data(l).attr("cx",u).attr("cy",h);p.enter().append("circle").attr("class",i.LINE_CAP_CLASS_NAME).attr("r",null===(a=this.config.enhancedLineCap)||void 0===a?void 0:a.radius).attr("cx",u).attr("cy",h).style("stroke-width",null===(o=this.config.enhancedLineCap)||void 0===o?void 0:o.strokeWidth).style("fill",r).style("stroke",null===(s=this.config.enhancedLineCap)||void 0===s?void 0:s.stroke),p.exit().remove()},i}(oi);yi.UNCLIPPED_DATA_LAYER_NAME="unclipped-data",yi.LINE_CAP_CLASS_NAME="nui-chart-line-cap",t.CssFilterId=void 0,(t.CssFilterId||(t.CssFilterId={})).Grayscale="grayscale";var mi,bi='url("#'+t.CssFilterId.Grayscale+'")',Si="\n0.2126 0.7152 0.0722 0 0\n0.2126 0.7152 0.0722 0 0\n0.2126 0.7152 0.0722 0 0\n0 0 0 1 0\n",xi=function(){this.data={active:function(t){return t.active}},this.series={start:function(){return null},end:function(){return null},activeColor:function(){return"magenta"}}},_i=function(e){function i(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.DEFAULT_CONFIG={},i.config=mt.default(i.config,i.DEFAULT_CONFIG),i}return he(i,e),i.prototype.draw=function(e,i){var n=e.containers[t.RenderLayerName.unclippedData],r=e.dataSeries,a=e.scales,o=e.dataSeries.accessors,s=n.select("rect"),d=r.data.length>0&&o.data.active(r.data[0],0,e.dataSeries.data,e.dataSeries),c=!d&&o.series.inactiveColor?o.series.inactiveColor:o.series.activeColor;s.empty()&&(s=n.append("rect").attrs({fill:c(r.id,r)}),d||o.series.inactiveColor||s.style("filter",bi));var l=o.series.start(r.id,r),u=o.series.end(r.id,r),h=null==u?0:a.y.convert(u),p=(null==l?a.y.range()[0]:Math.min(a.y.range()[0],a.y.convert(l)))-h;s.attrs({x:-2,y:h,height:p<0?0:p,width:2})},i.prototype.getDataPointIndex=function(t,e,i){return-1},i.prototype.getRequiredLayers=function(){return[se[t.RenderLayerName.unclippedData]]},i}(oi);_i.SIDE_INDICATORS_LAYER="side-indicators",t.ZoneBoundary=void 0,(mi=t.ZoneBoundary||(t.ZoneBoundary={})).Start="start",mi.End="end";var Ci=function(){function e(t){this.loggerService=t}return e.prototype.injectThresholdsData=function(t,e){var i={};e.forEach((function(t){return t.entered=!1}));for(var n=0;n<t.data.length;n++){var r=t.data[n],a=t.accessors.data.x(r,n,t.data,t),o=t.accessors.data.y(r,n,t.data,t);r.__thresholds={};var s=this.getZoneByXY(e,i,a,o);s&&(s.entered=!0,r.__thresholds.status=s.value)}},e.prototype.getBackgrounds=function(t,i,n,r,a,o){var s;void 0===a&&(a={}),void 0===o&&(o=ct.default(ci)),t.data.length>0&&void 0===t.data[0].__thresholds&&this.loggerService.warn("Thresholds metadata is not defined on provided data series",t);var d=Qe(r);return d.data.thickness=function(t){return a[t.status]},ke(n.x)?(s=ct.default(t.data),d.data.start=t.accessors.data.x,d.data.end=t.accessors.data.x,d.data.color=function(t){return t.__thresholds&&t.__thresholds.status?r.get(t.__thresholds.status):"transparent"},d.data.thickness=function(t){return a[t.__thresholds.status]}):s=this.getBackgroundsDataForContinuousScale(t,i),{id:t.id+e.SERIES_ID_SUFFIX,data:s,accessors:d,scales:n,renderer:new si(o),showInLegend:!1}},e.prototype.getBackgroundsDataForContinuousScale=function(t,e){for(var i,n=[],r=this.getBreakPoints(t,e),a={},o=0;o<r.length-1;o++){var s=r[o],d=r[o+1];if(!s||!d)throw new Error("p1 or p2 are undefined");var c={x:(s.x+d.x)/2,y:(s.y+d.y)/2},l=this.getZoneByXY(e,a,c.x,c.y);if(l){var u=n[n.length-1];u&&(null===(i=u.end)||void 0===i?void 0:i.valueOf())===s.x&&u.status===l.value?u.end=new Date(d.x):n.push({status:l.value,start:new Date(s.x),end:new Date(d.x)})}}return n},e.prototype.getBreakPoints=function(t,e){for(var i,n,r,a,o=this,s=t.accessors.data,d=[],c=function(c){for(var l=t.data[c],u=t.data[c+1],h={x:s.x(l,c,t.data,t).valueOf(),y:s.y(l,c,t.data,t).valueOf()},p={x:s.x(u,c+1,t.data,t).valueOf(),y:s.y(u,c+1,t.data,t).valueOf()},f=function(t){var s=e[t],c=null===(n=(i=s.accessors.data).start)||void 0===n?void 0:n.call(i,s.data[0],0,s.data,s),l=null===(a=(r=s.accessors.data).end)||void 0===a?void 0:a.call(r,s.data[0],0,s.data,s),u=[c,l].map((function(t){return o.getCrossPointWithY(h,p,t)})).filter((function(t){return t}));[h,p].forEach((function(t){t.y!==c&&t.y!==l||(t.isZoneEdge=!0)})),d=ut.default(d,u,[h,p],(function(t,e){return(null==t?void 0:t.x)===(null==e?void 0:e.x)&&(null==t?void 0:t.isZoneEdge)===(null==e?void 0:e.isZoneEdge)}))},g=0;g<e.length;g++)f(g)},l=0;l<t.data.length-1;l++)c(l);return lt.default(d,"x")},e.prototype.getThresholdZones=function(t,e,i){var n=new qe;return n.data.start=function(t){return t.start},n.data.end=function(t){return t.end},n.series.color=function(t,e){return i.get(e.value)},e.map((function(e,i){return{id:t.id+"__"+e.status+"-"+i,value:e.status,data:[{start:e.start,end:e.end}],scales:t.scales,accessors:n}}))},e.prototype.getThresholdLines=function(e){var i,n,r=this;if(-1===e.findIndex((function(t){return t.entered})))return[];var a={};function o(t,e,i){var n=t(e.data[0],0,e.data,e);void 0!==n&&void 0===a[n]&&(a[n]={series:e,accessor:t,zoneBoundary:i})}try{for(var s=pe(e),d=s.next();!d.done;d=s.next()){var c=d.value;c.accessors.data.start&&c.accessors.data.end&&(o(c.accessors.data.start,c,t.ZoneBoundary.Start),o(c.accessors.data.end,c,t.ZoneBoundary.End))}}catch(t){i={error:t}}finally{try{d&&!d.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return ht.default(a).map((function(t){return r.getThresholdLine(t.series,t.accessor,t.zoneBoundary)}))},e.prototype.getThresholdLine=function(e,i,n){void 0===n&&(n=t.ZoneBoundary.Start);var r=new fi;r.data.y=i,r.series.color=e.accessors.series.color;var a=new yi({interactive:!1,strokeWidth:1,strokeStyle:yi.getStrokeStyleDashed(1),stateStyles:ct.default(ci.stateStyles),ignoreForDomainCalculation:!0});return{id:e.id+"__"+n+"__threshold-line",data:e.data,value:e.value,accessors:r,renderer:a,scales:e.scales,showInLegend:!1}},e.prototype.getCrossPoint=function(t,e,i,n){var r=e.x-t.x,a=e.y-t.y,o=n.x-i.x,s=n.y-i.y,d=(-a*(t.x-i.x)+r*(t.y-i.y))/(-o*a+r*s),c=(o*(t.y-i.y)-s*(t.x-i.x))/(-o*a+r*s);if(d>=0&&d<=1&&c>=0&&c<=1)return{x:t.x+c*r,y:t.y+c*a}},e.prototype.getZoneByXY=function(t,e,i,n){var r,a,o,s;try{for(var d=pe(t),c=d.next();!c.done;c=d.next()){var l=c.value;e[l.id]||(e[l.id]=0);var u=this.moveZoneIndex(e[l.id],l,i);e[l.id]=u;var h=l.data[u],p=l.accessors.data,f=null===(o=p.start)||void 0===o?void 0:o.call(p,h,u,l.data,l),g=null===(s=p.end)||void 0===s?void 0:s.call(p,h,u,l.data,l);if((void 0===f||n>=f)&&(void 0===g||n<=g))return l}}catch(t){r={error:t}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(r)throw r.error}}return null},e.prototype.moveZoneIndex=function(t,e,i){for(;t<e.data.length-1&&e.accessors.data.x(e.data[t+1],t+1,e.data,e)<i;)t++;return t},e.prototype.getCrossPointWithY=function(t,e,i){return this.getCrossPoint(t,e,{x:t.x,y:i},{x:e.x,y:i})},e.prototype.getSideIndicators=function(t,e,i){var n,r,a=[],o=new _i(i||ct.default(ci)),s=-1!==t.findIndex((function(t){return t.entered})),d=function(t){var i=new xi;i.series={start:function(){var e,i;return null===(i=(e=t.accessors.data).start)||void 0===i?void 0:i.call(e,t.data[0],0,t.data,t)},end:function(){var e,i;return null===(i=(e=t.accessors.data).end)||void 0===i?void 0:i.call(e,t.data[0],0,t.data,t)},activeColor:function(){var e,i;return null===(i=(e=t.accessors.series).color)||void 0===i?void 0:i.call(e,t.id,t)}};var n={id:t.id+"__side-indicator",data:[{active:s}],accessors:i,scales:e,renderer:o,showInLegend:!1};a.push(n)};try{for(var c=pe(t),l=c.next();!l.done;l=c.next()){d(l.value)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return a},e}();Ci.SERIES_ID_SUFFIX="__thresholds-background",Ci.decorators=[{type:n.Injectable}],Ci.ctorParameters=function(){return[{type:h.LoggerService}]};var Ei=function(){};Ei.decorators=[{type:n.NgModule,args:[{imports:[h.NuiCommonModule,h.NuiIconModule,h.NuiPopoverModule,e.OverlayModule],declarations:[_e,Ee,we,Ie,xe,be,Vt,Bt,Gt,jt,Mt,Nt],exports:[_e,Ee,Ie,we,xe,be,Vt,Bt,Gt,jt,Mt,Nt],providers:[me,Ci]}]}];var wi,Ii,Ai,Ti,Ri,ki="quantity",Li="remainder",Di="threshold-markers";t.GaugeMode=void 0,(wi=t.GaugeMode||(t.GaugeMode={})).Donut="donut",wi.Horizontal="horizontal",wi.Vertical="vertical",t.StandardLinearGaugeThickness=void 0,(Ii=t.StandardLinearGaugeThickness||(t.StandardLinearGaugeThickness={}))[Ii.Small=10]="Small",Ii[Ii.Large=15]="Large",t.StandardGaugeThresholdMarkerRadius=void 0,(Ai=t.StandardGaugeThresholdMarkerRadius||(t.StandardGaugeThresholdMarkerRadius={}))[Ai.Small=3]="Small",Ai[Ai.Large=4]="Large",t.StandardGaugeThresholdId=void 0,(Ti=t.StandardGaugeThresholdId||(t.StandardGaugeThresholdId={})).Warning="warning",Ti.Critical="critical",t.StandardGaugeColor=void 0,(Ri=t.StandardGaugeColor||(t.StandardGaugeColor={})).Remainder="var(--nui-color-semantic-unknown-bg-hover)",Ri.Ok="var(--nui-color-chart-one)",Ri.Warning="var(--nui-color-semantic-warning)",Ri.Critical="var(--nui-color-semantic-critical)";var Pi={top:20,right:25,bottom:20,left:25},Oi="gauge-label",Mi="gauge-labels",Ni="threshold-label",Gi=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.data=Object.assign(Object.assign({},n.data),{startX:function(t,e,i,r){return n.data.category(t,e,i,r)},endX:function(t,e,i,r){return n.data.category(t,e,i,r)},thicknessX:function(t,e,i,r){return n.data.thickness?n.data.thickness(t,e,i,r):void 0},startY:function(t,e,i,r){return n.data.start(t,e,i,r)},endY:function(t,e,i,r){return n.data.end(t,e,i,r)}}),n}return he(e,t),e}($e);function ji(t,e){if(e.isContinuous()){var i=t.filter((function(t){return t!==Ae}));return 0===i.length?Ae:[k.min(i.filter((function(t){return void 0!==typeof t[0]})).map((function(t){return t[0]}))),k.max(i.filter((function(t){return void 0!==typeof t[1]})).map((function(t){return t[1]})))]}var n=Math.max.apply(Math,ge(t.map((function(t){return t.length}))));return Array.from(Array(n)).map((function(e,i){var n=t.map((function(t){return i<t.length?t[i]:[]}));return St.default(bt.default(n))}))}var Bi=function(t,e,i){var n=function(t,e){return t.reduce((function(t,i){var n,r;try{for(var a=pe(Object.keys(i.scales)),o=a.next();!o.done;o=a.next()){var s=o.value;if(s!==e){var d=i.scales[s];d.isDomainFixed&&(t[s]||(t[s]=[]),-1===Et.default(t[s],d)&&t[s].push(d))}}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return t}),{})}(t,e);return ji(t.map((function(t){var i=Object.keys(n).reduce((function(e,i){var r=t.scales[i];return r&&r.isContinuous()&&-1!==Et.default(n[i],r)&&(e[i]=r),e}),{});return t.renderer.getDomainOfFilteredData(t,i,e,t.scales[e])})),i)},Fi=function(){function t(t){this.domainCalculator=Bi,this.formatters={},this.isReversed=!1,this.id=t||ai.uuid(),this._d3Scale=this.createD3Scale()}return Object.defineProperty(t.prototype,"d3Scale",{get:function(){return this._d3Scale},enumerable:!1,configurable:!0}),t.prototype.range=function(t){return t?(this._d3Scale.range(this.isReversed?t.reverse():t),this):this._d3Scale.range()},t.prototype.domain=function(t){return t?(this._d3Scale.domain(t),this):this._d3Scale.domain()},t.prototype.fixDomain=function(t){return this.domain(t),this.isDomainFixed=!0,this},t.prototype.isDomainValid=function(){return-1===this.domain().findIndex((function(t){return void 0===t}))},t.prototype.reverse=function(){return this.reversed(!this.isReversed)},t.prototype.reversed=function(t){return void 0===t?this.isReversed:(this.isReversed=t,this)},t}(),Ui=function(t){function e(e){var i=t.call(this,e)||this;return i.formatters.tick=function(t){return null==t?void 0:t.toLocaleString()},i}return he(e,t),e.prototype.createD3Scale=function(){return G.scaleLinear()},e.prototype.convert=function(t){return this._d3Scale(t)},e.prototype.invert=function(t){return this._d3Scale.invert(t)},e.prototype.isContinuous=function(){return!0},e.prototype.isDomainValid=function(){return-1===this.domain().findIndex((function(t){return isNaN(t)}))},e}(Fi),Hi=function(t){function e(e){var i=t.call(this,e)||this;return i.formatters.tick=function(t){if(rt.default(t))throw new Error("Can't format bandFormatScale");return Ct.default(t)},i}return he(e,t),e.prototype.createD3Scale=function(){return G.scaleBand()},e.prototype.convert=function(t,e){return void 0===e&&(e=.5),this._d3Scale(t)+e*this.bandwidth()},e.prototype.invert=function(t){var e=this,i=this._d3Scale.domain();if(this.range()[0]<this.range()[1]){var n=this.getRangeMidPoints(i.map(this._d3Scale));return i[k.bisect(n,t)]}n=this.getRangeMidPoints(i.map((function(t,n){return e._d3Scale(i[i.length-1-n])})));return i[i.length-1-k.bisect(n,t)]},e.prototype.range=function(e){var i=e?t.prototype.range.call(this,e):t.prototype.range.call(this);return e&&this.innerScale&&this.innerScale.range([0,this.bandwidth()]),i},e.prototype.round=function(t){return t?(this._d3Scale.round(t),this):this._d3Scale.round()},e.prototype.padding=function(t){return this._d3Scale.paddingInner(t),this._d3Scale.paddingOuter(t/2),this},e.prototype.align=function(t){return t?(this._d3Scale.align(t),this):this._d3Scale.align()},e.prototype.bandwidth=function(){return this._d3Scale.bandwidth()},e.prototype.step=function(){return this.domain().length?Math.abs(this.range()[1]-this.range()[0])/this.domain().length:0},e.prototype.copyToLinear=function(){var t=new Ui;return t.domain(this.range()).range(this.range()),t},e.prototype.bandTicks=function(){for(var t=[],e=this.range()[0],i=this.step(),n=0;n<=this.domain().length;n++)t.push(e+n*i);return t},e.prototype.isContinuous=function(){return!1},e.prototype.getRangeMidPoints=function(t){var e=this;return t.slice(1).map((function(t){return t-e._d3Scale.step()*e._d3Scale.paddingInner()/2}))},e}(Fi);function Vi(t,e){void 0===e&&(e=new Ui);var i,n=new Hi;return t&&t.grouped&&(n.padding(.25),n.innerScale=new Hi),t&&t.horizontal?(n.reverse(),i={x:e,y:n}):i={x:n,y:e},i}var zi={markerRadius:t.StandardGaugeThresholdMarkerRadius.Large,enabled:!0},Yi=function(e){function i(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.config=t,i.config=mt.default(i.config,zi),i}return he(i,e),i.prototype.draw=function(e,i){var n=e.containers[t.RenderLayerName.unclippedData],r=e.dataSeries,a=r.accessors,o=ct.default(this.config.enabled?r.data:[]);o.pop();var s=n.selectAll("circle.gauge-threshold-marker").data(o);s.exit().remove(),s.enter().append("circle").attr("class",hi).merge(s).attr("cx",(function(t,i){var n,o;return e.scales.x.convert(null===(o=null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.endX)||void 0===o?void 0:o.call(n,t,i,r.data,r))})).attr("cy",(function(t,i){var n,o;return e.scales.y.convert(null===(o=null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.endY)||void 0===o?void 0:o.call(n,t,i,r.data,r))})).attr("r",this.config.markerRadius).style("fill",(function(t,e){return"var(--nui-color-"+(o[e].hit?"text-light":"icon-default")+")"})).style("stroke-width",0)},i.prototype.getRequiredLayers=function(){return[se[t.RenderLayerName.unclippedData]]},i}(si),Wi=function(t){void 0===t&&(t=ze()),this.colorProvider=t,this.data={value:function(t){return Number.isFinite(t)?t:t.value}},this.series={color:this.colorProvider?this.colorProvider.get:void 0}};function qi(){return{strokeWidth:0,enableSeriesHighlighting:!1}}var Xi,$i={annularWidth:20,annularPadding:5,maxThickness:30,annularGrowth:.15,cursor:"default",enableSeriesHighlighting:!0,enableDataPointHighlighting:!0},Ki=function(e){function i(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.config=t,i.config=mt.default(i.config,$i),i}return he(i,e),i.prototype.draw=function(e,i){var n=this,r=e.containers[t.RenderLayerName.data],a=e.dataSeries.data,o=e.dataSeries.accessors;this.segmentWidth=this.getSegmentWidth(e);var s=r.selectAll("path.arc").data(a);s.exit().remove(),s.enter().append("path").attr("class","arc pointer-events nui-chart--path__outline").style("stroke-width",this.config.strokeWidth).style("cursor",this.config.cursor).on("mouseenter",(function(t,r){n.emitDataPointHighlight(e,t,r,i)})).on("mouseleave",(function(t,r){n.emitDataPointHighlight(e,null,de,i)})).on("click",(function(t,r){i.next({eventName:$t,data:{seriesId:e.dataSeries.id,index:r,data:t.data,position:n.getDataPointPosition(e.dataSeries,r,e.scales)}})})).merge(s).attr("d",(function(t,i){return n.getArc(e.scales.r.range(),N.arc(),i)(t)})).attr("fill",(function(t,i){var n,r;return o.data.color?o.data.color(t.data,i,a,e.dataSeries):null===(r=(n=o.series).color)||void 0===r?void 0:r.call(n,e.dataSeries.id,e.dataSeries)}))},i.prototype.getDataPointPosition=function(t,e,i){if(!(e<0)){var n=t.data[e],r=this.getArc(i.r.range(),N.arc(),e).centroid(n);return{x:r[0],y:r[1],width:0,height:0}}},i.prototype.getInnerRadius=function(t,e){if(rt.default(this.segmentWidth)||rt.default(this.config.annularPadding))throw new Error("Can't compute inner radius");var i=t[1]-t[0]-this.segmentWidth-e*(this.config.annularPadding+this.segmentWidth);return i>=0?i:0},i.prototype.getOuterRadius=function(t,e){if(rt.default(this.segmentWidth)||rt.default(this.config.annularPadding))throw new Error("Can't compute outer radius");var i=t[1]-t[0]-e*(this.config.annularPadding+this.segmentWidth);return i>=0?i:0},i.prototype.getArc=function(t,e,i){var n=this.getInnerRadius(t,i);return e.outerRadius(this.getOuterRadius(t,i)).innerRadius(n)},i.prototype.getSegmentWidth=function(t){return this.config.maxThickness&&this.config.annularGrowth?Math.min((t.scales.r.range()[1]-t.scales.r.range()[0])*this.config.annularGrowth,this.config.maxThickness):this.config.annularWidth},i.prototype.emitDataPointHighlight=function(e,i,n,r){var a,o=this.getDataPointPosition(e.dataSeries,n,e.scales),s={seriesId:e.dataSeries.id,dataSeries:e.dataSeries,index:n,data:i,position:o};this.config.enableSeriesHighlighting&&r.next({eventName:Kt,data:s}),this.config.enableDataPointHighlighting&&r.next({eventName:Xt,data:s}),r.next({eventName:Qt,data:{interactionType:t.InteractionType.MouseMove,dataPoints:(a={},a[e.dataSeries.id]=s,a)}})},i}(ei),Zi=function(){function t(){}return t.generateThresholdArcData=function(e){if(!e.length)return[];var i=t.generateArcValues(e),n=[];return N.pie().sort(null)(i).forEach((function(t,e){e%2==1&&n.push(t)})),n},t.generateArcValues=function(t){var e=Array(2*t.length-1).fill(0);return t.forEach((function(i,n){e[2*n]=0===n?i.value:i.value-t[n-1].value})),e},t}(),Qi={markerRadius:t.StandardGaugeThresholdMarkerRadius.Large,enabled:!0},Ji=function(e){function i(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.config=t,i.config=mt.default(i.config,Qi),i}return he(i,e),i.prototype.draw=function(e,i){var n=e.containers[t.RenderLayerName.data],r=ct.default(this.config.enabled?e.dataSeries.data:[]);r.sort((function(t,e){return t.value-e.value})),this.segmentWidth=this.getSegmentWidth(e);var a=this.getInnerRadius(e.scales.r.range(),0),o=N.arc().outerRadius(this.getOuterRadius(e.scales.r.range(),0)).innerRadius(a>=0?a:0),s=n.selectAll("circle.gauge-threshold-marker").data(Zi.generateThresholdArcData(r));s.exit().remove(),s.enter().append("circle").attr("class",hi).merge(s).attr("cx",(function(t){return o.centroid(t)[0]})).attr("cy",(function(t){return o.centroid(t)[1]})).attr("r",this.config.markerRadius).style("fill",(function(t,e){return"var(--nui-color-"+(r[e].hit?"text-light":"icon-default")+")"})).style("stroke-width",0)},i.prototype.getInnerRadius=function(t,e){if(rt.default(this.segmentWidth))throw new Error("Can't compute inner radius");var i=t[1]-t[0]-this.segmentWidth;return i>=0?i:0},i}(Ki);function tn(){return{r:(new Ui).fixDomain(Te)}}t.ChartAssistEventType=void 0,(Xi=t.ChartAssistEventType||(t.ChartAssistEventType={})).ToggleSeries="ToggleSeries",Xi.ResetVisibleSeries="ResetVisibleSeries",Xi.EmphasizeSeries="EmphasizeSeries";var en=function(){function e(e,i,n,r){void 0===n&&(n=t.RenderState.default),void 0===r&&(r=!0),this.seriesId=e,this.series=i,this.emphasisState=n,this.visible=r}return Object.defineProperty(e.prototype,"state",{get:function(){return this.visible?this.emphasisState:t.RenderState.hidden},enumerable:!1,configurable:!0}),e}(),nn=function(){function e(e,i,n,r){var a,o=this;void 0===n&&(n=Ye()),void 0===r&&(r=We()),this.chart=e,this.palette=n,this.markers=r,this.isLegendActive=!1,this.inputSeriesSet=[],this.legendSeriesSet=[],this.chartAssistSubject=new l.Subject,this.toggleSeries=function(e,i){o.legendInteractionAssist.setGroupVisibility(e,i),o.update(o.inputSeriesSet,!1),o.chartAssistSubject.next({type:t.ChartAssistEventType.ToggleSeries,payload:{seriesId:e,visible:i}})},this.resetVisibleSeries=function(){o.legendInteractionAssist.resetSeries(),o.publishRenderStates(),o.chartAssistSubject.next({type:t.ChartAssistEventType.ResetVisibleSeries,payload:{}})},this.emphasizeSeries=function(e){o.legendInteractionAssist.emphasizeSeries(e),o.publishRenderStates(),o.chartAssistSubject.next({type:t.ChartAssistEventType.EmphasizeSeries,payload:{seriesId:e}})},this.getVisibleSeriesWithLegend=function(){return o.legendSeriesSet.filter((function(t){return!o.isSeriesHidden(t.id)}))},this.configureChartEventSubscriptions(e.getEventBus()),i&&(this.seriesProcessor=i),this.legendInteractionAssist=new rn(this),this.syncHandlerMap=((a={})[t.ChartAssistEventType.EmphasizeSeries]=this.emphasizeSeries,a[t.ChartAssistEventType.ResetVisibleSeries]=this.resetVisibleSeries,a[t.ChartAssistEventType.ToggleSeries]=this.toggleSeries,a)}return e.getLabel=function(t,e,i,n,r){var a;if(!e||0===t.data.length)return null;var o=null===(a=t.accessors.data)||void 0===a?void 0:a[r||i];if(!o)return null;var s=e.index<0?t.data.length-1:e.index,d=o(t.data[s],s,t.data,t),c=t.scales[i];if(!c||!n)return d;var l=c.formatters[n];return l?l(d):d},Object.defineProperty(e.prototype,"renderStatesIndex",{get:function(){return this.legendInteractionAssist.renderStatesIndex},enumerable:!1,configurable:!0}),e.prototype.legendLabelData$=function(e){var i=this.chart.getEventBus().getStream(Qt).asObservable().pipe(u.filter((function(e){return e.data.interactionType===t.InteractionType.MouseMove})),u.map((function(t){return t.data.dataPoints[e.id]})));return i.pipe(u.switchMap((function(t){return function(t){return t&&t.index>=0}(t)?l.of(t.data):l.of(e.data&&e.data.length?e.data[e.data.length-1]:null)})))},e.prototype.seriesProcessor=function(t){return t},e.prototype.update=function(t,e){var i=this;void 0===e&&(e=!0),this.inputSeriesSet=t;var n=this.seriesProcessor(t.map((function(t){return Object.assign(Object.assign({},t),{data:t.data||[]})})));this.legendSeriesSet=n.filter((function(t){return t.showInLegend||void 0===t.showInLegend})),e&&this.legendInteractionAssist.update(n);var r=n.map((function(t){var e;return Object.assign({renderState:null===(e=i.renderStatesIndex[t.id])||void 0===e?void 0:e.state},t)}));this.chart.update(r),this.publishRenderStates()},e.prototype.isSeriesHidden=function(t){return this.legendInteractionAssist.isSeriesHidden(t)},e.prototype.seriesTrackByFn=function(t,e){return e.id},e.prototype.getHighlightedValue=function(t,i,n,r){if(this.highlightedDataPoints){var a=this.highlightedDataPoints[t.id];return e.getLabel(t,a,i,n,r)}},e.prototype.syncWithChartAssist=function(t){var e=this;this.getVisibleSeriesWithLegendBackup=this.getVisibleSeriesWithLegend,this.getVisibleSeriesWithLegend=t.getVisibleSeriesWithLegend,this.syncSubscription=t.chartAssistSubject.pipe(u.takeUntil(t.chart.getEventBus().getStream(te))).subscribe((function(t){var i,n=Object.keys(t.payload).map((function(e){return t.payload[e]}));(i=e.syncHandlerMap)[t.type].apply(i,ge(n))}))},e.prototype.unsyncChartAssist=function(){this.getVisibleSeriesWithLegend=this.getVisibleSeriesWithLegendBackup,this.syncSubscription&&this.syncSubscription.unsubscribe()},e.prototype.configureChartEventSubscriptions=function(e){var i,n=this,r=((i={}).interaction_data_points=function(e){e.interactionType===t.InteractionType.MouseMove&&(n.highlightedDataPoints=Object.assign({},e.dataPoints))},i.highlight_series=function(t){t.index>=0?n.emphasizeSeries(t.seriesId):n.resetVisibleSeries()},i.mouse_active=function(t){n.isLegendActive=t},i);tt.default(Object.keys(r),(function(t){e.getStream(t).subscribe((function(e){r[t](e.data),n.onEvent&&n.onEvent(e)}))}))},e.prototype.publishRenderStates=function(){this.chart.setSeriesStates(this.legendInteractionAssist.getSeriesStates())},e}(),rn=function(){function e(t){this.chartAssist=t,this.seriesGroups={},this.renderStatesIndex={}}return e.prototype.update=function(e){var i,n;this.seriesGroups=this.getSeriesGroups(e),this.seriesIndex=wt.default(e,(function(t){return t.id})),this.resetSeries();try{for(var r=pe(e.filter((function(t){return t.renderState}))),a=r.next();!a.done;a=r.next()){var o=a.value;this.renderStatesIndex[o.id]=new en(o.id,o,o.renderState===t.RenderState.hidden?t.RenderState.default:o.renderState,o.renderState!==t.RenderState.hidden)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.getSeriesStates=function(){return ht.default(this.renderStatesIndex)},e.prototype.isSeriesHidden=function(t){var e=this.renderStatesIndex[t];return e&&!e.visible},e.prototype.getSeriesGroups=function(t){var e,i,n={};try{for(var r=pe(t),a=r.next();!a.done;a=r.next()){var o=a.value,s=o.id.indexOf("__"),d=s>=0?o.id.substring(0,s):o.id;n[d]||(n[d]=[]),n[d].push(o.id)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}return n},e.prototype.setGroupState=function(t,e){var i,n;if(this.seriesGroups[t])try{for(var r=pe(this.seriesGroups[t]),a=r.next();!a.done;a=r.next()){var o=a.value;this.setRenderState(o,e)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.setGroupVisibility=function(t,e){var i,n;if(this.seriesGroups[t])try{for(var r=pe(this.seriesGroups[t]),a=r.next();!a.done;a=r.next()){var o=a.value;this.setVisibility(o,e)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.emphasizeSeries=function(e){var i,n;try{for(var r=pe(Object.keys(this.seriesGroups)),a=r.next();!a.done;a=r.next()){var o=a.value;this.setGroupState(o,o===e?t.RenderState.emphasized:t.RenderState.deemphasized)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.resetSeries=function(){var e,i,n=this.chartAssist.getVisibleSeriesWithLegend();if(1===n.length)this.emphasizeSeries(n[0].id);else try{for(var r=pe(Object.keys(this.seriesGroups)),a=r.next();!a.done;a=r.next()){var o=a.value;this.setGroupState(o,t.RenderState.default)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.setRenderState=function(t,e){var i=this.renderStatesIndex[t];i?i.emphasisState=e:(i=new en(t,this.seriesIndex[t],e),this.renderStatesIndex[t]=i)},e.prototype.setVisibility=function(e,i){var n=this.renderStatesIndex[e];n?n.visible=i:(n=new en(e,this.seriesIndex[e],t.RenderState.default,i),this.renderStatesIndex[e]=n)},e}();function an(t,e){if(!t[0])return t;var i=N.pie().sort(null),n=t[0].data.reduce((function(i,n){return i.push(t.map((function(t){return e(t)&&!t.excludeFromArcCalculation?t.accessors.data.value(t.data[i.length],i.length,t.data,t):0}))),i}),[]).map((function(t){return i(t)}));return t.map((function(t,e){return Object.assign(Object.assign({},t),{data:!1===t.preprocess?t.data:n.map((function(i){return Object.assign(Object.assign({},i[e]),{data:t.data[0]})}))})}))}function on(t){var e=this;return an(t,(function(t){return!e.isSeriesHidden(t.id)}))}function sn(t,e){if(0===t.length)return t;var i=function(t,e){return void 0===e&&(e="category"),t.reduce((function(t,i){var n=i.accessors.data[e],r=i.data.reduce((function(t,e,r){return t.push(null==n?void 0:n(e,r,i.data,i)),t}),[]);return It.default(t,r,(function(t){return t.valueOf()}))}),[])}(t);t.reduce((function(t,n){if(!rt.default(n.preprocess)&&!n.preprocess)return t;var r=n.accessors.data.category,a=n.accessors.data.value;if(!a)throw new Error("valueAccessor is not defined");var o=n.data.reduce((function(t,e,i){var a;return Object.assign(Object.assign({},t),((a={})[r(e,i,n.data,n)]=i,a))}),{}),s=[];return i.forEach((function(i,r){var d;if(void 0!==o[i]){d=n.data[o[i]];var c={},l=e(n)?1:0;c.start=t[r],t[r]+=(a(d,o[i],n.data,n)||0)*l,c.end=t[r],d.__bar=c,s.push(d)}})),n.data=s,t}),Array(i.length).fill(0));return t}function dn(t){var e=this;return sn(t,(function(t){return!e.isSeriesHidden(t.id)}))}function cn(t,e){e&&0!==e.length&&(pt.default(e[0])?(t.domain(e[0]),Le(t)&&cn(t.innerScale,e.slice(1))):t.domain(e))}var ln=function(){function e(t){this.chart=t,this._chartSeriesSet=[],this.dataIndex={},this._scalesIndexByKey={},this._scalesIndexById={}}return Object.defineProperty(e.prototype,"chartSeriesSet",{get:function(){return this._chartSeriesSet},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scalesIndexByKey",{get:function(){return this._scalesIndexByKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scalesIndexById",{get:function(){return this._scalesIndexById},enumerable:!1,configurable:!0}),e.prototype.update=function(t){var e=At.default(t.map((function(t){return t.id})),(function(t,e,i){return Tt.default(i,t,e+1)}));e.length>0&&console.warn("Series set contains duplicate IDs:",e),this._chartSeriesSet=t||[],this.dataIndex=wt.default(this._chartSeriesSet,(function(t){return t.id})),this._scalesIndexByKey=this.buildScalesIndex(this._chartSeriesSet),this._scalesIndexById=wt.default(bt.default(ht.default(this._scalesIndexByKey).map((function(t){return t.list}))),(function(t){return t.id}))},e.prototype.getChartSeries=function(t){return this.dataIndex[t]},e.prototype.updateScaleDomain=function(e,i){var n,r;if(!e.isDomainFixed&&e.domainCalculator){var a=this.chartSeriesSet.filter((function(t){return t.scales[i]===e&&!t.renderer.config.ignoreForDomainCalculation})).filter((function(e){return e.renderState!==t.RenderState.hidden}));if(a.length||(null===(r=null===(n=this.chart)||void 0===n?void 0:n.configuration)||void 0===r?void 0:r.updateDomainForEmptySeries)){var o=e.domainCalculator(a,i,e);cn(e,o)}}},e.prototype.buildScalesIndex=function(t){var e={};return tt.default(t,(function(t){tt.default(Object.keys(t.scales),(function(i){var n=t.scales[i],r=e[i];r||(r={index:{},list:[]},e[i]=r),r.index[n.id]||(r.index[n.id]=n,r.list.push(n))}))})),e},e.prototype.updateScaleDomains=function(){var t=this;tt.default(Object.keys(this._scalesIndexByKey),(function(e){tt.default(t._scalesIndexByKey[e].list,(function(i){t.updateScaleDomain(i,e)}))}))},e}(),un=function(){function e(t,e){var i=this;this.lasagna=t,this.dataManager=e,this.interactionDataPointsSubject=new l.Subject,this.rendererSubject=new l.Subject,this.highlightedDataPoints={},this.renderLayers={},this.layerIndex={},this.highlightDataPointSubscription=this.rendererSubject.subscribe((function(t){t.eventName===Xt&&i.highlightDataPoint(t.data.seriesId,t.data.index)}))}return e.prototype.update=function(){var t=this,e={};tt.default(this.dataManager.chartSeriesSet,(function(i){var n=t.getSeriesChildContainers(i.id);-1===Object.values(i.scales).findIndex((function(t){if(void 0===e[t.id]){var i=t.isDomainValid();i||console.warn("Invalid scale domain detected for scale:",t),e[t.id]=i}return!e[t.id]}))&&i.renderer.draw({dataSeries:i,containers:n,scales:i.scales},t.rendererSubject)}))},e.prototype.updateSeriesContainers=function(){this.layerIndex=this.buildLayerIndex(this.dataManager.chartSeriesSet),this.removeUnusedLayers(),this.addNeededLayers(),this.updateLayerContents()},e.prototype.emitInteractionDataPoints=function(e){var i=this,n=!1,r=this.dataManager.chartSeriesSet.reduce((function(r,a){var o={};tt.default(Object.keys(e.values),(function(t){var i=a.scales[t].id;o[t]=e.values[t][i]}));var s=ce;a.data&&a.data.length>0&&(s=a.renderer.getDataPointIndex(a,o,a.scales));var d=a.renderer.getDataPointPosition(a,s,a.scales),c={seriesId:a.id,dataSeries:a,index:s,data:s>=0?a.data[s]:null,position:d};if(e.interactionType===t.InteractionType.MouseMove){var l=i.highlightedDataPoints[a.id];rt.default(s)||!rt.default(l)&&s!==ce&&s===l.index||(n=!0,i.rendererSubject.next({eventName:Xt,data:c}))}return r[a.id]=c,r}),{});(e.interactionType!==t.InteractionType.MouseMove||n)&&this.interactionDataPointsSubject.next({interactionType:e.interactionType,dataPoints:r}),n&&(this.highlightedDataPoints=r)},e.prototype.highlightDataPoint=function(t,e){var i=this.getSeriesChildContainers(t),n=this.dataManager.getChartSeries(t),r={dataSeries:n,containers:i,scales:n.scales};n.renderer.highlightDataPoint(r,e,this.rendererSubject)},e.prototype.setSeriesStates=function(t){var e=this;tt.default(t,(function(t){var i=t.seriesId,n=t.state,r=e.dataManager.getChartSeries(i);if(r){var a=e.getSeriesChildContainers(i),o=r.renderer.getContainerStateStyles(n);tt.default(ht.default(a),(function(t){t.attrs(o)})),r.renderer.setSeriesState(a,n)}}))},e.prototype.destroy=function(){this.highlightDataPointSubscription&&this.highlightDataPointSubscription.unsubscribe(),this.rendererSubject&&this.rendererSubject.complete()},e.prototype.buildLayerIndex=function(t){var e={};return tt.default(t,(function(t){tt.default(t.renderer.getRequiredLayers(),(function(i){if(se[i.name]&&!et.default(se[i.name],i))throw new Error('Custom definition detected for render layer "'+i.name+'". Custom layers must use a name not already taken by the predefined layer set.');var n=e[i.name];n||(n={seriesUsing:[],layerDefinition:i},e[i.name]=n),n.seriesUsing.push(t)}))})),e},e.prototype.removeUnusedLayers=function(){var t=this;tt.default(Object.keys(this.renderLayers),(function(e){t.layerIndex[e]||(t.lasagna.removeLayer(e),delete t.renderLayers[e])}))},e.prototype.addNeededLayers=function(){var t=this;tt.default(this.layerIndex,(function(e){t.renderLayers[e.layerDefinition.name]||(t.renderLayers[e.layerDefinition.name]=t.lasagna.addLayer(e.layerDefinition))}))},e.prototype.updateLayerContents=function(){var t=this;tt.default(Object.keys(this.renderLayers),(function(e){var i=t.renderLayers[e].selectAll("g.data-series-container").data(t.layerIndex[e].seriesUsing,(function(t){return t.id})).order();i.enter().append("g").attrs({id:function(i){return t.getChildContainerId(e,i.id)},class:"data-series-container"}),i.exit().remove()}))},e.prototype.getSeriesChildContainers=function(t){var e=this,i={};return tt.default(Object.keys(this.renderLayers),(function(n){var r=e.renderLayers[n];i[n]=r.selectAll("#"+n+"-"+ai.cssEscape(t))})),i},e.prototype.getChildContainerId=function(t,e){return t+"-"+e},e}(),hn=function(){function t(){}return t.prototype.initialize=function(){},t.prototype.update=function(){},t.prototype.updateDimensions=function(){},t.prototype.destroy=function(){},t}(),pn=function(t){function e(){var e=t.apply(this,ge(arguments))||this;return e.isChartInView=!0,e.destroy$=new l.Subject,e}return he(e,t),e.prototype.initialize=function(){var t=this;this.renderEngine=this.chart.getRenderEngine(),this.chart.getEventBus().getStream(Wt).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.lastInteractionValuesPayload=e.data,t.isChartInView&&t.chart.getRenderEngine().emitInteractionDataPoints(t.lastInteractionValuesPayload)})),this.renderEngine.interactionDataPointsSubject.pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.chart.getEventBus().getStream(Qt).next({data:e})})),this.renderEngine.rendererSubject.pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.chart.getEventBus().getStream(e.eventName).next({data:e.data})})),this.chart.getEventBus().getStream(ne).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.isChartInView=e.data.isChartInView,t.isChartInView&&t.lastInteractionValuesPayload&&t.chart.getRenderEngine().emitInteractionDataPoints(t.lastInteractionValuesPayload)}))},e.prototype.update=function(){this.renderEngine.updateSeriesContainers(),this.renderEngine.update()},e.prototype.updateDimensions=function(){this.renderEngine.update()},e.prototype.destroy=function(){this.renderEngine.destroy(),this.destroy$.next(),this.destroy$.complete()},e}(hn),fn=function(){function e(t,e){if(this.grid=t,this.configuration=e,this.eventBus=new ve,this.updateSubject=new l.BehaviorSubject([]),this.updateDimensionsSubject=new l.Subject,this.seriesStatesSubject=new l.BehaviorSubject([]),this.plugins=[],!t)throw new Error("Grid has to be defined!");t.updateChartDimensionsSubject=this.updateDimensionsSubject,t.eventBus=this.eventBus}return e.prototype.getEventBus=function(){return this.eventBus},e.prototype.getDataManager=function(){return this.dataManager},e.prototype.getRenderEngine=function(){return this.renderEngine},e.prototype.getGrid=function(){return this.grid},e.prototype.addPlugin=function(t){t.chart=this,this.plugins.push(t)},e.prototype.removePlugin=function(t){var e=this.plugins.findIndex((function(e){return e instanceof t}));-1!==e&&(this.plugins[e].destroy(),this.plugins.splice(e,1))},e.prototype.addPlugins=function(){for(var t,e,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var r=pe(i),a=r.next();!a.done;a=r.next()){var o=a.value;this.addPlugin(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.removePlugins=function(){for(var t,e,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var r=pe(i),a=r.next();!a.done;a=r.next()){var o=a.value;this.removePlugin(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.hasPlugin=function(t){return-1!==this.plugins.findIndex((function(e){return e instanceof t}))},e.prototype.build=function(t){var e,i,n=this;this.element=t,this.target=o.select(this.element).append("svg").attrs({class:"nui-chart",height:"100%",width:"100%"}),this.configureCssFilters(),this.buildGrid(),this.dataManager=this.buildDataManager(),this.renderEngine=this.buildRenderEngine(this.grid.getLasagna(),this.dataManager);var r=new pn;r.chart=this,this.plugins.unshift(r);try{for(var a=pe(this.getGrid().buildPlugins(this)),s=a.next();!s.done;s=a.next()){var d=s.value;this.addPlugin(d)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(e)throw e.error}}this.initialize();var c=function(){return u.takeUntil(n.getEventBus().getStream(te))};this.updateSubject.pipe(c()).subscribe((function(t){return n.onUpdate(t)})),this.updateDimensionsSubject.pipe(c()).subscribe((function(){return n.onUpdateDimensions()})),this.seriesStatesSubject.pipe(c()).subscribe((function(t){return n.onSetSeriesStates(t)}))},e.prototype.configureCssFilters=function(){var e,i;this.filterDefs=null===(e=this.target)||void 0===e?void 0:e.append("defs"),null===(i=this.filterDefs)||void 0===i||i.append("filter").attr("id",t.CssFilterId.Grayscale).append("feColorMatrix").attr("type","matrix").attr("values",Si)},e.prototype.buildDataManager=function(){return new ln(this)},e.prototype.buildGrid=function(){this.target&&(this.grid.target(this.target),this.grid.build(),this.updateTargetDimensions(this.grid.config().dimension))},e.prototype.buildRenderEngine=function(t,e){return new un(t,e)},e.prototype.update=function(t){this.updateSubject.next(t)},e.prototype.updateDimensions=function(){this.updateDimensionsSubject.next()},e.prototype.initialize=function(){tt.default(this.plugins,(function(t){t.initialize()}))},e.prototype.destroy=function(){var t;this.eventBus.getStream(te).next({data:null}),this.eventBus.destroy(),this.plugins.forEach((function(t){return t.destroy()})),null===(t=this.target)||void 0===t||t.remove(),this.target=void 0},e.prototype.setSeriesStates=function(t){this.seriesStatesSubject.next(t),this.eventBus.getStream(re).next({data:t})},e.prototype.onUpdate=function(t){this.dataManager.update(t),this.grid.scales=this.dataManager.scalesIndexByKey,this.dataManager.updateScaleDomains(),this.grid.updateRanges(),this.plugins.forEach((function(t){return t.update()}))},e.prototype.onUpdateDimensions=function(){var t=this.grid.config().dimension;this.updateTargetDimensions(t);var e={};t.autoHeight&&(e.height=this.element.clientHeight),t.autoWidth&&(e.width=this.element.clientWidth),this.grid.updateDimensions(e),this.plugins.forEach((function(t){return t.updateDimensions()}))},e.prototype.updateTargetDimensions=function(t){var e,i;t.autoHeight||null===(e=this.target)||void 0===e||e.style("height",t.outerHeight()+"px"),t.autoWidth||null===(i=this.target)||void 0===i||i.style("width",t.outerWidth()+"px")},e.prototype.onSetSeriesStates=function(t){this.renderEngine.setSeriesStates(t)},e}(),gn=function(e){function i(t){void 0===t&&(t={});var i=e.call(this)||this;return i.config=t,i.DEFAULT_CONFIG={padding:5,formatterName:Oi,disableThresholdLabels:!1},i.destroy$=new l.Subject,i.config=mt.default(i.config,i.DEFAULT_CONFIG),i}return he(i,e),i.prototype.initialize=function(){var e=this;this.lasagnaLayer=this.chart.getGrid().getLasagna().addLayer({name:Mi,order:se[t.RenderLayerName.data].order,clipped:!1}),this.chart.getEventBus().getStream(Qt).pipe(u.takeUntil(this.destroy$)).subscribe((function(t){var i=e.lasagnaLayer.select(".gauge-labels");if(!i.empty()){var n=t.data.dataPoints,r=Object.keys(n).find((function(t,e){return n[t].index===de}))?0:1;i.style("opacity",r)}}))},i.prototype.update=function(){this.drawThresholdLabels()},i.prototype.updateDimensions=function(){this.drawThresholdLabels()},i.prototype.destroy=function(){this.destroy$&&(this.destroy$.next(),this.destroy$.complete())},i.prototype.drawThresholdLabels=function(){var t,e,i=this,n=this.chart.getDataManager().chartSeriesSet.find((function(t){return t.renderer instanceof Ji}));if(rt.default(n))console.warn("Threshold series is undefined. As a result, threshold labels for the donut gauge will not be rendered.");else{var r=this.lasagnaLayer.select(".gauge-labels");r.empty()&&(r=this.lasagnaLayer.append("svg:g").attr("class",Mi).style("opacity",0));var a=null==n?void 0:n.renderer,o=(null==a?void 0:a.getOuterRadius(null!==(t=null==n?void 0:n.scales.r.range())&&void 0!==t?t:[0,0],0))+this.config.padding;if(rt.default(o))throw new Error("Radius is undefined");var s=N.arc().outerRadius(o).innerRadius(o),d=null!==(e=null==n?void 0:n.scales.r.formatters[this.config.formatterName])&&void 0!==e?e:function(t){return t},c=ct.default(this.config.disableThresholdLabels?[]:null==n?void 0:n.data);if(rt.default(c))throw new Error("Gauge threshold series data is undefined");c.sort((function(t,e){return t.value-e.value}));var l=r.selectAll("text.threshold-label").data(Zi.generateThresholdArcData(c));l.exit().remove(),l.enter().append("text").attr("class",Ni).merge(l).attr("transform",(function(t){return"translate("+s.centroid(t)+")"})).attr("title",(function(t,e){return d(c[e].value)})).style("text-anchor",(function(t){return i.getTextAnchor(t.startAngle)})).style("dominant-baseline",(function(t){return i.getAlignmentBaseline(t.startAngle)})).text((function(t,e){return d(c[e].value)}))}},i.prototype.getTextAnchor=function(t){var e=Math.cos(t-Math.PI/2);return e>.5?"start":e<-.5?"end":"middle"},i.prototype.getAlignmentBaseline=function(t){var e=Math.sin(t+Math.PI/2);return e>.5?"text-after-edge":e<-.5?"text-before-edge":"central"},i}(hn);gn.MARGIN_DEFAULT=25;var vn=function(e){function i(t){void 0===t&&(t={});var i=e.call(this)||this;return i.config=t,i.DEFAULT_CONFIG={padding:5,formatterName:Oi,disableThresholdLabels:!1,flippedLabels:!1},i.destroy$=new l.Subject,i.isHorizontal=!0,i.xTranslate=function(t,e){var n,r,a,o,s;if(i.isHorizontal){var d=i.thresholdsSeries,c=null===(o=null===(a=null===(r=null===(n=i.thresholdsSeries)||void 0===n?void 0:n.accessors)||void 0===r?void 0:r.data)||void 0===a?void 0:a.value)||void 0===o?void 0:o.call(a,t,e,null==d?void 0:d.data,d);return null===(s=i.thresholdsSeries)||void 0===s?void 0:s.scales.x.convert(c)}return i.getLabelOffset()},i.yTranslate=function(t,e){var n,r,a,o,s;if(i.isHorizontal)return i.getLabelOffset();var d=i.thresholdsSeries,c=null===(o=null===(a=null===(r=null===(n=i.thresholdsSeries)||void 0===n?void 0:n.accessors)||void 0===r?void 0:r.data)||void 0===a?void 0:a.value)||void 0===o?void 0:o.call(a,t,e,null==d?void 0:d.data,d);return null===(s=i.thresholdsSeries)||void 0===s?void 0:s.scales.y.convert(c)},i.config=mt.default(i.config,i.DEFAULT_CONFIG),i}return he(i,e),i.prototype.initialize=function(){var e=this;this.lasagnaLayer=this.chart.getGrid().getLasagna().addLayer({name:Mi,order:se[t.RenderLayerName.data].order,clipped:!1}),this.chart.getEventBus().getStream(zt).pipe(u.takeUntil(this.destroy$)).subscribe((function(t){var i=e.lasagnaLayer.select(".gauge-labels");i.empty()||i.style("opacity",t.data?1:0)}))},i.prototype.update=function(){this.updateData(),this.drawThresholdLabels()},i.prototype.updateDimensions=function(){this.updateData(),this.drawThresholdLabels()},i.prototype.destroy=function(){this.destroy$&&(this.destroy$.next(),this.destroy$.complete())},i.prototype.updateData=function(){var t;this.thresholdsSeries=this.chart.getDataManager().chartSeriesSet.find((function(t){return t.id===Di})),this.isHorizontal=(null===(t=this.thresholdsSeries)||void 0===t?void 0:t.scales.x)instanceof Ui},i.prototype.drawThresholdLabels=function(){var t,e,i,n=this;if(rt.default(this.thresholdsSeries))console.warn("Threshold series is undefined. As a result, threshold labels for the linear gauge will not be rendered.");else{var r=this.lasagnaLayer.select(".gauge-labels");r.empty()&&(r=this.lasagnaLayer.append("svg:g").attr("class",Mi).style("opacity",0));var a=ct.default(this.config.disableThresholdLabels?[]:null===(t=this.thresholdsSeries)||void 0===t?void 0:t.data);if(rt.default(a))throw new Error("Gauge threshold series data is undefined");a.pop();var o=null!==(i=null===(e=this.thresholdsSeries)||void 0===e?void 0:e.scales[this.isHorizontal?"x":"y"].formatters[this.config.formatterName])&&void 0!==i?i:function(t){return t},s=r.selectAll("text.threshold-label").data(a);s.exit().remove(),s.enter().append("text").attr("class",Ni).merge(s).attr("transform",(function(t,e){return"translate("+n.xTranslate(t,e)+", "+n.yTranslate(t,e)+")"})).attr("title",(function(t,e){return o(a[e].value)})).style("text-anchor",(function(t){return n.getTextAnchor()})).style("dominant-baseline",(function(t){return n.getAlignmentBaseline()})).text((function(t,e){return o(a[e].value)}))}},i.prototype.getLabelOffset=function(){var t=0;if(!this.config.flippedLabels){var e=this.chart.getGrid().config().dimension;t=this.isHorizontal?e.height():e.width()}var i=this.config.padding;return t+(i=this.config.flippedLabels?-i:i)},i.prototype.getTextAnchor=function(){return this.isHorizontal?"middle":this.config.flippedLabels?"end":"start"},i.prototype.getAlignmentBaseline=function(){return this.isHorizontal?this.config.flippedLabels?"text-after-edge":"hanging":"central"},i}(hn),yn=function(){function t(){this._width=0,this._height=0,this.margin={top:0,right:0,bottom:0,left:0},this.padding={top:0,right:0,bottom:0,left:0},this.marginLocked={top:!1,right:!1,bottom:!1,left:!1},this.autoWidth=!0,this.autoHeight=!0}return t.prototype.width=function(t){return void 0===t?this._width:(this._width=t,this)},t.prototype.height=function(t){return void 0===t?this._height:(this._height=t,this)},t.prototype.outerWidth=function(t){var e=this.margin.right+this.margin.left;return void 0===t?this._width+e:(this._width=Math.max(t-e,0),this)},t.prototype.outerHeight=function(t){var e=this.margin.top+this.margin.bottom;return void 0===t?this._height+e:(this._height=Math.max(t-e,0),this)},t}(),mn=function(){this.interactive=!0,this.dimension=new yn,this.borders={top:void 0,bottom:void 0,left:void 0,right:void 0},this.cursor="crosshair",this.disableRenderAreaHeightCorrection=!1,this.disableRenderAreaWidthCorrection=!1},bn=function(){function t(e,i){this.clipPath=i,this.layers=[],this.container=e.append("g").attr("class",t.CONTAINER_CLASS+" pointer-events")}return t.prototype.addLayer=function(t){return this.layers=Rt.default(this.layers.concat(t),"order"),this.update(),this.getLayerContainer(t.name)},t.prototype.removeLayer=function(t){var e=this.layers.findIndex((function(e){return e.name===t}));-1!==e&&(this.layers.splice(e,1),this.update())},t.prototype.getLayerContainer=function(e){return this.container.select("."+t.LAYER_CLASS+"-"+e)},t.prototype.getContainer=function(){return this.container},t.prototype.update=function(){var e=this,i=this.container.selectAll("g."+t.LAYER_CLASS).data(this.layers,(function(t){return t.name})).order();i.enter().append("g").attrs({class:function(e){return t.LAYER_CLASS+" "+t.LAYER_CLASS+"-"+e.name},"clip-path":function(t){return t.clipped?"url(#"+e.clipPath+")":""},"pointer-events":"none"}),i.exit().remove()},t}();bn.CONTAINER_CLASS="lasagna-container",bn.LAYER_CLASS="lasagna-layer";var Sn=.5,xn=function(){function t(){var e=this;this.borders={},this.adjustRenderingArea=function(){var i=e.config().dimension,n=e.config().disableRenderAreaHeightCorrection,r=e.config().disableRenderAreaWidthCorrection,a={width:Math.max(0,i.width()),height:Math.max(0,i.height()+(n?0:t.RENDER_AREA_HEIGHT_CORRECTION))};n||(a.y=-t.RENDER_AREA_HEIGHT_CORRECTION);var o=Object.assign(Object.assign({},a),{width:Math.max(0,i.width()-(r?0:t.RENDER_AREA_WIDTH_CORRECTION))});e.renderingAreaClipPath.attrs(a),e.renderingArea.attrs(o)}}return t.prototype.getInteractiveArea=function(){return this.interactiveArea},t.prototype.getLasagna=function(){return this.lasagna},Object.defineProperty(t.prototype,"scales",{get:function(){return this._scales},set:function(t){this._scales=t},enumerable:!1,configurable:!0}),t.prototype.config=function(t){return void 0===t?this._config:(this._config=t,this)},t.prototype.target=function(t){return void 0===t?this._target:(this._target=t,this)},t.prototype.build=function(){if(!this.config()){var e=new mn;this.config(e)}this.container=this._target.append("g").attrs({class:t.GRID_CLASS_NAME});var i=t.RENDERING_AREA_CLIP_PATH_PREFIX+ai.uuid();this.lasagna=new bn(this.container,i),this.renderingArea=this.buildRenderingArea(i),this.adjustRenderingArea(),this.gridElementsLayer=this.lasagna.addLayer({name:t.GRID_ELEMENTS_LAYER_NAME,order:100,clipped:!1});var n=this.buildBorders(this.gridElementsLayer);return n&&(this.borders=n),this},t.prototype.buildPlugins=function(t){return[]},t.prototype.update=function(){return dt.default(this.scales)||(this.updateBorders(),this.adjustRenderingArea()),this},t.prototype.updateDimensions=function(t){var e=this.config().dimension;return t.width&&e.outerWidth(t.width-this.getOuterWidthDimensionCorrection()),t.height&&e.outerHeight(t.height),this.adjustRenderingArea(),this.updateRanges(),this},t.prototype.updateRanges=function(){return this.update(),this},t.prototype.getOuterWidthDimensionCorrection=function(){return t.TICK_DIMENSION_CORRECTION},t.prototype.buildBorders=function(t){var e=this;if(this.config()&&this.config().borders){var i=this.config().borders,n={},r=Object.keys(i);return tt.default(r,(function(r){var a;i[r]&&(n[r]=null!==(a=e.createBorder(t,i[r]))&&void 0!==a?a:void 0)})),n}},t.prototype.buildRenderingArea=function(e){return this.renderingAreaClipPath=this._target.append("clipPath").attr("id",e).append("rect"),this.lasagna.addLayer({name:t.RENDERING_AREA_LAYER_NAME,order:-1,clipped:!0}).append("rect").attrs({"pointer-events":"all",fill:"transparent"})},t.prototype.createBorder=function(e,i){var n=e.append("line").attr("class",i.className||t.DEFAULT_BORDER_CLASS_NAME);return i.width&&n.style("stroke-width",i.width),i.color&&n.style("stroke",i.color),n.node()},t.prototype.updateBottomBorder=function(){var e;if(!this.borders.bottom)throw new Error("BottomBorder is not defined");o.select(this.borders.bottom).attrs({x1:0,y1:this.config().dimension.height()-Sn,x2:this.config().dimension.width()+t.TICK_DIMENSION_CORRECTION,y2:this.config().dimension.height()-Sn}).classed("hidden",!(null===(e=this._config.borders.bottom)||void 0===e?void 0:e.visible))},t.prototype.updateBorders=function(){var e,i,n;this.borders.bottom&&this.updateBottomBorder(),this.borders.top&&o.select(this.borders.top).attrs({x1:0,y1:Sn,x2:this.config().dimension.width()+t.TICK_DIMENSION_CORRECTION,y2:Sn}).classed("hidden",!(null===(e=this._config.borders.top)||void 0===e?void 0:e.visible)),this.borders.right&&o.select(this.borders.right).attrs({x1:this.config().dimension.width()-Sn,y1:0,x2:this.config().dimension.width()-Sn,y2:this.config().dimension.height()+t.TICK_DIMENSION_CORRECTION}).classed("hidden",!(null===(i=this._config.borders.right)||void 0===i?void 0:i.visible)),this.borders.left&&o.select(this.borders.left).attrs({x1:Sn,y1:0,x2:Sn,y2:this.config().dimension.height()+t.TICK_DIMENSION_CORRECTION}).classed("hidden",!(null===(n=this._config.borders.left)||void 0===n?void 0:n.visible))},t}();xn.GRID_CLASS_NAME="nui-chart-grid",xn.DEFAULT_BORDER_CLASS_NAME="nui-chart-border",xn.RENDERING_AREA_CLIP_PATH_PREFIX="clip-path_",xn.GRID_ELEMENTS_LAYER_NAME="grid-elements",xn.RENDERING_AREA_LAYER_NAME="rendering-area",xn.RENDER_AREA_HEIGHT_CORRECTION=1,xn.RENDER_AREA_WIDTH_CORRECTION=1,xn.TICK_DIMENSION_CORRECTION=1;var _n=function(t){function e(){var e=t.apply(this,ge(arguments))||this;return e.adjustRenderingArea=function(){var t=e.config().dimension,i={width:t.outerWidth(),height:t.outerHeight(),transform:"translate("+-t.outerWidth()/2+", "+-t.outerHeight()/2+")"};e.renderingAreaClipPath.attrs(i),e.renderingArea.attrs(i)},e}return he(e,t),e.prototype.build=function(){return t.prototype.build.call(this),this.recenter(),this},e.prototype.updateDimensions=function(t){var e=this,i=this.config().dimension;if(rt.default(t.width)||i.outerWidth(t.width),rt.default(t.height)||i.outerHeight(t.height),this.scales){var n=this.scales.r;n&&n.list[0].range([0,Math.min(i.width(),i.height())/2])}return this.adjustRenderingArea(),this.updateRanges(),setTimeout((function(){e.recenter()})),this},e.prototype.recenter=function(){this.container.attrs({transform:"translate("+this.config().dimension.outerWidth()/2+","+this.config().dimension.outerHeight()/2+")"})},e}(xn);function Cn(){var t=new mn;return t.interactive=!1,(new _n).config(t)}var En=function e(i,n,r,a){var s=this;this.target=i,this.interactiveArea=n,this.gridMargin=a,this.active=new l.BehaviorSubject(!1),this.interaction=new l.BehaviorSubject({type:t.InteractionType.Click,coordinates:{x:0,y:0}}),this.isActive=!1,this.onMouseInteraction=function(t){var e,i;if(!o.event.target.classList.contains(le)){var n=0,r=0,a=parseInt(s.interactiveArea.attr("width"),10)||0,d=parseInt(s.interactiveArea.attr("height"),10)||0;if(/firefox/i.test(navigator.userAgent))n=(c=(c=n+o.event.offsetX-((null===(e=s.gridMargin)||void 0===e?void 0:e.left)||0))>a?a:c)<0?0:c,r=(l=(l=r+o.event.offsetY-((null===(i=s.gridMargin)||void 0===i?void 0:i.top)||0))>d?d:l)<0?0:l;else{var c,l,u=o.mouse(o.event.currentTarget);n=(c=u[0]>a?a:u[0])<0?0:c,r=(l=u[1]>d?d:u[1])<0?0:l}s.interaction.next({type:t,coordinates:{x:n,y:r}})}},this.onMouseOver=function(){s.isActive||o.event.target.classList.contains(le)||(s.isActive=!0,s.active.next(!0))},this.onMouseOut=function(){if(s.isActive){for(var t=o.event.relatedTarget;t;){if(t===s.target.node())return;t=t.parentNode}s.isActive=!1,s.active.next(!1)}},this.onMouseEnter=function(){s.onMouseOver()},this.onMouseLeave=function(){s.onMouseOut()},this.interactiveArea.style("cursor",r).classed(e.CONTAINER_CLASS,!0),this.target.on("mouseover",this.onMouseOver).on("mouseout",this.onMouseOut).on(t.InteractionType.MouseDown,(function(){return s.onMouseInteraction(t.InteractionType.MouseDown)})).on(t.InteractionType.MouseUp,(function(){return s.onMouseInteraction(t.InteractionType.MouseUp)})).on(t.InteractionType.MouseMove,(function(){return s.onMouseInteraction(t.InteractionType.MouseMove)})).on(t.InteractionType.Click,(function(){return s.onMouseInteraction(t.InteractionType.Click)}))};En.CONTAINER_CLASS="mouse-interactive-area";var wn=function(t,e,i){var n=function(n,r,a){var o=i(n,r,a),s=ct.default(a);cn(s,o);var d=e(s.d3Scale).scale().ticks(t.approximateTicks);if(d.length<=1)return o;var c=d[1]-d[0];return d[0]>o[0]&&(o[0]=d[0]-c),d[d.length-1]<o[1]&&(o[1]=d[d.length-1]+c),o};return n.domainWithTicks=!0,n},In=function(e){function i(t){void 0===t&&(t="title");var i=e.call(this)||this;return i.formatterName=t,i.areLabelUpdatesEnabled=!0,i.isChartInView=!1,i.destroy$=new l.Subject,i}return he(i,e),i.prototype.initialize=function(){var t=this;this.interactionLabelLayer=this.chart.getGrid().getLasagna().addLayer({name:i.LAYER_NAME,order:901,clipped:!1}),this.chart.getEventBus().getStream(Wt).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.lastInteractionValuesPayload=e.data,t.isChartInView&&t.handleLabelUpdate()})),this.chart.getEventBus().getStream(ne).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.isChartInView=e.data.isChartInView,t.isChartInView&&t.lastInteractionValuesPayload&&t.handleLabelUpdate()}))},i.prototype.handleLabelUpdate=function(){var e=this.chart.getGrid().scales;if(this.areLabelUpdatesEnabled&&this.lastInteractionValuesPayload.interactionType===t.InteractionType.MouseMove&&!dt.default(e)){var i=this.chart.getGrid(),n=Lt.default(e.x.index,{id:i.bottomScaleId});if(!n)throw new Error("xScale is not defined");var r=this.lastInteractionValuesPayload.values.x?this.lastInteractionValuesPayload.values.x[n.id]:null;this.updateLabel(n,pt.default(r)?r.slice(0,r.length-1):r)}},i.prototype.updateLabel=function(t,e){var n=this.interactionLabelLayer.select("."+i.LAYER_NAME);if(n.empty()&&e)n=this.buildInteractionLabel(this.interactionLabelLayer);else if(!e)return void n.remove();var r=t.formatters[this.formatterName]||t.formatters.tick,a=null==r?void 0:r(e);if(!a)throw new Error("labelContent is not defined");var o=n.select("text").text(a),s=o.node().getBBox(),d=this.chart.getGrid().config().dimension,c=d.height()-s.y;o.attr("transform","translate(0, "+c+")").style("text-anchor","middle");var l=2*(s.height+s.y),u=s.width+l,h=[u/2,d.width()-u/2],p=ti(t,e,.5),f=ai.clampToRange(p,h);n.attr("transform","translate("+f+",0)").select("rect").attrs({transform:"translate(0,"+c+")",x:-u/2,y:s.y,width:u,height:s.height})},i.prototype.destroy=function(){this.chart.getGrid().getLasagna().removeLayer(i.LAYER_NAME),this.destroy$.next(),this.destroy$.complete()},i.prototype.buildInteractionLabel=function(t){var e=t.append("g").attr("class",i.LAYER_NAME);return e.append("rect").attr("class",i.LAYER_NAME+"__rect"),e.append("text").attr("class",i.LAYER_NAME+"__text"),e},i}(hn);In.LAYER_NAME="interaction-label";var An=function(e){function i(){var t=e.apply(this,ge(arguments))||this;return t.isChartInView=!1,t.destroy$=new l.Subject,t}return he(i,e),i.prototype.initialize=function(){var t=this;this.interactionLineLayer=this.chart.getGrid().getLasagna().addLayer({name:"interaction-line",order:900,clipped:!0}),this.chart.getEventBus().getStream(Wt).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.lastInteractionValuesPayload=e.data,t.isChartInView&&t.handleLineUpdate()})),this.chart.getEventBus().getStream(ne).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.isChartInView=e.data.isChartInView,t.isChartInView&&t.lastInteractionValuesPayload&&t.handleLineUpdate()}))},i.prototype.handleLineUpdate=function(){var e=this.chart.getGrid().scales;if(this.lastInteractionValuesPayload.interactionType===t.InteractionType.MouseMove&&!dt.default(e)){var i=this.chart.getGrid(),n=Lt.default(e.x.index,{id:i.bottomScaleId});if(!n)throw new Error("xScale is not defined");var r=this.lastInteractionValuesPayload.values.x?this.lastInteractionValuesPayload.values.x[n.id]:null;this.updateLine(this.interactionLineLayer,n,r)}},i.prototype.updateLine=function(t,e,n){var r=[];n&&r.push(n);var a=t.selectAll("."+i.LAYER_NAME).data(r),o=function(t){return e.convert(t)},s={class:i.LAYER_NAME,x1:o,y1:0,x2:o,y2:this.chart.getGrid().config().dimension.height()};a.enter().append("line").merge(a).attrs(s),a.exit().remove()},i.prototype.destroy=function(){this.chart.getGrid().getLasagna().removeLayer(i.LAYER_NAME),this.destroy$.next(),this.destroy$.complete()},i}(hn);An.LAYER_NAME="interaction-line";var Tn=function(e){function i(t){var i=e.call(this)||this;return i.mouseInteractiveArea=t,i.destroy$=new l.Subject,i.interactionValuesActive=!0,i}return he(i,e),i.prototype.initialize=function(){var t=this;this.mouseInteractiveArea.active.pipe(u.takeUntil(this.destroy$)).subscribe((function(e){t.chart.getEventBus().getStream(zt).next({data:e})})),this.chart.getEventBus().getStream(zt).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){!e.data&&t.chart.getDataManager().chartSeriesSet&&t.highlightReset()})),this.chart.getEventBus().getStream(Yt).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){return t.interactionValuesActive=e.data})),this.mouseInteractiveArea.interaction.pipe(u.takeUntil(this.destroy$)).subscribe((function(e){var i=t.chart.getGrid().scales;if(!dt.default(i)){if(t.interactionValuesActive){var n=i.x.list,r=i.y.list,a=e.coordinates.x,o=e.coordinates.y,s=ai.getXYValues(n,r,a,o);t.chart.getEventBus().getStream(Wt).next({data:{interactionType:e.type,values:s}})}t.chart.getEventBus().getStream(qt).next({data:{interactionType:e.type,coordinates:e.coordinates}})}}))},i.prototype.update=function(){this.highlightReset()},i.prototype.updateDimensions=function(){this.highlightReset()},i.prototype.destroy=function(){this.destroy$.next(),this.destroy$.complete()},i.prototype.highlightReset=function(){this.chart.getEventBus().getStream(Wt).next({data:{interactionType:t.InteractionType.MouseMove,values:{}}})},i}(hn);function Rn(t,e){for(var i,n,r=t.text(),a=r.split(""),o=t.text("").append("tspan").attr("class","ignore-interaction ellipsis").text("..."),s=t.insert("tspan",":first-child").attr("class","ignore-interaction text").text(r),d=e.ellipsisWidth+2*e.horizontalPadding,c=a.length,l=((null===(i=null==s?void 0:s.node())||void 0===i?void 0:i.getComputedTextLength())||0)+2*e.horizontalPadding;a.length&&(l>e.widthLimit||" "===a[a.length-1]);)a.pop(),s.text(a.join("")),l=d+((null===(n=null==s?void 0:s.node())||void 0===n?void 0:n.getComputedTextLength())||0);a.length===c&&o.remove()}var kn=function(){function t(){this.visible=!0,this.gridTicks=!1,this.tickSize=5,this.tickLabel={horizontalPadding:0,overflowHandler:Rn},this.fit=!1,this._approximateTicks=5,this.padding=0}return Object.defineProperty(t.prototype,"approximateTicks",{get:function(){return this._approximateTicks},set:function(t){this._approximateTicks=parseInt(t,10)},enumerable:!1,configurable:!0}),t}(),Ln=function(t){this.className=t,this.visible=!0},Dn=function(t){function e(){var i=t.call(this)||this;return i.axis={top:new kn,right:new kn,bottom:new kn,left:new kn},i.interactionPlugins=!0,i.dimension.padding=Object.assign({},e.DEFAULT_PADDING),i.dimension.margin=Object.assign({},e.DEFAULT_MARGIN),i.borders.bottom=new Ln("nui-chart-border nui-chart-border--thick"),i.borders.left=new Ln("nui-chart-border nui-chart-border--thick"),i.borders.left.visible=!1,i.axis.left.gridTicks=!0,i.axis.left.tickSize=0,i.axis.left.padding=10,i.axis.right.fit=!0,i.axis.right.tickSize=0,i.axis.right.padding=10,i.axis.bottom.tickLabel.horizontalPadding=5,i}return he(e,t),e}(mn);Dn.DEFAULT_MARGIN={top:0,right:5,bottom:20,left:30},Dn.DEFAULT_PADDING={left:0,right:0,top:5,bottom:5};var Pn=function(e){function i(t){var i=e.call(this)||this;return i.axisX={},i.axisYLeft={},i.axisYRight={},i.gridY={},i.gridX={},i.handleTickLabelOverflowDebounceIndex={},i.isApproximatelyEqual=function(t,e){return Math.abs(t-e)<.1},i.config(t||new Dn),i}return he(i,e),Object.defineProperty(i.prototype,"bottomScaleId",{get:function(){return this._bottomScaleId?this._bottomScaleId:dt.default(this.scales)?void 0:this.scales.x.list[0].id},set:function(t){this._bottomScaleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"leftScaleId",{get:function(){return this._leftScaleId?this._leftScaleId:dt.default(this.scales)?void 0:this.scales.y.list[0].id},set:function(t){this._leftScaleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rightScaleId",{get:function(){return this._rightScaleId},set:function(t){this._rightScaleId=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"scales",{get:function(){return this._scales},set:function(t){var e=this;this._scales=t,this._scales&&Object.keys(this._scales).forEach((function(t){var i,n,r,a=e.config().axis.left;"x"!==t&&"y"!==t||null===(n=null===(i=e._scales[t])||void 0===i?void 0:i.list)||void 0===n||n.filter((function(t){return t instanceof Ui})).forEach((function(t){(null==t?void 0:t.id)===e.leftScaleId?(a=e.config().axis.left,r=Y.axisLeft):(null==t?void 0:t.id)===e.rightScaleId?(a=e.config().axis.right,r=Y.axisRight):(null==t?void 0:t.id)===e.bottomScaleId&&(a=e.config().axis.bottom,r=Y.axisBottom),t.domainCalculator&&!Re(t.domainCalculator)&&a.gridTicks&&(t.__domainCalculatedWithTicks=!0,t.domainCalculator=wn(a,r,t.domainCalculator))}))}))},enumerable:!1,configurable:!0}),i.prototype.config=function(t){return void 0===t?this._config:(this._config=t,this)},i.prototype.build=function(){var t=this;e.prototype.build.call(this),this.config().interactive&&(this.interactiveArea=this.renderingArea),this.buildAxes(this.gridElementsLayer),this.recalculateMargins(this.container);return this.eventBus.getStream(re).pipe(u.takeUntil(t.eventBus.getStream(te))).subscribe((function(e){var i=t.handleSeriesStateChange(e);t.eventBus.getStream(ae).next({data:i})})),this},i.prototype.handleSeriesStateChange=function(t){var e,i,n;if(this.rightScaleId){var r=[{scaleId:this.leftScaleId,element:this.axisYLeft.group},{scaleId:this.rightScaleId,element:null===(n=this.axisYRight)||void 0===n?void 0:n.group}],a=this.calculateAxesStyles(t,r);try{for(var o=pe(r),s=o.next();!s.done;s=o.next()){var d=s.value;d.scaleId&&d.element.attrs(a[d.scaleId])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}return a}},i.prototype.calculateAxesStyles=function(e,i){var n,r,a=e.data.filter((function(e){return e.state===t.RenderState.emphasized&&e.series})).map((function(t){return t.series}));if(a.length>0){var o=St.default(a.map((function(t){return null==t?void 0:t.scales.y})).filter((function(t){return!!t})));if(o.length<=0)return{};var s=function(t){if(t.id===d.leftScaleId||t.id===d.rightScaleId)return{value:i.reduce((function(e,i){return e[i.scaleId]={opacity:t.id===i.scaleId?1:.1},e}),{})}},d=this;try{for(var c=pe(o),l=c.next();!l.done;l=c.next()){var u=s(l.value);if("object"==typeof u)return u.value}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return{}}return i.reduce((function(t,e){return t[e.scaleId]={opacity:1},t}),{})},i.prototype.buildPlugins=function(t){var e=[],i=this.config();return i.interactive&&e.push(new Tn(new En(this.getLasagna().getContainer(),this.getInteractiveArea(),i.cursor,i.dimension.margin))),i.interactionPlugins&&(e.push(new An),e.push(new In)),e},i.prototype.update=function(){return e.prototype.update.call(this),this.updateAxes(),this.handleMarginUpdate(),this},i.prototype.drawTicks=function(t,e,i,n){if(t.visible){var r=n(i.d3Scale).ticks(t.approximateTicks).tickSize(0).tickFormat(i.formatters.tick);e.labelGroup.call(r);var a=void 0;i instanceof Hi?a=n(i.copyToLinear().d3Scale).tickSize(t.tickSize).tickValues(i.bandTicks()).tickFormat((function(){return""})):(a=n(i.d3Scale).tickSize(t.tickSize).tickFormat((function(){return""}))).ticks(t.approximateTicks),e.tickGroup.call(a),this.adjustAxisTicks(e.labelGroup,i)}else e.labelGroup.selectAll("*").remove(),e.tickGroup.selectAll("*").remove()},i.prototype.drawGrids=function(t,e,i,n,r){var a=i(n.d3Scale).tickSize(r).tickFormat((function(){return""})).ticks(t.approximateTicks);if(t.gridTicks){var o=e.tickGroup.call(a);o.selectAll(".tick line").classed("nui-zero-line",(function(t){return 0===t}))}else e.tickGroup.selectAll("*").remove()},i.prototype.updateRanges=function(){if(dt.default(this.scales))return this;var t=this.config().dimension,i=t.padding;return this.scales.x&&tt.default(this.scales.x.list,(function(e){e.range([i.left,t.width()-i.right])})),this.scales.y&&tt.default(this.scales.y.list,(function(e){e.range([t.height()-i.bottom,i.top])})),e.prototype.updateRanges.call(this),this},i.prototype.updateXAxis=function(){var t=this.bottomScaleId?this.scales.x.index[this.bottomScaleId]:void 0,e=this.config().axis;if(!t)throw new Error("xScale is not defined");this.axisX.group.attr("transform","translate(0, "+this.config().dimension.height()+")"),this.axisX.labelGroup.attr("transform","translate(0, "+e.bottom.tickSize+")"),this.drawTicks(e.bottom,this.axisX,t,Y.axisBottom),this.drawGrids(e.bottom,this.gridX,Y.axisTop,t,this.config().dimension.height()),this.gridX.tickGroup.attr("transform","translate(0, "+this.config().dimension.height()+")")},i.prototype.updateYAxes=function(){var t=this.config().axis,e=this.leftScaleId?this.scales.y.index[this.leftScaleId]:void 0;if(!e)throw new Error("yLeftScale is not defined");if(this.axisYLeft.labelGroup.attr("transform","translate("+(-t.left.tickSize-t.left.padding)+", 0)"),this.drawTicks(t.left,this.axisYLeft,e,Y.axisLeft),this.drawGrids(t.left,this.gridY,Y.axisRight,e,this.config().dimension.width()),this.rightScaleId){var i=this.scales.y.index[this.rightScaleId],n=t.right.padding+this.config().dimension.width()+t.right.tickSize;this.axisYRight.labelGroup.attr("transform","translate("+n+", 0)"),this.axisYRight.tickGroup.attr("transform","translate("+this.config().dimension.width()+", 0)"),this.drawTicks(t.right,this.axisYRight,i,Y.axisRight)}},i.prototype.updateAxes=function(){this.target()&&(this.updateXAxis(),this.updateYAxes())},i.prototype.adjustAxisTicks=function(t,e){var i=[];t.attr("cursor","default"),t.selectAll("g").each((function(){o.select(this).classed("sw-hidden",!1).classed("tick-hidden-text",!1),i.push(this)})),this.filterRepeatedElements(i).forEach((function(t){o.select(t).classed("tick-hidden-text",!0)}));var n=this.selectAllAxisLabels(t);n.forEach((function(t){var i=o.select(t);if(i.select("text").attr("x",0).classed(le,!0),i.classed("pointer-events",!0),i.select("title").empty()){var n=i.data()[0],r=e.formatters.tick?e.formatters.tick(n):n;i.append("title").text(r)}})),this.handleTickLabelOverflow(t,e,n)},i.prototype.handleTickLabelOverflow=function(t,e,n){var r,a=this,s=this.config().axis;if(e.id!==this.bottomScaleId||!e.isContinuous()&&s.bottom.tickLabel.overflowHandler){if(e.id===this.rightScaleId||e.id===this.leftScaleId)this.getElementsToHide(n,this._config.dimension.height(),!1).forEach((function(t){o.select(t).classed("sw-hidden",!0)}));var d,c=this.config().dimension.margin,l=0,u=0,h=!1,p=!1,f=s.right.tickLabel.maxWidth,g=s.left.tickLabel.maxWidth;if(e.id===this.bottomScaleId){var v=s.bottom.tickLabel.maxWidth,y=e.bandwidth?e.bandwidth():this.getTickDistance(n);l=rt.default(v)?y:y>v?v:y,u=s.bottom.tickLabel.horizontalPadding,d=s.bottom.tickLabel.overflowHandler}else if(e.id!==this.rightScaleId||s.right.fit)if(e.id!==this.leftScaleId||s.left.fit)if(e.id===this.rightScaleId&&s.right.fit&&!rt.default(f))l=f,u=s.right.tickLabel.horizontalPadding,d=s.right.tickLabel.overflowHandler,p=!0;else{if(e.id!==this.leftScaleId||!s.left.fit||rt.default(g))return;l=g,u=s.left.tickLabel.horizontalPadding,d=s.left.tickLabel.overflowHandler,h=!0}else{var m=c.left-s.left.padding-s.left.tickSize;l=rt.default(g)?m:m>g?g:m,u=s.left.tickLabel.horizontalPadding,d=s.left.tickLabel.overflowHandler}else{var b=c.right-s.right.padding-s.right.tickSize;l=rt.default(f)?b:b>f?f:b,u=s.right.tickLabel.horizontalPadding,d=s.right.tickLabel.overflowHandler}if(d){var S=0;if(t.select(".sample-ellipsis").empty()){var x=t.append("text"),_=x.classed("sample-ellipsis",!0).attr("opacity",0).append("tspan").text("...");S=(null===(r=_.node())||void 0===r?void 0:r.getComputedTextLength())||0,x.remove()}this.handleTickLabelOverflowDebounceIndex[e.id]&&(clearTimeout(this.handleTickLabelOverflowDebounceIndex[e.id]),this.handleTickLabelOverflowDebounceIndex[e.id]=null),t.classed("tick-hidden-text",!0),n.forEach((function(t){o.select(t).classed("pointer-events",!1)})),this.handleTickLabelOverflowDebounceIndex[e.id]=setTimeout((function(){n.forEach((function(t){var e=o.select(t);e.select("text").call(d,{widthLimit:l,horizontalPadding:u,ellipsisWidth:S}),e.classed("pointer-events",!0)}));var e=a._config.dimension.marginLocked;e&&(p||h)&&(a.handleMarginUpdate(),e.right=p,e.left=h),t.classed("tick-hidden-text",!1)}),i.TICK_LABEL_OVERFLOW_DEBOUNCE_INTERVAL)}}else{this.getElementsToHide(n,this._config.dimension.width(),!0).forEach((function(t){var e=o.select(t);e.classed("tick-hidden-text",!0),e.classed("pointer-events",!1)}))}},i.prototype.selectAllAxisLabels=function(t){var e=[];return t.selectAll("g:not(.tick-hidden-text)").each((function(){e.push(this)})),e},i.prototype.getOuterWidthDimensionCorrection=function(){return this.config().axis.bottom.visible?xn.TICK_DIMENSION_CORRECTION:0},i.prototype.handleMarginUpdate=function(){var t=kt.default(this._config.dimension.margin);this.recalculateMargins(this.container),this.reconcileMarginsWithDebounce(t)},i.prototype.hasRightYAxis=function(){var t;return this.config().axis.right.visible&&(null===(t=this.rightScaleId)||void 0===t?void 0:t.length)>0},i.prototype.buildAxes=function(t){this.gridY.tickGroup=t.append("g").classed("sw-axis sw-axis-grid sw-axis-gridY",!0),this.gridX.tickGroup=t.append("g").classed("sw-axis sw-axis-grid sw-axis-gridX",!0),this.axisX.group=t.append("g").classed("sw-axis sw-axis-x",!0),this.axisX.tickGroup=this.axisX.group.append("g").classed("sw-axis sw-axis-x sw-axis-x-ticks",!0),this.axisX.labelGroup=this.axisX.group.append("g").classed("sw-axis sw-axis-x sw-axis-x-labels",!0),this.axisYLeft.group=t.append("g").classed("sw-axis sw-axis-y sw-axis-y-left",!0),this.axisYLeft.tickGroup=this.axisYLeft.group.append("g").classed("sw-axis sw-axis-y sw-axis-y-ticks",!0),this.axisYLeft.labelGroup=this.axisYLeft.group.append("g").classed("sw-axis sw-axis-y sw-axis-y-labels",!0),this.axisYRight.group=t.append("g").classed("sw-axis sw-axis-y sw-axis-y-right",!0),this.axisYRight.tickGroup=this.axisYRight.group.append("g").classed("sw-axis sw-axis-y sw-axis-y-ticks",!0),this.axisYRight.labelGroup=this.axisYRight.group.append("g").classed("sw-axis sw-axis-y sw-axis-y-labels",!0)},i.prototype.filterRepeatedElements=function(t){var e=[t[0]];return t.reduce((function(t,i){var n=o.select(i).text();return n!==t&&e.push(i),n}),t[0]&&o.select(t[0]).text()),t.filter((function(t){return-1===e.indexOf(t)}))},i.prototype.getElementsToHide=function(t,e,i){var n,r=i?"width":"height",a=this.getTextMeasurement(t,r)<e,o=!!i&&this.getMaxTextWidth(t)<this.getTickDistance(t);return(i?a&&o:a)?[]:(n=this.elementsFiltering(t,e,r),t.filter((function(t){return-1===n.indexOf(t)})))},i.prototype.elementsFiltering=function(t,e,i){var n,r=this,a=2,o=function(t){return"width"===i?r.getMaxTextWidth(t)>r.getTickDistance(t):r.getTextMeasurement(t,i)>e};do{if(n=t.filter((function(t,e){return e%a==0})),a++,1===n.length&&o(n))break}while(o(n));return n},i.prototype.getTextMeasurement=function(t,e){var i="width"===e?5:0;return t.reduce((function(t,n){return t+n.getBoundingClientRect()[e]+i}),0)},i.prototype.getMaxTextWidth=function(t){return 0===t.length?0:Math.max.apply(null,t.map((function(t){return t.getBoundingClientRect().width})))},i.prototype.getTickDistance=function(t){if(0===t.length)return 0;var e=1/0;return t.map((function(t){var e=t.getAttribute("transform");if(it.default(e))throw new Error("tick transform is not defined");return parseFloat(e.slice(e.indexOf("(")+1,e.indexOf(",")))})).reduce((function(t,i){var n=i-t;return n<e&&(e=n),i})),e},i.prototype.recalculateMargins=function(t){var e,i,n;if(t){var r=this._config.dimension,a=this.config().axis,o=r.outerWidth(),s=r.outerHeight();!(null===(e=r.marginLocked)||void 0===e?void 0:e.left)&&a.left.fit&&a.left.visible&&(r.margin.left=this.getMaxTextWidth(this.selectAllAxisLabels(this.axisYLeft.labelGroup))+a.left.tickSize+a.left.padding),!(null===(i=r.marginLocked)||void 0===i?void 0:i.right)&&a.right.fit&&this.hasRightYAxis()&&(r.margin.right=this.getMaxTextWidth(this.selectAllAxisLabels(this.axisYRight.labelGroup))+a.right.tickSize+a.right.padding);var d=this.bottomScaleId&&this.scales?null===(n=this.scales.x)||void 0===n?void 0:n.index[this.bottomScaleId]:void 0;a.bottom.fit&&a.bottom.visible&&((null==d?void 0:d.isContinuous())||!a.bottom.tickLabel.overflowHandler)&&this.fitBottomAxis(r);var c=r.margin.top,l=r.margin.bottom;r.margin.top=c,r.margin.bottom=l,r.outerWidth(o),r.outerHeight(s);var u=this.config().dimension.margin.left,h=this.config().dimension.margin.top;t.attr("transform","translate("+u+", "+h+")")}},i.prototype.fitBottomAxis=function(t){var e,i,n,r=null===(i=null===(e=this.scales)||void 0===e?void 0:e.x)||void 0===i?void 0:i.list[0].d3Scale;if(r){var a=0,o=0,s=this.axisX.labelGroup.select(".tick:not(.tick-hidden-text):last-child text").node();if(s){a=s.getBoundingClientRect().width,o=null!==(n=r(s.innerHTML))&&void 0!==n?n:0;var d=r.range()[1],c=a/2-Math.abs(d-o)/2;t.margin.right=c>0?c:0}}},i.prototype.reconcileMarginsWithDebounce=function(t){var e=this;this.reconcileMarginsDebounce&&(clearTimeout(this.reconcileMarginsDebounce),this.reconcileMarginsDebounce=null),this.reconcileMarginsDebounce=setTimeout((function(){var i;e.areMarginsApproximatelyEqual(t,e._config.dimension.margin)||null===(i=e.updateChartDimensionsSubject)||void 0===i||i.next()}),100)},i.prototype.areMarginsApproximatelyEqual=function(t,e){return this.isApproximatelyEqual(t.top,e.top)&&this.isApproximatelyEqual(t.right,e.right)&&this.isApproximatelyEqual(t.bottom,e.bottom)&&this.isApproximatelyEqual(t.left,e.left)},i}(xn);function On(e,i){void 0===i&&(i=t.StandardLinearGaugeThickness.Large);var n=new Dn;return n.interactionPlugins=!1,n.disableRenderAreaHeightCorrection=!0,n.axis.bottom.visible=!1,n.axis.bottom.gridTicks=!1,n.axis.left.visible=!1,n.axis.left.gridTicks=!1,n.borders.left.visible=!1,n.borders.bottom.visible=!1,n.dimension=new yn,e===t.GaugeMode.Vertical?(n.dimension.autoWidth=!1,n.dimension.width(i)):(n.dimension.autoHeight=!1,n.dimension.height(i)),n}Pn.TICK_LABEL_OVERFLOW_DEBOUNCE_INTERVAL=200;var Mn=function(){function e(){}return e.createChartAssist=function(i,n,r){var a,o,s,d=n===t.GaugeMode.Donut?Cn():new Pn(On(n,i.linearThickness)),c=d.config(),l=new fn(d),u=!dt.default(null===(a=i.thresholds)||void 0===a?void 0:a.definitions)&&!(null===(o=i.thresholds)||void 0===o?void 0:o.disableMarkers);if(n===t.GaugeMode.Donut)return u&&(l.addPlugin(null!=r?r:new gn),c.dimension.margin=e.getMarginForLabelClearance(i,n,c.dimension.margin)),new nn(l,on);if(u){var h=!!(null===(s=i.labels)||void 0===s?void 0:s.flipped);l.addPlugin(null!=r?r:new vn({flippedLabels:h})),c.dimension.margin=e.getMarginForLabelClearance(i,n,c.dimension.margin)}return new nn(l,dn)},e.assembleSeriesSet=function(t,i){var n,r;t.value=null!==(n=t.value)&&void 0!==n?n:0,t.max=null!==(r=t.max)&&void 0!==r?r:0;var a,o=e.clampConfigToRange(t),s=e.generateRenderingAttributes(o,i),d=[];return o.thresholds&&(a=e.generateThresholdSeries(o,s),d.push(a)),d=ge(e.generateQuantityAndRemainderSeriesSet(o,s,null==a?void 0:a.activeThreshold),d)},e.update=function(i,n){var r,a;n.value=null!==(r=n.value)&&void 0!==r?r:0,n.max=null!==(a=n.max)&&void 0!==a?a:0;var o=e.clampConfigToRange(n),s=e.generateThresholdsData(o);return i.map((function(i){var n,r,a;return i.id===ki?Object.assign(Object.assign({},i),{data:[{category:e.DATA_CATEGORY,value:o.value}],activeThreshold:s.activeThreshold,defaultColor:o.defaultQuantityColor||t.StandardGaugeColor.Ok}):i.id===Li?Object.assign(Object.assign({},i),{data:[{category:e.DATA_CATEGORY,value:o.max-o.value}]}):i.id===Di?(i.renderer.config.enabled=!(null===(n=o.thresholds)||void 0===n?void 0:n.disableMarkers),i.renderer.config.markerRadius=null!==(a=null===(r=o.thresholds)||void 0===r?void 0:r.markerRadius)&&void 0!==a?a:t.StandardGaugeThresholdMarkerRadius.Large,Object.assign(Object.assign({},i),s)):i}))},e.createStandardThresholdsConfig=function(e,i){var n;return{definitions:(n={},n[t.StandardGaugeThresholdId.Warning]={id:t.StandardGaugeThresholdId.Warning,value:e,enabled:!0,color:t.StandardGaugeColor.Warning},n[t.StandardGaugeThresholdId.Critical]={id:t.StandardGaugeThresholdId.Critical,value:i,enabled:!0,color:t.StandardGaugeColor.Critical},n),reversed:!1,disableMarkers:!1,markerRadius:t.StandardGaugeThresholdMarkerRadius.Large}},e.getMarginForLabelClearance=function(e,i,n){var r,a,o,s,d,c,l;if(i===t.GaugeMode.Donut){var u=null!==(o=null===(a=e.labels)||void 0===a?void 0:a.clearance)&&void 0!==o?o:30,h=Math.max.apply(Math,ge(Object.values(n),[u]));return{top:h,right:h,bottom:h,left:h}}var p=!!(null===(s=e.labels)||void 0===s?void 0:s.flipped);l=i===t.GaugeMode.Horizontal?p?"top":"bottom":p?"left":"right";var f=null!==(c=null===(d=e.labels)||void 0===d?void 0:d.clearance)&&void 0!==c?c:Pi[l],g=Math.max(n[l],f);return Object.assign(Object.assign({},n),((r={})[l]=g,r))},e.generateQuantityAndRemainderSeriesSet=function(i,n,r){return e.generateQuantityAndRemainderData(i).map((function(e){var a=n.quantityAccessors,o=n.remainderAccessors,s=n.scales,d=n.mainRenderer;return a.data&&(a.data.color=function(t,e,i,n){return n.activeThreshold?n.activeThreshold.color:n.defaultColor}),o.data&&(o.data.color=function(){return i.remainderColor||t.StandardGaugeColor.Remainder}),e.id===ki&&(e.activeThreshold=r,e.defaultColor=i.defaultQuantityColor||t.StandardGaugeColor.Ok),Object.assign(Object.assign({},e),{accessors:e.id===ki?a:o,scales:s,renderer:d})}))},e.generateThresholdSeries=function(t,i){var n=i.quantityAccessors,r=i.scales,a=i.thresholdsRenderer;return Object.assign(Object.assign({},e.generateThresholdsData(t)),{accessors:n,scales:r,renderer:a,excludeFromArcCalculation:!0,preprocess:!1})},e.generateRenderingAttributes=function(t,i){var n=e.generateRenderingTools(t,i);return{quantityAccessors:n.quantityAccessorFunction(),remainderAccessors:n.remainderAccessorFunction(),mainRenderer:n.mainRendererFunction(),thresholdsRenderer:n.thresholdsRendererFunction(),scales:n.scaleFunction()}},e.generateRenderingTools=function(e,i){var n,r,a,o,s={enabled:!(null===(r=e.thresholds)||void 0===r?void 0:r.disableMarkers),markerRadius:null===(a=e.thresholds)||void 0===a?void 0:a.markerRadius},d=null===(o=e.labels)||void 0===o?void 0:o.formatter;return((n={})[t.GaugeMode.Donut]={mainRendererFunction:function(){return new Ki({strokeWidth:0,enableSeriesHighlighting:!1})},thresholdsRendererFunction:function(){return new Ji(s)},quantityAccessorFunction:function(){return new Wi},remainderAccessorFunction:function(){return new Wi},scaleFunction:function(){var t=tn();return t.r.formatters["gauge-label"]=d,t}},n[t.GaugeMode.Horizontal]={mainRendererFunction:function(){return new si({padding:0,strokeWidth:0,enableMinBarThickness:!1})},thresholdsRendererFunction:function(){return new Yi(s)},quantityAccessorFunction:function(){return new Ke},remainderAccessorFunction:function(){return new Ke},scaleFunction:function(){var t=Vi({horizontal:!0});return t.x.formatters["gauge-label"]=d,t}},n[t.GaugeMode.Vertical]={mainRendererFunction:function(){return new si({padding:0,strokeWidth:0,enableMinBarThickness:!1})},thresholdsRendererFunction:function(){return new Yi(s)},quantityAccessorFunction:function(){return new Gi},remainderAccessorFunction:function(){return new Gi},scaleFunction:function(){var t=Vi();return t.y.formatters["gauge-label"]=d,t}},n)[i]},e.generateQuantityAndRemainderData=function(t){return[{id:ki,data:[{category:e.DATA_CATEGORY,value:t.value}]},{id:Li,data:[{category:e.DATA_CATEGORY,value:t.max-t.value}]}]},e.generateThresholdsData=function(t){if(!t.thresholds)throw new Error("Thresholds are not defined in the gauge config. Unable to generate threshold data.");var i=e.prepareThresholdsData(t),n=i.thresholds,r=i.activeThreshold;return{id:Di,data:ge(n,[{id:"max",enabled:!0,category:e.DATA_CATEGORY,value:t.max,color:""}]),activeThreshold:r}},e.prepareThresholdsData=function(t){var i,n,r=Object.values((null===(i=t.thresholds)||void 0===i?void 0:i.definitions)||[]).filter((function(t){return t.enabled})).map((function(i){var n;return Object.assign(Object.assign({},i),{category:e.DATA_CATEGORY,hit:(null===(n=t.thresholds)||void 0===n?void 0:n.reversed)?i.value<t.value:i.value<=t.value})})).sort((function(t,e){return t.value-e.value})),a=(null===(n=t.thresholds)||void 0===n?void 0:n.reversed)?null==r?void 0:r.find((function(t){return!rt.default(t.hit)&&!t.hit})):null==r?void 0:r.slice().reverse().find((function(t){return t.hit}));return{thresholds:r,activeThreshold:a}},e.clampConfigToRange=function(t){var e,i=t.value;t.value>t.max&&(console.warn("Configured gauge value "+t.value+" is greaterthan configured max "+t.max+". Clamping value to "+t.max+"."),i=t.max),t.value<0&&(console.warn("Configured gauge value "+t.value+" is less than 0. Clamping value to 0."),i=0);var n=(null===(e=t.thresholds)||void 0===e?void 0:e.definitions)||{};return Object.keys(n||{}).forEach((function(e){var i=n[e];i&&(i.value>t.max&&(console.warn("Configured threshold value "+i.value+" for threshold "+e+" is greaterthan configured max "+t.max+". Clamping value to "+t.max+"."),i.value=t.max),i.value<0&&(console.warn("Configured threshold value "+i.value+" is less than 0. Clamping value to 0."),i.value=0))})),Object.assign(Object.assign({},t),{thresholds:Object.assign(Object.assign({},t.thresholds),{definitions:n}),value:i})},e}();Mn.DATA_CATEGORY="gauge";var Nn=function(){function t(t,e){var i=this;this.valueMap=t,this.defaultValue=e,this.get=function(t){return i.valueMap[t]||i.defaultValue},this.reset()}return t.prototype.reset=function(){},t}(),Gn=function(){function t(t){this.element=document.createElement("path"),this.setAttributes({class:"nui-chart-element-marker nui-chart--path__outline","vector-effect":"non-scaling-stroke",d:t})}return t.prototype.setColor=function(t){this.setAttributes({fill:t})},t.prototype.setAttributes=function(t){var e,i;try{for(var n=pe(Object.keys(t)),r=n.next();!r.done;r=n.next()){var a=r.value;this.element.setAttribute(a,t[a])}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}this.updateSvg()},t.prototype.getSvg=function(){return this.svg},t.prototype.updateSvg=function(){this.svg=this.element.outerHTML},t}(),jn=function(t){function e(e){var i=t.call(this,e)||this;return i.formatters.tick=function(t){return t},i}return he(e,t),e.prototype.createD3Scale=function(){return G.scalePoint()},e.prototype.convert=function(t){return this._d3Scale(t)},e.prototype.invert=function(t){var e=this,i=this._d3Scale.domain(),n=i.map(this._d3Scale).slice(0,-1).map((function(t){return t+e._d3Scale.step()/2}));return i[k.bisect(n,t)]},e.prototype.round=function(t){return t?(this._d3Scale.round(t),this):this._d3Scale.round()},e.prototype.padding=function(t){return this._d3Scale.padding(t),this},e.prototype.align=function(t){return t?(this._d3Scale.align(t),this):this._d3Scale.align()},e.prototype.bandwidth=function(){return this._d3Scale.bandwidth()},e.prototype.isContinuous=function(){return!1},e}(Fi),Bn=function(t,e){return new Intl.DateTimeFormat(Dt.default.locale(),e).format(t)},Fn=function(t){return Bn(t,{hour:"numeric",minute:"2-digit",second:"2-digit"})},Un=function(t){return Bn(t,{hour:"numeric",minute:"2-digit"})},Hn=function(t){return Bn(t,{month:"short",day:"2-digit"})},Vn=function(t){return Bn(t,{month:"short"})},zn=function(t){return Bn(t,{year:"numeric"})},Yn=Hn,Wn=Vn,qn=zn,Xn=function(t){return(X.timeMinute(t)<t?Fn:X.timeDay(t)<t?Un:X.timeMonth(t)<t?Hn:X.timeYear(t)<t?Vn:zn)(t)},$n=function(t){function e(e){var i=t.call(this,e)||this;return i.formatters.tick=Xn,i}return he(e,t),e.prototype.createD3Scale=function(){return G.scaleTime()},e.prototype.convert=function(t){return this._d3Scale(t)},e.prototype.invert=function(t){var e=this._d3Scale.invert(t);return isNaN(e.getTime())?void 0:e},e.prototype.isContinuous=function(){return!0},e.prototype.isDomainValid=function(){return-1===this.domain().findIndex((function(t){return isNaN(t.getTime())}))},e}(Fi);function Kn(t){var e=new Date(t.getFullYear(),0,1).getTimezoneOffset(),i=new Date(t.getFullYear(),6,1).getTimezoneOffset();return Math.max(e,i)!==t.getTimezoneOffset()}var Zn=function(t){function e(e,i){var n=t.call(this,i)||this;return n.defaultTitleFormatter=function(t){var e=n.interval().asDays(),i=Kn(t),r=Kn(n.domain()[0]),a=!i&&r,o=0;(a||i&&!r)&&e>=1&&(o=a?36e5:-36e5);var s=new Date(t.getTime()+o),d=e>=1?Dt.default(s).add(e,"days").toDate():Dt.default(s).add(n.interval()).toDate();return Xn(s)+" - "+Xn(d)},n.interval(e),n._bandScale=G.scaleBand(),n.formatters.title=n.defaultTitleFormatter,n}return he(e,t),e.prototype.interval=function(t){return t?(this._interval=t,this):this._interval},e.prototype.domain=function(e){if(e){if(0===e.length||e.length%2!=0)throw new Error("TimeIntervalScale domain has to be defined as a pair of [from, to] time values.");var i=et.default(e,Ae),n=[];if(!i)for(var r=0;r+1<e.length;r+=2)n.push.apply(n,ge(this.getBandsForInterval(e[r],e[r+1])));this._bandScale.domain(n);var a=i?e:[e[0],Dt.default(e[1]).add(this.interval()).toDate()];return t.prototype.domain.call(this,a)}return t.prototype.domain.call(this)},e.prototype.range=function(e){return e?(this._bandScale.range(e),t.prototype.range.call(this,e)):t.prototype.range.call(this)},e.prototype.getBands=function(){return this._bandScale.domain()},e.prototype.convert=function(e,i){void 0===i&&(i=.5);var n=this.truncToInterval(e,this.interval());if(!n)throw new Error("Could not convert interval");var r=this._bandScale(n);return"number"==typeof r?r+i*this.bandwidth():t.prototype.convert.call(this,e)},e.prototype.invert=function(e){var i=t.prototype.invert.call(this,e);return this.truncToInterval(i,this.interval())},e.prototype.bandwidth=function(){return this._bandScale.bandwidth()},e.prototype.truncToInterval=function(t,e,i){if(void 0===i&&(i=!1),!t)return t;var n=Kn(t),r=i?n:Kn(this.domain()[0]),a=r&&!n,o=!r&&n,s=this.interval().asDays()>=1&&o?$.duration(1,"hour").asMilliseconds():0,d=new Date(t.getTime()+s),c=0;(a||o)&&(c=a?-60:60);var l=6e4*(d.getTimezoneOffset()+c),u=d.getTime()-l,h=u%e.asMilliseconds();return 0===h?d:new Date(u-h+l)},e.prototype.isContinuous=function(){return!0},e.prototype.getBandsForInterval=function(t,e){var i=[],n=this.truncToInterval(t,this.interval(),!0);if(!n)throw new Error("Could not get bands for interval");for(var r=this.interval().asMilliseconds(),a=this.interval().asDays(),o=Kn(t),s=Kn(e),d=!o&&s?$.duration(1,"hour").asMilliseconds():0,c=a>=1?new Date(e.getTime()+d):e;n<=c;)i.push(n),n=new Date(n.getTime()+r);return i},e}($n),Qn=function(){function t(t){}return t.prototype.convert=function(){},t.prototype.invert=function(){},Object.defineProperty(t.prototype,"d3Scale",{get:function(){},enumerable:!1,configurable:!0}),t.prototype.range=function(t){},t.prototype.domain=function(t){},t.prototype.fixDomain=function(t){return null},t.prototype.isContinuous=function(){return!1},t.prototype.isDomainValid=function(){return!0},t.prototype.reverse=function(){},t.prototype.reversed=function(t){},t}(),Jn=function(t){this.id=t.id,this.data=t.data,this.name=t.name,this.accessors=t.accessors||{data:{category:function(t){return t.name},value:function(t){return t.value}},series:{}}},tr=function(t){function e(){var e=t.call(this)||this;return e.dimension.padding.bottom=2,e}return he(e,t),e}(Dn),er=function(t){function e(){var e=t.call(this)||this;return e.interactionPlugins=!1,e.axis.left.gridTicks=!0,e.axis.left.tickSize=5,e.axis.bottom.gridTicks=!1,e.axis.left.fit=!0,e.axis.bottom.tickSize=5,e.axis.left.tickSize=0,e.dimension.margin.right=0,e.dimension.padding.bottom=2,e}return he(e,t),e}(Dn),ir=function(t){function e(){var e=t.call(this)||this;return e.interactionPlugins=!1,e.axis.left.gridTicks=!1,e.axis.left.tickSize=0,e.axis.bottom.gridTicks=!0,e.axis.left.fit=!0,e.axis.bottom.fit=!0,e.axis.bottom.tickSize=0,e.axis.left.tickSize=5,e.dimension.padding.left=2,e.borders.left.visible=!0,e.borders.bottom.visible=!1,e}return he(e,t),e}(Dn),nr=function(t){function e(e){void 0===e&&(e={showBottomAxis:!0});var i=t.call(this)||this;return i.interactive=!0,i.interactionPlugins=!1,e.showBottomAxis||(i.axis.bottom.visible=!1,i.borders.bottom.visible=!1),i.axis.left.visible=!1,i.axis.left.gridTicks=!1,i.borders.left.visible=!1,i.dimension.autoHeight=!1,i.dimension.margin.top=0,e.showBottomAxis||(i.dimension.margin.bottom=0),i.dimension.height(30),i}return he(e,t),e}(Dn);function rr(t,e,i){return void 0===t&&(t=new Dn),void 0===e&&(e=!1),void 0===i&&(i=!0),t.interactionPlugins=!1,t.axis.left.visible=!1,t.axis.left.gridTicks=!1,t.dimension.margin.left=5,t.dimension.margin.right=5,t.dimension.margin.bottom=e?t.dimension.margin.bottom:0,t.dimension.padding.top=5,t.dimension.padding.bottom=5,t.dimension.autoHeight=!1,t.dimension.height(36),i&&(t.borders.top=new Ln),e||(t.borders.bottom.visible=!1),t}var ar=function(t){function e(){var e=t.apply(this,ge(arguments))||this;return e.contentPositionUpdateSubject=new l.Subject,e.contentPosition={top:0,left:0,width:0,height:0},e}return he(e,t),e.prototype.updateDimensions=function(){var t=this.chart.getDataManager().chartSeriesSet.reduce((function(t,e){return e.renderer instanceof Ki&&!rt.default(t)?Math.min(t,e.renderer.getInnerRadius(e.scales.r.range(),e.data.length-1)):t}),1/0);if(rt.default(t))throw new Error("Radius is undefined");this.contentPosition=this.getContentPosition(t),this.contentPositionUpdateSubject.next(this.contentPosition)},e.prototype.destroy=function(){this.contentPositionUpdateSubject.complete()},e.prototype.getContentPosition=function(t){var e=[this.chart.getGrid().config().dimension.outerHeight()/2,this.chart.getGrid().config().dimension.outerWidth()/2];return{top:e[0]-t/Math.sqrt(2),left:e[1]-t/Math.sqrt(2),width:t*Math.sqrt(2),height:t*Math.sqrt(2)}},e}(hn),or=function(e){function i(i){void 0===i&&(i={});var n=e.call(this)||this;return n.config=i,n.updatePositionSubject=new l.Subject,n.openPopoverSubject=new l.Subject,n.closePopoverSubject=new l.Subject,n.popoverTargetPosition={top:0,left:0,width:0,height:0},n.DEFAULT_CONFIG={eventStreamId:Qt,interactionType:t.InteractionType.MouseMove},n.isOpen=!1,n.destroy$=new l.Subject,n.config=mt.default(n.config,n.DEFAULT_CONFIG),n}return he(i,e),i.prototype.initialize=function(){var t=this;this.chart.getEventBus().getStream(this.config.eventStreamId).pipe(u.takeUntil(this.destroy$)).subscribe((function(e){var i,n;if(e.data.interactionType===t.config.interactionType){var r=null!==(n=e.data.dataPoints)&&void 0!==n?n:((i={})[e.data.dataPoint.seriesId]=e.data.dataPoint,i);t.processDataPoints(r)}}))},i.prototype.destroy=function(){this.updatePositionSubject&&this.updatePositionSubject.complete(),this.openPopoverSubject&&this.openPopoverSubject.complete(),this.closePopoverSubject&&this.closePopoverSubject.complete(),this.destroy$&&(this.destroy$.next(),this.destroy$.complete())},i.prototype.getAbsolutePosition=function(t){var e,i,n=null===(i=null===(e=this.chart.target)||void 0===e?void 0:e.node())||void 0===i?void 0:i.parentNode;if(!n)throw new Error("Chart parent node is not defined");var r=Math.min.apply(Math,ge(t.map((function(t){return t.position.x})))),a=n.offsetLeft+this.chart.getGrid().config().dimension.margin.left+r;return{top:n.offsetTop+this.chart.getGrid().config().dimension.margin.top,left:a,height:n.offsetHeight,width:Math.max.apply(Math,ge(t.map((function(t){return t.position.x+(t.position.width||0)}))))-r}},i.prototype.processDataPoints=function(t){var e=this,i=Pt.default(t,(function(t){return t.index>=0&&t.position})),n=ht.default(i);n.length>0?(this.popoverTargetPosition=this.getAbsolutePosition(n),this.dataPoints=i,setTimeout((function(){e.updatePositionSubject.next(e.popoverTargetPosition),e.isOpen||(e.isOpen=!0,e.openPopoverSubject.next())}))):setTimeout((function(){e.closePopoverSubject.next(),e.isOpen=!1}))},i}(hn),sr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return he(e,t),e.prototype.getAbsolutePosition=function(t){var e,i,n=null===(i=null===(e=this.chart.target)||void 0===e?void 0:e.node())||void 0===i?void 0:i.parentNode;if(!n)throw new Error("Chart parent node is not defined");var r=Math.min.apply(Math,ge(t.map((function(t){return t.position.x})))),a=Math.min.apply(Math,ge(t.map((function(t){return t.position.y})))),o=n.offsetLeft+this.chart.getGrid().config().dimension.margin.left+r+this.chart.getGrid().config().dimension.width()/2;return{top:n.offsetTop+a+this.chart.getGrid().config().dimension.height()/2,left:o,height:0,width:0}},e}(or),dr=function(t){return[{originX:"end",originY:"top",overlayX:"start",overlayY:"center",offsetX:t},{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:-t}]},cr=function(t){return[{originX:"end",originY:"top",overlayX:"center",overlayY:"bottom",offsetY:-t},{originX:"end",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:t}]},lr=function(e){function i(t,i){void 0===t&&(t=10),void 0===i&&(i="right");var n=e.call(this)||this;return n.tooltipPositionOffset=t,n.orientation=i,n.dataPointPositions={},n.showSubject=new l.Subject,n.hideSubject=new l.Subject,n.isChartInView=!1,n.destroy$=new l.Subject,n.seriesVisibilityMap={},"right"===i?n.overlaySetup=dr(t):"top"===i&&(n.overlaySetup=cr(t)),n}return he(i,e),i.prototype.initialize=function(){var e=this;this.chart.getEventBus().getStream(Qt).pipe(u.takeUntil(this.destroy$)).subscribe((function(i){if(i.data.interactionType===t.InteractionType.MouseMove&&e.isChartInView){var n=i.data.dataPoints;e.processHighlightedDataPoints(n)}})),this.chart.getEventBus().getStream(re).pipe(u.takeUntil(this.destroy$)).subscribe((function(i){i.data.forEach((function(i){e.seriesVisibilityMap[i.seriesId]=i.state!==t.RenderState.hidden}))})),this.chart.getEventBus().getStream(ne).pipe(u.takeUntil(this.destroy$)).subscribe((function(t){e.isChartInView=t.data.isChartInView,e.isChartInView||e.hideSubject.next()}))},i.prototype.destroy=function(){this.destroy$.next(),this.destroy$.complete()},i.prototype.processHighlightedDataPoints=function(t){var e,i,n=this,r=Pt.default(t,(function(t){return t.index>=0&&t.position&&!1!==n.seriesVisibilityMap[t.seriesId]}));if(0!==ht.default(r).length){this.dataPoints=r;var a=null===(i=null===(e=this.chart.target)||void 0===e?void 0:e.node())||void 0===i?void 0:i.parentNode;if(!a)throw new Error("Chart parent node is not defined");var o=a.getBoundingClientRect(),s=a.offsetParent.getBoundingClientRect(),d={x:o.left-s.left,y:o.top-s.top};tt.default(Object.keys(this.dataPoints),(function(t){var e=n.dataPoints[t],i=n.chart.getDataManager().getChartSeries(e.seriesId),r=n.getTooltipPosition(e,i);n.dataPointPositions[t]=n.getAbsolutePosition(r,d)})),this.showSubject.next()}else this.hideSubject.next()},i.prototype.getTooltipPosition=function(t,e){var i,n;if(!t.position)throw new Error("Unable to get tooltip position");return{x:t.position.x,y:t.position.y,height:(null===(i=t.position)||void 0===i?void 0:i.height)||1,width:(null===(n=t.position)||void 0===n?void 0:n.width)||1,overlayPositions:this.overlaySetup}},i.prototype.getAbsolutePosition=function(t,e){return Object.assign({},t,{x:e.x+this.chart.getGrid().config().dimension.margin.left+t.x,y:e.y+this.chart.getGrid().config().dimension.margin.top+t.y})},i}(hn),ur=[{x:"end",y:"center"},{x:"end",y:"bottom"},{x:"center",y:"bottom"},{x:"start",y:"bottom"},{x:"start",y:"center"},{x:"start",y:"top"},{x:"center",y:"top"},{x:"end",y:"top"}],hr={start:"end",end:"start",top:"bottom",bottom:"top"},pr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return he(e,t),e.prototype.getTooltipPosition=function(t,e){var i=t.data,n=e.renderer,r=e.scales.r,a=n.getOuterRadius(r.range(),t.index)+this.tooltipPositionOffset,o=(i.startAngle+i.endAngle)/2-Math.PI/2;return{x:Math.cos(o)*a,y:Math.sin(o)*a,width:0,height:0,overlayPositions:[this.getOverlayPosition(o)]}},e.prototype.getAbsolutePosition=function(e,i){var n=t.prototype.getAbsolutePosition.call(this,e,i);return n.x+=this.chart.getGrid().config().dimension.width()/2,n.y+=this.chart.getGrid().config().dimension.height()/2,n},e.prototype.getOverlayPosition=function(t){var e=this.getSectionIndex(t,8);return{originX:ur[e].x,originY:ur[e].y,overlayX:this.opposite(ur[e].x),overlayY:this.opposite(ur[e].y)}},e.prototype.getSectionIndex=function(t,e){for(var i=Math.round(t/(2*Math.PI/e))%e;i<0;)i+=e;return i},e.prototype.opposite=function(t){return hr[t]||t},e}(lr),fr=function(t){function e(e){return t.call(this)||this}return he(e,t),e}(lr),gr=function(e){function i(n){var r;void 0===n&&(n={});var a=e.call(this)||this;return a.config=n,a.destroy$=new l.Subject,a.brushStart=function(t){rt.default(a.brushStartX)&&(a.chart.getEventBus().getStream(Yt).next({data:!1}),a.brushStartX=t)},a.brushMove=function(t){if(!rt.default(a.brushStartX)){var e=[a.brushStartX,t].sort((function(t,e){return t-e}));a.brush.move(a.brushElement,e)}},a.brushEnd=function(t){if(!rt.default(a.brushStartX)){var e=[a.brushStartX,t].sort((function(t,e){return t-e}));a.brushStartX=void 0,a.chart.getEventBus().getStream(Yt).next({data:!0}),a.brush.move(a.brushElement,null);var i=a.grid.scales.x.list;if(i&&e[0]!==e[1]){var n=0,r=a.grid.config();r.disableRenderAreaWidthCorrection||e[1]!==r.dimension.width()-xn.RENDER_AREA_WIDTH_CORRECTION||(n=xn.RENDER_AREA_WIDTH_CORRECTION);var o=i.reduce((function(t,i){return t[i.id]=[e[0],e[1]+n].map((function(t){return i.invert(t)})),t}),{});a.chart.getEventBus().getStream(ee).next({data:o})}}},a.config=mt.default(a.config,i.DEFAULT_CONFIG),a.interactionHandlerMap=((r={})[t.InteractionType.MouseDown]=a.brushStart,r[t.InteractionType.MouseMove]=a.brushMove,r[t.InteractionType.MouseUp]=a.brushEnd,r),a}return he(i,e),i.prototype.initialize=function(){var e=this;this.grid=this.chart.getGrid(),this.zoomBrushLayer=this.grid.getLasagna().addLayer({name:i.LAYER_NAME,order:se[t.RenderLayerName.foreground].order+1,clipped:!0}),this.chart.getEventBus().getStream(qt).pipe(u.takeUntil(this.destroy$)).subscribe((function(t){if(!t.broadcast||e.config.enableExternalEvents){var i=t.data;if(!dt.default(e.grid.scales)&&!dt.default(i.coordinates)&&e.interactionHandlerMap[i.interactionType]){var n=i.coordinates&&i.coordinates.x;e.interactionHandlerMap[i.interactionType](n)}}})),this.brush=Z.brushX(),this.brushElement=this.zoomBrushLayer.append("g").attr("class","brush"),this.chart.getGrid().getInteractiveArea().on("pointerdown",(function(){return o.event.target.setPointerCapture(o.event.pointerId)})).on("pointerup",(function(){return o.event.target.releasePointerCapture(o.event.pointerId)}))},i.prototype.updateDimensions=function(){var t=this.grid.config().dimension;this.brush.extent([[0,0],[t.width(),t.height()]]),this.brush(this.zoomBrushLayer.select(".brush")),this.brushElement.select(".overlay").style("pointer-events","none"),this.brushElement.select(".selection").attr("stroke",null)},i.prototype.destroy=function(){this.grid.getLasagna().removeLayer(i.LAYER_NAME),this.destroy$.next(),this.destroy$.complete()},i}(hn);gr.LAYER_NAME="zoom-brush",gr.DEFAULT_CONFIG={enableExternalEvents:!1};var vr=function(){function e(t,e,i,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=new je(Fe)),void 0===n&&(n=new Ve(He)),this.showBottomAxis=t,this.showTopBorder=e,this.palette=i,this.markers=n,this.sparks=[],this.isLegendActive=!1,this.highlightedDataPoints={},this.gridConfig=rr(new Dn,!1,e),this.gridConfig.interactionPlugins=!1,this.lastGridConfig=rr(new Dn,t,e),this.lastGridConfig.interactionPlugins=!1}return e.prototype.update=function(t){var e=t.map((function(t){return{id:t.id,chartSeriesSet:[t]}}));this.updateSparks(e)},e.prototype.updateSparks=function(t){var e=this,i=ct.default(t);this.sparks=i.map((function(t,n){var r=n===i.length-1,a=t.id?e.sparks.findIndex((function(e){return e.id===t.id})):-1;return-1!==a?t.chart=e.reconfigureChart(e.sparks[a].chart,r):(t.chart=t.chart||e.createChart(r),t.id=t.id||ai.uuid()),t.chart.update(t.chartSeriesSet),t}))},e.prototype.getHighlightedValue=function(t,e,i){return nn.getLabel(t,this.highlightedDataPoints[t.id],e,i)},e.prototype.trackByFn=function(t,e){return e.id},e.prototype.setRenderState=function(t,e){},e.prototype.getVisibleSeriesWithLegend=function(){return[]},e.prototype.createChart=function(t){var e=new Pn(t?this.lastGridConfig:this.gridConfig),i=new fn(e);return(this.showTopBorder||this.showBottomAxis)&&i.addPlugin(new An),t&&this.showBottomAxis&&i.addPlugin(new In),this.configureEventSubscriptions(i.getEventBus()),i},e.prototype.configureEventSubscriptions=function(e){var i=this;e.getStream(Qt).subscribe((function(e){if(e.data.interactionType===t.InteractionType.MouseMove){var n=e.data.dataPoints;Object.keys(n).forEach((function(t){i.highlightedDataPoints[t]=Object.assign({},n[t])}))}})),e.getStream(zt).subscribe((function(t){i.isLegendActive=t.data}))},e.prototype.reconfigureChart=function(t,e){t.getGrid().config(e?this.lastGridConfig:this.gridConfig),t.updateDimensions();var i=t.hasPlugin(In);if(e&&!i&&this.showBottomAxis){var n=new In;t.addPlugin(n),n.initialize()}else!e&&i&&t.removePlugin(In);return t},e}(),yr=function(){this.series=void 0,this.data=void 0},mr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return he(e,t),e.prototype.draw=function(t,e){},e.prototype.highlightDataPoint=function(t,e,i){},e.prototype.getRequiredLayers=function(){return[]},e.prototype.getDataPointPosition=function(t,e,i){},e}(ei);var br=function(){function e(t,e,i){void 0===e&&(e=1),this.scaleKey=t,this.levels=e,this.selectedDataPointIdxFn=i}return e.prototype.getDataPointIndex=function(t,e,i,n){var r=i[this.scaleKey];return void 0===r?ce:this.findDataPointByValue(e,r,this.scaleKey,n)},e.prototype.findDataPointByValue=function(t,e,i,n){var r,a,o=this,s=i.toUpperCase(),d=t.accessors.data,c=d["start"+s],l=d["end"+s];if("string"==typeof e)return Ot.default(t.data,(function(i,n){return e===(null==c?void 0:c(i,n,t.data,t))}));if(pt.default(e))return Ot.default(t.data,(function(i,n){for(var r=null==c?void 0:c(i,n,t.data,t),a=Math.min(o.levels,e.length,r.length),s=0;s<a;s++)if(e[s]!==r[s])return!1;return!0}));if(e.valueOf){var u=e.valueOf();if(n&&(null===(r=n[i])||void 0===r?void 0:r.isContinuous())){var h=Ot.default(t.data,(function(e,i){return u>=(null==c?void 0:c(e,i,t.data,t).valueOf())&&u<=(null==l?void 0:l(e,i,t.data,t).valueOf())}));if(-1===h&&void 0!==l)if(ke(n[i])){var p=function(e,i){return null==c?void 0:c(e,i,t.data,t)},f=ai.findNearestIndex(t.data,e,p);h=f>=t.data.length||p(t.data[f],f)>u?-1:f}else h=null!==(a=ai.getClosestIndex(t.data,(function(e,i){return l(e,i,t.data,t)}),e))&&void 0!==a?a:-1;return h}return Ot.default(t.data,(function(e,i){return u>=(null==c?void 0:c(e,i,t.data,t).valueOf())&&u<=(null==l?void 0:l(e,i,t.data,t).valueOf())}))}return ce},e.prototype.highlightDataPoint=function(e,i,n,r){var a=i.containers[t.RenderLayerName.data],s=e.getContainerStateStyles,d=rt.default(this.selectedDataPointIdxFn)?de:this.selectedDataPointIdxFn(i.dataSeries.id);a.selectAll("g."+e.barContainerClass).each((function(e,i){var r;r=n===ce?i===d||d===de?t.RenderState.default:t.RenderState.deemphasized:n===i||i===d?t.RenderState.emphasized:t.RenderState.deemphasized,o.select(this).attrs(s(r))}))},e.prototype.draw=function(t,e,i){},e}(),Sr=function(){function t(t,e){void 0===e&&(e=1),this.scaleKey=t,this.levels=e}return t.prototype.getDataPointIndex=function(t,e,i,n){var r=i[this.scaleKey];return void 0===r?ce:this.findDataPointByValue(e,r,this.scaleKey)},t.prototype.findDataPointByValue=function(t,e,i){var n=this,r=i.toUpperCase(),a=t.accessors.data,o=a["start"+r],s=a["end"+r];if("string"==typeof e)return Ot.default(t.data,(function(i,n){return e===(null==o?void 0:o(i,n,t.data,t))}));if(pt.default(e))return Ot.default(t.data,(function(i,r){for(var a=null==o?void 0:o(i,r,t.data,t),s=Math.min(n.levels,e.length,a.length),d=0;d<s;d++)if(e[d]!==a[d])return!1;return!0}));if(e.valueOf){var d=e.valueOf();return Ot.default(t.data,(function(e,i){return d>=(null==o?void 0:o(e,i,t.data,t).valueOf())&&d<=(null==s?void 0:s(e,i,t.data,t).valueOf())}))}return ce},t.prototype.highlightDataPoint=function(t,e,i,n){(i>=0||i===ce)&&n.next({eventName:Kt,data:t.getDataPoint(e,e.dataSeries.data[i],i)})},t.prototype.draw=function(t,e,i){},t}(),xr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return he(e,t),e.prototype.getArc=function(t,e,i){return e.outerRadius(t[1]-t[0]).innerRadius(0)},e}(Ki);var _r=function(){function e(){this.INTERACTION_MARGIN=8}return e.prototype.draw=function(e,i,n){var r=this,a=i.containers[t.RenderLayerName.data],o=a.select("path.interaction");if(it.default(e.config.strokeWidth))throw new Error("renderer.config.strokeWidth is not defined");o.empty()&&(o=a.append("path").classed("interaction",!0).classed("pointer-events pointer-events-click",!0).attrs({"stroke-width":e.config.strokeWidth+2*this.INTERACTION_MARGIN,stroke:"transparent",fill:"none"}).on("mouseenter",(function(){var t={seriesId:i.dataSeries.id,dataSeries:i.dataSeries,index:0,data:i.dataSeries.data[0]};n.next({eventName:Kt,data:t})})).on("mouseleave",(function(){var t={seriesId:i.dataSeries.id,dataSeries:i.dataSeries,index:de};n.next({eventName:Kt,data:t})})).on("click",(function(a,o){r.emitEvent(e,Zt,t.InteractionType.Click,i,a,o,n)}))),e.drawLine(i,o)},e.prototype.getDataPointIndex=function(t,e,i,n){},e.prototype.highlightDataPoint=function(t,e,i,n){},e.prototype.emitEvent=function(t,e,i,n,r,a,o){var s={seriesId:n.dataSeries.id,dataSeries:n.dataSeries,index:a,data:r,position:t.getDataPointPosition(n.dataSeries,a,n.scales)};o.next({eventName:e,data:{interactionType:i,payload:s}})},e}(),Cr=function(){this.strokeWidth=1,this.interactive=!1,this.strokeStyle=yi.getStrokeStyleDashed(1),this.useEnhancedLineCaps=!0};var Er=function(e){function i(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.config=t,i.DEFAULT_CONFIG={curveType:N.curveLinear,interactive:!0,areaClass:"nui-chart-area",markerInteraction:ui},i.config=mt.default(i.config,i.DEFAULT_CONFIG),i}return he(i,e),i.prototype.draw=function(e,i){var n,r,a,o=e.containers[t.RenderLayerName.data],s=e.dataSeries.accessors,d=o.select("path."+this.config.areaClass);if(d.empty()){if(!this.config.areaClass)throw new Error("areaClass is not defined");d=o.append("path").classed(this.config.areaClass,!0).attrs({fill:null===(r=(n=s.series).color)||void 0===r?void 0:r.call(n,e.dataSeries.id,e.dataSeries)}).style("stroke-width",null!==(a=this.config.strokeWidth)&&void 0!==a?a:1)}this.drawArea(e,d)},i.prototype.drawArea=function(t,e){var i,n=this,r=t.dataSeries,a=r.accessors,o=!1,s=r.data.filter((function(t,e){var i,n,s,d,c,l,u,h,p=void 0!==(null===(n=(i=a.data).absoluteX0)||void 0===n?void 0:n.call(i,t,e,r.data,r))&&void 0!==(null===(d=(s=a.data).absoluteX1)||void 0===d?void 0:d.call(s,t,e,r.data,r))&&void 0!==(null===(l=(c=a.data).absoluteY0)||void 0===l?void 0:l.call(c,t,e,r.data,r))&&void 0!==(null===(h=(u=a.data).absoluteY1)||void 0===h?void 0:h.call(u,t,e,r.data,r));return p||o||(console.warn("Data point",t,"was skipped as accessors didn't manage to extract any data."),console.warn(" -> accessors.data.x0:",a.data.x0),console.warn(" -> accessors.data.y0:",a.data.y0),console.warn(" -> accessors.data.x1:",a.data.x1),console.warn(" -> accessors.data.y1:",a.data.y1),o=!0),p}));if(!this.config.curveType)throw new Error("curveType is not defined");var d=N.area().x0((function(e,i){var o,s;return n.safetyCheck(t.scales.x.convert(null===(s=(o=a.data).absoluteX0)||void 0===s?void 0:s.call(o,e,i,r.data,r)))})).x1((function(e,i){var o,s;return n.safetyCheck(t.scales.x.convert(null===(s=(o=a.data).absoluteX1)||void 0===s?void 0:s.call(o,e,i,r.data,r)))})).y0((function(e,i){var o,s;return n.safetyCheck(t.scales.y.convert(null===(s=(o=a.data).absoluteY0)||void 0===s?void 0:s.call(o,e,i,r.data,r)))})).y1((function(e,i){var o,s;return n.safetyCheck(t.scales.y.convert(null===(s=(o=a.data).absoluteY1)||void 0===s?void 0:s.call(o,e,i,r.data,r)))})).curve(this.config.curveType);e.attr("d",null!==(i=d(s))&&void 0!==i?i:"")},i.prototype.getDomain=function(t,e,i,n){if(!t||0===t.length)return Ae;var r=e.accessors.data;if("x"!==i&&"y"!==i)return[void 0,void 0];var a=r["absolute"+i.toUpperCase()+"0"],o=r["absolute"+i.toUpperCase()+"1"];return[k.min(t,(function(t,i,n){return k.min([null==a?void 0:a(t,i,n,e),null==o?void 0:o(t,i,n,e)])})),k.max(t,(function(t,i,n){return k.max([null==a?void 0:a(t,i,n,e),null==o?void 0:o(t,i,n,e)])}))]},i.prototype.getRequiredLayers=function(){return[se[t.RenderLayerName.data],se[t.RenderLayerName.foreground]]},i.prototype.filterDataByDomain=function(t,e,i,n){var r=e.accessors.data[i+"0"],a=e.accessors.data[i+"1"];return t.filter((function(i,o){var s=null==r?void 0:r(i,o,t,e),d=null==a?void 0:a(i,o,t,e);return Math.max(s,d)>=n[0]&&Math.min(s,d)<=n[1]}))},i.prototype.highlightDataPoint=function(e,i,n){if(e.dataSeries.accessors.series.marker&&this.config.interactive){var r=e.containers[t.RenderLayerName.foreground];vi.manageMarker(e.dataSeries,e.scales,i,r,n,this.config.markerInteraction)}},i.prototype.safetyCheck=function(t){return isNaN(t)||void 0===t?0:t},i}(oi);function wr(t,e){var i,n;if(0===t.length)return t;var r={},a=function(t){if(!1===t.preprocess)return"continue";var i=t.accessors.data.x,n=t.accessors.data.y0,a=t.accessors.data.y1,o=e(t)?1:0;t.data.forEach((function(e,s){var d=i(e,s,t.data,t),c=null==n?void 0:n(e,s,t.data,t),l=((null==a?void 0:a(e,s,t.data,t))-c)*o,u=r[d.valueOf()];void 0===u&&(u=0,r[d.valueOf()]=u);var h=u+l;r[d.valueOf()]=h,e.__stack_y={start:u,end:h}}))};try{for(var o=pe(t),s=o.next();!s.done;s=o.next()){a(s.value)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return t}function Ir(t,e){var i,n,r,a;if(0===t.length)return t;var o={},s={};try{for(var d=pe(t),c=d.next();!c.done;c=d.next()){Ar("x","y",c.value,e,s)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}try{for(var l=pe(t),u=l.next();!u.done;u=l.next()){Tr("x","y",u.value,e,o,s)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return t}function Ar(t,e,i,n,r){var a=i.accessors.data[t],o=i.accessors.data[e+"0"],s=i.accessors.data[e+"1"],d=n(i)?1:0;i.data.forEach((function(t,e){var n=a(t,e,i.data,i),c=null==o?void 0:o(t,e,i.data,i),l=((null==s?void 0:s(t,e,i.data,i))-c)*d,u=r[n.valueOf()];void 0===u&&(u=0,r[n.valueOf()]=u),r[n.valueOf()]=u+l}))}function Tr(t,e,i,n,r,a){var o=i.accessors.data[t],s=i.accessors.data[e+"0"],d=i.accessors.data[e+"1"],c=n(i)?1:0;i.data.forEach((function(t,n){var l=o(t,n,i.data,i),u=null==s?void 0:s(t,n,i.data,i),h=((null==d?void 0:d(t,n,i.data,i))-u)*c,p=r[l.valueOf()];void 0===p&&(p=0,r[l.valueOf()]=p);var f=p+100*(h/a[l.valueOf()]);r[l.valueOf()]=f,t["__stack_"+e]={start:p,end:f}}))}t.AXES_STYLE_CHANGE_EVENT=ae,t.AreaAccessors=qe,t.AreaGridConfig=tr,t.AreaRenderer=Er,t.AxisConfig=kn,t.BandScale=Hi,t.BarAccessors=$e,t.BarGridConfig=er,t.BarHighlightStrategy=br,t.BarHorizontalGridConfig=ir,t.BarRenderer=si,t.BarSeriesHighlightStrategy=Sr,t.BarStatusGridConfig=nr,t.BarTooltipsPlugin=fr,t.BasicLegendTileComponent=we,t.BorderConfig=Ln,t.CHART_COMPONENT=oe,t.CHART_MARKERS=He,t.CHART_PALETTE_CS1=Fe,t.CHART_PALETTE_CS2=["var(--nui-color-chart-one)","var(--nui-color-chart-one-light)","var(--nui-color-chart-two)","var(--nui-color-chart-two-light)","var(--nui-color-chart-three)","var(--nui-color-chart-three-light)","var(--nui-color-chart-four)","var(--nui-color-chart-four-light)","var(--nui-color-chart-five)","var(--nui-color-chart-five-light)","var(--nui-color-chart-six)","var(--nui-color-chart-six-light)","var(--nui-color-chart-seven)","var(--nui-color-chart-seven-light)","var(--nui-color-chart-eight)","var(--nui-color-chart-eight-light)","var(--nui-color-chart-nine)","var(--nui-color-chart-nine-light)","var(--nui-color-chart-ten)","var(--nui-color-chart-ten-light)"],t.CHART_PALETTE_CS3=["var(--nui-color-chart-one)","var(--nui-color-chart-one-light)","var(--nui-color-chart-one-dark)","var(--nui-color-chart-two)","var(--nui-color-chart-two-light)","var(--nui-color-chart-two-dark)","var(--nui-color-chart-three)","var(--nui-color-chart-three-light)","var(--nui-color-chart-three-dark)","var(--nui-color-chart-four)","var(--nui-color-chart-four-light)","var(--nui-color-chart-four-dark)","var(--nui-color-chart-five)","var(--nui-color-chart-five-light)","var(--nui-color-chart-five-dark)","var(--nui-color-chart-six)","var(--nui-color-chart-six-light)","var(--nui-color-chart-six-dark)","var(--nui-color-chart-seven)","var(--nui-color-chart-seven-light)","var(--nui-color-chart-seven-dark)","var(--nui-color-chart-eight)","var(--nui-color-chart-eight-light)","var(--nui-color-chart-eight-dark)","var(--nui-color-chart-nine)","var(--nui-color-chart-nine-light)","var(--nui-color-chart-nine-dark)","var(--nui-color-chart-ten)","var(--nui-color-chart-ten-light)","var(--nui-color-chart-ten-dark)"],t.CHART_PALETTE_CS_S=["var(--nui-color-semantic-down)","var(--nui-color-semantic-critical)","var(--nui-color-semantic-warning)","var(--nui-color-semantic-unknown)","var(--nui-color-semantic-ok)","var(--nui-color-semantic-info)"],t.CHART_PALETTE_CS_S_EXTENDED=["var(--nui-color-semantic-down)","var(--nui-color-semantic-down-bg)","var(--nui-color-semantic-critical)","var(--nui-color-semantic-critical-bg)","var(--nui-color-semantic-warning)","var(--nui-color-semantic-warning-bg)","var(--nui-color-semantic-unknown)","var(--nui-color-semantic-unknown-bg)","var(--nui-color-semantic-ok)","var(--nui-color-semantic-ok-bg)","var(--nui-color-semantic-info)","var(--nui-color-semantic-info-bg)"],t.CHART_VIEW_STATUS_EVENT=ne,t.Chart=fn,t.ChartAssist=nn,t.ChartAssistRenderStateData=en,t.ChartCollection=ye,t.ChartCollectionIdDirective=be,t.ChartCollectionService=me,t.ChartComponent=xe,t.ChartDonutContentComponent=Gt,t.ChartDonutContentPlugin=ar,t.ChartMarkerComponent=Vt,t.ChartPalette=je,t.ChartPlugin=hn,t.ChartPopoverComponent=Bt,t.ChartPopoverPlugin=or,t.ChartTooltipComponent=Mt,t.ChartTooltipDirective=Nt,t.ChartTooltipsComponent=jt,t.ChartTooltipsPlugin=lr,t.DATA_POINT_INTERACTION_RESET=ce,t.DATA_POINT_NOT_FOUND=de,t.DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG=Qi,t.DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG=zi,t.DEFAULT_MARKER_INTERACTION_CONFIG=ui,t.DEFAULT_RADIAL_RENDERER_CONFIG=$i,t.DESTROY_EVENT=te,t.DONUT_GAUGE_LABEL_CLEARANCE_DEFAULT=30,t.DataManager=ln,t.DataSeries=Jn,t.DimensionConfig=yn,t.DonutGaugeLabelsPlugin=gn,t.DonutGaugeRenderingUtil=Zi,t.DonutGaugeThresholdsRenderer=Ji,t.EMPTY_CONTINUOUS_DOMAIN=Ae,t.EventBus=ve,t.GAUGE_LABELS_CONTAINER_CLASS=Mi,t.GAUGE_LABEL_FORMATTER_NAME_DEFAULT=Oi,t.GAUGE_QUANTITY_SERIES_ID=ki,t.GAUGE_REMAINDER_SERIES_ID=Li,t.GAUGE_THRESHOLD_LABEL_CLASS=Ni,t.GAUGE_THRESHOLD_MARKERS_SERIES_ID=Di,t.GAUGE_THRESHOLD_MARKER_CLASS=hi,t.GRAYSCALE_COLOR_MATRIX=Si,t.GRAYSCALE_FILTER=bi,t.GaugeUtil=Mn,t.Grid=xn,t.GridConfig=mn,t.HIGHLIGHT_DATA_POINT_EVENT=Xt,t.HIGHLIGHT_SERIES_EVENT=Kt,t.HorizontalBarAccessors=Ke,t.IGNORE_INTERACTION_CLASS=le,t.INTERACTION_COORDINATES_EVENT=qt,t.INTERACTION_DATA_POINTS_EVENT=Qt,t.INTERACTION_DATA_POINT_EVENT=Jt,t.INTERACTION_SERIES_EVENT=Zt,t.INTERACTION_VALUES_ACTIVE_EVENT=Yt,t.INTERACTION_VALUES_EVENT=Wt,t.InteractionLabelPlugin=In,t.InteractionLinePlugin=An,t.LEGEND_SERIES_CLASS_NAME=Ce,t.LINEAR_GAUGE_LABEL_CLEARANCE_DEFAULTS=Pi,t.Lasagna=bn,t.LegendComponent=_e,t.LegendInteractionAssist=rn,t.LegendSeriesComponent=Ee,t.LineAccessors=fi,t.LineRenderer=yi,t.LineSelectSeriesInteractionStrategy=_r,t.LinearGaugeLabelsPlugin=vn,t.LinearGaugeThresholdsRenderer=Yi,t.LinearScale=Ui,t.MOUSE_ACTIVE_EVENT=zt,t.MappedValueProvider=Nn,t.MissingDataLineRendererConfig=Cr,t.MouseInteractiveArea=En,t.MouseInteractiveAreaPlugin=Tn,t.NORMALIZED_DOMAIN=Te,t.NoopAccessors=yr,t.NoopRenderer=mr,t.NoopScale=Qn,t.NuiChartsModule=Ei,t.PathMarker=Gn,t.PieRenderer=xr,t.PointScale=jn,t.ProcessedColorProvider=Pe,t.REFRESH_EVENT=ie,t.RadialAccessors=Wi,t.RadialGrid=_n,t.RadialPopoverPlugin=sr,t.RadialRenderer=Ki,t.RadialTooltipsPlugin=pr,t.RectangleAccessors=Xe,t.RenderEngine=un,t.RenderEnginePlugin=pn,t.Renderer=ei,t.RichLegendTileComponent=Ie,t.SELECT_DATA_POINT_EVENT=$t,t.SERIES_STATE_CHANGE_EVENT=re,t.SET_DOMAIN_EVENT=ee,t.STANDARD_RENDER_LAYERS=se,t.Scale=Fi,t.SequentialChartMarkerProvider=Ve,t.SequentialColorProvider=Me,t.SequentialValueProvider=Oe,t.SideIndicatorAccessors=xi,t.SideIndicatorRenderer=_i,t.SparkChartAssist=vr,t.StatusAccessors=Ze,t.SvgMarker=Be,t.THRESHOLDS_MAIN_CHART_RENDERER_CONFIG=ci,t.THRESHOLDS_SUMMARY_RENDERER_CONFIG=li,t.TOOLTIP_POSITION_OFFSET=10,t.TextColorProvider=Ge,t.ThresholdsService=Ci,t.TimeIntervalScale=Zn,t.TimeScale=$n,t.UtilityService=ai,t.VerticalBarAccessors=Gi,t.XYAccessors=pi,t.XYGrid=Pn,t.XYGridConfig=Dn,t.XYRenderer=oi,t.ZoomPlugin=gr,t.applyStackMetadata=Tr,t.areaGrid=function(){var t=new Pn;return t.config(new tr),t},t.barAccessors=function(t,e,i){return t&&t.horizontal?new Ke(e,i):new Gi(e,i)},t.barGrid=function(t){var e=new Pn;return e.config(t&&t.horizontal?new ir:new er),e},t.barScales=Vi,t.borderMidpoint=Sn,t.calculateDomainValueCombinedTotals=Ar,t.calculateMissingData=function(t,e,i){var n=t.accessors.data,r=t.data,a=null==n?void 0:n[e];if(!a)throw new Error("Accessor "+e+" not defined!");var o=a(r[0],0,r,t),s=a(r[r.length-1],r.length-1,r,t);if(!o||!s)throw new Error("First or last values not defined!");var d=new Zn(i);d.domain([d.truncToInterval(o,d.interval()),d.truncToInterval(s,d.interval())]);for(var c=d.getBands(),l=[],u=0,h=0;h<r.length;h++){var p=a(r[h],h,r,t),f=d.truncToInterval(p,d.interval());if(f&&f>c[u])for(l.push(Object.assign(Object.assign({},r[h-1]),{defined:!1})),l.push(Object.assign(Object.assign({},r[h]),{defined:!1}));c[u]<p;)u++;l.push(r[h]),u++}return l},t.convert=ti,t.datetimeFormatter=Xn,t.defaultColorProvider=ze,t.defaultMarkerProvider=We,t.defaultPalette=Ye,t.domainWithAuxiliarySeries=function(t,e){return function(i,n,r){return e(t().concat(i),n,r)}},t.donutGaugeRendererConfig=qi,t.getAutomaticDomain=Bi,t.getAutomaticDomainWithIncludedInterval=function(t){return function(e,i,n){var r=Bi(e,i,n);return[Math.min(r[0],t[0]),Math.max(r[1],t[1])]}},t.getAutomaticDomainWithTicks=wn,t.getColorValueByName=De,t.getHorizontalSetup=cr,t.getVerticalSetup=dr,t.hasInnerScale=Le,t.invert=ii,t.isBandScale=ke,t.isDaylightSavingTime=Kn,t.isDomainWithTicksCalculator=Re,t.linearGaugeGridConfig=On,t.mergeDomains=ji,t.radial=on,t.radialGrid=Cn,t.radialPreprocessor=an,t.radialScales=tn,t.sparkChartGridConfig=rr,t.stack=dn,t.stackedArea=function(t){var e=this;return wr(t,(function(t){return!e.isSeriesHidden(t.id)}))},t.stackedAreaAccessors=function(t,e){var i=new qe(t,e);return i.data.x=function(t){return t.x},i.data.y=i.data.absoluteY1,i.data.y0=function(){return 0},i.data.y1=function(t){return t.y},i},t.stackedAreaPreprocessor=wr,t.stackedPercentageArea=function(t){var e=this;return Ir(t,(function(t){return!e.isSeriesHidden(t.id)}))},t.stackedPercentageAreaPreprocessor=Ir,t.stackedPreprocessor=sn,t.statusAccessors=Qe,t.thresholdsSummaryGridConfig=function(t){return void 0===t&&(t=new Dn),t.axis.left.visible=!1,t.axis.left.gridTicks=!1,t.dimension.padding.bottom=5,t.dimension.autoHeight=!1,t.dimension.height(20),t},t.thresholdsTopGridConfig=function(t){return void 0===t&&(t=new Dn),t.axis.bottom.visible=!1,t.dimension.margin.bottom=0,t.dimension.padding.bottom=5,t},t.ɵ3=Yn,t.ɵ4=Wn,t.ɵ5=qn,Object.defineProperty(t,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=nova-ui-charts.umd.min.js.map