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ACN8mD,YAAY,EACZvoD,MAAO6uC,EAAUE,QACjB/T,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,UACN8mD,YAAY,EACZvoD,MAAO6uC,EAAUE,QACjB/T,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,OACN8mD,YAAY,EACZvoD,MAAO6uC,EAAUE,QACjB/T,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,OACN8mD,YAAY,EACZvoD,MAAO6uC,EAAUE,QACjB/T,OAAQ,CAAC,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,YAE1F,CACIv5B,KAAM,QACN8mD,YAAY,EACZvoD,MAAO6uC,EAAU7K,OACjBhJ,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,MACN8mD,YAAY,EACZvoD,MAAO6uC,EAAU7K,OACjBhJ,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,OACN8mD,YAAY,EACZvoD,MAAO6uC,EAAU7K,OACjBhJ,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,QACN8mD,YAAY,EACZvoD,MAAO6uC,EAAUE,QACjB/T,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,QACN8mD,YAAY,EACZvoD,MAAO6uC,EAAUE,QACjB/T,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YAGR,CACIv5B,KAAM,SACN8mD,YAAY,EACZvoD,MAAO6uC,EAAUE,QACjB/T,OAAQ,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,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ziBE0oD,IAC9GA,EAAiBhY,UApziByF1wC,MAAE,UAoziB8B,CAACu9C,OAJrImL,CAAgB,KAkchBC,GAAa,MAAnB,MAAMA,GAENA,SAAcznB,UAAI,0BAAwFynB,EAAa,EACvHA,EAAclY,UArvjB4FzwC,MAAE,MAqvjBD2oD,IAC3GA,EAAcjY,UAtvjB4F1wC,MAAE,UAsvjBwB,CAACu9C,OAJ/HoL,CAAa,KAq9BbC,GAAW,MAAjB,MAAMA,GAENA,SAAY1nB,UAAI,0BAAwF0nB,EAAW,EACnHA,EAAYnY,UA1slB8FzwC,MAAE,MA0slBH4oD,IACzGA,EAAYlY,UA3slB8F1wC,MAAE,UA2slBoB,CAACu9C,GAAmBiL,GAAgB3D,OAJ9J+D,CAAW,KAuBXz7D,GAAe,MAArB,MAAMA,EACFM,eATJ,SAASo7D,YAGMC,WAAe,YAAsBA,WAAW/zD,UAAUqJ,SAAa,MAC9E0qD,WAAW/zD,UAAUqJ,SAAW2qD,eAAeh0D,UAAUqJ,SAEjE,CAIQyqD,EACJ,EAEJ17D,SAAgB+zC,UAAI,0BAAwF/zC,EAAe,EAC3HA,EAAgBsjD,UApulB0FzwC,MAAE,MAoulBC7S,IAY7GA,EAAgBujD,UAhvlB0F1wC,MAAE,UAgvlB4Bu9C,GAChIoC,GACAkF,GACAC,GACAC,GACAC,GACAuD,GACAE,GACAC,GACAF,GACAG,GACAC,MA7BFz7D,CAAe,IA6DrB","names":["MyChartBarModule","CommonModule","NgbModule","NgxChartsModule","SharedModule","copyBuffer","cur","Buffer","from","constructor","buffer","slice","byteOffset","length","module","exports","rfdc","opts","circles","rfdcCircles","refs","refsNew","proto","cloneProto","o","Date","Array","isArray","cloneArray","Map","Set","o2","k","push","ArrayBuffer","isView","i","indexOf","pop","clone","Object","hasOwnProperty","call","a","fn","keys","a2","index","Portal","attach","host","_attachedHost","this","detach","isAttached","setAttachedHost","ComponentPortal","component","viewContainerRef","injector","componentFactoryResolver","projectableNodes","super","TemplatePortal","templateRef","context","origin","elementRef","undefined","DomPortal","element","ElementRef","nativeElement","DomPortalOutlet","BasePortalOutlet","_isDisposed","attachDomPortal","hasAttached","_attachedPortal","portal","attachComponentPortal","attachTemplatePortal","_invokeDisposeFn","dispose","setDisposeFn","_disposeFn","outletElement","_componentFactoryResolver","_appRef","_defaultInjector","_document","anchorNode","createComment","parentNode","insertBefore","appendChild","replaceChild","componentFactory","resolveComponentFactory","componentRef","createComponent","destroy","create","Injector","attachView","hostView","viewCount","detachView","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","rootNodes","forEach","rootNode","detectChanges","remove","none","selector","querySelector","x","empty","querySelectorAll","matches","childMatcher","node","find","prototype","childFirst","firstElementChild","filter","children","update","EnterNode","parent","datum","ownerDocument","namespaceURI","_next","_parent","__data__","bindIndex","group","enter","exit","data","groupLength","dataLength","bindKey","key","keyValue","nodeByKeyValue","keyValues","has","set","get","delete","ascending","b","NaN","child","next","xhtml","svg","xlink","xml","xmlns","name","prefix","namespaces","space","local","attrRemove","removeAttribute","attrRemoveNS","fullname","removeAttributeNS","attrConstant","value","setAttribute","attrConstantNS","setAttributeNS","attrFunction","v","apply","arguments","attrFunctionNS","defaultView","document","styleRemove","style","removeProperty","styleConstant","priority","setProperty","styleFunction","styleValue","getPropertyValue","getComputedStyle","propertyRemove","propertyConstant","propertyFunction","classArray","string","trim","split","classList","ClassList","_node","_names","getAttribute","classedAdd","names","list","n","add","classedRemove","classedTrue","classedFalse","classedFunction","textRemove","textContent","textConstant","textFunction","htmlRemove","innerHTML","htmlConstant","htmlFunction","raise","nextSibling","lower","previousSibling","firstChild","creatorInherit","uri","documentElement","createElement","createElementNS","creatorFixed","namespace","constantNull","removeChild","selection_cloneShallow","cloneNode","selection_cloneDeep","parseTypenames","typenames","map","t","type","onRemove","typename","on","__on","j","m","removeEventListener","listener","options","onAdd","contextListener","event","addEventListener","dispatchEvent","params","window","CustomEvent","createEvent","initEvent","bubbles","cancelable","detail","dispatchConstant","dispatchFunction","join","splice","contains","root","Selection","groups","parents","_groups","_parents","selection","select","subgroups","subnode","subgroup","selectAll","arrayAll","array","selectorAll","selectChild","match","childFind","selectChildren","childrenFilter","matcher","bind","constant","enterGroup","updateGroup","exitGroup","previous","i0","i1","_enter","_exit","sparse","onenter","onupdate","onexit","append","merge","order","Error","groups0","groups1","m0","Math","min","merges","group0","group1","selection_selection","compareDocumentPosition","sort","compare","compareNode","sortgroups","sortgroup","callback","nodes","size","each","attr","getAttributeNS","property","classed","text","html","creator","insert","before","deep","dispatch","Symbol","iterator","noop","_","test","Dispatch","types","c","concat","T","copy","that","args","preventDefault","stopImmediatePropagation","view","noevent","__noselect","MozUserSelect","yesdrag","noclick","setTimeout","factory","extend","definition","Color","brighter","reI","reN","reP","reHex","reRgbInteger","RegExp","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","color_formatHex","rgb","formatHex","color_formatRgb","formatRgb","color","format","l","toLowerCase","exec","parseInt","rgbn","Rgb","rgba","hsla","r","g","rgbConvert","opacity","rgb_formatHex","hex","rgb_formatRgb","isNaN","max","round","toString","h","s","Hsl","hslConvert","hsl2rgb","m1","m2","basis","t1","v0","v1","v2","v3","t2","t3","define","channels","assign","displayable","formatHsl","color_formatHsl","pow","darker","hsl","nogamma","d","linear","rgbGamma","y","gamma","exponential","start","end","colorRgb","rgbSpline","spline","colors","genericArray","nb","na","setTime","values","floor","reA","reB","source","am","bm","bs","bi","lastIndex","q","number","one","zero","date","isNumberArray","DataView","numberArray","valueOf","object","sourceEvent","currentTarget","ownerSVGElement","createSVGPoint","point","clientX","clientY","matrixTransform","getScreenCTM","inverse","getBoundingClientRect","rect","left","clientLeft","top","clientTop","pageX","pageY","taskHead","taskTail","frame","timeout","interval","clockLast","clockNow","clockSkew","clock","performance","now","setFrame","requestAnimationFrame","f","clearNow","Timer","_call","_time","timer","delay","time","restart","wake","timerFlush","e","nap","t0","Infinity","sleep","poke","clearTimeout","clearInterval","setInterval","elapsed","stop","TypeError","emptyOn","emptyTween","id","timing","schedules","__transition","self","tween","state","tick","duration","ease","schedule","init","active","svgNode","degrees","PI","identity","translateX","translateY","rotate","skewX","scaleX","scaleY","sqrt","atan2","atan","interpolateTransform","parse","pxComma","pxParen","degParen","translate","xa","ya","xb","yb","scale","interpolateTransformCss","parseCss","DOMMatrix","WebKitCSSMatrix","isIdentity","decompose","interpolateTransformSvg","parseSvg","transform","baseVal","consolidate","matrix","tweenRemove","tween0","tween1","tweenFunction","tweenValue","transition","_id","interpolateNumber","interpolateRgb","interpolateString","interpolate","value1","string00","interpolate0","string1","string0","string10","attrInterpolate","attrInterpolateNS","attrTweenNS","_value","attrTween","delayFunction","delayConstant","durationFunction","durationConstant","easeConstant","onFunction","on0","on1","sit","every","styleInterpolate","styleTween","textInterpolate","textTween","Transition","_name","newId","selection_prototype","inherit","id0","id1","styleNull","styleMaybeRemove","listener0","removeFunction","easeVarying","Promise","resolve","reject","cancel","interrupt","defaultTiming","cubicInOut","BrushEvent","target","mode","defineProperties","enumerable","configurable","nopropagation","MODE_DRAG","MODE_SPACE","MODE_HANDLE","MODE_CENTER","abs","brush_max","number1","number2","X","handles","input","output","xy","Y","cursors","overlay","w","nw","ne","se","sw","flipX","flipY","signsX","signsY","defaultFilter","ctrlKey","button","defaultExtent","hasAttribute","viewBox","width","height","defaultTouchable","navigator","maxTouchPoints","__brush","extent","delta","lo","hi","mid","ascendingComparator","center","right","e10","e5","e2","tickIncrement","count","step","power","log","LN10","error","tickStep","step0","step1","durationSecond","durationMinute","durationHour","durationDay","durationWeek","durationMonth","durationYear","newInterval","floori","offseti","field","ceil","d0","d1","offset","range","isFinite","millisecond","getMilliseconds","getUTCSeconds","getSeconds","getMinutes","getHours","setHours","setDate","getDate","getTimezoneOffset","weekday","getDay","sunday","monday","thursday","setMonth","getMonth","getFullYear","year","setFullYear","setUTCSeconds","getUTCMinutes","setUTCMinutes","getUTCHours","setUTCHours","setUTCDate","getUTCDate","utcWeekday","getUTCDay","utcSunday","utcMonday","utcThursday","setUTCMonth","getUTCMonth","getUTCFullYear","utcYear","setUTCFullYear","ticker","month","week","day","hour","minute","tickIntervals","second","tickInterval","bisector","ticks","reverse","utcTicks","utcTickInterval","utcMonth","utcWeek","utcDay","utcHour","utcMinute","timeTicks","timeTickInterval","localDate","H","M","S","L","utcDate","UTC","newDate","locale","timeFormat","pads","numberRe","percentRe","requoteRe","pad","fill","sign","requote","replace","formatRe","formatLookup","parseWeekdayNumberSunday","parseWeekdayNumberMonday","u","parseWeekNumberSunday","U","parseWeekNumberISO","V","parseWeekNumberMonday","W","parseFullYear","parseYear","parseZone","Z","parseQuarter","parseMonthNumber","parseDayOfMonth","parseDayOfYear","parseHour24","parseMinutes","parseSeconds","parseMilliseconds","parseMicroseconds","parseLiteralPercent","parseUnixTimestamp","Q","parseUnixTimestampSeconds","formatDayOfMonth","p","formatHour24","formatHour12","formatDayOfYear","timeDay","timeYear","formatMilliseconds","formatMicroseconds","formatMonthNumber","formatMinutes","formatSeconds","formatWeekdayNumberMonday","formatWeekNumberSunday","timeSunday","dISO","timeThursday","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","timeMonday","formatYear","formatYearISO","formatFullYear","formatFullYearISO","formatZone","z","formatUTCDayOfMonth","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","getUTCMilliseconds","formatUTCMicroseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCSeconds","formatUTCWeekdayNumberMonday","dow","formatUTCWeekNumberSunday","UTCdISO","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCYearISO","formatUTCFullYear","formatUTCFullYearISO","formatUTCZone","formatLiteralPercent","formatUnixTimestamp","formatUnixTimestampSeconds","defaultLocale","formatLocale","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_weekdays","days","locale_shortWeekdays","shortDays","locale_months","months","locale_shortMonths","shortMonths","periodRe","periodLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","formats","formatShortWeekday","A","formatWeekday","formatShortMonth","B","formatMonth","G","I","formatPeriod","formatQuarter","utcFormats","formatUTCShortWeekday","formatUTCWeekday","formatUTCShortMonth","formatUTCMonth","formatUTCPeriod","formatUTCQuarter","parses","parseShortWeekday","parseWeekday","parseShortMonth","parseMonth","parseLocaleDateTime","parseSpecifier","parsePeriod","parseLocaleDate","parseLocaleTime","newFormat","specifier","charCodeAt","charAt","newParse","utcFormat","utcParse","bisectRight","bisect","unit","normalize","constants","bimap","domain","r0","r1","polymap","clamp","unknown","continuous","transformer","untransform","piecewise","interpolateValue","rescale","clamper","invert","rangeRound","interpolateRound","initRange","calendar","formatMillisecond","formatSecond","formatMinute","formatHour","formatDay","formatWeek","tickFormat","nice","x0","x1","timeMonth","timeWeek","timeHour","timeMinute","timeSecond","prefixExponent","re","formatSpecifier","FormatSpecifier","align","symbol","comma","precision","formatDecimalParts","toExponential","coefficient","exponent","toFixed","toLocaleString","toPrecision","formatRounded","toUpperCase","formatPrefix","prefixes","linearish","precisionPrefix","precisionRound","precisionFixed","prestep","maxIter","grouping","thousands","substring","formatGroup","Number","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","String","percent","minus","nan","formatTypes","suffix","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","out","formatTrim","padding","implicit","ordinal","band","bandwidth","ordinalRange","paddingInner","paddingOuter","sequence","pointish","quantileSorted","valueof","value0","quantile","thresholds","threshold","invertExtent","quantiles","pi","tau","epsilon","tauEpsilon","Path","_x0","_y0","_x1","_y1","path","moveTo","closePath","lineTo","quadraticCurveTo","y1","bezierCurveTo","x2","y2","arcTo","y0","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","acos","t01","t21","arc","a0","a1","ccw","dx","cos","dy","sin","cw","da","Linear","_context","defined","curve","curveLinear","line","defined0","lineStart","lineEnd","pointX","pointY","area","x0z","y0z","areaStart","areaEnd","arealine","lineX0","lineY0","lineY1","lineX1","_line","_point","ctx_r0","_r4","ctx_r3","ctx_r5","ctx_r6","_r3","ctx_r2","ctx_r4","ctx_r1","ctx_r12","$implicit","_c22","_c24","_c25","_c26","_c29","_r6","ctx_r7","ctx_r8","_r12","ctx_r11","ctx_r13","ctx_r14","_r19","ctx_r18","_r5","_r7","_r9","_r17","ctx_r16","ctx_r19","_r21","ctx_r20","ctx_r22","_r26","ctx_r25","throttle","func","wait","result","later","leading","remaining","trailing","throttleable","descriptor","defineProperty","PlacementTypes","Top","Bottom","Left","Right","Center","verticalPosition","elDimensions","popoverDimensions","alignment","horizontalPosition","PositionHelper","static","innerHeight","caretDimensions","popoverPosition","innerWidth","placement","spacing","flip","elmDim","hostDim","calculateVerticalCaret","calculateHorizontalCaret","calculateVerticalAlignment","calculateHorizontalAlignment","shouldFlip","TooltipContentComponent","renderer","platformId","cssClasses","clz","cssClass","ngAfterViewInit","position","isPlatformBrowser","nativeElm","checkFlip","positionContent","showCaret","positionCaret","addClass","setStyle","caretElm","determinePlacement","onWindowResize","ɵfac","PLATFORM_ID","ɵcmp","selectors","_c0","_t","ctx","i2","styles","__decorate","InjectionService","applicationRef","container","globalRootViewContainer","getRootViewContainer","_container","components","setRootViewContainer","getComponentRootNode","isViewContainerRef","location","getRootViewContainerNode","projectComponentBindings","bindings","inputs","bindingKeys","getOwnPropertyNames","bindingName","instance","outputs","eventKeys","eventName","appendComponent","componentClass","appendLocation","portalHost","ɵprov","TooltipService","InjectionRegisteryService","injectionService","defaults","getByType","createByType","assignDefaults","injectComponent","register","compsByType","componentType","idx","destroyAll","destroyByType","comps","LegendPosition","Below","LegendType","ScaleLegend","Legend","ScaleType","Time","Ordinal","Quantile","ScaleLegendComponent","horizontal","ngOnChanges","changes","gradientValues","gradientString","gradient","splits","pairs","decls","formatLabel","label","toLocaleDateString","escapeLabel","LegendEntryComponent","isActive","EventEmitter","activate","deactivate","toggle","trimmedLabel","formattedLabel","onMouseEnter","emit","onMouseLeave","LegendComponent","cd","labelClick","labelActivate","labelDeactivate","legendEntries","markForCheck","getLegendEntries","items","findIndex","getColor","entry","activeEntries","item","trackBy","ChartComponent","showLegend","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate","legendColumns","legendType","getLegendType","legendOptions","chartWidth","legendWidth","scaleType","ngContentSelectors","encapsulation","VisibilityObserver","zone","visible","isVisible","runCheck","onVisibilityChange","run","check","offsetHeight","offsetWidth","runOutsideAngular","ɵdir","isDate","BaseChartComponent","chartElement","scheme","schemeType","ngOnInit","isPlatformServer","bindWindowResizeEvent","visibilityObserver","subscribe","ngOnDestroy","unbindEvents","unsubscribe","results","cloneData","dims","getContainerDims","hostElem","formatDates","series","resizeSubscription","subscription","fromEvent","pipe","debounceTime","seriesItem","seriesItemCopy","extra","JSON","stringify","Orientation","AxisLabelComponent","textHeight","margin","strokeWidth","textAnchor","orient","attrs","trimLabel","reduceTicks","maxTicks","reduced","modulus","TextAnchor","Start","Middle","End","XAxisTicksComponent","tickArguments","tickStroke","trimTicks","maxTickLength","showGridLines","rotateTicks","dimensionsChanged","verticalSpacing","rotateLabels","innerTickSize","outerTickSize","tickPadding","maxTicksLength","maxAllowedLength","approxHeight","updateDims","ticksElement","getTicks","tickFormatting","angle","getRotationAngle","adjustedScale","textTransform","tickLength","tickTrim","wordWidth","baseWidth","maxBaseWidth","getMaxTicks","maxScaleTicks","tickValues","tickWidth","tickTransform","gridLineTransform","_c4","XAxisComponent","xOrient","xAxisOffset","xAxisClassName","labelOffset","stroke","orientation","xAxisTickCount","emitTicksHeight","newLabelOffset","roundedRect","tl","tr","bl","br","retval","YAxisTicksComponent","showRefLabels","showRefLines","referenceLineLength","getApproximateAxisWidth","tickSpacing","referenceLines","setReferencelines","refMin","refMax","referenceAreaPath","gridLineWidth","tickHeight","YAxisComponent","yOrient","yAxisOffset","yAxisClassName","yAxisTickCount","emitTicksWidth","AxesModule","ɵmod","ɵinj","StyleTypes","popover","tooltip","ShowTypes","all","focus","mouseover","TooltipDirective","tooltipService","tooltipCssClass","tooltipAppendToBody","tooltipSpacing","tooltipDisabled","tooltipShowCaret","tooltipPlacement","tooltipAlignment","tooltipType","tooltipCloseOnClickOutside","tooltipCloseOnMouseLeave","tooltipHideTimeout","tooltipShowTimeout","tooltipShowEvent","tooltipImmediateExit","show","hide","listensForFocus","listensForHover","hideTooltip","onFocus","showTooltip","onBlur","onMouseClick","immediate","userAgent","createBoundOptions","addHideListeners","mouseEnterContentEvent","listen","mouseLeaveContentEvent","documentClickEvent","destroyFn","title","tooltipTitle","template","tooltipTemplate","tooltipContext","TooltipModule","imports","cache","random","BarOrientation","Vertical","Horizontal","SvgLinearGradientComponent","CircleComponent","onClick","classNames","SeriesType","Standard","Stacked","CircleSeriesComponent","barVisible","barOrientation","placementTypes","styleTypes","isSSR","gradientId","gradientFill","circle","getActiveCircle","indexActiveDataPoint","visibleValue","mapDataPointToCircle","seriesName","tooltipLabel","cx","xScale","cy","yScale","radius","gradientStops","getGradientStops","getTooltipText","getTooltipMinMaxText","activateCircle","deactivateCircle","trigger","animate","changeDetection","AreaComponent","startOpacity","endOpacity","animationsLoaded","hasGradient","loadAnimation","stops","getGradient","updatePathEl","areaPath","startingPath","global","MouseEvent","createMouseEvent","TooltipArea","anchorOpacity","anchorPos","anchorValues","showPercentage","hover","getValues","xVal","groupName","val","mouseMove","xPos","closestIndex","findClosestPointIndex","closestPoint","xSet","lastAnchorPos","ev","tooltipAnchor","minIndex","maxIndex","minDiff","MAX_VALUE","currentIndex","currentElement","curDiff","getToolTipText","tooltipItem","_c18","Timeline","onDomainChange","initialized","addBrush","getDims","offsetY","xDomain","getXDomain","getXScale","brush","updateBrush","filterId","includes","scaleTime","scaleLinear","scalePoint","brushX","dim","touchending","touchable","listeners","handleSize","initialize","handle","redraw","started","touchmoved","touchended","emitter","clean","Emitter","touches","w0","w1","n0","n1","e0","e1","s0","s1","moving","lockX","lockY","metaKey","altKey","signX","signY","N","E","shifting","shiftKey","points","identifier","pointer","point0","pts","move","beforestart","moved","ended","keydowned","keyupped","dragDisable","changedTouches","dragEnable","keyCode","selection0","selection1","clear","starting","keyModifiers","newDomain","ChartCommonModule","calculateViewDimensions","margins","showXAxis","showYAxis","xAxisHeight","yAxisWidth","showXLabel","showYLabel","legendPosition","columns","xOffset","chartHeight","colorSets","selectable","ColorHelper","customColors","cs","colorDomain","generateColorScheme","colorScale","scaleQuantile","scaleOrdinal","valueScale","formattedValue","found","mapping","getLinearGradientStops","colorValueScale","scaleBand","endColor","startVal","startColor","endVal","currentVal","originalOffset","AreaChartModule","BarComponent","roundEdges","noBarWhenZero","hideBar","checkToHideBar","getStartingPath","getPath","getStartOpacity","getRadius","edges","BarChartType","Normalized","D0Types","positive","negative","BarLabelComponent","horizontalPadding","verticalPadding","getSize","formatedValue","valueFormatting","barX","barWidth","barY","barHeight","SeriesVerticalComponent","showDataLabel","dataLabelHeightChanged","barsForDataLabels","updateTooltipSettings","yScaleMin","total","d0Type","reduce","sum","bars","getLabel","bar","offset0","offset1","ariaLabel","tooltipText","dataLabelFormatting","updateDataLabels","section","totalPositive","totalNegative","dataItem","trackDataLabelBy","barLabel","BarVerticalComponent","legend","legendTitle","trimXAxisTicks","trimYAxisTicks","rotateXAxisTicks","maxXAxisTickLength","maxYAxisTickLength","barPadding","roundDomains","dataLabelMaxHeight","xAxis","yAxis","showXAxisLabel","showYAxisLabel","getYScale","setColors","getLegendOptions","yDomain","getYDomain","yAxisTicks","some","yScaleMax","updateYAxisWidth","updateXAxisHeight","onDataLabelMaxHeightChanged","onActivate","fromLegend","entries","onDeactivate","dirIndex","BarChartModule","BoxChartModule","BubbleChartModule","HeatMapModule","LineComponent","initialPath","strokeDasharray","strokeDashoffset","LineSeriesComponent","updateGradients","sortData","lineGen","getLineGenerator","areaGen","getAreaGenerator","hasRange","getRangeGenerator","outerPath","gradientUrl","sortLinear","direction","sortByTime","aDate","getTime","bDate","sortByDomain","bVal","aIdx","bIdx","areaGradientStops","isInactive","LineChartComponent","timelineHeight","timelinePadding","timeline","filteredDomain","seriesDomain","getSeriesDomain","updateTimeline","clipPathId","clipPath","timelineWidth","timelineXDomain","timelineXScale","timelineYScale","timelineTransform","getUniqueXDomainValues","valueSet","getScaleType","checkDateType","xScaleMin","xScaleMax","autoScale","updateDomain","updateHoveredVertical","hoveredVertical","deactivateAll","hideCircles","LineChartModule","PieChartModule","PolarChartModule","NumberCardModule","TreeMapModule","GaugeModule","ngxChartsPolyfills","SVGElement","HTMLDivElement"],"sourceRoot":"webpack:///","sources":["./src/app/shared/component/charts/chart-bar/chart-bar.module.ts","./node_modules/rfdc/index.js","./node_modules/@angular/cdk/fesm2020/portal.mjs","./node_modules/d3-selection/src/selector.js","./node_modules/d3-selection/src/array.js","./node_modules/d3-selection/src/selectorAll.js","./node_modules/d3-selection/src/matcher.js","./node_modules/d3-selection/src/selection/selectChild.js","./node_modules/d3-selection/src/selection/selectChildren.js","./node_modules/d3-selection/src/selection/sparse.js","./node_modules/d3-selection/src/selection/enter.js","./node_modules/d3-selection/src/constant.js","./node_modules/d3-selection/src/selection/data.js","./node_modules/d3-selection/src/selection/sort.js","./node_modules/d3-selection/src/namespaces.js","./node_modules/d3-selection/src/namespace.js","./node_modules/d3-selection/src/selection/attr.js","./node_modules/d3-selection/src/window.js","./node_modules/d3-selection/src/selection/style.js","./node_modules/d3-selection/src/selection/property.js","./node_modules/d3-selection/src/selection/classed.js","./node_modules/d3-selection/src/selection/text.js","./node_modules/d3-selection/src/selection/html.js","./node_modules/d3-selection/src/selection/raise.js","./node_modules/d3-selection/src/selection/lower.js","./node_modules/d3-selection/src/creator.js","./node_modules/d3-selection/src/selection/insert.js","./node_modules/d3-selection/src/selection/remove.js","./node_modules/d3-selection/src/selection/clone.js","./node_modules/d3-selection/src/selection/on.js","./node_modules/d3-selection/src/selection/dispatch.js","./node_modules/d3-selection/src/selection/index.js","./node_modules/d3-selection/src/selection/select.js","./node_modules/d3-selection/src/selection/selectAll.js","./node_modules/d3-selection/src/selection/filter.js","./node_modules/d3-selection/src/selection/exit.js","./node_modules/d3-selection/src/selection/join.js","./node_modules/d3-selection/src/selection/merge.js","./node_modules/d3-selection/src/selection/order.js","./node_modules/d3-selection/src/selection/call.js","./node_modules/d3-selection/src/selection/nodes.js","./node_modules/d3-selection/src/selection/node.js","./node_modules/d3-selection/src/selection/size.js","./node_modules/d3-selection/src/selection/empty.js","./node_modules/d3-selection/src/selection/each.js","./node_modules/d3-selection/src/selection/append.js","./node_modules/d3-selection/src/selection/datum.js","./node_modules/d3-selection/src/selection/iterator.js","./node_modules/d3-selection/src/select.js","./node_modules/d3-dispatch/src/dispatch.js","./node_modules/d3-drag/src/noevent.js","./node_modules/d3-drag/src/nodrag.js","./node_modules/d3-interpolate/node_modules/d3-color/src/define.js","./node_modules/d3-interpolate/node_modules/d3-color/src/color.js","./node_modules/d3-interpolate/src/basis.js","./node_modules/d3-interpolate/src/constant.js","./node_modules/d3-interpolate/src/color.js","./node_modules/d3-interpolate/src/rgb.js","./node_modules/d3-interpolate/src/array.js","./node_modules/d3-interpolate/src/date.js","./node_modules/d3-interpolate/src/number.js","./node_modules/d3-interpolate/src/object.js","./node_modules/d3-interpolate/src/basisClosed.js","./node_modules/d3-interpolate/src/string.js","./node_modules/d3-interpolate/src/numberArray.js","./node_modules/d3-interpolate/src/value.js","./node_modules/d3-selection/src/pointer.js","./node_modules/d3-selection/src/sourceEvent.js","./node_modules/d3-timer/src/timer.js","./node_modules/d3-timer/src/timeout.js","./node_modules/d3-transition/src/transition/schedule.js","./node_modules/d3-transition/src/interrupt.js","./node_modules/d3-interpolate/src/transform/decompose.js","./node_modules/d3-interpolate/src/transform/parse.js","./node_modules/d3-interpolate/src/transform/index.js","./node_modules/d3-transition/src/transition/tween.js","./node_modules/d3-transition/src/transition/interpolate.js","./node_modules/d3-transition/src/transition/attr.js","./node_modules/d3-transition/src/transition/attrTween.js","./node_modules/d3-transition/src/transition/delay.js","./node_modules/d3-transition/src/transition/duration.js","./node_modules/d3-transition/src/transition/ease.js","./node_modules/d3-transition/src/transition/on.js","./node_modules/d3-transition/src/transition/selection.js","./node_modules/d3-transition/src/transition/style.js","./node_modules/d3-transition/src/transition/styleTween.js","./node_modules/d3-transition/src/transition/textTween.js","./node_modules/d3-transition/src/transition/index.js","./node_modules/d3-transition/src/transition/select.js","./node_modules/d3-transition/src/transition/selectAll.js","./node_modules/d3-transition/src/transition/filter.js","./node_modules/d3-transition/src/transition/merge.js","./node_modules/d3-transition/src/transition/transition.js","./node_modules/d3-transition/src/transition/text.js","./node_modules/d3-transition/src/transition/remove.js","./node_modules/d3-transition/src/transition/easeVarying.js","./node_modules/d3-transition/src/transition/end.js","./node_modules/d3-transition/src/selection/transition.js","./node_modules/d3-ease/src/cubic.js","./node_modules/d3-transition/src/selection/index.js","./node_modules/d3-transition/src/selection/interrupt.js","./node_modules/d3-brush/src/constant.js","./node_modules/d3-brush/src/event.js","./node_modules/d3-brush/src/noevent.js","./node_modules/d3-brush/src/brush.js","./node_modules/d3-array/src/ascending.js","./node_modules/d3-array/src/bisector.js","./node_modules/d3-array/src/ticks.js","./node_modules/d3-time/src/duration.js","./node_modules/d3-time/src/interval.js","./node_modules/d3-time/src/millisecond.js","./node_modules/d3-time/src/second.js","./node_modules/d3-time/src/minute.js","./node_modules/d3-time/src/hour.js","./node_modules/d3-time/src/day.js","./node_modules/d3-time/src/week.js","./node_modules/d3-time/src/month.js","./node_modules/d3-time/src/year.js","./node_modules/d3-time/src/utcMinute.js","./node_modules/d3-time/src/utcHour.js","./node_modules/d3-time/src/utcDay.js","./node_modules/d3-time/src/utcWeek.js","./node_modules/d3-time/src/utcMonth.js","./node_modules/d3-time/src/utcYear.js","./node_modules/d3-time/src/ticks.js","./node_modules/d3-time-format/src/locale.js","./node_modules/d3-time-format/src/defaultLocale.js","./node_modules/d3-array/src/number.js","./node_modules/d3-array/src/bisect.js","./node_modules/d3-interpolate/src/round.js","./node_modules/d3-scale/src/number.js","./node_modules/d3-scale/src/continuous.js","./node_modules/d3-scale/src/constant.js","./node_modules/d3-scale/src/init.js","./node_modules/d3-scale/src/time.js","./node_modules/d3-scale/src/nice.js","./node_modules/d3-format/src/formatSpecifier.js","./node_modules/d3-format/src/formatPrefixAuto.js","./node_modules/d3-format/src/formatDecimal.js","./node_modules/d3-format/src/exponent.js","./node_modules/d3-format/src/formatRounded.js","./node_modules/d3-format/src/formatTypes.js","./node_modules/d3-format/src/identity.js","./node_modules/d3-format/src/locale.js","./node_modules/d3-format/src/defaultLocale.js","./node_modules/d3-scale/src/linear.js","./node_modules/d3-scale/src/tickFormat.js","./node_modules/d3-format/src/precisionPrefix.js","./node_modules/d3-format/src/precisionRound.js","./node_modules/d3-format/src/precisionFixed.js","./node_modules/d3-array/src/range.js","./node_modules/d3-format/src/formatGroup.js","./node_modules/d3-format/src/formatNumerals.js","./node_modules/d3-format/src/formatTrim.js","./node_modules/d3-scale/src/ordinal.js","./node_modules/d3-scale/src/band.js","./node_modules/d3-array/src/quantile.js","./node_modules/d3-scale/src/quantile.js","./node_modules/@swimlane/ngx-charts/node_modules/d3-path/src/path.js","./node_modules/@swimlane/ngx-charts/node_modules/d3-shape/src/array.js","./node_modules/@swimlane/ngx-charts/node_modules/d3-shape/src/constant.js","./node_modules/@swimlane/ngx-charts/node_modules/d3-shape/src/curve/linear.js","./node_modules/@swimlane/ngx-charts/node_modules/d3-shape/src/point.js","./node_modules/@swimlane/ngx-charts/node_modules/d3-shape/src/line.js","./node_modules/@swimlane/ngx-charts/node_modules/d3-shape/src/area.js","./node_modules/@swimlane/ngx-charts/fesm2020/swimlane-ngx-charts.mjs"],"sourcesContent":["import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\r\nimport { NgxChartsModule } from '@swimlane/ngx-charts';\r\nimport { MyChartBarComponent } from './chart-bar.component';\r\nimport { SharedModule } from 'src/app/shared/shared.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n MyChartBarComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n NgbModule,\r\n NgxChartsModule,\r\n SharedModule\r\n ],\r\n exports: [\r\n MyChartBarComponent\r\n ]\r\n})\r\nexport class MyChartBarModule { }\r\n","'use strict'\nmodule.exports = rfdc\n\nfunction copyBuffer (cur) {\n if (cur instanceof Buffer) {\n return Buffer.from(cur)\n }\n\n return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length)\n}\n\nfunction rfdc (opts) {\n opts = opts || {}\n\n if (opts.circles) return rfdcCircles(opts)\n return opts.proto ? cloneProto : clone\n\n function cloneArray (a, fn) {\n var keys = Object.keys(a)\n var a2 = new Array(keys.length)\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i]\n var cur = a[k]\n if (typeof cur !== 'object' || cur === null) {\n a2[k] = cur\n } else if (cur instanceof Date) {\n a2[k] = new Date(cur)\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur)\n } else {\n a2[k] = fn(cur)\n }\n }\n return a2\n }\n\n function clone (o) {\n if (typeof o !== 'object' || o === null) return o\n if (o instanceof Date) return new Date(o)\n if (Array.isArray(o)) return cloneArray(o, clone)\n if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone))\n if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone))\n var o2 = {}\n for (var k in o) {\n if (Object.hasOwnProperty.call(o, k) === false) continue\n var cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur instanceof Date) {\n o2[k] = new Date(cur)\n } else if (cur instanceof Map) {\n o2[k] = new Map(cloneArray(Array.from(cur), clone))\n } else if (cur instanceof Set) {\n o2[k] = new Set(cloneArray(Array.from(cur), clone))\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n o2[k] = clone(cur)\n }\n }\n return o2\n }\n\n function cloneProto (o) {\n if (typeof o !== 'object' || o === null) return o\n if (o instanceof Date) return new Date(o)\n if (Array.isArray(o)) return cloneArray(o, cloneProto)\n if (o instanceof Map) return new Map(cloneArray(Array.from(o), cloneProto))\n if (o instanceof Set) return new Set(cloneArray(Array.from(o), cloneProto))\n var o2 = {}\n for (var k in o) {\n var cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur instanceof Date) {\n o2[k] = new Date(cur)\n } else if (cur instanceof Map) {\n o2[k] = new Map(cloneArray(Array.from(cur), cloneProto))\n } else if (cur instanceof Set) {\n o2[k] = new Set(cloneArray(Array.from(cur), cloneProto))\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n o2[k] = cloneProto(cur)\n }\n }\n return o2\n }\n}\n\nfunction rfdcCircles (opts) {\n var refs = []\n var refsNew = []\n\n return opts.proto ? cloneProto : clone\n\n function cloneArray (a, fn) {\n var keys = Object.keys(a)\n var a2 = new Array(keys.length)\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i]\n var cur = a[k]\n if (typeof cur !== 'object' || cur === null) {\n a2[k] = cur\n } else if (cur instanceof Date) {\n a2[k] = new Date(cur)\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur)\n } else {\n var index = refs.indexOf(cur)\n if (index !== -1) {\n a2[k] = refsNew[index]\n } else {\n a2[k] = fn(cur)\n }\n }\n }\n return a2\n }\n\n function clone (o) {\n if (typeof o !== 'object' || o === null) return o\n if (o instanceof Date) return new Date(o)\n if (Array.isArray(o)) return cloneArray(o, clone)\n if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone))\n if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone))\n var o2 = {}\n refs.push(o)\n refsNew.push(o2)\n for (var k in o) {\n if (Object.hasOwnProperty.call(o, k) === false) continue\n var cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur instanceof Date) {\n o2[k] = new Date(cur)\n } else if (cur instanceof Map) {\n o2[k] = new Map(cloneArray(Array.from(cur), clone))\n } else if (cur instanceof Set) {\n o2[k] = new Set(cloneArray(Array.from(cur), clone))\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n var i = refs.indexOf(cur)\n if (i !== -1) {\n o2[k] = refsNew[i]\n } else {\n o2[k] = clone(cur)\n }\n }\n }\n refs.pop()\n refsNew.pop()\n return o2\n }\n\n function cloneProto (o) {\n if (typeof o !== 'object' || o === null) return o\n if (o instanceof Date) return new Date(o)\n if (Array.isArray(o)) return cloneArray(o, cloneProto)\n if (o instanceof Map) return new Map(cloneArray(Array.from(o), cloneProto))\n if (o instanceof Set) return new Set(cloneArray(Array.from(o), cloneProto))\n var o2 = {}\n refs.push(o)\n refsNew.push(o2)\n for (var k in o) {\n var cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur instanceof Date) {\n o2[k] = new Date(cur)\n } else if (cur instanceof Map) {\n o2[k] = new Map(cloneArray(Array.from(cur), cloneProto))\n } else if (cur instanceof Set) {\n o2[k] = new Set(cloneArray(Array.from(cur), cloneProto))\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n var i = refs.indexOf(cur)\n if (i !== -1) {\n o2[k] = refsNew[i]\n } else {\n o2[k] = cloneProto(cur)\n }\n }\n }\n refs.pop()\n refsNew.pop()\n return o2\n }\n}\n","import * as i0 from '@angular/core';\nimport { ElementRef, Injector, Directive, EventEmitter, Inject, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nfunction throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nfunction throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nfunction throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nfunction throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nfunction throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nfunction throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nclass Portal {\n /** Attach this portal to a host. */\n attach(host) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n this._attachedHost = host;\n return host.attach(this);\n }\n /** Detach this portal from its host */\n detach() {\n let host = this._attachedHost;\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n /** Whether this portal is attached to a host. */\n get isAttached() {\n return this._attachedHost != null;\n }\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nclass ComponentPortal extends Portal {\n constructor(component, viewContainerRef, injector, componentFactoryResolver, projectableNodes) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n this.projectableNodes = projectableNodes;\n }\n}\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nclass TemplatePortal extends Portal {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef, \n /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef, \n /** Contextual data to be passed in to the embedded view. */\n context, \n /** The injector to use for the embedded view. */\n injector) {\n super();\n this.templateRef = templateRef;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n this.injector = injector;\n }\n get origin() {\n return this.templateRef.elementRef;\n }\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host, context = this.context) {\n this.context = context;\n return super.attach(host);\n }\n detach() {\n this.context = undefined;\n return super.detach();\n }\n}\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nclass DomPortal extends Portal {\n constructor(element) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nclass BasePortalOutlet {\n constructor() {\n /** Whether this host has already been permanently disposed. */\n this._isDisposed = false;\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n this.attachDomPortal = null;\n }\n /** Whether this host has an attached portal. */\n hasAttached() {\n return !!this._attachedPortal;\n }\n /** Attaches a portal. */\n attach(portal) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n }\n else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n }\n else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n /** Detaches a previously attached portal. */\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n }\n /** Permanently dispose of this portal host. */\n dispose() {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n /** @docs-private */\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass BasePortalHost extends BasePortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nclass DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _componentFactoryResolver Used to resolve the component factory.\n * Only required when attaching component portals.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually\n * become a required parameter.\n */\n constructor(\n /** Element into which the content is projected. */\n outletElement, _componentFactoryResolver, _appRef, _defaultInjector, \n /**\n * @deprecated `_document` Parameter to be made required.\n * @breaking-change 10.0.0\n */\n _document) {\n super();\n this.outletElement = outletElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._defaultInjector = _defaultInjector;\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 10.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n element.parentNode.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n const resolver = (portal.componentFactoryResolver || this._componentFactoryResolver);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) {\n throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.');\n }\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector, portal.projectableNodes || undefined);\n this.setDisposeFn(() => componentRef.destroy());\n }\n else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n componentRef = componentFactory.create(portal.injector || this._defaultInjector || Injector.NULL);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (this._appRef.viewCount > 0) {\n this._appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n return componentRef;\n }\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n this._attachedPortal = portal;\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n /**\n * Clears out a portal from the DOM.\n */\n dispose() {\n super.dispose();\n this.outletElement.remove();\n }\n /** Gets the root HTMLElement for an instantiated component. */\n _getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }\n}\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass DomPortalHost extends DomPortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\nclass CdkPortal extends TemplatePortal {\n constructor(templateRef, viewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\nCdkPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: CdkPortal, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.0\", type: CdkPortal, selector: \"[cdkPortal]\", exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: CdkPortal, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\nclass TemplatePortalDirective extends CdkPortal {\n}\nTemplatePortalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: TemplatePortalDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nTemplatePortalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.0\", type: TemplatePortalDirective, selector: \"[cdk-portal], [portal]\", providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ], exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: TemplatePortalDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ],\n }]\n }] });\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * ``\n */\nclass CdkPortalOutlet extends BasePortalOutlet {\n constructor(_componentFactoryResolver, _viewContainerRef, \n /**\n * @deprecated `_document` parameter to be made required.\n * @breaking-change 9.0.0\n */\n _document) {\n super();\n this._componentFactoryResolver = _componentFactoryResolver;\n this._viewContainerRef = _viewContainerRef;\n /** Whether the portal component is initialized. */\n this._isInitialized = false;\n /** Emits when a portal is attached to the outlet. */\n this.attached = new EventEmitter();\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 9.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n portal.setAttachedHost(this);\n element.parentNode.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /** Portal associated with the Portal outlet. */\n get portal() {\n return this._attachedPortal;\n }\n set portal(portal) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `
`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n if (this.hasAttached()) {\n super.detach();\n }\n if (portal) {\n super.attach(portal);\n }\n this._attachedPortal = portal || null;\n }\n /** Component or view reference that is attached to the portal. */\n get attachedRef() {\n return this._attachedRef;\n }\n ngOnInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector, portal.projectableNodes || undefined);\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild(ref.hostView.rootNodes[0]);\n }\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n return ref;\n }\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n }\n /** Gets the root node of the portal outlet. */\n _getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode);\n }\n}\nCdkPortalOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: CdkPortalOutlet, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nCdkPortalOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.0\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: { portal: [\"cdkPortalOutlet\", \"portal\"] }, outputs: { attached: \"attached\" }, exportAs: [\"cdkPortalOutlet\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: CdkPortalOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n inputs: ['portal: cdkPortalOutlet'],\n }]\n }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { attached: [{\n type: Output\n }] } });\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass PortalHostDirective extends CdkPortalOutlet {\n}\nPortalHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: PortalHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPortalHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.0\", type: PortalHostDirective, selector: \"[cdkPortalHost], [portalHost]\", inputs: { portal: [\"cdkPortalHost\", \"portal\"] }, providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ], exportAs: [\"cdkPortalHost\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: PortalHostDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: ['portal: cdkPortalHost'],\n providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ],\n }]\n }] });\nclass PortalModule {\n}\nPortalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: PortalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPortalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.0\", ngImport: i0, type: PortalModule, declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] });\nPortalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: PortalModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: PortalModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n * @deprecated Use `Injector.create` instead.\n * @breaking-change 11.0.0\n */\nclass PortalInjector {\n constructor(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n get(token, notFoundValue) {\n const value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.get(token, notFoundValue);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","export default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return this.children;\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport array from \"../array.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = array(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n","import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n var group = select.apply(this, arguments);\n return group == null ? [] : array(group);\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n if (onupdate != null) update = onupdate(update);\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(selection) {\n if (!(selection instanceof Selection)) throw new Error(\"invalid merge\");\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n","export default function() {\n return !this.node();\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n","import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {select} from \"d3-selection\";\nimport noevent from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, true);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, true);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, true);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","export default x => () => x;\n","export default function BrushEvent(type, {\n sourceEvent,\n target,\n selection,\n mode,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n selection: {value: selection, enumerable: true, configurable: true},\n mode: {value: mode, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n MODE_SPACE = {name: \"space\"},\n MODE_HANDLE = {name: \"handle\"},\n MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function(xy) { return xy == null ? null : number2(xy); },\n output: function(xy) { return xy; }\n};\n\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\n\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\n\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\n\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0]\n || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n return brush(X);\n}\n\nexport function brushY() {\n return brush(Y);\n}\n\nexport default function() {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group\n .property(\"__brush\", initialize)\n .selectAll(\".overlay\")\n .data([type(\"overlay\")]);\n\n overlay.enter().append(\"rect\")\n .attr(\"class\", \"overlay\")\n .attr(\"pointer-events\", \"all\")\n .attr(\"cursor\", cursors.overlay)\n .merge(overlay)\n .each(function() {\n var extent = local(this).extent;\n select(this)\n .attr(\"x\", extent[0][0])\n .attr(\"y\", extent[0][1])\n .attr(\"width\", extent[1][0] - extent[0][0])\n .attr(\"height\", extent[1][1] - extent[0][1]);\n });\n\n group.selectAll(\".selection\")\n .data([type(\"selection\")])\n .enter().append(\"rect\")\n .attr(\"class\", \"selection\")\n .attr(\"cursor\", cursors.selection)\n .attr(\"fill\", \"#777\")\n .attr(\"fill-opacity\", 0.3)\n .attr(\"stroke\", \"#fff\")\n .attr(\"shape-rendering\", \"crispEdges\");\n\n var handle = group.selectAll(\".handle\")\n .data(dim.handles, function(d) { return d.type; });\n\n handle.exit().remove();\n\n handle.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n group\n .each(redraw)\n .attr(\"fill\", \"none\")\n .attr(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", started)\n .filter(touchable)\n .on(\"touchstart.brush\", started)\n .on(\"touchmove.brush\", touchmoved)\n .on(\"touchend.brush touchcancel.brush\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function(group, selection) {\n if (group.tween) {\n group\n .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n .tween(\"brush\", function() {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group\n .each(function() {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start().brush().end();\n });\n }\n };\n\n brush.clear = function(group) {\n brush.move(group, null);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\")\n .style(\"display\", null)\n .attr(\"x\", selection[0][0])\n .attr(\"y\", selection[0][1])\n .attr(\"width\", selection[1][0] - selection[0][0])\n .attr(\"height\", selection[1][1] - selection[0][1]);\n\n group.selectAll(\".handle\")\n .style(\"display\", null)\n .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n }\n\n else {\n group.selectAll(\".selection,.handle\")\n .style(\"display\", \"none\")\n .attr(\"x\", null)\n .attr(\"y\", null)\n .attr(\"width\", null)\n .attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function(event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n else this.emit(\"brush\", event);\n return this;\n },\n brush: function(event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function(event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function(type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function started(event) {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0], w0, w1,\n N = extent[0][1], n0, n1,\n E = extent[1][0], e0, e1,\n S = extent[1][1], s0, s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[\n w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n ], [\n e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n ]];\n if (points.length > 1) move();\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n\n var group = select(that)\n .attr(\"pointer-events\", \"none\");\n\n var overlay = group.selectAll(\".overlay\")\n .attr(\"cursor\", cursors[type]);\n\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view)\n .on(\"mousemove.brush\", moved, true)\n .on(\"mouseup.brush\", ended, true);\n if (keys) view\n .on(\"keydown.brush\", keydowned, true)\n .on(\"keyup.brush\", keyupped, true)\n\n dragDisable(event.view);\n }\n\n redraw.call(that);\n emit.start(event, mode.name);\n\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points)\n if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n lockY = true;\n else\n lockX = true;\n }\n for (const point of points)\n if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n\n function move(event) {\n const point = points[0], point0 = point.point0;\n var t;\n\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG: {\n if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1\n || selection[0][1] !== n1\n || selection[1][0] !== e1\n || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush(event, mode.name);\n }\n }\n\n function ended(event) {\n nopropagation(event);\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end(event, mode.name);\n }\n\n function keydowned(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18: { // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move();\n }\n break;\n }\n case 32: { // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move();\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n\n function keyupped(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move();\n }\n break;\n }\n case 18: { // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move();\n }\n break;\n }\n case 32: { // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move();\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n }\n\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n\n function touchended(event) {\n emitter(this, arguments).ended(event);\n }\n\n function initialize() {\n var state = this.__brush || {selection: null};\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function(_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function(_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n if (r0 * step < start) ++r0;\n if (r1 * step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) * step;\n } else {\n step = -step;\n let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n if (r0 / step < start) ++r0;\n if (r1 / step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","var t0 = new Date,\n t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n}\n","import interval from \"./interval.js\";\n\nvar millisecond = interval(function() {\n // noop\n}, function(date, step) {\n date.setTime(+date + step);\n}, function(start, end) {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function(date) {\n date.setTime(Math.floor(date / k) * k);\n }, function(date, step) {\n date.setTime(+date + step * k);\n }, function(start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n","import interval from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nvar second = interval(function(date) {\n date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n return (end - start) / durationSecond;\n}, function(date) {\n return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nvar minute = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n","import interval from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nvar hour = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n","import interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport default day;\nexport var days = day.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval.js\";\n\nvar month = interval(function(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n","import interval from \"./interval.js\";\n\nvar year = interval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function(date) {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;\n","import interval from \"./interval.js\";\nimport {durationMinute} from \"./duration.js\";\n\nvar utcMinute = interval(function(date) {\n date.setUTCSeconds(0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n","import interval from \"./interval.js\";\nimport {durationHour} from \"./duration.js\";\n\nvar utcHour = interval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n","import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\n\nvar utcDay = interval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n return (end - start) / durationDay;\n}, function(date) {\n return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval.js\";\nimport {durationWeek} from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval.js\";\n\nvar utcMonth = interval(function(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n","import interval from \"./interval.js\";\n\nvar utcYear = interval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport millisecond from \"./millisecond.js\";\nimport second from \"./second.js\";\nimport minute from \"./minute.js\";\nimport hour from \"./hour.js\";\nimport day from \"./day.js\";\nimport {sunday as week} from \"./week.js\";\nimport month from \"./month.js\";\nimport year from \"./year.js\";\nimport utcMinute from \"./utcMinute.js\";\nimport utcHour from \"./utcHour.js\";\nimport utcDay from \"./utcDay.js\";\nimport {utcSunday as utcWeek} from \"./utcWeek.js\";\nimport utcMonth from \"./utcMonth.js\";\nimport utcYear from \"./utcYear.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(year, month, week, day, hour, minute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","export default function number(x) {\n return +x;\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n","export default function constants(x) {\n return function() {\n return x;\n };\n}\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new Map(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n var key = d + \"\", i = index.get(key);\n if (!i) {\n if (unknown !== implicit) return unknown;\n index.set(key, i = domain.push(d));\n }\n return range[(i - 1) % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new Map();\n for (const value of _) {\n const key = value + \"\";\n if (index.has(key)) continue;\n index.set(key, domain.push(value));\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n r0 = 0,\n r1 = 1,\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = r1 < r0,\n start = reverse ? r1 : r0,\n stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function(i) { return start + step * i; });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n };\n\n scale.rangeRound = function(_) {\n return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n };\n\n scale.bandwidth = function() {\n return bandwidth;\n };\n\n scale.step = function() {\n return step;\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function(_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function(_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function() {\n return band(domain(), [r0, r1])\n .round(round)\n .paddingInner(paddingInner)\n .paddingOuter(paddingOuter)\n .align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function() {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}\n","import max from \"./max.js\";\nimport min from \"./min.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n","import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0, n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [\n i > 0 ? thresholds[i - 1] : domain[0],\n i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n ];\n };\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function() {\n return thresholds.slice();\n };\n\n scale.copy = function() {\n return quantile()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import {path} from \"d3-path\";\nimport array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import {path} from \"d3-path\";\nimport array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? pointY : constant(+y1);\n\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","import * as i0 from '@angular/core';\nimport { PLATFORM_ID, Component, ViewEncapsulation, Inject, Input, ViewChild, HostBinding, HostListener, Injectable, ChangeDetectionStrategy, EventEmitter, Output, Directive, NgModule, ContentChild } from '@angular/core';\nimport * as i2 from '@angular/common';\nimport { isPlatformBrowser, isPlatformServer, CommonModule } from '@angular/common';\nimport { __decorate } from 'tslib';\nimport { DomPortalOutlet, ComponentPortal } from '@angular/cdk/portal';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { select } from 'd3-selection';\nimport { brushX } from 'd3-brush';\nimport { scaleTime, scaleLinear, scalePoint, scaleOrdinal, scaleQuantile, scaleBand } from 'd3-scale';\nimport { area, curveLinear, line, arc, lineRadial, curveCardinalClosed, pie } from 'd3-shape';\nimport { range, min, max, quantile } from 'd3-array';\nimport { interpolate } from 'd3-interpolate';\nimport { easeSinInOut } from 'd3-ease';\nimport rfdc from 'rfdc';\nimport { format } from 'd3-format';\nimport * as d3_color from 'd3-color';\nimport { treemap, stratify } from 'd3-hierarchy';\nimport { timeFormat } from 'd3-time-format';\n\n/**\n * Throttle a function\n *\n */\nfunction throttle(func, wait, options) {\n options = options || {};\n let context;\n let args;\n let result;\n let timeout = null;\n let previous = 0;\n function later() {\n previous = options.leading === false ? 0 : +new Date();\n timeout = null;\n result = func.apply(context, args);\n }\n return function () {\n const now = +new Date();\n if (!previous && options.leading === false) {\n previous = now;\n }\n const remaining = wait - (now - previous);\n context = this;\n // eslint-disable-next-line prefer-rest-params\n args = arguments;\n if (remaining <= 0) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n}\n/**\n * Throttle decorator\n *\n * class MyClass {\n * throttleable(10)\n * myFn() { ... }\n * }\n */\nfunction throttleable(duration, options) {\n return function innerDecorator(target, key, descriptor) {\n return {\n configurable: true,\n enumerable: descriptor.enumerable,\n get: function getter() {\n Object.defineProperty(this, key, {\n configurable: true,\n enumerable: descriptor.enumerable,\n value: throttle(descriptor.value, duration, options)\n });\n return this[key];\n }\n };\n };\n}\n\nvar PlacementTypes;\n(function (PlacementTypes) {\n PlacementTypes[\"Top\"] = \"top\";\n PlacementTypes[\"Bottom\"] = \"bottom\";\n PlacementTypes[\"Left\"] = \"left\";\n PlacementTypes[\"Right\"] = \"right\";\n PlacementTypes[\"Center\"] = \"center\";\n})(PlacementTypes || (PlacementTypes = {}));\n\nconst caretOffset = 7;\nfunction verticalPosition(elDimensions, popoverDimensions, alignment) {\n if (alignment === PlacementTypes.Top) {\n return elDimensions.top - caretOffset;\n }\n if (alignment === PlacementTypes.Bottom) {\n return elDimensions.top + elDimensions.height - popoverDimensions.height + caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n return elDimensions.top + elDimensions.height / 2 - popoverDimensions.height / 2;\n }\n return undefined;\n}\nfunction horizontalPosition(elDimensions, popoverDimensions, alignment) {\n if (alignment === PlacementTypes.Left) {\n return elDimensions.left - caretOffset;\n }\n if (alignment === PlacementTypes.Right) {\n return elDimensions.left + elDimensions.width - popoverDimensions.width + caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n return elDimensions.left + elDimensions.width / 2 - popoverDimensions.width / 2;\n }\n return undefined;\n}\n/**\n * Position helper for the popover directive.\n *\n * @export\n */\nclass PositionHelper {\n /**\n * Calculate vertical alignment position\n *\n * @memberOf PositionHelper\n */\n static calculateVerticalAlignment(elDimensions, popoverDimensions, alignment) {\n let result = verticalPosition(elDimensions, popoverDimensions, alignment);\n if (result + popoverDimensions.height > window.innerHeight) {\n result = window.innerHeight - popoverDimensions.height;\n }\n return result;\n }\n /**\n * Calculate vertical caret position\n *\n * @memberOf PositionHelper\n */\n static calculateVerticalCaret(elDimensions, popoverDimensions, caretDimensions, alignment) {\n let result;\n if (alignment === PlacementTypes.Top) {\n result = elDimensions.height / 2 - caretDimensions.height / 2 + caretOffset;\n }\n if (alignment === PlacementTypes.Bottom) {\n result = popoverDimensions.height - elDimensions.height / 2 - caretDimensions.height / 2 - caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n result = popoverDimensions.height / 2 - caretDimensions.height / 2;\n }\n const popoverPosition = verticalPosition(elDimensions, popoverDimensions, alignment);\n if (popoverPosition + popoverDimensions.height > window.innerHeight) {\n result += popoverPosition + popoverDimensions.height - window.innerHeight;\n }\n return result;\n }\n /**\n * Calculate horz alignment position\n *\n * @memberOf PositionHelper\n */\n static calculateHorizontalAlignment(elDimensions, popoverDimensions, alignment) {\n let result = horizontalPosition(elDimensions, popoverDimensions, alignment);\n if (result + popoverDimensions.width > window.innerWidth) {\n result = window.innerWidth - popoverDimensions.width;\n }\n return result;\n }\n /**\n * Calculate horz caret position\n *\n * @memberOf PositionHelper\n */\n static calculateHorizontalCaret(elDimensions, popoverDimensions, caretDimensions, alignment) {\n let result;\n if (alignment === PlacementTypes.Left) {\n result = elDimensions.width / 2 - caretDimensions.width / 2 + caretOffset;\n }\n if (alignment === PlacementTypes.Right) {\n result = popoverDimensions.width - elDimensions.width / 2 - caretDimensions.width / 2 - caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n result = popoverDimensions.width / 2 - caretDimensions.width / 2;\n }\n const popoverPosition = horizontalPosition(elDimensions, popoverDimensions, alignment);\n if (popoverPosition + popoverDimensions.width > window.innerWidth) {\n result += popoverPosition + popoverDimensions.width - window.innerWidth;\n }\n return result;\n }\n /**\n * Checks if the element's position should be flipped\n *\n * @memberOf PositionHelper\n */\n static shouldFlip(elDimensions, popoverDimensions, placement, spacing) {\n let flip = false;\n if (placement === PlacementTypes.Right) {\n if (elDimensions.left + elDimensions.width + popoverDimensions.width + spacing > window.innerWidth) {\n flip = true;\n }\n }\n if (placement === PlacementTypes.Left) {\n if (elDimensions.left - popoverDimensions.width - spacing < 0) {\n flip = true;\n }\n }\n if (placement === PlacementTypes.Top) {\n if (elDimensions.top - popoverDimensions.height - spacing < 0) {\n flip = true;\n }\n }\n if (placement === PlacementTypes.Bottom) {\n if (elDimensions.top + elDimensions.height + popoverDimensions.height + spacing > window.innerHeight) {\n flip = true;\n }\n }\n return flip;\n }\n /**\n * Position caret\n *\n * @memberOf PositionHelper\n */\n static positionCaret(placement, elmDim, hostDim, caretDimensions, alignment) {\n let top = 0;\n let left = 0;\n if (placement === PlacementTypes.Right) {\n left = -7;\n top = PositionHelper.calculateVerticalCaret(hostDim, elmDim, caretDimensions, alignment);\n }\n else if (placement === PlacementTypes.Left) {\n left = elmDim.width;\n top = PositionHelper.calculateVerticalCaret(hostDim, elmDim, caretDimensions, alignment);\n }\n else if (placement === PlacementTypes.Top) {\n top = elmDim.height;\n left = PositionHelper.calculateHorizontalCaret(hostDim, elmDim, caretDimensions, alignment);\n }\n else if (placement === PlacementTypes.Bottom) {\n top = -7;\n left = PositionHelper.calculateHorizontalCaret(hostDim, elmDim, caretDimensions, alignment);\n }\n return { top, left };\n }\n /**\n * Position content\n *\n * @memberOf PositionHelper\n */\n static positionContent(placement, elmDim, hostDim, spacing, alignment) {\n let top = 0;\n let left = 0;\n if (placement === PlacementTypes.Right) {\n left = hostDim.left + hostDim.width + spacing;\n top = PositionHelper.calculateVerticalAlignment(hostDim, elmDim, alignment);\n }\n else if (placement === PlacementTypes.Left) {\n left = hostDim.left - elmDim.width - spacing;\n top = PositionHelper.calculateVerticalAlignment(hostDim, elmDim, alignment);\n }\n else if (placement === PlacementTypes.Top) {\n top = hostDim.top - elmDim.height - spacing;\n left = PositionHelper.calculateHorizontalAlignment(hostDim, elmDim, alignment);\n }\n else if (placement === PlacementTypes.Bottom) {\n top = hostDim.top + hostDim.height + spacing;\n left = PositionHelper.calculateHorizontalAlignment(hostDim, elmDim, alignment);\n }\n return { top, left };\n }\n /**\n * Determine placement based on flip\n *\n * @memberOf PositionHelper\n */\n static determinePlacement(placement, elmDim, hostDim, spacing) {\n const shouldFlip = PositionHelper.shouldFlip(hostDim, elmDim, placement, spacing);\n if (shouldFlip) {\n if (placement === PlacementTypes.Right) {\n return PlacementTypes.Left;\n }\n else if (placement === PlacementTypes.Left) {\n return PlacementTypes.Right;\n }\n else if (placement === PlacementTypes.Top) {\n return PlacementTypes.Bottom;\n }\n else if (placement === PlacementTypes.Bottom) {\n return PlacementTypes.Top;\n }\n }\n return placement;\n }\n}\n\nclass TooltipContentComponent {\n constructor(element, renderer, platformId) {\n this.element = element;\n this.renderer = renderer;\n this.platformId = platformId;\n }\n get cssClasses() {\n let clz = 'ngx-charts-tooltip-content';\n clz += ` position-${this.placement}`;\n clz += ` type-${this.type}`;\n clz += ` ${this.cssClass}`;\n return clz;\n }\n ngAfterViewInit() {\n setTimeout(this.position.bind(this));\n }\n position() {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const nativeElm = this.element.nativeElement;\n const hostDim = this.host.nativeElement.getBoundingClientRect();\n // if no dims were found, never show\n if (!hostDim.height && !hostDim.width)\n return;\n const elmDim = nativeElm.getBoundingClientRect();\n this.checkFlip(hostDim, elmDim);\n this.positionContent(nativeElm, hostDim, elmDim);\n if (this.showCaret) {\n this.positionCaret(hostDim, elmDim);\n }\n // animate its entry\n setTimeout(() => this.renderer.addClass(nativeElm, 'animate'), 1);\n }\n positionContent(nativeElm, hostDim, elmDim) {\n const { top, left } = PositionHelper.positionContent(this.placement, elmDim, hostDim, this.spacing, this.alignment);\n this.renderer.setStyle(nativeElm, 'top', `${top}px`);\n this.renderer.setStyle(nativeElm, 'left', `${left}px`);\n }\n positionCaret(hostDim, elmDim) {\n const caretElm = this.caretElm.nativeElement;\n const caretDimensions = caretElm.getBoundingClientRect();\n const { top, left } = PositionHelper.positionCaret(this.placement, elmDim, hostDim, caretDimensions, this.alignment);\n this.renderer.setStyle(caretElm, 'top', `${top}px`);\n this.renderer.setStyle(caretElm, 'left', `${left}px`);\n }\n checkFlip(hostDim, elmDim) {\n this.placement = PositionHelper.determinePlacement(this.placement, elmDim, hostDim, this.spacing);\n }\n onWindowResize() {\n this.position();\n }\n}\nTooltipContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipContentComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nTooltipContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: TooltipContentComponent, selector: \"ngx-tooltip-content\", inputs: { host: \"host\", showCaret: \"showCaret\", type: \"type\", placement: \"placement\", alignment: \"alignment\", spacing: \"spacing\", cssClass: \"cssClass\", title: \"title\", template: \"template\", context: \"context\" }, host: { listeners: { \"window:resize\": \"onWindowResize()\" }, properties: { \"class\": \"this.cssClasses\" } }, viewQueries: [{ propertyName: \"caretElm\", first: true, predicate: [\"caretElm\"], descendants: true }], ngImport: i0, template: `\n
\n \n
\n \n \n \n \n
\n
\n `, isInline: true, styles: [\".ngx-charts-tooltip-content{position:fixed;border-radius:3px;z-index:5000;display:block;font-weight:400;opacity:0;pointer-events:none!important}.ngx-charts-tooltip-content.type-popover{background:#fff;color:#060709;border:1px solid #72809b;box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #fff}.ngx-charts-tooltip-content.type-tooltip{color:#fff;background:rgba(0,0,0,.75);font-size:12px;padding:0 10px;text-align:center;pointer-events:auto}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content .tooltip-label{display:block;line-height:1em;padding:8px 5px 5px;font-size:1em}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.position-right{transform:translate(10px)}.ngx-charts-tooltip-content.position-left{transform:translate(-10px)}.ngx-charts-tooltip-content.position-top{transform:translateY(-10px)}.ngx-charts-tooltip-content.position-bottom{transform:translateY(10px)}.ngx-charts-tooltip-content.animate{opacity:1;transition:opacity .3s,transform .3s;transform:translate(0);pointer-events:auto}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{text-align:left;line-height:1.2em;padding:5px 0}.tooltip-item .tooltip-item-color{display:inline-block;height:12px;width:12px;margin-right:5px;color:#5b646b;border-radius:3px}\\n\"], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\"] }], encapsulation: i0.ViewEncapsulation.None });\n__decorate([\n throttleable(100)\n], TooltipContentComponent.prototype, \"onWindowResize\", null);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipContentComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-tooltip-content', template: `\n
\n \n
\n \n \n \n \n
\n
\n `, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-tooltip-content{position:fixed;border-radius:3px;z-index:5000;display:block;font-weight:400;opacity:0;pointer-events:none!important}.ngx-charts-tooltip-content.type-popover{background:#fff;color:#060709;border:1px solid #72809b;box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #fff}.ngx-charts-tooltip-content.type-tooltip{color:#fff;background:rgba(0,0,0,.75);font-size:12px;padding:0 10px;text-align:center;pointer-events:auto}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content .tooltip-label{display:block;line-height:1em;padding:8px 5px 5px;font-size:1em}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.position-right{transform:translate(10px)}.ngx-charts-tooltip-content.position-left{transform:translate(-10px)}.ngx-charts-tooltip-content.position-top{transform:translateY(-10px)}.ngx-charts-tooltip-content.position-bottom{transform:translateY(10px)}.ngx-charts-tooltip-content.animate{opacity:1;transition:opacity .3s,transform .3s;transform:translate(0);pointer-events:auto}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{text-align:left;line-height:1.2em;padding:5px 0}.tooltip-item .tooltip-item-color{display:inline-block;height:12px;width:12px;margin-right:5px;color:#5b646b;border-radius:3px}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { host: [{\n type: Input\n }], showCaret: [{\n type: Input\n }], type: [{\n type: Input\n }], placement: [{\n type: Input\n }], alignment: [{\n type: Input\n }], spacing: [{\n type: Input\n }], cssClass: [{\n type: Input\n }], title: [{\n type: Input\n }], template: [{\n type: Input\n }], context: [{\n type: Input\n }], caretElm: [{\n type: ViewChild,\n args: ['caretElm']\n }], cssClasses: [{\n type: HostBinding,\n args: ['class']\n }], onWindowResize: [{\n type: HostListener,\n args: ['window:resize']\n }] } });\n\nclass InjectionRegisteryService {\n constructor(injectionService) {\n this.injectionService = injectionService;\n this.defaults = {};\n this.components = new Map();\n }\n getByType(type = this.type) {\n return this.components.get(type);\n }\n create(bindings) {\n return this.createByType(this.type, bindings);\n }\n createByType(type, bindings) {\n bindings = this.assignDefaults(bindings);\n const component = this.injectComponent(type, bindings);\n this.register(type, component);\n return component;\n }\n destroy(instance) {\n const compsByType = this.components.get(instance.componentType);\n if (compsByType && compsByType.length) {\n const idx = compsByType.indexOf(instance);\n if (idx > -1) {\n const component = compsByType[idx];\n component.destroy();\n compsByType.splice(idx, 1);\n }\n }\n }\n destroyAll() {\n this.destroyByType(this.type);\n }\n destroyByType(type) {\n const comps = this.components.get(type);\n if (comps && comps.length) {\n let i = comps.length - 1;\n while (i >= 0) {\n this.destroy(comps[i--]);\n }\n }\n }\n injectComponent(type, bindings) {\n return this.injectionService.appendComponent(type, bindings);\n }\n assignDefaults(bindings) {\n const inputs = { ...this.defaults.inputs };\n const outputs = { ...this.defaults.outputs };\n if (!bindings.inputs && !bindings.outputs) {\n bindings = { inputs: bindings };\n }\n if (inputs) {\n bindings.inputs = { ...inputs, ...bindings.inputs };\n }\n if (outputs) {\n bindings.outputs = { ...outputs, ...bindings.outputs };\n }\n return bindings;\n }\n register(type, component) {\n if (!this.components.has(type)) {\n this.components.set(type, []);\n }\n const types = this.components.get(type);\n types.push(component);\n }\n}\n\nfunction isViewContainerRef(x) {\n return x.element;\n}\n/**\n * Injection service is a helper to append components\n * dynamically to a known location in the DOM, most\n * noteably for dialogs/tooltips appending to body.\n *\n * @export\n */\nclass InjectionService {\n constructor(applicationRef, componentFactoryResolver, injector) {\n this.applicationRef = applicationRef;\n this.componentFactoryResolver = componentFactoryResolver;\n this.injector = injector;\n }\n /**\n * Sets a default global root view container. This is useful for\n * things like ngUpgrade that doesn't have a ApplicationRef root.\n *\n * @param container\n */\n static setGlobalRootViewContainer(container) {\n InjectionService.globalRootViewContainer = container;\n }\n /**\n * Gets the root view container to inject the component to.\n *\n * @memberOf InjectionService\n */\n getRootViewContainer() {\n if (this._container)\n return this._container;\n if (InjectionService.globalRootViewContainer)\n return InjectionService.globalRootViewContainer;\n if (this.applicationRef.components.length)\n return this.applicationRef.components[0];\n throw new Error('View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.');\n }\n /**\n * Overrides the default root view container. This is useful for\n * things like ngUpgrade that doesn't have a ApplicationRef root.\n *\n * @param container\n *\n * @memberOf InjectionService\n */\n setRootViewContainer(container) {\n this._container = container;\n }\n /**\n * Gets the html element for a component ref.\n *\n * @param componentRef\n *\n * @memberOf InjectionService\n */\n getComponentRootNode(component) {\n if (isViewContainerRef(component)) {\n return component.element.nativeElement;\n }\n if (component.hostView && component.hostView.rootNodes.length > 0) {\n return component.hostView.rootNodes[0];\n }\n // the top most component root node has no `hostView`\n return component.location.nativeElement;\n }\n /**\n * Gets the root component container html element.\n *\n * @memberOf InjectionService\n */\n getRootViewContainerNode(component) {\n return this.getComponentRootNode(component);\n }\n /**\n * Projects the bindings onto the component\n *\n * @param component\n * @param options\n *\n * @memberOf InjectionService\n */\n projectComponentBindings(component, bindings) {\n if (bindings) {\n if (bindings.inputs !== undefined) {\n const bindingKeys = Object.getOwnPropertyNames(bindings.inputs);\n for (const bindingName of bindingKeys) {\n component.instance[bindingName] = bindings.inputs[bindingName];\n }\n }\n if (bindings.outputs !== undefined) {\n const eventKeys = Object.getOwnPropertyNames(bindings.outputs);\n for (const eventName of eventKeys) {\n component.instance[eventName] = bindings.outputs[eventName];\n }\n }\n }\n return component;\n }\n /**\n * Appends a component to a adjacent location\n *\n * @param componentClass\n * @param [options={}]\n * @param [location]\n *\n * @memberOf InjectionService\n */\n appendComponent(componentClass, bindings = {}, location) {\n if (!location)\n location = this.getRootViewContainer();\n const appendLocation = this.getComponentRootNode(location);\n const portalHost = new DomPortalOutlet(appendLocation, this.componentFactoryResolver, this.applicationRef, this.injector);\n const portal = new ComponentPortal(componentClass);\n const componentRef = portalHost.attach(portal);\n this.projectComponentBindings(componentRef, bindings);\n return componentRef;\n }\n}\nInjectionService.globalRootViewContainer = null;\nInjectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: InjectionService, deps: [{ token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });\nInjectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: InjectionService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: InjectionService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; } });\n\nclass TooltipService extends InjectionRegisteryService {\n constructor(injectionService) {\n super(injectionService);\n this.type = TooltipContentComponent;\n }\n}\nTooltipService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipService, deps: [{ token: InjectionService }], target: i0.ɵɵFactoryTarget.Injectable });\nTooltipService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: InjectionService }]; } });\n\nvar LegendPosition;\n(function (LegendPosition) {\n LegendPosition[\"Right\"] = \"right\";\n LegendPosition[\"Below\"] = \"below\";\n})(LegendPosition || (LegendPosition = {}));\nvar LegendType;\n(function (LegendType) {\n LegendType[\"ScaleLegend\"] = \"scaleLegend\";\n LegendType[\"Legend\"] = \"legend\";\n})(LegendType || (LegendType = {}));\n\nvar ScaleType;\n(function (ScaleType) {\n ScaleType[\"Time\"] = \"time\";\n ScaleType[\"Linear\"] = \"linear\";\n ScaleType[\"Ordinal\"] = \"ordinal\";\n ScaleType[\"Quantile\"] = \"quantile\";\n})(ScaleType || (ScaleType = {}));\n\nclass ScaleLegendComponent {\n constructor() {\n this.horizontal = false;\n }\n ngOnChanges(changes) {\n const gradientValues = this.gradientString(this.colors.range(), this.colors.domain());\n const direction = this.horizontal ? 'right' : 'bottom';\n this.gradient = `linear-gradient(to ${direction}, ${gradientValues})`;\n }\n /**\n * Generates the string used in the gradient stylesheet properties\n * @param colors array of colors\n * @param splits array of splits on a scale of (0, 1)\n */\n gradientString(colors, splits) {\n // add the 100%\n splits.push(1);\n const pairs = [];\n colors.reverse().forEach((c, i) => {\n pairs.push(`${c} ${Math.round(splits[i] * 100)}%`);\n });\n return pairs.join(', ');\n }\n}\nScaleLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ScaleLegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nScaleLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: ScaleLegendComponent, selector: \"ngx-charts-scale-legend\", inputs: { valueRange: \"valueRange\", colors: \"colors\", height: \"height\", width: \"width\", horizontal: \"horizontal\" }, usesOnChanges: true, ngImport: i0, template: `\n \n
\n {{ valueRange[1].toLocaleString() }}\n
\n
\n
\n {{ valueRange[0].toLocaleString() }}\n
\n
\n `, isInline: true, styles: [\".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{text-align:center;display:flex;flex-direction:column}.chart-legend .scale-legend-wrap{display:inline-block;flex:1;width:30px;border-radius:5px;margin:0 auto}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{width:auto;height:30px;margin:0 16px}\\n\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ScaleLegendComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-scale-legend', template: `\n \n
\n {{ valueRange[1].toLocaleString() }}\n
\n
\n
\n {{ valueRange[0].toLocaleString() }}\n
\n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{text-align:center;display:flex;flex-direction:column}.chart-legend .scale-legend-wrap{display:inline-block;flex:1;width:30px;border-radius:5px;margin:0 auto}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{width:auto;height:30px;margin:0 16px}\\n\"] }]\n }], propDecorators: { valueRange: [{\n type: Input\n }], colors: [{\n type: Input\n }], height: [{\n type: Input\n }], width: [{\n type: Input\n }], horizontal: [{\n type: Input\n }] } });\n\n/**\n * Formats a label given a date, number or string.\n *\n * @export\n */\nfunction formatLabel(label) {\n if (label instanceof Date) {\n label = label.toLocaleDateString();\n }\n else {\n label = label.toLocaleString();\n }\n return label;\n}\n/**\n * Escapes a label.\n *\n * @export\n */\nfunction escapeLabel(label) {\n return label.toLocaleString().replace(/[&'`\"<>]/g, match => {\n return {\n '&': '&',\n // tslint:disable-next-line: quotemark\n \"'\": ''',\n '`': '`',\n '\"': '"',\n '<': '<',\n '>': '>'\n }[match];\n });\n}\n\nclass LegendEntryComponent {\n constructor() {\n this.isActive = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.toggle = new EventEmitter();\n }\n get trimmedLabel() {\n return this.formattedLabel || '(empty)';\n }\n onMouseEnter() {\n this.activate.emit({ name: this.label });\n }\n onMouseLeave() {\n this.deactivate.emit({ name: this.label });\n }\n}\nLegendEntryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LegendEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nLegendEntryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: LegendEntryComponent, selector: \"ngx-charts-legend-entry\", inputs: { color: \"color\", label: \"label\", formattedLabel: \"formattedLabel\", isActive: \"isActive\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\", toggle: \"toggle\" }, host: { listeners: { \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave()\" } }, ngImport: i0, template: `\n \n \n \n {{ trimmedLabel }}\n \n \n `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LegendEntryComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'ngx-charts-legend-entry',\n template: `\n \n \n \n {{ trimmedLabel }}\n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { color: [{\n type: Input\n }], label: [{\n type: Input\n }], formattedLabel: [{\n type: Input\n }], isActive: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], toggle: [{\n type: Output\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass LegendComponent {\n constructor(cd) {\n this.cd = cd;\n this.horizontal = false;\n this.labelClick = new EventEmitter();\n this.labelActivate = new EventEmitter();\n this.labelDeactivate = new EventEmitter();\n this.legendEntries = [];\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.cd.markForCheck();\n this.legendEntries = this.getLegendEntries();\n }\n getLegendEntries() {\n const items = [];\n for (const label of this.data) {\n const formattedLabel = formatLabel(label);\n const idx = items.findIndex(i => {\n return i.label === formattedLabel;\n });\n if (idx === -1) {\n items.push({\n label,\n formattedLabel,\n color: this.colors.getColor(label)\n });\n }\n }\n return items;\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.label === d.name;\n });\n return item !== undefined;\n }\n activate(item) {\n this.labelActivate.emit(item);\n }\n deactivate(item) {\n this.labelDeactivate.emit(item);\n }\n trackBy(index, item) {\n return item.label;\n }\n}\nLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LegendComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: LegendComponent, selector: \"ngx-charts-legend\", inputs: { data: \"data\", title: \"title\", colors: \"colors\", height: \"height\", width: \"width\", activeEntries: \"activeEntries\", horizontal: \"horizontal\" }, outputs: { labelClick: \"labelClick\", labelActivate: \"labelActivate\", labelDeactivate: \"labelDeactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n
\n
0\">\n {{ title }}\n
\n
\n
    \n
  • \n \n \n
  • \n
\n
\n
\n `, isInline: true, styles: [\".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend ul,.chart-legend li{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:rgba(0,0,0,.05)}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\\n\"], components: [{ type: LegendEntryComponent, selector: \"ngx-charts-legend-entry\", inputs: [\"color\", \"label\", \"formattedLabel\", \"isActive\"], outputs: [\"select\", \"activate\", \"deactivate\", \"toggle\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LegendComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-legend', template: `\n
\n
0\">\n {{ title }}\n
\n
\n
    \n
  • \n \n \n
  • \n
\n
\n
\n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend ul,.chart-legend li{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:rgba(0,0,0,.05)}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{\n type: Input\n }], title: [{\n type: Input\n }], colors: [{\n type: Input\n }], height: [{\n type: Input\n }], width: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], horizontal: [{\n type: Input\n }], labelClick: [{\n type: Output\n }], labelActivate: [{\n type: Output\n }], labelDeactivate: [{\n type: Output\n }] } });\n\nclass ChartComponent {\n constructor() {\n this.showLegend = false;\n this.animations = true;\n this.legendLabelClick = new EventEmitter();\n this.legendLabelActivate = new EventEmitter();\n this.legendLabelDeactivate = new EventEmitter();\n this.LegendPosition = LegendPosition;\n this.LegendType = LegendType;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n let legendColumns = 0;\n if (this.showLegend) {\n this.legendType = this.getLegendType();\n if (!this.legendOptions || this.legendOptions.position === LegendPosition.Right) {\n if (this.legendType === LegendType.ScaleLegend) {\n legendColumns = 1;\n }\n else {\n legendColumns = 2;\n }\n }\n }\n const chartColumns = 12 - legendColumns;\n this.chartWidth = Math.floor((this.view[0] * chartColumns) / 12.0);\n this.legendWidth =\n !this.legendOptions || this.legendOptions.position === LegendPosition.Right\n ? Math.floor((this.view[0] * legendColumns) / 12.0)\n : this.chartWidth;\n }\n getLegendType() {\n return this.legendOptions.scaleType === ScaleType.Linear ? LegendType.ScaleLegend : LegendType.Legend;\n }\n}\nChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: ChartComponent, selector: \"ngx-charts-chart\", inputs: { view: \"view\", showLegend: \"showLegend\", legendOptions: \"legendOptions\", legendType: \"legendType\", activeEntries: \"activeEntries\", animations: \"animations\" }, outputs: { legendLabelClick: \"legendLabelClick\", legendLabelActivate: \"legendLabelActivate\", legendLabelDeactivate: \"legendLabelDeactivate\" }, providers: [TooltipService], usesOnChanges: true, ngImport: i0, template: `\n
\n \n \n \n \n \n \n \n
\n `, isInline: true, components: [{ type: ScaleLegendComponent, selector: \"ngx-charts-scale-legend\", inputs: [\"valueRange\", \"colors\", \"height\", \"width\", \"horizontal\"] }, { type: LegendComponent, selector: \"ngx-charts-legend\", inputs: [\"data\", \"title\", \"colors\", \"height\", \"width\", \"activeEntries\", \"horizontal\"], outputs: [\"labelClick\", \"labelActivate\", \"labelDeactivate\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ChartComponent, decorators: [{\n type: Component,\n args: [{\n providers: [TooltipService],\n selector: 'ngx-charts-chart',\n template: `\n
\n \n \n \n \n \n \n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { view: [{\n type: Input\n }], showLegend: [{\n type: Input\n }], legendOptions: [{\n type: Input\n }], legendType: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], animations: [{\n type: Input\n }], legendLabelClick: [{\n type: Output\n }], legendLabelActivate: [{\n type: Output\n }], legendLabelDeactivate: [{\n type: Output\n }] } });\n\n/**\n * Visibility Observer\n */\nclass VisibilityObserver {\n constructor(element, zone) {\n this.element = element;\n this.zone = zone;\n this.visible = new EventEmitter();\n this.isVisible = false;\n this.runCheck();\n }\n destroy() {\n clearTimeout(this.timeout);\n }\n onVisibilityChange() {\n // trigger zone recalc for columns\n this.zone.run(() => {\n this.isVisible = true;\n this.visible.emit(true);\n });\n }\n runCheck() {\n const check = () => {\n if (!this.element) {\n return;\n }\n // https://davidwalsh.name/offsetheight-visibility\n const { offsetHeight, offsetWidth } = this.element.nativeElement;\n if (offsetHeight && offsetWidth) {\n clearTimeout(this.timeout);\n this.onVisibilityChange();\n }\n else {\n clearTimeout(this.timeout);\n this.zone.runOutsideAngular(() => {\n this.timeout = setTimeout(() => check(), 100);\n });\n }\n };\n this.zone.runOutsideAngular(() => {\n this.timeout = setTimeout(() => check());\n });\n }\n}\nVisibilityObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: VisibilityObserver, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nVisibilityObserver.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"12.0.0\", version: \"13.1.0\", type: VisibilityObserver, selector: \"visibility-observer\", outputs: { visible: \"visible\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: VisibilityObserver, decorators: [{\n type: Directive,\n args: [{\n selector: 'visibility-observer'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { visible: [{\n type: Output\n }] } });\n\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\nfunction isNumber(value) {\n return typeof value === 'number';\n}\n\nclass BaseChartComponent {\n constructor(chartElement, zone, cd, platformId) {\n this.chartElement = chartElement;\n this.zone = zone;\n this.cd = cd;\n this.platformId = platformId;\n this.scheme = 'cool';\n this.schemeType = ScaleType.Ordinal;\n this.animations = true;\n this.select = new EventEmitter();\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.animations = false;\n }\n }\n ngAfterViewInit() {\n this.bindWindowResizeEvent();\n // listen for visibility of the element for hidden by default scenario\n this.visibilityObserver = new VisibilityObserver(this.chartElement, this.zone);\n this.visibilityObserver.visible.subscribe(this.update.bind(this));\n }\n ngOnDestroy() {\n this.unbindEvents();\n if (this.visibilityObserver) {\n this.visibilityObserver.visible.unsubscribe();\n this.visibilityObserver.destroy();\n }\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n if (this.results) {\n this.results = this.cloneData(this.results);\n }\n else {\n this.results = [];\n }\n if (this.view) {\n this.width = this.view[0];\n this.height = this.view[1];\n }\n else {\n const dims = this.getContainerDims();\n if (dims) {\n this.width = dims.width;\n this.height = dims.height;\n }\n }\n // default values if width or height are 0 or undefined\n if (!this.width) {\n this.width = 600;\n }\n if (!this.height) {\n this.height = 400;\n }\n this.width = Math.floor(this.width);\n this.height = Math.floor(this.height);\n if (this.cd) {\n this.cd.markForCheck();\n }\n }\n getContainerDims() {\n let width;\n let height;\n const hostElem = this.chartElement.nativeElement;\n if (isPlatformBrowser(this.platformId) && hostElem.parentNode !== null) {\n // Get the container dimensions\n const dims = hostElem.parentNode.getBoundingClientRect();\n width = dims.width;\n height = dims.height;\n }\n if (width && height) {\n return { width, height };\n }\n return null;\n }\n /**\n * Converts all date objects that appear as name\n * into formatted date strings\n */\n formatDates() {\n for (let i = 0; i < this.results.length; i++) {\n const g = this.results[i];\n g.label = g.name;\n if (isDate(g.label)) {\n g.label = g.label.toLocaleDateString();\n }\n if (g.series) {\n for (let j = 0; j < g.series.length; j++) {\n const d = g.series[j];\n d.label = d.name;\n if (isDate(d.label)) {\n d.label = d.label.toLocaleDateString();\n }\n }\n }\n }\n }\n unbindEvents() {\n if (this.resizeSubscription) {\n this.resizeSubscription.unsubscribe();\n }\n }\n bindWindowResizeEvent() {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const source = fromEvent(window, 'resize');\n const subscription = source.pipe(debounceTime(200)).subscribe(e => {\n this.update();\n if (this.cd) {\n this.cd.markForCheck();\n }\n });\n this.resizeSubscription = subscription;\n }\n /**\n * Clones the data into a new object\n *\n * @memberOf BaseChart\n */\n cloneData(data) {\n const results = [];\n for (const item of data) {\n const copy = {\n name: item['name']\n };\n if (item['value'] !== undefined) {\n copy['value'] = item['value'];\n }\n if (item['series'] !== undefined) {\n copy['series'] = [];\n for (const seriesItem of item['series']) {\n const seriesItemCopy = Object.assign({}, seriesItem);\n copy['series'].push(seriesItemCopy);\n }\n }\n if (item['extra'] !== undefined) {\n copy['extra'] = JSON.parse(JSON.stringify(item['extra']));\n }\n results.push(copy);\n }\n return results;\n }\n}\nBaseChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BaseChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nBaseChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BaseChartComponent, selector: \"base-chart\", inputs: { results: \"results\", view: \"view\", scheme: \"scheme\", schemeType: \"schemeType\", customColors: \"customColors\", animations: \"animations\" }, outputs: { select: \"select\" }, usesOnChanges: true, ngImport: i0, template: `
`, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BaseChartComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'base-chart',\n template: `
`\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { results: [{\n type: Input\n }], view: [{\n type: Input\n }], scheme: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], customColors: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }] } });\n\nvar Orientation;\n(function (Orientation) {\n Orientation[\"Top\"] = \"top\";\n Orientation[\"Bottom\"] = \"bottom\";\n Orientation[\"Left\"] = \"left\";\n Orientation[\"Right\"] = \"right\";\n})(Orientation || (Orientation = {}));\n\nclass AxisLabelComponent {\n constructor(element) {\n this.textHeight = 25;\n this.margin = 5;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.strokeWidth = '0.01';\n this.textAnchor = 'middle';\n this.transform = '';\n switch (this.orient) {\n case Orientation.Top:\n this.y = this.offset;\n this.x = this.width / 2;\n break;\n case Orientation.Bottom:\n this.y = this.offset;\n this.x = this.width / 2;\n break;\n case Orientation.Left:\n this.y = -(this.offset + this.textHeight + this.margin);\n this.x = -this.height / 2;\n this.transform = 'rotate(270)';\n break;\n case Orientation.Right:\n this.y = this.offset + this.margin;\n this.x = -this.height / 2;\n this.transform = 'rotate(270)';\n break;\n default:\n }\n }\n}\nAxisLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AxisLabelComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nAxisLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AxisLabelComponent, selector: \"g[ngx-charts-axis-label]\", inputs: { orient: \"orient\", label: \"label\", offset: \"offset\", width: \"width\", height: \"height\" }, usesOnChanges: true, ngImport: i0, template: `\n \n {{ label }}\n \n `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AxisLabelComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-axis-label]',\n template: `\n \n {{ label }}\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { orient: [{\n type: Input\n }], label: [{\n type: Input\n }], offset: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }] } });\n\nfunction trimLabel(s, max = 16) {\n if (typeof s !== 'string') {\n if (typeof s === 'number') {\n return s + '';\n }\n else {\n return '';\n }\n }\n s = s.trim();\n if (s.length <= max) {\n return s;\n }\n else {\n return `${s.slice(0, max)}...`;\n }\n}\n\nfunction reduceTicks(ticks, maxTicks) {\n if (ticks.length > maxTicks) {\n const reduced = [];\n const modulus = Math.floor(ticks.length / maxTicks);\n for (let i = 0; i < ticks.length; i++) {\n if (i % modulus === 0) {\n reduced.push(ticks[i]);\n }\n }\n ticks = reduced;\n }\n return ticks;\n}\n\nvar TextAnchor;\n(function (TextAnchor) {\n TextAnchor[\"Start\"] = \"start\";\n TextAnchor[\"Middle\"] = \"middle\";\n TextAnchor[\"End\"] = \"end\";\n})(TextAnchor || (TextAnchor = {}));\n\nclass XAxisTicksComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.tickArguments = [5];\n this.tickStroke = '#ccc';\n this.trimTicks = true;\n this.maxTickLength = 16;\n this.showGridLines = false;\n this.rotateTicks = true;\n this.dimensionsChanged = new EventEmitter();\n this.verticalSpacing = 20;\n this.rotateLabels = false;\n this.innerTickSize = 6;\n this.outerTickSize = 6;\n this.tickPadding = 3;\n this.textAnchor = TextAnchor.Middle;\n this.maxTicksLength = 0;\n this.maxAllowedLength = 16;\n this.height = 0;\n this.approxHeight = 10;\n }\n ngOnChanges(changes) {\n this.update();\n }\n ngAfterViewInit() {\n setTimeout(() => this.updateDims());\n }\n updateDims() {\n if (!isPlatformBrowser(this.platformId)) {\n // for SSR, use approximate value instead of measured\n this.dimensionsChanged.emit({ height: this.approxHeight });\n return;\n }\n const height = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height, 10);\n if (height !== this.height) {\n this.height = height;\n this.dimensionsChanged.emit({ height: this.height });\n setTimeout(() => this.updateDims());\n }\n }\n update() {\n const scale = this.scale;\n this.ticks = this.getTicks();\n if (this.tickFormatting) {\n this.tickFormat = this.tickFormatting;\n }\n else if (scale.tickFormat) {\n // eslint-disable-next-line prefer-spread\n this.tickFormat = scale.tickFormat.apply(scale, this.tickArguments);\n }\n else {\n this.tickFormat = function (d) {\n if (d.constructor.name === 'Date') {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n const angle = this.rotateTicks ? this.getRotationAngle(this.ticks) : null;\n this.adjustedScale = this.scale.bandwidth\n ? function (d) {\n return this.scale(d) + this.scale.bandwidth() * 0.5;\n }\n : this.scale;\n this.textTransform = '';\n if (angle && angle !== 0) {\n this.textTransform = `rotate(${angle})`;\n this.textAnchor = TextAnchor.End;\n this.verticalSpacing = 10;\n }\n else {\n this.textAnchor = TextAnchor.Middle;\n }\n setTimeout(() => this.updateDims());\n }\n getRotationAngle(ticks) {\n let angle = 0;\n this.maxTicksLength = 0;\n for (let i = 0; i < ticks.length; i++) {\n const tick = this.tickFormat(ticks[i]).toString();\n let tickLength = tick.length;\n if (this.trimTicks) {\n tickLength = this.tickTrim(tick).length;\n }\n if (tickLength > this.maxTicksLength) {\n this.maxTicksLength = tickLength;\n }\n }\n const len = Math.min(this.maxTicksLength, this.maxAllowedLength);\n const charWidth = 7; // need to measure this\n const wordWidth = len * charWidth;\n let baseWidth = wordWidth;\n const maxBaseWidth = Math.floor(this.width / ticks.length);\n // calculate optimal angle\n while (baseWidth > maxBaseWidth && angle > -90) {\n angle -= 30;\n baseWidth = Math.cos(angle * (Math.PI / 180)) * wordWidth;\n }\n this.approxHeight = Math.max(Math.abs(Math.sin(angle * (Math.PI / 180)) * wordWidth), 10);\n return angle;\n }\n getTicks() {\n let ticks;\n const maxTicks = this.getMaxTicks(20);\n const maxScaleTicks = this.getMaxTicks(100);\n if (this.tickValues) {\n ticks = this.tickValues;\n }\n else if (this.scale.ticks) {\n ticks = this.scale.ticks.apply(this.scale, [maxScaleTicks]);\n }\n else {\n ticks = this.scale.domain();\n ticks = reduceTicks(ticks, maxTicks);\n }\n return ticks;\n }\n getMaxTicks(tickWidth) {\n return Math.floor(this.width / tickWidth);\n }\n tickTransform(tick) {\n return 'translate(' + this.adjustedScale(tick) + ',' + this.verticalSpacing + ')';\n }\n gridLineTransform() {\n return `translate(0,${-this.verticalSpacing - 5})`;\n }\n tickTrim(label) {\n return this.trimTicks ? trimLabel(label, this.maxTickLength) : label;\n }\n}\nXAxisTicksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: XAxisTicksComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nXAxisTicksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: XAxisTicksComponent, selector: \"g[ngx-charts-x-axis-ticks]\", inputs: { scale: \"scale\", orient: \"orient\", tickArguments: \"tickArguments\", tickValues: \"tickValues\", tickStroke: \"tickStroke\", trimTicks: \"trimTicks\", maxTickLength: \"maxTickLength\", tickFormatting: \"tickFormatting\", showGridLines: \"showGridLines\", gridLineHeight: \"gridLineHeight\", width: \"width\", rotateTicks: \"rotateTicks\" }, outputs: { dimensionsChanged: \"dimensionsChanged\" }, viewQueries: [{ propertyName: \"ticksElement\", first: true, predicate: [\"ticksel\"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `\n \n \n {{ tickFormat(tick) }}\n \n {{ tickTrim(tickFormat(tick)) }}\n \n \n \n\n \n \n \n \n \n `, isInline: true, directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: XAxisTicksComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-x-axis-ticks]',\n template: `\n \n \n {{ tickFormat(tick) }}\n \n {{ tickTrim(tickFormat(tick)) }}\n \n \n \n\n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { scale: [{\n type: Input\n }], orient: [{\n type: Input\n }], tickArguments: [{\n type: Input\n }], tickValues: [{\n type: Input\n }], tickStroke: [{\n type: Input\n }], trimTicks: [{\n type: Input\n }], maxTickLength: [{\n type: Input\n }], tickFormatting: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], gridLineHeight: [{\n type: Input\n }], width: [{\n type: Input\n }], rotateTicks: [{\n type: Input\n }], dimensionsChanged: [{\n type: Output\n }], ticksElement: [{\n type: ViewChild,\n args: ['ticksel']\n }] } });\n\nclass XAxisComponent {\n constructor() {\n this.rotateTicks = true;\n this.showGridLines = false;\n this.xOrient = Orientation.Bottom;\n this.xAxisOffset = 0;\n this.dimensionsChanged = new EventEmitter();\n this.xAxisClassName = 'x axis';\n this.labelOffset = 0;\n this.fill = 'none';\n this.stroke = 'stroke';\n this.tickStroke = '#ccc';\n this.strokeWidth = 'none';\n this.padding = 5;\n this.orientation = Orientation;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.transform = `translate(0,${this.xAxisOffset + this.padding + this.dims.height})`;\n if (typeof this.xAxisTickCount !== 'undefined') {\n this.tickArguments = [this.xAxisTickCount];\n }\n }\n emitTicksHeight({ height }) {\n const newLabelOffset = height + 25 + 5;\n if (newLabelOffset !== this.labelOffset) {\n this.labelOffset = newLabelOffset;\n setTimeout(() => {\n this.dimensionsChanged.emit({ height });\n }, 0);\n }\n }\n}\nXAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: XAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nXAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: { xScale: \"xScale\", dims: \"dims\", trimTicks: \"trimTicks\", rotateTicks: \"rotateTicks\", maxTickLength: \"maxTickLength\", tickFormatting: \"tickFormatting\", showGridLines: \"showGridLines\", showLabel: \"showLabel\", labelText: \"labelText\", ticks: \"ticks\", xAxisTickCount: \"xAxisTickCount\", xOrient: \"xOrient\", xAxisOffset: \"xAxisOffset\" }, outputs: { dimensionsChanged: \"dimensionsChanged\" }, viewQueries: [{ propertyName: \"ticksComponent\", first: true, predicate: XAxisTicksComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n `, isInline: true, components: [{ type: XAxisTicksComponent, selector: \"g[ngx-charts-x-axis-ticks]\", inputs: [\"scale\", \"orient\", \"tickArguments\", \"tickValues\", \"tickStroke\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"gridLineHeight\", \"width\", \"rotateTicks\"], outputs: [\"dimensionsChanged\"] }, { type: AxisLabelComponent, selector: \"g[ngx-charts-axis-label]\", inputs: [\"orient\", \"label\", \"offset\", \"width\", \"height\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: XAxisComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-x-axis]',\n template: `\n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { xScale: [{\n type: Input\n }], dims: [{\n type: Input\n }], trimTicks: [{\n type: Input\n }], rotateTicks: [{\n type: Input\n }], maxTickLength: [{\n type: Input\n }], tickFormatting: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], showLabel: [{\n type: Input\n }], labelText: [{\n type: Input\n }], ticks: [{\n type: Input\n }], xAxisTickCount: [{\n type: Input\n }], xOrient: [{\n type: Input\n }], xAxisOffset: [{\n type: Input\n }], dimensionsChanged: [{\n type: Output\n }], ticksComponent: [{\n type: ViewChild,\n args: [XAxisTicksComponent]\n }] } });\n\n/**\n * Generates a rounded rectanglar path\n *\n * @export\n * @param x, y, w, h, r, tl, tr, bl, br\n */\nfunction roundedRect(x, y, w, h, r, [tl, tr, bl, br]) {\n let retval = '';\n w = Math.floor(w);\n h = Math.floor(h);\n w = w === 0 ? 1 : w;\n h = h === 0 ? 1 : h;\n retval = `M${[x + r, y]}`;\n retval += `h${w - 2 * r}`;\n if (tr) {\n retval += `a${[r, r]} 0 0 1 ${[r, r]}`;\n }\n else {\n retval += `h${r}v${r}`;\n }\n retval += `v${h - 2 * r}`;\n if (br) {\n retval += `a${[r, r]} 0 0 1 ${[-r, r]}`;\n }\n else {\n retval += `v${r}h${-r}`;\n }\n retval += `h${2 * r - w}`;\n if (bl) {\n retval += `a${[r, r]} 0 0 1 ${[-r, -r]}`;\n }\n else {\n retval += `h${-r}v${-r}`;\n }\n retval += `v${2 * r - h}`;\n if (tl) {\n retval += `a${[r, r]} 0 0 1 ${[r, -r]}`;\n }\n else {\n retval += `v${-r}h${r}`;\n }\n retval += `z`;\n return retval;\n}\n\nclass YAxisTicksComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.tickArguments = [5];\n this.tickStroke = '#ccc';\n this.trimTicks = true;\n this.maxTickLength = 16;\n this.showGridLines = false;\n this.showRefLabels = false;\n this.showRefLines = false;\n this.dimensionsChanged = new EventEmitter();\n this.innerTickSize = 6;\n this.tickPadding = 3;\n this.verticalSpacing = 20;\n this.textAnchor = TextAnchor.Middle;\n this.width = 0;\n this.outerTickSize = 6;\n this.rotateLabels = false;\n this.referenceLineLength = 0;\n this.Orientation = Orientation;\n }\n ngOnChanges(changes) {\n this.update();\n }\n ngAfterViewInit() {\n setTimeout(() => this.updateDims());\n }\n updateDims() {\n if (!isPlatformBrowser(this.platformId)) {\n // for SSR, use approximate value instead of measured\n this.width = this.getApproximateAxisWidth();\n this.dimensionsChanged.emit({ width: this.width });\n return;\n }\n const width = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width, 10);\n if (width !== this.width) {\n this.width = width;\n this.dimensionsChanged.emit({ width });\n setTimeout(() => this.updateDims());\n }\n }\n update() {\n const scale = this.scale;\n const sign = this.orient === Orientation.Top || this.orient === Orientation.Right ? -1 : 1;\n this.tickSpacing = Math.max(this.innerTickSize, 0) + this.tickPadding;\n this.ticks = this.getTicks();\n if (this.tickFormatting) {\n this.tickFormat = this.tickFormatting;\n }\n else if (scale.tickFormat) {\n // eslint-disable-next-line prefer-spread\n this.tickFormat = scale.tickFormat.apply(scale, this.tickArguments);\n }\n else {\n this.tickFormat = function (d) {\n if (d.constructor.name === 'Date') {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n this.adjustedScale = scale.bandwidth\n ? function (d) {\n return scale(d) + scale.bandwidth() * 0.5;\n }\n : scale;\n if (this.showRefLines && this.referenceLines) {\n this.setReferencelines();\n }\n switch (this.orient) {\n case Orientation.Top:\n this.transform = function (tick) {\n return 'translate(' + this.adjustedScale(tick) + ',0)';\n };\n this.textAnchor = TextAnchor.Middle;\n this.y2 = this.innerTickSize * sign;\n this.y1 = this.tickSpacing * sign;\n this.dy = sign < 0 ? '0em' : '.71em';\n break;\n case Orientation.Bottom:\n this.transform = function (tick) {\n return 'translate(' + this.adjustedScale(tick) + ',0)';\n };\n this.textAnchor = TextAnchor.Middle;\n this.y2 = this.innerTickSize * sign;\n this.y1 = this.tickSpacing * sign;\n this.dy = sign < 0 ? '0em' : '.71em';\n break;\n case Orientation.Left:\n this.transform = function (tick) {\n return 'translate(0,' + this.adjustedScale(tick) + ')';\n };\n this.textAnchor = TextAnchor.End;\n this.x2 = this.innerTickSize * -sign;\n this.x1 = this.tickSpacing * -sign;\n this.dy = '.32em';\n break;\n case Orientation.Right:\n this.transform = function (tick) {\n return 'translate(0,' + this.adjustedScale(tick) + ')';\n };\n this.textAnchor = TextAnchor.Start;\n this.x2 = this.innerTickSize * -sign;\n this.x1 = this.tickSpacing * -sign;\n this.dy = '.32em';\n break;\n default:\n }\n setTimeout(() => this.updateDims());\n }\n setReferencelines() {\n this.refMin = this.adjustedScale(Math.min.apply(null, this.referenceLines.map(item => item.value)));\n this.refMax = this.adjustedScale(Math.max.apply(null, this.referenceLines.map(item => item.value)));\n this.referenceLineLength = this.referenceLines.length;\n this.referenceAreaPath = roundedRect(0, this.refMax, this.gridLineWidth, this.refMin - this.refMax, 0, [\n false,\n false,\n false,\n false\n ]);\n }\n getTicks() {\n let ticks;\n const maxTicks = this.getMaxTicks(20);\n const maxScaleTicks = this.getMaxTicks(50);\n if (this.tickValues) {\n ticks = this.tickValues;\n }\n else if (this.scale.ticks) {\n ticks = this.scale.ticks.apply(this.scale, [maxScaleTicks]);\n }\n else {\n ticks = this.scale.domain();\n ticks = reduceTicks(ticks, maxTicks);\n }\n return ticks;\n }\n getMaxTicks(tickHeight) {\n return Math.floor(this.height / tickHeight);\n }\n tickTransform(tick) {\n return `translate(${this.adjustedScale(tick)},${this.verticalSpacing})`;\n }\n gridLineTransform() {\n return `translate(5,0)`;\n }\n tickTrim(label) {\n return this.trimTicks ? trimLabel(label, this.maxTickLength) : label;\n }\n getApproximateAxisWidth() {\n const maxChars = Math.max(...this.ticks.map(t => this.tickTrim(this.tickFormat(t)).length));\n const charWidth = 7;\n return maxChars * charWidth;\n }\n}\nYAxisTicksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: YAxisTicksComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nYAxisTicksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: YAxisTicksComponent, selector: \"g[ngx-charts-y-axis-ticks]\", inputs: { scale: \"scale\", orient: \"orient\", tickArguments: \"tickArguments\", tickValues: \"tickValues\", tickStroke: \"tickStroke\", trimTicks: \"trimTicks\", maxTickLength: \"maxTickLength\", tickFormatting: \"tickFormatting\", showGridLines: \"showGridLines\", gridLineWidth: \"gridLineWidth\", height: \"height\", referenceLines: \"referenceLines\", showRefLabels: \"showRefLabels\", showRefLines: \"showRefLines\" }, outputs: { dimensionsChanged: \"dimensionsChanged\" }, viewQueries: [{ propertyName: \"ticksElement\", first: true, predicate: [\"ticksel\"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `\n \n \n {{ tickFormat(tick) }}\n \n {{ tickTrim(tickFormat(tick)) }}\n \n \n \n\n 1 && refMax && refMin && showRefLines\"\n class=\"reference-area\"\n [attr.d]=\"referenceAreaPath\"\n [attr.transform]=\"gridLineTransform()\"\n />\n \n \n \n \n \n \n\n \n \n \n \n {{ tickTrim(tickFormat(refLine.value)) }}\n \n {{ refLine.name }}\n \n \n \n \n `, isInline: true, directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: YAxisTicksComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-y-axis-ticks]',\n template: `\n \n \n {{ tickFormat(tick) }}\n \n {{ tickTrim(tickFormat(tick)) }}\n \n \n \n\n 1 && refMax && refMin && showRefLines\"\n class=\"reference-area\"\n [attr.d]=\"referenceAreaPath\"\n [attr.transform]=\"gridLineTransform()\"\n />\n \n \n \n \n \n \n\n \n \n \n \n {{ tickTrim(tickFormat(refLine.value)) }}\n \n {{ refLine.name }}\n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { scale: [{\n type: Input\n }], orient: [{\n type: Input\n }], tickArguments: [{\n type: Input\n }], tickValues: [{\n type: Input\n }], tickStroke: [{\n type: Input\n }], trimTicks: [{\n type: Input\n }], maxTickLength: [{\n type: Input\n }], tickFormatting: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], gridLineWidth: [{\n type: Input\n }], height: [{\n type: Input\n }], referenceLines: [{\n type: Input\n }], showRefLabels: [{\n type: Input\n }], showRefLines: [{\n type: Input\n }], dimensionsChanged: [{\n type: Output\n }], ticksElement: [{\n type: ViewChild,\n args: ['ticksel']\n }] } });\n\nclass YAxisComponent {\n constructor() {\n this.showGridLines = false;\n this.yOrient = Orientation.Left;\n this.yAxisOffset = 0;\n this.dimensionsChanged = new EventEmitter();\n this.yAxisClassName = 'y axis';\n this.labelOffset = 15;\n this.fill = 'none';\n this.stroke = '#CCC';\n this.tickStroke = '#CCC';\n this.strokeWidth = 1;\n this.padding = 5;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.offset = -(this.yAxisOffset + this.padding);\n if (this.yOrient === Orientation.Right) {\n this.labelOffset = 65;\n this.transform = `translate(${this.offset + this.dims.width} , 0)`;\n }\n else {\n this.transform = `translate(${this.offset} , 0)`;\n }\n if (this.yAxisTickCount !== undefined) {\n this.tickArguments = [this.yAxisTickCount];\n }\n }\n emitTicksWidth({ width }) {\n if (width !== this.labelOffset && this.yOrient === Orientation.Right) {\n this.labelOffset = width + this.labelOffset;\n setTimeout(() => {\n this.dimensionsChanged.emit({ width });\n }, 0);\n }\n else if (width !== this.labelOffset) {\n this.labelOffset = width;\n setTimeout(() => {\n this.dimensionsChanged.emit({ width });\n }, 0);\n }\n }\n}\nYAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: YAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nYAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: { yScale: \"yScale\", dims: \"dims\", trimTicks: \"trimTicks\", maxTickLength: \"maxTickLength\", tickFormatting: \"tickFormatting\", ticks: \"ticks\", showGridLines: \"showGridLines\", showLabel: \"showLabel\", labelText: \"labelText\", yAxisTickCount: \"yAxisTickCount\", yOrient: \"yOrient\", referenceLines: \"referenceLines\", showRefLines: \"showRefLines\", showRefLabels: \"showRefLabels\", yAxisOffset: \"yAxisOffset\" }, outputs: { dimensionsChanged: \"dimensionsChanged\" }, viewQueries: [{ propertyName: \"ticksComponent\", first: true, predicate: YAxisTicksComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: `\n \n \n\n \n \n `, isInline: true, components: [{ type: YAxisTicksComponent, selector: \"g[ngx-charts-y-axis-ticks]\", inputs: [\"scale\", \"orient\", \"tickArguments\", \"tickValues\", \"tickStroke\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"gridLineWidth\", \"height\", \"referenceLines\", \"showRefLabels\", \"showRefLines\"], outputs: [\"dimensionsChanged\"] }, { type: AxisLabelComponent, selector: \"g[ngx-charts-axis-label]\", inputs: [\"orient\", \"label\", \"offset\", \"width\", \"height\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: YAxisComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-y-axis]',\n template: `\n \n \n\n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { yScale: [{\n type: Input\n }], dims: [{\n type: Input\n }], trimTicks: [{\n type: Input\n }], maxTickLength: [{\n type: Input\n }], tickFormatting: [{\n type: Input\n }], ticks: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], showLabel: [{\n type: Input\n }], labelText: [{\n type: Input\n }], yAxisTickCount: [{\n type: Input\n }], yOrient: [{\n type: Input\n }], referenceLines: [{\n type: Input\n }], showRefLines: [{\n type: Input\n }], showRefLabels: [{\n type: Input\n }], yAxisOffset: [{\n type: Input\n }], dimensionsChanged: [{\n type: Output\n }], ticksComponent: [{\n type: ViewChild,\n args: [YAxisTicksComponent]\n }] } });\n\nclass AxesModule {\n}\nAxesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AxesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nAxesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AxesModule, declarations: [AxisLabelComponent, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent], imports: [CommonModule], exports: [AxisLabelComponent, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent] });\nAxesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AxesModule, imports: [[CommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AxesModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n declarations: [AxisLabelComponent, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent],\n exports: [AxisLabelComponent, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent]\n }]\n }] });\n\nvar StyleTypes;\n(function (StyleTypes) {\n StyleTypes[\"popover\"] = \"popover\";\n StyleTypes[\"tooltip\"] = \"tooltip\";\n})(StyleTypes || (StyleTypes = {}));\n\nvar ShowTypes;\n(function (ShowTypes) {\n ShowTypes[ShowTypes[\"all\"] = 'all'] = \"all\";\n ShowTypes[ShowTypes[\"focus\"] = 'focus'] = \"focus\";\n ShowTypes[ShowTypes[\"mouseover\"] = 'mouseover'] = \"mouseover\";\n})(ShowTypes || (ShowTypes = {}));\n\nclass TooltipDirective {\n constructor(tooltipService, viewContainerRef, renderer) {\n this.tooltipService = tooltipService;\n this.viewContainerRef = viewContainerRef;\n this.renderer = renderer;\n this.tooltipCssClass = '';\n this.tooltipAppendToBody = true;\n this.tooltipSpacing = 10;\n this.tooltipDisabled = false;\n this.tooltipShowCaret = true;\n this.tooltipPlacement = PlacementTypes.Top;\n this.tooltipAlignment = PlacementTypes.Center;\n this.tooltipType = StyleTypes.popover;\n this.tooltipCloseOnClickOutside = true;\n this.tooltipCloseOnMouseLeave = true;\n this.tooltipHideTimeout = 300;\n this.tooltipShowTimeout = 100;\n this.tooltipShowEvent = ShowTypes.all;\n this.tooltipImmediateExit = false;\n this.show = new EventEmitter();\n this.hide = new EventEmitter();\n }\n get listensForFocus() {\n return this.tooltipShowEvent === ShowTypes.all || this.tooltipShowEvent === ShowTypes.focus;\n }\n get listensForHover() {\n return this.tooltipShowEvent === ShowTypes.all || this.tooltipShowEvent === ShowTypes.mouseover;\n }\n ngOnDestroy() {\n this.hideTooltip(true);\n }\n onFocus() {\n if (this.listensForFocus) {\n this.showTooltip();\n }\n }\n onBlur() {\n if (this.listensForFocus) {\n this.hideTooltip(true);\n }\n }\n onMouseEnter() {\n if (this.listensForHover) {\n this.showTooltip();\n }\n }\n onMouseLeave(target) {\n if (this.listensForHover && this.tooltipCloseOnMouseLeave) {\n clearTimeout(this.timeout);\n if (this.component) {\n const contentDom = this.component.instance.element.nativeElement;\n const contains = contentDom.contains(target);\n if (contains)\n return;\n }\n this.hideTooltip(this.tooltipImmediateExit);\n }\n }\n onMouseClick() {\n if (this.listensForHover) {\n this.hideTooltip(true);\n }\n }\n showTooltip(immediate) {\n if (this.component || this.tooltipDisabled)\n return;\n const time = immediate\n ? 0\n : this.tooltipShowTimeout + (navigator.userAgent.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/) ? 400 : 0);\n clearTimeout(this.timeout);\n this.timeout = setTimeout(() => {\n this.tooltipService.destroyAll();\n const options = this.createBoundOptions();\n this.component = this.tooltipService.create(options);\n // add a tiny timeout to avoid event re-triggers\n setTimeout(() => {\n if (this.component) {\n this.addHideListeners(this.component.instance.element.nativeElement);\n }\n }, 10);\n this.show.emit(true);\n }, time);\n }\n addHideListeners(tooltip) {\n // on mouse enter, cancel the hide triggered by the leave\n this.mouseEnterContentEvent = this.renderer.listen(tooltip, 'mouseenter', () => {\n clearTimeout(this.timeout);\n });\n // content mouse leave listener\n if (this.tooltipCloseOnMouseLeave) {\n this.mouseLeaveContentEvent = this.renderer.listen(tooltip, 'mouseleave', () => {\n this.hideTooltip(this.tooltipImmediateExit);\n });\n }\n // content close on click outside\n if (this.tooltipCloseOnClickOutside) {\n this.documentClickEvent = this.renderer.listen('window', 'click', event => {\n const contains = tooltip.contains(event.target);\n if (!contains)\n this.hideTooltip();\n });\n }\n }\n hideTooltip(immediate = false) {\n if (!this.component)\n return;\n const destroyFn = () => {\n // remove events\n if (this.mouseLeaveContentEvent)\n this.mouseLeaveContentEvent();\n if (this.mouseEnterContentEvent)\n this.mouseEnterContentEvent();\n if (this.documentClickEvent)\n this.documentClickEvent();\n // emit events\n this.hide.emit(true);\n // destroy component\n this.tooltipService.destroy(this.component);\n this.component = undefined;\n };\n clearTimeout(this.timeout);\n if (!immediate) {\n this.timeout = setTimeout(destroyFn, this.tooltipHideTimeout);\n }\n else {\n destroyFn();\n }\n }\n createBoundOptions() {\n return {\n title: this.tooltipTitle,\n template: this.tooltipTemplate,\n host: this.viewContainerRef.element,\n placement: this.tooltipPlacement,\n alignment: this.tooltipAlignment,\n type: this.tooltipType,\n showCaret: this.tooltipShowCaret,\n cssClass: this.tooltipCssClass,\n spacing: this.tooltipSpacing,\n context: this.tooltipContext\n };\n }\n}\nTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipDirective, deps: [{ token: TooltipService }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"12.0.0\", version: \"13.1.0\", type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: { tooltipCssClass: \"tooltipCssClass\", tooltipTitle: \"tooltipTitle\", tooltipAppendToBody: \"tooltipAppendToBody\", tooltipSpacing: \"tooltipSpacing\", tooltipDisabled: \"tooltipDisabled\", tooltipShowCaret: \"tooltipShowCaret\", tooltipPlacement: \"tooltipPlacement\", tooltipAlignment: \"tooltipAlignment\", tooltipType: \"tooltipType\", tooltipCloseOnClickOutside: \"tooltipCloseOnClickOutside\", tooltipCloseOnMouseLeave: \"tooltipCloseOnMouseLeave\", tooltipHideTimeout: \"tooltipHideTimeout\", tooltipShowTimeout: \"tooltipShowTimeout\", tooltipTemplate: \"tooltipTemplate\", tooltipShowEvent: \"tooltipShowEvent\", tooltipContext: \"tooltipContext\", tooltipImmediateExit: \"tooltipImmediateExit\" }, outputs: { show: \"show\", hide: \"hide\" }, host: { listeners: { \"focusin\": \"onFocus()\", \"blur\": \"onBlur()\", \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave($event.target)\", \"click\": \"onMouseClick()\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ngx-tooltip]' }]\n }], ctorParameters: function () { return [{ type: TooltipService }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }]; }, propDecorators: { tooltipCssClass: [{\n type: Input\n }], tooltipTitle: [{\n type: Input\n }], tooltipAppendToBody: [{\n type: Input\n }], tooltipSpacing: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipShowCaret: [{\n type: Input\n }], tooltipPlacement: [{\n type: Input\n }], tooltipAlignment: [{\n type: Input\n }], tooltipType: [{\n type: Input\n }], tooltipCloseOnClickOutside: [{\n type: Input\n }], tooltipCloseOnMouseLeave: [{\n type: Input\n }], tooltipHideTimeout: [{\n type: Input\n }], tooltipShowTimeout: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], tooltipShowEvent: [{\n type: Input\n }], tooltipContext: [{\n type: Input\n }], tooltipImmediateExit: [{\n type: Input\n }], show: [{\n type: Output\n }], hide: [{\n type: Output\n }], onFocus: [{\n type: HostListener,\n args: ['focusin']\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave', ['$event.target']]\n }], onMouseClick: [{\n type: HostListener,\n args: ['click']\n }] } });\n\nclass TooltipModule {\n}\nTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipModule, declarations: [TooltipContentComponent, TooltipDirective], imports: [CommonModule], exports: [TooltipContentComponent, TooltipDirective] });\nTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipModule, providers: [InjectionService, TooltipService], imports: [[CommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [TooltipContentComponent, TooltipDirective],\n providers: [InjectionService, TooltipService],\n exports: [TooltipContentComponent, TooltipDirective],\n imports: [CommonModule],\n entryComponents: [TooltipContentComponent]\n }]\n }] });\n\nconst cache = {};\n/**\n * Generates a short id.\n *\n * Description:\n * A 4-character alphanumeric sequence (364 = 1.6 million)\n * This should only be used for JavaScript specific models.\n * http://stackoverflow.com/questions/6248666/how-to-generate-short-uid-like-ax4j9z-in-js\n *\n * Example: `ebgf`\n */\nfunction id() {\n let newId = ('0000' + ((Math.random() * Math.pow(36, 4)) << 0).toString(36)).slice(-4);\n // append a 'a' because neo gets mad\n newId = `a${newId}`;\n // ensure not already used\n if (!cache[newId]) {\n cache[newId] = true;\n return newId;\n }\n return id();\n}\n\nvar BarOrientation;\n(function (BarOrientation) {\n BarOrientation[\"Vertical\"] = \"vertical\";\n BarOrientation[\"Horizontal\"] = \"horizontal\";\n})(BarOrientation || (BarOrientation = {}));\n\nclass SvgLinearGradientComponent {\n constructor() {\n this.orientation = BarOrientation.Vertical;\n }\n ngOnChanges(changes) {\n this.x1 = '0%';\n this.x2 = '0%';\n this.y1 = '0%';\n this.y2 = '0%';\n if (this.orientation === BarOrientation.Horizontal) {\n this.x2 = '100%';\n }\n else if (this.orientation === BarOrientation.Vertical) {\n this.y1 = '100%';\n }\n }\n}\nSvgLinearGradientComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SvgLinearGradientComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nSvgLinearGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: { orientation: \"orientation\", name: \"name\", stops: \"stops\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n `, isInline: true, directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SvgLinearGradientComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-svg-linear-gradient]',\n template: `\n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { orientation: [{\n type: Input\n }], name: [{\n type: Input\n }], stops: [{\n type: Input\n }] } });\n\nclass CircleComponent {\n constructor() {\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n }\n onClick() {\n this.select.emit(this.data);\n }\n onMouseEnter() {\n this.activate.emit(this.data);\n }\n onMouseLeave() {\n this.deactivate.emit(this.data);\n }\n ngOnChanges(changes) {\n this.classNames = Array.isArray(this.classNames) ? this.classNames.join(' ') : '';\n this.classNames += 'circle';\n }\n}\nCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CircleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: CircleComponent, selector: \"g[ngx-charts-circle]\", inputs: { cx: \"cx\", cy: \"cy\", r: \"r\", fill: \"fill\", stroke: \"stroke\", data: \"data\", classNames: \"classNames\", circleOpacity: \"circleOpacity\", pointerEvents: \"pointerEvents\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"click\": \"onClick()\", \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave()\" } }, usesOnChanges: true, ngImport: i0, template: `\n \n `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CircleComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-circle]',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { cx: [{\n type: Input\n }], cy: [{\n type: Input\n }], r: [{\n type: Input\n }], fill: [{\n type: Input\n }], stroke: [{\n type: Input\n }], data: [{\n type: Input\n }], classNames: [{\n type: Input\n }], circleOpacity: [{\n type: Input\n }], pointerEvents: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nvar SeriesType;\n(function (SeriesType) {\n SeriesType[\"Standard\"] = \"standard\";\n SeriesType[\"Stacked\"] = \"stacked\";\n})(SeriesType || (SeriesType = {}));\nclass CircleSeriesComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.type = SeriesType.Standard;\n this.tooltipDisabled = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.barVisible = false;\n this.barOrientation = BarOrientation;\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n this.isSSR = false;\n }\n ngOnInit() {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n ngOnChanges() {\n this.update();\n }\n update() {\n this.circle = this.getActiveCircle();\n }\n getActiveCircle() {\n const indexActiveDataPoint = this.data.series.findIndex(d => {\n const label = d.name;\n return label && this.visibleValue && label.toString() === this.visibleValue.toString() && d.value !== undefined;\n });\n if (indexActiveDataPoint === -1) {\n // No valid point is 'active/hovered over' at this moment.\n return undefined;\n }\n return this.mapDataPointToCircle(this.data.series[indexActiveDataPoint], indexActiveDataPoint);\n }\n mapDataPointToCircle(d, i) {\n const seriesName = this.data.name;\n const value = d.value;\n const label = d.name;\n const tooltipLabel = formatLabel(label);\n let cx;\n if (this.scaleType === ScaleType.Time) {\n cx = this.xScale(label);\n }\n else if (this.scaleType === ScaleType.Linear) {\n cx = this.xScale(Number(label));\n }\n else {\n cx = this.xScale(label);\n }\n const cy = this.yScale(this.type === SeriesType.Standard ? value : d.d1);\n const radius = 5;\n const height = this.yScale.range()[0] - cy;\n const opacity = 1;\n let color;\n if (this.colors.scaleType === ScaleType.Linear) {\n if (this.type === SeriesType.Standard) {\n color = this.colors.getColor(value);\n }\n else {\n color = this.colors.getColor(d.d1);\n }\n }\n else {\n color = this.colors.getColor(seriesName);\n }\n const data = Object.assign({}, d, {\n series: seriesName,\n value,\n name: label\n });\n return {\n classNames: [`circle-data-${i}`],\n value,\n label,\n data,\n cx,\n cy,\n radius,\n height,\n tooltipLabel,\n color,\n opacity,\n seriesName,\n gradientStops: this.getGradientStops(color),\n min: d.min,\n max: d.max\n };\n }\n getTooltipText({ tooltipLabel, value, seriesName, min, max }) {\n return `\n ${escapeLabel(seriesName)} • ${escapeLabel(tooltipLabel)}\n ${value.toLocaleString()}${this.getTooltipMinMaxText(min, max)}\n `;\n }\n getTooltipMinMaxText(min, max) {\n if (min !== undefined || max !== undefined) {\n let result = ' (';\n if (min !== undefined) {\n if (max === undefined) {\n result += '≥';\n }\n result += min.toLocaleString();\n if (max !== undefined) {\n result += ' - ';\n }\n }\n else if (max !== undefined) {\n result += '≤';\n }\n if (max !== undefined) {\n result += max.toLocaleString();\n }\n result += ')';\n return result;\n }\n else {\n return '';\n }\n }\n getGradientStops(color) {\n return [\n {\n offset: 0,\n color,\n opacity: 0.2\n },\n {\n offset: 100,\n color,\n opacity: 1\n }\n ];\n }\n onClick(data) {\n this.select.emit(data);\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n activateCircle() {\n this.barVisible = true;\n this.activate.emit({ name: this.data.name });\n }\n deactivateCircle() {\n this.barVisible = false;\n this.circle.opacity = 0;\n this.deactivate.emit({ name: this.data.name });\n }\n}\nCircleSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CircleSeriesComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nCircleSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: CircleSeriesComponent, selector: \"g[ngx-charts-circle-series]\", inputs: { data: \"data\", type: \"type\", xScale: \"xScale\", yScale: \"yScale\", colors: \"colors\", scaleType: \"scaleType\", visibleValue: \"visibleValue\", activeEntries: \"activeEntries\", tooltipDisabled: \"tooltipDisabled\", tooltipTemplate: \"tooltipTemplate\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n `, isInline: true, components: [{ type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: [\"orientation\", \"name\", \"stops\"] }, { type: CircleComponent, selector: \"g[ngx-charts-circle]\", inputs: [\"cx\", \"cy\", \"r\", \"fill\", \"stroke\", \"data\", \"classNames\", \"circleOpacity\", \"pointerEvents\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n opacity: 0\n }),\n animate(250, style({ opacity: 1 }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CircleSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-circle-series]',\n template: `\n \n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n opacity: 0\n }),\n animate(250, style({ opacity: 1 }))\n ])\n ])\n ]\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { data: [{\n type: Input\n }], type: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], colors: [{\n type: Input\n }], scaleType: [{\n type: Input\n }], visibleValue: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }] } });\n\nclass GridPanelComponent {\n}\nGridPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GridPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nGridPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: GridPanelComponent, selector: \"g[ngx-charts-grid-panel]\", inputs: { width: \"width\", height: \"height\", x: \"x\", y: \"y\" }, ngImport: i0, template: `\n \n `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GridPanelComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-grid-panel]',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { width: [{\n type: Input\n }], height: [{\n type: Input\n }], x: [{\n type: Input\n }], y: [{\n type: Input\n }] } });\n\nvar ClassEnum;\n(function (ClassEnum) {\n ClassEnum[\"Odd\"] = \"odd\";\n ClassEnum[\"Even\"] = \"even\";\n})(ClassEnum || (ClassEnum = {}));\nclass GridPanelSeriesComponent {\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.gridPanels = this.getGridPanels();\n }\n getGridPanels() {\n return this.data.map(d => {\n let offset;\n let width;\n let height;\n let x;\n let y;\n let className = ClassEnum.Odd;\n if (this.orient === BarOrientation.Vertical) {\n const position = this.xScale(d.name);\n const positionIndex = Number.parseInt((position / this.xScale.step()).toString(), 10);\n if (positionIndex % 2 === 1) {\n className = ClassEnum.Even;\n }\n offset = this.xScale.bandwidth() * this.xScale.paddingInner();\n width = this.xScale.bandwidth() + offset;\n height = this.dims.height;\n x = this.xScale(d.name) - offset / 2;\n y = 0;\n }\n else if (this.orient === BarOrientation.Horizontal) {\n const position = this.yScale(d.name);\n const positionIndex = Number.parseInt((position / this.yScale.step()).toString(), 10);\n if (positionIndex % 2 === 1) {\n className = ClassEnum.Even;\n }\n offset = this.yScale.bandwidth() * this.yScale.paddingInner();\n width = this.dims.width;\n height = this.yScale.bandwidth() + offset;\n x = 0;\n y = this.yScale(d.name) - offset / 2;\n }\n return {\n name: d.name,\n class: className,\n height,\n width,\n x,\n y\n };\n });\n }\n}\nGridPanelSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GridPanelSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nGridPanelSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: GridPanelSeriesComponent, selector: \"g[ngx-charts-grid-panel-series]\", inputs: { data: \"data\", dims: \"dims\", xScale: \"xScale\", yScale: \"yScale\", orient: \"orient\" }, usesOnChanges: true, ngImport: i0, template: `\n \n `, isInline: true, components: [{ type: GridPanelComponent, selector: \"g[ngx-charts-grid-panel]\", inputs: [\"width\", \"height\", \"x\", \"y\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GridPanelSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-grid-panel-series]',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { data: [{\n type: Input\n }], dims: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], orient: [{\n type: Input\n }] } });\n\nclass SvgRadialGradientComponent {\n constructor() {\n this.endOpacity = 1;\n this.cx = 0;\n this.cy = 0;\n }\n get stops() {\n return this.stopsInput || this.stopsDefault;\n }\n set stops(value) {\n this.stopsInput = value;\n }\n ngOnChanges(changes) {\n this.r = '30%';\n if ('color' in changes || 'startOpacity' in changes || 'endOpacity' in changes) {\n this.stopsDefault = [\n {\n offset: 0,\n color: this.color,\n opacity: this.startOpacity\n },\n {\n offset: 100,\n color: this.color,\n opacity: this.endOpacity\n }\n ];\n }\n }\n}\nSvgRadialGradientComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SvgRadialGradientComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nSvgRadialGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: SvgRadialGradientComponent, selector: \"g[ngx-charts-svg-radial-gradient]\", inputs: { color: \"color\", name: \"name\", startOpacity: \"startOpacity\", endOpacity: \"endOpacity\", cx: \"cx\", cy: \"cy\", stops: \"stops\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n `, isInline: true, directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SvgRadialGradientComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-svg-radial-gradient]',\n template: `\n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { color: [{\n type: Input\n }], name: [{\n type: Input\n }], startOpacity: [{\n type: Input\n }], endOpacity: [{\n type: Input\n }], cx: [{\n type: Input\n }], cy: [{\n type: Input\n }], stops: [{\n type: Input\n }] } });\n\nclass AreaComponent {\n constructor(element) {\n this.opacity = 1;\n this.startOpacity = 0.5;\n this.endOpacity = 1;\n this.gradient = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.animationsLoaded = false;\n this.hasGradient = false;\n this.barOrientation = BarOrientation;\n this.element = element.nativeElement;\n }\n ngOnChanges() {\n this.update();\n if (!this.animationsLoaded) {\n this.loadAnimation();\n this.animationsLoaded = true;\n }\n }\n update() {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (this.gradient || this.stops) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n }\n else {\n this.hasGradient = false;\n }\n this.updatePathEl();\n }\n loadAnimation() {\n this.areaPath = this.startingPath;\n setTimeout(this.updatePathEl.bind(this), 100);\n }\n updatePathEl() {\n const node = select(this.element).select('.area');\n if (this.animations) {\n node.transition().duration(750).attr('d', this.path);\n }\n else {\n node.attr('d', this.path);\n }\n }\n getGradient() {\n if (this.stops) {\n return this.stops;\n }\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.startOpacity\n },\n {\n offset: 100,\n color: this.fill,\n opacity: this.endOpacity\n }\n ];\n }\n}\nAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AreaComponent, selector: \"g[ngx-charts-area]\", inputs: { data: \"data\", path: \"path\", startingPath: \"startingPath\", fill: \"fill\", opacity: \"opacity\", startOpacity: \"startOpacity\", endOpacity: \"endOpacity\", gradient: \"gradient\", stops: \"stops\", animations: \"animations\" }, outputs: { select: \"select\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n `, isInline: true, components: [{ type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: [\"orientation\", \"name\", \"stops\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-area]',\n template: `\n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { data: [{\n type: Input\n }], path: [{\n type: Input\n }], startingPath: [{\n type: Input\n }], fill: [{\n type: Input\n }], opacity: [{\n type: Input\n }], startOpacity: [{\n type: Input\n }], endOpacity: [{\n type: Input\n }], gradient: [{\n type: Input\n }], stops: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }] } });\n\n// Robert Penner's easeOutExpo\nfunction easeOutExpo(t, b, c, d) {\n return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b;\n}\n/**\n * Counts from a number to the end incrementally.\n */\nfunction count(countFrom, countTo, countDecimals, countDuration, callback) {\n const startVal = Number(countFrom);\n const endVal = Number(countTo);\n const countDown = startVal > endVal;\n const decimals = Math.max(0, countDecimals);\n const dec = Math.pow(10, decimals);\n const duration = Number(countDuration) * 1000;\n let startTime;\n function runCount(timestamp) {\n let frameVal;\n const progress = timestamp - startTime;\n if (countDown) {\n frameVal = startVal - easeOutExpo(progress, 0, startVal - endVal, duration);\n }\n else {\n frameVal = easeOutExpo(progress, startVal, endVal - startVal, duration);\n }\n if (countDown) {\n frameVal = frameVal < endVal ? endVal : frameVal;\n }\n else {\n frameVal = frameVal > endVal ? endVal : frameVal;\n }\n frameVal = Math.round(frameVal * dec) / dec;\n const tick = progress < duration;\n callback({\n value: frameVal,\n progress,\n timestamp,\n finished: !tick\n });\n if (tick) {\n return requestAnimationFrame(val => runCount(val));\n }\n }\n return requestAnimationFrame(timestamp => {\n startTime = timestamp;\n return runCount(timestamp);\n });\n}\n/**\n * Determine decimals places\n *\n * @export\n */\nfunction decimalChecker(countTo) {\n const endVal = Number(countTo);\n if (endVal % 1 !== 0 && Math.abs(endVal) <= 10) {\n return 2;\n }\n return 0;\n}\n\n/**\n * Count up component\n *\n * Loosely inspired by:\n * - https://github.com/izupet/angular2-counto\n * - https://inorganik.github.io/countUp.js/\n *\n * @export\n */\nclass CountUpDirective {\n constructor(cd, element) {\n this.cd = cd;\n this.countDuration = 1;\n this.countPrefix = '';\n this.countSuffix = '';\n this.countChange = new EventEmitter();\n this.countFinish = new EventEmitter();\n this.value = '';\n this._countDecimals = 0;\n this._countTo = 0;\n this._countFrom = 0;\n this.nativeElement = element.nativeElement;\n }\n set countDecimals(val) {\n this._countDecimals = val;\n }\n get countDecimals() {\n if (this._countDecimals)\n return this._countDecimals;\n return decimalChecker(this.countTo);\n }\n set countTo(val) {\n this._countTo = parseFloat(val);\n this.start();\n }\n get countTo() {\n return this._countTo;\n }\n set countFrom(val) {\n this._countFrom = parseFloat(val);\n this.start();\n }\n get countFrom() {\n return this._countFrom;\n }\n ngOnDestroy() {\n cancelAnimationFrame(this.animationReq);\n }\n start() {\n cancelAnimationFrame(this.animationReq);\n const valueFormatting = this.valueFormatting || (value => `${this.countPrefix}${value.toLocaleString()}${this.countSuffix}`);\n const callback = ({ value, progress, finished }) => {\n this.value = valueFormatting(value);\n this.cd.markForCheck();\n if (!finished)\n this.countChange.emit({ value: this.value, progress });\n if (finished)\n this.countFinish.emit({ value: this.value, progress });\n };\n this.animationReq = count(this.countFrom, this.countTo, this.countDecimals, this.countDuration, callback);\n }\n}\nCountUpDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CountUpDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nCountUpDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: CountUpDirective, selector: \"[ngx-charts-count-up]\", inputs: { countDuration: \"countDuration\", countPrefix: \"countPrefix\", countSuffix: \"countSuffix\", valueFormatting: \"valueFormatting\", countDecimals: \"countDecimals\", countTo: \"countTo\", countFrom: \"countFrom\" }, outputs: { countChange: \"countChange\", countFinish: \"countFinish\" }, ngImport: i0, template: ` {{ value }} `, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CountUpDirective, decorators: [{\n type: Component,\n args: [{\n selector: '[ngx-charts-count-up]',\n template: ` {{ value }} `\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { countDuration: [{\n type: Input\n }], countPrefix: [{\n type: Input\n }], countSuffix: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], countDecimals: [{\n type: Input\n }], countTo: [{\n type: Input\n }], countFrom: [{\n type: Input\n }], countChange: [{\n type: Output\n }], countFinish: [{\n type: Output\n }] } });\n\n// If we don't check whether 'window' and 'global' variables are defined,\n// code will fail in browser/node with 'variable is undefined' error.\nlet root;\nif (typeof window !== 'undefined') {\n root = window;\n}\nelse if (typeof global !== 'undefined') {\n root = global;\n}\n// tslint:disable-next-line:variable-name\nconst MouseEvent = root.MouseEvent;\nfunction createMouseEvent(name, bubbles = false, cancelable = true) {\n // Calling new of an event does not work correctly on IE. The following is a tested workaround\n // See https://stackoverflow.com/questions/27176983/dispatchevent-not-working-in-ie11\n if (typeof MouseEvent === 'function') {\n // Sane browsers\n return new MouseEvent(name, { bubbles, cancelable });\n }\n else {\n // IE\n const event = document.createEvent('MouseEvent');\n event.initEvent(name, bubbles, cancelable);\n return event;\n }\n}\n\nclass TooltipArea {\n constructor(platformId) {\n this.platformId = platformId;\n this.anchorOpacity = 0;\n this.anchorPos = -1;\n this.anchorValues = [];\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n this.showPercentage = false;\n this.tooltipDisabled = false;\n this.hover = new EventEmitter();\n }\n getValues(xVal) {\n const results = [];\n for (const group of this.results) {\n const item = group.series.find(d => d.name.toString() === xVal.toString());\n let groupName = group.name;\n if (groupName instanceof Date) {\n groupName = groupName.toLocaleDateString();\n }\n if (item) {\n const label = item.name;\n let val = item.value;\n if (this.showPercentage) {\n val = (item.d1 - item.d0).toFixed(2) + '%';\n }\n let color;\n if (this.colors.scaleType === ScaleType.Linear) {\n let v = val;\n if (item.d1) {\n v = item.d1;\n }\n color = this.colors.getColor(v);\n }\n else {\n color = this.colors.getColor(group.name);\n }\n const data = Object.assign({}, item, {\n value: val,\n name: label,\n series: groupName,\n min: item.min,\n max: item.max,\n color\n });\n results.push(data);\n }\n }\n return results;\n }\n mouseMove(event) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const xPos = event.pageX - event.target.getBoundingClientRect().left;\n const closestIndex = this.findClosestPointIndex(xPos);\n const closestPoint = this.xSet[closestIndex];\n this.anchorPos = this.xScale(closestPoint);\n this.anchorPos = Math.max(0, this.anchorPos);\n this.anchorPos = Math.min(this.dims.width, this.anchorPos);\n this.anchorValues = this.getValues(closestPoint);\n if (this.anchorPos !== this.lastAnchorPos) {\n const ev = createMouseEvent('mouseleave');\n this.tooltipAnchor.nativeElement.dispatchEvent(ev);\n this.anchorOpacity = 0.7;\n this.hover.emit({\n value: closestPoint\n });\n this.showTooltip();\n this.lastAnchorPos = this.anchorPos;\n }\n }\n findClosestPointIndex(xPos) {\n let minIndex = 0;\n let maxIndex = this.xSet.length - 1;\n let minDiff = Number.MAX_VALUE;\n let closestIndex = 0;\n while (minIndex <= maxIndex) {\n const currentIndex = ((minIndex + maxIndex) / 2) | 0;\n const currentElement = this.xScale(this.xSet[currentIndex]);\n const curDiff = Math.abs(currentElement - xPos);\n if (curDiff < minDiff) {\n minDiff = curDiff;\n closestIndex = currentIndex;\n }\n if (currentElement < xPos) {\n minIndex = currentIndex + 1;\n }\n else if (currentElement > xPos) {\n maxIndex = currentIndex - 1;\n }\n else {\n minDiff = 0;\n closestIndex = currentIndex;\n break;\n }\n }\n return closestIndex;\n }\n showTooltip() {\n const event = createMouseEvent('mouseenter');\n this.tooltipAnchor.nativeElement.dispatchEvent(event);\n }\n hideTooltip() {\n const event = createMouseEvent('mouseleave');\n this.tooltipAnchor.nativeElement.dispatchEvent(event);\n this.anchorOpacity = 0;\n this.lastAnchorPos = -1;\n }\n getToolTipText(tooltipItem) {\n let result = '';\n if (tooltipItem.series !== undefined) {\n result += tooltipItem.series;\n }\n else {\n result += '???';\n }\n result += ': ';\n if (tooltipItem.value !== undefined) {\n result += tooltipItem.value.toLocaleString();\n }\n if (tooltipItem.min !== undefined || tooltipItem.max !== undefined) {\n result += ' (';\n if (tooltipItem.min !== undefined) {\n if (tooltipItem.max === undefined) {\n result += '≥';\n }\n result += tooltipItem.min.toLocaleString();\n if (tooltipItem.max !== undefined) {\n result += ' - ';\n }\n }\n else if (tooltipItem.max !== undefined) {\n result += '≤';\n }\n if (tooltipItem.max !== undefined) {\n result += tooltipItem.max.toLocaleString();\n }\n result += ')';\n }\n return result;\n }\n}\nTooltipArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipArea, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nTooltipArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: TooltipArea, selector: \"g[ngx-charts-tooltip-area]\", inputs: { dims: \"dims\", xSet: \"xSet\", xScale: \"xScale\", yScale: \"yScale\", results: \"results\", colors: \"colors\", showPercentage: \"showPercentage\", tooltipDisabled: \"tooltipDisabled\", tooltipTemplate: \"tooltipTemplate\" }, outputs: { hover: \"hover\" }, viewQueries: [{ propertyName: \"tooltipAnchor\", first: true, predicate: [\"tooltipAnchor\"], descendants: true }], ngImport: i0, template: `\n \n \n \n \n \n \n {{ getToolTipText(tooltipItem) }}\n \n \n \n \n \n `, isInline: true, directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], animations: [\n trigger('animationState', [\n transition('inactive => active', [\n style({\n opacity: 0\n }),\n animate(250, style({ opacity: 0.7 }))\n ]),\n transition('active => inactive', [\n style({\n opacity: 0.7\n }),\n animate(250, style({ opacity: 0 }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TooltipArea, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-tooltip-area]',\n template: `\n \n \n \n \n \n \n {{ getToolTipText(tooltipItem) }}\n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition('inactive => active', [\n style({\n opacity: 0\n }),\n animate(250, style({ opacity: 0.7 }))\n ]),\n transition('active => inactive', [\n style({\n opacity: 0.7\n }),\n animate(250, style({ opacity: 0 }))\n ])\n ])\n ]\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { dims: [{\n type: Input\n }], xSet: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], results: [{\n type: Input\n }], colors: [{\n type: Input\n }], showPercentage: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], hover: [{\n type: Output\n }], tooltipAnchor: [{\n type: ViewChild,\n args: ['tooltipAnchor', { static: false }]\n }] } });\n\nclass Timeline {\n constructor(element, cd) {\n this.cd = cd;\n this.height = 50;\n this.select = new EventEmitter();\n this.onDomainChange = new EventEmitter();\n this.initialized = false;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n if (!this.initialized) {\n this.addBrush();\n this.initialized = true;\n }\n }\n update() {\n this.dims = this.getDims();\n this.height = this.dims.height;\n const offsetY = this.view[1] - this.height;\n this.xDomain = this.getXDomain();\n this.xScale = this.getXScale();\n if (this.brush) {\n this.updateBrush();\n }\n this.transform = `translate(0 , ${offsetY})`;\n this.filterId = 'filter' + id().toString();\n this.filter = `url(#${this.filterId})`;\n this.cd.markForCheck();\n }\n getXDomain() {\n let values = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.name)) {\n values.push(d.name);\n }\n }\n }\n let domain = [];\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n }\n else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n }\n else {\n domain = values;\n }\n return domain;\n }\n getXScale() {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime().range([0, this.dims.width]).domain(this.xDomain);\n }\n else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear().range([0, this.dims.width]).domain(this.xDomain);\n }\n else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().range([0, this.dims.width]).padding(0.1).domain(this.xDomain);\n }\n return scale;\n }\n addBrush() {\n if (this.brush)\n return;\n const height = this.height;\n const width = this.view[0];\n this.brush = brushX()\n .extent([\n [0, 0],\n [width, height]\n ])\n .on('brush end', ({ selection }) => {\n const newSelection = selection || this.xScale.range();\n const newDomain = newSelection.map(this.xScale.invert);\n this.onDomainChange.emit(newDomain);\n this.cd.markForCheck();\n });\n select(this.element).select('.brush').call(this.brush);\n }\n updateBrush() {\n if (!this.brush)\n return;\n const height = this.height;\n const width = this.view[0];\n this.brush.extent([\n [0, 0],\n [width, height]\n ]);\n select(this.element).select('.brush').call(this.brush);\n // clear hardcoded properties so they can be defined by CSS\n select(this.element)\n .select('.selection')\n .attr('fill', undefined)\n .attr('stroke', undefined)\n .attr('fill-opacity', undefined);\n this.cd.markForCheck();\n }\n getDims() {\n const width = this.view[0];\n const dims = {\n width,\n height: this.height\n };\n return dims;\n }\n}\nTimeline.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: Timeline, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nTimeline.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: Timeline, selector: \"g[ngx-charts-timeline]\", inputs: { view: \"view\", results: \"results\", scheme: \"scheme\", customColors: \"customColors\", legend: \"legend\", autoScale: \"autoScale\", scaleType: \"scaleType\", height: \"height\" }, outputs: { select: \"select\", onDomainChange: \"onDomainChange\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".timeline .brush-background{fill:#0000000d}.timeline .brush .selection{fill:#0000001a;stroke-width:1px;stroke:#888}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}\\n\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: Timeline, decorators: [{\n type: Component,\n args: [{ selector: 'g[ngx-charts-timeline]', template: `\n \n \n \n \n \n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".timeline .brush-background{fill:#0000000d}.timeline .brush .selection{fill:#0000001a;stroke-width:1px;stroke:#888}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { view: [{\n type: Input\n }], results: [{\n type: Input\n }], scheme: [{\n type: Input\n }], customColors: [{\n type: Input\n }], legend: [{\n type: Input\n }], autoScale: [{\n type: Input\n }], scaleType: [{\n type: Input\n }], height: [{\n type: Input\n }], select: [{\n type: Output\n }], onDomainChange: [{\n type: Output\n }] } });\n\nclass AdvancedLegendComponent {\n constructor() {\n this.label = 'Total';\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.legendItems = [];\n this.labelFormatting = label => label;\n this.percentageFormatting = percentage => percentage;\n this.defaultValueFormatting = value => value.toLocaleString();\n }\n ngOnChanges(changes) {\n this.update();\n }\n getTotal() {\n return this.data.map(d => Number(d.value)).reduce((sum, d) => sum + d, 0);\n }\n update() {\n this.total = this.getTotal();\n this.roundedTotal = this.total;\n this.legendItems = this.getLegendItems();\n }\n getLegendItems() {\n return this.data.map(d => {\n const label = formatLabel(d.name);\n const value = d.value;\n const color = this.colors.getColor(label);\n const percentage = this.total > 0 ? (value / this.total) * 100 : 0;\n const formattedLabel = typeof this.labelFormatting === 'function' ? this.labelFormatting(label) : label;\n return {\n _value: value,\n data: d,\n value,\n color,\n label: formattedLabel,\n displayLabel: trimLabel(formattedLabel, 20),\n origialLabel: d.name,\n percentage: this.percentageFormatting ? this.percentageFormatting(percentage) : percentage.toLocaleString()\n };\n });\n }\n trackBy(index, item) {\n return item.label;\n }\n}\nAdvancedLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AdvancedLegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nAdvancedLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AdvancedLegendComponent, selector: \"ngx-charts-advanced-legend\", inputs: { width: \"width\", data: \"data\", colors: \"colors\", label: \"label\", animations: \"animations\", valueFormatting: \"valueFormatting\", labelFormatting: \"labelFormatting\", percentageFormatting: \"percentageFormatting\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n
\n
\n
\n {{ valueFormatting ? valueFormatting(roundedTotal) : defaultValueFormatting(roundedTotal) }}\n
\n
\n {{ label }}\n
\n
\n
\n \n
\n
\n
\n {{ valueFormatting ? valueFormatting(legendItem.value) : defaultValueFormatting(legendItem.value) }}\n
\n
{{ legendItem.displayLabel }}
\n
\n
{{ legendItem.percentage.toLocaleString() }}%
\n \n \n \n \n `, isInline: true, styles: [\".advanced-pie-legend{float:left;position:relative;top:50%;transform:translateY(-50%)}.advanced-pie-legend .total-value{font-size:36px}.advanced-pie-legend .total-label{font-size:24px;margin-bottom:19px}.advanced-pie-legend .legend-items-container{width:100%}.advanced-pie-legend .legend-items-container .legend-items{white-space:nowrap;overflow:auto}.advanced-pie-legend .legend-items-container .legend-items .legend-item{margin-right:20px;display:inline-block;cursor:pointer}.advanced-pie-legend .legend-items-container .legend-items .legend-item:focus{outline:none}.advanced-pie-legend .legend-items-container .legend-items .legend-item:hover{color:#000;transition:.2s}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-value{font-size:24px;margin-top:-6px;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-label{font-size:14px;opacity:.7;margin-left:11px;margin-top:-6px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-percent{font-size:24px;opacity:.7;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-color{border-left:4px solid;width:4px;height:42px;float:left;margin-right:7px}\\n\"], components: [{ type: CountUpDirective, selector: \"[ngx-charts-count-up]\", inputs: [\"countDuration\", \"countPrefix\", \"countSuffix\", \"valueFormatting\", \"countDecimals\", \"countTo\", \"countFrom\"], outputs: [\"countChange\", \"countFinish\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AdvancedLegendComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-advanced-legend', template: `\n
\n
\n
\n {{ valueFormatting ? valueFormatting(roundedTotal) : defaultValueFormatting(roundedTotal) }}\n
\n
\n {{ label }}\n
\n
\n
\n \n
\n
\n
\n {{ valueFormatting ? valueFormatting(legendItem.value) : defaultValueFormatting(legendItem.value) }}\n
\n
{{ legendItem.displayLabel }}
\n
\n
{{ legendItem.percentage.toLocaleString() }}%
\n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".advanced-pie-legend{float:left;position:relative;top:50%;transform:translateY(-50%)}.advanced-pie-legend .total-value{font-size:36px}.advanced-pie-legend .total-label{font-size:24px;margin-bottom:19px}.advanced-pie-legend .legend-items-container{width:100%}.advanced-pie-legend .legend-items-container .legend-items{white-space:nowrap;overflow:auto}.advanced-pie-legend .legend-items-container .legend-items .legend-item{margin-right:20px;display:inline-block;cursor:pointer}.advanced-pie-legend .legend-items-container .legend-items .legend-item:focus{outline:none}.advanced-pie-legend .legend-items-container .legend-items .legend-item:hover{color:#000;transition:.2s}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-value{font-size:24px;margin-top:-6px;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-label{font-size:14px;opacity:.7;margin-left:11px;margin-top:-6px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-percent{font-size:24px;opacity:.7;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-color{border-left:4px solid;width:4px;height:42px;float:left;margin-right:7px}\\n\"] }]\n }], propDecorators: { width: [{\n type: Input\n }], data: [{\n type: Input\n }], colors: [{\n type: Input\n }], label: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], valueFormatting: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], percentageFormatting: [{\n type: Input\n }] } });\n\nconst COMPONENTS = [\n AreaComponent,\n BaseChartComponent,\n CountUpDirective,\n TooltipArea,\n ChartComponent,\n LegendComponent,\n LegendEntryComponent,\n ScaleLegendComponent,\n CircleComponent,\n CircleSeriesComponent,\n GridPanelComponent,\n GridPanelSeriesComponent,\n SvgLinearGradientComponent,\n SvgRadialGradientComponent,\n Timeline,\n AdvancedLegendComponent\n];\nclass ChartCommonModule {\n}\nChartCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ChartCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nChartCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ChartCommonModule, declarations: [AreaComponent,\n BaseChartComponent,\n CountUpDirective,\n TooltipArea,\n ChartComponent,\n LegendComponent,\n LegendEntryComponent,\n ScaleLegendComponent,\n CircleComponent,\n CircleSeriesComponent,\n GridPanelComponent,\n GridPanelSeriesComponent,\n SvgLinearGradientComponent,\n SvgRadialGradientComponent,\n Timeline,\n AdvancedLegendComponent, VisibilityObserver], imports: [CommonModule, AxesModule, TooltipModule], exports: [CommonModule, AxesModule, TooltipModule, AreaComponent,\n BaseChartComponent,\n CountUpDirective,\n TooltipArea,\n ChartComponent,\n LegendComponent,\n LegendEntryComponent,\n ScaleLegendComponent,\n CircleComponent,\n CircleSeriesComponent,\n GridPanelComponent,\n GridPanelSeriesComponent,\n SvgLinearGradientComponent,\n SvgRadialGradientComponent,\n Timeline,\n AdvancedLegendComponent, VisibilityObserver] });\nChartCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ChartCommonModule, imports: [[CommonModule, AxesModule, TooltipModule], CommonModule, AxesModule, TooltipModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: ChartCommonModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, AxesModule, TooltipModule],\n declarations: [...COMPONENTS, VisibilityObserver],\n exports: [CommonModule, AxesModule, TooltipModule, ...COMPONENTS, VisibilityObserver]\n }]\n }] });\n\nfunction calculateViewDimensions({ width, height, margins, showXAxis = false, showYAxis = false, xAxisHeight = 0, yAxisWidth = 0, showXLabel = false, showYLabel = false, showLegend = false, legendType = ScaleType.Ordinal, legendPosition = LegendPosition.Right, columns = 12 }) {\n let xOffset = margins[3];\n let chartWidth = width;\n let chartHeight = height - margins[0] - margins[2];\n if (showLegend && legendPosition === LegendPosition.Right) {\n if (legendType === ScaleType.Ordinal) {\n columns -= 2;\n }\n else {\n columns -= 1;\n }\n }\n chartWidth = (chartWidth * columns) / 12;\n chartWidth = chartWidth - margins[1] - margins[3];\n if (showXAxis) {\n chartHeight -= 5;\n chartHeight -= xAxisHeight;\n if (showXLabel) {\n // text height + spacing between axis label and tick labels\n const offset = 25 + 5;\n chartHeight -= offset;\n }\n }\n if (showYAxis) {\n chartWidth -= 5;\n chartWidth -= yAxisWidth;\n xOffset += yAxisWidth;\n xOffset += 10;\n if (showYLabel) {\n // text height + spacing between axis label and tick labels\n const offset = 25 + 5;\n chartWidth -= offset;\n xOffset += offset;\n }\n }\n chartWidth = Math.max(0, chartWidth);\n chartHeight = Math.max(0, chartHeight);\n return {\n width: Math.floor(chartWidth),\n height: Math.floor(chartHeight),\n xOffset: Math.floor(xOffset)\n };\n}\n\nconst colorSets = [\n {\n name: 'vivid',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: [\n '#647c8a',\n '#3f51b5',\n '#2196f3',\n '#00b862',\n '#afdf0a',\n '#a7b61a',\n '#f3e562',\n '#ff9800',\n '#ff5722',\n '#ff4514'\n ]\n },\n {\n name: 'natural',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: [\n '#bf9d76',\n '#e99450',\n '#d89f59',\n '#f2dfa7',\n '#a5d7c6',\n '#7794b1',\n '#afafaf',\n '#707160',\n '#ba9383',\n '#d9d5c3'\n ]\n },\n {\n name: 'cool',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: [\n '#a8385d',\n '#7aa3e5',\n '#a27ea8',\n '#aae3f5',\n '#adcded',\n '#a95963',\n '#8796c0',\n '#7ed3ed',\n '#50abcc',\n '#ad6886'\n ]\n },\n {\n name: 'fire',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: ['#ff3d00', '#bf360c', '#ff8f00', '#ff6f00', '#ff5722', '#e65100', '#ffca28', '#ffab00']\n },\n {\n name: 'solar',\n selectable: true,\n group: ScaleType.Linear,\n domain: [\n '#fff8e1',\n '#ffecb3',\n '#ffe082',\n '#ffd54f',\n '#ffca28',\n '#ffc107',\n '#ffb300',\n '#ffa000',\n '#ff8f00',\n '#ff6f00'\n ]\n },\n {\n name: 'air',\n selectable: true,\n group: ScaleType.Linear,\n domain: [\n '#e1f5fe',\n '#b3e5fc',\n '#81d4fa',\n '#4fc3f7',\n '#29b6f6',\n '#03a9f4',\n '#039be5',\n '#0288d1',\n '#0277bd',\n '#01579b'\n ]\n },\n {\n name: 'aqua',\n selectable: true,\n group: ScaleType.Linear,\n domain: [\n '#e0f7fa',\n '#b2ebf2',\n '#80deea',\n '#4dd0e1',\n '#26c6da',\n '#00bcd4',\n '#00acc1',\n '#0097a7',\n '#00838f',\n '#006064'\n ]\n },\n {\n name: 'flame',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#A10A28',\n '#D3342D',\n '#EF6D49',\n '#FAAD67',\n '#FDDE90',\n '#DBED91',\n '#A9D770',\n '#6CBA67',\n '#2C9653',\n '#146738'\n ]\n },\n {\n name: 'ocean',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#1D68FB',\n '#33C0FC',\n '#4AFFFE',\n '#AFFFFF',\n '#FFFC63',\n '#FDBD2D',\n '#FC8A25',\n '#FA4F1E',\n '#FA141B',\n '#BA38D1'\n ]\n },\n {\n name: 'forest',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#55C22D',\n '#C1F33D',\n '#3CC099',\n '#AFFFFF',\n '#8CFC9D',\n '#76CFFA',\n '#BA60FB',\n '#EE6490',\n '#C42A1C',\n '#FC9F32'\n ]\n },\n {\n name: 'horizon',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#2597FB',\n '#65EBFD',\n '#99FDD0',\n '#FCEE4B',\n '#FEFCFA',\n '#FDD6E3',\n '#FCB1A8',\n '#EF6F7B',\n '#CB96E8',\n '#EFDEE0'\n ]\n },\n {\n name: 'neons',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#FF3333',\n '#FF33FF',\n '#CC33FF',\n '#0000FF',\n '#33CCFF',\n '#33FFFF',\n '#33FF66',\n '#CCFF33',\n '#FFCC00',\n '#FF6600'\n ]\n },\n {\n name: 'picnic',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#FAC51D',\n '#66BD6D',\n '#FAA026',\n '#29BB9C',\n '#E96B56',\n '#55ACD2',\n '#B7332F',\n '#2C83C9',\n '#9166B8',\n '#92E7E8'\n ]\n },\n {\n name: 'night',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#2B1B5A',\n '#501356',\n '#183356',\n '#28203F',\n '#391B3C',\n '#1E2B3C',\n '#120634',\n '#2D0432',\n '#051932',\n '#453080',\n '#75267D',\n '#2C507D',\n '#4B3880',\n '#752F7D',\n '#35547D'\n ]\n },\n {\n name: 'nightLights',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#4e31a5',\n '#9c25a7',\n '#3065ab',\n '#57468b',\n '#904497',\n '#46648b',\n '#32118d',\n '#a00fb3',\n '#1052a2',\n '#6e51bd',\n '#b63cc3',\n '#6c97cb',\n '#8671c1',\n '#b455be',\n '#7496c3'\n ]\n }\n];\n\nclass ColorHelper {\n constructor(scheme, type, domain, customColors) {\n if (typeof scheme === 'string') {\n scheme = colorSets.find(cs => {\n return cs.name === scheme;\n });\n }\n this.colorDomain = scheme.domain;\n this.scaleType = type;\n this.domain = domain;\n this.customColors = customColors;\n this.scale = this.generateColorScheme(scheme, type, this.domain);\n }\n generateColorScheme(scheme, type, domain) {\n if (typeof scheme === 'string') {\n scheme = colorSets.find(cs => {\n return cs.name === scheme;\n });\n }\n let colorScale;\n switch (type) {\n case ScaleType.Quantile:\n colorScale = scaleQuantile()\n .range(scheme.domain)\n .domain(domain);\n break;\n case ScaleType.Ordinal:\n colorScale = scaleOrdinal()\n .range(scheme.domain)\n .domain(domain);\n break;\n case ScaleType.Linear:\n {\n const colorDomain = [...scheme.domain];\n if (colorDomain.length === 1) {\n colorDomain.push(colorDomain[0]);\n this.colorDomain = colorDomain;\n }\n const points = range(0, 1, 1.0 / colorDomain.length);\n colorScale = scaleLinear()\n .range(colorDomain)\n .domain(points);\n }\n break;\n default:\n break;\n }\n return colorScale;\n }\n getColor(value) {\n if (value === undefined || value === null) {\n throw new Error('Value can not be null');\n }\n if (this.scaleType === ScaleType.Linear) {\n const valueScale = scaleLinear()\n .domain(this.domain)\n .range([0, 1]);\n return this.scale(valueScale(value));\n }\n else {\n if (typeof this.customColors === 'function') {\n return this.customColors(value);\n }\n const formattedValue = value.toString();\n let found; // todo type customColors\n if (this.customColors && this.customColors.length > 0) {\n found = this.customColors.find(mapping => {\n return mapping.name.toLowerCase() === formattedValue.toLowerCase();\n });\n }\n if (found) {\n return found.value;\n }\n else {\n return this.scale(value);\n }\n }\n }\n getLinearGradientStops(value, start) {\n if (start === undefined) {\n start = this.domain[0];\n }\n const valueScale = scaleLinear()\n .domain(this.domain)\n .range([0, 1]);\n const colorValueScale = scaleBand().domain(this.colorDomain).range([0, 1]);\n const endColor = this.getColor(value);\n // generate the stops\n const startVal = valueScale(start);\n const startColor = this.getColor(start);\n const endVal = valueScale(value);\n let i = 1;\n let currentVal = startVal;\n const stops = [];\n stops.push({\n color: startColor,\n offset: startVal,\n originalOffset: startVal,\n opacity: 1\n });\n while (currentVal < endVal && i < this.colorDomain.length) {\n const color = this.colorDomain[i];\n const offset = colorValueScale(color);\n if (offset <= startVal) {\n i++;\n continue;\n }\n if (offset.toFixed(4) >= (endVal - colorValueScale.bandwidth()).toFixed(4)) {\n break;\n }\n stops.push({\n color,\n offset,\n opacity: 1\n });\n currentVal = offset;\n i++;\n }\n if (stops[stops.length - 1].offset < 100) {\n stops.push({\n color: endColor,\n offset: endVal,\n opacity: 1\n });\n }\n if (endVal === startVal) {\n stops[0].offset = 0;\n stops[1].offset = 100;\n }\n else {\n // normalize the offsets into percentages\n if (stops[stops.length - 1].offset !== 100) {\n for (const s of stops) {\n s.offset = ((s.offset - startVal) / (endVal - startVal)) * 100;\n }\n }\n }\n return stops;\n }\n}\n\n/**\n * Based on the data, return an array with unique values.\n *\n * @export\n * @returns array\n */\nfunction getUniqueXDomainValues(results) {\n const valueSet = new Set();\n for (const result of results) {\n for (const d of result.series) {\n valueSet.add(d.name);\n }\n }\n return Array.from(valueSet);\n}\n/**\n * Get the scaleType of enumerable of values.\n * @returns 'time', 'linear' or 'ordinal'\n */\nfunction getScaleType(values, checkDateType = true) {\n if (checkDateType) {\n const allDates = values.every(value => value instanceof Date);\n if (allDates) {\n return ScaleType.Time;\n }\n }\n const allNumbers = values.every(value => typeof value === 'number');\n if (allNumbers) {\n return ScaleType.Linear;\n }\n return ScaleType.Ordinal;\n}\nfunction getXDomainArray(values, xScaleMin, xScaleMax) {\n const scaleType = getScaleType(values);\n let xSet = [];\n let domain = [];\n if (scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n let min;\n let max;\n if (scaleType === ScaleType.Time || scaleType === ScaleType.Linear) {\n const mappedValues = values.map(v => Number(v));\n min = xScaleMin ? xScaleMin : Math.min(...mappedValues);\n max = xScaleMax ? xScaleMax : Math.max(...mappedValues);\n }\n if (scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate)\n return 1;\n if (bDate > aDate)\n return -1;\n return 0;\n });\n }\n else if (scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n xSet = [...values].sort((a, b) => a - b);\n }\n else {\n domain = values;\n xSet = values;\n }\n return { domain, xSet, scaleType };\n}\n\nfunction sortLinear(data, property, direction = 'asc') {\n return data.sort((a, b) => {\n if (direction === 'asc') {\n return a[property] - b[property];\n }\n else {\n return b[property] - a[property];\n }\n });\n}\nfunction sortByDomain(data, property, direction = 'asc', domain) {\n return data.sort((a, b) => {\n const aVal = a[property];\n const bVal = b[property];\n const aIdx = domain.indexOf(aVal);\n const bIdx = domain.indexOf(bVal);\n if (direction === 'asc') {\n return aIdx - bIdx;\n }\n else {\n return bIdx - aIdx;\n }\n });\n}\nfunction sortByTime(data, property, direction = 'asc') {\n return data.sort((a, b) => {\n const aDate = a[property].getTime();\n const bDate = b[property].getTime();\n if (direction === 'asc') {\n if (aDate > bDate)\n return 1;\n if (bDate > aDate)\n return -1;\n return 0;\n }\n else {\n if (aDate > bDate)\n return -1;\n if (bDate > aDate)\n return 1;\n return 0;\n }\n });\n}\n\nclass AreaSeriesComponent {\n constructor() {\n this.baseValue = 'auto';\n this.stacked = false;\n this.normalized = false;\n this.animations = true;\n this.select = new EventEmitter();\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateGradient();\n let currentArea;\n let startingArea;\n const xProperty = d => {\n const label = d.name;\n return this.xScale(label);\n };\n if (this.stacked || this.normalized) {\n currentArea = area()\n .x(xProperty)\n .y0((d, i) => this.yScale(d.d0))\n .y1((d, i) => this.yScale(d.d1));\n startingArea = area()\n .x(xProperty)\n .y0(d => this.yScale.range()[0])\n .y1(d => this.yScale.range()[0]);\n }\n else {\n currentArea = area()\n .x(xProperty)\n .y0(() => (this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)))\n .y1(d => this.yScale(d.value));\n startingArea = area()\n .x(xProperty)\n .y0(d => (this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)))\n .y1(d => (this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)));\n }\n currentArea.curve(this.curve);\n startingArea.curve(this.curve);\n this.opacity = 0.8;\n let data = this.data.series;\n if (this.scaleType === ScaleType.Linear) {\n data = sortLinear(data, 'name');\n }\n else if (this.scaleType === ScaleType.Time) {\n data = sortByTime(data, 'name');\n }\n else {\n data = sortByDomain(data, 'name', 'asc', this.xScale.domain());\n }\n this.path = currentArea(data);\n this.startingPath = startingArea(data);\n }\n updateGradient() {\n if (this.colors.scaleType === ScaleType.Linear) {\n this.hasGradient = true;\n if (this.stacked || this.normalized) {\n const d0values = this.data.series.map(d => d.d0);\n const d1values = this.data.series.map(d => d.d1);\n const max = Math.max(...d1values);\n const min = Math.min(...d0values);\n this.gradientStops = this.colors.getLinearGradientStops(max, min);\n }\n else {\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n this.gradientStops = this.colors.getLinearGradientStops(max);\n }\n }\n else {\n this.hasGradient = false;\n this.gradientStops = undefined;\n }\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n isInactive(entry) {\n if (!this.activeEntries || this.activeEntries.length === 0)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item === undefined;\n }\n}\nAreaSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nAreaSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AreaSeriesComponent, selector: \"g[ngx-charts-area-series]\", inputs: { data: \"data\", xScale: \"xScale\", yScale: \"yScale\", baseValue: \"baseValue\", colors: \"colors\", scaleType: \"scaleType\", stacked: \"stacked\", normalized: \"normalized\", gradient: \"gradient\", curve: \"curve\", activeEntries: \"activeEntries\", animations: \"animations\" }, outputs: { select: \"select\" }, usesOnChanges: true, ngImport: i0, template: `\n \n `, isInline: true, components: [{ type: AreaComponent, selector: \"g[ngx-charts-area]\", inputs: [\"data\", \"path\", \"startingPath\", \"fill\", \"opacity\", \"startOpacity\", \"endOpacity\", \"gradient\", \"stops\", \"animations\"], outputs: [\"select\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-area-series]',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { data: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], baseValue: [{\n type: Input\n }], colors: [{\n type: Input\n }], scaleType: [{\n type: Input\n }], stacked: [{\n type: Input\n }], normalized: [{\n type: Input\n }], gradient: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }] } });\n\nclass AreaChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.xAxis = false;\n this.yAxis = false;\n this.baseValue = 'auto';\n this.autoScale = false;\n this.timeline = false;\n this.showGridLines = true;\n this.curve = curveLinear;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.timelineHeight = 50;\n this.timelinePadding = 10;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n this.updateTimeline();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset}, ${this.margin[0]})`;\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n updateTimeline() {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n getXDomain() {\n let values = getUniqueXDomainValues(this.results);\n this.scaleType = getScaleType(values);\n let domain = [];\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate)\n return 1;\n if (bDate > aDate)\n return -1;\n return 0;\n });\n }\n else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n }\n else {\n domain = values;\n this.xSet = values;\n }\n return domain;\n }\n getYDomain() {\n const domain = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n const values = [...domain];\n if (!this.autoScale) {\n values.push(0);\n }\n if (this.baseValue !== 'auto') {\n values.push(this.baseValue);\n }\n const min = this.yScaleMin ? this.yScaleMin : Math.min(...values);\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...values);\n return [min, max];\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n }\n else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n }\n else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n scale.range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getScaleType(values) {\n let date = true;\n let num = true;\n for (const value of values) {\n if (isDate(value)) {\n date = false;\n }\n if (isNumber(value)) {\n num = false;\n }\n }\n if (date) {\n return ScaleType.Time;\n }\n if (num) {\n return ScaleType.Linear;\n }\n return ScaleType.Ordinal;\n }\n updateDomain(domain) {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n hideCircles() {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n }\n else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\nAreaChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nAreaChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AreaChartComponent, selector: \"ngx-charts-area-chart\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", baseValue: \"baseValue\", autoScale: \"autoScale\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", timeline: \"timeline\", gradient: \"gradient\", showGridLines: \"showGridLines\", curve: \"curve\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", roundDomains: \"roundDomains\", tooltipDisabled: \"tooltipDisabled\", xScaleMin: \"xScaleMin\", xScaleMax: \"xScaleMax\", yScaleMin: \"yScaleMin\", yScaleMax: \"yScaleMax\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseleave\": \"hideCircles()\" } }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }, { propertyName: \"seriesTooltipTemplate\", first: true, predicate: [\"seriesTooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: AreaSeriesComponent, selector: \"g[ngx-charts-area-series]\", inputs: [\"data\", \"xScale\", \"yScale\", \"baseValue\", \"colors\", \"scaleType\", \"stacked\", \"normalized\", \"gradient\", \"curve\", \"activeEntries\", \"animations\"], outputs: [\"select\"] }, { type: TooltipArea, selector: \"g[ngx-charts-tooltip-area]\", inputs: [\"dims\", \"xSet\", \"xScale\", \"yScale\", \"results\", \"colors\", \"showPercentage\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"hover\"] }, { type: CircleSeriesComponent, selector: \"g[ngx-charts-circle-series]\", inputs: [\"data\", \"type\", \"xScale\", \"yScale\", \"colors\", \"scaleType\", \"visibleValue\", \"activeEntries\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: Timeline, selector: \"g[ngx-charts-timeline]\", inputs: [\"view\", \"results\", \"scheme\", \"customColors\", \"legend\", \"autoScale\", \"scaleType\", \"height\"], outputs: [\"select\", \"onDomainChange\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-area-chart', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], baseValue: [{\n type: Input\n }], autoScale: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], timeline: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], xScaleMin: [{\n type: Input\n }], xScaleMax: [{\n type: Input\n }], yScaleMin: [{\n type: Input\n }], yScaleMax: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }], seriesTooltipTemplate: [{\n type: ContentChild,\n args: ['seriesTooltipTemplate']\n }], hideCircles: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass AreaChartNormalizedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.showXAxisLabel = false;\n this.showYAxisLabel = false;\n this.showGridLines = true;\n this.curve = curveLinear;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.yDomain = [0, 100];\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.seriesType = SeriesType;\n this.timelineHeight = 50;\n this.timelinePadding = 10;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let d0 = 0;\n let total = 0;\n for (const group of this.results) {\n const d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n total += d.value;\n }\n }\n for (const group of this.results) {\n let d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n d.d0 = d0;\n d.d1 = d0 + d.value;\n d0 += d.value;\n }\n else {\n d = {\n name: val,\n value: 0,\n d0,\n d1: d0\n };\n group.series.push(d);\n }\n if (total > 0) {\n d.d0 = (d.d0 * 100) / total;\n d.d1 = (d.d1 * 100) / total;\n }\n else {\n d.d0 = 0;\n d.d1 = 0;\n }\n }\n }\n this.updateTimeline();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n updateTimeline() {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n getXDomain() {\n let values = getUniqueXDomainValues(this.results);\n this.scaleType = getScaleType(values);\n let domain = [];\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate)\n return 1;\n if (bDate > aDate)\n return -1;\n return 0;\n });\n }\n else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n }\n else {\n domain = values;\n this.xSet = values;\n }\n return domain;\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n }\n else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n }\n else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n scale.range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n updateDomain(domain) {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n hideCircles() {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n }\n else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\nAreaChartNormalizedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartNormalizedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nAreaChartNormalizedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AreaChartNormalizedComponent, selector: \"ngx-charts-area-chart-normalized\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", timeline: \"timeline\", gradient: \"gradient\", showGridLines: \"showGridLines\", curve: \"curve\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", roundDomains: \"roundDomains\", tooltipDisabled: \"tooltipDisabled\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseleave\": \"hideCircles()\" } }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }, { propertyName: \"seriesTooltipTemplate\", first: true, predicate: [\"seriesTooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: AreaSeriesComponent, selector: \"g[ngx-charts-area-series]\", inputs: [\"data\", \"xScale\", \"yScale\", \"baseValue\", \"colors\", \"scaleType\", \"stacked\", \"normalized\", \"gradient\", \"curve\", \"activeEntries\", \"animations\"], outputs: [\"select\"] }, { type: TooltipArea, selector: \"g[ngx-charts-tooltip-area]\", inputs: [\"dims\", \"xSet\", \"xScale\", \"yScale\", \"results\", \"colors\", \"showPercentage\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"hover\"] }, { type: CircleSeriesComponent, selector: \"g[ngx-charts-circle-series]\", inputs: [\"data\", \"type\", \"xScale\", \"yScale\", \"colors\", \"scaleType\", \"visibleValue\", \"activeEntries\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: Timeline, selector: \"g[ngx-charts-timeline]\", inputs: [\"view\", \"results\", \"scheme\", \"customColors\", \"legend\", \"autoScale\", \"scaleType\", \"height\"], outputs: [\"select\", \"onDomainChange\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartNormalizedComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-area-chart-normalized', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], timeline: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }], seriesTooltipTemplate: [{\n type: ContentChild,\n args: ['seriesTooltipTemplate']\n }], hideCircles: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass AreaChartStackedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.xAxis = false;\n this.yAxis = false;\n this.timeline = false;\n this.showGridLines = true;\n this.curve = curveLinear;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.timelineHeight = 50;\n this.timelinePadding = 10;\n this.seriesType = SeriesType;\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let d0 = 0;\n for (const group of this.results) {\n let d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n d.d0 = d0;\n d.d1 = d0 + d.value;\n d0 += d.value;\n }\n else {\n d = {\n name: val,\n value: 0,\n d0,\n d1: d0\n };\n group.series.push(d);\n }\n }\n }\n this.updateTimeline();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n updateTimeline() {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n getXDomain() {\n let values = getUniqueXDomainValues(this.results);\n this.scaleType = getScaleType(values);\n let domain = [];\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate)\n return 1;\n if (bDate > aDate)\n return -1;\n return 0;\n });\n }\n else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n }\n else {\n domain = values;\n this.xSet = values;\n }\n return domain;\n }\n getYDomain() {\n const domain = [];\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let sum = 0;\n for (const group of this.results) {\n const d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n sum += d.value;\n }\n }\n domain.push(sum);\n }\n const min = this.yScaleMin ? this.yScaleMin : Math.min(0, ...domain);\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...domain);\n return [min, max];\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n }\n else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n }\n else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n scale.range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n updateDomain(domain) {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n hideCircles() {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n trackBy(index, item) {\n return `${item.name}`;\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n }\n else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\nAreaChartStackedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartStackedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nAreaChartStackedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AreaChartStackedComponent, selector: \"ngx-charts-area-chart-stacked\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", timeline: \"timeline\", gradient: \"gradient\", showGridLines: \"showGridLines\", curve: \"curve\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", roundDomains: \"roundDomains\", tooltipDisabled: \"tooltipDisabled\", xScaleMin: \"xScaleMin\", xScaleMax: \"xScaleMax\", yScaleMin: \"yScaleMin\", yScaleMax: \"yScaleMax\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseleave\": \"hideCircles()\" } }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }, { propertyName: \"seriesTooltipTemplate\", first: true, predicate: [\"seriesTooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: AreaSeriesComponent, selector: \"g[ngx-charts-area-series]\", inputs: [\"data\", \"xScale\", \"yScale\", \"baseValue\", \"colors\", \"scaleType\", \"stacked\", \"normalized\", \"gradient\", \"curve\", \"activeEntries\", \"animations\"], outputs: [\"select\"] }, { type: TooltipArea, selector: \"g[ngx-charts-tooltip-area]\", inputs: [\"dims\", \"xSet\", \"xScale\", \"yScale\", \"results\", \"colors\", \"showPercentage\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"hover\"] }, { type: CircleSeriesComponent, selector: \"g[ngx-charts-circle-series]\", inputs: [\"data\", \"type\", \"xScale\", \"yScale\", \"colors\", \"scaleType\", \"visibleValue\", \"activeEntries\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: Timeline, selector: \"g[ngx-charts-timeline]\", inputs: [\"view\", \"results\", \"scheme\", \"customColors\", \"legend\", \"autoScale\", \"scaleType\", \"height\"], outputs: [\"select\", \"onDomainChange\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartStackedComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-area-chart-stacked', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], timeline: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], xScaleMin: [{\n type: Input\n }], xScaleMax: [{\n type: Input\n }], yScaleMin: [{\n type: Input\n }], yScaleMax: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }], seriesTooltipTemplate: [{\n type: ContentChild,\n args: ['seriesTooltipTemplate']\n }], hideCircles: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass AreaChartModule {\n}\nAreaChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nAreaChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartModule, declarations: [AreaChartComponent, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaSeriesComponent], imports: [ChartCommonModule], exports: [AreaChartComponent, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaSeriesComponent] });\nAreaChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AreaChartModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [AreaChartComponent, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaSeriesComponent],\n exports: [AreaChartComponent, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaSeriesComponent]\n }]\n }] });\n\nclass BarComponent {\n constructor(element) {\n this.roundEdges = true;\n this.gradient = false;\n this.offset = 0;\n this.isActive = false;\n this.animations = true;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.hasGradient = false;\n this.hideBar = false;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n if (changes.roundEdges) {\n this.loadAnimation();\n }\n this.update();\n }\n update() {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (this.gradient || this.stops) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n }\n else {\n this.hasGradient = false;\n }\n this.updatePathEl();\n this.checkToHideBar();\n }\n loadAnimation() {\n this.path = this.getStartingPath();\n setTimeout(this.update.bind(this), 100);\n }\n updatePathEl() {\n const node = select(this.element).select('.bar');\n const path = this.getPath();\n if (this.animations) {\n node.transition().duration(500).attr('d', path);\n }\n else {\n node.attr('d', path);\n }\n }\n getGradient() {\n if (this.stops) {\n return this.stops;\n }\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.getStartOpacity()\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n getStartingPath() {\n if (!this.animations) {\n return this.getPath();\n }\n let radius = this.getRadius();\n let path;\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n radius = Math.min(this.height, radius);\n path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);\n }\n else if (this.orientation === BarOrientation.Horizontal) {\n radius = Math.min(this.width, radius);\n path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);\n }\n }\n else {\n if (this.orientation === BarOrientation.Vertical) {\n path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);\n }\n else if (this.orientation === BarOrientation.Horizontal) {\n path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);\n }\n }\n return path;\n }\n getPath() {\n let radius = this.getRadius();\n let path;\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n radius = Math.min(this.height, radius);\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n }\n else if (this.orientation === BarOrientation.Horizontal) {\n radius = Math.min(this.width, radius);\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n }\n }\n else {\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n }\n return path;\n }\n getRadius() {\n let radius = 0;\n if (this.roundEdges && this.height > 5 && this.width > 5) {\n radius = Math.floor(Math.min(5, this.height / 2, this.width / 2));\n }\n return radius;\n }\n getStartOpacity() {\n if (this.roundEdges) {\n return 0.2;\n }\n else {\n return 0.5;\n }\n }\n get edges() {\n let edges = [false, false, false, false];\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n if (this.data.value > 0) {\n edges = [true, true, false, false];\n }\n else {\n edges = [false, false, true, true];\n }\n }\n else if (this.orientation === BarOrientation.Horizontal) {\n if (this.data.value > 0) {\n edges = [false, true, false, true];\n }\n else {\n edges = [true, false, true, false];\n }\n }\n }\n return edges;\n }\n onMouseEnter() {\n this.activate.emit(this.data);\n }\n onMouseLeave() {\n this.deactivate.emit(this.data);\n }\n checkToHideBar() {\n this.hideBar =\n this.noBarWhenZero &&\n ((this.orientation === BarOrientation.Vertical && this.height === 0) ||\n (this.orientation === BarOrientation.Horizontal && this.width === 0));\n }\n}\nBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarComponent, selector: \"g[ngx-charts-bar]\", inputs: { fill: \"fill\", data: \"data\", width: \"width\", height: \"height\", x: \"x\", y: \"y\", orientation: \"orientation\", roundEdges: \"roundEdges\", gradient: \"gradient\", offset: \"offset\", isActive: \"isActive\", stops: \"stops\", animations: \"animations\", ariaLabel: \"ariaLabel\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave()\" } }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n `, isInline: true, components: [{ type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: [\"orientation\", \"name\", \"stops\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-bar]',\n template: `\n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fill: [{\n type: Input\n }], data: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], x: [{\n type: Input\n }], y: [{\n type: Input\n }], orientation: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], gradient: [{\n type: Input\n }], offset: [{\n type: Input\n }], isActive: [{\n type: Input\n }], stops: [{\n type: Input\n }], animations: [{\n type: Input\n }], ariaLabel: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nvar BarChartType;\n(function (BarChartType) {\n BarChartType[\"Standard\"] = \"standard\";\n BarChartType[\"Normalized\"] = \"normalized\";\n BarChartType[\"Stacked\"] = \"stacked\";\n})(BarChartType || (BarChartType = {}));\n\nvar D0Types;\n(function (D0Types) {\n D0Types[\"positive\"] = \"positive\";\n D0Types[\"negative\"] = \"negative\";\n})(D0Types || (D0Types = {}));\n\nclass BarLabelComponent {\n constructor(element) {\n this.dimensionsChanged = new EventEmitter();\n this.horizontalPadding = 2;\n this.verticalPadding = 5;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n }\n getSize() {\n const h = this.element.getBoundingClientRect().height;\n const w = this.element.getBoundingClientRect().width;\n return { height: h, width: w, negative: this.value < 0 };\n }\n ngAfterViewInit() {\n this.dimensionsChanged.emit(this.getSize());\n }\n update() {\n if (this.valueFormatting) {\n this.formatedValue = this.valueFormatting(this.value);\n }\n else {\n this.formatedValue = formatLabel(this.value);\n }\n if (this.orientation === 'horizontal') {\n this.x = this.barX + this.barWidth;\n // if the value is negative then it's on the left of the x0.\n // we need to put the data label in front of the bar\n if (this.value < 0) {\n this.x = this.x - this.horizontalPadding;\n this.textAnchor = 'end';\n }\n else {\n this.x = this.x + this.horizontalPadding;\n this.textAnchor = 'start';\n }\n this.y = this.barY + this.barHeight / 2;\n }\n else {\n // orientation must be \"vertical\"\n this.x = this.barX + this.barWidth / 2;\n this.y = this.barY + this.barHeight;\n if (this.value < 0) {\n this.y = this.y + this.verticalPadding;\n this.textAnchor = 'end';\n }\n else {\n this.y = this.y - this.verticalPadding;\n this.textAnchor = 'start';\n }\n this.transform = `rotate(-45, ${this.x} , ${this.y})`;\n }\n }\n}\nBarLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarLabelComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nBarLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarLabelComponent, selector: \"g[ngx-charts-bar-label]\", inputs: { value: \"value\", valueFormatting: \"valueFormatting\", barX: \"barX\", barY: \"barY\", barWidth: \"barWidth\", barHeight: \"barHeight\", orientation: \"orientation\" }, outputs: { dimensionsChanged: \"dimensionsChanged\" }, usesOnChanges: true, ngImport: i0, template: `\n \n {{ formatedValue }}\n \n `, isInline: true, styles: [\".textDataLabel{font-size:11px}\\n\"], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarLabelComponent, decorators: [{\n type: Component,\n args: [{ selector: 'g[ngx-charts-bar-label]', template: `\n \n {{ formatedValue }}\n \n `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".textDataLabel{font-size:11px}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { value: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], barX: [{\n type: Input\n }], barY: [{\n type: Input\n }], barWidth: [{\n type: Input\n }], barHeight: [{\n type: Input\n }], orientation: [{\n type: Input\n }], dimensionsChanged: [{\n type: Output\n }] } });\n\nclass SeriesHorizontal {\n constructor() {\n this.type = BarChartType.Standard;\n this.tooltipDisabled = false;\n this.animations = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.dataLabelWidthChanged = new EventEmitter();\n this.barsForDataLabels = [];\n this.barOrientation = BarOrientation;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateTooltipSettings();\n const d0 = {\n [D0Types.positive]: 0,\n [D0Types.negative]: 0\n };\n let d0Type;\n d0Type = D0Types.positive;\n let total;\n if (this.type === BarChartType.Normalized) {\n total = this.series.map(d => d.value).reduce((sum, d) => sum + d, 0);\n }\n const xScaleMin = Math.max(this.xScale.domain()[0], 0);\n this.bars = this.series.map(d => {\n let value = d.value;\n const label = this.getLabel(d);\n const formattedLabel = formatLabel(label);\n const roundEdges = this.roundEdges;\n d0Type = value > 0 ? D0Types.positive : D0Types.negative;\n const bar = {\n value,\n label,\n roundEdges,\n data: d,\n formattedLabel\n };\n bar.height = this.yScale.bandwidth();\n if (this.type === BarChartType.Standard) {\n bar.width = Math.abs(this.xScale(value) - this.xScale(xScaleMin));\n if (value < 0) {\n bar.x = this.xScale(value);\n }\n else {\n bar.x = this.xScale(xScaleMin);\n }\n bar.y = this.yScale(label);\n }\n else if (this.type === BarChartType.Stacked) {\n const offset0 = d0[d0Type];\n const offset1 = offset0 + value;\n d0[d0Type] += value;\n bar.width = this.xScale(offset1) - this.xScale(offset0);\n bar.x = this.xScale(offset0);\n bar.y = 0;\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n }\n else if (this.type === BarChartType.Normalized) {\n let offset0 = d0[d0Type];\n let offset1 = offset0 + value;\n d0[d0Type] += value;\n if (total > 0) {\n offset0 = (offset0 * 100) / total;\n offset1 = (offset1 * 100) / total;\n }\n else {\n offset0 = 0;\n offset1 = 0;\n }\n bar.width = this.xScale(offset1) - this.xScale(offset0);\n bar.x = this.xScale(offset0);\n bar.y = 0;\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n value = (offset1 - offset0).toFixed(2) + '%';\n }\n if (this.colors.scaleType === ScaleType.Ordinal) {\n bar.color = this.colors.getColor(label);\n }\n else {\n if (this.type === BarChartType.Standard) {\n bar.color = this.colors.getColor(value);\n bar.gradientStops = this.colors.getLinearGradientStops(value);\n }\n else {\n bar.color = this.colors.getColor(bar.offset1);\n bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0);\n }\n }\n let tooltipLabel = formattedLabel;\n bar.ariaLabel = formattedLabel + ' ' + value.toLocaleString();\n if (this.seriesName !== null && this.seriesName !== undefined) {\n tooltipLabel = `${this.seriesName} • ${formattedLabel}`;\n bar.data.series = this.seriesName;\n bar.ariaLabel = this.seriesName + ' ' + bar.ariaLabel;\n }\n bar.tooltipText = this.tooltipDisabled\n ? undefined\n : `\n ${escapeLabel(tooltipLabel)}\n ${this.dataLabelFormatting ? this.dataLabelFormatting(value) : value.toLocaleString()}\n `;\n return bar;\n });\n this.updateDataLabels();\n }\n updateDataLabels() {\n if (this.type === BarChartType.Stacked) {\n this.barsForDataLabels = [];\n const section = {};\n section.series = this.seriesName;\n const totalPositive = this.series.map(d => d.value).reduce((sum, d) => (d > 0 ? sum + d : sum), 0);\n const totalNegative = this.series.map(d => d.value).reduce((sum, d) => (d < 0 ? sum + d : sum), 0);\n section.total = totalPositive + totalNegative;\n section.x = 0;\n section.y = 0;\n // if total is positive then we show it on the right, otherwise on the left\n if (section.total > 0) {\n section.width = this.xScale(totalPositive);\n }\n else {\n section.width = this.xScale(totalNegative);\n }\n section.height = this.yScale.bandwidth();\n this.barsForDataLabels.push(section);\n }\n else {\n this.barsForDataLabels = this.series.map(d => {\n const section = {};\n section.series = this.seriesName ?? d.label;\n section.total = d.value;\n section.x = this.xScale(0);\n section.y = this.yScale(d.label);\n section.width = this.xScale(section.total) - this.xScale(0);\n section.height = this.yScale.bandwidth();\n return section;\n });\n }\n }\n updateTooltipSettings() {\n this.tooltipPlacement = this.tooltipDisabled ? undefined : PlacementTypes.Top;\n this.tooltipType = this.tooltipDisabled ? undefined : StyleTypes.tooltip;\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(active => {\n return entry.name === active.name && entry.value === active.value;\n });\n return item !== undefined;\n }\n getLabel(dataItem) {\n if (dataItem.label) {\n return dataItem.label;\n }\n return dataItem.name;\n }\n trackBy(index, bar) {\n return bar.label;\n }\n trackDataLabelBy(index, barLabel) {\n return index + '#' + barLabel.series + '#' + barLabel.total;\n }\n click(data) {\n this.select.emit(data);\n }\n}\nSeriesHorizontal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SeriesHorizontal, deps: [], target: i0.ɵɵFactoryTarget.Component });\nSeriesHorizontal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: SeriesHorizontal, selector: \"g[ngx-charts-series-horizontal]\", inputs: { dims: \"dims\", type: \"type\", series: \"series\", xScale: \"xScale\", yScale: \"yScale\", colors: \"colors\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", activeEntries: \"activeEntries\", seriesName: \"seriesName\", tooltipTemplate: \"tooltipTemplate\", roundEdges: \"roundEdges\", animations: \"animations\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\", dataLabelWidthChanged: \"dataLabelWidthChanged\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n `, isInline: true, components: [{ type: BarComponent, selector: \"g[ngx-charts-bar]\", inputs: [\"fill\", \"data\", \"width\", \"height\", \"x\", \"y\", \"orientation\", \"roundEdges\", \"gradient\", \"offset\", \"isActive\", \"stops\", \"animations\", \"ariaLabel\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: BarLabelComponent, selector: \"g[ngx-charts-bar-label]\", inputs: [\"value\", \"valueFormatting\", \"barX\", \"barY\", \"barWidth\", \"barHeight\", \"orientation\"], outputs: [\"dimensionsChanged\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }, { type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SeriesHorizontal, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-series-horizontal]',\n template: `\n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ]\n }]\n }], propDecorators: { dims: [{\n type: Input\n }], type: [{\n type: Input\n }], series: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], colors: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], seriesName: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], animations: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], dataLabelWidthChanged: [{\n type: Output\n }] } });\n\nclass BarHorizontalComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n }\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getXScale() {\n this.xDomain = this.getXDomain();\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.xDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale() {\n this.yDomain = this.getYDomain();\n const spacing = this.yDomain.length / (this.dims.height / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.yDomain);\n }\n getXDomain() {\n const values = this.results.map(d => d.value);\n const min = this.xScaleMin ? Math.min(this.xScaleMin, ...values) : Math.min(0, ...values);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...values) : Math.max(0, ...values);\n return [min, max];\n }\n getYDomain() {\n return this.results.map(d => d.label);\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.yDomain;\n }\n else {\n domain = this.xDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === 'ordinal') {\n opts.domain = this.yDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.xDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxWidthChanged(event) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n }\n else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (event.index === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarHorizontalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarHorizontalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarHorizontalComponent, selector: \"ngx-charts-bar-horizontal\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", roundEdges: \"roundEdges\", xScaleMax: \"xScaleMax\", xScaleMin: \"xScaleMin\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesHorizontal, selector: \"g[ngx-charts-series-horizontal]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"tooltipDisabled\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelWidthChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontalComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-horizontal', template: `\n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], xScaleMax: [{\n type: Input\n }], xScaleMin: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass BarHorizontal2DComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.groupPadding = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n this.isSSR = false;\n this.barOrientation = BarOrientation;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n }\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.groupScale = this.getGroupScale();\n this.innerScale = this.getInnerScale();\n this.valueScale = this.getValueScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.groupPadding + 1);\n return scaleBand()\n .rangeRound([0, this.dims.height])\n .paddingInner(spacing)\n .paddingOuter(spacing / 2)\n .domain(this.groupDomain);\n }\n getInnerScale() {\n const height = this.groupScale.bandwidth();\n const spacing = this.innerDomain.length / (height / this.barPadding + 1);\n return scaleBand().rangeRound([0, height]).paddingInner(spacing).domain(this.innerDomain);\n }\n getValueScale() {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n const min = Math.min(0, ...domain);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...domain) : Math.max(0, ...domain);\n return [min, max];\n }\n groupTransform(group) {\n return `translate(0, ${this.groupScale(group.label)})`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n }\n else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxWidthChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n }\n else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n }\n else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n }\n else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarHorizontal2DComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontal2DComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarHorizontal2DComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarHorizontal2DComponent, selector: \"ngx-charts-bar-horizontal-2d\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", groupPadding: \"groupPadding\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", roundEdges: \"roundEdges\", xScaleMax: \"xScaleMax\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: GridPanelSeriesComponent, selector: \"g[ngx-charts-grid-panel-series]\", inputs: [\"data\", \"dims\", \"xScale\", \"yScale\", \"orient\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesHorizontal, selector: \"g[ngx-charts-series-horizontal]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"tooltipDisabled\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelWidthChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontal2DComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-horizontal-2d', template: `\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], groupPadding: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], xScaleMax: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass BarHorizontalNormalizedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.valueDomain = [0, 100];\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.barChartType = BarChartType;\n this.isSSR = false;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getYScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.groupDomain);\n }\n getXScale() {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n groupTransform(group) {\n return `translate(0, ${this.yScale(group.name)})`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n }\n else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n }\n else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n }\n else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarHorizontalNormalizedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontalNormalizedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarHorizontalNormalizedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarHorizontalNormalizedComponent, selector: \"ngx-charts-bar-horizontal-normalized\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesHorizontal, selector: \"g[ngx-charts-series-horizontal]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"tooltipDisabled\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelWidthChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontalNormalizedComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-horizontal-normalized', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass BarHorizontalStackedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n this.barChartType = BarChartType;\n this.isSSR = false;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n }\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n let smallest = 0;\n let biggest = 0;\n for (const group of this.results) {\n let smallestSum = 0;\n let biggestSum = 0;\n for (const d of group.series) {\n if (d.value < 0) {\n smallestSum += d.value;\n }\n else {\n biggestSum += d.value;\n }\n smallest = d.value < smallest ? d.value : smallest;\n biggest = d.value > biggest ? d.value : biggest;\n }\n domain.push(smallestSum);\n domain.push(biggestSum);\n }\n domain.push(smallest);\n domain.push(biggest);\n const min = Math.min(0, ...domain);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...domain) : Math.max(...domain);\n return [min, max];\n }\n getYScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.groupDomain);\n }\n getXScale() {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n groupTransform(group) {\n return `translate(0, ${this.yScale(group.name)})`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n }\n else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxWidthChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n }\n else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n }\n else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n }\n else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarHorizontalStackedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontalStackedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarHorizontalStackedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarHorizontalStackedComponent, selector: \"ngx-charts-bar-horizontal-stacked\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", xScaleMax: \"xScaleMax\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesHorizontal, selector: \"g[ngx-charts-series-horizontal]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"tooltipDisabled\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelWidthChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarHorizontalStackedComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-horizontal-stacked', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], xScaleMax: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass SeriesVerticalComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.type = BarChartType.Standard;\n this.tooltipDisabled = false;\n this.animations = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.dataLabelHeightChanged = new EventEmitter();\n this.barsForDataLabels = [];\n this.barOrientation = BarOrientation;\n this.isSSR = false;\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateTooltipSettings();\n let width;\n if (this.series.length) {\n width = this.xScale.bandwidth();\n }\n width = Math.round(width);\n const yScaleMin = Math.max(this.yScale.domain()[0], 0);\n const d0 = {\n [D0Types.positive]: 0,\n [D0Types.negative]: 0\n };\n let d0Type = D0Types.positive;\n let total;\n if (this.type === BarChartType.Normalized) {\n total = this.series.map(d => d.value).reduce((sum, d) => sum + d, 0);\n }\n this.bars = this.series.map((d, index) => {\n let value = d.value;\n const label = this.getLabel(d);\n const formattedLabel = formatLabel(label);\n const roundEdges = this.roundEdges;\n d0Type = value > 0 ? D0Types.positive : D0Types.negative;\n const bar = {\n value,\n label,\n roundEdges,\n data: d,\n width,\n formattedLabel,\n height: 0,\n x: 0,\n y: 0\n };\n if (this.type === BarChartType.Standard) {\n bar.height = Math.abs(this.yScale(value) - this.yScale(yScaleMin));\n bar.x = this.xScale(label);\n if (value < 0) {\n bar.y = this.yScale(0);\n }\n else {\n bar.y = this.yScale(value);\n }\n }\n else if (this.type === BarChartType.Stacked) {\n const offset0 = d0[d0Type];\n const offset1 = offset0 + value;\n d0[d0Type] += value;\n bar.height = this.yScale(offset0) - this.yScale(offset1);\n bar.x = 0;\n bar.y = this.yScale(offset1);\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n }\n else if (this.type === BarChartType.Normalized) {\n let offset0 = d0[d0Type];\n let offset1 = offset0 + value;\n d0[d0Type] += value;\n if (total > 0) {\n offset0 = (offset0 * 100) / total;\n offset1 = (offset1 * 100) / total;\n }\n else {\n offset0 = 0;\n offset1 = 0;\n }\n bar.height = this.yScale(offset0) - this.yScale(offset1);\n bar.x = 0;\n bar.y = this.yScale(offset1);\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n value = (offset1 - offset0).toFixed(2) + '%';\n }\n if (this.colors.scaleType === ScaleType.Ordinal) {\n bar.color = this.colors.getColor(label);\n }\n else {\n if (this.type === BarChartType.Standard) {\n bar.color = this.colors.getColor(value);\n bar.gradientStops = this.colors.getLinearGradientStops(value);\n }\n else {\n bar.color = this.colors.getColor(bar.offset1);\n bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0);\n }\n }\n let tooltipLabel = formattedLabel;\n bar.ariaLabel = formattedLabel + ' ' + value.toLocaleString();\n if (this.seriesName !== null && this.seriesName !== undefined) {\n tooltipLabel = `${this.seriesName} • ${formattedLabel}`;\n bar.data.series = this.seriesName;\n bar.ariaLabel = this.seriesName + ' ' + bar.ariaLabel;\n }\n bar.tooltipText = this.tooltipDisabled\n ? undefined\n : `\n ${escapeLabel(tooltipLabel)}\n ${this.dataLabelFormatting ? this.dataLabelFormatting(value) : value.toLocaleString()}\n `;\n return bar;\n });\n this.updateDataLabels();\n }\n updateDataLabels() {\n if (this.type === BarChartType.Stacked) {\n this.barsForDataLabels = [];\n const section = {};\n section.series = this.seriesName;\n const totalPositive = this.series.map(d => d.value).reduce((sum, d) => (d > 0 ? sum + d : sum), 0);\n const totalNegative = this.series.map(d => d.value).reduce((sum, d) => (d < 0 ? sum + d : sum), 0);\n section.total = totalPositive + totalNegative;\n section.x = 0;\n section.y = 0;\n if (section.total > 0) {\n section.height = this.yScale(totalPositive);\n }\n else {\n section.height = this.yScale(totalNegative);\n }\n section.width = this.xScale.bandwidth();\n this.barsForDataLabels.push(section);\n }\n else {\n this.barsForDataLabels = this.series.map(d => {\n const section = {};\n section.series = this.seriesName ?? d.label;\n section.total = d.value;\n section.x = this.xScale(d.label);\n section.y = this.yScale(0);\n section.height = this.yScale(section.total) - this.yScale(0);\n section.width = this.xScale.bandwidth();\n return section;\n });\n }\n }\n updateTooltipSettings() {\n this.tooltipPlacement = this.tooltipDisabled ? undefined : PlacementTypes.Top;\n this.tooltipType = this.tooltipDisabled ? undefined : StyleTypes.tooltip;\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(active => {\n return entry.name === active.name && entry.value === active.value;\n });\n return item !== undefined;\n }\n onClick(data) {\n this.select.emit(data);\n }\n getLabel(dataItem) {\n if (dataItem.label) {\n return dataItem.label;\n }\n return dataItem.name;\n }\n trackBy(index, bar) {\n return bar.label;\n }\n trackDataLabelBy(index, barLabel) {\n return index + '#' + barLabel.series + '#' + barLabel.total;\n }\n}\nSeriesVerticalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SeriesVerticalComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nSeriesVerticalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: SeriesVerticalComponent, selector: \"g[ngx-charts-series-vertical]\", inputs: { dims: \"dims\", type: \"type\", series: \"series\", xScale: \"xScale\", yScale: \"yScale\", colors: \"colors\", gradient: \"gradient\", activeEntries: \"activeEntries\", seriesName: \"seriesName\", tooltipDisabled: \"tooltipDisabled\", tooltipTemplate: \"tooltipTemplate\", roundEdges: \"roundEdges\", animations: \"animations\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\", dataLabelHeightChanged: \"dataLabelHeightChanged\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n `, isInline: true, components: [{ type: BarComponent, selector: \"g[ngx-charts-bar]\", inputs: [\"fill\", \"data\", \"width\", \"height\", \"x\", \"y\", \"orientation\", \"roundEdges\", \"gradient\", \"offset\", \"isActive\", \"stops\", \"animations\", \"ariaLabel\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: BarLabelComponent, selector: \"g[ngx-charts-bar-label]\", inputs: [\"value\", \"valueFormatting\", \"barX\", \"barY\", \"barWidth\", \"barHeight\", \"orientation\"], outputs: [\"dimensionsChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: SeriesVerticalComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-series-vertical]',\n template: `\n \n \n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ]\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { dims: [{\n type: Input\n }], type: [{\n type: Input\n }], series: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], colors: [{\n type: Input\n }], gradient: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], seriesName: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], animations: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], dataLabelHeightChanged: [{\n type: Output\n }] } });\n\nclass BarVerticalComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n getXScale() {\n this.xDomain = this.getXDomain();\n const spacing = this.xDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().range([0, this.dims.width]).paddingInner(spacing).domain(this.xDomain);\n }\n getYScale() {\n this.yDomain = this.getYDomain();\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.yDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getXDomain() {\n return this.results.map(d => d.label);\n }\n getYDomain() {\n const values = this.results.map(d => d.value);\n let min = this.yScaleMin ? Math.min(this.yScaleMin, ...values) : Math.min(0, ...values);\n if (this.yAxisTicks && !this.yAxisTicks.some(isNaN)) {\n min = Math.min(min, ...this.yAxisTicks);\n }\n let max = this.yScaleMax ? Math.max(this.yScaleMax, ...values) : Math.max(0, ...values);\n if (this.yAxisTicks && !this.yAxisTicks.some(isNaN)) {\n max = Math.max(max, ...this.yAxisTicks);\n }\n return [min, max];\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.xDomain;\n }\n else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.xDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxHeightChanged(event) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n }\n else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (event.index === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarVerticalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVerticalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarVerticalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarVerticalComponent, selector: \"ngx-charts-bar-vertical\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", roundEdges: \"roundEdges\", yScaleMax: \"yScaleMax\", yScaleMin: \"yScaleMin\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesVerticalComponent, selector: \"g[ngx-charts-series-vertical]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipDisabled\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelHeightChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVerticalComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-vertical', template: `\n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], yScaleMax: [{\n type: Input\n }], yScaleMin: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass BarVertical2DComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.scaleType = ScaleType.Ordinal;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.groupPadding = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n this.isSSR = false;\n this.barOrientation = BarOrientation;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.groupScale = this.getGroupScale();\n this.innerScale = this.getInnerScale();\n this.valueScale = this.getValueScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n onDataLabelMaxHeightChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n }\n else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n getGroupScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.groupPadding + 1);\n return scaleBand()\n .rangeRound([0, this.dims.width])\n .paddingInner(spacing)\n .paddingOuter(spacing / 2)\n .domain(this.groupDomain);\n }\n getInnerScale() {\n const width = this.groupScale.bandwidth();\n const spacing = this.innerDomain.length / (width / this.barPadding + 1);\n return scaleBand().rangeRound([0, width]).paddingInner(spacing).domain(this.innerDomain);\n }\n getValueScale() {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n const min = Math.min(0, ...domain);\n const max = this.yScaleMax ? Math.max(this.yScaleMax, ...domain) : Math.max(0, ...domain);\n return [min, max];\n }\n groupTransform(group) {\n return `translate(${this.groupScale(group.label)}, 0)`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n }\n else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n }\n else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n }\n else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarVertical2DComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVertical2DComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarVertical2DComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarVertical2DComponent, selector: \"ngx-charts-bar-vertical-2d\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", scaleType: \"scaleType\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", groupPadding: \"groupPadding\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", roundEdges: \"roundEdges\", yScaleMax: \"yScaleMax\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: GridPanelSeriesComponent, selector: \"g[ngx-charts-grid-panel-series]\", inputs: [\"data\", \"dims\", \"xScale\", \"yScale\", \"orient\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesVerticalComponent, selector: \"g[ngx-charts-series-vertical]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipDisabled\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelHeightChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVertical2DComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-vertical-2d', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], scaleType: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], groupPadding: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], yScaleMax: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass BarVerticalNormalizedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.valueDomain = [0, 100];\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.isSSR = false;\n this.barChartType = BarChartType;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getXScale() {\n const spacing = this.groupDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.width]).paddingInner(spacing).domain(this.groupDomain);\n }\n getYScale() {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n groupTransform(group) {\n return `translate(${this.xScale(group.name)}, 0)`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n }\n else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n }\n else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n }\n else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarVerticalNormalizedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVerticalNormalizedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarVerticalNormalizedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarVerticalNormalizedComponent, selector: \"ngx-charts-bar-vertical-normalized\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesVerticalComponent, selector: \"g[ngx-charts-series-vertical]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipDisabled\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelHeightChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVerticalNormalizedComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-vertical-normalized', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass BarVerticalStackedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n this.isSSR = false;\n this.barChartType = BarChartType;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n let smallest = 0;\n let biggest = 0;\n for (const group of this.results) {\n let smallestSum = 0;\n let biggestSum = 0;\n for (const d of group.series) {\n if (d.value < 0) {\n smallestSum += d.value;\n }\n else {\n biggestSum += d.value;\n }\n smallest = d.value < smallest ? d.value : smallest;\n biggest = d.value > biggest ? d.value : biggest;\n }\n domain.push(smallestSum);\n domain.push(biggestSum);\n }\n domain.push(smallest);\n domain.push(biggest);\n const min = Math.min(0, ...domain);\n const max = this.yScaleMax ? Math.max(this.yScaleMax, ...domain) : Math.max(...domain);\n return [min, max];\n }\n getXScale() {\n const spacing = this.groupDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.width]).paddingInner(spacing).domain(this.groupDomain);\n }\n getYScale() {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n onDataLabelMaxHeightChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n }\n else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n groupTransform(group) {\n return `translate(${this.xScale(group.name) || 0}, 0)`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n }\n else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n }\n else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n }\n else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nBarVerticalStackedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVerticalStackedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBarVerticalStackedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BarVerticalStackedComponent, selector: \"ngx-charts-bar-vertical-stacked\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\", showGridLines: \"showGridLines\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", barPadding: \"barPadding\", roundDomains: \"roundDomains\", yScaleMax: \"yScaleMax\", showDataLabel: \"showDataLabel\", dataLabelFormatting: \"dataLabelFormatting\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: SeriesVerticalComponent, selector: \"g[ngx-charts-series-vertical]\", inputs: [\"dims\", \"type\", \"series\", \"xScale\", \"yScale\", \"colors\", \"gradient\", \"activeEntries\", \"seriesName\", \"tooltipDisabled\", \"tooltipTemplate\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dataLabelHeightChanged\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarVerticalStackedComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bar-vertical-stacked', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], barPadding: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], yScaleMax: [{\n type: Input\n }], showDataLabel: [{\n type: Input\n }], dataLabelFormatting: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass BarChartModule {\n}\nBarChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBarChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarChartModule, declarations: [BarComponent,\n BarHorizontalComponent,\n BarHorizontal2DComponent,\n BarHorizontalNormalizedComponent,\n BarHorizontalStackedComponent,\n BarVerticalComponent,\n BarVertical2DComponent,\n BarVerticalNormalizedComponent,\n BarVerticalStackedComponent,\n BarLabelComponent,\n SeriesHorizontal,\n SeriesVerticalComponent], imports: [ChartCommonModule], exports: [BarComponent,\n BarHorizontalComponent,\n BarHorizontal2DComponent,\n BarHorizontalNormalizedComponent,\n BarHorizontalStackedComponent,\n BarVerticalComponent,\n BarVertical2DComponent,\n BarVerticalNormalizedComponent,\n BarVerticalStackedComponent,\n BarLabelComponent,\n SeriesHorizontal,\n SeriesVerticalComponent] });\nBarChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarChartModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BarChartModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [\n BarComponent,\n BarHorizontalComponent,\n BarHorizontal2DComponent,\n BarHorizontalNormalizedComponent,\n BarHorizontalStackedComponent,\n BarVerticalComponent,\n BarVertical2DComponent,\n BarVerticalNormalizedComponent,\n BarVerticalStackedComponent,\n BarLabelComponent,\n SeriesHorizontal,\n SeriesVerticalComponent\n ],\n exports: [\n BarComponent,\n BarHorizontalComponent,\n BarHorizontal2DComponent,\n BarHorizontalNormalizedComponent,\n BarHorizontalStackedComponent,\n BarVerticalComponent,\n BarVertical2DComponent,\n BarVerticalNormalizedComponent,\n BarVerticalStackedComponent,\n BarLabelComponent,\n SeriesHorizontal,\n SeriesVerticalComponent\n ]\n }]\n }] });\n\nconst cloneDeep = rfdc();\nclass BoxComponent {\n constructor(element, cd) {\n this.cd = cd;\n this.roundEdges = true;\n this.gradient = false;\n this.offset = 0;\n this.isActive = false;\n this.animations = true;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.BarOrientation = BarOrientation;\n this.initialized = false;\n this.hasGradient = false;\n this.hideBar = false;\n this.nativeElm = element.nativeElement;\n }\n ngOnChanges(changes) {\n if (!this.initialized) {\n this.loadAnimation();\n this.initialized = true;\n }\n else {\n this.update();\n }\n }\n update() {\n this.boxStrokeWidth = Math.max(this.strokeWidth, 1);\n this.whiskerStrokeWidth = Math.max(this.strokeWidth / 2, 1);\n this.medianLineWidth = 1.5 * this.strokeWidth;\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (this.gradient) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n }\n else {\n this.hasGradient = false;\n }\n this.updateLineEl();\n this.updatePathEl();\n this.checkToHideBar();\n this.maskLineId = 'mask' + id().toString();\n this.maskLine = `url(#${this.maskLineId})`;\n if (this.cd) {\n this.cd.markForCheck();\n }\n }\n loadAnimation() {\n this.boxPath = this.oldPath = this.getStartingPath();\n this.oldLineCoordinates = this.getStartingLineCoordinates();\n setTimeout(this.update.bind(this), 100);\n }\n updatePathEl() {\n const nodeBar = select(this.nativeElm).selectAll('.bar');\n const path = this.getPath();\n if (this.animations) {\n nodeBar\n .attr('d', this.oldPath)\n .transition()\n .ease(easeSinInOut)\n .duration(500)\n .attrTween('d', this.pathTween(path, 4));\n }\n else {\n nodeBar.attr('d', path);\n }\n this.oldPath = path;\n }\n updateLineEl() {\n const lineEl = select(this.nativeElm).selectAll('.bar-line');\n const lineCoordinates = this.lineCoordinates;\n const oldLineCoordinates = this.oldLineCoordinates;\n if (this.animations) {\n lineEl\n .attr('x1', (_, index) => oldLineCoordinates[index].v1.x)\n .attr('y1', (_, index) => oldLineCoordinates[index].v1.y)\n .attr('x2', (_, index) => oldLineCoordinates[index].v2.x)\n .attr('y2', (_, index) => oldLineCoordinates[index].v2.y)\n .transition()\n .ease(easeSinInOut)\n .duration(500)\n .attr('x1', (_, index) => lineCoordinates[index].v1.x)\n .attr('y1', (_, index) => lineCoordinates[index].v1.y)\n .attr('x2', (_, index) => lineCoordinates[index].v2.x)\n .attr('y2', (_, index) => lineCoordinates[index].v2.y);\n }\n else {\n lineEl\n .attr('x1', (_, index) => lineCoordinates[index].v1.x)\n .attr('y1', (_, index) => lineCoordinates[index].v1.y)\n .attr('x2', (_, index) => lineCoordinates[index].v2.x)\n .attr('y2', (_, index) => lineCoordinates[index].v2.y);\n }\n this.oldLineCoordinates = [...lineCoordinates];\n }\n /**\n * See [D3 Selections](https://www.d3indepth.com/selections/)\n * @param d The joined data.\n * @param index The index of the element within the selection\n * @param node The node element (Line).\n */\n lineTween(attr, d, index, node) {\n const nodeLineEl = node[index];\n return nodeLineEl[attr].baseVal.value;\n }\n // TODO: Refactor into another .ts file if https://github.com/swimlane/ngx-charts/pull/1179 gets merged.\n pathTween(d1, precision) {\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const path0 = this;\n const path1 = this.cloneNode();\n path1.setAttribute('d', d1);\n const n0 = path0?.getTotalLength();\n const n1 = path1?.getTotalLength();\n // Uniform sampling of distance based on specified precision.\n const distances = [0];\n let i = 0;\n const dt = precision / Math.max(n0, n1);\n while (i < 1) {\n distances.push(i);\n i += dt;\n }\n distances.push(1);\n // Compute point-interpolators at each distance.\n const points = distances.map((t) => {\n const p0 = path0.getPointAtLength(t * n0);\n const p1 = path1.getPointAtLength(t * n1);\n return interpolate([p0.x, p0.y], [p1.x, p1.y]);\n });\n // 't': T is the fraction of time (between 0 and 1) since the transition began.\n return (t) => {\n return t < 1 ? 'M' + points.map((p) => p(t)).join('L') : d1;\n };\n };\n }\n getStartingPath() {\n if (!this.animations) {\n return this.getPath();\n }\n const radius = this.roundEdges ? 1 : 0;\n const { x, y } = this.lineCoordinates[2].v1;\n return roundedRect(x - this.width, y - 1, this.width, 2, radius, this.edges);\n }\n getPath() {\n const radius = this.getRadius();\n let path = '';\n path = roundedRect(this.x, this.y, this.width, this.height, Math.min(this.height, radius), this.edges);\n return path;\n }\n getStartingLineCoordinates() {\n if (!this.animations) {\n return [...this.lineCoordinates];\n }\n const lineCoordinates = cloneDeep(this.lineCoordinates);\n lineCoordinates[1].v1.y = lineCoordinates[1].v2.y = lineCoordinates[3].v1.y = lineCoordinates[3].v2.y = lineCoordinates[0].v1.y = lineCoordinates[0].v2.y =\n lineCoordinates[2].v1.y;\n return lineCoordinates;\n }\n getRadius() {\n let radius = 0;\n if (this.roundEdges && this.height > 5 && this.width > 5) {\n radius = Math.floor(Math.min(5, this.height / 2, this.width / 2));\n }\n return radius;\n }\n getGradient() {\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.getStartOpacity()\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n getStartOpacity() {\n if (this.roundEdges) {\n return 0.2;\n }\n else {\n return 0.5;\n }\n }\n get edges() {\n let edges = [false, false, false, false];\n if (this.roundEdges) {\n edges = [true, true, true, true];\n }\n return edges;\n }\n onMouseEnter() {\n this.activate.emit(this.data);\n }\n onMouseLeave() {\n this.deactivate.emit(this.data);\n }\n checkToHideBar() {\n this.hideBar = this.noBarWhenZero && this.height === 0;\n }\n}\nBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BoxComponent, selector: \"g[ngx-charts-box]\", inputs: { strokeColor: \"strokeColor\", strokeWidth: \"strokeWidth\", fill: \"fill\", data: \"data\", width: \"width\", height: \"height\", x: \"x\", y: \"y\", lineCoordinates: \"lineCoordinates\", roundEdges: \"roundEdges\", gradient: \"gradient\", gradientStops: \"gradientStops\", offset: \"offset\", isActive: \"isActive\", animations: \"animations\", ariaLabel: \"ariaLabel\", noBarWhenZero: \"noBarWhenZero\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave()\" } }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, components: [{ type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: [\"orientation\", \"name\", \"stops\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-box]',\n template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { strokeColor: [{\n type: Input\n }], strokeWidth: [{\n type: Input\n }], fill: [{\n type: Input\n }], data: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], x: [{\n type: Input\n }], y: [{\n type: Input\n }], lineCoordinates: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], gradient: [{\n type: Input\n }], gradientStops: [{\n type: Input\n }], offset: [{\n type: Input\n }], isActive: [{\n type: Input\n }], animations: [{\n type: Input\n }], ariaLabel: [{\n type: Input\n }], noBarWhenZero: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass BoxSeriesComponent {\n constructor() {\n this.animations = true;\n this.tooltipDisabled = false;\n this.gradient = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n }\n ngOnChanges(changes) {\n this.update();\n }\n onClick(data) {\n this.select.emit(data);\n }\n update() {\n this.updateTooltipSettings();\n const width = this.series && this.series.series.length ? Math.round(this.xScale.bandwidth()) : null;\n const seriesName = this.series.name;\n // Calculate Quantile and Whiskers for each box serie.\n this.counts = this.series.series;\n const mappedCounts = this.counts.map(serie => Number(serie.value));\n this.whiskers = [min(mappedCounts), max(mappedCounts)];\n // We get the group count and must sort it in order to retrieve quantiles.\n const groupCounts = this.counts.map(item => item.value).sort((a, b) => Number(a) - Number(b));\n this.quartiles = this.getBoxQuantiles(groupCounts);\n this.lineCoordinates = this.getLinesCoordinates(seriesName.toString(), this.whiskers, this.quartiles, width);\n const value = this.quartiles[1];\n const formattedLabel = formatLabel(seriesName);\n const box = {\n value,\n data: this.counts,\n label: seriesName,\n formattedLabel,\n width,\n height: 0,\n x: 0,\n y: 0,\n roundEdges: this.roundEdges,\n quartiles: this.quartiles,\n lineCoordinates: this.lineCoordinates\n };\n box.height = Math.abs(this.yScale(this.quartiles[0]) - this.yScale(this.quartiles[2]));\n box.x = this.xScale(seriesName.toString());\n box.y = this.yScale(this.quartiles[2]);\n box.ariaLabel = formattedLabel + ' - Median: ' + value.toLocaleString();\n if (this.colors.scaleType === ScaleType.Ordinal) {\n box.color = this.colors.getColor(seriesName);\n }\n else {\n box.color = this.colors.getColor(this.quartiles[1]);\n box.gradientStops = this.colors.getLinearGradientStops(this.quartiles[0], this.quartiles[2]);\n }\n const tooltipLabel = formattedLabel;\n const formattedTooltipLabel = `\n ${escapeLabel(tooltipLabel)}\n \n • Q1: ${this.quartiles[0]} • Q2: ${this.quartiles[1]} • Q3: ${this.quartiles[2]}
\n • Min: ${this.whiskers[0]} • Max: ${this.whiskers[1]}\n
`;\n box.tooltipText = this.tooltipDisabled ? undefined : formattedTooltipLabel;\n this.tooltipTitle = this.tooltipDisabled ? undefined : box.tooltipText;\n this.box = box;\n }\n getBoxQuantiles(inputData) {\n return [quantile(inputData, 0.25), quantile(inputData, 0.5), quantile(inputData, 0.75)];\n }\n getLinesCoordinates(seriesName, whiskers, quartiles, barWidth) {\n // The X value is not being centered, so had to sum half the width to align it.\n const commonX = this.xScale(seriesName);\n const offsetX = commonX + barWidth / 2;\n const medianLineWidth = Math.max(barWidth + 4 * this.strokeWidth, 1);\n const whiskerLineWidth = Math.max(barWidth / 3, 1);\n const whiskerZero = this.yScale(whiskers[0]);\n const whiskerOne = this.yScale(whiskers[1]);\n const median = this.yScale(quartiles[1]);\n const topLine = {\n v1: { x: offsetX + whiskerLineWidth / 2, y: whiskerZero },\n v2: { x: offsetX - whiskerLineWidth / 2, y: whiskerZero }\n };\n const medianLine = {\n v1: { x: offsetX + medianLineWidth / 2, y: median },\n v2: { x: offsetX - medianLineWidth / 2, y: median }\n };\n const bottomLine = {\n v1: { x: offsetX + whiskerLineWidth / 2, y: whiskerOne },\n v2: { x: offsetX - whiskerLineWidth / 2, y: whiskerOne }\n };\n const verticalLine = {\n v1: { x: offsetX, y: whiskerZero },\n v2: { x: offsetX, y: whiskerOne }\n };\n return [verticalLine, topLine, medianLine, bottomLine];\n }\n updateTooltipSettings() {\n if (this.tooltipDisabled) {\n this.tooltipPlacement = undefined;\n this.tooltipType = undefined;\n }\n else {\n if (!this.tooltipPlacement) {\n this.tooltipPlacement = PlacementTypes.Top;\n }\n if (!this.tooltipType) {\n this.tooltipType = StyleTypes.tooltip;\n }\n }\n }\n}\nBoxSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nBoxSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BoxSeriesComponent, selector: \"g[ngx-charts-box-series]\", inputs: { dims: \"dims\", series: \"series\", xScale: \"xScale\", yScale: \"yScale\", colors: \"colors\", animations: \"animations\", strokeColor: \"strokeColor\", strokeWidth: \"strokeWidth\", tooltipDisabled: \"tooltipDisabled\", tooltipTemplate: \"tooltipTemplate\", tooltipPlacement: \"tooltipPlacement\", tooltipType: \"tooltipType\", roundEdges: \"roundEdges\", gradient: \"gradient\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n \n `, isInline: true, components: [{ type: BoxComponent, selector: \"g[ngx-charts-box]\", inputs: [\"strokeColor\", \"strokeWidth\", \"fill\", \"data\", \"width\", \"height\", \"x\", \"y\", \"lineCoordinates\", \"roundEdges\", \"gradient\", \"gradientStops\", \"offset\", \"isActive\", \"animations\", \"ariaLabel\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-box-series]',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ]\n }]\n }], propDecorators: { dims: [{\n type: Input\n }], series: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], colors: [{\n type: Input\n }], animations: [{\n type: Input\n }], strokeColor: [{\n type: Input\n }], strokeWidth: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], tooltipPlacement: [{\n type: Input\n }], tooltipType: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], gradient: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }] } });\n\nclass BoxChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n /** Show or hide the legend. */\n this.legend = false;\n this.legendPosition = LegendPosition.Right;\n this.legendTitle = 'Legend';\n this.showGridLines = true;\n this.xAxis = true;\n this.yAxis = true;\n this.showXAxisLabel = true;\n this.showYAxisLabel = true;\n this.roundDomains = false;\n this.roundEdges = true;\n this.strokeColor = '#FFFFFF';\n this.strokeWidth = 2;\n this.tooltipDisabled = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n /** Chart Margins (For each side, counterclock wise). */\n this.margin = [10, 20, 10, 20];\n /** Chart X axis dimension. */\n this.xAxisHeight = 0;\n /** Chart Y axis dimension. */\n this.yAxisWidth = 0;\n }\n trackBy(index, item) {\n return item.name;\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendPosition: this.legendPosition\n });\n this.xDomain = this.getXDomain();\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.setScales();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n setColors() {\n let domain = [];\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n }\n else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n setScales() {\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n }\n getXScale(domain, width) {\n const scale = scaleBand()\n .domain(domain.map(d => d.toString()))\n .rangeRound([0, width])\n .padding(0.5);\n return scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().domain(domain).range([height, 0]);\n return this.roundDomains ? scale.nice() : scale;\n }\n getUniqueBoxChartXDomainValues(results) {\n const valueSet = new Set();\n for (const result of results) {\n valueSet.add(result.name);\n }\n return Array.from(valueSet);\n }\n getXDomain() {\n let domain = [];\n const values = this.getUniqueBoxChartXDomainValues(this.results);\n let min;\n let max;\n if (typeof values[0] === 'string') {\n domain = values.map(val => val.toString());\n }\n else if (typeof values[0] === 'number') {\n const mappedValues = values.map(v => Number(v));\n min = Math.min(...mappedValues);\n max = Math.max(...mappedValues);\n domain = [min, max];\n }\n else {\n const mappedValues = values.map(v => Number(new Date(v)));\n min = Math.min(...mappedValues);\n max = Math.max(...mappedValues);\n domain = [new Date(min), new Date(max)];\n }\n return domain;\n }\n getYDomain() {\n const domain = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (domain.indexOf(d.value) < 0) {\n domain.push(d.value);\n }\n }\n }\n const values = [...domain];\n const mappedValues = values.map(v => Number(v));\n const min = Math.min(...mappedValues);\n const max = Math.max(...mappedValues);\n return [min, max];\n }\n getSeriesDomain() {\n return this.results.map(d => `${d.name}`);\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onClick(data) {\n this.select.emit(data);\n }\n onActivate(data) {\n this.activate.emit(data);\n }\n onDeactivate(data) {\n this.deactivate.emit(data);\n }\n getLegendOptions() {\n const legendOpts = {\n scaleType: this.schemeType,\n colors: this.colors,\n domain: [],\n position: this.legendPosition,\n title: this.legendTitle\n };\n if (this.schemeType === ScaleType.Ordinal) {\n legendOpts.domain = this.xDomain;\n legendOpts.colors = this.colors;\n }\n else {\n legendOpts.domain = this.yDomain;\n legendOpts.colors = this.colors.scale;\n }\n return legendOpts;\n }\n}\nBoxChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBoxChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BoxChartComponent, selector: \"ngx-charts-box-chart\", inputs: { legend: \"legend\", legendPosition: \"legendPosition\", legendTitle: \"legendTitle\", legendOptionsConfig: \"legendOptionsConfig\", showGridLines: \"showGridLines\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", roundDomains: \"roundDomains\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", roundEdges: \"roundEdges\", strokeColor: \"strokeColor\", strokeWidth: \"strokeWidth\", tooltipDisabled: \"tooltipDisabled\", gradient: \"gradient\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: BoxSeriesComponent, selector: \"g[ngx-charts-box-series]\", inputs: [\"dims\", \"series\", \"xScale\", \"yScale\", \"colors\", \"animations\", \"strokeColor\", \"strokeWidth\", \"tooltipDisabled\", \"tooltipTemplate\", \"tooltipPlacement\", \"tooltipType\", \"roundEdges\", \"gradient\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxChartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-box-chart', template: `\n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendOptionsConfig: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], roundEdges: [{\n type: Input\n }], strokeColor: [{\n type: Input\n }], strokeWidth: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], gradient: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate', { static: false }]\n }] } });\n\nclass BoxChartModule {\n}\nBoxChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBoxChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxChartModule, declarations: [BoxChartComponent, BoxSeriesComponent, BoxComponent], imports: [ChartCommonModule], exports: [BoxChartComponent, BoxSeriesComponent, BoxComponent] });\nBoxChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxChartModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BoxChartModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [BoxChartComponent, BoxSeriesComponent, BoxComponent],\n exports: [BoxChartComponent, BoxSeriesComponent, BoxComponent]\n }]\n }] });\n\nfunction getDomain(values, scaleType, autoScale, minVal, maxVal) {\n let domain = [];\n if (scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n if (!autoScale) {\n values.push(0);\n }\n }\n if (scaleType === ScaleType.Time || scaleType === ScaleType.Linear) {\n const min = minVal || minVal === 0 ? minVal : Math.min(...values);\n const max = maxVal ? maxVal : Math.max(...values);\n domain = [min, max];\n }\n else {\n domain = values;\n }\n return domain;\n}\nfunction getScale(domain, range, scaleType, roundDomains) {\n switch (scaleType) {\n case ScaleType.Time:\n return scaleTime().range(range).domain(domain);\n case ScaleType.Linear: {\n const scale = scaleLinear().range(range).domain(domain);\n if (roundDomains) {\n return scale.nice();\n }\n return scale;\n }\n case ScaleType.Ordinal:\n return scalePoint()\n .range([range[0], range[1]])\n .domain(domain.map(r => r.toString()));\n default:\n return undefined;\n }\n}\n\nclass BubbleSeriesComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.tooltipDisabled = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n this.isSSR = false;\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.circles = this.getCircles();\n }\n getCircles() {\n const seriesName = this.data.name;\n return this.data.series\n .map((d, i) => {\n if (typeof d.y !== 'undefined' && typeof d.x !== 'undefined') {\n const y = d.y;\n const x = d.x;\n const r = d.r;\n const radius = this.rScale(r || 1);\n const tooltipLabel = formatLabel(d.name);\n const cx = this.xScaleType === ScaleType.Linear ? this.xScale(Number(x)) : this.xScale(x);\n const cy = this.yScaleType === ScaleType.Linear ? this.yScale(Number(y)) : this.yScale(y);\n const color = this.colors.scaleType === ScaleType.Linear ? this.colors.getColor(r) : this.colors.getColor(seriesName);\n const isActive = !this.activeEntries.length ? true : this.isActive({ name: seriesName });\n const opacity = isActive ? 1 : 0.3;\n const data = Object.assign({}, d, {\n series: seriesName,\n name: d.name,\n value: d.y,\n x: d.x,\n radius: d.r\n });\n return {\n data,\n x,\n y,\n r,\n classNames: [`circle-data-${i}`],\n value: y,\n label: x,\n cx,\n cy,\n radius,\n tooltipLabel,\n color,\n opacity,\n seriesName,\n isActive,\n transform: `translate(${cx},${cy})`\n };\n }\n })\n .filter(circle => circle !== undefined);\n }\n getTooltipText(circle) {\n const hasRadius = typeof circle.r !== 'undefined';\n const hasTooltipLabel = circle.tooltipLabel && circle.tooltipLabel.length;\n const hasSeriesName = circle.seriesName && circle.seriesName.length;\n const radiusValue = hasRadius ? formatLabel(circle.r) : '';\n const xAxisLabel = this.xAxisLabel && this.xAxisLabel !== '' ? `${this.xAxisLabel}:` : '';\n const yAxisLabel = this.yAxisLabel && this.yAxisLabel !== '' ? `${this.yAxisLabel}:` : '';\n const x = formatLabel(circle.x);\n const y = formatLabel(circle.y);\n const name = hasSeriesName && hasTooltipLabel\n ? `${circle.seriesName} • ${circle.tooltipLabel}`\n : circle.seriesName + circle.tooltipLabel;\n const tooltipTitle = hasSeriesName || hasTooltipLabel ? `${escapeLabel(name)}` : '';\n return `\n ${tooltipTitle}\n \n ${escapeLabel(x)}
\n ${escapeLabel(y)}\n
\n \n ${escapeLabel(radiusValue)}\n \n `;\n }\n onClick(data) {\n this.select.emit(data);\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n isVisible(circle) {\n if (this.activeEntries.length > 0) {\n return this.isActive({ name: circle.seriesName });\n }\n return circle.opacity !== 0;\n }\n activateCircle(circle) {\n circle.barVisible = true;\n this.activate.emit({ name: this.data.name });\n }\n deactivateCircle(circle) {\n circle.barVisible = false;\n this.deactivate.emit({ name: this.data.name });\n }\n trackBy(index, circle) {\n return `${circle.data.series} ${circle.data.name}`;\n }\n}\nBubbleSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleSeriesComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nBubbleSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BubbleSeriesComponent, selector: \"g[ngx-charts-bubble-series]\", inputs: { data: \"data\", xScale: \"xScale\", yScale: \"yScale\", rScale: \"rScale\", xScaleType: \"xScaleType\", yScaleType: \"yScaleType\", colors: \"colors\", visibleValue: \"visibleValue\", activeEntries: \"activeEntries\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", tooltipDisabled: \"tooltipDisabled\", tooltipTemplate: \"tooltipTemplate\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n `, isInline: true, components: [{ type: CircleComponent, selector: \"g[ngx-charts-circle]\", inputs: [\"cx\", \"cy\", \"r\", \"fill\", \"stroke\", \"data\", \"classNames\", \"circleOpacity\", \"pointerEvents\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n opacity: 0,\n transform: 'scale(0)'\n }),\n animate(250, style({ opacity: 1, transform: 'scale(1)' }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-bubble-series]',\n template: `\n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n opacity: 0,\n transform: 'scale(0)'\n }),\n animate(250, style({ opacity: 1, transform: 'scale(1)' }))\n ])\n ])\n ]\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { data: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], rScale: [{\n type: Input\n }], xScaleType: [{\n type: Input\n }], yScaleType: [{\n type: Input\n }], colors: [{\n type: Input\n }], visibleValue: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }] } });\n\nclass BubbleChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.showGridLines = true;\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.xAxis = true;\n this.yAxis = true;\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.maxRadius = 10;\n this.minRadius = 3;\n this.schemeType = ScaleType.Ordinal;\n this.tooltipDisabled = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.scaleType = ScaleType.Linear;\n this.margin = [10, 20, 10, 20];\n this.bubblePadding = [0, 0, 0, 0];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.activeEntries = [];\n this.isSSR = false;\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.seriesDomain = this.results.map(d => d.name);\n this.rDomain = this.getRDomain();\n this.xDomain = this.getXDomain();\n this.yDomain = this.getYDomain();\n this.transform = `translate(${this.dims.xOffset},${this.margin[0]})`;\n const colorDomain = this.schemeType === ScaleType.Ordinal ? this.seriesDomain : this.rDomain;\n this.colors = new ColorHelper(this.scheme, this.schemeType, colorDomain, this.customColors);\n this.data = this.results;\n this.minRadius = Math.max(this.minRadius, 1);\n this.maxRadius = Math.max(this.maxRadius, 1);\n this.rScale = this.getRScale(this.rDomain, [this.minRadius, this.maxRadius]);\n this.bubblePadding = [0, 0, 0, 0];\n this.setScales();\n this.bubblePadding = this.getBubblePadding();\n this.setScales();\n this.legendOptions = this.getLegendOptions();\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n hideCircles() {\n this.deactivateAll();\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n getBubblePadding() {\n let yMin = 0;\n let xMin = 0;\n let yMax = this.dims.height;\n let xMax = this.dims.width;\n for (const s of this.data) {\n for (const d of s.series) {\n const r = this.rScale(d.r);\n const cx = this.xScaleType === ScaleType.Linear ? this.xScale(Number(d.x)) : this.xScale(d.x);\n const cy = this.yScaleType === ScaleType.Linear ? this.yScale(Number(d.y)) : this.yScale(d.y);\n xMin = Math.max(r - cx, xMin);\n yMin = Math.max(r - cy, yMin);\n yMax = Math.max(cy + r, yMax);\n xMax = Math.max(cx + r, xMax);\n }\n }\n xMax = Math.max(xMax - this.dims.width, 0);\n yMax = Math.max(yMax - this.dims.height, 0);\n return [yMin, xMax, yMax, xMin];\n }\n setScales() {\n let width = this.dims.width;\n if (this.xScaleMin === undefined && this.xScaleMax === undefined) {\n width = width - this.bubblePadding[1];\n }\n let height = this.dims.height;\n if (this.yScaleMin === undefined && this.yScaleMax === undefined) {\n height = height - this.bubblePadding[2];\n }\n this.xScale = this.getXScale(this.xDomain, width);\n this.yScale = this.getYScale(this.yDomain, height);\n }\n getYScale(domain, height) {\n return getScale(domain, [height, this.bubblePadding[0]], this.yScaleType, this.roundDomains);\n }\n getXScale(domain, width) {\n return getScale(domain, [this.bubblePadding[3], width], this.xScaleType, this.roundDomains);\n }\n getRScale(domain, range) {\n const scale = scaleLinear().range(range).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n position: this.legendPosition,\n title: undefined\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.rDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n getXDomain() {\n const values = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.x)) {\n values.push(d.x);\n }\n }\n }\n this.xScaleType = getScaleType(values);\n return getDomain(values, this.xScaleType, this.autoScale, this.xScaleMin, this.xScaleMax);\n }\n getYDomain() {\n const values = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.y)) {\n values.push(d.y);\n }\n }\n }\n this.yScaleType = getScaleType(values);\n return getDomain(values, this.yScaleType, this.autoScale, this.yScaleMin, this.yScaleMax);\n }\n getRDomain() {\n let min = Infinity;\n let max = -Infinity;\n for (const results of this.results) {\n for (const d of results.series) {\n const value = Number(d.r) || 1;\n min = Math.min(min, value);\n max = Math.max(max, value);\n }\n }\n return [min, max];\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n trackBy(index, item) {\n return `${item.name}`;\n }\n}\nBubbleChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nBubbleChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: BubbleChartComponent, selector: \"ngx-charts-bubble-chart\", inputs: { showGridLines: \"showGridLines\", legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", roundDomains: \"roundDomains\", maxRadius: \"maxRadius\", minRadius: \"minRadius\", autoScale: \"autoScale\", schemeType: \"schemeType\", tooltipDisabled: \"tooltipDisabled\", xScaleMin: \"xScaleMin\", xScaleMax: \"xScaleMax\", yScaleMin: \"yScaleMin\", yScaleMax: \"yScaleMax\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseleave\": \"hideCircles()\" } }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: BubbleSeriesComponent, selector: \"g[ngx-charts-bubble-series]\", inputs: [\"data\", \"xScale\", \"yScale\", \"rScale\", \"xScaleType\", \"yScaleType\", \"colors\", \"visibleValue\", \"activeEntries\", \"xAxisLabel\", \"yAxisLabel\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({\n opacity: 0\n }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleChartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-bubble-chart', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({\n opacity: 0\n }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { showGridLines: [{\n type: Input\n }], legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], maxRadius: [{\n type: Input\n }], minRadius: [{\n type: Input\n }], autoScale: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], xScaleMin: [{\n type: Input\n }], xScaleMax: [{\n type: Input\n }], yScaleMin: [{\n type: Input\n }], yScaleMax: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }], hideCircles: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass BubbleChartModule {\n}\nBubbleChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBubbleChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleChartModule, declarations: [BubbleChartComponent, BubbleSeriesComponent], imports: [ChartCommonModule], exports: [BubbleChartComponent, BubbleSeriesComponent] });\nBubbleChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleChartModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: BubbleChartModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [BubbleChartComponent, BubbleSeriesComponent],\n exports: [BubbleChartComponent, BubbleSeriesComponent]\n }]\n }] });\n\nclass HeatMapCellComponent {\n constructor(element) {\n this.gradient = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.barOrientation = BarOrientation;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.transform = `translate(${this.x} , ${this.y})`;\n this.startOpacity = 0.3;\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n this.gradientStops = this.getGradientStops();\n if (this.animations) {\n this.loadAnimation();\n }\n }\n getGradientStops() {\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.startOpacity\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n loadAnimation() {\n const node = select(this.element).select('.cell');\n node.attr('opacity', 0);\n this.animateToCurrentForm();\n }\n animateToCurrentForm() {\n const node = select(this.element).select('.cell');\n node.transition().duration(750).attr('opacity', 1);\n }\n onClick() {\n this.select.emit(this.data);\n }\n onMouseEnter() {\n this.activate.emit(this.data);\n }\n onMouseLeave() {\n this.deactivate.emit(this.data);\n }\n}\nHeatMapCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapCellComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nHeatMapCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: HeatMapCellComponent, selector: \"g[ngx-charts-heat-map-cell]\", inputs: { fill: \"fill\", x: \"x\", y: \"y\", width: \"width\", height: \"height\", data: \"data\", gradient: \"gradient\", animations: \"animations\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave()\" } }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n `, isInline: true, components: [{ type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: [\"orientation\", \"name\", \"stops\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapCellComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-heat-map-cell]',\n template: `\n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fill: [{\n type: Input\n }], x: [{\n type: Input\n }], y: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], data: [{\n type: Input\n }], gradient: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass HeatCellSeriesComponent {\n constructor() {\n this.tooltipDisabled = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n }\n ngOnInit() {\n if (!this.tooltipText) {\n this.tooltipText = this.getTooltipText;\n }\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.cells = this.getCells();\n }\n getCells() {\n const cells = [];\n this.data.map(row => {\n row.series.map(cell => {\n const value = cell.value;\n cell.series = row.name;\n cells.push({\n row,\n cell,\n x: this.xScale(row.name),\n y: this.yScale(cell.name),\n width: this.xScale.bandwidth(),\n height: this.yScale.bandwidth(),\n fill: this.colors.getColor(value),\n data: value,\n label: formatLabel(cell.name),\n series: row.name\n });\n });\n });\n return cells;\n }\n getTooltipText({ label, data, series }) {\n return `\n ${escapeLabel(series)} • ${escapeLabel(label)}\n ${data.toLocaleString()}\n `;\n }\n trackBy(index, item) {\n return item.label;\n }\n onClick(data) {\n this.select.emit(data);\n }\n}\nHeatCellSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatCellSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nHeatCellSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: HeatCellSeriesComponent, selector: \"g[ngx-charts-heat-map-cell-series]\", inputs: { data: \"data\", colors: \"colors\", xScale: \"xScale\", yScale: \"yScale\", gradient: \"gradient\", tooltipDisabled: \"tooltipDisabled\", tooltipText: \"tooltipText\", tooltipTemplate: \"tooltipTemplate\", animations: \"animations\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n \n `, isInline: true, components: [{ type: HeatMapCellComponent, selector: \"g[ngx-charts-heat-map-cell]\", inputs: [\"fill\", \"x\", \"y\", \"width\", \"height\", \"data\", \"gradient\", \"animations\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatCellSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-heat-map-cell-series]',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { data: [{\n type: Input\n }], colors: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], gradient: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipText: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }] } });\n\nclass HeatMapComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.innerPadding = 8;\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.tooltipDisabled = false;\n this.activeEntries = [];\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.scaleType = ScaleType.Linear;\n }\n update() {\n super.update();\n this.formatDates();\n this.xDomain = this.getXDomain();\n this.yDomain = this.getYDomain();\n this.valueDomain = this.getValueDomain();\n this.scaleType = getScaleType(this.valueDomain, false);\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.scaleType,\n legendPosition: this.legendPosition\n });\n if (this.scaleType === ScaleType.Linear) {\n let min = this.min;\n let max = this.max;\n if (!this.min) {\n min = Math.min(0, ...this.valueDomain);\n }\n if (!this.max) {\n max = Math.max(...this.valueDomain);\n }\n this.valueDomain = [min, max];\n }\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n this.rects = this.getRects();\n }\n getXDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.name)) {\n domain.push(group.name);\n }\n }\n return domain;\n }\n getYDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.name)) {\n domain.push(d.name);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n return domain;\n }\n /**\n * Converts the input to gap paddingInner in fraction\n * Supports the following inputs:\n * Numbers: 8\n * Strings: \"8\", \"8px\", \"8%\"\n * Arrays: [8,2], \"8,2\", \"[8,2]\"\n * Mixed: [8,\"2%\"], [\"8px\",\"2%\"], \"8,2%\", \"[8,2%]\"\n *\n * @memberOf HeatMapComponent\n */\n getDimension(value, index = 0, N, L) {\n if (typeof value === 'string') {\n value = value\n .replace('[', '')\n .replace(']', '')\n .replace('px', '')\n // tslint:disable-next-line: quotemark\n .replace(\"'\", '');\n if (value.includes(',')) {\n value = value.split(',');\n }\n }\n if (Array.isArray(value) && typeof index === 'number') {\n return this.getDimension(value[index], null, N, L);\n }\n if (typeof value === 'string' && value.includes('%')) {\n return +value.replace('%', '') / 100;\n }\n return N / (L / +value + 1);\n }\n getXScale() {\n const f = this.getDimension(this.innerPadding, 0, this.xDomain.length, this.dims.width);\n return scaleBand().rangeRound([0, this.dims.width]).domain(this.xDomain).paddingInner(f);\n }\n getYScale() {\n const f = this.getDimension(this.innerPadding, 1, this.yDomain.length, this.dims.height);\n return scaleBand().rangeRound([this.dims.height, 0]).domain(this.yDomain).paddingInner(f);\n }\n getRects() {\n const rects = [];\n this.xDomain.map(xVal => {\n this.yDomain.map(yVal => {\n rects.push({\n x: this.xScale(xVal),\n y: this.yScale(yVal),\n rx: 3,\n width: this.xScale.bandwidth(),\n height: this.yScale.bandwidth(),\n fill: 'rgba(200,200,200,0.03)'\n });\n });\n });\n return rects;\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n this.colors = new ColorHelper(this.scheme, this.scaleType, this.valueDomain);\n }\n getLegendOptions() {\n return {\n scaleType: this.scaleType,\n domain: this.valueDomain,\n colors: this.scaleType === ScaleType.Ordinal ? this.colors : this.colors.scale,\n title: this.scaleType === ScaleType.Ordinal ? this.legendTitle : undefined,\n position: this.legendPosition\n };\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n }\n else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n }\n else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nHeatMapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nHeatMapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: HeatMapComponent, selector: \"ngx-charts-heat-map\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", gradient: \"gradient\", innerPadding: \"innerPadding\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", tooltipDisabled: \"tooltipDisabled\", tooltipText: \"tooltipText\", min: \"min\", max: \"max\", activeEntries: \"activeEntries\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: HeatCellSeriesComponent, selector: \"g[ngx-charts-heat-map-cell-series]\", inputs: [\"data\", \"colors\", \"xScale\", \"yScale\", \"gradient\", \"tooltipDisabled\", \"tooltipText\", \"tooltipTemplate\", \"animations\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-heat-map', template: `\n \n \n \n \n \n \n \n \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], gradient: [{\n type: Input\n }], innerPadding: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipText: [{\n type: Input\n }], min: [{\n type: Input\n }], max: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass HeatMapModule {\n}\nHeatMapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHeatMapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapModule, declarations: [HeatMapCellComponent, HeatCellSeriesComponent, HeatMapComponent], imports: [ChartCommonModule], exports: [HeatMapCellComponent, HeatCellSeriesComponent, HeatMapComponent] });\nHeatMapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: HeatMapModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [HeatMapCellComponent, HeatCellSeriesComponent, HeatMapComponent],\n exports: [HeatMapCellComponent, HeatCellSeriesComponent, HeatMapComponent]\n }]\n }] });\n\nclass LineComponent {\n constructor(element, platformId) {\n this.element = element;\n this.platformId = platformId;\n this.fill = 'none';\n this.animations = true;\n // @Output() select = new EventEmitter();\n this.initialized = false;\n this.isSSR = false;\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n ngOnChanges(changes) {\n if (!this.initialized) {\n this.initialized = true;\n this.initialPath = this.path;\n }\n else {\n this.updatePathEl();\n }\n }\n updatePathEl() {\n const node = select(this.element.nativeElement).select('.line');\n if (this.animations) {\n node.transition().duration(750).attr('d', this.path);\n }\n else {\n node.attr('d', this.path);\n }\n }\n}\nLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineComponent, deps: [{ token: i0.ElementRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: LineComponent, selector: \"g[ngx-charts-line]\", inputs: { path: \"path\", stroke: \"stroke\", data: \"data\", fill: \"fill\", animations: \"animations\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n `, isInline: true, directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n strokeDasharray: 2000,\n strokeDashoffset: 2000\n }),\n animate(1000, style({\n strokeDashoffset: 0\n }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-line]',\n template: `\n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n strokeDasharray: 2000,\n strokeDashoffset: 2000\n }),\n animate(1000, style({\n strokeDashoffset: 0\n }))\n ])\n ])\n ]\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { path: [{\n type: Input\n }], stroke: [{\n type: Input\n }], data: [{\n type: Input\n }], fill: [{\n type: Input\n }], animations: [{\n type: Input\n }] } });\n\nclass LineSeriesComponent {\n constructor() {\n this.animations = true;\n this.barOrientation = BarOrientation;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateGradients();\n const data = this.sortData(this.data.series);\n const lineGen = this.getLineGenerator();\n this.path = lineGen(data) || '';\n const areaGen = this.getAreaGenerator();\n this.areaPath = areaGen(data) || '';\n if (this.hasRange) {\n const range = this.getRangeGenerator();\n this.outerPath = range(data) || '';\n }\n if (this.hasGradient) {\n this.stroke = this.gradientUrl;\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n const min = Math.min(...values);\n if (max === min) {\n this.stroke = this.colors.getColor(max);\n }\n }\n else {\n this.stroke = this.colors.getColor(this.data.name);\n }\n }\n getLineGenerator() {\n return line()\n .x(d => {\n const label = d.name;\n let value;\n if (this.scaleType === ScaleType.Time) {\n value = this.xScale(label);\n }\n else if (this.scaleType === ScaleType.Linear) {\n value = this.xScale(Number(label));\n }\n else {\n value = this.xScale(label);\n }\n return value;\n })\n .y(d => this.yScale(d.value))\n .curve(this.curve);\n }\n getRangeGenerator() {\n return area()\n .x(d => {\n const label = d.name;\n let value;\n if (this.scaleType === ScaleType.Time) {\n value = this.xScale(label);\n }\n else if (this.scaleType === ScaleType.Linear) {\n value = this.xScale(Number(label));\n }\n else {\n value = this.xScale(label);\n }\n return value;\n })\n .y0(d => this.yScale(typeof d.min === 'number' ? d.min : d.value))\n .y1(d => this.yScale(typeof d.max === 'number' ? d.max : d.value))\n .curve(this.curve);\n }\n getAreaGenerator() {\n const xProperty = d => {\n const label = d.name;\n return this.xScale(label);\n };\n return area()\n .x(xProperty)\n .y0(() => this.yScale.range()[0])\n .y1(d => this.yScale(d.value))\n .curve(this.curve);\n }\n sortData(data) {\n if (this.scaleType === ScaleType.Linear) {\n data = sortLinear(data, 'name');\n }\n else if (this.scaleType === ScaleType.Time) {\n data = sortByTime(data, 'name');\n }\n else {\n data = sortByDomain(data, 'name', 'asc', this.xScale.domain());\n }\n return data;\n }\n updateGradients() {\n if (this.colors.scaleType === ScaleType.Linear) {\n this.hasGradient = true;\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n const min = Math.min(...values);\n this.gradientStops = this.colors.getLinearGradientStops(max, min);\n this.areaGradientStops = this.colors.getLinearGradientStops(max);\n }\n else {\n this.hasGradient = false;\n this.gradientStops = undefined;\n this.areaGradientStops = undefined;\n }\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n isInactive(entry) {\n if (!this.activeEntries || this.activeEntries.length === 0)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item === undefined;\n }\n}\nLineSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nLineSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: LineSeriesComponent, selector: \"g[ngx-charts-line-series]\", inputs: { data: \"data\", xScale: \"xScale\", yScale: \"yScale\", colors: \"colors\", scaleType: \"scaleType\", curve: \"curve\", activeEntries: \"activeEntries\", rangeFillOpacity: \"rangeFillOpacity\", hasRange: \"hasRange\", animations: \"animations\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n `, isInline: true, components: [{ type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: [\"orientation\", \"name\", \"stops\"] }, { type: AreaComponent, selector: \"g[ngx-charts-area]\", inputs: [\"data\", \"path\", \"startingPath\", \"fill\", \"opacity\", \"startOpacity\", \"endOpacity\", \"gradient\", \"stops\", \"animations\"], outputs: [\"select\"] }, { type: LineComponent, selector: \"g[ngx-charts-line]\", inputs: [\"path\", \"stroke\", \"data\", \"fill\", \"animations\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-line-series]',\n template: `\n \n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { data: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], colors: [{\n type: Input\n }], scaleType: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], rangeFillOpacity: [{\n type: Input\n }], hasRange: [{\n type: Input\n }], animations: [{\n type: Input\n }] } });\n\nclass LineChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.showGridLines = true;\n this.curve = curveLinear;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.showRefLines = false;\n this.showRefLabels = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.timelineHeight = 50;\n this.timelinePadding = 10;\n this.isSSR = false;\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n this.updateTimeline();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n updateTimeline() {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n getXDomain() {\n let values = getUniqueXDomainValues(this.results);\n this.scaleType = getScaleType(values);\n let domain = [];\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate)\n return 1;\n if (bDate > aDate)\n return -1;\n return 0;\n });\n }\n else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n }\n else {\n domain = values;\n this.xSet = values;\n }\n return domain;\n }\n getYDomain() {\n const domain = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (domain.indexOf(d.value) < 0) {\n domain.push(d.value);\n }\n if (d.min !== undefined) {\n this.hasRange = true;\n if (domain.indexOf(d.min) < 0) {\n domain.push(d.min);\n }\n }\n if (d.max !== undefined) {\n this.hasRange = true;\n if (domain.indexOf(d.max) < 0) {\n domain.push(d.max);\n }\n }\n }\n }\n const values = [...domain];\n if (!this.autoScale) {\n values.push(0);\n }\n const min = this.yScaleMin ? this.yScaleMin : Math.min(...values);\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...values);\n return [min, max];\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime().range([0, width]).domain(domain);\n }\n else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear().range([0, width]).domain(domain);\n if (this.roundDomains) {\n scale = scale.nice();\n }\n }\n else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().range([0, width]).padding(0.1).domain(domain);\n }\n return scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n updateDomain(domain) {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n hideCircles() {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n onClick(data) {\n this.select.emit(data);\n }\n trackBy(index, item) {\n return `${item.name}`;\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n }\n else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n }\n else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n this.deactivateAll();\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\nLineChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nLineChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: LineChartComponent, selector: \"ngx-charts-line-chart\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", autoScale: \"autoScale\", timeline: \"timeline\", gradient: \"gradient\", showGridLines: \"showGridLines\", curve: \"curve\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", rangeFillOpacity: \"rangeFillOpacity\", trimXAxisTicks: \"trimXAxisTicks\", trimYAxisTicks: \"trimYAxisTicks\", rotateXAxisTicks: \"rotateXAxisTicks\", maxXAxisTickLength: \"maxXAxisTickLength\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", xAxisTicks: \"xAxisTicks\", yAxisTicks: \"yAxisTicks\", roundDomains: \"roundDomains\", tooltipDisabled: \"tooltipDisabled\", showRefLines: \"showRefLines\", referenceLines: \"referenceLines\", showRefLabels: \"showRefLabels\", xScaleMin: \"xScaleMin\", xScaleMax: \"xScaleMax\", yScaleMin: \"yScaleMin\", yScaleMax: \"yScaleMax\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, host: { listeners: { \"mouseleave\": \"hideCircles()\" } }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }, { propertyName: \"seriesTooltipTemplate\", first: true, predicate: [\"seriesTooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: XAxisComponent, selector: \"g[ngx-charts-x-axis]\", inputs: [\"xScale\", \"dims\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"showGridLines\", \"showLabel\", \"labelText\", \"ticks\", \"xAxisTickCount\", \"xOrient\", \"xAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: LineSeriesComponent, selector: \"g[ngx-charts-line-series]\", inputs: [\"data\", \"xScale\", \"yScale\", \"colors\", \"scaleType\", \"curve\", \"activeEntries\", \"rangeFillOpacity\", \"hasRange\", \"animations\"] }, { type: TooltipArea, selector: \"g[ngx-charts-tooltip-area]\", inputs: [\"dims\", \"xSet\", \"xScale\", \"yScale\", \"results\", \"colors\", \"showPercentage\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"hover\"] }, { type: CircleSeriesComponent, selector: \"g[ngx-charts-circle-series]\", inputs: [\"data\", \"type\", \"xScale\", \"yScale\", \"colors\", \"scaleType\", \"visibleValue\", \"activeEntries\", \"tooltipDisabled\", \"tooltipTemplate\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: Timeline, selector: \"g[ngx-charts-timeline]\", inputs: [\"view\", \"results\", \"scheme\", \"customColors\", \"legend\", \"autoScale\", \"scaleType\", \"height\"], outputs: [\"select\", \"onDomainChange\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({\n opacity: 0\n }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineChartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-line-chart', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({\n opacity: 0\n }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], autoScale: [{\n type: Input\n }], timeline: [{\n type: Input\n }], gradient: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], rangeFillOpacity: [{\n type: Input\n }], trimXAxisTicks: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], rotateXAxisTicks: [{\n type: Input\n }], maxXAxisTickLength: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], xAxisTicks: [{\n type: Input\n }], yAxisTicks: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], showRefLines: [{\n type: Input\n }], referenceLines: [{\n type: Input\n }], showRefLabels: [{\n type: Input\n }], xScaleMin: [{\n type: Input\n }], xScaleMax: [{\n type: Input\n }], yScaleMin: [{\n type: Input\n }], yScaleMax: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }], seriesTooltipTemplate: [{\n type: ContentChild,\n args: ['seriesTooltipTemplate']\n }], hideCircles: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass LineChartModule {\n}\nLineChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nLineChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineChartModule, declarations: [LineComponent, LineChartComponent, LineSeriesComponent], imports: [ChartCommonModule], exports: [LineComponent, LineChartComponent, LineSeriesComponent] });\nLineChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineChartModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LineChartModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [LineComponent, LineChartComponent, LineSeriesComponent],\n exports: [LineComponent, LineChartComponent, LineSeriesComponent]\n }]\n }] });\n\nclass PieLabelComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.animations = true;\n this.labelTrim = true;\n this.labelTrimSize = 10;\n this.trimLabel = trimLabel;\n }\n ngOnChanges(changes) {\n this.setTransforms();\n this.update();\n }\n setTransforms() {\n if (isPlatformServer(this.platformId)) {\n this.styleTransform = `translate3d(${this.textX}px,${this.textY}px, 0)`;\n this.attrTransform = `translate(${this.textX},${this.textY})`;\n this.textTransition = !this.animations ? null : 'transform 0.75s';\n }\n else {\n const isIE = /(edge|msie|trident)/i.test(navigator.userAgent);\n this.styleTransform = isIE ? null : `translate3d(${this.textX}px,${this.textY}px, 0)`;\n this.attrTransform = !isIE ? null : `translate(${this.textX},${this.textY})`;\n this.textTransition = isIE || !this.animations ? null : 'transform 0.75s';\n }\n }\n update() {\n let startRadius = this.radius;\n if (this.explodeSlices) {\n startRadius = (this.radius * this.value) / this.max;\n }\n const innerArc = arc().innerRadius(startRadius).outerRadius(startRadius);\n // Calculate innerPos then scale outer position to match label position\n const innerPos = innerArc.centroid(this.data);\n let scale = this.data.pos[1] / innerPos[1];\n if (this.data.pos[1] === 0 || innerPos[1] === 0) {\n scale = 1;\n }\n const outerPos = [scale * innerPos[0], scale * innerPos[1]];\n this.line = `M${innerPos}L${outerPos}L${this.data.pos}`;\n }\n get textX() {\n return this.data.pos[0];\n }\n get textY() {\n return this.data.pos[1];\n }\n textAnchor() {\n return this.midAngle(this.data) < Math.PI ? TextAnchor.Start : TextAnchor.End;\n }\n midAngle(d) {\n return d.startAngle + (d.endAngle - d.startAngle) / 2;\n }\n}\nPieLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieLabelComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nPieLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PieLabelComponent, selector: \"g[ngx-charts-pie-label]\", inputs: { data: \"data\", radius: \"radius\", label: \"label\", color: \"color\", max: \"max\", value: \"value\", explodeSlices: \"explodeSlices\", animations: \"animations\", labelTrim: \"labelTrim\", labelTrimSize: \"labelTrimSize\" }, usesOnChanges: true, ngImport: i0, template: `\n {{ label }}\n \n \n {{ labelTrim ? trimLabel(label, labelTrimSize) : label }}\n \n \n
\n `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieLabelComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-pie-label]',\n template: `\n {{ label }}\n \n \n {{ labelTrim ? trimLabel(label, labelTrimSize) : label }}\n \n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { data: [{\n type: Input\n }], radius: [{\n type: Input\n }], label: [{\n type: Input\n }], color: [{\n type: Input\n }], max: [{\n type: Input\n }], value: [{\n type: Input\n }], explodeSlices: [{\n type: Input\n }], animations: [{\n type: Input\n }], labelTrim: [{\n type: Input\n }], labelTrimSize: [{\n type: Input\n }] } });\n\nclass PolarSeriesComponent {\n constructor() {\n this.tooltipDisabled = false;\n this.gradient = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.circleRadius = 3;\n this.barOrientation = BarOrientation;\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateGradients();\n const line = this.getLineGenerator();\n const data = this.sortData(this.data.series);\n const seriesName = this.data.name;\n const linearScaleType = this.colors.scaleType === ScaleType.Linear;\n const min = this.yScale.domain()[0];\n this.seriesColor = this.colors.getColor(linearScaleType ? min : seriesName);\n this.path = line(data) || '';\n this.circles = data.map(d => {\n const a = this.getAngle(d);\n const r = this.getRadius(d);\n const value = d.value;\n const color = this.colors.getColor(linearScaleType ? Math.abs(value) : seriesName);\n const cData = Object.assign({}, d, {\n series: seriesName,\n value,\n name: d.name\n });\n return {\n data: cData,\n cx: r * Math.sin(a),\n cy: -r * Math.cos(a),\n value,\n color,\n label: d.name\n };\n });\n this.active = this.isActive(this.data);\n this.inactive = this.isInactive(this.data);\n this.tooltipText = this.tooltipText || (c => this.defaultTooltipText(c));\n }\n getAngle(d) {\n const label = d.name;\n if (this.scaleType === ScaleType.Time) {\n return this.xScale(label);\n }\n else if (this.scaleType === ScaleType.Linear) {\n return this.xScale(Number(label));\n }\n return this.xScale(label);\n }\n getRadius(d) {\n return this.yScale(d.value);\n }\n getLineGenerator() {\n return lineRadial()\n .angle(d => this.getAngle(d))\n .radius(d => this.getRadius(d))\n .curve(this.curve);\n }\n sortData(data) {\n if (this.scaleType === ScaleType.Linear) {\n return sortLinear(data, 'name');\n }\n else if (this.scaleType === ScaleType.Time) {\n return sortByTime(data, 'name');\n }\n return sortByDomain(data, 'name', 'asc', this.xScale.domain());\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n isInactive(entry) {\n if (!this.activeEntries || this.activeEntries.length === 0)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item === undefined;\n }\n defaultTooltipText({ label, value }) {\n return `\n ${escapeLabel(this.data.name)} • ${escapeLabel(label)}\n ${value.toLocaleString()}\n `;\n }\n updateGradients() {\n this.hasGradient = this.gradient || this.colors.scaleType === ScaleType.Linear;\n if (!this.hasGradient) {\n return;\n }\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n if (this.colors.scaleType === ScaleType.Linear) {\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n const min = Math.min(...values);\n this.gradientStops = this.colors.getLinearGradientStops(max, min);\n }\n else {\n this.gradientStops = undefined;\n }\n }\n}\nPolarSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nPolarSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PolarSeriesComponent, selector: \"g[ngx-charts-polar-series]\", inputs: { name: \"name\", data: \"data\", xScale: \"xScale\", yScale: \"yScale\", colors: \"colors\", scaleType: \"scaleType\", curve: \"curve\", activeEntries: \"activeEntries\", rangeFillOpacity: \"rangeFillOpacity\", tooltipDisabled: \"tooltipDisabled\", tooltipText: \"tooltipText\", gradient: \"gradient\", tooltipTemplate: \"tooltipTemplate\", animations: \"animations\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n `, isInline: true, components: [{ type: SvgRadialGradientComponent, selector: \"g[ngx-charts-svg-radial-gradient]\", inputs: [\"color\", \"name\", \"startOpacity\", \"endOpacity\", \"cx\", \"cy\", \"stops\"] }, { type: LineComponent, selector: \"g[ngx-charts-line]\", inputs: [\"path\", \"stroke\", \"data\", \"fill\", \"animations\"] }, { type: CircleComponent, selector: \"g[ngx-charts-circle]\", inputs: [\"cx\", \"cy\", \"r\", \"fill\", \"stroke\", \"data\", \"classNames\", \"circleOpacity\", \"pointerEvents\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-polar-series]',\n template: `\n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { name: [{\n type: Input\n }], data: [{\n type: Input\n }], xScale: [{\n type: Input\n }], yScale: [{\n type: Input\n }], colors: [{\n type: Input\n }], scaleType: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], rangeFillOpacity: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipText: [{\n type: Input\n }], gradient: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }] } });\n\nconst twoPI = 2 * Math.PI;\nclass PolarChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.showGridLines = true;\n this.curve = curveCardinalClosed;\n this.activeEntries = [];\n this.rangeFillOpacity = 0.15;\n this.trimYAxisTicks = true;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.showSeriesOnHover = true;\n this.gradient = false;\n this.yAxisMinScale = 0;\n this.labelTrim = true;\n this.labelTrimSize = 10;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n // series: any; // ???\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.orientation = Orientation;\n this.isSSR = false;\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n this.setDims();\n this.setScales();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.setTicks();\n }\n setDims() {\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n const halfWidth = Math.floor(this.dims.width / 2);\n const halfHeight = Math.floor(this.dims.height / 2);\n const outerRadius = (this.outerRadius = Math.min(halfHeight / 1.5, halfWidth / 1.5));\n const yOffset = Math.max(0, halfHeight - outerRadius);\n this.yAxisDims = {\n ...this.dims,\n width: halfWidth\n };\n this.transform = `translate(${this.dims.xOffset}, ${this.margin[0]})`;\n this.transformYAxis = `translate(0, ${yOffset})`;\n this.labelOffset = this.dims.height + 40;\n this.transformPlot = `translate(${halfWidth}, ${halfHeight})`;\n }\n setScales() {\n const xValues = this.getXValues();\n this.scaleType = getScaleType(xValues);\n this.xDomain = this.filteredDomain || this.getXDomain(xValues);\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, twoPI);\n this.yScale = this.getYScale(this.yDomain, this.outerRadius);\n this.yAxisScale = this.getYScale(this.yDomain.reverse(), this.outerRadius);\n }\n setTicks() {\n let tickFormat;\n if (this.xAxisTickFormatting) {\n tickFormat = this.xAxisTickFormatting;\n }\n else if (this.xScale.tickFormat) {\n tickFormat = this.xScale.tickFormat.apply(this.xScale, [5]);\n }\n else {\n tickFormat = d => {\n if (isDate(d)) {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n const outerRadius = this.outerRadius;\n const s = 1.1;\n this.thetaTicks = this.xDomain.map(d => {\n const startAngle = this.xScale(d);\n const dd = s * outerRadius * (startAngle > Math.PI ? -1 : 1);\n const label = tickFormat(d);\n const startPos = [outerRadius * Math.sin(startAngle), -outerRadius * Math.cos(startAngle)];\n const pos = [dd, s * startPos[1]];\n return {\n innerRadius: 0,\n outerRadius,\n startAngle,\n endAngle: startAngle,\n value: outerRadius,\n label,\n startPos,\n pos\n };\n });\n const minDistance = 10;\n /* from pie chart, abstract out -*/\n for (let i = 0; i < this.thetaTicks.length - 1; i++) {\n const a = this.thetaTicks[i];\n for (let j = i + 1; j < this.thetaTicks.length; j++) {\n const b = this.thetaTicks[j];\n // if they're on the same side\n if (b.pos[0] * a.pos[0] > 0) {\n // if they're overlapping\n const o = minDistance - Math.abs(b.pos[1] - a.pos[1]);\n if (o > 0) {\n // push the second up or down\n b.pos[1] += Math.sign(b.pos[0]) * o;\n }\n }\n }\n }\n this.radiusTicks = this.yAxisScale.ticks(Math.floor(this.dims.height / 50)).map(d => this.yScale(d));\n }\n getXValues() {\n const values = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.name)) {\n values.push(d.name);\n }\n }\n }\n return values;\n }\n getXDomain(values = this.getXValues()) {\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n return [min, max];\n }\n else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n return [min, max];\n }\n return values;\n }\n getYValues() {\n const domain = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (domain.indexOf(d.value) < 0) {\n domain.push(d.value);\n }\n if (d.min !== undefined) {\n if (domain.indexOf(d.min) < 0) {\n domain.push(d.min);\n }\n }\n if (d.max !== undefined) {\n if (domain.indexOf(d.max) < 0) {\n domain.push(d.max);\n }\n }\n }\n }\n return domain;\n }\n getYDomain(domain = this.getYValues()) {\n let min = Math.min(...domain);\n const max = Math.max(this.yAxisMinScale, ...domain);\n min = Math.max(0, min);\n if (!this.autoScale) {\n min = Math.min(0, min);\n }\n return [min, max];\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n switch (this.scaleType) {\n case ScaleType.Time:\n return scaleTime().range([0, width]).domain(domain);\n case ScaleType.Linear: {\n const scale = scaleLinear().range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n default:\n return scalePoint()\n .range([0, width - twoPI / domain.length])\n .padding(0)\n .domain(domain);\n }\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([0, height]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n setColors() {\n const domain = this.schemeType === ScaleType.Ordinal ? this.seriesDomain : this.yDomain.reverse();\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n if (this.schemeType === ScaleType.Ordinal) {\n return {\n scaleType: this.schemeType,\n colors: this.colors,\n domain: this.seriesDomain,\n title: this.legendTitle,\n position: this.legendPosition\n };\n }\n return {\n scaleType: this.schemeType,\n colors: this.colors.scale,\n domain: this.yDomain,\n title: undefined,\n position: this.legendPosition\n };\n }\n updateYAxisWidth({ width }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({ height }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = this.showSeriesOnHover ? [item, ...this.activeEntries] : this.activeEntries;\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n trackBy(index, item) {\n return `${item.name}`;\n }\n}\nPolarChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nPolarChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PolarChartComponent, selector: \"ngx-charts-polar-chart\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", xAxis: \"xAxis\", yAxis: \"yAxis\", showXAxisLabel: \"showXAxisLabel\", showYAxisLabel: \"showYAxisLabel\", xAxisLabel: \"xAxisLabel\", yAxisLabel: \"yAxisLabel\", autoScale: \"autoScale\", showGridLines: \"showGridLines\", curve: \"curve\", activeEntries: \"activeEntries\", schemeType: \"schemeType\", rangeFillOpacity: \"rangeFillOpacity\", trimYAxisTicks: \"trimYAxisTicks\", maxYAxisTickLength: \"maxYAxisTickLength\", xAxisTickFormatting: \"xAxisTickFormatting\", yAxisTickFormatting: \"yAxisTickFormatting\", roundDomains: \"roundDomains\", tooltipDisabled: \"tooltipDisabled\", showSeriesOnHover: \"showSeriesOnHover\", gradient: \"gradient\", yAxisMinScale: \"yAxisMinScale\", labelTrim: \"labelTrim\", labelTrimSize: \"labelTrimSize\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:.75s ease-in fadeIn;animation:.75s ease-in fadeIn}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;transition:d .75s}@-webkit-keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}\\n\", \".polar-chart .polar-chart-background{fill:none}.polar-chart .radial-gridline-path{stroke-dasharray:10 10;fill:none}.polar-chart .pie-label-line{stroke:#2f3646}.polar-charts-series .polar-series-area,.polar-series-path{pointer-events:none}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: PieLabelComponent, selector: \"g[ngx-charts-pie-label]\", inputs: [\"data\", \"radius\", \"label\", \"color\", \"max\", \"value\", \"explodeSlices\", \"animations\", \"labelTrim\", \"labelTrimSize\"] }, { type: YAxisComponent, selector: \"g[ngx-charts-y-axis]\", inputs: [\"yScale\", \"dims\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"showGridLines\", \"showLabel\", \"labelText\", \"yAxisTickCount\", \"yOrient\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"yAxisOffset\"], outputs: [\"dimensionsChanged\"] }, { type: AxisLabelComponent, selector: \"g[ngx-charts-axis-label]\", inputs: [\"orient\", \"label\", \"offset\", \"width\", \"height\"] }, { type: PolarSeriesComponent, selector: \"g[ngx-charts-polar-series]\", inputs: [\"name\", \"data\", \"xScale\", \"yScale\", \"colors\", \"scaleType\", \"curve\", \"activeEntries\", \"rangeFillOpacity\", \"tooltipDisabled\", \"tooltipText\", \"gradient\", \"tooltipTemplate\", \"animations\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({\n opacity: 0\n }))\n ])\n ])\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarChartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-polar-chart', template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({\n opacity: 0\n }))\n ])\n ])\n ], styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:.75s ease-in fadeIn;animation:.75s ease-in fadeIn}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;transition:d .75s}@-webkit-keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}\\n\", \".polar-chart .polar-chart-background{fill:none}.polar-chart .radial-gridline-path{stroke-dasharray:10 10;fill:none}.polar-chart .pie-label-line{stroke:#2f3646}.polar-charts-series .polar-series-area,.polar-series-path{pointer-events:none}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], xAxis: [{\n type: Input\n }], yAxis: [{\n type: Input\n }], showXAxisLabel: [{\n type: Input\n }], showYAxisLabel: [{\n type: Input\n }], xAxisLabel: [{\n type: Input\n }], yAxisLabel: [{\n type: Input\n }], autoScale: [{\n type: Input\n }], showGridLines: [{\n type: Input\n }], curve: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], schemeType: [{\n type: Input\n }], rangeFillOpacity: [{\n type: Input\n }], trimYAxisTicks: [{\n type: Input\n }], maxYAxisTickLength: [{\n type: Input\n }], xAxisTickFormatting: [{\n type: Input\n }], yAxisTickFormatting: [{\n type: Input\n }], roundDomains: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], showSeriesOnHover: [{\n type: Input\n }], gradient: [{\n type: Input\n }], yAxisMinScale: [{\n type: Input\n }], labelTrim: [{\n type: Input\n }], labelTrimSize: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass PieArcComponent {\n constructor(element) {\n this.startAngle = 0;\n this.endAngle = Math.PI * 2;\n this.cornerRadius = 0;\n this.explodeSlices = false;\n this.gradient = false;\n this.animate = true;\n this.pointerEvents = true;\n this.isActive = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.dblclick = new EventEmitter();\n this.barOrientation = BarOrientation;\n this.initialized = false;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n }\n getGradient() {\n return this.gradient ? this.gradientFill : this.fill;\n }\n getPointerEvents() {\n return this.pointerEvents ? 'auto' : 'none';\n }\n update() {\n const calc = this.calculateArc();\n this.startOpacity = 0.5;\n this.radialGradientId = 'linearGrad' + id().toString();\n this.gradientFill = `url(#${this.radialGradientId})`;\n if (this.animate) {\n if (this.initialized) {\n this.updateAnimation();\n }\n else {\n this.loadAnimation();\n this.initialized = true;\n }\n }\n else {\n this.path = calc.startAngle(this.startAngle).endAngle(this.endAngle)();\n }\n }\n calculateArc() {\n let outerRadius = this.outerRadius;\n if (this.explodeSlices && this.innerRadius === 0) {\n outerRadius = (this.outerRadius * this.value) / this.max;\n }\n return arc().innerRadius(this.innerRadius).outerRadius(outerRadius).cornerRadius(this.cornerRadius);\n }\n loadAnimation() {\n const node = select(this.element)\n .selectAll('.arc')\n .data([{ startAngle: this.startAngle, endAngle: this.endAngle }]);\n const calc = this.calculateArc();\n node\n .transition()\n .attrTween('d', function (d) {\n this._current = this._current || d;\n const copyOfD = Object.assign({}, d);\n copyOfD.endAngle = copyOfD.startAngle;\n const interpolater = interpolate(copyOfD, copyOfD);\n this._current = interpolater(0);\n return function (t) {\n return calc(interpolater(t));\n };\n })\n .transition()\n .duration(750)\n .attrTween('d', function (d) {\n this._current = this._current || d;\n const interpolater = interpolate(this._current, d);\n this._current = interpolater(0);\n return function (t) {\n return calc(interpolater(t));\n };\n });\n }\n updateAnimation() {\n const node = select(this.element)\n .selectAll('.arc')\n .data([{ startAngle: this.startAngle, endAngle: this.endAngle }]);\n const calc = this.calculateArc();\n node\n .transition()\n .duration(750)\n .attrTween('d', function (d) {\n this._current = this._current || d;\n const interpolater = interpolate(this._current, d);\n this._current = interpolater(0);\n return function (t) {\n return calc(interpolater(t));\n };\n });\n }\n onClick() {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(() => this.select.emit(this.data), 200);\n }\n onDblClick(event) {\n event.preventDefault();\n event.stopPropagation();\n clearTimeout(this._timeout);\n this.dblclick.emit({\n data: this.data,\n nativeEvent: event\n });\n }\n}\nPieArcComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieArcComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nPieArcComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PieArcComponent, selector: \"g[ngx-charts-pie-arc]\", inputs: { fill: \"fill\", startAngle: \"startAngle\", endAngle: \"endAngle\", innerRadius: \"innerRadius\", outerRadius: \"outerRadius\", cornerRadius: \"cornerRadius\", value: \"value\", max: \"max\", data: \"data\", explodeSlices: \"explodeSlices\", gradient: \"gradient\", animate: \"animate\", pointerEvents: \"pointerEvents\", isActive: \"isActive\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\", dblclick: \"dblclick\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n `, isInline: true, components: [{ type: SvgRadialGradientComponent, selector: \"g[ngx-charts-svg-radial-gradient]\", inputs: [\"color\", \"name\", \"startOpacity\", \"endOpacity\", \"cx\", \"cy\", \"stops\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieArcComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-pie-arc]',\n template: `\n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fill: [{\n type: Input\n }], startAngle: [{\n type: Input\n }], endAngle: [{\n type: Input\n }], innerRadius: [{\n type: Input\n }], outerRadius: [{\n type: Input\n }], cornerRadius: [{\n type: Input\n }], value: [{\n type: Input\n }], max: [{\n type: Input\n }], data: [{\n type: Input\n }], explodeSlices: [{\n type: Input\n }], gradient: [{\n type: Input\n }], animate: [{\n type: Input\n }], pointerEvents: [{\n type: Input\n }], isActive: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], dblclick: [{\n type: Output\n }] } });\n\nclass PieSeriesComponent {\n constructor() {\n this.series = [];\n this.innerRadius = 60;\n this.outerRadius = 80;\n this.trimLabels = true;\n this.maxLabelLength = 10;\n this.tooltipDisabled = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.dblclick = new EventEmitter();\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n const pieGenerator = pie()\n .value(d => d.value)\n .sort(null);\n const arcData = pieGenerator(this.series);\n this.max = max(arcData, d => {\n return d.value;\n });\n this.data = this.calculateLabelPositions(arcData);\n this.tooltipText = this.tooltipText || this.defaultTooltipText;\n }\n midAngle(d) {\n return d.startAngle + (d.endAngle - d.startAngle) / 2;\n }\n outerArc() {\n const factor = 1.5;\n return arc()\n .innerRadius(this.outerRadius * factor)\n .outerRadius(this.outerRadius * factor);\n }\n calculateLabelPositions(pieData) {\n const factor = 1.5;\n const minDistance = 10;\n const labelPositions = pieData;\n labelPositions.forEach(d => {\n d.pos = this.outerArc().centroid(d);\n d.pos[0] = factor * this.outerRadius * (this.midAngle(d) < Math.PI ? 1 : -1);\n });\n for (let i = 0; i < labelPositions.length - 1; i++) {\n const a = labelPositions[i];\n if (!this.labelVisible(a)) {\n continue;\n }\n for (let j = i + 1; j < labelPositions.length; j++) {\n const b = labelPositions[j];\n if (!this.labelVisible(b)) {\n continue;\n }\n // if they're on the same side\n if (b.pos[0] * a.pos[0] > 0) {\n // if they're overlapping\n const o = minDistance - Math.abs(b.pos[1] - a.pos[1]);\n if (o > 0) {\n // push the second up or down\n b.pos[1] += Math.sign(b.pos[0]) * o;\n }\n }\n }\n }\n return labelPositions;\n }\n labelVisible(myArc) {\n return this.showLabels && myArc.endAngle - myArc.startAngle > Math.PI / 30;\n }\n getTooltipTitle(a) {\n return this.tooltipTemplate ? undefined : this.tooltipText(a);\n }\n labelText(myArc) {\n if (this.labelFormatting) {\n return this.labelFormatting(myArc.data.name);\n }\n return this.label(myArc);\n }\n label(myArc) {\n return formatLabel(myArc.data.name);\n }\n defaultTooltipText(myArc) {\n const label = this.label(myArc);\n const val = formatLabel(myArc.data.value);\n return `\n ${escapeLabel(label)}\n ${val}\n `;\n }\n color(myArc) {\n return this.colors.getColor(this.label(myArc));\n }\n trackBy(index, item) {\n return item.data.name;\n }\n onClick(data) {\n this.select.emit(data);\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name && entry.series === d.series;\n });\n return item !== undefined;\n }\n}\nPieSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nPieSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PieSeriesComponent, selector: \"g[ngx-charts-pie-series]\", inputs: { colors: \"colors\", series: \"series\", dims: \"dims\", innerRadius: \"innerRadius\", outerRadius: \"outerRadius\", explodeSlices: \"explodeSlices\", showLabels: \"showLabels\", gradient: \"gradient\", activeEntries: \"activeEntries\", labelFormatting: \"labelFormatting\", trimLabels: \"trimLabels\", maxLabelLength: \"maxLabelLength\", tooltipText: \"tooltipText\", tooltipDisabled: \"tooltipDisabled\", tooltipTemplate: \"tooltipTemplate\", animations: \"animations\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\", dblclick: \"dblclick\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n `, isInline: true, components: [{ type: PieLabelComponent, selector: \"g[ngx-charts-pie-label]\", inputs: [\"data\", \"radius\", \"label\", \"color\", \"max\", \"value\", \"explodeSlices\", \"animations\", \"labelTrim\", \"labelTrimSize\"] }, { type: PieArcComponent, selector: \"g[ngx-charts-pie-arc]\", inputs: [\"fill\", \"startAngle\", \"endAngle\", \"innerRadius\", \"outerRadius\", \"cornerRadius\", \"value\", \"max\", \"data\", \"explodeSlices\", \"gradient\", \"animate\", \"pointerEvents\", \"isActive\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dblclick\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-pie-series]',\n template: `\n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { colors: [{\n type: Input\n }], series: [{\n type: Input\n }], dims: [{\n type: Input\n }], innerRadius: [{\n type: Input\n }], outerRadius: [{\n type: Input\n }], explodeSlices: [{\n type: Input\n }], showLabels: [{\n type: Input\n }], gradient: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], trimLabels: [{\n type: Input\n }], maxLabelLength: [{\n type: Input\n }], tooltipText: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], dblclick: [{\n type: Output\n }] } });\n\nclass AdvancedPieChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.activeEntries = [];\n this.tooltipDisabled = false;\n this.label = 'Total';\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [20, 20, 20, 20];\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: (this.width * 4) / 12.0,\n height: this.height,\n margins: this.margin\n });\n this.formatDates();\n this.domain = this.getDomain();\n this.setColors();\n const xOffset = this.dims.width / 2;\n const yOffset = this.margin[0] + this.dims.height / 2;\n this.legendWidth = this.width - this.dims.width - this.margin[1];\n this.outerRadius = Math.min(this.dims.width, this.dims.height) / 2.5;\n this.innerRadius = this.outerRadius * 0.75;\n this.transform = `translate(${xOffset} , ${yOffset})`;\n }\n getDomain() {\n return this.results.map(d => d.label);\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nAdvancedPieChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AdvancedPieChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nAdvancedPieChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: AdvancedPieChartComponent, selector: \"ngx-charts-advanced-pie-chart\", inputs: { gradient: \"gradient\", activeEntries: \"activeEntries\", tooltipDisabled: \"tooltipDisabled\", tooltipText: \"tooltipText\", label: \"label\", valueFormatting: \"valueFormatting\", nameFormatting: \"nameFormatting\", percentageFormatting: \"percentageFormatting\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n
\n
\n \n \n \n \n \n
\n
\n \n \n
\n
\n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".advanced-pie{display:inline-block;float:left}.advanced-pie-legend-wrapper{display:inline-block}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: PieSeriesComponent, selector: \"g[ngx-charts-pie-series]\", inputs: [\"colors\", \"series\", \"dims\", \"innerRadius\", \"outerRadius\", \"explodeSlices\", \"showLabels\", \"gradient\", \"activeEntries\", \"labelFormatting\", \"trimLabels\", \"maxLabelLength\", \"tooltipText\", \"tooltipDisabled\", \"tooltipTemplate\", \"animations\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dblclick\"] }, { type: AdvancedLegendComponent, selector: \"ngx-charts-advanced-legend\", inputs: [\"width\", \"data\", \"colors\", \"label\", \"animations\", \"valueFormatting\", \"labelFormatting\", \"percentageFormatting\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: AdvancedPieChartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-advanced-pie-chart', template: `\n
\n
\n \n \n \n \n \n
\n
\n \n \n
\n
\n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".advanced-pie{display:inline-block;float:left}.advanced-pie-legend-wrapper{display:inline-block}\\n\"] }]\n }], propDecorators: { gradient: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipText: [{\n type: Input\n }], label: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }], valueFormatting: [{\n type: Input\n }], nameFormatting: [{\n type: Input\n }], percentageFormatting: [{\n type: Input\n }] } });\n\nclass PieChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.labels = false;\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.explodeSlices = false;\n this.doughnut = false;\n this.arcWidth = 0.25;\n this.activeEntries = [];\n this.tooltipDisabled = false;\n this.trimLabels = true;\n this.maxLabelLength = 10;\n this.dblclick = new EventEmitter();\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n }\n update() {\n super.update();\n if (this.labels && this.hasNoOptionalMarginsSet()) {\n this.margins = [30, 80, 30, 80];\n }\n else if (!this.labels && this.hasNoOptionalMarginsSet()) {\n // default value for margins\n this.margins = [20, 20, 20, 20];\n }\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margins,\n showLegend: this.legend,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n const xOffset = this.margins[3] + this.dims.width / 2;\n const yOffset = this.margins[0] + this.dims.height / 2;\n this.translation = `translate(${xOffset}, ${yOffset})`;\n this.outerRadius = Math.min(this.dims.width, this.dims.height);\n if (this.labels) {\n // make room for labels\n this.outerRadius /= 3;\n }\n else {\n this.outerRadius /= 2;\n }\n this.innerRadius = 0;\n if (this.doughnut) {\n this.innerRadius = this.outerRadius * (1 - this.arcWidth);\n }\n this.domain = this.getDomain();\n // sort data according to domain\n this.data = this.results.sort((a, b) => {\n return this.domain.indexOf(a.name) - this.domain.indexOf(b.name);\n });\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n }\n getDomain() {\n return this.results.map(d => d.label);\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n getLegendOptions() {\n return {\n scaleType: ScaleType.Ordinal,\n domain: this.domain,\n colors: this.colors,\n title: this.legendTitle,\n position: this.legendPosition\n };\n }\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n hasNoOptionalMarginsSet() {\n return !this.margins || this.margins.length <= 0;\n }\n}\nPieChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nPieChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PieChartComponent, selector: \"ngx-charts-pie-chart\", inputs: { labels: \"labels\", legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", explodeSlices: \"explodeSlices\", doughnut: \"doughnut\", arcWidth: \"arcWidth\", gradient: \"gradient\", activeEntries: \"activeEntries\", tooltipDisabled: \"tooltipDisabled\", labelFormatting: \"labelFormatting\", trimLabels: \"trimLabels\", maxLabelLength: \"maxLabelLength\", tooltipText: \"tooltipText\", margins: \"margins\" }, outputs: { dblclick: \"dblclick\", select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:.75s ease-in fadeIn;animation:.75s ease-in fadeIn}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;transition:d .75s}@-webkit-keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: PieSeriesComponent, selector: \"g[ngx-charts-pie-series]\", inputs: [\"colors\", \"series\", \"dims\", \"innerRadius\", \"outerRadius\", \"explodeSlices\", \"showLabels\", \"gradient\", \"activeEntries\", \"labelFormatting\", \"trimLabels\", \"maxLabelLength\", \"tooltipText\", \"tooltipDisabled\", \"tooltipTemplate\", \"animations\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dblclick\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieChartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-pie-chart', template: `\n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:.75s ease-in fadeIn;animation:.75s ease-in fadeIn}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;transition:d .75s}@-webkit-keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}\\n\"] }]\n }], propDecorators: { labels: [{\n type: Input\n }], legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], explodeSlices: [{\n type: Input\n }], doughnut: [{\n type: Input\n }], arcWidth: [{\n type: Input\n }], gradient: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], trimLabels: [{\n type: Input\n }], maxLabelLength: [{\n type: Input\n }], tooltipText: [{\n type: Input\n }], dblclick: [{\n type: Output\n }], margins: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nfunction gridSize(dims, len, minWidth) {\n let rows = 1;\n let cols = len;\n const width = dims.width;\n if (width > minWidth) {\n while (width / cols < minWidth) {\n rows += 1;\n cols = Math.ceil(len / rows);\n }\n }\n return [cols, rows];\n}\nfunction gridLayout(dims, data, minWidth, designatedTotal) {\n const xScale = scaleBand();\n const yScale = scaleBand();\n const width = dims.width;\n const height = dims.height;\n const [columns, rows] = gridSize(dims, data.length, minWidth);\n const xDomain = [];\n const yDomain = [];\n for (let i = 0; i < rows; i++) {\n yDomain.push(i);\n }\n for (let i = 0; i < columns; i++) {\n xDomain.push(i);\n }\n xScale.domain(xDomain);\n yScale.domain(yDomain);\n xScale.rangeRound([0, width], 0.1);\n yScale.rangeRound([0, height], 0.1);\n const res = [];\n const total = designatedTotal ? designatedTotal : getTotal(data);\n const cardWidth = xScale.bandwidth();\n const cardHeight = yScale.bandwidth();\n for (let i = 0; i < data.length; i++) {\n res[i] = {};\n res[i].data = {\n name: data[i] ? data[i].name : '',\n value: data[i] ? data[i].value : undefined,\n extra: data[i] ? data[i].extra : undefined,\n label: data[i] ? data[i].label : ''\n };\n res[i].x = xScale(i % columns);\n res[i].y = yScale(Math.floor(i / columns));\n res[i].width = cardWidth;\n res[i].height = cardHeight;\n res[i].data.percent = total > 0 ? res[i].data.value / total : 0;\n res[i].data.total = total;\n }\n return res;\n}\nfunction getTotal(results) {\n return results.map(d => (d ? d.value : 0)).reduce((sum, val) => sum + val, 0);\n}\n\nclass PieGridSeriesComponent {\n constructor(element) {\n this.innerRadius = 70;\n this.outerRadius = 80;\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.layout = pie()\n .value(d => d.data.value)\n .sort(null);\n this.arcs = this.getArcs();\n }\n getArcs() {\n return this.layout(this.data).map((arc, index) => {\n const label = arc.data.data.name;\n const other = arc.data.data.other;\n if (index === 0) {\n arc.startAngle = 0;\n }\n const color = this.colors(label);\n return {\n data: arc.data.data,\n class: 'arc ' + 'arc' + index,\n fill: color,\n startAngle: other ? 0 : arc.startAngle,\n endAngle: arc.endAngle,\n animate: this.animations && !other,\n pointerEvents: !other\n };\n });\n }\n onClick(data) {\n this.select.emit(this.data[0].data);\n }\n trackBy(index, item) {\n return item.data.name;\n }\n label(arc) {\n return arc.data.name;\n }\n color(arc) {\n return this.colors(this.label(arc));\n }\n}\nPieGridSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieGridSeriesComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nPieGridSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PieGridSeriesComponent, selector: \"g[ngx-charts-pie-grid-series]\", inputs: { colors: \"colors\", data: \"data\", innerRadius: \"innerRadius\", outerRadius: \"outerRadius\", animations: \"animations\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n `, isInline: true, components: [{ type: PieArcComponent, selector: \"g[ngx-charts-pie-arc]\", inputs: [\"fill\", \"startAngle\", \"endAngle\", \"innerRadius\", \"outerRadius\", \"cornerRadius\", \"value\", \"max\", \"data\", \"explodeSlices\", \"gradient\", \"animate\", \"pointerEvents\", \"isActive\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dblclick\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieGridSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-pie-grid-series]',\n template: `\n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { colors: [{\n type: Input\n }], data: [{\n type: Input\n }], innerRadius: [{\n type: Input\n }], outerRadius: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }] } });\n\nclass PieGridComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.tooltipDisabled = false;\n this.label = 'Total';\n this.minWidth = 150;\n this.activeEntries = [];\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [20, 20, 20, 20];\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n this.formatDates();\n this.domain = this.getDomain();\n this.data = gridLayout(this.dims, this.results, this.minWidth, this.designatedTotal);\n this.transform = `translate(${this.margin[3]} , ${this.margin[0]})`;\n this.series = this.getSeries();\n this.setColors();\n this.tooltipText = this.tooltipText || this.defaultTooltipText;\n }\n defaultTooltipText({ data }) {\n const label = trimLabel(formatLabel(data.name));\n const val = data.value.toLocaleString();\n return `\n ${label}\n ${val}\n `;\n }\n getDomain() {\n return this.results.map(d => d.label);\n }\n getSeries() {\n const total = this.designatedTotal ? this.designatedTotal : this.getTotal();\n return this.data.map(d => {\n const baselineLabelHeight = 20;\n const padding = 10;\n const name = d.data.name;\n const label = formatLabel(name);\n const value = d.data.value;\n const radius = min([d.width - padding, d.height - baselineLabelHeight]) / 2 - 5;\n const innerRadius = radius * 0.9;\n let count = 0;\n const colors = () => {\n count += 1;\n if (count === 1) {\n return 'rgba(100,100,100,0.3)';\n }\n else {\n return this.colorScale.getColor(label);\n }\n };\n const xPos = d.x + (d.width - padding) / 2;\n const yPos = d.y + (d.height - baselineLabelHeight) / 2;\n return {\n transform: `translate(${xPos}, ${yPos})`,\n colors,\n innerRadius,\n outerRadius: radius,\n name,\n label: trimLabel(label),\n total: value,\n value,\n percent: format('.1%')(d.data.percent),\n data: [\n d,\n {\n data: {\n other: true,\n value: total - value,\n name: d.data.name\n }\n }\n ]\n };\n });\n }\n getTotal() {\n return this.results.map(d => d.value).reduce((sum, d) => sum + d, 0);\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n this.colorScale = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n }\n else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\nPieGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nPieGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: PieGridComponent, selector: \"ngx-charts-pie-grid\", inputs: { designatedTotal: \"designatedTotal\", tooltipDisabled: \"tooltipDisabled\", tooltipText: \"tooltipText\", label: \"label\", minWidth: \"minWidth\", activeEntries: \"activeEntries\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n \n {{ series.percent.toLocaleString() }}\n \n \n {{ series.label }}\n \n \n \n {{ label }}: {{ series.total.toLocaleString() }}\n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".pie-grid .arc1{opacity:.4}.pie-grid .percent-label{font-size:16px;font-weight:400}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: PieGridSeriesComponent, selector: \"g[ngx-charts-pie-grid-series]\", inputs: [\"colors\", \"data\", \"innerRadius\", \"outerRadius\", \"animations\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: CountUpDirective, selector: \"[ngx-charts-count-up]\", inputs: [\"countDuration\", \"countPrefix\", \"countSuffix\", \"valueFormatting\", \"countDecimals\", \"countTo\", \"countFrom\"], outputs: [\"countChange\", \"countFinish\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }, { type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieGridComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-pie-grid', template: `\n \n \n \n \n \n \n {{ series.percent.toLocaleString() }}\n \n \n {{ series.label }}\n \n \n \n {{ label }}: {{ series.total.toLocaleString() }}\n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".pie-grid .arc1{opacity:.4}.pie-grid .percent-label{font-size:16px;font-weight:400}\\n\"] }]\n }], propDecorators: { designatedTotal: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipText: [{\n type: Input\n }], label: [{\n type: Input\n }], minWidth: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass PieChartModule {\n}\nPieChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPieChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieChartModule, declarations: [AdvancedPieChartComponent,\n PieLabelComponent,\n PieArcComponent,\n PieChartComponent,\n PieGridComponent,\n PieGridSeriesComponent,\n PieSeriesComponent], imports: [ChartCommonModule], exports: [AdvancedPieChartComponent,\n PieLabelComponent,\n PieArcComponent,\n PieChartComponent,\n PieGridComponent,\n PieGridSeriesComponent,\n PieSeriesComponent] });\nPieChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieChartModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PieChartModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [\n AdvancedPieChartComponent,\n PieLabelComponent,\n PieArcComponent,\n PieChartComponent,\n PieGridComponent,\n PieGridSeriesComponent,\n PieSeriesComponent\n ],\n exports: [\n AdvancedPieChartComponent,\n PieLabelComponent,\n PieArcComponent,\n PieChartComponent,\n PieGridComponent,\n PieGridSeriesComponent,\n PieSeriesComponent\n ]\n }]\n }] });\n\nclass PolarChartModule {\n}\nPolarChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPolarChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarChartModule, declarations: [PolarChartComponent, PolarSeriesComponent], imports: [ChartCommonModule, PieChartModule, LineChartModule], exports: [PolarChartComponent, PolarSeriesComponent] });\nPolarChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarChartModule, imports: [[ChartCommonModule, PieChartModule, LineChartModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: PolarChartModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule, PieChartModule, LineChartModule],\n declarations: [PolarChartComponent, PolarSeriesComponent],\n exports: [PolarChartComponent, PolarSeriesComponent]\n }]\n }] });\n\nfunction calculateTextWidth(fontFamilyKey, text, defaultWidth = 8) {\n return text.split('').reduce((acc, curr) => {\n const width = fontFamilyKey[curr] || defaultWidth;\n return acc + width;\n }, 0);\n}\n\nconst VERDANA_FONT_WIDTHS_16_PX = {\n '0': 10,\n '1': 10,\n '2': 10,\n '3': 10,\n '4': 10,\n '5': 10,\n '6': 10,\n '7': 10,\n '8': 10,\n '9': 10,\n A: 11,\n B: 11,\n C: 11,\n D: 12,\n E: 10,\n F: 9,\n G: 12,\n H: 12,\n I: 7,\n J: 7,\n K: 11,\n L: 9,\n M: 13,\n N: 12,\n O: 13,\n P: 10,\n Q: 13,\n R: 11,\n S: 11,\n T: 10,\n U: 12,\n V: 11,\n W: 16,\n X: 11,\n Y: 10,\n Z: 11,\n a: 10,\n b: 10,\n c: 8,\n d: 10,\n e: 10,\n f: 6,\n g: 10,\n h: 10,\n i: 4,\n j: 6,\n k: 9,\n l: 4,\n m: 16,\n n: 10,\n o: 10,\n p: 10,\n q: 10,\n r: 7,\n s: 8,\n t: 6,\n u: 10,\n v: 9,\n w: 13,\n x: 9,\n y: 9,\n z: 8,\n '!': 6,\n '@': 16,\n '#': 13,\n $: 10,\n '%': 17,\n '^': 13,\n '&': 12,\n '*': 10,\n '(': 7,\n ')': 7,\n _: 10,\n '-': 7,\n '+': 13,\n '=': 13,\n ',': 6,\n '.': 6,\n '/': 7,\n \"'\": 4,\n ':': 7,\n '|': 7,\n '?': 9,\n ';': 7,\n '<': 13,\n '>': 13\n};\n\nclass CardComponent {\n constructor(element, cd, zone, platformId) {\n this.cd = cd;\n this.zone = zone;\n this.platformId = platformId;\n this.animations = true;\n this.select = new EventEmitter();\n this.value = '';\n this.textFontSize = 12;\n this.textTransform = '';\n this.initialized = false;\n this.bandHeight = 10;\n this.textPadding = [10, 20, 5, 20];\n this.labelFontSize = 15;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.scaleTextSSR();\n }\n }\n ngOnDestroy() {\n if (isPlatformBrowser(this.platformId)) {\n cancelAnimationFrame(this.animationReq);\n }\n }\n update() {\n this.zone.run(() => {\n const hasValue = this.data && typeof this.data.value !== 'undefined';\n const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());\n const labelFormatting = this.labelFormatting || (card => escapeLabel(trimLabel(card.label, 55)));\n this.transform = `translate(${this.x} , ${this.y})`;\n this.textWidth = Math.max(0, this.width) - this.textPadding[1] - this.textPadding[3];\n this.cardWidth = Math.max(0, this.width);\n this.cardHeight = Math.max(0, this.height);\n this.label = this.label ? this.label : this.data.name;\n const cardData = {\n label: this.label,\n data: this.data,\n value: this.data.value\n };\n this.formattedLabel = labelFormatting(cardData);\n this.transformBand = `translate(0 , ${this.cardHeight - this.bandHeight})`;\n const value = hasValue ? valueFormatting(cardData) : '';\n this.value = this.paddedValue(value);\n this.setPadding();\n this.bandPath = roundedRect(0, 0, this.cardWidth, this.bandHeight, 3, [false, false, true, true]);\n setTimeout(() => {\n if (isPlatformBrowser(this.platformId)) {\n this.scaleText();\n }\n this.value = value;\n if (hasValue && !this.initialized) {\n setTimeout(() => this.startCount(), 20);\n }\n }, 8);\n });\n }\n paddedValue(value) {\n if (this.medianSize && this.medianSize > value.length) {\n value += '\\u2007'.repeat(this.medianSize - value.length);\n }\n return value;\n }\n startCount() {\n if (!this.initialized && this.animations) {\n cancelAnimationFrame(this.animationReq);\n const val = this.data.value;\n const decs = decimalChecker(val);\n const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());\n const callback = ({ value, finished }) => {\n this.zone.run(() => {\n value = finished ? val : value;\n this.value = valueFormatting({ label: this.label, data: this.data, value });\n if (!finished) {\n this.value = this.paddedValue(this.value);\n }\n this.cd.markForCheck();\n });\n };\n this.animationReq = count(0, val, decs, 1, callback);\n this.initialized = true;\n }\n }\n scaleText() {\n this.zone.run(() => {\n const { width, height } = this.textEl.nativeElement.getBoundingClientRect();\n if (width === 0 || height === 0) {\n return;\n }\n const textPadding = (this.textPadding[1] = this.textPadding[3] = this.cardWidth / 8);\n const availableWidth = this.cardWidth - 2 * textPadding;\n const availableHeight = this.cardHeight / 3;\n const resizeScale = Math.min(availableWidth / width, availableHeight / height);\n this.textFontSize = Math.floor(this.textFontSize * resizeScale);\n this.labelFontSize = Math.min(this.textFontSize, 15);\n this.setPadding();\n this.cd.markForCheck();\n });\n }\n scaleTextSSR() {\n const width = calculateTextWidth(VERDANA_FONT_WIDTHS_16_PX, this.value, 10);\n const height = 18;\n const textPadding = (this.textPadding[1] = this.textPadding[3] = this.cardWidth / 8);\n const availableWidth = this.cardWidth - 2 * textPadding;\n const availableHeight = this.cardHeight / 3;\n const resizeScale = Math.min(availableWidth / width, availableHeight / height);\n this.textFontSize = Math.floor(this.textFontSize * resizeScale);\n this.labelFontSize = Math.min(this.textFontSize, 15);\n this.setPadding();\n }\n setPadding() {\n this.textPadding[1] = this.textPadding[3] = this.cardWidth / 8;\n const padding = this.cardHeight / 2;\n this.textPadding[0] = padding - this.textFontSize - this.labelFontSize / 2;\n this.textPadding[2] = padding - this.labelFontSize;\n }\n onClick() {\n this.select.emit(this.data);\n }\n}\nCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CardComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });\nCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: CardComponent, selector: \"g[ngx-charts-card]\", inputs: { color: \"color\", bandColor: \"bandColor\", textColor: \"textColor\", x: \"x\", y: \"y\", width: \"width\", height: \"height\", label: \"label\", data: \"data\", medianSize: \"medianSize\", valueFormatting: \"valueFormatting\", labelFormatting: \"labelFormatting\", animations: \"animations\" }, outputs: { select: \"select\" }, viewQueries: [{ propertyName: \"textEl\", first: true, predicate: [\"textEl\"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `\n \n \n \n {{ label }}\n \n \n \n \n \n {{ value }}\n \n \n `, isInline: true, directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CardComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-card]',\n template: `\n \n \n \n {{ label }}\n \n \n \n \n \n {{ value }}\n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { color: [{\n type: Input\n }], bandColor: [{\n type: Input\n }], textColor: [{\n type: Input\n }], x: [{\n type: Input\n }], y: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], label: [{\n type: Input\n }], data: [{\n type: Input\n }], medianSize: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], textEl: [{\n type: ViewChild,\n args: ['textEl', { static: false }]\n }] } });\n\n/**\n * Converts a hex to RGB\n *\n * @export\n */\nfunction hexToRgb(value) {\n // deprecated, use d3.color()\n return d3_color.rgb(value);\n}\n/**\n * Accepts a color (string) and returns a inverted hex color (string)\n * http://stackoverflow.com/questions/9600295/automatically-change-text-color-to-assure-readability\n *\n * @export\n */\nfunction invertColor(value) {\n const color = d3_color.rgb(value);\n const { r, g, b, opacity } = color;\n if (opacity === 0) {\n return color.toString();\n }\n const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n const depth = yiq >= 128 ? -0.8 : 0.8;\n return shadeRGBColor(color, depth);\n}\n/**\n * Given a rgb, it will darken/lighten\n * http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors\n *\n * @export\n * @param \\{ r, g, b }\n */\nfunction shadeRGBColor({ r, g, b }, percent) {\n const t = percent < 0 ? 0 : 255;\n const p = percent < 0 ? percent * -1 : percent;\n r = Math.round((t - r) * p) + r;\n g = Math.round((t - g) * p) + g;\n b = Math.round((t - b) * p) + b;\n return `rgb(${r}, ${g}, ${b})`;\n}\n\nclass CardSeriesComponent {\n constructor() {\n this.innerPadding = 15;\n this.emptyColor = 'rgba(0, 0, 0, 0)';\n this.animations = true;\n this.select = new EventEmitter();\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n if (this.data.length > 2) {\n const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());\n const sortedLengths = this.data\n .map(d => {\n const hasValue = d && d.data && typeof d.data.value !== 'undefined' && d.data.value !== null;\n return hasValue\n ? valueFormatting({\n data: d.data,\n label: d ? d.data.name : '',\n value: d && d.data ? d.data.value : ''\n }).length\n : 0;\n })\n .sort((a, b) => b - a);\n const idx = Math.ceil(this.data.length / 2);\n this.medianSize = sortedLengths[idx];\n }\n const cards = this.getCards();\n this.cards = cards.filter(d => d.data.value !== null);\n this.emptySlots = cards.filter(d => d.data.value === null);\n }\n getCards() {\n const yPadding = typeof this.innerPadding === 'number' ? this.innerPadding : this.innerPadding[0] + this.innerPadding[2];\n const xPadding = typeof this.innerPadding === 'number' ? this.innerPadding : this.innerPadding[1] + this.innerPadding[3];\n return this.data.map((d, index) => {\n let label = d.data.name;\n if (label && label.constructor.name === 'Date') {\n label = label.toLocaleDateString();\n }\n else {\n label = label ? label.toLocaleString() : label;\n }\n const value = d.data.value;\n const valueColor = label ? this.colors.getColor(label) : this.emptyColor;\n const color = this.cardColor || valueColor || '#000';\n return {\n x: d.x,\n y: d.y,\n width: d.width - xPadding,\n height: d.height - yPadding,\n color,\n bandColor: this.bandColor || valueColor,\n textColor: this.textColor || invertColor(color),\n label,\n data: d.data,\n tooltipText: `${label}: ${value}`\n };\n });\n }\n trackBy(index, card) {\n return card.label;\n }\n onClick(data) {\n this.select.emit(data);\n }\n}\nCardSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CardSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCardSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: CardSeriesComponent, selector: \"g[ngx-charts-card-series]\", inputs: { data: \"data\", dims: \"dims\", colors: \"colors\", innerPadding: \"innerPadding\", cardColor: \"cardColor\", bandColor: \"bandColor\", emptyColor: \"emptyColor\", textColor: \"textColor\", valueFormatting: \"valueFormatting\", labelFormatting: \"labelFormatting\", animations: \"animations\" }, outputs: { select: \"select\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n `, isInline: true, components: [{ type: CardComponent, selector: \"g[ngx-charts-card]\", inputs: [\"color\", \"bandColor\", \"textColor\", \"x\", \"y\", \"width\", \"height\", \"label\", \"data\", \"medianSize\", \"valueFormatting\", \"labelFormatting\", \"animations\"], outputs: [\"select\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: CardSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-card-series]',\n template: `\n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { data: [{\n type: Input\n }], dims: [{\n type: Input\n }], colors: [{\n type: Input\n }], innerPadding: [{\n type: Input\n }], cardColor: [{\n type: Input\n }], bandColor: [{\n type: Input\n }], emptyColor: [{\n type: Input\n }], textColor: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }] } });\n\nclass NumberCardComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.emptyColor = 'rgba(0, 0, 0, 0)';\n this.innerPadding = 15;\n this.margin = [10, 10, 10, 10];\n }\n get clickable() {\n return !!this.select.observers.length;\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n this.formatDates();\n this.domain = this.getDomain();\n this.setColors();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n const size = gridSize(this.dims, this.results.length, 150);\n const N = size[0] * size[1];\n const data = this.results.slice();\n while (data.length < N) {\n data.push({ value: null });\n }\n this.data = gridLayout(this.dims, data, 150, this.designatedTotal);\n }\n getDomain() {\n return this.results.map(d => d.label);\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n}\nNumberCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NumberCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nNumberCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: NumberCardComponent, selector: \"ngx-charts-number-card\", inputs: { cardColor: \"cardColor\", bandColor: \"bandColor\", emptyColor: \"emptyColor\", innerPadding: \"innerPadding\", textColor: \"textColor\", valueFormatting: \"valueFormatting\", labelFormatting: \"labelFormatting\", designatedTotal: \"designatedTotal\" }, usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \"ngx-charts-number-card .cell .trimmed-label{font-size:12px;pointer-events:none;overflow:hidden;text-align:left;line-height:1em}ngx-charts-number-card .cell .trimmed-label p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;padding:0;margin:0}ngx-charts-number-card .cell .value-text{pointer-events:none}ngx-charts-number-card .number-card.clickable .cell .card,ngx-charts-number-card .number-card.clickable .cell .card-band{cursor:pointer}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: CardSeriesComponent, selector: \"g[ngx-charts-card-series]\", inputs: [\"data\", \"dims\", \"colors\", \"innerPadding\", \"cardColor\", \"bandColor\", \"emptyColor\", \"textColor\", \"valueFormatting\", \"labelFormatting\", \"animations\"], outputs: [\"select\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NumberCardComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-number-card', template: `\n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \"ngx-charts-number-card .cell .trimmed-label{font-size:12px;pointer-events:none;overflow:hidden;text-align:left;line-height:1em}ngx-charts-number-card .cell .trimmed-label p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;padding:0;margin:0}ngx-charts-number-card .cell .value-text{pointer-events:none}ngx-charts-number-card .number-card.clickable .cell .card,ngx-charts-number-card .number-card.clickable .cell .card-band{cursor:pointer}\\n\"] }]\n }], propDecorators: { cardColor: [{\n type: Input\n }], bandColor: [{\n type: Input\n }], emptyColor: [{\n type: Input\n }], innerPadding: [{\n type: Input\n }], textColor: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], designatedTotal: [{\n type: Input\n }] } });\n\nclass NumberCardModule {\n}\nNumberCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NumberCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNumberCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NumberCardModule, declarations: [CardComponent, CardSeriesComponent, NumberCardComponent], imports: [ChartCommonModule], exports: [CardComponent, CardSeriesComponent, NumberCardComponent] });\nNumberCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NumberCardModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NumberCardModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [CardComponent, CardSeriesComponent, NumberCardComponent],\n exports: [CardComponent, CardSeriesComponent, NumberCardComponent]\n }]\n }] });\n\nclass TreeMapCellComponent {\n constructor(element) {\n this.gradient = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.initialized = false;\n this.orientation = BarOrientation;\n this.element = element.nativeElement;\n }\n ngOnChanges() {\n this.update();\n this.valueFormatting = this.valueFormatting || (value => value.toLocaleString());\n const labelFormatting = this.labelFormatting || (cell => escapeLabel(trimLabel(cell.label, 55)));\n const cellData = {\n data: this.data,\n label: this.label,\n value: this.value\n };\n this.formattedValue = this.valueFormatting(cellData.value);\n this.formattedLabel = labelFormatting(cellData);\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n this.gradientStops = this.getGradientStops();\n }\n update() {\n if (this.initialized) {\n this.animateToCurrentForm();\n }\n else {\n if (this.animations) {\n this.loadAnimation();\n }\n this.initialized = true;\n }\n }\n loadAnimation() {\n const node = select(this.element).select('.cell');\n node.attr('opacity', 0).attr('x', this.x).attr('y', this.y);\n this.animateToCurrentForm();\n }\n getTextColor() {\n return invertColor(this.fill);\n }\n animateToCurrentForm() {\n const node = select(this.element).select('.cell');\n if (this.animations) {\n node\n .transition()\n .duration(750)\n .attr('opacity', 1)\n .attr('x', this.x)\n .attr('y', this.y)\n .attr('width', this.width)\n .attr('height', this.height);\n }\n else {\n node.attr('opacity', 1).attr('x', this.x).attr('y', this.y).attr('width', this.width).attr('height', this.height);\n }\n }\n onClick() {\n this.select.emit(this.data);\n }\n getGradientStops() {\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: 0.3\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n}\nTreeMapCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapCellComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nTreeMapCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: TreeMapCellComponent, selector: \"g[ngx-charts-tree-map-cell]\", inputs: { data: \"data\", fill: \"fill\", x: \"x\", y: \"y\", width: \"width\", height: \"height\", label: \"label\", value: \"value\", valueFormatting: \"valueFormatting\", labelFormatting: \"labelFormatting\", gradient: \"gradient\", animations: \"animations\" }, outputs: { select: \"select\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n = 70 && height >= 35\"\n [attr.x]=\"x\"\n [attr.y]=\"y\"\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n class=\"treemap-label\"\n [style.pointer-events]=\"'none'\"\n >\n \n \n \n \n \n \n {{ formattedValue }}\n \n \n \n \n `, isInline: true, components: [{ type: SvgLinearGradientComponent, selector: \"g[ngx-charts-svg-linear-gradient]\", inputs: [\"orientation\", \"name\", \"stops\"] }, { type: CountUpDirective, selector: \"[ngx-charts-count-up]\", inputs: [\"countDuration\", \"countPrefix\", \"countSuffix\", \"valueFormatting\", \"countDecimals\", \"countTo\", \"countFrom\"], outputs: [\"countChange\", \"countFinish\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapCellComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-tree-map-cell]',\n template: `\n \n \n \n \n \n = 70 && height >= 35\"\n [attr.x]=\"x\"\n [attr.y]=\"y\"\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n class=\"treemap-label\"\n [style.pointer-events]=\"'none'\"\n >\n \n \n \n \n \n \n {{ formattedValue }}\n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { data: [{\n type: Input\n }], fill: [{\n type: Input\n }], x: [{\n type: Input\n }], y: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], label: [{\n type: Input\n }], value: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], gradient: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }] } });\n\nclass TreeMapCellSeriesComponent {\n constructor() {\n this.gradient = false;\n this.tooltipDisabled = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.styleTypes = StyleTypes;\n this.placementTypes = PlacementTypes;\n }\n ngOnChanges(changes) {\n this.cells = this.getCells();\n }\n getCells() {\n return this.data.children\n .filter(d => {\n return d.depth === 1;\n })\n .map((d, index) => {\n const label = d.id;\n return {\n data: d.data,\n x: d.x0,\n y: d.y0,\n width: d.x1 - d.x0,\n height: d.y1 - d.y0,\n fill: this.colors.getColor(label),\n label,\n value: d.value\n };\n });\n }\n getTooltipText({ label, value }) {\n return `\n ${escapeLabel(label)}\n ${value.toLocaleString()}\n `;\n }\n onClick(data) {\n this.select.emit(data);\n }\n trackBy(index, item) {\n return item.label;\n }\n}\nTreeMapCellSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapCellSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nTreeMapCellSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: TreeMapCellSeriesComponent, selector: \"g[ngx-charts-tree-map-cell-series]\", inputs: { data: \"data\", dims: \"dims\", colors: \"colors\", valueFormatting: \"valueFormatting\", labelFormatting: \"labelFormatting\", gradient: \"gradient\", tooltipDisabled: \"tooltipDisabled\", tooltipTemplate: \"tooltipTemplate\", animations: \"animations\" }, outputs: { select: \"select\" }, usesOnChanges: true, ngImport: i0, template: `\n \n `, isInline: true, components: [{ type: TreeMapCellComponent, selector: \"g[ngx-charts-tree-map-cell]\", inputs: [\"data\", \"fill\", \"x\", \"y\", \"width\", \"height\", \"label\", \"value\", \"valueFormatting\", \"labelFormatting\", \"gradient\", \"animations\"], outputs: [\"select\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapCellSeriesComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-tree-map-cell-series]',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { data: [{\n type: Input\n }], dims: [{\n type: Input\n }], colors: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], gradient: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }] } });\n\nclass TreeMapComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.tooltipDisabled = false;\n this.gradient = false;\n this.select = new EventEmitter();\n this.margin = [10, 10, 10, 10];\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n this.domain = this.getDomain();\n this.treemap = treemap().size([this.dims.width, this.dims.height]);\n const rootNode = {\n name: 'root',\n value: 0,\n isRoot: true\n };\n const root = stratify()\n .id(d => {\n let label = d.name;\n if (label.constructor.name === 'Date') {\n label = label.toLocaleDateString();\n }\n else {\n label = label.toLocaleString();\n }\n return label;\n })\n .parentId(d => (d.isRoot ? null : 'root'))([rootNode, ...this.results])\n .sum(d => d.value);\n this.data = this.treemap(root);\n this.setColors();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getDomain() {\n return this.results.map(d => d.name);\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n}\nTreeMapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nTreeMapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: TreeMapComponent, selector: \"ngx-charts-tree-map\", inputs: { results: \"results\", tooltipDisabled: \"tooltipDisabled\", valueFormatting: \"valueFormatting\", labelFormatting: \"labelFormatting\", gradient: \"gradient\" }, outputs: { select: \"select\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n `, isInline: true, styles: [\".tree-map .treemap-val{font-size:1.3em;padding-top:5px;display:inline-block}.tree-map .treemap-label p{display:table-cell;text-align:center;line-height:1.2em;vertical-align:middle}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: TreeMapCellSeriesComponent, selector: \"g[ngx-charts-tree-map-cell-series]\", inputs: [\"data\", \"dims\", \"colors\", \"valueFormatting\", \"labelFormatting\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"animations\"], outputs: [\"select\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-tree-map', template: `\n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".tree-map .treemap-val{font-size:1.3em;padding-top:5px;display:inline-block}.tree-map .treemap-label p{display:table-cell;text-align:center;line-height:1.2em;vertical-align:middle}\\n\"] }]\n }], propDecorators: { results: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], labelFormatting: [{\n type: Input\n }], gradient: [{\n type: Input\n }], select: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }] } });\n\nclass TreeMapModule {\n}\nTreeMapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nTreeMapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapModule, declarations: [TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent], imports: [ChartCommonModule], exports: [TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent] });\nTreeMapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapModule, imports: [[ChartCommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: TreeMapModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule],\n declarations: [TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent],\n exports: [TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent]\n }]\n }] });\n\nvar ElementType;\n(function (ElementType) {\n ElementType[\"Value\"] = \"value\";\n ElementType[\"Units\"] = \"units\";\n})(ElementType || (ElementType = {}));\nclass LinearGaugeComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.min = 0;\n this.max = 100;\n this.value = 0;\n this.margin = [10, 20, 10, 20];\n this.valueResizeScale = 1;\n this.unitsResizeScale = 1;\n this.valueTextTransform = '';\n this.valueTranslate = '';\n this.unitsTextTransform = '';\n this.unitsTranslate = '';\n this.barOrientation = BarOrientation;\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n setTimeout(() => {\n this.scaleText(ElementType.Value);\n this.scaleText(ElementType.Units);\n });\n }\n update() {\n super.update();\n this.hasPreviousValue = this.previousValue !== undefined;\n this.max = Math.max(this.max, this.value);\n this.min = Math.min(this.min, this.value);\n if (this.hasPreviousValue) {\n this.max = Math.max(this.max, this.previousValue);\n this.min = Math.min(this.min, this.previousValue);\n }\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n this.valueDomain = this.getValueDomain();\n this.valueScale = this.getValueScale();\n this.displayValue = this.getDisplayValue();\n this.setColors();\n const xOffset = this.margin[3] + this.dims.width / 2;\n const yOffset = this.margin[0] + this.dims.height / 2;\n this.transform = `translate(${xOffset}, ${yOffset})`;\n this.transformLine = `translate(${this.margin[3] + this.valueScale(this.previousValue)}, ${yOffset})`;\n this.valueTranslate = `translate(0, -15)`;\n this.unitsTranslate = `translate(0, 15)`;\n if (isPlatformServer(this.platformId)) {\n this.scaleTextSSR('value');\n this.scaleTextSSR('units');\n }\n else {\n setTimeout(() => this.scaleText(ElementType.Value), 50);\n setTimeout(() => this.scaleText(ElementType.Units), 50);\n }\n }\n getValueDomain() {\n return [this.min, this.max];\n }\n getValueScale() {\n return scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n }\n getDisplayValue() {\n if (this.valueFormatting) {\n return this.valueFormatting(this.value);\n }\n return this.value.toLocaleString();\n }\n scaleText(element, repeat = true) {\n let el;\n let resizeScale;\n if (element === ElementType.Value) {\n el = this.valueTextEl;\n resizeScale = this.valueResizeScale;\n }\n else {\n el = this.unitsTextEl;\n resizeScale = this.unitsResizeScale;\n }\n const { width, height } = el.nativeElement.getBoundingClientRect();\n if (width === 0 || height === 0)\n return;\n const oldScale = resizeScale;\n const availableWidth = this.dims.width;\n const availableHeight = Math.max(this.dims.height / 2 - 15, 0);\n const resizeScaleWidth = Math.floor((availableWidth / (width / resizeScale)) * 100) / 100;\n const resizeScaleHeight = Math.floor((availableHeight / (height / resizeScale)) * 100) / 100;\n resizeScale = Math.min(resizeScaleHeight, resizeScaleWidth);\n if (resizeScale !== oldScale) {\n if (element === ElementType.Value) {\n this.valueResizeScale = resizeScale;\n this.valueTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n }\n else {\n this.unitsResizeScale = resizeScale;\n this.unitsTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n }\n this.cd.markForCheck();\n if (repeat && isPlatformBrowser(this.platformId)) {\n setTimeout(() => {\n this.scaleText(element, false);\n }, 50);\n }\n }\n }\n scaleTextSSR(element) {\n let resizeScale = 1;\n const value = element === 'value' ? this.displayValue : this.units;\n const width = calculateTextWidth(VERDANA_FONT_WIDTHS_16_PX, value, 10);\n const height = 25;\n const availableWidth = this.dims.width;\n const availableHeight = Math.max(this.dims.height / 2 - 15, 0);\n const resizeScaleWidth = Math.floor((availableWidth / (width / resizeScale)) * 100) / 100;\n const resizeScaleHeight = Math.floor((availableHeight / (height / resizeScale)) * 100) / 100;\n resizeScale = Math.min(resizeScaleHeight, resizeScaleWidth);\n if (element === 'value') {\n this.valueResizeScale = resizeScale;\n this.valueTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n }\n else {\n this.unitsResizeScale = resizeScale;\n this.unitsTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n }\n this.cd.markForCheck();\n }\n onClick() {\n this.select.emit({\n name: 'Value',\n value: this.value\n });\n }\n setColors() {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, [this.value], this.customColors);\n }\n}\nLinearGaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LinearGaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nLinearGaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: LinearGaugeComponent, selector: \"ngx-charts-linear-gauge\", inputs: { min: \"min\", max: \"max\", value: \"value\", units: \"units\", previousValue: \"previousValue\", valueFormatting: \"valueFormatting\" }, viewQueries: [{ propertyName: \"valueTextEl\", first: true, predicate: [\"valueTextEl\"], descendants: true }, { propertyName: \"unitsTextEl\", first: true, predicate: [\"unitsTextEl\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n\n \n\n \n\n \n \n \n {{ displayValue }}\n \n \n\n \n \n {{ units }}\n \n \n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".linear-gauge{cursor:pointer}.linear-gauge .background-bar path{fill:#0000000d}.linear-gauge .units{fill:#666}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: BarComponent, selector: \"g[ngx-charts-bar]\", inputs: [\"fill\", \"data\", \"width\", \"height\", \"x\", \"y\", \"orientation\", \"roundEdges\", \"gradient\", \"offset\", \"isActive\", \"stops\", \"animations\", \"ariaLabel\", \"noBarWhenZero\"], outputs: [\"select\", \"activate\", \"deactivate\"] }], directives: [{ type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: LinearGaugeComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-linear-gauge', template: `\n \n \n \n \n\n \n\n \n\n \n \n \n {{ displayValue }}\n \n \n\n \n \n {{ units }}\n \n \n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".linear-gauge{cursor:pointer}.linear-gauge .background-bar path{fill:#0000000d}.linear-gauge .units{fill:#666}\\n\"] }]\n }], propDecorators: { min: [{\n type: Input\n }], max: [{\n type: Input\n }], value: [{\n type: Input\n }], units: [{\n type: Input\n }], previousValue: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], valueTextEl: [{\n type: ViewChild,\n args: ['valueTextEl']\n }], unitsTextEl: [{\n type: ViewChild,\n args: ['unitsTextEl']\n }] } });\n\nclass GaugeArcComponent {\n constructor() {\n this.isActive = false;\n this.tooltipDisabled = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n }\n tooltipText(arc) {\n const label = formatLabel(arc.data.name);\n let val;\n if (this.valueFormatting) {\n val = this.valueFormatting(arc.data.value);\n }\n else {\n val = formatLabel(arc.data.value);\n }\n return `\n ${escapeLabel(label)}\n ${val}\n `;\n }\n}\nGaugeArcComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeArcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nGaugeArcComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: GaugeArcComponent, selector: \"g[ngx-charts-gauge-arc]\", inputs: { backgroundArc: \"backgroundArc\", valueArc: \"valueArc\", cornerRadius: \"cornerRadius\", colors: \"colors\", isActive: \"isActive\", tooltipDisabled: \"tooltipDisabled\", valueFormatting: \"valueFormatting\", tooltipTemplate: \"tooltipTemplate\", animations: \"animations\" }, outputs: { select: \"select\", activate: \"activate\", deactivate: \"deactivate\" }, ngImport: i0, template: `\n \n \n `, isInline: true, components: [{ type: PieArcComponent, selector: \"g[ngx-charts-pie-arc]\", inputs: [\"fill\", \"startAngle\", \"endAngle\", \"innerRadius\", \"outerRadius\", \"cornerRadius\", \"value\", \"max\", \"data\", \"explodeSlices\", \"gradient\", \"animate\", \"pointerEvents\", \"isActive\"], outputs: [\"select\", \"activate\", \"deactivate\", \"dblclick\"] }], directives: [{ type: TooltipDirective, selector: \"[ngx-tooltip]\", inputs: [\"tooltipCssClass\", \"tooltipTitle\", \"tooltipAppendToBody\", \"tooltipSpacing\", \"tooltipDisabled\", \"tooltipShowCaret\", \"tooltipPlacement\", \"tooltipAlignment\", \"tooltipType\", \"tooltipCloseOnClickOutside\", \"tooltipCloseOnMouseLeave\", \"tooltipHideTimeout\", \"tooltipShowTimeout\", \"tooltipTemplate\", \"tooltipShowEvent\", \"tooltipContext\", \"tooltipImmediateExit\"], outputs: [\"show\", \"hide\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeArcComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-gauge-arc]',\n template: `\n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { backgroundArc: [{\n type: Input\n }], valueArc: [{\n type: Input\n }], cornerRadius: [{\n type: Input\n }], colors: [{\n type: Input\n }], isActive: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], tooltipTemplate: [{\n type: Input\n }], animations: [{\n type: Input\n }], select: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }] } });\n\nclass GaugeAxisComponent {\n constructor() {\n this.rotate = '';\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.rotationAngle = -90 + this.startAngle;\n this.rotate = `rotate(${this.rotationAngle})`;\n this.ticks = this.getTicks();\n }\n getTicks() {\n const bigTickSegment = this.angleSpan / this.bigSegments;\n const smallTickSegment = bigTickSegment / this.smallSegments;\n const tickLength = 20;\n const ticks = {\n big: [],\n small: []\n };\n const startDistance = this.radius + 10;\n const textDist = startDistance + tickLength + 10;\n for (let i = 0; i <= this.bigSegments; i++) {\n const angleDeg = i * bigTickSegment;\n const angle = (angleDeg * Math.PI) / 180;\n const textAnchor = this.getTextAnchor(angleDeg);\n let skip = false;\n if (i === 0 && this.angleSpan === 360) {\n skip = true;\n }\n if (!skip) {\n let text = Number.parseFloat(this.valueScale.invert(angleDeg).toString()).toLocaleString();\n if (this.tickFormatting) {\n text = this.tickFormatting(text);\n }\n ticks.big.push({\n line: this.getTickPath(startDistance, tickLength, angle),\n textAnchor,\n text,\n textTransform: `\n translate(${textDist * Math.cos(angle)}, ${textDist * Math.sin(angle)}) rotate(${-this.rotationAngle})\n `\n });\n }\n if (i === this.bigSegments) {\n continue;\n }\n for (let j = 1; j <= this.smallSegments; j++) {\n const smallAngleDeg = angleDeg + j * smallTickSegment;\n const smallAngle = (smallAngleDeg * Math.PI) / 180;\n ticks.small.push({\n line: this.getTickPath(startDistance, tickLength / 2, smallAngle)\n });\n }\n }\n return ticks;\n }\n getTextAnchor(angle) {\n // [0, 45] = 'middle';\n // [46, 135] = 'start';\n // [136, 225] = 'middle';\n // [226, 315] = 'end';\n angle = (this.startAngle + angle) % 360;\n let textAnchor = TextAnchor.Middle;\n if (angle > 45 && angle <= 135) {\n textAnchor = TextAnchor.Start;\n }\n else if (angle > 225 && angle <= 315) {\n textAnchor = TextAnchor.End;\n }\n return textAnchor;\n }\n getTickPath(startDistance, tickLength, angle) {\n const y1 = startDistance * Math.sin(angle);\n const y2 = (startDistance + tickLength) * Math.sin(angle);\n const x1 = startDistance * Math.cos(angle);\n const x2 = (startDistance + tickLength) * Math.cos(angle);\n const points = [\n { x: x1, y: y1 },\n { x: x2, y: y2 }\n ];\n const lineGenerator = line()\n .x(d => d.x)\n .y(d => d.y);\n return lineGenerator(points);\n }\n}\nGaugeAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nGaugeAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: GaugeAxisComponent, selector: \"g[ngx-charts-gauge-axis]\", inputs: { bigSegments: \"bigSegments\", smallSegments: \"smallSegments\", min: \"min\", max: \"max\", angleSpan: \"angleSpan\", startAngle: \"startAngle\", radius: \"radius\", valueScale: \"valueScale\", tickFormatting: \"tickFormatting\" }, usesOnChanges: true, ngImport: i0, template: `\n \n \n \n \n \n \n {{ tick.text }}\n \n \n \n \n \n \n `, isInline: true, directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeAxisComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'g[ngx-charts-gauge-axis]',\n template: `\n \n \n \n \n \n \n {{ tick.text }}\n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], propDecorators: { bigSegments: [{\n type: Input\n }], smallSegments: [{\n type: Input\n }], min: [{\n type: Input\n }], max: [{\n type: Input\n }], angleSpan: [{\n type: Input\n }], startAngle: [{\n type: Input\n }], radius: [{\n type: Input\n }], valueScale: [{\n type: Input\n }], tickFormatting: [{\n type: Input\n }] } });\n\nclass GaugeComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.min = 0;\n this.max = 100;\n this.bigSegments = 10;\n this.smallSegments = 5;\n this.showAxis = true;\n this.startAngle = -120;\n this.angleSpan = 240;\n this.activeEntries = [];\n this.tooltipDisabled = false;\n this.showText = true;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.resizeScale = 1;\n this.rotation = '';\n this.textTransform = 'scale(1, 1)';\n this.cornerRadius = 10;\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n setTimeout(() => this.scaleText());\n }\n update() {\n super.update();\n if (!this.showAxis) {\n if (!this.margin) {\n this.margin = [10, 20, 10, 20];\n }\n }\n else {\n if (!this.margin) {\n this.margin = [60, 100, 60, 100];\n }\n }\n // make the starting angle positive\n if (this.startAngle < 0) {\n this.startAngle = (this.startAngle % 360) + 360;\n }\n this.angleSpan = Math.min(this.angleSpan, 360);\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showLegend: this.legend,\n legendPosition: this.legendPosition\n });\n this.domain = this.getDomain();\n this.valueDomain = this.getValueDomain();\n this.valueScale = this.getValueScale();\n this.displayValue = this.getDisplayValue();\n this.outerRadius = Math.min(this.dims.width, this.dims.height) / 2;\n this.arcs = this.getArcs();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n const xOffset = this.margin[3] + this.dims.width / 2;\n const yOffset = this.margin[0] + this.dims.height / 2;\n this.transform = `translate(${xOffset}, ${yOffset})`;\n this.rotation = `rotate(${this.startAngle})`;\n setTimeout(() => this.scaleText(), 50);\n }\n getArcs() {\n const arcs = [];\n const availableRadius = this.outerRadius * 0.7;\n const radiusPerArc = Math.min(availableRadius / this.results.length, 10);\n const arcWidth = radiusPerArc * 0.7;\n this.textRadius = this.outerRadius - this.results.length * radiusPerArc;\n this.cornerRadius = Math.floor(arcWidth / 2);\n let i = 0;\n for (const d of this.results) {\n const outerRadius = this.outerRadius - i * radiusPerArc;\n const innerRadius = outerRadius - arcWidth;\n const backgroundArc = {\n endAngle: (this.angleSpan * Math.PI) / 180,\n innerRadius,\n outerRadius,\n data: {\n value: this.max,\n name: d.name\n }\n };\n const valueArc = {\n endAngle: (Math.min(this.valueScale(d.value), this.angleSpan) * Math.PI) / 180,\n innerRadius,\n outerRadius,\n data: {\n value: d.value,\n name: d.name\n }\n };\n const arc = {\n backgroundArc,\n valueArc\n };\n arcs.push(arc);\n i++;\n }\n return arcs;\n }\n getDomain() {\n return this.results.map(d => d.name);\n }\n getValueDomain() {\n const values = this.results.map(d => d.value);\n const dataMin = Math.min(...values);\n const dataMax = Math.max(...values);\n if (this.min !== undefined) {\n this.min = Math.min(this.min, dataMin);\n }\n else {\n this.min = dataMin;\n }\n if (this.max !== undefined) {\n this.max = Math.max(this.max, dataMax);\n }\n else {\n this.max = dataMax;\n }\n return [this.min, this.max];\n }\n getValueScale() {\n return scaleLinear().range([0, this.angleSpan]).nice().domain(this.valueDomain);\n }\n getDisplayValue() {\n const value = this.results.map(d => d.value).reduce((a, b) => a + b, 0);\n if (this.textValue && 0 !== this.textValue.length) {\n return this.textValue.toLocaleString();\n }\n if (this.valueFormatting) {\n return this.valueFormatting(value);\n }\n return value.toLocaleString();\n }\n scaleText(repeat = true) {\n if (!this.showText) {\n return;\n }\n const { width } = this.textEl.nativeElement.getBoundingClientRect();\n const oldScale = this.resizeScale;\n if (width === 0) {\n this.resizeScale = 1;\n }\n else {\n const availableSpace = this.textRadius;\n this.resizeScale = Math.floor((availableSpace / (width / this.resizeScale)) * 100) / 100;\n }\n if (this.resizeScale !== oldScale) {\n this.textTransform = `scale(${this.resizeScale}, ${this.resizeScale})`;\n this.cd.markForCheck();\n if (repeat) {\n setTimeout(() => this.scaleText(false), 50);\n }\n }\n }\n onClick(data) {\n this.select.emit(data);\n }\n getLegendOptions() {\n return {\n scaleType: ScaleType.Ordinal,\n colors: this.colors,\n domain: this.domain,\n title: this.legendTitle,\n position: this.legendPosition\n };\n }\n setColors() {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n isActive(entry) {\n if (!this.activeEntries)\n return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name && entry.series === d.series;\n });\n return item !== undefined;\n }\n trackBy(index, item) {\n return item.valueArc.data.name;\n }\n}\nGaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nGaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.1.0\", type: GaugeComponent, selector: \"ngx-charts-gauge\", inputs: { legend: \"legend\", legendTitle: \"legendTitle\", legendPosition: \"legendPosition\", min: \"min\", max: \"max\", textValue: \"textValue\", units: \"units\", bigSegments: \"bigSegments\", smallSegments: \"smallSegments\", results: \"results\", showAxis: \"showAxis\", startAngle: \"startAngle\", angleSpan: \"angleSpan\", activeEntries: \"activeEntries\", axisTickFormatting: \"axisTickFormatting\", tooltipDisabled: \"tooltipDisabled\", valueFormatting: \"valueFormatting\", showText: \"showText\", margin: \"margin\" }, outputs: { activate: \"activate\", deactivate: \"deactivate\" }, queries: [{ propertyName: \"tooltipTemplate\", first: true, predicate: [\"tooltipTemplate\"], descendants: true }], viewQueries: [{ propertyName: \"textEl\", first: true, predicate: [\"textEl\"], descendants: true }], usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n \n\n \n\n \n {{ displayValue }}\n {{ units }}\n \n \n \n `, isInline: true, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".gauge .background-arc path{fill:#0000000d}.gauge .gauge-tick path{stroke:#666}.gauge .gauge-tick text{font-size:12px;fill:#666;font-weight:700}.gauge .gauge-tick-large path{stroke-width:2px}.gauge .gauge-tick-small path{stroke-width:1px}\\n\"], components: [{ type: ChartComponent, selector: \"ngx-charts-chart\", inputs: [\"view\", \"showLegend\", \"legendOptions\", \"legendType\", \"activeEntries\", \"animations\"], outputs: [\"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\"] }, { type: GaugeArcComponent, selector: \"g[ngx-charts-gauge-arc]\", inputs: [\"backgroundArc\", \"valueArc\", \"cornerRadius\", \"colors\", \"isActive\", \"tooltipDisabled\", \"valueFormatting\", \"tooltipTemplate\", \"animations\"], outputs: [\"select\", \"activate\", \"deactivate\"] }, { type: GaugeAxisComponent, selector: \"g[ngx-charts-gauge-axis]\", inputs: [\"bigSegments\", \"smallSegments\", \"min\", \"max\", \"angleSpan\", \"startAngle\", \"radius\", \"valueScale\", \"tickFormatting\"] }], directives: [{ type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ngx-charts-gauge', template: `\n \n \n \n \n \n\n \n\n \n {{ displayValue }}\n {{ units }}\n \n \n \n `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".ngx-charts-outer{-webkit-animation:chartFadeIn linear .6s;animation:chartFadeIn linear .6s}@-webkit-keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:#0000000d}\\n\", \".gauge .background-arc path{fill:#0000000d}.gauge .gauge-tick path{stroke:#666}.gauge .gauge-tick text{font-size:12px;fill:#666;font-weight:700}.gauge .gauge-tick-large path{stroke-width:2px}.gauge .gauge-tick-small path{stroke-width:1px}\\n\"] }]\n }], propDecorators: { legend: [{\n type: Input\n }], legendTitle: [{\n type: Input\n }], legendPosition: [{\n type: Input\n }], min: [{\n type: Input\n }], max: [{\n type: Input\n }], textValue: [{\n type: Input\n }], units: [{\n type: Input\n }], bigSegments: [{\n type: Input\n }], smallSegments: [{\n type: Input\n }], results: [{\n type: Input\n }], showAxis: [{\n type: Input\n }], startAngle: [{\n type: Input\n }], angleSpan: [{\n type: Input\n }], activeEntries: [{\n type: Input\n }], axisTickFormatting: [{\n type: Input\n }], tooltipDisabled: [{\n type: Input\n }], valueFormatting: [{\n type: Input\n }], showText: [{\n type: Input\n }], margin: [{\n type: Input\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], tooltipTemplate: [{\n type: ContentChild,\n args: ['tooltipTemplate']\n }], textEl: [{\n type: ViewChild,\n args: ['textEl']\n }] } });\n\nclass GaugeModule {\n}\nGaugeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nGaugeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeModule, declarations: [LinearGaugeComponent, GaugeComponent, GaugeArcComponent, GaugeAxisComponent], imports: [ChartCommonModule, PieChartModule, BarChartModule], exports: [LinearGaugeComponent, GaugeComponent, GaugeArcComponent, GaugeAxisComponent] });\nGaugeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeModule, imports: [[ChartCommonModule, PieChartModule, BarChartModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: GaugeModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ChartCommonModule, PieChartModule, BarChartModule],\n declarations: [LinearGaugeComponent, GaugeComponent, GaugeArcComponent, GaugeAxisComponent],\n exports: [LinearGaugeComponent, GaugeComponent, GaugeArcComponent, GaugeAxisComponent]\n }]\n }] });\n\n// The export is needed here to generate a valid polyfills.metadata.json file\nfunction ngxChartsPolyfills() {\n // IE11 fix\n // Ref: https://github.com/swimlane/ngx-charts/issues/386\n if (typeof SVGElement !== 'undefined' && typeof SVGElement.prototype.contains === 'undefined') {\n SVGElement.prototype.contains = HTMLDivElement.prototype.contains;\n }\n}\n\nclass NgxChartsModule {\n constructor() {\n ngxChartsPolyfills();\n }\n}\nNgxChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NgxChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgxChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NgxChartsModule, exports: [ChartCommonModule,\n AreaChartModule,\n BarChartModule,\n BoxChartModule,\n BubbleChartModule,\n HeatMapModule,\n LineChartModule,\n PolarChartModule,\n NumberCardModule,\n PieChartModule,\n TreeMapModule,\n GaugeModule] });\nNgxChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NgxChartsModule, imports: [ChartCommonModule,\n AreaChartModule,\n BarChartModule,\n BoxChartModule,\n BubbleChartModule,\n HeatMapModule,\n LineChartModule,\n PolarChartModule,\n NumberCardModule,\n PieChartModule,\n TreeMapModule,\n GaugeModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.1.0\", ngImport: i0, type: NgxChartsModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [\n ChartCommonModule,\n AreaChartModule,\n BarChartModule,\n BoxChartModule,\n BubbleChartModule,\n HeatMapModule,\n LineChartModule,\n PolarChartModule,\n NumberCardModule,\n PieChartModule,\n TreeMapModule,\n GaugeModule\n ]\n }]\n }], ctorParameters: function () { return []; } });\n\nfunction tickFormat(fieldType, groupByType) {\n return function (label) {\n if (label === 'No Value' || label === 'Other') {\n return label;\n }\n if (fieldType === 'date' && groupByType === 'groupBy') {\n const formatter = timeFormat('MM/DD/YYYY');\n return formatter(label);\n }\n return label.toString();\n };\n}\n\n/* eslint-disable @typescript-eslint/no-empty-interface */\n\n/*\n * Public API Surface of ngx-charts\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AdvancedLegendComponent, AdvancedPieChartComponent, AreaChartComponent, AreaChartModule, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaComponent, AreaSeriesComponent, AxesModule, AxisLabelComponent, BarChartModule, BarChartType, BarComponent, BarHorizontal2DComponent, BarHorizontalComponent, BarHorizontalNormalizedComponent, BarHorizontalStackedComponent, BarLabelComponent, BarOrientation, BarVertical2DComponent, BarVerticalComponent, BarVerticalNormalizedComponent, BarVerticalStackedComponent, BaseChartComponent, BoxChartComponent, BoxChartModule, BoxComponent, BoxSeriesComponent, BubbleChartComponent, BubbleChartModule, BubbleSeriesComponent, CardComponent, CardSeriesComponent, ChartCommonModule, ChartComponent, CircleComponent, CircleSeriesComponent, ColorHelper, CountUpDirective, D0Types, GaugeArcComponent, GaugeAxisComponent, GaugeComponent, GaugeModule, GridPanelComponent, GridPanelSeriesComponent, HeatCellSeriesComponent, HeatMapCellComponent, HeatMapComponent, HeatMapModule, LegendComponent, LegendEntryComponent, LegendPosition, LegendType, LineChartComponent, LineChartModule, LineComponent, LineSeriesComponent, LinearGaugeComponent, NgxChartsModule, NumberCardComponent, NumberCardModule, Orientation, PieArcComponent, PieChartComponent, PieChartModule, PieGridComponent, PieGridSeriesComponent, PieLabelComponent, PieSeriesComponent, PlacementTypes, PolarChartComponent, PolarChartModule, PolarSeriesComponent, ScaleLegendComponent, ScaleType, SeriesHorizontal, SeriesType, SeriesVerticalComponent, ShowTypes, StyleTypes, SvgLinearGradientComponent, SvgRadialGradientComponent, TextAnchor, Timeline, TooltipArea, TooltipContentComponent, TooltipDirective, TooltipModule, TooltipService, TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent, TreeMapModule, VisibilityObserver, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent, calculateViewDimensions, colorSets, count, decimalChecker, escapeLabel, formatLabel, getDomain, getScale, getScaleType, getUniqueXDomainValues, getXDomainArray, gridLayout, gridSize, hexToRgb, id, invertColor, reduceTicks, shadeRGBColor, sortByDomain, sortByTime, sortLinear, throttle, throttleable, tickFormat, trimLabel };\n"],"x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165]}