17 lines
1.2 MiB
Executable File
17 lines
1.2 MiB
Executable File
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var i in e)__defProp(t,i,{get:e[i],enumerable:!0})},__copyProps=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of __getOwnPropNames(e))!__hasOwnProp.call(t,n)&&n!==i&&__defProp(t,n,{get:()=>e[n],enumerable:!(s=__getOwnPropDesc(e,n))||s.enumerable});return t},__reExport=(t,e,i)=>(__copyProps(t,e,"default"),i&&__copyProps(i,e,"default")),__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),__decorateClass=(t,e,i,s)=>{for(var n=s>1?void 0:s?__getOwnPropDesc(e,i):e,r=t.length-1,a;r>=0;r--)(a=t[r])&&(n=(s?a(e,i,n):a(n))||n);return s&&n&&__defProp(e,i,n),n},main_exports={};__export(main_exports,{AG_CHARTS_LOCALE_EN_US:()=>AG_CHARTS_LOCALE_EN_US,AgCharts:()=>AgCharts,AgChartsCommunityModule:()=>AgChartsCommunityModule,AgTooltipAnchorToType:()=>AgTooltipAnchorToType,AgTooltipPlacementType:()=>AgTooltipPlacementType,AllCartesianAxesModule:()=>AllCartesianAxesModule,AllCartesianModule:()=>AllCartesianModule,AllCartesianSeriesModule:()=>AllCartesianSeriesModule,AllCommunityModule:()=>AllCommunityModule,AllPolarModule:()=>AllPolarModule,AreaSeriesModule:()=>AreaSeriesModule,BarSeriesModule:()=>BarSeriesModule,BubbleSeriesModule:()=>BubbleSeriesModule,CartesianChartModule:()=>CartesianChartModule,CategoryAxisModule:()=>CategoryAxisModule,DonutSeriesModule:()=>DonutSeriesModule,GroupedCategoryAxisModule:()=>GroupedCategoryAxisModule,HistogramSeriesModule:()=>HistogramSeriesModule,LegendModule:()=>LegendModule,LineSeriesModule:()=>LineSeriesModule,LocaleModule:()=>LocaleModule,LogAxisModule:()=>LogAxisModule,ModuleRegistry:()=>import_ag_charts_core286.ModuleRegistry,NumberAxisModule:()=>NumberAxisModule,PieSeriesModule:()=>PieSeriesModule,PolarChartModule:()=>PolarChartModule,ScatterSeriesModule:()=>ScatterSeriesModule,SparklinePresetModule:()=>SparklinePresetModule,TimeAxisModule:()=>TimeAxisModule,UnitTimeAxisModule:()=>UnitTimeAxisModule,VERSION:()=>VERSION,_ModuleSupport:()=>module_support_exports,_Scene:()=>integrated_charts_scene_exports,_Theme:()=>integrated_charts_theme_exports,_Util:()=>integrated_charts_util_exports,_Widget:()=>exports_exports,time:()=>time}),module.exports=__toCommonJS(main_exports);var AG_CHARTS_LOCALE_EN_US={ariaInitSeriesArea:"interactive chart",ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceStandaloneChart:"chart, ${caption}",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAddHorizontalLine:"Add Horizontal Line",ariaLabelAnnotationsToolbar:"Annotations",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColor:"Color",ariaLabelColorPicker:"Color picker",ariaLabelColorPickerAlpha:"Transparency",ariaLabelColorPickerHue:"Hue",ariaLabelColorPickerMultiColor:"Multi Color",ariaLabelColorPickerPalette:"Palette",ariaLabelFinancialCharts:"Financial Charts",ariaLabelGaugeTarget:"Target",ariaLabelGaugeValue:"Value",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelScrollbarHorizontal:"X-axis scrollbar",ariaLabelScrollbarVertical:"Y-axis scrollbar",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaRoleDescription2DSlider:"2D slider",ariaValueColorPalette:"s ${s}[percent0to2dp], v ${v}[percent0to2dp]",ariaValueColorPaletteFirstV:"v ${v}[percent0to2dp], s ${s}[percent0to2dp]",ariaValuePanRange:"${min}[percent0to2dp] to ${max}[percent0to2dp]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",overlayUnsupportedBrowser:"Incompatible browser version. Please upgrade your browser.",seriesHistogramTooltipFrequency:"Frequency",seriesHistogramTooltipSum:"${yName} (sum)",seriesHistogramTooltipCount:"${yName} (count)",seriesHistogramTooltipMean:"${yName} (mean)",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsFibonacciRetracement:"Fib Retracement",toolbarAnnotationsFibonacciRetracementTrendBased:"Fib Trend Based",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsFibonacciAnnotations:"Fibonacci",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Arrows",toolbarAnnotationsMeasurerAnnotations:"Measurers",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarAnnotationsDateRange:"Date Range",toolbarAnnotationsPriceRange:"Price Range",toolbarAnnotationsDatePriceRange:"Date and Price",toolbarAnnotationsQuickDatePriceRange:"Measure",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",contextMenuResetZoom:"Reset zoom",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderFibonacciRange:"Fib Retracement",dialogHeaderDateRange:"Date Range",dialogHeaderPriceRange:"Price Range",dialogHeaderDatePriceRange:"Date and Price",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputFillColorPicker:"Fill",dialogInputFillColorPickerAltText:"Fill Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputExtendAbove:"Extend above",dialogInputExtendBelow:"Extend below",dialogInputExtendLeft:"Extend left",dialogInputExtendRight:"Extend right",dialogInputReverse:"Reverse",dialogInputShowFill:"Show Fill",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",dialogInputFibonacciBands:"Bands",dialogInputFibonacciBandsAltText:"Fibonacci Bands",inputTextareaPlaceholder:"Add Text",measurerDateRangeBars:"${value}[number] bars",measurerPriceRangeValue:"${value}[number]",measurerPriceRangePercent:"${value}[percent]",measurerVolume:"Vol ${value}",tooltipPaginationStatus:"${index}[number] of ${count}[number]"},__MINI_CHART_SERIES_OPTIONS=void 0,__VERIFY_MINI_CHART_SERIES_OPTIONS=void 0;__VERIFY_MINI_CHART_SERIES_OPTIONS=__MINI_CHART_SERIES_OPTIONS;var __THEME_OVERRIDES=void 0,__VERIFY_THEME_OVERRIDES=void 0;__VERIFY_THEME_OVERRIDES=__THEME_OVERRIDES;var AgTooltipAnchorToType=(t=>(t.POINTER="pointer",t.NODE="node",t.CHART="chart",t))(AgTooltipAnchorToType||{}),AgTooltipPlacementType=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t.TOP_RIGHT="top-right",t.BOTTOM_RIGHT="bottom-right",t.BOTTOM_LEFT="bottom-left",t.TOP_LEFT="top-left",t.CENTER="center",t))(AgTooltipPlacementType||{}),__THEMEABLE_OPTIONS=void 0,__VERIFY_THEMEABLE_OPTIONS=void 0;__VERIFY_THEMEABLE_OPTIONS=__THEMEABLE_OPTIONS;var __AXIS_LABEL_OPTIONS=void 0,__VERIFY_AXIS_LABEL_OPTIONS=void 0;__VERIFY_AXIS_LABEL_OPTIONS=__AXIS_LABEL_OPTIONS;var import_ag_charts_core=require("ag-charts-core");function createTimeInterval(t,e,i,s){return{unit:t,step:e,epoch:i,utc:s,every(n){return createTimeInterval(this.unit,(this.step??1)*n,this.epoch,this.utc)}}}var cachedInstances={};function getTimeInterval(t,e=1,i,s=!1){import_ag_charts_core.Logger.warnOnce("time import is deprecated, use object notation instead");const n=`${t}:${e}:${i?.getTime()??0}:${s}`;let r=cachedInstances[n];return r==null&&(r=createTimeInterval(t,e,i,s),cachedInstances[n]=r),r}var time={get millisecond(){return getTimeInterval("millisecond")},get second(){return getTimeInterval("second")},get minute(){return getTimeInterval("minute")},get hour(){return getTimeInterval("hour")},get day(){return getTimeInterval("day")},get monday(){return getTimeInterval("day",7,new Date(1970,0,5))},get tuesday(){return getTimeInterval("day",7,new Date(1970,0,6))},get wednesday(){return getTimeInterval("day",7,new Date(1970,0,7))},get thursday(){return getTimeInterval("day",7,new Date(1970,0,1))},get friday(){return getTimeInterval("day",7,new Date(1970,0,2))},get saturday(){return getTimeInterval("day",7,new Date(1970,0,3))},get sunday(){return getTimeInterval("day",7,new Date(1970,0,4))},get month(){return getTimeInterval("month")},get year(){return getTimeInterval("year")},get utcMillisecond(){return getTimeInterval("millisecond",1,void 0,!0)},get utcSecond(){return getTimeInterval("second",1,void 0,!0)},get utcMinute(){return getTimeInterval("minute",1,void 0,!0)},get utcHour(){return getTimeInterval("hour",1,void 0,!0)},get utcDay(){return getTimeInterval("day",1,void 0,!0)},get utcMonth(){return getTimeInterval("month",1,void 0,!0)},get utcYear(){return getTimeInterval("year",1,void 0,!0)}},import_ag_charts_core187=require("ag-charts-core"),import_ag_charts_core153=require("ag-charts-core"),import_ag_charts_core2=require("ag-charts-core"),interpolate=Symbol("interpolate"),isInterpolating=t=>t[interpolate]!=null,_BBox=class ae{constructor(e,i,s,n){this.x=e,this.y=i,this.width=s,this.height=n}static fromObject({x:e,y:i,width:s,height:n}){return new ae(e,i,s,n)}static merge(e){let i=1/0,s=1/0,n=-1/0,r=-1/0;for(const a of e)a.x<i&&(i=a.x),a.y<s&&(s=a.y),end(a.x,a.width)>n&&(n=end(a.x,a.width)),end(a.y,a.height)>r&&(r=end(a.y,a.height));return new ae(i,s,n-i,r-s)}static nearestBox(e,i,s){return(0,import_ag_charts_core2.nearestSquared)(e,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:end(this.x,this.width),bottom:end(this.y,this.height),toJSON(){return{}}}}clone(){const{x:e,y:i,width:s,height:n}=this;return new ae(e,i,s,n)}equals(e){return(0,import_ag_charts_core2.boxesEqual)(this,e)}containsPoint(e,i){return(0,import_ag_charts_core2.boxContains)(this,e,i)}intersection(e){const i=Math.max(this.x,e.x),s=Math.max(this.y,e.y),n=Math.min(end(this.x,this.width),end(e.x,e.width)),r=Math.min(end(this.y,this.height),end(e.y,e.height));if(!(i>n||s>r))return new ae(i,s,n-i,r-s)}collidesBBox(e){return this.x<end(e.x,e.width)&&end(this.x,this.width)>e.x&&this.y<end(e.y,e.height)&&end(this.y,this.height)>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,i){if(this.containsPoint(e,i))return 0;const s=e-(0,import_ag_charts_core2.clamp)(this.x,e,end(this.x,this.width)),n=i-(0,import_ag_charts_core2.clamp)(this.y,i,end(this.y,this.height));return s*s+n*n}shrink(e,i){if(typeof e=="number")this.applyMargin(e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(n,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(e,i){if(typeof e=="number")this.applyMargin(-e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(-n,s)}return this}applyMargin(e,i){switch(i){case"top":this.y+=e;case"bottom":this.height-=e;break;case"left":this.x+=e;case"right":this.width-=e;break;case"vertical":this.y+=e,this.height-=e*2;break;case"horizontal":this.x+=e,this.width-=e*2;break;case void 0:this.x+=e,this.y+=e,this.width-=e*2,this.height-=e*2;break}}translate(e,i){return this.x+=e,this.y+=i,this}[interpolate](e,i){return new ae(this.x*(1-i)+e.x*i,this.y*(1-i)+e.y*i,this.width*(1-i)+e.width*i,this.height*(1-i)+e.height*i)}};_BBox.zero=Object.freeze(new _BBox(0,0,0,0)),_BBox.NaN=Object.freeze(new _BBox(Number.NaN,Number.NaN,Number.NaN,Number.NaN));var BBox=_BBox;function end(t,e){return t===-1/0&&e===1/0?1/0:t+e}var import_ag_charts_core22=require("ag-charts-core"),import_ag_charts_core4=require("ag-charts-core"),import_ag_charts_core3=require("ag-charts-core");function clearContext({context:t,pixelRatio:e,width:i,height:s}){t.save();try{t.resetTransform(),t.clearRect(0,0,Math.ceil(i*e),Math.ceil(s*e))}finally{t.restore()}}function debugContext(t){if(import_ag_charts_core3.Debug.check("canvas")){const e=t.save.bind(t),i=t.restore.bind(t);let s=0;Object.assign(t,{save(){e(),s++},restore(){if(s===0)throw new Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(s!==0)throw new Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}function canvasDimensions(t,e,i){return[Math.floor(t*i),Math.floor(e*i)]}var fallbackCanvas;function getFallbackCanvas(){const t=(0,import_ag_charts_core4.getOffscreenCanvas)();return fallbackCanvas??(fallbackCanvas=new t(1,1)),fallbackCanvas}var HdpiOffscreenCanvas=class{constructor(t){const{width:e,height:i,pixelRatio:s,willReadFrequently:n=!1}=t;this.width=e,this.height=i,this.pixelRatio=s;const[r,a]=canvasDimensions(e,i,s),o=(0,import_ag_charts_core4.getOffscreenCanvas)();this.canvas=new o(r,a),this.context=this.canvas.getContext("2d",{willReadFrequently:n}),this.context.setTransform(s,0,0,s,0,0),debugContext(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.canvas,e,i)}transferToImageBitmap(){return this.canvas.width<1||this.canvas.height<1?getFallbackCanvas().transferToImageBitmap():this.canvas.transferToImageBitmap()}resize(t,e,i){if(!(t>0&&e>0))return;const{canvas:s,context:n}=this;if(t!==this.width||e!==this.height||i!==this.pixelRatio){const[r,a]=canvasDimensions(t,e,i);s.width=r,s.height=a}n.setTransform(i,0,0,i,0,0),this.width=t,this.height=e,this.pixelRatio=i}clear(){clearContext(this)}destroy(){this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0),this.canvas=null,this.context=null,Object.freeze(this)}},import_ag_charts_core5=require("ag-charts-core"),cmp=(t,e)=>Math.sign(t-e);function compareZIndex(t,e){if(typeof t=="number"&&typeof e=="number")return cmp(t,e);const i=typeof t=="number"?[t]:t,s=typeof e=="number"?[e]:e,n=Math.min(i.length,s.length);for(let r=0;r<n;r+=1){const a=cmp(i[r],s[r]);if(a!==0)return a}return cmp(i.length,s.length)}var import_ag_charts_core6=require("ag-charts-core"),PointerEvents=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(PointerEvents||{}),MAX_ERROR_COUNT=5,_Node=class Se{constructor(e){this.serialNumber=Se._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=(0,import_ag_charts_core5.createId)(this),this.name=void 0,this.transitionOut=void 0,this.pointerEvents=0,this._datum=void 0,this._previousDatum=void 0,this.scene=void 0,this._debugDirtyProperties=void 0,this.parentNode=void 0,this.cachedBBox=void 0,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.batchLevel=0,this.batchDirty=!1,this.name=e?.name,this.tag=e?.tag??Number.NaN,this.zIndex=e?.zIndex??0,this.scene=e?.scene,(e?.debugDirty??Se._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(e,i,s){const n=e?.toSVG();if(n==null||!n.elements.length&&!n.defs?.length)return;const r=(0,import_ag_charts_core5.createSvgElement)("svg");if(r.setAttribute("width",String(i)),r.setAttribute("height",String(s)),r.setAttribute("viewBox",`0 0 ${i} ${s}`),r.setAttribute("overflow","visible"),n.defs?.length){const a=(0,import_ag_charts_core5.createSvgElement)("defs");a.append(...n.defs),r.append(a)}return r.append(...n.elements),r.outerHTML}static*extractBBoxes(e,i){for(const s of e)if(!i||s.visible&&!s.transitionOut){const n=s.getBBox();n&&(yield n)}}get datum(){return this._datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this.scene?.layersManager}get imageLoader(){return this.scene?.imageLoader}closestDatum(){for(const{datum:e}of this.traverseUp(!0))if(e!=null)return e}preRender(e,i=1){if(this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.childNodeCounts.complexity=i,this.childNodeCounts.thisComplexity=i,this.batchLevel>0||this.batchDirty)throw new Error("AG Charts - illegal rendering state; batched update in progress");return this.childNodeCounts}isolatedRender(e){e.ctx.save();try{this.render(e)}catch(i){const s=i.errorCount??1;if(s>=MAX_ERROR_COUNT)throw i.errorCount=s,i;import_ag_charts_core5.Logger.warnOnce("Error during rendering",i,i.stack)}finally{e.ctx.restore()}}render(e){const{stats:i}=e;if(this.debugDirtyProperties(),e.debugNodeSearch){const s=this.name??this.id;e.debugNodeSearch.some(n=>typeof n=="string"?n===s:n.test(s))&&(e.debugNodes[this.name??this.id]=this)}i&&(i.nodesRendered++,i.opsPerformed+=this.childNodeCounts.thisComplexity)}setScene(e){this.scene=e}*traverseUp(e){e&&(yield this);let i=this.parentNode;for(;i;)yield i,i=i.parentNode}isRoot(){return!this.parentNode}removeChild(e){throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`)}remove(){this.parentNode?.removeChild(this)}destroy(){this.parentNode&&this.remove()}batchedUpdate(e){this.batchLevel++;try{e()}finally{this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1)}}setProperties(e){this.batchLevel++;try{(0,import_ag_charts_core5.assignIfNotStrictlyEqual)(this,e)}finally{this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1)}return this}setPropertiesWithKeys(e,i){this.batchLevel++;try{(0,import_ag_charts_core5.assignIfNotStrictlyEqual)(this,e,i)}finally{this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1)}return this}containsPoint(e,i){return!1}pickNode(e,i){if(this.containsPoint(e,i))return this}pickNodes(e,i,s=[]){return this.containsPoint(e,i)&&s.push(this),s}getBBox(){return this.cachedBBox??(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}onChangeDetection(e){this.markDirty(e)}markDirtyChildrenOrder(){this.cachedBBox=void 0}markDirty(e){if(this.batchLevel>0){this.batchDirty=!0;return}e!=null&&this._debugDirtyProperties&&this.markDebugProperties(e),this.cachedBBox=void 0,this.parentNode?.markDirty()}markDebugProperties(e){const i=this._debugDirtyProperties?.get(e)??[],s=new Error("Stack trace for property change tracking").stack?.split(`
|
|
`).filter(n=>n!=="Error"&&!n.includes(".markDebugProperties")&&!n.includes(".markDirty")&&!n.includes("Object.assign ")&&!n.includes(`${this.constructor.name}.`))??"unknown";i.push(s[0].replace(" at ","").trim()),this._debugDirtyProperties?.set(e,i)}debugDirtyProperties(){if(this._debugDirtyProperties!=null){if(!this._debugDirtyProperties.has("__first__"))for(const[e,i]of this._debugDirtyProperties.entries())i.length>1&&import_ag_charts_core5.Logger.logGroup(`Property changed multiple times before render: ${this.constructor.name}.${e} (${i.length}x)`,()=>{for(const s of i)import_ag_charts_core5.Logger.log(s)});this._debugDirtyProperties.clear()}}static handleNodeZIndexChange(e){e.onZIndexChange()}onZIndexChange(){this.parentNode?.markDirtyChildrenOrder()}toSVG(){}};_Node.className="AbstractNode",_Node._nextSerialNumber=0,_Node._debugEnabled=!1,__decorateClass([(0,import_ag_charts_core5.DeclaredSceneChangeDetection)()],_Node.prototype,"visible",2),__decorateClass([(0,import_ag_charts_core5.DeclaredSceneChangeDetection)({equals:import_ag_charts_core5.objectsEqual,changeCb:_Node.handleNodeZIndexChange})],_Node.prototype,"zIndex",2);var Node=_Node,import_ag_charts_core19=require("ag-charts-core"),import_ag_charts_core10=require("ag-charts-core"),import_ag_charts_core9=require("ag-charts-core"),import_ag_charts_core8=require("ag-charts-core"),AbstractScale=class{ticks(t,e,i){}niceDomain(t,e=this.domain){return e}get bandwidth(){}get step(){}get inset(){}},Invalidating=(t,e)=>{const i=Symbol(String(e));t[i]=void 0,Object.defineProperty(t,e,{get(){return this[i]},set(s){this[i]!==s&&(this[i]=s,this.invalid=!0)},enumerable:!0,configurable:!1})},import_ag_charts_core7=require("ag-charts-core");function visibleTickRange(t,e,i){if(i==null||i[0]===0&&i[1]===1)return;const s=(0,import_ag_charts_core7.clamp)(0,Math.floor(i[0]*t.length),t.length),n=(0,import_ag_charts_core7.clamp)(0,Math.ceil(i[1]*t.length),t.length),r=e?t.length-n:s,a=e?t.length-s:n;return[r,a]}function visibleTickSliceIndices(t,e,i){return visibleTickRange(t,e,i)??[0,t.length]}function filterVisibleTicks(t,e,i){const s=visibleTickRange(t,e,i);if(s==null)return{ticks:t,count:t.length,firstTickIndex:0};const[n,r]=s;return{ticks:t.slice(n,r),count:t.length,firstTickIndex:n}}function unpackDomainMinMax(t){const e=(0,import_ag_charts_core7.readIntegratedWrappedValue)(t.at(0)),i=(0,import_ag_charts_core7.readIntegratedWrappedValue)(t.at(-1));return e!=null&&i!=null?[e,i]:[void 0,void 0]}var convertColorStringToOklcha=t=>{const e=import_ag_charts_core8.Color.fromString(t),[i,s,n]=import_ag_charts_core8.Color.RGBtoOKLCH(e.r,e.g,e.b);return{l:i,c:s,h:n,a:e.a}},delta=1e-6,isAchromatic=t=>t.c<delta||t.l<delta||t.l>1-delta,interpolateOklch=(t,e,i)=>{i=(0,import_ag_charts_core8.clamp)(0,i,1);let s;if(isAchromatic(t))s=e.h;else if(isAchromatic(e))s=t.h;else{const o=t.h;let l=e.h;const c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),s=o*(1-i)+l*i}const n=t.c*(1-i)+e.c*i,r=t.l*(1-i)+e.l*i,a=t.a*(1-i)+e.a*i;return import_ag_charts_core8.Color.fromOKLCH(r,n,s,a)},ColorScale=class extends AbstractScale{constructor(){super(...arguments),this.type="color",this.defaultTickCount=0,this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(convertColorStringToOklcha)}update(){const{domain:t,range:e}=this;t.length<2&&(import_ag_charts_core8.Logger.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let i=1;i<t.length;i++){const s=t[i-1],n=t[i];if(s>n){import_ag_charts_core8.Logger.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((r,a)=>r-a);break}}if(e.length<t.length)for(let i=e.length;i<t.length;i++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(convertColorStringToOklcha)}normalizeDomains(...t){return{domain:t.map(e=>e.domain).flat(),animatable:!0}}toDomain(){}convert(t){this.refresh();const{domain:e,range:i,parsedRange:s}=this,n=e[0],r=e.at(-1),a=i[0],o=i.at(-1);if(t<=n)return a;if(t>=r)return o;let l,c;if(e.length===2){const d=(t-n)/(r-n),p=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(d*(i.length-1)),i.length-2),c=(d-l*p)/p}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);const d=e[l],p=e[l+1];c=(t-d)/(p-d)}const h=s[l],u=s[l+1];return interpolateOklch(h,u,c).toRgbaString()}invert(){}getDomainMinMax(){return unpackDomainMinMax(this.domain)}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&import_ag_charts_core8.Logger.warnOnce("Expected update to not invalidate scale"))}};__decorateClass([Invalidating],ColorScale.prototype,"domain",2),__decorateClass([Invalidating],ColorScale.prototype,"range",2);var Gradient=class{constructor(t,e=[],i){this.colorSpace=t,this.stops=e,this.bbox=i,this._cache=void 0}createGradient(t,e,i){const s=this.bbox??e;if(!s.isFinite())return;if(this._cache?.ctx===t&&this._cache.bbox.equals(s))return this._cache.gradient;const{stops:n,colorSpace:r}=this;if(n.length===0)return;if(n.length===1)return n[0].color;let a=this.createCanvasGradient(t,s,i);if(a==null)return;const o=r==="oklch",l=.05;let c=n[0];a.addColorStop(c.stop,c.color);for(let h=1;h<n.length;h+=1){const u=n[h];if(o){const d=new ColorScale;d.domain=[c.stop,u.stop],d.range=[c.color,u.color];for(let p=c.stop+l;p<u.stop;p+=l)a.addColorStop(p,d.convert(p)??"transparent")}a.addColorStop(u.stop,u.color),c=u}return"createPattern"in a&&(a=a.createPattern()),this._cache={ctx:t,bbox:s,gradient:a},a}toSvg(t){const e=this.bbox??t,i=this.createSvgGradient(e);for(const{stop:s,color:n}of this.stops){const r=(0,import_ag_charts_core9.createSvgElement)("stop");r.setAttribute("offset",`${s}`),r.setAttribute("stop-color",`${n}`),i.appendChild(r)}return i}},ConicGradient=class extends Gradient{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}createCanvasGradient(t,e,i){const{angle:n}=this,r=(0,import_ag_charts_core10.normalizeAngle360FromDegrees)(n+-90),a=i?.centerX??e.x+e.width*.5,o=i?.centerY??e.y+e.height*.5;return t.createConicGradient(r,a,o)}createSvgGradient(t){return(0,import_ag_charts_core10.createSvgElement)("linearGradient")}},import_ag_charts_core11=require("ag-charts-core"),LinearGradient=class extends Gradient{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}getGradientPoints(t){const{angle:i}=this,s=(0,import_ag_charts_core11.normalizeAngle360FromDegrees)(i+90),n=Math.cos(s),r=Math.sin(s),a=t.width,o=t.height,l=t.x+a*.5,c=t.y+o*.5,h=Math.hypot(o,a)/2,u=Math.atan2(o,a);let d;s<Math.PI/2?d=s:s<Math.PI?d=Math.PI-s:s<1.5*Math.PI?d=s-Math.PI:d=2*Math.PI-s;const p=h*Math.abs(Math.cos(d-u));return{x0:l+n*p,y0:c+r*p,x1:l-n*p,y1:c-r*p}}createCanvasGradient(t,e){const{x0:i,y0:s,x1:n,y1:r}=this.getGradientPoints(e);if(!(Number.isNaN(i)||Number.isNaN(s)||Number.isNaN(n)||Number.isNaN(r)))return t.createLinearGradient(i,s,n,r)}createSvgGradient(t){const{x0:e,y0:i,x1:s,y1:n}=this.getGradientPoints(t),r=(0,import_ag_charts_core11.createSvgElement)("linearGradient");return r.setAttribute("x1",String(e)),r.setAttribute("y1",String(i)),r.setAttribute("x2",String(s)),r.setAttribute("y2",String(n)),r.setAttribute("gradientUnits","userSpaceOnUse"),r}},import_ag_charts_core12=require("ag-charts-core"),RadialGradient=class extends Gradient{constructor(t,e,i){super(t,e,i)}createCanvasGradient(t,e,i){const s=i?.centerX??e.x+e.width*.5,n=i?.centerY??e.y+e.height*.5,r=i?.innerRadius??0,a=i?.outerRadius??Math.hypot(e.width*.5,e.height*.5)/Math.SQRT2;return t.createRadialGradient(s,n,r,s,n,a)}createSvgGradient(t){const e=t.x+t.width*.5,i=t.y+t.height*.5,s=(0,import_ag_charts_core12.createSvgElement)("radialGradient");return s.setAttribute("cx",String(e)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(t.width*.5,t.height*.5)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}},import_ag_charts_core13=require("ag-charts-core"),StopProperties=class extends import_ag_charts_core13.BaseProperties{constructor(){super(...arguments),this.color="black"}};__decorateClass([import_ag_charts_core13.Property],StopProperties.prototype,"stop",2),__decorateClass([import_ag_charts_core13.Property],StopProperties.prototype,"color",2);function stopsAreAscending(t){let e;for(const i of t)if(i?.stop!=null){if(e!=null&&i.stop<e)return!1;e=i.stop}return!0}function discreteColorStops(t){return t.flatMap((e,i)=>{const{stop:s}=e,n=t.at(i+1)?.color;return n==null?[e]:[e,{stop:s,color:n}]})}function getDefaultColorStops(t,e){const i=e==="discrete"?1:0,s=t.map((n,r,{length:a})=>({stop:(r+i)/(a-1+i),color:n}));return e==="discrete"?discreteColorStops(s):s}function getColorStops(t,e,i,s="continuous"){const n=t.map(g=>typeof g=="string"?{color:g}:g);if(n.length===0)return getDefaultColorStops(e,s);if(!stopsAreAscending(n))return import_ag_charts_core13.Logger.warnOnce("[fills] must have the stops defined in ascending order"),[];const r=Math.min(...i),a=Math.max(...i),o=s==="discrete",l=new Float64Array(n.length);let c=0,h=-1;for(let g=0;g<n.length;g+=1){const f=n[g];if(g>=h){h=n.length-1;for(let m=g+1;m<n.length;m+=1)if(n[m]?.stop!=null){h=m;break}}let y=f?.stop;if(y==null){const m=n[c]?.stop,b=n[h]?.stop,v=m??r,x=b??a,S=o&&m==null?1:0;y=v+(x-v)*(g-c+S)/(h-c+S)}else c=g;l[g]=Math.max(0,Math.min(1,(y-r)/(a-r)))}let u=n.find(g=>g.color!=null)?.color,d;const p=n.map((g,f)=>{let y=g?.color;const m=l[f];return y!=null?u=y:u==null?(d==null&&(d=new ColorScale,d.domain=[0,1],d.range=e),y=d.convert(m)):y=u,{stop:m,color:y}});return s==="discrete"?discreteColorStops(p):p}var import_ag_charts_core14=require("ag-charts-core"),Image=class{constructor(t,e){this.imageLoader=t,this._cache=void 0,this.url=e.url,this.backgroundFill=e.backgroundFill??"black",this.backgroundFillOpacity=e.backgroundFillOpacity??1,this.repeat=e.repeat??"no-repeat",this.width=e.width,this.height=e.height,this.fit=e.fit??"stretch",this.rotation=e.rotation??0}createCanvasImage(t,e,i,s){if(!e)return null;const[n,r]=this.getSize(e.width,e.height,i,s);return n<1||r<1?(import_ag_charts_core14.Logger.warnOnce("Image fill is too small to render, ignoring."),null):t.createPattern(e,this.repeat)}getSize(t,e,i,s){const{fit:n}=this;let r=t,a=e,o=1;const l=i/s,c=t/e;return n==="stretch"||t===0||e===0?(r=i,a=s):n==="contain"?o=c>l?i/t:s/e:n==="cover"&&(o=c>l?s/e:i/t),[Math.max(1,r*o),Math.max(1,a*o)]}setImageTransform(t,e){if(typeof t=="string")return;const{url:i,rotation:s,width:n,height:r}=this,a=this.imageLoader?.loadImage(i);if(!a)return;const o=(0,import_ag_charts_core14.normalizeAngle360FromDegrees)(s),l=Math.cos(o),c=Math.sin(o),[h,u]=this.getSize(a.width,a.height,n??e.width,r??e.height),d=h/a.width,p=u/a.height,g=e.x+e.width/2,f=e.y+e.height/2,y=l*h-c*u,m=c*h+l*u,b=y/2,v=m/2,x=(0,import_ag_charts_core14.getDOMMatrix)();t?.setTransform(new x([l*d,c*p,-c*d,l*p,g-b,f-v]))}createPattern(t,e,i,s){const n=this.width??e,r=this.height??i,a=this._cache;if(a?.ctx===t&&a.width===n&&a.height===r)return a.pattern;const o=this.imageLoader?.loadImage(this.url,s),l=this.createCanvasImage(t,o,n,r);if(l!=null)return this._cache={ctx:t,pattern:l,width:n,height:r},l}toSvg(t,e){const{url:i,rotation:s,backgroundFill:n,backgroundFillOpacity:r}=this,{x:a,y:o,width:l,height:c}=t,h=(0,import_ag_charts_core14.createSvgElement)("pattern");h.setAttribute("viewBox",`0 0 ${l} ${c}`),h.setAttribute("x",String(a)),h.setAttribute("y",String(o)),h.setAttribute("width",String(l)),h.setAttribute("height",String(c)),h.setAttribute("patternUnits","userSpaceOnUse");const u=(0,import_ag_charts_core14.createSvgElement)("rect");u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("width",String(l)),u.setAttribute("height",String(c)),u.setAttribute("fill",n),u.setAttribute("fill-opacity",String(r)),h.appendChild(u);const d=(0,import_ag_charts_core14.createSvgElement)("image");return d.setAttribute("href",i),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(l)),d.setAttribute("height",String(c)),d.setAttribute("preserveAspectRatio","none"),d.setAttribute("transform",`scale(${1/e}) rotate(${s}, ${l/2}, ${c/2})`),h.appendChild(d),h}},import_ag_charts_core18=require("ag-charts-core"),import_ag_charts_core16=require("ag-charts-core"),import_ag_charts_core15=require("ag-charts-core"),commandEx=/^[\t\n\f\r ]*([achlmqstvz])[\t\n\f\r ]*/i,coordinateEx=/^[+-]?((\d*\.\d+)|(\d+\.)|(\d+))(e[+-]?\d+)?/i,commaEx=/[\t\n\f\r ]*,?[\t\n\f\r ]*/,flagEx=/^[01]/,pathParams={z:[],h:[coordinateEx],v:[coordinateEx],m:[coordinateEx,coordinateEx],l:[coordinateEx,coordinateEx],t:[coordinateEx,coordinateEx],s:[coordinateEx,coordinateEx,coordinateEx,coordinateEx],q:[coordinateEx,coordinateEx,coordinateEx,coordinateEx],c:[coordinateEx,coordinateEx,coordinateEx,coordinateEx,coordinateEx,coordinateEx],a:[coordinateEx,coordinateEx,coordinateEx,flagEx,flagEx,coordinateEx,coordinateEx]};function parseSvg(t){if(!t)return;const e=[];let i=0,s;for(;i<t.length;){const n=commandEx.exec(t.slice(i));let r;if(n==null){if(!s){import_ag_charts_core15.Logger.warnOnce(`Invalid SVG path, error at index ${i}: Missing command.`);return}r=s}else r=n[1],i+=n[0].length;const a=parseSegment(r,t,i);if(!a)return;i=a[0],s=r,e.push(a[1])}return e}function parseSegment(t,e,i){const s=pathParams[t.toLocaleLowerCase()],n={command:t,params:[]};for(const r of s){const a=e.slice(i),o=r.exec(a);if(o!=null){n.params.push(Number.parseFloat(o[0])),i+=o[0].length;const l=commaEx.exec(a.slice(o[0].length));l!=null&&(i+=l[0].length)}else{if(n.params.length===1)return[i,n];import_ag_charts_core15.Logger.warnOnce(`Invalid SVG path, error at index ${i}: No path segment parameters for command [${t}]`);return}}return[i,n]}function linearRoot(t,e){const i=-e/t;return t!==0&&i>=0&&i<=1?[i]:[]}function quadraticRoots(t,e,i,s=1e-6){if(Math.abs(t)<s)return linearRoot(e,i);const n=e*e-4*t*i,r=[];if(Math.abs(n)<s){const a=-e/(2*t);a>=0&&a<=1&&r.push(a)}else if(n>0){const a=Math.sqrt(n),o=(-e-a)/(2*t),l=(-e+a)/(2*t);o>=0&&o<=1&&r.push(o),l>=0&&l<=1&&r.push(l)}return r}function cubicRoots(t,e,i,s,n=1e-6){if(Math.abs(t)<n)return quadraticRoots(e,i,s,n);const r=e/t,a=i/t,o=s/t,l=(3*a-r*r)/9,c=(9*r*a-27*o-2*r*r*r)/54,h=l*l*l+c*c,u=1/3,d=[];if(h>=0){const p=Math.sqrt(h),g=Math.sign(c+p)*Math.pow(Math.abs(c+p),u),f=Math.sign(c-p)*Math.pow(Math.abs(c-p),u),y=Math.abs(Math.sqrt(3)*(g-f)/2),m=-u*r+(g+f);if(m>=0&&m<=1&&d.push(m),Math.abs(y)<n){const b=-u*r-(g+f)/2;b>=0&&b<=1&&d.push(b)}}else{const p=Math.acos(c/Math.sqrt(-l*l*l)),g=u*r,f=2*Math.sqrt(-l),y=f*Math.cos(u*p)-g,m=f*Math.cos(u*(p+2*Math.PI))-g,b=f*Math.cos(u*(p+4*Math.PI))-g;y>=0&&y<=1&&d.push(y),m>=0&&m<=1&&d.push(m),b>=0&&b<=1&&d.push(b)}return d}function segmentIntersection(t,e,i,s,n,r,a,o){const l=(i-t)*(o-r)-(s-e)*(a-n);if(l===0)return 0;const c=((a-n)*(e-r)-(t-n)*(o-r))/l,h=((i-t)*(e-r)-(s-e)*(t-n))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function cubicSegmentIntersections(t,e,i,s,n,r,a,o,l,c,h,u){let d=0;const p=c-u,g=h-l,f=l*(u-c)-c*(h-l),y=bezierCoefficients(t,i,n,a),m=bezierCoefficients(e,s,r,o),b=p*y[0]+g*m[0],v=p*y[1]+g*m[1],x=p*y[2]+g*m[2],S=p*y[3]+g*m[3]+f,I=cubicRoots(b,v,x,S);for(const D of I){const T=D*D,A=D*T,L=y[0]*A+y[1]*T+y[2]*D+y[3],N=m[0]*A+m[1]*T+m[2]*D+m[3];let k;l===h?k=(N-c)/(u-c):k=(L-l)/(h-l),k>=0&&k<=1&&d++}return d}function bezierCoefficients(t,e,i,s){return[-t+3*e-3*i+s,3*t-6*e+3*i,-3*t+3*e,t]}var ExtendedPath2D=class{constructor(){this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.commandsLength=0,this.paramsLength=0,this.cx=Number.NaN,this.cy=Number.NaN,this.sx=Number.NaN,this.sy=Number.NaN,this.openedPath=!1,this.closedPath=!1;const t=(0,import_ag_charts_core16.getPath2D)();this.path2d=new t}isEmpty(){return this.commandsLength===0}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commandsLength||this.previousParams.length!==this.paramsLength||this.previousCommands.toString()!==this.commands.slice(0,this.commandsLength).toString()||this.previousParams.toString()!==this.params.slice(0,this.paramsLength).toString()}getPath2D(){return this.path2d}moveTo(t,e){this.openedPath=!0,this.sx=t,this.sy=e,this.cx=t,this.cy=e,this.path2d.moveTo(t,e),this.commands[this.commandsLength++]=0,this.params[this.paramsLength++]=t,this.params[this.paramsLength++]=e}lineTo(t,e){this.openedPath?(this.cx=t,this.cy=e,this.path2d.lineTo(t,e),this.commands[this.commandsLength++]=1,this.params[this.paramsLength++]=t,this.params[this.paramsLength++]=e):this.moveTo(t,e)}cubicCurveTo(t,e,i,s,n,r){this.openedPath||this.moveTo(t,e),this.path2d.bezierCurveTo(t,e,i,s,n,r),this.commands[this.commandsLength++]=2,this.params[this.paramsLength++]=t,this.params[this.paramsLength++]=e,this.params[this.paramsLength++]=i,this.params[this.paramsLength++]=s,this.params[this.paramsLength++]=n,this.params[this.paramsLength++]=r}closePath(){this.openedPath&&(this.cx=this.sx,this.cy=this.sy,this.sx=Number.NaN,this.sy=Number.NaN,this.path2d.closePath(),this.commands[this.commandsLength++]=3,this.openedPath=!1,this.closedPath=!0)}rect(t,e,i,s){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.closePath()}roundRect(t,e,i,s,n){n=Math.min(n,i/2,s/2),this.moveTo(t,e+n),this.arc(t+n,e+n,n,Math.PI,1.5*Math.PI),this.lineTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,1.5*Math.PI,2*Math.PI),this.lineTo(t+i,e+n),this.lineTo(t+i,e+s-n),this.arc(t+i-n,e+s-n,n,0,Math.PI/2),this.lineTo(t+i-n,e+s),this.lineTo(t+n,e+s),this.arc(t+ +n,e+s-n,n,Math.PI/2,Math.PI),this.lineTo(t,e+s-n),this.closePath()}ellipse(t,e,i,s,n,r,a,o=!1){const l=i,c=s/i,h=Math.cos(n),u=Math.sin(n),d=-c*u,p=c*h,g=l*Math.cos(r),f=l*Math.sin(r),y=t+h*g+d*f,m=e+u*g+p*f,b=(y-this.cx)**2+(m-this.cy)**2;this.openedPath?b>1e-6&&this.lineTo(y,m):this.moveTo(y,m);let v=o?-(0,import_ag_charts_core16.normalizeAngle360)(r-a):(0,import_ag_charts_core16.normalizeAngle360)(a-r);Math.abs(Math.abs(a-r)-2*Math.PI)<1e-6&&v<2*Math.PI&&(v+=2*Math.PI*(o?-1:1));const x=Math.max(Math.ceil(Math.abs(v)/(Math.PI/2)),1),S=v/x,I=4/3*Math.tan(S/4);for(let D=0;D<x;D+=1){const T=r+S*(D+0),A=r+S*(D+1),L=l*Math.sin(T),N=l*Math.cos(T),k=l*Math.sin(A),w=l*Math.cos(A),E=N-I*L,O=L+I*N,R=w+I*k,_=k-I*w,P=w,F=k;this.cubicCurveTo(t+h*E+d*O,e+u*E+p*O,t+h*R+d*_,e+u*R+p*_,t+h*P+d*F,e+u*P+p*F)}}arc(t,e,i,s,n,r){this.ellipse(t,e,i,i,0,s,n,r)}appendSvg(t){const e=parseSvg(t);if(e==null)return!1;let i=0,s=0,n,r,a=0,o=0;for(const{command:l,params:c}of e){n??(n=c[0]),r??(r=c[1]);const h=l===l.toLowerCase(),u=h?n:0,d=h?r:0;switch(l.toLowerCase()){case"m":this.moveTo(u+c[0],d+c[1]),n=u+c[0],r=d+c[1],i=n,s=r;break;case"c":this.cubicCurveTo(u+c[0],d+c[1],u+c[2],d+c[3],u+c[4],d+c[5]),a=u+c[2],o=d+c[3],n=u+c[4],r=d+c[5];break;case"s":this.cubicCurveTo(n+n-a,r+r-o,u+c[0],d+c[1],u+c[2],d+c[3]),a=u+c[0],o=d+c[1],n=u+c[2],r=d+c[3];break;case"q":this.cubicCurveTo((u+2*c[0])/3,(d+2*c[1])/3,(2*c[0]+c[2])/3,(2*c[1]+c[3])/3,c[2],c[3]),a=c[0],o=c[1],n=c[2],r=c[3];break;case"t":this.cubicCurveTo((n+2*(n+n-a))/3,(r+2*(r+r-o))/3,(2*(n+n-a)+c[0])/3,(2*(r+r-o)+c[1])/3,c[0],c[1]),a=n+n-a,o=r+r-o,n=c[0],r=c[1];break;case"a":this.svgEllipse(n,r,c[0],c[1],c[2]*Math.PI/180,c[3],c[4],u+c[5],d+c[6]),n=u+c[5],r=d+c[6];break;case"h":this.lineTo(u+c[0],r),n=u+c[0];break;case"l":this.lineTo(u+c[0],d+c[1]),n=u+c[0],r=d+c[1];break;case"v":this.lineTo(n,d+c[0]),r=d+c[0];break;case"z":this.closePath(),n=i,r=s;break;default:throw new Error(`Could not translate command '${l}' with '${c.join(" ")}'`)}}return!0}svgEllipse(t,e,i,s,n,r,a,o,l){i=Math.abs(i),s=Math.abs(s);const c=(t-o)/2,h=(e-l)/2,u=Math.sin(n),d=Math.cos(n),p=d*c+u*h,g=-u*c+d*h,f=p/i,y=g/s;let m=f*f+y*y,b=(t+o)/2,v=(e+l)/2,x=0,S=0;m>=1?(m=Math.sqrt(m),i*=m,s*=m):(m=Math.sqrt(1/m-1),r===a&&(m=-m),x=m*i*y,S=-m*s*f,b+=d*x-u*S,v+=u*x+d*S);const I=Math.atan2((g-S)/s,(p-x)/i),D=Math.atan2((-g-S)/s,(-p-x)/i)-I,T=I+D,A=!!(1-a);this.ellipse(b,v,i,s,n,I,T,A)}clear(t){t?(this.previousCommands=this.commands.slice(0,this.commandsLength),this.previousParams=this.params.slice(0,this.paramsLength),this.previousClosedPath=this.closedPath,this.commands=[],this.params=[],this.commandsLength=0,this.paramsLength=0):(this.commandsLength=0,this.paramsLength=0);const e=(0,import_ag_charts_core16.getPath2D)();this.path2d=new e,this.openedPath=!1,this.closedPath=!1}isPointInPath(t,e){const i=this.commands,s=this.params,n=this.commandsLength,r=-1e4,a=-1e4;let o=Number.NaN,l=Number.NaN,c=0,h=0,u=0;for(let d=0,p=0;d<n;d++)switch(i[d]){case 0:u+=segmentIntersection(o,l,c,h,r,a,t,e),c=s[p++],o=c,h=s[p++],l=h;break;case 1:u+=segmentIntersection(c,h,s[p++],s[p++],r,a,t,e),c=s[p-2],h=s[p-1];break;case 2:u+=cubicSegmentIntersections(c,h,s[p++],s[p++],s[p++],s[p++],s[p++],s[p++],r,a,t,e),c=s[p-2],h=s[p-1];break;case 3:u+=segmentIntersection(o,l,c,h,r,a,t,e);break}return u%2===1}distanceSquared(t,e){let i=1/0;const s=this.commands,n=this.params,r=this.commandsLength;let a=Number.NaN,o=Number.NaN,l=0,c=0;for(let h=0,u=0;h<r;h++)switch(s[h]){case 0:l=a=n[u++],c=o=n[u++];break;case 1:{const d=l,p=c;l=n[u++],c=n[u++],i=(0,import_ag_charts_core16.lineDistanceSquared)(t,e,d,p,l,c,i);break}case 2:{const d=l,p=c,g=n[u++],f=n[u++],y=n[u++],m=n[u++];l=n[u++],c=n[u++],i=(0,import_ag_charts_core16.bezier2DDistance)(d,p,g,f,y,m,l,c,t,e)**2;break}case 3:i=(0,import_ag_charts_core16.lineDistanceSquared)(t,e,l,c,a,o,i);break}return i}toSVG(t=(e,i)=>({x:e,y:i})){const e=[],{commands:i,params:s}=this,n=(a,o)=>{e.push(a);for(let l=0;l<o;l+=2){const{x:c,y:h}=t(s[r++],s[r++]);e.push(c,h)}};let r=0;for(let a=0;a<this.commandsLength;a++)switch(i[a]){case 0:n("M",2);break;case 1:n("L",2);break;case 2:n("C",6);break;case 3:n("Z",0);break}return e.join(" ")}computeBBox(){const{commands:t,params:e}=this;let[i,s,n,r]=[1/0,1/0,-1/0,-1/0],[a,o]=[Number.NaN,Number.NaN],[l,c]=[Number.NaN,Number.NaN];const h=(d,p)=>{i=Math.min(p,i),s=Math.min(d,s),n=Math.max(d,n),r=Math.max(p,r),a=d,o=p};let u=0;for(let d=0;d<this.commandsLength;d++)switch(t[d]){case 0:h(e[u++],e[u++]),l=a,c=o;break;case 1:h(e[u++],e[u++]);break;case 2:{const g=a,f=o,y=e[u++],m=e[u++],b=e[u++],v=e[u++],x=e[u++],S=e[u++],I=(0,import_ag_charts_core16.bezier2DExtrema)(g,f,y,m,b,v,x,S);for(const D of I){const T=(0,import_ag_charts_core16.evaluateBezier)(g,y,b,x,D),A=(0,import_ag_charts_core16.evaluateBezier)(f,m,v,S,D);h(T,A)}h(x,S);break}case 3:h(l,c),l=Number.NaN,c=Number.NaN;break}return new BBox(s,i,n-s,r-i)}},import_ag_charts_core17=require("ag-charts-core");function align(t,e,i){const s=Math.round(e*t)/t;return i==null?s:i===0?0:i<1?Math.ceil(i*t)/t:Math.round((i+e)*t)/t-s}function alignBefore(t,e){return Math.floor(e*t)/t}function drawPatternUnitPolygon(t,e,i){const{width:s,height:n,padding:r,strokeWidth:a}=e,o=s/2,l=n/2,c=Math.max(1,s-r-a/2),h=Math.max(1,n-r-a/2);let u=!1;for(const[d,p]of i){const g=o+(d-.5)*c,f=l+(p-.5)*h;u?t.lineTo(g,f):t.moveTo(g,f),u=!0}t.closePath()}var PATTERNS={circles(t,{width:e,strokeWidth:i,padding:s}){const n=e/2,r=Math.max(1,n-s-i/2);t.arc(n,n,r,0,Math.PI*2)},squares(t,{width:e,height:i,pixelRatio:s,padding:n,strokeWidth:r}){const a=n+r/2;t.moveTo(align(s,a),align(s,a)),t.lineTo(align(s,e-a),align(s,a)),t.lineTo(align(s,e-a),align(s,i-a)),t.lineTo(align(s,a),align(s,i-a)),t.closePath()},triangles(t,e){drawPatternUnitPolygon(t,e,[[.5,0],[1,1],[0,1]])},diamonds(t,e){drawPatternUnitPolygon(t,e,[[.5,0],[1,.5],[.5,1],[0,.5]])},stars(t,{width:e,height:i,padding:s}){const r=Math.max(1,(e-s)/2),a=r/2,o=Math.PI/2;for(let l=0;l<5*2;l++){const c=l%2===0?r:a,h=l*Math.PI/5-o,u=e/2+Math.cos(h)*c,d=i/2+Math.sin(h)*c;t.lineTo(u,d)}t.closePath()},hearts(t,{width:e,height:i,padding:s}){const n=Math.max(1,e/4-s/2),r=e/2,a=i/2+n/2;t.arc(r-n,a-n,n,(0,import_ag_charts_core17.toRadians)(130),(0,import_ag_charts_core17.toRadians)(330)),t.arc(r+n,a-n,n,(0,import_ag_charts_core17.toRadians)(220),(0,import_ag_charts_core17.toRadians)(50)),t.lineTo(r,a+n),t.closePath()},crosses(t,e){drawPatternUnitPolygon(t,e,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},"vertical-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:n}){const r=align(s,e/2)-n%2/2;t.moveTo(r,0),t.lineTo(r,i)},"horizontal-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:n}){const r=align(s,i/2)-n%2/2;t.moveTo(0,r),t.lineTo(e,r)},"forward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const n=Math.atan2(i,e),r=s*Math.cos(n),a=s*Math.sin(n);t.moveTo(-r,a),t.lineTo(r,-a),t.moveTo(-r,i+a),t.lineTo(e+r,-a),t.moveTo(e-r,i+a),t.lineTo(e+r,i-a)},"backward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const n=Math.atan2(i,e),r=s*Math.cos(n),a=s*Math.sin(n);t.moveTo(e-r,-a),t.lineTo(e+r,a),t.moveTo(-r,-a),t.lineTo(e+r,i+a),t.moveTo(-r,i-a),t.lineTo(r,i+a)}},Pattern=class{constructor(t){this._cache=void 0,this.width=Math.max(t?.width??10,1),this.height=Math.max(t?.height??10,1),this.fill=t.fill??"none",this.fillOpacity=t.fillOpacity??1,this.backgroundFill=t.backgroundFill??"none",this.backgroundFillOpacity=t.backgroundFillOpacity??1,this.stroke=t.stroke??"black",this.strokeOpacity=t.strokeOpacity??1,this.strokeWidth=t.strokeWidth??1,this.padding=t.padding??1,this.pattern=t.pattern??"forward-slanted-lines",this.rotation=t.rotation??0,this.scale=t.scale??1,this.path=t.path}getPath(t){const{pattern:e,width:i,height:s,padding:n,strokeWidth:r,path:a}=this,o=new ExtendedPath2D;let l=PATTERNS[e]!=null;return a&&l&&(l=!o.appendSvg(a)),l&&PATTERNS[e](o,{width:i,height:s,pixelRatio:t,strokeWidth:r,padding:n}),o}renderStroke(t,e){const{stroke:i,strokeWidth:s,strokeOpacity:n}=this;s&&(e.strokeStyle=i,e.lineWidth=s,e.globalAlpha=n,e.stroke(t))}renderFill(t,e){const{fill:i,fillOpacity:s}=this;i!=="none"&&(e.fillStyle=i,e.globalAlpha=s,e.fill(t))}createCanvasPattern(t,e){const{width:i,height:s,scale:n,backgroundFill:r,backgroundFillOpacity:a}=this;if(i*n<1||s*n<1)return import_ag_charts_core18.Logger.warnOnce("Pattern fill is too small to render, ignoring."),null;const o=new HdpiOffscreenCanvas({width:i,height:s,pixelRatio:e*n}),l=o.context;r!=="none"&&(l.fillStyle=r,l.globalAlpha=a,l.fillRect(0,0,i,s));const c=this.getPath(e).getPath2D();this.renderFill(c,l),this.renderStroke(c,l);const h=t.createPattern(o.canvas,"repeat");return this.setPatternTransform(h,e),o.destroy(),h}setPatternTransform(t,e,i=0,s=0){if(t==null)return;const n=(0,import_ag_charts_core18.normalizeAngle360FromDegrees)(this.rotation),r=1/e,a=Math.cos(n)*r,o=Math.sin(n)*r,l=(0,import_ag_charts_core18.getDOMMatrix)();t.setTransform(new l([a,o,-o,a,i,s]))}createPattern(t,e){if(this._cache?.ctx===t&&this._cache.pixelRatio===e)return this._cache.pattern;const i=this.createCanvasPattern(t,e);if(i!=null)return this._cache={ctx:t,pattern:i,pixelRatio:e},i}toSvg(){const{width:t,height:e,fill:i,fillOpacity:s,backgroundFill:n,backgroundFillOpacity:r,stroke:a,strokeWidth:o,strokeOpacity:l,rotation:c,scale:h}=this,u=(0,import_ag_charts_core18.createSvgElement)("pattern");u.setAttribute("viewBox",`0 0 ${t} ${e}`),u.setAttribute("width",String(t)),u.setAttribute("height",String(e)),u.setAttribute("patternUnits","userSpaceOnUse");const d=(0,import_ag_charts_core18.createSvgElement)("rect");d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(t)),d.setAttribute("height",String(e)),d.setAttribute("fill",n),d.setAttribute("fill-opacity",String(r)),u.appendChild(d);const p=(0,import_ag_charts_core18.createSvgElement)("path");return p.setAttribute("fill",i),p.setAttribute("fill-opacity",String(s)),p.setAttribute("stroke-opacity",String(l)),p.setAttribute("stroke",a),p.setAttribute("stroke-width",String(o)),p.setAttribute("transform",`rotate(${c}) scale(${h})`),p.setAttribute("d",this.getPath(1).toSVG()),u.appendChild(p),u}};function setSvgFontAttributes(t,e){const{fontStyle:i,fontWeight:s,fontSize:n,fontFamily:r}=e;i&&t.setAttribute("font-style",i),s&&t.setAttribute("font-weight",String(s)),n!=null&&t.setAttribute("font-size",String(n)),r&&t.setAttribute("font-family",r)}function setSvgStrokeAttributes(t,e){const{stroke:i,strokeWidth:s,strokeOpacity:n}=e;i&&t.setAttribute("stroke",i),s!=null&&t.setAttribute("stroke-width",String(s)),n!=null&&t.setAttribute("stroke-opacity",String(n))}function setSvgLineDashAttributes(t,e){const{lineDash:i,lineDashOffset:s}=e;if(i?.some(n=>n!==0)){const n=i.length%2===1?[...i,...i]:i;t.setAttribute("stroke-dasharray",n.join(" ")),s!=null&&t.setAttribute("stroke-dashoffset",String(s))}}var _Shape=class extends Node{constructor(){super(...arguments),this.drawingMode="overlay",this.fillOpacity=1,this.strokeOpacity=1,this.fill="black",this.strokeWidth=0,this.lineDashOffset=0,this.opacity=1}getGradient(e){if((0,import_ag_charts_core19.isGradientFill)(e))return this.createGradient(e)}createGradient(e){const{colorSpace:i="rgb",gradient:s="linear",colorStops:n,rotation:r=0,reverse:a=!1}=e;if(n==null)return;let o=getColorStops(n,["black"],[0,1]);switch(a&&(o=o.map(l=>({color:l.color,stop:1-l.stop})).reverse()),s){case"linear":return new LinearGradient(i,o,r);case"radial":return new RadialGradient(i,o);case"conic":return new ConicGradient(i,o,r)}}getPattern(e){if((0,import_ag_charts_core19.isPatternFill)(e))return this.createPattern(e)}createPattern(e){return new Pattern(e)}getImage(e){if((0,import_ag_charts_core19.isImageFill)(e))return this.createImage(e)}createImage(e){return new Image(this.imageLoader,e)}onFillChange(){typeof this.fill=="object"&&(0,import_ag_charts_core19.objectsEqual)(this._cachedFill??{},this.fill)||(this.fillGradient=this.getGradient(this.fill),this.fillPattern=this.getPattern(this.fill),this.fillImage=this.getImage(this.fill),this._cachedFill=this.fill)}onStrokeChange(){this.strokeGradient=this.getGradient(this.stroke)}align(e,i){return align(this.layerManager?.canvas?.pixelRatio??1,e,i)}markDirty(e){super.markDirty(e),this.cachedDefaultGradientFillBBox=void 0}fillStroke(e,i){this.__drawingMode==="cutout"&&(e.globalCompositeOperation="destination-out",this.executeFill(e,i),e.globalCompositeOperation="source-over"),this.renderFill(e,i),this.renderStroke(e,i)}renderFill(e,i){const{__fill:s,__fillOpacity:n=1,fillImage:r}=this;if(s!=null&&s!=="none"&&n>0){const a=e.globalAlpha;r&&(e.globalAlpha=r.backgroundFillOpacity,e.fillStyle=r.backgroundFill,this.executeFill(e,i),e.globalAlpha=a),this.applyFillAndAlpha(e),this.applyShadow(e),this.executeFill(e,i),e.globalAlpha=a,this.fillShadow?.enabled&&(e.shadowColor="rgba(0, 0, 0, 0)")}}executeFill(e,i){i?e.fill(i):e.fill()}applyFillAndAlpha(e){const{__fill:i,fillGradient:s,fillPattern:n,fillImage:r,__fillOpacity:a=1,__opacity:o=1}=this,l=o*a;if(l!==1&&(e.globalAlpha*=l),s){const{fillBBox:c=this.getDefaultGradientFillBBox()??this.getBBox(),fillParams:h}=this;e.fillStyle=s.createGradient(e,c,h)??"black"}else if(n){const{x:c,y:h}=this.getBBox(),u=this.layerManager?.canvas?.pixelRatio??1,d=n.createPattern(e,u);n.setPatternTransform(d,u,c,h),d?e.fillStyle=d:(e.fillStyle=n.fill,e.globalAlpha*=n.fillOpacity)}else if(r){const c=this.getBBox(),h=r.createPattern(e,c.width,c.height,this);r.setImageTransform(h,c),e.fillStyle=h??"transparent"}else e.fillStyle=typeof i=="string"?i:"black"}applyStrokeAndAlpha(e){const{__stroke:i,__strokeOpacity:s=1,strokeGradient:n,__opacity:r=1}=this;e.strokeStyle=n?.createGradient(e,this.getBBox())??(typeof i=="string"?i:void 0)??"black";const a=r*s;a!==1&&(e.globalAlpha*=a)}applyShadow(e){const i=this.layerManager?.canvas.pixelRatio??1,{__fillShadow:s}=this;s?.enabled&&(e.shadowColor=s.color,e.shadowOffsetX=s.xOffset*i,e.shadowOffsetY=s.yOffset*i,e.shadowBlur=s.blur*i)}renderStroke(e,i){const{__stroke:s,__strokeWidth:n=0,__strokeOpacity:r=1,__lineDash:a,__lineDashOffset:o,__lineCap:l,__lineJoin:c,__miterLimit:h}=this;if(s!=null&&s!=="none"&&n>0&&r>0){const{globalAlpha:u}=e;this.applyStrokeAndAlpha(e),e.lineWidth=n,a&&e.setLineDash(a),o&&(e.lineDashOffset=o),l&&(e.lineCap=l),c&&(e.lineJoin=c),h!=null&&(e.miterLimit=h),this.executeStroke(e,i),e.globalAlpha=u}}executeStroke(e,i){i?e.stroke(i):e.stroke()}getDefaultGradientFillBBox(){return this.cachedDefaultGradientFillBBox??(this.cachedDefaultGradientFillBBox=Object.freeze(this.computeDefaultGradientFillBBox())),this.cachedDefaultGradientFillBBox}computeDefaultGradientFillBBox(){}containsPoint(e,i){return this.isPointInPath(e,i)}applySvgFillAttributes(e,i){const{fill:s,fillOpacity:n}=this;if(typeof s=="string")e.setAttribute("fill",s);else if((0,import_ag_charts_core19.isGradientFill)(s)&&this.fillGradient){i??(i=[]);const r=this.fillGradient.toSvg(this.fillBBox??this.getBBox()),a=(0,import_ag_charts_core19.generateUUID)();r.setAttribute("id",a),i.push(r),e.setAttribute("fill",`url(#${a})`)}else if((0,import_ag_charts_core19.isPatternFill)(s)&&this.fillPattern){i??(i=[]);const r=this.fillPattern.toSvg(),a=(0,import_ag_charts_core19.generateUUID)();r.setAttribute("id",a),i.push(r),e.setAttribute("fill",`url(#${a})`)}else if((0,import_ag_charts_core19.isImageFill)(s)&&this.fillImage){i??(i=[]);const r=this.layerManager?.canvas?.pixelRatio??1,a=this.fillImage.toSvg(this.getBBox(),r),o=(0,import_ag_charts_core19.generateUUID)();a.setAttribute("id",o),i.push(a),e.setAttribute("fill",`url(#${o})`)}else e.setAttribute("fill","none");return e.setAttribute("fill-opacity",String(n)),i}applySvgStrokeAttributes(e){const{stroke:i,strokeOpacity:s,strokeWidth:n,lineDash:r,lineDashOffset:a}=this;setSvgStrokeAttributes(e,{stroke:(0,import_ag_charts_core19.isString)(i)?i:void 0,strokeOpacity:s,strokeWidth:n}),setSvgLineDashAttributes(e,{lineDash:r,lineDashOffset:a})}static handleFillChange(e){e.onFillChange()}static handleStrokeChange(e){e.onStrokeChange()}setStyleProperties(e,i,s){const n=e?.opacity??1,r=e?.fill,a=(e?.fillOpacity??1)*n,o=(e?.strokeOpacity??1)*n,l=e?.strokeWidth??0,c=e?.lineDashOffset??0;let h=!1;this.__fillOpacity!==a&&(this.__fillOpacity=a,h=!0),this.__strokeOpacity!==o&&(this.__strokeOpacity=o,h=!0),this.__strokeWidth!==l&&(this.__strokeWidth=l,h=!0),this.__lineDashOffset!==c&&(this.__lineDashOffset=c,h=!0),this.__lineDash!==e?.lineDash&&(this.__lineDash=e?.lineDash,h=!0),this.setFillProperties(r,i,s),r!==this.fill&&(this.fill=r),e?.stroke!==this.stroke&&(this.stroke=e?.stroke),h&&this.markDirty()}setFillProperties(e,i,s){const n=i==null||!(0,import_ag_charts_core19.isGradientFill)(e)||e.bounds==null||e.bounds==="item"?void 0:i[e.bounds];let r=!1;this.__fillBBox!==n&&(this.__fillBBox=n,r=!0),this.__fillParams!==s&&(this.__fillParams=s,r=!0),r&&(this.onFillChange(),this.markDirty())}};__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"drawingMode",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"fillOpacity",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"strokeOpacity",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneObjectChangeDetection)({equals:import_ag_charts_core19.objectsEqual,changeCb:_Shape.handleFillChange})],_Shape.prototype,"fill",2),__decorateClass([(0,import_ag_charts_core19.SceneObjectChangeDetection)({equals:import_ag_charts_core19.objectsEqual,changeCb:_Shape.handleStrokeChange})],_Shape.prototype,"stroke",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"strokeWidth",2),__decorateClass([(0,import_ag_charts_core19.SceneArrayChangeDetection)()],_Shape.prototype,"lineDash",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"lineDashOffset",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"lineCap",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"lineJoin",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)()],_Shape.prototype,"miterLimit",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneChangeDetection)({convertor:t=>(0,import_ag_charts_core19.clamp)(0,t??1,1)})],_Shape.prototype,"opacity",2),__decorateClass([(0,import_ag_charts_core19.SceneObjectChangeDetection)({equals:import_ag_charts_core19.TRIPLE_EQ,checkDirtyOnAssignment:!0})],_Shape.prototype,"fillShadow",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneObjectChangeDetection)({equals:import_ag_charts_core19.boxesEqual,changeCb:t=>t.onFillChange()})],_Shape.prototype,"fillBBox",2),__decorateClass([(0,import_ag_charts_core19.DeclaredSceneObjectChangeDetection)({equals:import_ag_charts_core19.objectsEqual,changeCb:t=>t.onFillChange()})],_Shape.prototype,"fillParams",2);var Shape=_Shape,import_ag_charts_core21=require("ag-charts-core"),import_ag_charts_core20=require("ag-charts-core"),IDENTITY_MATRIX_ELEMENTS=[1,0,0,1,0,0],Matrix=class fe{get e(){return[...this.elements]}constructor(e=IDENTITY_MATRIX_ELEMENTS){this.elements=[...e]}setElements(e){const i=this.elements;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],this}get identity(){const e=this.elements;return(0,import_ag_charts_core20.isNumberEqual)(e[0],1)&&(0,import_ag_charts_core20.isNumberEqual)(e[1],0)&&(0,import_ag_charts_core20.isNumberEqual)(e[2],0)&&(0,import_ag_charts_core20.isNumberEqual)(e[3],1)&&(0,import_ag_charts_core20.isNumberEqual)(e[4],0)&&(0,import_ag_charts_core20.isNumberEqual)(e[5],0)}AxB(e,i,s){const n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],l=e[0]*i[4]+e[2]*i[5]+e[4],c=e[1]*i[4]+e[3]*i[5]+e[5];s=s??e,s[0]=n,s[1]=r,s[2]=a,s[3]=o,s[4]=l,s[5]=c}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(e){const i=[Number.NaN,Number.NaN,Number.NaN,Number.NaN,Number.NaN,Number.NaN];return e instanceof fe?this.AxB(this.elements,e.elements,i):this.AxB(this.elements,[e.a,e.b,e.c,e.d,e.e,e.f],i),new fe(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const e=this.elements;let i=e[0],s=e[1],n=e[2],r=e[3];const a=e[4],o=e[5],l=1/(i*r-s*n);return i*=l,s*=l,n*=l,r*=l,new fe([r,-s,-n,i,n*o-r*a,s*a-i*o])}invertSelf(){const e=this.elements;let i=e[0],s=e[1],n=e[2],r=e[3];const a=e[4],o=e[5],l=1/(i*r-s*n);return i*=l,s*=l,n*=l,r*=l,e[0]=r,e[1]=-s,e[2]=-n,e[3]=i,e[4]=n*o-r*a,e[5]=s*a-i*o,this}transformPoint(e,i){const s=this.elements;return{x:e*s[0]+i*s[2]+s[4],y:e*s[1]+i*s[3]+s[5]}}transformBBox(e,i){const s=this.elements,n=s[0],r=s[1],a=s[2],o=s[3],l=e.width*.5,c=e.height*.5,h=e.x+l,u=e.y+c,d=Math.abs(l*n)+Math.abs(c*a),p=Math.abs(l*r)+Math.abs(c*o);return i??(i=new BBox(0,0,0,0)),i.x=h*n+u*a+s[4]-d,i.y=h*r+u*o+s[5]-p,i.width=d+d,i.height=p+p,i}toContext(e){if(this.identity)return;const i=this.elements;e.transform(i[0],i[1],i[2],i[3],i[4],i[5])}static updateTransformMatrix(e,i,s,n,r,a,o){const l=i,c=s;let h,u;l===1&&c===1?(h=0,u=0):(h=o?.scalingCenterX??0,u=o?.scalingCenterY??0);const d=n,p=Math.cos(d),g=Math.sin(d);let f,y;d===0?(f=0,y=0):(f=o?.rotationCenterX??0,y=o?.rotationCenterY??0);const m=r,b=a,v=h*(1-l)-f,x=u*(1-c)-y;return e.setElements([p*l,g*l,-g*c,p*c,p*v-g*x+f+m,g*v+p*x+y+b]),e}};function isMatrixTransform(t){return isMatrixTransformType(t.constructor)}var MATRIX_TRANSFORM_TYPE=Symbol("isMatrixTransform");function isMatrixTransformType(t){return t[MATRIX_TRANSFORM_TYPE]===!0}function MatrixTransform(t){var e,i;const s=t;if(isMatrixTransformType(t))return t;const n=Symbol("matrix_combined_transform");class r extends s{constructor(){super(...arguments),this[i]=new Matrix,this._dirtyTransform=!0}onChangeDetection(o){super.onChangeDetection(o),this._dirtyTransform=!0,!(this.batchLevel>0)&&this.markDirty("transform")}updateMatrix(o){}computeTransformMatrix(){this._dirtyTransform&&(this[n].setElements(IDENTITY_MATRIX_ELEMENTS),this.updateMatrix(this[n]),this._dirtyTransform=!1)}toParent(o){return this.computeTransformMatrix(),this[n].identity?o.clone():this[n].transformBBox(o)}toParentPoint(o,l){return this.computeTransformMatrix(),this[n].identity?{x:o,y:l}:this[n].transformPoint(o,l)}fromParent(o){return this.computeTransformMatrix(),this[n].identity?o.clone():this[n].inverse().transformBBox(o)}fromParentPoint(o,l){return this.computeTransformMatrix(),this[n].identity?{x:o,y:l}:this[n].inverse().transformPoint(o,l)}computeBBox(){const o=super.computeBBox();return o&&this.toParent(o)}computeBBoxWithoutTransforms(){return super.computeBBox()}pickNode(o,l){return{x:o,y:l}=this.fromParentPoint(o,l),super.pickNode(o,l)}pickNodes(o,l,c){return{x:o,y:l}=this.fromParentPoint(o,l),super.pickNodes(o,l,c)}render(o){this.computeTransformMatrix();const{ctx:l}=o,c=this[n];let h=!1;try{c.identity||(l.save(),h=!0,c.toContext(l)),super.render(o)}finally{h&&l.restore()}}toSVG(){this.computeTransformMatrix();const o=super.toSVG(),l=this[n];if(l.identity||o==null)return o;const c=(0,import_ag_charts_core21.createSvgElement)("g");c.append(...o.elements);const[h,u,d,p,g,f]=l.e;return c.setAttribute("transform",`matrix(${h} ${u} ${d} ${p} ${g} ${f})`),{elements:[c],defs:o.defs}}}return e=MATRIX_TRANSFORM_TYPE,i=n,r[e]=!0,r}function Rotatable(t){var e;const i=t,s=Symbol("matrix_rotation");class n extends MatrixTransform(i){constructor(){super(...arguments),this[e]=new Matrix,this.rotationCenterX=0,this.rotationCenterY=0,this.rotation=0}updateMatrix(a){super.updateMatrix(a);const{rotation:o,rotationCenterX:l,rotationCenterY:c}=this;o!==0&&(Matrix.updateTransformMatrix(this[s],1,1,o,0,0,{rotationCenterX:l,rotationCenterY:c}),a.multiplySelf(this[s]))}}return e=s,__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"rotationCenterX",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"rotationCenterY",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"rotation",2),n}function isScalable(t){return"scalingX"in t&&"scalingY"in t&&"scalingCenterX"in t&&"scalingCenterY"in t}function Scalable(t){var e;const i=t,s=Symbol("matrix_scale");class n extends MatrixTransform(i){constructor(){super(...arguments),this[e]=new Matrix,this.scalingX=1,this.scalingY=1,this.scalingCenterX=0,this.scalingCenterY=0}updateMatrix(a){super.updateMatrix(a);const{scalingX:o,scalingY:l,scalingCenterX:c,scalingCenterY:h}=this;o===1&&l===1||(Matrix.updateTransformMatrix(this[s],o,l,0,0,0,{scalingCenterX:c,scalingCenterY:h}),a.multiplySelf(this[s]))}resetScalingProperties(a,o,l,c){this.__scalingX=a,this.__scalingY=o,this.__scalingCenterX=l,this.__scalingCenterY=c,this.onChangeDetection("scaling")}}return e=s,__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"scalingX",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"scalingY",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"scalingCenterX",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"scalingCenterY",2),n}function Translatable(t){var e;const i=t,s=Symbol("matrix_translation");class n extends MatrixTransform(i){constructor(){super(...arguments),this[e]=new Matrix,this.translationX=0,this.translationY=0}updateMatrix(a){super.updateMatrix(a);const{translationX:o,translationY:l}=this;o===0&&l===0||(Matrix.updateTransformMatrix(this[s],1,1,0,o,l),a.multiplySelf(this[s]))}}return e=s,__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"translationX",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],n.prototype,"translationY",2),n}var Transformable=class{static fromCanvas(t,e){const i=[];for(const s of t.traverseUp())isMatrixTransform(s)&&i.unshift(s);for(const s of i)e=s.fromParent(e);return isMatrixTransform(t)&&(e=t.fromParent(e)),e}static toCanvas(t,e){e==null?e=t.getBBox():isMatrixTransform(t)&&(e=t.toParent(e));for(const i of t.traverseUp())isMatrixTransform(i)&&(e=i.toParent(e));return e}static fromCanvasPoint(t,e,i){const s=[];for(const n of t.traverseUp())isMatrixTransform(n)&&s.unshift(n);for(const n of s)({x:e,y:i}=n.fromParentPoint(e,i));return isMatrixTransform(t)&&({x:e,y:i}=t.fromParentPoint(e,i)),{x:e,y:i}}static toCanvasPoint(t,e,i){isMatrixTransform(t)&&({x:e,y:i}=t.toParentPoint(e,i));for(const s of t.traverseUp())isMatrixTransform(s)&&({x:e,y:i}=s.toParentPoint(e,i));return{x:e,y:i}}},sharedOffscreenCanvas,_Group=class oe extends Node{constructor(e){super(e),this.childNodes=new Set,this.dirty=!1,this.dirtyZIndex=!1,this.clipRect=void 0,this.opacity=1,this.layer=void 0,this.image=void 0,this._lastWidth=Number.NaN,this._lastHeight=Number.NaN,this._lastDevicePixelRatio=Number.NaN,this.isContainerNode=!0,this.renderToOffscreenCanvas=e?.renderToOffscreenCanvas===!0,this.optimizeForInfrequentRedraws=e?.optimizeForInfrequentRedraws===!0}static is(e){return e instanceof oe}static computeChildrenBBox(e,i=!0){return BBox.merge(Node.extractBBoxes(e,i))}static compareChildren(e,i){return compareZIndex(e.__zIndex,i.__zIndex)||e.serialNumber-i.serialNumber}containsPoint(e,i){return!0}computeBBox(){return oe.computeChildrenBBox(this.children())}computeSafeClippingBBox(e){const i=this.computeBBox();if(i?.isFinite()!==!0)return;let s=0;const n=4;for(const d of this.descendants())d instanceof Shape&&(s=Math.max(s,d.strokeWidth));const r=Math.max(1,s/2*n),{x:a,y:o}=Transformable.toCanvasPoint(this,0,0),l=alignBefore(e,a+i.x-r)-a,c=alignBefore(e,o+i.y-r)-o,h=Math.ceil(i.x+i.width-l+r),u=Math.ceil(i.y+i.height-c+r);return new BBox(l,c,h,u)}prepareSharedCanvas(e,i,s){return sharedOffscreenCanvas?.pixelRatio===s?sharedOffscreenCanvas.resize(e,i,s):sharedOffscreenCanvas=new HdpiOffscreenCanvas({width:e,height:i,pixelRatio:s}),sharedOffscreenCanvas}setScene(e){const i=this.scene;super.setScene(e),this.layer&&i&&i!==e&&(i.layersManager.removeLayer(this.layer),this.layer=void 0);for(const s of this.children())s.setScene(e)}markDirty(e){this.dirty=!0,super.markDirty(e)}markDirtyChildrenOrder(){super.markDirtyChildrenOrder(),this.dirtyZIndex=!0,this.markDirty()}append(e){for(const i of(0,import_ag_charts_core22.toIterable)(e))i.remove(),this.childNodes.add(i),i.parentNode=this,i.setScene(this.scene);this.markDirtyChildrenOrder(),this.markDirty()}appendChild(e){return this.append(e),e}removeChild(e){if(!this.childNodes?.delete(e))throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`);e.parentNode=void 0,e.setScene(),this.markDirtyChildrenOrder(),this.markDirty()}clear(){for(const e of this.children())delete e.parentNode,e.setScene();this.childNodes?.clear(),this.markDirty()}pickNode(e,i){if(!(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))){if(this.childNodes!=null&&this.childNodes.size!==0){const s=[...this.children()];for(let n=s.length-1;n>=0;n--){const a=s[n].pickNode(e,i);if(a!=null)return a}}else if(!this.isContainerNode)return this}}pickNodes(e,i,s=[]){if(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))return s;this.isContainerNode||s.push(this);for(const n of this.children())n.pickNodes(e,i,s);return s}isDirty(e){const{width:i,height:s,devicePixelRatio:n}=e,{dirty:r,layer:a}=this,o=a!=null&&(this._lastWidth!==i||this._lastHeight!==s),l=this._lastDevicePixelRatio!==n;return this._lastWidth=i,this._lastHeight=s,this._lastDevicePixelRatio=n,r||o||l}preRender(e){let i;if(this.dirty){i=super.preRender(e,0);for(const s of this.children()){const n=s.preRender(e);i.groups+=n.groups,i.nonGroups+=n.nonGroups,i.complexity+=n.complexity}i.groups+=1,i.nonGroups-=1}else i=this.childNodeCounts;return this.renderToOffscreenCanvas&&!this.optimizeForInfrequentRedraws&&i.nonGroups>0&&this.getVisibility()?this.layer??(this.layer=this.layerManager?.addLayer({name:this.name})):this.layer!=null&&(this.layerManager?.removeLayer(this.layer),this.layer=void 0),i}render(e){const{layer:i,renderToOffscreenCanvas:s}=this,n={...e},r=this.isDirty(e);if(this.dirty=!1,!s){this.renderInContext(n),super.render(n);return}const{ctx:a,stats:o,devicePixelRatio:l}=e;let{image:c}=this;if(r){c?.bitmap.close(),c=void 0;const u=i?void 0:this.computeSafeClippingBBox(l),d=(p,...g)=>{const f=p.context;n.ctx=f,p.clear(),f.save();try{f.setTransform(...g),f.globalAlpha=1,this.renderInContext(n)}finally{f.restore(),f.verifyDepthZero?.()}};if(i)d(i,a.getTransform());else if(u){const{x:p,y:g,width:f,height:y}=u,m=Math.floor(f*l),b=Math.floor(y*l);if(m>0&&b>0){const v=this.prepareSharedCanvas(f,y,l);d(v,l,0,0,l,-p*l,-g*l),c={bitmap:v.transferToImageBitmap(),x:p,y:g,width:f,height:y}}}this.image=c,o&&o.layersRendered++}else o&&o.layersSkipped++;const{globalAlpha:h}=a;if(a.globalAlpha=h*this.opacity,i){a.save();try{a.resetTransform(),i.drawImage(a)}finally{a.restore()}}else if(c){const{bitmap:u,x:d,y:p,width:g,height:f}=c;a.drawImage(u,0,0,g*l,f*l,d,p,g,f)}a.globalAlpha=h,super.render(n)}applyClip(e,i){const{x:s,y:n,width:r,height:a}=i;e.beginPath(),e.rect(s,n,r,a),e.clip()}renderInContext(e){const{ctx:i,stats:s}=e;this.dirtyZIndex&&(this.sortChildren(oe.compareChildren),this.dirtyZIndex=!1),i.save();try{i.globalAlpha*=this.opacity,this.clipRect!=null&&(this.applyClip(i,this.clipRect),e.clipBBox=Transformable.toCanvas(this,this.clipRect));for(const n of this.children()){if(!n.visible){s&&(s.nodesSkipped+=n.childNodeCounts.nonGroups+n.childNodeCounts.groups,s.opsSkipped+=n.childNodeCounts.complexity);continue}n.isolatedRender(e)}}finally{i.restore()}}sortChildren(e){if(!this.childNodes)return;const i=[...this.childNodes].sort(e);this.childNodes.clear();for(const s of i)this.childNodes.add(s)}*children(){yield*this.childNodes}*excludeChildren(e){for(const i of this.children())(e.instance&&!(i instanceof e.instance)||e.name&&i.name!==e.name)&&(yield i)}*descendants(){for(const e of this.children())yield e,e instanceof oe&&(yield*e.descendants())}setClipRect(e){this.clipRect=e?Transformable.fromCanvas(this,e):void 0}setClipRectCanvasSpace(e){this.clipRect=e}getVisibility(){for(const e of this.traverseUp(!0))if(!e.visible)return!1;return!0}toSVG(){if(!this.visible)return;const e=[],i=[];for(const s of this.children()){const n=s.toSVG();n!=null&&(i.push(...n.elements),n.defs!=null&&e.push(...n.defs))}return{elements:i,defs:e}}};_Group.className="Group",__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)({convertor:t=>(0,import_ag_charts_core22.clamp)(0,t,1)})],_Group.prototype,"opacity",2);var Group=_Group,ScalableGroup=class extends Scalable(Group){},RotatableGroup=class extends Rotatable(Group){},TranslatableGroup=class extends Translatable(Group){},TransformableGroup=class extends Rotatable(Translatable(Group)){},Mutex=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(t){return new Promise((e,i)=>{this.acquireQueue.push([t,e,i]),this.available&&this.dispatchNext().catch(i)})}async acquireImmediately(t){return this.available?(await this.acquire(t),!0):!1}async waitForClearAcquireQueue(){return this.acquire(()=>Promise.resolve(void 0))}async dispatchNext(){this.available=!1;let[t,e,i]=this.acquireQueue.shift()??[];for(;t;){try{await t(),e?.()}catch(s){i?.(s)}[t,e,i]=this.acquireQueue.shift()??[]}this.available=!0}},Observable=class{constructor(){this.eventListeners=new Map}addEventListener(t,e){if(typeof e!="function")throw new TypeError("AG Charts - listener must be a Function");const i=this.eventListeners.get(t);i?i.add(e):this.eventListeners.set(t,new Set([e]))}removeEventListener(t,e){const i=this.eventListeners.get(t);i!=null&&(i.delete(e),i.size===0&&this.eventListeners.delete(t))}hasEventListener(t){return this.eventListeners.has(t)}clearEventListeners(){this.eventListeners.clear()}fireEvent(t){const e=this.eventListeners.get(t.type);if(e)for(const i of e)i(t)}},import_ag_charts_core23=require("ag-charts-core");function debouncedAnimationFrame(t){const e=(0,import_ag_charts_core23.getWindow)();function i(n,r){return e.requestAnimationFrame(n)}function s(n){e.cancelAnimationFrame(n)}return buildScheduler(i,t,s)}function debouncedCallback(t){function e(s,n=0){if(n===0){queueMicrotask(s);return}return setTimeout(s,n)}function i(s){clearTimeout(s)}return buildScheduler(e,t,i)}function buildScheduler(t,e,i){let s=0,n=!1,r,a,o;function l(){return n}function c(){n=!1,o=void 0,a?.(),a=void 0,r=void 0,s>0&&(o=t(h))}function h(){const f=s;s=0,n=!0;const y=e({count:f});if(!y){c();return}y.then(c,c)}function u(f){s===0&&!l()&&(o=t(h,f)),s++}function d(){o!=null&&i&&(i(o),o=void 0,s=0)}async function p(){if(l())for(r??(r=new Promise(g));l();)await r}function g(f){a=f}return{schedule:u,cancel:d,waitForCompletion:p}}var import_ag_charts_core28=require("ag-charts-core"),WIDGET_HTML_EVENTS=["blur","change","contextmenu","focus","keydown","keyup","click","dblclick","mouseenter","mousemove","mouseleave","wheel","touchstart","touchmove","touchend","touchcancel"];function allocMouseEvent(t,e,i){const{offsetX:s,offsetY:n,clientX:r,clientY:a}=e,{currentX:o,currentY:l}=WidgetEventUtil.calcCurrentXY(i,e);return{type:t,device:"mouse",offsetX:s,offsetY:n,clientX:r,clientY:a,currentX:o,currentY:l,sourceEvent:e}}function allocTouchEvent(t,e,i){return{type:t,sourceEvent:e}}var WidgetAllocators={blur:t=>({type:"blur",sourceEvent:t}),change:t=>({type:"change",sourceEvent:t}),contextmenu:(t,e)=>allocMouseEvent("contextmenu",t,e),focus:t=>({type:"focus",sourceEvent:t}),keydown:t=>({type:"keydown",sourceEvent:t}),keyup:t=>({type:"keyup",sourceEvent:t}),click:(t,e)=>allocMouseEvent("click",t,e),dblclick:(t,e)=>allocMouseEvent("dblclick",t,e),mouseenter:(t,e)=>allocMouseEvent("mouseenter",t,e),mousemove:(t,e)=>allocMouseEvent("mousemove",t,e),mouseleave:(t,e)=>allocMouseEvent("mouseleave",t,e),wheel:t=>{const{offsetX:e,offsetY:i,clientX:s,clientY:n}=t,r=t.deltaMode===0?.01:1,a=t.deltaX*r,o=t.deltaY*r;return{type:"wheel",offsetX:e,offsetY:i,clientX:s,clientY:n,deltaX:a,deltaY:o,sourceEvent:t}},touchstart:(t,e)=>allocTouchEvent("touchstart",t,e),touchmove:(t,e)=>allocTouchEvent("touchmove",t,e),touchend:(t,e)=>allocTouchEvent("touchend",t,e),touchcancel:(t,e)=>allocTouchEvent("touchcancel",t,e)},WidgetEventUtil=class{static alloc(t,e,i){return WidgetAllocators[t](e,i)}static isHTMLEvent(t){return WIDGET_HTML_EVENTS.includes(t)}static calcCurrentXY(t,e){const i=t.getBoundingClientRect();return{currentX:e.clientX-i.x,currentY:e.clientY-i.y}}},import_ag_charts_core24=require("ag-charts-core"),WidgetListenerHTML=class{constructor(){this.widgetListeners={},this.sourceListeners={}}initSourceHandler(t,e){this.sourceListeners??(this.sourceListeners={}),this.sourceListeners[t]=e}lazyGetWidgetListeners(t,e){var i;if(!(t in(this.sourceListeners??{}))){const s=r=>{const a=WidgetEventUtil.alloc(t,r,e.getElement());this.dispatch(t,e,a)},n={};(t.startsWith("touch")||t==="wheel")&&(n.passive=!1),this.initSourceHandler(t,s),e.getElement().addEventListener(t,s,n)}return this.widgetListeners??(this.widgetListeners={}),(i=this.widgetListeners)[t]??(i[t]=[]),this.widgetListeners[t]}add(t,e,i){this.lazyGetWidgetListeners(t,e).push(i)}remove(t,e,i){const s=this.lazyGetWidgetListeners(t,e),n=s.indexOf(i);n>-1&&s.splice(n,1)}destroy(t){if(this.widgetListeners=void 0,this.sourceListeners){for(const[e,i]of(0,import_ag_charts_core24.entries)(this.sourceListeners))t.getElement().removeEventListener(e,i);this.sourceListeners=void 0}}dispatch(t,e,i){for(const s of this.widgetListeners?.[t]??[])s(i,e)}},import_ag_charts_core27=require("ag-charts-core"),import_ag_charts_core25=require("ag-charts-core"),MouseDragger=class{constructor(t,e,i,s){this.glob=t,this.self=e,this.window=(0,import_ag_charts_core25.getWindow)(),this.cleanup=new import_ag_charts_core25.CleanupRegistry,this.mousegeneral=l=>{l.stopPropagation(),l.stopImmediatePropagation()},this.mousemove=l=>{l.stopPropagation(),l.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mousemove(l)},this.mouseup=l=>{l.button===0&&(l.stopPropagation(),l.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mouseup(l),this.destroy())};const{window:n,mousegeneral:r,mousemove:a,mouseup:o}=this;this.cleanup.register((0,import_ag_charts_core25.attachListener)(n,"mousedown",r,{capture:!0}),(0,import_ag_charts_core25.attachListener)(n,"mouseenter",r,{capture:!0}),(0,import_ag_charts_core25.attachListener)(n,"mouseleave",r,{capture:!0}),(0,import_ag_charts_core25.attachListener)(n,"mouseout",r,{capture:!0}),(0,import_ag_charts_core25.attachListener)(n,"mouseover",r,{capture:!0}),(0,import_ag_charts_core25.attachListener)(n,"mousemove",a,{capture:!0}),(0,import_ag_charts_core25.attachListener)(n,"mouseup",o,{capture:!0})),e.mouseDragger=this,t.globalMouseDragCallbacks=i,t.globalMouseDragCallbacks.mousedown(s),s.stopPropagation(),s.stopImmediatePropagation()}destroy(){this.cleanup.flush(),this.glob.globalMouseDragCallbacks=void 0,this.self.mouseDragger=void 0}};function startMouseDrag(t,e,i,s){if(t.globalMouseDragCallbacks==null)return new MouseDragger(t,e,i,s)}var import_ag_charts_core26=require("ag-charts-core"),LONG_TAP_DURATION_MS=500,LONG_TAP_INTERRUPT_MIN_TOUCHMOVE_PXPX=100;function deltaClientSquared(t,e){const i=t.clientX-e.clientX,s=t.clientY-e.clientY;return i*i+s*s}var gIsInLongTap=!1,TouchDragger=class{constructor(t,e,i,s,n){this.glob=t,this.self=e,this.initialTouch=s,this.target=n,this.cleanup=new import_ag_charts_core26.CleanupRegistry,this.longTapInterrupted=!1,this.longtap=()=>{const{target:o,initialTouch:l}=this;if(!this.longTapInterrupted){const c=new import_ag_charts_core26.CleanupRegistry;o.dispatchEvent(new TouchEvent("touchcancel",{touches:[l],bubbles:!0})),gIsInLongTap=!0;const h=f=>f.preventDefault(),u=f=>{gIsInLongTap=!1,f.preventDefault(),c.flush()};c.register((0,import_ag_charts_core26.attachListener)(o,"touchmove",h,{passive:!1}),(0,import_ag_charts_core26.attachListener)(o,"touchend",u,{passive:!1}),(0,import_ag_charts_core26.attachListener)(o,"touchcancel",u,{passive:!1}));const{clientX:d,clientY:p}=l,g=new PointerEvent("contextmenu",{bubbles:!0,cancelable:!0,view:(0,import_ag_charts_core26.getWindow)(),clientX:d,clientY:p,pointerType:"touch"});o.dispatchEvent(g)}},this.touchmove=o=>{const{glob:l,self:c,initialTouch:h}=this,u=this.findInitialFinger(o.targetTouches);u!=null&&(this.longTapInterrupted=this.longTapInterrupted||deltaClientSquared(h,u)>LONG_TAP_INTERRUPT_MIN_TOUCHMOVE_PXPX,c.dragTouchEnabled&&l.globalTouchDragCallbacks?.touchmove(o,u))},this.touchend=o=>{this.longTapInterrupted=!0;const l=this.findInitialFinger(o.changedTouches,o.touches);l!=null&&this.glob.globalTouchDragCallbacks?.touchend(o,l),this.destroy()},this.longtapTimer=setTimeout(this.longtap,LONG_TAP_DURATION_MS);const{touchmove:r,touchend:a}=this;this.cleanup.register((0,import_ag_charts_core26.attachListener)(n,"touchmove",r,{passive:!1}),(0,import_ag_charts_core26.attachListener)(n,"touchstart",a,{passive:!1}),(0,import_ag_charts_core26.attachListener)(n,"touchend",a,{passive:!1}),(0,import_ag_charts_core26.attachListener)(n,"touchcancel",a,{passive:!1})),e.touchDragger=this,t.globalTouchDragCallbacks=i}destroy(){clearTimeout(this.longtapTimer),this.cleanup.flush(),this.glob.globalTouchDragCallbacks=void 0,this.self.touchDragger=void 0}findInitialFinger(...t){const e=t.flatMap(i=>Array.from(i));return Array.from(e).find(i=>i.identifier===this.initialTouch.identifier)}};function startOneFingerTouch(t,e,i,s,n){if(!(t.globalTouchDragCallbacks!=null||gIsInLongTap))return new TouchDragger(t,e,i,s,n)}function makeMouseDrag(t,e,i,s){const{currentX:n,currentY:r}=WidgetEventUtil.calcCurrentXY(t.getElement(),s),a=s.pageX-i.pageX,o=s.pageY-i.pageY;return{type:e,device:"mouse",offsetX:i.offsetX+a,offsetY:i.offsetY+o,clientX:s.clientX,clientY:s.clientY,currentX:n,currentY:r,originDeltaX:a,originDeltaY:o,sourceEvent:s}}function getTouchOffsets(t,{pageX:e,pageY:i}){const{x:s,y:n}=t.getElement().getBoundingClientRect();return{offsetX:e-s,offsetY:i-n}}function makeTouchDrag(t,e,i,s,n){const{currentX:r,currentY:a}=WidgetEventUtil.calcCurrentXY(t.getElement(),n),o=n.pageX-i.pageX,l=n.pageY-i.pageY;return{type:e,device:"touch",offsetX:i.offsetX+o,offsetY:i.offsetY+l,clientX:n.clientX,clientY:n.clientY,currentX:r,currentY:a,originDeltaX:o,originDeltaY:l,sourceEvent:s}}var GlobalCallbacks={},WidgetListenerInternal=class{constructor(t){this.dispatchCallback=t,this.dragTouchEnabled=!0}destroy(){this.dragTriggerRemover?.(),this.dragTriggerRemover=void 0,this.listeners?.clear(),this.mouseDragger?.destroy(),this.touchDragger?.destroy()}getListenerSet(t){this.listeners??(this.listeners=new Map);let e=this.listeners.get(t);return e===void 0&&(e=new Set,this.listeners.set(t,e)),e}add(t,e,i){switch(this.getListenerSet(t).add(i),t){case"drag-start":case"drag-move":case"drag-end":{this.registerDragTrigger(e);break}}}remove(t,e,i){this.getListenerSet(t).delete(i)}registerDragTrigger(t){if(this.dragTriggerRemover==null){const e=t.getElement(),i=new import_ag_charts_core27.CleanupRegistry;i.register((0,import_ag_charts_core27.attachListener)(e,"mousedown",s=>this.triggerMouseDrag(t,s)),(0,import_ag_charts_core27.attachListener)(e,"touchstart",s=>this.triggerTouchDrag(t,s),{passive:!1})),this.dragTriggerRemover=()=>i.flush()}}triggerMouseDrag(t,e){e.button===0&&this.startMouseDrag(t,e)}startMouseDrag(t,e){const i={pageX:Number.NaN,pageY:Number.NaN,offsetX:Number.NaN,offsetY:Number.NaN};(0,import_ag_charts_core27.partialAssign)(["pageX","pageY","offsetX","offsetY"],i,e);const s={mousedown:n=>{const r=makeMouseDrag(t,"drag-start",i,n);this.dispatch("drag-start",t,r)},mousemove:n=>{const r=makeMouseDrag(t,"drag-move",i,n);this.dispatch("drag-move",t,r)},mouseup:n=>{const r=makeMouseDrag(t,"drag-end",i,n);this.dispatch("drag-end",t,r),this.endDrag(t,r)}};this.mouseDragger=startMouseDrag(GlobalCallbacks,this,s,e)}endDrag(t,{sourceEvent:e,clientX:i,clientY:s}){const n=t.getElement(),r=n.getBoundingClientRect();(0,import_ag_charts_core27.boxContains)(r,i,s)||(n.dispatchEvent(new MouseEvent("mouseleave",e)),e.target?.dispatchEvent(new MouseEvent("mouseenter",e)))}triggerTouchDrag(t,e){const i=e.targetTouches[0];e.targetTouches.length===1&&i!=null&&this.startOneFingerTouch(t,e,i)}startOneFingerTouch(t,e,i){const s={pageX:Number.NaN,pageY:Number.NaN,...getTouchOffsets(t,i)};(0,import_ag_charts_core27.partialAssign)(["pageX","pageY"],s,i);const n={touchmove:(o,l)=>{const c=makeTouchDrag(t,"drag-move",s,o,l);this.dispatch("drag-move",t,c)},touchend:(o,l)=>{const c=makeTouchDrag(t,"drag-end",s,o,l);this.dispatch("drag-end",t,c)}},r=t.getElement();this.touchDragger=startOneFingerTouch(GlobalCallbacks,this,n,i,r);const a=makeTouchDrag(t,"drag-start",s,e,i);this.dispatch("drag-start",t,a)}dispatch(t,e,i){for(const s of this.getListenerSet(t))s(i,e);this.dispatchCallback(t,i)}},WidgetBounds=class{constructor(t){this.elem=t}setBounds(t){(0,import_ag_charts_core28.setElementBBox)(this.elemContainer??this.elem,t)}getBounds(){return(0,import_ag_charts_core28.getElementBBox)(this.elemContainer??this.elem)}static setElementContainer(t,e){const i=t.getBounds();(0,import_ag_charts_core28.setElementBBox)(e,i),(0,import_ag_charts_core28.setElementStyles)(t.elem,{width:"100%",height:"100%"}),t.elem.remove(),t.elemContainer=e,t.elemContainer.replaceChildren(t.elem)}},Widget=class extends WidgetBounds{constructor(){super(...arguments),this.index=Number.NaN,this.children=[]}set id(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"id",t)}get id(){return(0,import_ag_charts_core28.getAttribute)(this.elem,"id")}getElement(){return this.elem}getBoundingClientRect(){return this.elem.getBoundingClientRect()}get clientWidth(){return this.elem.clientWidth}get clientHeight(){return this.elem.clientHeight}destroy(){this.destroyListener?.(),this.destroyListener=void 0,this.remove();for(const t of this.children)t.parent=void 0,t.destroy();this.children.length=0,this.destructor(),this.remove(),this.internalListener?.destroy(),this.htmlListener?.destroy(this)}remove(){this.elem.remove(),this.elemContainer?.remove()}setHidden(t){(0,import_ag_charts_core28.setElementStyle)(this.elem,"display",t?"none":void 0)}isHidden(){return(0,import_ag_charts_core28.getWindow)()?.getComputedStyle?.(this.elem).display==="none"}setCursor(t){(0,import_ag_charts_core28.setElementStyle)(this.elem,"cursor",t)}setTextContent(t){this.elem.textContent=t??null}setAriaDescribedBy(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"aria-describedby",t)}setAriaHidden(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"aria-hidden",t)}setAriaLabel(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"aria-label",t)}setAriaExpanded(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"aria-expanded",t)}setAriaControls(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"aria-controls",t)}setAriaHasPopup(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"aria-haspopup",t)}setInnerHTML(t){this.elem.innerHTML=t}setPointerEvents(t){(0,import_ag_charts_core28.setElementStyle)(this.elem,"pointer-events",t)}setCSSVariable(t,e){this.elem.style.setProperty(t,e)}isDisabled(){return(0,import_ag_charts_core28.getAttribute)(this.elem,"aria-disabled",!1)}hasPopup(){const t=(0,import_ag_charts_core28.getAttribute)(this.elem,"aria-haspopup");return t!==void 0&&t!=="false"}parseFloat(t){return t===""?0:Number.parseFloat(t)}cssLeft(){return this.parseFloat(this.elem.style.left)}cssTop(){return this.parseFloat(this.elem.style.top)}cssWidth(){return this.parseFloat(this.elem.style.width)}cssHeight(){return this.parseFloat(this.elem.style.height)}focus(t){this.elem.focus(t)}setFocusOverride(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"data-focus-override",t)}setPreventsDefault(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"data-preventdefault",t)}setTabIndex(t){(0,import_ag_charts_core28.setAttribute)(this.elem,"tabindex",t)}addChild(t){this.addChildToDOM(t,this.getBefore(t)),this.children.push(t),t.index=this.children.length-1,t.parent=this,this.onChildAdded(t)}removeChild(t){const e=this.children.indexOf(t);this.children.splice(e,1),this.removeChildFromDOM(t),this.onChildRemoved(t)}moveChild(t,e){t.domIndex!==e&&(t.domIndex=e,this.removeChildFromDOM(t),this.addChildToDOM(t,this.getBefore(t)))}addClass(...t){this.elem.classList.add(...t)}removeClass(...t){this.elem.classList.remove(...t)}toggleClass(t,e){this.elem.classList.toggle(t,e)}appendOrInsert(t,e){e?e.getElement().insertAdjacentElement("beforebegin",t):this.elem.appendChild(t)}addChildToDOM(t,e){this.appendOrInsert(t.getElement(),e)}removeChildFromDOM(t){t.getElement().remove()}onChildAdded(t){}onChildRemoved(t){}getBefore({domIndex:t}){if(t!==void 0)return this.children.filter(e=>e.domIndex!==void 0&&e.domIndex>t).reduce((e,i)=>!e||i.domIndex<e.domIndex?i:e,void 0)}addListener(t,e){return WidgetEventUtil.isHTMLEvent(t)?(this.htmlListener??(this.htmlListener=new WidgetListenerHTML),this.htmlListener.add(t,this,e)):(this.internalListener??(this.internalListener=new WidgetListenerInternal(this.onDispatch.bind(this))),this.internalListener.add(t,this,e)),()=>this.removeListener(t,e)}removeListener(t,e){WidgetEventUtil.isHTMLEvent(t)?this.htmlListener?.remove(t,this,e):this.htmlListener!=null&&this.internalListener?.remove(t,this,e)}setDragTouchEnabled(t){this.internalListener??(this.internalListener=new WidgetListenerInternal(this.onDispatch.bind(this))),this.internalListener.dragTouchEnabled=t}onDispatch(t,e){if(!e.sourceEvent?.bubbles)return;let{parent:i}=this;for(;i!=null;){const{internalListener:s}=i;if(s!=null){const n={...e,...WidgetEventUtil.calcCurrentXY(i.getElement(),e)};s.dispatch(t,i,n)}i=i.parent}}static addWindowEvent(t,e){const i=s=>{s.persisted||e()};return(0,import_ag_charts_core28.attachListener)((0,import_ag_charts_core28.getWindow)(),"pagehide",i)}},import_ag_charts_core33=require("ag-charts-core"),import_ag_charts_core30=require("ag-charts-core"),drawCorner=(t,{x0:e,y0:i,x1:s,y1:n,cx:r,cy:a},o,l)=>{if(l&&t.moveTo(e,i),e!==s||i!==n){const c=Math.atan2(i-a,e-r),h=Math.atan2(n-a,s-r);t.arc(r,a,o,c,h)}else t.lineTo(e,i)},import_ag_charts_core29=require("ag-charts-core"),Path=class extends Shape{constructor(){super(...arguments),this.path=new ExtendedPath2D,this._clipX=Number.NaN,this._clipY=Number.NaN,this.clip=!1,this._dirtyPath=!0,this.lastPixelRatio=Number.NaN}set clipX(t){this._clipX=t,this.dirtyPath=!0}set clipY(t){this._clipY=t,this.dirtyPath=!0}set dirtyPath(t){this._dirtyPath!==t&&(this._dirtyPath=t,t&&this.markDirty("path"))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){this._dirtyPath||(this.dirtyPath=this.path.isDirty()||(this.fillShadow?.isDirty()??!1)||(this._clipPath?.isDirty()??!1))}resetPathDirty(){this.path.clear(!0),this._dirtyPath=!1}isPathDirty(){return this.path.isDirty()}onChangeDetection(t){this._dirtyPath||(this._dirtyPath=!0,super.onChangeDetection(t))}computeBBox(){return this.updatePathIfDirty(),this.path.computeBBox()}isPointInPath(t,e){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(t,e)}distanceSquared(t,e){return this.distanceSquaredTransformedPoint(t,e)}svgPathData(t){return this.updatePathIfDirty(),this.path.toSVG(t)}distanceSquaredTransformedPoint(t,e){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(t,e)?0:this.path.distanceSquared(t,e)}isDirtyPath(){return!1}updatePath(){}updatePathIfDirty(){(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1)}preRender(t){return t.devicePixelRatio!==this.lastPixelRatio&&(this.dirtyPath=!0),this.lastPixelRatio=t.devicePixelRatio,this.updatePathIfDirty(),super.preRender(t,this.path.commands.length)}render(t){const{ctx:e}=t;if(this.clip&&!Number.isNaN(this._clipX)&&!Number.isNaN(this._clipY)){e.save();try{const i=this.strokeWidth/2;this._clipPath??(this._clipPath=new ExtendedPath2D),this._clipPath.clear(),this._clipPath.rect(-i,-i,this._clipX+i,this._clipY+i+i),e.clip(this._clipPath?.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(e)}finally{e.restore()}}else this._clipPath=void 0,this.drawPath(e);this.fillShadow?.markClean(),super.render(t)}drawPath(t){this.fillStroke(t,this.path.getPath2D())}toSVG(){if(!this.visible)return;const t=(0,import_ag_charts_core29.createSvgElement)("path");t.setAttribute("d",this.svgPathData());const e=this.applySvgFillAttributes(t,[]);return this.applySvgStrokeAttributes(t),{elements:[t],defs:e}}};Path.className="Path",__decorateClass([(0,import_ag_charts_core29.SceneChangeDetection)()],Path.prototype,"clip",2),__decorateClass([(0,import_ag_charts_core29.SceneChangeDetection)()],Path.prototype,"clipX",1),__decorateClass([(0,import_ag_charts_core29.SceneChangeDetection)()],Path.prototype,"clipY",1);function cornerEdges(t,e,i,s,n){let r=!1,a=!1,o=s-Math.sqrt(Math.max(n**2-i**2,0)),l=0,c=0,h=i-Math.sqrt(Math.max(n**2-s**2,0));return o>t?(r=!0,o=t,l=i-Math.sqrt(Math.max(n**2-(s-t)**2))):(0,import_ag_charts_core30.isNumberEqual)(o,0)&&(o=0),h>e?(a=!0,c=s-Math.sqrt(Math.max(n**2-(i-e)**2)),h=e):(0,import_ag_charts_core30.isNumberEqual)(h,0)&&(h=0),{leading0:o,leading1:l,trailing0:c,trailing1:h,leadingClipped:r,trailingClipped:a}}function clippedRoundRect(t,e,i,s,n,r,a){let{topLeft:o,topRight:l,bottomRight:c,bottomLeft:h}=r;const u=Math.max(o+h,l+c),d=Math.max(o+l,h+c);if(u<=0&&d<=0){if(a==null)t.rect(e,i,s,n);else{const D=Math.max(e,a.x),T=Math.min(e+s,a.x+a.width),A=Math.max(i,a.y),L=Math.min(i+n,a.y+a.height);t.rect(D,A,T-D,L-A)}return}else if(a==null&&o===l&&o===c&&o===h){t.roundRect(e,i,s,n,o);return}if(s<0&&(e+=s,s=Math.abs(s)),n<0&&(i+=n,n=Math.abs(n)),s<=0||n<=0)return;if(a==null)a=new BBox(e,i,s,n);else{const D=Math.max(e,a.x),T=Math.min(e+s,a.x+a.width),A=Math.max(i,a.y),L=Math.min(i+n,a.y+a.height);a=new BBox(D,A,T-D,L-A)}const p=Math.max(u/n,d/s,1);p>1&&(o/=p,l/=p,c/=p,h/=p);let g=!0,f=!0,y=!0,m=!0,b,v,x,S;if(g){const D=cornerEdges(a.height,a.width,Math.max(e+o-a.x,0),Math.max(i+o-a.y,0),o);D.leadingClipped&&(m=!1),D.trailingClipped&&(f=!1);const T=Math.max(a.x+D.leading1,a.x),A=Math.max(a.y+D.leading0,a.y),L=Math.max(a.x+D.trailing1,a.x),N=Math.max(a.y+D.trailing0,a.y),k=e+o,w=i+o;b={x0:T,y0:A,x1:L,y1:N,cx:k,cy:w}}if(f){const D=cornerEdges(a.width,a.height,Math.max(i+l-a.y,0),Math.max(a.x+a.width-(e+s-l),0),l);D.leadingClipped&&(g=!1),D.trailingClipped&&(y=!1);const T=Math.min(a.x+a.width-D.leading0,a.x+a.width),A=Math.max(a.y+D.leading1,a.y),L=Math.min(a.x+a.width-D.trailing0,a.x+a.width),N=Math.max(a.y+D.trailing1,a.y),k=e+s-l,w=i+l;v={x0:T,y0:A,x1:L,y1:N,cx:k,cy:w}}if(y){const D=cornerEdges(a.height,a.width,Math.max(a.x+a.width-(e+s-c),0),Math.max(a.y+a.height-(i+n-c),0),c);D.leadingClipped&&(f=!1),D.trailingClipped&&(m=!1);const T=Math.min(a.x+a.width-D.leading1,a.x+a.width),A=Math.min(a.y+a.height-D.leading0,a.y+a.height),L=Math.min(a.x+a.width-D.trailing1,a.x+a.width),N=Math.min(a.y+a.height-D.trailing0,a.y+a.height),k=e+s-c,w=i+n-c;x={x0:T,y0:A,x1:L,y1:N,cx:k,cy:w}}if(m){const D=cornerEdges(a.width,a.height,Math.max(a.y+a.height-(i+n-h),0),Math.max(e+h-a.x,0),h);D.leadingClipped&&(y=!1),D.trailingClipped&&(g=!1);const T=Math.max(a.x+D.leading0,a.x),A=Math.min(a.y+a.height-D.leading1,a.y+a.height),L=Math.max(a.x+D.trailing0,a.x),N=Math.min(a.y+a.height-D.trailing1,a.y+a.height),k=e+h,w=i+n-h;S={x0:T,y0:A,x1:L,y1:N,cx:k,cy:w}}let I=!1;g&&b!=null&&(drawCorner(t,b,o,!I),I||(I=!0)),f&&v!=null&&(drawCorner(t,v,l,!I),I||(I=!0)),y&&x!=null&&(drawCorner(t,x,c,!I),I||(I=!0)),m&&S!=null&&drawCorner(t,S,h,!I),t.closePath()}var Rect=class extends Path{constructor(){super(...arguments),this.borderPath=new ExtendedPath2D,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=this.__strokeWidth,this.effectiveStrokeWidth=this.__strokeWidth,this.hittester=super.isPointInPath.bind(this),this.distanceCalculator=super.distanceSquaredTransformedPoint.bind(this),this.microPixelEffectOpacity=1}set cornerRadius(t){this.topLeftCornerRadius=t,this.topRightCornerRadius=t,this.bottomRightCornerRadius=t,this.bottomLeftCornerRadius=t}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.__strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){const{path:t,borderPath:e,__crisp:i,__topLeftCornerRadius:s,__topRightCornerRadius:n,__bottomRightCornerRadius:r,__bottomLeftCornerRadius:a}=this;let{__x:o,__y:l,__width:c,__height:h,__strokeWidth:u,__clipBBox:d}=this;const g=1/(this.layerManager?.canvas.pixelRatio??1);let f=1;if(t.clear(),e.clear(),c===0||h===0){this.effectiveStrokeWidth=0,this.lastUpdatePathStrokeWidth=0,this.microPixelEffectOpacity=0;return}if(i&&(c<=g&&(f*=c/g),h<=g&&(f*=h/g),c=this.align(o,c),h=this.align(l,h),o=this.align(o),l=this.align(l),d=d==null?void 0:new BBox(this.align(d.x),this.align(d.y),this.align(d.x,d.width),this.align(d.y,d.height))),u)if(c<g){const m=o+g/2;e.moveTo(m,l),e.lineTo(m,l+h),u=g,this.borderClipPath=void 0}else if(h<g){const m=l+g/2;e.moveTo(o,m),e.lineTo(o+c,m),u=g,this.borderClipPath=void 0}else if(u<c&&u<h){const m=u/2;o+=m,l+=m,c-=u,h-=u;const b=d?.clone().shrink(m),v={topLeft:s>0?s-u:0,topRight:n>0?n-u:0,bottomRight:r>0?r-u:0,bottomLeft:a>0?a-u:0};this.borderClipPath=void 0,c>0&&h>0&&(b==null||b?.width>0&&b?.height>0)&&(clippedRoundRect(t,o,l,c,h,v,b),clippedRoundRect(e,o,l,c,h,v,b))}else this.borderClipPath=this.borderClipPath??new ExtendedPath2D,this.borderClipPath.clear(),this.borderClipPath.rect(o,l,c,h),e.rect(o,l,c,h);else{const m={topLeft:s,topRight:n,bottomRight:r,bottomLeft:a};this.borderClipPath=void 0,clippedRoundRect(t,o,l,c,h,m,d)}if([s,n,r,a].every(areCornersZero)){let m=function(x,S){return v.getBBox().distanceSquared(x,S)};var y=m;const b=this.getBBox();this.hittester=b.containsPoint.bind(b);const v=this;this.distanceSquared=m}else this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint;this.effectiveStrokeWidth=u,this.lastUpdatePathStrokeWidth=u,this.microPixelEffectOpacity=f}computeBBox(){const{__x:t,__y:e,__width:i,__height:s,__clipBBox:n}=this;return n?.clone()??new BBox(t,e,i,s)}isPointInPath(t,e){return this.hittester(t,e)}get midPoint(){return{x:this.__x+this.__width/2,y:this.__y+this.__height/2}}setStaticProperties(t,e,i,s,n,r,a,o){this.__drawingMode=t,this.__topLeftCornerRadius=e,this.__topRightCornerRadius=i,this.__bottomRightCornerRadius=s,this.__bottomLeftCornerRadius=n,this.__visible=r,this.__crisp=a,this.__fillShadow=o,this.dirtyPath=!0,this.markDirty()}resetAnimationProperties(t,e,i,s,n,r){this.__x=t,this.__y=e,this.__width=i,this.__height=s,this.__opacity=n,this.__clipBBox=r,this.dirtyPath=!0,this.markDirty()}distanceSquared(t,e){return this.distanceCalculator(t,e)}applyFillAndAlpha(t){super.applyFillAndAlpha(t),t.globalAlpha*=this.microPixelEffectOpacity}applyStrokeAndAlpha(t){super.applyStrokeAndAlpha(t),t.globalAlpha*=this.microPixelEffectOpacity}renderStroke(t){const{stroke:e,effectiveStrokeWidth:i}=this;if(e&&i){const{globalAlpha:s}=t,{lineDash:n,lineDashOffset:r,lineCap:a,lineJoin:o,borderPath:l,borderClipPath:c}=this;c&&t.clip(c.getPath2D()),this.applyStrokeAndAlpha(t),t.lineWidth=i,n&&t.setLineDash(n),r&&(t.lineDashOffset=r),a&&(t.lineCap=a),o&&(t.lineJoin=o),t.stroke(l.getPath2D()),t.globalAlpha=s}}};Rect.className="Rect",__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"x",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"y",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"width",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"height",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"topLeftCornerRadius",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"topRightCornerRadius",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"bottomRightCornerRadius",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"bottomLeftCornerRadius",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)({equals:import_ag_charts_core30.boxesEqual})],Rect.prototype,"clipBBox",2),__decorateClass([(0,import_ag_charts_core30.DeclaredSceneChangeDetection)()],Rect.prototype,"crisp",2);function areCornersZero(t){return t===0}var import_ag_charts_core32=require("ag-charts-core"),import_ag_charts_core31=require("ag-charts-core"),StatsAccumulator=class{constructor(){this.stats=new Map,this.lastLogTime=Date.now(),this.LOG_INTERVAL_MS=1e4,this.startPeriodicLogging()}startPeriodicLogging(){import_ag_charts_core31.Debug.check("scene:stats","scene:stats:verbose")&&(this.stopPeriodicLogging(),this.intervalId=setInterval(()=>{this.logAccumulatedStats()},this.LOG_INTERVAL_MS))}stopPeriodicLogging(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0)}recordTiming(t,e){const i=this.stats.get(t);i?(i.min=Math.min(i.min,e),i.max=Math.max(i.max,e),i.sum+=e,i.count+=1):this.stats.set(t,{min:e,max:e,sum:e,count:1})}recordTimings(t){for(const[e,i]of Object.entries(t))e!=="start"&&typeof i=="number"&&this.recordTiming(e,i)}logAccumulatedStats(){if(this.stats.size===0)return;const t=(Date.now()-this.lastLogTime)/1e3,e=Array.from(this.stats.keys()).sort((r,a)=>r==="\u23F1\uFE0F"?-1:a==="\u23F1\uFE0F"?1:r.localeCompare(a)),i=[];for(const r of e){const a=this.stats.get(r),o=a.sum/a.count;i.push(`${r}[${a.min.toFixed(1)}/${o.toFixed(1)}/${a.max.toFixed(1)}]ms`)}const n=this.stats.get("\u23F1\uFE0F")?.count??0;import_ag_charts_core31.Logger.log(`\u{1F4CA} Stats (${t.toFixed(0)}s, ${n} renders): ${i.join(" ")}`),this.stats.clear(),this.lastLogTime=Date.now()}destroy(){this.stopPeriodicLogging(),this.stats.clear()}},globalStatsAccumulator,statsAccumulatorConsumers=0;function getStatsAccumulator(){return globalStatsAccumulator??(globalStatsAccumulator=new StatsAccumulator),globalStatsAccumulator}function registerDebugStatsConsumer(){statsAccumulatorConsumers++;let t=!1;return()=>{t||statsAccumulatorConsumers===0||(t=!0,statsAccumulatorConsumers--,statsAccumulatorConsumers===0&&cleanupDebugStats())}}function formatBytes(t){for(const e of["B","KB","MB","GB"]){if(t<1536)return`${t.toFixed(1)}${e}`;t/=1024}return`${t.toFixed(1)}TB}`}function memoryUsage(){if(!("memory"in performance))return;const{totalJSHeapSize:t,usedJSHeapSize:e,jsHeapSizeLimit:i}=performance.memory,s=[];for(const n of[e,t,i])typeof n=="number"&&s.push(formatBytes(n));return`Heap ${s.join(" / ")}`}function debugStats(t,e,i,s,n={},r=BBox.zero,a){if(!import_ag_charts_core31.Debug.check("scene:stats","scene:stats:verbose"))return;const{layersRendered:o=0,layersSkipped:l=0,nodesRendered:c=0,nodesSkipped:h=0,opsPerformed:u=0,opsSkipped:d=0}=s??{},p=performance.now(),{start:g,...f}=e,y=p-g,m=getStatsAccumulator();m.recordTimings(f),m.recordTiming("\u23F1\uFE0F",y);const b=Object.entries(f).map(([P,F])=>time2(P,F)).filter(P=>P!=null).join(" + "),v=Object.entries(n).map(([P,F])=>`${P}: ${JSON.stringify(F)}`).join(" ; "),x=import_ag_charts_core31.Debug.check("scene:stats:verbose"),S=x?memoryUsage():null,I=x?import_ag_charts_core31.DebugMetrics.flush():{},D=Object.entries(I),T=[],A=[];for(const[P,F]of D)P.endsWith(":aggregation")&&Array.isArray(F)?T.push(`${P.replace(":aggregation","")}(${F.join(",")})`):P.endsWith(":nodeData")&&typeof F=="number"&&A.push(`${P.replace(":nodeData","")}(${F})`);const L=T.length>0?`Aggregation: ${T.join(", ")}`:null,N=A.length>0?`NodeData: ${A.join(", ")}`:null,k=[`${time2("\u23F1\uFE0F",g,p)} (${b})`,`${v}`,L,N,`Layers: ${x?pct(o,l):t.size}`,x?`Nodes: ${pct(c,h)}`:null,x?`Ops: ${pct(u,d)}`:null,S].filter(import_ag_charts_core31.isString),w=new import_ag_charts_core31.TextMeasurer(i),E=new Map(k.map(P=>[P,w.measureText(P)])),O=Math.max(...Array.from(E.values(),P=>P.width)),R=accumulate(E.values(),P=>P.height),_=2+r.x;i.save();try{i.fillStyle=a?.background??"white",i.fillRect(_,0,O,R),i.fillStyle=a?.foreground??"black";let P=0;for(const[F,V]of E.entries())P+=V.height,i.fillText(F,_,P)}catch(P){import_ag_charts_core31.Logger.warnOnce("Error during debug stats rendering",P)}finally{i.restore()}}function prepareSceneNodeHighlight(t){const e=(0,import_ag_charts_core31.toArray)((0,import_ag_charts_core31.getWindow)("agChartsSceneDebug")),i=[];for(const s of e)s==="layout"?i.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):i.push(s);t.debugNodeSearch=i}function debugSceneNodeHighlight(t,e){t.save();try{for(const[i,s]of Object.entries(e)){const n=Transformable.toCanvas(s);if(!n){import_ag_charts_core31.Logger.log(`Scene.render() - no bbox for debugged node [${i}].`);continue}t.globalAlpha=.8,t.strokeStyle="red",t.lineWidth=1,t.strokeRect(n.x,n.y,n.width,n.height),t.fillStyle="red",t.strokeStyle="white",t.font="16px sans-serif",t.textBaseline="top",t.textAlign="left",t.lineWidth=2,t.strokeText(i,n.x,n.y,n.width),t.fillText(i,n.x,n.y,n.width)}}catch(i){import_ag_charts_core31.Logger.warnOnce("Error during debug rendering",i)}finally{t.restore()}}var skippedProperties=new Set,allowedProperties=new Set(["gradient","zIndex","clipRect","cachedBBox","childNodeCounts","path","__zIndex","name","__scalingCenterX","__scalingCenterY","__rotationCenterX","__rotationCenterY","_previousDatum","__fill","__lineDash","borderPath","borderClipPath","_clipPath"]);function nodeProps(t){const{...e}=t;for(const i of Object.keys(e))allowedProperties.has(i)||typeof e[i]!="number"&&typeof e[i]!="string"&&typeof e[i]!="boolean"&&(skippedProperties.add(i),delete e[i]);return e}function buildTree(t,e){if(!import_ag_charts_core31.Debug.check(!0,"scene"))return{};let i=0;return{node:e==="json"?nodeProps(t):t,name:t.name??t.id,dirty:t instanceof Group?t.dirty:void 0,...Array.from(t instanceof Group?t.children():[],s=>buildTree(s,e)).reduce((s,n)=>{let{name:r}=n;const{node:{visible:a,opacity:o,zIndex:l,translationX:c,translationY:h,rotation:u,scalingX:d,scalingY:p},node:g}=n;(!a||o<=0)&&(r=`(${r})`),Group.is(g)&&g.renderToOffscreenCanvas&&(r=`*${r}*`);const f=Array.isArray(l)?`(${l.join(", ")})`:l,y=[`${(i++).toString().padStart(3,"0")}|`,`${r??"<unknown>"}`,`z: ${f}`,c&&`x: ${c}`,h&&`y: ${h}`,u&&`r: ${u}`,d!=null&&d!==1&&`sx: ${d}`,p!=null&&p!==1&&`sy: ${p}`].filter(v=>!!v).join(" ");let m=y,b=1;for(;s[m]!=null&&b<100;)m=`${y} (${b++})`;return s[m]=n,s},{})}}function buildDirtyTree(t){const e=t instanceof Group?t.dirty:void 0;if(!e)return{dirtyTree:{},paths:[]};const i=Array.from(t instanceof Group?t.children():[],r=>buildDirtyTree(r)).filter(r=>r.paths.length>0),s=Group.is(t)?t.name??t.id:t.id,n=i.length?i.flatMap(r=>r.paths).map(r=>`${s}.${r}`):[s];return{dirtyTree:{name:s,node:t,dirty:e,...i.map(r=>r.dirtyTree).filter(r=>r.dirty!=null).reduce((r,a)=>(r[a.name??"<unknown>"]=a,r),{})},paths:n}}function pct(t,e){const i=t+e;return`${t} / ${i} (${Math.round(100*t/i)}%)`}function time2(t,e,i){const s=i==null?e:i-e;return`${t}: ${Math.round(s*100)/100}ms`}function accumulate(t,e){let i=0;for(const s of t)i+=e(s);return i}function cleanupDebugStats(t=!1){if(!globalStatsAccumulator){t&&(statsAccumulatorConsumers=0);return}!t&&statsAccumulatorConsumers>0||(globalStatsAccumulator.destroy(),globalStatsAccumulator=void 0,t&&(statsAccumulatorConsumers=0))}var _Text=class q extends Shape{constructor(e){super(e),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontCache=void 0,this.fontSize=q.defaultFontSize,this.fontFamily="sans-serif",this.textAlign="start",this.textBaseline="alphabetic",this.boxPadding=0,this.trimText=e?.trimText??!0}onTextChange(){if(this.richText?.clear(),this.textMap?.clear(),(0,import_ag_charts_core32.isArray)(this.text))this.lines=[],this.richText??(this.richText=new Group),this.richText.setScene(this.scene),this.richText.append(this.text.flatMap(e=>(0,import_ag_charts_core32.toTextString)(e.text).split(import_ag_charts_core32.LineSplitter)).filter(Boolean).map(()=>new q({trimText:!1})));else{const e=(0,import_ag_charts_core32.toTextString)(this.text).split(import_ag_charts_core32.LineSplitter);this.lines=this.trimText?e.map(i=>i.trim()):e}}get font(){return this.fontCache??(this.fontCache=(0,import_ag_charts_core32.toFontString)(this)),this.fontCache}static measureBBox(e,i,s,n){if((0,import_ag_charts_core32.isArray)(e)){const{font:r,lineHeight:a,textAlign:o,textBaseline:l}=n,{width:c,height:h,lineMetrics:u}=(0,import_ag_charts_core32.measureTextSegments)(e,r),d=a?a*u.length:h,p=q.calcTopOffset(d,u[0],l),g=q.calcLeftOffset(c,o);return new BBox(i-g,s-p,c,d)}else return q.computeBBox((0,import_ag_charts_core32.toTextString)(e).split(import_ag_charts_core32.LineSplitter),i,s,n)}static computeBBox(e,i,s,n){const{font:r,lineHeight:a,textAlign:o,textBaseline:l}=n,{width:c,height:h,lineMetrics:u}=(0,import_ag_charts_core32.cachedTextMeasurer)(r).measureLines(e),d=a?a*u.length:h,p=q.calcTopOffset(d,u[0],l),g=q.calcLeftOffset(c,o);return new BBox(i-g,s-p,c,d)}static calcTopOffset(e,i,s){switch(s){case"alphabetic":return i?.ascent??0;case"middle":return e/2;case"bottom":return e;default:return 0}}static calcSegmentedTopOffset(e,i,s){switch(s){case"alphabetic":return i[0]?.ascent??0;case"middle":return i.length===1?i[0].ascent+i[0].segments.reduce((n,r)=>Math.min(n,(0,import_ag_charts_core32.cachedTextMeasurer)(r).baselineDistance("middle")),0):e/2;case"bottom":return e;default:return 0}}static calcLeftOffset(e,i){let s=0;switch(i){case"center":s=.5;break;case"right":case"end":s=1}return e*s}getBBox(){const e=super.getBBox();if(!this.textMap?.size||!(0,import_ag_charts_core32.isArray)(this.text))return e;const{height:i,lineMetrics:s}=(0,import_ag_charts_core32.measureTextSegments)(this.text,this),n=q.calcSegmentedTopOffset(i,s,this.textBaseline),r=this.y-n;return e.y===r?e:new BBox(e.x,r,e.width,e.height)}computeBBox(){if(this.generateTextMap(),this.textMap?.size){const o=BBox.merge(this.textMap.values());return o.x=this.x-q.calcLeftOffset(o.width,this.textAlign),o.y=this.y,o}const{x:e,y:i,lines:s,textBaseline:n,textAlign:r}=this,a=q.computeBBox(s,e,i,{font:this,textBaseline:n,textAlign:r});return this.boxing!=null&&a.grow(this.boxPadding),a}getTextMeasureBBox(){return this.computeBBox()}getPlainText(){return(0,import_ag_charts_core32.toPlainText)(this.text)}isPointInPath(e,i){return this.getBBox()?.containsPoint(e,i)??!1}setScene(e){this.richText?.setScene(e),super.setScene(e)}generateTextMap(){if(!(0,import_ag_charts_core32.isArray)(this.text)||this.textMap?.size)return;this.textMap??(this.textMap=new Map);let e=0;const i=this.richText.children();for(const{width:s,height:n,ascent:r,segments:a}of(0,import_ag_charts_core32.measureTextSegments)(this.text,this).lineMetrics){let o=0;for(const{color:l,textMetrics:c,...h}of a){const u=i.next().value;u.x=this.x-s/2+o,u.y=r+e,u.setProperties({...h,fill:l??this.fill});const d=u.getBBox();this.textMap.set(u,d),o+=c.width}e+=n}}render(e){const{ctx:i,stats:s}=e;if(!this.layerManager||!this.hasRenderableText())return s&&(s.nodesSkipped+=1),super.render(e);if((0,import_ag_charts_core32.isArray)(this.text)&&this.richText){this.generateTextMap();const n=this.richText.getBBox(),{width:r,height:a,lineMetrics:o}=(0,import_ag_charts_core32.measureTextSegments)(this.text,this);let l=0;switch(this.textAlign){case"left":case"start":l=r/2;break;case"right":case"end":l=r/-2}const c=this.y-q.calcSegmentedTopOffset(a,o,this.textBaseline);this.renderBoxing(e,n.clone().translate(l,c)),i.save(),i.translate(l,c),this.richText.opacity=this.opacity,this.richText.render(e),i.restore()}else this.renderText(e);if(q.debug.check()){const n=this.getBBox();i.lineWidth=this.textMap?.size?2:1,i.strokeStyle=this.textMap?.size?"blue":"red",i.strokeRect(n.x,n.y,n.width,n.height)}super.render(e)}markDirty(e){return this.textMap?.clear(),super.markDirty(e)}renderText(e){const{fill:i,stroke:s,strokeWidth:n,font:r,textAlign:a}=this;if(!i&&!(s&&n)||!this.layerManager)return super.render(e);const{ctx:o}=e;o.font!==r&&(o.font=r),o.textAlign=a,this.renderBoxing(e),this.fillStroke(o)}renderBoxing(e,i){if(!this.boxing)return;const s=i??q.computeBBox(this.lines,this.x,this.y,this);if(s.width===0||s.height===0)return;const{x:n,y:r,width:a,height:o}=s.grow(this.boxPadding);this.boxing.opacity=this.opacity,this.boxing.x=n,this.boxing.y=r,this.boxing.width=a,this.boxing.height=o,this.boxing.preRender(e),this.boxing.render(e)}executeFill(e){this.renderLines((i,s,n)=>e.fillText(i,s,n))}executeStroke(e){this.renderLines((i,s,n)=>e.strokeText(i,s,n))}renderLines(e){const{x:i,y:s,lines:n}=this;if(!Number.isFinite(i)||!Number.isFinite(s))return;const r=(0,import_ag_charts_core32.cachedTextMeasurer)(this),{lineMetrics:a}=r.measureLines(n),{textBaseline:o,lineHeight:l=r.lineHeight()}=this;let c=0;o==="top"?c=a[0].ascent:(o==="middle"||o==="bottom")&&(c=l*(1-n.length),o==="middle"?(c/=2,c-=r.baselineDistance(o)):c-=a[0].descent);for(const h of a)e(h.text,i,s+c),c+=l}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}setBoxing(e){const i=e.border?.enabled?e.border?.stroke:void 0;e.fill!=null||i!=null?(this.boxing??(this.boxing=new Rect({scene:this.scene})),this.boxing.fill=e.fill,this.boxing.fillOpacity=e.fillOpacity??1,this.boxing.cornerRadius=e.cornerRadius??0,this.boxing.stroke=i,this.boxing.strokeWidth=e.border?.strokeWidth??0,this.boxing.strokeOpacity=e.border?.strokeOpacity??1,this.boxPadding=e.padding??0):this.boxing&&(this.boxing.destroy(),this.boxing=void 0)}getBoxingProperties(){const{fill:e,fillOpacity:i,cornerRadius:s,stroke:n,strokeWidth:r,strokeOpacity:a}=this.boxing??{};return{border:{enabled:n!=null,stroke:n,strokeWidth:r,strokeOpacity:a},cornerRadius:s,fill:e,fillOpacity:i,padding:this.boxPadding}}toSVG(){if(!this.visible||!this.hasRenderableText())return;const e=this.text;if(e==null)return;const i=(0,import_ag_charts_core32.createSvgElement)("text");if((0,import_ag_charts_core32.isArray)(e))for(const s of e){const n=(0,import_ag_charts_core32.createSvgElement)("tspan");setSvgFontAttributes(n,{fontSize:s.fontSize??this.fontSize,fontFamily:s.fontFamily??this.fontFamily,fontWeight:s.fontWeight??this.fontWeight,fontStyle:s.fontStyle??this.fontStyle}),this.applySvgFillAttributes(n),n.textContent=(0,import_ag_charts_core32.toTextString)(s.text),i.append(n)}else this.applySvgFillAttributes(i),setSvgFontAttributes(i,this),i.setAttribute("text-anchor",{center:"middle",left:"start",right:"end",start:"start",end:"end"}[this.textAlign??"start"]),i.setAttribute("alignment-baseline",this.textBaseline),i.setAttribute("x",String(this.x)),i.setAttribute("y",String(this.y)),i.textContent=(0,import_ag_charts_core32.toTextString)(e);return{elements:[i]}}hasRenderableText(){const{text:e}=this;return e==null?!1:(0,import_ag_charts_core32.isArray)(e)?!0:(0,import_ag_charts_core32.toTextString)(e)!==""}};_Text.className="Text",_Text.debug=import_ag_charts_core32.Debug.create(!0,"scene:text"),_Text.defaultFontSize=10,__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],_Text.prototype,"x",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],_Text.prototype,"y",2),__decorateClass([(0,import_ag_charts_core32.SceneRefChangeDetection)({changeCb:t=>t.onTextChange()})],_Text.prototype,"text",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)({changeCb:t=>{t.fontCache=void 0}})],_Text.prototype,"fontStyle",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)({changeCb:t=>{t.fontCache=void 0}})],_Text.prototype,"fontWeight",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)({changeCb:t=>{t.fontCache=void 0}})],_Text.prototype,"fontSize",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)({changeCb:t=>{t.fontCache=void 0}})],_Text.prototype,"fontFamily",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],_Text.prototype,"textAlign",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],_Text.prototype,"textBaseline",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],_Text.prototype,"lineHeight",2);var Text=_Text,RotatableText=class extends Rotatable(Text){},TransformableText=class extends Rotatable(Translatable(Text)){},Background=class extends import_ag_charts_core33.AbstractModuleInstance{constructor(t){super(),this.ctx=t,this.rectNode=new Rect,this.textNode=new Text,this.fill="white",this.node=this.createNode(),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.cleanup.register(t.scene.attachNode(this.node),t.eventsHub.on("layout:complete",e=>this.onLayoutComplete(e)))}createNode(){return new Group({name:"background",zIndex:import_ag_charts_core33.ZIndexMap.CHART_BACKGROUND})}onLayoutComplete(t){const{width:e,height:i}=t.chart;this.rectNode.width=e,this.rectNode.height=i}};__decorateClass([import_ag_charts_core33.Property,(0,import_ag_charts_core33.ProxyPropertyOnWrite)("node","visible")],Background.prototype,"visible",2),__decorateClass([import_ag_charts_core33.Property,(0,import_ag_charts_core33.ProxyPropertyOnWrite)("rectNode","fill")],Background.prototype,"fill",2),__decorateClass([import_ag_charts_core33.Property],Background.prototype,"image",2),__decorateClass([import_ag_charts_core33.Property,(0,import_ag_charts_core33.ProxyPropertyOnWrite)("textNode")],Background.prototype,"text",2);var import_ag_charts_core34=require("ag-charts-core"),Caption=class extends import_ag_charts_core34.BaseProperties{constructor(){super(...arguments),this.id=(0,import_ag_charts_core34.createId)(this),this.node=new RotatableText({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=import_ag_charts_core34.FONT_SIZE.SMALLER,this.fontFamily="sans-serif",this.wrapping="always",this.padding=0,this.layoutStyle="block",this.truncated=!1}registerInteraction(t,e){return t.eventsHub.on("layout:complete",()=>this.updateA11yText(t,e))}computeTextWrap(t,e){const{text:i,padding:s,wrapping:n}=this,r=Math.min(this.maxWidth??1/0,t)-s*2,a=this.maxHeight??e-s*2,o={maxWidth:r,maxHeight:a,font:this,textWrap:n};if(!Number.isFinite(r)&&!Number.isFinite(a)){this.node.text=i;return}let l;(0,import_ag_charts_core34.isArray)(i)?(l=(0,import_ag_charts_core34.wrapTextSegments)(i,o),this.truncated=l.some(import_ag_charts_core34.isSegmentTruncated)):(l=(0,import_ag_charts_core34.wrapText)((0,import_ag_charts_core34.toTextString)(i),o),this.truncated=(0,import_ag_charts_core34.isTextTruncated)(l)),this.node.text=l}updateA11yText(t,e){const{proxyInteractionService:i}=t;if(!this.enabled||!this.text){this.destroyProxyText();return}const s=Transformable.toCanvas(this.node);if(!s)return;const{id:n}=this;this.proxyText==null&&(this.proxyText=i.createProxyElement({type:"text",domManagerId:n,where:e}),this.proxyTextListeners=[this.proxyText.addListener("mousemove",o=>this.handleMouseMove(t,o)),this.proxyText.addListener("mouseleave",o=>this.handleMouseLeave(t,o))]);const r=(0,import_ag_charts_core34.toPlainText)(this.text);r!==this.lastProxyTextContent&&(this.proxyText.textContent=r,this.lastProxyTextContent=r);const{lastProxyBBox:a}=this;(a==null||s.x!==a.x||s.y!==a.y||s.width!==a.width||s.height!==a.height)&&(this.proxyText.setBounds(s),this.lastProxyBBox={x:s.x,y:s.y,width:s.width,height:s.height})}handleMouseMove(t,e){if(e!=null&&this.enabled&&this.truncated){const{x:i,y:s}=Transformable.toCanvas(this.node),n=e.sourceEvent.offsetX+i,r=e.sourceEvent.offsetY+s;t.tooltipManager.updateTooltip(this.id,{canvasX:n,canvasY:r,showArrow:!1},[{type:"structured",title:(0,import_ag_charts_core34.toPlainText)(this.text)}])}}handleMouseLeave(t,e){t.tooltipManager.removeTooltip(this.id,void 0,!0)}destroy(){this.destroyProxyText()}destroyProxyText(){if(this.proxyText!=null){for(const t of this.proxyTextListeners??[])t();this.proxyTextListeners=void 0,this.proxyText.destroy(),this.proxyText=void 0,this.lastProxyTextContent=void 0,this.lastProxyBBox=void 0}}};Caption.className="Caption",Caption.SMALL_PADDING=10,__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node","visible")],Caption.prototype,"enabled",2),__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node")],Caption.prototype,"text",2),__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node")],Caption.prototype,"textAlign",2),__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node")],Caption.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node")],Caption.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node")],Caption.prototype,"fontSize",2),__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node")],Caption.prototype,"fontFamily",2),__decorateClass([import_ag_charts_core34.Property,(0,import_ag_charts_core34.ProxyPropertyOnWrite)("node","fill")],Caption.prototype,"color",2),__decorateClass([import_ag_charts_core34.Property],Caption.prototype,"spacing",2),__decorateClass([import_ag_charts_core34.Property],Caption.prototype,"maxWidth",2),__decorateClass([import_ag_charts_core34.Property],Caption.prototype,"maxHeight",2),__decorateClass([import_ag_charts_core34.Property],Caption.prototype,"wrapping",2),__decorateClass([import_ag_charts_core34.Property],Caption.prototype,"padding",2),__decorateClass([import_ag_charts_core34.Property],Caption.prototype,"layoutStyle",2);var import_ag_charts_core35=require("ag-charts-core"),ChartAxes=class extends Array{destroy(){for(const t of this)t.destroy();this.length=0}findById(t){return this.find(e=>e.id===t)}matches(t){return this.length===Object.keys(t).length&&(0,import_ag_charts_core35.every)(t,(e,i)=>(0,import_ag_charts_core35.isObject)(i)&&"type"in i&&this.findById(e)?.type===i.type)}getById(t){const e=this.findById(t);if(!e)throw new Error(`Could not find axis by id [${t}].`);return e}},CartesianChartAxes=class extends ChartAxes{get[import_ag_charts_core35.ChartAxisDirection.X](){return this.getById(import_ag_charts_core35.ChartAxisDirection.X)}get[import_ag_charts_core35.ChartAxisDirection.Y](){return this.getById(import_ag_charts_core35.ChartAxisDirection.Y)}perpendicular(t){const e=t.direction===import_ag_charts_core35.ChartAxisDirection.X?import_ag_charts_core35.ChartAxisDirection.Y:import_ag_charts_core35.ChartAxisDirection.X;return this[e]}},PolarChartAxes=class extends ChartAxes{get[import_ag_charts_core35.ChartAxisDirection.Angle](){return this.getById(import_ag_charts_core35.ChartAxisDirection.Angle)}get[import_ag_charts_core35.ChartAxisDirection.Radius](){return this.getById(import_ag_charts_core35.ChartAxisDirection.Radius)}},import_ag_charts_core36=require("ag-charts-core"),ChartCaptions=class{constructor(){this.title=new Caption,this.subtitle=new Caption,this.footnote=new Caption}positionCaptions({layoutBox:t}){const{title:e,subtitle:i,footnote:s}=this,n=t.height/10;e.enabled&&(this.positionCaption("top",e,t,n),this.shrinkLayoutByCaption("top",e,t)),i.enabled&&(this.positionCaption("top",i,t,n),this.shrinkLayoutByCaption("top",i,t)),s.enabled&&(this.positionCaption("bottom",s,t,n),this.shrinkLayoutByCaption("bottom",s,t))}positionAbsoluteCaptions(t){const{title:e,subtitle:i,footnote:s}=this,{rect:n}=t.series;for(const r of[e,i,s])if(r.layoutStyle==="overlay"){if(r.textAlign==="left")r.node.x=n.x+r.padding;else if(r.textAlign==="right"){const a=r.node.getBBox();r.node.x=n.x+n.width-a.width-r.padding}}}computeX(t,e){return t==="left"?e.x:t==="right"?e.x+e.width:e.x+e.width/2}positionCaption(t,e,i,s){if(!e.text)return;const{lineMetrics:n}=(0,import_ag_charts_core36.isArray)(e.text)?(0,import_ag_charts_core36.measureTextSegments)(e.text,e):(0,import_ag_charts_core36.cachedTextMeasurer)(e).measureLines((0,import_ag_charts_core36.toTextString)(e.text)),r=Math.max(n[0].height,s);e.node.x=this.computeX(e.textAlign,i)+e.padding,e.node.y=i.y+(t==="top"?0:i.height)+e.padding,e.node.textBaseline=t,e.computeTextWrap(i.width,r)}shrinkLayoutByCaption(t,e,i){if(e.layoutStyle==="block"){const s=e.node.getBBox().clone(),{spacing:n=0}=e;t==="bottom"&&(0,import_ag_charts_core36.isArray)(e.text)&&(s.y-=s.height),i.shrink(Math.ceil(t==="top"?s.y-i.y+s.height+n:i.y+i.height-s.y+n),t)}}};__decorateClass([import_ag_charts_core36.Property],ChartCaptions.prototype,"title",2),__decorateClass([import_ag_charts_core36.Property],ChartCaptions.prototype,"subtitle",2),__decorateClass([import_ag_charts_core36.Property],ChartCaptions.prototype,"footnote",2);var import_ag_charts_core98=require("ag-charts-core"),import_ag_charts_core37=require("ag-charts-core"),chartTypes=["candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"],ChartTypeOriginator=class{constructor(t){this.chartService=t,this.mementoOriginatorKey="chartType"}createMemento(){let t=this.chartService.publicApi?.getOptions()?.chartType;return t??(t="candlestick"),t}guardMemento(t){return t==null||chartTypes.includes(t)}restoreMemento(t,e,i){if(i==null)return;const s={chartType:i};this.chartService.publicApi?.updateDelta(s).catch(n=>import_ag_charts_core37.Logger.error("error restoring state",n))}},import_ag_charts_core38=require("ag-charts-core"),VERSION="13.1.0",NOT_FOUND=Symbol("previous-memento-not-found"),HistoryManager=class{constructor(t){this.history=[],this.historyIndex=-1,this.originators=new Map,this.clearState=new Map,this.maxHistoryLength=100,this.debug=import_ag_charts_core38.Debug.create(!0,"history"),this.cleanup=new import_ag_charts_core38.CleanupRegistry,this.cleanup.register(t.on("series:undo",this.undo.bind(this)),t.on("series:redo",this.redo.bind(this)))}destroy(){this.cleanup.flush()}addMementoOriginator(t){this.originators.set(t.mementoOriginatorKey,t),this.clearState.set(t.mementoOriginatorKey,t.createMemento()),this.debugEvent("History add originator:",t.mementoOriginatorKey)}clear(){this.debug("History clear:",Object.keys(this.originators)),this.history=[],this.historyIndex=-1;for(const[t,e]of this.originators.entries())this.clearState.set(t,e.createMemento())}record(t,...e){this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.length>this.maxHistoryLength&&(this.history=this.history.slice(-this.maxHistoryLength));const i=new Map;for(const s of e){if(!this.originators.has(s.mementoOriginatorKey))throw new Error(`Originator [${s.mementoOriginatorKey}] has not been added to the HistoryManager.`);i.set(s.mementoOriginatorKey,s.createMemento())}this.history.push({label:t,mementos:i}),this.historyIndex=this.history.length-1,this.debugEvent(`History record: [${t}]`)}undo(){const t=this.history[this.historyIndex];if(t){for(const e of t.mementos.keys()){const i=this.findPreviousMemento(e);if(i===NOT_FOUND)throw new Error(`Could not find previous memento for [${e}].`);this.restoreMemento(e,i)}this.historyIndex-=1,this.debugEvent(`History undo: [${t.label}]`)}}redo(){const t=this.history[this.historyIndex+1];if(t){for(const[e,i]of t.mementos.entries())this.restoreMemento(e,i);this.historyIndex+=1,this.debugEvent(`History redo: [${t.label}]`)}}findPreviousMemento(t){for(let e=this.historyIndex-1;e>=0;e--)if(this.history[e].mementos.has(t))return this.history[e].mementos.get(t);return this.clearState.has(t)?this.clearState.get(t):NOT_FOUND}restoreMemento(t,e){this.originators.get(t)?.restoreMemento(VERSION,VERSION,e)}debugEvent(...t){this.debug(...t,this.history.map((e,i)=>i===this.historyIndex?`** ${e.label} **`:e.label))}},import_ag_charts_core39=require("ag-charts-core"),StateManager=class{constructor(){this.caretaker=new import_ag_charts_core39.MementoCaretaker(VERSION),this.state=new Map}setState(t,e){(0,import_ag_charts_core39.objectsEqual)(this.state.get(t.mementoOriginatorKey),e)||this.setStateAndRestore(t,e)}setStateAndRestore(t,e){this.state.set(t.mementoOriginatorKey,e),this.restoreState(t)}restoreState(t){const{caretaker:e,state:i}=this;if(!i.has(t.mementoOriginatorKey))return;const s=i.get(t.mementoOriginatorKey);e.restore({version:e.version,[t.mementoOriginatorKey]:s},t)}},import_ag_charts_core44=require("ag-charts-core"),styles_default=`.ag-charts-wrapper,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box}.ag-charts-wrapper{--align-items: center;--justify-content: center;position:relative;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ag-charts-wrapper--safe-horizontal{--justify-content: flex-start}.ag-charts-wrapper--safe-vertical{--align-items: flex-start}.ag-charts-tab-guard{width:0%;height:0%;position:absolute;pointer-events:none}.ag-charts-canvas-background{position:absolute}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;pointer-events:auto;display:flex;align-items:var(--align-items);justify-content:var(--justify-content)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative;user-select:none;-webkit-user-select:none}.ag-charts-canvas-container>*,.ag-charts-canvas>*{pointer-events:none}.ag-charts-canvas canvas{display:block}.ag-charts-series-area{outline:none;pointer-events:auto;position:absolute}.ag-charts-swapchain{top:0;left:0;outline:none;opacity:0;pointer-events:none;position:absolute;width:100%;height:100%}.ag-charts-swapchain:focus-visible{opacity:1}.ag-charts-canvas-proxy,.ag-charts-canvas-overlay{inset:0;pointer-events:none;position:absolute;user-select:none;-webkit-user-select:none}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-accent-color: #2196f3;--ag-charts-background-color: #fff;--ag-charts-border-color: #dddddd;--ag-charts-border-radius: 4px;--ag-charts-chart-background-color: #fff;--ag-charts-chart-padding: 20px;--ag-charts-focus-shadow: 0 0 0 3px #2196f3;--ag-charts-foreground-color: #181d1f;--ag-charts-font-family: Verdana, sans-serif;--ag-charts-font-size: 12px;--ag-charts-font-weight: 400;--ag-charts-popup-shadow: 0 0 16px rgba(0, 0, 0, .15);--ag-charts-subtle-text-color: #8c8c8c;--ag-charts-text-color: #181d1f;--ag-charts-chrome-background-color: #fafafa;--ag-charts-chrome-font-family: Verdana, sans-serif;--ag-charts-chrome-font-size: 12px;--ag-charts-chrome-font-weight: 400;--ag-charts-chrome-subtle-text-color: #8c8c8c;--ag-charts-chrome-text-color: #181d1f;--ag-charts-button-background-color: #fff;--ag-charts-button-border: 1px solid #dddddd;--ag-charts-button-font-weight: normal;--ag-charts-button-text-color: inherit;--ag-charts-input-background-color: #fff;--ag-charts-input-border: 1px solid #dddddd;--ag-charts-input-text-color: #181d1f;--ag-charts-menu-background-color: #fafafa;--ag-charts-menu-border: 1px solid #dddddd;--ag-charts-menu-text-color: #181d1f;--ag-charts-panel-background-color: #fafafa;--ag-charts-panel-text-color: #181d1f;--ag-charts-tooltip-background-color: #fafafa;--ag-charts-tooltip-border: 1px solid #dddddd;--ag-charts-tooltip-text-color: #181d1f;--ag-charts-tooltip-subtle-text-color: #8c8c8c;--ag-charts-crosshair-label-background-color: #fafafa;--ag-charts-crosshair-label-text-color: #181d1f;--ag-charts-spacing: 4px;--ag-charts-icon-size: 16px;--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 12%);--ag-charts-input-border-radius: var(--ag-charts-border-radius);--ag-charts-input-focus-border-color: var(--ag-charts-accent-color);--ag-charts-input-focus-text-color: var(--ag-charts-accent-color);--ag-charts-input-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-input-disabled-border-color: var(--ag-charts-border-color);--ag-charts-input-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-input-text-color) 50% );--ag-charts-input-placeholder-text-color: color-mix( in srgb, var(--ag-charts-input-background-color), var(--ag-charts-input-text-color) 60% );--ag-charts-button-border-radius: var(--ag-charts-border-radius);--ag-charts-button-focus-background-color: color-mix( in srgb, var(--ag-charts-button-background-color), var(--ag-charts-accent-color) 12% );--ag-charts-button-focus-border-color: var(--ag-charts-accent-color);--ag-charts-button-focus-text-color: var(--ag-charts-accent-color);--ag-charts-button-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-button-disabled-border-color: var(--ag-charts-border-color);--ag-charts-button-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-chrome-text-color) 50% );--ag-charts-checkbox-background-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 35% );--ag-charts-checkbox-checked-background-color: var(--ag-charts-accent-color);--ag-charts-tooltip-border-radius: var(--ag-charts-border-radius);--ag-charts-menu-border-radius: var(--ag-charts-border-radius);--ag-charts-chrome-font-size-small: var(--ag-charts-chrome-font-size);--ag-charts-chrome-font-size-medium: calc(var(--ag-charts-chrome-font-size) * (13 / 12));--ag-charts-chrome-font-size-large: calc(var(--ag-charts-chrome-font-size) * (14 / 12));--ag-charts-border: 1px solid var(--ag-charts-border-color);--ag-charts-focus-border: 1px solid var(--ag-charts-accent-color);--ag-charts-focus-border-shadow: 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%);--ag-charts-layer-menu: 6;--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1}.ag-charts-theme-default-dark{--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 22%)}.ag-chart-canvas-wrapper .ag-charts-theme-default{--ag-charts-border-radius: var(--ag-border-radius, 4px);--ag-charts-border: var(--ag-borders-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-focus-shadow: var(--ag-focus-shadow, 0 0 0 3px var(--ag-charts-accent-color));--ag-charts-focus-border-shadow: var( --ag-focus-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%) )}.ag-charts-icon{display:block;width:20px;height:20px;speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-align-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNyAxMGg2djFIN3pNNCA3aDEydjFINHptMSA2aDEwdjFINXoiLz48L3N2Zz4=)}.ag-charts-icon-align-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNCAxMGg2djFINHptMC0zaDEydjFINHptMCA2aDEwdjFINHoiLz48L3N2Zz4=)}.ag-charts-icon-align-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTAgMTBoNnYxaC02ek00IDdoMTJ2MUg0em0yIDZoMTB2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-arrow-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1LjI5MyA0LjVIMTIuNXYtMUgxN3Y0aC0xVjUuMjA3bC05LjY0NiA5LjY0Ny0uNzA4LS43MDh6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDE2YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwbS0yLjUgMS41YTEuNSAxLjUgMCAxIDAgMC0zIDEuNSAxLjUgMCAwIDAgMCAzIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-arrow-down-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDhMMS41IDhMMTAgMThMMTguNSA4TDE0IDhMMTQgM0w2IDNMNiA4Wk03IDRMNyA5SDMuNjYyNDRMMTAgMTYuNDU2TDE2LjMzNzYgOUwxMyA5TDEzIDRMNyA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-arrow-up-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNCAxMkgxOC41TDEwIDJMMS41IDEySDZMNi4wMDAwMiAxN0gxNFYxMlpNMTMgMTZWMTFIMTYuMzM3NkwxMCAzLjU0NDA1TDMuNjYyNDQgMTFIN0w3LjAwMDAyIDE2SDEzWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-close{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNSA1IDEwIDEwTTUgMTUgMTUgNSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-date-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAyaDF2MTZIMnptMTUgMGgxdjE2aC0xeiIgZmlsbD0iIzE4MUQxRiIvPjxwYXRoIGQ9Ik0xMy4xNTcgMTFINXYtMWg3Ljc5M0wxMSA4LjIwN2wuNzA3LS43MDcgMy4xODIgMy4xODItMy4xODIgMy4xODItLjcwNy0uNzA3eiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-date-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAySDJ2MTZoMXptMy41MDcgNC44OUw4LjUgNC44OTVWMTBINXYxaDMuNXY3aDF2LTdoNS4wODhsLTEuOTU3IDEuOTU3LjcwNy43MDcgMy4xODItMy4xODJMMTMuMzM4IDcuM2wtLjcwNy43MDdMMTQuNjI0IDEwSDkuNVY0LjkzMmwxLjk1NyAxLjk1Ny43MDctLjcwN0w4Ljk4MiAzIDUuOCA2LjE4MnoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-drag-handle{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjcuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjxjaXJjbGUgY3g9IjEzLjc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iMTMuNzUiIGN5PSIxMS43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjExLjc1IiByPSIuNzUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjUiLz48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iMTEuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA1aDEydjFIMnoiLz48Y2lyY2xlIGN4PSIxNS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4yNSIgY3k9IjE0LjUiIHI9IjEuNzUiIHN0cm9rZT0iIzAwMCIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik0xOCAxNUg2di0xaDEyem0wLTQuNUgydi0xaDE2eiIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-trend-based-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJtNC45OTYgMTIuNjc0IDMuMjkxLTUuNzQzLjg2OC40OTctMy4yOTEgNS43NDN6Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4zNTEiIGN5PSIxNC41IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiLz48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTggNmgtN1Y1aDd6bTAgNC41aC03di0xaDd6bTAgNC41SDZ2LTFoMTJ6Ii8+PC9zdmc+)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-style-dashed{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDR2MUgyem0xMiAwaDR2MWgtNHpNOCA5aDR2MUg4eiIvPjwvc3ZnPg==)}.ag-charts-icon-line-style-dotted{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyLjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSIxMi41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjE0LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-line-style-solid{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDE2djFIMnoiLz48L3N2Zz4=)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-measurer-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibTQuNDYxIDEyLjcxIDEuNTMyLTEuNTMxIDEuNDE0IDEuNDE0LjcwNy0uNzA3TDYuNyAxMC40NzJsMS41MzItMS41MzMgMiAyIC43MDctLjcwNy0yLTIgNi4wMS02LjAxIDIuODMgMi44MjhMNS4wNSAxNy43NzggMi4yMjIgMTQuOTVsMS41MzItMS41MzIgMS40MTQgMS40MTQuNzA3LS43MDd6TS44MDggMTQuOTVsLjcwNy0uNzA3TDE0LjI0MyAxLjUxNWwuNzA3LS43MDcuNzA3LjcwNyAyLjgyOCAyLjgyOC43MDcuNzA3LS43MDcuNzA3TDUuNzU3IDE4LjQ4NWwtLjcwNy43MDctLjcwNy0uNzA3LTIuODI4LTIuODI4em0xMS4wNzgtNi44MzVMMTAuNDcgNi43bC43MDctLjcwNyAxLjQxNSAxLjQxNHptLjgyNC0zLjY1NCAxIDEgLjcwOC0uNzA3LTEtMXoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-position-bottom{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzem0zLTNoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgMTNoOHYxSDZ6Ii8+PC9zdmc+)}.ag-charts-icon-position-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMyAxMGgxNHYxSDN6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDdoOHYxSDZ6bTAgNmg4djFINnoiLz48L3N2Zz4=)}.ag-charts-icon-position-top{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzeiIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik02IDdoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDEzaDh2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS41IDYuMjI4IDcuMTY3IDguMzc2IDYuNSA3Ljc2MiA5LjUgNWwzIDIuNzYyLS42NjcuNjE0eiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0yIDE4di0xaDE2djF6TTIgM1YyaDE2djF6IiBmaWxsPSIjMTgxRDFGIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-settings{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkIj48cGF0aCBkPSJNMTAgMTNhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2bTAtMWEyIDIgMCAxIDEtLjAwMS0zLjk5OUEyIDIgMCAwIDEgMTAgMTIiLz48cGF0aCBkPSJNMi4zMSAxNC4zNDVjLS44MTctMS40OTEuMDI3LTIuNDk5LjQ3NC0yLjg2NS41MzEtLjQzNC45NjktLjM2NS45NzItMS40OC0uMDAzLTEuMTE1LS40NDEtMS4wNDYtLjk3Mi0xLjQ4MS0uNDU0LS4zNzEtMS4zMTctMS40MDUtLjQzNC0yLjkzNmwuMDA1LS4wMDljLjg4NC0xLjUyIDIuMjA3LTEuMjkgMi43NTUtMS4wODMuNjQxLjI0My44MDEuNjU2IDEuNzY4LjEwMS45NjQtLjU2LjY4Ni0uOTA0Ljc5Ni0xLjU4Mi4wOTQtLjU3OC41NTktMS44NDMgMi4zMjYtMS44NDNoLjAxYzEuNzU5LjAwNSAyLjIyMiAxLjI2NiAyLjMxNiAxLjg0My4xMS42NzgtLjE2OCAxLjAyMi43OTYgMS41ODIuOTY3LjU1NSAxLjEyNy4xNDIgMS43NjgtLjEwMS41NDktLjIwOCAxLjg3Ni0uNDM4IDIuNzYgMS4wOTJzLjAyIDIuNTY1LS40MzQgMi45MzZjLS41MzEuNDM1LS45NjkuMzY2LS45NzIgMS40ODEuMDAzIDEuMTE1LjQ0MSAxLjA0Ni45NzIgMS40OC40NTQuMzcyIDEuMzE3IDEuNDA2LjQzNCAyLjkzN2wtLjAwNS4wMDljLS44ODQgMS41Mi0yLjIwNyAxLjI5LTIuNzU1IDEuMDgzLS42NDEtLjI0My0uODAxLS42NTYtMS43NjgtLjEwMS0uOTY0LjU2LS42ODYuOTA0LS43OTYgMS41ODEtLjA5NC41NzktLjU1OSAxLjg0NC0yLjMyNiAxLjg0NGgtLjAxYy0xLjc1OS0uMDA1LTIuMjIyLTEuMjY2LTIuMzE2LTEuODQ0LS4xMS0uNjc3LjE2OC0xLjAyMS0uNzk2LTEuNTgxLS45NjctLjU1NS0xLjEyNy0uMTQyLTEuNzY4LjEwMS0uNTQ5LjIwOC0xLjg3Ni40MzgtMi43Ni0xLjA5MmwtLjAyLS4wMzZ6TTkuOTg0IDIuMTYySDEwYzEuMzU1IDAgMS4zNDIgMS4wMzkgMS4zNTMgMS40MjUuMDA4LjMxMi4wNCAxLjE2IDEuMjU5IDEuODcybC4wMTUuMDA4YzEuMjI1LjcgMS45NzYuMzA0IDIuMjUxLjE1NS4zMzctLjE4MyAxLjIyNi0uNzExIDEuOTAyLjQ0NWwuMDA4LjAxNGMuNjc4IDEuMTczLS4yMjkgMS42ODItLjU1OCAxLjg4NC0uMjY2LjE2My0uOTg0LjYxNS0uOTkxIDIuMDI3di4wMTZjLjAwNyAxLjQxMi43MjUgMS44NjQuOTkxIDIuMDI3LjMyOC4yMDEgMS4yMjkuNzA3LjU2NiAxLjg3bC0uMDA4LjAxNGMtLjY3NyAxLjE3NC0xLjU3MS42NDMtMS45MS40NTktLjI3NS0uMTQ5LTEuMDI2LS41NDUtMi4yNTEuMTU0bC0uMDE1LjAwOWMtMS4yMTkuNzEyLTEuMjUxIDEuNTYtMS4yNTkgMS44NzItLjAxMS4zODYuMDAyIDEuNDI1LTEuMzUzIDEuNDI1cy0xLjM0Mi0xLjAzOS0xLjM1My0xLjQyNWMtLjAwOC0uMzEyLS4wNC0xLjE2LTEuMjU5LTEuODcybC0uMDE1LS4wMDljLTEuMjI1LS42OTktMS45NzYtLjMwMy0yLjI1MS0uMTU0LS4zMzYuMTgzLTEuMjE5LjcwNi0xLjg5NC0uNDMybC0uMDE2LS4wMjdjLS42NzgtMS4xNzQuMjI5LTEuNjgyLjU1OC0xLjg4NC4yNjYtLjE2My45ODQtLjYxNS45OTEtMi4wMjd2LS4wMTZjLS4wMDctMS40MTItLjcyNS0xLjg2NC0uOTkxLTIuMDI3LS4zMjgtLjIwMS0xLjIyOS0uNzA3LS41NjYtMS44N2wuMDA4LS4wMTRjLjY3Ny0xLjE3NCAxLjU3MS0uNjQzIDEuOTEtLjQ1OS4yNzUuMTQ5IDEuMDI2LjU0NSAyLjI1MS0uMTU1bC4wMTUtLjAwOGMxLjIxOS0uNzEyIDEuMjUxLTEuNTYgMS4yNTktMS44NzIuMDEtLjM4NC0uMDAyLTEuNDE3IDEuMzM3LTEuNDI1Ii8+PC9zdmc+)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-chevron-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjQ3IDUuNDdhLjc1Ljc1IDAgMCAxIDEuMDYgMGw0IDRhLjc1Ljc1IDAgMCAxIDAgMS4wNmwtNCA0YS43NS43NSAwIDAgMS0xLjA2LTEuMDZMMTAuOTQgMTAgNy40NyA2LjUzYS43NS43NSAwIDAgMSAwLTEuMDYiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-input{--input-layer-active: 1;--input-layer-focus: 2;--input-padding: calc(var(--ag-charts-spacing) * 2);--input-padding-large: calc(var(--ag-charts-spacing) * 2.5);color:var(--ag-charts-input-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);transition-duration:.25s;transition-property:none;transition-timing-function:ease-out}.ag-charts-input:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--input-layer-focus)}.ag-charts-button{background:var(--ag-charts-button-background-color);border:var(--ag-charts-button-border);border-radius:var(--ag-charts-button-border-radius);color:var(--ag-charts-button-text-color);cursor:pointer;padding:var(--input-padding);transition-property:background,border-color}.ag-charts-button:hover{background:var(--ag-charts-focus-color)}.ag-charts-button:has(.ag-charts-icon){padding:2px}.ag-charts-checkbox{--checkbox-transition-duration: .1s;appearance:none;background:var(--ag-charts-checkbox-background-color);border-radius:calc(var(--ag-charts-border-radius) * 9);cursor:pointer;height:18px;margin:0;transition-duration:var(--checkbox-transition-duration);transition-property:margin;width:29px}.ag-charts-checkbox:before{display:block;background:var(--ag-charts-input-background-color);border-radius:calc(var(--ag-charts-border-radius) * 7);content:" ";height:14px;margin:2px;transition-duration:var(--checkbox-transition-duration);transition-property:margin;transition-timing-function:var(--ag-charts-input-transition-easing);width:14px}.ag-charts-checkbox:checked{background:var(--ag-charts-checkbox-checked-background-color)}.ag-charts-checkbox:checked:before{margin-left:13px}.ag-charts-select{background:var(--ag-charts-input-background-color);border:var(--ag-charts-input-border);border-radius:var(--ag-charts-input-border-radius);padding:3px 2px 4px;font-size:inherit}.ag-charts-textarea{--textarea-line-height: 1.38;background:var(--ag-charts-input-background-color);border:var(--ag-charts-input-border);border-radius:var(--ag-charts-input-border-radius);line-height:var(--textarea-line-height);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);padding:var(--input-padding-large) var(--input-padding)}.ag-charts-textarea::placeholder{color:var(--ag-charts-input-placeholder-text-color)}.ag-charts-proxy-container{pointer-events:none;position:absolute}.ag-charts-proxy-legend-toolbar{pointer-events:auto}.ag-charts-proxy-legend-toolbar>div[role=listitem]{pointer-events:none}.ag-charts-proxy-elem{-webkit-appearance:none;appearance:none;background:none;border:none;color:#0000;overflow:hidden;pointer-events:auto;position:absolute}.ag-charts-proxy-elem::-moz-range-thumb,.ag-charts-proxy-elem::-moz-range-track{opacity:0}.ag-charts-proxy-elem::-webkit-slider-runnable-track,.ag-charts-proxy-elem::-webkit-slider-thumb{opacity:0}.ag-charts-proxy-elem:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-proxy-elem svg{display:block}.ag-charts-proxy-scrollbar-slider:focus-visible{outline:none;box-shadow:none}.ag-charts-proxy-scrollbar-thumb-focus{border:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);box-sizing:border-box;opacity:0;pointer-events:none}.ag-charts-proxy-scrollbar-slider:focus-visible~.ag-charts-proxy-scrollbar-thumb-focus{opacity:1}.ag-charts-focus-indicator{position:absolute;display:block;pointer-events:none;user-select:none;-webkit-user-select:none;width:100%;height:100%}.ag-charts-focus-indicator>div{position:absolute;outline:solid 1px var(--ag-charts-chrome-background-color);box-shadow:var(--ag-charts-focus-shadow)}.ag-charts-focus-indicator>svg{width:100%;height:100%;fill:none;overflow:visible}.ag-charts-focus-svg-outer-path{stroke:var(--ag-charts-chrome-background-color);stroke-width:4px}.ag-charts-focus-svg-inner-path{stroke:var(--ag-charts-accent-color);stroke-width:2px}.ag-charts-overlay{color:#181d1f;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay{color:#fff}.ag-charts-overlay--loading{color:#8c8c8c}.ag-charts-overlay__loading-background{background:#fff;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay .ag-charts-overlay__loading-background{background:#192232}.ag-charts-tooltip{--tooltip-arrow-size: 8px;--tooltip-row-spacing: 8px;--tooltip-column-spacing: 16px;position:fixed;inset:unset;margin:0;padding:0;overflow:visible;top:var(--top, 0px);left:var(--left, 0px);width:max-content;max-width:100%;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);color:var(--ag-charts-tooltip-text-color);background:var(--ag-charts-tooltip-background-color);border:var(--ag-charts-tooltip-border);border-radius:var(--ag-charts-tooltip-border-radius);box-shadow:var(--ag-charts-popup-shadow)}.ag-charts-tooltip--compact .ag-charts-tooltip-content{--tooltip-row-spacing: 2px;--tooltip-column-spacing: 8px;padding:3px 6px}.ag-charts-tooltip--arrow-top:before,.ag-charts-tooltip--arrow-right:before,.ag-charts-tooltip--arrow-bottom:before,.ag-charts-tooltip--arrow-left:before{content:"";position:absolute;display:block;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);border:inherit;border-bottom-color:transparent;border-right-color:transparent;background:inherit;clip-path:polygon(0 0,100% 0,100% 1px,1px 100%,0 100%)}.ag-charts-tooltip--arrow-top:before{bottom:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * .5)) rotate(45deg)}.ag-charts-tooltip--arrow-bottom:before{top:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * -.5)) rotate(225deg)}.ag-charts-tooltip--arrow-left:before{right:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * .5)) rotate(315deg)}.ag-charts-tooltip--arrow-right:before{left:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * -.5)) rotate(135deg)}.ag-charts-tooltip--no-interaction{pointer-events:none;user-select:none;-webkit-user-select:none}.ag-charts-tooltip--wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-charts-tooltip--wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-charts-tooltip--wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-charts-tooltip--wrap-never{white-space:nowrap}.ag-charts-tooltip-heading,.ag-charts-tooltip-title,.ag-charts-tooltip-label,.ag-charts-tooltip-value{overflow:hidden;text-overflow:ellipsis}.ag-charts-tooltip-content{display:grid;grid:auto-flow minmax(1em,auto) / 1fr;padding:8px 12px;gap:var(--tooltip-row-spacing)}.ag-charts-tooltip-content:has(.ag-charts-tooltip-symbol){grid:auto-flow minmax(1em,auto) / auto 1fr}.ag-charts-tooltip-heading{grid-column:1 / -1}.ag-charts-tooltip-symbol{grid-column:1 / 2;place-self:center}.ag-charts-tooltip-symbol svg{display:block}.ag-charts-tooltip-title{grid-column:-2 / -1}.ag-charts-tooltip-row{grid-column:1 / -1;display:flex;gap:var(--tooltip-column-spacing);align-items:baseline;justify-content:space-between;overflow:hidden}.ag-charts-tooltip-row--inline{grid-column:-2 / -1}.ag-charts-tooltip-label{flex:1;min-width:0}.ag-charts-tooltip-value{min-width:0}.ag-charts-tooltip-footer{grid-column:1 / -1;color:var(--ag-charts-tooltip-subtle-text-color);text-align:center}.ag-charts-popover{position:absolute;border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);background:var(--ag-charts-panel-background-color);color:var(--ag-charts-chrome-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);box-shadow:var(--ag-charts-popup-shadow);z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-menu{--item-padding: 6px 12px;--icon-color: var(--ag-charts-menu-text-color);display:grid;grid:auto-flow auto / 1fr;column-gap:12px;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-menu:has(.ag-charts-menu__icon,.ag-charts-menu__row--stroke-width-visible){grid:auto-flow auto / auto 1fr}.ag-charts-menu__row--stroke-width-visible:before{content:"";height:var(--strokeWidth);width:12px;background:var(--icon-color)}.ag-charts-menu__row--stroke-width-visible[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-menu__row{display:grid;grid-column:1 / -1;grid-template-columns:subgrid;align-items:center;padding:var(--item-padding)}.ag-charts-menu__row:not(.ag-charts-menu__row--active){cursor:pointer}.ag-charts-menu__row:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.ag-charts-menu__row:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.ag-charts-menu__row:focus{background:var(--ag-charts-focus-color)}.ag-charts-menu__row:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--ag-charts-layer-menu)}.ag-charts-menu__row--active{--icon-color: var(--ag-charts-accent-color);background:var(--ag-charts-focus-color);color:var(--ag-charts-accent-color)}.ag-charts-menu__label{grid-column:-1 / span 1}.ag-charts-toolbar{--toolbar-gap: calc(var(--ag-charts-spacing) * 2);--toolbar-size: 34px;--toolbar-button-padding: 6px;align-items:center;display:flex;flex-wrap:nowrap;position:absolute}.ag-charts-toolbar__button{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-button-border);color:var(--ag-charts-button-text-color);cursor:pointer;display:flex;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-medium);font-weight:var(--ag-charts-chrome-font-weight);justify-content:center;min-height:var(--toolbar-size);min-width:var(--toolbar-size);padding:var(--toolbar-button-padding);position:relative;transition:background-color .25s ease-in-out,border-color .25s ease-in-out,color .25s ease-in-out;white-space:nowrap}.ag-charts-toolbar__button:hover{background:var(--ag-charts-focus-color);z-index:1}.ag-charts-toolbar__button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-toolbar__button--active{background:var(--ag-charts-focus-color);border-color:var(--ag-charts-accent-color);color:var(--ag-charts-accent-color);z-index:2;+.ag-charts-toolbar__button{border-left-color:var(--ag-charts-accent-color)}}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-button-disabled-background-color);color:var(--ag-charts-button-disabled-text-color);cursor:default}.ag-charts-toolbar--horizontal{flex-direction:row;.ag-charts-toolbar__button{border-right-width:0}.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius);border-right-width:1px}}.ag-charts-toolbar--vertical{flex-direction:column;.ag-charts-toolbar__button{margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button--first{border-top-left-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-left-radius:var(--ag-charts-border-radius);border-bottom-right-radius:var(--ag-charts-border-radius)}}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-charts-floating-toolbar{border:none;display:flex;.ag-charts-toolbar{align-items:unset;position:unset}}.ag-charts-floating-toolbar__drag-handle{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);border-right-width:0;cursor:grab;display:flex;justify-content:center;min-width:24px;padding-left:0;padding-right:0}.ag-charts-floating-toolbar__drag-handle--dragging{cursor:grabbing}
|
|
`,import_ag_charts_core40=require("ag-charts-core"),BaseManager=class{constructor(){this.cleanup=new import_ag_charts_core40.CleanupRegistry,this.destroyed=!1}destroy(){this.cleanup.flush(),this.destroyed=!0}},import_ag_charts_core41=require("ag-charts-core"),GuardedElement=class me{constructor(e,i,s){this.element=e,this.topTabGuard=i,this.bottomTabGuard=s,this.cleanup=new import_ag_charts_core41.CleanupRegistry,this.guardTabIndex=0,this.hasFocus=!1,this.initTabGuard(this.topTabGuard,!1),this.initTabGuard(this.bottomTabGuard,!0),this.element.addEventListener("focus",()=>this.onFocus(),{capture:!0}),this.element.addEventListener("blur",n=>this.onBlur(n),{capture:!0})}set tabIndex(e){this.guardTabIndex=e,this.guardTabIndex===0?this.setGuardIndices(void 0):this.hasFocus||this.setGuardIndices(this.guardTabIndex)}destroy(){this.cleanup.flush()}initTabGuard(e,i){this.cleanup.register((0,import_ag_charts_core41.attachListener)(e,"focus",()=>this.onTab(e,i)))}setGuardIndices(e){const i=e;(0,import_ag_charts_core41.setAttribute)(this.topTabGuard,"tabindex",i),(0,import_ag_charts_core41.setAttribute)(this.bottomTabGuard,"tabindex",i)}onFocus(){this.hasFocus=!0,this.guardTabIndex!==0&&this.setGuardIndices(0)}onBlur({relatedTarget:e}){const{topTabGuard:i,bottomTabGuard:s}=this;this.hasFocus=!1,this.guardTabIndex!==0&&e!==i&&e!==s&&this.setGuardIndices(this.guardTabIndex)}onTab(e,i){if(this.guardTabIndex!==0){let s;e.tabIndex===0?(s=this.findExitTarget(!i),this.setGuardIndices(this.guardTabIndex)):s=this.findEnterTarget(i),s?.focus()}}static queryFocusable(e,i){const s=(0,import_ag_charts_core41.getWindow)();return Array.from(e.querySelectorAll(i)).filter(n=>{if((0,import_ag_charts_core41.isHTMLElement)(n)){const r=s.getComputedStyle(n);return r.display!=="none"&&r.visibility!=="none"}return!1})}findEnterTarget(e){const i=me.queryFocusable(this.element,'[tabindex="0"]'),s=e?i.length-1:0;return i[s]}findExitTarget(e){const i=me.queryFocusable((0,import_ag_charts_core41.getDocument)(),"[tabindex]").filter(r=>r.tabIndex>0).sort((r,a)=>r.tabIndex-a.tabIndex),{before:s,after:n}=me.findBeforeAndAfter(i,this.guardTabIndex);return e?s:n}static findBeforeAndAfter(e,i){let s=0,n=e.length-1,r,a;for(;s<=n;){const o=Math.floor((s+n)/2),l=e[o].tabIndex;if(l===i){r=e[o-1]||void 0,a=e[o+1]||void 0;break}else l<i?(r=e[o],s=o+1):(a=e[o],n=o-1)}return{before:r,after:a}}},import_ag_charts_core43=require("ag-charts-core"),import_ag_charts_core42=require("ag-charts-core"),PixelRatioObserver=class{constructor(t){this.callback=t,this.devicePixelRatio=(0,import_ag_charts_core42.getWindow)("devicePixelRatio")??1,this.devicePixelRatioMediaQuery=void 0,this.devicePixelRatioListener=e=>{e.matches||(this.devicePixelRatio=(0,import_ag_charts_core42.getWindow)("devicePixelRatio")??1,this.unregisterDevicePixelRatioListener(),this.registerDevicePixelRatioListener(),this.callback(this.pixelRatio))}}get pixelRatio(){return this.devicePixelRatio}observe(){this.registerDevicePixelRatioListener()}disconnect(){this.unregisterDevicePixelRatioListener()}unregisterDevicePixelRatioListener(){this.devicePixelRatioMediaQuery?.removeEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=void 0}registerDevicePixelRatioListener(){const t=(0,import_ag_charts_core42.getWindow)("matchMedia")?.(`(resolution: ${this.pixelRatio}dppx)`);t?.addEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=t}},SizeMonitor=class{constructor(){this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0;for(const[i,s]of this.queuedObserveRequests)this.observe(i,s);this.queuedObserveRequests=[],this.observeWindow()};const t=(0,import_ag_charts_core43.getResizeObserver)();t!==void 0&&(this.resizeObserver=new t(i=>{for(const{target:s,contentRect:{width:n,height:r}}of i){const a=this.elements.get(s);this.checkSize(a,s,n,r)}}));let e;this.pixelRatioObserver=new PixelRatioObserver(()=>{clearTimeout(e),e=setTimeout(()=>this.checkPixelRatio(),0)}),this.documentReady=(0,import_ag_charts_core43.getDocument)("readyState")==="complete",this.documentReady?this.observeWindow():(0,import_ag_charts_core43.getWindow)()?.addEventListener("load",this.onLoad)}destroy(){(0,import_ag_charts_core43.getWindow)()?.removeEventListener("load",this.onLoad),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.pixelRatioObserver?.disconnect(),this.pixelRatioObserver=void 0}observeWindow(){this.pixelRatioObserver?.observe()}checkPixelRatio(){const t=this.pixelRatioObserver?.pixelRatio??1;for(const[e,i]of this.elements)if(i.size!=null&&i.size.pixelRatio!==t){const{width:s,height:n}=i.size;i.size={width:s,height:n,pixelRatio:t},i.cb(i.size,e)}}checkSize(t,e,i,s){if(t&&(i!==t.size?.width||s!==t.size?.height)){const n=this.pixelRatioObserver?.pixelRatio??1;t.size={width:i,height:s,pixelRatio:n},t.cb(t.size,e)}}observe(t,e){if(!this.documentReady){this.queuedObserveRequests.push([t,e]);return}this.elements.has(t)?this.removeFromQueue(t):this.resizeObserver?.observe(t);const i={cb:e};this.elements.set(t,i)}unobserve(t){this.resizeObserver?.unobserve(t),this.elements.delete(t),this.removeFromQueue(t),this.elements.size||this.destroy()}removeFromQueue(t){this.queuedObserveRequests=this.queuedObserveRequests.filter(([e])=>e!==t)}},StateTracker=class extends Map{constructor(t,e){super(),this.defaultValue=t,this.defaultState=e}set(t,e){return this.delete(t),e!==void 0&&super.set(t,e),delete this.cachedState,delete this.cachedValue,this}delete(t){return delete this.cachedState,delete this.cachedValue,super.delete(t)}stateId(){return this.cachedState??(this.cachedState=Array.from(this.keys()).pop()??this.defaultState),this.cachedState}stateValue(){return this.cachedValue??(this.cachedValue=Array.from(this.values()).pop()??this.defaultValue),this.cachedValue}},domLayout_default='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="presentation" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-canvas-background" aria-hidden="true"></div><div role="presentation" class="ag-charts-canvas" aria-hidden="true"></div><div role="figure" class="ag-charts-canvas-proxy"><div role="presentation" class="ag-charts-series-area"></div></div><div role="presentation" class="ag-charts-canvas-overlay ag-charts-tooltip-container"></div></div></div></div>',DOM_ELEMENT_CLASSES=["styles","canvas","canvas-background","canvas-center","canvas-container","canvas-overlay","canvas-proxy","series-area","tooltip-container"],MINIMAL_DOM_ELEMENT_ROLES=new Set(["styles","canvas-container","canvas","tooltip-container"]),CONTAINER_MODIFIERS={safeHorizontal:"ag-charts-wrapper--safe-horizontal",safeVertical:"ag-charts-wrapper--safe-vertical"},domElementConfig=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas"}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],["canvas-center",{childElementType:"div"}],["series-area",{childElementType:"div"}],["tooltip-container",{childElementType:"div"}]]);function setupObserver(t,e){if(typeof IntersectionObserver>"u")return;const i=new IntersectionObserver(s=>{for(const n of s)n.target===t&&e(n.intersectionRatio)},{root:t});return i.observe(t),i}var NULL_DOMRECT={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON(){return NULL_DOMRECT}};function createTabGuardElement(t,e){const i=(0,import_ag_charts_core44.createElement)("div");return i.className="ag-charts-tab-guard",t.insertAdjacentElement(e,i),i}var _DOMManager=class ne extends BaseManager{constructor(e,i,s,n,r,a="normal"){super(),this.eventsHub=e,this.chart=i,this.styleContainer=n,this.skipCss=r,this.mode=a,this.anchorName=`--${(0,import_ag_charts_core44.createId)(this)}`,this.styles=new Map,this.pendingContainer=void 0,this.container=void 0,this.documentRoot=void 0,this.initiallyConnected=void 0,this.containerSize=void 0,this.sizeMonitor=new SizeMonitor,this.cursorState=new StateTracker("default"),this.minWidth=0,this.minHeight=0,this.element=this.initDOM(),this.rootElements=this.initRootElements(),this.rootElements.canvas.element.style.setProperty("anchor-name",this.anchorName);let o=!1;if(this.observer=setupObserver(this.element,l=>{l===0&&!o&&this.eventsHub.emit("dom:hidden",null),o=l===0}),this.setSizeOptions(),this.updateContainerSize(),this.addStyles("ag-charts-community",styles_default),this.setContainer(s),this.cleanup.register((0,import_ag_charts_core44.stopPageScrolling)(this.element)),this.mode==="normal"){const l=this.rootElements["canvas-center"].element;if(l==null)throw new Error("Error initializing tab guards");const c=createTabGuardElement(l,"beforebegin"),h=createTabGuardElement(l,"afterend");this.tabGuards=new GuardedElement(l,c,h)}}initDOM(){if(this.mode==="normal"){const s=(0,import_ag_charts_core44.createElement)("div");return s.innerHTML=domLayout_default,s.firstChild}const e=(0,import_ag_charts_core44.createElement)("div");e.role="presentation",e.dataset.agCharts="",e.classList.add("ag-charts-wrapper");const i=(0,import_ag_charts_core44.createElement)("div");return e.appendChild(i),i.role="presentation",i.classList.add("ag-charts-series-area"),e}initRootElements(){const{mode:e,element:i}=this,s={};for(const n of DOM_ELEMENT_CLASSES){const r=`ag-charts-${n}`;let a;if(e==="normal"?a=i.classList.contains(r)?i:i.getElementsByClassName(r)[0]:MINIMAL_DOM_ELEMENT_ROLES.has(n)?a=i:a=i.getElementsByClassName(r)[0]??(0,import_ag_charts_core44.createElement)("div"),a==null)throw new Error(`AG Charts - unable to find DOM element ${r}`);s[n]={element:a,children:new Map,listeners:[]}}return s}destroy(){super.destroy(),this.observer?.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),this.pendingContainer=void 0;for(const e of Object.values(this.rootElements)){for(const i of e.children.values())i.remove();e.element.remove()}this.element.remove()}postRenderUpdate(){this.updateStylesLocation(),this.mode!=="minimal"&&(this.pendingContainer==null||this.pendingContainer===this.container||(ne.batchedUpdateContainer.length===0&&(0,import_ag_charts_core44.getWindow)().setTimeout(this.applyBatchedUpdateContainer.bind(this),0),ne.batchedUpdateContainer.push(this)))}applyBatchedUpdateContainer(){for(const e of ne.batchedUpdateContainer)e.destroyed||e.updateContainer();ne.batchedUpdateContainer.splice(0)}updateStylesLocation(){if(!(this.initiallyConnected===!0||this.container?.isConnected===!1)){this.documentRoot=this.getShadowDocumentRoot(this.container),this.initiallyConnected=!0;for(const e of this.rootElements.styles.children.keys())this.removeChild("styles",e);for(const[e,i]of this.styles)this.addStyles(e,i)}}setSizeOptions(e=300,i=300,s,n){const{style:r}=this.element;r.width=`${s??e}px`,r.height=`${n??i}px`,this.minWidth=s??e,this.minHeight=n??i,this.updateContainerClassName()}updateContainerSize(){const{style:e}=this.rootElements["canvas-center"].element;e.visibility=this.containerSize==null?"hidden":"",this.containerSize?(e.width=`${this.containerSize.width??0}px`,e.height=`${this.containerSize.height??0}px`):(e.width="",e.height=""),this.updateContainerClassName()}setTabGuardIndex(e){this.tabGuards&&(this.tabGuards.tabIndex=e)}setContainer(e){e!==this.container&&(this.pendingContainer=e,(this.mode==="minimal"||this.container==null)&&this.updateContainer())}updateContainer(){const{pendingContainer:e}=this;if(!(e==null||e===this.container)){if(this.container&&(this.element.remove(),this.sizeMonitor.unobserve(this.container)),this.documentRoot!=null)for(const i of this.rootElements.styles.children.keys())this.removeChild("styles",i);this.container=e,this.pendingContainer=void 0,this.documentRoot=this.getShadowDocumentRoot(e),this.initiallyConnected=e.isConnected;for(const[i,s]of this.styles)this.addStyles(i,s);e.appendChild(this.element),this.sizeMonitor.observe(e,i=>{this.containerSize=i,this.updateContainerSize(),this.eventsHub.emit("dom:resize",null)}),this.eventsHub.emit("dom:container-change",null)}}setThemeClass(e){const i="ag-charts-theme-";for(const s of Array.from(this.element.classList))s.startsWith(i)&&s!==e&&this.element.classList.remove(s);this.element.classList.add(e)}setThemeParameters(e){for(const[i,s]of(0,import_ag_charts_core44.entries)(e)){let n=`${s}`;i.endsWith("Size")||i.endsWith("Radius")?n=`${s}px`:i.endsWith("Border")&&typeof s=="boolean"&&(n=s?"var(--ag-charts-border)":"none"),this.element.style.setProperty(`--ag-charts-${(0,import_ag_charts_core44.kebabCase)(i)}`,n)}}updateCanvasLabel(e){(0,import_ag_charts_core44.setAttribute)(this.rootElements["canvas-proxy"].element,"aria-label",e)}getEventElement(e,i){return["focus","blur","keydown","keyup"].includes(i)?this.rootElements["series-area"].element:e}addEventListener(e,i,s){const n=this.getEventElement(this.element,e);return(0,import_ag_charts_core44.attachListener)(n,e,i,s)}removeEventListener(e,i,s){this.getEventElement(this.element,e).removeEventListener(e,i,s)}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){const e=(0,import_ag_charts_core44.getWindow)(),i=new BBox(0,0,e.innerWidth,e.innerHeight),s=this.getRawOverlayClientRect();return i.intersection(s)?.toDOMRect()??NULL_DOMRECT}getRawOverlayClientRect(){let e=this.element;const i=this.element.getRootNode()?.fullscreenElement;for(;e!=null;){let r;if(i!=null&&e===i)r=!0;else{const o=e.computedStyleMap?.()?.get("overflow-y")?.toString();r=o==="auto"||o==="scroll"}if(r)return BBox.fromObject(e.getBoundingClientRect());e=e.parentElement}if(this.documentRoot!=null)return BBox.fromObject(this.documentRoot.getBoundingClientRect());const{innerWidth:s,innerHeight:n}=(0,import_ag_charts_core44.getWindow)();return new BBox(0,0,s,n)}getShadowDocumentRoot(e=this.container){const i=e?.ownerDocument?.body??(0,import_ag_charts_core44.getDocument)("body");for(;e!=null;){if(e===i)return;if((0,import_ag_charts_core44.isDocumentFragment)(e.parentNode))return e;e=e.parentNode}}getParent(e){return this.rootElements[e].element}getChildBoundingClientRect(e){const{children:i}=this.rootElements[e],s=[];for(const n of i.values())s.push(BBox.fromObject(n.getBoundingClientRect()));return BBox.merge(s)}isManagedChildDOMElement(e,i,s){const{children:n}=this.rootElements[i],r=n?.get(s);return r!=null&&e.contains(r)}contains(e,i){return i==null?this.element.contains(e):this.rootElements[i].element.contains(e)}addStyles(e,i){const s="data-ag-charts";if(this.styles.set(e,i),this.container==null||this.skipCss)return;const n=o=>o.getAttribute(s)===e,r=o=>{const l=new Set(["TITLE","META"]);let c=!0,h;for(const d of o.children){if(c&&l.has(d.tagName)){h=d;continue}if(c=!1,n(d))return;d.hasAttribute(s)&&(h=d)}const u=(0,import_ag_charts_core44.createElement)("style");return this.chart.styleNonce!=null&&(u.nonce=this.chart.styleNonce),h==null?o.prepend(u):o.insertBefore(u,h.nextSibling),u};let a;this.styleContainer?a=r(this.styleContainer):this.initiallyConnected===!1?a=this.addChild("styles",e):this.documentRoot==null&&!ne.headStyles.has(e)?(a=r((0,import_ag_charts_core44.getDocument)("head")),ne.headStyles.add(e)):this.documentRoot!=null&&(a=this.addChild("styles",e)),!(a==null||n(a))&&(a.setAttribute(s,e),a.innerHTML=i)}removeStyles(e){this.removeChild("styles",e)}updateCursor(e,i){this.cursorState.set(e,i),this.element.style.cursor=this.cursorState.stateValue()}getCursor(){return this.element.style.cursor}addChild(e,i,s,n){const{element:r,children:a,listeners:o}=this.rootElements[e];if(!a)throw new Error("AG Charts - unable to create DOM elements after destroy()");if(a.has(i))return a.get(i);const{childElementType:l="div"}=domElementConfig.get(e)??{};if(s&&s.tagName.toLowerCase()!==l.toLowerCase())throw new Error("AG Charts - mismatching DOM element type");const c=s??(0,import_ag_charts_core44.createElement)(l);for(const[h,u,d]of o)c.addEventListener(h,u,d);if(a.set(i,c),l==="style"&&this.chart.styleNonce!=null&&(c.nonce=this.chart.styleNonce),n){const h=r.querySelector(n.query);if(h==null)throw new Error(`AG Charts - addChild query failed ${n.query}`);h.insertAdjacentElement(n.where,c)}else r?.appendChild(c);return c}removeChild(e,i){const{children:s}=this.rootElements[e];s&&(s.get(i)?.remove(),s.delete(i))}incrementDataCounter(e){const{dataset:i}=this.element;i[e]??(i[e]="0"),i[e]=String(Number(i[e])+1)}setDataBoolean(e,i){this.element.dataset[e]=String(i)}setDataNumber(e,i){this.element.dataset[e]=String(i)}updateContainerClassName(){const{element:e,containerSize:i,minWidth:s,minHeight:n}=this;e.classList.toggle(CONTAINER_MODIFIERS.safeHorizontal,s>=(i?.width??1/0)),e.classList.toggle(CONTAINER_MODIFIERS.safeVertical,n>=(i?.height??1/0))}};_DOMManager.className="DOMManager",_DOMManager.batchedUpdateContainer=[],_DOMManager.headStyles=new Set;var DOMManager=_DOMManager,import_ag_charts_core53=require("ag-charts-core"),import_ag_charts_core45=require("ag-charts-core"),BoundedTextWidget=class extends Widget{constructor(){super((0,import_ag_charts_core45.createElement)("div")),this.textElement=(0,import_ag_charts_core45.createSvgElement)("text"),this.textElement.role="presentation",this.svgElement=(0,import_ag_charts_core45.createSvgElement)("svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.elem.appendChild(this.svgElement),this.elem.role="presentation"}set textContent(t){this.textElement.textContent=t;const i=this.textElement.getBBox?.();i&&this.svgElement.setAttribute("viewBox",`${i.x} ${i.y} ${i.width} ${i.height}`)}get textContent(){return this.textElement.textContent}destructor(){}},import_ag_charts_core47=require("ag-charts-core"),import_ag_charts_core46=require("ag-charts-core"),ExpansionControllerImpl=class{constructor(t,e){this.getDispatcher=e,this.onExpanded=()=>{this.controller.setAriaExpanded(!0);const i=this.getDispatcher();if(i&&this.controls){const s={type:"expand-controlled-widget",controlled:this.controls};i.dispatch("expand-controlled-widget",this.controller,s)}},this.onCollapsed=i=>{this.controller.setAriaExpanded(!1),i.mode==="0"&&this.controller.focus()},t.setAriaExpanded(!1),this.controller=t}destroy(){this.controls?.collapse({mode:"2"}),this.setControlled(void 0)}setControlled(t){this.controls&&(this.controls.removeListener("expand-widget",this.onExpanded),this.controls.removeListener("collapse-widget",this.onCollapsed)),this.controls=t,this.controls&&(this.controller.setAriaControls(this.controls.id),this.controls.addListener("expand-widget",this.onExpanded),this.controls.addListener("collapse-widget",this.onCollapsed))}getControlled(){return this.controls}expandControlled(t){this.controller.isDisabled()||this.controls?.expand({controller:this.controller,sourceEvent:void 0,overrideFocusVisible:t?.overrideFocusVisible})}},AbstractButtonWidget=class extends Widget{constructor(t,e){super(t),(0,import_ag_charts_core46.setAttribute)(this.elem,"role",e),this.setEnabled(!0),this.addListener("keydown",({sourceEvent:i})=>{(0,import_ag_charts_core46.isButtonClickEvent)(i)&&(i.preventDefault(),this.htmlListener?.dispatch("click",this,{type:"click",device:"keyboard",sourceEvent:i}))})}lazyControllerImpl(){return this.controllerImpl??(this.controllerImpl=new ExpansionControllerImpl(this,()=>this.internalListener)),this.controllerImpl}destructor(){this.controllerImpl?.destroy()}setEnabled(t){(0,import_ag_charts_core46.setAttribute)(this.elem,"aria-disabled",!t)}setControlled(t){return this.lazyControllerImpl().setControlled(t)}getControlled(){return this.lazyControllerImpl().getControlled()}expandControlled(t){return this.lazyControllerImpl().expandControlled(t)}addListener(t,e){return super.addListener(t,(i,s)=>{(t==="click"||t==="dblclick")&&this.isDisabled()||e(i,s)})}},ButtonWidget=class extends AbstractButtonWidget{constructor(){super((0,import_ag_charts_core47.createElement)("button"))}},import_ag_charts_core48=require("ag-charts-core"),GroupWidget=class extends Widget{constructor(){super((0,import_ag_charts_core48.createElement)("div")),(0,import_ag_charts_core48.setAttribute)(this.elem,"role","group")}destructor(){}},import_ag_charts_core50=require("ag-charts-core"),import_ag_charts_core49=require("ag-charts-core"),RovingTabContainerWidget=class extends Widget{constructor(t,e){super((0,import_ag_charts_core49.createElement)("div")),this.focusedChildIndex=0,this.onChildFocus=(i,s)=>{const n=this.children[this.focusedChildIndex];this.focusedChildIndex=s.index,n?.setTabIndex(-1),s.setTabIndex(0)},this.onChildKeyDown=(i,s)=>{const n=this.orientation,[r,a]=n==="both"?[import_ag_charts_core49.PREV_NEXT_KEYS.horizontal,import_ag_charts_core49.PREV_NEXT_KEYS.vertical]:[import_ag_charts_core49.PREV_NEXT_KEYS[n],void 0];let o=-1;if((0,import_ag_charts_core49.hasNoModifiers)(i.sourceEvent)){const l=i.sourceEvent.key;l===r.nextKey||l===a?.nextKey?o=s.index+1:(l===r.prevKey||l===a?.prevKey)&&(o=s.index-1)}this.children[o]?.focus()},(0,import_ag_charts_core49.setAttribute)(this.elem,"role",e),this.orientation=t}get orientation(){return(0,import_ag_charts_core49.getAttribute)(this.elem,"aria-orientation")??"both"}set orientation(t){(0,import_ag_charts_core49.setAttribute)(this.elem,"aria-orientation",t==="both"?void 0:t)}focus(){this.children[this.focusedChildIndex]?.focus()}clear(){this.focusedChildIndex=0;for(const t of this.children)this.removeChildListeners(t),t.parent=void 0;this.elem.textContent="",this.children.length=0}addChildListeners(t){t.addListener("focus",this.onChildFocus),t.addListener("keydown",this.onChildKeyDown)}removeChildListeners(t){t.removeListener("focus",this.onChildFocus),t.removeListener("keydown",this.onChildKeyDown)}onChildAdded(t){this.addChildListeners(t),t.setTabIndex(this.children.length===1?0:-1)}onChildRemoved(t){this.removeChildListeners(t);const{focusedChildIndex:e,children:i}=this,s=e===t.index;for(let n=0;n<i.length;n++){const r=i[n];r.index===e&&(this.focusedChildIndex=n),r.index=n}if(s){const n=i[e]??i[e-1];n?(this.focusedChildIndex=n.index,n.setTabIndex(0)):this.focusedChildIndex=0}}},ListWidget=class extends RovingTabContainerWidget{constructor(){super("both","list"),this.setHidden(!0)}destructor(){for(const t of this.children)t.getElement().parentElement.remove()}addChildToDOM(t,e){const i=(0,import_ag_charts_core50.createElement)("div");(0,import_ag_charts_core50.setAttribute)(i,"role","listitem"),(0,import_ag_charts_core50.setElementStyle)(i,"position","absolute"),Widget.setElementContainer(t,i),this.appendOrInsert(i,e),this.setHidden(!1)}removeChildFromDOM(t){t.getElement().parentElement.remove(),this.setHidden(this.children.length===0)}setHidden(t){this.children.length===0&&(t=!0),super.setHidden(t)}},NativeWidget=class extends Widget{constructor(t){super(t)}destructor(){}},import_ag_charts_core51=require("ag-charts-core"),_SliderWidget=class le extends Widget{constructor(){super((0,import_ag_charts_core51.createElement)("input")),this._step=le.STEP_ONE,this.orientation="both"}get step(){return this._step}set step(e){this._step=e,this.getElement().step=e.attributeValue}get keyboardStep(){return this._keyboardStep?.step??this._step}set keyboardStep(e){if(e!==this._keyboardStep?.step&&(this._keyboardStep!==void 0&&(this.removeListener("keydown",this._keyboardStep.onKeyDown),this.removeListener("keyup",this._keyboardStep.onKeyUp),this.removeListener("blur",this._keyboardStep.onBlur),this._keyboardStep=void 0),e!==void 0)){const i=()=>this.getElement().step=e.attributeValue,s=()=>this.getElement().step=this._step.attributeValue;this._keyboardStep={step:e,onKeyDown:i,onKeyUp:s,onBlur:s},this.addListener("keydown",this._keyboardStep.onKeyDown),this.addListener("keyup",this._keyboardStep.onKeyUp),this.addListener("blur",this._keyboardStep.onBlur)}}get orientation(){return(0,import_ag_charts_core51.getAttribute)(this.elem,"aria-orientation")??"both"}set orientation(e){(0,import_ag_charts_core51.setAttribute)(this.elem,"aria-orientation",e==="both"?void 0:e),le.registerDefaultPreventers(this,e)}destructor(){}clampValueRatio(e,i){const s=this.getValueRatio(),n=(0,import_ag_charts_core51.clamp)(e,s,i);return n!==s&&this.setValueRatio(n),n}setValueRatio(e,i){const{divider:s}=this.step,n=Math.round(e*1e4)/s,{ariaValueText:r=(0,import_ag_charts_core51.formatPercent)(n/s)}=i??{},a=this.getElement();a.value=`${n}`,a.ariaValueText=r,a.ariaValueNow=`${n}`}getValueRatio(){return this.getElement().valueAsNumber/this.step.divider}static registerDefaultPreventers(e,i){i==="both"?e.removeListener("keydown",le.onKeyDown):e.addListener("keydown",le.onKeyDown)}static onKeyDown(e,i){let s=[];const{orientation:n}=i;n==="horizontal"?s=["ArrowUp","ArrowDown"]:n==="vertical"&&(s=["ArrowLeft","ArrowRight"]),s.includes(e.sourceEvent.code)&&e.sourceEvent.preventDefault()}};_SliderWidget.STEP_ONE={attributeValue:"1",divider:1},_SliderWidget.STEP_HUNDRETH={attributeValue:"0.01",divider:100};var SliderWidget=_SliderWidget,import_ag_charts_core52=require("ag-charts-core"),SwitchWidget=class extends ButtonWidget{constructor(){super(),(0,import_ag_charts_core52.setAttribute)(this.elem,"role","switch"),this.setChecked(!1)}setChecked(t){(0,import_ag_charts_core52.setAttribute)(this.elem,"aria-checked",t)}},ToolbarWidget=class extends RovingTabContainerWidget{constructor(t="horizontal"){super(t,"toolbar")}destructor(){}};function checkType(t,e){return e.params?.type===t}function allocateResult(t){if(t==="button")return new ButtonWidget;if(t==="slider")return new SliderWidget;if(t==="toolbar")return new ToolbarWidget;if(t==="group")return new GroupWidget;if(t==="list")return new ListWidget;if(t==="region")return new NativeWidget((0,import_ag_charts_core53.createElement)("div"));if(t==="text")return new BoundedTextWidget;if(t==="listswitch")return new SwitchWidget;throw new Error("AG Charts - error allocating meta")}function allocateMeta(t){const e={params:t,result:void 0};return e.result=allocateResult(e.params.type),e}var ProxyInteractionService=class{constructor(t,e,i){this.eventsHub=t,this.localeManager=e,this.domManager=i,this.cleanup=new import_ag_charts_core53.CleanupRegistry}destroy(){this.cleanup.flush()}addLocalisation(t){t(),this.cleanup.register(this.eventsHub.on("locale:change",t))}createProxyContainer(t){const e=allocateMeta(t),{params:i,result:s}=e,n=s.getElement();this.domManager.addChild("canvas-proxy",i.domManagerId,n),n.classList.add(...i.classList,"ag-charts-proxy-container"),n.role=i.role??i.type,checkType("toolbar",e)&&(e.result.orientation=e.params.orientation);const{ariaLabel:r}=i;return r&&this.addLocalisation(()=>{n.ariaLabel=this.localeManager.t(r.id,r.params)}),s}createProxyElement(t){const e=allocateMeta(t);if(checkType("button",e)){const{params:i,result:s}=e,n=s.getElement();if(this.initInteract(i,s),typeof i.textContent=="string")n.textContent=i.textContent;else{const{textContent:r}=i;this.addLocalisation(()=>{n.textContent=this.localeManager.t(r.id,r.params)})}this.setParent(e.params,e.result)}if(checkType("slider",e)){const{params:i,result:s}=e,n=s.getElement();this.initInteract(i,s),n.type="range",n.role=i.role??"presentation",n.style.margin="0px",this.addLocalisation(()=>{n.ariaLabel=this.localeManager.t(i.ariaLabel.id,i.ariaLabel.params)}),this.setParent(e.params,e.result)}if(checkType("text",e)){const{params:i,result:s}=e;this.initElement(i,s),this.setParent(e.params,e.result)}if(checkType("listswitch",e)){const{params:i,result:s}=e;this.initInteract(i,s),s.setTextContent(i.textContent),s.setChecked(i.ariaChecked),s.setAriaDescribedBy(i.ariaDescribedBy),this.setParent(e.params,e.result)}if(checkType("region",e)){const{params:i,result:s}=e,n=s.getElement();this.initInteract(i,s),n.role=i.role??"region",this.setParent(e.params,e.result)}return e.result}initElement(t,e){const i=e.getElement();return(0,import_ag_charts_core53.setElementStyle)(i,"cursor",t.cursor),i.classList.toggle("ag-charts-proxy-elem",!0),t.classList?.length&&i.classList.add(...t.classList),i}initInteract(t,e){const{tabIndex:i,domIndex:s}=t,n=this.initElement(t,e);i!==void 0&&(n.tabIndex=i),s!==void 0&&(e.domIndex=s)}setParent(t,e){if("parent"in t)t.parent?.addChild(e);else{const i={where:t.where,query:".ag-charts-series-area"};this.domManager.addChild("canvas-proxy",t.domManagerId,e.getElement(),i),e.destroyListener=()=>{this.domManager.removeChild("canvas-proxy",t.domManagerId)}}}},import_ag_charts_core54=require("ag-charts-core"),messageRegExp=/\$\{(\w+)}(?:\[(\w+)])?/gi,formatters={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}),percent0to2dp:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},defaultMessageFormatter=({defaultValue:t,variables:e})=>t?.replaceAll(messageRegExp,(i,s,n)=>{const r=e[s],a=n==null?null:formatters[n];return n!=null&&a==null&&import_ag_charts_core54.Logger.warnOnce(`Format style [${n}] is not supported`),a!=null?a.format(r):typeof r=="number"?formatters.number.format(r):r instanceof Date?formatters.datetime.format(r):String(r)}),LocaleManager=class{constructor(t){this.eventsHub=t,this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(t){this.localeText!==t&&(this.localeText=t,this.eventsHub.emit("locale:change",null))}setLocaleTextFormatter(t){this.getLocaleText=t,this.getLocaleText!==t&&(this.getLocaleText=t,this.eventsHub.emit("locale:change",null))}t(t,e={}){const{localeText:i=AG_CHARTS_LOCALE_EN_US,getLocaleText:s}=this,n=i[t];return String(s?.({key:t,defaultValue:n,variables:e})??defaultMessageFormatter({key:t,defaultValue:n,variables:e})??t)}},import_ag_charts_core58=require("ag-charts-core"),import_ag_charts_core55=require("ag-charts-core"),HdpiCanvas=class{constructor(t){this.enabled=!0,this.width=600,this.height=300;const{width:e,height:i,canvasElement:s,willReadFrequently:n=!1}=t;this.pixelRatio=t.pixelRatio??(0,import_ag_charts_core55.getWindow)("devicePixelRatio")??1,this.element=s??(0,import_ag_charts_core55.createElement)("canvas"),this.element.style.display="block",this.element.style.width=(e??this.width)+"px",this.element.style.height=(i??this.height)+"px",this.element.width=Math.round((e??this.width)*this.pixelRatio),this.element.height=Math.round((i??this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:n}),this.onEnabledChange(),this.resize(e??0,i??0,this.pixelRatio),debugContext(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.context.canvas,e,i)}toDataURL(t){return this.element.toDataURL(t)}resize(t,e,i){if(!(t>0&&e>0))return;const{element:s,context:n}=this;s.width=Math.round(t*i),s.height=Math.round(e*i),n.setTransform(i,0,0,i,0,0),s.style.width=t+"px",s.style.height=e+"px",this.width=t,this.height=e,this.pixelRatio=i}clear(){clearContext(this)}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}reset(){this.context.reset(),this.context.verifyDepthZero?.()}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}};__decorateClass([(0,import_ag_charts_core55.ObserveChanges)(t=>t.onEnabledChange())],HdpiCanvas.prototype,"enabled",2);var import_ag_charts_core56=require("ag-charts-core"),ImageLoader=class extends import_ag_charts_core56.EventEmitter{constructor(){super(...arguments),this.cache=new Map,this.imageLoadingCount=0}loadImage(t,e){const i=this.cache.get(t);if(i?.image)return i.image;if(i!=null&&e){i.nodes.add(e);return}if(!e)return;const s={image:void 0,nodes:new Set([e])},n=(0,import_ag_charts_core56.getImage)(),r=new n;return this.imageLoadingCount++,r.onload=()=>{s.image=r;for(const a of s.nodes)a.markDirty();s.nodes.clear(),this.imageLoadingCount--,this.emit("image-loaded",{uri:t})},r.onerror=()=>{this.imageLoadingCount--,s.nodes.clear(),this.emit("image-error",{uri:t})},r.src=t,this.cache.set(t,s),s.image}waitingToLoad(){return this.imageLoadingCount>0}destroy(){for(const t of this.cache.values())t.nodes.clear();this.cache.clear()}},import_ag_charts_core57=require("ag-charts-core"),LayersManager=class{constructor(t){this.canvas=t,this.debug=import_ag_charts_core57.Debug.create(!0,"scene"),this.layersMap=new Map,this.nextLayerId=0}get size(){return this.layersMap.size}resize(t,e,i){this.canvas.resize(t,e,i);for(const{canvas:s}of this.layersMap.values())s.resize(t,e,i)}addLayer(t){const{width:e,height:i,pixelRatio:s}=this.canvas,{name:n}=t,r=new HdpiOffscreenCanvas({width:e,height:i,pixelRatio:s});return this.layersMap.set(r,{id:this.nextLayerId++,name:n,canvas:r}),this.debug("Scene.addLayer() - layers",this.layersMap),r}removeLayer(t){this.layersMap.has(t)&&(this.layersMap.delete(t),t.destroy(),this.debug("Scene.removeLayer() - layers",this.layersMap))}clear(){for(const t of this.layersMap.values())t.canvas.destroy();this.layersMap.clear()}},Scene=class extends import_ag_charts_core58.EventEmitter{constructor(t){super(),this.debug=import_ag_charts_core58.Debug.create(!0,"scene"),this.id=(0,import_ag_charts_core58.createId)(this),this.imageLoader=new ImageLoader,this.root=null,this.pendingSize=null,this.isDirty=!1,this.cleanup=new import_ag_charts_core58.CleanupRegistry,this.updateDebugFlags(),this.canvas=new HdpiCanvas(t),this.layersManager=new LayersManager(this.canvas),this.cleanup.register(this.imageLoader.on("image-loaded",()=>{this.emit("scene-changed",{})}),this.imageLoader.on("image-error",({uri:e})=>{import_ag_charts_core58.Logger.warnOnce(`Unable to load image ${e}`)}))}waitingForUpdate(){return this.imageLoader?.waitingToLoad()??!1}get width(){return this.pendingSize?.[0]??this.canvas.width}get height(){return this.pendingSize?.[1]??this.canvas.height}get pixelRatio(){return this.pendingSize?.[2]??this.canvas.pixelRatio}setContainer(t){const{element:e}=this.canvas;return e.remove(),t.appendChild(e),this}setRoot(t){return this.root===t?this:(this.isDirty=!0,this.root?.setScene(),this.root=t,t&&(t.visible=!0,t.setScene(this)),this)}updateDebugFlags(){import_ag_charts_core58.Debug.inDevelopmentMode(()=>Node._debugEnabled=!0)}clearCanvas(){this.canvas.clear()}attachNode(t){return this.appendChild(t),()=>t.remove()}appendChild(t){return this.root?.appendChild(t),this}removeChild(t){return t.remove(),this}download(t,e){(0,import_ag_charts_core58.downloadUrl)(this.canvas.toDataURL(e),t?.trim()??"image")}getDataURL(t){return this.canvas.toDataURL(t)}resize(t,e,i){return t=Math.round(t),e=Math.round(e),i??(i=this.pixelRatio),t>0&&e>0&&(t!==this.width||e!==this.height||i!==this.pixelRatio)?(this.pendingSize=[t,e,i],this.isDirty=!0,!0):!1}applyPendingResize(){return this.pendingSize?(this.layersManager.resize(...this.pendingSize),this.pendingSize=null,!0):!1}render(t){const{debugSplitTimes:e={start:performance.now()},extraDebugStats:i,seriesRect:s,debugColors:n}=t??{},{canvas:r,canvas:{context:a}={},root:o,width:l,height:c,pixelRatio:h}=this;if(!a)return;const u=import_ag_charts_core58.Debug.check("scene:stats","scene:stats:verbose");u&&this.ensureDebugStatsRegistration();const d=performance.now(),p=this.applyPendingResize();if(o&&!o.visible){this.isDirty=!1;return}let g;if(o instanceof Group&&(g=o.dirty),o!=null&&g===!1&&!this.isDirty){this.debug.check()&&this.debug("Scene.render() - no-op",{tree:buildTree(o,"console")}),u&&debugStats(this.layersManager,e,a,void 0,i,s,n);return}const f={ctx:a,width:l,height:c,devicePixelRatio:h,debugNodes:{}};import_ag_charts_core58.Debug.check("scene:stats:verbose")&&(f.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0,opsPerformed:0,opsSkipped:0}),prepareSceneNodeHighlight(f);let y=!1;if((g!==!1||p)&&(y=!0,r.clear()),o&&import_ag_charts_core58.Debug.check("scene:dirtyTree")){const{dirtyTree:m,paths:b}=buildDirtyTree(o);import_ag_charts_core58.Debug.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:m,paths:b})}if(o&&y){if(o.visible&&o.preRender(f),this.debug.check()){const m=buildTree(o,"console");this.debug("Scene.render() - before",{canvasCleared:y,tree:m})}if(o.visible)try{a.save(),o.render(f),a.restore()}catch(m){throw this.canvas.reset(),m}}e["\u270D\uFE0F"]=performance.now()-d,a.verifyDepthZero?.(),this.isDirty=!1,u&&debugStats(this.layersManager,e,a,f.stats,i,s,n),debugSceneNodeHighlight(a,f.debugNodes),o&&this.debug.check()&&this.debug("Scene.render() - after",{tree:buildTree(o,"console"),canvasCleared:y})}ensureDebugStatsRegistration(){if(this.releaseDebugStats)return;const t=registerDebugStatsConsumer(),e=()=>{t(),this.releaseDebugStats=void 0};this.releaseDebugStats=e,this.cleanup.register(e)}toSVG(){const{root:t,width:e,height:i}=this;if(t!=null)return Node.toSVG(t,e,i)}strip(){const{context:t,pixelRatio:e}=this.canvas;t.setTransform(e,0,0,e,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1,this.clear()}destroy(){this.strip(),this.canvas.destroy(),this.imageLoader.destroy(),this.cleanup.flush(),cleanupDebugStats(),Object.assign(this,{canvas:void 0})}};Scene.className="Scene";var import_ag_charts_core59=require("ag-charts-core"),AnnotationManager=class{constructor(t,e,i){this.eventsHub=t,this.annotationRoot=e,this.fireChartEvent=i,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(t){return t==null||(0,import_ag_charts_core59.isArray)(t)}restoreMemento(t,e,i){this.annotations=this.cleanData(i??[]).map(s=>{const n=this.getAnnotationTypeStyles(s.type);return(0,import_ag_charts_core59.mergeDefaults)(s,n)}),this.eventsHub.emit("annotations:restore",{annotations:this.annotations})}updateData(t){this.annotations=this.cleanData(t??[])}fireChangedEvent(){this.fireChartEvent({type:"annotations",annotations:(0,import_ag_charts_core59.deepClone)([...this.annotations])})}attachNode(t){return this.annotationRoot.append(t),()=>(t.remove(),this)}setAnnotationStyles(t){this.styles=t}getAnnotationTypeStyles(t){return this.styles?.[t]}cleanData(t){for(const e of t)"textAlign"in e&&delete e.textAlign;return t}},import_ag_charts_core60=require("ag-charts-core"),AxisManager=class{constructor(t,e){this.eventsHub=t,this.sceneRoot=e,this.axes=new Map,this.axisGridGroup=new Group({name:"Axes-Grids",zIndex:import_ag_charts_core60.ZIndexMap.AXIS_GRID}),this.axisGroup=new Group({name:"Axes",zIndex:import_ag_charts_core60.ZIndexMap.AXIS}),this.axisLabelGroup=new Group({name:"Axes-Labels",zIndex:import_ag_charts_core60.ZIndexMap.SERIES_LABEL}),this.axisCrosslineRangeGroup=new Group({name:"Axes-Crosslines-Range",zIndex:import_ag_charts_core60.ZIndexMap.SERIES_CROSSLINE_RANGE}),this.axisCrosslineLineGroup=new Group({name:"Axes-Crosslines-Line",zIndex:import_ag_charts_core60.ZIndexMap.SERIES_CROSSLINE_LINE}),this.axisCrosslineLabelGroup=new Group({name:"Axes-Crosslines-Label",zIndex:import_ag_charts_core60.ZIndexMap.SERIES_LABEL}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup),this.sceneRoot.appendChild(this.axisLabelGroup),this.sceneRoot.appendChild(this.axisCrosslineRangeGroup),this.sceneRoot.appendChild(this.axisCrosslineLineGroup),this.sceneRoot.appendChild(this.axisCrosslineLabelGroup)}updateAxes(t,e){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const s of t)e.includes(s)||(s.detachAxis(i),s.destroy());for(const s of e)t?.includes(s)||s.attachAxis(i);this.axes.clear();for(const s of e){const n=s.createAxisContext();this.axes.has(n.direction)?this.axes.get(n.direction)?.push(n):this.axes.set(n.direction,[n])}this.eventsHub.emit("axis:change",null)}getAxisIdContext(t){for(const[,e]of this.axes)for(const i of e)if(i.axisId===t)return i}getAxisContext(t){return this.axes.get(t)??[]}destroy(){this.axes.clear(),this.axisGroup.remove(),this.axisGridGroup.remove()}},import_ag_charts_core61=require("ag-charts-core"),DataService=class{constructor(t,e,i){this.eventsHub=t,this.caller=e,this.animationManager=i,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.pendingData=void 0,this.debug=import_ag_charts_core61.Debug.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(t){typeof t=="function"&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=t,this.isLoadingInitialData=!0,this.animationManager.skip(),this.eventsHub.emit("data:source-change",null))}clearCallback(){this.dataSourceCallback=void 0}load(t){const{pendingData:e}=this;if(e!=null&&(e.params.windowStart==null&&e.params.windowEnd==null||e.params.windowStart?.valueOf()===t.windowStart?.valueOf()&&e.params.windowEnd?.valueOf()===t.windowEnd?.valueOf())){const i=this.requestCounter++;this.isLoadingInitialData=!1,this.dispatch(i,e.data);return}this.isLoadingData=!0,this.throttledFetch(t)}isLazy(){return this.dataSourceCallback!=null}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}async getData(){const{latestRequest:t}=this;if(!t)return;const{params:e,fetchRequest:i}=t,s=await i;return{params:e,data:s}}restoreData(t){this.pendingData=t}createThrottledFetch(t){return(0,import_ag_charts_core61.throttle)(e=>this.fetch(e).catch(i=>import_ag_charts_core61.Logger.error("callback failed",i)),t,{leading:!1,trailing:!0})}createThrottledDispatch(t){return(0,import_ag_charts_core61.throttle)((e,i)=>this.dispatch(e,i),t,{leading:!0,trailing:!0})}dispatch(t,e){this.debug(`DataService - dispatching 'data-load' | ${t}`),this.eventsHub.emit("data:load",{data:e})}async fetch(t){"context"in this.caller&&(t.context=this.caller.context);const e=Promise.resolve().then(async()=>{if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");const i=performance.now(),s=this.requestCounter++;this.debug(`DataService - requesting | ${s}`);let n;try{n=await this.dataSourceCallback(t),this.debug(`DataService - response | ${performance.now()-i}ms | ${s}`)}catch(a){this.debug(`DataService - request failed | ${s}`),import_ag_charts_core61.Logger.errorOnce(`DataService - request failed | [${a}]`)}this.isLoadingInitialData=!1;const r=this.freshRequests.indexOf(e);return r===-1||this.dispatchOnlyLatest&&r!==this.freshRequests.length-1?(this.debug(`DataService - discarding stale request | ${s}`),n):(this.freshRequests=this.freshRequests.slice(r+1),this.freshRequests.length===0&&(this.isLoadingData=!1),Array.isArray(n)?this.throttledDispatch(s,n):this.eventsHub.emit("data:error",null),n)});this.latestRequest={params:t,fetchRequest:e},this.freshRequests.push(e),await e}};__decorateClass([(0,import_ag_charts_core61.ActionOnSet)({newValue(t){this.throttledDispatch=this.createThrottledDispatch(t)}})],DataService.prototype,"dispatchThrottle",2),__decorateClass([(0,import_ag_charts_core61.ActionOnSet)({newValue(t){this.throttledFetch=this.createThrottledFetch(t)}})],DataService.prototype,"requestThrottle",2);var import_ag_charts_core62=require("ag-charts-core"),FontManager=class{constructor(t,e){this.domManager=t,this.updateService=e,this.observers=[]}updateFonts(t){if(!(!t||t.size===0)){this.loadFonts(t);for(const e of t)this.observeFontStatus(e)}}destroy(){for(const t of this.observers)t.disconnect();this.observers=[]}loadFonts(t){const e=Array.from(t).map(r=>encodeURIComponent(r)),i=":wght@100;200;300;400;500;600;700;800;900",s=`${i}&family=`,n=`@import url('https://fonts.googleapis.com/css2?family=${e.join(s)}${i}&display=swap');
|
|
`;this.domManager.addStyles(`google-font-${e.join("-")}`,n)}observeFontStatus(t){const e=(0,import_ag_charts_core62.getResizeObserver)();if(e===void 0)return;const i=(0,import_ag_charts_core62.getDocument)();if(!i)return;const s=i.createElement("div");s.style.setProperty("position","absolute"),s.style.setProperty("top","0"),s.style.setProperty("margin","0"),s.style.setProperty("padding","0"),s.style.setProperty("overflow","hidden"),s.style.setProperty("visibility","hidden"),s.style.setProperty("width","auto"),s.style.setProperty("max-width","none"),s.style.setProperty("font-synthesis","none"),s.style.setProperty("font-family",t),s.style.setProperty("font-size","16px"),s.style.setProperty("white-space","nowrap"),s.textContent="UVWxyz",this.domManager.addChild("canvas-container",`font-check-${encodeURIComponent(t)}`,s);const n=new e(r=>{const a=r?.at(0)?.contentBoxSize.at(0)?.inlineSize;a!=null&&a>0&&(import_ag_charts_core62.cachedTextMeasurer.clear(),this.updateService.update(import_ag_charts_core62.ChartUpdateType.PERFORM_LAYOUT))});n.observe(s),this.observers.push(n)}},import_ag_charts_core64=require("ag-charts-core"),import_ag_charts_core63=require("ag-charts-core"),Listeners=class{constructor(){this.registeredListeners=new Map}addListener(t,e){const i={symbol:Symbol(t),handler:e};return this.registeredListeners.has(t)?this.registeredListeners.get(t).push(i):this.registeredListeners.set(t,[i]),()=>this.removeListener(i.symbol)}removeListener(t){for(const[e,i]of this.registeredListeners.entries()){const s=i.findIndex(n=>n.symbol===t);if(s>=0){i.splice(s,1),i.length===0&&this.registeredListeners.delete(e);break}}}dispatch(t,...e){for(const i of this.getListenersByType(t))try{i.handler(...e)}catch(s){import_ag_charts_core63.Logger.errorOnce(s)}}getListenersByType(t){return this.registeredListeners.get(t)??[]}destroy(){this.registeredListeners.clear()}},defaultTimeFormats={millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e",month:"%b",year:"%Y"},hardCodedTimeFormats={millisecond:"%Y %b %e %H:%M:%S.%L",second:"%Y %b %e %H:%M:%S",minute:"%Y %b %e %H:%M",hour:"%Y %b %e %H:%M",day:"%Y %b %e",month:"%Y %b",year:"%Y"},FORMAT_ORDERS={year:0,month:1,day:2,hour:3,minute:4,second:5,millisecond:6},MILLISECOND_FORMAT=/%[-_0]?L/,SECOND_FORMAT=/%[-_0]?S/,MINUTE_FORMAT=/%[-_0]?M/,HOUR_FORMAT=/%[-_0]?[HI]/,DAY_FORMAT=/^%[-_0]?[de]$/,MONTH_FORMAT=/^%[-_0]?[Bbm]$/,YEAR_FORMAT=/^%[-_0]?[Yy]$/;function deriveTimeSpecifier(t,e,i){if(typeof t=="string")return t;t??(t=defaultTimeFormats);const{millisecond:s=defaultTimeFormats.millisecond,second:n=defaultTimeFormats.second,minute:r=defaultTimeFormats.minute,hour:a=defaultTimeFormats.hour,day:o=defaultTimeFormats.day,month:l=defaultTimeFormats.month,year:c=defaultTimeFormats.year}=t,h=FORMAT_ORDERS[e],u=hardCodedTimeFormats[e],d=i?FORMAT_ORDERS[i]:-1;if(d<FORMAT_ORDERS.year&&h>=FORMAT_ORDERS.year&&!YEAR_FORMAT.test(c)||d<FORMAT_ORDERS.month&&h>=FORMAT_ORDERS.month&&!MONTH_FORMAT.test(l)||d<FORMAT_ORDERS.day&&h>=FORMAT_ORDERS.day&&!DAY_FORMAT.test(o))return u;let p;switch(e){case"year":return c;case"month":return d<FORMAT_ORDERS.year?`${l} ${c}`:l;case"day":return d<FORMAT_ORDERS.year?`${l} ${o} ${c}`:`${l} ${o}`;case"hour":p=a;break;case"minute":p=r;break;case"second":p=n;break;case"millisecond":p=s;break;default:return u}if(h>=FORMAT_ORDERS.hour&&!HOUR_FORMAT.test(p)||h>=FORMAT_ORDERS.minute&&!MINUTE_FORMAT.test(p)||h>=FORMAT_ORDERS.second&&!SECOND_FORMAT.test(p)||h>=FORMAT_ORDERS.millisecond&&!MILLISECOND_FORMAT.test(p))return u;let g;return d<FORMAT_ORDERS.year?g=`${l} ${o} ${c}`:d<FORMAT_ORDERS.month&&(g=`${l} ${o}`),g?`${p} ${g}`:p}var FormatManager=class ye extends Listeners{constructor(){super(...arguments),this.formats=new Map,this.dateFormatter=(0,import_ag_charts_core64.simpleMemorize2)((e,i,s,n,r)=>{const a=ye.mergeSpecifiers(e,i)??defaultTimeFormats;return ye.getFormatter("date",a,s,n,{truncateDate:r})}),this.formatter=void 0}static mergeSpecifiers(...e){let i;for(const s of e)(0,import_ag_charts_core64.isPlainObject)(s)&&(0,import_ag_charts_core64.isPlainObject)(i)?i={...i,...s}:i=s;return i}static getFormatter(e,i,s,n="long",{truncateDate:r}={}){if((0,import_ag_charts_core64.isPlainObject)(i)){if(e!=="date"){import_ag_charts_core64.Logger.warn("Date formatter configuration is not supported for non-date types.");return}s??(s="millisecond");const a=n==="component"?i?.[s]??defaultTimeFormats[s]:deriveTimeSpecifier(i,s,r);return(0,import_ag_charts_core64.buildDateFormatter)(a)}switch(e){case"number":{const a=(0,import_ag_charts_core64.parseNumberFormat)(i);return a==null?void 0:(0,import_ag_charts_core64.createNumberFormatter)(a)}case"date":return(0,import_ag_charts_core64.buildDateFormatter)(i);case"category":return a=>i.replace("%s",String(a))}}setFormatter(e){this.formatter!==e&&(this.formatter=e,this.formats.clear(),this.dateFormatter.reset(),this.dispatch("format-changed"))}format(e,i,{specifier:s,truncateDate:n,allowNull:r}={}){if(i.value==null&&!r)return;const{formatter:a}=this;if(a==null)return;if(typeof a=="function"){const h=e(a,i);return h==null?void 0:String(h)}const o=a[i.property];if(o==null)return;if(typeof o=="function"){const h=e(o,i);return h==null?h:(0,import_ag_charts_core64.toTextString)(h)}else if(i.type==="date"){const{unit:h,style:u}=i;return this.dateFormatter(o,s,h,u,n)?.(i.value)}const l=s??o;if(typeof l!="string")return;let c=this.formats.get(l);return c==null&&(c=ye.getFormatter(i.type,l),this.formats.set(l,c)),c?.(i.value,i.type==="number"?i.fractionDigits:void 0)}defaultFormat(e,{specifier:i,truncateDate:s}={}){const{formatter:n}=this,r=typeof n=="function"?void 0:n?.[e.property];switch(e.type){case"date":{const{unit:a,style:o}=e,l=r!=null&&typeof r!="function"?r:void 0;return this.dateFormatter(l,i,a,o,s)?.(e.value)??String(e.value)}case"number":return(0,import_ag_charts_core64.formatValue)(e.value,e.fractionDigits);case"category":return e.value==null?"":Array.isArray(e.value)?e.value.join(" - "):typeof e.value=="string"?e.value:typeof e.value=="number"?(0,import_ag_charts_core64.formatValue)(e.value):String(e.value)}}},import_ag_charts_core66=require("ag-charts-core"),import_ag_charts_core65=require("ag-charts-core"),initialStatePickedOptionsDef={activeItem:{type:(0,import_ag_charts_core65.required)((0,import_ag_charts_core65.strictUnion)()("series-node","legend")),seriesId:import_ag_charts_core65.string,itemId:(0,import_ag_charts_core65.required)((0,import_ag_charts_core65.or)(import_ag_charts_core65.string,import_ag_charts_core65.positiveNumber))}};initialStatePickedOptionsDef.frozen=(0,import_ag_charts_core65.undocumented)(import_ag_charts_core65.boolean);var commonChartOptions={mode:(0,import_ag_charts_core65.undocumented)((0,import_ag_charts_core65.union)("integrated","standalone")),container:import_ag_charts_core65.htmlElement,context:()=>!0,theme:import_ag_charts_core65.defined,series:import_ag_charts_core65.array,annotations:import_ag_charts_core65.defined,navigator:import_ag_charts_core65.defined,scrollbar:import_ag_charts_core65.defined,initialState:{active:initialStatePickedOptionsDef,chartType:import_ag_charts_core65.string,annotations:import_ag_charts_core65.defined,legend:(0,import_ag_charts_core65.arrayOfDefs)({visible:import_ag_charts_core65.boolean,seriesId:import_ag_charts_core65.string,itemId:import_ag_charts_core65.string,legendItemName:import_ag_charts_core65.string},"legend state array"),zoom:import_ag_charts_core65.defined}},cartesianChartOptionsDefs={...import_ag_charts_core65.commonChartOptionsDefs,...commonChartOptions,axes:import_ag_charts_core65.object,data:import_ag_charts_core65.array},polarChartOptionsDefs={...import_ag_charts_core65.commonChartOptionsDefs,...commonChartOptions,axes:import_ag_charts_core65.object,data:import_ag_charts_core65.array},topologyChartOptionsDefs={...import_ag_charts_core65.commonChartOptionsDefs,...commonChartOptions,data:import_ag_charts_core65.array,topology:import_ag_charts_core65.geoJson},standaloneChartOptionsDefs={...import_ag_charts_core65.commonChartOptionsDefs,...commonChartOptions,data:import_ag_charts_core65.array},InteractionState=(t=>(t[t.Default=64]="Default",t[t.ZoomDrag=32]="ZoomDrag",t[t.Annotations=16]="Annotations",t[t.ContextMenu=8]="ContextMenu",t[t.Animation=4]="Animation",t[t.AnnotationsSelected=2]="AnnotationsSelected",t[t.Frozen=1]="Frozen",t[t.Clickable=82]="Clickable",t[t.Focusable=68]="Focusable",t[t.Keyable=86]="Keyable",t[t.ContextMenuable=72]="ContextMenuable",t[t.AnnotationsMoveable=18]="AnnotationsMoveable",t[t.AnnotationsDraggable=114]="AnnotationsDraggable",t[t.ZoomDraggable=100]="ZoomDraggable",t[t.ZoomClickable=68]="ZoomClickable",t[t.ZoomWheelable=118]="ZoomWheelable",t[t.All=126]="All",t))(InteractionState||{}),InteractionManager=class{constructor(){this.stateQueue=68}pushState(t){this.stateQueue|=t}popState(t){this.stateQueue&=~t}isState(t){return!!(this.stateQueue&-this.stateQueue&t)}},ActiveManager=class{constructor(t,e,i,s,n){this.chartService=t,this.eventsHub=e,this.interactionManager=s,this.fireEvent=n,this.mementoOriginatorKey="active",this.updateable=!0,this.didLayout=!1,this.pendingMemento=void 0;const r=i.addListener("pre-scene-render",()=>{this.didLayout=!0;const{pendingMemento:a}=this;a&&(this.restoreMemento(a.version,a.mementoVersion,a.memento),this.pendingMemento=void 0),r()})}isFrozen(){return this.interactionManager.isState(1)}clear(){this.update(void 0,void 0)}update(t,e){this.performUpdate("user-interaction",t,e,!1)}performUpdate(t,e,i,s){if(!this.updateable)return;const n=this.currentItem;if(this.currentItem=e,this.eventsHub.emit("active:update",e),s||!(0,import_ag_charts_core66.objectsEqual)(n,e)){const{activeItem:r}=this.createMemento(),{datum:a}=i??{};this.fireEvent({type:"activeChange",source:t,activeItem:r,datum:a})}}createMemento(){switch(this.currentItem?.type){case"series-node":case"legend":{const{type:t,seriesId:e,itemId:i}=this.currentItem;return{activeItem:{type:t,seriesId:e,itemId:i}}}default:return this.currentItem?.type,{}}}guardMemento(t,e){if(t==null)return!0;const i=(0,import_ag_charts_core66.validate)(t,commonChartOptions.initialState.active);return e.push(...i.invalid.map(s=>s.toString())),i.invalid.length===0}restoreMemento(t,e,i){if(!this.didLayout){this.pendingMemento={version:t,mementoVersion:e,memento:i};return}this.updateable=!1;const[s,n]=this.performRestoration(i?.activeItem);this.updateable=!0;const r=this.isFrozen(),a=i?.frozen,o=a===void 0?!1:r!==a;a===!0?this.interactionManager.pushState(1):a===!1&&this.interactionManager.popState(1),this.performUpdate("state-change",s,n,o)}performRestoration(t){let e=!1;const i=()=>e=!0;let s;const n=o=>s=o,r=this.pendingMemento!==void 0,a=this.chartService.id;return this.eventsHub.emit("active:load-memento",{initialState:r,chartId:a,activeItem:t,reject:i,setDatum:n}),e?[void 0,void 0]:[t,s]}},import_ag_charts_core82=require("ag-charts-core"),import_ag_charts_core68=require("ag-charts-core"),import_ag_charts_core67=require("ag-charts-core");function interpolateNumber(t,e){return i=>Number(t)*(1-i)+Number(e)*i}function interpolateColor(t,e){if(typeof t=="string")try{t=import_ag_charts_core67.Color.fromString(t)}catch{t=import_ag_charts_core67.Color.fromArray([0,0,0])}if(typeof e=="string")try{e=import_ag_charts_core67.Color.fromString(e)}catch{e=import_ag_charts_core67.Color.fromArray([0,0,0])}return i=>import_ag_charts_core67.Color.mix(t,e,i).toRgbaString()}var QUICK_TRANSITION=.2,PHASE_ORDER=["initial","remove","update","add","trailing","end","none"],PHASE_METADATA={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:QUICK_TRANSITION,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1+QUICK_TRANSITION,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}};function isNodeArray(t){return t.every(e=>e instanceof Node)}function deconstructSelectionsOrNodes(t){return isNodeArray(t)?{nodes:t,selections:[]}:{nodes:[],selections:t}}function animationValuesEqual(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((i,s)=>animationValuesEqual(i,e[s])):isInterpolating(t)&&isInterpolating(e)?t.equals(e):(0,import_ag_charts_core68.isPlainObject)(t)&&(0,import_ag_charts_core68.isPlainObject)(e)?(0,import_ag_charts_core68.objectsEqualWith)(t,e,animationValuesEqual):!1}var Animation=class{constructor(t){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=t.id,this.groupId=t.groupId,this.autoplay=t.autoplay??!0,this.ease=t.ease??import_ag_charts_core68.linear,this.phase=t.phase;const e=t.duration??PHASE_METADATA[this.phase].animationDuration;this.duration=e*t.defaultDuration,this.delay=(t.delay??0)*t.defaultDuration,this.onComplete=t.onComplete,this.onPlay=t.onPlay,this.onStop=t.onStop,this.onUpdate=t.onUpdate,this.interpolate=this.createInterpolator(t.from,t.to),this.from=t.from,t.skip===!0&&(this.onUpdate?.(t.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),t.collapsable!==!1&&(this.duration=this.checkCollapse(t,this.duration))}checkCollapse(t,e){return animationValuesEqual(t.from,t.to)?0:e}play(t=!1){this.isPlaying||this.isComplete||(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,t&&this.onUpdate?.(this.from,!0,this)))}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(t){if(this.isComplete)return t;!this.isPlaying&&this.autoplay&&this.play(!0);const e=this.elapsed;if(this.elapsed+=t,this.delay>this.elapsed)return 0;const i=this.interpolate(this.isReverse?1-this.delta:this.delta);this.onUpdate?.(i,!1,this);const s=this.delay+this.duration;return this.elapsed>=s?(this.stop(),this.isComplete=!0,this.onComplete?.(this),t-(s-e)):0}get delta(){return this.ease((0,import_ag_charts_core68.clamp)(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(t,e){if(typeof e!="object"||isInterpolating(e))return this.interpolateValue(t,e);if(Array.isArray(e)){const s=[];for(let n=0;n<e.length;n++){const r=this.createInterpolator(t[n],e[n]);r!=null&&s.push(r)}return n=>{const r=[];for(const a of s)r.push(a(n));return r}}const i=[];for(const s of Object.keys(e)){const n=this.createInterpolator(t[s],e[s]);n!=null&&i.push([s,n])}return s=>{const n={};for(const[r,a]of i)n[r]=a(s);return n}}interpolateValue(t,e){if(!(t==null||e==null)){if(isInterpolating(t))return i=>t[interpolate](e,i);try{switch(typeof t){case"number":return interpolateNumber(t,e);case"string":return interpolateColor(t,e);case"boolean":if(t===e)return()=>t;break;case"object":return()=>t;default:throw new Error(`Unable to interpolate values: ${t}, ${e}`)}}catch{}throw new Error(`Unable to interpolate values: ${t}, ${e}`)}}},import_ag_charts_core80=require("ag-charts-core"),import_ag_charts_core69=require("ag-charts-core");function adjustBandForInsertion(t,e,i,s){return e<t.startIndex?(t.startIndex+=i,t.endIndex+=i,!1):e<t.endIndex||e===t.endIndex&&s?(t.endIndex+=i,!0):!1}function adjustBandForRemoval(t,e,i){const s=e+i;if(s<=t.startIndex)return t.startIndex=Math.max(0,t.startIndex-i),t.endIndex=Math.max(t.startIndex,t.endIndex-i),!1;if(e>=t.endIndex)return!1;if(e<=t.startIndex&&s>=t.endIndex)t.startIndex=e,t.endIndex=e;else if(e<=t.startIndex){const n=s-t.startIndex,r=t.endIndex-t.startIndex;t.startIndex=e,t.endIndex=t.startIndex+Math.max(0,r-n)}else s>=t.endIndex?t.endIndex=Math.max(t.startIndex,e):t.endIndex=Math.max(t.startIndex,t.endIndex-i);return!0}function calculateTargetBandCount(t,e){const i=Math.ceil(t/1e3);return Math.max(e,i)}function calculateIdealBandSize(t,e){return Math.max(1,Math.ceil(t/e))}function filterEmptyBands(t){return t.filter(e=>e.endIndex>e.startIndex)}function initializeBandArray(t,e,i){if(!e.enableBanding||t<e.minDataSizeForBanding)return[i(0,t)];const s=calculateTargetBandCount(t,e.targetBandCount),n=calculateIdealBandSize(t,s),r=[];for(let a=0;a<t;a+=n){const o=Math.min(a+n,t);r.push(i(a,o))}return r}function applySpliceOperations(t,e){for(const i of e)i.insertCount>0&&t.handleInsertion(i.index,i.insertCount),i.deleteCount>0&&t.handleRemoval(i.index,i.deleteCount)}function markUpdatedIndices(t,e){for(const i of e)t.handleInsertion(i,0)}function applyIndexMapToBandHandler(t,e){applySpliceOperations(t,e.spliceOps),e.updatedIndices.size>0&&markUpdatedIndices(t,e.updatedIndices)}var DEFAULT_MIN_DATA_SIZE_FOR_BANDING=1e3,DEFAULT_TARGET_BAND_COUNT=10,BandedStructure=class{constructor(t={}){this.bands=[],this.dataSize=0,this.config={minDataSizeForBanding:t.minDataSizeForBanding??DEFAULT_MIN_DATA_SIZE_FOR_BANDING,targetBandCount:t.targetBandCount??DEFAULT_TARGET_BAND_COUNT,maxBandSize:t.maxBandSize??1/0,enableBanding:t.enableBanding??!0}}applyIndexMap(t){applyIndexMapToBandHandler(this,t)}initializeBands(t){this.dataSize=Math.max(0,t),this.bands=initializeBandArray(this.dataSize,this.config,(e,i)=>this.createBand(e,i))}getBandCount(){return this.bands.length}handleInsertion(t,e){if(this.dataSize+=e,this.bands.length===0){this.initializeBands(this.dataSize);return}const i=calculateTargetBandCount(this.dataSize,this.config.targetBandCount),s=calculateIdealBandSize(this.dataSize,i),n=Math.ceil(s*1.1);for(let r=0;r<this.bands.length;r++){const a=this.bands[r],o=r===this.bands.length-1;if(t===a.endIndex&&o&&e>0){a.endIndex-a.startIndex>=s?this.bands.push(this.createBand(t,t+e)):(a.endIndex+=e,a.isDirty=!0);break}adjustBandForInsertion(a,t,e,o)&&(a.isDirty=!0,e>0&&t<a.endIndex&&a.endIndex-a.startIndex>n&&this.splitBand(r,s))}}handleRemoval(t,e){if(e<=0||this.bands.length===0)return;const i=Math.min(e,Math.max(0,this.dataSize-t));if(!(i<=0)){this.dataSize=Math.max(0,this.dataSize-i);for(const s of this.bands)adjustBandForRemoval(s,t,i)&&(s.isDirty=!0);this.bands=filterEmptyBands(this.bands)}}splitBand(t,e){const i=this.bands[t],s=i.endIndex-i.startIndex,n=Math.min(e,Math.floor(s/2)),r=i.startIndex+n,a=this.createBand(i.startIndex,r),o=this.createBand(r,i.endIndex);this.bands.splice(t,1,a,o)}getStats(){const t=this.bands.filter(e=>e.isDirty);return{totalBands:this.bands.length,dirtyBands:t.length,dataSize:this.dataSize}}markRangeDirty(t,e){for(const i of this.bands)t<i.endIndex&&e>i.startIndex&&(i.isDirty=!0)}},DiscreteDomain=class Te{constructor(){this.domain=new Set,this.dateTimestamps=new Set,this.hasDateValues=!1,this.sortedValues=null,this.sortOrder=void 0,this.isSortedUnique=!1}static is(e){return e instanceof Te}setSortedUniqueMode(e,i){i&&(this.isSortedUnique=!0,this.sortOrder=e,this.sortedValues=[])}extend(e){this.isSortedUnique&&this.sortedValues?(this.sortedValues.push(e),e instanceof Date&&(this.hasDateValues=!0)):e instanceof Date?(this.hasDateValues=!0,this.dateTimestamps.add(e.valueOf())):this.domain.add(e)}getDomain(){if(this.isSortedUnique&&this.sortedValues){let e=!1;return this.sortedValues.filter(i=>{if(i==null)return e?!1:(e=!0,!0);if(i instanceof Date&&Number.isNaN(i.valueOf())){if(e)return!1;e=!0}return!0})}if(this.hasDateValues){const e=Array.from(this.dateTimestamps,i=>new Date(i));return this.domain.size>0?[...e,...Array.from(this.domain)]:e}return Array.from(this.domain)}isDateDomain(){return this.hasDateValues}isSortedUniqueMode(){return this.isSortedUnique}getSortOrder(){return this.sortOrder}mergeFrom(e){if(this.isSortedUnique&&e.isSortedUnique&&this.sortOrder===e.sortOrder&&this.sortOrder!==void 0&&e.sortedValues){e.hasDateValues&&(this.hasDateValues=!0),this.sortedValues??(this.sortedValues=[]),this.sortedValues.push(...e.sortedValues);return}if(this.convertToSetMode(),e.hasDateValues&&(this.hasDateValues=!0),e.isSortedUnique&&e.sortedValues)for(const i of e.sortedValues)i instanceof Date?this.dateTimestamps.add(i.valueOf()):this.domain.add(i);else{for(const i of e.dateTimestamps)this.dateTimestamps.add(i);for(const i of e.domain)this.domain.add(i)}}convertToSetMode(){if(this.isSortedUnique){if(this.sortedValues){for(const e of this.sortedValues)e instanceof Date?this.dateTimestamps.add(e.valueOf()):this.domain.add(e);this.sortedValues=null}this.isSortedUnique=!1,this.sortOrder=void 0}}},ContinuousDomain=class Le{constructor(){this.domain=[1/0,-1/0]}static is(e){return e instanceof Le}static extendDomain(e,i=[1/0,-1/0]){for(const s of e)typeof s=="number"&&(i[0]>s&&(i[0]=s),i[1]<s&&(i[1]=s));return i}extend(e){typeof e!="number"&&!(e instanceof Date)||(this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e))}getDomain(){return[...this.domain]}},BandedDomain=class extends BandedStructure{constructor(t,e={},i=!1){super(e),this.fullDomainCache=null,this.sortOrder=void 0,this.isUnique=!1,this.domainFactory=t,this.isDiscrete=i}setSortOrderMetadata(t,e){this.sortOrder=t,this.isUnique=e}createBand(t,e){const i=this.domainFactory();return this.isDiscrete&&this.sortOrder!==void 0&&this.isUnique&&DiscreteDomain.is(i)&&i.setSortedUniqueMode(this.sortOrder,this.isUnique),{startIndex:t,endIndex:e,subDomain:i,isDirty:!0}}initializeBands(t){super.initializeBands(t),this.fullDomainCache=null}handleInsertion(t,e){super.handleInsertion(t,e),this.fullDomainCache=null}handleRemoval(t,e){super.handleRemoval(t,e),this.fullDomainCache=null}splitBand(t,e){this.bands.length>1&&super.splitBand(t,e)}markBandsDirty(t,e){this.markRangeDirty(t,e),this.fullDomainCache=null}markAllBandsDirty(){for(const t of this.bands)t.isDirty=!0;this.fullDomainCache=null}extendBandsFromData(t,e){const i=t.length;for(const s of this.bands){if(!s.isDirty)continue;const n=this.domainFactory();this.isDiscrete&&this.sortOrder!==void 0&&this.isUnique&&DiscreteDomain.is(n)&&n.setSortedUniqueMode(this.sortOrder,this.isUnique),s.subDomain=n;const{startIndex:r,endIndex:a}=s;for(let o=r;o<a&&o<i;o++)e?.[o]||s.subDomain.extend(t[o]);s.isDirty=!1}this.fullDomainCache=null}getDirtyBands(){return this.bands.filter(t=>t.isDirty)}extend(t){this.markAllBandsDirty(),this.fullDomainCache=null}canUseSortedConcatenation(){if(!this.sortOrder||!this.isUnique||!this.isDiscrete)return!1;for(const t of this.bands)if(!DiscreteDomain.is(t.subDomain)||!t.subDomain.isSortedUniqueMode()||t.subDomain.getSortOrder()!==this.sortOrder)return!1;return!0}concatenateSortedDomains(){const t=new DiscreteDomain;t.setSortedUniqueMode(this.sortOrder,this.isUnique);for(const e of this.bands)DiscreteDomain.is(e.subDomain)&&t.mergeFrom(e.subDomain);return t.getDomain()}deduplicateNulls(t){let e=!1;return t.filter(i=>{if(i==null)return e?!1:(e=!0,!0);if(i instanceof Date&&Number.isNaN(i.valueOf())){if(e)return!1;e=!0}return!0})}getDomain(){if(this.fullDomainCache!==null)return this.fullDomainCache;if(this.bands.length===0)return this.fullDomainCache=[],[];if(this.bands.length===1){const t=this.bands[0].subDomain.getDomain();return this.fullDomainCache=this.isDiscrete?this.deduplicateNulls(t):t,this.fullDomainCache}if(this.isDiscrete){const t=this.bands[0].subDomain;if(DiscreteDomain.is(t))if(this.canUseSortedConcatenation())this.fullDomainCache=this.deduplicateNulls(this.concatenateSortedDomains());else{const e=new DiscreteDomain;for(const i of this.bands)DiscreteDomain.is(i.subDomain)&&e.mergeFrom(i.subDomain);this.fullDomainCache=this.deduplicateNulls(e.getDomain())}else{const e=new Set;for(const i of this.bands)for(const s of i.subDomain.getDomain())e.add(s);this.fullDomainCache=Array.from(e)}}else{let t,e;for(const i of this.bands){const s=i.subDomain.getDomain();if(s.length===2){const[n,r]=s;(t===void 0||n!=null&&t!=null&&n<t)&&(t=n),(e===void 0||r!=null&&e!=null&&r>e)&&(e=r)}}t!==void 0&&e!==void 0?this.fullDomainCache=[t,e]:this.fullDomainCache=[]}return this.fullDomainCache}getStats(){const t=this.bands.filter(i=>i.isDirty).length,e=this.bands.reduce((i,s)=>i+(s.endIndex-s.startIndex),0);return{bandCount:this.bands.length,dirtyBandCount:t,averageBandSize:this.bands.length>0?e/this.bands.length:0,dataSize:this.dataSize}}};function sumValues(t,e=[0,0]){for(const i of t)typeof i=="number"&&(i<0&&(e[0]+=i),i>0&&(e[1]+=i));return e}function groupSum(t,e){const i=e?.visible??!0;return{id:t,type:"aggregate",matchGroupIds:e?.matchGroupId?[e?.matchGroupId]:void 0,aggregateFunction:s=>sumValues(s),groupAggregateFunction:(s,n=[0,0])=>(i&&(n[0]+=s?.[0]??0,n[1]+=s?.[1]??0),n)}}function range(t,e){return{id:t,matchGroupIds:[e],type:"aggregate",aggregateFunction:s=>ContinuousDomain.extendDomain(s)}}function groupCount(t,e){const i=e?.visible??!0;return{id:t,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(s,n=[0,0])=>(i&&(n[0]+=s?.[0]??0,n[1]+=s?.[1]??0),n)}}function groupAverage(t,e){const i=e?.visible??!0;return{id:t,matchGroupIds:e?.matchGroupId?[e?.matchGroupId]:void 0,type:"aggregate",aggregateFunction:n=>sumValues(n),groupAggregateFunction:(n,r=[0,0,-1])=>(i&&(r[0]+=n?.[0]??0,r[2]++,r[1]+=n?.[1]??0),r),finalFunction:(n=[0,0,0])=>{const r=n[0]+n[1];return r>=0?[0,r/n[2]]:[r/n[2],0]}}}function area(t,e,i){const s={id:t,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(n,r=[])=>{const a=r[1]-r[0];return e.aggregateFunction(n).map(o=>o/a)}};return e.groupAggregateFunction&&(s.groupAggregateFunction=e.groupAggregateFunction),s}function accumulatedValue(t){return()=>{let e=0;return i=>(0,import_ag_charts_core69.isFiniteNumber)(i)?(e+=t?Math.max(0,i):i,e):i}}function trailingAccumulatedValue(){return()=>{let t=0;return e=>{if(!(0,import_ag_charts_core69.isFiniteNumber)(e))return e;const i=t;return t+=e,i}}}var import_ag_charts_core79=require("ag-charts-core"),import_ag_charts_core71=require("ag-charts-core"),import_ag_charts_core70=require("ag-charts-core"),NULL_KEY_STRING="\0__AG_NULL__\0",UNDEFINED_KEY_STRING="\0__AG_UNDEFINED__\0";function keyToString(t){return t===null?NULL_KEY_STRING:t===void 0?UNDEFINED_KEY_STRING:Array.isArray(t)?"["+t.map(keyToString).join(",")+"]":(0,import_ag_charts_core70.isObject)(t)?JSON.stringify(t):String(t)}function toKeyString(t){return t.map(keyToString).join("-")}function fixNumericExtent(t){const e=t?.map(Number);return e?.every(Number.isFinite)?e:[]}function getMissCount(t,e){return e?.get(t.id)??0}function isScoped(t){return"scopes"in t&&Array.isArray(t.scopes)}function createArray(t,e){const i=[];for(let s=0;s<t;s+=1)i[s]=e;return i}function uniqueChangeDescriptions(t){const e=new Set;for(const i of t.values())i&&e.add(i);return e}function datumKeys(t,e,i=!1){const s=[];for(const n of t){const r=n?.[e];if(r==null&&!i)return;s.push(r)}return s}function getPathComponents(t){const e=[];let i=0,s;const n=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"|-?\d+)\s*\])\s*)/g;for(;s=n.exec(t);){if(s.index!==i)return;i=s.index+s[0].length;const r=s[1].trim();if(r.startsWith("."))e.push(r.slice(1).trim());else if(r.startsWith("[")){const a=r.slice(1,-1).trim();a.startsWith("'")?e.push(a.slice(1,-1).replaceAll(/(?<!\\)\\'/g,"'")):a.startsWith('"')?e.push(a.slice(1,-1).replaceAll(/(?<!\\)\\"/g,'"')):e.push(a)}else e.push(r)}if(i===t.length)return e}function createPathAccessor(t){return e=>{let i=e;for(const s of t)i=i[s];return i}}var Aggregator=class{constructor(t,e,i){this.ctx=t,this.scopeCacheManager=e,this.resolvers=i}aggregateUngroupedData(t){const e=this.ctx.aggregates.map(()=>[1/0,-1/0]);t.domain.aggValues=e;const{columns:i,dataSources:s}=t,n=(0,import_ag_charts_core71.first)(s.keys()),r=t.keys.map(l=>l.get(n)),a=s.get(n)?.data??[],o=this.ctx.keys.some(l=>l.allowNullKey===!0);t.aggregation=a?.map((l,c)=>{const h=[];for(const[u,d]of this.ctx.aggregates.entries()){const p=this.valueGroupIdxLookup(d);let g=d.groupAggregateFunction?.()??[1/0,-1/0];const f=p.map(v=>i[v][c]),y=datumKeys(r,c,o),m=y==null?void 0:d.aggregateFunction(f,y);m&&(g=d.groupAggregateFunction?.(m,g)??ContinuousDomain.extendDomain(m,g));const b=d.finalFunction?.(g)??g;h[u]=b,ContinuousDomain.extendDomain(b,e[u])}return h})}aggregateGroupedData(t){const e=this.ctx.aggregates.map(()=>[1/0,-1/0]);t.domain.aggValues=e;const{columns:i}=t;for(const[s,n]of this.ctx.aggregates.entries()){const r=this.valueGroupIdxLookup(n);for(let a=0;a<t.groups.length;a++){const o=t.groups[a];o.aggregation??(o.aggregation=[]);const l=o.keys;let c=n.groupAggregateFunction?.()??[1/0,-1/0];const h=Math.max(...r.map(d=>o.datumIndices[d]?.length??0));for(let d=0;d<h;d++){const p=r.map(f=>{const y=o.datumIndices[f]?.[d];if(y==null)return;const m=this.resolvers.resolveAbsoluteIndex(a,y);return i[f][m]}),g=n.aggregateFunction(p,l);g&&(c=n.groupAggregateFunction?.(g,c)??ContinuousDomain.extendDomain(g,c))}const u=n.finalFunction?.(c)??c;o.aggregation[s]=u,ContinuousDomain.extendDomain(u,e[s])}}}postProcessGroups(t){const{groupProcessors:e}=this.ctx,{columnScopes:i,columns:s,invalidData:n}=t;for(const r of e){const a=this.valueGroupIdxLookup(r),o=r.adjust()();for(let l=0;l<t.groups.length;l++){const c=t.groups[l];o(s,a,c,l)}for(const l of a){const h=this.ctx.values[l].valueType==="category",u=s[l],d=(0,import_ag_charts_core71.first)(i[l]),p=n?.get(d),g=h?new DiscreteDomain:new ContinuousDomain;for(let f=0;f<u.length;f+=1)p?.[f]!==!0&&g.extend(u[f]);t.domain.values[l]=g.getDomain()}}}valueGroupIdxLookup(t){return this.scopeCacheManager.valueGroupIdxLookup(t)}},DomainInitializer=class{constructor(t){this.ctx=t}setupDomainForDefinition(t,e,i){const s=t.valueType==="category";let n=e.get(t);return!n&&this.ctx.bandingConfig?.enableBanding!==!1&&(n=new BandedDomain(s?()=>new DiscreteDomain:()=>new ContinuousDomain,this.ctx.bandingConfig,s),e.set(t,n)),n&&s&&n.setSortOrderMetadata(i?.sortOrder,i?.isUnique??!1),n||(s?new DiscreteDomain:new ContinuousDomain)}extendDomainFromData(t,e,i){if(t instanceof BandedDomain)t.extendBandsFromData(e,i);else for(let s=0;s<e.length;s++)i?.[s]!==!0&&t.extend(e[s])}initializeBandedDomain(t,e,i){if(!(t instanceof BandedDomain))return;const s=t.getStats(),n=s.bandCount===0||s.dataSize!==e;this.ctx.debug.check()&&n&&i&&this.ctx.debug(`Reinitializing bands for ${i}: bandCount=${s.bandCount}, dataSize=${s.dataSize}, dataLength=${e}`),n&&t.initializeBands(e)}},import_ag_charts_core73=require("ag-charts-core"),KEY_SORT_ORDERS=Symbol("key-sort-orders"),COLUMN_SORT_ORDERS=Symbol("column-sort-orders"),DOMAIN_RANGES=Symbol("domain-ranges"),DOMAIN_BANDS=Symbol("domain-bands"),REDUCER_BANDS=Symbol("reducer-bands"),SHARED_ZERO_INDICES=Object.freeze([0]),import_ag_charts_core72=require("ag-charts-core");function trackMissingValue(t,e){if(typeof e=="string")t.set(e,(t.get(e)??0)+1);else for(const i of e)t.set(i,(t.get(i)??0)+1)}function handleInvalidValue(t,e){if(t.reusableResult.valid=!1,t.hasInvalidValue){t.reusableResult.value=t.invalidValue,t.domain.extend(t.invalidValue);return}t.mode!=="integrated"&&import_ag_charts_core72.Logger.warnOnce(`invalid value of type [${typeof e}] for [${t.def.scopes} / ${t.def.id}] ignored:`,`[${e}]`),t.reusableResult.value=void 0}function processValidationCheck(t,e,i,s,n,r){return t&&e&&t(i,s,n)===!1?(r.reusableResult.missing=!1,handleInvalidValue(r,i),r.reusableResult):null}function handleMissingTracking(t,e,i,s,n){n.missing=!t,!t&&!e&&trackMissingValue(i,s)}function setValidResult(t,e,i){return e.valid=!0,e.value=t,i.extend(t),e}var ProcessValueFactory=class{constructor(t){this.ctx=t}createProcessValueFn(t,e,i,s,n,r){const a={def:t,accessor:e,domain:i,reusableResult:s,processorFns:n,mode:this.ctx.mode};return(r==="extend"?this.createSpecializedProcessValue(a,t.validation):null)??this.createGenericProcessValue(a,r)}createSpecializedProcessValue(t,e){return t.def.forceValue!=null?this.createSpecializedProcessValueForceValue(t):t.def.processor?this.createSpecializedProcessValueProcessor(t,e):e?t.def.type==="key"?this.createSpecializedProcessValueKeyValidation(t,e):this.createSpecializedProcessValueValueValidation(t,e):null}createValidationMeta(t){const{def:e,domain:i,reusableResult:s,mode:n}=t;return{reusableResult:s,hasInvalidValue:"invalidValue"in e,invalidValue:e.invalidValue,domain:i,def:e,mode:n}}createSpecializedProcessValueKeyValidation(t,e){const{def:i,accessor:s,domain:n,reusableResult:r}=t,a=i.property,o="missingValue"in i,l=i.missingValue,c=i.missing,h=i.allowNullKey??!1,u=this.createValidationMeta(t);if(s){const d=s;return function(g,f,y){let m;try{m=d(g)}catch{}const b=m!=null||h&&m==null,v=!h&&m==null;return!b||v||e(m,g,f)===!1?(r.missing=!b,!b&&!o&&trackMissingValue(c,y),handleInvalidValue(u,m),r):(r.missing=!1,r.valid=!0,r.value=m,n.extend(m),r)}}return function(p,g,f){const y=a in p,m=y?p[a]:l,b=!h&&m==null;return!y||b||e(m,p,g)===!1?(r.missing=!y,!y&&!o&&trackMissingValue(c,f),handleInvalidValue(u,m),r):(r.missing=!1,r.valid=!0,r.value=m,n.extend(m),r)}}createSpecializedProcessValueValueValidation(t,e){const{def:i,accessor:s,domain:n,reusableResult:r}=t,a=i.property,o="missingValue"in i,l=i.missingValue,c=i.missing,h=this.createValidationMeta(t);if(s){const u=s;return function(p,g,f){let y;try{y=u(p)}catch{}const m=y!=null,b=processValidationCheck(e,m,y,p,g,h);return b!==null?b:(handleMissingTracking(m,o,c,f,r),setValidResult(y,r,n))}}return function(d,p,g){const f=a in d,y=f?d[a]:l,m=processValidationCheck(e,f,y,d,p,h);return m!==null?m:(handleMissingTracking(f,o,c,g,r),setValidResult(y,r,n))}}createSpecializedProcessValueForceValue(t){const{def:e,accessor:i,domain:s,reusableResult:n}=t,r=e.property,a=e.forceValue;if(i){const o=i;return function(c,h,u){let d;try{d=o(c)}catch{}const f=d!=null&&(0,import_ag_charts_core72.isNegative)(d)?-1*a:a;return n.missing=!1,n.valid=!0,n.value=f,s.extend(f),n}}return function(l,c,h){const u=r in l,d=u?l[r]:void 0,g=u&&(0,import_ag_charts_core72.isNegative)(d)?-1*a:a;return n.missing=!1,n.valid=!0,n.value=g,s.extend(g),n}}createSpecializedProcessValueProcessor(t,e){const{def:i,accessor:s,domain:n,reusableResult:r,processorFns:a}=t,o=i.property,l="missingValue"in i,c=i.missingValue,h=i.missing,u=i.processor,d=this.createValidationMeta(t);if(s){const p=s;return function(f,y,m){let b;try{b=p(f)}catch{}const v=b!=null,x=processValidationCheck(e,v,b,f,y,d);if(x!==null)return x;handleMissingTracking(v,l,h,m,r);let S=a.get(i);return S==null&&(S=u(),a.set(i,S)),b=S(b,y),setValidResult(b,r,n)}}return function(g,f,y){const m=o in g;let b=m?g[o]:c;const v=processValidationCheck(e,m,b,g,f,d);if(v!==null)return v;handleMissingTracking(m,l,h,y,r);let x=a.get(i);return x==null&&(x=u(),a.set(i,x)),b=x(b,f),setValidResult(b,r,n)}}createGenericProcessValue(t,e){const{def:i,accessor:s,domain:n,processorFns:r}=t,a=i.property,o="missingValue"in i,l=i.missingValue,c=i.missing,h=e==="extend",u=t.reusableResult,d=this.createValidationMeta(t);return function(g,f,y){let m,b;if(s){try{m=s(g)}catch{}b=m!=null}else b=a in g,m=b?g[a]:l;i.forceValue!=null&&(m=b&&(0,import_ag_charts_core72.isNegative)(m)?-1*i.forceValue:i.forceValue,b=!0),handleMissingTracking(b,o,c,y,u);const v=i.allowNullKey??!1;if(i.type==="key"&&m==null&&!v)return handleInvalidValue(d,m),u;const S=processValidationCheck(i.validation,b,m,g,f,d);if(S!==null)return S;if(u.valid=!0,i.processor){let I=r.get(i);I==null&&(I=i.processor(),r.set(i,I)),m=I(m,f)}return h&&n.extend(m),u.value=m,u}}};function scopesOverlap(t,e){return!t||!e||t.length===0||e.length===0?!0:t.some(i=>e.includes(i))}function findMatchingKeyDef(t,e){if(t.valueType==="category"){for(const i of e)if(i.property===t.property&&i.valueType===t.valueType&&scopesOverlap(i.scopes,t.scopes)&&i.validation===t.validation)return i}}var DomainManager=class{constructor(t,e,i){this.ctx=t,this.initializer=e,this.scopeCacheManager=i,this.processValueFactory=new ProcessValueFactory(t)}recomputeDomains(t){const e=this.ctx.debug.check()?performance.now():0,i=t[DOMAIN_BANDS];let s;const n=t[KEY_SORT_ORDERS],r=this.setupDefinitionDomains(this.ctx.keys,i,n),a=new Map;for(const h of this.ctx.values){const u=findMatchingKeyDef(h,this.ctx.keys);u&&a.set(h,u)}const o=this.setupValueDomainsWithSharing(this.ctx.values,i,r,a),l=new Set;for(const[,h]of a){const u=r.get(h);u&&l.add(u)}this.initializeDomainBands(this.ctx.keys,r,h=>{const u=t.keys[h];return Math.max(...Array.from(u.values()).map(d=>d.length))},h=>String(h.property)),this.initializeDomainBands(this.ctx.values,o,h=>t.columns[h].length,h=>String(h.property));const c=new Map;if(i.size>0){s={totalBands:0,dirtyBands:0,totalData:0};for(const h of i.values())if(h instanceof BandedDomain){const u=h.getStats();c.set(h,u),s.totalBands+=u.bandCount,s.dirtyBands+=u.dirtyBandCount,s.totalData=Math.max(s.totalData,u.dataSize)}}if(this.extendDomainsFromData(this.ctx.keys,r,(h,u)=>t.keys[h]?.get(u),h=>h.scopes??[],h=>t.invalidKeys?.get(h)),this.extendDomainsFromData(this.ctx.values,o,(h,u)=>t.columns[h],h=>[(0,import_ag_charts_core73.first)(h.scopes)],h=>t.invalidKeys?.get(h),l),t.domain.keys=this.ctx.keys.map(function(u){const d=r.get(u),p=d.getDomain();return ContinuousDomain.is(d)&&p[0]>p[1]?[]:p}),t.domain.values=this.ctx.values.map(function(u){const d=o.get(u),p=d.getDomain();return ContinuousDomain.is(d)&&p[0]>p[1]?[]:p}),t.type==="grouped"&&(t.domain.groups=t.groups.map(h=>h.keys)),this.collectDomainBandingMetadata(t,r,o,i,c),this.ctx.debug.check()&&e>0){const u=performance.now()-e;if(s&&s.totalBands>0){const d=s.dirtyBands/s.totalBands,p=Math.round(d*s.totalData);this.ctx.debug(`recomputeDomains with banding: ${u.toFixed(2)}ms, bands: ${s.dirtyBands}/${s.totalBands} dirty, data scanned: ~${p}/${s.totalData} (${(d*100).toFixed(1)}%)`)}else this.ctx.debug(`recomputeDomains: ${u.toFixed(2)}ms (no banding)`)}}setupDefinitionDomains(t,e,i){const s=new Map;for(const[n,r]of t.entries()){const a=i?.get(n);s.set(r,this.initializer.setupDomainForDefinition(r,e,a))}return s}initializeDomainBands(t,e,i,s){for(const[n,r]of t.entries()){const a=e.get(r);if(!a)continue;const o=i(n);this.initializer.initializeBandedDomain(a,o,s(r))}}extendDomainsFromData(t,e,i,s,n,r){for(const[a,o]of t.entries()){const l=e.get(o);if(l&&!r?.has(l))for(const c of s(o)){if(!c)continue;const h=i(a,c);if(!h)continue;const u=n(c);this.initializer.extendDomainFromData(l,h,u)}}}setupValueDomainsWithSharing(t,e,i,s){const n=new Map;for(const r of t){const a=s.get(r);if(a){const o=i.get(a);if(o){n.set(r,o);continue}}n.set(r,this.initializer.setupDomainForDefinition(r,e))}return n}initDataDomainProcessor(t){const{keys:e,values:i}=this.ctx,s=new Set;for(const d of i)if(d.scopes)for(const p of d.scopes)s.add(p);const n=new Map,r=new Map;let a=!0;const o=()=>{for(const d of e)d.valueType==="category"?n.set(d,new DiscreteDomain):n.set(d,new ContinuousDomain);for(const d of i){const p=findMatchingKeyDef(d,e);if(p){const g=n.get(p);if(g){n.set(d,g),a&&(a=(d.scopes?.length??0)===s.size);continue}}d.valueType==="category"?n.set(d,new DiscreteDomain):(n.set(d,new ContinuousDomain),a&&(a=(d.scopes?.length??0)===s.size))}};o();const l=this.scopeCacheManager.buildAccessors((0,import_ag_charts_core73.iterate)(e,i)),c=new WeakMap;for(const d of(0,import_ag_charts_core73.iterate)(e,i)){const p=l.get(d.property),g=n.get(d),f={value:void 0,missing:!1,valid:!1},y=this.processValueFactory.createProcessValueFn(d,p,g,f,r,t);c.set(d,y)}function h(d){const p=c.get(d);if(!p)throw new Error("AG Charts - missing processValue function for definition");return p}function u(d,p,g,f){return h(d)(p,g,f)}return{dataDomain:n,processValue:u,getProcessValue:h,initDataDomain:o,scopes:s,allScopesHaveSameDefs:a}}collectDomainBandingMetadata(t,e,i,s,n){t.optimizations??(t.optimizations={});const r=(l,c)=>l.map(h=>{const u=c.get(h),d=s.get(h),p=u instanceof BandedDomain;let g;p||(g=h.valueType==="category"?"discrete domain":"not configured");let f;if(p&&d){const y=n.get(d)??d.getStats(),m=y.bandCount>0?y.dirtyBandCount/y.bandCount:0;f={totalBands:y.bandCount,dirtyBands:y.dirtyBandCount,dataSize:y.dataSize,scanRatio:m}}return{property:String(h.property),applied:p,reason:g,stats:f}}),a=r(this.ctx.keys,e),o=r(this.ctx.values,i);t.optimizations.domainBanding={keyDefs:a,valueDefs:o}}},import_ag_charts_core74=require("ag-charts-core");function createKeyTracker(){return{lastValue:void 0,sortOrder:0,isUnique:!0,isOrdered:!0}}function updateKeyTracker(t,e){const i=typeof e=="number"?e:e?.valueOf?.();if(typeof i!="number"||!Number.isFinite(i))return;if(t.lastValue===void 0){t.lastValue=i;return}const s=i-t.lastValue;if(s===0)t.isUnique=!1;else if(t.isOrdered){const n=s>0?1:-1;t.sortOrder===0?t.sortOrder=n:t.sortOrder!==n&&(t.isOrdered=!1)}t.lastValue=i}function trackerToSortOrderEntry(t){return{sortOrder:t.isOrdered&&t.sortOrder!==0?t.sortOrder:void 0,isUnique:t.isUnique,isDirty:!1}}var DataExtractor=class{constructor(t,e){this.ctx=t,this.domainManager=e,this.markScopeDatumInvalid=function(i,s,n,r,a){for(const o of i){r.has(o)||(r.set(o,createArray(s.length,!1)),a.set(o,0));const l=r.get(o);l[n]||(l[n]=!0,a.set(o,a.get(o)+1))}}}extractData(t){const{dataDomain:e,getProcessValue:i,allScopesHaveSameDefs:s}=this.domainManager.initDataDomainProcessor("extend"),{keys:n,values:r}=this.ctx,{invalidData:a,invalidKeys:o,invalidKeyCount:l,invalidDataCount:c,allKeyMappings:h,keySortOrders:u}=this.extractKeys(n,t,i),{columns:d,columnScopes:p,columnNeedValueOf:g,partialValidDataCount:f,maxDataLength:y}=this.extractValues(a,c,r,t,o,i),m=b=>{const v=e.get(b),x=v.getDomain();return ContinuousDomain.is(v)&&x[0]>x[1]?[]:x};return{type:"ungrouped",input:{count:y},scopes:new Set(t.keys()),dataSources:t,aggregation:void 0,keys:[...h.values()],columns:d,columnScopes:p,columnNeedValueOf:g,invalidKeys:o,invalidKeyCount:l,invalidData:a,invalidDataCount:c,domain:{keys:n.map(m),values:r.map(m)},defs:{allScopesHaveSameDefs:s,keys:n,values:r},partialValidDataCount:f,time:0,version:0,[DOMAIN_RANGES]:new Map,[KEY_SORT_ORDERS]:u,[COLUMN_SORT_ORDERS]:new Map,[DOMAIN_BANDS]:new Map,[REDUCER_BANDS]:new Map}}extractKeys(t,e,i){const s=new Map,n=new Map,r=new Map,a=new Map,o=new Map,l=new Map;let c,h;const u=t.map(p=>i(p)),d=(p,g)=>{const f=h.get(p);c.set(g,c.get(f)),s.has(f)&&(s.set(g,s.get(f)),n.set(g,n.get(f)),a.set(g,a.get(f)))};for(const[p,g]of t.entries()){const{invalidValue:f,scopes:y}=g,m=u[p];c=new Map,h=new Map,o.set(g,c);const b=createKeyTracker();for(const v of y??[]){const x=e.get(v)?.data??[];if(h.has(x)){d(x,v);continue}const S=[];c.set(v,S),h.set(x,v);let I,D,T=0;for(let A=0;A<x.length;A++){if(x[A]==null||typeof x[A]!="object"){I??(I=createArray(x.length,!1)),D??(D=createArray(x.length,!1)),T+=1,I[A]=!0,D[A]=!0,S.push(f);continue}const L=m(x[A],A,v);if(L.valid){S.push(L.value),updateKeyTracker(b,L.value);continue}S.push(f),I??(I=createArray(x.length,!1)),D??(D=createArray(x.length,!1)),T+=1,I[A]=!0,D[A]=!0}I&&D&&(s.set(v,I),n.set(v,D),r.set(v,T),a.set(v,T))}l.set(p,trackerToSortOrderEntry(b))}return{invalidData:n,invalidKeys:s,invalidKeyCount:r,invalidDataCount:a,allKeyMappings:o,keySortOrders:l}}extractValues(t,e,i,s,n,r){let a=0;const o=[],l=[],c=[];let h=0;const u=i.map(d=>r(d));for(const[d,p]of i.entries()){const{invalidValue:g}=p,f=u[d];if(new Set(p.scopes.map(D=>s.get(D))).size>1)throw new Error(`AG Charts - more than one data source for: ${JSON.stringify(p)}`);const m=new Set(p.scopes),b=(0,import_ag_charts_core74.first)(p.scopes),v=s.get(b)?.data??[],x=new Array,S=n.get(b);let I=!1;for(let D=0;D<v.length;D++){if(v[D]==null||typeof v[D]!="object"){this.markScopeDatumInvalid(p.scopes,v,D,t,e),x[D]=g;continue}const T=v[D],A=S==null?!1:S[D],L=f(T,D,p.scopes);let N=L.value;(A||!L.valid)&&this.markScopeDatumInvalid(p.scopes,v,D,t,e),A?N=g:L.valid||(a+=1,N=g),!I&&N!=null&&typeof N=="object"&&(I=!0),x[D]=N}o.push(x),l.push(m),c.push(I),h=Math.max(h,x.length)}return{columns:o,columnScopes:l,columnNeedValueOf:c,partialValidDataCount:a,maxDataLength:h}}warnDataMissingProperties(t){if(t.size!==0)for(const e of(0,import_ag_charts_core74.iterate)(this.ctx.keys,this.ctx.values))for(const[i,s]of e.missing){if(s<(t.get(i)?.data.length??1/0))continue;const n=i==null?"":` for ${i}`;import_ag_charts_core74.Logger.warnOnce(`the key '${e.property}' was not found in any data element${n}.`)}}},import_ag_charts_core75=require("ag-charts-core"),DataGrouper=class{constructor(t){this.ctx=t}groupData(t,e){var i;const{keys:s,columns:n,columnScopes:r,invalidKeys:a,invalidData:o}=t,l=t.scopes,c=[],h=[],u=l.size!==1||e!=null?new Map:void 0;let d=!0,p=0;const g=l.size,f=this.groupBatches(l,n,r,s,o,a),y=f.length;if(this.ctx.debug?.check()&&!t.optimizations&&(t.optimizations={}),this.ctx.debug?.check()){const v=g>0?1-y/g:0;t.optimizations.batchMerging={originalBatchCount:g,mergedBatchCount:y,mergeRatio:v}}const m=f.length===1,b=Object.freeze(createArray(f[0][1].length,SHARED_ZERO_INDICES));for(const[v,x,S,I,D,T]of f){const A=n[(0,import_ag_charts_core75.first)(x)];for(let L=0;L<A.length;L++){if(T?.[L]===!0)continue;const N=S.map(P=>P[L]);if(N==null||N.length===0)throw new Error("AG Charts - no keys found for scope(s): "+v.join(", "));const k=e?.(N)??N,w=u==null?void 0:toKeyString(k);let E=u?.get(w),O,R,_=!1;if(E==null?(O={keys:k,datumIndices:[],aggregation:[],validScopes:l},R=p++,E=[R,O],_=!0,u?.set(w,E),c.push(O.keys),h.push(O)):([R,O]=E,d=!1),D?.[L]===!0){O.validScopes===l&&(O.validScopes=new Set(l.values()));for(const P of I)O.validScopes.delete(P)}if(_&&L===R&&m)O.datumIndices=b;else{!_&&O.datumIndices===b&&(O.datumIndices=b.map(P=>[...P]));for(const P of x)(i=O.datumIndices)[P]??(i[P]=[]),O.datumIndices[P].push(L-R)}}}return{...t,type:"grouped",domain:{...t.domain,groups:c},groups:h,groupsUnique:d,optimizations:t.optimizations,[DOMAIN_BANDS]:t[DOMAIN_BANDS],[REDUCER_BANDS]:t[REDUCER_BANDS]}}groupBatches(t,e,i,s,n,r){const a=[],o=new Set;for(const l of t){const c=e.map((g,f)=>f).filter(g=>!o.has(g)&&i[g].has(l));if(c.length===0)continue;for(const g of c)o.add(g);const h=new Set;for(const g of c)for(const f of i[g])h.add(f);const u=s.map(g=>g.get(l)).filter(g=>g!=null),d=n?.get(l),p=r?.get(l);a.push([l,c,u,h,d,p])}return this.mergeCompatibleBatches(a)}areBatchesCompatible(t,e){const[,,i,,s,n]=t,[,,r,,a,o]=e;return i.every((l,c)=>l===r[c])&&n===o&&s===a}mergeCompatibleBatches(t){const e=[],i=new Set;for(let s=0;s<t.length;s++){if(i.has(s))continue;const[n,r,a,o,l,c]=t[s],h=[[n],[...r],a,new Set(o),l,c];this.findAndMergeCompatibleBatches(t,s,h,i),e.push(h),i.add(s)}return e}findAndMergeCompatibleBatches(t,e,i,s){const n=t[e];for(let r=e+1;r<t.length;r++){if(s.has(r))continue;const a=t[r],[o,l,,c]=a;if(this.areBatchesCompatible(n,a)){i[0].push(o),i[1].push(...l);for(const h of c)i[3].add(h);s.add(r)}}}},import_ag_charts_core77=require("ag-charts-core");function isAppendOnly(t){return t.removedIndices.size===0&&t.totalPrependCount===0&&t.totalAppendCount>0}function isPrependOnly(t){return t.removedIndices.size===0&&t.totalAppendCount===0&&t.totalPrependCount>0}function hasNoRemovals(t){return t.removedIndices.size===0}function isUpdateOnly(t){return t.removedIndices.size===0&&t.totalPrependCount===0&&t.totalAppendCount===0&&t.spliceOps.every(e=>e.insertCount===0&&e.deleteCount===0)}function hasOnlyRemovals(t){return t.removedIndices.size>0&&t.totalPrependCount===0&&t.totalAppendCount===0&&t.spliceOps.every(e=>e.insertCount===0)}function hasContiguousRemovalsAtStart(t){const{removedIndices:e}=t;if(e.size===0)return!1;const i=Array.from(e).sort((s,n)=>s-n);if(i[0]!==0)return!1;for(let s=0;s<i.length;s++)if(i[s]!==s)return!1;return!0}function isRollingWindow(t){return hasContiguousRemovalsAtStart(t)&&t.totalAppendCount>0&&t.totalPrependCount===0}var DataChangeDescription=class{constructor(t,e){this.indexMap=t,this.prependValues=e.prependValues,this.appendValues=e.appendValues,this.insertionValues=e.insertionValues}getRemovedIndices(){return Array.from(this.indexMap.removedIndices).sort((t,e)=>t-e)}getUpdatedIndices(){return Array.from(this.indexMap.updatedIndices).sort((t,e)=>t-e)}forEachPreservedIndex(t){const{originalLength:e,removedIndices:i,totalPrependCount:s}=this.indexMap;let n=0;const r=Array.from(i).sort((o,l)=>o-l);let a=0;for(let o=0;o<e;o++){for(;a<r.length&&r[a]<o;)n++,a++;if(!i.has(o)){const l=o+s-n;t(o,l)}}}getPrependedValues(){return this.prependValues}getAppendedValues(){return this.appendValues}getInsertionValues(){return this.insertionValues}applyToArray(t,e,i){const{spliceOps:s,finalLength:n,originalLength:r}=this.indexMap;if(!(r===n&&s.length===0)){for(const a of s){const o=a.insertCount>0?Array.from({length:a.insertCount},function(h,u){return e(a.index+u)}):[],l=t.splice(a.index,a.deleteCount,...o);i&&l.length>0&&i(l,a)}t.length!==n&&(t.length=n)}}},import_ag_charts_core76=require("ag-charts-core"),BandedReducer=class extends BandedStructure{constructor(t={}){super(t),this.lastDirtyBandCount=0,this.lastScanRatio=0,this.statsCaptured=!1}createBand(t,e){return{startIndex:t,endIndex:e,cachedResult:void 0,isDirty:!0}}initializeBands(t){super.initializeBands(t),this.statsCaptured=!1}getBands(){return this.bands}evaluateFromData(t,e,i=!1){const s=t.reducer();for(const n of this.bands){if(i&&!n.isDirty)continue;const r=t.needsOverlap&&n.startIndex>0?Math.max(0,n.startIndex-1):n.startIndex,a=this.evaluateRange(t,s,e,r,n.endIndex);n.cachedResult=a,n.isDirty=!1}}getResult(t){const e=this.bands.map(i=>i.cachedResult);return t.combineResults(e)}evaluateRange(t,e,i,s,n){let r=t.initialValue;const{keyColumns:a,keysParam:o,rawData:l}=i,c=Math.min(n,l.length);for(let h=s;h<c;h+=1){for(let u=0;u<o.length;u++)o[u]=a[u]?.[h];r=e(r,o)}return r}captureStatsBeforeProcessing(){const t=this.bands.filter(i=>i.isDirty),e=t.reduce((i,s)=>i+(s.endIndex-s.startIndex),0);this.lastDirtyBandCount=t.length,this.lastScanRatio=this.dataSize>0?e/this.dataSize:0,this.statsCaptured=!0}getStats(){const t=this.bands.filter(s=>!s.isDirty&&s.cachedResult!==void 0);let e,i;if(this.statsCaptured)e=this.lastDirtyBandCount,i=this.lastScanRatio;else{const s=this.bands.filter(r=>r.isDirty),n=s.reduce((r,a)=>r+(a.endIndex-a.startIndex),0);e=s.length,i=this.dataSize>0?n/this.dataSize:0}return{totalBands:this.bands.length,dirtyBands:e,dataSize:this.dataSize,scanRatio:i,cacheHits:t.length}}},ReducerManager=class{constructor(t={}){this.bandingConfig=t}static evaluateRange(t,e,i,s,n){let r=t.initialValue;const{keyColumns:a,keysParam:o,rawData:l}=i,c=Math.min(n,l.length);for(let h=s;h<c;h+=1){for(let u=0;u<o.length;u++)o[u]=a[u]?.[h];r=e(r,o)}return r}evaluate(t,e,i={}){var s;const n=this.createContext(t,e);if(!n)return;e[s=REDUCER_BANDS]??(e[s]=new Map);const r=e[REDUCER_BANDS],a=t.property;let o=r.get(a);return o||(o=new BandedReducer(this.bandingConfig),r.set(a,o)),o.getBandCount()===0&&o.initializeBands(n.rawData.length),i.beforeEvaluate?.(o,n),o.captureStatsBeforeProcessing(),o.evaluateFromData(t,n,i.reuseCleanBands??!1),o.getResult(t)}applyIndexMap(t,e){const i=t[REDUCER_BANDS];if(i)for(const s of i.values())s.applyIndexMap(e)}createContext(t,e){if(e.type!=="ungrouped")return;const i=isScoped(t)?t.scopes[0]:(0,import_ag_charts_core76.first)(e.dataSources.keys());if(i==null)return;const s=e.dataSources.get(i)?.data??[],n=e.keys.map(a=>a.get(i)).filter(a=>a!=null),r=n.map(()=>{});return{scopeId:i,rawData:s,keyColumns:n,keysParam:r}}},IncrementalProcessor=class{constructor(t,e){this.ctx=t,this.reducerManager=e}isReprocessingSupported(t){if(t.type==="grouped"){if(!t.groupsUnique||this.getUniqueDataSets(t).size!==1)return!1;const n=(0,import_ag_charts_core77.first)(t.scopes);if(t.invalidKeys?.get(n)?.some(a=>a))return!1}return this.ctx.aggregates.length>0||this.ctx.reducers.some(s=>s.supportsBanding!==!0||typeof s.combineResults!="function")||this.ctx.processors.some(s=>s.incrementalCalculate===void 0)||this.ctx.propertyProcessors.length>0?!1:this.ctx.groupProcessors.every(s=>s.supportsReprocessing??!1)}reprocessData(t,e,i,s,n,r){const a=performance.now(),o=this.collectScopeChanges(t,e);if(o.size===0)return t;this.commitPendingTransactions(t);const l=this.buildDefinitionProcessors(this.ctx.keys,i),c=this.buildDefinitionProcessors(this.ctx.values,i),h=this.processAllInsertions(t,o,l,c);this.processAllUpdates(t,o,l,c,h),this.updateBandsForChanges(t,o);const u=this.transformKeysArrays(t,o,h);this.transformColumnsArrays(t,o,h),this.transformInvalidityArrays(t,o,h),this.reprocessBandedReducers(t,o),t.type==="grouped"&&(this.transformGroupsArray(t,o,h),this.ctx.groupProcessors.length>0&&s(t,o)),this.invalidateSortOrdersForChanges(t,o),n(t),this.reprocessProcessors(t),t.reduced?.diff!=null&&o.size>0&&this.generateDiffMetadata(t,o,u),this.updateProcessedDataMetadata(t);const d=performance.now();t.time=d-a,t.version+=1,r(t,"reprocess");const p=uniqueChangeDescriptions(o);return t.changeDescription=p.size===1?p.values().next().value:void 0,t}updateBandsForChanges(t,e){const i=t[DOMAIN_BANDS];if(i.size===0)return;const s=uniqueChangeDescriptions(e);for(const n of s){const{indexMap:r}=n;for(const a of i.values())a.applyIndexMap(r)}}reprocessBandedReducers(t,e){if(t.type!=="ungrouped")return;const i=this.ctx.reducers.filter(s=>s.supportsBanding&&typeof s.combineResults=="function");if(i.length!==0){t.reduced??(t.reduced={});for(const s of i){const n=this.reducerManager.evaluate(s,t,{reuseCleanBands:!0,beforeEvaluate:(r,a)=>{if(!a.scopeId)return;const o=e.get(a.scopeId);o&&r.applyIndexMap(o.indexMap)}});n!==void 0&&(t.reduced[s.property]=n)}}}collectScopeChanges(t,e){const i=new Map;for(const[s,n]of t.dataSources){const r=e?.get(n)??n.getChangeDescription();r&&i.set(s,r)}return i}commitPendingTransactions(t){const e=this.getUniqueDataSets(t);for(const i of e)i.commitPendingTransactions()}buildDefinitionProcessors(t,e){return t.map((i,s)=>({def:i,index:s,processValue:e(i)}))}processAllInsertions(t,e,i,s){const n=new Map;for(const[r,a]of e){const o=t.dataSources.get(r);if(!o)continue;const l=this.processInsertionsOnce(r,a,o,i,s);n.set(r,l)}return n}processAllUpdates(t,e,i,s,n){for(const[r,a]of e){const o=t.dataSources.get(r);if(!o)continue;const l=a.getUpdatedIndices();if(l.length===0)continue;let c=n.get(r);c||(c=new Map,n.set(r,c));for(const h of l){if(h<0||h>=o.data.length)continue;const u=this.processDatum(o,h,r,i,s);u&&c.set(h,u)}}}processInsertionsOnce(t,e,i,s,n){const r=new Map,{finalLength:a}=e.indexMap;for(const o of e.indexMap.spliceOps)if(!(o.insertCount<=0))for(let l=0;l<o.insertCount;l++){const c=o.index+l;if(c<0||c>=a)continue;const h=this.processDatum(i,c,t,s,n);h&&r.set(c,h)}return r}processDatum(t,e,i,s,n){const r=t.data[e],a=new Map,o=new Map;let l=!1,c=!1;if(r==null||typeof r!="object")l=!0,c=!0;else{for(const{index:h,def:u,processValue:d}of s){if(!u.scopes?.includes(i))continue;const p=d(r,e,i);a.set(h,{value:p.value,valid:p.valid}),p.valid||(l=!0)}for(const{index:h,def:u,processValue:d}of n){if(!u.scopes?.includes(i))continue;const p=d(r,e,u.scopes);o.set(h,{value:p.value,valid:p.valid}),p.valid||(c=!0)}}return{keys:a,values:o,hasInvalidKey:l,hasInvalidValue:c}}transformArraysWithCache(t,e,i,s,n,r){for(const[a,o]of t.entries())for(const l of n(o)){const c=e.get(l);if(!c)continue;const h=s(a,l);if(!h)continue;const u=i.get(l);this.applyChangeDescWithCache(c,h,u,(d,p)=>r(d,o,a))}}transformKeysArrays(t,e,i){const s=new Map,n=o=>{let l=s.get(o);return l||(l={tuples:[]},s.set(o,l)),l},r=new WeakSet;for(const[o,l]of this.ctx.keys.entries())for(const c of l.scopes??[]){const h=e.get(c);if(!h)continue;const u=t.keys[o]?.get(c);if(!u)continue;if(r.has(u)){const f=Array.from(t.keys[o].entries()).find(([y,m])=>m===u)?.[0];f&&f!==c&&s.has(f)&&s.set(c,s.get(f));continue}r.add(u);const d=i.get(c),p=n(c);let g=0;this.applyChangeDescWithCache(h,u,d,f=>{const y=f?.keys.get(o);return y?.valid?y.value:l.invalidValue},f=>{for(const y of f)p.tuples[g]||(p.tuples[g]=new Array(this.ctx.keys.length)),p.tuples[g][o]=y,g+=1})}const a=new Map;for(const[o,{tuples:l}]of s){if(l.length===0)continue;const c=new Set;for(const h of l){const u=[];for(const[d,p]of h.entries())this.ctx.keys[d].scopes?.includes(o)&&u.push(p);u.length>0&&c.add(toKeyString(u))}a.set(o,c)}return a}transformColumnsArrays(t,e,i){this.transformArraysWithCache(this.ctx.values,e,i,s=>t.columns[s],s=>[(0,import_ag_charts_core77.first)(s.scopes)],(s,n,r)=>{if(s){if(s.hasInvalidKey)return n.invalidValue;const a=s.values.get(r);return a?.valid?a.value:n.invalidValue}return n.invalidValue})}transformInvalidityMap(t,e,i,s){const n=new Set;for(const[r,a]of e){let o=t.get(r);if(!o){const c=i.get(r);if(c&&Array.from(c.values()).some(s))o=createArray(a.indexMap.originalLength,!1),t.set(r,o);else continue}if(n.has(o))continue;n.add(o);const l=i.get(r);this.applyChangeDescWithCache(a,o,l,(c,h)=>s(c))}}transformInvalidityArrays(t,e,i){t.invalidKeys&&this.transformInvalidityMap(t.invalidKeys,e,i,s=>s?.hasInvalidKey??!1),t.invalidData&&this.transformInvalidityMap(t.invalidData,e,i,s=>s?s.hasInvalidKey||s.hasInvalidValue:!1)}applyChangeDescWithCache(t,e,i,s,n){t.applyToArray(e,a=>{const o=i?.get(a);return s(o,a)},n);const r=t.getUpdatedIndices();if(r.length!==0)for(const a of r){if(a<0||a>=e.length)continue;const o=i?.get(a);e[a]=s(o,a)}}transformGroupsArray(t,e,i){const s=(0,import_ag_charts_core77.first)(t.scopes),n=e.get(s);if(!n)return;const r=i.get(s);for(const[,o]of r??[])if(o.hasInvalidKey)throw new Error("AG Charts - reprocessing grouped data with invalid keys not supported. This typically indicates a data quality issue that requires full reprocessing.");n.applyToArray(t.groups,o=>this.createDataGroupForInsertion(o,t,s,r));const a=n.getUpdatedIndices();if(a.length>0)for(const o of a)o<0||o>=t.groups.length||(t.groups[o]=this.createDataGroupForInsertion(o,t,s,r))}createDataGroupForInsertion(t,e,i,s){const n=[];for(const u of e.keys){const d=u.get(i);d&&n.push(d[t])}const r=e.groups[0],a=()=>Object.freeze(createArray(e.columnScopes.length,SHARED_ZERO_INDICES)),o=r?.datumIndices??a(),c=s?.get(t)?.hasInvalidValue??!1;let h;return c?(h=new Set(e.scopes),h.delete(i)):h=e.scopes,{keys:n,datumIndices:o,aggregation:[],validScopes:h}}generateDiffMetadata(t,e,i){const s=(n,r)=>{const a=[];for(const o of t.keys){const l=o.get(n);if(!l)return;a.push(l[r])}return a.length>0?toKeyString(a):void 0};for(const[n,r]of e){const a={changed:!0,added:new Set,removed:i.get(n)??new Set,updated:new Set,moved:new Set};for(const c of r.indexMap.spliceOps)if(c.insertCount>0)for(let h=0;h<c.insertCount;h++){const u=c.index+h,d=s(n,u);d&&a.added.add(d)}const{originalLength:o,totalPrependCount:l}=r.indexMap;if(!isAppendOnly(r.indexMap))if(isPrependOnly(r.indexMap)&&o>0)for(let c=l;c<l+o;c++){const h=s(n,c);h&&a.moved.add(h)}else if(hasNoRemovals(r.indexMap)&&l>0)for(let c=0;c<o;c++){const h=c+l,u=s(n,h);u&&a.moved.add(u)}else r.forEachPreservedIndex((c,h)=>{if(c!==h){const u=s(n,h);u&&a.moved.add(u)}});t.reduced.diff[n]=a}}updateProcessedDataMetadata(t){let e=0;for(const s of t.dataSources.values())e=Math.max(e,s.data.length);t.input.count=e;let i=0;for(const[s,n]of t.invalidData??new Map){const r=t.invalidKeys?.get(s);for(let a=0;a<n.length;a++)n[a]&&!r?.[a]&&(i+=1)}t.partialValidDataCount=i,this.recountInvalid(t.invalidKeys,t.invalidKeyCount),this.recountInvalid(t.invalidData,t.invalidDataCount),this.invalidateCachesForChanges(t)}updateSortOrderForAppend(t,e,i){if(i.length===0)return;const s=a=>{if(typeof a=="number")return a;if(a instanceof Date)return a.valueOf()};let n=s(e);const r=t.sortOrder;for(const a of i){const o=s(a);if(o===void 0)continue;if(n===void 0){n=o;continue}const l=o-n;if(l===0&&(t.isUnique=!1),t.sortOrder!==void 0){let c=0;l>0?c=1:l<0&&(c=-1),c!==0&&c!==r&&(t.sortOrder=void 0)}n=o}}updateKeySortOrdersForAppend(t,e){for(const[i,s]of t.keys.entries()){const n=t[KEY_SORT_ORDERS].get(i);if(!n)continue;const r=(0,import_ag_charts_core77.first)(s.values());if(!r||r.length<=e)continue;const a=e>0?r[e-1]:void 0,o=r.slice(e);this.updateSortOrderForAppend(n,a,o)}}invalidateSortOrdersForChanges(t,e){const i=uniqueChangeDescriptions(e);let s=!0,n=!1,r=!1,a,o;for(const l of i){const{indexMap:c}=l;isUpdateOnly(c)||(isAppendOnly(c)?(n=!0,a=c.originalLength):hasOnlyRemovals(c)||(isRollingWindow(c)?(r=!0,o={originalLength:c.originalLength,removedCount:c.removedIndices.size}):s=!1))}s?n&&a!==void 0?this.updateKeySortOrdersForAppend(t,a):r&&o&&this.updateKeySortOrdersForRollingWindow(t,o):(t[KEY_SORT_ORDERS].clear(),t[COLUMN_SORT_ORDERS].clear())}updateKeySortOrdersForRollingWindow(t,e){const{originalLength:i,removedCount:s}=e;for(const[n,r]of t.keys.entries()){const a=t[KEY_SORT_ORDERS].get(n);if(!a)continue;const o=(0,import_ag_charts_core77.first)(r.values());if(!o||o.length===0)continue;const l=i-s,c=l>0?o[l-1]:void 0,h=o.slice(l);this.updateSortOrderForAppend(a,c,h)}}invalidateCachesForChanges(t){this.markDomainRangesDirty(t[DOMAIN_RANGES])}markDomainRangesDirty(t){for(const e of t.values())e.isDirty=!0}recountInvalid(t,e){if(!(!t||!e))for(const[i,s]of t){const n=s.filter(Boolean).length;n===0?(t.delete(i),e.delete(i)):e.set(i,n)}}reprocessProcessors(t){if(this.ctx.processors.length!==0){t.reduced??(t.reduced={});for(const e of this.ctx.processors){const i=t.reduced[e.property],s=e.incrementalCalculate?.(t,i)??e.calculate(t,i);t.reduced[e.property]=s}}}getUniqueDataSets(t){return new Set(t.dataSources.values())}},MIN=0,MAX=1,SPAN=2,RangeLookup=class ce{constructor(e){this.isDirty=!1;const i=e.reduce((r,a)=>Math.max(r,a.length),0),{maxLevelSize:s,buffer:n}=ce.createBuffer(i);this.maxLevelSize=s,this.buffer=n,this.dataLength=i,this.populateBuffer(e)}static computeMaxLevelSize(e){let s=1<<32-Math.clz32(e);return e===s/2&&(s=s>>>1),s}static createBuffer(e){const i=ce.computeMaxLevelSize(e),s=new Float64Array((i*2-1)*2).fill(Number.NaN);return{maxLevelSize:i,buffer:s}}populateBuffer(e){const{maxLevelSize:i,buffer:s}=this,n=i-1;for(const r of e){const a=r.length;for(let o=0;o<a;o+=1){const l=Number(r[o]);if(l!==l)continue;const c=n+o<<1,h=s[c],u=s[c+1];(h!==h||l<h)&&(s[c]=l),(u!==u||l>u)&&(s[c+1]=l)}}for(let r=i>>>1;r>=1;r>>>=1){const a=r-1,o=a+r<<1;let l=a<<1,c=o;for(let h=0;h<r;h+=1){const u=c+2,d=s[c],p=s[u];s[l]=p!==p||d<p?d:p;const g=s[c+1],f=s[u+1];s[l+1]=f!==f||g>f?g:f,l+=2,c+=4}}}rebuild(e){const i=e.reduce((n,r)=>Math.max(n,r.length),0);if(ce.computeMaxLevelSize(i)===this.maxLevelSize)this.buffer.fill(Number.NaN);else{const{maxLevelSize:n,buffer:r}=ce.createBuffer(i);this.maxLevelSize=n,this.buffer=r}this.dataLength=i,this.populateBuffer(e)}updateValue(e,i){const{maxLevelSize:s,buffer:n}=this,r=s+e-1,a=Math.trunc(r*SPAN)+MIN,o=Math.trunc(r*SPAN)+MAX;n[a]=Number.NaN,n[o]=Number.NaN;for(const l of i){const c=Number(l),h=n[a],u=n[o];(!Number.isFinite(h)||c<h)&&(n[a]=c),(!Number.isFinite(u)||c>u)&&(n[o]=c)}this.propagateUp(r)}updateValues(e){for(const{index:i,values:s}of e)this.updateValue(i,s)}propagateUp(e){const{buffer:i}=this;for(;e>0;){const s=Math.trunc((e-1)/2),n=2*s+1,r=2*s+2,a=i[Math.trunc(n*SPAN)+MIN],o=i[Math.trunc(n*SPAN)+MAX],l=i[Math.trunc(r*SPAN)+MIN],c=i[Math.trunc(r*SPAN)+MAX];i[Math.trunc(s*SPAN)+MIN]=!Number.isFinite(l)||a<l?a:l,i[Math.trunc(s*SPAN)+MAX]=!Number.isFinite(c)||o>c?o:c,e=s}}computeRangeInto(e,i,s,n,r,a,o){const l=r+a-1;if(l<i||r>=s)return o;if(r>=i&&l<s){const c=e[Math.trunc(n*SPAN)+MIN],h=e[Math.trunc(n*SPAN)+MAX];Number.isFinite(c)&&(o[0]=Math.min(o[0],c)),Number.isFinite(h)&&(o[1]=Math.max(o[1],h))}else a>1&&(n=Math.trunc(n*2),a=Math.trunc(a/2),this.computeRangeInto(e,i,s,Math.trunc(n+1),r,a,o),this.computeRangeInto(e,i,s,Math.trunc(n+2),r+a,a,o));return o}rangeBetween(e,i,s){const n=s??[0,0];if(e>i)return n[0]=Number.NaN,n[1]=Number.NaN,n;const{maxLevelSize:r,buffer:a}=this;return n[0]=1/0,n[1]=-1/0,this.computeRangeInto(a,e,i,0,0,r,n),n}getRange(e){const{buffer:i}=this,s=e??[0,0];return s[0]=i[MIN],s[1]=i[MAX],s}get range(){const{buffer:e}=this;return[e[MIN],e[MAX]]}get length(){return this.dataLength}};function valuesSortOrder(t,e){const i=t.length;if(t.length<=1)return 1;let s=0,n=t[0];for(let r=1;r<i;r++){const a=t[r];if(a==null)continue;if(typeof(e?a.valueOf():a)!="number")return;const l=Math.sign(a-n);if(l!==0){if(s!==0&&s!==l)return;s=l}n=a}return s===0?1:s}var DataModelResolvers=class{constructor(t){this.ctx=t,this.rangeBetweenBuffer=[0,0]}resolveMissingDataCount(t){let e=0;for(const i of this.ctx.values)e=Math.max(e,i.missing.get(t.id)??0);return e}resolveProcessedDataDefById(t,e){const i=this.ctx.scopeCache.get(t.id)?.get(e);if(!i)throw new Error(`AG Charts - didn't find property definition for [${e}, ${t.id}]`);return{index:i.index,def:i}}resolveProcessedDataIndexById(t,e){return this.resolveProcessedDataDefById(t,e).index}resolveKeysById(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),n=i.keys[s];if(n==null)throw new Error(`AG Charts - didn't find keys for [${e}, ${t.id}]`);return n.get(t.id)}hasColumnById(t,e){return this.ctx.scopeCache.get(t.id)?.get(e)!=null}resolveColumnById(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),n=i.columns?.[s];if(n==null)throw new Error(`AG Charts - didn't find column for [${e}, ${t.id}]`);return n}resolveColumnNeedsValueOf(t,e,i){const s=this.resolveProcessedDataIndexById(t,e);return i.columnNeedValueOf?.[s]??!0}resolveAbsoluteIndex(t,e){return t+e}getDomain(t,e,i,s){return this.getDomainsByType(i??"value",s)?.[this.resolveProcessedDataIndexById(t,e)]??[]}getDomainBetweenRange(t,e,[i,s],n){const r=e.map(u=>this.resolveProcessedDataIndexById(t,u)),a=n.input.count;if(i<=0&&s>=a){const u=n.domain.values;let d=1/0,p=-1/0;for(const g of r){const f=u[g];f!=null&&(f[0]<d&&(d=f[0]),f[1]>p&&(p=f[1]))}return this.rangeBetweenBuffer[0]=d,this.rangeBetweenBuffer[1]=p,this.rangeBetweenBuffer}const o=r.join(":"),l=n[DOMAIN_RANGES],c=r.map(u=>n.columns[u]);let h=l.get(o);return h==null?(h=new RangeLookup(c),l.set(o,h)):h.isDirty&&(h.rebuild(c),h.isDirty=!1),h.rangeBetween(i,s,this.rangeBetweenBuffer)}getSortOrder(t,e,i,s){const n=i.get(e);if(n==null||n.isDirty){const r={sortOrder:valuesSortOrder(t,s)};return i.set(e,r),r.sortOrder}return n.sortOrder}getKeySortOrder(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),n=i.keys[s]?.get(t.id);return n?this.getSortOrder(n,s,i[KEY_SORT_ORDERS],!0):void 0}getKeySortEntry(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),n=i[KEY_SORT_ORDERS].get(s);return n?.isDirty?void 0:n}getColumnSortOrder(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),n=i.columnNeedValueOf?.[s]??!0;return this.getSortOrder(i.columns[s],s,i[COLUMN_SORT_ORDERS],n)}getDomainsByType(t,e){switch(t){case"key":return e.domain.keys;case"value":return e.domain.values;case"aggregate":return e.domain.aggValues;case"group-value-processor":return e.domain.groups;default:return null}}},import_ag_charts_core78=require("ag-charts-core"),ScopeCacheManager=class{constructor(t){this.ctx=t}processScopeCache(){this.ctx.scopeCache.clear();for(const t of(0,import_ag_charts_core78.iterate)(this.ctx.keys,this.ctx.values,this.ctx.aggregates))if(t.idsMap)for(const[e,i]of t.idsMap)for(const s of i)if(!this.ctx.scopeCache.has(e))this.ctx.scopeCache.set(e,new Map([[s,t]]));else{if(this.ctx.scopeCache.get(e)?.has(s))throw new Error("duplicate definition ids on the same scope are not allowed.");this.ctx.scopeCache.get(e).set(s,t)}}valueGroupIdxLookup({matchGroupIds:t}){const e=[];for(const[i,s]of this.ctx.values.entries())(!t||s.groupId&&t.includes(s.groupId))&&e.push(i);return e}valueIdxLookup(t,e){const i=t==null||t.length===0,s=typeof e=="string"?e:e.id,n=a=>{if(a.idsMap){for(const[o,l]of a.idsMap)if(t?.includes(o)&&l.has(s))return!0}return!1},r=this.ctx.values.reduce((a,o,l)=>((o.scopes==null||i&&!o.scopes.length||o.scopes.some(h=>t?.includes(h)))&&(o.property===s||o.id===s||n(o))&&a.push(l),a),[]);if(r.length===0)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(e)} in scope(s) ${JSON.stringify(t)}`);return r}buildAccessors(t){const e=new Map;if(this.ctx.suppressFieldDotNotation)return e;for(const i of t){if(!(i.property.includes(".")||i.property.includes("[")))continue;const n=getPathComponents(i.property);if(n==null){import_ag_charts_core78.Logger.warnOnce("Invalid property path [%s]",i.property);continue}const r=createPathAccessor(n);e.set(i.property,r)}return e}},DataModel=class{constructor(t,e="standalone",i=!1,s){this.opts=t,this.mode=e,this.suppressFieldDotNotation=i,this.eventsHub=s,this.debug=import_ag_charts_core79.Debug.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[];let n=!0;for(const c of t.props){if(c.type==="key"&&!n)throw new Error("AG Charts - internal config error: keys must come before values.");c.type==="value"&&n&&(n=!1)}const r=({matchGroupIds:c=[]})=>{for(const h of c)if(this.values.every(u=>u.groupId!==h))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${h}).`)},a=new Set,o=new Set;for(const c of t.props){const h=c.type==="key"?a:o;if(isScoped(c)&&c.scopes)for(const u of c.scopes)h.add(u);switch(c.type){case"key":this.keys.push({...c,index:this.keys.length,missing:new Map});break;case"value":if(c.property==null)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(c)}`);this.values.push({...c,index:this.values.length,missing:new Map});break;case"aggregate":r(c),this.aggregates.push({...c,index:this.aggregates.length});break;case"group-value-processor":r(c),this.groupProcessors.push({...c,index:this.groupProcessors.length});break;case"property-value-processor":this.propertyProcessors.push({...c,index:this.propertyProcessors.length});break;case"reducer":this.reducers.push({...c,index:this.reducers.length});break;case"processor":this.processors.push({...c,index:this.processors.length});break}}if(this.opts.groupByKeys||this.opts.groupByFn!=null){const c=new Set(o.values());for(const h of a)c.delete(h);if(c.size>0)throw new Error(`AG Charts - scopes missing key for grouping, illegal configuration: ${[...c.values()]}`)}const l={keys:this.keys,values:this.values,aggregates:this.aggregates,groupProcessors:this.groupProcessors,propertyProcessors:this.propertyProcessors,reducers:this.reducers,processors:this.processors,debug:this.debug,mode:this.mode,bandingConfig:this.opts.domainBandingConfig,suppressFieldDotNotation:this.suppressFieldDotNotation,scopeCache:this.scopeCache};this.resolvers=new DataModelResolvers(l),this.scopeCacheManager=new ScopeCacheManager(l),this.domainInitializer=new DomainInitializer(l),this.domainManager=new DomainManager(l,this.domainInitializer,this.scopeCacheManager),this.reducerManager=new ReducerManager(this.opts.domainBandingConfig),this.dataExtractor=new DataExtractor(l,this.domainManager),this.dataGrouper=new DataGrouper(l),this.aggregator=new Aggregator(l,this.scopeCacheManager,this.resolvers),this.incrementalProcessor=new IncrementalProcessor(l,this.reducerManager)}resolveProcessedDataDefById(t,e){return this.resolvers.resolveProcessedDataDefById(t,e)}resolveProcessedDataIndexById(t,e){return this.resolvers.resolveProcessedDataIndexById(t,e)}resolveKeysById(t,e,i){return this.resolvers.resolveKeysById(t,e,i)}hasColumnById(t,e){return this.resolvers.hasColumnById(t,e)}resolveColumnById(t,e,i){return this.resolvers.resolveColumnById(t,e,i)}resolveColumnNeedsValueOf(t,e,i){return this.resolvers.resolveColumnNeedsValueOf(t,e,i)}resolveMissingDataCount(t){return this.resolvers.resolveMissingDataCount(t)}*forEachDatum(t,e,i,s){const n=e.columnScopes.findIndex(r=>r.has(t.id));for(const r of i.datumIndices[n]??[]){const a=this.resolvers.resolveAbsoluteIndex(s,r);yield e.columns[n][a]}}getUniqueDataSets(t){return new Set(t.dataSources.values())}*forEachGroupDatum(t,e){const i=e.columnScopes.findIndex(r=>r.has(t.id)),s={groupIndex:0,columnIndex:i},n=[];for(const r of e.groups){s.group=r;for(const a of r.datumIndices[i]??n)s.datumIndex=this.resolvers.resolveAbsoluteIndex(s.groupIndex,a),yield s;s.groupIndex++}}getDomain(t,e,i,s){const n=this.resolvers.getDomain(t,e,i,s);if(i==="key"&&n.length>0){const r=this.getKeySortMetadata(t,e,s);return{domain:n,sortMetadata:r}}return{domain:n}}getDomainBetweenRange(t,e,[i,s],n){return this.resolvers.getDomainBetweenRange(t,e,[i,s],n)}getKeySortOrder(t,e,i){return this.resolvers.getKeySortOrder(t,e,i)}getColumnSortOrder(t,e,i){return this.resolvers.getColumnSortOrder(t,e,i)}getKeySortMetadata(t,e,i){const s=this.resolvers.getKeySortEntry(t,e,i);if(s?.sortOrder!=null)return{sortOrder:s.sortOrder,isUnique:s.isUnique}}processData(t){const{opts:{groupByKeys:e,groupByFn:i},aggregates:s,groupProcessors:n,reducers:r,processors:a,propertyProcessors:o}=this,l=performance.now();if(e&&this.keys.length===0)return;let c=this.extractData(t);e?c=this.dataGrouper.groupData(c):i&&(c=this.dataGrouper.groupData(c,i(c))),n.length>0&&c.type==="grouped"&&this.aggregator.postProcessGroups(c),s.length>0&&c.type==="ungrouped"?this.aggregator.aggregateUngroupedData(c):s.length>0&&c.type==="grouped"&&this.aggregator.aggregateGroupedData(c),o.length>0&&this.postProcessProperties(c),r.length>0&&this.reduceData(c),a.length>0&&this.postProcessData(c),this.warnDataMissingProperties(t);const h=performance.now();return c.time=h-l,c.version+=1,this.collectOptimizationMetadata(c,"full-process"),this.debug.check()&&logProcessedData(c),this.processScopeCache(),c}isReprocessingSupported(t){return this.incrementalProcessor.isReprocessingSupported(t)}reprocessData(t,e){if(!this.isReprocessingSupported(t)){this.debug.check()&&this.debug("Falling back to full reprocessing - incremental not supported for current configuration");const s=this.getUniqueDataSets(t);for(const n of s)n.commitPendingTransactions();return this.processData(t.dataSources)}const{getProcessValue:i}=this.initDataDomainProcessor("skip");return this.incrementalProcessor.reprocessData(t,e,i,this.reprocessGroupProcessors.bind(this),this.recomputeDomains.bind(this),this.collectOptimizationMetadata.bind(this))}recomputeDomains(t){this.domainManager.recomputeDomains(t)}warnDataMissingProperties(t){this.dataExtractor.warnDataMissingProperties(t)}processScopeCache(){this.scopeCacheManager.processScopeCache()}valueGroupIdxLookup(t){return this.scopeCacheManager.valueGroupIdxLookup(t)}valueIdxLookup(t,e){return this.scopeCacheManager.valueIdxLookup(t,e)}extractData(t){return this.dataExtractor.extractData(t)}reprocessGroupProcessors(t,e){const{groupProcessors:i}=this,{columns:s}=t;for(const r of i)if(!r.supportsReprocessing)throw new Error("AG Charts - attempted to reprocess group processor that does not support reprocessing. This is an internal error that should not occur.");const n=uniqueChangeDescriptions(e);for(const r of i){const a=this.valueGroupIdxLookup(r),o=r.adjust()();for(const l of n){const{indexMap:c}=l;for(const h of c.spliceOps)if(h.insertCount>0)for(let u=0;u<h.insertCount;u++){const d=h.index+u,p=t.groups[d];o(s,a,p,d)}}}}postProcessProperties(t){for(const{adjust:e,property:i,scopes:s}of this.propertyProcessors)for(const n of this.valueIdxLookup(s,i))e()(t,n)}reduceData(t){t.reduced??(t.reduced={});for(const e of this.reducers)this.shouldUseReducerBanding(e,t)?t.reduced[e.property]=this.reduceWithBands(e,t):t.reduced[e.property]=this.reduceStandard(e,t)}shouldUseReducerBanding(t,e){return e.type==="ungrouped"&&t.supportsBanding===!0&&typeof t.combineResults=="function"}reduceWithBands(t,e){const i=this.reducerManager.evaluate(t,e,{reuseCleanBands:!1});return i===void 0?this.reduceStandard(t,e):i}reduceStandard(t,e){const i=t.reducer();if(e.type==="grouped"){let o=t.initialValue;for(const l of e.groups)o=i(o,l.keys);return o}const s=isScoped(t)?t.scopes[0]:(0,import_ag_charts_core79.first)(e.scopes);if(s==null)return t.initialValue;const n=e.dataSources.get(s)?.data??[],r=e.keys.map(o=>o.get(s)).filter(o=>o!=null),a=r.map(()=>{});return ReducerManager.evaluateRange(t,i,{rawData:n,keyColumns:r,keysParam:a},0,n.length)}postProcessData(t){t.reduced??(t.reduced={});for(const i of this.processors)t.reduced[i.property]=i.calculate(t,t.reduced[i.property]);const{diff:e}=t.reduced;e&&this.eventsHub?.emit("datamodel:diff",{diff:e})}initDataDomainProcessor(t){return this.domainManager.initDataDomainProcessor(t)}collectOptimizationMetadata(t,e){const i=t.optimizations?.domainBanding,s=t[REDUCER_BANDS];this.reducers.length>0&&s&&this.collectReducerBandingMetadata(t,s);const n=t.optimizations?.reducerBanding;t.optimizations={performance:{processingTime:t.time,pathTaken:e},...i&&{domainBanding:i},...n&&{reducerBanding:n}};const r=this.isReprocessingSupported(t),a=e==="reprocess";let o;if(!r){const l=[];if(t.type==="grouped"){t.groupsUnique||l.push("groupsUnique=false"),this.getUniqueDataSets(t).size!==1&&l.push("multiple data sources");const h=(0,import_ag_charts_core79.first)(t.scopes);t.invalidKeys?.get(h)?.some(d=>d)&&l.push("has invalid keys")}this.aggregates.length>0&&l.push("has aggregates"),this.reducers.filter(c=>!c.supportsBanding).length>0&&l.push("has reducers"),this.processors.filter(c=>c.incrementalCalculate===void 0).length>0&&l.push("has processors"),this.propertyProcessors.length>0&&l.push("has property processors"),o=l.length>0?l.join(", "):void 0}if(t.optimizations.reprocessing={applied:a,reason:o},t.type==="grouped"){let l=0;const c=t.groups[0];if(c){const h=c.datumIndices;for(const u of t.groups)u.datumIndices===h&&l++}t.optimizations.sharedDatumIndices={applied:l>0,sharedGroupCount:l,totalGroupCount:t.groups.length}}}collectReducerBandingMetadata(t,e){if(this.reducers.length===0)return;t.optimizations??(t.optimizations={});const i=[];for(const s of this.reducers){const n=e.get(s.property),r=this.shouldUseReducerBanding(s,t)&&n!=null;let a;r||(s.supportsBanding!==!0?a="reducer does not support banding":t.type!=="ungrouped"?a="grouped data not supported":s.combineResults===void 0?a="missing combineResults function":a="banding not applied");let o;r&&n&&(o=n.getStats()),i.push({property:String(s.property),applied:r,reason:a,stats:o})}t.optimizations.reducerBanding={reducers:i}}buildAccessors(t){return this.scopeCacheManager.buildAccessors(t)}};function logProcessedData(t){const e=(i,s)=>{s.length>0&&(import_ag_charts_core79.Logger.log(`DataModel.processData() - ${i}`),import_ag_charts_core79.Logger.table(s))};if(import_ag_charts_core79.Logger.log("DataModel.processData() - processedData",t),e("Key Domains",t.domain.keys),e("Value Domains",t.domain.values),e("Aggregate Domains",t.domain.aggValues??[]),t.optimizations){import_ag_charts_core79.Logger.log("DataModel.processData() - Optimization Summary");const i=t.optimizations;if(i.performance&&import_ag_charts_core79.Logger.log(` Performance: ${i.performance.processingTime.toFixed(2)}ms (${i.performance.pathTaken})`),i.reprocessing){const s=i.reprocessing.applied?"\u2713":"\u2717",n=i.reprocessing.reason?` (${i.reprocessing.reason})`:"";import_ag_charts_core79.Logger.log(` Reprocessing: ${s}${n}`)}if(i.domainBanding){const s=i.domainBanding.keyDefs.filter(o=>o.applied),n=i.domainBanding.valueDefs.filter(o=>o.applied),r=s.length+n.length,a=i.domainBanding.keyDefs.length+i.domainBanding.valueDefs.length;if(r>0){import_ag_charts_core79.Logger.log(` Domain Banding: \u2713 (${r}/${a} definitions)`);for(const o of[...s,...n])if(o.stats){const l=(o.stats.scanRatio*100).toFixed(1);import_ag_charts_core79.Logger.log(` ${o.property}: scanned ${o.stats.dirtyBands}/${o.stats.totalBands} bands (${l}%)`)}}else{const o=[...i.domainBanding.keyDefs.filter(c=>!c.applied).map(c=>c.reason),...i.domainBanding.valueDefs.filter(c=>!c.applied).map(c=>c.reason)],l=[...new Set(o)].join(", ");import_ag_charts_core79.Logger.log(` Domain Banding: \u2717 (${l})`)}}if(i.sharedDatumIndices){const s=i.sharedDatumIndices.applied?"\u2713":"\u2717",n=`${i.sharedDatumIndices.sharedGroupCount}/${i.sharedDatumIndices.totalGroupCount}`;import_ag_charts_core79.Logger.log(` Shared DatumIndices: ${s} (${n} groups)`)}if(i.batchMerging){const s=(i.batchMerging.mergeRatio*100).toFixed(0),n=`${i.batchMerging.originalBatchCount} \u2192 ${i.batchMerging.mergedBatchCount}`;import_ag_charts_core79.Logger.log(` Batch Merging: ${n} (${s}% reduction)`)}}}var MAX_ANIMATABLE_NODES=1e3;function combineIntervalBandResults(t,e,i){const s=t.filter(n=>typeof n=="number"&&Number.isFinite(n));return s.length>0?i(s):e}function processedDataIsAnimatable(t){return t.input.count<=MAX_ANIMATABLE_NODES}function basicContinuousCheckDatumValidation(t){return t!=null&&(0,import_ag_charts_core80.isContinuous)(t)}function basicDiscreteCheckDatumValidation(t){return t!=null}function basicDiscreteCheckDatumValidationAllowNull(t){return!0}function getValidationFn(t,e){switch(t){case"number":case"log":case"time":case"unit-time":case"ordinal-time":case"color":return basicContinuousCheckDatumValidation;default:return e?basicDiscreteCheckDatumValidationAllowNull:basicDiscreteCheckDatumValidation}}function getValueType(t){switch(t){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function keyProperty(t,e,i={}){const s=i.allowNullKey??!1;return{property:t,type:"key",valueType:getValueType(e),validation:i.validation??getValidationFn(e,s),...i}}function valueProperty(t,e,i={}){const s=i.allowNullKey??!1;return{property:t,type:"value",valueType:getValueType(e),validation:i.validation??getValidationFn(e,s),...i}}function rowCountProperty(t,e={}){return{property:t,type:"value",valueType:"range",missingValue:1,processor:function(){return function(){return 1}},...e}}var noopProcessor=function(t){return t};function processorChain(...t){const e=t.filter(i=>i!=null);return e.length===0?()=>noopProcessor:e.length===1?e[0]:function(){const s=e.map(n=>n());return function(r,a){return s.reduce((o,l)=>l(o,a),r)}}}function rangedValueProperty(t,e={}){const{min:i=-1/0,max:s=1/0,processor:n,...r}=e;return{type:"value",property:t,valueType:"range",validation:basicContinuousCheckDatumValidation,processor:processorChain(n,function(){return function(l){return(0,import_ag_charts_core80.isFiniteNumber)(l)?(0,import_ag_charts_core80.clamp)(i,l,s):l}}),...r}}function accumulativeValueProperty(t,e,i={}){const{onlyPositive:s,processor:n,...r}=i;return{...valueProperty(t,e,r),processor:processorChain(n,accumulatedValue(s))}}function trailingAccumulatedValueProperty(t,e,i={}){return{...valueProperty(t,e,i),processor:trailingAccumulatedValue()}}function groupAccumulativeValueProperty(t,e,i,s){return[valueProperty(t,s,i),accumulateGroup(i.groupId,e,i.separateNegative),...i.rangeId==null?[]:[range(i.rangeId,i.groupId)]]}var SMALLEST_KEY_INTERVAL={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer(){let t=Number.NaN;return function(i,s){const n=s[0],r=typeof n=="number"?n:Number(n);if(!Number.isFinite(r))return i;const a=t;if(t=r,!Number.isFinite(t))return i;const o=Math.abs(r-a),l=i??1/0;return o>0&&o<l?o:l}},supportsBanding:!0,combineResults(t){return combineIntervalBandResults(t,1/0,e=>Math.min(...e))},needsOverlap:!0},LARGEST_KEY_INTERVAL={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer(){let t=Number.NaN;return function(i,s){const n=s[0],r=typeof n=="number"?n:Number(n);if(!Number.isFinite(r))return i;const a=t;if(t=r,!Number.isFinite(t))return i;const o=Math.abs(r-a),l=i??-1/0;return o>0&&o>l?o:l}},supportsBanding:!0,combineResults(t){return combineIntervalBandResults(t,-1/0,e=>Math.max(...e))},needsOverlap:!0},SORT_DOMAIN_GROUPS={type:"processor",property:"sortedGroupDomain",calculate:function({domain:{groups:e}}){return e?.slice().sort((i,s)=>{for(let n=0;n<i.length;n++){const r=i[n]-s[n];if(r!==0)return r}return 0})}};function normaliseFnBuilder({normaliseTo:t}){const e=(i,s)=>{if(s===0)return 0;const n=(i??0)*t/s;return n>=0?Math.min(t,n):Math.max(-t,n)};return()=>()=>(i,s,n,r)=>{const a=normaliseFindExtent(i,s,n,r);for(const o of s){const l=n.datumIndices[o];if(l!=null)for(const c of l){const h=r+c,u=i[o],d=u[h];if(d==null){u[h]=void 0;continue}u[h]=e(d,a)}}}}function normaliseFindExtent(t,e,i,s){const n=[0,0];for(const r of e){const a=t[r],o=i.datumIndices[r];if(o!=null)for(const l of o){const c=s+l,h=a[c];if(h==null)continue;const u=typeof h=="number"?h:Math.max(...h.map(p=>p??0)),d=u<0?0:1;d===0?n[d]=Math.min(n[d],u):n[d]=Math.max(n[d],u)}}return Math.max(Math.abs(n[0]),n[1])}function normaliseGroupTo(t,e){return{type:"group-value-processor",matchGroupIds:t,adjust:(0,import_ag_charts_core80.memo)({normaliseTo:e},normaliseFnBuilder)}}function normalisePropertyFnBuilder({normaliseTo:t,zeroDomain:e,rangeMin:i,rangeMax:s}){const n=t[1]-t[0],r=function(o,l,c){const h=t[0]+(o-l)/c*n;return c===0?e:h>=t[1]?t[1]:h<t[0]?t[0]:h};return function(){return function(l,c){let[h,u]=l.domain.values[c];i!=null&&(h=i),s!=null&&(u=s);const d=u-h;l.domain.values[c]=[t[0],t[1]];const p=l.columns[c];for(let g=0;g<p.length;g+=1)p[g]=r(p[g],h,d)}}}function normalisePropertyTo(t,e,i,s,n){return{type:"property-value-processor",property:t,adjust:(0,import_ag_charts_core80.memo)({normaliseTo:e,rangeMin:s,rangeMax:n,zeroDomain:i},normalisePropertyFnBuilder)}}var ANIMATION_VALIDATION_UNIQUE_KEYS=1,ANIMATION_VALIDATION_ORDERED_KEYS=2;function animationValidationProcessValue(t,e,i){let s=ANIMATION_VALIDATION_UNIQUE_KEYS|ANIMATION_VALIDATION_ORDERED_KEYS;if(t.valueType==="category")return e.length<i.length&&(s&=~ANIMATION_VALIDATION_UNIQUE_KEYS),s;let n=i[0]?.valueOf();for(let r=1;s!==0&&r<i.length;r++){const a=i[r]?.valueOf();(!Number.isFinite(a)||n>a)&&(s&=~ANIMATION_VALIDATION_ORDERED_KEYS),Number.isFinite(a)&&n===a&&(s&=~ANIMATION_VALIDATION_UNIQUE_KEYS),n=a}return s}function buildAnimationValidationFn(t){return function(i,s){if(!processedDataIsAnimatable(i))return;const{keys:n,values:r}=i.defs,{input:a,domain:{values:o},columns:l}=i;let c=!0,h=!0;if(a.count!==0){const u=i[KEY_SORT_ORDERS];for(let d=0;(c||h)&&d<n.length;d++){const p=n[d],g=u.get(d);if(p.valueType==="category"){const f=i.domain.keys[d]?.length??0,y=i.keys[d]?.values().next().value?.length??0;f<y&&(c=!1)}else g&&(g.isUnique===!1&&(c=!1),g.sortOrder!==1&&(h=!1))}if(t&&t.length>0){let d=ANIMATION_VALIDATION_UNIQUE_KEYS|ANIMATION_VALIDATION_ORDERED_KEYS;for(let p=0;d!==0&&p<r.length;p++){const g=r[p];t.includes(g.id)&&(d&=animationValidationProcessValue(g,o[p],l[p]))}d&ANIMATION_VALIDATION_UNIQUE_KEYS||(c=!1),d&ANIMATION_VALIDATION_ORDERED_KEYS||(h=!1)}}return{uniqueKeys:c,orderedKeys:h}}}function incrementalCalculateAnimationValidation(){return{uniqueKeys:!0,orderedKeys:!1}}function animationValidation(t){return{type:"processor",property:"animationValidation",calculate:(0,import_ag_charts_core80.memo)(t,buildAnimationValidationFn),incrementalCalculate:incrementalCalculateAnimationValidation}}function buildGroupAccFn({mode:t,separateNegative:e}){return function(){return function(){return function(r,a,o,l){const c=[0,0];for(const h of a){const u=o.datumIndices[h];if(u==null)continue;const d=c[0],p=c[1],g=r[h];let f=!1;for(const y of u){const m=l+y,b=g[m];if(!(0,import_ag_charts_core80.isFiniteNumber)(b))continue;const v=e&&(0,import_ag_charts_core80.isNegative)(b),x=v?d:p;if(t==="normal"?g[m]=x+b:g[m]=x,!f){const S=v?0:1;c[S]=x+b,f=!0}}}}}}}function accumulateGroup(t,e,i=!1){const s=(0,import_ag_charts_core80.memo)({mode:e,separateNegative:i},buildGroupAccFn);return{type:"group-value-processor",matchGroupIds:[t],adjust:s,supportsReprocessing:!0}}function valueIdentifier(t){return t.id??t.property}function valueIndices(t,e,i){const s=new Map,n=e.defs.values;for(let o=0;o<n.length;o+=1){const l=n[o];if(l.scopes?.includes(t)===!1)continue;const c=valueIdentifier(l);if(s.has(c))return;s.set(c,o)}const r=[],a=i.defs.values;for(let o=0;o<a.length;o+=1){const l=a[o];if(l.scopes?.includes(t)===!1)continue;const c=valueIdentifier(l),h=s.get(c);if(h==null)return;s.delete(c),r.push({previousIndex:h,nextIndex:o})}if(s.size===0)return r}function columnsEqual(t,e,i,s,n){for(const{previousIndex:r,nextIndex:a}of i){const o=t[r],l=e[a],c=o[s],h=l[n];if(c!==h)return!1}return!0}function diff(t,e,i=!0){return{type:"processor",property:"diff",calculate(s,n){if(!processedDataIsAnimatable(s))return;const r=new Map,a=new Map,o=new Map,l=new Map,c=e.keys.map(b=>b.get(t)),h=s.keys.map(b=>b.get(t)),u=e.columns,d=s.columns,p=valueIndices(t,e,s);if(p==null)return n;const g=Math.max(e.input.count,s.input.count),f=s.defs.keys.some(b=>b.allowNullKey===!0);for(let b=0;b<g;b++){const v=b<e.input.count,x=b<s.input.count,S=v?datumKeys(c,b,f):void 0,I=S==null?"":createDatumId(...S),D=x?datumKeys(h,b,f):void 0,T=D==null?"":createDatumId(...D);if(x&&v&&I===T){columnsEqual(u,d,p,b,b)||o.set(T,b);continue}const A=l.get(T);A!=null?((i||!columnsEqual(u,d,p,A,b))&&(o.set(T,b),r.set(T,b)),l.delete(T)):x&&a.set(T,b);const L=a.get(I);L!=null?((i||!columnsEqual(u,d,p,L,b))&&(o.set(I,b),r.set(I,b)),a.delete(I)):v&&(o.delete(I),l.set(I,b))}const m={changed:a.size>0||o.size>0||l.size>0,added:new Set(a.keys()),updated:new Set(o.keys()),removed:new Set(l.keys()),moved:new Set(r.keys())};return{...n,[t]:m}}}}function createDatumId(...t){if(t.length===1){const e=(0,import_ag_charts_core80.transformIntegratedCategoryValue)(t[0]);if(e===null)return NULL_KEY_STRING;if(e===void 0)return UNDEFINED_KEY_STRING;if(typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e}return t.map(e=>{const i=(0,import_ag_charts_core80.transformIntegratedCategoryValue)(e);return i===null?NULL_KEY_STRING:i===void 0?UNDEFINED_KEY_STRING:i}).join("___")}var import_ag_charts_core81=require("ag-charts-core"),AnimationBatch=class{constructor(t){this.maxAnimationTime=t,this.debug=import_ag_charts_core81.Debug.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(PHASE_ORDER.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){return this.phases.get(PHASE_ORDER[this.currentPhase])??[]}checkOverlappingId(t){t!=null&&this.controllers.has(t)&&(this.controllers.get(t).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${t}`),this.skip())}addAnimation(t){if(t.isComplete)return;if(PHASE_ORDER.indexOf(t.phase)<this.currentPhase){this.debug("Skipping animation due to being for an earlier phase",t.id),t.stop();return}this.controllers.set(t.id,t),this.phases.get(t.phase)?.push(t)}removeAnimation(t){this.controllers.delete(t.id);const e=this.phases.get(t.phase),i=e?.indexOf(t);i!=null&&i>=0&&e?.splice(i,1)}progress(t){if(!this.isReady)return;let e=t===0?.01:t;const i=()=>{const c=PHASE_ORDER[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:c,phaseMeta:PHASE_METADATA[c]}};let{phase:s,phaseControllers:n,phaseMeta:r}=i();const a=()=>PHASE_ORDER[this.currentPhase]==null,o=()=>{for({phase:s,phaseControllers:n,phaseMeta:r}=i();!a()&&n.length===0;)this.currentPhase++,{phase:s,phaseControllers:n,phaseMeta:r}=i(),this.debug(`AnimationBatch - phase changing to ${s}`,{unusedTime:e},n)},l=this.controllers.size;this.debug(`AnimationBatch - ${t}ms; phase ${s} with ${n?.length} of ${l}`);do{const c=e,h=r.skipIfNoEarlierAnimations&&this.animationTimeConsumed===0;let u=0;for(const d of n)h?d.stop():e=Math.min(d.update(c),e),d.isComplete&&(u++,this.removeAnimation(d));this.animationTimeConsumed+=c-e,this.debug(`AnimationBatch - updated ${n.length} controllers; ${u} completed`,n),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),o()}while(e>0&&!a());this.animationTimeConsumed>this.maxAnimationTime&&(this.debug("Animation batch exceeded max animation time, skipping",[...this.controllers]),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let t=!0;for(const[,e]of this.controllers)if(e.duration>0&&PHASE_METADATA[e.phase].skipIfNoEarlierAnimations!==!0){t=!1;break}if(!t)for(const[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(t=!0){if(this.skipAnimations===!1&&t===!0){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=t}play(){for(const t of this.controllers.values())t.play()}stop(){for(const t of this.controllers.values())try{t.stop(),this.removeAnimation(t)}catch(e){import_ag_charts_core81.Logger.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(t){if(t!=null&&this.controllers.has(t)){const e=this.controllers.get(t);e&&(e.stop(),this.removeAnimation(e))}}stopByAnimationGroupId(t){for(const e of this.controllers.values())e.groupId===t&&this.stopByAnimationId(e.id)}dispatchStopped(){for(const t of this.stoppedCbs)t();this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}getRemainingTime(t){if(!this.isActive())return 0;let e=0;for(const[i,s]of this.phases)s.length!==0&&(t!=null&&t!==i||(e+=Math.max(...s.map(n=>n.isComplete?0:n.delay+n.duration-(n.elapsed??0)))));return e}destroy(){this.stop(),this.controllers.clear()}};function validAnimationDuration(t){return t==null?!0:!Number.isNaN(t)&&t>=0&&t<=2}var AnimationManager=class{constructor(t,e){this.interactionManager=t,this.chartUpdateMutex=e,this.defaultDuration=1e3,this.maxAnimatableItems=MAX_ANIMATABLE_NODES,this.batch=new AnimationBatch(this.defaultDuration*1.5),this.debug=import_ag_charts_core82.Debug.create(!0,"animation"),this.events=new import_ag_charts_core82.EventEmitter,this.rafAvailable=typeof requestAnimationFrame<"u",this.isPlaying=!0,this.requestId=null,this.skipAnimations=!0,this.currentAnonymousAnimationId=0,this.cumulativeAnimationTime=0}addListener(t,e){return this.events.on(t,e)}animate(t){const e=this.batch;try{e.checkOverlappingId(t.id)}catch(o){this.failsafeOnError(o);return}let{id:i}=t;i==null&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);const s=this.isSkipped()||t.phase==="none";s&&this.debug("AnimationManager - skipping animation");const{delay:n,duration:r}=t;if(!validAnimationDuration(n))throw new Error(`Animation delay of ${n} is unsupported (${i})`);if(!validAnimationDuration(r))throw new Error(`Animation duration of ${r} is unsupported (${i})`);const a=new Animation({...t,id:i,skip:s,autoplay:this.isPlaying?t.autoplay:!1,phase:t.phase,defaultDuration:this.defaultDuration});if(!this.forceTimeJump(a,this.defaultDuration))return this.batch.addAnimation(a),a}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(t){this.failsafeOnError(t)}this.requestAnimation()}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(t){try{this.batch.stopByAnimationId(t)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(t){try{this.batch.stopByAnimationGroupId(t)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(t=!0){this.skipAnimations=t}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}getRemainingTime(t){return this.batch.getRemainingTime(t)}getCumulativeAnimationTime(){return this.cumulativeAnimationTime}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:new Error("Stack trace for animation skip tracking").stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(t){this.requestId=(0,import_ag_charts_core82.getWindow)().requestAnimationFrame(e=>{t(e).catch(i=>import_ag_charts_core82.Logger.error(i))})}forceTimeJump(t,e){return!1}requestAnimation(){if(!this.rafAvailable||!this.batch.isActive()||this.requestId!==null)return;let t;const e=async i=>{await this.debug.group("AnimationManager.onAnimationFrame()",async()=>{const s=()=>{const n=i-(t??i);t=i,this.debug("AnimationManager",{controllersCount:this.batch.size,deltaTime:n}),this.interactionManager.pushState(4);try{this.batch.progress(n),this.cumulativeAnimationTime+=n}catch(r){this.failsafeOnError(r)}this.events.emit("animation-frame",{type:"animation-frame",deltaMs:n})};this.isSkippingFrames()?await this.chartUpdateMutex.acquireImmediately(s):await this.chartUpdateMutex.acquire(s),this.batch.isActive()?this.scheduleAnimationFrame(e):(this.batch.stop(),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))})};this.events.emit("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(e)}cancelAnimation(){this.requestId!==null&&(cancelAnimationFrame(this.requestId),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}),this.requestId=null,this.startBatch())}failsafeOnError(t,e=!0){import_ag_charts_core82.Logger.error("Error during animation, skipping animations",t),e&&this.cancelAnimation()}startBatch(t){this.debug(`AnimationManager - startBatch() with skipAnimations=${t}.`),this.reset(),this.batch.destroy(),this.batch=new AnimationBatch(this.defaultDuration*1.5),t===!0&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(4),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(t){this.batch.stoppedCbs.add(t)}destroy(){this.stop(),this.events.clear()}},ContextMenuBuiltinItems=class{constructor(){this.download={type:"action",showOn:"always",label:"contextMenuDownload",enabled:!0,action:void 0,items:void 0},this["zoom-to-cursor"]={type:"action",showOn:"series-area",label:"contextMenuZoomToCursor",enabled:!0,action:void 0,items:void 0},this["pan-to-cursor"]={type:"action",showOn:"series-area",label:"contextMenuPanToCursor",enabled:!0,action:void 0,items:void 0},this["reset-zoom"]={type:"action",showOn:"series-area",label:"contextMenuResetZoom",enabled:!0,action:void 0,items:void 0},this["toggle-series-visibility"]={type:"action",showOn:"legend-item",label:"contextMenuToggleSeriesVisibility",enabled:!0,action:void 0,items:void 0},this["toggle-other-series"]={type:"action",showOn:"legend-item",label:"contextMenuToggleOtherSeries",enabled:!0,action:void 0,items:void 0},this.separator={type:"separator",showOn:"always",label:"separator",enabled:!0,action:void 0,items:void 0}}},ContextMenuBuiltinItemLists=class{constructor(){this.defaults=["download","zoom-to-cursor","pan-to-cursor","reset-zoom","toggle-series-visibility","toggle-other-series"]}},ContextMenuBuiltins=class{constructor(){this.items=new ContextMenuBuiltinItems,this.lists=new ContextMenuBuiltinItemLists}},ContextMenuRegistry=class{constructor(t){this.eventsHub=t,this.builtins=new ContextMenuBuiltins,this.hiddenActions=new Set,this.toggle("zoom-to-cursor","hide"),this.toggle("pan-to-cursor","hide"),this.toggle("reset-zoom","hide")}static check(t,e){return e.showOn==t}static checkCallback(t,e,i){return t===e}dispatchContext(t,e,i,s){const{widgetEvent:n}=e;if(n.sourceEvent.defaultPrevented)return;const r=s?.x??e.canvasX,a=s?.y??e.canvasY,o={showOn:t,x:r,y:a,context:i,widgetEvent:n};this.eventsHub.emit("context-menu:setup",o),this.eventsHub.emit("context-menu:complete",o)}isVisible(t){return!this.hiddenActions.has(t)}toggle(t,e){switch(e??(e=this.isVisible(t)?"hide":"show"),e){case"show":this.hiddenActions.delete(t);break;case"hide":this.hiddenActions.add(t);break}}},import_ag_charts_core83=require("ag-charts-core"),_HighlightManager=class De{constructor(e){this.eventsHub=e,this.highlightStates=new StateTracker,this.pendingUnhighlights=new Map,this.unhighlightDelay=100}updateHighlight(e,i,s=!1){i?.series?.isHighlightEnabled()===!1&&(i=void 0);const n=this.getActiveHighlight();if(i==null&&s&&this.unhighlightDelay>0){if(!this.pendingUnhighlights.has(e)){const a=debouncedCallback(()=>{this.applyPendingUnhighlight(e)});this.pendingUnhighlights.set(e,{scheduler:a}),a.schedule(this.unhighlightDelay)}return}const r=this.pendingUnhighlights.get(e);r&&(r.scheduler.cancel(),this.pendingUnhighlights.delete(e)),i?this.highlightStates.set(e,i):this.highlightStates.delete(e),this.maybeEmitChange(e,n)}maybeEmitChange(e,i){const s=this.getActiveHighlight();this.isEqual(s,i)||this.eventsHub.emit(De.HIGHLIGHT_CHANGE_EVENT,{callerId:e,currentHighlight:s,previousHighlight:i})}applyPendingUnhighlight(e){if(!this.pendingUnhighlights.has(e))return;this.pendingUnhighlights.delete(e);const i=this.getActiveHighlight();this.highlightStates.delete(e);const s=this.getActiveHighlight();this.isEqual(s,i)||this.eventsHub.emit(De.HIGHLIGHT_CHANGE_EVENT,{callerId:e,currentHighlight:s,previousHighlight:i})}getActiveHighlight(){return this.highlightStates.stateValue()}destroy(){for(const{scheduler:e}of this.pendingUnhighlights.values())e.cancel();this.pendingUnhighlights.clear()}isEqual(e,i){return e===i||e!=null&&i!=null&&e.series===i.series&&this.idsMatch(e,i)&&e.datum===i.datum}idsMatch(e,i){return e.itemId!=null&&i.itemId!=null&&e.itemId===i.itemId||e.datumIndex!=null&&i.datumIndex!=null&&(0,import_ag_charts_core83.objectsEqual)(e.datumIndex,i.datumIndex)}};_HighlightManager.HIGHLIGHT_CHANGE_EVENT="highlight:change";var HighlightManager=_HighlightManager,import_ag_charts_core86=require("ag-charts-core"),import_ag_charts_core85=require("ag-charts-core"),import_ag_charts_core84=require("ag-charts-core"),HighlightState=(t=>(t[t.None=0]="None",t[t.Item=1]="Item",t[t.Series=2]="Series",t[t.OtherSeries=3]="OtherSeries",t[t.OtherItem=4]="OtherItem",t))(HighlightState||{}),highlightStates=[0,1,2,3,4];function getHighlightStyleOptionKeys(t){switch(t){case 1:return["highlightedItem","highlightedSeries"];case 4:return["unhighlightedItem","highlightedSeries"];case 2:return["highlightedSeries"];case 3:return["unhighlightedSeries"];case 0:return[]}}function toHighlightString(t){const e=i=>i;switch(t){case 1:return"highlighted-item";case 4:return"unhighlighted-item";case 2:return"highlighted-series";case 3:return"unhighlighted-series";case 0:return"none";default:return e(t)}}var SeriesItemHighlightStyle=class extends import_ag_charts_core84.BaseProperties{};__decorateClass([import_ag_charts_core84.Property],SeriesItemHighlightStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core84.Property],SeriesItemHighlightStyle.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core84.Property],SeriesItemHighlightStyle.prototype,"stroke",2),__decorateClass([import_ag_charts_core84.Property],SeriesItemHighlightStyle.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core84.Property],SeriesItemHighlightStyle.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core84.Property],SeriesItemHighlightStyle.prototype,"lineDash",2),__decorateClass([import_ag_charts_core84.Property],SeriesItemHighlightStyle.prototype,"lineDashOffset",2);var HighlightProperties=class extends import_ag_charts_core84.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.range="tooltip",this.bringToFront=!0,this.highlightedItem={},this.unhighlightedItem={},this.highlightedSeries={},this.unhighlightedSeries={}}getStyle(t){const e=getHighlightStyleOptionKeys(t);return e.length===0?{}:(0,import_ag_charts_core84.mergeDefaults)(...e.map(i=>this[i]))}};__decorateClass([import_ag_charts_core84.Property],HighlightProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core84.Property],HighlightProperties.prototype,"range",2),__decorateClass([import_ag_charts_core84.Property],HighlightProperties.prototype,"bringToFront",2),__decorateClass([import_ag_charts_core84.Property],HighlightProperties.prototype,"highlightedItem",2),__decorateClass([import_ag_charts_core84.Property],HighlightProperties.prototype,"unhighlightedItem",2),__decorateClass([import_ag_charts_core84.Property],HighlightProperties.prototype,"highlightedSeries",2),__decorateClass([import_ag_charts_core84.Property],HighlightProperties.prototype,"unhighlightedSeries",2);var SegmentOptions=class extends import_ag_charts_core84.BaseProperties{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"start",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"stop",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"fill",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"stroke",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"lineDash",2),__decorateClass([import_ag_charts_core84.Property],SegmentOptions.prototype,"lineDashOffset",2);var Segmentation=class{constructor(){this.key="x",this.segments=new import_ag_charts_core84.PropertiesArray(SegmentOptions)}};__decorateClass([import_ag_charts_core84.Property],Segmentation.prototype,"enabled",2),__decorateClass([import_ag_charts_core84.Property],Segmentation.prototype,"key",2),__decorateClass([import_ag_charts_core84.Property],Segmentation.prototype,"segments",2);var FillGradientDefaults=class extends import_ag_charts_core84.BaseProperties{constructor(){super(...arguments),this.type="gradient",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.reverse=!1,this.colorSpace="rgb"}};__decorateClass([import_ag_charts_core84.Property],FillGradientDefaults.prototype,"type",2),__decorateClass([import_ag_charts_core84.Property],FillGradientDefaults.prototype,"colorStops",2),__decorateClass([import_ag_charts_core84.Property],FillGradientDefaults.prototype,"bounds",2),__decorateClass([import_ag_charts_core84.Property],FillGradientDefaults.prototype,"gradient",2),__decorateClass([import_ag_charts_core84.Property],FillGradientDefaults.prototype,"rotation",2),__decorateClass([import_ag_charts_core84.Property],FillGradientDefaults.prototype,"reverse",2),__decorateClass([import_ag_charts_core84.Property],FillGradientDefaults.prototype,"colorSpace",2);var FillPatternDefaults=class extends import_ag_charts_core84.BaseProperties{constructor(){super(...arguments),this.type="pattern",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.scale=1,this.reverse=!1,this.pattern="forward-slanted-lines",this.width=26,this.height=26,this.padding=6,this.fill="black",this.fillOpacity=1,this.backgroundFill="white",this.backgroundFillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0}};__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"type",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"colorStops",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"bounds",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"gradient",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"rotation",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"scale",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"reverse",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"path",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"pattern",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"width",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"height",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"padding",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"fill",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"backgroundFill",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"backgroundFillOpacity",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"stroke",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core84.Property],FillPatternDefaults.prototype,"strokeWidth",2);var FillImageDefaults=class extends import_ag_charts_core84.BaseProperties{constructor(){super(...arguments),this.type="image",this.url="",this.rotation=0,this.scale=1,this.backgroundFill="black",this.backgroundFillOpacity=1,this.repeat="no-repeat",this.fit="contain"}};__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"type",2),__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"url",2),__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"rotation",2),__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"scale",2),__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"backgroundFill",2),__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"backgroundFillOpacity",2),__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"repeat",2),__decorateClass([import_ag_charts_core84.Property],FillImageDefaults.prototype,"fit",2);var SeriesProperties=class extends import_ag_charts_core84.BaseProperties{constructor(){super(...arguments),this.visible=!0,this.focusPriority=1/0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new HighlightProperties}handleUnknownProperties(t,e){"context"in e&&(this.context=e.context,t.delete("context")),"allowNullKeys"in e&&(this.allowNullKeys=e.allowNullKeys,t.delete("allowNullKeys"))}};__decorateClass([import_ag_charts_core84.Property],SeriesProperties.prototype,"id",2),__decorateClass([import_ag_charts_core84.Property],SeriesProperties.prototype,"visible",2),__decorateClass([import_ag_charts_core84.Property],SeriesProperties.prototype,"focusPriority",2),__decorateClass([import_ag_charts_core84.Property],SeriesProperties.prototype,"showInLegend",2),__decorateClass([import_ag_charts_core84.Property],SeriesProperties.prototype,"cursor",2),__decorateClass([import_ag_charts_core84.Property],SeriesProperties.prototype,"nodeClickRange",2),__decorateClass([import_ag_charts_core84.Property],SeriesProperties.prototype,"highlight",2);function datumBoundaryPoints(t,e){if(e.length===0)return[!1,!1];const i=e[0],s=e.at(-1);if(typeof i=="string"||i===null||i===void 0)return[t===i,t===s];if(t==null)return[!1,!1];const n=t.valueOf();if(i==null||s==null)return[!1,!1];let r=i.valueOf(),a=s.valueOf();return r>a&&([r,a]=[a,r]),[n===r,n===a]}function datumStylerProperties(t,e,i,s,n,r){const[a,o]=datumBoundaryPoints(e,r),[l,c]=datumBoundaryPoints(t,n);return{xKey:i,yKey:s,xValue:t,yValue:e,first:l,last:c,min:a,max:o}}function visibleRangeIndices(t,e,[i,s],n){let r=(0,import_ag_charts_core85.findMinIndex)(0,e-1,o=>{const l=t===1?o:e-o,c=n(l)?.[1]??Number.NaN;return!Number.isFinite(c)||c>=i})??0,a=(0,import_ag_charts_core85.findMaxIndex)(0,e-1,o=>{const l=t===1?o:e-o,c=n(l)?.[0]??Number.NaN;return!Number.isFinite(c)||c<=s})??e-1;return t===-1&&([r,a]=[e-a,e-r]),r=Math.max(r,0),a=Math.min(a+1,e),[r,a]}function getDatumRefPoint(t,e,i){if(i){const{x:n,y:r,width:a,height:o}=i;return{canvasX:n+a/2,canvasY:r+o/2}}const s=e.yBar?.upperPoint??e.midPoint??t.datumMidPoint?.(e);if(s){const{x:n,y:r}=Transformable.toCanvasPoint(t.contentGroup,s.x,s.y);return{canvasX:Math.round(n),canvasY:Math.round(r)}}}function countExpandingSearch(t,e,i,s,n){let r=-1,a=0,o=0,l=!1;for(;a<s&&r<=e-t;){r+=1;const c=i+o;if(l||(o*=-1),o>=0&&(o+=1),l&&o<0&&(o-=1),c<t||c>e){l=!0;continue}n(c)&&(a+=1)}return a}function getItemStyles(t){const e={};for(const i of highlightStates)e[i]=t(void 0,!1,i);return e}function getItemStylesPerItemId(t,...e){const i={};for(const s of e??["default"])for(const n of highlightStates){const r=i[s]??(i[s]={});r[n]=t(void 0,!1,n,s)}return i}function hasDimmedOpacity(t){return(t?.opacity??1)<1||(t?.fillOpacity??1)<1||(t?.strokeOpacity??1)<1}var opaqueMarkerFillCache=new Map;function isOpaqueMarkerFillStyle(t){if(t==null)return!1;const e=t.fill;if(!(0,import_ag_charts_core85.isString)(e))return!1;const i=e.trim(),s=i.toLowerCase();if(s==="transparent"||s==="none")return!1;let n=opaqueMarkerFillCache.get(i);if(n==null){try{n=import_ag_charts_core85.Color.fromString(i).a===1}catch{n=!1}opaqueMarkerFillCache.set(i,n)}return n}function resolveMarkerDrawingMode(t,e){return t!=="cutout"?t:isOpaqueMarkerFillStyle(e)?"cutout":"overlay"}function findNodeDatumInArray(t,e){for(const i of e??[])switch(typeof t){case"string":if(i.itemId===t)return i;break;case"number":if(i.datumIndex===t)return i;break;default:return t}}var TooltipManager=class{constructor(t,e,i,s){this.domManager=i,this.tooltip=s,this.stateTracker=new StateTracker,this.suppressState=new StateTracker(!1),this.appliedState=null,this.pendingRemovals=new Map,this.removeDelay=100,this.cleanup=new import_ag_charts_core86.CleanupRegistry,this.cleanup.register(s.setup(e,i),t.on("dom:hidden",()=>this.tooltip.hide()))}destroy(){for(const{scheduler:t}of this.pendingRemovals.values())t.cancel();this.pendingRemovals.clear(),this.cleanup.flush()}updateTooltip(t,e,i,s){const n=this.pendingRemovals.get(t);n&&(n.scheduler.cancel(),this.pendingRemovals.delete(t)),i??(i=this.stateTracker.get(t)?.content),this.stateTracker.set(t,{meta:e,content:i,pagination:s}),this.applyStates()}removeTooltip(t,e,i=!1){if(i&&this.removeDelay>0){const n=this.pendingRemovals.get(t);if(n){e&&(n.lastMeta=e);return}const r=debouncedCallback(()=>{this.applyPendingRemoval(t)});this.pendingRemovals.set(t,{scheduler:r,lastMeta:e}),r.schedule(this.removeDelay);return}const s=this.pendingRemovals.get(t);s&&(s.scheduler.cancel(),this.pendingRemovals.delete(t)),this.stateTracker.delete(t),this.applyStates()}suppressTooltip(t){this.suppressState.set(t,!0)}unsuppressTooltip(t){this.suppressState.delete(t)}applyPendingRemoval(t){this.pendingRemovals.has(t)&&(this.pendingRemovals.delete(t),this.stateTracker.delete(t),this.applyStates())}applyStates(){const t=this.stateTracker.stateId(),e=t?this.stateTracker.get(t):void 0;if(this.suppressState.stateValue()||e?.meta==null||e?.content==null){this.appliedState=null,this.tooltip.hide();return}const i=this.domManager.getBoundingClientRect(),s=this.tooltip.bounds==="extended"?this.domManager.getOverlayClientRect():i;if((0,import_ag_charts_core86.objectsEqual)(this.appliedState?.content,e?.content)&&(0,import_ag_charts_core86.objectsEqual)(this.appliedState?.pagination,e?.pagination)){const n=this.tooltip.isVisible();this.tooltip.show(s,i,e?.meta,null,void 0,n)}else this.tooltip.show(s,i,e?.meta,e?.content,e?.pagination);this.appliedState=e}static makeTooltipMeta(t,e,i,s){const{canvasX:n,canvasY:r}=t,a=e.properties.tooltip,{placement:o,anchorTo:l,xOffset:c,yOffset:h}=a.position,u=getDatumRefPoint(e,i,s);return{canvasX:n,canvasY:r,nodeCanvasX:u?.canvasX??n,nodeCanvasY:u?.canvasY??r,enableInteraction:a.interaction?.enabled??!1,showArrow:a.showArrow,position:{placement:o,anchorTo:l,xOffset:c,yOffset:h}}}},import_ag_charts_core87=require("ag-charts-core"),DRAG_THRESHOLD_PX=3,DOUBLE_TAP_TIMER_MS=505,DOUBLE_TAP_THRESHOLD_PX=30;function makeSynthetic(t,e){const{device:i,offsetX:s,offsetY:n,clientX:r,clientY:a,currentX:o,currentY:l,sourceEvent:c}=e;return{type:t,device:i,offsetX:s,offsetY:n,clientX:r,clientY:a,currentX:o,currentY:l,sourceEvent:c}}function checkDragDistance(t,e){const i=t*t+e*e,s=DRAG_THRESHOLD_PX*DRAG_THRESHOLD_PX;return i>=s}function checkDoubleTapDistance(t,e){const i=t.clientX-e.clientX,s=t.clientY-e.clientY,n=i*i+s*s,r=DOUBLE_TAP_THRESHOLD_PX*DOUBLE_TAP_THRESHOLD_PX;return n<r}var DragInterpreter=class{constructor(t){this.cleanup=new import_ag_charts_core87.CleanupRegistry,this.events=new import_ag_charts_core87.EventEmitter,this.isDragging=!1,this.touch={distanceTravelledX:0,distanceTravelledY:0,clientX:0,clientY:0},this.cleanup.register(t.addListener("touchstart",this.onTouchStart.bind(this)),t.addListener("touchmove",this.onTouchMove.bind(this)),t.addListener("touchend",this.onTouchEnd.bind(this)),t.addListener("mousemove",this.onMouseMove.bind(this)),t.addListener("dblclick",this.onDblClick.bind(this)),t.addListener("drag-start",this.onDragStart.bind(this)),t.addListener("drag-move",this.onDragMove.bind(this)),t.addListener("drag-end",this.onDragEnd.bind(this)))}destroy(){this.cleanup.flush()}onTouchStart(t){const{clientX:e,clientY:i}=t.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX=0,this.touch.distanceTravelledY=0,this.touch.clientX=e,this.touch.clientY=i}onTouchMove(t){const{clientX:e,clientY:i}=t.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX+=Math.abs(this.touch.clientX-e),this.touch.distanceTravelledY+=Math.abs(this.touch.clientY-i),this.touch.clientX=e,this.touch.clientY=i}onTouchEnd(t){t.sourceEvent.preventDefault()}onMouseMove(t){this.events.emit("mousemove",t)}onDblClick(t){this.events.emit("dblclick",t)}onDragStart(t){this.dragStartEvent=t}onDragMove(t){this.dragStartEvent!=null&&checkDragDistance(t.originDeltaX,t.originDeltaY)&&(this.events.emit("drag-start",this.dragStartEvent),this.events.emit("drag-move",{...this.dragStartEvent,type:"drag-move"}),this.dragStartEvent=void 0,this.isDragging=!0),this.isDragging&&this.events.emit("drag-move",t)}onDragEnd(t){if(this.isDragging){this.events.emit("drag-end",t),this.isDragging=!1;return}if(t.device==="mouse"){const e=makeSynthetic("click",t);this.events.emit("click",e)}else if(t.sourceEvent.type==="touchend"){if(checkDragDistance(this.touch.distanceTravelledX,this.touch.distanceTravelledY))return;const e=makeSynthetic("click",t);this.events.emit("click",e);const i=Date.now();if(this.lastClick!==void 0&&i-this.lastClick.time<=DOUBLE_TAP_TIMER_MS&&checkDoubleTapDistance(this.lastClick,t)){const s=makeSynthetic("dblclick",t);this.events.emit("dblclick",s),this.lastClick=void 0}else this.lastClick={time:i,clientX:t.clientX,clientY:t.clientY}}}},DOMManagerWidget=class extends NativeWidget{constructor(t){super(t)}addChildToDOM(){}removeChildFromDOM(){}},WidgetSet=class{constructor(t,e){this.seriesWidget=new DOMManagerWidget(t.getParent("series-area")),this.chartWidget=new DOMManagerWidget(t.getParent("canvas-proxy")),this.containerWidget=new DOMManagerWidget(t.getParent("canvas-container")),this.containerWidget.addChild(this.chartWidget),this.chartWidget.addChild(this.seriesWidget),e.withDragInterpretation&&(this.seriesDragInterpreter=new DragInterpreter(this.seriesWidget))}destroy(){this.seriesDragInterpreter?.destroy(),this.seriesWidget.destroy(),this.chartWidget.destroy(),this.containerWidget.destroy()}},import_ag_charts_core93=require("ag-charts-core"),import_ag_charts_core88=require("ag-charts-core"),_ContinuousScale=class Ie extends AbstractScale{constructor(e=[],i=[]){super(),this.range=i,this.defaultTickCount=Ie.defaultTickCount,this.defaultClamp=!1,this._domain=[],this.domainNeedsValueOf=!0,this.d0Cache=Number.NaN,this.d1Cache=Number.NaN,this.domain=e}static is(e){return e instanceof Ie}get domain(){return this._domain}set domain(e){if(this._domain=e,e&&e.length>=2){const i=e[0];this.domainNeedsValueOf=i!=null&&typeof i=="object",this.domainNeedsValueOf?(this.d0Cache=e[0].valueOf(),this.d1Cache=e[1].valueOf()):(this.d0Cache=e[0],this.d1Cache=e[1])}else this.d0Cache=Number.NaN,this.d1Cache=Number.NaN}normalizeDomains(...e){return normalizeContinuousDomains(...e)}calcBandwidth(e=1,i=1){const{domain:s}=this,n=this.getPixelRange();if(s.length===0)return n;let a=Math.abs(this.d1Cache-this.d0Cache)/e+1;if(i!==0){const o=Math.floor(n);a=Math.min(a,o)}return n/Math.max(1,a)}convert(e,i){const{domain:s}=this;if(!s||s.length<2||e==null)return Number.NaN;const{range:n}=this,r=i?.clamp??this.defaultClamp;let a=this.d0Cache,o=this.d1Cache,l=typeof e=="number"?e:e.valueOf();if(this.transform&&(a=this.transform(a),o=this.transform(o),l=this.transform(l)),r){const[h,u]=(0,import_ag_charts_core88.findMinMax)([a,o]);if(l<h)return n[0];if(l>u)return n[1]}if(a===o)return(n[0]+n[1])/2;if(l===a)return n[0];if(l===o)return n[1];const c=n[0];return c+(l-a)/(o-a)*(n[1]-c)}invert(e,i){const{domain:s}=this;if(s.length<2)return;let n=this.d0Cache,r=this.d1Cache;this.transform&&(n=this.transform(n),r=this.transform(r));const{range:a}=this,[o,l]=a;let c;return o===l?c=this.toDomain((n+r)/2):c=this.toDomain(n+(e-o)/(l-o)*(r-n)),this.transformInvert?this.transformInvert(c):c}getDomainMinMax(){return unpackDomainMinMax(this.domain)}getPixelRange(){const[e,i]=this.range;return Math.abs(i-e)}};_ContinuousScale.defaultTickCount=5;var ContinuousScale=_ContinuousScale;function normalizeContinuousDomains(...t){let e,i=1/0,s,n=-1/0;for(const r of t){const a=r.domain;for(const o of a){const l=o.valueOf();l<i&&(i=l,e=o),l>n&&(n=l,s=o)}}return e!=null&&s!=null?{domain:[e,s],animatable:!0}:{domain:[],animatable:!1}}var import_ag_charts_core90=require("ag-charts-core"),import_ag_charts_core89=require("ag-charts-core"),_BandScale=class Ne extends AbstractScale{constructor(){super(...arguments),this.invalid=!0,this.range=[0,1],this.round=!1,this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(e){return e instanceof Ne}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=(0,import_ag_charts_core89.clamp)(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this.invalid=!0,this._paddingInner=(0,import_ag_charts_core89.clamp)(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this.invalid=!0,this._paddingOuter=(0,import_ag_charts_core89.clamp)(0,e,1)}get paddingOuter(){return this._paddingOuter}getBandCountForUpdate(){return this.bands.length}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&import_ag_charts_core89.Logger.warnOnce("Expected update to not invalidate scale"))}convert(e,i){this.refresh();const s=this.findIndex(e,i?.alignment);return s==null||s<0||s>=this.getBandCountForUpdate()?Number.NaN:this.ordinalRange(s)}getDomainMinMax(){return unpackDomainMinMax(this.domain)}invertNearestIndex(e){this.refresh();const i=this.getBandCountForUpdate();if(i===0)return-1;let s=0,n=i-1,r=1/0,a=0;for(;s<=n;){const o=Math.trunc((n+s)/2),l=this.ordinalRange(o),c=Math.abs(l-e);if(c===0)return o;c<r&&(r=c,a=o),l<e?s=o+1:n=o-1}return a}update(){const[e,i]=this.range;let{_paddingInner:s}=this;const{_paddingOuter:n}=this,r=this.getBandCountForUpdate();if(r===0)return;const a=i-e;let o;r===1?(s=0,o=a*(1-n*2)):o=a/Math.max(1,r-s+n*2);const l=this.round&&Math.floor(o)>0,c=l?Math.floor(o):o;let h=e+(a-c*(r-s))/2,u=c*(1-s);l&&(h=Math.round(h),u=Math.round(u)),this._step=c,this._inset=h,this._bandwidth=u,this._rawBandwidth=o*(1-s)}ordinalRange(e){const{_inset:i,_step:s,range:n}=this,r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return(0,import_ag_charts_core89.clamp)(r,i+s*e,a)}};__decorateClass([Invalidating],_BandScale.prototype,"range",2),__decorateClass([Invalidating],_BandScale.prototype,"round",2);var BandScale=_BandScale,APPROXIMATE_THRESHOLD=1e3,SAMPLE_POINTS=20;function checkUniformityBySampling(t,e=0,i=t.length-1){const s=i-e+1;if(s<2)return{isUniform:!1};const n=Array.from({length:SAMPLE_POINTS},(l,c)=>e+Math.floor(c*(s-1)/(SAMPLE_POINTS-1))),r=n.map(l=>t[l].valueOf()),a=(r.at(-1)-r[0])/(s-1);if(!Number.isFinite(a)||a===0)return{isUniform:!1};const o=Math.abs(a*.01);for(let l=1;l<r.length;l++){const c=n[l]-n[l-1],h=(r[l]-r[l-1])/c;if(Math.abs(h-a)>o)return{isUniform:!1}}return{isUniform:!0,interval:a}}var DiscreteTimeScale=class ke extends BandScale{static is(e){return e instanceof ke}toDomain(e){return new Date(e)}get reversed(){const{domain:e}=this;return e.length>0&&e[0].valueOf()>e.at(-1).valueOf()}get numericBands(){return this.bands.map(e=>e.valueOf())}convert(e,i){this.refresh(),e instanceof Date||(e=new Date(e));const{domain:s,reversed:n}=this,r=this.numericBands,a=r.length;if(s.length<=0)return Number.NaN;const o=this.ordinalRange(0),l=this.ordinalRange(a-1);if(a===0)return o;if(i?.clamp===!0){const{range:v}=this;if(e.valueOf()<r[0])return v[0];if(e.valueOf()>r.at(-1))return v[1]}if((i?.alignment??import_ag_charts_core90.ScaleAlignment.Leading)!==import_ag_charts_core90.ScaleAlignment.Interpolate){const v=super.convert(e,i);return n?l-(v-o):v}const h=e.valueOf();let u=this.findIndex(e)??0,d;n?(u=Math.min(Math.max(u,1),a-1),d=-1):(u=Math.min(Math.max(u,0),a-2),d=1);const p=r[u],g=r[u+d],f=this.ordinalRange(u),y=this.ordinalRange(u+d),b=(h-p)/(g-p)*(y-f)+f;return n?l-(b-o):b}invert(e,i=!1){this.refresh();const{domain:s}=this;if(s.length<=0)return;const n=this.bands,r=this.getBandCountForUpdate(),a=s[0].valueOf()>s.at(-1).valueOf();let o;return i?o=this.invertNearestIndex(e-this.bandwidth/2):o=(0,import_ag_charts_core90.findMinIndex)(0,r-1,c=>this.ordinalRange(c)>=e)??r-1,n[a?r-1-o:o]}getUniformityCache(e){}findIndex(e,i=import_ag_charts_core90.ScaleAlignment.Leading){if(e==null)return;const s=this.numericBands,n=s.length;if(n===0)return;if(n===1)return 0;const r=e.valueOf();return i===import_ag_charts_core90.ScaleAlignment.Trailing?(0,import_ag_charts_core90.findMinIndex)(0,n-1,a=>s[a]>=r):(0,import_ag_charts_core90.findMaxIndex)(0,n-1,a=>s[a]<=r)}},import_ag_charts_core91=require("ag-charts-core");function normalize(t,e,i,s,n){return e+(s-e)*((n-t)/(i-t))}function unnormalize(t,e,i,s,n){return t+(n-e)*((i-t)/(s-e))}function calcWorldAxis(t,e,i){return[unnormalize(t,i.min,e,i.max,0),unnormalize(t,i.min,e,i.max,1)]}function calcWorldVec4(t,e,i){const[s,n]=calcWorldAxis(t.x1,t.x2,e),[r,a]=calcWorldAxis(t.y1,t.y2,i);return{x1:s,x2:n,y1:r,y2:a}}function panAxesUnnormalized(t,e,i,s,n,r){if(i<=n&&r<=s)return i;const a=n-i,o=r-s,l=Math.abs(a)<Math.abs(o)?a:o;return(0,import_ag_charts_core91.clamp)(t,i+l,e)}function calcPanToBBoxRatios(t,e,i){const{x:s={min:0,max:1},y:n={min:0,max:1}}=e,r=import_ag_charts_core91.Vec4.from(i),a=import_ag_charts_core91.Vec4.from(t),o=calcWorldVec4(a,s,n),l=panAxesUnnormalized(o.x1,o.x2,a.x1,a.x2,r.x1,r.x2),c=panAxesUnnormalized(o.y1,o.y2,a.y1,a.y2,r.y1,r.y2),h={x:{min:normalize(a.x1,s.min,a.x2,s.max,l),max:normalize(a.x1,s.min,a.x2,s.max,l+t.width)},y:{min:normalize(a.y1,n.min,a.y2,n.max,c),max:normalize(a.y1,n.min,a.y2,n.max,c+t.height)}},u=h.x.max-h.x.min,d=h.y.max-h.y.min;return h.x.min=(0,import_ag_charts_core91.clamp)(0,h.x.min,1-u),h.x.max=h.x.min+u,h.y.min=(0,import_ag_charts_core91.clamp)(0,h.y.min,1-d),h.y.max=h.y.min+d,h}var import_ag_charts_core92=require("ag-charts-core");function rangeAlignment(t,e){const i=t?.valueOf(),s=e?.valueOf();return typeof i!="number"||typeof s!="number"?[void 0,void 0]:i<s?[import_ag_charts_core92.ScaleAlignment.Leading,import_ag_charts_core92.ScaleAlignment.Trailing]:[import_ag_charts_core92.ScaleAlignment.Trailing,import_ag_charts_core92.ScaleAlignment.Leading]}var rangeValidator=t=>(0,import_ag_charts_core93.attachDescription)((e,{options:i})=>!ContinuousScale.is(t?.scale)&&!DiscreteTimeScale.is(t?.scale)||e==null||i.end==null?!0:e<i.end,"to be less than end");function validateChanges(t){for(const e of(0,import_ag_charts_core93.strictObjectKeys)(t)){const i=t[e];if(!i)continue;const{min:s,max:n}=i;(s<0||n>1)&&(import_ag_charts_core93.Logger.warnOnce(`Attempted to update axis (${e}) zoom to an invalid ratio of [{ min: ${s}, max: ${n} }], expecting a ratio of 0 to 1. Ignoring.`),delete t[e])}}function refreshCoreState(t,e){const i={};for(const{id:s,direction:n}of t){const{min:r,max:a}=e[s]??{min:0,max:1};i[s]={min:r,max:a,direction:n}}return i}function areEqualCoreZooms(t,e){const i=(0,import_ag_charts_core93.strictObjectKeys)(t),s=(0,import_ag_charts_core93.strictObjectKeys)(e);if(i.length!==s.length)return!1;for(const n of i)if(!s.includes(n))return!1;for(const n of i){const r=t[n],a=e[n];if(r!==a&&(r==null||a==null||r.direction!==a.direction||r.min!==a.min||r.max!==a.max))return!1}return!0}function userInteraction(t){return{source:"user-interaction",sourceDetail:t}}var ZoomManager=class extends BaseManager{constructor(t,e,i){super(),this.eventsHub=t,this.fireChartEvent=i,this.mementoOriginatorKey="zoom",this.state={},this.axes=[],this.didLayoutAxes=!1,this.lastRestoredState={},this.independentAxes=!1,this.navigatorModule=!1,this.zoomModule=!1,this.pendingMemento=void 0,this.cleanup.register(t.on("zoom:change-request",s=>{this.constrainZoomToRequiredWidth(s)}),e.addListener("pre-series-update",({requiredRangeRatio:s,requiredRangeDirection:n})=>{this.didLayoutAxes=!0;const{pendingMemento:r}=this;r?this.restoreMemento(r.version,r.mementoVersion,r.memento):this.restoreRequiredRange(s,n),this.updateZoom({source:"chart-update",sourceDetail:"unspecified"})}),e.addListener("update-complete",({wasShortcut:s})=>{if(!s&&this.pendingZoomEventSource){const n=this.pendingZoomEventSource;this.fireChartEvent({type:"zoom",source:n,...this.getMementoRanges()}),this.pendingZoomEventSource=void 0}}))}toCoreZoomState(t){const e={};let i;const{state:s}=this;if(this.independentAxes){const n=this.getPrimaryAxisId(import_ag_charts_core93.ChartAxisDirection.X),r=this.getPrimaryAxisId(import_ag_charts_core93.ChartAxisDirection.Y);i=[],n&&i.push(n),r&&i.push(r)}else i=(0,import_ag_charts_core93.strictObjectKeys)(s);for(const n of i){const{direction:r}=s[n]??{};if(r!=null){const a=t[r];if(a){const{min:o,max:l}=a;e[n]={min:o,max:l,direction:r}}}}return e}toZoomState(t){let e,i;for(const s of(0,import_ag_charts_core93.strictObjectKeys)(t)){const{min:n,max:r,direction:a}=t[s];a===import_ag_charts_core93.ChartAxisDirection.X?e??(e={min:n,max:r}):a===import_ag_charts_core93.ChartAxisDirection.Y&&(i??(i={min:n,max:r}))}if(e||i)return{x:e,y:i}}createMemento(){return this.getMementoRanges()}guardMemento(t,e){if(t==null)return!0;if(!(0,import_ag_charts_core93.isObject)(t))return!1;const i=this.getPrimaryAxis(import_ag_charts_core93.ChartAxisDirection.X),s=this.getPrimaryAxis(import_ag_charts_core93.ChartAxisDirection.Y),n={rangeX:{start:rangeValidator(i),end:import_ag_charts_core93.defined},rangeY:{start:rangeValidator(s),end:import_ag_charts_core93.defined},ratioX:{start:import_ag_charts_core93.defined,end:import_ag_charts_core93.defined},ratioY:{start:import_ag_charts_core93.defined,end:import_ag_charts_core93.defined},autoScaledAxes:import_ag_charts_core93.defined},{invalid:r}=(0,import_ag_charts_core93.validate)(t,n);return r.length>0?(e.push(...r.map(String)),!1):!0}restoreMemento(t,e,i){if(!this.axes||!this.didLayoutAxes){this.pendingMemento={version:t,mementoVersion:e,memento:i};return}this.pendingMemento=void 0;const s=(0,import_ag_charts_core93.definedZoomState)(this.getZoom());i?.rangeX?s.x=this.rangeToRatioDirection(import_ag_charts_core93.ChartAxisDirection.X,i.rangeX)??{min:0,max:1}:i?.ratioX?s.x={min:i.ratioX.start??0,max:i.ratioX.end??1}:s.x={min:0,max:1};const{navigatorModule:n,zoomModule:r}=this;this.eventsHub.emit("zoom:load-memento",{zoom:s,memento:i,navigatorModule:n,zoomModule:r});const a=this.toCoreZoomState(s);this.lastRestoredState=(0,import_ag_charts_core93.deepFreeze)((0,import_ag_charts_core93.deepClone)(a)),this.updateChanges({source:"state-change",sourceDetail:"internal-restoreMemento",changes:a,isReset:!1})}findAxis(t){for(const e of this.axes)if(e.id===t)return e}getAxes(){return this.axes}setAxes(t){const{axes:e}=this;e.length=0;for(const n of t)"range"in n&&e.push(n);const i=this.state,s=refreshCoreState(t,i);this.state=s,this.lastRestoredState=refreshCoreState(t,this.lastRestoredState),this.updateChanges({source:"chart-update",sourceDetail:"internal-setAxes",changes:s,isReset:!1})}setIndependentAxes(t=!0){this.independentAxes=t}setNavigatorEnabled(t=!0){this.navigatorModule=t}setZoomModuleEnabled(t=!0){this.zoomModule=t}isNavigatorEnabled(){return this.navigatorModule}isZoomEnabled(){return this.zoomModule}updateZoom({source:t,sourceDetail:e},i){const s=this.toCoreZoomState(i??{});return this.updateChanges({source:t,sourceDetail:e,changes:s,isReset:!1})}computeChangedAxesIds(t){const e=[],i=this.state;for(const s of(0,import_ag_charts_core93.strictObjectKeys)(t)){const n=t[s]??{min:0,max:1},r=i[s];(r==null||r.min!==n.min||r.max!==n.max)&&e.push(s)}return e}updateChanges(t){const{source:e,sourceDetail:i,isReset:s,changes:n}=t;validateChanges(n);const r=this.computeChangedAxesIds(n),a=(0,import_ag_charts_core93.deepClone)(this.state),o=(0,import_ag_charts_core93.deepClone)(this.state);for(const l of r){const c=o[l];c!=null&&(c.min=n[l]?.min??0,c.max=n[l]?.max??1)}return this.state=o,this.dispatch(e,i,r,s,a)}resetZoom({source:t,sourceDetail:e}){this.updateChanges({source:t,sourceDetail:e,changes:this.getRestoredZoom(),isReset:!0})}resetAxisZoom({source:t,sourceDetail:e},i){this.updateChanges({source:t,sourceDetail:e,changes:{[i]:this.getRestoredZoom()[i]},isReset:!0})}panToBBox(t,e){if(!this.isZoomEnabled()&&!this.isNavigatorEnabled())return!1;const i=this.getZoom();if(i===void 0||!i.x&&!i.y)return!1;if(!(t.width>0&&t.height>0&&Math.abs(e.width)<=Math.abs(t.width)&&Math.abs(e.height)<=Math.abs(t.height)))return import_ag_charts_core93.Logger.warnOnce("cannot pan to target BBox - chart too small?"),!1;const n=calcPanToBBoxRatios(t,i,e),r=this.toCoreZoomState(n);return this.updateChanges({source:"user-interaction",sourceDetail:"internal-panToBBox",changes:r,isReset:!1})}fireZoomPanStartEvent(t){this.eventsHub.emit("zoom:pan-start",{callerId:t})}extendToEnd(t,e,i){return this.extendWith(t,e,s=>Number(s)-i)}extendWith({source:t,sourceDetail:e},i,s){const n=this.getPrimaryAxis(i);if(!n)return;const r=this.getDomainExtents(n);if(!r)return;const[,a]=r,o=s(a),l=this.rangeToRatioAxis(n,{start:o});l&&this.updateChanges({source:t,sourceDetail:e,changes:{[i]:l},isReset:!1})}updateWith({source:t,sourceDetail:e},i,s){const n=this.getPrimaryAxis(i);if(!n)return;const r=this.getDomainExtents(n);if(!r)return;let[a,o]=r;[a,o]=s(a,o);const l=this.rangeToRatioAxis(n,{start:a,end:o});l&&this.updateChanges({source:t,sourceDetail:e,changes:{[i]:l},isReset:!1})}getZoom(){return this.toZoomState(this.state)}getAxisZoom(t){return this.state[t]??{min:0,max:1}}getAxisZooms(){return this.state}getCoreZoom(){return this.state}getRestoredZoom(){return this.lastRestoredState}getPrimaryAxisId(t){return this.getPrimaryAxis(t)?.id}getBoundSeries(){const t=this.getPrimaryAxis(import_ag_charts_core93.ChartAxisDirection.X),e=this.getPrimaryAxis(import_ag_charts_core93.ChartAxisDirection.Y);let i;if(this.independentAxes){const s=new Set(t?.boundSeries??[]),n=new Set(e?.boundSeries??[]);i=new Set;for(const r of s)n.has(r)&&i.add(r)}else i=new Set([...t?.boundSeries??[],...e?.boundSeries??[]]);return i}constrainZoomToItemCount(t,e,i){let s=[t.x.min,t.x.max],n=i?void 0:[t.y.min,t.y.max];for(const o of this.getBoundSeries()){const l=o.getZoomRangeFittingItems(s,n,e);l!=null&&(s=l.x,n=l.y)}const r={min:s[0],max:s[1]},a=n?{min:n[0],max:n[1]}:void 0;return(0,import_ag_charts_core93.definedZoomState)({x:r,y:a})}isVisibleItemsCountAtLeast(t,e,i){const s=this.getBoundSeries(),n=[t.x.min,t.x.max],r=!i.includeYVisibleRange&&i.autoScaleYAxis?void 0:[t.y.min,t.y.max];let a=0;for(const o of s){const l=e-(a??0),c=o.getVisibleItems(n,r,l);if(a+=c,a>=e)return!0}return s.size===0}getMementoRanges(){const t=(0,import_ag_charts_core93.definedZoomState)(this.getZoom()),e={rangeX:this.getRangeDirection(import_ag_charts_core93.ChartAxisDirection.X,t.x),rangeY:this.getRangeDirection(import_ag_charts_core93.ChartAxisDirection.Y,t.y),ratioX:{start:t.x.min,end:t.x.max},ratioY:{start:t.y.min,end:t.y.max},autoScaledAxes:void 0};return this.eventsHub.emit("zoom:save-memento",{memento:e}),e}restoreRequiredRange(t,e){const{lastRestoredRequiredRange:i,lastRestoredRequiredRangeDirection:s}=this,n=e!==import_ag_charts_core93.ChartAxisDirection.X&&e!==import_ag_charts_core93.ChartAxisDirection.Y,r=s===e&&i===t,a=t===0&&(i==null||i===0);if(n||r||a)return;const o=this.getPrimaryAxisId(e);if(!o)return;const l=this.getAxisZoom(o),c=Math.min(1,1/t);let h=0,u=1;e===import_ag_charts_core93.ChartAxisDirection.X?(h=(0,import_ag_charts_core93.clamp)(0,1-c,l.min),u=(0,import_ag_charts_core93.clamp)(0,h+c,1)):(u=Math.min(1,l.max),h=u-c,h<0&&(u-=h,h=0),h=(0,import_ag_charts_core93.clamp)(0,h,1),u=(0,import_ag_charts_core93.clamp)(0,u,1)),this.lastRestoredRequiredRange=t,this.lastRestoredRequiredRangeDirection=e;const d={[e]:{min:h,max:u}},p=this.toCoreZoomState(d);this.lastRestoredState=(0,import_ag_charts_core93.deepFreeze)((0,import_ag_charts_core93.deepClone)(p)),this.updateChanges({source:"state-change",sourceDetail:"internal-requiredWidth",changes:p,isReset:!1})}constrainZoomToRequiredWidth(t){if(this.lastRestoredRequiredRange==null||this.lastRestoredRequiredRangeDirection==null)return;const e=this.lastRestoredRequiredRangeDirection,i=this.getPrimaryAxisId(this.lastRestoredRequiredRangeDirection);if(!i)return;const s=t.stateAsDefinedZoom(),n=t.oldState[i],r=s[e].max-s[e].min,a=1/this.lastRestoredRequiredRange;r<=a||t.constrainZoom({...s,[e]:{min:n.min,max:n.min+a}})}dispatch(t,e,i,s,n){const{x:r,y:a}=this.getZoom()??{},o=this.state;let l;const c=this,h={source:t,sourceDetail:e,isReset:s,changedAxes:i,state:o,oldState:n,x:r,y:a,stateAsDefinedZoom(){return(0,import_ag_charts_core93.definedZoomState)(c.toZoomState(h.state))},constrainZoom(p){this.constrainChanges(c.toCoreZoomState(p))},constrainChanges(p){l??(l=(0,import_ag_charts_core93.deepClone)(o));for(const g of(0,import_ag_charts_core93.strictObjectKeys)(p)){const f=p[g],y=l[g];f&&y&&(y.min=f.min,y.max=f.max)}h.state=l}};this.eventsHub.emit("zoom:change-request",h);let u=!1;l&&!areEqualCoreZooms(o,l)&&(u=!0,this.state=l);const d=i.length>0||u;if(d){const p=this.getZoom()??{};this.eventsHub.emit("zoom:change-complete",{source:t,sourceDetail:e,x:p.x}),this.pendingZoomEventSource=t}return d}getRange(t,e){return this.getRangeAxis(this.findAxis(t),e)}getRangeDirection(t,e){return this.getRangeAxis(this.getPrimaryAxis(t),e)}getRangeAxis(t,e){if(!t||!e||!ContinuousScale.is(t.scale)&&!DiscreteTimeScale.is(t.scale))return;const i=this.getDomainPixelExtents(t);if(!i)return;const[s,n]=i;let r,a;return s<=n?(r=t.scale.invert(0),a=t.scale.invert(s+(n-s)*e.max)):(r=t.scale.invert(s-(s-n)*e.min),a=t.scale.invert(0)),{start:r,end:a}}rangeToRatio(t,e){return this.rangeToRatioAxis(this.findAxis(t),e)}rangeToRatioDirection(t,e){return this.rangeToRatioAxis(this.getPrimaryAxis(t),e)}rangeToRatioAxis(t,e){if(!t)return;const i=this.getDomainPixelExtents(t);if(!i)return;const[s,n]=i,{scale:r}=t,{start:a,end:o}=e,[l=import_ag_charts_core93.ScaleAlignment.Leading,c=import_ag_charts_core93.ScaleAlignment.Trailing]=rangeAlignment(a,o),h=a==null?s:r.convert(a,{alignment:l}),u=o==null?n:r.convert(o,{alignment:c})+(r.bandwidth??0);if(!(0,import_ag_charts_core93.isFiniteNumber)(h)||!(0,import_ag_charts_core93.isFiniteNumber)(u))return;const[d,p]=[Math.min(s,n),Math.max(s,n)];if(h<d||h>p){import_ag_charts_core93.Logger.warnOnce(`Invalid range start [${a}], expecting a value between [${r.invert(s)}] and [${r.invert(n)}], ignoring.`);return}if(u<d||u>p){import_ag_charts_core93.Logger.warnOnce(`Invalid range end [${o}], expecting a value between [${r.invert(s)}] and [${r.invert(n)}], ignoring.`);return}const g=n-s;if(g===0)return;const f=Math.abs((h-s)/g),y=Math.abs((u-s)/g);if(!(f>=y))return{min:f,max:y}}getPrimaryAxis(t){return this.axes?.find(e=>e.direction===t)}getDomainExtents(t){const{domain:e}=t.scale,i=e.at(0),s=e.at(-1);if(!(i==null||s==null))return[i,s]}getDomainPixelExtents(t){const[e,i]=t.scale.range;if(!(!(0,import_ag_charts_core93.isFiniteNumber)(e)||!(0,import_ag_charts_core93.isFiniteNumber)(i)))return[e,i]}},LayoutElement=(t=>(t[t.Caption=0]="Caption",t[t.Legend=1]="Legend",t[t.ToolbarLeft=2]="ToolbarLeft",t[t.ToolbarBottom=3]="ToolbarBottom",t[t.Scrollbar=4]="Scrollbar",t[t.Navigator=5]="Navigator",t[t.Overlay=6]="Overlay",t))(LayoutElement||{}),LayoutManager=class{constructor(t){this.eventsHub=t,this.elements=new Map}registerElement(t,e){return this.elements.has(t)?this.elements.get(t).add(e):this.elements.set(t,new Set([e])),()=>this.elements.get(t)?.delete(e)}createContext(t,e){const i={width:t,height:e,layoutBox:new BBox(0,0,t,e),scrollbars:{}};for(const s of Object.values(LayoutElement)){if(typeof s!="number")continue;const n=this.elements.get(s);if(n)for(const r of n)r(i)}return i}emitLayoutComplete({width:t,height:e},i){this.eventsHub.emit("layout:complete",{axes:i.axes??{},chart:{width:t,height:e},clipSeries:i.clipSeries??!1,series:i.series})}},import_ag_charts_core94=require("ag-charts-core"),SeriesLabelLayoutManager=class{constructor(){this.labelData=new Map}updateLabels(t,e,i=BBox.zero){const s={x:-e.left,y:-e.top,width:i.width+e.left+e.right,height:i.height+e.top+e.bottom},n=new Set(t.map(a=>a.id));for(const a of this.labelData.keys())n.has(a)||this.labelData.delete(a);for(const a of t){const o=a.getLabelData();o.every(import_ag_charts_core94.isPointLabelDatum)&&this.labelData.set(a.id,o)}const r=(0,import_ag_charts_core94.placeLabels)(this.labelData,s,5);for(const a of t)a.updatePlacedLabelData?.(r.get(a.id)??[])}},import_ag_charts_core95=require("ag-charts-core"),LegendManager=class{constructor(t){this.eventsHub=t,this.mementoOriginatorKey="legend",this.legendDataMap=new Map}createMemento(){return this.getData().filter(({hideInLegend:t,isFixed:e})=>!t&&!e).map(({enabled:t,seriesId:e,itemId:i,legendItemName:s})=>({visible:t,seriesId:e,itemId:i,legendItemName:s}))}guardMemento(t){return t==null||(0,import_ag_charts_core95.isArray)(t)}restoreMemento(t,e,i){if(i)for(const s of i){const{seriesId:n,data:r}=this.getRestoredData(s)??{};!n||!r||this.updateData(n,r)}this.update()}getRestoredData(t){const{seriesId:e,itemId:i,legendItemName:s,visible:n}=t;if(e){const a=(this.legendDataMap.get(e)??[]).map(o=>{const l=o.seriesId===e&&(!i||o.itemId===i);return l&&o.isFixed&&this.warnFixed(o.seriesId,o.itemId),!o.isFixed&&l?{...o,enabled:n}:o});return{seriesId:e,data:a}}if(!(i==null&&s==null))for(const r of this.getData()){if(i!=null&&r.itemId!==i||s!=null&&r.legendItemName!==s)continue;if(r.isFixed){this.warnFixed(r.seriesId,i);return}const a=(this.legendDataMap.get(r.seriesId)??[]).map(o=>o.itemId===i||o.legendItemName===s?{...o,enabled:n}:o);return{seriesId:r.seriesId,data:a}}}warnFixed(t,e){import_ag_charts_core95.Logger.warnOnce(`The legend item with seriesId [${t}] and itemId [${e}] is not configurable, this series item cannot be toggled through the legend.`)}update(t){this.eventsHub.emit("legend:change",{legendData:t??this.getData()})}updateData(t,e=[]){this.eventsHub.emit("legend:change-partial",{seriesId:t,legendData:e}),this.legendDataMap.set(t,e)}clearData(){this.legendDataMap.clear()}toggleItem(t,e,i,s){if(s){for(const o of this.getData()){const l=(this.legendDataMap.get(o.seriesId)??[]).map(c=>c.legendItemName===s?{...c,enabled:t}:c);this.updateData(o.seriesId,l)}return}const n=this.getData(e),r=n.length===1,a=n.map(o=>i==null&&r||o.itemId===i?{...o,enabled:t}:o);this.updateData(e,a)}getData(t){return t?this.legendDataMap.get(t)??[]:[...this.legendDataMap].reduce((e,[i,s])=>e.concat(s),[])}getDatum({seriesId:t,itemId:e}={}){return this.getData(t).find(i=>i.itemId===e)}getSeriesEnabled(t){const e=this.getData(t);if(e.length>0)return e.some(i=>i.enabled)}getItemEnabled({seriesId:t,itemId:e}={}){return this.getDatum({seriesId:t,itemId:e})?.enabled??!0}},OptionsGraphService=class{updateCallback(t){this.resolvePartialCallback=t}resolvePartial(t,e,i){return this.resolvePartialCallback?.(t,e,i)}},import_ag_charts_core96=require("ag-charts-core"),IrregularBandScale=class extends BandScale{constructor(){super(...arguments),this.type="category",this.defaultTickCount=0,this._hasFixedWidth=!1,this._paddingInnerWidth=0,this._domain=[],this._bandRanges=new Map}set domain(t){this._domain!==t&&(t.length===0&&(this._bandRanges.clear(),this._hasFixedWidth=!1),this.invalid=!0,this._domain=t)}get domain(){return this._domain}get bands(){return this.domain}addBand(t,e,i){this._domain.push(this.getDomainValue(t,e)),this._bandRanges.has(t)||this._bandRanges.set(t,new Map),this._bandRanges.get(t).set(e,i),this._hasFixedWidth||(this._hasFixedWidth=i!=null),this.invalid=!0}getDomainValue(t,e){return`${t}-${e}`}findIndex(t){let e=0;for(const i of this._bandRanges.keys()){if(i===t)return e;e++}}convert(t){const{_bandwidth:e,_bandRanges:i,_inset:s,_paddingInnerWidth:n}=this;let r=s;const a=t.split("-"),o=Number(a[0]);if(!this._hasFixedWidth)return super.convert(o);for(let l=0;l<o;l++){const c=i.get(l);if(!c){r+=n;continue}let h=0;for(const u of c.values())h=Math.max(h,u??e);r+=h+n}return r}invert(t,e){}getBandCountForUpdate(){return this._bandRanges.size}update(){if(!this._hasFixedWidth)return super.update();const[t,e]=this.range;let{paddingInner:i}=this;const s=this.getBandCountForUpdate();if(s===0)return;let n=0,r=s,a=s;for(const f of this._bandRanges.values()){let y=0,m=!1;for(const b of f.values()){if(b==null){m=!0;continue}y=Math.max(y,b)}m?a-=1:(r-=1,n+=y)}s===1&&(i=0);const o=e-t,l=o/s*i,c=n+l*(s-1),h=o-c;let u=t,d=r>0&&h>=0?h/r:o/s,p=d;a===s&&h>0&&(u+=h/2),this.round&&Math.floor(p)>0&&(u=Math.round(u),p=Math.round(p)),h<0&&(d=0,p=0),this._inset=u,this._bandwidth=p,this._rawBandwidth=d,this._paddingInnerWidth=l}normalizeDomains(...t){return{domain:[],animatable:!1}}toDomain(t){}},SeriesStateManager=class{constructor(){this.groups=new Map,this.groupScales=new Map}registerSeries({internalId:t,seriesGrouping:e,visible:i,width:s,type:n}){if(!e)return;let r=this.groups.get(n);r==null&&(r=new Map,this.groups.set(n,r)),r.set(t,{grouping:e,visible:i,width:s})}updateSeries({internalId:t,seriesGrouping:e,visible:i,width:s,type:n}){if(!e)return;const r=this.groups.get(n)?.get(t);r&&(r.grouping=e,r.width=s,r.visible=i)}deregisterSeries({internalId:t,type:e}){const i=this.groups.get(e);i!=null&&(i.delete(t),i.size===0&&this.groups.delete(e))}getVisiblePeerGroupIndex({type:t,seriesGrouping:e,visible:i}){if(!e)return{visibleGroupCount:i?1:0,visibleSameStackCount:i?1:0,index:0};const s=new Set,n=new Set,r=this.groups.get(t);for(const o of r?.values()??[])o.visible&&(s.add(o.grouping.groupIndex),o.grouping.groupIndex===e.groupIndex&&n.add(o.grouping.stackIndex));const a=Array.from(s);return a.sort((o,l)=>o-l),{visibleGroupCount:a.length,visibleSameStackCount:n.size,index:a.indexOf(e.groupIndex)}}updateGroupScale({type:t},e,i){const s=this.groupScales.get(t)??new IrregularBandScale;this.groupScales.set(t,s),s.domain=[];const n=this.groups.get(t);for(const r of n?.values()??[])r.visible&&s.addBand(r.grouping.groupIndex,r.grouping.stackIndex,r.width);s.domain.length===0&&s.addBand(0,0,void 0),s.range=[0,e],i.type==="grouped-category"?s.paddingInner=i.groupPaddingInner:i.type==="category"||i.type==="unit-time"?(s.paddingInner=i.groupPaddingInner,s.round=s.padding!==0):s.padding=0,s.update()}getGroupScale({type:t}){return this.groupScales.get(t)}getGroupOffset(t){const{seriesGrouping:e}=t;if(!e)return 0;const i=this.getGroupScale(t);if(!i)return 0;const s=i.getDomainValue(e.groupIndex,e.stackIndex);return i.convert(s)}getStackOffset(t,e){const{seriesGrouping:i}=t;if(!i)return 0;const s=this.groups.get(t.type);if(!s)return 0;const n=this.getGroupScale(t);if(!n||(i.stackCount??0)<1)return 0;let a=0;for(const o of s.values())o.visible&&o.grouping.groupIndex===i.groupIndex&&(a=Math.max(a,o.width??n.bandwidth));return a===0?0:a/2-e/2}},import_ag_charts_core97=require("ag-charts-core"),UpdateService=class{constructor(t){this.updateCallback=t,this.events=new import_ag_charts_core97.EventEmitter}addListener(t,e){return this.events.on(t,e)}destroy(){this.events.clear()}update(t=import_ag_charts_core97.ChartUpdateType.FULL,e){this.updateCallback(t,e)}dispatchUpdateComplete(t,e){this.events.emit("update-complete",{type:"update-complete",apiUpdate:t,wasShortcut:e})}dispatchPreDomUpdate(){this.events.emit("pre-dom-update",{type:"pre-dom-update"})}dispatchPreSeriesUpdate(t,e){this.events.emit("pre-series-update",{type:"pre-series-update",requiredRangeRatio:t,requiredRangeDirection:e})}dispatchPreSceneRender(){this.events.emit("pre-scene-render",{type:"pre-scene-render"})}dispatchProcessData({series:t}){this.events.emit("process-data",{type:"process-data",series:t})}},ChartContext=class{constructor(t,e){this.eventsHub=new import_ag_charts_core98.EventEmitter,this.callbackCache=new import_ag_charts_core98.CallbackCache,this.highlightManager=new HighlightManager(this.eventsHub),this.formatManager=new FormatManager,this.layoutManager=new LayoutManager(this.eventsHub),this.localeManager=new LocaleManager(this.eventsHub),this.seriesStateManager=new SeriesStateManager,this.stateManager=new StateManager,this.seriesLabelLayoutManager=new SeriesLabelLayoutManager,this.cleanup=new import_ag_charts_core98.CleanupRegistry;const{scene:i,root:s,syncManager:n,container:r,fireEvent:a,updateCallback:o,updateMutex:l,styleContainer:c,skipCss:h,chartType:u,domMode:d,withDragInterpretation:p}=e;this.chartService=t,this.syncManager=n,this.domManager=new DOMManager(this.eventsHub,this.chartService,r,c,h,d),this.widgets=new WidgetSet(this.domManager,{withDragInterpretation:p});const g=this.domManager.addChild("canvas","scene-canvas",i?.canvas.element);this.scene=i??new Scene({canvasElement:g}),this.scene.setRoot(s),this.cleanup.register(this.scene.on("scene-changed",()=>{this.updateService.update(import_ag_charts_core98.ChartUpdateType.SCENE_RENDER)})),this.axisManager=new AxisManager(this.eventsHub,s),this.legendManager=new LegendManager(this.eventsHub),this.annotationManager=new AnnotationManager(this.eventsHub,t.annotationRoot,a),this.chartTypeOriginator=new ChartTypeOriginator(t),this.interactionManager=new InteractionManager,this.contextMenuRegistry=new ContextMenuRegistry(this.eventsHub),this.optionsGraphService=new OptionsGraphService,this.updateService=new UpdateService(o),this.activeManager=new ActiveManager(this.chartService,this.eventsHub,this.updateService,this.interactionManager,a),this.proxyInteractionService=new ProxyInteractionService(this.eventsHub,this.localeManager,this.domManager),this.fontManager=new FontManager(this.domManager,this.updateService),this.historyManager=new HistoryManager(this.eventsHub),this.animationManager=new AnimationManager(this.interactionManager,l),this.dataService=new DataService(this.eventsHub,t,this.animationManager),this.tooltipManager=new TooltipManager(this.eventsHub,this.localeManager,this.domManager,t.tooltip),this.zoomManager=new ZoomManager(this.eventsHub,this.updateService,a);for(const f of import_ag_charts_core98.ModuleRegistry.listModulesByType(import_ag_charts_core98.ModuleType.Plugin))(!f.chartType||f.chartType===u)&&f.patchContext?.(this)}destroy(){this.animationManager.destroy(),this.axisManager.destroy(),this.callbackCache.invalidateCache(),this.domManager.destroy(),this.fontManager.destroy(),this.proxyInteractionService.destroy(),this.tooltipManager.destroy(),this.zoomManager.destroy(),this.widgets.destroy(),this.cleanup.flush()}},import_ag_charts_core99=require("ag-charts-core"),ChartHighlight=class extends import_ag_charts_core99.BaseProperties{constructor(){super(...arguments),this.range="tooltip",this.drawingMode="cutout"}};__decorateClass([import_ag_charts_core99.Property],ChartHighlight.prototype,"range",2),__decorateClass([import_ag_charts_core99.Property],ChartHighlight.prototype,"drawingMode",2);var import_ag_charts_core100=require("ag-charts-core");function setsEqual(t,e){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}function idsMapEqual(t,e){if(t==null||e==null)return t===e;if(t.size!==e.size)return!1;for(const[i,s]of t){const n=e.get(i);if(n==null||!setsEqual(s,n))return!1}return!0}function propsEqual(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i+=1){const{type:s,idsMap:n,scopes:r,data:a,...o}=t[i],{type:l,idsMap:c,scopes:h,data:u,...d}=e[i];if(s!==l||r&&h&&!(0,import_ag_charts_core100.arraysEqual)(r,h)||a&&u&&a!==u||!(0,import_ag_charts_core100.objectsEqual)(o,d)||!idsMapEqual(n,c))return!1}return!0}function optsEqual(t,e){const{props:i,...s}=t,{props:n,...r}=e;return(0,import_ag_charts_core100.objectsEqual)(s,r)&&propsEqual(i,n)}function canReuseCachedData(t,e,i,s){return e!==t.dataSet?!1:(0,import_ag_charts_core100.arraysEqual)(i,t.ids)&&optsEqual(s,t.opts)}var import_ag_charts_core101=require("ag-charts-core");function getPropertyKeys(t){return t.filter(e=>e.type==="key").map(e=>e.property).join(";")}var _DataController=class X{constructor(e,i,s){this.mode=e,this.suppressFieldDotNotation=i,this.eventsHub=s,this.debug=import_ag_charts_core101.Debug.create(!0,"data-model"),this.requested=[],this.status="setup"}async request(e,i,s){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");return new Promise((n,r)=>{this.requested.push({id:e,opts:s,dataSet:i,resolve:n,reject:r})})}execute(e){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");this.status="executed";const i=new Map;for(const o of this.requested)o.dataSet.hasPendingTransactions()&&i.set(o.dataSet,o.dataSet.getChangeDescription()),o.dataSet.commitPendingTransactions();this.debug("DataController.execute() - requested",this.requested);const s=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",s);const n=this.mergeRequested(s);this.debug("DataController.execute() - merged",n),this.debug.check()&&((0,import_ag_charts_core101.getWindow)().processedData=[]);const r=[];for(const{dataSet:o,ids:l,opts:c,resolves:h,rejects:u}of n){let d=function(v){return canReuseCachedData(v,o,l,c)};var a=d;const p=e?.find(d),g=(v,x)=>{if(this.debug.check()&&(0,import_ag_charts_core101.getWindow)("processedData").push(x),x==null){for(const S of u)S(new Error("AG Charts - no processed data generated"));return}r.push({opts:c,dataSet:o,dataLength:o.data.length,ids:l,dataModel:v,processedData:x});for(const S of h)S({dataModel:v,processedData:x})},f=()=>{try{const v=new DataModel(c,this.mode,this.suppressFieldDotNotation,this.eventsHub),x=new Map(s.map(I=>[I.id,I.dataSet])),S=v.processData(x);return g(v,S),v}catch(v){for(const x of u)x(v)}};if(p==null){f();continue}const{dataModel:y,processedData:m}=p,b=i.get(o);if(m&&b&&y.isReprocessingSupported(m)){if(this.debug("DataController.execute() - reprocessing data",m,o),y.reprocessData(m,i),import_ag_charts_core101.Debug.check("data-model:reprocess-diff")){const v=new DataModel(c,this.mode,this.suppressFieldDotNotation,this.eventsHub),x=new Map(s.map(A=>[A.id,A.dataSet])),S=v.processData(x),I=JSON.parse(JSON.stringify(m,X.jsonReplacer)),D=JSON.parse(JSON.stringify(S,X.jsonReplacer));delete I.time,delete I.optimizations,delete D.time,delete D.optimizations;const T=(0,import_ag_charts_core101.jsonDiff)(D,I);T?(import_ag_charts_core101.Logger.log("\u26A0\uFE0F DATA-MODEL REPROCESS DIFF DETECTED \u26A0\uFE0F"),import_ag_charts_core101.Logger.log("Difference between incremental update and full reprocess:"),import_ag_charts_core101.Logger.log(""),import_ag_charts_core101.Logger.log("BASELINE (full reprocess):"),import_ag_charts_core101.Logger.log(JSON.stringify(D,null,2)),import_ag_charts_core101.Logger.log(""),import_ag_charts_core101.Logger.log("REPROCESSED (incremental update):"),import_ag_charts_core101.Logger.log(JSON.stringify(I,null,2)),import_ag_charts_core101.Logger.log(""),import_ag_charts_core101.Logger.log("DIFF (what changed):"),import_ag_charts_core101.Logger.log(JSON.stringify(T,null,2))):import_ag_charts_core101.Logger.log("\u2705 Data-model reprocess matches baseline (no diff)")}g(y,m);continue}f()}return r}validateRequests(e){const i=[];for(const[s,n]of e.entries())s>0&&n.dataSet.data.length!==e[0].dataSet.data.length&&n.opts.groupByData===!1&&n.opts.groupByKeys===!1?n.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):i.push(n);return i}mergeRequested(e){const i=[];for(const s of e){const n=i.find(X.groupMatch(s));n?n.push(s):i.push([s])}return i.map(X.mergeRequests)}static groupMatch({dataSet:e,opts:i}){const{groupByData:s,groupByKeys:n=!1,groupByFn:r,props:a}=i,o=getPropertyKeys(a);return([l])=>(s===!1||l.dataSet===e)&&(l.opts.groupByKeys??!1)===n&&l.opts.groupByFn===r&&getPropertyKeys(l.opts.props)===o}static mergeRequests(e){const i={ids:[],rejects:[],resolves:[],dataSet:e[0].dataSet,opts:{...e[0].opts,props:[]}},s=new Map,n=new Map;let r=0;for(const a of e){const{id:o,dataSet:l,resolve:c,reject:h,opts:{props:u,...d}}=a;i.ids.push(o),i.rejects.push(h),i.resolves.push(c),i.dataSet??(i.dataSet=l),i.opts??(i.opts={...d,props:[]});for(const p of u){const g={...p,scopes:[o],data:l.data};X.createIdsMap(o,g);let f;X.crossScopeMergableTypes.has(g.type)?f=-1:n.has(l.data)?f=n.get(l.data):(f=r++,n.set(l.data,f));const y=`${g.type}-${f}-${g.groupId}`,m=s.get(y),b=m?.find(v=>X.deepEqual(v,g));if(m==null){i.opts.props.push(g),s.set(y,[g]);continue}else if(b==null){i.opts.props.push(g),m.push(g);continue}g.scopes!=null&&(b.scopes??(b.scopes=[]),b.scopes.push(...g.scopes)),(b.type==="key"||b.type==="value")&&g.idsMap?.size&&(b.idsMap??(b.idsMap=new Map),X.mergeIdsMap(g.idsMap,b.idsMap))}}return i}static mergeIdsMap(e,i){for(const[s,n]of e){const r=i.get(s);if(r==null)i.set(s,new Set(n));else for(const a of n)r.add(a)}}static createIdsMap(e,i){i.id!=null&&(i.idsMap??(i.idsMap=new Map),i.idsMap.has(e)?i.idsMap.get(e).add(i.id):i.idsMap.set(e,new Set([i.id])))}static deepEqual(e,i){if(e===i)return!0;if(e&&i&&typeof e=="object"&&typeof i=="object"){if(e.constructor!==i.constructor)return!1;let s,n;if(Array.isArray(e)){if(n=e.length,n!==i.length)return!1;for(s=n-1;s>=0;s--)if(!X.deepEqual(e[s],i[s]))return!1;return!0}const r=Object.keys(e);if(n=r.length,n!==Object.keys(i).length)return!1;for(s=n-1;s>=0;s--){const a=r[s];if(!X.skipKeys.has(a)&&(!Object.hasOwn(i,a)||!X.deepEqual(e[a],i[a])))return!1}return!0}return!1}static jsonReplacer(e,i){return i instanceof Map?{__type:"Map",value:Array.from(i.entries())}:i instanceof Set?{__type:"Set",value:Array.from(i)}:i}};_DataController.crossScopeMergableTypes=new Set(["key","group-value-processor"]),_DataController.skipKeys=new Set(["id","idsMap","type","scopes","data"]);var DataController=_DataController,import_ag_charts_core102=require("ag-charts-core"),DataSet=class be{constructor(e){this.data=e,this.pendingTransactions=[]}static empty(){return new be([])}static wrap(e){return new be(e)}netSize(){if(!this.hasPendingTransactions())return this.data.length;const e=this.getChangeDescription();return e?e.indexMap.finalLength:this.data.length}addTransaction(e){const i=this.normalizeTransaction(e);this.pendingTransactions.push(i),this.cachedChangeDescription=void 0}deepClone(){return new be([...this.data])}normalizeTransaction(e){const{add:i,addIndex:s,prepend:n,append:r,remove:a,update:o}=e;if(i===void 0)return e;const l={remove:a,update:o};if(n&&(l.prepend=n),r&&(l.append=r),i&&i.length>0){const c=this.netSize();s===void 0||s>=c?l.append=r?[...r,...i]:i:s===0?l.prepend=n?[...i,...n]:i:l.insertions=[{index:s,items:i}]}return l}hasPendingTransactions(){return this.pendingTransactions.length>0}getPendingTransactionCount(){return this.pendingTransactions.length}commitPendingTransactions(){if(!this.hasPendingTransactions())return!1;const e=this.getChangeDescription();if(!e)return!1;const i=e.getPrependedValues(),s=e.getInsertionValues(),n=e.getAppendedValues(),r=[...i,...s,...n];let a=0;return e.applyToArray(this.data,function(l){if(a>=r.length)throw new Error(`AG Charts - Internal error: No insertion value found for index ${l}`);return r[a++]}),this.pendingTransactions=[],this.cachedChangeDescription=void 0,this.updateItemToIndexCache(e,n,i,s),!0}updateItemToIndexCache(e,i,s,n){if(!this.itemToIndexCache)return;const{indexMap:r}=e,{totalPrependCount:a,totalAppendCount:o,removedIndices:l}=r,c=l.size>0,h=n.length>0;if(!c&&a===0&&o===0&&!h)return;if(h){this.itemToIndexCache=void 0;return}let u=!1,d=0;if(c){const y=Array.from(l).sort((m,b)=>m-b);if(u=y[0]===0,u){for(let m=0;m<y.length;m++)if(y[m]!==m){u=!1;break}u&&(d=y.length)}}if(c&&!u){this.itemToIndexCache=void 0;return}const p=this.itemToIndexCache,g=a-d;if(g!==0)for(const[y,m]of p)l.has(m)?p.delete(y):p.set(y,m+g);else if(c)for(const[y,m]of p)l.has(m)&&p.delete(y);for(let y=0;y<s.length;y++){const m=s[y];p.has(m)||p.set(m,y)}const f=r.finalLength-o;for(let y=0;y<i.length;y++){const m=i[y];p.has(m)||p.set(m,f+y)}}clearPendingTransactions(){const e=this.pendingTransactions.length;return this.pendingTransactions=[],this.cachedChangeDescription=void 0,e}getPendingTransactions(){return[...this.pendingTransactions]}toJSON(){return this.data}getChangeDescription(){if(!this.hasPendingTransactions())return;if(this.cachedChangeDescription)return this.cachedChangeDescription;const{indexMap:e,prependValues:i,appendValues:s,insertionValues:n}=this.buildIndexMap(),r=new DataChangeDescription(e,{prependValues:i,appendValues:s,insertionValues:n});return this.cachedChangeDescription=r,r}removeFromGroups(e,i){for(const s of e){let n=0;for(;n<s.length&&i.size>0;)i.has(s[n])?(i.delete(s[n]),s.splice(n,1)):n++;if(i.size===0)break}}buildIndexMap(){const e=this.data.length,i=this.collectTransactionEffects(),s=i.prependsList.flat(),n=i.appendsList.flat(),r=i.insertionsList.flat(),a=s.length,o=n.length,l=r.length,c=e-i.removedOriginalIndices.size,h=a+c+l+o,u=i.removedOriginalIndices.size>0?this.getSortedRemovedIndices(i.removedOriginalIndices):void 0,d=this.buildSpliceOperations(a,l,o,c,i.trackedInsertions,u?.desc,u?.asc),p=this.resolveUpdatedIndices(a,l,c,i.updateTracking,u?.asc,i.updatedOriginalIndices,i.trackedInsertions);return{indexMap:{originalLength:e,finalLength:h,spliceOps:d,removedIndices:i.removedOriginalIndices,updatedIndices:p,totalPrependCount:a,totalAppendCount:o},prependValues:s,appendValues:n,insertionValues:r}}getSortedRemovedIndices(e){const i=Array.from(e).sort((s,n)=>s-n);return{asc:i,desc:[...i].reverse()}}collectTransactionEffects(){const e={prependsList:[],appendsList:[],insertionsList:[],trackedInsertions:[],removedOriginalIndices:new Set,updatedOriginalIndices:new Set,virtualLength:this.data.length};for(const i of this.pendingTransactions){const{prepend:s,append:n,insertions:r,remove:a,update:o}=i;this.applyPrepends(s,e),this.applyInsertions(r,e),this.applyAppends(n,e),this.applyRemovals(a,e),this.applyUpdates(o,e)}return{prependsList:e.prependsList,appendsList:e.appendsList,insertionsList:e.insertionsList,trackedInsertions:e.trackedInsertions,removedOriginalIndices:e.removedOriginalIndices,updatedOriginalIndices:e.updatedOriginalIndices,updateTracking:e.updateTracking}}applyPrepends(e,i){!Array.isArray(e)||e.length===0||(i.prependsList.unshift([...e]),i.virtualLength+=e.length)}applyInsertions(e,i){if(Array.isArray(e))for(const{index:s,items:n}of e)s>=0&&s<=i.virtualLength&&n.length>0&&(i.trackedInsertions.push({virtualIndex:s,items:[...n]}),i.insertionsList.push([...n]),i.virtualLength+=n.length)}applyAppends(e,i){!Array.isArray(e)||e.length===0||(i.appendsList.push([...e]),i.virtualLength+=e.length)}applyRemovals(e,i){if(!Array.isArray(e)||e.length===0)return;const s=new Set(e);if(this.removeFromGroups(i.prependsList,s),s.size>0&&this.removeFromGroups(i.insertionsList,s),i.trackedInsertions.length>0&&this.removeFromTrackedInsertions(e,i),s.size>0&&this.removeFromGroups(i.appendsList,s),s.size>0)for(let n=0;n<this.data.length&&s.size>0;n++){const r=this.data[n];s.has(r)&&(i.removedOriginalIndices.add(n),s.delete(r),i.virtualLength--)}s.size>0&&import_ag_charts_core102.Logger.warnOnce("applyTransaction() remove includes items not present in current data; ignoring missing items.")}applyUpdates(e,i){if(!Array.isArray(e)||e.length===0)return;const s=new Set(e),n=this.collectUpdatedIndicesFromGroups(i.prependsList,s),r=s.size>0?this.collectUpdatedIndicesFromGroups(i.insertionsList,s):[],a=s.size>0?this.collectUpdatedIndicesFromGroups(i.appendsList,s):[];s.size>0&&this.collectUpdatedOriginalIndices(s,i),i.updateTracking={updatedPrependsIndices:n,updatedAppendsIndices:a,updatedInsertionsIndices:r},s.size>0&&import_ag_charts_core102.Logger.warnOnce("applyTransaction() update includes items not present in current data; ignoring missing items.")}collectUpdatedIndicesFromGroups(e,i){if(i.size===0||e.length===0)return[];const s=[];let n=0;for(const r of e){for(const a of r)i.has(a)&&(s.push(n),i.delete(a)),n++;if(i.size===0)break}return s}getItemToIndexMap(){if(this.itemToIndexCache===void 0){this.itemToIndexCache=new Map;for(let e=0;e<this.data.length;e++)this.itemToIndexCache.has(this.data[e])||this.itemToIndexCache.set(this.data[e],e)}return this.itemToIndexCache}collectUpdatedOriginalIndices(e,i){const s=this.getItemToIndexMap();for(const n of[...e]){const r=s.get(n);r!==void 0&&!i.removedOriginalIndices.has(r)&&(i.updatedOriginalIndices.add(r),e.delete(n))}}removeFromTrackedInsertions(e,i){for(let s=0;s<i.trackedInsertions.length;s++){const n=i.trackedInsertions[s],r=n.items.length,a=[];let o=0;for(;o<n.items.length;)e.includes(n.items[o])?(a.push(o+a.length),n.items.splice(o,1),i.virtualLength--):o++;a.length>0&&this.adjustLaterInsertionsAfterRemoval(i.trackedInsertions,s,n,r,a)}}adjustLaterInsertionsAfterRemoval(e,i,s,n,r){const a=r.length;for(let o=i+1;o<e.length;o++){const l=e[o];if(l.virtualIndex<=s.virtualIndex)continue;const c=Math.min(Math.max(l.virtualIndex-s.virtualIndex,0),n);let h=0;for(const u of r)if(u<c)h++;else break;c===n&&(h=a),h>0&&(l.virtualIndex-=h)}}buildSpliceOperations(e,i,s,n,r,a,o){const l=[];if(e>0&&l.push({index:0,deleteCount:0,insertCount:e}),a&&a.length>0){let c=a[0],h=1;for(let u=1;u<a.length;u++){const d=a[u];a[u-1]-d===1?h++:(l.push({index:c-h+1+e,deleteCount:h,insertCount:0}),c=d,h=1)}l.push({index:c-h+1+e,deleteCount:h,insertCount:0})}if(r.length>0)for(const c of r){const h=this.countRemovalsBeforeIndex(o,e,c.virtualIndex),u=c.virtualIndex-h;l.push({index:u,deleteCount:0,insertCount:c.items.length})}return s>0&&l.push({index:e+n+i,deleteCount:0,insertCount:s}),l}countRemovalsBeforeIndex(e,i,s){if(!e||e.length===0)return 0;let n=0;for(const r of e)if(r+i<s)n++;else break;return n}resolveUpdatedIndices(e,i,s,n,r,a,o){const l=new Set;if(n)for(const c of n.updatedPrependsIndices)l.add(c);if(a.size>0){const c=Array.from(a).sort((u,d)=>u-d);let h=0;for(const u of c){if(r)for(;h<r.length&&r[h]<u;)h++;const d=r?h:0,p=u+e;let g=0;for(const y of o)y.virtualIndex<=p&&(g+=y.items.length);const f=u+e-d+g;l.add(f)}}if(n){const c=e+s+i;for(const h of n.updatedAppendsIndices)l.add(c+h);if(n.updatedInsertionsIndices.length>0&&o.length>0){let h=0;for(const u of o){const d=this.countRemovalsBeforeIndex(r,e,u.virtualIndex),p=u.virtualIndex-d;for(let g=0;g<u.items.length;g++)n.updatedInsertionsIndices.includes(h)&&l.add(p+g),h++}}}return l}},_SyncManager=class Q{constructor(e){this.chart=e}subscribe(e=Q.DEFAULT_GROUP){let i=this.get(e);return i||(i={members:new Set},Q.chartsGroups.set(e,i)),i.members.add(this.chart),this}unsubscribe(e=Q.DEFAULT_GROUP){const i=this.get(e);return i?.members.delete(this.chart),delete i?.domains?.x?.sources?.[this.chart.id],delete i?.domains?.y?.sources?.[this.chart.id],this}getChart(){return this.chart}getGroupState(e=Q.DEFAULT_GROUP){return this.get(e)}getGroupMembers(e=Q.DEFAULT_GROUP){const i=this.get(e);return i?Array.from(i.members):[]}getGroupSiblings(e=Q.DEFAULT_GROUP){return this.getGroupMembers(e).filter(i=>i!==this.chart)}getGroupSyncMode(e=Q.DEFAULT_GROUP){return this.getGroupMembers(e).some(i=>i.series.length>1)?"multi-series":"single-series"}get(e){return Q.chartsGroups.get(e)}};_SyncManager.chartsGroups=new Map,_SyncManager.DEFAULT_GROUP=Symbol("sync-group-default");var SyncManager=_SyncManager,import_ag_charts_core103=require("ag-charts-core"),Keyboard=class extends import_ag_charts_core103.BaseProperties{constructor(){super(...arguments),this.enabled=!1}};__decorateClass([import_ag_charts_core103.Property],Keyboard.prototype,"enabled",2),__decorateClass([import_ag_charts_core103.Property],Keyboard.prototype,"tabIndex",2);var import_ag_charts_core126=require("ag-charts-core"),fromToMotion_exports={};__export(fromToMotion_exports,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>NODE_UPDATE_STATE_TO_PHASE_MAPPING,fromToMotion:()=>fromToMotion,staticFromToMotion:()=>staticFromToMotion});var import_ag_charts_core104=require("ag-charts-core"),NODE_UPDATE_STATE_TO_PHASE_MAPPING={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function fromToMotion(t,e,i,s,n,r,a){const{fromFn:o,toFn:l,applyFn:c=(g,f)=>g.setProperties(f)}=n,{nodes:h,selections:u}=deconstructSelectionsOrNodes(s),d=(g,f)=>{let y,m=0,b=0;for(const v of f){const x=g[m]===v,S={last:b>=f.length-1,lastLive:m>=g.length-1,prev:f[b-1],prevFromProps:y,prevLive:g[m-1],next:f[b+1],nextLive:g[m+(x?1:0)]},I=`${t}_${e}_${v.id}`;i.stopByAnimationId(I);let D="unknown";x?r&&a&&(D=calculateStatus(v,v.datum,r,a)):D="removed",v.transitionOut=D==="removed";const{phase:T,start:A,finish:L,delay:N,duration:k,...w}=o(v,v.datum,D,S),{phase:E,start:O,finish:R,delay:_,duration:P,...F}=l(v,v.datum,D,S),V=L==null;i.animate({id:I,groupId:t,phase:T??E??"update",duration:k??P,delay:N??_,from:w,to:F,ease:import_ag_charts_core104.easeOut,collapsable:V,onPlay:()=>{const B={...A,...O,...w};c(v,B,"start")},onUpdate(B){c(v,B,"update")},onStop:()=>{const B={...A,...O,...w,...F,...L,...R};c(v,B,"end")}}),x&&m++,b++,y=w}};let p=0;for(const g of u){const f=g.nodes(),y=f.filter(m=>!g.isGarbage(m));d(y,f),i.animate({id:`${t}_${e}_selection_${p}`,groupId:t,phase:"end",from:0,to:1,ease:import_ag_charts_core104.easeOut,onStop(){g.cleanup()}}),p++}d(h,h)}function staticFromToMotion(t,e,i,s,n,r,a){const{nodes:o,selections:l}=deconstructSelectionsOrNodes(s),{start:c,finish:h,phase:u}=a;i.animate({id:`${t}_${e}`,groupId:t,phase:u??"update",from:n,to:r,ease:import_ag_charts_core104.easeOut,onPlay:()=>{if(c){for(const d of o)d.setProperties(c);for(const d of l){const p=d.nodes();d.batchedUpdate(function(){for(const f of p)f.setProperties(c)})}}},onUpdate(d){for(const p of o)p.setProperties(d);for(const p of l){const g=p.nodes();p.batchedUpdate(function(){for(const y of g)y.setProperties(d)})}},onStop:()=>{for(const d of o)d.setProperties({...r,...h});for(const d of l){const p=d.nodes();d.batchedUpdate(function(){for(const f of p)f.setProperties({...r,...h});d.cleanup()})}}})}function calculateStatus(t,e,i,s){const n=i(t,e);return s.added.has(n)?"added":s.removed.has(n)?"removed":t.previousDatum==null&&t.datum!=null?"added":t.previousDatum!=null&&t.datum==null?"removed":"updated"}var resetMotion_exports={};__export(resetMotion_exports,{resetMotion:()=>resetMotion});function resetMotion(t,e){const{nodes:i,selections:s}=deconstructSelectionsOrNodes(t);for(const n of s){const r=n.nodes();n.batchedUpdate(function(){for(const o of r){const l=e(o,o.datum);o.setProperties(l)}n.cleanup()})}for(const n of i){const r=e(n,n.datum);n.setProperties(r)}}var import_ag_charts_core105=require("ag-charts-core"),Selection=class re{constructor(e,i,s=!0){this.parentNode=e,this.autoCleanup=s,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=import_ag_charts_core105.Debug.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(Node,i)?()=>new i:i}static select(e,i,s=!0){return new re(e,i,s)}static selectAll(e,i){const s=[],n=r=>{if(i(r)&&s.push(r),r instanceof Group)for(const a of r.children())n(a)};return n(e),s}static selectByClass(e,...i){return re.selectAll(e,s=>i.some(n=>s instanceof n))}static selectByTag(e,i){return re.selectAll(e,s=>s.tag===i)}createNode(e,i,s){const n=this.nodeFactory(e);return n.datum=e,i?.(n),s==null?this._nodes.push(n):this._nodes.splice(s,0,n),this.parentNode.appendChild(n),n}update(e,i,s){if(this.garbageBin.size>0&&this.debug("Selection - update() called with pending garbage",e),s&&this._nodesMap.size===0&&this._nodes.length>0)for(const n of this._nodes)this.garbageBin.add(n);if(!s&&this._nodesMap.size>0&&this._nodesMap.clear(),s){const n=new Map,r=new Map;for(let a=0;a<e.length;a++){const o=e[a];let l=s(o);if(n.has(l)){const c=(r.get(l)??0)+1;r.set(l,c),l=`${l}:${c}`}n.set(l,a)}for(const[a,o]of this._nodesMap.entries()){const l=n.get(o);l==null?this.garbageBin.add(a):(a.datum=e[l],this.garbageBin.delete(a),n.delete(o))}for(const[a,o]of n.entries()){const l=e[o];this._nodesMap.set(this.createNode(l,i,o),a)}}else{const n=Math.max(e.length,this.data.length);for(let r=0;r<n;r++)r>=e.length?this.garbageBin.add(this._nodes[r]):r>=this._nodes.length?this.createNode(e[r],i):(this._nodes[r].datum=e[r],this.garbageBin.delete(this._nodes[r]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){if(this.garbageBin.size===0)return this;const e=this;function i(s){return e.garbageBin.has(s)?(e._nodesMap.delete(s),e.garbageBin.delete(s),s.destroy(),!1):!0}return this._nodes=this._nodes.filter(i),this}clear(){this.update([]);for(const e of this._nodesMap.keys())this.garbageBin.add(e);return this._nodesMap.clear(),this}isGarbage(e){return this.garbageBin.has(e)}each(e){const i=this._nodes;return this.parentNode.batchedUpdate(function(){for(const n of i.entries())e(n[1],n[1].datum,n[0])}),this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const i=this._nodes[e];yield{node:i,datum:i.datum,index:e}}}select(e){return re.selectAll(this.parentNode,e)}selectByClass(e){return re.selectByClass(this.parentNode,e)}selectByTag(e){return re.selectByTag(this.parentNode,e)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}get length(){return this._nodes.length}batchedUpdate(e){this.parentNode.batchedUpdate(e)}},import_ag_charts_core106=require("ag-charts-core"),Line=class extends Shape{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.fill=void 0,this.strokeWidth=1}set x(t){this.x1=t,this.x2=t}set y(t){this.y1=t,this.y2=t}get midPoint(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}}computeBBox(){return new BBox(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(t,e){return this.x1===this.x2||this.y1===this.y2?this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(t,e):!1}distanceSquared(t,e){const{x1:i,y1:s,x2:n,y2:r}=this;return(0,import_ag_charts_core106.lineDistanceSquared)(t,e,i,s,n,r,1/0)}render(t){const{ctx:e,devicePixelRatio:i}=t;let{x1:s,y1:n,x2:r,y2:a}=this;if(s===r){const{strokeWidth:o}=this,l=Math.round(s*i)/i+Math.trunc(o*i)%2/(i*2);s=l,r=l}else if(n===a){const{strokeWidth:o}=this,l=Math.round(n*i)/i+Math.trunc(o*i)%2/(i*2);n=l,a=l}e.beginPath(),e.moveTo(s,n),e.lineTo(r,a),this.fillStroke(e),this.fillShadow?.markClean(),super.render(t)}toSVG(){if(!this.visible)return;const t=(0,import_ag_charts_core106.createSvgElement)("line");return t.setAttribute("x1",String(this.x1)),t.setAttribute("y1",String(this.y1)),t.setAttribute("x2",String(this.x2)),t.setAttribute("y2",String(this.y2)),this.applySvgStrokeAttributes(t),{elements:[t]}}};Line.className="Line",__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Line.prototype,"x1",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Line.prototype,"y1",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Line.prototype,"x2",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Line.prototype,"y2",2);var import_ag_charts_core107=require("ag-charts-core"),LabelBorder=class{constructor(){this.enabled=!0}};__decorateClass([import_ag_charts_core107.Property],LabelBorder.prototype,"enabled",2),__decorateClass([import_ag_charts_core107.Property],LabelBorder.prototype,"stroke",2),__decorateClass([import_ag_charts_core107.Property],LabelBorder.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core107.Property],LabelBorder.prototype,"strokeOpacity",2);var LabelStyle=class extends import_ag_charts_core107.BaseProperties{constructor(){super(...arguments),this.border=new LabelBorder}};__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"border",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"color",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"fontSize",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"fontFamily",2),__decorateClass([import_ag_charts_core107.Property],LabelStyle.prototype,"padding",2);var Label=class extends LabelStyle{constructor(){super(...arguments),this.enabled=!1,this._cachedFormatter=void 0}formatValue(t,e,i,s){const{formatter:n,format:r}=this;let a;if(n!=null&&(a??(a=t(n,s))),r!=null){let o=this._cachedFormatter;(o?.type!==e||o?.format!==r)&&(o={type:e,format:r,formatter:FormatManager.getFormatter(e,r)},this._cachedFormatter=o),a??(a=o.formatter?.(i))}return a==null||(0,import_ag_charts_core107.isArray)(a)?a:String(a)}};__decorateClass([import_ag_charts_core107.Property],Label.prototype,"enabled",2),__decorateClass([import_ag_charts_core107.Property],Label.prototype,"formatter",2),__decorateClass([import_ag_charts_core107.Property],Label.prototype,"format",2),__decorateClass([import_ag_charts_core107.Property],Label.prototype,"itemStyler",2);function expandLabelPadding(t){const{enabled:e=!1,stroke:i}=t?.border??{},n=t?.fill!=null||e&&i!=null?t?.padding:null;if(n==null)return{bottom:0,left:0,right:0,top:0};if(typeof n=="number")return{bottom:n,left:n,right:n,top:n};{const{bottom:r=0,left:a=0,right:o=0,top:l=0}=n;return{bottom:r,left:a,right:o,top:l}}}var import_ag_charts_core117=require("ag-charts-core"),ModuleMap=class{constructor(){this.moduleMap=new Map}modules(){return this.moduleMap.values()}addModule(t,e){if(this.moduleMap.has(t))throw new Error(`AG Charts - module already initialised: ${t}`);this.moduleMap.set(t,e)}removeModule(t){this.moduleMap.get(t)?.destroy?.(),this.moduleMap.delete(t)}getModule(t){return this.moduleMap.get(t)}isEnabled(t){return this.moduleMap.has(t)}mapModules(t){return Array.from(this.moduleMap.values(),t)}destroy(){for(const t of this.moduleMap.values())t?.destroy?.();this.moduleMap.clear()}},import_ag_charts_core109=require("ag-charts-core"),Range=class extends Shape{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.horizontal=!1,this.strokeWidth=1}computeBBox(){return new BBox(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(t,e){return!1}render(t){const{ctx:e}=t;let{x1:i,y1:s,x2:n,y2:r}=this;i=this.align(i),s=this.align(s),n=this.align(n),r=this.align(r);const{fill:a,horizontal:o}=this,{globalAlpha:l}=e;a!=null&&(this.applyFillAndAlpha(e),e.beginPath(),e.moveTo(i,s),e.lineTo(n,s),e.lineTo(n,r),e.lineTo(i,r),e.closePath(),e.fill(),e.globalAlpha=l);const{stroke:c,strokeWidth:h,startLine:u,endLine:d}=this;if(!!((u||d)&&c&&h)){const{lineDash:g,lineDashOffset:f,lineCap:y,lineJoin:m}=this;this.applyStrokeAndAlpha(e),e.lineWidth=h,g&&e.setLineDash([...g]),f&&(e.lineDashOffset=f),y&&(e.lineCap=y),m&&(e.lineJoin=m),e.beginPath(),u&&(e.moveTo(i,s),o?e.lineTo(i,r):e.lineTo(n,s)),d&&(e.moveTo(n,r),o?e.lineTo(n,s):e.lineTo(i,r)),e.stroke(),e.globalAlpha=l}this.fillShadow?.markClean(),super.render(t)}};Range.className="Range",__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Range.prototype,"x1",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Range.prototype,"y1",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Range.prototype,"x2",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Range.prototype,"y2",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Range.prototype,"startLine",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Range.prototype,"endLine",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Range.prototype,"horizontal",2);var import_ag_charts_core108=require("ag-charts-core");function getCrossLineValue(t){switch(t.type){case"line":return t.value;case"range":return t.range}}function validateCrossLineValue(t,e){const i=getCrossLineValue(t);if(i==null)return!1;const s=ContinuousScale.is(e)||DiscreteTimeScale.is(e),n=r=>(0,import_ag_charts_core108.checkDatum)(r,s)&&!Number.isNaN(e.convert(r,{clamp:!0}));if(t.type==="range"){const[r,a]=i;return n(r)&&n(a)}else return n(i)}var horizontalLineAnchors={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:1},"top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:-1},"bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},verticalLineAnchors={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:-1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:-1,labelV:-1},"inside-top-right":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},horizontalRangeAnchors={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:-1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:-1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},verticalRangeAnchors={top:{rangeH:0,rangeV:-1,labelH:0,labelV:1},"inside-top":{rangeH:0,rangeV:-1,labelH:0,labelV:-1},"top-left":{rangeH:-1,rangeV:-1,labelH:1,labelV:-1},"inside-top-left":{rangeH:-1,rangeV:-1,labelH:-1,labelV:-1},left:{rangeH:-1,rangeV:0,labelH:1,labelV:0},"inside-left":{rangeH:-1,rangeV:0,labelH:-1,labelV:0},"bottom-left":{rangeH:-1,rangeV:1,labelH:1,labelV:1},"inside-bottom-left":{rangeH:-1,rangeV:1,labelH:-1,labelV:1},bottom:{rangeH:0,rangeV:1,labelH:0,labelV:-1},"inside-bottom":{rangeH:0,rangeV:1,labelH:0,labelV:1},"bottom-right":{rangeH:1,rangeV:1,labelH:-1,labelV:1},"inside-bottom-right":{rangeH:1,rangeV:1,labelH:1,labelV:1},right:{rangeH:1,rangeV:0,labelH:-1,labelV:0},"inside-right":{rangeH:1,rangeV:0,labelH:1,labelV:0},"top-right":{rangeH:1,rangeV:-1,labelH:-1,labelV:-1},"inside-top-right":{rangeH:1,rangeV:-1,labelH:1,labelV:-1},inside:{rangeH:0,rangeV:0,labelH:0,labelV:0}},CartesianCrossLineLabel=class extends LabelStyle{constructor(){super(...arguments),this.enabled=void 0,this.padding=5}};__decorateClass([import_ag_charts_core109.Property],CartesianCrossLineLabel.prototype,"enabled",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLineLabel.prototype,"padding",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLineLabel.prototype,"text",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLineLabel.prototype,"position",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLineLabel.prototype,"rotation",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLineLabel.prototype,"parallel",2);var CartesianCrossLine=class extends import_ag_charts_core109.BaseProperties{constructor(){super(),this.id=(0,import_ag_charts_core109.createId)(this),this.defaultColorRange=[],this.fill="#c16068",this.label=new CartesianCrossLineLabel,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.position="top",this.rangeGroup=new Group({name:this.id}),this.lineGroup=new Group({name:this.id}),this.labelGroup=new Group({name:this.id}),this.crossLineRange=this.lineGroup.appendChild(new Range),this.crossLineLabel=this.labelGroup.appendChild(new TransformableText),this.data=void 0,this.startLine=!1,this.endLine=!1,this._isRange=void 0,this.crossLineRange.pointerEvents=1}get defaultLabelPosition(){return"top"}update(t){const{enabled:e,type:i,data:s,scale:n}=this;if(!n||!e||!t||!validateCrossLineValue(this,n)||s==null){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updateNodes();const r=i==="range";r!==this._isRange&&(r?this.rangeGroup.appendChild(this.crossLineRange):this.lineGroup.appendChild(this.crossLineRange)),this._isRange=r}calculateLayout(t){if(this.data=void 0,!t)return;const{type:e,range:i,value:s,scale:n,clippedRange:r,strokeWidth:a=0}=this;if(!n)return;const o=n.bandwidth??0,l=n.step??0,c=n instanceof BandScale?(l-o)/2:0;let[h,u]=(0,import_ag_charts_core109.findMinMax)(r);h-=o,u+=o;let d,p,g,f;if(e==="line"){const y=o/2;if(d=n.convert(s)+y,p=Number.NaN,g=n.convert(s,{clamp:!0})+y,f=Number.NaN,g>=u||g<=h)return}else if(i){const[y,m]=i,[b,v]=rangeAlignment(y,m);if(d=n.convert(y,{alignment:b}),p=n.convert(m,{alignment:v}),g=n.convert(y,{clamp:!0,alignment:b}),f=n.convert(m,{clamp:!0,alignment:v}),g>f&&([g,f]=[f,g],[d,p]=[p,d]),g>=u||f<=h)return;Number.isFinite(d)&&(g-=c),Number.isFinite(p)&&(p+=o,f+=o+c)}else return;g=(0,import_ag_charts_core109.clampArray)(g,r),f=(0,import_ag_charts_core109.clampArray)(f,r),d-c>=g&&(d-=c),p+c<=f&&(p+=c),this.startLine=a>0&&d>=g&&d<=g+c,this.endLine=a>0&&p>=f-o-c&&p<=f,this.data=[g,f],this.label.enabled===!1||this.label.text}updateNodes(){const{position:t,data:[e,i]=[0,0],gridLength:s}=this,n=Number.isFinite(i)?i-e:0;let r;switch(t){case"top":case"bottom":r=new BBox(e,t==="top"?0:-s,n,s);break;case"left":case"right":r=new BBox(t==="left"?0:-s,e,s,n)}this.updateRangeNode(r);const{label:a}=this;a.enabled!==!1&&a.text&&(this.updateLabel(),this.positionLabel(r))}updateRangeNode(t){const{type:e,position:i,crossLineRange:s,startLine:n,endLine:r,fill:a,fillOpacity:o,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u}=this;s.x1=t.x,s.x2=t.x+t.width,s.y1=t.y,s.y2=t.y+t.height,s.horizontal=i==="top"||i==="bottom",s.startLine=n,s.endLine=r,s.fill=e==="range"?a:void 0,s.fillOpacity=o??1,s.stroke=l,s.strokeWidth=c??1,s.strokeOpacity=h??1,s.lineDash=u}updateLabel(){const{crossLineLabel:t,label:e}=this;e.text&&(t.fill=e.color,t.text=e.text,t.textAlign="center",t.textBaseline="middle",t.setFont(e),t.setBoxing(e))}get anchor(){const t=this.position==="left"||this.position==="right",e=this.type==="range",{position:i=this.defaultLabelPosition}=this.label;return e?(t?horizontalRangeAnchors:verticalRangeAnchors)[i]:(t?horizontalLineAnchors:verticalLineAnchors)[i]}positionLabel(t){const{crossLineLabel:e,label:i,anchor:s}=this;e.rotation=(0,import_ag_charts_core109.toRadians)(i.rotation??0);const n=e.getBBox();if(!n)return;const{width:r,height:a}=n,o=i.padding+r/2,l=i.padding+a/2,c=t.x+t.width*(s.rangeH+1)/2-o*s.labelH,h=t.y+t.height*(s.rangeV+1)/2-l*s.labelV;e.x=c,e.y=h,e.rotationCenterX=c,e.rotationCenterY=h}computeLabelSize(){const{label:t}=this;if(t.enabled===!1||!t.text)return;const e=new TransformableText;e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=t.text,e.rotation=(0,import_ag_charts_core109.toRadians)(t.rotation??0),e.textBaseline="middle",e.textAlign="center";const i=e.getBBox();if(!i)return;const{width:s,height:n}=i;return{width:s,height:n}}calculatePadding(t){const{label:e,anchor:i}=this,s=this.computeLabelSize();if(!s)return;const{width:n,height:r}=s,a=e.padding+n,o=e.padding+r,l=this.position==="left"||this.position==="right";l&&(i.rangeH===-1&&i.labelH===1?t.left=Math.max(t.left??0,a):i.rangeH===1&&i.labelH===-1&&(t.right=Math.max(t.right??0,a))),l||(i.rangeV===-1&&i.labelV===1?t.top=Math.max(t.top??0,o):i.rangeV===1&&i.labelV===-1&&(t.bottom=Math.max(t.bottom??0,o)))}};CartesianCrossLine.className="CrossLine",__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"enabled",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"type",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"range",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"value",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"defaultColorRange",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"fill",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"stroke",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"lineDash",2),__decorateClass([import_ag_charts_core109.Property],CartesianCrossLine.prototype,"label",2);var import_ag_charts_core110=require("ag-charts-core"),AxisGridLine=class{constructor(){this.enabled=!0,this.width=1,this.style=[{fill:void 0,fillOpacity:1,stroke:void 0,strokeWidth:void 0,lineDash:[]}]}};__decorateClass([import_ag_charts_core110.Property],AxisGridLine.prototype,"enabled",2),__decorateClass([import_ag_charts_core110.Property],AxisGridLine.prototype,"width",2),__decorateClass([import_ag_charts_core110.Property],AxisGridLine.prototype,"style",2);var import_ag_charts_core111=require("ag-charts-core"),AxisInterval=class extends import_ag_charts_core111.BaseProperties{};__decorateClass([import_ag_charts_core111.Property],AxisInterval.prototype,"placement",2),__decorateClass([import_ag_charts_core111.Property],AxisInterval.prototype,"step",2),__decorateClass([import_ag_charts_core111.Property],AxisInterval.prototype,"values",2),__decorateClass([import_ag_charts_core111.Property],AxisInterval.prototype,"minSpacing",2),__decorateClass([import_ag_charts_core111.Property],AxisInterval.prototype,"maxSpacing",2);var import_ag_charts_core112=require("ag-charts-core"),AxisLabel=class extends import_ag_charts_core112.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.border=new LabelBorder,this.wrapping="never",this.truncate=!1,this.spacing=5,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1,this._formatters={"component:year":void 0,"component:month":void 0,"component:day":void 0,"component:none":void 0,"long:year":void 0,"long:month":void 0,"long:day":void 0,"long:none":void 0}}getSideFlag(){return this.mirrored?1:-1}formatValue(t,e,i,s){const{formatter:n,format:r}=this,{type:a,value:o,domain:l,boundSeries:c}=e,h=e.type==="number"?e.fractionDigits:void 0,u=e.type==="date"?e.unit:void 0;let d;if(n!=null){const p=e.type==="date"?e.step:void 0,g=e.type==="number"?e.visibleDomain:void 0;d=t(n,{value:o,index:i,domain:l,fractionDigits:h,unit:u,step:p,boundSeries:c,visibleDomain:g})}if(r!=null&&d==null){const{specifier:p,dateStyle:g="long",truncateDate:f}=s??{},y=`${g}:${f??"none"}`;let m=this._formatters[y];const b=FormatManager.mergeSpecifiers(p,r);(m?.type!==a||m?.unit!==u||!(0,import_ag_charts_core112.objectsEqual)(m?.mergedFormat,b))&&(m={type:a,mergedFormat:b,unit:u,formatter:FormatManager.getFormatter(a,b,u,g,{truncateDate:f})},this._formatters[y]=m),d=m.formatter?.(o,h)}return d==null||(0,import_ag_charts_core112.isArray)(d)?d:String(d)}};__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"enabled",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"border",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"fill",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"fontSize",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"fontFamily",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"wrapping",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"truncate",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"spacing",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"minSpacing",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"color",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"rotation",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"avoidCollisions",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"mirrored",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"padding",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"parallel",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"formatter",2),__decorateClass([import_ag_charts_core112.Property],AxisLabel.prototype,"format",2);var import_ag_charts_core113=require("ag-charts-core"),AxisLine=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}};__decorateClass([import_ag_charts_core113.Property],AxisLine.prototype,"enabled",2),__decorateClass([import_ag_charts_core113.Property],AxisLine.prototype,"width",2),__decorateClass([import_ag_charts_core113.Property],AxisLine.prototype,"stroke",2);var import_ag_charts_core114=require("ag-charts-core"),AxisTick=class extends import_ag_charts_core114.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}};__decorateClass([import_ag_charts_core114.Property],AxisTick.prototype,"enabled",2),__decorateClass([import_ag_charts_core114.Property],AxisTick.prototype,"width",2),__decorateClass([import_ag_charts_core114.Property],AxisTick.prototype,"size",2),__decorateClass([import_ag_charts_core114.Property],AxisTick.prototype,"stroke",2);var import_ag_charts_core115=require("ag-charts-core"),AxisTitle=class extends import_ag_charts_core115.BaseProperties{constructor(){super(...arguments),this.caption=new Caption,this.enabled=!1,this.spacing=Caption.SMALL_PADDING,this.fontSize=import_ag_charts_core115.FONT_SIZE.SMALLER,this.fontFamily="sans-serif",this.wrapping="always"}};__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"enabled",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"text",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"spacing",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"fontSize",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"fontFamily",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"color",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"wrapping",2),__decorateClass([import_ag_charts_core115.Property],AxisTitle.prototype,"formatter",2);var import_ag_charts_core116=require("ag-charts-core"),NiceMode=(t=>(t[t.TickAndDomain=0]="TickAndDomain",t[t.TicksOnly=1]="TicksOnly",t[t.Off=2]="Off",t))(NiceMode||{});function prepareAxisAnimationContext(t){const[e,i]=(0,import_ag_charts_core116.findMinMax)(t.range),s=Math.floor(e),n=Math.ceil(i);return{min:s,max:n,visible:s!==n}}var fullCircle=Math.PI*2,halfCircle=fullCircle/2;function normaliseEndRotation(t,e){return Math.abs(e-t)<halfCircle?e:t>e?e+fullCircle:e-fullCircle}function prepareAxisAnimationFunctions(t){const{min:e,max:i}=t,s=l=>l<e||l>i;return{tick:{fromFn(l,c,h){let{x1:u,x2:d,y1:p,y2:g}=l,f=l.opacity;return(h==="added"||s(c.offset))&&({x1:u,x2:d,y1:p,y2:g}=c,f=0),{x1:u,x2:d,y1:p,y2:g,opacity:f,phase:NODE_UPDATE_STATE_TO_PHASE_MAPPING[h]}},toFn(l,c,h){const{x1:u,x2:d,y1:p,y2:g}=c;let f=1;return h==="removed"&&(f=0),{x1:u,x2:d,y1:p,y2:g,opacity:f}},applyFn(l,c){l.setProperties(c),l.visible=!s(l.y)}},line:{fromFn(l,c){const{x1:h,x2:u,y1:d,y2:p}=l.previousDatum??c;return{x1:h,x2:u,y1:d,y2:p,phase:NODE_UPDATE_STATE_TO_PHASE_MAPPING.updated}},toFn(l,c){const{x1:h,x2:u,y1:d,y2:p}=c;return{x1:h,x2:u,y1:d,y2:p}}},label:{fromFn(l,c,h){const u=l.previousDatum??c;let{x:d,y:p,rotationCenterX:g,rotationCenterY:f,rotation:y}=u,m=l.opacity;return h==="removed"||s(u.y)?y=c.rotation:(h==="added"||s(l.datum.y))&&({x:d,y:p,rotationCenterX:g,rotationCenterY:f,rotation:y}=c,m=0),{x:d,y:p,rotationCenterX:g,rotationCenterY:f,rotation:y,opacity:m,phase:NODE_UPDATE_STATE_TO_PHASE_MAPPING[h]}},toFn(l,c,h){const{x:u,y:d,rotationCenterX:p,rotationCenterY:g}=c;let f=0,y=1;return h==="added"?f=c.rotation:h==="removed"?(y=0,f=c.rotation):f=normaliseEndRotation(l.previousDatum?.rotation??c.rotation,c.rotation),{x:u,y:d,rotationCenterX:p,rotationCenterY:g,rotation:f,opacity:y,finish:{rotation:c.rotation}}}},group:{fromFn(l,c){const{translationX:h,translationY:u}=l;return{translationX:h,translationY:u,phase:NODE_UPDATE_STATE_TO_PHASE_MAPPING.updated}},toFn(l,c){const{translationX:h,translationY:u}=c;return{translationX:h,translationY:u}}}}}function resetAxisGroupFn(){return(t,e)=>({translationX:e.translationX,translationY:e.translationY})}function resetAxisLabelSelectionFn(){return(t,e)=>({x:e.x,y:e.y,rotationCenterX:e.rotationCenterX,rotationCenterY:e.rotationCenterY,rotation:e.rotation})}function resetAxisLineSelectionFn(){return(t,e)=>{const{x1:i,x2:s,y1:n,y2:r}=e;return{x1:i,x2:s,y1:n,y2:r}}}function resetAxisFillSelectionFn(){return(t,e)=>{const{x1:i,x2:s,y1:n,y2:r}=e;return{x:i,y:n,width:s-i,height:r-n}}}var AxisGroupZIndexMap=(t=>(t[t.TickLines=0]="TickLines",t[t.AxisLine=1]="AxisLine",t[t.TickLabels=2]="TickLabels",t))(AxisGroupZIndexMap||{});function tickLayoutCacheValid(t,e){return t.domain===e.domain&&t.rangeExtent===e.rangeExtent&&t.nice[0]===e.nice[0]&&t.nice[1]===e.nice[1]&&t.gridLength===e.gridLength&&t.visibleRange[0]===e.visibleRange[0]&&t.visibleRange[1]===e.visibleRange[1]&&t.scrollbarKey===e.scrollbarKey&&t.initialPrimaryTickCount?.unzoomed===e.initialPrimaryTickCount?.unzoomed&&t.initialPrimaryTickCount?.zoomed===e.initialPrimaryTickCount?.zoomed}function computeBand(t,e,i){const s=t.bandwidth??0,r=((t.step??0)-s)/2,a=t.convert(i),o=a-r,l=a+s+r;return[a,(0,import_ag_charts_core117.clampArray)(o,e),(0,import_ag_charts_core117.clampArray)(l,e)]}var _Axis=class Oe{constructor(e,i){this.moduleCtx=e,this.scale=i,this.id="unknown",this._crossLines=[],this.nice=!0,this.reverse=!1,this.interval=new AxisInterval,this.dataDomain={domain:[],clipped:!1},this.allowNull=!1,this.title=new AxisTitle,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.layoutConstraints={stacked:!0,align:"justify",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new Group({name:`${this.id}-axis`}),this.tickLineGroup=this.axisGroup.appendChild(new TransformableGroup({name:`${this.id}-Axis-tick-lines`,zIndex:0})),this.tickLabelGroup=this.axisGroup.appendChild(new TransformableGroup({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.labelGroup=new Group({name:`${this.id}-Labels`,zIndex:import_ag_charts_core117.ZIndexMap.SERIES_ANNOTATION}),this.gridGroup=new TranslatableGroup({name:`${this.id}-Axis-grid`,zIndex:import_ag_charts_core117.ZIndexMap.AXIS_GRID}),this.gridFillGroup=this.gridGroup.appendChild(new Group({name:`${this.id}-gridFills`})),this.gridLineGroup=this.gridGroup.appendChild(new Group({name:`${this.id}-gridLines`})),this.crossLineRangeGroup=new TransformableGroup({name:`${this.id}-CrossLines-Range`,zIndex:import_ag_charts_core117.ZIndexMap.SERIES_CROSSLINE_RANGE}),this.crossLineLineGroup=new TransformableGroup({name:`${this.id}-CrossLines-Line`,zIndex:import_ag_charts_core117.ZIndexMap.SERIES_CROSSLINE_LINE}),this.crossLineLabelGroup=new TransformableGroup({name:`${this.id}-CrossLines-Label`,zIndex:import_ag_charts_core117.ZIndexMap.SERIES_LABEL}),this.tickLabelGroupSelection=Selection.select(this.tickLabelGroup,TransformableText,!1),this.line=new AxisLine,this.tick=new AxisTick,this.gridLine=new AxisGridLine,this.label=this.createLabel(),this.defaultTickMinSpacing=Oe.defaultTickMinSpacing,this.translation={x:0,y:0},this.layout={label:{fractionDigits:0,spacing:this.label.spacing,format:this.label.format},labelThickness:0},this.axisContext=void 0,this.cleanup=new import_ag_charts_core117.CleanupRegistry,this.isHovering=!1,this.range=[0,1],this.visibleRange=[0,1],this.animatable=!0,this.tickLayout=void 0,this.formatterBoundSeries=new import_ag_charts_core117.WeakCache(()=>{const{direction:s,boundSeries:n}=this;return(0,import_ag_charts_core117.deepFreeze)(n.flatMap(r=>r.getFormatterContext(s)))}),this.moduleMap=new ModuleMap,this.range=this.scale.range.slice();for(const s of this.crossLines)this.initCrossLine(s);this.cleanup.register(this.moduleCtx.widgets.containerWidget.addListener("mousemove",s=>this.onMouseMove(s)),this.moduleCtx.widgets.containerWidget.addListener("mouseleave",()=>this.endHovering()))}set crossLines(e){const{CrossLineConstructor:i}=this.constructor;for(const s of this._crossLines)this.detachCrossLine(s);this._crossLines=e.map(s=>{const n=new i;return n.set(s),n});for(const s of this._crossLines)this.attachCrossLine(s),this.initCrossLine(s)}get crossLines(){return this._crossLines}get type(){return this.constructor.type??""}get primaryLabel(){}get primaryTick(){}isCategoryLike(){return!1}resetAnimation(e){}onMouseMove(e){const s=this.tickLabelGroup.pickNode(e.currentX,e.currentY)?.datum,{textUntruncated:n=void 0}=s??{};n?(this.moduleCtx.tooltipManager.updateTooltip(this.id,{canvasX:e.currentX,canvasY:e.currentY,showArrow:!1},[{type:"structured",title:n}]),this.isHovering=!0):this.endHovering()}endHovering(){this.isHovering&&(this.moduleCtx.tooltipManager.removeTooltip(this.id,void 0,!0),this.isHovering=!1)}attachCrossLine(e){this.crossLineRangeGroup.appendChild(e.rangeGroup),this.crossLineLineGroup.appendChild(e.lineGroup),this.crossLineLabelGroup.appendChild(e.labelGroup)}detachCrossLine(e){e.rangeGroup.remove(),e.lineGroup.remove(),e.labelGroup.remove()}destroy(){this.moduleMap.destroy(),this.cleanup.flush()}setScaleRange(e){const{range:i,scale:s}=this,n=(i[1]-i[0])/(e[1]-e[0]),r=n*e[0],a=i[0]-r;s.range=[a,a+n]}updateScale(){const{range:[e,i]}=this;this.setScaleRange(this.visibleRange);for(const s of this.crossLines)s.clippedRange=[e,i]}setCrossLinesVisible(e){this.crossLineRangeGroup.visible=e,this.crossLineLineGroup.visible=e,this.crossLineLabelGroup.visible=e}attachAxis(e){e.gridNode.appendChild(this.gridGroup),e.axisNode.appendChild(this.axisGroup),e.labelNode.appendChild(this.labelGroup),e.crossLineRangeNode.appendChild(this.crossLineRangeGroup),e.crossLineLineNode.appendChild(this.crossLineLineGroup),e.crossLineLabelNode.appendChild(this.crossLineLabelGroup)}detachAxis(){this.gridGroup.remove(),this.axisGroup.remove(),this.labelGroup.remove(),this.crossLineRangeGroup.remove(),this.crossLineLineGroup.remove(),this.crossLineLabelGroup.remove()}attachLabel(e){this.labelGroup.append(e)}inRange(e,i=0){const[s,n]=(0,import_ag_charts_core117.findMinMax)(this.range);return e>=s-i&&e<=n+i}getRangeOverflow(e){const{range:i,visibleRange:s}=this,n=(i[1]-i[0])/(s[1]-s[0]),[r,a]=(0,import_ag_charts_core117.findMinMax)([i[0]-n*s[0],i[0]-n*s[0]+n]);return e<r?e-r:e>a?e-a:0}onGridLengthChange(e,i){i^e&&this.onGridVisibilityChange();for(const s of this.crossLines)this.initCrossLine(s)}onGridVisibilityChange(){}createLabel(){return new AxisLabel}update(){this.formatterBoundSeries.clear(),this.updatePosition(),this.updateSelections(),this.gridLineGroup.visible=this.gridLine.enabled,this.updateLabels(),this.updateCrossLines()}getLabelStyles(e,i,s=this.label){const n={border:s.border,color:s.color,cornerRadius:s.cornerRadius,fill:s.fill,fillOpacity:s.fillOpacity,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight,padding:s.padding,spacing:s.spacing};let r;s.itemStyler&&(r=this.cachedCallWithContext(s.itemStyler,{...e,...n}));const a=(0,import_ag_charts_core117.mergeDefaults)(r,i,n);return{border:a.border,color:a.color,cornerRadius:a.cornerRadius,fill:a.fill,fillOpacity:a.fillOpacity,fontFamily:a.fontFamily,fontSize:a.fontSize,fontStyle:a.fontStyle,fontWeight:a.fontWeight,padding:a.padding,spacing:a.spacing}}getTickSize(e=this.tick){return e.enabled?e.size:0}getTickSpacing(e=this.tick){if(!e.enabled)return 0;const i=this.chartLayout?.scrollbars?.[this.id];return!i?.enabled||i.placement!=="inner"?0:i.tickSpacing??0}processData(){this.invalidateLayoutCache();const{includeInvisibleDomains:e,boundSeries:i,direction:s}=this,r=(e?i:i.filter(a=>a.isEnabled())).map(a=>a.getDomain(s));this.setDomains(...r)}getDomainExtentsNice(){return[this.nice,this.nice]}setDomains(...e){let i,s;if(e.length>0){const n=this.scale.normalizeDomains(...e);i={domain:n.domain,sortMetadata:{sortOrder:1}},s=n.animatable}else i={domain:[]},s=!0;this.dataDomain=this.normaliseDataDomain(i),this.allowNull=this.dataDomain.domain.some(function(n){return n==null}),this.reverse&&this.dataDomain.domain.reverse(),this.animatable=s}calculateDomain(e,i="none"){const{dataDomain:{domain:s},range:n,scale:r,gridLength:a}=this,o=(0,import_ag_charts_core117.findRangeExtent)(n),l=[0,1],c=this.getDomainExtentsNice();this.updateScale();const{unzoomedTickLayoutCache:h}=this;let u;if(h==null||!tickLayoutCacheValid(h,{domain:s,rangeExtent:o,nice:c,gridLength:a,visibleRange:l,initialPrimaryTickCount:e,scrollbarKey:i})){const d=r.range;this.setScaleRange([0,1]);const p=c.map(g=>g?0:2);u=this.calculateTickLayout(s,p,[0,1],e),r.range=d,this.unzoomedTickLayoutCache={domain:s,rangeExtent:o,nice:c,gridLength:a,visibleRange:l,initialPrimaryTickCount:e,scrollbarKey:i,tickLayout:u}}else u=h.tickLayout;return this.updateScale(),r.domain=u.niceDomain,{unzoomedTickLayout:u,domain:r.domain}}calculateLayout(e,i){this.chartLayout=i;const s=this.getScrollbarLayoutCacheKey(i),{visibleRange:n}=this,r=n[0]===0&&n[1]===1,{unzoomedTickLayout:a,domain:o}=this.calculateDomain(e,s),l=this.getDomainExtentsNice();let c;if(r)c=a;else{const{range:f,gridLength:y}=this,m=(0,import_ag_charts_core117.findRangeExtent)(f),b=l.map(x=>x?1:2),{tickLayoutCache:v}=this;v==null||!tickLayoutCacheValid(v,{domain:o,rangeExtent:m,nice:l,gridLength:y,visibleRange:n,initialPrimaryTickCount:e,scrollbarKey:s})?(c=this.calculateTickLayout(o,b,n,e),this.tickLayoutCache={domain:o,rangeExtent:m,nice:l,gridLength:y,visibleRange:n,initialPrimaryTickCount:e,scrollbarKey:s,tickLayout:c}):c=v.tickLayout}const{rawTickCount:h=0,fractionDigits:u,bbox:d}=c,p=a.rawTickCount??0,g=h!==0&&p!==0?{zoomed:h,unzoomed:p}:void 0;return this.tickLayout=c.layout,this.layout.label={fractionDigits:u,spacing:this.label.spacing,format:this.label.format},this.layoutCrossLines(),{primaryTickCount:g,bbox:d}}invalidateLayoutCache(){this.unzoomedTickLayoutCache=void 0,this.tickLayoutCache=void 0,this.tickLayout=void 0}getScrollbarLayoutCacheKey(e){const i=e?.scrollbars?.[this.id];return i?.enabled?`${i.placement}:${i.spacing}:${i.thickness}:${i.tickSpacing}`:"none"}updateCrossLines(){const e=this.hasDefinedDomain()||this.hasVisibleSeries();for(const i of this.crossLines)i.update(e)}updatePosition(){const{crossLineRangeGroup:e,crossLineLineGroup:i,crossLineLabelGroup:s,gridGroup:n,translation:r}=this,a=Math.floor(r.x),o=Math.floor(r.y);n.setProperties({translationX:a,translationY:o}),e.setProperties({translationX:a,translationY:o}),i.setProperties({translationX:a,translationY:o}),s.setProperties({translationX:a,translationY:o})}tickFormatter(e,i,s,n,r,a="long"){const{moduleCtx:o,label:l}=this,{formatManager:c}=o,h=s?this.primaryLabel:void 0,u=this.tickFormatParams(e,i,n,r),d=this.formatterBoundSeries.get();let p,g,f;if(u.type==="number")p=u.fractionDigits;else if(u.type==="date"){const{unit:I,step:D,epoch:T}=u;g={unit:I,step:D,epoch:T},f=u.truncateDate}const y=this.uncachedCallWithContext.bind(this),m={datum:void 0,seriesId:void 0,legendItemName:void 0,key:void 0,source:"axis-label",property:this.getFormatterProperty(),domain:e,boundSeries:d},b=h??l,v=s?l.format:void 0,{allowNull:x}=this,S={specifier:FormatManager.mergeSpecifiers(h?.format,l.format),truncateDate:f,allowNull:x};return(I,D)=>{const T=this.datumFormatParams(I,m,p,g,a);return T.value=I,b.formatValue(y,T,D,{specifier:v,dateStyle:a,truncateDate:f})??c.format(y,T,S)??c.defaultFormat(T,S)}}formatDatum(e,i,s,n,r,a,o,l,c,h,u){if(i==null&&!u)return"";const{moduleCtx:d,dataDomain:p}=this;l??(l=p.domain);const{formatManager:g}=d,f=this.formatterBoundSeries.get();let y;switch(s){case"crosshair":case"annotation-label":y=this.layout.label.fractionDigits+1;break;case"series-label":y=2;break;case"tooltip":y=3;break;case"legend-label":y=void 0;break}const m=this.datumFormatParams(i,{source:s,datum:a,seriesId:n,legendItemName:r,key:o,property:this.getFormatterProperty(),domain:l,boundSeries:f},y,void 0,"long"),{type:b,value:v}=m,x=this.createCallWithContext(e),S=c?.formatValue(x,b,v,h??m)??g.format(x,m,{allowNull:u})??this.label.formatValue(x,m,Number.NaN)??g.defaultFormat(m);return(0,import_ag_charts_core117.isArray)(S)?S:String(S)}getBBox(){return this.axisGroup.getBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}hasVisibleSeries(){return this.boundSeries.some(e=>e.isEnabled())}clipTickLines(e,i,s,n){this.tickLineGroup.setClipRect(new BBox(e,i,s,n))}clipGrid(e,i,s,n){this.gridGroup.setClipRect(new BBox(e,i,s,n))}getFormatterProperty(){const{direction:e,boundSeries:i}=this;let s=e;for(const n of i){const r=n.resolveKeyDirection(e);if(r!==e){s=r;break}}return s}getTitleFormatterParams(e){const{direction:i}=this,s=this.formatterBoundSeries.get();return{domain:e,direction:i,boundSeries:s,defaultValue:this.title?.text}}normaliseDataDomain(e){return{domain:[...e.domain],clipped:!1}}getLayoutTranslation(){return this.translation}getLayoutState(){return{id:this.id,rect:this.getBBox(),translation:this.getLayoutTranslation(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale,...this.layout}}getModuleMap(){return this.moduleMap}getUpdateTypeOnResize(){return import_ag_charts_core117.ChartUpdateType.PERFORM_LAYOUT}createModuleContext(){return this.axisContext??(this.axisContext=this.createAxisContext()),{...this.moduleCtx,parent:this.axisContext}}createAxisContext(){const{scale:e}=this;return{axisId:this.id,scale:this.scale,direction:this.direction,continuous:ContinuousScale.is(e)||DiscreteTimeScale.is(e),getCanvasBounds:()=>Transformable.toCanvas(this.axisGroup),seriesKeyProperties:()=>this.boundSeries.reduce((i,s)=>{const n=s.getKeyProperties(this.direction);for(const r of n)i.add(r);return i},new Set),seriesIds:()=>this.boundSeries.map(i=>i.id),scaleInvert:i=>e.invert(i,!0),scaleInvertNearest:i=>e.invert(i,!0),formatScaleValue:(i,s,n)=>{const{allowNull:r}=this;return this.formatDatum(void 0,i,s,void 0,void 0,void 0,void 0,void 0,n,void 0,r)},attachLabel:i=>this.attachLabel(i),inRange:(i,s)=>this.inRange(i,s),getRangeOverflow:i=>this.getRangeOverflow(i),pickBand:i=>this.pickBand(i),measureBand:i=>this.measureBand(i)}}pickBand(e){if(!BandScale.is(this.scale))return;const{scale:i,range:s,id:n}=this,r=i.invert(this.isVertical()?e.y:e.x,!0),[a,o,l]=computeBand(i,s,r);return{id:n,value:r,band:[o,l],position:a}}measureBand(e){if(!BandScale.is(this.scale))return;const[,i,s]=computeBand(this.scale,this.range,e);return{band:[i,s]}}isVertical(){return this.direction===import_ag_charts_core117.ChartAxisDirection.Y}isReversed(){return this.reverse}cachedCallWithContext(e,i){const{callbackCache:s,chartService:n}=this.moduleCtx;return s.call([this,n],e,i)}uncachedCallWithContext(e,i){const{chartService:s}=this.moduleCtx;return(0,import_ag_charts_core117.callWithContext)([this,s],e,i)}createCallWithContext(e){const{chartService:i}=this.moduleCtx;return(s,n)=>(0,import_ag_charts_core117.callWithContext)([e,this,i],s,n)}};_Axis.defaultTickMinSpacing=50,_Axis.CrossLineConstructor=CartesianCrossLine,__decorateClass([import_ag_charts_core117.Property],_Axis.prototype,"nice",2),__decorateClass([import_ag_charts_core117.Property],_Axis.prototype,"reverse",2),__decorateClass([import_ag_charts_core117.Property],_Axis.prototype,"interval",2),__decorateClass([import_ag_charts_core117.Property],_Axis.prototype,"title",2),__decorateClass([(0,import_ag_charts_core117.ObserveChanges)((t,e,i)=>t.onGridLengthChange(e,i))],_Axis.prototype,"gridLength",2);var Axis=_Axis,import_ag_charts_core118=require("ag-charts-core"),CartesianAxisLabel=class extends AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};__decorateClass([import_ag_charts_core118.Property],CartesianAxisLabel.prototype,"autoRotate",2),__decorateClass([import_ag_charts_core118.Property],CartesianAxisLabel.prototype,"autoRotateAngle",2);var import_ag_charts_core125=require("ag-charts-core"),import_ag_charts_core119=require("ag-charts-core"),CategoryScale=class we extends BandScale{constructor(){super(...arguments),this.type="category",this.defaultTickCount=0,this.index=new Map,this.indexInitialized=!1,this._domain=[]}static is(e){return e instanceof we}set domain(e){this._domain!==e&&(this.invalid=!0,this._domain=e,this.index.clear(),this.indexInitialized=!1)}get domain(){return this._domain}get bands(){return this._domain}normalizeDomains(...e){let i;const s=new Set;let n=!0;for(const r of e){const a=r.domain;s.has(a)||(s.add(a),i==null?i=deduplicateCategories(a):(n&&(n=domainOrderedToNormalizedDomain(a,i)),i=deduplicateCategories([...i,...a])))}return i??(i=[]),{domain:i,animatable:n}}toDomain(e){}invert(e,i=!1){this.refresh();const s=i?this.bandwidth/2:0,n=this.invertNearestIndex(Math.max(0,e-s));return i||e===this.ordinalRange(n)?this.domain[n]:void 0}ticks(e,i=this.domain,s){const{bands:n}=this;let{tickCount:r}=e;if(r===0){const f=n.length>1?1:0;return{ticks:n[f]?[n[f]]:[],count:void 0,firstTickIndex:f}}let a=r!=null&&r!==0?Math.trunc(n.length/r):1;if(a=(0,import_ag_charts_core119.previousPowerOf2)(a),a<=1)return filterVisibleTicks(i,!1,s);r=Math.trunc(n.length/a);const o=a*r,l=(0,import_ag_charts_core119.previousPowerOf2)(Math.trunc((n.length-o)/2)),c=(0,import_ag_charts_core119.clamp)(0,Math.floor((s?.[0]??0)*n.length),n.length),h=(0,import_ag_charts_core119.clamp)(0,Math.ceil((s?.[1]??1)*n.length),n.length),u=Math.floor((c-l)/a)*a+l,d=Math.ceil((h-l)/a)*a+l,p=[];for(let f=u;f<d;f+=a)f>=0&&f<n.length&&p.push(n[f]);let g=p.length>0?this.findIndex(p[0]):void 0;return g!=null&&(g=Math.floor((g-l)/a)),{ticks:p,count:void 0,firstTickIndex:g}}findIndex(e){const{index:i,indexInitialized:s}=this;if(!s){const{domain:n}=this;for(let r=0;r<n.length;r++)i.set((0,import_ag_charts_core119.dateToNumber)(n[r]),r);this.indexInitialized=!0}return i.get((0,import_ag_charts_core119.dateToNumber)(e))}};function deduplicateCategories(t){let e;const i=new Set;for(const s of t){const n=(0,import_ag_charts_core119.dateToNumber)(s),r=i.size;i.add(n),i.size!==r?e?.push(s):e??(e=t.slice(0,i.size))}return e??t}function domainOrderedToNormalizedDomain(t,e){let i=-1;for(const s of t){const n=e.indexOf(s);if(n===-1)i=1/0;else{if(n<=i)return!1;i=n}}return!0}var import_ag_charts_core121=require("ag-charts-core"),import_ag_charts_core120=require("ag-charts-core"),sunday=new Date(1970,0,4),TimeScale=class Pe extends ContinuousScale{constructor(){super([],[0,1]),this.type="time"}static is(e){return e instanceof Pe}toDomain(e){return new Date(e)}convert(e,i){return super.convert(typeof e=="number"?e:e?.valueOf()??Number.NaN,i)}invert(e){return new Date(super.invert(e))}niceDomain(e,i=this.domain){if(i.length<2)return[];let[s,n]=i;const r=4,a=this.getPixelRange();for(let o=0;o<r;o++){const[l,c]=updateNiceDomainIteration(s,n,e,a);if((0,import_ag_charts_core120.dateToNumber)(s)===(0,import_ag_charts_core120.dateToNumber)(l)&&(0,import_ag_charts_core120.dateToNumber)(n)===(0,import_ag_charts_core120.dateToNumber)(c))break;s=l,n=c}return[s,n]}ticks(e,i=this.domain,s=[0,1],{extend:n=!1}={}){const{nice:r,interval:a,tickCount:o=ContinuousScale.defaultTickCount,minTickCount:l,maxTickCount:c}=e;if(i.length<2)return;const h=i.map(import_ag_charts_core120.dateToNumber),u=h[0],d=h.at(-1);if(a!=null){const y=this.getPixelRange();return{ticks:getDateTicksForInterval({start:u,stop:d,interval:a,availableRange:y,visibleRange:s,extend:n})??getDefaultDateTicks({start:u,stop:d,tickCount:o,minTickCount:l,maxTickCount:c,visibleRange:s,extend:n}),count:void 0}}else{if(r.every(Boolean)&&o===2)return{ticks:i,count:void 0};if(r.every(Boolean)&&o===1)return{ticks:i.slice(0,1),count:void 0}}const p=(0,import_ag_charts_core120.getTickTimeInterval)(u,d,o,l,c,{weekStart:sunday});if(p==null)return;const g=(0,import_ag_charts_core120.intervalRange)(p,new Date(u),new Date(d),{visibleRange:s,extend:n}),f=(0,import_ag_charts_core120.intervalRangeStartIndex)(p,new Date(u),new Date(d),{visibleRange:s,extend:n});return{ticks:g,count:void 0,firstTickIndex:f,timeInterval:p}}};function getDefaultDateTicks({start:t,stop:e,tickCount:i,minTickCount:s,maxTickCount:n,visibleRange:r,extend:a}){const o=(0,import_ag_charts_core120.getTickTimeInterval)(t,e,i,s,n,{weekStart:sunday});return o?(0,import_ag_charts_core120.intervalRange)(o,new Date(t),new Date(e),{visibleRange:r,extend:a}):[]}function getDateTicksForInterval({start:t,stop:e,interval:i,availableRange:s,visibleRange:n,extend:r}){if(!i)return[];if((0,import_ag_charts_core120.isPlainObject)(i)||typeof i=="string"){const u=(0,import_ag_charts_core120.intervalRange)(i,new Date(t),new Date(e),{visibleRange:n,extend:r});return(0,import_ag_charts_core120.isDenseInterval)(u.length,s)?void 0:u}const a=Math.abs(i);if((0,import_ag_charts_core120.isDenseInterval)(Math.abs(e-t)/a,s))return;const o=import_ag_charts_core120.TickIntervals.findLast(u=>a%u.duration===0);if(o){const{timeInterval:u,step:d,duration:p}=o,g={...u,step:d*(0,import_ag_charts_core120.intervalStep)(u)*Math.round(a/p),epoch:(0,import_ag_charts_core120.defaultEpoch)(u,{weekStart:sunday})};return(0,import_ag_charts_core120.intervalRange)(g,new Date(t),new Date(e),{visibleRange:n,extend:r})}let l=new Date(Math.min(t,e));const c=new Date(Math.max(t,e)),h=[];for(;l<=c;)h.push(l),l=new Date(l),l.setMilliseconds(l.getMilliseconds()+a);return h}function updateNiceDomainIteration(t,e,i,s){const{interval:n}=i,r=Math.min((0,import_ag_charts_core120.dateToNumber)(t),(0,import_ag_charts_core120.dateToNumber)(e)),a=Math.max((0,import_ag_charts_core120.dateToNumber)(t),(0,import_ag_charts_core120.dateToNumber)(e));let o;if((0,import_ag_charts_core120.isPlainObject)(n)||typeof n=="string")o=n;else{let u;typeof n=="number"&&(u=(a-r)/Math.max(n,1),(0,import_ag_charts_core120.isDenseInterval)(u,s)&&(u=void 0)),u??(u=i.tickCount??ContinuousScale.defaultTickCount),o=(0,import_ag_charts_core120.getTickTimeInterval)(r,a,u,i.minTickCount,i.maxTickCount,{weekStart:sunday})}if(o==null)return[t,e];const l=(0,import_ag_charts_core120.intervalRange)(o,new Date(r),new Date(a),{extend:!0});if(l==null||l.length<2)return[t,e];const c=l[0],h=l.at(-1);return t<=e?[c,h]:[h,c]}var APPROXIMATE_THRESHOLD2=1e3,OrdinalTimeScale=class Ee extends DiscreteTimeScale{constructor(){super(...arguments),this.type="ordinal-time",this.defaultTickCount=ContinuousScale.defaultTickCount,this._domain=[],this.isReversed=!1}static is(e){return e instanceof Ee}set domain(e){e!==this._domain&&(this.invalid=!0,this._domain=e,this._bands=void 0,this._numericBands=void 0,this._uniformityCache=void 0,this.isReversed=domainReversed(e))}get domain(){return this._domain}get bands(){return this._bands??(this._bands=this.isReversed?this.domain.slice().reverse():this.domain),this._bands}get numericBands(){return this._numericBands??(this._numericBands=this.bands.map(e=>e.valueOf())),this._numericBands}getUniformityCache(e){const{bands:i}=this,s=i.length;if(!e||e[0]===0&&e[1]===1)return s>APPROXIMATE_THRESHOLD2&&this._uniformityCache===void 0&&(this._uniformityCache=checkUniformityBySampling(i)),this._uniformityCache;const n=Math.floor(e[0]*s),r=Math.min(Math.ceil(e[1]*s),s-1);return checkUniformityBySampling(i,n,r)}normalizeDomains(...e){const i=e.filter(r=>r.domain.length>0);if(i.length===0)return{domain:[],animatable:!1};const s=i[0].domain,n=i.every(r=>r.domain===s);if(i.length===1||n){const r=i[0];let a=r.domain,o,l=!1;return r.sortMetadata?.sortOrder===void 0?o=(0,import_ag_charts_core121.datesSortOrder)(a):(o=r.sortMetadata.sortOrder,l=r.sortMetadata.isUnique??!1),o===-1?a=a.slice().reverse():o==null&&(a=l?a.slice().sort((c,h)=>c.valueOf()-h.valueOf()):(0,import_ag_charts_core121.sortAndUniqueDates)(a.slice())),{domain:a,animatable:!0}}return{domain:(0,import_ag_charts_core121.sortAndUniqueDates)(i.map(r=>r.domain).flat()),animatable:!0}}ticks(e,i,s=[0,1],{extend:n=!1,dropInitial:r=!1}={}){const{interval:a,maxTickCount:o,tickCount:l=o}=e,{bands:c,reversed:h}=this;if(!c.length)return;if(h&&(s=[1-s[1],1-s[0]]),this.refresh(),a==null){const{ticks:v,tickOffset:x,tickEvery:S}=this.getDefaultTicks(i,l,s,n);let I=v.length>0?this.findIndex(v[0]):void 0;return I=I==null?void 0:Math.floor((I-x)/S),{ticks:v,count:void 0,firstTickIndex:I}}let u,d;i&&i.length>=2?(u=i[0].valueOf(),d=i.at(-1).valueOf()):(u=c[0].valueOf(),d=c.at(-1).valueOf());const[p,g]=this.range,f=Math.abs(g-p),y=getDateTicksForInterval({start:u,stop:d,interval:a,availableRange:f,visibleRange:s,extend:n})??this.getDefaultTicks(i,l,s,n).ticks,m=[];let b=-1;for(const v of y){const x=this.findIndex(v,import_ag_charts_core121.ScaleAlignment.Trailing)??-1,S=x===b;b=x,!(r&&x===0)&&x!==-1&&!S&&m.push(c[x])}return{ticks:m,count:void 0,firstTickIndex:void 0}}stepTicks(e,i,s=[0,1],n=!0){const r=i?this.bandDomainIndices(i):void 0,a=this.ticksEvery(r,s,e,0,!1),o=a.at(-1),l=n&&e>1?r?.[1]:void 0,c=l!=null&&o!=null?this.findIndex(o):void 0;return c!=null&&l!=null&&l-c<e&&a.pop(),a}bandCount(e=[0,1]){const{domain:i}=this,s=Math.floor(e[0]*i.length);return Math.ceil(e[1]*i.length)-s}getDefaultTicks(e,i,s,n){const{bands:r}=this,a=Math.ceil(r.length/i),o=Math.floor(a/2),l=e?this.bandDomainIndices(e):void 0;return{ticks:this.ticksEvery(l,s,a,o,n),tickOffset:o,tickEvery:a}}bandDomainIndices(e){const i=domainReversed(e),s=this.findIndex(e[i?e.length-1:0],import_ag_charts_core121.ScaleAlignment.Trailing)??0,n=this.findIndex(e[i?0:e.length-1],import_ag_charts_core121.ScaleAlignment.Trailing)??this.bands.length-1;return[s,n]}ticksEvery([e,i]=[0,this.bands.length],s,n,r,a){const{bands:o}=this,l=e,c=i-e+1;let h=l+Math.floor(s[0]*c),u=l+Math.ceil(s[1]*c);a&&(h-=n,u+=n),h=Math.max(h,0),u=Math.min(u,o.length);let d;if(n<=1)d=o.slice(h,u);else{d=[];for(let p=h;p<u;p+=1)(p-l+r)%n===0&&d.push(o[p])}return d}};function domainReversed(t){return t.length>0&&t[0]>t.at(-1)}var import_ag_charts_core122=require("ag-charts-core"),APPROXIMATE_THRESHOLD3=1e3,MAX_BANDS=5e7,UnitTimeScale=class Re extends DiscreteTimeScale{constructor(){super(...arguments),this.type="unit-time",this.defaultTickCount=12,this._domain=[],this._bands=void 0}static is(e){return e instanceof Re}static supportsInterval(e,i){return supportsInterval(e,i)}set domain(e){e!==this._domain&&(this._domain=e,this._bands=void 0,this._numericBands=void 0,this._uniformityCache=void 0,this._domainBoundaries=void 0,this._bandRangeCache=void 0,this._encodedBands=void 0,this._encodingParams=void 0,this._linearParams=void 0)}get domain(){return this._domain}get interval(){return this._interval}set interval(e){this._interval!==e&&(this._interval=e,this._bands=void 0,this._numericBands=void 0,this._uniformityCache=void 0,this._domainBoundaries=void 0,this._bandRangeCache=void 0,this._encodedBands=void 0,this._encodingParams=void 0,this._linearParams=void 0)}get bands(){if(this._bands===void 0)if(this.ensureEncodedBands(),this._encodedBands!=null&&this._encodingParams!=null){const e=this._encodingParams;this._bands=this._encodedBands.map(i=>(0,import_ag_charts_core122.decodeIntervalValue)(i,e))}else this._bands=[];return this._bands}get numericBands(){if(this._numericBands===void 0)if(this.ensureEncodedBands(),this._encodedBands!=null&&this._encodingParams!=null){const e=this._encodingParams;this._numericBands=this._encodedBands.map(i=>(0,import_ag_charts_core122.encodedToTimestamp)(i,e))}else this._numericBands=[];return this._numericBands}ensureEncodedBands(){if(this._encodedBands!==void 0)return;const{domain:e,interval:i}=this;if(e.length<2||i==null){this._encodedBands=[];return}const s=this.getCachedBandRange();if(s==null){this._encodedBands=[];return}const[n,r]=s,a={visibleRange:[0,1],extend:!1};if((0,import_ag_charts_core122.intervalRangeCount)(i,n,r,a)>MAX_BANDS){import_ag_charts_core122.Logger.warnOnce("the configured unit results in too many bands, ignoring. Supply a larger unit."),this._encodedBands=[];return}const{encodedValues:o,encodingParams:l}=(0,import_ag_charts_core122.intervalRangeNumeric)(i,n,r,a);this._encodedBands=o,this._encodingParams=l}getBandCountForUpdate(){return this.ensureEncodedBands(),this._encodedBands?.length??0}getUniformityCache(e){const i=this.getBandCountForUpdate();if(!e||e[0]===0&&e[1]===1){if(i>APPROXIMATE_THRESHOLD3&&this._uniformityCache===void 0)if(this.ensureEncodedBands(),this._encodingParams!=null&&this._encodedBands!=null&&this._encodedBands.length>=2){const s=(0,import_ag_charts_core122.encodedToTimestamp)(this._encodedBands[0],this._encodingParams),n=(0,import_ag_charts_core122.encodedToTimestamp)(this._encodedBands[1],this._encodingParams);this._uniformityCache={isUniform:!0,interval:n-s}}else this._uniformityCache={isUniform:!1};return this._uniformityCache}if(this.ensureEncodedBands(),this._encodingParams!=null&&this._encodedBands!=null&&this._encodedBands.length>=2){const s=(0,import_ag_charts_core122.encodedToTimestamp)(this._encodedBands[0],this._encodingParams);return{isUniform:!0,interval:(0,import_ag_charts_core122.encodedToTimestamp)(this._encodedBands[1],this._encodingParams)-s}}return{isUniform:!1}}normalizeDomains(...e){return normalizeContinuousDomains(...e)}getCachedBandRange(){const{domain:e,interval:i}=this;if(!(e.length<2||i==null))return this._bandRangeCache??(this._bandRangeCache={start:(0,import_ag_charts_core122.intervalFloor)(i,e[0]),stop:(0,import_ag_charts_core122.intervalFloor)(i,e[1])}),[this._bandRangeCache.start,this._bandRangeCache.stop]}getDomainBoundaries(){const{interval:e}=this;if(e!=null){if(this._domainBoundaries===void 0){const i=this.getCachedBandRange();if(i==null)return;const[s,n]=i,r=Math.min(s.valueOf(),n.valueOf()),a=Math.max(s.valueOf(),n.valueOf()),o=(0,import_ag_charts_core122.intervalNext)(e,new Date(a)).valueOf();this._domainBoundaries={d0:r,dNext:o}}return this._domainBoundaries}}getLinearParams(){if(this._linearParams===void 0&&(this.ensureEncodedBands(),this._encodedBands!=null&&this._encodingParams!=null&&this._encodedBands.length>=2)){const e=(0,import_ag_charts_core122.encodedToTimestamp)(this._encodedBands[0],this._encodingParams),i=(0,import_ag_charts_core122.encodedToTimestamp)(this._encodedBands[1],this._encodingParams);this._linearParams={firstBandTime:e,intervalMs:i-e}}return this._linearParams}isLinearUnit(){const e=this._encodingParams?.unit;return e==="millisecond"||e==="second"||e==="minute"||e==="hour"}findIndex(e,i=import_ag_charts_core122.ScaleAlignment.Leading){if(e==null)return;const s=this.getBandCountForUpdate();if(s===0)return;if(s===1)return 0;const n=this.getLinearParams();if(n==null||n.intervalMs===0)return super.findIndex(e,i);const{firstBandTime:r,intervalMs:a}=n,o=e.valueOf(),l=(o-r)/a;let c=i===import_ag_charts_core122.ScaleAlignment.Trailing?Math.ceil(l):Math.floor(l);if(c=Math.max(0,Math.min(c,s-1)),this.isLinearUnit()){if(i===import_ag_charts_core122.ScaleAlignment.Trailing){if(r+c*a<o&&c===s-1)return}else if(r+c*a>o&&c===0)return;return c}const h=this.numericBands;if(i===import_ag_charts_core122.ScaleAlignment.Trailing){for(;c>0&&h[c-1]>=o;)c--;for(;c<s-1&&h[c]<o;)c++;if(h[c]<o)return}else{for(;c<s-1&&h[c+1]<=o;)c++;for(;c>0&&h[c]>o;)c--;if(h[c]>o)return}return c}convert(e,i){this.refresh(),e instanceof Date||(e=new Date(e));const{domain:s,interval:n}=this;if(s.length<2)return Number.NaN;if(i?.clamp!==!0&&n!=null){const r=this.getDomainBoundaries();if(r!=null){const a=e.valueOf();if(a<r.d0||a>=r.dNext)return Number.NaN}}return super.convert(e,i)}calculateBands(e,i,s=!1){if(e===this.domain&&i[0]===0&&i[1]===1&&!s&&this._bands!=null)return{bands:this._bands,firstBandIndex:0};if(e.length<2)return{bands:[],firstBandIndex:void 0};const{interval:n}=this;if(n==null)return{bands:[],firstBandIndex:void 0};const r={visibleRange:i,extend:s};if(!supportsInterval(e,n,r))return{bands:[],firstBandIndex:void 0};const a=e===this.domain?this.getCachedBandRange():calculateBandRange(e,n);if(a==null)return{bands:[],firstBandIndex:void 0};const[o,l]=a;if((0,import_ag_charts_core122.intervalRangeCount)(n,o,l,r)>MAX_BANDS)return import_ag_charts_core122.Logger.warnOnce("the configured unit results in too many bands, ignoring. Supply a larger unit."),{bands:[],firstBandIndex:void 0};const c=(0,import_ag_charts_core122.intervalRange)(n,o,l,r),h=(0,import_ag_charts_core122.intervalRangeStartIndex)(n,o,l,r);return{bands:c,firstBandIndex:h}}ticks({interval:e},i=this.domain,s=[0,1],{extend:n=!1}={}){if(i.length<2)return;let r,a,o;if(i===this.domain&&!n?({bands:r}=this.calculateBands(i,[0,1],!1),o=visibleTickSliceIndices(r,!1,s),a=o[0]):{bands:r,firstBandIndex:a}=this.calculateBands(i,s,n),e==null)return{ticks:r,count:void 0,firstTickIndex:a};const l=this.interval?(0,import_ag_charts_core122.intervalMilliseconds)(this.interval):1/0,c=Math.min(i[0].valueOf(),i[1].valueOf()),h=Math.max(i[0].valueOf(),i[1].valueOf());let u,d,p;if((0,import_ag_charts_core122.isPlainObject)(e)||typeof e=="string")u=(0,import_ag_charts_core122.intervalRange)(e,i[0],i[1],{extend:!0,visibleRange:s}),d=0,p=u.length-1;else{const x=o?o[0]:0,S=o?o[1]:r.length-1;u=r,d=(0,import_ag_charts_core122.findMaxIndex)(x,S,I=>r[I].valueOf()<=c)??x,p=(0,import_ag_charts_core122.findMaxIndex)(x,S,I=>r[I].valueOf()<=h)??S}const g=[];let f;for(let x=d;x<=p;x++){const S=u[x].valueOf(),I=(0,import_ag_charts_core122.findMaxIndex)(0,r.length-1,T=>r[T].valueOf()<=S),D=I!=null&&I!=f?r[I]:void 0;f=I,D!=null&&S-D.getTime()<=l&&g.push(D)}let y,m;if(this.interval){const x=calculateBandRange([new Date(c),new Date(h)],this.interval);y=x[0].valueOf(),m=x[1].valueOf()}else y=c,m=h;let b=(0,import_ag_charts_core122.findMinIndex)(0,g.length-1,x=>g[x].valueOf()>=y)??0,v=(0,import_ag_charts_core122.findMaxIndex)(0,g.length-1,x=>g[x].valueOf()<=m)??g.length-1;return n&&(b=Math.max(b-1,0),v=Math.min(v+1,g.length-1)),{ticks:g.slice(b,v+1),count:g.length,firstTickIndex:a}}};function supportsInterval(t,e,i){const[s,n]=calculateBandRange(t,e);return(0,import_ag_charts_core122.intervalRangeCount)(e,s,n,i)<=MAX_BANDS}function calculateBandRange(t,e){const i=(0,import_ag_charts_core122.intervalFloor)(e,t[0]),s=(0,import_ag_charts_core122.intervalFloor)(e,t[1]);return[i,s]}var import_ag_charts_core123=require("ag-charts-core");function calculateNiceSecondaryAxis(t,e,i,s,n){let[r,a]=(0,import_ag_charts_core123.findMinMax)(e.map(Number));const o=Math.floor(i.unzoomed);if(o<=1){const[m,b]=domainWithOddTickCount(r,a),v=5*Math.pow(2,-Math.ceil(Math.log2(n[1]-n[0]))),{ticks:x}=(0,import_ag_charts_core123.createTicks)(m,b,v,void 0,void 0,n),S=[t.toDomain(m),t.toDomain(b)];return s&&S.reverse(),{domain:S,ticks:x}}if(r===a){const m=Math.floor(Math.log10(r)),b=Math.pow(10,m),v=Math.min(b,1),x=o-1;r-=v*Math.floor(x/2),a=r+v*x}let l=r,c=a;l=calculateNiceStart(l,c,o);const h=getTickStep(l,c,o),u=o-1;c=l+u*h;const d=Math.floor(l/h)*h,p=Math.floor(c/h)*h;d<=r&&p>=a&&(l=d,c=p);const g=[t.toDomain(l),t.toDomain(c)];s&&g.reverse();const f=h*((i.unzoomed-1)/(i.zoomed-1)),y=getTicks(l,f,Math.floor(i.zoomed));return{domain:g,ticks:y}}function domainWithOddTickCount(t,e){let i=t,s=e,n=0;do{[i,s]=(0,import_ag_charts_core123.niceTicksDomain)(i,s);const{ticks:r}=(0,import_ag_charts_core123.createTicks)(i,s,5);if(r.length%2===1)return[i,s];i-=1,s+=1}while(n++<10);return[t,e]}function calculateNiceStart(t,e,i){t=Math.floor(t);const s=Math.abs(e-t)/(i-1),n=Math.floor(Math.log10(s)),r=Math.pow(10,n);return Math.floor(t/r)*r}function getTicks(t,e,i){const s=(0,import_ag_charts_core123.countFractionDigits)(e),n=Math.pow(10,s),r=[];for(let a=0;a<i;a++){const o=t+e*a;r.push(Math.round(o*n)/n)}return r}function getTickStep(t,e,i){const s=i-1,n=(e-t)/s;return calculateNextNiceStep(n)}function calculateNextNiceStep(t){const e=Math.floor(Math.log10(t)),i=Math.pow(10,e),s=t/i;return s>0&&s<=1?i:s>1&&s<=2?2*i:s>2&&s<=5?5*i:s>5&&s<=10?10*i:t}var import_ag_charts_core124=require("ag-charts-core"),DENSE_TICK_COUNT=18,TICK_STEP_VALUES=[1,2,3,4,6,8,9,10,12];function axisLabelsOverlap(t,e=0){const i=[];for(const s of t){const{x:n,y:r,width:a,height:o}=s;if(i.some(l=>(0,import_ag_charts_core124.boxCollides)(l,n,r,a+e,o+e)))return!0;i.push(s)}return!1}function createTimeScaleTicks(t,e,i,s){if(t==null)return e;if(typeof t!="number"){const o=e[0],l=typeof t=="string"?{unit:t,epoch:o}:{...t,epoch:o};return(0,import_ag_charts_core124.intervalRange)(l,e[0],e[1],{visibleRange:i,extend:s})}const n=[],r=e[0].valueOf(),a=e[1].valueOf();for(let o=r;o<=a;o+=t)n.push(new Date(o));return n}function ticksEqual(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i+=1)if(t[i]?.valueOf()!==e[i]?.valueOf())return!1;return!0}function ticksSpacing(t){if(t.length<2)return 1/0;let e=0,i=t[0].translation;for(let s=1;s<t.length;s++){const n=t[s].translation,r=Math.abs(n-i);e=Math.max(e,r),i=n}return e}function formatTicks(t,{niceDomain:e,rawTicks:i,rawFirstTickIndex:s=0,generatePrimaryTicks:n,primaryTicksIndices:r,alignment:a,fractionDigits:o,timeInterval:l}){const{scale:c,label:h,tickFormatter:u,inRange:d,isVertical:p,sizeLimit:g=1/0}=t,f=TimeScale.is(c)||DiscreteTimeScale.is(c),y=(0,import_ag_charts_core124.cachedTextMeasurer)(h),m=(0,import_ag_charts_core124.createIdsGenerator)(),b=[];return withTemporaryDomain(c,e,()=>{const v=BandScale.is(c)?c.bandwidth??1/0:1/0,x=(c.bandwidth??0)/2,S=axisTickFormatter(h.enabled,n,e,i,o,l,u);let I=p?g:v,D=p?v:g;if(h.rotation){const A=(0,import_ag_charts_core124.getMaxInnerRectSize)(h.rotation,I,D);I=A.width,D=A.height}const T={font:h,maxWidth:I,maxHeight:D,overflow:h.truncate?"ellipsis":"hide",textWrap:h.wrapping};for(let A=0;A<i.length;A++){const L=i[A],N=c.convert(L,{alignment:a})+x;if(d&&!d(N))continue;const k=r?.has(A)??!1,w=S(k,L,A);let E=null;h.avoidCollisions&&(E=(0,import_ag_charts_core124.wrapTextOrSegments)(w,T)||null);const O=E??w,R=(0,import_ag_charts_core124.isArray)(O),_=O!==w&&(R?(0,import_ag_charts_core124.isSegmentTruncated)(O.at(-1)):(0,import_ag_charts_core124.isTextTruncated)((0,import_ag_charts_core124.toTextString)(O)));let P;if(f){const F=L?.valueOf();Number.isFinite(F)&&(P=m(`v:${F}`))}P??(P=m(`l:${R?(0,import_ag_charts_core124.toPlainText)(O.flat()):O}`)),b.push({tick:L,tickId:P,tickLabel:O,isPrimary:k,index:A+s,textUntruncated:_?(0,import_ag_charts_core124.toPlainText)(w):void 0,textMetrics:R?(0,import_ag_charts_core124.measureTextSegments)(O,h):y.measureLines((0,import_ag_charts_core124.toTextString)(O)),translation:Math.floor(N)})}}),b}function withTemporaryDomain(t,e,i){const s=t.domain;try{t.domain=e,i()}finally{t.domain=s}}function axisTickFormatter(t,e,i,s,n,r,a){const o=e?"component":"long",l=e&&r?(0,import_ag_charts_core124.intervalHierarchy)(r):void 0,c=e?a(i,s,!0,n,l,o):null,h=t?a(i,s,!1,n,r,o):null;return(u,d,p)=>(u?c:h)?.(d,p)??String(d)}function getTimeIntervalTicks(t,e,i,s,n,r,a,o){if(!TimeScale.is(t)&&!DiscreteTimeScale.is(t))return;const l=(0,import_ag_charts_core124.intervalHierarchy)(r);if(l==null)return;a&&(e=[1-e[1],1-e[0]]);const c=Math.min(t.domain[0].valueOf(),t.domain.at(-1).valueOf()),h=Math.max(t.domain[0].valueOf(),t.domain.at(-1).valueOf());let[u,d]=(0,import_ag_charts_core124.intervalExtent)(new Date(c),new Date(h),e);u=(0,import_ag_charts_core124.intervalFloor)(l,u),u.valueOf()>=c&&(u=(0,import_ag_charts_core124.intervalPrevious)(l,u)),d=(0,import_ag_charts_core124.intervalCeil)(l,d),d.valueOf()<=h&&(d=(0,import_ag_charts_core124.intervalNext)(l,d));const p=(0,import_ag_charts_core124.intervalRange)(l,u,d),g=(0,import_ag_charts_core124.intervalMilliseconds)(r),f=OrdinalTimeScale.is(t),y={...n,interval:r},m=[];let b,v,x,S=0;if(OrdinalTimeScale.is(t)){const I=(0,import_ag_charts_core124.intervalUnit)(r);v=o!=null&&(0,import_ag_charts_core124.intervalMilliseconds)(o)>=(0,import_ag_charts_core124.intervalMilliseconds)(I)?2:3,x=import_ag_charts_core124.ScaleAlignment.Trailing;const D=i/s,T=t.bandCount(e)/(D*DENSE_TICK_COUNT);S=TICK_STEP_VALUES.findLast(A=>T>=A)??1}else UnitTimeScale.is(t)&&(t.interval==null||(0,import_ag_charts_core124.intervalMilliseconds)(t.interval)>=g)?v=1:(v=0,x=import_ag_charts_core124.ScaleAlignment.Interpolate);for(let I=0;I<p.length-1;I++){const D=p[I],T=p[I+1],A=I===0,L=I===p.length-2,N=T.valueOf()-D.valueOf(),k=[Math.max((c-D.valueOf())/N,0),Math.min((h-D.valueOf())/N,1)];let w;switch(v){case 0:w=createTimeScaleTicks(y.interval,[D,T],k,!0);break;case 1:case 3:{w=t.ticks(y,[D,T],k,{extend:!0,dropInitial:!0})?.ticks??[];break}case 2:w=t.stepTicks(S,[D,T],void 0,!L);break}if((0,import_ag_charts_core124.dropFirstWhile)(w,_=>_.valueOf()<D.valueOf()),L||(0,import_ag_charts_core124.dropLastWhile)(w,_=>{switch(v){case 0:case 3:return _.valueOf()+g>T.valueOf();case 1:case 2:return _.valueOf()>=T.valueOf()}}),w.length===0)continue;const E=w[0],O=(0,import_ag_charts_core124.compareDates)(E,D);(v===0?O===0:O<=g)&&(!f||!A)&&(b??(b=new Set),b.add(m.length)),m.push(...w)}return b?.size===1&&b.has(0)&&(b=void 0),{ticks:m,primaryTicksIndices:b,alignment:x}}function timeIntervalMaxLabelSize(t,e,i,s,n){const r=labelSpecifier(t.format,s);if(r==null)return{width:0,height:0};const a=(0,import_ag_charts_core124.buildDateFormatter)(r),o=s?(0,import_ag_charts_core124.intervalHierarchy)(s):void 0,l=labelSpecifier(e?.format,o),c=l?(0,import_ag_charts_core124.buildDateFormatter)(l):a,h=new Date(i[0]),u=new Date(i.at(-1)),d=o?(0,import_ag_charts_core124.intervalRange)(o,new Date(i[0]),new Date(i.at(-1)),{extend:!0}):void 0;let p=0,g=0;if(a!=null){const f=expandLabelPadding(t),y=f.left+f.right,m=f.top+f.bottom;let b,v;d!=null&&d.length>1?(b=d[0],v=d[1]):(b=h,v=u);const x=(0,import_ag_charts_core124.intervalRange)(s,b,v,{limit:50});for(const S of x){const I=a(S),{width:D,height:T}=n.measureLines(I);p=Math.max(p,D+y),g=Math.max(g,T+m)}}if(c!=null&&d!=null){const f=expandLabelPadding(e),y=f.left+f.right,m=f.top+f.bottom;for(const b of d){const v=c(b),{width:x,height:S}=n.measureLines(v);p=Math.max(p,x+y),g=Math.max(g,S+m)}}return{width:Math.ceil(p),height:Math.ceil(g)}}function getTextBaseline(t,e,i,s){return t&&!e?i*s===-1?"top":"bottom":"middle"}function getTextAlign(t,e,i,s,n){const r=e>0&&e<=Math.PI,a=i>0&&i<=Math.PI,o=r||a?-1:1;if(t)if(e||i){if(s*o===-1)return"end"}else return"center";else if(s*n===-1)return"end";return"start"}function labelSpecifier(t,e){if(t!=null){if(typeof t=="string")return t;if((0,import_ag_charts_core124.isPlainObject)(t)&&e!=null)return t[(0,import_ag_charts_core124.intervalUnit)(e)]}}function calculateLabelRotation(t,e,i=0){const s=(0,import_ag_charts_core124.normalizeAngle360FromDegrees)(t),n=!s&&i>=0&&i<=Math.PI?-1:1,r=!s&&i-Math.PI/2>=0&&i-Math.PI/2<=Math.PI?-1:1,a=e?n*(Math.PI/2):0;return{configuredRotation:s,defaultRotation:a,parallelFlipFlag:n,regularFlipFlag:r}}var sunday2=new Date(1970,0,4);function generateTicks(t){const{label:e,domain:i,axisRotation:s,labelOffset:n,sideFlag:r}=t,{defaultRotation:a,configuredRotation:o,parallelFlipFlag:l,regularFlipFlag:c}=calculateLabelRotation(e.rotation,e.parallel,s),h=o+a,u=(T,A=0)=>{const L=e.minSpacing??(o===0&&A===0?10:0),N=h+A,k=expandLabelPadding(e);return axisLabelsOverlap(createTimeLabelData(t,T,N),L)||axisLabelsOverlap(createLabelData(T.ticks,n,N,k),L)},{maxTickCount:d}=estimateScaleTickCount(t),p=getTickGenerationType(t),g=e.enabled&&e.avoidCollisions,f=Number.isFinite(d)?d:10,y=g&&e.autoRotate&&e.rotation==null;let m=0,b=0,v=!0,x={tickDomain:[],niceDomain:i,ticks:[],rawTicks:[],rawTickCount:void 0,timeInterval:void 0,fractionDigits:0};for(;v&&m<=f;)({tickData:x,index:m}=buildTickData(t,p,x,m)),b=y&&u(x,0)?(0,import_ag_charts_core125.normalizeAngle360FromDegrees)(e.autoRotateAngle):0,v=g&&u(x,b);const S=getTextAlign(e.parallel,o,b,r,c),I=getTextBaseline(e.parallel,o,r,l),D=o+b;return{tickData:x,textAlign:S,textBaseline:I,rotation:D}}function getTickGenerationType(t){return t.interval?.values?2:t.primaryTickCount!=null?1:0}function estimateScaleTickCount({scale:t,domain:e,range:i,visibleRange:s,label:n,defaultTickMinSpacing:r,interval:{minSpacing:a,maxSpacing:o}}){const{defaultTickCount:l}=t,c=(0,import_ag_charts_core125.findRangeExtent)(i),h=(0,import_ag_charts_core125.findRangeExtent)(s);if(CategoryScale.is(t)||OrdinalTimeScale.is(t)&&e.length<1e3){const u=CategoryScale.is(t)?e.length:Math.min(e.length,Math.max(1,Math.floor(c/(h*r)))),d=Math.ceil(c/(h*n.fontSize));return{tickCount:Math.min(d,u),minTickCount:0,maxTickCount:u}}return(0,import_ag_charts_core125.estimateTickCount)(c,h,a,o,l,r)}function buildTickData(t,e,i,s){const{step:n,values:r}=t.interval,{maxTickCount:a,minTickCount:o,tickCount:l}=estimateScaleTickCount(t),c=A=>Math.max(l-A,o),h=n==null&&r==null&&c(s)>o,u=i.rawTicks,d=l-o,p={minTickCount:o,maxTickCount:a,tickCount:c(s)};let g=calculateRawTicks(t,e,p);if(h&&ticksEqual(g.rawTicks,u)){let A=s,L=d;for(;A<=L;){s=Math.trunc((A+L)/2),p.tickCount=c(s);const N=calculateRawTicks(t,e,p);ticksEqual(N.rawTicks,u)?A=s+1:(g=N,L=s-1)}}const{tickDomain:f,niceDomain:y,rawTicks:m,rawTickCount:b,rawFirstTickIndex:v,generatePrimaryTicks:x,primaryTicksIndices:S,alignment:I,fractionDigits:D,timeInterval:T}=g;return{tickData:{tickDomain:f,niceDomain:y,rawTicks:m,rawTickCount:b,fractionDigits:D,timeInterval:T,ticks:formatTicks(t,{niceDomain:y,rawTicks:m,rawFirstTickIndex:v,generatePrimaryTicks:x,primaryTicksIndices:S,alignment:I,fractionDigits:D,timeInterval:T})},index:s+1}}function calculateRawTicks(t,e,i){const{domain:s,reverse:n,visibleRange:r,scale:a,interval:o,primaryLabel:l,niceMode:c,primaryTickCount:h,minimumTimeGranularity:u}=t,d={nice:c.map(A=>A===0),interval:o.step,...i},p={...d,nice:c.map(A=>A===0||A===1)};let g;e===1&&h!=null&&ContinuousScale.is(a)&&(g=calculateNiceSecondaryAxis(a,s,h,n,r));const f=c.includes(0)?g?.domain??a.niceDomain(d,s):s;let y=f,m,b,v,x,S,I;const D=l?.enabled===!0&&p.interval==null;withTemporaryDomain(a,f,()=>{switch(e){case 2:if(y=o.values,m=o.values,b=m.length,OrdinalTimeScale.is(a)?I=import_ag_charts_core125.ScaleAlignment.Trailing:UnitTimeScale.is(a)&&(I=import_ag_charts_core125.ScaleAlignment.Interpolate),ContinuousScale.is(a)){const[A,L]=(0,import_ag_charts_core125.findMinMax)(f.map(Number));m=m.filter(N=>Number(N)>=A&&Number(N)<=L).sort((N,k)=>Number(N)-Number(k))}break;case 1:if(g)m=g.ticks,b=g.ticks.length;else{const A=a.ticks(p,f,r);m=A?.ticks,b=A?.count}break;default:{const{tickCount:A,minTickCount:L,maxTickCount:N}=i;if(f.length>0&&p.interval==null&&(UnitTimeScale.is(a)||D&&(TimeScale.is(a)||OrdinalTimeScale.is(a)))){const E=f,O=Math.min(E[0].valueOf(),E.at(-1).valueOf()),R=Math.max(E[0].valueOf(),E.at(-1).valueOf());x=(0,import_ag_charts_core125.getTickTimeInterval)(O,R,A,L,N,{weekStart:l==null?sunday2:void 0,primaryOnly:!0})}let k;OrdinalTimeScale.is(a)?k=u:UnitTimeScale.is(a)&&(k=a.interval),k!=null&&x!=null&&(0,import_ag_charts_core125.intervalMilliseconds)(k)>=(0,import_ag_charts_core125.intervalMilliseconds)(x)&&(x=k);const w=x?getTimeIntervalTicks(a,r,A,N,p,x,n,u):void 0;if(w)({ticks:m,primaryTicksIndices:S,alignment:I}=w);else{const E=UnitTimeScale.is(a)&&p.interval==null&&x!=null?{...p,interval:x}:p,O=a.ticks(E,f,r);if(m=O?.ticks,b=O?.count,v=O?.firstTickIndex,TimeScale.is(a)||DiscreteTimeScale.is(a)){const R=typeof p.interval=="number"?(0,import_ag_charts_core125.lowestGranularityForInterval)(p.interval):p.interval;x??(x=R??O?.timeInterval)}}}}}),m??(m=[]);let T=0;for(const A of m){if(typeof A!="number")continue;const L=(0,import_ag_charts_core125.countFractionDigits)(A);L>T&&(T=L)}return D||(S=void 0),{tickDomain:y,niceDomain:f,rawTicks:m,rawTickCount:b,rawFirstTickIndex:v,generatePrimaryTicks:D,primaryTicksIndices:S,alignment:I,fractionDigits:T,timeInterval:x}}function createTimeLabelData(t,e,i){const{niceDomain:s,ticks:n,timeInterval:r}=e;if(r==null)return[];const a=ticksSpacing(n),{label:o,labelOffset:l,primaryLabel:c,domain:h}=t,{width:u,height:d}=timeIntervalMaxLabelSize(o,c,s??h,r,(0,import_ag_charts_core125.cachedTextMeasurer)(o)),p=[];for(const g of[0,a]){const{x:f,y}=(0,import_ag_charts_core125.rotatePoint)(l,g,i);p.push({x:f,y,width:u,height:d})}return p}function createLabelData(t,e,i,s){const n=[],r=s.left+s.right,a=s.top+s.bottom;for(const{tickLabel:o,textMetrics:l,translation:c}of t){if(!o)continue;const{x:h,y:u}=(0,import_ag_charts_core125.rotatePoint)(e,c,i),d=l.width+r,p=l.height+a;n.push({x:h,y:u,width:d,height:p})}return n}var _CartesianAxis=class _e extends Axis{constructor(e,i){super(e,i),this.maxThicknessRatio=.3,this.crossAxisTranslation={x:0,y:0},this.minimumTimeGranularity=void 0,this.headingLabelGroup=this.axisGroup.appendChild(new TranslatableGroup({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new TranslatableGroup({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new Line({zIndex:1})),this.tickLineGroupSelection=Selection.select(this.tickLineGroup,Line,!1),this.gridLineGroupSelection=Selection.select(this.gridLineGroup,Line,!1),this.gridFillGroupSelection=Selection.select(this.gridFillGroup,Rect,!1),this.tempText=new TransformableText({debugDirty:!1}),this.tempCaption=new Caption,this.animationManager=e.animationManager,this.animationState=new import_ag_charts_core126.StateMachine("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:n=>this.animateReadyUpdate(n),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this.headingLabelGroup.appendChild(this.title.caption.node);let s;this.cleanup.register(e.eventsHub.on("layout:complete",n=>{const r=[n.chart.width,n.chart.height];s!=null&&!(0,import_ag_charts_core126.arraysEqual)(r,s)&&this.animationState.transition("resize"),s=r}),this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}static is(e){return e instanceof _e}get horizontal(){return this.position==="top"||this.position==="bottom"}onGridVisibilityChange(){}resetAnimation(e){e==="initial"&&this.animationState.transition("reset")}get direction(){return this.position==="top"||this.position==="bottom"?import_ag_charts_core126.ChartAxisDirection.X:import_ag_charts_core126.ChartAxisDirection.Y}createAxisContext(){return{...super.createAxisContext(),position:this.position}}createLabel(){return new CartesianAxisLabel}updateDirection(){switch(this.position){case"top":this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.label.mirrored=!1,this.label.parallel=!1;break}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}calculateLayout(e,i){return this.updateDirection(),super.calculateLayout(e,i)}layoutCrossLines(){const e=this.hasDefinedDomain()||this.hasVisibleSeries();for(const i of this.crossLines)i.calculateLayout?.(e)}calculateTickLayout(e,i,s,n){const r=this.label.getSideFlag(),a=r*(this.getTickSize()+this.getTickSpacing()+this.label.spacing+this.seriesAreaPadding),o=this.chartLayout?.scrollbars?.[this.id],l=this.getScrollbarThickness(o);if(i[0]===2&&i[1]===2&&this.label.enabled===!1&&this.tick.enabled===!1&&this.gridLine.enabled===!1){const{bbox:z,spacing:$}=this.measureAxisLayout(e,[],[],o,l);return{ticks:[],rawTickCount:0,tickDomain:e,niceDomain:e,fractionDigits:0,timeInterval:void 0,bbox:z,layout:{ticks:[],tickLines:[],gridLines:[],gridFills:[],labels:[],spacing:$}}}const{label:c,primaryLabel:h,scale:u,range:d,interval:p,reverse:g,defaultTickMinSpacing:f,minimumTimeGranularity:y}=this,m=generateTicks({label:c,scale:u,interval:p,primaryLabel:h,domain:e,range:d,reverse:g,niceMode:i,visibleRange:s,defaultTickMinSpacing:f,minimumTimeGranularity:y,sideFlag:r,labelOffset:a,primaryTickCount:n,axisRotation:this.horizontal?Math.PI/-2:0,isVertical:this.direction===import_ag_charts_core126.ChartAxisDirection.Y,sizeLimit:this.chartLayout?.sizeLimit,inRange:z=>this.inRange(z,.001),tickFormatter:(...z)=>this.tickFormatter(...z)}),{tickData:b}=m;if(this.label.avoidCollisions&&this.horizontal&&b.ticks.length>2&&(ContinuousScale.is(this.scale)||DiscreteTimeScale.is(this.scale))){const z=this.chartLayout?.padding.right??0,$=b.ticks.at(-1);$?.tickLabel!=null&&$.translation+$.textMetrics.width/2>d[1]+z&&($.tickLabel=void 0,s[0]===0&&s[1]===1&&(b.ticks[0].tickLabel=void 0))}const{ticks:x,tickDomain:S,rawTicks:I,rawTickCount:D,fractionDigits:T,timeInterval:A,niceDomain:L}=b,N=x.map(z=>this.getTickLabelProps(z,m,l)),{position:k,gridPadding:w,gridLength:E}=this,O=k==="bottom"||k==="right"?-1:1,R=O*w,_=O*(E+w),P=this.calculateGridLines(x,R,_),F=this.calculateGridFills(x,R,_),V=this.calculateTickLines(x,O,l),{bbox:B,spacing:j}=this.measureAxisLayout(S,x,N,o,l);return{ticks:I,rawTickCount:D,tickDomain:S,niceDomain:L,fractionDigits:T,timeInterval:A,bbox:B,layout:{ticks:x,gridLines:P,gridFills:F,tickLines:V,labels:N,spacing:j}}}calculateGridLines(e,i,s){return e.map((n,r)=>this.calculateGridLine(n,r,i,s,e))}calculateGridLine({index:e,tickId:i,translation:s},n,r,a,o){const{gridLine:l,horizontal:c}=this,[h,u,d,p]=c?[s,r,s,a]:[r,s,a,s],{style:g}=l,{stroke:f,strokeWidth:y=0,lineDash:m}=g[e%g.length]??{};return{tickId:i,offset:s,x1:h,y1:u,x2:d,y2:p,stroke:f,strokeWidth:y,lineDash:m}}calculateGridFills(e,i,s){const{horizontal:n,range:r,type:a}=this,o=[];if(e.length==0)return o;let l=0;const c=!n&&a==="unit-time";if(c&&e[0].translation<r[0]||!c&&e[0].translation>r[0]){const u={tickId:`before:${e[0].tickId}`,translation:r[0]};o.push(this.calculateGridFill(u,-1,e[0].index,i,s,e)),l=1}return o.push(...e.map((u,d)=>this.calculateGridFill(u,d,u.index+l,i,s,e))),o}calculateGridFill({tickId:e,translation:i},s,n,r,a,o){const{gridLine:l,horizontal:c,range:h}=this,u=o[s+1],d=i,p=u?u.translation:h[1],[g,f,y,m]=c?[d,Math.max(r,a),p,Math.min(r,a)]:[Math.min(r,a),Math.min(d,p),Math.max(r,a),Math.max(d,p)],{fill:b,fillOpacity:v}=l.style[n%l.style.length]??{};return{tickId:e,x1:g,y1:f,x2:y,y2:m,fill:b,fillOpacity:v}}calculateTickLines(e,i,s=0){return e.map(n=>this.calculateTickLine(n,n.index,i,e,s))}calculateTickLine({isPrimary:e,tickId:i,translation:s},n,r,a,o=0){const{horizontal:l,tick:c,primaryTick:h}=this,u=e&&h?h:c,d=this.getTickSize(u),p=this.getTickSpacing(u),g=-r*(o+p),f=-r*d,[y,m,b,v]=l?[s,g,s,g+f]:[g,s,g+f,s],{stroke:x,width:S}=u;return{tickId:i,offset:s,x1:y,y1:m,x2:b,y2:v,stroke:x,strokeWidth:S,lineDash:void 0}}update(){this.updateDirection();const e=Array.from(this.tickLabelGroupSelection.nodes(),a=>a.datum.tickId);super.update();const{tickLayout:i}=this;if(this.updateTitle(this.scale.domain,i?.spacing??0),this.animatable||this.moduleCtx.animationManager.skipCurrentBatch(),i){const{ticks:a}=i;if(this.animationManager.isSkipped())this.resetSelectionNodes();else{const o=a.map(c=>c.tickId),l=(0,import_ag_charts_core126.diffArrays)(e,o);this.animationState.transition("update",l)}}const{enabled:s,stroke:n,width:r}=this.line;this.lineNode.setProperties({stroke:n,strokeWidth:s?r:0}),this.updateTickLines(),this.updateGridLines(),this.updateGridFills()}getAxisTransform(){return{translationX:Math.floor(this.translation.x+this.crossAxisTranslation.x),translationY:Math.floor(this.translation.y+this.crossAxisTranslation.y)}}getLayoutTranslation(){const{translationX:e,translationY:i}=this.getAxisTransform();return{x:e,y:i}}getLayoutState(){return{...super.getLayoutState(),position:this.position}}updatePosition(){super.updatePosition();const e=this.getAxisTransform();this.tickLineGroup.datum=e,this.tickLabelGroup.datum=e,this.lineNodeGroup.datum=e,this.headingLabelGroup.datum=e}setAxisVisible(e){this.tickLineGroup.visible=e&&(this.tick.enabled||(this.primaryTick?.enabled??!1)),this.tickLabelGroup.visible=e&&(this.label.enabled||(this.primaryTick?.enabled??!1)),this.lineNodeGroup.visible=e,this.headingLabelGroup.visible=e}getAxisLineCoordinates(){const{horizontal:e}=this,[i,s]=(0,import_ag_charts_core126.findMinMax)(this.lineRange??this.range);return e?{x1:i,x2:s,y1:0,y2:0}:{x1:0,x2:0,y1:i,y2:s}}getTickLineBBox(e,i){const{translation:s}=e,{position:n,primaryTick:r}=this;let a=this.getTickSize();r?.enabled&&(a=Math.max(a,this.getTickSize(r)));const o=n==="bottom"||n==="right"?-1:1,l=this.getTickSpacing(this.tick),c=-o*(i+l),h=c,u=c-o*(a+l),d=Math.min(h,u),p=Math.max(h,u);switch(n){case"top":return new BBox(s,d,0,p-d);case"bottom":return new BBox(s,d,0,p-d);case"left":return new BBox(d,s,p-d,0);case"right":return new BBox(d,s,p-d,0)}}lineNodeBBox(){const{position:e,seriesAreaPadding:i}=this,{y1:s,y2:n}=this.getAxisLineCoordinates(),r=n-s;switch(e){case"top":return new BBox(s,-i,r,i);case"bottom":return new BBox(s,0,r,i);case"left":return new BBox(-i,s,i,r);case"right":return new BBox(0,s,i,r)}}titleBBox(e,i){const{tempCaption:s}=this;return s.node.setProperties(this.titleProps(s,e,i)),s.node.getBBox()}getScrollbarThickness(e){return e?.enabled&&e.placement==="inner"?e.spacing+e.thickness:0}resolveScrollbarLayout(e,i){if(!e)return;const{position:s}=this,n=s==="top"||s==="left"?-1:1;if(e.placement==="inner"){const a=n===1?e.spacing:-e.spacing-e.thickness;return{...e,offset:a}}const r=n===1?i+e.spacing:-i-e.spacing-e.thickness;return{...e,offset:r}}applyScrollbarLayout(e,i,s){const n=this.resolveScrollbarLayout(s,i);let r=i;if(n){const{offset:a,thickness:o,placement:l}=n;l==="outer"&&(r+=n.spacing+o),this.horizontal?e.push(new BBox(0,a,0,o)):e.push(new BBox(a,0,o,0))}return{spacing:r,scrollbarLayout:n}}measureAxisLayout(e,i,s,n,r){const{tick:a,primaryTick:o,label:l,primaryLabel:c,title:h,position:u,horizontal:d,seriesAreaPadding:p}=this,g=[];if(g.push(this.lineNodeBBox()),a.enabled||o?.enabled)for(const S of i)g.push(this.getTickLineBBox(S,r));const{tempText:f}=this;if(l.enabled)for(const S of s){if(!S.visible)continue;f.setProperties(S);const I=f.getBBox();I&&g.push(I)}if(c?.enabled&&u==="bottom"&&(g.push(new BBox(0,(0,import_ag_charts_core126.calcLineHeight)(l.fontSize)+2,1,this.getTickSize(a)+this.getTickSpacing(a)+l.spacing+p)),c.format!=null)){const{format:I}=c,T=((0,import_ag_charts_core126.isPlainObject)(I)?Object.values(I):[I]).reduce((A,L)=>Math.max(A,(0,import_ag_charts_core126.countLines)(L)),0);g.push(new BBox(0,this.getTickSize(o??a)+this.getTickSpacing(o??a)+c.spacing+p,1,T*(0,import_ag_charts_core126.calcLineHeight)(c.fontSize)+2))}const y=BBox.merge(g),m=d?y.height:y.width,{spacing:b,scrollbarLayout:v}=this.applyScrollbarLayout(g,m,n);return this.layout.labelThickness=m,this.layout.scrollbar=v,h.enabled&&g.push(this.titleBBox(e,b)),{bbox:BBox.merge(g),spacing:b}}titleProps(e,i,s){const{title:n}=this;if(!n.enabled)return e.enabled=!1,{visible:!1,text:"",textBaseline:"bottom",x:0,y:0,rotationCenterX:0,rotationCenterY:0,rotation:0};e.enabled=!0,e.color=n.color,e.fontFamily=n.fontFamily,e.fontSize=n.fontSize,e.fontStyle=n.fontStyle,e.fontWeight=n.fontWeight,e.wrapping=n.wrapping;const r=(n.spacing??0)+s,{range:a}=this,o=(a[0]+a[1])/2;let l,c,h,u;switch(this.position){case"top":l=o,c=-r,h=0,u="bottom";break;case"bottom":l=o,c=r,h=0,u="top";break;case"left":l=-r,c=o,h=Math.PI/-2,u="bottom";break;case"right":l=r,c=o,h=Math.PI/2,u="bottom";break}const{formatter:d=g=>g.defaultValue}=n,p=this.cachedCallWithContext(d,this.getTitleFormatterParams(i));return e.text=p,{visible:!0,text:p,textBaseline:u,x:l,y:c,rotationCenterX:l,rotationCenterY:c,rotation:h}}getTickLabelProps(e,i,s){const{horizontal:n,primaryLabel:r,primaryTick:a,seriesAreaPadding:o,scale:l}=this,{tickId:c,tickLabel:h="",translation:u,isPrimary:d,textUntruncated:p}=e,g=d&&r?.enabled?r:this.label,f=d&&a?.enabled?a:this.tick,{rotation:y,textBaseline:m,textAlign:b}=i,{range:v}=l,x=this.label.getSideFlag(),S=expandLabelPadding(g)[this.position];let I=x*(this.getTickSize(f)+this.getTickSpacing(f)+g.spacing+o)-S;s&&(I+=x*s);const D=h!=="",T=n?u:I,A=n?-I:u;return{...this.getLabelStyles({value:e.tick,formattedValue:h},void 0,g),tickId:c,rotation:y,text:h,textAlign:b,textBaseline:m,textUntruncated:p,visible:D,x:T,y:A,rotationCenterX:T,rotationCenterY:A,range:v}}updateSelections(){if(!this.tickLayout)return;const e=this.getAxisLineCoordinates(),{tickLines:i,gridLines:s,gridFills:n,labels:r}=this.tickLayout,a=o=>o.tickId;this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLine.enabled?s:[],void 0,a),this.gridFillGroupSelection.update(this.gridLine.enabled?n:[],void 0,a),this.tickLineGroupSelection.update(i,void 0,a),this.tickLabelGroupSelection.update(r,void 0,a)}updateGridLines(){this.gridLineGroupSelection.each((e,i)=>{e.stroke=i.stroke,e.strokeWidth=i.strokeWidth,e.lineDash=i.lineDash})}updateGridFills(){this.gridFillGroupSelection.each((e,i)=>{e.fill=i.fill,e.fillOpacity=i.fillOpacity??1})}updateTickLines(){this.tickLineGroupSelection.each((e,i)=>{e.stroke=i.stroke,e.strokeWidth=i.strokeWidth,e.lineDash=i.lineDash})}updateTitle(e,i){const{caption:s}=this.title,n=this.titleProps(s,e,i);s.node.visible=n.visible,s.node.text=n.text,s.node.textBaseline=n.textBaseline,s.node.datum=n}updateLabels(){this.label.enabled&&this.tickLabelGroupSelection.each((e,i)=>{e.fill=i.color,e.text=i.text,e.textBaseline=i.textBaseline,e.textAlign=i.textAlign??"center",e.pointerEvents=i.textUntruncated==null?1:0,e.setFont(i),e.setBoxing(i)})}animateReadyUpdate(e){const{animationManager:i}=this.moduleCtx,s=prepareAxisAnimationContext(this),n=prepareAxisAnimationFunctions(s);fromToMotion(this.id,"axis-group",i,[this.lineNodeGroup,this.tickLabelGroup,this.tickLineGroup,this.headingLabelGroup],n.group),fromToMotion(this.id,"line",i,[this.lineNode],n.line),fromToMotion(this.id,"line-paths",i,[this.gridLineGroupSelection,this.tickLineGroupSelection],n.tick,(r,a)=>a.tickId,e),fromToMotion(this.id,"tick-labels",i,[this.tickLabelGroupSelection],n.label,(r,a)=>a.tickId,e),fromToMotion(this.id,"title",i,[this.title.caption.node],n.label,(r,a)=>a.tickId,e)}resetSelectionNodes(){resetMotion([this.lineNodeGroup,this.tickLabelGroup,this.tickLineGroup,this.headingLabelGroup],resetAxisGroupFn()),resetMotion([this.gridLineGroupSelection,this.tickLineGroupSelection],resetAxisLineSelectionFn()),resetMotion([this.gridFillGroupSelection],resetAxisFillSelectionFn()),resetMotion([this.tickLabelGroupSelection],resetAxisLabelSelectionFn()),resetMotion([this.title.caption.node],resetAxisLabelSelectionFn()),resetMotion([this.lineNode],resetAxisLineSelectionFn())}};__decorateClass([import_ag_charts_core126.Property],_CartesianAxis.prototype,"thickness",2),__decorateClass([import_ag_charts_core126.Property],_CartesianAxis.prototype,"maxThicknessRatio",2),__decorateClass([import_ag_charts_core126.Property],_CartesianAxis.prototype,"position",2),__decorateClass([import_ag_charts_core126.Property],_CartesianAxis.prototype,"crossAt",2);var CartesianAxis=_CartesianAxis,CartesianAxisPositions=["right","top","left","bottom"];function isAxisPosition(t){return typeof t=="string"&&CartesianAxisPositions.includes(t)}function guessInvalidPositions(t){const e=[],i=[],s=[...CartesianAxisPositions];for(const n of t)n instanceof CartesianAxis&&(isAxisPosition(n.position)?i.push(n.position):e.push(n));for(const n of e){let r;do r=s.pop();while(r&&i.includes(r));if(r==null)break;n.position=r}}var import_ag_charts_core127=require("ag-charts-core"),DEFAULT_MATCHING_KEYS=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"];function matchSeriesOptions(t,e,i){const s=new Map,n=u=>{if(u===void 0)return DEFAULT_MATCHING_KEYS;if(s.has(u))return s.get(u);const d=import_ag_charts_core127.ModuleRegistry.getSeriesModule(u)?.matchingKeys??DEFAULT_MATCHING_KEYS;return s.set(u,d),d},r=(u,d,p)=>{const g=n(u),f=[u];for(const y of g)y in d&&d[y]!=null&&f.push(`${y}=${d[y]}`);return p?.seriesGrouping&&f.push(`seriesGrouping.groupId=${p?.seriesGrouping.groupId}`),f.join(";")},a=new Map;let o=0;for(const u of t){const d=r(u.type,u.properties,i?.[o]);a.has(d)||a.set(d,[]),a.get(d)?.push([u,o++])}const l=new Map;o=0;for(const u of e){const d=r(u.type,u,u);l.has(d)||l.set(d,[]),l.get(d)?.push([u,o++])}if(![...a.keys()].some(u=>l.has(u)))return{status:"no-overlap",oldKeys:a.keys(),newKeys:l.keys()};const h=[];for(const[u,d]of l.entries())for(const[p,g]of d){const f=a.get(u);if(f==null||f.length<1){h.push({opts:p,targetIdx:g,idx:g,status:"add"}),a.delete(u);continue}const[y,m]=f.shift(),b=i?.[m]??{},v=(0,import_ag_charts_core127.jsonDiff)(b,p??{}),{groupIndex:x,stackIndex:S}=v?.seriesGrouping??{};x!=null||S!=null?h.push({opts:p,series:y,diff:v,targetIdx:g,idx:m,status:"series-grouping"}):v?h.push({opts:p,series:y,diff:v,targetIdx:g,idx:m,status:"update"}):h.push({opts:p,series:y,targetIdx:g,idx:m,status:"no-op"}),f.length===0&&a.delete(u)}for(const u of a.values())for(const[d,p]of u)h.push({series:d,idx:p,targetIdx:-1,status:"remove"});return{status:"overlap",changes:h}}var import_ag_charts_core129=require("ag-charts-core"),import_ag_charts_core128=require("ag-charts-core"),ExpectedModules=new Map([{type:"chart",name:"cartesian",moduleId:"CartesianChartModule"},{type:"chart",name:"standalone",moduleId:"StandaloneChartModule",enterprise:!0},{type:"chart",name:"polar",moduleId:"PolarChartModule"},{type:"chart",name:"topology",moduleId:"TopologyChartModule",enterprise:!0},{type:"axis",name:"number",chartType:"cartesian",moduleId:"NumberAxisModule"},{type:"axis",name:"log",chartType:"cartesian",moduleId:"LogAxisModule"},{type:"axis",name:"time",chartType:"cartesian",moduleId:"TimeAxisModule"},{type:"axis",name:"unit-time",chartType:"cartesian",moduleId:"UnitTimeAxisModule"},{type:"axis",name:"category",chartType:"cartesian",moduleId:"CategoryAxisModule"},{type:"axis",name:"grouped-category",chartType:"cartesian",moduleId:"GroupedCategoryAxisModule"},{type:"axis",name:"ordinal-time",chartType:"cartesian",enterprise:!0,moduleId:"OrdinalTimeAxisModule"},{type:"axis",name:"angle-category",chartType:"polar",enterprise:!0,moduleId:"AngleCategoryAxisModule"},{type:"axis",name:"angle-number",chartType:"polar",enterprise:!0,moduleId:"AngleNumberAxisModule"},{type:"axis",name:"radius-category",chartType:"polar",enterprise:!0,moduleId:"RadiusCategoryAxisModule"},{type:"axis",name:"radius-number",chartType:"polar",enterprise:!0,moduleId:"RadiusNumberAxisModule"},{type:"series",name:"bar",chartType:"cartesian",moduleId:"BarSeriesModule"},{type:"series",name:"scatter",chartType:"cartesian",moduleId:"ScatterSeriesModule"},{type:"series",name:"bubble",chartType:"cartesian",moduleId:"BubbleSeriesModule"},{type:"series",name:"line",chartType:"cartesian",moduleId:"LineSeriesModule"},{type:"series",name:"area",chartType:"cartesian",moduleId:"AreaSeriesModule"},{type:"series",name:"pie",chartType:"polar",moduleId:"PieSeriesModule"},{type:"series",name:"donut",chartType:"polar",moduleId:"DonutSeriesModule"},{type:"series",name:"box-plot",chartType:"cartesian",enterprise:!0,moduleId:"BoxPlotSeriesModule"},{type:"series",name:"candlestick",chartType:"cartesian",enterprise:!0,moduleId:"CandlestickSeriesModule"},{type:"series",name:"cone-funnel",chartType:"cartesian",enterprise:!0,moduleId:"ConeFunnelSeriesModule"},{type:"series",name:"funnel",chartType:"cartesian",enterprise:!0,moduleId:"FunnelSeriesModule"},{type:"series",name:"ohlc",chartType:"cartesian",enterprise:!0,moduleId:"OhlcSeriesModule"},{type:"series",name:"heatmap",chartType:"cartesian",enterprise:!0,moduleId:"HeatmapSeriesModule"},{type:"series",name:"histogram",chartType:"cartesian",moduleId:"HistogramSeriesModule"},{type:"series",name:"range-area",chartType:"cartesian",enterprise:!0,moduleId:"RangeAreaSeriesModule"},{type:"series",name:"range-bar",chartType:"cartesian",enterprise:!0,moduleId:"RangeBarSeriesModule"},{type:"series",name:"waterfall",chartType:"cartesian",enterprise:!0,moduleId:"WaterfallSeriesModule"},{type:"series",name:"nightingale",chartType:"polar",enterprise:!0,moduleId:"NightingaleSeriesModule"},{type:"series",name:"radar-area",chartType:"polar",enterprise:!0,moduleId:"RadarAreaSeriesModule"},{type:"series",name:"radar-line",chartType:"polar",enterprise:!0,moduleId:"RadarLineSeriesModule"},{type:"series",name:"radial-bar",chartType:"polar",enterprise:!0,moduleId:"RadialBarSeriesModule"},{type:"series",name:"radial-column",chartType:"polar",enterprise:!0,moduleId:"RadialColumnSeriesModule"},{type:"series",name:"map-shape",chartType:"topology",enterprise:!0,moduleId:"MapShapeSeriesModule"},{type:"series",name:"map-line",chartType:"topology",enterprise:!0,moduleId:"MapLineSeriesModule"},{type:"series",name:"map-marker",chartType:"topology",enterprise:!0,moduleId:"MapMarkerSeriesModule"},{type:"series",name:"map-shape-background",chartType:"topology",enterprise:!0,moduleId:"MapShapeBackgroundSeriesModule"},{type:"series",name:"map-line-background",chartType:"topology",enterprise:!0,moduleId:"MapLineBackgroundSeriesModule"},{type:"series",name:"pyramid",chartType:"standalone",enterprise:!0,moduleId:"PyramidSeriesModule"},{type:"series",name:"linear-gauge",chartType:"standalone",enterprise:!0,moduleId:"LinearGaugeModule"},{type:"series",name:"radial-gauge",chartType:"standalone",enterprise:!0,moduleId:"RadialGaugeModule"},{type:"series",name:"sunburst",chartType:"standalone",enterprise:!0,moduleId:"SunburstSeriesModule"},{type:"series",name:"treemap",chartType:"standalone",enterprise:!0,moduleId:"TreemapSeriesModule"},{type:"series",name:"chord",chartType:"standalone",enterprise:!0,moduleId:"ChordSeriesModule"},{type:"series",name:"sankey",chartType:"standalone",enterprise:!0,moduleId:"SankeySeriesModule"},{type:"plugin",name:"animation",enterprise:!0,moduleId:"AnimationModule"},{type:"plugin",name:"annotations",chartType:"cartesian",enterprise:!0,moduleId:"AnnotationsModule"},{type:"plugin",name:"legend",moduleId:"LegendModule"},{type:"plugin",name:"locale",moduleId:"LocaleModule"},{type:"plugin",name:"chartToolbar",chartType:"cartesian",enterprise:!0,moduleId:"ChartToolbarModule"},{type:"plugin",name:"contextMenu",enterprise:!0,moduleId:"ContextMenuModule"},{type:"plugin",name:"statusBar",chartType:"cartesian",enterprise:!0,moduleId:"StatusBarModule"},{type:"plugin",name:"dataSource",enterprise:!0,moduleId:"DataSourceModule"},{type:"plugin",name:"sync",chartType:"cartesian",enterprise:!0,moduleId:"SyncModule"},{type:"plugin",name:"ranges",chartType:"cartesian",enterprise:!0,moduleId:"RangesModule"},{type:"plugin",name:"zoom",enterprise:!0,moduleId:"ZoomModule"},{type:"plugin",name:"flashOnUpdate",enterprise:!0,moduleId:"FlashOnUpdateModule"},{type:"plugin",name:"gradientLegend",enterprise:!0,moduleId:"GradientLegendModule"},{type:"plugin",name:"navigator",chartType:"cartesian",enterprise:!0,moduleId:"NavigatorModule"},{type:"plugin",name:"scrollbar",chartType:"cartesian",enterprise:!0,moduleId:"ScrollbarModule"},{type:"axis:plugin",name:"crosshair",chartType:"cartesian",enterprise:!0,moduleId:"CrosshairModule"},{type:"axis:plugin",name:"bandHighlight",chartType:"cartesian",enterprise:!0,moduleId:"BandHighlightModule"},{type:"series:plugin",name:"errorBar",chartType:"cartesian",enterprise:!0,moduleId:"ErrorBarsModule"},{type:"preset",name:"gauge-preset",chartType:"standalone",enterprise:!0,moduleId:"GaugePresetModule"},{type:"preset",name:"price-volume",chartType:"cartesian",enterprise:!0,moduleId:"PriceVolumePresetModule"},{type:"preset",name:"sparkline",moduleId:"SparklinePresetModule"}].map(t=>[t.name,t]));function getSeriesExpectedChartType(t){const e=ExpectedModules.get(t);return e?.type===import_ag_charts_core128.ModuleType.Series?e.chartType:void 0}function detectChartType(t){const e=t.series?.[0]?.type??"line";return import_ag_charts_core129.ModuleRegistry.getSeriesModule(e)?.chartType??getSeriesExpectedChartType(e)??"unknown"}function isAgCartesianChartOptions(t){return detectChartType(t)==="cartesian"}var import_ag_charts_core130=require("ag-charts-core"),ModulesManager=class extends ModuleMap{*legends(){for(const t of import_ag_charts_core130.ModuleRegistry.listModulesByType(import_ag_charts_core130.ModuleType.Plugin))(t.name==="legend"||t.name==="gradientLegend")&&(yield{legendType:t.name==="legend"?"category":"gradient",legend:this.getModule(t.name)})}},import_ag_charts_core132=require("ag-charts-core"),import_ag_charts_core131=require("ag-charts-core"),DEFAULT_OVERLAY_CLASS="ag-charts-overlay",DEFAULT_OVERLAY_DARK_CLASS="ag-charts-dark-overlay",Overlay=class extends import_ag_charts_core131.BaseProperties{constructor(t,e){super(),this.className=t,this.defaultMessageId=e,this.enabled=!0}getText(t){return(0,import_ag_charts_core131.isArray)(this.text)?(0,import_ag_charts_core131.toPlainText)(this.text):this.rendererAsText?this.rendererAsText:t.t((0,import_ag_charts_core131.toTextString)(this.text)||this.defaultMessageId)}getElement(t,e,i,s){if(this.content?.remove(),this.rendererAsText=void 0,this.focusBox=s,this.renderer){const n={},r=(0,import_ag_charts_core131.callWithContext)(t,this.renderer,n);if((0,import_ag_charts_core131.isHTMLElement)(r))this.content=r;else{const a=(0,import_ag_charts_core131.createElement)("div");a.innerHTML=r;const{firstElementChild:o}=a;(0,import_ag_charts_core131.isHTMLElement)(o)&&a.childElementCount===1?this.content=o:this.content=a}this.rendererAsText=this.content?.textContent?.trim()??void 0}else{const n=(0,import_ag_charts_core131.createElement)("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",fontFamily:"var(--ag-charts-font-family)",fontSize:"var(--ag-charts-font-size)",fontWeight:"var(--ag-charts-font-weight)"});if((0,import_ag_charts_core131.isArray)(this.text)){const r=(0,import_ag_charts_core131.createElement)("div");for(const a of this.text){const o=(0,import_ag_charts_core131.createElement)("span",{color:a.color,fontSize:`${a.fontSize}px`,fontFamily:a.fontFamily??"inherit",fontWeight:String(a.fontWeight),fontStyle:a.fontStyle});o.innerText=(0,import_ag_charts_core131.toTextString)(a.text),r.appendChild(o)}n.appendChild(r)}else n.innerText=this.getText(i);this.content=n,this.content.classList.add(this.className),e?.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(r){n.style.opacity=String(r)},onStop(){n.style.opacity="1"}})}return this.content}removeElement(t=()=>this.content?.remove(),e){if(this.content){if(e){const{content:i}=this;e.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(s){i.style.opacity=String(s)},onStop(){t?.()}})}else t?.();this.content=void 0,this.focusBox=void 0}}};__decorateClass([import_ag_charts_core131.Property],Overlay.prototype,"enabled",2),__decorateClass([import_ag_charts_core131.Property],Overlay.prototype,"text",2),__decorateClass([import_ag_charts_core131.Property],Overlay.prototype,"renderer",2);var ChartOverlays=class extends import_ag_charts_core132.BaseProperties{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new Overlay("ag-charts-loading-overlay","overlayLoadingData"),this.noData=new Overlay("ag-charts-no-data-overlay","overlayNoData"),this.noVisibleSeries=new Overlay("ag-charts-no-visible-series","overlayNoVisibleSeries"),this.unsupportedBrowser=new Overlay("ag-charts-unsupported-browser","overlayUnsupportedBrowser")}getFocusInfo(t){for(const e of[this.loading,this.noData,this.noVisibleSeries,this.unsupportedBrowser])if(e.focusBox!==void 0)return{text:e.getText(t),rect:e.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement(),this.unsupportedBrowser.removeElement()}};__decorateClass([import_ag_charts_core132.Property],ChartOverlays.prototype,"darkTheme",2),__decorateClass([import_ag_charts_core132.Property],ChartOverlays.prototype,"loading",2),__decorateClass([import_ag_charts_core132.Property],ChartOverlays.prototype,"noData",2),__decorateClass([import_ag_charts_core132.Property],ChartOverlays.prototype,"noVisibleSeries",2),__decorateClass([import_ag_charts_core132.Property],ChartOverlays.prototype,"unsupportedBrowser",2);var import_ag_charts_core133=require("ag-charts-core");function getLoadingSpinner(t,e){const{animationDuration:i}=PHASE_METADATA.add,s=i*e,n=(0,import_ag_charts_core133.createElement)("div",`${DEFAULT_OVERLAY_CLASS}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${s}ms linear 50ms both`}),r=(0,import_ag_charts_core133.createElement)("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),a=(0,import_ag_charts_core133.createElement)("p",{marginTop:"1em"});a.innerText=t;const o=(0,import_ag_charts_core133.createElement)("div",`${DEFAULT_OVERLAY_CLASS}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),l=(0,import_ag_charts_core133.createElement)("style");return l.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),n.replaceChildren(l,r,a,o),n}var import_ag_charts_core134=require("ag-charts-core"),SeriesArea=class extends import_ag_charts_core134.BaseProperties{constructor(t){super(),this.ctx=t,this.rectNode=new Rect,this.border=new import_ag_charts_core134.Border(this.rectNode),this.cornerRadius=0,this.padding=0,this.cleanup=new import_ag_charts_core134.CleanupRegistry,this.node=this.createNode(),this.node.append([this.rectNode]),this.rectNode.fill=void 0,this.cleanup.register(t.scene.attachNode(this.node),t.eventsHub.on("layout:complete",e=>this.onLayoutComplete(e)))}destroy(){this.cleanup.flush()}getPadding(){const{border:t,padding:e}=this,i=t.enabled?t.strokeWidth:0;if(typeof e=="number"){const s=e+i;return{top:s,right:s,bottom:s,left:s}}return{top:(e.top??0)+i,right:(e.right??0)+i,bottom:(e.bottom??0)+i,left:(e.left??0)+i}}createNode(){return new Group({name:"series-area-container",zIndex:import_ag_charts_core134.ZIndexMap.SERIES_AREA_CONTAINER})}onLayoutComplete(t){const{x:e,y:i,width:s,height:n}=t.series.paddedRect;this.rectNode.x=e,this.rectNode.y=i,this.rectNode.width=s,this.rectNode.height=n}};__decorateClass([import_ag_charts_core134.Property],SeriesArea.prototype,"border",2),__decorateClass([import_ag_charts_core134.Property],SeriesArea.prototype,"clip",2),__decorateClass([(0,import_ag_charts_core134.ProxyPropertyOnWrite)("rectNode","cornerRadius"),import_ag_charts_core134.Property],SeriesArea.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core134.Property],SeriesArea.prototype,"padding",2);var import_ag_charts_core136=require("ag-charts-core"),import_ag_charts_core135=require("ag-charts-core");function getShapeFill(t,e,i,s){if((0,import_ag_charts_core135.isGradientFill)(t))return{type:"gradient",gradient:t.gradient??e.gradient,colorStops:t.colorStops??e.colorStops,bounds:t.bounds??e.bounds,rotation:t.rotation??e.rotation,reverse:t.reverse??e.reverse,colorSpace:t.colorSpace??e.colorSpace};if((0,import_ag_charts_core135.isPatternFill)(t)){const n=t.pattern??i.pattern;let r=t.strokeWidth;n==="backward-slanted-lines"||n==="forward-slanted-lines"||n==="horizontal-lines"||n==="vertical-lines"?r??(r=i.strokeWidth):r??(r=0);const a=t.width??t.height??i.width,o=t.height??t.width??i.height;return{type:"pattern",pattern:n,width:a,height:o,path:t.path,padding:t.padding??i.padding,fill:t.fill??i.fill,fillOpacity:t.fillOpacity??i.fillOpacity,backgroundFill:t.backgroundFill??i.backgroundFill,backgroundFillOpacity:t.backgroundFillOpacity??i.backgroundFillOpacity,stroke:t.stroke??i.stroke,strokeOpacity:t.strokeOpacity??i.strokeOpacity,strokeWidth:r,rotation:t.rotation??i.rotation,scale:t.scale??i.scale}}return(0,import_ag_charts_core135.isImageFill)(t)?{type:"image",url:t.url,width:t.width,height:t.height,backgroundFill:t.backgroundFill??s.backgroundFill,backgroundFillOpacity:t.backgroundFillOpacity??s.backgroundFillOpacity,rotation:t.rotation??s.rotation,repeat:t.repeat??s.repeat,fit:t.fit??s.fit}:t}function getShapeStyle(t,e,i,s){return!(0,import_ag_charts_core135.isGradientFill)(t?.fill)&&!(0,import_ag_charts_core135.isPatternFill)(t?.fill)&&!(0,import_ag_charts_core135.isImageFill)(t?.fill)?t:{...t,fill:getShapeFill(t.fill,e,i,s)}}var SeriesNodePickMode=(t=>(t[t.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",t[t.NEAREST_NODE=1]="NEAREST_NODE",t[t.AXIS_ALIGNED=2]="AXIS_ALIGNED",t))(SeriesNodePickMode||{}),CROSS_FILTER_MARKER_FILL_OPACITY_FACTOR=.25,CROSS_FILTER_MARKER_STROKE_OPACITY_FACTOR=.125,SeriesNodeEvent=class{constructor(t,e,i,s){this.type=t,this.event=e,this.defaultPrevented=!1,this.datum=i.datum,this.seriesId=s.id}preventDefault(){this.defaultPrevented=!0}},SeriesGroupingChangedEvent=class{constructor(t,e){this.series=t,this.seriesGrouping=e,this.type="groupingChanged"}};function propertyAxisDirection(t){switch(t){case"x":return import_ag_charts_core136.ChartAxisDirection.X;case"y":return import_ag_charts_core136.ChartAxisDirection.Y;case"angle":return import_ag_charts_core136.ChartAxisDirection.Angle;case"radius":return import_ag_charts_core136.ChartAxisDirection.Radius}}function axisDirectionProperty(t){switch(t){case import_ag_charts_core136.ChartAxisDirection.X:return"x";case import_ag_charts_core136.ChartAxisDirection.Y:return"y";case import_ag_charts_core136.ChartAxisDirection.Angle:return"angle";case import_ag_charts_core136.ChartAxisDirection.Radius:return"radius";default:return"x"}}var Series=class extends Observable{constructor(t){super(),this.cleanup=new import_ag_charts_core136.CleanupRegistry,this.usesPlacedLabels=!1,this.alwaysClip=!1,this.hasChangesOnHighlight=!1,this.seriesGrouping=void 0,this.NodeEvent=SeriesNodeEvent,this.internalId=(0,import_ag_charts_core136.createId)(this),this.contentGroup=new TranslatableGroup({name:`${this.internalId}-content`,zIndex:import_ag_charts_core136.SeriesZIndexMap.ANY_CONTENT}),this.highlightGroup=new TranslatableGroup({name:`${this.internalId}-highlight`,zIndex:import_ag_charts_core136.SeriesZIndexMap.ANY_CONTENT}),this.highlightNodeGroup=this.highlightGroup.appendChild(new Group({name:`${this.internalId}-highlight-node`})),this.highlightLabelGroup=this.highlightGroup.appendChild(new Group({name:`${this.internalId}-highlight-label`,zIndex:import_ag_charts_core136.SeriesContentZIndexMap.LABEL})),this.annotationGroup=new TranslatableGroup({name:`${this.internalId}-annotation`}),this.labelGroup=new TranslatableGroup({name:`${this.internalId}-series-labels`}),this.axes={},this.directions=[import_ag_charts_core136.ChartAxisDirection.X,import_ag_charts_core136.ChartAxisDirection.Y],this.nodeDataRefresh=!0,this.processedDataUpdated=!0,this.moduleMap=new ModuleMap,this.datumCallbackCache=new Map,this.connectsToYAxis=!1,this.declarationOrder=-1,this._broughtToFront=!1,this.events=new import_ag_charts_core136.EventEmitter,this._pickNodeCache=new import_ag_charts_core136.LRUCache(5),this.fireEventWrapper=l=>super.fireEvent(l);const{moduleCtx:e,pickModes:i,propertyKeys:s={},propertyNames:n={},canHaveAxes:r=!1,usesPlacedLabels:a=!1,alwaysClip:o=!1}=t;this.ctx=e,this.propertyKeys=s,this.propertyNames=n,this.canHaveAxes=r,this.usesPlacedLabels=a,this.pickModes=i,this.alwaysClip=o,this.highlightLabelGroup.pointerEvents=1,this.cleanup.register(this.ctx.eventsHub.on("data:update",l=>this.setChartData(l)),this.ctx.eventsHub.on("highlight:change",l=>this.onChangeHighlight(l)))}get pickModeAxis(){return"main"}get id(){return this.properties?.id??this.internalId}get type(){return this.constructor.type??""}get focusable(){return!0}get data(){return this._data??this._chartData}set visible(t){this.properties.visible=t,this.ctx.legendManager.toggleItem(t,this.id),this.ctx.legendManager.update(),this.visibleMaybeChanged()}get visible(){return this.ctx.legendManager.getSeriesEnabled(this.id)??this.properties.visible}get hasData(){const t=this.data;return t==null?!1:t.netSize()>0}get tooltipEnabled(){return this.properties.tooltip?.enabled}onDataChange(){this.nodeDataRefresh=!0,this.processedDataUpdated=!0,this._pickNodeCache.clear()}setOptionsData(t){this._data=t,this.onDataChange()}isHighlightEnabled(){return this.properties.highlight.enabled}setChartData(t){this._chartData=t,this.data===t&&this.onDataChange()}onSeriesGroupingChange(t,e){const{internalId:i,type:s,visible:n}=this;t&&this.ctx.seriesStateManager.deregisterSeries(this),e&&this.ctx.seriesStateManager.registerSeries({internalId:i,type:s,visible:n,seriesGrouping:e,width:"width"in this.properties?this.properties.width:0}),this.fireEvent(new SeriesGroupingChangedEvent(this,e))}getBandScalePadding(){return{inner:1,outer:0}}attachSeries(t,e,i){t.appendChild(this.contentGroup),e.appendChild(this.highlightGroup),e.appendChild(this.labelGroup),i?.appendChild(this.annotationGroup)}detachSeries(t,e,i){this.contentGroup.remove(),this.highlightGroup.remove(),this.labelGroup.remove(),this.annotationGroup.remove()}setSeriesIndex(t,e=!1){const i=this.bringToFront();return!e&&t===this.declarationOrder&&i===this._broughtToFront?!1:(this.declarationOrder=t,this._broughtToFront=i,this.setZIndex(i?Number.MAX_VALUE:t),this.fireEvent(new SeriesGroupingChangedEvent(this,this.seriesGrouping)),!0)}setZIndex(t){this.contentGroup.zIndex=[import_ag_charts_core136.SeriesZIndexMap.ANY_CONTENT,t,import_ag_charts_core136.SeriesContentZIndexMap.FOREGROUND],this.highlightGroup.zIndex=[import_ag_charts_core136.SeriesZIndexMap.ANY_CONTENT,t,import_ag_charts_core136.SeriesContentZIndexMap.HIGHLIGHT],this.labelGroup.zIndex=[import_ag_charts_core136.SeriesZIndexMap.ANY_CONTENT,t,import_ag_charts_core136.SeriesContentZIndexMap.LABEL],this.annotationGroup.zIndex=t}renderToOffscreenCanvas(){return!1}hasHighlightOpacity(){if(!this.properties.highlight.enabled||this.ctx.highlightManager.getActiveHighlight()==null)return!1;const{unhighlightedItem:t,unhighlightedSeries:e}=this.properties.highlight;return hasDimmedOpacity(t)||hasDimmedOpacity(e)}getDrawingMode(t,e="cutout"){return t?e:this.hasHighlightOpacity()?this.ctx.chartService.highlight?.drawingMode??"overlay":"overlay"}getAnimationDrawingModes(){const t=this.getDrawingMode(!1);return{start:{drawingMode:"overlay"},finish:{drawingMode:t}}}addEventListener(t,e){return super.addEventListener(t,e)}removeEventListener(t,e){return super.removeEventListener(t,e)}hasEventListener(t){return super.hasEventListener(t)}updatedDomains(){}destroy(){this.cleanup.flush(),this.resetDatumCallbackCache(),this.ctx.seriesStateManager.deregisterSeries(this)}getPropertyValues(t,e){const i=propertyAxisDirection(t),s=i==null?t:axisDirectionProperty(this.resolveKeyDirection(i)),n=e?.[s],r=[];if(!n)return r;const a=(...o)=>{for(const l of o)Array.isArray(l)?a(...l):typeof l=="object"?a(...Object.values(l)):r.push(l)};return a(...n.map(o=>this.properties[o])),r}getKeyAxis(t){}getKeys(t){return this.getPropertyValues(axisDirectionProperty(t),this.propertyKeys)}getKeyProperties(t){return this.propertyKeys[this.resolveKeyDirection(t)]??[]}getNames(t){return this.getPropertyValues(axisDirectionProperty(t),this.propertyNames)}getFormatterContext(t){const{id:e}=this,i=this.getPropertyValues(t,this.propertyKeys),s=this.getPropertyValues(t,this.propertyNames),n=[];for(let r=0;r<i.length;r++)n.push({seriesId:e,key:i[r],name:s[r]});return n}resolveKeyDirection(t){return t}getDomain(t){const e=this.getSeriesDomain(t),i=this.moduleMap.mapModules(s=>s.getDomain(t)).flat();return i.length===0?e:{domain:e.domain.concat(i)}}getRange(t,e){return this.getSeriesRange(t,e)}getMinimumRangeSeries(t){}getMinimumRangeChart(t){return 0}getZoomRangeFittingItems(t,e,i){}getVisibleItems(t,e,i){return 1/0}toCanvasFromMidPoint(t){const{x:e=0,y:i=0}=t.midPoint??{};return Transformable.toCanvasPoint(this.contentGroup,e,i)}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){const{internalId:t,seriesGrouping:e,type:i,visible:s}=this;this.ctx.seriesStateManager.updateSeries({internalId:t,type:i,visible:s,seriesGrouping:e,width:"width"in this.properties?this.properties.width:0})}getOpacity(){if(!this.properties.highlight)return 1;const{opacity:e=1}=this.getHighlightStyle();return e}getHighlightState(t,e,i,s){return this.properties.highlight.enabled?e?1:t?.series==null?0:this.isSeriesHighlighted(t,s)?this.isItemHighlighted(t,i)==null?2:4:3:0}getHighlightStateString(t,e,i,s){return toHighlightString(this.getHighlightState(t,e,i,s))}onChangeHighlight(t){const e=t.previousHighlight,i=t.currentHighlight,s=this.getHighlightState(i),n=this.getHighlightState(e);this.setSeriesIndex(this.declarationOrder);const r=this.hasItemStylers();if(!r&&s===n){this.hasChangesOnHighlight=!1;return}const{highlightedSeries:a,unhighlightedItem:o,unhighlightedSeries:l}=this.properties.highlight;this.hasChangesOnHighlight=r||!(0,import_ag_charts_core136.isEmptyObject)(a)||!(0,import_ag_charts_core136.isEmptyObject)(o)||!(0,import_ag_charts_core136.isEmptyObject)(l)}bringToFront(){return this.properties.highlight.enabled&&this.properties.highlight.bringToFront&&this.isSeriesHighlighted(this.ctx.highlightManager.getActiveHighlight())}isSeriesHighlighted(t,e){return this.properties.highlight.enabled?t?.series===this:!1}isItemHighlighted(t,e){if(!(t?.datumIndex==null||e==null))return t.datumIndex===e}getHighlightStyle(t,e,i,s){const n=this.ctx.highlightManager?.getActiveHighlight();return i??(i=this.getHighlightState(n,t,e,s)),this.properties.highlight.getStyle(i)}resolveMarkerDrawingModeForState(t,e){return resolveMarkerDrawingMode(t,e)}filterItemStylerFillParams(t){return(0,import_ag_charts_core136.isGradientFill)(t)?(0,import_ag_charts_core136.without)(t,["bounds","colorSpace","gradient","reverse"]):(0,import_ag_charts_core136.isPatternFill)(t)?(0,import_ag_charts_core136.without)(t,["padding"]):t}getModuleTooltipParams(){return this.moduleMap.mapModules(t=>t.getTooltipParams()).reduce((t,e)=>Object.assign(t,e),{})}pickNodes(t,e,i=!1){const{pickModes:s,pickModeAxis:n,visible:r,contentGroup:a}=this;if(!r||!a.visible||e==="highlight"&&!this.properties.highlight.enabled||e==="highlight-tooltip"&&!this.properties.highlight.enabled)return;let o=1/0;if(e==="tooltip"||e==="highlight-tooltip"){const{tooltip:d}=this.properties;o=typeof d.range=="number"?d.range:1/0,i||(i=d.range==="exact")}else if(e==="event"||e==="context-menu"){const{nodeClickRange:d}=this.properties;o=typeof d=="number"?d:1/0,i||(i=d==="exact")}const l=s.filter(d=>!i||d===0),{x:c,y:h}=t,u=JSON.stringify({x:c,y:h,maxDistance:o,selectedPickModes:l});if(this._pickNodeCache.has(u))return this._pickNodeCache.get(u);for(const d of l){let p;switch(d){case 0:{const g=this.pickNodesExactShape(t);p=g.length===0?void 0:{datums:g,distance:0};break}case 1:{const g=this.pickNodeClosestDatum(t),f=g?.distance===0?this.pickNodesExactShape(t):void 0;f!=null&&f.length!==0?p={datums:f,distance:0}:g?p={datums:[g.datum],distance:g.distance}:p=void 0;break}case 2:{const g=n==null?void 0:this.pickNodeMainAxisFirst(t,n==="main-category");p=g==null?void 0:{datums:[g.datum],distance:g.distance};break}}if(p&&p.distance<=o)return this._pickNodeCache.set(u,{pickMode:d,datums:p.datums,distance:p.distance})}return this._pickNodeCache.set(u,void 0)}pickNodesExactShape(t){const e=[];for(const i of this.contentGroup.pickNodes(t.x,t.y)){const s=i.closestDatum();s!=null&&s.missing!==!0&&e.push(s)}return e}pickNodeClosestDatum(t){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(t,e){const i=(0,import_ag_charts_core136.nearestSquared)(t.x,t.y,e),s=i.nearest?.closestDatum();if(s!=null&&s.missing!==!0)return{datum:s,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(t,e){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}getLabelData(){return[]}updatePlacedLabelData(t){}fireEvent(t){(0,import_ag_charts_core136.callWithContext)([this.properties,this.ctx.chartService],this.fireEventWrapper,t)}fireNodeClickEvent(t,e){const i=new this.NodeEvent("seriesNodeClick",t,e,this);return this.fireEvent(i),!i.defaultPrevented}fireNodeDoubleClickEvent(t,e){const i=new this.NodeEvent("seriesNodeDoubleClick",t,e,this);return this.fireEvent(i),!i.defaultPrevented}createNodeContextMenuActionEvent(t,e){return new this.NodeEvent("nodeContextMenuAction",t,e,this)}onLegendInitialState(t,e){const{visible:i=!0,itemId:s,legendItemName:n}=e??{};this.toggleSeriesItem(i,t,s,n)}onLegendItemClick(t){const{enabled:e,itemId:i,series:s,legendType:n}=t,r="legendItemName"in this.properties?this.properties.legendItemName:void 0,a="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,o=r!=null&&r===t.legendItemName;(s.id===this.id||o||a!=null)&&this.toggleSeriesItem(e,n,i,r,t)}onLegendItemDoubleClick(t){const{enabled:e,itemId:i,series:s,numVisibleItems:n,legendType:r}=t,a="legendItemName"in this.properties?this.properties.legendItemName:void 0,o="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,l=a!=null&&a===t.legendItemName;s.id===this.id||l||o!=null?this.toggleSeriesItem(!0,r,i,a,t):e&&n===1?this.toggleSeriesItem(!0,r,void 0,a):this.toggleSeriesItem(!1,r,void 0,a)}toggleSeriesItem(t,e,i,s,n){const r=this.id;(t||e!=="category")&&(this.visible=t),this.nodeDataRefresh=!0,this._pickNodeCache.clear();const a={type:"seriesVisibilityChange",seriesId:r,itemId:i,legendItemName:n?.legendItemName??s,visible:t};this.fireEvent(a),this.ctx.legendManager.toggleItem(t,r,i,s)}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return{...this.ctx,series:this}}getAxisValueText(t,e,i,s,n,r,a){const{id:o,properties:l}=this;return t.formatDatum(l,i,e,o,r,s,n,void 0,void 0,void 0,a)}getLabelText(t,e,i,s,n,r,a,o=!1){if(t==null&&!o)return"";const{axes:l,canHaveAxes:c,ctx:h,id:u,properties:d}=this,p="series-label",g="legendItemName"in d?d.legendItemName:void 0,f={seriesId:this.id,...a},y=c?propertyAxisDirection(s):void 0,m=y==null?void 0:l[this.resolveKeyDirection(y)];if(m!=null)return m.formatDatum(d,t,p,u,g,e,i,n,r,f,o);const{formatManager:b}=h,v=this.callWithContext.bind(this),x=I=>r.formatValue(v,I.type,I.value,f)??b.format(v,I)??(t==null?"":String(t)),S=this.getFormatterContext(s);switch(s){case"y":case"color":case"size":return x({type:"number",value:t,datum:e,seriesId:u,legendItemName:g,key:i,source:p,property:s,domain:n,boundSeries:S,fractionDigits:void 0,visibleDomain:void 0});case"x":case"radius":case"angle":case"label":case"secondaryLabel":case"calloutLabel":case"sectorLabel":case"legendItem":return x({type:"category",value:t,datum:e,seriesId:u,legendItemName:g,key:i,source:p,property:s,domain:n,boundSeries:S})}}getMarkerStyle(t,{datumIndex:e,datum:i,point:s},n,r,a={size:s?.size??t.size??0},o){const{itemStyler:l}=t,{highlightState:c,isHighlight:h=!1,checkForHighlight:u=!0,resolveMarkerSubPath:d=["marker"],resolveStyler:p=!1}=r??{},g=["series",`${this.declarationOrder}`,...d];if(p){const b={permissivePath:!0},v=this.ctx.optionsGraphService.resolvePartial(g,a,b);v&&(a={...v,size:v.size??a.size})}const f=u?this.getHighlightStyle(h,e,c):void 0;let m=(0,import_ag_charts_core136.mergeDefaults)(f,a,t.getStyle(),o);if(l&&n){const b=this.ctx.highlightManager?.getActiveHighlight(),v=this.getHighlightStateString(b,h,e),x=this.filterItemStylerFillParams(m.fill),S=this.cachedCallWithContext(l,{seriesId:this.id,...m,fill:x,...n,highlightState:v,datum:i}),I=this.ctx.optionsGraphService.resolvePartial(g,S);m=(0,import_ag_charts_core136.mergeDefaults)(I,m)}return m}applyMarkerStyle(t,e,i,s,{applyTranslation:n=!0,selected:r=!0}={}){const{shape:a,size:o=0}=t,l=this.visible&&o>0&&i&&!Number.isNaN(i.x)&&!Number.isNaN(i.y);if(e.setStyleProperties(t,s),n?e.setProperties({visible:l,shape:a,size:o,x:i?.x,y:i?.y,scalingCenterX:i?.x,scalingCenterY:i?.y}):e.setProperties({visible:l,shape:a,size:o}),r||(e.fillOpacity*=CROSS_FILTER_MARKER_FILL_OPACITY_FACTOR,e.strokeOpacity*=CROSS_FILTER_MARKER_STROKE_OPACITY_FACTOR),typeof a=="function"&&!e.dirtyPath){e.path.clear(!0),e.updatePath(),e.checkPathDirty();const c=e.getBBox();if(i!=null&&c.isFinite()){const h=c.computeCenter(),[u,d]=["x","y"].map(p=>(t.strokeWidth??0)+Math.abs(h[p]-i[p]));i.focusSize=Math.max(c.width+u,c.height+d)}}}get nodeDataDependencies(){return this._nodeDataDependencies??{seriesRectWidth:Number.NaN,seriesRectHeight:Number.NaN}}checkResize(t){const{width:e,height:i}=t??{width:Number.NaN,height:Number.NaN},s=t?{seriesRectWidth:e,seriesRectHeight:i}:void 0,n=(0,import_ag_charts_core136.jsonDiff)(this.nodeDataDependencies,s)!=null;return n&&(this._nodeDataDependencies=s,this.markNodeDataDirty()),n}pickFocus(t){}resetDatumCallbackCache(){this.datumCallbackCache.clear()}cachedDatumCallback(t,e){const{datumCallbackCache:i}=this,s=i.get(t);if(s!=null)return s;try{const n=e();return i.set(t,n),n}catch(n){import_ag_charts_core136.Logger.error(String(n))}}cachedCallWithContext(t,e){return this.ctx.callbackCache.call([this.properties,this.ctx.chartService],t,e)}callWithContext(t,e){return(0,import_ag_charts_core136.callWithContext)([this.properties,this.ctx.chartService],t,e)}formatTooltipWithContext(t,e,i){return t.formatTooltip([this.properties,this.ctx.chartService],e,i)}minTimeInterval(){}needsDataModelDiff(){return!this.ctx.animationManager.isSkipped()||!!this.chart?.flashOnUpdateEnabled}};Series.className="Series",__decorateClass([(0,import_ag_charts_core136.ActionOnSet)({changeValue:function(t,e){this.onSeriesGroupingChange(e,t)}})],Series.prototype,"seriesGrouping",2);var import_ag_charts_core147=require("ag-charts-core"),import_ag_charts_core137=require("ag-charts-core"),FocusIndicator=class{constructor(t){this.swapChain=t,this.hasBeenActivated=!1,this.div=(0,import_ag_charts_core137.createElement)("div"),this.svg=(0,import_ag_charts_core137.createSvgElement)("svg"),this.outerPath=(0,import_ag_charts_core137.createSvgElement)("path"),this.innerPath=(0,import_ag_charts_core137.createSvgElement)("path"),this.svg.append(this.outerPath),this.svg.append(this.innerPath),this.outerPath.classList.add("ag-charts-focus-svg-outer-path"),this.innerPath.classList.add("ag-charts-focus-svg-inner-path"),this.element=(0,import_ag_charts_core137.createElement)("div","ag-charts-focus-indicator"),this.element.ariaHidden="true",this.element.append(this.svg),this.swapChain.addListener("swap",e=>this.onSwap(e))}clear(){}update(t,e,i){if(e!=null)if(t instanceof Path){const s=(r,a)=>{let{x:o,y:l}=Transformable.toCanvasPoint(t,r,a);return o-=e.x??0,l-=e.y??0,{x:o,y:l}},n=t.svgPathData(s);this.outerPath.setAttribute("d",n),this.innerPath.setAttribute("d",n),this.show(this.svg)}else{let s;if(i){const n=Math.max(t.x-e.x,0),r=Math.max(t.y-e.y,0),a=Math.min(t.x+t.width-e.x,e.width),o=Math.min(t.y+t.height-e.y,e.height);s=new BBox(n,r,a-n,o-r)}else s=new BBox(t.x-e.x,t.y-e.y,t.width,t.height);(0,import_ag_charts_core137.setElementBBox)(this.div,s),this.show(this.div)}}onSwap(t){t!==this.element.parentElement&&(this.element.remove(),t.appendChild(this.element),this.overrideFocusVisible(this.focusVisible))}show(t){this.hasBeenActivated=!0,this.element.innerHTML="",this.element.append(t)}overrideFocusVisible(t){this.focusVisible=t;const e={true:"1",false:"0",undefined:""};this.element.parentElement?.style.setProperty("opacity",e[`${t}`])}isFocusVisible(t=!1){if(!t&&!this.hasBeenActivated)return!1;const e=this.element.parentElement;return e!=null&&(0,import_ag_charts_core137.getWindow)().getComputedStyle(e).opacity==="1"}},import_ag_charts_core138=require("ag-charts-core"),FocusSwapChain=class{constructor(t,e,i,s){this.label1=t,this.label2=e,this.hasFocus=!1,this.skipDispatch=!1,this.listeners={blur:[],focus:[],swap:[]},this.onBlur=n=>((0,import_ag_charts_core138.setElementStyle)(n.target,"pointer-events",void 0),!this.skipDispatch&&this.dispatch("blur",n)),this.onFocus=n=>((0,import_ag_charts_core138.setElementStyle)(n.target,"pointer-events","auto"),!this.skipDispatch&&this.dispatch("focus",n)),(0,import_ag_charts_core138.setAttribute)(this.label1,"id",(0,import_ag_charts_core138.createElementId)()),(0,import_ag_charts_core138.setAttribute)(this.label2,"id",(0,import_ag_charts_core138.createElementId)()),(0,import_ag_charts_core138.setElementStyle)(this.label1,"display","none"),(0,import_ag_charts_core138.setElementStyle)(this.label2,"display","none"),this.label1.textContent=s,this.label2.textContent=s,this.activeAnnouncer=this.createAnnouncer(i),this.inactiveAnnouncer=this.createAnnouncer(i),(0,import_ag_charts_core138.setAttribute)(this.activeAnnouncer,"tabindex",0),this.label2.insertAdjacentElement("afterend",this.activeAnnouncer),this.label2.insertAdjacentElement("afterend",this.inactiveAnnouncer),this.swap(s)}createAnnouncer(t){const e=(0,import_ag_charts_core138.createElement)("div");return e.role=t,e.className="ag-charts-swapchain",e.addEventListener("blur",this.onBlur),e.addEventListener("focus",this.onFocus),e}destroy(){for(const t of[this.activeAnnouncer,this.inactiveAnnouncer])t.removeEventListener("blur",this.onBlur),t.removeEventListener("focus",this.onFocus),t.remove()}focus(t){this.focusOptions=t,this.activeAnnouncer.focus(t),this.focusOptions=void 0}update(t){this.skipDispatch=!0,this.swap(t),this.hasFocus&&this.activeAnnouncer.focus(this.focusOptions),this.skipDispatch=!1}addListener(t,e){this.listeners[t].push(e),t==="swap"&&e(this.activeAnnouncer)}dispatch(t,e){t==="focus"?this.hasFocus=!0:t==="blur"&&(this.hasFocus=!1);for(const i of this.listeners[t])i(e)}swap(t){const e=this.activeAnnouncer.tabIndex;this.label2.textContent=t,[this.inactiveAnnouncer,this.activeAnnouncer]=[this.activeAnnouncer,this.inactiveAnnouncer],[this.label1,this.label2]=[this.label2,this.label1],(0,import_ag_charts_core138.setAttributes)(this.inactiveAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!0,tabindex:void 0}),(0,import_ag_charts_core138.setAttributes)(this.activeAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!1,tabindex:e}),this.dispatch("swap",this.activeAnnouncer)}},import_ag_charts_core139=require("ag-charts-core"),KEY_BINDINGS={arrowdown:{bindings:[{code:"ArrowDown"}]},arrowleft:{bindings:[{code:"ArrowLeft"}]},arrowright:{bindings:[{code:"ArrowRight"}]},arrowup:{bindings:[{code:"ArrowUp"}]},delete:{bindings:[{key:"Backspace"},{key:"Delete"}],activatesFocusIndicator:!1},redo:{bindings:[{key:"y",ctrlOrMeta:!0},{key:"z",ctrlOrMeta:!0,shift:!0}],activatesFocusIndicator:!1},undo:{bindings:[{key:"z",ctrlOrMeta:!0}],activatesFocusIndicator:!1},submit:{bindings:[{key:"Enter"},{code:"Enter"},{code:"Space"}]},zoomin:{bindings:[{key:"+"},{code:"ZoomIn"},{code:"Add"}],activatesFocusIndicator:!1},zoomout:{bindings:[{key:"-"},{code:"ZoomOut"},{code:"Substract"}],activatesFocusIndicator:!1}};function matchesKeyBinding(t,e){for(const i of e)if("code"in i){if(i.code===t.code)return!0}else if(i.key===t.key&&(i.shift===void 0||i.shift===t.shiftKey)&&(i.ctrlOrMeta===void 0||i.ctrlOrMeta===t.ctrlKey||i.ctrlOrMeta===t.metaKey))return!0;return!1}function mapKeyboardEventToAction(t){for(const[e,{activatesFocusIndicator:i=!0,bindings:s}]of(0,import_ag_charts_core139.entries)(KEY_BINDINGS))if(matchesKeyBinding(t,s))return{name:e,activatesFocusIndicator:i}}function computeCenter(t,e,i){const s=getDatumRefPoint(t,i.datum,i.movedBounds);if(s!=null)return{x:s.canvasX,y:s.canvasY};const n=i.bounds;if(n!=null){if(n instanceof BBox){const{x:r,y:a}=n.computeCenter();return{x:e.x+r,y:e.y+a}}return Transformable.toCanvas(n).computeCenter()}}function getPickedFocusBBox({bounds:t}){return t instanceof BBox?t:t!=null?Transformable.toCanvas(t):BBox.NaN}function makeKeyboardPointerEvent(t,e,i){const{x:s,y:n}=computeCenter(t,e,i)??{};if(s!==void 0&&n!==void 0)return{type:"keyboard",canvasX:s,canvasY:n}}var import_ag_charts_core145=require("ag-charts-core"),import_ag_charts_core140=require("ag-charts-core"),M=.1,K=200,C=12,DELTA=.5,SpringAnimation=class{constructor(){this.events=new import_ag_charts_core140.EventEmitter,this.x1=Number.NaN,this.y1=Number.NaN,this.x=Number.NaN,this.y=Number.NaN,this.vx=0,this.vy=0,this.t0=Number.NaN,this.animationFrameHandle=void 0}reset(){this.x=Number.NaN,this.y=Number.NaN,this.animationFrameHandle!=null&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0)}update(t,e){if(Number.isNaN(this.x)||Number.isNaN(this.y)){this.x=t,this.y=e,this.vx=0,this.vy=0,this.emitUpdate(),this.animationFrameHandle!=null&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0);return}this.x1=t,this.y1=e,this.t0=Date.now(),this.animationFrameHandle??(this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this)))}onFrame(){this.animationFrameHandle=void 0;const{x1:t,y1:e,t0:i}=this,s=Date.now(),n=s-i;this.t0=s;const r=.001,a=Math.trunc(Math.ceil(n/(r*1e3)));let{x:o,y:l,vx:c,vy:h}=this;for(let u=0;u<a;u+=1){const d=o-t,p=l-e,g=-(K*d+C*c)/M,f=-(K*p+C*h)/M;c+=g*r,h+=f*r,o+=c*r,l+=h*r}Math.hypot(o-t,l-e)<DELTA?(this.x=this.x1,this.y=this.y1,this.vx=0,this.vy=0):(this.x=o,this.y=l,this.vx=c,this.vy=h,this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this))),this.emitUpdate()}emitUpdate(){this.events.emit("update",{x:this.x,y:this.y})}},import_ag_charts_core144=require("ag-charts-core"),import_ag_charts_core141=require("ag-charts-core"),element=null;function sanitizeHtml(t){const e=(0,import_ag_charts_core141.toPlainText)(t);return e===""?"":(element??(element=(0,import_ag_charts_core141.createElement)("div")),element.textContent=e,element.innerHTML.replaceAll(`
|
|
`,"<br>"))}var import_ag_charts_core143=require("ag-charts-core"),import_ag_charts_core142=require("ag-charts-core");function drawMarkerUnitPolygon(t,e){const{path:i,size:s}=t,{x:n,y:r}=t;i.clear();let a=!1;for(const[o,l]of e){const c=n+(o-.5)*s,h=r+(l-.5)*s;a?i.lineTo(c,h):i.moveTo(c,h),a=!0}i.closePath()}var MARKER_SHAPES={circle({path:t,x:e,y:i,size:s}){const n=s/2;t.arc(e,i,n,0,Math.PI*2),t.closePath()},cross(t){drawMarkerUnitPolygon(t,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},diamond(t){drawMarkerUnitPolygon(t,[[.5,0],[1,.5],[.5,1],[0,.5]])},heart({path:t,x:e,y:i,size:s}){const n=s/4;i=i+n/2,t.arc(e-n,i-n,n,(0,import_ag_charts_core142.toRadians)(130),(0,import_ag_charts_core142.toRadians)(330)),t.arc(e+n,i-n,n,(0,import_ag_charts_core142.toRadians)(220),(0,import_ag_charts_core142.toRadians)(50)),t.lineTo(e,i+n),t.closePath()},pin({path:t,x:e,y:i,size:s}){t.moveTo(e+(.891-.5)*s,i+(.391-.5)*s),t.cubicCurveTo(e+(.891-.5)*s,i+(.606-.5)*s,e+(.5-.5)*s,i+(1-.5)*s,e+(.5-.5)*s,i+(1-.5)*s),t.cubicCurveTo(e+(.5-.5)*s,i+(1-.5)*s,e+(.109-.5)*s,i+(.606-.5)*s,e+(.109-.5)*s,i+(.391-.5)*s),t.cubicCurveTo(e+(.109-.5)*s,i+(.175-.5)*s,e+(.284-.5)*s,i+(0-.5)*s,e+(.5-.5)*s,i+(0-.5)*s),t.cubicCurveTo(e+(.716-.5)*s,i+(0-.5)*s,e+(.891-.5)*s,i+(.175-.5)*s,e+(.891-.5)*s,i+(.391-.5)*s),t.closePath()},plus(t){drawMarkerUnitPolygon(t,[[1/3,0],[2/3,0],[2/3,1/3],[1,1/3],[1,2/3],[2/3,2/3],[2/3,1],[1/3,1],[1/3,2/3],[0,2/3],[0,1/3],[1/3,1/3]])},square({path:t,x:e,y:i,size:s,pixelRatio:n}){const r=s/2;t.moveTo(align(n,e-r),align(n,i-r)),t.lineTo(align(n,e+r),align(n,i-r)),t.lineTo(align(n,e+r),align(n,i+r)),t.lineTo(align(n,e-r),align(n,i+r)),t.closePath()},star({path:t,x:e,y:i,size:s}){const r=s/2,a=r/2,o=Math.PI/2;for(let l=0;l<5*2;l++){const c=l%2===0?r:a,h=l*Math.PI/5-o,u=e+Math.cos(h)*c,d=i+Math.sin(h)*c;t.lineTo(u,d)}t.closePath()},triangle(t){drawMarkerUnitPolygon(t,[[.5,0],[1,.87],[0,.87]])}},InternalMarker=class extends Path{constructor(){super(...arguments),this.shape="square",this.x=0,this.y=0,this.size=12}isPointInPath(t,e){return this.distanceSquared(t,e)<=0}get midPoint(){return{x:this.x,y:this.y}}distanceSquared(t,e){const i=Marker.anchor(this.shape),s=t-this.x+(i.x-.5)*this.size,n=e-this.y+(i.y-.5)*this.size,r=this.size/2;return Math.max(s*s+n*n-r*r,0)}updatePath(){const{path:t,shape:e,x:i,y:s,size:n}=this,r=this.layerManager?.canvas?.pixelRatio??1,a=Marker.anchor(e),o={path:t,x:i-(a.x-.5)*n,y:s-(a.y-.5)*n,size:n,pixelRatio:r};t.clear(),typeof e=="string"?MARKER_SHAPES[e](o):typeof e=="function"&&e(o)}computeBBox(){const{x:t,y:e,size:i}=this,s=Marker.anchor(this.shape);return new BBox(t-i*s.x,e-i*s.y,i,i)}executeFill(t,e){if(e)return super.executeFill(t,e)}executeStroke(t,e){if(e)return super.executeStroke(t,e)}};__decorateClass([(0,import_ag_charts_core143.DeclaredSceneObjectChangeDetection)({equals:import_ag_charts_core143.TRIPLE_EQ})],InternalMarker.prototype,"shape",2),__decorateClass([(0,import_ag_charts_core143.DeclaredSceneChangeDetection)()],InternalMarker.prototype,"x",2),__decorateClass([(0,import_ag_charts_core143.DeclaredSceneChangeDetection)()],InternalMarker.prototype,"y",2),__decorateClass([(0,import_ag_charts_core143.DeclaredSceneChangeDetection)({convertor:Math.abs})],InternalMarker.prototype,"size",2);var Marker=class extends Rotatable(Scalable(Translatable(InternalMarker))){static anchor(t){return t==="pin"?{x:.5,y:1}:typeof t=="function"&&"anchor"in t?t.anchor:{x:.5,y:.5}}constructor(t){super(t),t?.shape!=null&&(this.shape=t.shape)}resetAnimationProperties(t,e,i,s,n,r){this.__x=t,this.__y=e,this.__size=i,this.__opacity=s,this.resetScalingProperties(n,r,t,e),this.dirtyPath=!0,this.markDirty()}};function legendSymbolSvg(t,e,i=e*(5/3)){const s=new Group,n=Math.min(t.marker.strokeWidth??1,2),r=t.line?.enabled?Math.min(t.line.strokeWidth,2):0,a=Math.max(t.marker.enabled===!1?0:e,t.line==null?0:i),o=Math.max(t.marker.enabled===!1?0:e,r);if(t.line?.enabled){const{stroke:l,strokeOpacity:c,lineDash:h}=t.line,u=new Line;u.x1=0,u.y1=o/2,u.x2=a,u.y2=o/2,u.stroke=l,u.strokeOpacity=c,u.strokeWidth=r,u.lineDash=h,s.append(u)}if(t.marker.enabled!==!1){const{shape:l,fill:c,fillOpacity:h,stroke:u,strokeOpacity:d,lineDash:p,lineDashOffset:g}=t.marker,f=new Marker;f.shape=l??"square",f.size=e,f.fill=c,f.fillOpacity=h??1,f.stroke=u,f.strokeOpacity=d??1,f.strokeWidth=n,f.lineDash=p,f.lineDashOffset=g??0;const y=Marker.anchor(l),m=a/2+(y.x-.5)*e,b=o/2+(y.y-.5)*e,v=e/(e+n);f.x=m,f.y=b,f.scalingCenterX=m,f.scalingCenterY=b,f.scalingX=v,f.scalingY=v,s.append(f)}return Group.toSVG(s,a,o)}var DEFAULT_TOOLTIP_CLASS="ag-charts-tooltip",DEFAULT_TOOLTIP_DARK_CLASS="ag-charts-tooltip--dark";function textOrSegmentsIsDefined(t){return t==null?!1:Array.isArray(t)?t.some(e=>textOrSegmentsIsDefined(e.text)):(0,import_ag_charts_core144.toTextString)(t).trim()!==""}function isTooltipValueMissing(t,e=!1){return t==null?!e:typeof t=="number"&&!Number.isFinite(t)}function hasAllMissingData(t){return t.type==="raw"||!t.data||t.data.length===0?!1:t.data.every(e=>e.missing===!0)}function aggregateTooltipContent(t){const e=[],i=new Map;for(const s of t)if(!hasAllMissingData(s))if(s.type==="structured"){const{heading:n}=s,r=textOrSegmentsIsDefined(n)?i.get(n):void 0,a={type:"structured",heading:n,items:[s]};r==null?(i.set(n,a),e.push(a)):r.items.push(s)}else e.push(s);return e}function tooltipContentAriaLabel(t){const e=aggregateTooltipContent(t),i=[];for(const s of e)if(s.type!=="raw"){textOrSegmentsIsDefined(s.heading)&&i.push((0,import_ag_charts_core144.toPlainText)(s.heading));for(const n of s.items)if(textOrSegmentsIsDefined(n.title)&&i.push((0,import_ag_charts_core144.toPlainText)(n.title)),n.data)for(const r of n.data)r.missing!==!0&&i.push(r.label??r.fallbackLabel,(0,import_ag_charts_core144.toPlainText)(r.value))}return i.filter(s=>s!=="").join("; ")}function dataHtml(t,e,i){let s="";textOrSegmentsIsDefined(t)?(s+=`<span class="${DEFAULT_TOOLTIP_CLASS}-label">${sanitizeHtml(t)}</span>`,s+=" ",s+=`<span class="${DEFAULT_TOOLTIP_CLASS}-value">${sanitizeHtml(e)}</span>`):s+=`<span class="${DEFAULT_TOOLTIP_CLASS}-label">${sanitizeHtml(e)}</span>`;const n=[`${DEFAULT_TOOLTIP_CLASS}-row`];return i&&n.push(`${DEFAULT_TOOLTIP_CLASS}-row--inline`),s=`<div class="${n.join(" ")}">${s}</div>`,s}function tooltipRowContentHtml(t){let e="";if(t.data?.length&&t.data.every(r=>r.missing===!0))return e;const i=textOrSegmentsIsDefined(t.title),s=!i&&t.data?.length===1,n=t.symbol==null?void 0:legendSymbolSvg(t.symbol,12);if(n!=null&&(i||t.data?.length)&&(e+=`<span class="${DEFAULT_TOOLTIP_CLASS}-symbol">${n}</span>`),i&&(e+=`<span class="${DEFAULT_TOOLTIP_CLASS}-title">${sanitizeHtml(t.title)}</span>`,e+=" "),t.data)for(const r of t.data)r.missing!==!0&&(e+=dataHtml(r.label??r.fallbackLabel,(0,import_ag_charts_core144.toPlainText)(r.value),s),e+=" ");return e}function tooltipPaginationContentHtml(t,e){if(t==null||e.length===1)return;const i=t?.t("tooltipPaginationStatus",{index:e.index+1,count:e.length});return`<div class="${DEFAULT_TOOLTIP_CLASS}-footer">${i}</div>`}function tooltipContentHtml(t,e,i,s){const n=e.items.length===1?e.items[0]:void 0;let r,a,o;switch(i){case"compact":r=!0,a=(0,import_ag_charts_core144.toPlainText)(n?.title);break;case"single":const h=textOrSegmentsIsDefined(e.heading);r=n!=null&&(!h||n.title==null)&&n.data?.length===1&&n.data[0].label==null&&n.data[0].value!=null,o=(0,import_ag_charts_core144.toPlainText)(h?e.heading:n?.title);break;case"shared":r=!1}let l="";if(r&&n!=null){if(textOrSegmentsIsDefined(a)&&(l+=`<span class="${DEFAULT_TOOLTIP_CLASS}-title">${sanitizeHtml(a)}</span>`),n.data)for(const h of n.data)h.missing!==!0&&(l+=dataHtml(h.label??o,(0,import_ag_charts_core144.toPlainText)(h.value),!1),l+=" ")}else{textOrSegmentsIsDefined(e.heading)&&(l+=`<span class="${DEFAULT_TOOLTIP_CLASS}-heading">${sanitizeHtml((0,import_ag_charts_core144.toPlainText)(e.heading))}</span>`,l+=" ");for(const h of e.items)l+=tooltipRowContentHtml(h)}if(l.length===0)return;const c=i!=="compact"&&s!=null?tooltipPaginationContentHtml(t,s):void 0;return c+null&&(l+=c),l=`<div class="${DEFAULT_TOOLTIP_CLASS}-content">${l.trimEnd()}</div>`,l}function tooltipPaginationHtml(t,e){const i=e==null?void 0:tooltipPaginationContentHtml(t,e);return i==null?"":`<div class="${DEFAULT_TOOLTIP_CLASS}-content">${i}</div>`}function tooltipHtml(t,e,i,s){const n=aggregateTooltipContent(e);if(n.length!==0){if(n.length===1&&n[0].type==="structured")return tooltipContentHtml(t,n[0],i,s);{const r=n.map(a=>a.type==="structured"?tooltipContentHtml(t,a,i):a.rawHtmlString);return s!=null&&r.push(tooltipPaginationHtml(t,s)??""),r.join("")}}}var horizontalAlignments={left:-1,"top-left":-1,"bottom-left":-1,top:0,center:0,bottom:0,right:1,"top-right":1,"bottom-right":1},verticalAlignments={"top-left":-1,top:-1,"top-right":-1,left:0,center:0,right:0,"bottom-left":1,bottom:1,"bottom-right":1},arrowPositions={left:3,"top-left":void 0,"bottom-left":void 0,top:2,center:void 0,bottom:1,right:0,"top-right":void 0,"bottom-right":void 0},directionChecks={top:2,bottom:2,left:1,right:1,"top-right":3,"top-left":3,"bottom-right":3,"bottom-left":3,center:0},defaultPlacements={pointer:"top",node:"top",chart:"top-left"},TooltipPosition=class extends import_ag_charts_core145.BaseProperties{constructor(){super(...arguments),this.xOffset=0,this.yOffset=0}};__decorateClass([import_ag_charts_core145.Property],TooltipPosition.prototype,"xOffset",2),__decorateClass([import_ag_charts_core145.Property],TooltipPosition.prototype,"yOffset",2),__decorateClass([import_ag_charts_core145.Property],TooltipPosition.prototype,"anchorTo",2),__decorateClass([import_ag_charts_core145.Property],TooltipPosition.prototype,"placement",2);var Tooltip=class extends import_ag_charts_core145.BaseProperties{constructor(){super(),this.enabled=!0,this.mode="single",this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new TooltipPosition,this.pagination=!1,this.darkTheme=!1,this.bounds="extended",this.cleanup=new import_ag_charts_core145.CleanupRegistry,this.springAnimation=new SpringAnimation,this.enableInteraction=!1,this.wrapTypes=["always","hyphenate","on-space","never"],this.sizeMonitor=new SizeMonitor,this._elementSize=void 0,this._showTimeout=void 0,this.arrowPosition=void 0,this._visible=!1,this.positionParams=void 0,this.localeManager=void 0,this.cleanup.register(this.springAnimation.events.on("update",this.updateTooltipPosition.bind(this)))}get interactive(){return this.enableInteraction}setup(t,e){return"togglePopover"in(0,import_ag_charts_core145.getWindow)().HTMLElement.prototype&&(this.element=e.addChild("tooltip-container",DEFAULT_TOOLTIP_CLASS),this.element.setAttribute("popover","manual"),this.element.className=DEFAULT_TOOLTIP_CLASS,this.element.style.positionAnchor=e.anchorName,this.sizeMonitor.observe(this.element,i=>{this._elementSize=i,this.updateTooltipPosition()})),this.localeManager=t,()=>{e.removeChild("tooltip-container",DEFAULT_TOOLTIP_CLASS),this.cleanup.flush(),this.element&&this.sizeMonitor.unobserve(this.element)}}isVisible(){return this._visible}contains(t){return this.element?.contains(t)??!1}updateTooltipPosition(){const{element:t,_elementSize:e,positionParams:i}=this;if(t==null||e==null||i==null)return;const{canvasRect:s,relativeRect:n,meta:r}=i,{x:a,y:o}=this.springAnimation,l=r.position?.anchorTo??"pointer";let c=r.position?.placement??defaultPlacements[l];Array.isArray(c)||(c=[c]);const h=r.position?.xOffset??0,u=r.position?.yOffset??0,d=n.x,p=n.y,g=n.width-e.width-1+d,f=n.height-e.height+p;let y=0,m,b,v=!1;do{m=c[y],y+=1;const T=this.getTooltipBounds({elementSize:e,placement:m,anchorTo:l,canvasX:a,canvasY:o,yOffset:u,xOffset:h,canvasRect:s});b=(0,import_ag_charts_core145.calculatePlacement)(e.width,e.height,n,T),v=!1,directionChecks[m]&1&&(v||(v=b.x<d||b.x>g)),directionChecks[m]&2&&(v||(v=b.y<p||b.y>f))}while(y<c.length&&v);const x=(0,import_ag_charts_core145.clamp)(d,b.x,g),S=(0,import_ag_charts_core145.clamp)(p,b.y,f);v||(v=x!==b.x||S!==b.y);const I=l!=="chart"&&!v&&!h&&!u,D=r.showArrow??this.showArrow??I;this.arrowPosition=D?arrowPositions[m]:void 0,this.updateClassModifiers(),t.style.translate=`${x}px ${S}px`}show(t,e,i,s,n,r=!1){const{element:a}=this;if(a!=null&&s!=null&&s.length!==0){const c=tooltipHtml(this.localeManager,s,this.mode,this.pagination?n:void 0);if(c==null){a.innerHTML="",this.toggle(!1);return}a.innerHTML=c}else if(a==null||a.innerHTML===""){this.toggle(!1);return}const o={x:t.x-e.x,y:t.y-e.y,width:t.width,height:t.height};switch(this.positionParams={canvasRect:e,relativeRect:o,meta:i},i.position?.anchorTo??"pointer"){case"node":this.springAnimation.update(i.nodeCanvasX??i.canvasX,i.nodeCanvasY??i.canvasY);break;case"pointer":this.springAnimation.update(i.canvasX,i.canvasY);break;case"chart":this.springAnimation.reset()}i.enableInteraction?(this.enableInteraction=!0,a.style.pointerEvents="auto",a.removeAttribute("aria-hidden"),a.tabIndex=-1):(this.enableInteraction=!1,a.style.pointerEvents="none",a.setAttribute("aria-hidden","true"),a.removeAttribute("tabindex")),a.style.setProperty("--top",`${e.top}px`),a.style.setProperty("--left",`${e.left}px`),this.updateClassModifiers(),this.toggle(!0,r)}hide(){this.toggle(!1)}maybeEnterInteractiveTooltip({relatedTarget:t},e){const{interactive:i,interactiveLeave:s,enabled:n,element:r}=this;if(r==null)return!1;if(s)return!0;const a=i&&n&&this.isVisible()&&(0,import_ag_charts_core145.isNode)(t)&&this.contains(t);return a&&(this.interactiveLeave={callback:e,listener:o=>{(o.relatedTarget==null||(0,import_ag_charts_core145.isNode)(o.relatedTarget)&&!this.contains(o.relatedTarget))&&this.popInteractiveLeaveCallback()}},r.addEventListener("focusout",this.interactiveLeave.listener),r.addEventListener("mouseout",this.interactiveLeave.listener)),a}popInteractiveLeaveCallback(){const{interactiveLeave:t,element:e}=this;this.interactiveLeave=void 0,t&&(e&&(e.removeEventListener("focusout",t.listener),e.removeEventListener("mouseout",t.listener)),t.callback())}toggle(t,e=!1){const{delay:i}=this;t&&i>0&&!e?this._showTimeout??(this._showTimeout=setTimeout(()=>{this._showTimeout=void 0,this.toggleCallback(!0)},i)):(clearTimeout(this._showTimeout),this._showTimeout=void 0,this.toggleCallback(t))}toggleCallback(t){this.element?.isConnected&&this._visible!==t&&(this._visible=t,this.element.togglePopover(t),t?this.updateTooltipPosition():(this.springAnimation.reset(),this.popInteractiveLeaveCallback()))}updateClassModifiers(){if(!this.element?.isConnected)return;const{classList:t}=this.element,e=(i,s)=>t.toggle(`${DEFAULT_TOOLTIP_CLASS}--${i}`,s);e("no-interaction",!this.enableInteraction),e("arrow-top",this.arrowPosition===1),e("arrow-right",this.arrowPosition===3),e("arrow-bottom",this.arrowPosition===2),e("arrow-left",this.arrowPosition===0),e("compact",this.mode==="compact"),t.toggle(DEFAULT_TOOLTIP_DARK_CLASS,this.darkTheme);for(const i of this.wrapTypes)t.toggle(`${DEFAULT_TOOLTIP_CLASS}--wrap-${i}`,i===this.wrapping)}getTooltipBounds(t){const{elementSize:e,anchorTo:i,placement:s,canvasX:n,canvasY:r,yOffset:a,xOffset:o,canvasRect:l}=t,{width:c,height:h}=e,u={width:c,height:h};if(i==="node"||i==="pointer"){const d=horizontalAlignments[s],p=verticalAlignments[s];return u.top=r+a+h*(p-1)/2+8*p,u.left=n+o+c*(d-1)/2+8*d,u}switch(s){case"top":return u.top=a,u.left=l.width/2-c/2+o,u;case"right":return u.top=l.height/2-h/2+a,u.left=l.width-c+o,u;case"left":return u.top=l.height/2-h/2+a,u.left=o,u;case"bottom":return u.top=l.height-h+a,u.left=l.width/2-c/2+o,u;case"top-left":return u.top=a,u.left=o,u;case"top-right":return u.top=a,u.left=l.width-c+o,u;case"bottom-right":return u.top=l.height-h+a,u.left=l.width-c+o,u;case"bottom-left":return u.top=l.height-h+a,u.left=o,u}return u}};__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"enabled",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"mode",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"showArrow",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"delay",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"range",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"wrapping",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"position",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"pagination",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"darkTheme",2),__decorateClass([import_ag_charts_core145.Property],Tooltip.prototype,"bounds",2);var import_ag_charts_core146=require("ag-charts-core");function getItemId(t){return t.datum.itemId!==void 0?t.datum.itemId:typeof t.datum.datumIndex=="number"?t.datum.datumIndex:JSON.stringify(t.datum.datumIndex)}function pickedNodesEqual(t,e){return t.series===e.series&&(0,import_ag_charts_core146.objectsEqual)(t.datumIndex,e.datumIndex)}function indexOf(t,e){return e==null?-1:t.findIndex(i=>pickedNodesEqual(i,e))}var PickManager=class{constructor(t,e,i){this.activeManager=t,this.tooltipProperties=e,this.focusState=i,this.candidates=[],this.activeState=new StateTracker}getActive(){return this.activeState.stateValue()}clear(){this.activeState.clear(),this.lastNotifiedActive=void 0,this.candidates.length=0,this.pendingPickedNodes=void 0}setSource(t,e){e===void 0?this.activeState.delete(t):this.activeState.set(t,e),this.syncActiveManager()}syncActiveManager(){const t=this.getActive(),e=this.lastNotifiedActive;if(t!==e&&!(t!==void 0&&e!==void 0&&pickedNodesEqual(t,e)))if(this.lastNotifiedActive=t,t===void 0)this.activeManager.clear();else{const i=t.series.id,s=getItemId(t);this.activeManager.update({type:"series-node",seriesId:i,itemId:s},t.datum)}}popPendingPickedNodes(){const t=this.pendingPickedNodes;return this.pendingPickedNodes=void 0,t}onClearUI(){this.activeManager.clear(),this.clear()}onClearAPI(){this.clear()}onPickedNodesHighlight(t){if(t!==void 0){const i=this.getActive();if(this.tooltipProperties.pagination&&i!==void 0){const s=t.matches.find(n=>pickedNodesEqual(n,i));if(s)return s}}const e=t?.matches[0];return this.setSource("highlight",e),e}onPickedNodesTooltip(t){if(t!==void 0&&this.tooltipProperties.pagination){const i=this.getActive(),s=t.matches;this.candidates=s;let n=indexOf(s,i);n===-1&&(n=0);const r=s[n];this.setSource("tooltip",r);const a={index:n,length:s.length};return{active:r,paginationState:a}}const e=t?.matches[0];return this.setSource("tooltip",e),{active:e}}onPickedNodesFocus(t){const{series:e}=this.focusState;if(this.clear(),e!==void 0&&t!==void 0){const{datum:i,datumIndex:s}=t;this.setSource("focus",{series:e,datum:i,datumIndex:s})}}onPickedNodesAPI(t){return this.pendingPickedNodes=t,t.matches[0]}onPickedNodesAPIDebounced(){return{active:this.onPickedNodesHighlight(this.popPendingPickedNodes())}}nextCandidate(){if(this.tooltipProperties.pagination){const{candidates:t}=this,e=this.getActive(),i=e==null?-1:t.findIndex(a=>pickedNodesEqual(a,e));if(i===-1)return{active:void 0,paginationState:void 0};let s=i+1;s>=t.length&&(s=0);const n=t[s];this.setSource("tooltip",n);const r={index:s,length:this.candidates.length};return{active:n,paginationState:r}}return{active:this.getActive()}}},SeriesAreaManager=class extends BaseManager{constructor(t){super(),this.chart=t,this.id=(0,import_ag_charts_core147.createId)(this),this.series=[],this.announceMode="when-changed",this.highlight={pendingHoverEvent:void 0,appliedHoverEvent:void 0,stashedHoverEvent:void 0},this.tooltip={lastHover:void 0},this.activeState={lastActive:void 0},this.hoverDevice="pointer",this.focus={sortedSeries:[],series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.cachedTooltipContent=void 0,this.hoverScheduler=debouncedAnimationFrame(()=>{if(this.hoverDevice==="setState")return this.handleHoverFromState();if(!(!this.tooltip.lastHover&&!this.highlight.pendingHoverEvent)){if(this.chart.getUpdateType()<=import_ag_charts_core147.ChartUpdateType.SERIES_UPDATE){this.hoverScheduler.schedule();return}this.highlight.pendingHoverEvent&&this.handleHoverHighlight(!1),this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!1)}}),this.pickManager=new PickManager(t.ctx.activeManager,t.tooltip,this.focus);const e=t.ctx.localeManager.t("ariaInitSeriesArea"),i=t.ctx.domManager.addChild("series-area","series-area-aria-label1"),s=t.ctx.domManager.addChild("series-area","series-area-aria-label2");this.swapChain=new FocusSwapChain(i,s,"img",e),this.swapChain.addListener("blur",o=>this.onBlur(o)),this.swapChain.addListener("focus",()=>this.onFocus()),t.ctx.domManager.mode==="normal"&&(this.focusIndicator=new FocusIndicator(this.swapChain),this.focusIndicator.overrideFocusVisible(t.mode==="integrated"?!1:void 0));const{seriesDragInterpreter:n,seriesWidget:r,containerWidget:a}=t.ctx.widgets;r.setTabIndex(-1),this.cleanup.register(()=>t.ctx.domManager.removeChild("series-area","series-area-aria-label1"),()=>t.ctx.domManager.removeChild("series-area","series-area-aria-label2"),r.addListener("focus",()=>this.swapChain.focus({preventScroll:!0})),r.addListener("mousemove",o=>this.onHover(o,r)),r.addListener("wheel",o=>this.onWheel(o)),r.addListener("mouseleave",o=>this.onLeave(o)),r.addListener("keydown",o=>this.onKeyDown(o)),r.addListener("contextmenu",(o,l)=>this.onContextMenu(o,l)),a.addListener("contextmenu",(o,l)=>this.onContextMenu(o,l)),a.addListener("click",(o,l)=>this.onClick(o,l)),a.addListener("dblclick",(o,l)=>this.onClick(o,l)),t.ctx.animationManager.addListener("animation-start",()=>this.onAnimationStart()),t.ctx.eventsHub.on("active:load-memento",o=>this.onActiveLoadMemento(o)),t.ctx.eventsHub.on("active:update",o=>this.onActiveUpdate(o)),t.ctx.eventsHub.on("dom:resize",()=>this.clearAll()),t.ctx.eventsHub.on("highlight:change",o=>this.changeHighlightDatum(o)),t.ctx.eventsHub.on("layout:complete",o=>this.layoutComplete(o)),t.ctx.updateService.addListener("pre-scene-render",()=>this.preSceneRender()),t.ctx.updateService.addListener("update-complete",()=>this.updateComplete()),t.ctx.eventsHub.on("zoom:change-complete",()=>this.clearAll()),t.ctx.eventsHub.on("zoom:pan-start",()=>this.clearAll())),n&&this.cleanup.register(n.events.on("drag-move",o=>this.onDragMove(o,r)),n.events.on("click",o=>this.onClick(o,r)),n.events.on("dblclick",o=>this.onClick(o,r)))}get bbox(){return(this.seriesRect??BBox.zero).clone()}isState(t){return this.chart.ctx.interactionManager.isState(t)}isIgnoredTouch(t){return!(t.device!=="touch"||t.type==="click"||this.chart.ctx.chartService.touch.dragAction==="hover"||this.chart.ctx.chartService.touch.dragAction==="drag"&&this.isState(18))}dataChanged(){var t;this.cachedTooltipContent=void 0,this.highlight.appliedHoverEvent&&((t=this.highlight).stashedHoverEvent??(t.stashedHoverEvent=this.highlight.appliedHoverEvent),this.clearHighlight()),this.hoverDevice!=="setState"&&(this.chart.ctx.tooltipManager.removeTooltip(this.id),this.focusIndicator?.clear())}preSceneRender(){this.highlight.stashedHoverEvent!=null&&(this.highlight.pendingHoverEvent=this.tooltip.lastHover??this.highlight.stashedHoverEvent,this.highlight.stashedHoverEvent=void 0,this.handleHoverHighlight(!0)),this.tooltip.lastHover!=null&&this.handleHoverTooltip(this.tooltip.lastHover,!0),this.hoverDevice==="setState"&&this.refreshSetState()}updateComplete(){this.isState(68)&&this.focusIndicator?.isFocusVisible()&&(this.announceMode!=="always"&&(this.announceMode="never"),this.handleFocus(0,0))}update(t,e){this.chart.ctx.updateService.update(t,e)}seriesChanged(t){this.focus.sortedSeries=[...t].sort((e,i)=>{let s=e.properties.focusPriority??1/0,n=i.properties.focusPriority??1/0;return s===n&&([s,n]=[e.declarationOrder,i.declarationOrder]),s<n?-1:s>n?1:0}),this.series=t}layoutComplete(t){this.seriesRect=t.series.rect,this.hoverRect=t.series.rect,this.chart.ctx.widgets.seriesWidget.setBounds(t.series.rect),this.chart.ctx.domManager.mode==="normal"&&this.chart.ctx.widgets.chartWidget.setBounds(t.chart)}onAnimationStart(){this.hoverDevice!=="setState"&&this.clearAll()}onContextMenu(t,e){const{sourceEvent:i}=t;if(i.currentTarget!=e.getElement())return;if(e!==this.chart.ctx.widgets.seriesWidget){if(this.isState(72)){const{currentX:c,currentY:h}=t;this.chart.ctx.contextMenuRegistry.dispatchContext("always",{widgetEvent:t,canvasX:c,canvasY:h},void 0)}return}let s,n;if(this.focusIndicator?.isFocusVisible())s=this.chart.ctx.highlightManager.getActiveHighlight(),s&&this.seriesRect&&s.midPoint&&(n=Transformable.toCanvasPoint(s.series.contentGroup,s.midPoint.x,s.midPoint.y));else if(this.isState(72)){const c=this.pickNodes({x:t.currentX,y:t.currentY},"context-menu");c&&(this.chart.ctx.highlightManager.updateHighlight(this.id),s=c.matches[0].datum)}const r=s?.series;this.clearAll();const a=t.currentX+e.cssLeft(),o=t.currentY+e.cssTop(),{datumIndex:l}=s??{};r&&s&&l!=null?this.chart.ctx.contextMenuRegistry.dispatchContext("series-node",{widgetEvent:t,canvasX:a,canvasY:o},{pickedSeries:r,pickedNode:{...s,datumIndex:l}},n):this.chart.ctx.contextMenuRegistry.dispatchContext("series-area",{widgetEvent:t,canvasX:a,canvasY:o},void 0,n)}onLeave(t){!this.isState(82)||t.sourceEvent.relatedTarget?.className==="ag-charts-text-input__textarea"||this.maybeEnterInteractiveTooltip(t.sourceEvent)||(this.chart.ctx.domManager.updateCursor(this.id),this.hoverDevice!=="keyboard"&&this.clearAll(!0))}onWheel(t){this.isState(82)&&(this.focusIndicator?.overrideFocusVisible(!1),this.hoverDevice="pointer")}onDragMove(t,e){this.isState(82)&&(this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(t,e))}onHover(t,e){this.isState(82)&&this.onHoverLikeEvent(t,e)}onHoverLikeEvent(t,e){if(this.isIgnoredTouch(t)||(t.device==="touch"&&this.chart.ctx.chartService.touch.dragAction==="hover"&&t.sourceEvent.preventDefault(),e!==this.chart.ctx.widgets.seriesWidget))return;this.tooltip.lastHover=t,this.hoverDevice="pointer",this.highlight.pendingHoverEvent=t,this.hoverScheduler.schedule();let i;if(this.isState(64)){const{currentX:n,currentY:r}=t;i=this.pickNodes({x:n,y:r},"event");const a=i?.matches,o=a?.[0];o?.series.hasEventListener("seriesNodeClick")||o?.series.hasEventListener("seriesNodeDoubleClick")||a!=null&&a.length>1&&this.chart.tooltip.pagination?this.chart.ctx.domManager.updateCursor(this.id,"pointer"):this.chart.ctx.domManager.updateCursor(this.id)}const s=!!i?.matches.length;this.emitSeriesAreaHoverEvent(t,s)}onClick(t,e){if(t.device==="keyboard"||(e===this.chart.ctx.widgets.seriesWidget&&this.chart.ctx.animationManager.isActive()&&this.chart.ctx.animationManager.skipCurrentBatch(),t.device==="touch"&&e===this.chart.ctx.widgets.seriesWidget&&this.swapChain.focus({preventScroll:!0}),!this.isState(82)))return;if(e===this.chart.ctx.widgets.seriesWidget){if(!e.getElement().contains(t.sourceEvent.target))return}else if(t.sourceEvent.target!=e.getElement())return;this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(t,e);const i=e===this.chart.ctx.widgets.seriesWidget;if(!this.isState(64)){i&&this.emitSeriesAreaClickEvent(t,!1);return}if(i){if(this.checkSeriesNodeClick(t)){this.emitSeriesAreaClickEvent(t,!0),this.update(import_ag_charts_core147.ChartUpdateType.SERIES_UPDATE),t.sourceEvent.preventDefault();return}this.emitSeriesAreaClickEvent(t,!1)}const s={type:t.type==="click"?"click":"doubleClick",event:t.sourceEvent};this.chart.fireEvent(s)}emitSeriesAreaHoverEvent(t,e){const{canvasX:i,canvasY:s}=this.toCanvasCoordinates(t),n={canvasX:i,canvasY:s,consumed:e,sourceEvent:t.sourceEvent};this.chart.ctx.eventsHub.emit("series-area:hover",n)}emitSeriesAreaClickEvent(t,e){if(!("currentX"in t))return;const{canvasX:i,canvasY:s}=this.toCanvasCoordinates(t),n={canvasX:i,canvasY:s,consumed:e,sourceEvent:t.sourceEvent};this.chart.ctx.eventsHub.emit("series-area:click",n)}toCanvasCoordinates(t){return{canvasX:t.currentX+(this.hoverRect?.x??this.seriesRect?.x??0),canvasY:t.currentY+(this.hoverRect?.y??this.seriesRect?.y??0)}}onFocus(){this.isState(68)&&(this.hoverDevice=this.focusIndicator?.isFocusVisible(!0)?"keyboard":"pointer",this.handleFocus(0,0))}onBlur(t){this.isState(68)&&(this.hoverDevice="pointer",this.maybeEnterInteractiveTooltip(t)||this.clearAll(!0),this.focusIndicator?.overrideFocusVisible(void 0))}onKeyDown(t){if(!this.isState(86))return;const e=mapKeyboardEventToAction(t.sourceEvent);switch(e?.activatesFocusIndicator===!1&&this.focusIndicator?.overrideFocusVisible(this.hoverDevice==="keyboard"),e?.name){case"redo":return this.chart.ctx.eventsHub.emit("series:redo",null);case"undo":return this.chart.ctx.eventsHub.emit("series:undo",null);case"zoomin":return this.chart.ctx.eventsHub.emit("series:keynav-zoom",{delta:1,widgetEvent:t});case"zoomout":return this.chart.ctx.eventsHub.emit("series:keynav-zoom",{delta:-1,widgetEvent:t});case"arrowup":return this.onArrow(-1,0,t);case"arrowdown":return this.onArrow(1,0,t);case"arrowleft":return this.onArrow(0,-1,t);case"arrowright":return this.onArrow(0,1,t);case"submit":return this.onSubmit(t)}}onArrow(t,e,i){this.isState(68)&&(this.hoverDevice="keyboard",this.focusIndicator?.overrideFocusVisible(!0),this.focus.seriesIndex+=t,this.focus.datumIndex+=e,this.handleFocus(t,e),i.sourceEvent.preventDefault(),this.chart.ctx.eventsHub.emit("series:focus-change",null))}onSubmit(t){if(!this.isState(68))return;const{series:e,datum:i}=this.focus,s=t.sourceEvent;e!=null&&i!=null?e.fireNodeClickEvent(s,i):this.chart.fireEvent({type:"click",event:s}),s.preventDefault()}checkSeriesNodeClick(t){var e;const i=this.pickNodes({x:t.currentX,y:t.currentY},"event"),s=this.pickManager.onPickedNodesTooltip(i);if(i===void 0||s.active===void 0)return!1;const{series:n,datum:r}=s.active,a=s.paginationState==null?i.distance:0;if(t.type==="click"){if(n.fireNodeClickEvent(t.sourceEvent,r)){const l=this.pickManager.nextCandidate();if(l.active!==void 0){const{canvasX:c,canvasY:h}=this.toCanvasCoordinates(t);(e=this.highlight).pendingHoverEvent??(e.pendingHoverEvent=this.highlight.appliedHoverEvent),this.handleHoverHighlight(!1),this.showTooltip(l.active,c,h,l.paginationState)}}return!0}return t.type==="dblclick"?(t.preventZoomDblClick=a===0,n.fireNodeDoubleClickEvent(t.sourceEvent,r),!0):!1}handleFocus(t,e){const i=this.chart.overlays.getFocusInfo(this.chart.ctx.localeManager);i==null?this.handleSeriesFocus(t,e)===0?this.announceMode="when-changed":this.announceMode="always":(this.focusIndicator?.update(i.rect,this.seriesRect,!1),this.swapChain.update(i.text),this.announceMode="always")}handleSeriesFocus(t,e){if(this.chart.chartType==="standalone")return this.handleSoloSeriesFocus(t,e);const{focus:i}=this,s=i.sortedSeries.filter(l=>l.visible&&l.focusable);if(s.length===0)return 1;const n=i.datumIndex-e,r=i.seriesIndex-t;i.seriesIndex=(0,import_ag_charts_core147.clamp)(0,i.seriesIndex,s.length-1),i.series=s[i.seriesIndex];const a=this.focus.datumIndex,o=this.focus.seriesIndex;return this.updatePickedFocus(a,e,n,o,t,r)}handleSoloSeriesFocus(t,e){this.focus.series=this.focus.sortedSeries[0];const i=this.focus.datumIndex,s=this.focus.seriesIndex,n=this.focus.datumIndex-e,r=this.focus.seriesIndex-t;return this.updatePickedFocus(i,e,n,s,t,r)}pickFocus(t,e){const i=t.pickFocus(e);return this.hoverDevice==="keyboard"&&this.pickManager.onPickedNodesFocus(i),i}updatePickedFocus(t,e,i,s,n,r){const{focus:a,hoverRect:o,seriesRect:l}=this;if(a.series==null||o==null)return 1;const c={datumIndex:t,datumIndexDelta:e,otherIndex:s,otherIndexDelta:n,seriesRect:l},h=this.pickFocus(a.series,c);if(!h)return 2;const{datum:u}=h;if(a.datum=u,a.datumIndex=h.datumIndex,h.otherIndex!=null&&(a.seriesIndex=h.otherIndex),this.focusIndicator?.isFocusVisible()){this.chart.ctx.animationManager.reset();const g=getPickedFocusBBox(h),{x:f,y}=g.computeCenter();if(!o.containsPoint(f,y)&&this.chart.ctx.zoomManager.panToBBox(o,g))return 3;const{x1:m,x2:b,y1:v,y2:x}=import_ag_charts_core147.Vec4.from(g),S=o.containsPoint(m,v),I=o.containsPoint(b,v),D=o.containsPoint(m,x),T=o.containsPoint(b,x);if(!(S||I||D||T)){const A=import_ag_charts_core147.Vec4.from(o);h.movedBounds=g.clone(),m<A.x1&&b<A.x1?(h.movedBounds.x=A.x1-2,h.movedBounds.width=4):m>A.x2&&b>A.x2&&(h.movedBounds.x=A.x2-2,h.movedBounds.width=4),v<A.y1&&x<A.y1?(h.movedBounds.y=A.y1-2,h.movedBounds.height=4):v>A.y2&&x>A.y2&&(h.movedBounds.y=A.y2-2,h.movedBounds.height=4)}}this.focusIndicator?.update(h.movedBounds??h.bounds,this.seriesRect,h.clipFocusBox);const d=this.getTooltipContent(a.series,u.datumIndex,u,"aria-label"),p=makeKeyboardPointerEvent(a.series,o,h);if(p!=null&&this.hoverDevice==="keyboard"){this.clearCachedEvents();const g=TooltipManager.makeTooltipMeta(p,a.series,u,h.movedBounds);this.chart.ctx.highlightManager.updateHighlight(this.id,u),this.isTooltipEnabled(a.series)&&this.chart.ctx.tooltipManager.updateTooltip(this.id,g,d)}return this.maybeAnnouncePickedFocus(e,i,n,r,h,d),0}maybeAnnouncePickedFocus(t,e,i,s,n,r){const{focus:a}=this;let o;this.announceMode==="when-changed"?t===0&&i===0||e!==n.datumIndex||s!==(n.otherIndex??a.seriesIndex)?o="always":o="never":o=this.announceMode,o==="always"&&this.swapChain.update(this.getDatumAriaText(n.datum,r))}getDatumAriaText(t,e){const i=e==null?"":tooltipContentAriaLabel(e);return this.chart.ctx.localeManager.t("ariaAnnounceHoverDatum",{datum:t.series.getDatumAriaText?.(t,i)??i})}clearHighlight(t=!1){this.highlight.pendingHoverEvent=void 0,this.highlight.appliedHoverEvent=void 0,this.chart.ctx.highlightManager.updateHighlight(this.id,void 0,t)}clearTooltip(t=!1){this.chart.ctx.tooltipManager.removeTooltip(this.id,void 0,t),this.tooltip.lastHover=void 0}clearAll(t=!1){this.pickManager.onClearUI(),this.clearHighlight(t),this.clearTooltip(t),this.focusIndicator?.clear()}clearCachedEvents(){this.tooltip.lastHover=void 0,this.highlight.appliedHoverEvent=void 0,this.highlight.pendingHoverEvent=void 0,this.highlight.stashedHoverEvent=void 0}handleHoverFromState(){const{active:t,paginationState:e}=this.pickManager.onPickedNodesAPIDebounced();if(t===void 0)return;this.chart.ctx.highlightManager.updateHighlight(this.id,t.datum);const i=getDatumRefPoint(t.series,t.datum,void 0);if(this.chart.tooltip.enabled&&i){const{canvasX:s,canvasY:n}=i;this.showTooltip(t,s,n,e)}}handleHoverHighlight(t){this.highlight.appliedHoverEvent=this.highlight.pendingHoverEvent,this.highlight.pendingHoverEvent=void 0;const e=this.highlight.appliedHoverEvent;if(!e||!this.isState(82))return;const{canvasX:i,canvasY:s}=this.toCanvasCoordinates(e);if(t?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(i,s)){this.clearHighlight();return}const{range:n}=this.chart.highlight,r=n==="tooltip"?"highlight-tooltip":"highlight",a=this.pickNodes({x:e.currentX,y:e.currentY},r),o=this.pickManager.onPickedNodesHighlight(a);o===void 0?this.chart.ctx.highlightManager.updateHighlight(this.id,void 0,!0):this.chart.ctx.highlightManager.updateHighlight(this.id,o.datum,!1)}handleHoverTooltip(t,e){if(!this.isState(82))return;const{canvasX:i,canvasY:s}=this.toCanvasCoordinates(t),n=t.sourceEvent.target;if(e?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(i,s)){this.hoverDevice=="pointer"&&this.clearTooltip();return}if(n&&this.chart.tooltip.interactive&&this.chart.ctx.domManager.isManagedChildDOMElement(n,"canvas-overlay",DEFAULT_TOOLTIP_CLASS))return;const r=this.pickNodes({x:t.currentX,y:t.currentY},"tooltip"),{active:a,paginationState:o}=this.pickManager.onPickedNodesTooltip(r);a===void 0?this.hoverDevice=="pointer"&&this.clearTooltip(!0):this.showTooltip(a,i,s,o)}showTooltip({series:t,datum:e,datumIndex:i},s,n,r){const a=this.getTooltipContent(t,i,e,"tooltip");if(a!=null){const l=TooltipManager.makeTooltipMeta({type:"pointermove",canvasX:s,canvasY:n},t,e,void 0);this.chart.ctx.tooltipManager.updateTooltip(this.id,l,a,r)}else this.chart.ctx.tooltipManager.removeTooltip(this.id,void 0,!0)}maybeEnterInteractiveTooltip(t){return this.chart.tooltip.maybeEnterInteractiveTooltip(t,()=>{this.tooltip.lastHover=void 0,this.chart.ctx.tooltipManager.removeTooltip(this.id),this.chart.ctx.highlightManager.updateHighlight(this.id,void 0,!0)})}changeHighlightDatum(t){const e=t.previousHighlight?.series,i=t.currentHighlight?.series;e?.properties.cursor&&t.previousHighlight?.datum&&this.chart.ctx.domManager.updateCursor(e.id),i?.properties.cursor&&i.properties.cursor!=="default"&&t.currentHighlight?.datum&&this.chart.ctx.domManager.updateCursor(i.id,i.properties.cursor),this.hoverDevice==="setState"||i==null||e==null?this.update(import_ag_charts_core147.ChartUpdateType.SERIES_UPDATE,{clearCallbackCache:!0}):this.update(import_ag_charts_core147.ChartUpdateType.SERIES_UPDATE,{seriesToUpdate:new Set([e,i].filter(Boolean)),clearCallbackCache:!0})}pickNodes(t,e,i){const s=[...this.series].reverse(),n=e==="event"||e==="context-menu",r=e==="tooltip"||e==="highlight-tooltip",a=d=>{if(n)return d.properties.nodeClickRange;if(r)return d.properties.tooltip.range},{x:o,y:l}=t,c=new Set;for(const d of s)d.visible&&d.contentGroup.visible&&a(d)==="area"&&d.isPointInArea?.(o,l)&&c.add(d);const h=c.size>0;let u;for(const d of s){if(!d.visible||!d.contentGroup.visible||h&&!(a(d)==="area"&&c.has(d)))continue;const p=d.pickNodes(t,e,i);if(p==null||p.datums.length===0)continue;const{datums:g,distance:f}=p;if(p.datums.length!==0){if(f===0){u?.distance!==0&&(u={matches:[],distance:0});for(const y of g){const{datumIndex:m}=y;u.matches.push({series:d,datum:y,datumIndex:m})}}else if(u==null||u.distance>f){const[y]=g,{datumIndex:m}=y;u={matches:[{series:d,datum:y,datumIndex:m}],distance:f}}}}return u}isTooltipEnabled(t){return t.tooltipEnabled??this.chart.tooltip.enabled}getTooltipContent(t,e,i,s){let n;if(s==="aria-label"||this.isTooltipEnabled(t)){const{cachedTooltipContent:r}=this;if(r?.series===t&&r.datumIndex===e)n=r.content;else{const a=this.chart.getTooltipContent(t,e,i,s);this.cachedTooltipContent={series:t,datumIndex:e,content:a},n=a}}else this.cachedTooltipContent=void 0;return n}onActiveLoadMemento(t){switch(t.activeItem?.type){case void 0:case"legend":return this.onActiveClear();case"series-node":return this.onActiveDatum(t.activeItem,t);default:return t.activeItem?.type}}onActiveUpdate(t){t?.type==="legend"&&(this.hoverDevice==="setState"&&(this.clearHighlight(),this.clearTooltip()),this.activeState.lastActive="legend")}onActiveClear(){this.pickManager.onClearAPI(),this.hoverDevice="setState",this.activeState.lastActive=void 0,this.clearHighlight(),this.clearTooltip()}refreshSetState(){if(this.activeState.lastActive===void 0)this.clearAll();else if(this.activeState.lastActive!=="legend"){const{seriesId:t,itemId:e}=this.activeState.lastActive,i=this.findPickedNodes(t,e);i&&(this.pickManager.onPickedNodesAPI(i),this.hoverScheduler.schedule())}}onActiveDatum(t,e){const{seriesId:i,itemId:s}=t,n=this.findPickedNodes(i,s);if(n===void 0)e.reject(),this.onActiveClear();else{const r=this.pickManager.onPickedNodesAPI(n);e.setDatum(r?.datum),this.hoverDevice="setState",this.activeState.lastActive={seriesId:i,itemId:s},e.initialState?(this.chart.ctx.scene.applyPendingResize(),this.handleHoverFromState()):(this.clearCachedEvents(),this.hoverScheduler.schedule())}}findPickedNodes(t,e){const i=this.series.find(r=>r.id===t);if(i==null){import_ag_charts_core147.Logger.warn(`Cannot find seriesId: "${t}"`);return}const s=i.findNodeDatum(e);if(s==null){import_ag_charts_core147.Logger.warn(`Cannot find itemId: ${JSON.stringify(e)}`);return}return{matches:[{datum:s,datumIndex:s.datumIndex,series:i}],distance:0}}};SeriesAreaManager.className="SeriesAreaManager";var import_ag_charts_core148=require("ag-charts-core"),SERIES_THRESHOLD_FOR_AGGRESSIVE_LAYER_REDUCTION=30,SeriesLayerManager=class{constructor(t){this.seriesRoot=t,this.groups=new Map,this.series=new Map,this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(t){this.expectedSeriesCount=t}getGroupIndex(t){const{internalId:e,seriesGrouping:i}=t;return i?.groupIndex??e}getGroupType(t,e){return e?"top":t.type}requestGroup(t){const{internalId:e,contentGroup:i}=t,s=t.bringToFront(),n=this.getGroupType(t,s),r=this.getGroupIndex(t),a=this.series.get(e);if(a!=null)throw new Error(`AG Charts - series already has an allocated layer: ${JSON.stringify(a)}`);this.series.size===0&&(this.mode=this.expectedSeriesCount>=SERIES_THRESHOLD_FOR_AGGRESSIVE_LAYER_REDUCTION?"aggressive-grouping":"normal");let o=this.groups.get(n);o==null&&(o=new Map,this.groups.set(n,o));const l=this.lookupIdx(r);let c=o.get(l);return c==null&&(c={type:n,id:l,seriesIds:[],group:this.seriesRoot.appendChild(new Group({name:`${t.contentGroup.name??n}-managed-layer`,zIndex:t.contentGroup.zIndex,renderToOffscreenCanvas:!1}))},o.set(l,c)),this.series.set(e,{layerState:c,seriesConfig:t,bringToFront:s}),c.seriesIds.push(e),c.group.appendChild(i),c.group}changeGroup(t){const{internalId:e,contentGroup:i}=t,s=t.bringToFront(),n=this.getGroupType(t,s),r=this.series.get(e),a=r?this.getGroupType(r.seriesConfig,r.bringToFront):void 0,o=this.getGroupIndex(t),l=this.lookupIdx(o),c=this.groups.get(n)?.get(l);if(!(a===n&&c?.seriesIds.includes(e)===!0))return this.series.has(e)&&this._releaseGroup({internalId:e,contentGroup:i,type:a}),this.requestGroup(t)}releaseGroup(t){const{internalId:e,contentGroup:i}=t,s=this.getGroupType(t,t.bringToFront());this._releaseGroup({internalId:e,contentGroup:i,type:s})}_releaseGroup(t){const{internalId:e,contentGroup:i,type:s}=t;if(!this.series.has(e))throw new Error(`AG Charts - series doesn't have an allocated layer: ${e}`);const n=this.series.get(e)?.layerState;n&&(n.seriesIds=n.seriesIds.filter(r=>r!==e),i.remove()),n?.seriesIds.length===0?(n.group.remove(),this.groups.get(n.type)?.delete(n.id),this.groups.get(s)?.delete(e)):n!=null&&n.seriesIds.length>0&&(n.group.zIndex=this.getLowestSeriesZIndex(n.seriesIds)),this.series.delete(e)}updateLayerCompositing(){for(const t of this.groups.values())for(const e of t.values()){const{group:i,seriesIds:s}=e;let n;s.length===0?n=!1:s.length>1?n=!0:n=this.series.get(s[0])?.seriesConfig.renderToOffscreenCanvas()===!0,i.renderToOffscreenCanvas=n,i.zIndex=this.getLowestSeriesZIndex(s)}}lookupIdx(t){return this.mode==="normal"?t:typeof t=="string"&&(t=Number(t.split("-").at(-1)),!Number.isFinite(t))?0:Math.floor((0,import_ag_charts_core148.clamp)(0,t/this.expectedSeriesCount,1)*SERIES_THRESHOLD_FOR_AGGRESSIVE_LAYER_REDUCTION)}destroy(){for(const t of this.groups.values())for(const e of t.values())e.group.remove();this.groups.clear(),this.series.clear()}getLowestSeriesZIndex(t){let e;for(const i of t){const n=this.series.get(i)?.seriesConfig.contentGroup.zIndex??import_ag_charts_core148.SeriesZIndexMap.ANY_CONTENT;if(e==null||n==null){e=n;continue}e=compareZIndex(e,n)<=0?e:n}return e??import_ag_charts_core148.SeriesZIndexMap.ANY_CONTENT}},import_ag_charts_core149=require("ag-charts-core"),Touch=class extends import_ag_charts_core149.BaseProperties{constructor(){super(...arguments),this.dragAction="drag"}};__decorateClass([import_ag_charts_core149.Property],Touch.prototype,"dragAction",2);var import_ag_charts_core150=require("ag-charts-core"),DataWindowProcessor=class{constructor(t,e,i,s,n,r){this.chart=t,this.eventsHub=e,this.dataService=i,this.updateService=s,this.zoomManager=n,this.animationManager=r,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.cleanup=new import_ag_charts_core150.CleanupRegistry,this.cleanup.register(this.eventsHub.on("data:source-change",()=>this.onDataSourceChange()),this.eventsHub.on("data:load",()=>this.onDataLoad()),this.eventsHub.on("data:error",()=>this.onDataError()),this.updateService.addListener("update-complete",a=>this.onUpdateComplete(a)),this.eventsHub.on("zoom:change-complete",()=>this.onZoomChange()))}destroy(){this.cleanup.flush()}onDataLoad(){this.animationManager.skip(),this.updateService.update(import_ag_charts_core150.ChartUpdateType.UPDATE_DATA)}onDataError(){this.updateService.update(import_ag_charts_core150.ChartUpdateType.PERFORM_LAYOUT)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(t){!t.apiUpdate&&!this.dirtyZoom&&!this.dirtyDataSource||t.wasShortcut||this.updateWindow(t)}onZoomChange(){this.dirtyZoom=!0}updateWindow(t){if(!this.dataService.isLazy())return;const e=this.getValidAxis();let i,s=!0;if(e){const n=this.zoomManager.getAxisZoom(e.id);i=this.getAxisWindow(e,n),s=this.shouldRefresh(t,e,n)}this.dirtyZoom=!1,this.dirtyDataSource=!1,s&&this.dataService.load({windowStart:i?.min,windowEnd:i?.max})}getValidAxis(){return this.chart.axes.find(t=>t.type==="time")}shouldRefresh(t,e,i){if(t.apiUpdate||this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;const s=this.lastAxisZooms.get(e.id);return s&&i.min===s.min&&i.max===s.max?!1:(this.lastAxisZooms.set(e.id,i),!0)}getAxisWindow(t,e){const{domain:i}=t.scale;if(!e||i.length===0||Number.isNaN(Number(i[0])))return;const s=Number(i[1])-Number(i[0]),n=new Date(Number(i[0])+s*e.min),r=new Date(Number(i[0])+s*e.max);return{min:n,max:r}}},import_ag_charts_core152=require("ag-charts-core"),import_ag_charts_core151=require("ag-charts-core"),isSafariRegexp=/^((?!chrome|android).)*safari/i,safariVersionRegexp=/Version\/(\d+(\.\d+)?)/,isChromeRegexp=/Chrome/,chromeVersionRegexp=/Chrome\/(\d+)/,isEdge=/Edg/,isOpera=/OPR/;function isUnsupportedBrowser(){const{userAgent:t}=(0,import_ag_charts_core151.getWindow)("navigator");if(isSafariRegexp.test(t)){const e=safariVersionRegexp.exec(t);if(e==null)return!1;const i=Number.parseFloat(e[1]),s=Math.floor(i)>16;return s||import_ag_charts_core151.Logger.warnOnce(`Unsupported Safari version: ${i}; ${t}`),!s}else if(isChromeRegexp.test(t)&&!isEdge.test(t)&&!isOpera.test(t)){const e=chromeVersionRegexp.exec(t);if(e==null)return!1;const i=Number.parseInt(e[1],10),s=i>126;return s||import_ag_charts_core151.Logger.warnOnce(`Unsupported Chrome version: ${i}; ${t}`),!s}return!1}var visibleIgnoredSeries=new Set(["map-shape-background","map-line-background"]),OverlaysProcessor=class{constructor(t,e,i,s,n,r,a){this.chartLike=t,this.overlays=e,this.eventsHub=i,this.dataService=s,this.localeManager=n,this.animationManager=r,this.domManager=a,this.cleanup=new import_ag_charts_core152.CleanupRegistry,this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle(DEFAULT_OVERLAY_CLASS),this.cleanup.register(this.eventsHub.on("layout:complete",o=>this.onLayoutComplete(o)))}destroy(){this.cleanup.flush(),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete({series:{rect:t}}){const e=this.dataService.isLoading(),i=this.chartLike.series.some(c=>c.hasData),s=this.chartLike.series.some(c=>c.visible&&!visibleIgnoredSeries.has(c.type));this.overlays.darkTheme?this.overlayElem.classList.add(DEFAULT_OVERLAY_DARK_CLASS):this.overlayElem.classList.remove(DEFAULT_OVERLAY_DARK_CLASS),this.overlayElem.style.left=`${t.x}px`,this.overlayElem.style.top=`${t.y}px`,this.overlayElem.style.width=`${t.width}px`,this.overlayElem.style.height=`${t.height}px`;const n=e,r=!e&&!i,a=i&&!s,o=this.overlays.unsupportedBrowser.enabled&&isUnsupportedBrowser();n?this.showOverlay(this.overlays.loading,t):this.hideOverlay(this.overlays.loading),r?this.showOverlay(this.overlays.noData,t):this.hideOverlay(this.overlays.noData),a?this.showOverlay(this.overlays.noVisibleSeries,t):this.hideOverlay(this.overlays.noVisibleSeries),o?this.showOverlay(this.overlays.unsupportedBrowser,t):this.hideOverlay(this.overlays.unsupportedBrowser);const l=n||r||a||o;(0,import_ag_charts_core152.setAttribute)(this.overlayElem,"aria-hidden",!l)}showOverlay(t,e){if(!t.enabled)return;const i=t.getElement(this.chartLike,this.animationManager,this.localeManager,e);this.overlayElem.appendChild(i)}hideOverlay(t){t.removeElement(()=>{this.overlayElem.innerText="\xA0"},this.animationManager)}},debug=import_ag_charts_core153.Debug.create(!0,"opts"),_Chart=class Fe extends Observable{constructor(e,i){var s;super(),this.id=(0,import_ag_charts_core153.createId)(this),this.seriesRoot=new TranslatableGroup({name:`${this.id}-series-root`,zIndex:import_ag_charts_core153.ZIndexMap.SERIES_LAYER}),this.annotationRoot=new TranslatableGroup({name:`${this.id}-annotation-root`,zIndex:import_ag_charts_core153.ZIndexMap.SERIES_ANNOTATION}),this.titleGroup=new Group({name:"titles",zIndex:import_ag_charts_core153.ZIndexMap.SERIES_LABEL}),this.debug=import_ag_charts_core153.Debug.create(!0,"chart"),this.extraDebugStats={},this.data=DataSet.empty(),this._firstAutoSize=!0,this._autoSizeNotify=new import_ag_charts_core153.AsyncAwaitQueue,this._requiredRange=0,this._requiredRangeDirection=import_ag_charts_core153.ChartAxisDirection.X,this.chartCaptions=new ChartCaptions,this.padding=new import_ag_charts_core153.Padding(20),this.keyboard=new Keyboard,this.touch=new Touch,this.mode="standalone",this.styleNonce=void 0,this.formatter=void 0,this.suppressFieldDotNotation=!1,this.loadGoogleFonts=!1,this.destroyed=!1,this.cleanup=new import_ag_charts_core153.CleanupRegistry,this.chartAnimationPhase="initial",this.modulesManager=new ModulesManager,this.processors=[],this.queuedUserOptions=[],this.queuedChartOptions=[],this.firstApply=!0,this.syncStatus="init",this.fireEventWrapper=u=>super.fireEvent(u),this.apiUpdate=!1,this._pendingFactoryUpdatesCount=0,this._performUpdateSkipAnimations=!1,this._performUpdateNotify=new import_ag_charts_core153.AsyncAwaitQueue,this.performUpdateType=import_ag_charts_core153.ChartUpdateType.NONE,this.runningUpdateType=import_ag_charts_core153.ChartUpdateType.NONE,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new Mutex,this.clearCallbackCacheOnUpdate=!1,this.updateRequestors={},this.performUpdateTrigger=debouncedCallback(({count:u})=>{this.destroyed||this.updateMutex.acquire(this.tryPerformUpdate.bind(this,u)).catch(d=>import_ag_charts_core153.Logger.errorOnce(d))}),this._performUpdateSplits={},this._previousSplit=0,this.axes=this.createChartAxes(),this.series=[],this._cachedData=void 0,this.onSeriesNodeClick=u=>{this.fireEvent(u)},this.onSeriesNodeDoubleClick=u=>{this.fireEvent(u)},this.onSeriesVisibilityChange=u=>{this.fireEvent(u)},this.seriesGroupingChanged=u=>{if(!(u instanceof SeriesGroupingChangedEvent))return;const{series:d,seriesGrouping:p}=u;if(d.contentGroup.isRoot())return;const g=this.seriesLayerManager.changeGroup({internalId:d.internalId,type:d.type,contentGroup:d.contentGroup,bringToFront:()=>d.bringToFront(),renderToOffscreenCanvas:()=>d.renderToOffscreenCanvas(),seriesGrouping:p});g!=null&&d.attachSeries(g,this.seriesRoot,this.annotationRoot)},this.chartOptions=e;const n=i?.scene,r=i?.container??e.processedOptions.container??void 0,a=i?.styleContainer??e.specialOverrides.styleContainer,o=e.specialOverrides.skipCss;n&&(this._firstAutoSize=!1,this._lastAutoSize=[n.width,n.height,n.pixelRatio]);const l=new Group({name:"root"});l.visible=!1,l.append(this.seriesRoot),l.append(this.annotationRoot),l.append(this.titleGroup),this.titleGroup.append(this.title.node),this.titleGroup.append(this.subtitle.node),this.titleGroup.append(this.footnote.node),this.tooltip=new Tooltip,this.seriesLayerManager=new SeriesLayerManager(this.seriesRoot),this.mode=e.userOptions.mode??this.mode,this.styleNonce=e.processedOptions.styleNonce;const c=this.ctx=new ChartContext(this,{chartType:this.getChartType(),scene:n,root:l,container:r,styleContainer:a,skipCss:o,domMode:e.optionMetadata.domMode,withDragInterpretation:e.optionMetadata.withDragInterpretation??!0,syncManager:new SyncManager(this),fireEvent:u=>this.fireEvent(u),updateCallback:(u,d)=>this.update(u,d),updateMutex:this.updateMutex});e.optionMetadata.presetType==="sparkline"&&(c.highlightManager.unhighlightDelay=0,c.tooltipManager.removeDelay=0),this.cleanup.register(c.eventsHub.on("dom:resize",()=>this.parentResize(c.domManager.containerSize))),this.overlays=new ChartOverlays,(s=this.overlays.loading).renderer??(s.renderer=()=>getLoadingSpinner(this.overlays.loading.getText(c.localeManager),c.animationManager.defaultDuration)),this.processors=[new DataWindowProcessor(this,c.eventsHub,c.dataService,c.updateService,c.zoomManager,c.animationManager),new OverlaysProcessor(this,this.overlays,c.eventsHub,c.dataService,c.localeManager,c.animationManager,c.domManager)],this.highlight=new ChartHighlight,this.container=r;const h=this.getModuleContext();this.background=import_ag_charts_core153.enterpriseRegistry.createBackground?.(h)??new Background(h),this.foreground=import_ag_charts_core153.enterpriseRegistry.createForeground?.(h),this.seriesArea=new SeriesArea(h),c.domManager.setDataBoolean("animating",!1),c.domManager.setDataNumber("animationTimeMs",0),this.seriesAreaManager=new SeriesAreaManager(this.initSeriesAreaDependencies()),this.cleanup.register(c.layoutManager.registerElement(0,u=>{u.layoutBox.shrink(this.padding.toJson()),this.chartCaptions.positionCaptions(u)}),c.eventsHub.on("layout:complete",u=>this.chartCaptions.positionAbsoluteCaptions(u)),c.eventsHub.on("data:load",u=>{this.data=new DataSet(u.data)}),this.title.registerInteraction(h,"beforebegin"),this.subtitle.registerInteraction(h,"beforebegin"),this.footnote.registerInteraction(h,"afterend"),()=>this.title.destroy(),()=>this.subtitle.destroy(),()=>this.footnote.destroy(),Widget.addWindowEvent("page-left",()=>this.destroy()),c.animationManager.addListener("animation-frame",()=>{this.update(import_ag_charts_core153.ChartUpdateType.SCENE_RENDER),c.domManager.setDataNumber("animationTimeMs",c.animationManager.getCumulativeAnimationTime())}),c.animationManager.addListener("animation-start",()=>c.domManager.setDataBoolean("animating",!0)),c.animationManager.addListener("animation-stop",()=>{c.domManager.setDataBoolean("animating",!1),c.domManager.setDataNumber("animationTimeMs",c.animationManager.getCumulativeAnimationTime())}),c.eventsHub.on("zoom:change-complete",()=>{for(const d of this.series)d.animationState?.transition("updateData");const u=this.chartAnimationPhase!=="initial";this.update(import_ag_charts_core153.ChartUpdateType.PERFORM_LAYOUT,{forceNodeDataRefresh:!0,skipAnimations:u})})),this.parentResize(c.domManager.containerSize)}static getInstance(e){return Fe.chartsInstances.get(e)}get canvasElement(){return this.ctx.scene.canvas.element}download(e,i){this.ctx.scene.download(e,i)}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}toSVG(){return this.ctx.scene.toSVG()}get seriesAreaBoundingBox(){return this.seriesAreaManager.bbox}getOptions(){return this.queuedUserOptions.at(-1)??this.chartOptions.userOptions}getChartOptions(){return this.queuedChartOptions.at(-1)??this.chartOptions}isDataTransactionSupported(){return!0}overrideFocusVisible(e){this.seriesAreaManager.focusIndicator?.overrideFocusVisible(e)}fireEvent(e){(0,import_ag_charts_core153.callWithContext)(this,this.fireEventWrapper,e)}initSeriesAreaDependencies(){const{ctx:e,tooltip:i,highlight:s,overlays:n,seriesRoot:r,mode:a}=this,o=this.getChartType();return{fireEvent:this.fireEvent.bind(this),getUpdateType:()=>this.performUpdateType,getTooltipContent:(u,d,p,g)=>this.getTooltipContent(u,d,p,g),chartType:o,ctx:e,tooltip:i,highlight:s,overlays:n,seriesRoot:r,mode:a}}getModuleContext(){return this.ctx}getTooltipContent(e,i,s,n){const a=n==="aria-label"||e.properties.tooltip.enabled!==!1?e.getTooltipContent(i,s):void 0,o=a==null?[]:[a];if(this.tooltip.mode!=="shared"||this.series.length===1)return o;const l=e.getCategoryValue(i);return l==null?o:this.series.flatMap(c=>{if(c===e)return o;if(!c.isEnabled()||c.properties.tooltip.enabled===!1)return[];const h=c.datumIndexForCategoryValue(l),u=h==null?void 0:c.getTooltipContent(h,void 0);return u==null?[]:[u]})}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}refreshSeriesUserVisibility(e,i){for(let s=0;s<this.series.length;s++){const n=this.series[s],r=e.processedOptions.series?.[s];(i.identifiers.has(n.id)||i.indices.has(s))&&r!==void 0&&"visible"in r&&(r.visible=n.visible)}}resetAnimations(){this.chartAnimationPhase="initial";for(const e of this.series)e.resetAnimation(this.chartAnimationPhase);for(const e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}detachAndClear(){this.container=void 0,this.ctx.scene.clearCanvas()}destroy(e){if(this.destroyed)return;const i=e?.keepTransferableResources;let s;this.performUpdateType=import_ag_charts_core153.ChartUpdateType.NONE,this.cleanup.flush();for(const n of this.processors)n.destroy();return this.overlays.destroy(),this.modulesManager.destroy(),this.background.destroy(),this.foreground?.destroy(),this.seriesArea.destroy(),i?(this.ctx.scene.strip(),s={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.destroy(),this.animationRect=void 0,this.ctx.destroy(),this.destroyed=!0,Object.freeze(this),s}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(async()=>{if(!this.destroyed)try{await e(this)}finally{this.destroyed||this._pendingFactoryUpdatesCount--}}).catch(i=>import_ag_charts_core153.Logger.errorOnce(i)))}clearCallbackCache(){this.ctx.callbackCache.invalidateCache();for(const e of this.series)e.resetDatumCallbackCache()}update(e=import_ag_charts_core153.ChartUpdateType.FULL,i){if(this.destroyed)return;const{forceNodeDataRefresh:s=!1,skipAnimations:n,seriesToUpdate:r=this.series,newAnimationBatch:a,apiUpdate:o=!1,clearCallbackCache:l=!1}=i??{};if(this.apiUpdate=o,this.ctx.widgets.seriesWidget.setDragTouchEnabled(this.touch.dragAction!=="none"),s)for(const c of this.series)c.markNodeDataDirty();for(const c of r)this.seriesToUpdate.add(c);if(n&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),(e===import_ag_charts_core153.ChartUpdateType.FULL||l)&&(this.clearCallbackCacheOnUpdate=!0),this.debug.check()){let c=new Error("Stack trace for update tracking").stack??"<unknown>";c=c.replaceAll(/\([^)]*/g,""),this.updateRequestors[c]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.ctx.domManager.setDataBoolean("updatePending",!0),this.performUpdateTrigger.schedule(i?.backOffMs))}updateSplits(e){const i=this._performUpdateSplits;i[e]??(i[e]=0),i[e]+=performance.now()-this._previousSplit,this._previousSplit=performance.now()}async tryPerformUpdate(e){try{await this.performUpdate(e)}catch(i){import_ag_charts_core153.Logger.error("update error",i,i.stack)}}async performUpdate(e){const{performUpdateType:i,extraDebugStats:s,_performUpdateSplits:n,ctx:r}=this,a=[...this.seriesToUpdate];switch(this.clearCallbackCacheOnUpdate&&(this.clearCallbackCacheOnUpdate=!1,this.clearCallbackCache()),this.performUpdateType=import_ag_charts_core153.ChartUpdateType.NONE,this.seriesToUpdate.clear(),this.runningUpdateType=i,this.updateShortcutCount===0&&i<import_ag_charts_core153.ChartUpdateType.SCENE_RENDER&&(r.animationManager.startBatch(this._performUpdateSkipAnimations),r.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.ctx.scene.updateDebugFlags(),this.debug("Chart.performUpdate() - start",import_ag_charts_core153.ChartUpdateType[i]),this._previousSplit=performance.now(),n.start??(n.start=this._previousSplit),i){case import_ag_charts_core153.ChartUpdateType.FULL:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.FULL))break;this.ctx.updateService.dispatchPreDomUpdate(),this.updateDOM();case import_ag_charts_core153.ChartUpdateType.UPDATE_DATA:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.UPDATE_DATA))break;this.updateData(),this.updateSplits("\u2B07\uFE0F");case import_ag_charts_core153.ChartUpdateType.PROCESS_DATA:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.PROCESS_DATA))break;if(await this.processData(),this.seriesAreaManager.dataChanged(),this.pendingLocaleText){const l=this.modulesManager.getModule("locale");l&&"localeText"in l&&(l.localeText=this.pendingLocaleText),this.pendingLocaleText=void 0}this.updateSplits("\u{1F4CA}");case import_ag_charts_core153.ChartUpdateType.PROCESS_DOMAIN:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.PROCESS_DOMAIN))break;await this.processDomains(),this.updateSplits("\u26F0\uFE0F");case import_ag_charts_core153.ChartUpdateType.PROCESS_RANGE:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.PROCESS_RANGE))break;this.processRanges(),this.updateSplits("\u{1F4D0}");case import_ag_charts_core153.ChartUpdateType.PERFORM_LAYOUT:if(await this.checkFirstAutoSize(),this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.PERFORM_LAYOUT))break;await this.processLayout(),this.updateSplits("\u2316");case import_ag_charts_core153.ChartUpdateType.PRE_SERIES_UPDATE:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.PRE_SERIES_UPDATE))break;this.preSeriesUpdate(),this.updateSplits("\u2753");case import_ag_charts_core153.ChartUpdateType.SERIES_UPDATE:{if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.SERIES_UPDATE))break;this.seriesRoot.renderToOffscreenCanvas=this.highlight.drawingMode==="cutout",await this.updateSeries(a),this.updateAriaLabels(),this.seriesLayerManager.updateLayerCompositing(),this.updateSplits("\u{1F914}")}case import_ag_charts_core153.ChartUpdateType.PRE_SCENE_RENDER:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.PRE_SCENE_RENDER))break;r.updateService.dispatchPreSceneRender(),this.updateSplits("\u2196");case import_ag_charts_core153.ChartUpdateType.SCENE_RENDER:if(this.checkUpdateShortcut(import_ag_charts_core153.ChartUpdateType.SCENE_RENDER))break;r.animationManager.endBatch(),s.updateShortcutCount=this.updateShortcutCount,r.scene.render({debugSplitTimes:n,extraDebugStats:s,seriesRect:this.seriesRect,debugColors:this.getDebugColors()}),this.extraDebugStats={};for(const l of Object.keys(n))delete n[l];this.ctx.domManager.incrementDataCounter("sceneRenders"),this.ctx.domManager.postRenderUpdate();case import_ag_charts_core153.ChartUpdateType.NONE:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,r.animationManager.endBatch()}this.destroyed||(r.updateService.dispatchUpdateComplete(this.apiUpdate,this.updateShortcutCount>0),this.apiUpdate=!1,this.ctx.domManager.setDataBoolean("updatePending",!1),this.runningUpdateType=import_ag_charts_core153.ChartUpdateType.NONE,this.syncStatus="ready"),this._performUpdateNotify.notify();const o=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:(0,import_ag_charts_core153.roundTo)(o-n.start),count:e,performUpdateType:import_ag_charts_core153.ChartUpdateType[i]})}updateThemeClassName(){const e="ag-charts-theme-",i=[`${e}default`,`${e}default-dark`];let s=i[0],n=!1,{theme:r}=this.chartOptions.processedOptions;for(;typeof r!="string"&&r!=null;)r=r.baseTheme;typeof r=="string"&&(s=r.replace("ag-",e),n=r.includes("-dark")),i.includes(s)||(s=n?i[1]:i[0]),this.ctx.domManager.setThemeClass(s)}updateDOM(){this.updateThemeClassName();const{enabled:e,tabIndex:i}=this.keyboard;this.ctx.domManager.setTabGuardIndex(e?i??0:-1),this.ctx.domManager.setThemeParameters(this.chartOptions.themeParameters)}updateAriaLabels(){this.ctx.domManager.updateCanvasLabel(this.getAriaLabel())}checkUpdateShortcut(e){return this.destroyed?!0:this.updateShortcutCount>3?(import_ag_charts_core153.Logger.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e?(this.debug("Chart.checkUpdateShortcut() - BLOCKED AT: ",import_ag_charts_core153.ChartUpdateType[e]),this.updateShortcutCount++,!0):(this.debug("Chart.checkUpdateShortcut() - PROCEEDING TO: ",import_ag_charts_core153.ChartUpdateType[e]),!1)}async checkFirstAutoSize(){this.width!=null&&this.height!=null||this._lastAutoSize||await this._autoSizeNotify.waitForCompletion(500)||this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}createChartAxes(){return new ChartAxes}onAxisChange(e,i){i==null&&e.length===0||this.ctx.axisManager.updateAxes(i??[],e)}onSeriesChange(e,i){const s=i?.filter(n=>!e.includes(n))??[];this.destroySeries(s),this.seriesLayerManager?.setSeriesCount(e.length);for(const n of e){if(i?.includes(n))continue;const r=this.seriesLayerManager.requestGroup(n);n.attachSeries(r,this.seriesRoot,this.annotationRoot),n.chart={},Object.defineProperty(n.chart,"mode",{get:()=>this.mode}),Object.defineProperty(n.chart,"isMiniChart",{get:()=>!1}),Object.defineProperty(n.chart,"flashOnUpdateEnabled",{get:()=>!!this.modulesManager.getModule("flashOnUpdate")?.enabled}),Object.defineProperty(n.chart,"seriesRect",{get:()=>this.seriesRect}),n.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(n)}this.seriesAreaManager?.seriesChanged(e)}destroySeries(e){if(e)for(const i of e)i.removeEventListener("seriesNodeClick",this.onSeriesNodeClick),i.removeEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),i.removeEventListener("groupingChanged",this.seriesGroupingChanged),i.destroy(),this.seriesLayerManager.releaseGroup(i),i.detachSeries(void 0,this.seriesRoot,this.annotationRoot),i.chart=void 0}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("seriesNodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),this.hasEventListener("seriesVisibilityChange")&&e.addEventListener("seriesVisibilityChange",this.onSeriesVisibilityChange),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}assignSeriesToAxes(){for(const i of this.axes){let s=function(n){return n.axes[i.direction]===i};var e=s;i.boundSeries=this.series.filter(s)}}assignAxesToSeries(){for(const e of this.series)for(const i of e.directions){const s=e.getKeyAxis(i)??i,n=this.axes.findById(s);if(!n){import_ag_charts_core153.Logger.warnOnce(`no matching axis for direction [${i}] and id [${s}]; check series and axes configuration.`);return}e.axes[i]=n}}parentResize(e){if(e==null||this.width!=null&&this.height!=null)return;let{width:i,height:s}=e;const{pixelRatio:n}=e;if(i=Math.floor(i),s=Math.floor(s),i===0&&s===0)return;const[r=0,a=0,o=1]=this._lastAutoSize??[];r===i&&a===s&&o===n||(this._lastAutoSize=[i,s,n],this.resize("SizeMonitor",{}))}resize(e,i){const{scene:s,animationManager:n}=this.ctx,{inWidth:r,inHeight:a,inMinWidth:o,inMinHeight:l,inOverrideDevicePixelRatio:c}=i;this.ctx.domManager.setSizeOptions(o??this.minWidth,l??this.minHeight,r??this.width,a??this.height);const h=r??this.width??this._lastAutoSize?.[0],u=a??this.height??this._lastAutoSize?.[1],d=c??this.overrideDevicePixelRatio??this._lastAutoSize?.[2];if(this.debug(`Chart.resize() from ${e}`,{width:h,height:u,pixelRatio:d,stack:new Error("Stack trace for resize tracking").stack}),!(h==null||u==null||!(0,import_ag_charts_core153.isFiniteNumber)(h)||!(0,import_ag_charts_core153.isFiniteNumber)(u))&&s.resize(h,u,d)){n.reset();let p=!0;(this.width==null||this.height==null)&&this._firstAutoSize&&(p=!1,this._firstAutoSize=!1);let g=import_ag_charts_core153.ChartUpdateType.PERFORM_LAYOUT;for(const f of this.axes){const y=f.getUpdateTypeOnResize();y<g&&(g=y)}this.update(g,{forceNodeDataRefresh:!0,skipAnimations:p}),this._autoSizeNotify.notify()}}updateData(){this.ctx.eventsHub.emit("data:update",this.data)}async processData(){this.series.some(s=>s.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes());const e=new DataController(this.mode,this.suppressFieldDotNotation,this.ctx.eventsHub),i=[];for(const s of this.series)i.push(s.processData(e)??Promise.resolve());for(const s of this.modulesManager.modules())s?.processData&&i.push(s.processData(e)??Promise.resolve());this._cachedData=e.execute(this._cachedData),this.updateSplits("\u{1F3ED}"),await Promise.all(i),this.updateLegends()}async processDomains(){for(const e of this.axes)e.processData();for(const e of this.series)e.updatedDomains()}processRanges(){var e;const i={},s={},n=new Map;this._requiredRangeDirection=import_ag_charts_core153.ChartAxisDirection.X;for(const r of this.series)r.visible&&(i[e=r.type]??(i[e]=[]),r.getMinimumRangeSeries(i[r.type]),r.resolveKeyDirection(import_ag_charts_core153.ChartAxisDirection.X)===import_ag_charts_core153.ChartAxisDirection.Y&&(this._requiredRangeDirection=import_ag_charts_core153.ChartAxisDirection.Y),n.has(r.type)||n.set(r.type,r));for(const[r,a]of n)s[r]=a.getMinimumRangeChart(i[r]);Object.keys(s).length===0?this._requiredRange=0:this._requiredRange=Math.ceil(Math.max(...Object.values(s)));for(const r of this.axes)r.requiredRange=this._requiredRange}updateLegends(e){for(const i of import_ag_charts_core153.ModuleRegistry.listModulesByType(import_ag_charts_core153.ModuleType.Plugin))switch(i.name){case"legend":this.setCategoryLegendData(e);break;case"gradientLegend":const s=this.modulesManager.getModule("gradientLegend");s.data=this.series.filter(n=>n.properties.showInLegend).flatMap(n=>n.getLegendData("gradient"));break}}setCategoryLegendData(e){const{legendManager:i,stateManager:s}=this.ctx;if(e)for(const r of this.series){const a=e.find(o=>o.seriesId===r.id);r.onLegendInitialState("category",a)}const n=this.series.flatMap(r=>{const a=r.getLegendData("category");return i.updateData(r.id,a),a});if(e){s.setStateAndRestore(i,e);return}if(this.mode!=="integrated"){const r={},a=new Map(this.series.map(o=>[o.id,o]));for(const{seriesId:o,symbol:{marker:l},label:c}of n.filter(h=>!h.hideInLegend)){if(l.fill==null)continue;const h=a.get(o);if(!h?.hasData)continue;const u=h.type,d=r[u]??(r[u]=new Map);d.has(c.text)?d.get(c.text)!==l.fill&&import_ag_charts_core153.Logger.warnOnce(`legend item '${(0,import_ag_charts_core153.toPlainText)(c.text)}' has multiple fill colours, this may cause unexpected behaviour.`):d.set(c.text,l.fill)}}i.update()}async processLayout(){const e=this.animationRect,{width:i,height:s}=this.ctx.scene,n=this.ctx.layoutManager.createContext(i,s);await this.performLayout(n),e&&!this.animationRect?.equals(e)&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}getDebugColors(){const e=this.background.fill;if(e)try{const i=import_ag_charts_core153.Color.fromString(e),[s]=import_ag_charts_core153.Color.RGBtoOKLCH(i.r,i.g,i.b);return{background:e,foreground:s>.5?"black":"white"}}catch{return{background:e}}}preSeriesUpdate(){const{_requiredRange:e,seriesRect:i}=this;if(i==null)return;const s=this._requiredRangeDirection===import_ag_charts_core153.ChartAxisDirection.X?i.width:i.height,n=e/s||0;this.ctx.updateService.dispatchPreSeriesUpdate(n,this._requiredRangeDirection)}async updateSeries(e){const{seriesRect:i}=this;function s(n){return n.update({seriesRect:i})}await Promise.all(e.map(s).filter(n=>n!=null)),this.ctx.seriesLabelLayoutManager.updateLabels(this.series.filter(n=>n.visible&&n.usesPlacedLabels),this.padding,this.seriesRect)}async waitForUpdate(e,i){const s=(0,import_ag_charts_core153.getWindow)("agChartsDebugTimeout");s==null?(e??(e=1e4),i??(i=!1)):(e=s,i??(i=!0));const n=performance.now();for(;(this._pendingFactoryUpdatesCount>0||this.performUpdateType!==import_ag_charts_core153.ChartUpdateType.NONE||this.runningUpdateType!==import_ag_charts_core153.ChartUpdateType.NONE||this.ctx.scene.waitingForUpdate()||this.data.hasPendingTransactions())&&!this.destroyed;){if(this._pendingFactoryUpdatesCount>0&&await this.updateMutex.waitForClearAcquireQueue(),(this.performUpdateType!==import_ag_charts_core153.ChartUpdateType.NONE||this.runningUpdateType!==import_ag_charts_core153.ChartUpdateType.NONE||this.data.hasPendingTransactions())&&await this._performUpdateNotify.waitForCompletion(),performance.now()-n>e){const r=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(i)throw new Error(r);import_ag_charts_core153.Logger.warnOnce(r)}(0,import_ag_charts_core153.isInputPending)()&&await(0,import_ag_charts_core153.pause)(),this.ctx.scene.waitingForUpdate()&&await(0,import_ag_charts_core153.pause)(50)}}filterMiniChartSeries(e){return e?.filter(i=>i.showInMiniChart!==!1)}applyOptions(e){e.seriesWithUserVisibility&&this.refreshSeriesUserVisibility(this.chartOptions,e.seriesWithUserVisibility);const i=import_ag_charts_core153.ChartUpdateType.PERFORM_LAYOUT,s=this.firstApply?e.processedOptions:e.diffOptions(this.chartOptions);if(s==null||Object.keys(s).length===0){debug("Chart.applyOptions() - no delta, forcing re-layout",s),this.update(i,{apiUpdate:!0,newAnimationBatch:!0});return}const n=this.firstApply?{}:this.chartOptions.processedOptions,r=e.processedOptions;debug("Chart.applyOptions() - applying delta",s);const a=this.applyModules(),o=["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState","styleContainer","formatter","displayNullData"];"listeners"in s&&this.registerListeners(this,s.listeners),(0,import_ag_charts_core153.jsonApply)(this,s,{skip:o});let l=!1,c="no-op";s.series!=null&&(c=this.applySeries(this,s.series,n?.series),l=!0),c==="replaced"&&this.resetAnimations(),this.applyAxes(this,r,n,c,[])&&(l=!0);const{userDeltaKeys:h}=e,u=h===void 0||h.has("data");if(s.data&&u){const v=s.data,x=e.userOptions.data,I=Array.isArray(v)&&v!==x?v.slice():v;this.data=new DataSet(I)}if("legend"in s&&s.legend&&"listeners"in s.legend&&this.modulesManager.isEnabled("legend")){const v=s.legend.listeners;v?Object.assign(this.legend.listeners,v):this.legend.listeners.clear()}s.locale?.localeText&&(this.pendingLocaleText=s.locale?.localeText),this.chartOptions=e;const d=this.modulesManager.getModule("navigator"),p=this.modulesManager.getModule("zoom"),g=this.modulesManager.getModule("scrollbar");!d?.enabled&&!p?.enabled&&!g?.enabled&&this.ctx.zoomManager.updateZoom({source:"chart-update",sourceDetail:"internal-applyOptions"},{x:{min:0,max:1}});const f=d?.miniChart,y=r.navigator?.miniChart?.series??r.series;f?.enabled===!0&&y!=null?this.applyMiniChartOptions(f,y,r,n):f?.enabled===!1&&(f.series=[],f.axes=[]),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),l||(l=this.shouldForceNodeDataRefresh(s,c));const b=l||a?import_ag_charts_core153.ChartUpdateType.FULL:i;if(this.maybeResetAnimations(c),this.shouldClearLegendData(r,n,c)&&this.ctx.legendManager.clearData(),this.applyInitialState(r),this.ctx.formatManager.setFormatter(r.formatter),debug("Chart.applyOptions() - update type",import_ag_charts_core153.ChartUpdateType[b],{seriesStatus:c,forceNodeDataRefresh:l}),e.optionsProcessingTime!==void 0){this._performUpdateSplits["\u2699\uFE0F"]=e.optionsProcessingTime;const v=performance.now()-e.optionsProcessingTime;this._performUpdateSplits.start=v}this.update(b,{apiUpdate:!0,forceNodeDataRefresh:l,newAnimationBatch:!0,clearCallbackCache:!0}),this.firstApply=!1}applyInitialState(e){const{activeManager:i,annotationManager:s,chartTypeOriginator:n,historyManager:r,stateManager:a,zoomManager:o}=this.ctx,{initialState:l}=e;if("annotations"in e&&e.annotations?.enabled&&l?.annotations!=null){const c=l.annotations.map(h=>{const u=s.getAnnotationTypeStyles(h.type);return(0,import_ag_charts_core153.mergeDefaults)(h,u)});a.setState(s,c)}l?.chartType!=null&&a.setState(n,l.chartType),(e.navigator?.enabled||e.zoom?.enabled||e.scrollbar?.enabled)&&l?.zoom!=null&&a.setState(o,l.zoom),l?.active!=null&&a.setState(i,l.active),l?.legend!=null&&this.updateLegends(l.legend),l!=null&&r.clear()}maybeResetAnimations(e){if(this.mode==="standalone")switch(e){case"series-grouping-change":case"replaced":this.resetAnimations();break;default:}}shouldForceNodeDataRefresh(e,i){const s=!!e.data||i==="data-change"||i==="replaced",n=["legend","gradientLegend"].some(a=>e[a]!=null),r=e.title!=null&&e.subtitle!=null||e.formatter!=null;return s||n||r}shouldClearLegendData(e,i,s){const n=s==="replaced"||s==="series-count-changed"||s==="series-grouping-change"||s==="updated"&&(e.series?.length!==i.series?.length||!e.series?.every((a,o)=>a.type===i.series?.[o].type)),r=i.legend!=null&&i.legend.enabled!==!1&&(e.legend==null||e.legend.enabled===!1);return n||r}applyMiniChartOptions(e,i,s,n){const r=n?.navigator?.miniChart?.series??n?.series,a=this.applySeries(e,this.filterMiniChartSeries(i),this.filterMiniChartSeries(r));this.applyAxes(e,s,n,a,["tick","thickness","title","crosshair","gridLine","label"]);const o=e.series;for(const h of o)h.properties.id=void 0;const l=e.axes,c=l.find(h=>h.direction===import_ag_charts_core153.ChartAxisDirection.X);for(const h of l)h.nice=!1,h.gridLine.enabled=!1,h.label.enabled=h===c,h.tick.enabled=!1,h.interactionEnabled=!1;if(c!=null){const h=s.navigator?.miniChart,u=h?.label,d=h?.label?.interval;if(c.line.enabled=!1,c.label.set((0,import_ag_charts_core153.without)(u,["interval","autoRotate","autoRotateAngle","itemStyler","minSpacing","rotation"])),c.type==="grouped-category"){c.label.enabled=!1,c.label.rotation=0;const{depthOptions:p}=c;if(p.length===0)p.set([{label:{enabled:!0}}]);else for(let g=1;g<p.length;g++)p[g].label.enabled=!1}else(c.type==="time"||c.type==="unit-time"||c.type==="ordinal-time")&&(c.parentLevel.enabled=!1);c.interval.step=d?.step,c.interval.values=d?.values,c.interval.minSpacing=d?.minSpacing,c.interval.maxSpacing=d?.maxSpacing}}applyModules(){const{type:e}=this.constructor;let i=!1;for(const s of import_ag_charts_core153.ModuleRegistry.listModulesByType(import_ag_charts_core153.ModuleType.Plugin)){const n=!s.chartType||s.chartType===e;if(n!==this.modulesManager.isEnabled(s.name)){if(n){const r=s.create(this.getModuleContext());this.modulesManager.addModule(s.name,r),this[s.name]=r}else this.modulesManager.removeModule(s.name),delete this[s.name];i=!0}}return i}initSeriesDeclarationOrder(e){for(let i=0;i<e.length;i++)e[i].setSeriesIndex(i)}applySeries(e,i,s){if(!i)return"no-change";const n=matchSeriesOptions(e.series,i,s);if(n.status==="no-overlap"){debug(`Chart.applySeries() - creating new series instances, status: ${n.status}`,n);const u=i.map(d=>this.createSeries(d));return this.initSeriesDeclarationOrder(u),e.series=u,"replaced"}debug("Chart.applySeries() - matchResult",n);const r=[];let a=!1,o=!1,l=!1,c=!1;const h=n.changes.toSorted((u,d)=>u.targetIdx-d.targetIdx);for(const u of h)switch(o||(o=u.status==="series-grouping"),a||(a=u.diff?.data!=null),l||(l=u.status!=="no-op"),c||(c=u.status==="add"||u.status==="remove"),u.status){case"add":{const d=this.createSeries(u.opts);r.push(d),debug("Chart.applySeries() - created new series",d);break}case"remove":debug(`Chart.applySeries() - removing series at previous idx ${u.idx}`,u.series);break;case"no-op":r.push(u.series),debug(`Chart.applySeries() - no change to series at previous idx ${u.idx}`,u.series);break;case"series-grouping":case"update":default:{const{series:d,diff:p,idx:g}=u;debug(`Chart.applySeries() - applying series diff previous idx ${g}`,p,d),this.applySeriesValues(d,p),d.markNodeDataDirty(),r.push(d)}}return this.initSeriesDeclarationOrder(r),debug("Chart.applySeries() - final series instances",r),e.series=r,o?"series-grouping-change":c?"series-count-changed":a?"data-change":l?"updated":"no-op"}applyAxes(e,i,s,n,r=[]){if(!("axes"in i)||!i.axes)return!1;r=["type",...r];const a=i.axes;if(!(n==="replaced")&&e.axes.matches(a)&&isAgCartesianChartOptions(s)){for(const c of e.axes){const h=s.axes?.[c.id]??{},u=(0,import_ag_charts_core153.jsonDiff)(h,a[c.id]);debug(`Chart.applyAxes() - applying axis diff idx ${c.id}`,u),(0,import_ag_charts_core153.jsonApply)(c,u,{skip:r})}return!0}return debug(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${n}`),e.axes=this.createAxes(a,r),!0}createSeries(e){const s=import_ag_charts_core153.ModuleRegistry.getSeriesModule(e.type).create(this.getModuleContext());return this.applySeriesOptionModules(s,e),this.applySeriesValues(s,e),s}applySeriesOptionModules(e,i){const s=e.createModuleContext(),n=e.getModuleMap();for(const r of import_ag_charts_core153.ModuleRegistry.listModulesByType(import_ag_charts_core153.ModuleType.SeriesPlugin))r.name in i&&(r.seriesTypes?.includes(e.type)??!0)&&n.addModule(r.name,r.create(s))}applySeriesValues(e,i){const s=e.getModuleMap(),{type:n,data:r,listeners:a,seriesGrouping:o,showInMiniChart:l,...c}=i;for(const h of import_ag_charts_core153.ModuleRegistry.listModulesByType(import_ag_charts_core153.ModuleType.SeriesPlugin))if(h.name in c){const u=s.getModule(h.name);if(u){const d=c[h.name];u.properties.set(d),delete c[h.name]}}c.visible!=null&&(e.visible=c.visible),e.properties.set(c),"data"in i&&e.setOptionsData(r==null?void 0:DataSet.wrap(r)),"listeners"in i&&(this.registerListeners(e,a),this.series.includes(e)&&this.addSeriesListeners(e)),"seriesGrouping"in i&&(o==null?e.seriesGrouping=void 0:e.seriesGrouping={...e.seriesGrouping,...o})}createAxes(e,i){const s=this.createChartAxes(),n=this.getModuleContext();for(const[r,a]of(0,import_ag_charts_core153.entries)(e)){const o=import_ag_charts_core153.ModuleRegistry.getAxisModule(a.type).create(n);o.id=r,this.applyAxisModules(o,a),(0,import_ag_charts_core153.jsonApply)(o,a,{skip:i}),s.push(o)}return guessInvalidPositions(s),s}applyAxisModules(e,i){const s=e.createModuleContext(),n=e.getModuleMap();for(const r of import_ag_charts_core153.ModuleRegistry.listModulesByType(import_ag_charts_core153.ModuleType.AxisPlugin)){const a=i[r.name]!=null;a!==n.isEnabled(r.name)&&(a?(n.addModule(r.name,r.create(s)),e[r.name]=n.getModule(r.name)):(n.removeModule(r.name),delete e[r.name]))}}registerListeners(e,i){if(e.clearEventListeners(),i&&typeof i=="object")for(const[s,n]of(0,import_ag_charts_core153.entries)(i))n!=null&&e.addEventListener(s,n)}async applyTransaction(e){await this.updateMutex.acquire(()=>{this.data.addTransaction(e),this.update(import_ag_charts_core153.ChartUpdateType.UPDATE_DATA,{apiUpdate:!0,skipAnimations:!0})}),await this.waitForUpdate()}onSyncActiveClear(){this.seriesAreaManager.onActiveClear()}};_Chart.className="Chart",_Chart.chartsInstances=new WeakMap,__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({newValue(t){this.destroyed||(this.ctx.domManager.setContainer(t),_Chart.chartsInstances.set(t,this))},oldValue(t){_Chart.chartsInstances.delete(t)}})],_Chart.prototype,"container",2),__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({newValue(t){this.resize("width option",{inWidth:t})}})],_Chart.prototype,"width",2),__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({newValue(t){this.resize("height option",{inHeight:t})}})],_Chart.prototype,"height",2),__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({newValue(t){this.resize("minWidth option",{inMinWidth:t})}})],_Chart.prototype,"minWidth",2),__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({newValue(t){this.resize("minHeight option",{inMinHeight:t})}})],_Chart.prototype,"minHeight",2),__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({newValue(t){this.resize("overrideDevicePixelRatio option",{inOverrideDevicePixelRatio:t})}})],_Chart.prototype,"overrideDevicePixelRatio",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"padding",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"keyboard",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"touch",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"mode",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"styleNonce",2),__decorateClass([(0,import_ag_charts_core153.ProxyProperty)("chartCaptions.title")],_Chart.prototype,"title",2),__decorateClass([(0,import_ag_charts_core153.ProxyProperty)("chartCaptions.subtitle")],_Chart.prototype,"subtitle",2),__decorateClass([(0,import_ag_charts_core153.ProxyProperty)("chartCaptions.footnote")],_Chart.prototype,"footnote",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"formatter",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"suppressFieldDotNotation",2),__decorateClass([import_ag_charts_core153.Property],_Chart.prototype,"loadGoogleFonts",2),__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({changeValue(t,e){this.onAxisChange(t,e)}})],_Chart.prototype,"axes",2),__decorateClass([(0,import_ag_charts_core153.ActionOnSet)({changeValue(t,e){this.onSeriesChange(t,e)}})],_Chart.prototype,"series",2);var Chart=_Chart,import_ag_charts_core185=require("ag-charts-core"),import_ag_charts_core184=require("ag-charts-core"),import_ag_charts_core155=require("ag-charts-core"),import_ag_charts_core154=require("ag-charts-core");function paletteType(t){return t?.up||t?.down||t?.neutral?"user-full":t?.fills||t?.strokes?"user-indexed":"inbuilt"}var DEFAULT_FILLS={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},DEFAULT_STROKES={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},DEFAULT_BACKGROUND_FILL="white",PRESET_OVERRIDES_TYPES={"radial-gauge":!0,"linear-gauge":!0};function hasUserOptionLessThan1(t){return{$some:[{$and:[{$or:[{$isSeriesType:"line"},{$isSeriesType:"scatter"},{$isSeriesType:"area"},{$isSeriesType:"radar"},{$isSeriesType:"rangeArea"}]},{$isUserOption:[`/series/$index/${t}`,{$lessThan:[{$path:`/series/$index/${t}`},1]},!1]}]},{$path:"/series"}]}}function isPresetOverridesType(t){return PRESET_OVERRIDES_TYPES[t]===!0}var _ChartTheme=class he{static getDefaultColors(){return{fills:DEFAULT_FILLS,fillsFallback:Object.values(DEFAULT_FILLS),strokes:DEFAULT_STROKES,sequentialColors:(0,import_ag_charts_core154.getSequentialColors)(DEFAULT_FILLS),divergingColors:[DEFAULT_FILLS.ORANGE,DEFAULT_FILLS.YELLOW,DEFAULT_FILLS.GREEN],hierarchyColors:["#fff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"],secondSequentialColors:import_ag_charts_core154.Color.interpolate([import_ag_charts_core154.Color.fromHexString(DEFAULT_FILLS.BLUE),import_ag_charts_core154.Color.fromHexString("#cbdef5")],8).map(e=>e.toString()),secondDivergingColors:[DEFAULT_FILLS.GREEN,DEFAULT_FILLS.YELLOW,DEFAULT_FILLS.RED],secondHierarchyColors:["#fff","#c5cbd1","#a4b1bd","#8498a9","#648096"],up:{fill:DEFAULT_FILLS.GREEN,stroke:DEFAULT_STROKES.GREEN},down:{fill:DEFAULT_FILLS.RED,stroke:DEFAULT_STROKES.RED},neutral:{fill:DEFAULT_FILLS.GRAY,stroke:DEFAULT_STROKES.GRAY},altUp:{fill:DEFAULT_FILLS.BLUE,stroke:DEFAULT_STROKES.BLUE},altDown:{fill:DEFAULT_FILLS.ORANGE,stroke:DEFAULT_STROKES.ORANGE},altNeutral:{fill:DEFAULT_FILLS.GRAY,stroke:DEFAULT_STROKES.GRAY}}}static getDefaultPublicParameters(){return{accentColor:"#2196f3",axisColor:{$foregroundBackgroundMix:.325},backgroundColor:DEFAULT_BACKGROUND_FILL,borderColor:{$foregroundOpacity:.15},borderRadius:4,chartBackgroundColor:{$ref:"backgroundColor"},chartPadding:20,focusShadow:"0 0 0 3px var(--ag-charts-accent-color)",foregroundColor:"#181d1f",fontFamily:"Verdana, sans-serif",fontSize:import_ag_charts_core154.BASE_FONT_SIZE,fontWeight:400,gridLineColor:{$foregroundBackgroundMix:.1},popupShadow:"0 0 16px rgba(0, 0, 0, 0.15)",subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"chartBackgroundColor"},.38]},textColor:{$ref:"foregroundColor"},separationLinesColor:{$foregroundBackgroundMix:.17},chromeBackgroundColor:{$foregroundBackgroundMix:.02},chromeFontFamily:{$ref:"fontFamily"},chromeFontSize:{$ref:"fontSize"},chromeFontWeight:{$ref:"fontWeight"},chromeTextColor:{$ref:"foregroundColor"},chromeSubtleTextColor:{$mix:[{$ref:"chromeTextColor"},{$ref:"backgroundColor"},.38]},buttonBackgroundColor:{$ref:"backgroundColor"},buttonBorder:!0,buttonFontWeight:400,buttonTextColor:{$ref:"textColor"},inputBackgroundColor:{$ref:"backgroundColor"},inputBorder:!0,inputTextColor:{$ref:"textColor"},menuBackgroundColor:{$ref:"chromeBackgroundColor"},menuBorder:!0,menuTextColor:{$ref:"chromeTextColor"},panelBackgroundColor:{$ref:"chromeBackgroundColor"},panelSubtleTextColor:{$ref:"chromeSubtleTextColor"},tooltipBackgroundColor:{$ref:"chromeBackgroundColor"},tooltipBorder:!0,tooltipTextColor:{$ref:"chromeTextColor"},tooltipSubtleTextColor:{$ref:"chromeSubtleTextColor"},crosshairLabelBackgroundColor:{$ref:"foregroundColor"},crosshairLabelTextColor:{$ref:"chartBackgroundColor"}}}static getAxisDefaults({title:e,time:i}){return(0,import_ag_charts_core154.mergeDefaults)(e&&{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:import_ag_charts_core154.FONT_SIZE_RATIO.MEDIUM},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},i&&{parentLevel:{enabled:!1,label:{enabled:{$path:"../../label/enabled"},border:{enabled:{$or:[{$isUserOption:["../border",!0,!1]},{$path:"../../../label/border/enabled"}]},strokeWidth:{$path:"../../../label/border/strokeWidth"},stroke:{$path:"../../../label/border/stroke"}},fill:{$path:"../../label/fill"},fontSize:{$path:"../../label/fontSize"},fontFamily:{$path:"../../label/fontFamily"},fontWeight:"bold",spacing:{$path:"../../label/spacing"},color:{$path:"../../label/color"},cornerRadius:{$path:"../../label/cornerRadius"},padding:{$path:"../../label/padding"},avoidCollisions:{$path:"../../label/avoidCollisions"}},tick:{enabled:{$path:"../../tick/enabled"},width:{$path:"../../tick/width"},size:{$path:"../../tick/size"},stroke:{$path:"../../tick/stroke"}}}},{label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:11,color:{$ref:"textColor"},avoidCollisions:!0,cornerRadius:4,border:{enabled:{$isUserOption:["../border",!0,!1]},strokeWidth:1,stroke:{$foregroundOpacity:.08}},padding:{$if:[{$eq:[{$path:"./border/enabled"},!0]},{left:12,right:12,top:8,bottom:8},void 0]}},line:{enabled:!0,width:1,stroke:{$ref:"axisColor"}},tick:{enabled:!1,size:6,width:1,stroke:{$ref:"axisColor"}},gridLine:{enabled:!0,width:1,style:{$apply:[{fillOpacity:1,stroke:{$ref:"gridLineColor"},strokeWidth:{$path:"../../width"},lineDash:[]},[{fillOpacity:1,stroke:{$ref:"gridLineColor"},strokeWidth:{$path:"../../width"},lineDash:[]}]]}},crossLines:{$apply:[{enabled:!0,fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},fillOpacity:.08,strokeWidth:1,label:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},padding:5,color:{$ref:"textColor"},border:{enabled:!1,stroke:{$ref:"foregroundColor"},strokeOpacity:1,strokeWidth:{$isUserOption:["./stroke",1,0]}}}},void 0,{$pathString:["/common/axes/$axisType/crossLines",{axisType:{$path:["../type"]}}]},{$pathString:["/$seriesType/axes/$axisType/crossLines",{seriesType:{$path:["/series/0/type","line"]},axisType:{$path:["../type"]}}]}]}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:{$ref:"chartBackgroundColor"}},padding:{top:{$ref:"chartPadding"},right:{$ref:"chartPadding"},bottom:{$ref:"chartPadding"},left:{$ref:"chartPadding"}},seriesArea:{border:{enabled:!1,stroke:{$ref:"foregroundColor"},strokeOpacity:1,strokeWidth:1},cornerRadius:4,padding:{$if:[{$eq:[{$path:"./border/enabled"},!0]},5,0]}},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",spacing:{$if:[{$path:"../subtitle/enabled"},10,20]},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:import_ag_charts_core154.FONT_SIZE_RATIO.LARGEST},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},wrapping:"hyphenate",layoutStyle:import_ag_charts_core154.DEFAULT_CAPTION_LAYOUT_STYLE,textAlign:import_ag_charts_core154.DEFAULT_CAPTION_ALIGNMENT},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:import_ag_charts_core154.FONT_SIZE_RATIO.MEDIUM},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:import_ag_charts_core154.DEFAULT_CAPTION_LAYOUT_STYLE,textAlign:import_ag_charts_core154.DEFAULT_CAPTION_ALIGNMENT},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:{$rem:import_ag_charts_core154.FONT_SIZE_RATIO.MEDIUM},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:import_ag_charts_core154.DEFAULT_CAPTION_LAYOUT_STYLE,textAlign:import_ag_charts_core154.DEFAULT_CAPTION_ALIGNMENT},highlight:{drawingMode:{$if:[{$or:[hasUserOptionLessThan1("highlight/highlightedItem/opacity"),hasUserOptionLessThan1("highlight/unhighlightedItem/opacity"),hasUserOptionLessThan1("highlight/highlightedSeries/opacity"),hasUserOptionLessThan1("highlight/unhighlightedSeries/opacity"),hasUserOptionLessThan1("fillOpacity"),hasUserOptionLessThan1("marker/fillOpacity")]},"overlap","cutout"]}},tooltip:{enabled:!0,darkTheme:import_ag_charts_core154.IS_DARK_THEME,delay:0,pagination:!1,mode:{$if:[{$or:[{$and:[{$isChartType:"cartesian"},{$not:{$hasSeriesType:"bubble"}},{$not:{$hasSeriesType:"scatter"}},{$greaterThan:[{$size:{$path:"/series"}},1]},{$lessThan:[{$size:{$path:"/series"}},4]}]},{$and:[{$isChartType:"polar"},{$greaterThan:[{$size:{$path:"/series"}},1]},{$lessThan:[{$size:{$path:"/series"}},4]}]}]},"shared","single"]}},overlays:{darkTheme:import_ag_charts_core154.IS_DARK_THEME},listeners:{},series:{tooltip:{range:{$if:[{$eq:[{$path:["/tooltip/range","exact"]},"area"]},"exact",{$path:["/tooltip/range","exact"]}]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","pointer"]},placement:{$path:["/tooltip/position/placement",void 0]},xOffset:{$path:["/tooltip/position/xOffset",0]},yOffset:{$path:["/tooltip/position/yOffset",0]}}}}}}constructor(e={}){const{overrides:i,palette:s,params:n}=(0,import_ag_charts_core154.deepClone)(e),r=this.createChartConfigPerChartType(this.getDefaults()),a={};i&&this.processOverrides(a,i);const{fills:o,strokes:l,sequentialColors:c,...h}=this.getDefaultColors();this.palette=(0,import_ag_charts_core154.deepFreeze)((0,import_ag_charts_core154.mergeDefaults)(s,{fills:Object.values(o),strokes:Object.values(l),sequentialColors:Object.values(c),...h})),this.paletteType=paletteType(s),this.params=(0,import_ag_charts_core154.mergeDefaults)(n,this.getPublicParameters()),this.config=(0,import_ag_charts_core154.deepFreeze)((0,import_ag_charts_core154.deepClone)(r)),this.overrides=(0,import_ag_charts_core154.deepFreeze)(i),this.presets=(0,import_ag_charts_core154.deepFreeze)(a)}processOverrides(e,i){for(const s of import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.Series)){const n=s.name,r=i[n];isPresetOverridesType(n)&&(e[n]=r,delete i[n])}}createChartConfigPerChartType(e){var i;for(const s of import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.Chart))for(const n of import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.Series))n.chartType===s.name&&(e[i=n.name]??(e[i]=s.themeTemplate));return e}getDefaults(){const e=(n,r)=>{const a={},o=(0,import_ag_charts_core154.mergeDefaults)({axes:{}},...Array.from(import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.Plugin),l=>({[l.name]:l.themeTemplate})),import_ag_charts_core154.ModuleRegistry.getChartModule(n)?.themeTemplate,this.getChartDefaults());for(const l of r){a[l]=(0,import_ag_charts_core154.mergeDefaults)(getSeriesThemeTemplate(l),a[l]??o);const{axes:c}=a[l];for(const h of import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.Axis))c[h.name]=(0,import_ag_charts_core154.mergeDefaults)(c[h.name],!h.chartType||h.chartType===n?getAxisThemeTemplate(h.name):null,he.axisDefault[h.name]);(l==="map-shape-background"||l==="map-line-background")&&delete a[l].series.tooltip}return a},i=[...import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.Series)],s=(0,import_ag_charts_core154.groupBy)(i,n=>n.chartType||"unknown");return(0,import_ag_charts_core154.mergeDefaults)(...Object.keys(s).map(n=>e(n,s[n]?.map(r=>r.name)??[])))}static applyTemplateTheme(e,i,s){if((0,import_ag_charts_core154.isArray)(e))for(let n=0;n<e.length;n++){const r=e[n];typeof r=="symbol"&&s?.has(r)&&(e[n]=s.get(r))}else for(const n of Object.keys(e)){const r=e[n];typeof r=="symbol"&&s?.has(r)&&(e[n]=s.get(r))}}templateTheme(e,i=!0){const s=i?(0,import_ag_charts_core154.deepClone)(e):e,n=this.getTemplateParameters();return(0,import_ag_charts_core154.jsonWalk)(s,he.applyTemplateTheme,void 0,void 0,n),s}getDefaultColors(){return he.getDefaultColors()}getPublicParameters(){return he.getDefaultPublicParameters()}getTemplateParameters(){const e=new Map;e.set(import_ag_charts_core154.IS_DARK_THEME,!1),e.set(import_ag_charts_core154.DEFAULT_SHADOW_COLOUR,"#00000080"),e.set(import_ag_charts_core154.DEFAULT_SPARKLINE_CROSSHAIR_STROKE,"#aaa"),e.set(import_ag_charts_core154.DEFAULT_CAPTION_LAYOUT_STYLE,"block"),e.set(import_ag_charts_core154.DEFAULT_CAPTION_ALIGNMENT,"center"),e.set(import_ag_charts_core154.DEFAULT_FIBONACCI_STROKES,["#797b86","#e24c4a","#f49d2d","#65ab58","#409682","#4db9d2","#5090dc","#3068f9","#e24c4a","#913aac","#d93e64"]),e.set(import_ag_charts_core154.DEFAULT_POLAR_SERIES_STROKE,DEFAULT_BACKGROUND_FILL),e.set(import_ag_charts_core154.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,DEFAULT_FILLS.BLUE),e.set(import_ag_charts_core154.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,DEFAULT_FILLS.BLUE),e.set(import_ag_charts_core154.DEFAULT_TEXT_ANNOTATION_COLOR,DEFAULT_FILLS.BLUE),e.set(import_ag_charts_core154.DEFAULT_ANNOTATION_HANDLE_FILL,DEFAULT_BACKGROUND_FILL),e.set(import_ag_charts_core154.DEFAULT_ANNOTATION_STATISTICS_FILL,"#fafafa"),e.set(import_ag_charts_core154.DEFAULT_ANNOTATION_STATISTICS_STROKE,"#ddd"),e.set(import_ag_charts_core154.DEFAULT_ANNOTATION_STATISTICS_COLOR,"#000"),e.set(import_ag_charts_core154.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,"#181d1f"),e.set(import_ag_charts_core154.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,"#e35c5c"),e.set(import_ag_charts_core154.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,"#e35c5c"),e.set(import_ag_charts_core154.DEFAULT_TEXTBOX_FILL,"#fafafa"),e.set(import_ag_charts_core154.DEFAULT_TEXTBOX_STROKE,"#ddd"),e.set(import_ag_charts_core154.DEFAULT_TEXTBOX_COLOR,"#000"),e.set(import_ag_charts_core154.DEFAULT_TOOLBAR_POSITION,"top");const i=this.getDefaultColors();return e.set(import_ag_charts_core154.PALETTE_UP_STROKE,this.palette.up?.stroke??i.up.stroke),e.set(import_ag_charts_core154.PALETTE_UP_FILL,this.palette.up?.fill??i.up.fill),e.set(import_ag_charts_core154.PALETTE_DOWN_STROKE,this.palette.down?.stroke??i.down.stroke),e.set(import_ag_charts_core154.PALETTE_DOWN_FILL,this.palette.down?.fill??i.down.fill),e.set(import_ag_charts_core154.PALETTE_NEUTRAL_STROKE,this.palette.neutral?.stroke??i.neutral.stroke),e.set(import_ag_charts_core154.PALETTE_NEUTRAL_FILL,this.palette.neutral?.fill??i.neutral.fill),e.set(import_ag_charts_core154.PALETTE_ALT_UP_STROKE,this.palette.altUp?.stroke??i.up.stroke),e.set(import_ag_charts_core154.PALETTE_ALT_UP_FILL,this.palette.altUp?.fill??i.up.fill),e.set(import_ag_charts_core154.PALETTE_ALT_DOWN_STROKE,this.palette.altDown?.stroke??i.down.stroke),e.set(import_ag_charts_core154.PALETTE_ALT_DOWN_FILL,this.palette.altDown?.fill??i.down.fill),e.set(import_ag_charts_core154.PALETTE_ALT_NEUTRAL_FILL,this.palette.altNeutral?.fill??i.altNeutral.fill),e.set(import_ag_charts_core154.PALETTE_ALT_NEUTRAL_STROKE,this.palette.altNeutral?.stroke??i.altNeutral.stroke),e}};_ChartTheme.axisDefault={[import_ag_charts_core154.CARTESIAN_AXIS_TYPE.NUMBER]:_ChartTheme.getAxisDefaults({title:!0,time:!1}),[import_ag_charts_core154.CARTESIAN_AXIS_TYPE.LOG]:_ChartTheme.getAxisDefaults({title:!0,time:!1}),[import_ag_charts_core154.CARTESIAN_AXIS_TYPE.CATEGORY]:_ChartTheme.getAxisDefaults({title:!0,time:!1}),[import_ag_charts_core154.CARTESIAN_AXIS_TYPE.GROUPED_CATEGORY]:_ChartTheme.getAxisDefaults({title:!0,time:!1}),[import_ag_charts_core154.CARTESIAN_AXIS_TYPE.TIME]:_ChartTheme.getAxisDefaults({title:!0,time:!0}),[import_ag_charts_core154.CARTESIAN_AXIS_TYPE.UNIT_TIME]:_ChartTheme.getAxisDefaults({title:!0,time:!0}),[import_ag_charts_core154.CARTESIAN_AXIS_TYPE.ORDINAL_TIME]:_ChartTheme.getAxisDefaults({title:!0,time:!0}),[import_ag_charts_core154.POLAR_AXIS_TYPE.ANGLE_CATEGORY]:_ChartTheme.getAxisDefaults({title:!1,time:!1}),[import_ag_charts_core154.POLAR_AXIS_TYPE.ANGLE_NUMBER]:_ChartTheme.getAxisDefaults({title:!1,time:!1}),[import_ag_charts_core154.POLAR_AXIS_TYPE.RADIUS_CATEGORY]:_ChartTheme.getAxisDefaults({title:!0,time:!1}),[import_ag_charts_core154.POLAR_AXIS_TYPE.RADIUS_NUMBER]:_ChartTheme.getAxisDefaults({title:!0,time:!1})};var ChartTheme=_ChartTheme;function getAxisThemeTemplate(t){let e=import_ag_charts_core154.ModuleRegistry.getAxisModule(t)?.themeTemplate??{};for(const i of import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.AxisPlugin))(i.axisTypes?.includes(t)??!0)&&(e=(0,import_ag_charts_core154.mergeDefaults)({[i.name]:i.themeTemplate},e));return e}function getSeriesThemeTemplate(t){let e=import_ag_charts_core154.ModuleRegistry.getSeriesModule(t)?.themeTemplate??{};for(const i of import_ag_charts_core154.ModuleRegistry.listModulesByType(import_ag_charts_core154.ModuleType.SeriesPlugin))(i.seriesTypes?.includes(t)??!0)&&(e=(0,import_ag_charts_core154.mergeDefaults)({series:{[i.name]:i.themeTemplate}},e));return e}var SkippedModules=new Set(["foreground"]);function sanitizeThemeModules(t){const e=new Map;for(const[h,{type:u}]of ExpectedModules)import_ag_charts_core155.ModuleRegistry.hasModule(h)||(e.has(u)?e.get(u).add(h):e.set(u,new Set([h])));if(e.size===0)return t;function i(h){const u=e.get(import_ag_charts_core155.ModuleType.Plugin);if(!(!(0,import_ag_charts_core155.isObject)(h)||!u))for(const d of u)d in h&&h[d].enabled!==!0&&delete h[d]}function s(h){const u=e.get(import_ag_charts_core155.ModuleType.SeriesPlugin);if(!(!(0,import_ag_charts_core155.isObject)(h)||!u))for(const d of u)d in h&&delete h[d]}function n(h){const u=e.get(import_ag_charts_core155.ModuleType.AxisPlugin);if(!(!(0,import_ag_charts_core155.isObject)(h)||!u))for(const d of u)d in h&&h[d].enabled!==!0&&delete h[d]}function r(h){if((0,import_ag_charts_core155.isObject)(h))for(const u of Object.keys(h)){if(e.get(import_ag_charts_core155.ModuleType.Axis)?.has(u)){delete h[u];continue}n(h[u])}}function a(h){(0,import_ag_charts_core155.isObject)(h)&&(r(h.axes),i(h),s(h.series))}const o=(0,import_ag_charts_core155.deepClone)(t.config),l=(0,import_ag_charts_core155.deepClone)(t.overrides),c=(0,import_ag_charts_core155.deepClone)(t.presets);for(const h of Object.keys(o)){if(e.get(import_ag_charts_core155.ModuleType.Series)?.has(h)){delete o[h];continue}a(o[h])}if((0,import_ag_charts_core155.isObject)(l)){const h=l;(0,import_ag_charts_core155.isObject)(h.common)&&(r(h.common.axes),i(h.common));for(const u of Object.keys(h))if(u!=="common"){if(e.get(import_ag_charts_core155.ModuleType.Series)?.has(u)){delete h[u];continue}a(h[u])}}if((0,import_ag_charts_core155.isObject)(c)){const h=c;for(const u of Object.keys(h)){if(e.get(import_ag_charts_core155.ModuleType.Preset)?.has(u)||e.get(import_ag_charts_core155.ModuleType.Series)?.has(u)){delete h[u];continue}i(h[u]),r(h[u]?.axes)}}return Object.create(t,{config:{value:(0,import_ag_charts_core155.deepFreeze)(o),enumerable:!0},overrides:{value:(0,import_ag_charts_core155.isObject)(l)?(0,import_ag_charts_core155.deepFreeze)(l):l,enumerable:!0},presets:{value:(0,import_ag_charts_core155.isObject)(c)?(0,import_ag_charts_core155.deepFreeze)(c):c,enumerable:!0}})}function processModuleOptions(t,e,i){const s=(0,import_ag_charts_core155.unique)(removeUnregisteredModuleOptions(t,e).concat(i));if(!s.length)return;const n=import_ag_charts_core155.ModuleRegistry.isIntegrated()?"https://www.ag-grid.com/data-grid/integrated-charts-installation/":"https://www.ag-grid.com/charts/r/module-registry/",r=(0,import_ag_charts_core155.groupBy)(s,a=>a.enterprise?"enterprise":"community");if(s.length){const a=import_ag_charts_core155.ModuleRegistry.isEnterprise()||r.enterprise?.length?"enterprise":"community";import_ag_charts_core155.Logger.errorOnce(["required modules are not registered. Check if you have registered the modules:","",import_ag_charts_core155.ModuleRegistry.isUmd()?"Install and register 'ag-charts-enterprise' before creating the chart.":createRegistrySnippet(s.map(formatMissingModuleName),a),"",`See ${n} for more details.`].join(`
|
|
`))}}function formatMissingModuleName(t){return t.moduleId??t.name}function formatImportItem(t){return` ${t},`}function formatImports(t,e){return t.length?`import {
|
|
${t.map(formatImportItem).join(`
|
|
`)}
|
|
} from 'ag-charts-${e}';`:null}function createRegistrySnippet(t,e){const i=formatImports(["ModuleRegistry"].concat(t),e),s=t.map(formatImportItem).join(`
|
|
`);return`${i}
|
|
|
|
ModuleRegistry.registerModules([
|
|
${s}
|
|
]);`}function removeUnregisteredModuleOptions(t,e){const i=new Map,s="axes"in e&&(0,import_ag_charts_core155.isObject)(e.axes)?e.axes:{},n=new Set(Object.values(s).map(o=>o?.type).filter(import_ag_charts_core155.isDefined)),r=new Set(e.series?.map(o=>o.type).filter(import_ag_charts_core155.isDefined));function a(o){i.set(o.name,o)}for(const o of ExpectedModules.values())if(!import_ag_charts_core155.ModuleRegistry.hasModule(o.name)&&!SkippedModules.has(o.name)&&!(t&&o.chartType&&t!==o.chartType))switch(o.type){case"chart":break;case"axis":if(n.has(o.name)){for(const h of Object.keys(s))s?.[h].type===o.name&&delete s[h];a(o)}break;case"series":r.has(o.name)&&(e.series=e.series.filter(h=>h.type!==o.name),a(o));break;case"plugin":const l=o.name,c=e[l];(0,import_ag_charts_core155.isObject)(c)&&(c.enabled!==!1&&a(o),delete e[l]);break;case"axis:plugin":for(const h of Object.values(s)){const u=o.name;h?.[u]&&(h[u].enabled!==!1&&a(o),delete h[u])}break;case"series:plugin":for(const h of e.series??[])h[o.name]&&(delete h[o.name],a(o));break}for(const o of r){const l=ExpectedModules.get(o);l?.type===import_ag_charts_core155.ModuleType.Series&&!import_ag_charts_core155.ModuleRegistry.hasModule(l.name)&&!i.has(l.name)&&(e.series=e.series.filter(c=>c.type!==l.name),a(l))}return Array.from(i.values())}function removeIncompatibleModuleOptions(t,e){const i="axes"in e&&(0,import_ag_charts_core155.isObject)(e.axes),s="series"in e&&(0,import_ag_charts_core155.isArray)(e.series),n=a=>t==null||!a.chartType||a.chartType===t,r=[];for(const a of import_ag_charts_core155.ModuleRegistry.listModules())if(import_ag_charts_core155.ModuleRegistry.isModuleType(import_ag_charts_core155.ModuleType.Plugin,a))n(a)||(delete e[a.name],r.push(a.name));else if(import_ag_charts_core155.ModuleRegistry.isModuleType(import_ag_charts_core155.ModuleType.AxisPlugin,a)){if(i&&!n(a)){for(const o of Object.values(e.axes))delete o[a.name];r.push(a.name)}}else if(import_ag_charts_core155.ModuleRegistry.isModuleType(import_ag_charts_core155.ModuleType.SeriesPlugin,a)&&s&&!n(a)){for(const o of e.series)delete o[a.name];r.push(a.name)}return r}var import_ag_charts_core180=require("ag-charts-core"),import_ag_charts_core156=require("ag-charts-core"),DEFAULT_DARK_BACKGROUND_FILL="#192232",DEFAULT_DARK_FILLS={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},DEFAULT_DARK_STROKES={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},DarkTheme=class extends ChartTheme{getDefaultColors(){return{fills:DEFAULT_DARK_FILLS,fillsFallback:Object.values(DEFAULT_DARK_FILLS),strokes:DEFAULT_DARK_STROKES,sequentialColors:(0,import_ag_charts_core156.getSequentialColors)(DEFAULT_DARK_FILLS),divergingColors:[DEFAULT_DARK_FILLS.ORANGE,DEFAULT_DARK_FILLS.YELLOW,DEFAULT_DARK_FILLS.GREEN],hierarchyColors:["#192834","#253746","#324859","#3f596c","#4d6a80"],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[DEFAULT_DARK_FILLS.GREEN,DEFAULT_DARK_FILLS.YELLOW,DEFAULT_DARK_FILLS.RED],secondHierarchyColors:["#192834","#3b5164","#496275","#577287","#668399"],up:{fill:DEFAULT_DARK_FILLS.GREEN,stroke:DEFAULT_DARK_STROKES.GREEN},down:{fill:DEFAULT_DARK_FILLS.RED,stroke:DEFAULT_DARK_STROKES.RED},neutral:{fill:DEFAULT_DARK_FILLS.GRAY,stroke:DEFAULT_DARK_STROKES.GRAY},altUp:{fill:DEFAULT_DARK_FILLS.BLUE,stroke:DEFAULT_DARK_STROKES.BLUE},altDown:{fill:DEFAULT_DARK_FILLS.ORANGE,stroke:DEFAULT_DARK_STROKES.ORANGE},altNeutral:{fill:DEFAULT_DARK_FILLS.GRAY,stroke:DEFAULT_DARK_STROKES.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),axisColor:{$foregroundBackgroundMix:.737},backgroundColor:DEFAULT_DARK_BACKGROUND_FILL,borderColor:{$foregroundBackgroundMix:.216},chromeBackgroundColor:{$foregroundBackgroundMix:.07},foregroundColor:"#fff",gridLineColor:{$foregroundBackgroundMix:.257},popupShadow:"0 0 16px rgba(0, 0, 0, 0.33)",subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"chartBackgroundColor"},.57]},separationLinesColor:{$foregroundBackgroundMix:.44},crosshairLabelBackgroundColor:{$foregroundBackgroundMix:.65}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core156.IS_DARK_THEME,!0),t.set(import_ag_charts_core156.DEFAULT_POLAR_SERIES_STROKE,DEFAULT_DARK_BACKGROUND_FILL),t.set(import_ag_charts_core156.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,DEFAULT_DARK_FILLS.BLUE),t.set(import_ag_charts_core156.DEFAULT_TEXT_ANNOTATION_COLOR,"#fff"),t.set(import_ag_charts_core156.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,DEFAULT_DARK_FILLS.BLUE),t.set(import_ag_charts_core156.DEFAULT_ANNOTATION_HANDLE_FILL,DEFAULT_DARK_BACKGROUND_FILL),t.set(import_ag_charts_core156.DEFAULT_ANNOTATION_STATISTICS_FILL,"#28313e"),t.set(import_ag_charts_core156.DEFAULT_ANNOTATION_STATISTICS_STROKE,"#4b525d"),t.set(import_ag_charts_core156.DEFAULT_ANNOTATION_STATISTICS_COLOR,"#fff"),t.set(import_ag_charts_core156.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,"#fff"),t.set(import_ag_charts_core156.DEFAULT_TEXTBOX_FILL,"#28313e"),t.set(import_ag_charts_core156.DEFAULT_TEXTBOX_STROKE,"#4b525d"),t.set(import_ag_charts_core156.DEFAULT_TEXTBOX_COLOR,"#fff"),t}constructor(t){super(t)}},import_ag_charts_core157=require("ag-charts-core"),FINANCIAL_DARK_FILLS={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},FINANCIAL_DARK_STROKES={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},FinancialDark=class extends DarkTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:{...FINANCIAL_DARK_FILLS},fillsFallback:Object.values({...FINANCIAL_DARK_FILLS}),strokes:{...FINANCIAL_DARK_STROKES},sequentialColors:(0,import_ag_charts_core157.getSequentialColors)(FINANCIAL_DARK_FILLS),divergingColors:[FINANCIAL_DARK_FILLS.GREEN,FINANCIAL_DARK_FILLS.BLUE,FINANCIAL_DARK_FILLS.RED],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],up:{fill:FINANCIAL_DARK_FILLS.GREEN,stroke:FINANCIAL_DARK_STROKES.GREEN},down:{fill:FINANCIAL_DARK_FILLS.RED,stroke:FINANCIAL_DARK_STROKES.RED},neutral:{fill:FINANCIAL_DARK_FILLS.BLUE,stroke:FINANCIAL_DARK_STROKES.BLUE},altUp:{fill:FINANCIAL_DARK_FILLS.GREEN,stroke:FINANCIAL_DARK_STROKES.GREEN},altDown:{fill:FINANCIAL_DARK_FILLS.RED,stroke:FINANCIAL_DARK_STROKES.RED},altNeutral:{fill:FINANCIAL_DARK_FILLS.GRAY,stroke:FINANCIAL_DARK_STROKES.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),chartPadding:0,gridLineColor:{$foregroundBackgroundMix:.12}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core157.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,FINANCIAL_DARK_FILLS.BLUE),t.set(import_ag_charts_core157.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,FINANCIAL_DARK_FILLS.BLUE),t.set(import_ag_charts_core157.DEFAULT_CAPTION_LAYOUT_STYLE,"overlay"),t.set(import_ag_charts_core157.DEFAULT_CAPTION_ALIGNMENT,"left"),t.set(import_ag_charts_core157.DEFAULT_TOOLBAR_POSITION,"bottom"),t}},import_ag_charts_core158=require("ag-charts-core"),FINANCIAL_LIGHT_FILLS={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},FINANCIAL_LIGHT_STROKES={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},FinancialLight=class extends ChartTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:{...FINANCIAL_LIGHT_FILLS},fillsFallback:Object.values({...FINANCIAL_LIGHT_FILLS}),strokes:{...FINANCIAL_LIGHT_STROKES},sequentialColors:(0,import_ag_charts_core158.getSequentialColors)(FINANCIAL_LIGHT_FILLS),divergingColors:[FINANCIAL_LIGHT_FILLS.GREEN,FINANCIAL_LIGHT_FILLS.BLUE,FINANCIAL_LIGHT_FILLS.RED],up:{fill:FINANCIAL_LIGHT_FILLS.GREEN,stroke:FINANCIAL_LIGHT_STROKES.GREEN},down:{fill:FINANCIAL_LIGHT_FILLS.RED,stroke:FINANCIAL_LIGHT_STROKES.RED},neutral:{fill:FINANCIAL_LIGHT_FILLS.BLUE,stroke:FINANCIAL_LIGHT_STROKES.BLUE},altUp:{fill:FINANCIAL_LIGHT_FILLS.GREEN,stroke:FINANCIAL_LIGHT_STROKES.GREEN},altDown:{fill:FINANCIAL_LIGHT_FILLS.RED,stroke:FINANCIAL_LIGHT_STROKES.RED},altNeutral:{fill:FINANCIAL_LIGHT_FILLS.GRAY,stroke:FINANCIAL_LIGHT_STROKES.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),chartPadding:0,gridLineColor:{$foregroundBackgroundMix:.06}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core158.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,FINANCIAL_LIGHT_FILLS.BLUE),t.set(import_ag_charts_core158.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,FINANCIAL_LIGHT_FILLS.BLUE),t.set(import_ag_charts_core158.DEFAULT_CAPTION_LAYOUT_STYLE,"overlay"),t.set(import_ag_charts_core158.DEFAULT_CAPTION_ALIGNMENT,"left"),t.set(import_ag_charts_core158.DEFAULT_TOOLBAR_POSITION,"bottom"),t}},import_ag_charts_core159=require("ag-charts-core"),MATERIAL_DARK_FILLS={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},MATERIAL_DARK_STROKES={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},MaterialDark=class extends DarkTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:MATERIAL_DARK_FILLS,fillsFallback:Object.values(MATERIAL_DARK_FILLS),strokes:MATERIAL_DARK_STROKES,sequentialColors:(0,import_ag_charts_core159.getSequentialColors)(MATERIAL_DARK_FILLS),divergingColors:[MATERIAL_DARK_FILLS.ORANGE,MATERIAL_DARK_FILLS.YELLOW,MATERIAL_DARK_FILLS.GREEN],secondSequentialColors:["#2196f3","#208FEC","#1E88E5","#1C7FDC","#1976d2","#176EC9","#1565c0"],secondDivergingColors:[MATERIAL_DARK_FILLS.GREEN,MATERIAL_DARK_FILLS.YELLOW,MATERIAL_DARK_FILLS.RED],up:{fill:MATERIAL_DARK_FILLS.GREEN,stroke:MATERIAL_DARK_STROKES.GREEN},down:{fill:MATERIAL_DARK_FILLS.RED,stroke:MATERIAL_DARK_STROKES.RED},neutral:{fill:MATERIAL_DARK_FILLS.GRAY,stroke:MATERIAL_DARK_STROKES.GRAY},altUp:{fill:MATERIAL_DARK_FILLS.BLUE,stroke:MATERIAL_DARK_STROKES.BLUE},altDown:{fill:MATERIAL_DARK_FILLS.RED,stroke:MATERIAL_DARK_STROKES.RED},altNeutral:{fill:MATERIAL_DARK_FILLS.GRAY,stroke:MATERIAL_DARK_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core159.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,MATERIAL_DARK_FILLS.BLUE),t.set(import_ag_charts_core159.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,MATERIAL_DARK_FILLS.BLUE),t}},import_ag_charts_core160=require("ag-charts-core"),MATERIAL_LIGHT_FILLS={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},MATERIAL_LIGHT_STROKES={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},MaterialLight=class extends ChartTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:MATERIAL_LIGHT_FILLS,fillsFallback:Object.values(MATERIAL_LIGHT_FILLS),strokes:MATERIAL_LIGHT_STROKES,sequentialColors:(0,import_ag_charts_core160.getSequentialColors)(MATERIAL_LIGHT_FILLS),divergingColors:[MATERIAL_LIGHT_FILLS.ORANGE,MATERIAL_LIGHT_FILLS.YELLOW,MATERIAL_LIGHT_FILLS.GREEN],secondSequentialColors:["#2196f3","#329EF4","#42a5f5","#53ADF6","#64b5f6","#7AC0F8","#90caf9"],secondDivergingColors:[MATERIAL_LIGHT_FILLS.GREEN,MATERIAL_LIGHT_FILLS.YELLOW,MATERIAL_LIGHT_FILLS.RED],up:{fill:MATERIAL_LIGHT_FILLS.GREEN,stroke:MATERIAL_LIGHT_STROKES.GREEN},down:{fill:MATERIAL_LIGHT_FILLS.RED,stroke:MATERIAL_LIGHT_STROKES.RED},neutral:{fill:MATERIAL_LIGHT_FILLS.GRAY,stroke:MATERIAL_LIGHT_STROKES.GRAY},altUp:{fill:MATERIAL_LIGHT_FILLS.BLUE,stroke:MATERIAL_LIGHT_STROKES.BLUE},altDown:{fill:MATERIAL_LIGHT_FILLS.RED,stroke:MATERIAL_LIGHT_STROKES.RED},altNeutral:{fill:MATERIAL_LIGHT_FILLS.GRAY,stroke:MATERIAL_LIGHT_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core160.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,MATERIAL_LIGHT_FILLS.BLUE),t.set(import_ag_charts_core160.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,MATERIAL_LIGHT_FILLS.BLUE),t}},import_ag_charts_core161=require("ag-charts-core"),POLYCHROMA_DARK_FILLS={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},POLYCHROMA_DARK_STROKES={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"},PolychromaDark=class extends DarkTheme{getDefaultColors(){return{fills:POLYCHROMA_DARK_FILLS,fillsFallback:Object.values(POLYCHROMA_DARK_FILLS),strokes:POLYCHROMA_DARK_STROKES,sequentialColors:(0,import_ag_charts_core161.getSequentialColors)(POLYCHROMA_DARK_FILLS),divergingColors:[POLYCHROMA_DARK_FILLS.BLUE,POLYCHROMA_DARK_FILLS.RED],hierarchyColors:[],secondSequentialColors:[POLYCHROMA_DARK_FILLS.BLUE,POLYCHROMA_DARK_FILLS.PURPLE,POLYCHROMA_DARK_FILLS.MAGENTA,POLYCHROMA_DARK_FILLS.PINK,POLYCHROMA_DARK_FILLS.RED,POLYCHROMA_DARK_FILLS.ORANGE,POLYCHROMA_DARK_FILLS.YELLOW,POLYCHROMA_DARK_FILLS.GREEN],secondDivergingColors:[POLYCHROMA_DARK_FILLS.BLUE,POLYCHROMA_DARK_FILLS.RED],secondHierarchyColors:[],up:{fill:POLYCHROMA_DARK_FILLS.GREEN,stroke:POLYCHROMA_DARK_STROKES.GREEN},down:{fill:POLYCHROMA_DARK_FILLS.RED,stroke:POLYCHROMA_DARK_STROKES.RED},neutral:{fill:POLYCHROMA_DARK_FILLS.GRAY,stroke:POLYCHROMA_DARK_STROKES.GRAY},altUp:{fill:POLYCHROMA_DARK_FILLS.BLUE,stroke:POLYCHROMA_DARK_STROKES.BLUE},altDown:{fill:POLYCHROMA_DARK_FILLS.RED,stroke:POLYCHROMA_DARK_STROKES.RED},altNeutral:{fill:POLYCHROMA_DARK_FILLS.GRAY,stroke:POLYCHROMA_DARK_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core161.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,POLYCHROMA_DARK_FILLS.BLUE),t.set(import_ag_charts_core161.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,POLYCHROMA_DARK_FILLS.BLUE),t}},import_ag_charts_core162=require("ag-charts-core"),POLYCHROMA_LIGHT_FILLS={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},POLYCHROMA_LIGHT_STROKES={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},PolychromaLight=class extends ChartTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:POLYCHROMA_LIGHT_FILLS,fillsFallback:Object.values(POLYCHROMA_LIGHT_FILLS),strokes:POLYCHROMA_LIGHT_STROKES,sequentialColors:(0,import_ag_charts_core162.getSequentialColors)(POLYCHROMA_LIGHT_FILLS),divergingColors:[POLYCHROMA_LIGHT_FILLS.BLUE,POLYCHROMA_LIGHT_FILLS.RED],hierarchyColors:[],secondSequentialColors:[POLYCHROMA_LIGHT_FILLS.BLUE,POLYCHROMA_LIGHT_FILLS.PURPLE,POLYCHROMA_LIGHT_FILLS.MAGENTA,POLYCHROMA_LIGHT_FILLS.PINK,POLYCHROMA_LIGHT_FILLS.RED,POLYCHROMA_LIGHT_FILLS.ORANGE,POLYCHROMA_LIGHT_FILLS.YELLOW,POLYCHROMA_LIGHT_FILLS.GREEN],secondDivergingColors:[POLYCHROMA_LIGHT_FILLS.BLUE,POLYCHROMA_LIGHT_FILLS.RED],secondHierarchyColors:[],up:{fill:POLYCHROMA_LIGHT_FILLS.GREEN,stroke:POLYCHROMA_LIGHT_STROKES.GREEN},down:{fill:POLYCHROMA_LIGHT_FILLS.RED,stroke:POLYCHROMA_LIGHT_STROKES.RED},neutral:{fill:POLYCHROMA_LIGHT_FILLS.GRAY,stroke:POLYCHROMA_LIGHT_STROKES.GRAY},altUp:{fill:POLYCHROMA_LIGHT_FILLS.BLUE,stroke:POLYCHROMA_LIGHT_STROKES.BLUE},altDown:{fill:POLYCHROMA_LIGHT_FILLS.RED,stroke:POLYCHROMA_LIGHT_STROKES.RED},altNeutral:{fill:POLYCHROMA_LIGHT_FILLS.GRAY,stroke:POLYCHROMA_LIGHT_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core162.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,POLYCHROMA_LIGHT_FILLS.BLUE),t.set(import_ag_charts_core162.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,POLYCHROMA_LIGHT_FILLS.BLUE),t}},import_ag_charts_core163=require("ag-charts-core"),SHEETS_DARK_FILLS={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},SHEETS_DARK_STROKES={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},SheetsDark=class extends DarkTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:{...SHEETS_DARK_FILLS,RED:SHEETS_DARK_FILLS.ORANGE},fillsFallback:Object.values({...SHEETS_DARK_FILLS,RED:SHEETS_DARK_FILLS.ORANGE}),strokes:{...SHEETS_DARK_STROKES,RED:SHEETS_DARK_STROKES.ORANGE},sequentialColors:(0,import_ag_charts_core163.getSequentialColors)({...SHEETS_DARK_FILLS,RED:SHEETS_DARK_FILLS.ORANGE}),divergingColors:[SHEETS_DARK_FILLS.ORANGE,SHEETS_DARK_FILLS.YELLOW,SHEETS_DARK_FILLS.GREEN],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[SHEETS_DARK_FILLS.GREEN,SHEETS_DARK_FILLS.YELLOW,SHEETS_DARK_FILLS.ORANGE],up:{fill:SHEETS_DARK_FILLS.GREEN,stroke:SHEETS_DARK_STROKES.GREEN},down:{fill:SHEETS_DARK_FILLS.ORANGE,stroke:SHEETS_DARK_STROKES.ORANGE},neutral:{fill:SHEETS_DARK_FILLS.GRAY,stroke:SHEETS_DARK_STROKES.GRAY},altUp:{fill:SHEETS_DARK_FILLS.BLUE,stroke:SHEETS_DARK_STROKES.BLUE},altDown:{fill:SHEETS_DARK_FILLS.ORANGE,stroke:SHEETS_DARK_STROKES.ORANGE},altNeutral:{fill:SHEETS_DARK_FILLS.GRAY,stroke:SHEETS_DARK_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core163.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,SHEETS_DARK_FILLS.BLUE),t.set(import_ag_charts_core163.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,SHEETS_DARK_FILLS.BLUE),t}},import_ag_charts_core164=require("ag-charts-core"),SHEETS_LIGHT_FILLS={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},SHEETS_LIGHT_STROKES={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},SheetsLight=class extends ChartTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:{...SHEETS_LIGHT_FILLS,RED:SHEETS_LIGHT_FILLS.ORANGE},fillsFallback:Object.values({...SHEETS_LIGHT_FILLS,RED:SHEETS_LIGHT_FILLS.ORANGE}),strokes:{...SHEETS_LIGHT_STROKES,RED:SHEETS_LIGHT_STROKES.ORANGE},sequentialColors:(0,import_ag_charts_core164.getSequentialColors)({...SHEETS_LIGHT_FILLS,RED:SHEETS_LIGHT_FILLS.ORANGE}),divergingColors:[SHEETS_LIGHT_FILLS.ORANGE,SHEETS_LIGHT_FILLS.YELLOW,SHEETS_LIGHT_FILLS.GREEN],secondSequentialColors:["#5090dc","#629be0","#73a6e3","#85b1e7","#96bcea","#a8c8ee","#b9d3f1","#cbdef5"],secondDivergingColors:[SHEETS_LIGHT_FILLS.GREEN,SHEETS_LIGHT_FILLS.YELLOW,SHEETS_LIGHT_FILLS.ORANGE],secondHierarchyColors:[],up:{fill:SHEETS_LIGHT_FILLS.GREEN,stroke:SHEETS_LIGHT_STROKES.GREEN},down:{fill:SHEETS_LIGHT_FILLS.ORANGE,stroke:SHEETS_LIGHT_STROKES.ORANGE},neutral:{fill:SHEETS_LIGHT_STROKES.GRAY,stroke:SHEETS_LIGHT_STROKES.GRAY},altUp:{fill:SHEETS_LIGHT_FILLS.BLUE,stroke:SHEETS_LIGHT_STROKES.BLUE},altDown:{fill:SHEETS_LIGHT_FILLS.ORANGE,stroke:SHEETS_LIGHT_STROKES.ORANGE},altNeutral:{fill:SHEETS_LIGHT_FILLS.GRAY,stroke:SHEETS_LIGHT_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core164.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,SHEETS_LIGHT_FILLS.BLUE),t.set(import_ag_charts_core164.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,SHEETS_LIGHT_FILLS.BLUE),t}},import_ag_charts_core177=require("ag-charts-core"),import_ag_charts_core165=require("ag-charts-core"),timeIntervalUnit=(0,import_ag_charts_core165.union)("millisecond","second","minute","hour","day","month","year"),timeIntervalDefs={unit:(0,import_ag_charts_core165.required)(timeIntervalUnit),step:import_ag_charts_core165.positiveNumberNonZero,epoch:import_ag_charts_core165.date,utc:import_ag_charts_core165.boolean};timeIntervalDefs.every=import_ag_charts_core165.callback;var timeInterval=(0,import_ag_charts_core165.optionsDefs)(timeIntervalDefs,"a time interval object"),commonCrossLineLabelOptionsDefs={enabled:import_ag_charts_core165.boolean,text:import_ag_charts_core165.string,padding:import_ag_charts_core165.number,border:import_ag_charts_core165.borderOptionsDef,cornerRadius:import_ag_charts_core165.number,...import_ag_charts_core165.fontOptionsDef,...import_ag_charts_core165.fillOptionsDef},commonCrossLineOptionsDefs=(0,import_ag_charts_core165.attachDescription)({enabled:import_ag_charts_core165.boolean,type:(0,import_ag_charts_core165.required)((0,import_ag_charts_core165.union)("line","range")),range:(0,import_ag_charts_core165.and)((0,import_ag_charts_core165.attachDescription)((t,{options:e})=>e.type==="range","crossLine type to be 'range'"),(0,import_ag_charts_core165.arrayOf)(import_ag_charts_core165.defined),(0,import_ag_charts_core165.arrayLength)(2,2)),value:(0,import_ag_charts_core165.and)((0,import_ag_charts_core165.attachDescription)((t,{options:e})=>e.type==="line","crossLine type to be 'line'"),import_ag_charts_core165.defined),label:commonCrossLineLabelOptionsDefs,fill:import_ag_charts_core165.color,fillOpacity:import_ag_charts_core165.ratio,...import_ag_charts_core165.strokeOptionsDef,...import_ag_charts_core165.lineDashOptionsDef},"cross-line options"),cartesianCrossLineOptionsDefs={...commonCrossLineOptionsDefs,label:{...commonCrossLineLabelOptionsDefs,position:(0,import_ag_charts_core165.union)("top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","inside","inside-left","inside-right","inside-top","inside-bottom","inside-top-left","inside-bottom-left","inside-top-right","inside-bottom-right"),rotation:import_ag_charts_core165.number}},commonAxisLabelOptionsDefs={enabled:import_ag_charts_core165.boolean,rotation:import_ag_charts_core165.number,avoidCollisions:import_ag_charts_core165.boolean,minSpacing:import_ag_charts_core165.positiveNumber,spacing:import_ag_charts_core165.positiveNumber,formatter:(0,import_ag_charts_core165.callbackOf)(import_ag_charts_core165.textOrSegments),itemStyler:(0,import_ag_charts_core165.callbackDefs)({...import_ag_charts_core165.fontOptionsDef,...import_ag_charts_core165.labelBoxOptionsDef,spacing:import_ag_charts_core165.number}),...import_ag_charts_core165.fontOptionsDef,...import_ag_charts_core165.labelBoxOptionsDef},cartesianAxisLabelOptionsDefs={autoRotate:import_ag_charts_core165.boolean,autoRotateAngle:import_ag_charts_core165.number,wrapping:(0,import_ag_charts_core165.union)("never","always","hyphenate","on-space"),truncate:import_ag_charts_core165.boolean,...commonAxisLabelOptionsDefs},cartesianNumericAxisLabel={format:import_ag_charts_core165.numberFormatValidator,...cartesianAxisLabelOptionsDefs},cartesianTimeAxisLabel={format:(0,import_ag_charts_core165.or)(import_ag_charts_core165.string,import_ag_charts_core165.object),...cartesianAxisLabelOptionsDefs},cartesianAxisTick={enabled:import_ag_charts_core165.boolean,width:import_ag_charts_core165.positiveNumber,size:import_ag_charts_core165.positiveNumber,stroke:import_ag_charts_core165.color},cartesianTimeAxisParentLevel={enabled:import_ag_charts_core165.boolean,label:cartesianTimeAxisLabel,tick:cartesianAxisTick},commonAxisIntervalOptionsDefs={values:(0,import_ag_charts_core165.arrayOf)(import_ag_charts_core165.defined),minSpacing:import_ag_charts_core165.positiveNumber},commonAxisOptionsDefs={reverse:import_ag_charts_core165.boolean,gridLine:{enabled:import_ag_charts_core165.boolean,width:import_ag_charts_core165.positiveNumber,style:(0,import_ag_charts_core165.arrayOfDefs)({fill:import_ag_charts_core165.color,fillOpacity:import_ag_charts_core165.positiveNumber,stroke:(0,import_ag_charts_core165.or)(import_ag_charts_core165.color,import_ag_charts_core165.themeOperator),strokeWidth:import_ag_charts_core165.positiveNumber,lineDash:(0,import_ag_charts_core165.arrayOf)(import_ag_charts_core165.positiveNumber)},"a grid-line style object array")},interval:commonAxisIntervalOptionsDefs,label:commonAxisLabelOptionsDefs,line:{enabled:import_ag_charts_core165.boolean,width:import_ag_charts_core165.positiveNumber,stroke:import_ag_charts_core165.color},tick:cartesianAxisTick,context:()=>!0};commonAxisOptionsDefs.layoutConstraints=(0,import_ag_charts_core165.undocumented)({stacked:(0,import_ag_charts_core165.required)(import_ag_charts_core165.boolean),align:(0,import_ag_charts_core165.required)((0,import_ag_charts_core165.union)("start","end")),unit:(0,import_ag_charts_core165.required)((0,import_ag_charts_core165.union)("percent","px")),width:(0,import_ag_charts_core165.required)(import_ag_charts_core165.positiveNumber)});var cartesianAxisOptionsDefs={...commonAxisOptionsDefs,crossAt:{value:(0,import_ag_charts_core165.required)((0,import_ag_charts_core165.or)(import_ag_charts_core165.number,import_ag_charts_core165.date,import_ag_charts_core165.string,(0,import_ag_charts_core165.arrayOf)(import_ag_charts_core165.string))),sticky:import_ag_charts_core165.boolean},crossLines:(0,import_ag_charts_core165.arrayOfDefs)(cartesianCrossLineOptionsDefs,"a cross-line options array"),position:(0,import_ag_charts_core165.union)("top","right","bottom","left"),thickness:import_ag_charts_core165.positiveNumber,maxThicknessRatio:import_ag_charts_core165.ratio,title:{enabled:import_ag_charts_core165.boolean,text:import_ag_charts_core165.textOrSegments,spacing:import_ag_charts_core165.positiveNumber,formatter:(0,import_ag_charts_core165.callbackOf)(import_ag_charts_core165.textOrSegments),...import_ag_charts_core165.fontOptionsDef}};cartesianAxisOptionsDefs.title._enabledFromTheme=(0,import_ag_charts_core165.undocumented)(import_ag_charts_core165.boolean);var cartesianAxisBandHighlightOptions={enabled:import_ag_charts_core165.boolean,...import_ag_charts_core165.fillOptionsDef,...import_ag_charts_core165.strokeOptionsDef,...import_ag_charts_core165.lineDashOptionsDef};function cartesianAxisCrosshairOptions(t,e){const i={enabled:import_ag_charts_core165.boolean,xOffset:import_ag_charts_core165.number,yOffset:import_ag_charts_core165.number,formatter:(0,import_ag_charts_core165.callbackOf)(import_ag_charts_core165.string),renderer:(0,import_ag_charts_core165.callbackOf)((0,import_ag_charts_core165.or)(import_ag_charts_core165.string,(0,import_ag_charts_core165.optionsDefs)({text:import_ag_charts_core165.string,color:import_ag_charts_core165.color,backgroundColor:import_ag_charts_core165.color,opacity:import_ag_charts_core165.ratio},"crosshair label renderer result object")))};let s;return t&&(s={...i,format:e?(0,import_ag_charts_core165.or)(import_ag_charts_core165.string,(0,import_ag_charts_core165.optionsDefs)({millisecond:import_ag_charts_core165.string,second:import_ag_charts_core165.string,hour:import_ag_charts_core165.string,day:import_ag_charts_core165.string,month:import_ag_charts_core165.string,year:import_ag_charts_core165.string})):import_ag_charts_core165.string}),{enabled:import_ag_charts_core165.boolean,snap:import_ag_charts_core165.boolean,label:s??i,...import_ag_charts_core165.strokeOptionsDef,...import_ag_charts_core165.lineDashOptionsDef}}function continuousAxisOptions(t,e){return{min:(0,import_ag_charts_core165.and)(t,(0,import_ag_charts_core165.lessThan)("max")),max:(0,import_ag_charts_core165.and)(t,(0,import_ag_charts_core165.greaterThan)("min")),preferredMin:(0,import_ag_charts_core165.and)(t,(0,import_ag_charts_core165.lessThan)("preferredMax"),(0,import_ag_charts_core165.lessThan)("max")),preferredMax:(0,import_ag_charts_core165.and)(t,(0,import_ag_charts_core165.greaterThan)("preferredMin"),(0,import_ag_charts_core165.greaterThan)("min")),nice:import_ag_charts_core165.boolean,interval:{step:e?(0,import_ag_charts_core165.or)(import_ag_charts_core165.positiveNumberNonZero,timeIntervalUnit,timeInterval):import_ag_charts_core165.positiveNumberNonZero,values:(0,import_ag_charts_core165.arrayOf)(t),minSpacing:(0,import_ag_charts_core165.and)(import_ag_charts_core165.positiveNumber,(0,import_ag_charts_core165.lessThan)("maxSpacing")),maxSpacing:(0,import_ag_charts_core165.and)(import_ag_charts_core165.positiveNumber,(0,import_ag_charts_core165.greaterThan)("minSpacing"))}}}var discreteTimeAxisIntervalOptionsDefs={step:(0,import_ag_charts_core165.or)(import_ag_charts_core165.positiveNumberNonZero,timeIntervalUnit,timeInterval),values:(0,import_ag_charts_core165.arrayOf)((0,import_ag_charts_core165.or)(import_ag_charts_core165.number,import_ag_charts_core165.date)),minSpacing:(0,import_ag_charts_core165.and)(import_ag_charts_core165.positiveNumber,(0,import_ag_charts_core165.lessThan)("maxSpacing")),maxSpacing:(0,import_ag_charts_core165.and)(import_ag_charts_core165.positiveNumber,(0,import_ag_charts_core165.greaterThan)("minSpacing")),placement:(0,import_ag_charts_core165.union)("on","between")},categoryAxisOptionsDefs={...cartesianAxisOptionsDefs,type:(0,import_ag_charts_core165.constant)("category"),label:cartesianAxisLabelOptionsDefs,paddingInner:import_ag_charts_core165.ratio,paddingOuter:import_ag_charts_core165.ratio,groupPaddingInner:import_ag_charts_core165.ratio,crosshair:cartesianAxisCrosshairOptions(),bandAlignment:(0,import_ag_charts_core165.union)("justify","start","center","end"),bandHighlight:cartesianAxisBandHighlightOptions,interval:{...commonAxisIntervalOptionsDefs,placement:(0,import_ag_charts_core165.union)("on","between")}},groupedCategoryAxisOptionsDefs={...cartesianAxisOptionsDefs,type:(0,import_ag_charts_core165.constant)("grouped-category"),label:cartesianAxisLabelOptionsDefs,crosshair:cartesianAxisCrosshairOptions(),bandHighlight:cartesianAxisBandHighlightOptions,paddingInner:import_ag_charts_core165.ratio,groupPaddingInner:import_ag_charts_core165.ratio,depthOptions:(0,import_ag_charts_core165.arrayOfDefs)({label:{enabled:import_ag_charts_core165.boolean,avoidCollisions:import_ag_charts_core165.boolean,wrapping:(0,import_ag_charts_core165.union)("never","always","hyphenate","on-space"),truncate:import_ag_charts_core165.boolean,rotation:import_ag_charts_core165.number,spacing:import_ag_charts_core165.number,...import_ag_charts_core165.fontOptionsDef,...import_ag_charts_core165.labelBoxOptionsDef},tick:{enabled:import_ag_charts_core165.boolean,stroke:import_ag_charts_core165.color,width:import_ag_charts_core165.positiveNumber}},"depth options objects array")},numberAxisOptionsDefs={...cartesianAxisOptionsDefs,...continuousAxisOptions(import_ag_charts_core165.number),type:(0,import_ag_charts_core165.constant)("number"),label:cartesianNumericAxisLabel,crosshair:cartesianAxisCrosshairOptions(!0)},logAxisOptionsDefs={...cartesianAxisOptionsDefs,...continuousAxisOptions(import_ag_charts_core165.number),type:(0,import_ag_charts_core165.constant)("log"),base:(0,import_ag_charts_core165.and)(import_ag_charts_core165.positiveNumberNonZero,(0,import_ag_charts_core165.attachDescription)(t=>t!==1,"not equal to 1")),label:cartesianNumericAxisLabel,crosshair:cartesianAxisCrosshairOptions(!0)},timeAxisOptionsDefs={...cartesianAxisOptionsDefs,...continuousAxisOptions((0,import_ag_charts_core165.or)(import_ag_charts_core165.number,import_ag_charts_core165.date),!0),type:(0,import_ag_charts_core165.constant)("time"),label:cartesianTimeAxisLabel,parentLevel:cartesianTimeAxisParentLevel,crosshair:cartesianAxisCrosshairOptions(!0,!0)},unitTimeAxisOptionsDefs={...cartesianAxisOptionsDefs,type:(0,import_ag_charts_core165.constant)("unit-time"),unit:(0,import_ag_charts_core165.or)(timeInterval,timeIntervalUnit),label:cartesianTimeAxisLabel,parentLevel:cartesianTimeAxisParentLevel,paddingInner:import_ag_charts_core165.ratio,paddingOuter:import_ag_charts_core165.ratio,groupPaddingInner:import_ag_charts_core165.ratio,crosshair:cartesianAxisCrosshairOptions(!0,!0),bandAlignment:(0,import_ag_charts_core165.union)("justify","start","center","end"),bandHighlight:cartesianAxisBandHighlightOptions,min:(0,import_ag_charts_core165.and)((0,import_ag_charts_core165.or)(import_ag_charts_core165.number,import_ag_charts_core165.date),(0,import_ag_charts_core165.lessThan)("max")),max:(0,import_ag_charts_core165.and)((0,import_ag_charts_core165.or)(import_ag_charts_core165.number,import_ag_charts_core165.date),(0,import_ag_charts_core165.greaterThan)("min")),preferredMin:(0,import_ag_charts_core165.and)((0,import_ag_charts_core165.or)(import_ag_charts_core165.number,import_ag_charts_core165.date),(0,import_ag_charts_core165.lessThan)("preferredMax"),(0,import_ag_charts_core165.lessThan)("max")),preferredMax:(0,import_ag_charts_core165.and)((0,import_ag_charts_core165.or)(import_ag_charts_core165.number,import_ag_charts_core165.date),(0,import_ag_charts_core165.greaterThan)("preferredMin"),(0,import_ag_charts_core165.greaterThan)("min")),interval:discreteTimeAxisIntervalOptionsDefs},import_ag_charts_core166=require("ag-charts-core"),ordinalTimeAxisOptionsDefs={...cartesianAxisOptionsDefs,type:(0,import_ag_charts_core166.constant)("ordinal-time"),paddingInner:import_ag_charts_core166.ratio,paddingOuter:import_ag_charts_core166.ratio,groupPaddingInner:import_ag_charts_core166.ratio,label:cartesianTimeAxisLabel,parentLevel:cartesianTimeAxisParentLevel,interval:discreteTimeAxisIntervalOptionsDefs,crosshair:cartesianAxisCrosshairOptions(!0,!0),bandHighlight:cartesianAxisBandHighlightOptions,bandAlignment:(0,import_ag_charts_core166.union)("justify","start","center","end")},angleNumberAxisOptionsDefs={...commonAxisOptionsDefs,...continuousAxisOptions(import_ag_charts_core166.number),type:(0,import_ag_charts_core166.constant)("angle-number"),crossLines:(0,import_ag_charts_core166.arrayOfDefs)(commonCrossLineOptionsDefs),startAngle:import_ag_charts_core166.number,endAngle:import_ag_charts_core166.number,label:{...commonAxisLabelOptionsDefs,orientation:(0,import_ag_charts_core166.union)("fixed","parallel","perpendicular"),format:import_ag_charts_core166.numberFormatValidator}},angleCategoryAxisOptionsDefs={...commonAxisOptionsDefs,type:(0,import_ag_charts_core166.constant)("angle-category"),shape:(0,import_ag_charts_core166.union)("polygon","circle"),crossLines:(0,import_ag_charts_core166.arrayOfDefs)(commonCrossLineOptionsDefs),startAngle:import_ag_charts_core166.number,endAngle:import_ag_charts_core166.number,paddingInner:import_ag_charts_core166.ratio,groupPaddingInner:import_ag_charts_core166.ratio,label:{...commonAxisLabelOptionsDefs,orientation:(0,import_ag_charts_core166.union)("fixed","parallel","perpendicular")}};angleCategoryAxisOptionsDefs.innerRadiusRatio=import_ag_charts_core166.ratio;var radiusNumberAxisOptionsDefs={...commonAxisOptionsDefs,...continuousAxisOptions(import_ag_charts_core166.number),type:(0,import_ag_charts_core166.constant)("radius-number"),shape:(0,import_ag_charts_core166.union)("polygon","circle"),positionAngle:import_ag_charts_core166.number,innerRadiusRatio:import_ag_charts_core166.ratio,crossLines:(0,import_ag_charts_core166.arrayOfDefs)({...commonCrossLineOptionsDefs,label:{...commonCrossLineLabelOptionsDefs,positionAngle:import_ag_charts_core166.number}},"cross-line options"),title:{enabled:import_ag_charts_core166.boolean,text:import_ag_charts_core166.textOrSegments,spacing:import_ag_charts_core166.positiveNumber,formatter:(0,import_ag_charts_core166.callbackOf)(import_ag_charts_core166.textOrSegments),...import_ag_charts_core166.fontOptionsDef},label:{...commonAxisLabelOptionsDefs,format:import_ag_charts_core166.numberFormatValidator}},radiusCategoryAxisOptionsDefs={...commonAxisOptionsDefs,type:(0,import_ag_charts_core166.constant)("radius-category"),positionAngle:import_ag_charts_core166.number,innerRadiusRatio:import_ag_charts_core166.ratio,paddingInner:import_ag_charts_core166.ratio,paddingOuter:import_ag_charts_core166.ratio,groupPaddingInner:import_ag_charts_core166.ratio,label:commonAxisLabelOptionsDefs,crossLines:(0,import_ag_charts_core166.arrayOfDefs)({...commonCrossLineOptionsDefs,label:{...commonCrossLineLabelOptionsDefs,positionAngle:import_ag_charts_core166.number}},"cross-line options"),title:{enabled:import_ag_charts_core166.boolean,text:import_ag_charts_core166.textOrSegments,spacing:import_ag_charts_core166.positiveNumber,formatter:(0,import_ag_charts_core166.callbackOf)(import_ag_charts_core166.textOrSegments),...import_ag_charts_core166.fontOptionsDef}},import_ag_charts_core167=require("ag-charts-core"),highlight=(0,import_ag_charts_core167.multiSeriesHighlightOptionsDef)(import_ag_charts_core167.shapeHighlightOptionsDef,import_ag_charts_core167.shapeHighlightOptionsDef),areaStyler=(0,import_ag_charts_core167.callbackDefs)({...import_ag_charts_core167.strokeOptionsDef,...import_ag_charts_core167.fillOptionsDef,...import_ag_charts_core167.lineDashOptionsDef,marker:import_ag_charts_core167.markerStyleOptionsDefs}),areaSeriesThemeableOptionsDef={showInMiniChart:import_ag_charts_core167.boolean,connectMissingData:import_ag_charts_core167.boolean,interpolation:import_ag_charts_core167.interpolationOptionsDefs,label:import_ag_charts_core167.seriesLabelOptionsDefs,styler:areaStyler,marker:import_ag_charts_core167.markerOptionsDefs,tooltip:import_ag_charts_core167.tooltipOptionsDefsWithArea,shadow:import_ag_charts_core167.shadowOptionsDefs,...import_ag_charts_core167.commonSeriesThemeableOptionsDefs,...import_ag_charts_core167.fillOptionsDef,...import_ag_charts_core167.strokeOptionsDef,...import_ag_charts_core167.lineDashOptionsDef,highlight,segmentation:import_ag_charts_core167.shapeSegmentation},areaSeriesOptionsDef={...areaSeriesThemeableOptionsDef,...import_ag_charts_core167.commonSeriesOptionsDefs,highlight,type:(0,import_ag_charts_core167.required)((0,import_ag_charts_core167.constant)("area")),xKey:(0,import_ag_charts_core167.required)(import_ag_charts_core167.string),yKey:(0,import_ag_charts_core167.required)(import_ag_charts_core167.string),xKeyAxis:import_ag_charts_core167.string,yKeyAxis:import_ag_charts_core167.string,xName:import_ag_charts_core167.string,yName:import_ag_charts_core167.string,legendItemName:import_ag_charts_core167.string,stacked:import_ag_charts_core167.boolean,stackGroup:import_ag_charts_core167.string,normalizedTo:import_ag_charts_core167.number};areaSeriesOptionsDef.yFilterKey=(0,import_ag_charts_core167.undocumented)(import_ag_charts_core167.string);var import_ag_charts_core168=require("ag-charts-core"),highlight2=(0,import_ag_charts_core168.multiSeriesHighlightOptionsDef)(import_ag_charts_core168.barHighlightOptionsDef,import_ag_charts_core168.barHighlightOptionsDef),barStyler=(0,import_ag_charts_core168.callbackDefs)({...import_ag_charts_core168.fillOptionsDef,...import_ag_charts_core168.strokeOptionsDef,...import_ag_charts_core168.lineDashOptionsDef,cornerRadius:import_ag_charts_core168.positiveNumber}),barSeriesThemeableOptionsDef={direction:(0,import_ag_charts_core168.union)("horizontal","vertical"),showInMiniChart:import_ag_charts_core168.boolean,cornerRadius:import_ag_charts_core168.positiveNumber,styler:barStyler,itemStyler:barStyler,crisp:import_ag_charts_core168.boolean,label:{...import_ag_charts_core168.seriesLabelOptionsDefs,placement:(0,import_ag_charts_core168.union)("inside-center","inside-start","inside-end","outside-start","outside-end"),spacing:import_ag_charts_core168.positiveNumber},errorBar:import_ag_charts_core168.errorBarThemeableOptionsDefs,shadow:import_ag_charts_core168.shadowOptionsDefs,tooltip:import_ag_charts_core168.tooltipOptionsDefs,...import_ag_charts_core168.commonSeriesThemeableOptionsDefs,highlight:highlight2,...import_ag_charts_core168.fillOptionsDef,...import_ag_charts_core168.strokeOptionsDef,...import_ag_charts_core168.lineDashOptionsDef,segmentation:import_ag_charts_core168.shapeSegmentation,width:import_ag_charts_core168.positiveNumberNonZero,widthRatio:import_ag_charts_core168.ratio};barSeriesThemeableOptionsDef.sparklineMode=(0,import_ag_charts_core168.undocumented)(import_ag_charts_core168.boolean);var barSeriesOptionsDef={...barSeriesThemeableOptionsDef,...import_ag_charts_core168.commonSeriesOptionsDefs,highlight:highlight2,type:(0,import_ag_charts_core168.required)((0,import_ag_charts_core168.constant)("bar")),xKey:(0,import_ag_charts_core168.required)(import_ag_charts_core168.string),yKey:(0,import_ag_charts_core168.required)(import_ag_charts_core168.string),xKeyAxis:import_ag_charts_core168.string,yKeyAxis:import_ag_charts_core168.string,xName:import_ag_charts_core168.string,yName:import_ag_charts_core168.string,direction:(0,import_ag_charts_core168.union)("horizontal","vertical"),grouped:import_ag_charts_core168.boolean,stacked:import_ag_charts_core168.boolean,stackGroup:import_ag_charts_core168.string,normalizedTo:import_ag_charts_core168.number,legendItemName:import_ag_charts_core168.string,errorBar:import_ag_charts_core168.errorBarOptionsDefs};barSeriesOptionsDef.yFilterKey=(0,import_ag_charts_core168.undocumented)(import_ag_charts_core168.string),barSeriesOptionsDef.pickOutsideVisibleMinorAxis=(0,import_ag_charts_core168.undocumented)(import_ag_charts_core168.boolean),barSeriesOptionsDef.focusPriority=(0,import_ag_charts_core168.undocumented)(import_ag_charts_core168.number),barSeriesOptionsDef.simpleItemStyler=(0,import_ag_charts_core168.undocumented)(import_ag_charts_core168.callback);var import_ag_charts_core169=require("ag-charts-core"),bubbleSeriesThemeableOptionsDef={title:import_ag_charts_core169.string,domain:(0,import_ag_charts_core169.arrayOf)(import_ag_charts_core169.number),maxSize:import_ag_charts_core169.positiveNumber,showInMiniChart:import_ag_charts_core169.boolean,label:{placement:(0,import_ag_charts_core169.union)("top","right","bottom","left"),...import_ag_charts_core169.seriesLabelOptionsDefs},tooltip:import_ag_charts_core169.tooltipOptionsDefs,styler:(0,import_ag_charts_core169.callbackDefs)({...import_ag_charts_core169.markerOptionsDefs,maxSize:import_ag_charts_core169.positiveNumber}),maxRenderedItems:import_ag_charts_core169.number,...import_ag_charts_core169.commonSeriesThemeableOptionsDefs,...(0,import_ag_charts_core169.without)(import_ag_charts_core169.markerOptionsDefs,["enabled"]),highlight:(0,import_ag_charts_core169.multiSeriesHighlightOptionsDef)(import_ag_charts_core169.shapeHighlightOptionsDef,import_ag_charts_core169.shapeHighlightOptionsDef)},bubbleSeriesOptionsDef={...bubbleSeriesThemeableOptionsDef,...import_ag_charts_core169.commonSeriesOptionsDefs,type:(0,import_ag_charts_core169.required)((0,import_ag_charts_core169.constant)("bubble")),xKey:(0,import_ag_charts_core169.required)(import_ag_charts_core169.string),yKey:(0,import_ag_charts_core169.required)(import_ag_charts_core169.string),sizeKey:(0,import_ag_charts_core169.required)(import_ag_charts_core169.string),labelKey:import_ag_charts_core169.string,xName:import_ag_charts_core169.string,yName:import_ag_charts_core169.string,sizeName:import_ag_charts_core169.string,labelName:import_ag_charts_core169.string,legendItemName:import_ag_charts_core169.string,xKeyAxis:import_ag_charts_core169.string,yKeyAxis:import_ag_charts_core169.string,highlight:(0,import_ag_charts_core169.multiSeriesHighlightOptionsDef)(import_ag_charts_core169.shapeHighlightOptionsDef,import_ag_charts_core169.shapeHighlightOptionsDef)};bubbleSeriesOptionsDef.xFilterKey=(0,import_ag_charts_core169.undocumented)(import_ag_charts_core169.string),bubbleSeriesOptionsDef.yFilterKey=(0,import_ag_charts_core169.undocumented)(import_ag_charts_core169.string),bubbleSeriesOptionsDef.sizeFilterKey=(0,import_ag_charts_core169.undocumented)(import_ag_charts_core169.string);var import_ag_charts_core170=require("ag-charts-core"),histogramSeriesThemeableOptionsDef={showInMiniChart:import_ag_charts_core170.boolean,cornerRadius:import_ag_charts_core170.positiveNumber,label:import_ag_charts_core170.seriesLabelOptionsDefs,tooltip:import_ag_charts_core170.tooltipOptionsDefs,shadow:import_ag_charts_core170.shadowOptionsDefs,...import_ag_charts_core170.commonSeriesThemeableOptionsDefs,...import_ag_charts_core170.fillOptionsDef,...import_ag_charts_core170.strokeOptionsDef,...import_ag_charts_core170.lineDashOptionsDef,highlight:(0,import_ag_charts_core170.multiSeriesHighlightOptionsDef)(import_ag_charts_core170.shapeHighlightOptionsDef,import_ag_charts_core170.shapeHighlightOptionsDef),areaPlot:import_ag_charts_core170.boolean,aggregation:(0,import_ag_charts_core170.union)("count","sum","mean"),bins:(0,import_ag_charts_core170.arrayOf)((0,import_ag_charts_core170.arrayOf)(import_ag_charts_core170.number)),binCount:import_ag_charts_core170.positiveNumber},histogramSeriesOptionsDef={...import_ag_charts_core170.commonSeriesOptionsDefs,...histogramSeriesThemeableOptionsDef,type:(0,import_ag_charts_core170.required)((0,import_ag_charts_core170.constant)("histogram")),xKey:(0,import_ag_charts_core170.required)(import_ag_charts_core170.string),yKey:import_ag_charts_core170.string,xKeyAxis:import_ag_charts_core170.string,yKeyAxis:import_ag_charts_core170.string,xName:import_ag_charts_core170.string,yName:import_ag_charts_core170.string},import_ag_charts_core171=require("ag-charts-core"),highlight3=(0,import_ag_charts_core171.multiSeriesHighlightOptionsDef)(import_ag_charts_core171.shapeHighlightOptionsDef,import_ag_charts_core171.lineHighlightOptionsDef),lineStyler=(0,import_ag_charts_core171.callbackDefs)({...import_ag_charts_core171.strokeOptionsDef,...import_ag_charts_core171.lineDashOptionsDef,marker:import_ag_charts_core171.markerStyleOptionsDefs}),lineSeriesThemeableOptionsDef={title:import_ag_charts_core171.string,showInMiniChart:import_ag_charts_core171.boolean,connectMissingData:import_ag_charts_core171.boolean,interpolation:import_ag_charts_core171.interpolationOptionsDefs,label:import_ag_charts_core171.seriesLabelOptionsDefs,styler:lineStyler,marker:import_ag_charts_core171.markerOptionsDefs,tooltip:import_ag_charts_core171.tooltipOptionsDefs,errorBar:import_ag_charts_core171.errorBarThemeableOptionsDefs,...import_ag_charts_core171.commonSeriesThemeableOptionsDefs,...import_ag_charts_core171.strokeOptionsDef,...import_ag_charts_core171.lineDashOptionsDef,highlight:highlight3,segmentation:import_ag_charts_core171.lineSegmentation};lineSeriesThemeableOptionsDef.sparklineMode=(0,import_ag_charts_core171.undocumented)(import_ag_charts_core171.boolean);var lineSeriesOptionsDef={...lineSeriesThemeableOptionsDef,...import_ag_charts_core171.commonSeriesOptionsDefs,highlight:highlight3,type:(0,import_ag_charts_core171.required)((0,import_ag_charts_core171.constant)("line")),xKey:(0,import_ag_charts_core171.required)(import_ag_charts_core171.string),yKey:(0,import_ag_charts_core171.required)(import_ag_charts_core171.string),xKeyAxis:import_ag_charts_core171.string,yKeyAxis:import_ag_charts_core171.string,xName:import_ag_charts_core171.string,yName:import_ag_charts_core171.string,stacked:import_ag_charts_core171.boolean,stackGroup:import_ag_charts_core171.string,normalizedTo:import_ag_charts_core171.number,legendItemName:import_ag_charts_core171.string,errorBar:import_ag_charts_core171.errorBarOptionsDefs};lineSeriesOptionsDef.yFilterKey=(0,import_ag_charts_core171.undocumented)(import_ag_charts_core171.string),lineSeriesOptionsDef.pickOutsideVisibleMinorAxis=(0,import_ag_charts_core171.undocumented)(import_ag_charts_core171.boolean),lineSeriesOptionsDef.focusPriority=(0,import_ag_charts_core171.undocumented)(import_ag_charts_core171.number);var import_ag_charts_core172=require("ag-charts-core"),scatterSeriesThemeableOptionsDef={title:import_ag_charts_core172.string,showInMiniChart:import_ag_charts_core172.boolean,label:{placement:(0,import_ag_charts_core172.union)("top","right","bottom","left"),...import_ag_charts_core172.seriesLabelOptionsDefs},tooltip:import_ag_charts_core172.tooltipOptionsDefs,errorBar:import_ag_charts_core172.errorBarThemeableOptionsDefs,styler:(0,import_ag_charts_core172.callbackDefs)(import_ag_charts_core172.markerOptionsDefs),maxRenderedItems:import_ag_charts_core172.number,...import_ag_charts_core172.commonSeriesThemeableOptionsDefs,...(0,import_ag_charts_core172.without)(import_ag_charts_core172.markerOptionsDefs,["enabled"]),highlight:(0,import_ag_charts_core172.multiSeriesHighlightOptionsDef)(import_ag_charts_core172.shapeHighlightOptionsDef,import_ag_charts_core172.shapeHighlightOptionsDef)},scatterSeriesOptionsDef={...scatterSeriesThemeableOptionsDef,...import_ag_charts_core172.commonSeriesOptionsDefs,type:(0,import_ag_charts_core172.required)((0,import_ag_charts_core172.constant)("scatter")),xKey:(0,import_ag_charts_core172.required)(import_ag_charts_core172.string),yKey:(0,import_ag_charts_core172.required)(import_ag_charts_core172.string),labelKey:import_ag_charts_core172.string,xName:import_ag_charts_core172.string,yName:import_ag_charts_core172.string,labelName:import_ag_charts_core172.string,legendItemName:import_ag_charts_core172.string,xKeyAxis:import_ag_charts_core172.string,yKeyAxis:import_ag_charts_core172.string,errorBar:import_ag_charts_core172.errorBarOptionsDefs,highlight:(0,import_ag_charts_core172.multiSeriesHighlightOptionsDef)(import_ag_charts_core172.shapeHighlightOptionsDef,import_ag_charts_core172.shapeHighlightOptionsDef)};scatterSeriesOptionsDef.xFilterKey=(0,import_ag_charts_core172.undocumented)(import_ag_charts_core172.string),scatterSeriesOptionsDef.yFilterKey=(0,import_ag_charts_core172.undocumented)(import_ag_charts_core172.string),scatterSeriesOptionsDef.sizeFilterKey=(0,import_ag_charts_core172.undocumented)(import_ag_charts_core172.string);var import_ag_charts_core174=require("ag-charts-core"),import_ag_charts_core173=require("ag-charts-core"),highlight4=(0,import_ag_charts_core173.multiSeriesHighlightOptionsDef)(import_ag_charts_core173.shapeHighlightOptionsDef,import_ag_charts_core173.shapeHighlightOptionsDef),pieSeriesThemeableOptionsDef={...import_ag_charts_core173.commonSeriesThemeableOptionsDefs,radiusMin:import_ag_charts_core173.positiveNumber,radiusMax:import_ag_charts_core173.positiveNumber,rotation:import_ag_charts_core173.number,outerRadiusOffset:import_ag_charts_core173.number,outerRadiusRatio:import_ag_charts_core173.ratio,hideZeroValueSectorsInLegend:import_ag_charts_core173.boolean,sectorSpacing:import_ag_charts_core173.positiveNumber,cornerRadius:import_ag_charts_core173.positiveNumber,itemStyler:(0,import_ag_charts_core173.callbackDefs)({...import_ag_charts_core173.fillOptionsDef,...import_ag_charts_core173.strokeOptionsDef,...import_ag_charts_core173.lineDashOptionsDef,cornerRadius:import_ag_charts_core173.positiveNumber}),title:{enabled:import_ag_charts_core173.boolean,text:import_ag_charts_core173.string,showInLegend:import_ag_charts_core173.boolean,spacing:import_ag_charts_core173.positiveNumber,...import_ag_charts_core173.fontOptionsDef},calloutLabel:{enabled:import_ag_charts_core173.boolean,offset:import_ag_charts_core173.number,minAngle:import_ag_charts_core173.positiveNumber,avoidCollisions:import_ag_charts_core173.boolean,formatter:(0,import_ag_charts_core173.callbackOf)(import_ag_charts_core173.textOrSegments),format:import_ag_charts_core173.string,itemStyler:(0,import_ag_charts_core173.callbackDefs)({enabled:import_ag_charts_core173.boolean,...import_ag_charts_core173.labelBoxOptionsDef,...import_ag_charts_core173.fontOptionsDef}),...import_ag_charts_core173.labelBoxOptionsDef,...import_ag_charts_core173.fontOptionsDef},sectorLabel:{enabled:import_ag_charts_core173.boolean,positionOffset:import_ag_charts_core173.number,positionRatio:import_ag_charts_core173.ratio,formatter:(0,import_ag_charts_core173.callbackOf)(import_ag_charts_core173.textOrSegments),format:import_ag_charts_core173.string,itemStyler:(0,import_ag_charts_core173.callbackDefs)({enabled:import_ag_charts_core173.boolean,...import_ag_charts_core173.labelBoxOptionsDef,...import_ag_charts_core173.fontOptionsDef}),...import_ag_charts_core173.labelBoxOptionsDef,...import_ag_charts_core173.fontOptionsDef},calloutLine:{colors:(0,import_ag_charts_core173.arrayOf)(import_ag_charts_core173.color),length:import_ag_charts_core173.positiveNumber,strokeWidth:import_ag_charts_core173.positiveNumber,itemStyler:(0,import_ag_charts_core173.callbackDefs)({color:import_ag_charts_core173.color,length:import_ag_charts_core173.positiveNumber,strokeWidth:import_ag_charts_core173.positiveNumber})},fills:(0,import_ag_charts_core173.arrayOf)(import_ag_charts_core173.colorUnion),strokes:(0,import_ag_charts_core173.arrayOf)(import_ag_charts_core173.color),tooltip:import_ag_charts_core173.tooltipOptionsDefs,shadow:import_ag_charts_core173.shadowOptionsDefs,highlight:highlight4,...import_ag_charts_core173.lineDashOptionsDef,...(0,import_ag_charts_core173.without)(import_ag_charts_core173.fillOptionsDef,["fill"]),...(0,import_ag_charts_core173.without)(import_ag_charts_core173.strokeOptionsDef,["stroke"])},pieSeriesOptionsDef={...pieSeriesThemeableOptionsDef,...import_ag_charts_core173.commonSeriesOptionsDefs,type:(0,import_ag_charts_core173.required)((0,import_ag_charts_core173.constant)("pie")),angleKey:(0,import_ag_charts_core173.required)(import_ag_charts_core173.string),radiusKey:import_ag_charts_core173.string,calloutLabelKey:import_ag_charts_core173.string,sectorLabelKey:import_ag_charts_core173.string,legendItemKey:import_ag_charts_core173.string,angleName:import_ag_charts_core173.string,radiusName:import_ag_charts_core173.string,calloutLabelName:import_ag_charts_core173.string,sectorLabelName:import_ag_charts_core173.string,highlight:highlight4};pieSeriesOptionsDef.angleFilterKey=(0,import_ag_charts_core173.undocumented)(import_ag_charts_core173.string),pieSeriesOptionsDef.defaultColorRange=(0,import_ag_charts_core173.undocumented)((0,import_ag_charts_core173.arrayOf)((0,import_ag_charts_core173.arrayOf)(import_ag_charts_core173.color))),pieSeriesOptionsDef.defaultPatternFills=(0,import_ag_charts_core173.undocumented)((0,import_ag_charts_core173.arrayOf)(import_ag_charts_core173.color)),pieSeriesOptionsDef.title._enabledFromTheme=(0,import_ag_charts_core173.undocumented)(import_ag_charts_core173.boolean),pieSeriesOptionsDef.calloutLabel._enabledFromTheme=(0,import_ag_charts_core173.undocumented)(import_ag_charts_core173.boolean),pieSeriesOptionsDef.sectorLabel._enabledFromTheme=(0,import_ag_charts_core173.undocumented)(import_ag_charts_core173.boolean),pieSeriesOptionsDef.angleKeyAxis=(0,import_ag_charts_core173.undocumented)(import_ag_charts_core173.string),pieSeriesOptionsDef.radiusKeyAxis=(0,import_ag_charts_core173.undocumented)(import_ag_charts_core173.string);var donutSeriesThemeableOptionsDef={...pieSeriesThemeableOptionsDef,innerRadiusOffset:import_ag_charts_core174.number,innerRadiusRatio:import_ag_charts_core174.ratio,innerCircle:{fill:import_ag_charts_core174.string,fillOpacity:import_ag_charts_core174.ratio},innerLabels:{spacing:import_ag_charts_core174.positiveNumber,...import_ag_charts_core174.fontOptionsDef,...import_ag_charts_core174.labelBoxOptionsDef}},donutSeriesOptionsDef={...donutSeriesThemeableOptionsDef,...pieSeriesOptionsDef,type:(0,import_ag_charts_core174.required)((0,import_ag_charts_core174.constant)("donut")),innerLabels:(0,import_ag_charts_core174.arrayOfDefs)({text:(0,import_ag_charts_core174.required)(import_ag_charts_core174.string),spacing:import_ag_charts_core174.positiveNumber,...import_ag_charts_core174.fontOptionsDef,...import_ag_charts_core174.labelBoxOptionsDef},"inner label options array")};donutSeriesOptionsDef.angleFilterKey=(0,import_ag_charts_core174.undocumented)(import_ag_charts_core174.string);var import_ag_charts_core175=require("ag-charts-core"),annotationLineOptionsDef={lineStyle:(0,import_ag_charts_core175.union)("solid","dashed","dotted"),...import_ag_charts_core175.lineDashOptionsDef},annotationHandleStylesDefs={...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef,...import_ag_charts_core175.lineDashOptionsDef},annotationTextStylesDef={visible:import_ag_charts_core175.boolean,locked:import_ag_charts_core175.boolean,readOnly:import_ag_charts_core175.boolean,handle:annotationHandleStylesDefs,...import_ag_charts_core175.fontOptionsDef},annotationLineTextDefs={position:(0,import_ag_charts_core175.union)("top","center","bottom"),alignment:(0,import_ag_charts_core175.union)("left","center","right"),...import_ag_charts_core175.fontOptionsDef},annotationChannelTextDefs={position:(0,import_ag_charts_core175.union)("top","inside","bottom"),alignment:(0,import_ag_charts_core175.union)("left","center","right"),...import_ag_charts_core175.fontOptionsDef},annotationAxisLabelOptionsDef={enabled:import_ag_charts_core175.boolean,cornerRadius:import_ag_charts_core175.positiveNumber,...import_ag_charts_core175.fontOptionsDef,...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef,...import_ag_charts_core175.lineDashOptionsDef},annotationChannelMiddleDefs={visible:import_ag_charts_core175.boolean,...annotationLineOptionsDef,...import_ag_charts_core175.strokeOptionsDef},annotationMeasurerStatisticsOptionsDefs={divider:import_ag_charts_core175.strokeOptionsDef,...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef,...import_ag_charts_core175.fontOptionsDef},annotationQuickMeasurerDirectionStylesDefs={handle:annotationHandleStylesDefs,statistics:annotationMeasurerStatisticsOptionsDefs,...annotationLineOptionsDef,...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef},annotationLineStyleDefs={visible:import_ag_charts_core175.boolean,locked:import_ag_charts_core175.boolean,readOnly:import_ag_charts_core175.boolean,extendStart:import_ag_charts_core175.boolean,extendEnd:import_ag_charts_core175.boolean,handle:annotationHandleStylesDefs,text:annotationLineTextDefs,...annotationLineOptionsDef,...import_ag_charts_core175.strokeOptionsDef},annotationCrossLineStyleDefs={visible:import_ag_charts_core175.boolean,locked:import_ag_charts_core175.boolean,readOnly:import_ag_charts_core175.boolean,axisLabel:annotationAxisLabelOptionsDef,handle:annotationHandleStylesDefs,text:annotationLineTextDefs,...annotationLineOptionsDef,...import_ag_charts_core175.strokeOptionsDef},annotationChannelStyleDefs={visible:import_ag_charts_core175.boolean,locked:import_ag_charts_core175.boolean,readOnly:import_ag_charts_core175.boolean,extendStart:import_ag_charts_core175.boolean,extendEnd:import_ag_charts_core175.boolean,handle:annotationHandleStylesDefs,text:annotationChannelTextDefs,background:import_ag_charts_core175.fillOptionsDef,...annotationLineOptionsDef,...import_ag_charts_core175.strokeOptionsDef},annotationDisjointChannelStyleDefs={...annotationChannelStyleDefs},annotationParallelChannelStyleDefs={...annotationChannelStyleDefs,middle:annotationChannelMiddleDefs},annotationFibonacciStylesDefs={label:import_ag_charts_core175.fontOptionsDef,showFill:import_ag_charts_core175.boolean,isMultiColor:import_ag_charts_core175.boolean,strokes:(0,import_ag_charts_core175.arrayOf)(import_ag_charts_core175.color),rangeStroke:import_ag_charts_core175.color,bands:(0,import_ag_charts_core175.union)(4,6,10),...annotationLineStyleDefs},annotationCalloutStylesDefs={...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef,...annotationTextStylesDef},annotationCommentStylesDefs={...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef,...annotationTextStylesDef},annotationNoteStylesDefs={...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef,...annotationTextStylesDef,background:{...import_ag_charts_core175.fillOptionsDef,...import_ag_charts_core175.strokeOptionsDef}},annotationShapeStylesDefs={visible:import_ag_charts_core175.boolean,locked:import_ag_charts_core175.boolean,readOnly:import_ag_charts_core175.boolean,handle:annotationHandleStylesDefs,...import_ag_charts_core175.fillOptionsDef},annotationMeasurerStylesDefs={visible:import_ag_charts_core175.boolean,locked:import_ag_charts_core175.boolean,readOnly:import_ag_charts_core175.boolean,extendStart:import_ag_charts_core175.boolean,extendEnd:import_ag_charts_core175.boolean,handle:annotationHandleStylesDefs,text:annotationLineTextDefs,background:import_ag_charts_core175.fillOptionsDef,statistics:annotationMeasurerStatisticsOptionsDefs,...annotationLineOptionsDef,...import_ag_charts_core175.strokeOptionsDef},annotationQuickMeasurerStylesDefs={visible:import_ag_charts_core175.boolean,up:annotationQuickMeasurerDirectionStylesDefs,down:annotationQuickMeasurerDirectionStylesDefs},annotationOptionsDef={enabled:import_ag_charts_core175.boolean,axesButtons:{enabled:import_ag_charts_core175.boolean,axes:(0,import_ag_charts_core175.union)("x","y","xy")},toolbar:{enabled:import_ag_charts_core175.boolean,padding:import_ag_charts_core175.positiveNumber,buttons:(0,import_ag_charts_core175.arrayOfDefs)({...import_ag_charts_core175.toolbarButtonOptionsDefs,value:(0,import_ag_charts_core175.union)("line-menu","fibonacci-menu","text-menu","shape-menu","measurer-menu","line","horizontal-line","vertical-line","parallel-channel","disjoint-channel","fibonacci-retracement","fibonacci-retracement-trend-based","text","comment","callout","note","clear")},"annotation toolbar buttons array")},optionsToolbar:{enabled:import_ag_charts_core175.boolean,buttons:(0,import_ag_charts_core175.arrayOf)((0,import_ag_charts_core175.or)((0,import_ag_charts_core175.optionsDefs)({...import_ag_charts_core175.toolbarButtonOptionsDefs,value:(0,import_ag_charts_core175.required)((0,import_ag_charts_core175.union)("line-stroke-width","line-style-type","line-color","fill-color","text-color","text-size","delete","settings"))}),(0,import_ag_charts_core175.optionsDefs)({...import_ag_charts_core175.toolbarButtonOptionsDefs,value:(0,import_ag_charts_core175.required)((0,import_ag_charts_core175.union)("lock")),checkedOverrides:import_ag_charts_core175.toolbarButtonOptionsDefs})))}};annotationOptionsDef.data=(0,import_ag_charts_core175.undocumented)(import_ag_charts_core175.array),annotationOptionsDef.xKey=(0,import_ag_charts_core175.undocumented)(import_ag_charts_core175.string),annotationOptionsDef.volumeKey=(0,import_ag_charts_core175.undocumented)(import_ag_charts_core175.string),annotationOptionsDef.snap=(0,import_ag_charts_core175.undocumented)(import_ag_charts_core175.boolean);var import_ag_charts_core176=require("ag-charts-core"),hierarchyHighlightStyleOptionsDef={...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,opacity:import_ag_charts_core176.ratio},boxPlotStyleOptionsDef={...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,cornerRadius:import_ag_charts_core176.positiveNumber,whisker:{...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},cap:{lengthRatio:import_ag_charts_core176.ratio}},boxPlotHighlightStyleOptionsDef={...boxPlotStyleOptionsDef,opacity:import_ag_charts_core176.ratio},boxPlotStyler=(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,cornerRadius:import_ag_charts_core176.positiveNumber,whisker:{...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},cap:{lengthRatio:import_ag_charts_core176.ratio}}),boxPlotSeriesThemeableOptionsDef={direction:(0,import_ag_charts_core176.union)("horizontal","vertical"),showInMiniChart:import_ag_charts_core176.boolean,styler:boxPlotStyler,itemStyler:boxPlotStyler,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...boxPlotStyleOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(boxPlotHighlightStyleOptionsDef,boxPlotHighlightStyleOptionsDef),segmentation:import_ag_charts_core176.shapeSegmentation,width:import_ag_charts_core176.positiveNumberNonZero,widthRatio:import_ag_charts_core176.ratio},candlestickSeriesItemOptionsDef={cornerRadius:import_ag_charts_core176.positiveNumber,wick:{...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},candlestickHighlightStyleOptionsDef={...candlestickSeriesItemOptionsDef,opacity:import_ag_charts_core176.ratio},candlestickSeriesThemeableOptionsDef={item:{up:candlestickSeriesItemOptionsDef,down:candlestickSeriesItemOptionsDef},itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,cornerRadius:import_ag_charts_core176.positiveNumber,wick:{...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}}),showInMiniChart:import_ag_charts_core176.boolean,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(candlestickHighlightStyleOptionsDef,candlestickHighlightStyleOptionsDef)},chordSeriesThemeableOptionsDef={fills:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.colorUnion),strokes:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),label:{spacing:import_ag_charts_core176.positiveNumber,maxWidth:import_ag_charts_core176.positiveNumber,...import_ag_charts_core176.seriesLabelOptionsDefs},link:{tension:import_ag_charts_core176.ratio,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,tension:import_ag_charts_core176.ratio}),...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},node:{width:import_ag_charts_core176.positiveNumber,spacing:import_ag_charts_core176.positiveNumber,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs},coneFunnelSeriesThemeableOptionsDef={direction:(0,import_ag_charts_core176.union)("horizontal","vertical"),fills:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.colorUnion),strokes:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),label:{spacing:import_ag_charts_core176.positiveNumber,placement:(0,import_ag_charts_core176.union)("before","middle","after"),...import_ag_charts_core176.seriesLabelOptionsDefs},stageLabel:{placement:(0,import_ag_charts_core176.union)("before","after"),format:import_ag_charts_core176.numberFormatValidator,...commonAxisLabelOptionsDefs},tooltip:import_ag_charts_core176.tooltipOptionsDefs,...(0,import_ag_charts_core176.without)(import_ag_charts_core176.commonSeriesThemeableOptionsDefs,["showInLegend"]),...(0,import_ag_charts_core176.without)(import_ag_charts_core176.fillOptionsDef,["fill"]),...(0,import_ag_charts_core176.without)(import_ag_charts_core176.strokeOptionsDef,["stroke"]),...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.highlightOptionsDef)(import_ag_charts_core176.lineHighlightOptionsDef)},funnelSeriesThemeableOptionsDef={direction:(0,import_ag_charts_core176.union)("horizontal","vertical"),fills:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.colorUnion),strokes:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),spacingRatio:import_ag_charts_core176.ratio,crisp:import_ag_charts_core176.boolean,dropOff:{enabled:import_ag_charts_core176.boolean,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},stageLabel:{placement:(0,import_ag_charts_core176.union)("before","after"),format:import_ag_charts_core176.numberFormatValidator,...commonAxisLabelOptionsDefs},label:import_ag_charts_core176.seriesLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,shadow:import_ag_charts_core176.shadowOptionsDefs,...(0,import_ag_charts_core176.without)(import_ag_charts_core176.commonSeriesThemeableOptionsDefs,["showInLegend"]),...(0,import_ag_charts_core176.without)(import_ag_charts_core176.fillOptionsDef,["fill"]),...(0,import_ag_charts_core176.without)(import_ag_charts_core176.strokeOptionsDef,["stroke"]),...import_ag_charts_core176.lineDashOptionsDef},heatmapSeriesThemeableOptionsDef={title:import_ag_charts_core176.string,textAlign:(0,import_ag_charts_core176.union)("left","center","right"),verticalAlign:(0,import_ag_charts_core176.union)("top","middle","bottom"),itemPadding:import_ag_charts_core176.positiveNumber,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef}),showInMiniChart:import_ag_charts_core176.boolean,label:import_ag_charts_core176.autoSizedLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.strokeOptionsDef},ohlcSeriesThemeableOptionsDef={showInMiniChart:import_ag_charts_core176.boolean,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),item:{up:{...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},down:{...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}},tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.lineHighlightOptionsDef,import_ag_charts_core176.lineHighlightOptionsDef)},mapLineSeriesThemeableOptionsDef={maxStrokeWidth:import_ag_charts_core176.positiveNumber,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),sizeDomain:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.positiveNumber),label:import_ag_charts_core176.seriesLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.lineHighlightOptionsDef,import_ag_charts_core176.lineHighlightOptionsDef)},mapLineBackgroundSeriesThemeableOptionsDef={...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},mapMarkerSeriesThemeableOptionsDef={colorRange:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),maxSize:import_ag_charts_core176.positiveNumber,sizeDomain:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.positiveNumber),label:{placement:(0,import_ag_charts_core176.union)("top","bottom","left","right"),...import_ag_charts_core176.seriesLabelOptionsDefs},tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...(0,import_ag_charts_core176.without)(import_ag_charts_core176.markerOptionsDefs,["enabled"]),highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.shapeHighlightOptionsDef,import_ag_charts_core176.shapeHighlightOptionsDef)},mapShapeSeriesThemeableOptionsDef={colorRange:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),padding:import_ag_charts_core176.positiveNumber,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),label:import_ag_charts_core176.autoSizedLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.shapeHighlightOptionsDef,import_ag_charts_core176.shapeHighlightOptionsDef)},mapShapeBackgroundSeriesThemeableOptionsDef={...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},radialSeriesStylerDef=(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,cornerRadius:import_ag_charts_core176.positiveNumber}),nightingaleSeriesThemeableOptionsDef={cornerRadius:import_ag_charts_core176.positiveNumber,styler:radialSeriesStylerDef,itemStyler:radialSeriesStylerDef,label:import_ag_charts_core176.seriesLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.barHighlightOptionsDef,import_ag_charts_core176.barHighlightOptionsDef)},pyramidSeriesThemeableOptionsDef={direction:(0,import_ag_charts_core176.union)("horizontal","vertical"),aspectRatio:import_ag_charts_core176.positiveNumber,spacing:import_ag_charts_core176.positiveNumber,reverse:import_ag_charts_core176.boolean,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),fills:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.colorUnion),strokes:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),label:import_ag_charts_core176.seriesLabelOptionsDefs,stageLabel:{spacing:import_ag_charts_core176.positiveNumber,placement:(0,import_ag_charts_core176.union)("before","after"),...import_ag_charts_core176.seriesLabelOptionsDefs},tooltip:import_ag_charts_core176.tooltipOptionsDefs,shadow:import_ag_charts_core176.shadowOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...(0,import_ag_charts_core176.without)(import_ag_charts_core176.fillOptionsDef,["fill"]),...(0,import_ag_charts_core176.without)(import_ag_charts_core176.strokeOptionsDef,["stroke"]),...import_ag_charts_core176.lineDashOptionsDef},radarAreaSeriesThemeableOptionsDef={connectMissingData:import_ag_charts_core176.boolean,marker:import_ag_charts_core176.markerOptionsDefs,styler:(0,import_ag_charts_core176.callbackDefs)({marker:import_ag_charts_core176.markerStyleOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),label:import_ag_charts_core176.seriesLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.shapeHighlightOptionsDef,import_ag_charts_core176.shapeHighlightOptionsDef)},radarLineSeriesThemeableOptionsDef={connectMissingData:import_ag_charts_core176.boolean,marker:import_ag_charts_core176.markerOptionsDefs,styler:(0,import_ag_charts_core176.callbackDefs)({marker:import_ag_charts_core176.markerStyleOptionsDefs,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),label:import_ag_charts_core176.seriesLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.shapeHighlightOptionsDef,import_ag_charts_core176.lineHighlightOptionsDef)},radialBarSeriesThemeableOptionsDef={cornerRadius:import_ag_charts_core176.positiveNumber,styler:radialSeriesStylerDef,itemStyler:radialSeriesStylerDef,label:import_ag_charts_core176.seriesLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.barHighlightOptionsDef,import_ag_charts_core176.barHighlightOptionsDef)},radialColumnSeriesThemeableOptionsDef={cornerRadius:import_ag_charts_core176.positiveNumber,columnWidthRatio:import_ag_charts_core176.ratio,maxColumnWidthRatio:import_ag_charts_core176.ratio,styler:radialSeriesStylerDef,itemStyler:radialSeriesStylerDef,label:import_ag_charts_core176.seriesLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.barHighlightOptionsDef,import_ag_charts_core176.barHighlightOptionsDef)},rangeAreaSeriesLineThemeableOptionsDef={marker:import_ag_charts_core176.markerOptionsDefs,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},rangeAreaSeriesItemLineThemeableOptionsDef={marker:{enabled:import_ag_charts_core176.boolean,...import_ag_charts_core176.markerStyleOptionsDefs},...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},rangeAreaSeriesLineStyleDef={marker:import_ag_charts_core176.markerStyleOptionsDefs,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},rangeAreaSeriesThemeableOptionsDef={showInMiniChart:import_ag_charts_core176.boolean,connectMissingData:import_ag_charts_core176.boolean,interpolation:import_ag_charts_core176.interpolationOptionsDefs,label:{...import_ag_charts_core176.seriesLabelOptionsDefs,placement:(0,import_ag_charts_core176.union)("inside","outside"),spacing:import_ag_charts_core176.positiveNumber},tooltip:import_ag_charts_core176.tooltipOptionsDefs,shadow:import_ag_charts_core176.shadowOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...rangeAreaSeriesLineThemeableOptionsDef,item:{low:{...rangeAreaSeriesItemLineThemeableOptionsDef},high:{...rangeAreaSeriesItemLineThemeableOptionsDef}},styler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,item:{low:{...rangeAreaSeriesLineStyleDef},high:{...rangeAreaSeriesLineStyleDef}}}),highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.shapeHighlightOptionsDef,import_ag_charts_core176.shapeHighlightOptionsDef),segmentation:import_ag_charts_core176.shapeSegmentation,invertedStyle:{enabled:import_ag_charts_core176.boolean,...import_ag_charts_core176.fillOptionsDef}},rangeBarStyleCallback=(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,cornerRadius:import_ag_charts_core176.positiveNumber}),rangeBarSeriesThemeableOptionsDef={direction:(0,import_ag_charts_core176.union)("horizontal","vertical"),grouped:import_ag_charts_core176.boolean,showInMiniChart:import_ag_charts_core176.boolean,cornerRadius:import_ag_charts_core176.positiveNumber,styler:rangeBarStyleCallback,itemStyler:rangeBarStyleCallback,label:{...import_ag_charts_core176.seriesLabelOptionsDefs,placement:(0,import_ag_charts_core176.union)("inside","outside"),spacing:import_ag_charts_core176.positiveNumber},tooltip:import_ag_charts_core176.tooltipOptionsDefs,shadow:import_ag_charts_core176.shadowOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,highlight:(0,import_ag_charts_core176.multiSeriesHighlightOptionsDef)(import_ag_charts_core176.barHighlightOptionsDef,import_ag_charts_core176.barHighlightOptionsDef),segmentation:import_ag_charts_core176.shapeSegmentation,width:import_ag_charts_core176.positiveNumberNonZero,widthRatio:import_ag_charts_core176.ratio},sankeySeriesThemeableOptionsDef={fills:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.colorUnion),strokes:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),label:{...import_ag_charts_core176.seriesLabelOptionsDefs,spacing:import_ag_charts_core176.positiveNumber,placement:(0,import_ag_charts_core176.union)("left","right","center"),edgePlacement:(0,import_ag_charts_core176.union)("inside","outside")},link:{itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},node:{width:import_ag_charts_core176.positiveNumber,spacing:import_ag_charts_core176.positiveNumber,minSpacing:(0,import_ag_charts_core176.and)(import_ag_charts_core176.positiveNumber,(0,import_ag_charts_core176.lessThanOrEqual)("spacing")),alignment:(0,import_ag_charts_core176.union)("left","center","right","justify"),verticalAlignment:(0,import_ag_charts_core176.union)("top","bottom","center"),sort:(0,import_ag_charts_core176.union)("data","ascending","descending","auto"),itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef}),...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},tooltip:import_ag_charts_core176.tooltipOptionsDefs,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs},sunburstSeriesThemeableOptionsDef={fills:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.colorUnion),strokes:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),colorRange:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),sectorSpacing:import_ag_charts_core176.positiveNumber,cornerRadius:import_ag_charts_core176.positiveNumber,padding:import_ag_charts_core176.positiveNumber,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef}),label:{spacing:import_ag_charts_core176.positiveNumber,...import_ag_charts_core176.autoSizedLabelOptionsDefs},secondaryLabel:import_ag_charts_core176.autoSizedLabelOptionsDefs,tooltip:import_ag_charts_core176.tooltipOptionsDefs,...(0,import_ag_charts_core176.without)(import_ag_charts_core176.commonSeriesThemeableOptionsDefs,["highlight","showInLegend"]),...(0,import_ag_charts_core176.without)(import_ag_charts_core176.fillOptionsDef,["fill"]),...(0,import_ag_charts_core176.without)(import_ag_charts_core176.strokeOptionsDef,["stroke"]),highlight:{highlightedItem:hierarchyHighlightStyleOptionsDef,highlightedBranch:hierarchyHighlightStyleOptionsDef,unhighlightedItem:hierarchyHighlightStyleOptionsDef,unhighlightedBranch:hierarchyHighlightStyleOptionsDef}},treemapSeriesThemeableOptionsDef={fills:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.colorUnion),strokes:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),colorRange:(0,import_ag_charts_core176.arrayOf)(import_ag_charts_core176.color),itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef}),group:{gap:import_ag_charts_core176.positiveNumber,padding:import_ag_charts_core176.positiveNumber,cornerRadius:import_ag_charts_core176.positiveNumber,textAlign:(0,import_ag_charts_core176.union)("left","center","right"),interactive:import_ag_charts_core176.boolean,highlight:{highlightedItem:hierarchyHighlightStyleOptionsDef,unhighlightedItem:hierarchyHighlightStyleOptionsDef},label:{...import_ag_charts_core176.seriesLabelOptionsDefs,spacing:import_ag_charts_core176.positiveNumber},...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef},tile:{gap:import_ag_charts_core176.positiveNumber,padding:import_ag_charts_core176.positiveNumber,cornerRadius:import_ag_charts_core176.positiveNumber,textAlign:(0,import_ag_charts_core176.union)("left","center","right"),verticalAlign:(0,import_ag_charts_core176.union)("top","middle","bottom"),label:{...import_ag_charts_core176.seriesLabelOptionsDefs,spacing:import_ag_charts_core176.positiveNumber,lineHeight:import_ag_charts_core176.positiveNumber,minimumFontSize:import_ag_charts_core176.positiveNumber,wrapping:(0,import_ag_charts_core176.union)("never","always","hyphenate","on-space"),overflowStrategy:(0,import_ag_charts_core176.union)("ellipsis","hide")},secondaryLabel:{...import_ag_charts_core176.seriesLabelOptionsDefs,lineHeight:import_ag_charts_core176.positiveNumber,minimumFontSize:import_ag_charts_core176.positiveNumber,wrapping:(0,import_ag_charts_core176.union)("never","always","hyphenate","on-space"),overflowStrategy:(0,import_ag_charts_core176.union)("ellipsis","hide")},highlight:{highlightedItem:hierarchyHighlightStyleOptionsDef,highlightedBranch:hierarchyHighlightStyleOptionsDef,unhighlightedItem:hierarchyHighlightStyleOptionsDef,unhighlightedBranch:hierarchyHighlightStyleOptionsDef},...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef},tooltip:import_ag_charts_core176.tooltipOptionsDefs,...(0,import_ag_charts_core176.without)(import_ag_charts_core176.commonSeriesThemeableOptionsDefs,["highlight","showInLegend"])},waterfallSeriesItemOptionsDef={name:import_ag_charts_core176.string,cornerRadius:import_ag_charts_core176.positiveNumber,itemStyler:(0,import_ag_charts_core176.callbackDefs)({...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef,cornerRadius:import_ag_charts_core176.positiveNumber}),label:{...import_ag_charts_core176.seriesLabelOptionsDefs,placement:(0,import_ag_charts_core176.union)("inside-start","inside-center","inside-end","outside-start","outside-end"),spacing:import_ag_charts_core176.positiveNumber},tooltip:import_ag_charts_core176.tooltipOptionsDefs,shadow:import_ag_charts_core176.shadowOptionsDefs,...import_ag_charts_core176.fillOptionsDef,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},waterfallSeriesThemeableOptionsDef={direction:(0,import_ag_charts_core176.union)("horizontal","vertical"),showInMiniChart:import_ag_charts_core176.boolean,item:{positive:waterfallSeriesItemOptionsDef,negative:waterfallSeriesItemOptionsDef,total:waterfallSeriesItemOptionsDef},line:{enabled:import_ag_charts_core176.boolean,...import_ag_charts_core176.strokeOptionsDef,...import_ag_charts_core176.lineDashOptionsDef},tooltip:import_ag_charts_core176.tooltipOptionsDefs,width:import_ag_charts_core176.positiveNumberNonZero,widthRatio:import_ag_charts_core176.ratio,...import_ag_charts_core176.commonSeriesThemeableOptionsDefs},serializableDate=(0,import_ag_charts_core177.optionsDefs)({__type:(0,import_ag_charts_core177.required)((0,import_ag_charts_core177.constant)("date")),value:(0,import_ag_charts_core177.or)(import_ag_charts_core177.string,import_ag_charts_core177.number)},"a serializable date object"),navigatorHandleOptionsDef={width:import_ag_charts_core177.positiveNumber,height:import_ag_charts_core177.positiveNumber,grip:import_ag_charts_core177.boolean,fill:import_ag_charts_core177.color,stroke:import_ag_charts_core177.color,strokeWidth:import_ag_charts_core177.positiveNumber,cornerRadius:import_ag_charts_core177.positiveNumber},navigatorOptionsDef={enabled:import_ag_charts_core177.boolean,height:import_ag_charts_core177.positiveNumber,spacing:import_ag_charts_core177.positiveNumber,cornerRadius:import_ag_charts_core177.number,mask:{fill:import_ag_charts_core177.color,fillOpacity:import_ag_charts_core177.ratio,stroke:import_ag_charts_core177.color,strokeWidth:import_ag_charts_core177.positiveNumber},minHandle:navigatorHandleOptionsDef,maxHandle:navigatorHandleOptionsDef,miniChart:{enabled:import_ag_charts_core177.boolean,padding:{top:import_ag_charts_core177.positiveNumber,bottom:import_ag_charts_core177.positiveNumber},label:{enabled:import_ag_charts_core177.boolean,avoidCollisions:import_ag_charts_core177.boolean,spacing:import_ag_charts_core177.positiveNumber,format:import_ag_charts_core177.numberFormatValidator,formatter:(0,import_ag_charts_core177.callbackOf)(import_ag_charts_core177.textOrSegments),interval:{minSpacing:import_ag_charts_core177.positiveNumber,maxSpacing:import_ag_charts_core177.positiveNumber,values:import_ag_charts_core177.array,step:import_ag_charts_core177.number},...import_ag_charts_core177.fontOptionsDef},series:import_ag_charts_core177.defined}},scrollbarTrackOptionsDef={...import_ag_charts_core177.fillOptionsDef,...import_ag_charts_core177.strokeOptionsDef,...import_ag_charts_core177.lineDashOptionsDef,cornerRadius:import_ag_charts_core177.positiveNumber,opacity:import_ag_charts_core177.ratio},scrollbarThumbOptionsDef={...scrollbarTrackOptionsDef,minSize:import_ag_charts_core177.positiveNumber,hoverStyle:{fill:import_ag_charts_core177.fillOptionsDef.fill,stroke:import_ag_charts_core177.strokeOptionsDef.stroke}},scrollbarBaseOptionsDef={enabled:import_ag_charts_core177.boolean,thickness:import_ag_charts_core177.positiveNumber,spacing:import_ag_charts_core177.positiveNumber,tickSpacing:import_ag_charts_core177.positiveNumber,visible:(0,import_ag_charts_core177.union)("auto","always","never"),placement:(0,import_ag_charts_core177.union)("outer","inner"),track:scrollbarTrackOptionsDef,thumb:scrollbarThumbOptionsDef},scrollbarHorizontalOrientationOptionsDef={...scrollbarBaseOptionsDef,position:(0,import_ag_charts_core177.union)("top","bottom")},scrollbarVerticalOrientationOptionsDef={...scrollbarBaseOptionsDef,position:(0,import_ag_charts_core177.union)("left","right")},scrollbarOptionsDef={enabled:import_ag_charts_core177.boolean,thickness:import_ag_charts_core177.positiveNumber,spacing:import_ag_charts_core177.positiveNumber,tickSpacing:import_ag_charts_core177.positiveNumber,visible:(0,import_ag_charts_core177.union)("auto","always","never"),placement:(0,import_ag_charts_core177.union)("outer","inner"),track:scrollbarTrackOptionsDef,thumb:scrollbarThumbOptionsDef,horizontal:scrollbarHorizontalOrientationOptionsDef,vertical:scrollbarVerticalOrientationOptionsDef},cartesianCrossLineThemeableOptionsDefs=(0,import_ag_charts_core177.without)(cartesianCrossLineOptionsDefs,["type","value","range"]),cartesianAxesThemeDef={number:{...(0,import_ag_charts_core177.without)(numberAxisOptionsDefs,["type","crossLines"]),top:(0,import_ag_charts_core177.without)(numberAxisOptionsDefs,["type","crossLines","position"]),right:(0,import_ag_charts_core177.without)(numberAxisOptionsDefs,["type","crossLines","position"]),bottom:(0,import_ag_charts_core177.without)(numberAxisOptionsDefs,["type","crossLines","position"]),left:(0,import_ag_charts_core177.without)(numberAxisOptionsDefs,["type","crossLines","position"]),crossLines:cartesianCrossLineThemeableOptionsDefs},log:{...(0,import_ag_charts_core177.without)(logAxisOptionsDefs,["type","crossLines"]),top:(0,import_ag_charts_core177.without)(logAxisOptionsDefs,["type","crossLines","position"]),right:(0,import_ag_charts_core177.without)(logAxisOptionsDefs,["type","crossLines","position"]),bottom:(0,import_ag_charts_core177.without)(logAxisOptionsDefs,["type","crossLines","position"]),left:(0,import_ag_charts_core177.without)(logAxisOptionsDefs,["type","crossLines","position"]),crossLines:cartesianCrossLineThemeableOptionsDefs},category:{...(0,import_ag_charts_core177.without)(categoryAxisOptionsDefs,["type","crossLines"]),top:(0,import_ag_charts_core177.without)(categoryAxisOptionsDefs,["type","crossLines","position"]),right:(0,import_ag_charts_core177.without)(categoryAxisOptionsDefs,["type","crossLines","position"]),bottom:(0,import_ag_charts_core177.without)(categoryAxisOptionsDefs,["type","crossLines","position"]),left:(0,import_ag_charts_core177.without)(categoryAxisOptionsDefs,["type","crossLines","position"]),crossLines:cartesianCrossLineThemeableOptionsDefs},time:{...(0,import_ag_charts_core177.without)(timeAxisOptionsDefs,["type","crossLines"]),top:(0,import_ag_charts_core177.without)(timeAxisOptionsDefs,["type","crossLines","position"]),right:(0,import_ag_charts_core177.without)(timeAxisOptionsDefs,["type","crossLines","position"]),bottom:(0,import_ag_charts_core177.without)(timeAxisOptionsDefs,["type","crossLines","position"]),left:(0,import_ag_charts_core177.without)(timeAxisOptionsDefs,["type","crossLines","position"]),crossLines:cartesianCrossLineThemeableOptionsDefs},"unit-time":{...(0,import_ag_charts_core177.without)(unitTimeAxisOptionsDefs,["type","crossLines"]),top:(0,import_ag_charts_core177.without)(unitTimeAxisOptionsDefs,["type","crossLines","position"]),right:(0,import_ag_charts_core177.without)(unitTimeAxisOptionsDefs,["type","crossLines","position"]),bottom:(0,import_ag_charts_core177.without)(unitTimeAxisOptionsDefs,["type","crossLines","position"]),left:(0,import_ag_charts_core177.without)(unitTimeAxisOptionsDefs,["type","crossLines","position"]),crossLines:cartesianCrossLineThemeableOptionsDefs},"grouped-category":{...(0,import_ag_charts_core177.without)(groupedCategoryAxisOptionsDefs,["type"]),top:(0,import_ag_charts_core177.without)(groupedCategoryAxisOptionsDefs,["type","position"]),right:(0,import_ag_charts_core177.without)(groupedCategoryAxisOptionsDefs,["type","position"]),bottom:(0,import_ag_charts_core177.without)(groupedCategoryAxisOptionsDefs,["type","position"]),left:(0,import_ag_charts_core177.without)(groupedCategoryAxisOptionsDefs,["type","position"]),crossLines:cartesianCrossLineThemeableOptionsDefs},"ordinal-time":{...(0,import_ag_charts_core177.without)(ordinalTimeAxisOptionsDefs,["type","crossLines"]),top:(0,import_ag_charts_core177.without)(ordinalTimeAxisOptionsDefs,["type","crossLines","position"]),right:(0,import_ag_charts_core177.without)(ordinalTimeAxisOptionsDefs,["type","crossLines","position"]),bottom:(0,import_ag_charts_core177.without)(ordinalTimeAxisOptionsDefs,["type","crossLines","position"]),left:(0,import_ag_charts_core177.without)(ordinalTimeAxisOptionsDefs,["type","crossLines","position"]),crossLines:cartesianCrossLineThemeableOptionsDefs}},polarAxesThemeDef={"angle-category":{...(0,import_ag_charts_core177.without)(angleCategoryAxisOptionsDefs,["type","crossLines"]),crossLines:(0,import_ag_charts_core177.without)(commonCrossLineOptionsDefs,["type"])},"angle-number":{...(0,import_ag_charts_core177.without)(angleNumberAxisOptionsDefs,["type","crossLines"]),crossLines:(0,import_ag_charts_core177.without)(commonCrossLineOptionsDefs,["type"])},"radius-category":{...(0,import_ag_charts_core177.without)(radiusCategoryAxisOptionsDefs,["type","crossLines"]),crossLines:{...(0,import_ag_charts_core177.without)(commonCrossLineOptionsDefs,["type"]),label:{...commonCrossLineLabelOptionsDefs,positionAngle:import_ag_charts_core177.number}}},"radius-number":{...(0,import_ag_charts_core177.without)(radiusNumberAxisOptionsDefs,["type","crossLines"]),crossLines:{...(0,import_ag_charts_core177.without)(commonCrossLineOptionsDefs,["type"]),label:{...commonCrossLineLabelOptionsDefs,positionAngle:import_ag_charts_core177.number}}}},undocumentedSeriesOptionsDef={visible:(0,import_ag_charts_core177.undocumented)(import_ag_charts_core177.boolean)},themeOverridesOptionsDef={common:{...import_ag_charts_core177.commonChartOptionsDefs,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,axes:{...cartesianAxesThemeDef,...polarAxesThemeDef},annotations:{...annotationOptionsDef,line:annotationLineStyleDefs,"horizontal-line":annotationCrossLineStyleDefs,"vertical-line":annotationCrossLineStyleDefs,"disjoint-channel":annotationDisjointChannelStyleDefs,"parallel-channel":annotationParallelChannelStyleDefs,"fibonacci-retracement":annotationFibonacciStylesDefs,"fibonacci-retracement-trend-based":annotationFibonacciStylesDefs,callout:annotationCalloutStylesDefs,comment:annotationCommentStylesDefs,note:annotationNoteStylesDefs,text:annotationTextStylesDef,arrow:annotationLineStyleDefs,"arrow-up":annotationShapeStylesDefs,"arrow-down":annotationShapeStylesDefs,"date-range":annotationMeasurerStylesDefs,"price-range":annotationMeasurerStylesDefs,"date-price-range":annotationMeasurerStylesDefs,"quick-date-price-range":annotationQuickMeasurerStylesDefs},chartToolbar:{enabled:import_ag_charts_core177.boolean},initialState:{legend:(0,import_ag_charts_core177.arrayOfDefs)({visible:import_ag_charts_core177.boolean,seriesId:import_ag_charts_core177.string,itemId:import_ag_charts_core177.string,legendItemName:import_ag_charts_core177.string},"legend state array"),zoom:{rangeX:{start:(0,import_ag_charts_core177.or)(import_ag_charts_core177.number,serializableDate),end:(0,import_ag_charts_core177.or)(import_ag_charts_core177.number,serializableDate)},rangeY:{start:(0,import_ag_charts_core177.or)(import_ag_charts_core177.number,serializableDate),end:(0,import_ag_charts_core177.or)(import_ag_charts_core177.number,serializableDate)},ratioX:{start:import_ag_charts_core177.ratio,end:import_ag_charts_core177.ratio},ratioY:{start:import_ag_charts_core177.ratio,end:import_ag_charts_core177.ratio},autoScaledAxes:(0,import_ag_charts_core177.arrayOf)((0,import_ag_charts_core177.constant)("y"))}}},line:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:lineSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},scatter:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:scatterSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef,paired:(0,import_ag_charts_core177.undocumented)(import_ag_charts_core177.boolean)},bubble:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:bubbleSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},area:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:areaSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},bar:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:barSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},"box-plot":{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:boxPlotSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},candlestick:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:candlestickSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},"cone-funnel":{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:coneFunnelSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},funnel:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:funnelSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},ohlc:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:ohlcSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},histogram:{...import_ag_charts_core177.commonChartOptionsDefs,axes:(0,import_ag_charts_core177.without)(cartesianAxesThemeDef,["category","grouped-category","unit-time","ordinal-time"]),series:histogramSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},heatmap:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:heatmapSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},waterfall:{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:waterfallSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},"range-bar":{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:rangeBarSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},"range-area":{...import_ag_charts_core177.commonChartOptionsDefs,axes:cartesianAxesThemeDef,series:rangeAreaSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,scrollbar:scrollbarOptionsDef,...undocumentedSeriesOptionsDef},donut:{...import_ag_charts_core177.commonChartOptionsDefs,series:donutSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},pie:{...import_ag_charts_core177.commonChartOptionsDefs,series:pieSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"radar-line":{...import_ag_charts_core177.commonChartOptionsDefs,axes:polarAxesThemeDef,series:radarLineSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"radar-area":{...import_ag_charts_core177.commonChartOptionsDefs,axes:polarAxesThemeDef,series:radarAreaSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"radial-bar":{...import_ag_charts_core177.commonChartOptionsDefs,axes:polarAxesThemeDef,series:radialBarSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"radial-column":{...import_ag_charts_core177.commonChartOptionsDefs,axes:polarAxesThemeDef,series:radialColumnSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},nightingale:{...import_ag_charts_core177.commonChartOptionsDefs,axes:polarAxesThemeDef,series:nightingaleSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},sunburst:{...import_ag_charts_core177.commonChartOptionsDefs,series:sunburstSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},treemap:{...import_ag_charts_core177.commonChartOptionsDefs,series:treemapSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"map-shape":{...import_ag_charts_core177.commonChartOptionsDefs,series:mapShapeSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"map-line":{...import_ag_charts_core177.commonChartOptionsDefs,series:mapLineSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"map-marker":{...import_ag_charts_core177.commonChartOptionsDefs,series:mapMarkerSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"map-shape-background":{...import_ag_charts_core177.commonChartOptionsDefs,series:mapShapeBackgroundSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"map-line-background":{...import_ag_charts_core177.commonChartOptionsDefs,series:mapLineBackgroundSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},sankey:{...import_ag_charts_core177.commonChartOptionsDefs,series:sankeySeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},chord:{...import_ag_charts_core177.commonChartOptionsDefs,series:chordSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},pyramid:{...import_ag_charts_core177.commonChartOptionsDefs,series:pyramidSeriesThemeableOptionsDef,navigator:navigatorOptionsDef,...undocumentedSeriesOptionsDef},"radial-gauge":{...import_ag_charts_core177.commonChartOptionsDefs,...import_ag_charts_core177.radialGaugeSeriesThemeableOptionsDef,targets:(0,import_ag_charts_core177.without)(import_ag_charts_core177.radialGaugeTargetOptionsDef,["value"]),tooltip:{...import_ag_charts_core177.radialGaugeSeriesThemeableOptionsDef.tooltip,...import_ag_charts_core177.commonChartOptionsDefs.tooltip}},"linear-gauge":{...import_ag_charts_core177.commonChartOptionsDefs,...import_ag_charts_core177.linearGaugeSeriesThemeableOptionsDef,targets:(0,import_ag_charts_core177.without)(import_ag_charts_core177.linearGaugeTargetOptionsDef,["value"]),tooltip:{...import_ag_charts_core177.linearGaugeSeriesThemeableOptionsDef.tooltip,...import_ag_charts_core177.commonChartOptionsDefs.tooltip}}};function mapValues(t,e){const i={};for(const s of Reflect.ownKeys(t))i[s]=e(t[s],s,t);return i}var themeOverridesOptionsWithOperatorsDef=mapValues(themeOverridesOptionsDef,function t(e,i){if((0,import_ag_charts_core177.isSymbol)(i))return e;if((0,import_ag_charts_core177.isFunction)(e))return(0,import_ag_charts_core177.or)(e,import_ag_charts_core177.themeOperator,import_ag_charts_core177.isSymbol);if((0,import_ag_charts_core177.isObject)(e))return(0,import_ag_charts_core177.or)((0,import_ag_charts_core177.optionsDefs)(import_ag_charts_core177.unionSymbol in e?mapValues(e,s=>(0,import_ag_charts_core177.isObject)(s)?mapValues(s,t):s):mapValues(e,t)),import_ag_charts_core177.themeOperator,import_ag_charts_core177.isSymbol);throw new Error(`Invalid theme override value: ${String(e)}`)}),import_ag_charts_core178=require("ag-charts-core"),VIVID_DARK_FILLS={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},VIVID_DARK_STROKES={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},VividDark=class extends DarkTheme{getDefaultColors(){return{fills:VIVID_DARK_FILLS,fillsFallback:Object.values(VIVID_DARK_FILLS),strokes:VIVID_DARK_STROKES,sequentialColors:(0,import_ag_charts_core178.getSequentialColors)(VIVID_DARK_FILLS),divergingColors:[VIVID_DARK_FILLS.ORANGE,VIVID_DARK_FILLS.YELLOW,VIVID_DARK_FILLS.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#0076e6","#0069cc","#005cb3","#004f99","#004280","#003466","#00274c"],secondDivergingColors:[VIVID_DARK_FILLS.GREEN,VIVID_DARK_FILLS.YELLOW,VIVID_DARK_FILLS.RED],secondHierarchyColors:[],up:{fill:VIVID_DARK_FILLS.GREEN,stroke:VIVID_DARK_STROKES.GREEN},down:{fill:VIVID_DARK_FILLS.RED,stroke:VIVID_DARK_STROKES.RED},neutral:{fill:VIVID_DARK_FILLS.GRAY,stroke:VIVID_DARK_STROKES.GRAY},altUp:{fill:VIVID_DARK_FILLS.BLUE,stroke:VIVID_DARK_STROKES.BLUE},altDown:{fill:VIVID_DARK_FILLS.ORANGE,stroke:VIVID_DARK_STROKES.ORANGE},altNeutral:{fill:VIVID_DARK_FILLS.GRAY,stroke:VIVID_DARK_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core178.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,VIVID_DARK_FILLS.BLUE),t.set(import_ag_charts_core178.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,VIVID_DARK_FILLS.BLUE),t}},import_ag_charts_core179=require("ag-charts-core"),VIVID_FILLS={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},VIVID_STROKES={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},VividLight=class extends ChartTheme{getDefaultColors(){return{...super.getDefaultColors(),fills:VIVID_FILLS,fillsFallback:Object.values(VIVID_FILLS),strokes:VIVID_STROKES,sequentialColors:(0,import_ag_charts_core179.getSequentialColors)(VIVID_FILLS),divergingColors:[VIVID_FILLS.ORANGE,VIVID_FILLS.YELLOW,VIVID_FILLS.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#1a8fff","#339cff","#4da8ff","#66b5ff","#80c1ff","#99cdff","#b3daff"],secondDivergingColors:[VIVID_FILLS.GREEN,VIVID_FILLS.YELLOW,VIVID_FILLS.RED],secondHierarchyColors:[],up:{fill:VIVID_FILLS.GREEN,stroke:VIVID_STROKES.GREEN},down:{fill:VIVID_FILLS.RED,stroke:VIVID_STROKES.RED},neutral:{fill:VIVID_FILLS.GRAY,stroke:VIVID_STROKES.GRAY},altUp:{fill:VIVID_FILLS.BLUE,stroke:VIVID_STROKES.BLUE},altDown:{fill:VIVID_FILLS.ORANGE,stroke:VIVID_STROKES.ORANGE},altNeutral:{fill:VIVID_FILLS.GRAY,stroke:VIVID_STROKES.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(import_ag_charts_core179.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,VIVID_FILLS.BLUE),t.set(import_ag_charts_core179.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,VIVID_FILLS.BLUE),t}},lightTheme=(0,import_ag_charts_core180.simpleMemorize)(()=>new ChartTheme),themeCacheDebug=import_ag_charts_core180.Debug.create(!0,"perf"),cacheCallback=(t,e,i)=>{themeCacheDebug("[CACHE] ChartTheme",t,e.name,i)},themes={"ag-default-dark":(0,import_ag_charts_core180.simpleMemorize)(()=>new DarkTheme),"ag-sheets-dark":(0,import_ag_charts_core180.simpleMemorize)(()=>new SheetsDark,cacheCallback),"ag-polychroma-dark":(0,import_ag_charts_core180.simpleMemorize)(()=>new PolychromaDark,cacheCallback),"ag-vivid-dark":(0,import_ag_charts_core180.simpleMemorize)(()=>new VividDark,cacheCallback),"ag-material-dark":(0,import_ag_charts_core180.simpleMemorize)(()=>new MaterialDark,cacheCallback),"ag-financial-dark":(0,import_ag_charts_core180.simpleMemorize)(()=>new FinancialDark,cacheCallback),"ag-default":lightTheme,"ag-sheets":(0,import_ag_charts_core180.simpleMemorize)(()=>new SheetsLight,cacheCallback),"ag-polychroma":(0,import_ag_charts_core180.simpleMemorize)(()=>new PolychromaLight,cacheCallback),"ag-vivid":(0,import_ag_charts_core180.simpleMemorize)(()=>new VividLight,cacheCallback),"ag-material":(0,import_ag_charts_core180.simpleMemorize)(()=>new MaterialLight,cacheCallback),"ag-financial":(0,import_ag_charts_core180.simpleMemorize)(()=>new FinancialLight,cacheCallback)},getChartTheme=(0,import_ag_charts_core180.simpleMemorize)(createChartTheme,cacheCallback);function createChartTheme(t){if(t instanceof ChartTheme)return t;if(!validateStructure(t))return lightTheme();if(t==null||typeof t=="string"){const n=themes[t??"ag-default"];if(n)return n();throw new Error(`Cannot find theme \`${t}\`.`)}const{cleared:e,invalid:i}=(0,import_ag_charts_core180.validate)(reduceThemeOptions(t),themeOptionsDef,"theme");for(const n of i)import_ag_charts_core180.Logger.warnOnce(String(n));const s=e?.baseTheme?getChartTheme(e.baseTheme):lightTheme();return e?new s.constructor(e):s}function reduceThemeOptions(t){if(!(0,import_ag_charts_core180.isObject)(t)||!(0,import_ag_charts_core180.isObject)(t.baseTheme))return t;let e=t,i,s;const n=[];for(;typeof e=="object";)i??(i=e.palette),s??(s=e.params),e.overrides&&n.push(e.overrides),e=e.baseTheme;return{baseTheme:e,overrides:(0,import_ag_charts_core180.mergeDefaults)(...n),params:s,palette:i}}var themeOptionsDef={baseTheme:(0,import_ag_charts_core180.or)(import_ag_charts_core180.string,import_ag_charts_core180.object),overrides:themeOverridesOptionsWithOperatorsDef,params:{accentColor:import_ag_charts_core180.color,axisColor:import_ag_charts_core180.color,backgroundColor:import_ag_charts_core180.color,borderColor:import_ag_charts_core180.color,borderRadius:import_ag_charts_core180.number,chartBackgroundColor:import_ag_charts_core180.color,chartPadding:import_ag_charts_core180.number,focusShadow:import_ag_charts_core180.string,foregroundColor:import_ag_charts_core180.color,fontFamily:import_ag_charts_core180.fontFamilyFull,fontSize:import_ag_charts_core180.number,fontWeight:import_ag_charts_core180.fontWeight,gridLineColor:import_ag_charts_core180.color,popupShadow:import_ag_charts_core180.string,subtleTextColor:import_ag_charts_core180.color,textColor:import_ag_charts_core180.color,separationLinesColor:import_ag_charts_core180.color,chromeBackgroundColor:import_ag_charts_core180.color,chromeFontFamily:import_ag_charts_core180.fontFamilyFull,chromeFontSize:import_ag_charts_core180.number,chromeFontWeight:import_ag_charts_core180.fontWeight,chromeSubtleTextColor:import_ag_charts_core180.color,chromeTextColor:import_ag_charts_core180.color,buttonBackgroundColor:import_ag_charts_core180.color,buttonBorder:import_ag_charts_core180.boolean,buttonFontWeight:import_ag_charts_core180.fontWeight,buttonTextColor:import_ag_charts_core180.color,inputBackgroundColor:import_ag_charts_core180.color,inputBorder:import_ag_charts_core180.boolean,inputTextColor:import_ag_charts_core180.color,menuBackgroundColor:import_ag_charts_core180.color,menuBorder:import_ag_charts_core180.boolean,menuTextColor:import_ag_charts_core180.color,panelBackgroundColor:import_ag_charts_core180.color,panelSubtleTextColor:import_ag_charts_core180.color,tooltipBackgroundColor:import_ag_charts_core180.color,tooltipBorder:import_ag_charts_core180.boolean,tooltipTextColor:import_ag_charts_core180.color,tooltipSubtleTextColor:import_ag_charts_core180.color,crosshairLabelBackgroundColor:import_ag_charts_core180.color,crosshairLabelTextColor:import_ag_charts_core180.color},palette:{fills:(0,import_ag_charts_core180.arrayOf)(import_ag_charts_core180.colorUnion),strokes:(0,import_ag_charts_core180.arrayOf)(import_ag_charts_core180.color),up:{fill:(0,import_ag_charts_core180.or)(import_ag_charts_core180.color,import_ag_charts_core180.gradientStrict),stroke:import_ag_charts_core180.color},down:{fill:(0,import_ag_charts_core180.or)(import_ag_charts_core180.color,import_ag_charts_core180.gradientStrict),stroke:import_ag_charts_core180.color},neutral:{fill:(0,import_ag_charts_core180.or)(import_ag_charts_core180.color,import_ag_charts_core180.gradientStrict),stroke:import_ag_charts_core180.color}}},themeNameValidator=(0,import_ag_charts_core180.union)("ag-default","ag-default-dark","ag-sheets","ag-sheets-dark","ag-polychroma","ag-polychroma-dark","ag-vivid","ag-vivid-dark","ag-material","ag-material-dark","ag-financial","ag-financial-dark");function validateStructure(t){const{invalid:e}=(0,import_ag_charts_core180.validate)({theme:t},{theme:(0,import_ag_charts_core180.or)(themeNameValidator,import_ag_charts_core180.object)});for(const i of e)import_ag_charts_core180.Logger.warnOnce(String(i));return e.length===0}var import_ag_charts_core183=require("ag-charts-core"),import_ag_charts_core182=require("ag-charts-core"),import_ag_charts_core181=require("ag-charts-core"),PATH_EDGE="path",PATH_ARRAY_EDGE="pathArray",DEFAULTS_EDGE="default",OVERRIDES_EDGE="override",USER_OPTIONS_EDGE="user",USER_PARTIAL_OPTIONS_EDGE="userPartial",OPERATION_EDGE="operation",OPERATION_VALUE_EDGE="operationValue",DEPENDENCY_EDGE="dependency",AUTO_ENABLE_EDGE="autoEnable",AUTO_ENABLE_VALUE_EDGE="autoEnableValue",PRUNE_EDGE="prune",CHILDREN_SOURCE_EDGE="childrenSource";function isRatio(t){return(0,import_ag_charts_core181.isNumber)(t)&&t>=0&&t<=1}function hasPathSafe(t,e){let i=t;for(const s of e){if(!(typeof s=="string"&&i!=null&&(typeof i=="object"||Array.isArray(i))&&s in i))return!1;i=i[s]}return!0}function getPathSafe(t,e){let i=t;for(const s of e){if(!(typeof s=="string"&&i!=null&&(typeof i=="object"||Array.isArray(i))&&s in i))return;i=i[s]}return i}function setPathSafe(t,e,i){const s=e.length;if(s===0)return;let n=t;const r=s-1,a=e[r];for(let o=0;o<r;o++){const l=e[o],c=e[o+1];let h=n[l];(h==null||!(0,import_ag_charts_core181.isObjectLike)(h))&&(h=Number.isNaN(Number(c))?{}:[],n[l]=h),n=h}n[a]=i}var DIGITS_ONLY_REGEX=/^\d+$/;function getPathLastIndexIndex(t,e=0){let i=0;for(let s=t.length-1;s>=0;s--){const n=t[s];if(DIGITS_ONLY_REGEX.test(n)&&(i++,i>e))return s}return-1}function getPathLastIndex(t,e=0){const i=getPathLastIndexIndex(t,e);return Number(t[i])}function resolvePath(t,e,i){const s=e.split("/");let n=[...t];e.startsWith("/")&&(n=[],s.shift());let r=!1;for(const a of s){if(a==="..")n.pop(),r||n.pop();else if(a===".")n.pop();else if(a==="$index"){const o=getPathLastIndex(t);if(Number.isNaN(o))return UNRESOLVABLE_PATH;n.push(`${o}`)}else if(a==="$prevIndex"){const o=getPathLastIndex(t);if(Number.isNaN(o)||Number(o)<=0)return UNRESOLVABLE_PATH;n.push(`${Number(o)-1}`)}else if(a.startsWith("$")){const o=i?.[a.slice(1)];if(o==null)return UNRESOLVABLE_PATH;n.push(o)}else a.length!==0&&n.push(a);r=a===".."}return n}var UNRESOLVABLE_PATH=Symbol("unresolvable-path"),RESOLVED_TO_BRANCH=Symbol("resolved-to-branch");function getOperation(t,e){if(t==null||typeof t!="object"||Array.isArray(t)||(e??(e=Object.keys(t)),e.length===0))return;const i=e[0];if(operationTypes.has(i))return{operation:i,values:Array.isArray(t[i])?t[i]:[t[i]]}}function getOperationTargetVertex(t,e,i){const s=getOperation(t.getVertexValue(i));switch(s?.operation){case"$path":{const[n]=s.values,r=t.getPathArray(e),a=resolvePath(r,n);return a===UNRESOLVABLE_PATH?void 0:t.findVertexAtPath(a)}case"$value":return e}}var cacheOperations={$cacheMax:cacheMaxOperation};function cacheMaxOperation(t,e,i){const[s]=i,n=t.getPathArray(e),r=t.getCachedValue(n,"$cacheMax"),a=t.resolveVertexValue(e,s);if(typeof a!="number")return r;if(typeof r!="number")return t.setCachedValue(n,"$cacheMax",a),a;const o=Math.max(r,a);return t.setCachedValue(n,"$cacheMax",o),o}var chartOperations={$hasSeriesType:{dependencies:seriesTypeDependencyFactory,resolve:hasSeriesTypeOperation},$isChartType:{dependencies:seriesTypeDependencyFactory,resolve:isChartTypeOperation},$isSeriesType:{dependencies:seriesTypeDependencyFactory,resolve:isSeriesTypeOperation}};function seriesTypeDependencyFactory(t,e,i){const s=t.findVertexAtPath(["series","0","type"]);s&&t.addEdge(e,s,DEPENDENCY_EDGE)}function hasSeriesTypeOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s),r=t.getResolvedPath(["series"]);if(!Array.isArray(r))return!1;for(const a of r)if(a.type===n)return!0;return!1}function isSeriesTypeOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);return t.getResolvedPath(["series","0","type"])===n}function isChartTypeOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s),r=t.getResolvedPath(["series","0","type"]);if(typeof r!="string")return!1;const a=import_ag_charts_core182.ModuleRegistry.getSeriesModule(r);if(a==null)return!1;switch(n){case"cartesian":return a.chartType==="cartesian";case"polar":return a.chartType==="polar";case"standalone":return a.chartType==="standalone"}return!1}var colorOperations={$foregroundBackgroundMix:foregroundBackgroundMixOperation,$foregroundOpacity:foregroundOpacityOperation,$interpolate:interpolateOperation,$isGradient:isGradientOperation,$isImage:isImageOperation,$isPattern:isPatternOperation,$mix:mixOperation};function foregroundBackgroundMixOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s),r=t.getParamValue("foregroundColor"),a=t.getParamValue("backgroundColor");if(typeof r=="string"&&typeof a=="string"&&isRatio(n))return import_ag_charts_core182.Color.mix(import_ag_charts_core182.Color.fromString(r),import_ag_charts_core182.Color.fromString(a),1-n).toString();import_ag_charts_core182.Debug.inDevelopmentMode(()=>import_ag_charts_core182.Logger.warnOnce(`\`$foregroundBackgroundMix\` json operation failed on [${String(n)}}}] at [${t.getPathArray(e).join(".")}], expecting a number between 0 and 1.`))}function foregroundOpacityOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s),r=t.getParamValue("foregroundColor");if(typeof r=="string"&&isRatio(n)){const a=import_ag_charts_core182.Color.fromString(r);return new import_ag_charts_core182.Color(a.r,a.g,a.b,n).toString()}import_ag_charts_core182.Debug.inDevelopmentMode(()=>import_ag_charts_core182.Logger.warnOnce(`\`$foregroundOpacity\` json operation failed on [${String(n)}}}] at [${t.getPathArray(e).join(".")}], expecting a number between 0 and 1.`))}function interpolateOperation(t,e,i){const[s,n]=i,r=t.resolveVertexValue(e,s),a=t.resolveVertexValue(e,n);if(!(!(0,import_ag_charts_core182.isArray)(r)||!(0,import_ag_charts_core182.isNumber)(a)))return import_ag_charts_core182.Color.interpolate(r.map(o=>import_ag_charts_core182.Color.fromString(o)),a).map(o=>o.toString())}function isGradientOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);return(0,import_ag_charts_core182.isGradientFill)(n)}function isImageOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);return(0,import_ag_charts_core182.isImageFill)(n)}function isPatternOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);return(0,import_ag_charts_core182.isPatternFill)(n)}function mixOperation(t,e,i){const[s,n,r]=i,a=t.resolveVertexValue(e,s),o=t.resolveVertexValue(e,n),l=t.resolveVertexValue(e,r),c=t.getPathArray(e),h=`\`$mix\` json operation failed on [${String(a)}, ${String(o)}, ${String(l)}] at [${c.join(".")}], expecting`,u=`${h} two colors and a number between 0 and 1.`;if(typeof o!="string"||!isRatio(l)){import_ag_charts_core182.Debug.inDevelopmentMode(()=>import_ag_charts_core182.Logger.warnOnce(u));return}if(typeof a=="string")try{return import_ag_charts_core182.Color.mix(import_ag_charts_core182.Color.fromString(a),import_ag_charts_core182.Color.fromString(o),l).toString()}catch{import_ag_charts_core182.Debug.inDevelopmentMode(()=>import_ag_charts_core182.Logger.warnOnce(u));return}if(!(0,import_ag_charts_core182.isGradientFill)(a)){import_ag_charts_core182.Debug.inDevelopmentMode(()=>import_ag_charts_core182.Logger.warnOnce(u));return}let d=a.colorStops;try{d=d?.map(p=>{let g;return typeof p.color=="string"&&(g=import_ag_charts_core182.Color.mix(import_ag_charts_core182.Color.fromString(p.color),import_ag_charts_core182.Color.fromString(o),l).toString()),{...p,color:g}})}catch{import_ag_charts_core182.Debug.inDevelopmentMode(()=>import_ag_charts_core182.Logger.warnOnce(`${h} a gradient, a color and a number between 0 and 1.`));return}return{...a,colorStops:d}}var fontOperations={$rem:remOperation};function remOperation(t,e,i){const[s]=i,n=t.getVertexValue(s),r=t.getParamValue("fontSize");if(typeof r=="number"&&typeof n=="number")return Math.round(n*r);import_ag_charts_core182.Debug.inDevelopmentMode(()=>import_ag_charts_core182.Logger.warnOnce(`\`$rem\` json operation failed on [${String(n)}] at [${t.getPathArray(e).join(".")}], expecting a number.`))}var logicOperations={$and:andOperation,$eq:eqOperation,$every:everyOperation,$greaterThan:greaterThanOperation,$if:ifOperation,$lessThan:lessThanOperation,$not:notOperation,$or:orOperation,$some:someOperation,$switch:switchOperation};function andOperation(t,e,i){for(const s of i){const n=t.resolveVertexValue(e,s);if(i.length===1&&Array.isArray(n))return n.every(r=>!!r);if(!n)return!1}return!0}function eqOperation(t,e,i){let s,n=!0;for(const r of i){const a=t.resolveVertexValue(e,r);if(n)s=a,n=!1;else if(a!==s)return!1}return!0}function everyOperation(t,e,i){const[s,n]=i,r=t.getVertexValue(s),a=t.resolveVertexValue(e,n);if(!Array.isArray(a))return;let o=0;for(const l of a){if(!t.graftAndResolveOrphanValue(e,`${o}`,r,l))return!1;o++}return!0}function greaterThanOperation(t,e,i){const[s,n]=i;return t.resolveVertexValue(e,s)>t.resolveVertexValue(e,n)}function ifOperation(t,e,i){const[s,n,r]=i,o=t.resolveVertexValue(e,s)?n:r,l=t.neighboursWithEdgeValue(o,PATH_EDGE);if(l)for(const c of l)t.addEdge(e,c,PATH_EDGE);return t.resolveVertexValue(e,o)}function lessThanOperation(t,e,i){const[s,n]=i;return t.resolveVertexValue(e,s)<t.resolveVertexValue(e,n)}function notOperation(t,e,i){const[s]=i;if(s)return!t.resolveVertexValue(e,s)}function orOperation(t,e,i){for(const s of i){const n=t.resolveVertexValue(e,s);if(i.length===1&&Array.isArray(n))return n.some(r=>!!r);if(n)return!0}return!1}function someOperation(t,e,i){const[s,n]=i,r=t.getVertexValue(s),a=t.resolveVertexValue(e,n);if(!Array.isArray(a))return;let o=0;for(const l of a){if(t.graftAndResolveOrphanValue(e,`${o}`,r,l))return!0;o++}return!1}function switchOperation(t,e,i){const[s,n,...r]=i,a=t.resolveVertexValue(e,s);for(const o of r){const l=t.getVertexValue(o);if(!Array.isArray(l))continue;const[c,h]=l;if(a===c||Array.isArray(c)&&c.includes(a))return h}return t.resolveVertexValue(e,n)}var locationOperations={$isUserOption:isUserOptionOperation,$palette:paletteOperation,$mapPalette:mapPaletteOperation,$path:{dependencies:pathOperationDependenciesFactory,resolve:pathOperation},$pathString:{dependencies:pathOperationDependenciesFactory,resolve:pathStringOperation},$ref:refOperation};function isUserOptionOperation(t,e,i){const[s,n,r]=i,a=t.neighboursWithEdgeValue(s,PATH_EDGE);if(a)for(const o of a){const l=t.findNeighbour(o,DEFAULTS_EDGE);if(l&&isUserOptionCheck(t,e,l))return t.resolveVertexValue(e,n)}else if(isUserOptionCheck(t,e,s))return t.resolveVertexValue(e,n);return t.resolveVertexValue(e,r)}function isUserOptionCheck(t,e,i){const s=t.resolveVertexValue(e,i);if(!(0,import_ag_charts_core182.isString)(s))throw new Error(`\`$isUserOption\` json operation failed on [${String(s)}], expecting a string.`);const n=t.getPathArray(e),r=resolvePath(n,s);return r===UNRESOLVABLE_PATH?!1:t.hasUserOption(r)}var PALETTE_INDEX_KEYS=new Set(["fill","fillFallback","stroke","gradient","range2"]);function paletteOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);if(!(0,import_ag_charts_core182.isString)(n))return;if(PALETTE_INDEX_KEYS.has(n)){const a=t.getPathArray(e),o=getPathLastIndex(a);if(Number.isNaN(o))return;switch(n){case"fill":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.fills,1,o)[0];case"fillFallback":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.fillsFallback,1,o)[0];case"stroke":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.strokes,1,o)[0];case"gradient":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.sequentialColors,1,o)[0];case"range2":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.fills,2,o)}return}if(n==="gradients")return t.palette.sequentialColors;if(n==="type")return t.paletteType;const r=getPathSafe(t.palette,n.split("."));return Array.isArray(r)?[...r]:typeof r=="object"?{...r}:r}function mapPaletteOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);if(!(0,import_ag_charts_core182.isString)(n))return;if(PALETTE_INDEX_KEYS.has(n)){const a=t.getPathArray(e);let o=getPathLastIndex(a),l=0;const c=["series","0","type"];for(let h=0;h<o;h++){c[1]=`${h}`;const u=t.getResolvedPath(c);(u==="map-shape-background"||u==="map-line-background")&&l++}if(o-=l,Number.isNaN(o))return;switch(n){case"fill":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.fills,1,o)[0];case"fillFallback":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.fillsFallback,1,o)[0];case"stroke":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.strokes,1,o)[0];case"gradient":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.sequentialColors,1,o)[0];case"range2":return(0,import_ag_charts_core182.circularSliceArray)(t.palette.fills,2,o)}return}if(n==="gradients")return t.palette.sequentialColors;if(n==="type")return t.paletteType;const r=getPathSafe(t.palette,n.split("."));return Array.isArray(r)?[...r]:typeof r=="object"?{...r}:r}function pathOperationDependenciesFactory(t,e,i){const[s]=i,n=t.getVertexValue(s);if((0,import_ag_charts_core182.isString)(n)){const r=t.getPathArray(e),a=resolvePath(r,n);if(a===UNRESOLVABLE_PATH)return;const o=t.findVertexAtPath(a);o&&t.addEdge(e,o,DEPENDENCY_EDGE)}}function pathOperation(t,e,i){const s=i.length>1,n=i.length>2,[r,a,o]=i,l=t.resolveVertexValue(e,r),c=n?t.resolveVertexValue(e,o):null;if(!(0,import_ag_charts_core182.isString)(l))throw new Error(`\`$path\` json operation failed on [${String(l)}], expecting a string.`);const h=t.getPathArray(e),u=resolvePath(h,l);if(u===UNRESOLVABLE_PATH)return;const d=c?getPathSafe(c,u):t.getResolvedPath(u);if(d!=null)return d;if(s)return t.resolveVertexValue(e,a)}function pathStringOperation(t,e,i){const[s,n]=i,r=t.resolveVertexValue(e,s);if(!(0,import_ag_charts_core182.isString)(r))throw new Error(`\`$path\` json operation failed on [${String(r)}], expecting a string.`);let a;n&&(a=t.graftAndResolveOrphan(e,n));const o=t.getPathArray(e),l=resolvePath(o,r,a);if(l===UNRESOLVABLE_PATH)throw new Error(`Unresolvable path [${r}] at [${o.join(".")}]`);return l}function refOperation(t,e,i){const[s]=i,n=t.getVertexValue(s);return t.getParamValue(n)}var transformOperations={$apply:applyOperation,$applyCycle:applyCycleOperation,$applySwitch:applySwitchOperation,$applyTheme:applyThemeOperation,$clone:cloneOperation,$findFirstSiblingNotOperation:findFirstSiblingNotOperationOperation,$map:mapOperation,$merge:mergeOperation,$omit:omitOperation,$size:sizeOperation,$shallow:shallowOperation,$shallowSimple:shallowSimpleOperation,$value:valueOperation};function applyOperation(t,e,i){const[s,n,r,a]=i,o=t.getVertexValue(s);if(!(0,import_ag_charts_core182.isPlainObject)(o))return;const l=n?t.getVertexValue(n):void 0,c=t.neighboursWithEdgeValue(e,PATH_EDGE),h=c&&c.length>0;if(!h&&l==null)return RESOLVED_TO_BRANCH;const u=r?t.resolveVertexValue(e,r):void 0,d=a?t.resolveVertexValue(e,a):void 0;if(!h&&l!=null)if(getOperation(l)){const p=t.resolveVertexValue(e,n);(0,import_ag_charts_core182.isPlainObject)(p)&&t.graftObject(e,p,[u,d])}else t.graftObject(e,l,[u,d]);if(!h)return RESOLVED_TO_BRANCH;for(const p of c){const g=t.neighboursWithEdgeValue(p,PATH_EDGE);if(!g||g.length===0){const f=t.addVertex({});t.addEdge(p,f,DEFAULTS_EDGE)}else t.graftObject(p,o,[u,d])}return RESOLVED_TO_BRANCH}function applyCycleOperation(t,e,i){const[s,n,r]=i,a=t.resolveVertexValue(e,s);if(typeof a!="number")return;const o=t.getPathArray(e),l=t.dangerouslyGetUserOption(o),c=t.hasThemeOverride(o),h=l==null?void 0:USER_OPTIONS_EDGE,u=l??t.resolveVertexValue(e,n);if(!Array.isArray(u))return;const d=r?t.getVertexValue(r):void 0;for(let p=0;p<a;p++){const g=u[p%u.length];g!=null&&((l||!c)&&t.graftValue(e,`${p}`,g,void 0,h),d&&t.graftValue(e,`${p}`,d,g,h))}return RESOLVED_TO_BRANCH}function applySwitchOperation(t,e,i){const[s,n,...r]=i,a=t.resolveVertexValue(e,s);for(const o of r){const l=t.getVertexValue(o);if(!Array.isArray(l))continue;const[c,h]=l;if(a===c||Array.isArray(c)&&c.includes(a))return t.graftObject(e,h,[],DEFAULTS_EDGE),RESOLVED_TO_BRANCH}return t.resolveVertexValue(e,n)}function applyThemeOperation(t,e,i){const[s,n,r]=i;let a=t.getVertexValue(s);if(typeof a=="string"&&(a=[a]),!Array.isArray(a))return;const o=t.neighboursWithEdgeValue(e,PATH_EDGE),l=r?t.getVertexValue(r):[],c=Array.isArray(l)?new Set(l):new Set;if(!o)return RESOLVED_TO_BRANCH;for(const h of o){const u=t.graftAndResolveOrphan(h,n);for(const d of a){const p=resolvePath([],d,u);p!==UNRESOLVABLE_PATH&&t.graftConfig(h,p,c)}}return RESOLVED_TO_BRANCH}function cloneOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);if((0,import_ag_charts_core182.isPlainObject)(n))return t.graftObject(e,n,void 0,USER_OPTIONS_EDGE),RESOLVED_TO_BRANCH}function findFirstSiblingNotOperationOperation(t,e,i){const[s]=i,n=t.getPathArray(e),r=resolvePath(n,"..");if(r===UNRESOLVABLE_PATH)return;const a=t.findVertexAtPath(r);if(!a)return t.resolveVertexValue(e,s);const o=t.neighboursWithEdgeValue(a,PATH_EDGE);if(o)for(const l of o){const c=t.getPathArray(l);if(c[r.length]===n[r.length])continue;const h=c.concat(n.slice(r.length+1)),u=t.findVertexAtPath(h);if(!u)continue;const d=t.findNeighbourValue(u,USER_OPTIONS_EDGE);if(d!=null)return d;const p=t.findNeighbourValue(u,OVERRIDES_EDGE);if(p!=null)return p}return t.resolveVertexValue(e,s)}function mapOperation(t,e,i){const[s,n]=i,r=t.getVertexValue(s),a=t.resolveVertexValue(e,n);if(!Array.isArray(a))return;const o=t.neighboursWithEdgeValue(e,PATH_EDGE);if(o&&o.length>0)return;let l=0;for(const c of a)t.graftValue(e,`${l}`,r,c),l++;return RESOLVED_TO_BRANCH}function mergeOperation(t,e,i){for(const s of i){const n=t.resolveVertexValue(e,s);(0,import_ag_charts_core182.isPlainObject)(n)&&t.graftObject(e,n)}return RESOLVED_TO_BRANCH}function omitOperation(t,e,i){const[s,n]=i;let r=t.getVertexValue(s);if(!Array.isArray(r)){const o=getOperationTargetVertex(t,e,n);if(!o)return;r=t.resolveVertexValue(o,s)}const a=t.resolveVertexValue(e,n);if(!(!Array.isArray(r)||!(0,import_ag_charts_core182.isPlainObject)(a)))return(0,import_ag_charts_core182.without)(a,r)}function sizeOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);return(0,import_ag_charts_core182.isObjectLike)(n)?"length"in n?n.length:Object.keys(n).length:0}function shallowSimpleOperation(t,e,i){const s=[];for(const n of i)s.push(t.getVertexValue(n));return s}function shallowOperation(t,e,i){const s=t.getPathArray(e),n=t.hasUserOption(s);if(!n&&i.length===1)return t.resolveVertexValue(e,i[0]);const r=[];for(const a of i)r.push(t.getVertexValue(a));return n?(t.prune(e,[OVERRIDES_EDGE,DEFAULTS_EDGE]),RESOLVED_TO_BRANCH):(t.graftObject(e,r),RESOLVED_TO_BRANCH)}function valueOperation(t,e,i){const[s]=i,n=t.getVertexValue(s),r=t.getPathArray(e);if(n==="$index")return getPathLastIndex(r);if(n==="$parentIndex")return getPathLastIndex(r,1);if(n==="$1")return t.resolveValue$1(r)}var numericOperations={$isEven:isEvenOperation};function isEvenOperation(t,e,i){const[s]=i,n=t.resolveVertexValue(e,s);return Number.isNaN(Number(n))?!1:Number(n)%2===0}var operations={...cacheOperations,...chartOperations,...colorOperations,...fontOperations,...locationOperations,...logicOperations,...numericOperations,...transformOperations},operationTypes=new Set(Object.keys(operations));function isOperation(t){return operationTypes.has(t)}var debug2=import_ag_charts_core183.Debug.create("opts","options-graph"),createOptionsGraph=(0,import_ag_charts_core183.simpleMemorize)(createOptionsGraphFn);function createOptionsGraphFn(t,e){return debug2.group("OptionsGraph.constructor()",()=>{const i=new OptionsGraph(t.config,e,t.params,t.palette,t.overrides,t.getTemplateParameters());return{resolve(){return i.resolve()},resolveParams(){return i.resolveParams()},resolveAnnotationThemes(){return i.resolveAnnotationThemes()},resolvePartial(s,n,r){return i.resolvePartial(s,n,r)},clearSafe(){return i.clearSafe()}}})}var _OptionsGraph=class W extends import_ag_charts_core183.AdjacencyListGraph{constructor(e={},i={},s=void 0,n={},r=void 0,a=new Map){super(PATH_EDGE,OPERATION_EDGE,new Set([USER_PARTIAL_OPTIONS_EDGE,USER_OPTIONS_EDGE])),this.config=e,this.userOptions=i,this.palette=n,this.overrides=r,this.internalParams=a,this.edgePriority=[...W.EDGE_PRIORITY],this.graftEdge=W.GRAFT_EDGE,this.resolvedParams={},this.resolvedAnnotations={},this.value$1=new Map,this.cachedPathVertices=new Map,this.hasUnsafeClearKeys=!1,this.rollbackVertices=[],this.rollbackEdgesFrom=[],this.rollbackEdgesTo=[],this.rollbackEdgesValue=[],this.isRollingBack=!1,this.resolvedRootAncestorsPaths=new Set,this.EMPTY_PATH_ARRAY_VERTEX=this.addVertex([]),this.root=this.addVertex("root"),this.params=this.addVertex("params"),this.annotations=this.addVertex("annotations"),this.paletteType=(0,import_ag_charts_core183.isObject)(i?.theme)?paletteType(i.theme?.palette):"inbuilt";const o=i.series?.[0]?.type??"line";debug2("build user"),this.buildGraphFromObject(this.root,USER_OPTIONS_EDGE,(0,import_ag_charts_core183.without)(i,["theme"])),debug2("build defaults"),this.buildGraphFromObject(this.root,DEFAULTS_EDGE,(0,import_ag_charts_core183.without)(e[o],W.COMPLEX_KEYS));const l=r?(0,import_ag_charts_core183.without)(r[o],W.COMPLEX_KEYS):{};Object.keys(l).length>0&&(debug2("build series overrides"),this.buildGraphFromObject(this.root,OVERRIDES_EDGE,l));const c=r?(0,import_ag_charts_core183.without)(r.common,W.COMPLEX_KEYS):{};Object.keys(c).length>0&&(debug2("build common overrides"),this.buildGraphFromObject(this.root,OVERRIDES_EDGE,import_ag_charts_core183.ModuleRegistry.getSeriesModule(o)?.chartType==="cartesian"?c:(0,import_ag_charts_core183.without)(c,["zoom","navigator"]))),s&&(debug2("build params"),this.buildGraphFromObject(this.params,DEFAULTS_EDGE,s));const h=this.findNeighbourWithValue(this.root,"axes",PATH_EDGE),u=this.findNeighbourWithValue(this.root,"series",PATH_EDGE);h&&(debug2("build axes"),this.buildGraphFromObject(h,DEFAULTS_EDGE,{$applyTheme:[["/$seriesType/axes/$axisType/$position","/$seriesType/axes/$axisType"],{seriesType:{$path:["/series/0/type","line"]},axisType:{$path:["./type","category"]},position:{$path:["./position"]}},["top","right","bottom","left"]]})),u&&(debug2("build series"),this.buildGraphFromObject(u,DEFAULTS_EDGE,{$applyTheme:["/$seriesType/series",{seriesType:{$path:["./type","line"]}}]}));const d=(0,import_ag_charts_core183.without)(e[o]?.annotations??{},W.ANNOTATIONS_OPTIONS_KEYS);Object.keys(d).length>0&&(debug2("build annotations type config"),this.buildGraphFromObject(this.annotations,DEFAULTS_EDGE,d));const p=(0,import_ag_charts_core183.without)(r?.common?.annotations??{},W.ANNOTATIONS_OPTIONS_KEYS);Object.keys(p).length>0&&(debug2("build annotations type overrides"),this.buildGraphFromObject(this.annotations,OVERRIDES_EDGE,p));const g=(0,import_ag_charts_core183.pick)(e[o]?.annotations??{},W.ANNOTATIONS_OPTIONS_KEYS);Object.keys(g).length>0&&(debug2("build annotations config"),this.buildGraphFromObject(this.root,DEFAULTS_EDGE,{annotations:g}));const f=(0,import_ag_charts_core183.pick)(r?.common?.annotations??{},W.ANNOTATIONS_OPTIONS_KEYS);Object.keys(f).length>0&&(debug2("build annotations overrides"),this.buildGraphFromObject(this.root,OVERRIDES_EDGE,{annotations:f})),this.buildDependencyGraph()}static clearValueCache(){W.valueCache.clear()}clear(){debug2.group("OptionsGraph.clear()",()=>{super.clear(),this.cachedPathVertices.clear(),this.root=void 0,this.params=void 0,this.annotations=void 0,debug2("cleared")})}clearSafe(){this.hasUnsafeClearKeys||this.clear()}resolve(){return debug2.group("OptionsGraph.resolve()",()=>(this.resolved={},this.resolvedParams={},this.resolvedAnnotations={},debug2("resolve params"),this.resolveVertex(this.params,this.resolvedParams),debug2("resolve annotations"),this.resolveVertex(this.annotations,this.resolvedAnnotations),debug2("resolve root"),this.resolveVertex(this.root),debug2("resolved root",this.resolved),debug2("vertex count",this.getVertexCount()),debug2("edge count",this.getEdgeCount()),this.resolved))}resolveParams(){return this.resolvedParams}resolveAnnotationThemes(){return this.resolvedAnnotations}addVertex(e){const i=super.addVertex(e);return this.isRollingBack&&this.rollbackVertices.push(i),i}addEdge(e,i,s){const n=(this.neighboursWithEdgeValue(e,s)?.indexOf(i)??-1)!==-1;this.isRollingBack&&!n&&(this.rollbackEdgesFrom.push(e),this.rollbackEdgesTo.push(i),this.rollbackEdgesValue.push(s)),super.addEdge(e,i,s)}resolvePartial(e,i,s){if(!i||!this.root)return;const{permissivePath:n,proxyPaths:r}=s??{},a=Object.keys(i);if(debug2.check()&&console.groupCollapsed(`OptionsGraph.resolvePartial() - ${e.join(".")} [${a}]`),a.length===0)return{};const o=this.findVertexAtPath(e);if(!o){if(n)return;throw new Error(`Could not find vertex in OptionsGraph at path [${e.join(".")}].`)}const l=this.findNeighbour(o,PATH_ARRAY_EDGE);if(this.userPartialOptions={},setPathSafe(this.userPartialOptions,e,i),r)for(const p of Object.keys(r)){const g=r[p],f=getPathSafe(i,[p]);f!=null&&(setPathSafe(i,g,f),setPathSafe(this.userPartialOptions,[...e,...g],f),delete i[p],delete this.userPartialOptions[p])}this.graftEdge=USER_PARTIAL_OPTIONS_EDGE,this.edgePriority=[USER_PARTIAL_OPTIONS_EDGE,...W.EDGE_PRIORITY],this.snapshot(),this.buildGraphFromObject(o,USER_PARTIAL_OPTIONS_EDGE,i,l);for(const p of a){const g=r?.[p]?this.findVertexAtPath([...e,...r[p]]):this.findNeighbourWithValue(o,p,PATH_EDGE);g&&this.refreshPendingProcessingEdges(g)}this.buildDependencyGraph();const c={};if(this.resolveVertex(o,c),this.rollback(),this.graftEdge=W.GRAFT_EDGE,this.edgePriority=W.EDGE_PRIORITY,this.userPartialOptions=void 0,r)for(const p of Object.keys(r)){const g=r[p],f=getPathSafe(c,[...e,...g]);setPathSafe(c,[...e,p],f)}const h=getPathSafe(c,e),d=s?.pick??!0?(0,import_ag_charts_core183.pick)(getPathSafe(c,e),a):h;return debug2("vertex count",this.getVertexCount()),debug2("edge count",this.getEdgeCount()),debug2("resolved partial",d),debug2.check()&&console.groupEnd(),d}findVertexAtPath(e){const i=e.join(".");if(this.cachedPathVertices.has(i))return this.cachedPathVertices.get(i);const s=this.findVertexAlongEdge(this.root,e,PATH_EDGE);if(s)return this.cachedPathVertices.set(i,s),s}hasUserOption(e){if(hasPathSafe(this.userOptions,e))return!0;const s=this.findVertexAtPath(e);if(s){if(this.findNeighbour(s,USER_OPTIONS_EDGE)!=null||this.findNeighbour(s,USER_PARTIAL_OPTIONS_EDGE)!=null)return!0;const n=this.findNeighbourValue(s,CHILDREN_SOURCE_EDGE);return n===USER_OPTIONS_EDGE||n===USER_PARTIAL_OPTIONS_EDGE}return!1}dangerouslyGetUserOption(e){if(this.userPartialOptions){const i=getPathSafe(this.userPartialOptions,e);if(i!=null)return i}return getPathSafe(this.userOptions,e)}hasThemeOverride(e){if(this.overrides==null)return!1;if(e[0]==="axes"&&e.length>1){const i=this.getResolvedPath(["axes",e[1],"type"]);if(hasPathSafe(this.overrides,["common","axes",i,...e.slice(2)]))return!0;const s=this.getResolvedPath(["series","0","type"]);return hasPathSafe(this.overrides,[s,"axes",i,...e.slice(2)])}if(e[0]==="series"&&e.length>1){const i=this.getResolvedPath(["series",e[1],"type"]);return hasPathSafe(this.overrides,[i,"series",...e.slice(2)])}return hasPathSafe(this.overrides,e)}getParamValue(e){if(this.resolvedParams[e]!=null)return this.resolvedParams[e];const i=this.findVertexAlongEdge(this.params,[e],PATH_EDGE);if(!i)return;const s=this.findNeighbour(i,DEFAULTS_EDGE);if(!s)return;const n=this.resolveVertexValue(i,s);return this.resolvedParams[e]=n,n}getPathArray(e){return this.findNeighbourValue(e,PATH_ARRAY_EDGE)??[]}getResolvedPath(e){return getPathSafe(this.resolved,e)}getCachedValue(e,i){const s=[...e,i].join(".");return W.valueCache.get(s)}setCachedValue(e,i,s){const n=[...e,i].join(".");W.valueCache.set(n,s)}prune(e,i){this.addEdge(e,this.addVertex(i),PRUNE_EDGE)}resolveVertexValue(e,i){this.resolveVertexDependencies(i);const s=this.findNeighbourValue(i,OPERATION_EDGE);if(s&&isOperation(s)){const r=this.neighboursWithEdgeValue(i,OPERATION_VALUE_EDGE),a=operations[s],l=(typeof a=="function"?a:a.resolve)?.(this,e,r??[]);return l===RESOLVED_TO_BRANCH?void 0:l}let n=this.getVertexValue(i);if(Array.isArray(n)){const r={};this.resolveVertexChildren(i,r),n=getPathSafe(r,this.getPathArray(e))}return this.resolveValueOrSymbol(n)}resolveValue$1(e){for(let i=e.length;i>=0;i--){const s=e.slice(0,i).join("."),n=this.value$1.get(s);if(n!=null)return n}}graftConfig(e,i,s){const n=getPathSafe(this.config,i),r=this.findNeighbour(e,PATH_ARRAY_EDGE);if((0,import_ag_charts_core183.isObject)(n)&&this.buildGraphFromObject(e,DEFAULTS_EDGE,n,r,void 0,s),this.overrides){const a=getPathSafe(this.overrides,i);(0,import_ag_charts_core183.isObject)(a)&&this.buildGraphFromObject(e,OVERRIDES_EDGE,a,r,void 0,s);const o=getPathSafe(this.overrides,["common",...i.slice(1)]);(0,import_ag_charts_core183.isObject)(o)&&this.buildGraphFromObject(e,OVERRIDES_EDGE,o,r,void 0,s)}this.buildDependencyGraph()}graftObject(e,i,s,n=this.graftEdge){const r=this.findNeighbour(e,PATH_ARRAY_EDGE);if(this.buildGraphFromObject(e,n,i,r),this.overrides&&s)for(const a of s){if(a==null)continue;const o=getPathSafe(this.overrides,a);o&&this.buildGraphFromObject(e,OVERRIDES_EDGE,o,r)}this.buildDependencyGraph()}graftValue(e,i,s,n,r=this.graftEdge){const a=[...this.getPathArray(e),i],o=this.findVertexAtPath(a)??this.addVertex(i);this.value$1.set(a.join("."),n),this.buildGraphFromValue(e,o,r,a,s),this.buildDependencyGraph()}graftAndResolveOrphan(e,i){const s={},n=this.addVertex(s),r=this.getPathArray(e);return this.graftAndResolveChildren(i,n,r,[]),this.resolveVertex(n,s),getPathSafe(s,r)}graftAndResolveOrphanValue(e,i,s,n,r=this.graftEdge){const a={},o=this.addVertex(a),c=[...this.getPathArray(e),i],h=this.findVertexAtPath(c)??this.addVertex(i);return this.value$1.set(c.join("."),n),this.buildGraphFromValue(o,h,r,c,s),this.resolveVertex(o,a),getPathSafe(a,c)}buildGraphFromObject(e,i,s,n,r=W.SHALLOW_KEYS,a){const o=Object.keys(s),l=getOperation(s,o);if(l){const g=this.addVertex(s);this.addEdge(e,g,i),this.buildGraphFromOperation(g,i,l,n);return}if(o.length===0){this.addEdge(e,this.addVertex(Array.isArray(s)?[]:{}),i),this.buildGraphAutoEnable(e,i,s,void 0);return}const c=this.getVertexChildrenByKey(e),h=n?this.getVertexValue(n):[];let u;Array.isArray(s)&&this.addEdge(e,this.addVertex(i),CHILDREN_SOURCE_EDGE);const d=[...h],p=h.length;for(const g of o){if(a?.has(g))continue;const f=c?.get(g)??this.addVertex(g);d[p]=g,r?.has(g)?this.buildShallowGraphFromValue(e,f,i,d,s[g]):this.buildGraphFromValue(e,f,i,d,s[g],r),g==="enabled"&&(u=f)}this.buildGraphAutoEnable(e,i,s,u)}buildGraphAutoEnable(e,i,s,n){if(i===DEFAULTS_EDGE&&!n||i===USER_OPTIONS_EDGE&&n||i!==DEFAULTS_EDGE&&i!==USER_OPTIONS_EDGE&&i!==USER_PARTIAL_OPTIONS_EDGE&&i!==OVERRIDES_EDGE)return;let r=this.findNeighbour(e,AUTO_ENABLE_EDGE);r||(r=this.addVertex(AUTO_ENABLE_EDGE),this.addEdge(e,r,AUTO_ENABLE_EDGE)),n&&this.addEdge(n,r,AUTO_ENABLE_VALUE_EDGE);const{enabled:a,_enabledFromTheme:o}=s;this.addEdge(r,this.addVertex({enabled:a,_enabledFromTheme:o,keys:Object.keys(s).length}),i)}getVertexChildrenByKey(e){const i=this.neighboursWithEdgeValue(e,PATH_EDGE);if(!i)return;const s=new Map;for(const n of i)s.set(this.getVertexValue(n),n);return s}buildGraphFromValue(e,i,s,n,r,a){this.addEdge(e,i,PATH_EDGE);let o=this.findNeighbour(i,PATH_ARRAY_EDGE);o||(o=this.addVertex([...n]),this.addEdge(i,o,PATH_ARRAY_EDGE));const l=getOperation(r);if(l){const c=this.addVertex(r);this.addEdge(i,c,s),this.addEdge(c,o,PATH_ARRAY_EDGE),this.buildGraphFromOperation(c,s,l,o)}else if((0,import_ag_charts_core183.isObjectLike)(r))this.buildGraphFromObject(i,s,r,o,a);else{const c=this.findNeighbour(i,s);if(c&&this.getVertexValue(c)===r)return;const h=this.addVertex(r);this.addEdge(i,h,s)}}buildShallowGraphFromValue(e,i,s,n,r){this.addEdge(e,i,PATH_EDGE);let a=this.findNeighbour(i,PATH_ARRAY_EDGE);a||(a=this.addVertex([...n]),this.addEdge(i,a,PATH_ARRAY_EDGE));const o=this.addVertex(r);this.addEdge(i,o,s)}buildGraphFromOperation(e,i,s,n){const r=this.addVertex(s.operation);this.addEdge(e,r,OPERATION_EDGE);for(const a of s.values)this.buildGraphFromOperationValue(e,a,i,n)}buildGraphFromOperationValue(e,i,s,n=this.EMPTY_PATH_ARRAY_VERTEX){const r=this.addVertex(i);this.addEdge(e,n,PATH_ARRAY_EDGE),this.addEdge(e,r,OPERATION_VALUE_EDGE);const a=getOperation(i);a?this.buildGraphFromOperation(r,s,a,n):(0,import_ag_charts_core183.isObjectLike)(i)&&this.buildGraphFromObject(r,s,i,n)}buildDependencyGraph(){for(let e=0;e<this.pendingProcessingEdgesFrom.length;e++){const i=this.pendingProcessingEdgesFrom[e],s=this.pendingProcessingEdgesTo[e],n=this.getVertexValue(s);if(!isOperation(n))continue;const r=this.neighboursWithEdgeValue(i,OPERATION_VALUE_EDGE),a=operations[n];(typeof a=="function"?void 0:a.dependencies)?.(this,i,r??[])}this.pendingProcessingEdgesFrom=[],this.pendingProcessingEdgesTo=[]}refreshPendingProcessingEdges(e){const s=this.findNeighbour(e,DEFAULTS_EDGE)??e,n=this.findNeighbour(s,OPERATION_EDGE);if(n){this.pendingProcessingEdgesFrom.push(s),this.pendingProcessingEdgesTo.push(n);const a=this.neighboursWithEdgeValue(s,OPERATION_VALUE_EDGE);if(a)for(const o of a)this.refreshPendingProcessingEdges(o)}const r=this.neighboursWithEdgeValue(e,PATH_EDGE);if(r)for(const a of r)this.refreshPendingProcessingEdges(a)}resolveVertex(e,i=this.resolved,s){const n=this.getPathArray(e),r=n[0];if(n.length===1&&this.resolvedRootAncestorsPaths.add(r),n.length>1&&!this.resolvedRootAncestorsPaths.has(r)){const a=this.findVertexAtPath([r]);if(a){this.resolveVertex(a,i,s);return}}if(this.userPartialOptions==null&&i===this.resolved&&n.length>0){const a=getPathSafe(i,n);if(a!=null&&!(0,import_ag_charts_core183.isPlainObject)(a))return}this.resolveVertexInEdgePriority(e,i,n,s),this.resolveVertexAutoEnable(e,i,n),this.resolveVertexChildren(e,i,s)}resolveVertexInEdgePriority(e,i,s,n){const r=this.neighboursWithEdgeValue(e,PATH_EDGE),[a]=this.edgePriority;for(const o of this.edgePriority){const l=this.findNeighbour(e,o);if(l==null)continue;const c=this.resolveVertexValueInternal(e,l);if(!(c==null&&o!==a)&&!(r&&r.length>0&&o!==a)&&!(Array.isArray(n)&&n.includes(o))){if(this.hasUnsafeClearKeys||(this.hasUnsafeClearKeys=c!=null&&W.UNSAFE_CLEAR_KEYS.has(s.at(-1))),s.length===0){if(c==null)continue;this.resolved=c}else setPathSafe(i,s,c);break}}}resolveVertexValueInternal(e,i){this.resolveVertexDependencies(i);const s=this.findNeighbourValue(i,OPERATION_EDGE);if(s&&isOperation(s)){const n=this.neighboursWithEdgeValue(i,OPERATION_VALUE_EDGE),r=operations[s],o=(typeof r=="function"?r:r.resolve)?.(this,e,n??[]);return o===RESOLVED_TO_BRANCH?void 0:o}return this.resolveValueOrSymbol(this.getVertexValue(i))}resolveVertexAutoEnable(e,i,s){const n=this.neighboursWithEdgeValue(e,AUTO_ENABLE_VALUE_EDGE)?.[0];if(!n)return;const r=this.findVertexAtPath(s),a=this.findNeighbourValue(n,DEFAULTS_EDGE),o=this.findNeighbourValue(n,OVERRIDES_EDGE),l=this.findNeighbourValue(n,USER_OPTIONS_EDGE),h=r&&this.findNeighbour(r,USER_OPTIONS_EDGE)!=null?void 0:this.findNeighbourValue(n,USER_PARTIAL_OPTIONS_EDGE);(l!=null&&l.enabled==null||h!=null&&h.enabled==null)&&!a?._enabledFromTheme&&!o?._enabledFromTheme&&setPathSafe(i,s,!0)}resolveVertexChildren(e,i,s){const n=this.neighboursWithEdgeValue(e,PATH_EDGE);if(n){s??(s=this.findNeighbourValue(e,PRUNE_EDGE));for(const r of n){const a=this.getVertexValue(r);n.length>1&&isOperation(a)||a!=="_enabledFromTheme"&&this.resolveVertex(r,i,s)}}}resolveVertexDependencies(e){const i=this.neighboursWithEdgeValue(e,DEPENDENCY_EDGE);if(i)for(const s of i)this.resolveVertex(s)}graftAndResolveChildren(e,i,s,n){const r=this.neighboursWithEdgeValue(e,PATH_EDGE);if(r)for(const a of r){const o=this.getVertexValue(a),l=[...s,o],c=[...n,o],h=this.addVertex(o),u=this.findNeighbourValue(a,DEFAULTS_EDGE);this.addEdge(i,h,PATH_EDGE);const d=this.addVertex(l);if(this.addEdge(h,d,PATH_ARRAY_EDGE),(0,import_ag_charts_core183.isObject)(u)){this.buildGraphFromObject(h,DEFAULTS_EDGE,u,d);const p=this.findNeighbour(h,DEFAULTS_EDGE);this.addEdge(p,this.addVertex(l),PATH_ARRAY_EDGE);const g=this.findNeighbourValue(p,OPERATION_EDGE);if(isOperation(g)){const f=this.neighboursWithEdgeValue(p,OPERATION_VALUE_EDGE),y=operations[g];(typeof y=="function"?void 0:y.dependencies)?.(this,p,f??[])}}this.graftAndResolveChildren(a,h,l,c)}}resolveValueOrSymbol(e){return typeof e=="symbol"&&this.internalParams?.has(e)?this.internalParams.get(e):e}snapshot(){debug2("snapshot"),this.isRollingBack=!0}rollback(){debug2(`rollback ${this.rollbackEdgesFrom.length} edges and ${this.rollbackVertices.length} vertices`);for(let e=0;e<this.rollbackEdgesFrom.length;e++){const i=this.rollbackEdgesFrom[e],s=this.rollbackEdgesTo[e],n=this.rollbackEdgesValue[e];this.removeEdge(i,s,n)}for(const e of this.rollbackVertices)this.removeVertex(e);this.cachedPathVertices.clear(),this.rollbackVertices=[],this.rollbackEdgesFrom=[],this.rollbackEdgesTo=[],this.rollbackEdgesValue=[],this.isRollingBack=!1}diagram(e,i=2){this.diagramKeys=new Map,this.diagramEdges=new Map;const s=this.findVertexAtPath(e),n=["---","config:"," layout: elk"," look: neo"," theme: redux","---","flowchart TB"];s&&this.diagramVertex(n,s,1,i),n.push("classDef UO fill: #e8f5e8, stroke: #4caf50"),n.push("classDef DE fill: #e3f2fd, stroke: #2196f3"),n.push("classDef DEP fill: #ffe0fd, stroke: #ff00f2"),n.push("classDef OP fill: #fff3e0, stroke: #ff9800"),n.push("classDef OPV fill: #fff3e0, stroke: #ff9800, stroke-width: 1px"),n.push("classDef OV fill: #e8f5ee, stroke: #4caf87"),console.log(n.join(`
|
|
`))}diagramKey(e){let i=this.diagramKeys.get(e);return i||(i=`${this.diagramKeys.size}`,this.diagramKeys.set(e,i)),i}diagramLabel(e,i,s){let n=this.diagramKeys.get(e);if(n)return n;n=this.diagramKey(e);const r={[USER_OPTIONS_EDGE]:"UO",[DEFAULTS_EDGE]:"DE",[DEPENDENCY_EDGE]:"DEP",[OPERATION_EDGE]:"OP",[OPERATION_VALUE_EDGE]:"OPV",[OVERRIDES_EDGE]:"OV"};let a=s?r[s]??void 0:void 0;return a=a?`:::${a}`:"",typeof i.value=="symbol"?`${n}[/"[symbol]"\\]${a}`:Array.isArray(i.value)?`${n}[/"[array]"\\]${a}`:typeof i.value=="object"?`${n}[/"[object]"\\]${a}`:s===DEFAULTS_EDGE||s===USER_OPTIONS_EDGE||s===OVERRIDES_EDGE?`${n}("${i.value}")${a}`:`${n}["${i.value}"]${a}`}diagramVertex(e,i,s,n){const r=this.getPathArray(i),a=r.length>0?r.join("."):"root";this.diagramNeighbours(e,a,i,s+1,n);let o=this.diagramKeys.get(a);o||(o=this.diagramKey(a),e.push(` ${o}["${i.value}"]`))}diagramNeighbours(e,i,s,n,r){for(const p of this.neighboursWithEdgeValue(s,PATH_EDGE)??[]){const g=this.getPathArray(p),f=g.length>0?g.join("."):"root";n<r&&this.diagramVertex(e,p,n+1,r),this.diagramChild(e,PATH_EDGE,i,s,f,s)}const a=this.neighboursWithEdgeValue(s,USER_OPTIONS_EDGE)??[];let o=0;for(const p of a)this.diagramChild(e,USER_OPTIONS_EDGE,i,s,`${i}.${USER_OPTIONS_EDGE}.${o}`,p),o++;const l=this.neighboursWithEdgeValue(s,DEFAULTS_EDGE)??[];o=0;for(const p of l)this.diagramChildWithNeighbours(e,DEFAULTS_EDGE,i,s,`${i}.${DEFAULTS_EDGE}.${o}`,p,n+1,r),o++;const c=this.neighboursWithEdgeValue(s,OPERATION_EDGE)??[];o=0;const[h]=c;h&&(this.diagramChildWithNeighbours(e,OPERATION_EDGE,i,s,`${i}.${OPERATION_EDGE}.${o}`,h,n+1,r),o++);const u=this.neighboursWithEdgeValue(s,OPERATION_VALUE_EDGE)??[];o=0;for(const p of u)this.diagramChildWithNeighbours(e,OPERATION_VALUE_EDGE,i,s,`${i}.${OPERATION_VALUE_EDGE}.${o}`,p,n+1,r),o++;const d=this.neighboursWithEdgeValue(s,DEPENDENCY_EDGE)??[];o=0;for(const p of d)this.diagramChildWithNeighbours(e,DEPENDENCY_EDGE,i,s,this.getPathArray(p).join("."),p,n+1,r),o++}diagramChild(e,i,s,n,r,a){let o=this.diagramEdges.get(s);if(o?.has(r))return;o||(o=new Set,this.diagramEdges.set(s,o)),o.add(r);const l=i===PATH_EDGE?"":`|${i}|`;e.push(` ${this.diagramLabel(s,n)} -->${l} ${this.diagramLabel(r,a,i)}`)}diagramChildWithNeighbours(e,i,s,n,r,a,o,l){this.diagramChild(e,i,s,n,r,a),this.diagramNeighbours(e,r,a,o+1,l)}};_OptionsGraph.EDGE_PRIORITY=[USER_OPTIONS_EDGE,OVERRIDES_EDGE,DEFAULTS_EDGE],_OptionsGraph.GRAFT_EDGE=DEFAULTS_EDGE,_OptionsGraph.SHALLOW_KEYS=new Set(["context","data","topology"]),_OptionsGraph.COMPLEX_KEYS=["annotations","axes","series"],_OptionsGraph.ANNOTATIONS_OPTIONS_KEYS=["axesButtons","data","enabled","optionsToolbar","snap","toolbar","xKey","volumeKey"],_OptionsGraph.UNSAFE_CLEAR_KEYS=new Set(["itemStyler","styler"]),_OptionsGraph.valueCache=new Map;var OptionsGraph=_OptionsGraph,stringFormat=t=>`'${t}'`,AXIS_ID_PREFIX="__AXIS_ID_",POSITION_DIRECTIONS={top:import_ag_charts_core184.ChartAxisDirection.X,bottom:import_ag_charts_core184.ChartAxisDirection.X,left:import_ag_charts_core184.ChartAxisDirection.Y,right:import_ag_charts_core184.ChartAxisDirection.Y},_ChartOptions=class H{constructor(e,i,s,n,r,a,o=!1,l){this.themeParameters={},this.optionMetadata=r??{},this.processedOverrides=s??{};let c=null;e instanceof H?(c=e,this.specialOverrides=c.specialOverrides,a&&(this.userDeltaKeys=new Set(Object.keys(a))),a??(a=(0,import_ag_charts_core184.jsonDiff)(c.userOptions,i,H.JSON_DIFF_OPTS)),this.userOptions=(0,import_ag_charts_core184.deepClone)((0,import_ag_charts_core184.merge)(a,c.userOptions),{...H.OPTIONS_CLONE_OPTS_SLOW,seen:[]})):(this.userOptions=(0,import_ag_charts_core184.deepClone)(e??i,{...H.OPTIONS_CLONE_OPTS_SLOW,seen:[]}),this.specialOverrides=this.specialOverridesDefaults({...n})),this.findSeriesWithUserVisiblity(i,a),o&&this.removeLeftoverSymbols(this.userOptions);const h=e instanceof H&&a?.data!==void 0&&a?.data?.length!==e.userOptions.data?.length;let u,d,p,g,f,y,m;if(!o&&this.seriesWithUserVisibility==null&&a!==void 0&&H.isFastPathDelta(a)&&c!=null&&!h?({activeTheme:u,processedOptions:d,fastDelta:p}=this.fastSetup(a,c),g=c.themeParameters,f=c.annotationThemes):(H.perfDebug("ChartOptions.slowSetup()"),{activeTheme:u,processedOptions:d,themeParameters:g,annotationThemes:f,googleFonts:y,optionsGraph:m}=this.slowSetup(s,a,o)),this.activeTheme=u,this.processedOptions=d,this.fastDelta=p??void 0,this.themeParameters=g,this.annotationThemes=f,this.googleFonts=y,this.optionsGraph=m,l!==void 0&&typeof l=="number"&&!Number.isNaN(l)){const b=performance.now();this.optionsProcessingTime=b-l}import_ag_charts_core184.Debug.inDevelopmentMode(()=>(0,import_ag_charts_core184.deepFreeze)(this))}static isFastPathDelta(e){for(const i of Object.keys(e??{}))if(!this.FAST_PATH_OPTIONS.has(i))return H.perfDebug("ChartOptions.isFastPathDelta() - slow path required due to presence of: ",i),!1;return H.perfDebug("ChartOptions.isFastPathDelta() - fast path possible."),!0}findSeriesWithUserVisiblity(e,i){for(const s of[e,i]){const n=s?.series;if(Array.isArray(n))for(let r=0;r<n.length;r++){const a=n[r];"visible"in a&&(this.seriesWithUserVisibility??(this.seriesWithUserVisibility={identifiers:new Set,indices:new Set}),a.id?this.seriesWithUserVisibility.identifiers.add(a.id):this.seriesWithUserVisibility.indices.add(r))}}}fastSetup(e,i){const{activeTheme:s,processedOptions:n}=i,{presetType:r}=this.optionMetadata;if(r!=null&&e?.data!=null){const o=import_ag_charts_core184.ModuleRegistry.getPresetModule(r);if(o?.processData){const{series:l,data:c}=o.processData(e.data);e=(0,import_ag_charts_core184.mergeDefaults)({series:l,data:c},e)}}this.fastSeriesSetup(e,n);const a=(0,import_ag_charts_core184.mergeDefaults)(e,n);return H.debug("ChartOptions.fastSetup() - processed options",a),{activeTheme:s,processedOptions:a,fastDelta:e}}fastSeriesSetup(e,i){e?.series&&(e.series?.every((s,n)=>(0,import_ag_charts_core184.jsonPropertyCompare)(s,i.series?.[n]??{}))?delete e.series:e.series=e.series.map((s,n)=>(0,import_ag_charts_core184.merge)(s,i.series?.[n]??{})))}slowSetup(e,i,s=!1){let n=(0,import_ag_charts_core184.deepClone)(this.userOptions,H.OPTIONS_CLONE_OPTS_FAST);i&&(n=(0,import_ag_charts_core184.mergeDefaults)(i,n),s&&this.removeLeftoverSymbols(n));let r=sanitizeThemeModules(getChartTheme(n.theme));const{presetType:a}=this.optionMetadata;if(a!=null){const y=import_ag_charts_core184.ModuleRegistry.getPresetModule(a);if(y){const{validate:m=import_ag_charts_core184.validate}=y,b=n,v=n.type,x=v==null?void 0:r.presets[v],{cleared:S,invalid:I}=m(b,y.options,"");for(const D of I)import_ag_charts_core184.Logger.warn(D);(0,import_ag_charts_core184.hasRequiredInPath)(I,"")?n={}:(H.debug(">>> AgCharts.createOrUpdate() - applying preset",S),n=y.create(S,x,()=>this.activeTheme),r=sanitizeThemeModules(getChartTheme(n.theme)))}}this.soloSeriesIntegrity(n),a!=null&&r.templateTheme(n,!1),removeIncompatibleModuleOptions(void 0,n);const o=this.validateSeriesOptions(n),l=detectChartType(n);if(this.chartDef=import_ag_charts_core184.ModuleRegistry.getChartModule(l),!this.chartDef.placeholder){const{validate:y=import_ag_charts_core184.validate}=this.chartDef,{cleared:m,invalid:b}=y(n,this.chartDef.options,"");for(const v of b)import_ag_charts_core184.Logger.warn(v);n=m}this.validateAxesOptions(n),this.removeDisabledOptions(n);let c=this.processFonts(r.params);c=this.processFonts(n,c),this.processSeriesOptions(n);const h=this.processAxesOptions(n,l),u=createOptionsGraph(r,n),d=u.resolve(),p=u.resolveParams(),g=u.resolveAnnotationThemes();u.clearSafe();const f=(0,import_ag_charts_core184.mergeDefaults)(e,d);return removeIncompatibleModuleOptions(this.chartDef.name,f),processModuleOptions(this.chartDef.name,f,o),this.validateSeriesOptions(f),this.validateAxesOptions(f,h),this.validatePluginOptions(f),this.processMiniChartSeriesOptions(f),f.loadGoogleFonts||c.clear(),H.debug(()=>["ChartOptions.slowSetup() - processed options",(0,import_ag_charts_core184.deepClone)(f)]),{activeTheme:r,processedOptions:f,themeParameters:p,annotationThemes:g,googleFonts:c,optionsGraph:u}}validatePluginOptions(e){for(const i of import_ag_charts_core184.ModuleRegistry.listModulesByType(import_ag_charts_core184.ModuleType.Plugin)){const s=i.name;if(s in e&&i.options!=null&&(!i.chartType||i.chartType===this.chartDef?.name)){const{cleared:n,invalid:r}=(0,import_ag_charts_core184.validate)(e[s],i.options,i.name);for(const a of r)import_ag_charts_core184.Logger.warn(a);e[s]=n}}}validateSeriesOptions(e){const i=this.chartDef?.name,s=[],n=e.series?.length??0,r=[];let a;for(let o=0;o<n;o++){const l=`series[${o}]`,c=e.series[o],h=import_ag_charts_core184.ModuleRegistry.getSeriesModule(c.type);if(h==null){const g=import_ag_charts_core184.ModuleRegistry.isEnterprise();a??(a=(0,import_ag_charts_core184.joinFormatted)(Array.from(ExpectedModules.values()).filter(y=>y.type===import_ag_charts_core184.ModuleType.Series&&(g||!y.enterprise)&&(!i||y.chartType===i)).map(y=>y.name),"or",stringFormat));const f=ExpectedModules.get(c.type);if(c.type!=null&&f?.type===import_ag_charts_core184.ModuleType.Series){r.push(f);continue}import_ag_charts_core184.Logger.warn(c.type==null?`Option \`${l}.type\` is required and has not been provided; expecting ${a}, ignoring.`:`Unknown type \`${c.type}\` at \`${l}.type\`; expecting ${a}, ignoring.`);continue}else if(i&&h.chartType!==i){import_ag_charts_core184.Logger.warn(`Series type \`${h.name}\` at \`${l}.type\` is not supported by chart type \`${i}\`, ignoring.`);continue}if(h.options==null){s.push(c);continue}const{validate:u=import_ag_charts_core184.validate}=h,{cleared:d,invalid:p}=u(c,h.options,l);for(const g of p)import_ag_charts_core184.Logger.warn(g);(0,import_ag_charts_core184.hasRequiredInPath)(p,l)||s.push(d)}return e.series=s,r}validateAxesOptions(e,i){if(!("axes"in e)||!e.axes)return;const s=this.chartDef?.name,n={};let r;for(const[a,o]of(0,import_ag_charts_core184.entries)(e.axes)){if(!o)continue;if(o.type==null){n[a]=o;continue}const l=`axes.${i?.get(a)??a}`,c=import_ag_charts_core184.ModuleRegistry.getAxisModule(o.type);if(c==null){const p=import_ag_charts_core184.ModuleRegistry.isEnterprise();r??(r=(0,import_ag_charts_core184.joinFormatted)(Array.from(ExpectedModules.values()).filter(f=>f.type===import_ag_charts_core184.ModuleType.Axis&&(p||!f.enterprise)&&f.chartType===s).map(f=>f.name),"or",stringFormat)),ExpectedModules.get(o.type)?.type!==import_ag_charts_core184.ModuleType.Axis&&import_ag_charts_core184.Logger.warn(`Unknown type \`${o.type}\` at \`${l}.type\`; expecting one of ${r}, ignoring.`);continue}else if(c.chartType!==s){import_ag_charts_core184.Logger.warn(`Axis type \`${c.name}\` at \`${l}.type\` is not supported by chart type \`${s}\`, ignoring.`);break}const{validate:h=import_ag_charts_core184.validate}=c,{cleared:u,invalid:d}=h(o,c.options,l);for(const p of d)import_ag_charts_core184.Logger.warn(p);(0,import_ag_charts_core184.hasRequiredInPath)(d,l)||(n[a]=u)}e.axes=n}diffOptions(e){return this===e?{}:e==null?this.processedOptions:this.fastDelta??(0,import_ag_charts_core184.jsonDiff)(e.processedOptions,this.processedOptions,H.JSON_DIFF_OPTS)}optionsType(e){return e.series?.[0]?.type??"line"}processSeriesOptions(e){const i=e.displayNullData,s=e.series?.map(n=>{const a=!!import_ag_charts_core184.ModuleRegistry.getSeriesModule(n.type)?.options?.visible,o={};return a&&(o.visible=!0),i!==void 0&&n.allowNullKeys===void 0&&(o.allowNullKeys=i),(0,import_ag_charts_core184.mergeDefaults)(this.getSeriesGroupingOptions(n),n,o)});e.series=this.setSeriesGroupingOptions(s??[])}processAxesOptions(e,i){const s=i==="polar"?[import_ag_charts_core184.ChartAxisDirection.Angle,import_ag_charts_core184.ChartAxisDirection.Radius]:[import_ag_charts_core184.ChartAxisDirection.X,import_ag_charts_core184.ChartAxisDirection.Y],n="axes"in e&&Object.keys(e.axes??{}).length>0,r=this.countNonDefaultSeriesAxisKeys(e,s),a=r>0,o=a&&r<(e?.series?.length??0),l=e.series?.[0],c=this.optionsType(e),h=this.predictAxes(c,s,l,e.data)??this.cloneDefaultAxes(c),u=(0,import_ag_charts_core184.isObject)(l)&&"direction"in l&&l.direction==="horizontal"&&import_ag_charts_core184.ModuleRegistry.getSeriesModule(l.type)?.axisKeysFlipped!=null;if(!n&&!a&&!u){e.axes=h;return}const d="axes"in e?new Set(Object.keys(e.axes??{})):new Set,p=this.getPrimaryAxisKeys(e,s,d,a),g=this.getRemappedAxisKeys(d,p,s,o),f={},y=new Map;for(const[m,b]of g)f[b]="axes"in e?(0,import_ag_charts_core184.shallowClone)(e.axes?.[m]):void 0,y.set(b,m);return this.remapSeriesAxisKeys(e,s,f,g,h,o),this.predictAxesMissingTypesAndPositions(e,s,f,h),this.alternateSecondaryAxisPositions(e,f,y),e.axes=f,y}getSeriesDirectionAxisKey(e,i){const s=import_ag_charts_core184.ModuleRegistry.getSeriesModule(e.type);return s?"direction"in e&&e.direction==="horizontal"&&s.axisKeysFlipped?s.axisKeysFlipped[i]:s.axisKeys?.[i]:void 0}countNonDefaultSeriesAxisKeys(e,i){let s=0;for(const n of e.series??[])for(const r of i){const a=this.getSeriesDirectionAxisKey(n,r);!a||!(0,import_ag_charts_core184.isKeyOf)(a,n)||n[a]!==r&&s++}return s}getPrimaryAxisKeys(e,i,s,n){const r=new Map;for(const a of i){let o=!1;if("axes"in e&&e.axes&&!(a in e.axes&&(0,import_ag_charts_core184.isObject)(e.axes[a])&&!("position"in e.axes[a]))){for(const[l,c]of(0,import_ag_charts_core184.entries)(e.axes))if("position"in c&&c.position&&a===POSITION_DIRECTIONS[c.position]){r.set(a,l),o=!0;break}}if(!o&&n)for(const l of e.series??[]){const c=this.getSeriesDirectionAxisKey(l,a);if(!c)continue;const h=l[c];if(!s.has(h)){if(!h){r.set(a,a);break}r.set(a,h);break}}}if(s.size===0||!("axes"in e)||!e.axes)return r;if(r.size===0)for(const a of i)a in e.axes&&r.set(a,a);if(r.size===0){for(const a of i)for(const[o,l]of(0,import_ag_charts_core184.entries)(e.axes))if(l.type?.startsWith(a)){r.set(a,o);break}}if(r.size===0&&(e.series?.length??0)>0)for(const a of i)for(const o of e.series){const l=this.getSeriesDirectionAxisKey(o,a);if(!l)continue;const c=o[l];if(s.has(c)){r.set(a,c);break}}if(r.size<2){const a=new Set(r.values());for(const[o,l]of(0,import_ag_charts_core184.entries)(e.axes))if(!(a.has(o)||"position"in l)){for(const c of i)if(!r.has(c)){r.set(c,o),a.add(o);break}if(r.size===2)break}}return r}getRemappedAxisKeys(e,i,s,n){const r=new Map;for(const[a,o]of i)r.set(o,a);for(const a of e)r.has(a)||r.set(a,`${AXIS_ID_PREFIX}${r.size}`);if(n)for(const a of s)r.has(a)||r.set(a,`${AXIS_ID_PREFIX}${r.size}`);return r}remapSeriesAxisKeys(e,i,s,n,r,a){for(const o of e.series??[])for(const l of i){const c=this.getSeriesDirectionAxisKey(o,l);if(!c)continue;s[l]??(s[l]=(0,import_ag_charts_core184.shallowClone)(r[l]));let h=l;if(c in o){const u=o[c];n.has(u)?h=n.get(u):(h=`${AXIS_ID_PREFIX}${n.size}`,n.set(u,h),s[h]=(0,import_ag_charts_core184.shallowClone)(r[l]))}else n.has(l)&&a&&(h=n.get(l),s[h]??(s[h]=(0,import_ag_charts_core184.shallowClone)(r[l])));o[c]=h}}predictAxes(e,i,s,n){if(!s)return;const r=s?.data??n;if(!r?.length)return;const a=import_ag_charts_core184.ModuleRegistry.getSeriesModule(e)?.predictAxis;if(!a)return;const o=new Map,l=(0,import_ag_charts_core184.distribute)(0,r.length-1,5);for(const c of l){const h=r[c];for(const u of i){const d=a(u,h,s);if(!o.has(u)){o.set(u,d);continue}const p=o.get(u);if(!(!d&&!p)){if(!d||!p)return;for(const g of Object.keys(p))if(p[g]!==d[g])return}}}for(const[c,h]of o)h||o.delete(c);if(o.size!==0){if(o.size===1){const[c]=o.values(),h=this.cloneDefaultAxes(e);return"position"in c?(0,import_ag_charts_core184.mapValues)(h,u=>"position"in u&&u.position===c.position?c:u):void 0}return Object.fromEntries(o)}}cloneDefaultAxes(e){const i=import_ag_charts_core184.ModuleRegistry.getSeriesModule(e);return i?.defaultAxes?(0,import_ag_charts_core184.deepClone)(i.defaultAxes):{}}predictAxesMissingTypesAndPositions(e,i,s,n){for(const[r,a]of(0,import_ag_charts_core184.entries)(s)){if(!(0,import_ag_charts_core184.isPlainObject)(a)||"type"in a&&"position"in a)continue;if(r in n){a.type??(a.type=n[r].type),a.position??(a.position=n[r].position);continue}this.predictAxisMissingTypeFromPosition(a,n)||(this.predictAxisMissingTypeAndPositionFromSeries(e,i,r,a,n),"type"in a||delete s[r])}}predictAxisMissingTypeFromPosition(e,i){if(!("position"in e)||!(0,import_ag_charts_core184.isKeyOf)(e.position,POSITION_DIRECTIONS))return!1;for(const s of Object.values(i))if((0,import_ag_charts_core184.isKeyOf)(s.position,POSITION_DIRECTIONS)&&POSITION_DIRECTIONS[e.position]===POSITION_DIRECTIONS[s.position])return e.type=s.type,!0;for(const[s,n]of(0,import_ag_charts_core184.entries)(POSITION_DIRECTIONS))if(e.position!==s&&n===POSITION_DIRECTIONS[e.position])return e.type=i[n].type,!0;return!1}predictAxisMissingTypeAndPositionFromSeries(e,i,s,n,r){for(const a of e.series??[])for(const o of i){const l=this.getSeriesDirectionAxisKey(a,o);if(!(!l||!(0,import_ag_charts_core184.isKeyOf)(l,a))&&a[l]===s)return n.type??(n.type=r[o].type),n.position??(n.position=r[o].position),o===import_ag_charts_core184.ChartAxisDirection.Y}return!1}alternateSecondaryAxisPositions(e,i,s){let n=0,r=0;for(const[a,o]of(0,import_ag_charts_core184.entries)(i)){if(!(0,import_ag_charts_core184.isPlainObject)(o)||!("position"in o))continue;const l=s.get(a),c="axes"in e&&e.axes&&l&&l in e.axes?e.axes[l]:void 0,h=c&&"position"in c?c.position:void 0;if(o.position==="top"||o.position==="bottom"?(n+=1,n===2&&h==null&&(o.position="top")):(o.position==="left"||o.position==="right")&&(r+=1,r===2&&h==null&&(o.position="right")),n>1&&r>1)break}}processMiniChartSeriesOptions(e){const i=e.navigator?.miniChart?.series;i!=null&&(e.navigator.miniChart.series=this.setSeriesGroupingOptions(i))}getSeriesGroupingOptions(e){const{groupable:i,stackable:s,stackedByDefault:n=!1}=import_ag_charts_core184.ModuleRegistry.getSeriesModule(e.type);e.grouped&&!i&&import_ag_charts_core184.Logger.warnOnce(`unsupported grouping of series type "${e.type}".`),(e.stacked||e.stackGroup)&&!s&&import_ag_charts_core184.Logger.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:r,stacked:a}=e;return a??(a=(n||e.stackGroup!=null)&&!(i&&r)),r??(r=!0),{stacked:s&&a,grouped:i&&r&&!(s&&a)}}setSeriesGroupingOptions(e){const i=this.getSeriesGrouping(e);H.debug("ChartOptions.setSeriesGroupingOptions() - series grouping: ",i);const s={},n=i.reduce((r,a)=>{var o;return a.groupType==="default"||(r[o=a.seriesType]??(r[o]=0),r[a.seriesType]+=a.groupType==="stack"?1:a.series.length),r},{});return i.flatMap(r=>{var a;switch(s[a=r.seriesType]??(s[a]=0),r.groupType){case"stack":{const o=s[r.seriesType]++;return r.series.map((l,c)=>Object.assign(l,{seriesGrouping:{groupId:r.groupId,groupIndex:o,groupCount:n[r.seriesType],stackIndex:c,stackCount:r.series.length}}))}case"group":return r.series.map(o=>Object.assign(o,{seriesGrouping:{groupId:r.groupId,groupIndex:s[r.seriesType]++,groupCount:n[r.seriesType],stackIndex:0,stackCount:0}}))}return r.series}).map(({stacked:r,grouped:a,...o})=>o)}getSeriesGroupId(e){return[e.type,e.xKey,e.stacked?e.stackGroup??"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){const i=new Map;return e.reduce((s,n)=>{const r=n.type;if(!n.stacked&&!n.grouped)s.push({groupType:"default",seriesType:r,series:[n],groupId:"__default__"});else{const a=this.getSeriesGroupId(n);if(!i.has(a)){const l={groupType:n.stacked?"stack":"group",seriesType:r,series:[],groupId:a};i.set(a,l),s.push(l)}i.get(a).series.push(n)}return s},[])}soloSeriesIntegrity(e){if(!(0,import_ag_charts_core184.isArray)(e.series))return;const i=n=>import_ag_charts_core184.ModuleRegistry.getSeriesModule(n)?.solo??!1,s=e.series;if(s&&s.length>1&&s.some(n=>i(n.type))){const n=this.optionsType(e);if(i(n))import_ag_charts_core184.Logger.warn(`series[0] of type '${n}' is incompatible with other series types. Only processing series[0]`),e.series=s.slice(0,1);else{const{solo:r,nonSolo:a}=(0,import_ag_charts_core184.groupBy)(s,l=>i(l.type)?"solo":"nonSolo"),o=(0,import_ag_charts_core184.unique)(r.map(l=>l.type)).join(", ");import_ag_charts_core184.Logger.warn(`Unable to mix these series types with the lead series type: ${o}`),e.series=a}}}static processFontOptions(e,i,s,n=new Set){if(typeof e=="object"&&"fontFamily"in e)if(Array.isArray(e.fontFamily)){const r=[];for(const a of e.fontFamily)typeof a=="object"&&"googleFont"in a?(r.push(a.googleFont),n?.add(a.googleFont)):r.push(a);e.fontFamily=r.join(", ")}else typeof e.fontFamily=="object"&&"googleFont"in e.fontFamily&&(e.fontFamily=e.fontFamily.googleFont,n?.add(e.fontFamily));return n}processFonts(e,i=new Set){return(0,import_ag_charts_core184.jsonWalk)(e,H.processFontOptions,new Set(["data","theme"]),void 0,void 0,i)}static removeDisabledOptionJson(e){if("enabled"in e&&e.enabled===!1)for(const i of Object.keys(e))i!=="enabled"&&delete e[i]}removeDisabledOptions(e){(0,import_ag_charts_core184.jsonWalk)(e,H.removeDisabledOptionJson,new Set(["data","theme","contextMenu"]))}static removeLeftoverSymbolsJson(e){if(!(!e||!(0,import_ag_charts_core184.isObject)(e)))for(const i of Object.keys(e)){const s=e[i];(0,import_ag_charts_core184.isSymbol)(s)&&delete e[i]}}removeLeftoverSymbols(e){(0,import_ag_charts_core184.jsonWalk)(e,H.removeLeftoverSymbolsJson,new Set(["data"]))}specialOverridesDefaults(e){if(e.window==null?e.window=(0,import_ag_charts_core184.getWindow)():(0,import_ag_charts_core184.setWindow)(e.window),e.document==null?e.document=(0,import_ag_charts_core184.getDocument)():(0,import_ag_charts_core184.setDocument)(e.document),e.window==null)throw new Error("AG Charts - unable to resolve global window");if(e.document==null)throw new Error("AG Charts - unable to resolve global document");return e}};_ChartOptions.OPTIONS_CLONE_OPTS_SLOW={shallow:new Set(["data","container"]),assign:new Set(["context","theme"])},_ChartOptions.OPTIONS_CLONE_OPTS_FAST={shallow:new Set(["container"]),assign:new Set(["data","context","theme"])},_ChartOptions.JSON_DIFF_OPTS=new Set(["data","localeText"]),_ChartOptions.perfDebug=import_ag_charts_core184.Debug.create(!0,"perf"),_ChartOptions.FAST_PATH_OPTIONS=new Set(["data","width","height","container"]),_ChartOptions.debug=import_ag_charts_core184.Debug.create(!0,"opts");var ChartOptions=_ChartOptions,debug3=import_ag_charts_core185.Debug.create(!0,"opts"),DESTROYED_ERROR="AG Charts - Chart was destroyed, cannot perform request.",_AgChartInstanceProxy=class{constructor(e,i,s){this.factoryApi=i,this.licenseManager=s,this.chart=e}async update(e){if(!this.chart)throw new Error(DESTROYED_ERROR);return debug3.group("AgChartInstance.update()",async()=>{const i=import_ag_charts_core185.Debug.check("scene:stats","scene:stats:verbose")?performance.now():void 0;this.factoryApi.update(e,this,void 0,i),await this.chart?.waitForUpdate()})}async updateDelta(e){if(!this.chart)throw new Error(DESTROYED_ERROR);return debug3.group("AgChartInstance.updateDelta()",async()=>{const i=import_ag_charts_core185.Debug.check("scene:stats","scene:stats:verbose")?performance.now():void 0;this.factoryApi.updateUserDelta(this,e,i),await this.chart?.waitForUpdate()})}getOptions(){if(!this.chart)throw new Error(DESTROYED_ERROR);const e=(0,import_ag_charts_core185.deepClone)(this.chart.getOptions(),ChartOptions.OPTIONS_CLONE_OPTS_FAST);for(const i of Object.keys(e))i.startsWith("_")&&delete e[i];return e}waitForUpdate(){if(!this.chart)throw new Error(DESTROYED_ERROR);return this.chart.waitForUpdate()}applyTransaction(e){const{chart:i}=this;if(!i)throw new Error(DESTROYED_ERROR);if(e==null||typeof e!="object")throw new Error("AG Charts - applyTransaction expects a transaction object.");const{add:s,addIndex:n,remove:r,update:a}=e;if(s!=null&&!Array.isArray(s))throw new Error('AG Charts - transaction "add" must be an array.');if(n!=null){if(typeof n!="number"||!Number.isSafeInteger(n)||n<0)throw new Error('AG Charts - transaction "addIndex" must be a safe non-negative integer (0 to 9007199254740991).');if(s==null||s.length===0)throw new Error('AG Charts - transaction "addIndex" requires a non-empty "add" array.')}if(r!=null&&!Array.isArray(r))throw new Error('AG Charts - transaction "remove" must be an array.');if(a!=null&&!Array.isArray(a))throw new Error('AG Charts - transaction "update" must be an array.');return debug3.group("AgChartInstance.applyTransaction()",async()=>{if(!i.isDataTransactionSupported()){const o=i.data.deepClone();return o.addTransaction(e),o.commitPendingTransactions(),this.updateDelta({data:o.data})}return debug3("transaction",e),await this.chart?.applyTransaction(e)})}async download(e){if(!this.chart)throw new Error(DESTROYED_ERROR);const i=await this.prepareResizedChart(this,this.chart,e);try{i.chart?.download(e?.fileName,e?.fileFormat)}finally{i.destroy()}}async __toSVG(e){if(!this.chart)throw new Error(DESTROYED_ERROR);const i=await this.prepareResizedChart(this,this.chart,{width:600,height:300,...e});try{return i?.chart?.toSVG()}finally{i?.destroy()}}async getImageDataURL(e){if(!this.chart)throw new Error(DESTROYED_ERROR);const i=await this.prepareResizedChart(this,this.chart,e);try{return i.chart.getCanvasDataURL(e?.fileFormat)}finally{i.destroy()}}getState(){return this.factoryApi.caretaker.save(...this.getEnabledOriginators())}async setState(e){const{chart:i}=this;if(!i)return;const s=this.getEnabledOriginators();if(!s.includes(i.ctx.legendManager)){await this.setStateOriginators(e,s);return}await this.setStateOriginators(e,s.filter(n=>n!==i.ctx.zoomManager)),await this.setStateOriginators(e,[i.ctx.zoomManager])}resetAnimations(){this.chart?.resetAnimations()}skipAnimations(){this.chart?.skipAnimations()}destroy(){this.releaseChart?(this.releaseChart(),this.releaseChart=void 0):this.chart&&(this.chart.publicApi=void 0,this.chart.destroy()),this.chart=void 0}async prepareResizedChart(e,i,s={}){const n=s.width??i.width??i.ctx.scene.canvas.width,r=s.height??i.height??i.ctx.scene.canvas.height,a=e.getState(),o={...i.chartOptions.processedOverrides,container:(0,import_ag_charts_core185.getDocument)().createElement("div"),width:n,height:r};s.width!=null&&s.height!=null&&(o.overrideDevicePixelRatio=1);const l=i.getOptions();if(import_ag_charts_core185.ModuleRegistry.isEnterprise()){o.animation={enabled:!1};const f=this.licenseManager?.getWatermarkForegroundConfigForBrowser();f&&(o.foreground=f)}const c={...i.chartOptions.specialOverrides},h={...i.chartOptions.optionMetadata},u=await this.chart?.ctx.dataService.getData(),d=this.factoryApi.create(l,o,c,h,u);a.legend&&this.syncLegend(i,d,a),d.chart?.update(import_ag_charts_core185.ChartUpdateType.FULL,{forceNodeDataRefresh:!0}),await d.waitForUpdate(),await d.setState(a);const p={source:"chart-update",sourceDetail:"internal-prepareResizedChart"};d.chart?.ctx.zoomManager.updateZoom(p,i.ctx.zoomManager.getZoom()),d.chart?.update(import_ag_charts_core185.ChartUpdateType.FULL,{forceNodeDataRefresh:!0}),await d.waitForUpdate();const g=[];for(const f of i.modulesManager.legends())g.push(f.legend.pagination?.currentPage??0);for(const f of d.chart.modulesManager.legends()){const y=g.shift()??0;f.legend.pagination&&f.legend.pagination.setPage(y)}return d.chart?.update(import_ag_charts_core185.ChartUpdateType.FULL,{forceNodeDataRefresh:!0}),await d.waitForUpdate(),d}syncLegend(e,i,s){const n=new Map;for(const[r,a]of e.series.entries()){const o=i.chart?.series[r];o&&n.set(a.id,o.id)}s.legend=s.legend?.map(r=>({...r,seriesId:n.get(r.seriesId??"")??r.seriesId}))}getEnabledOriginators(){if(!this.chart)return[];const{chartOptions:{processedOptions:e,optionMetadata:i},ctx:{annotationManager:s,chartTypeOriginator:n,zoomManager:r,legendManager:a},modulesManager:o}=this.chart,l=[];return"annotations"in e&&e.annotations?.enabled&&l.push(s),i.presetType==="price-volume"&&l.push(n),(e.navigator?.enabled||e.zoom?.enabled)&&l.push(r),o.isEnabled("legend")&&e.legend?.enabled!==!1&&l.push(a),l.push(this.chart.ctx.activeManager),l}async setStateOriginators(e,i){this.factoryApi.caretaker.restore(e,...i),this.chart?.ctx.updateService.update(import_ag_charts_core185.ChartUpdateType.PROCESS_DATA,{forceNodeDataRefresh:!0}),await this.chart?.waitForUpdate()}};_AgChartInstanceProxy.chartInstances=new WeakMap,__decorateClass([(0,import_ag_charts_core185.ActionOnSet)({oldValue(t){t.destroyed||(t.publicApi=void 0),_AgChartInstanceProxy.chartInstances.delete(t)},newValue(t){t&&(t.publicApi=this,_AgChartInstanceProxy.chartInstances.set(t,this))}})],_AgChartInstanceProxy.prototype,"chart",2);var AgChartInstanceProxy=_AgChartInstanceProxy,import_ag_charts_core186=require("ag-charts-core"),CLEANUP_TIMEOUT_MS=1e3,_Pool=class te{constructor(e,i,s,n,r,a=CLEANUP_TIMEOUT_MS){this.name=e,this.buildItem=i,this.releaseItem=s,this.destroyItem=n,this.maxPoolSize=r,this.cleanupTimeMs=a,this.freePool=[],this.busyPool=new Set}static getPool(e,i,s,n,r){return this.pools.has(e)||this.pools.set(e,new te(e,i,s,n,r)),this.pools.get(e)}isFull(){return this.freePool.length+this.busyPool.size>=this.maxPoolSize}hasFree(){return this.freePool.length>0}obtain(e){if(!this.hasFree()&&this.isFull())throw new Error("AG Charts - pool exhausted");let i=this.freePool.pop();return i==null?(i=this.buildItem(e),te.debug(()=>[`Pool[name=${this.name}]: Created instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i])):te.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i]),this.busyPool.add(i),{item:i,release:()=>this.release(i)}}obtainFree(){const e=this.freePool.pop();if(e==null)throw new Error("AG Charts - pool has no free instances");return te.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,e]),this.busyPool.add(e),{item:e,release:()=>this.release(e)}}release(e){if(!this.busyPool.has(e))throw new Error("AG Charts - cannot free item from pool which is not tracked as busy.");te.debug(()=>[`Pool[name=${this.name}]: Releasing instance (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,e]),this.releaseItem(e),this.busyPool.delete(e),this.freePool.push(e),te.debug(()=>[`Pool[name=${this.name}]: Returned instance to free pool (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,e]);const i=Date.now(),s=i+this.cleanupTimeMs*.5;this.cleanPoolTimer&&(this.cleanPoolDue??1/0)<s&&(clearTimeout(this.cleanPoolTimer),this.cleanPoolTimer=void 0),this.cleanPoolTimer||(this.cleanPoolDue=i+this.cleanupTimeMs,this.cleanPoolTimer=setTimeout(this.cleanPool.bind(this),this.cleanupTimeMs))}cleanPool(){const e=this.freePool.splice(0);for(const i of e)this.destroyItem(i);te.debug(()=>[`Pool[name=${this.name}]: Cleaned pool of ${e.length} items (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`])}destroy(){this.cleanPool();for(const e of this.busyPool.values())this.destroyItem(e);this.busyPool.clear()}};_Pool.pools=new Map,_Pool.debug=import_ag_charts_core186.Debug.create(!0,"pool");var Pool=_Pool,debug4=import_ag_charts_core187.Debug.create(!0,"opts"),AgCharts=class{static licenseCheck(t){this.licenseChecked||(this.licenseManager=import_ag_charts_core187.enterpriseRegistry.licenseManager?.(t),this.licenseManager?.validateLicense(),this.licenseChecked=!0)}static getLicenseDetails(t){return import_ag_charts_core187.enterpriseRegistry.licenseManager?.({}).getLicenseDetails(t)}static getInstance(t){return AgChartsInternal.getInstance(t)}static create(t,e){const i=import_ag_charts_core187.Debug.check("scene:stats","scene:stats:verbose")?performance.now():void 0;return debug4.group("AgCharts.create()",()=>{t=import_ag_charts_core187.Debug.inDevelopmentMode(()=>(0,import_ag_charts_core187.deepFreeze)((0,import_ag_charts_core187.deepClone)(t)))??t,this.licenseCheck(t);const s=AgChartsInternal.createOrUpdate({userOptions:t,licenseManager:this.licenseManager,optionsMetadata:e,apiStartTime:i});return this.licenseManager?.isDisplayWatermark()&&import_ag_charts_core187.enterpriseRegistry.injectWatermark?.(s.chart.ctx.domManager,this.licenseManager.getWatermarkMessage()),s})}static createFinancialChart(t){return debug4.group("AgCharts.createFinancialChart()",()=>this.create(t,{presetType:"price-volume"}))}static createGauge(t){return debug4.group("AgCharts.createGauge()",()=>this.create(t,{presetType:"gauge-preset"}))}static __createSparkline(t){return debug4.group("AgCharts.__createSparkline()",()=>{const{pool:e,...i}=t;return this.create(i,{presetType:"sparkline",pool:e??!0,domMode:"minimal",withDragInterpretation:!1})})}};AgCharts.licenseChecked=!1;var _AgChartsInternal=class ue{static getInstance(e){const i=Chart.getInstance(e);return i?AgChartInstanceProxy.chartInstances.get(i):void 0}static createOrUpdate(e){let{proxy:i}=e;const{userOptions:s,licenseManager:n,processedOverrides:r=i?.chart?.chartOptions.processedOverrides??{},specialOverrides:a=i?.chart?.chartOptions.specialOverrides??{},optionsMetadata:o=i?.chart?.chartOptions.optionMetadata??{},deltaOptions:l,data:c,stripSymbols:h=!1,apiStartTime:u}=e,d=import_ag_charts_core187.enterpriseRegistry.styles==null?[]:[["ag-charts-enterprise",import_ag_charts_core187.enterpriseRegistry.styles]];if(import_ag_charts_core187.ModuleRegistry.listModules().next().done)throw new Error(["AG Charts - No modules have been registered.","","Call ModuleRegistry.registerModules(...) with the modules you need before using AgCharts.create().","","See https://www.ag-grid.com/charts/r/module-registry/ for more details."].join(`
|
|
`));debug4(()=>[">>> AgCharts.createOrUpdate() user options",(0,import_ag_charts_core187.deepClone)(s)]);const{presetType:p}=o;let g=s;AgCharts.optionsMutationFn&&g&&(g=AgCharts.optionsMutationFn((0,import_ag_charts_core187.deepClone)(g,ChartOptions.OPTIONS_CLONE_OPTS_FAST),p),debug4(()=>[">>> AgCharts.createOrUpdate() MUTATED user options",(0,import_ag_charts_core187.deepClone)(g)]));const f=this.getPool(o);let y=!1,m,b=i?.chart;b==null&&f?.hasFree()&&(m=f.obtainFree(),b=m.item);const{document:v,window:x,styleContainer:S,skipCss:I,...D}=g??{},T=b?.getChartOptions(),A=new ChartOptions(T,D,r,{...a,document:v,window:x,styleContainer:S,skipCss:I},o,l,h,u);(b==null||detectChartType(A.processedOptions)!==detectChartType(b.chartOptions.processedOptions))&&(m?.release(),m=this.getPool(A.optionMetadata)?.obtain(A),m?b=m.item:(y=!0,b=ue.createChartInstance(A,b))),A.optionsGraph&&b.ctx.optionsGraphService.updateCallback((L,N,k)=>A.optionsGraph?.resolvePartial(L,N,k));for(const[L,N]of d)b.ctx.domManager.addStyles(L,N);return b.ctx.fontManager.updateFonts(A.googleFonts),c!=null&&b.ctx.dataService.restoreData(c),i==null?(i=new AgChartInstanceProxy(b,ue.callbackApi,n),i.releaseChart=m?.release):(m||y)&&(i.releaseChart?.(),i.chart=b,i.releaseChart=m?.release),debug4.check()&&typeof globalThis.window<"u"&&(globalThis.agChartInstances??(globalThis.agChartInstances={}),globalThis.agChartInstances[b.id]=b),b.queuedUserOptions.push(A.userOptions),b.queuedChartOptions.push(A),b.requestFactoryUpdate(L=>{debug4.group(">>>> Chart.applyOptions()",()=>{L.applyOptions(A);const N=L.queuedUserOptions.indexOf(A.userOptions)+1;L.queuedUserOptions.splice(0,N),L.queuedChartOptions.splice(0,N)})}),i}static updateUserDelta(e,i,s){i=(0,import_ag_charts_core187.deepClone)(i,ChartOptions.OPTIONS_CLONE_OPTS_FAST);const n=(0,import_ag_charts_core187.jsonWalk)(i,ue.markRemovedProperties,new Set(["data"]),void 0,void 0,!1);debug4(()=>[">>> AgCharts.updateUserDelta() user delta",(0,import_ag_charts_core187.deepClone)(i)]),ue.createOrUpdate({proxy:e,deltaOptions:i,stripSymbols:n,apiStartTime:s})}static createChartInstance(e,i){const s=i?.destroy({keepTransferableResources:!0}),n=detectChartType(e.processedOptions);return import_ag_charts_core187.ModuleRegistry.getChartModule(n).create(e,s)}static getPool(e){if(e.pool===!0)return Pool.getPool(e.presetType??"default",this.createChartInstance,this.detachAndClear,this.destroy,1/0)}};_AgChartsInternal.caretaker=new import_ag_charts_core187.MementoCaretaker(VERSION),_AgChartsInternal.callbackApi={caretaker:_AgChartsInternal.caretaker,create(t,e,i,s,n){return _AgChartsInternal.createOrUpdate({userOptions:t,processedOverrides:e,specialOverrides:i,optionsMetadata:s,data:n})},update(t,e,i,s){return _AgChartsInternal.createOrUpdate({userOptions:t,proxy:e,specialOverrides:i,apiStartTime:s})},updateUserDelta(t,e,i){return _AgChartsInternal.updateUserDelta(t,e,i)}},_AgChartsInternal.markRemovedProperties=(t,e,i,s)=>{let n=s??!1;if(typeof t!="object"||t==null)return n;for(const r of(0,import_ag_charts_core187.strictObjectKeys)(t))t[r]===void 0&&(Object.assign(t,{[r]:Symbol("UNSET")}),n||(n=!0));return n},_AgChartsInternal.detachAndClear=t=>t.detachAndClear(),_AgChartsInternal.destroy=t=>t.destroy();var AgChartsInternal=_AgChartsInternal,import_ag_charts_core286=require("ag-charts-core"),module_support_exports={};__export(module_support_exports,{APPROXIMATE_THRESHOLD:()=>APPROXIMATE_THRESHOLD,AbstractBarSeries:()=>AbstractBarSeries,AbstractBarSeriesProperties:()=>AbstractBarSeriesProperties,AggregationManager:()=>AggregationManager,AnchoredPopover:()=>AnchoredPopover,ApproximateOrdinalTimeScale:()=>ApproximateOrdinalTimeScale,Arc:()=>Arc,Axis:()=>Axis,AxisGroupZIndexMap:()=>AxisGroupZIndexMap,AxisInterval:()=>AxisInterval,AxisLabel:()=>AxisLabel,AxisTick:()=>AxisTick,BBox:()=>BBox,Background:()=>Background,BandScale:()=>BandScale,BaseToolbar:()=>BaseToolbar,Caption:()=>Caption,CartesianAxis:()=>CartesianAxis,CartesianCrossLine:()=>CartesianCrossLine,CartesianSeries:()=>CartesianSeries,CartesianSeriesNodeEvent:()=>CartesianSeriesNodeEvent,CartesianSeriesProperties:()=>CartesianSeriesProperties,CategoryAxis:()=>CategoryAxis,CategoryScale:()=>CategoryScale,Chart:()=>Chart,ChartAxes:()=>ChartAxes,ChartOptions:()=>ChartOptions,CollapseMode:()=>CollapseMode,ColorScale:()=>ColorScale,ContextMenuRegistry:()=>ContextMenuRegistry,ContinuousScale:()=>ContinuousScale,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>DEFAULT_CARTESIAN_DIRECTION_KEYS,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>DEFAULT_CARTESIAN_DIRECTION_NAMES,DEFAULT_POLAR_DIRECTION_KEYS:()=>DEFAULT_POLAR_DIRECTION_KEYS,DEFAULT_POLAR_DIRECTION_NAMES:()=>DEFAULT_POLAR_DIRECTION_NAMES,DOMManager:()=>DOMManager,DataController:()=>DataController,DataModel:()=>DataModel,DataModelSeries:()=>DataModelSeries,DataSet:()=>DataSet,DiscreteTimeAxis:()=>DiscreteTimeAxis,DraggablePopover:()=>DraggablePopover,DropShadow:()=>DropShadow,ExtendedPath2D:()=>ExtendedPath2D,FillGradientDefaults:()=>FillGradientDefaults,FillImageDefaults:()=>FillImageDefaults,FillPatternDefaults:()=>FillPatternDefaults,FloatingToolbar:()=>FloatingToolbar,FormatManager:()=>FormatManager,Group:()=>Group,GroupWidget:()=>GroupWidget,HierarchyHighlightState:()=>HierarchyHighlightState,HierarchyNode:()=>HierarchyNode,HierarchySeries:()=>HierarchySeries,HierarchySeriesProperties:()=>HierarchySeriesProperties,HighlightManager:()=>HighlightManager,HighlightProperties:()=>HighlightProperties,HighlightState:()=>HighlightState,Image:()=>Image2,InteractionManager:()=>InteractionManager,InteractionState:()=>InteractionState,LARGEST_KEY_INTERVAL:()=>LARGEST_KEY_INTERVAL,Label:()=>Label,LabelStyle:()=>LabelStyle,LayoutElement:()=>LayoutElement,Line:()=>Line,LinearScale:()=>LinearScale,LogScale:()=>LogScale,Marker:()=>Marker,Menu:()=>Menu,MercatorScale:()=>MercatorScale,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>NODE_UPDATE_STATE_TO_PHASE_MAPPING,NativeWidget:()=>NativeWidget,NiceMode:()=>NiceMode,Node:()=>Node,OrdinalTimeScale:()=>OrdinalTimeScale,Path:()=>Path,PointerEvents:()=>PointerEvents,PolarAxis:()=>PolarAxis,PolarSeries:()=>PolarSeries,QuadtreeNearest:()=>QuadtreeNearest,RadialColumnShape:()=>RadialColumnShape,Range:()=>Range,Rect:()=>Rect,Rotatable:()=>Rotatable,RotatableText:()=>RotatableText,SMALLEST_KEY_INTERVAL:()=>SMALLEST_KEY_INTERVAL,Scalable:()=>Scalable,ScalableGroup:()=>ScalableGroup,Scene:()=>Scene,Sector:()=>Sector,SectorBox:()=>SectorBox,SegmentedPath:()=>SegmentedPath,Selection:()=>Selection,Series:()=>Series,SeriesItemHighlightStyle:()=>SeriesItemHighlightStyle,SeriesMarker:()=>SeriesMarker,SeriesNodeEvent:()=>SeriesNodeEvent,SeriesNodePickMode:()=>SeriesNodePickMode,SeriesProperties:()=>SeriesProperties,SeriesTooltip:()=>SeriesTooltip,Shape:()=>Shape,SliderWidget:()=>SliderWidget,StopProperties:()=>StopProperties,SvgPath:()=>SvgPath,Text:()=>Text,TimeAxisParentLevel:()=>TimeAxisParentLevel,TimeScale:()=>TimeScale,Toolbar:()=>Toolbar,ToolbarButtonWidget:()=>ToolbarButtonWidget,ToolbarWidget:()=>ToolbarWidget,TooltipManager:()=>TooltipManager,Transformable:()=>Transformable,TransformableGroup:()=>TransformableGroup,TransformableText:()=>TransformableText,Translatable:()=>Translatable,TranslatableGroup:()=>TranslatableGroup,TranslatableSvgPath:()=>TranslatableSvgPath,UnitTimeScale:()=>UnitTimeScale,ZoomManager:()=>ZoomManager,accumulativeValueProperty:()=>accumulativeValueProperty,addHitTestersToQuadtree:()=>addHitTestersToQuadtree,adjustLabelPlacement:()=>adjustLabelPlacement,angleCategoryAxisOptionsDefs:()=>angleCategoryAxisOptionsDefs,angleNumberAxisOptionsDefs:()=>angleNumberAxisOptionsDefs,animationValidation:()=>animationValidation,annotationCalloutStylesDefs:()=>annotationCalloutStylesDefs,annotationChannelTextDefs:()=>annotationChannelTextDefs,annotationCommentStylesDefs:()=>annotationCommentStylesDefs,annotationCrossLineStyleDefs:()=>annotationCrossLineStyleDefs,annotationDisjointChannelStyleDefs:()=>annotationDisjointChannelStyleDefs,annotationFibonacciStylesDefs:()=>annotationFibonacciStylesDefs,annotationLineStyleDefs:()=>annotationLineStyleDefs,annotationLineTextDefs:()=>annotationLineTextDefs,annotationMeasurerStylesDefs:()=>annotationMeasurerStylesDefs,annotationNoteStylesDefs:()=>annotationNoteStylesDefs,annotationOptionsDef:()=>annotationOptionsDef,annotationParallelChannelStyleDefs:()=>annotationParallelChannelStyleDefs,annotationQuickMeasurerStylesDefs:()=>annotationQuickMeasurerStylesDefs,annotationShapeStylesDefs:()=>annotationShapeStylesDefs,annotationTextStylesDef:()=>annotationTextStylesDef,boxPlotSeriesThemeableOptionsDef:()=>boxPlotSeriesThemeableOptionsDef,buildResetPathFn:()=>buildResetPathFn,calculateDataDiff:()=>calculateDataDiff,calculateLabelTranslation:()=>calculateLabelTranslation,calculateSegments:()=>calculateSegments,candlestickSeriesThemeableOptionsDef:()=>candlestickSeriesThemeableOptionsDef,checkCrisp:()=>checkCrisp,chordSeriesThemeableOptionsDef:()=>chordSeriesThemeableOptionsDef,clippedRoundRect:()=>clippedRoundRect,collapsedStartingBarPosition:()=>collapsedStartingBarPosition,computeBarFocusBounds:()=>computeBarFocusBounds,computeMarkerFocusBounds:()=>computeMarkerFocusBounds,coneFunnelSeriesThemeableOptionsDef:()=>coneFunnelSeriesThemeableOptionsDef,createDatumId:()=>createDatumId,diff:()=>diff,drawCorner:()=>drawCorner,drawMarkerUnitPolygon:()=>drawMarkerUnitPolygon,findNodeDatumInArray:()=>findNodeDatumInArray,findQuadtreeMatch:()=>findQuadtreeMatch,fixNumericExtent:()=>fixNumericExtent,fromToMotion:()=>fromToMotion,funnelSeriesThemeableOptionsDef:()=>funnelSeriesThemeableOptionsDef,generateTicks:()=>generateTicks,getColorStops:()=>getColorStops,getCrossLineValue:()=>getCrossLineValue,getItemStyles:()=>getItemStyles,getItemStylesPerItemId:()=>getItemStylesPerItemId,getLabelStyles:()=>getLabelStyles,getMarkerStyles:()=>getMarkerStyles,getMissCount:()=>getMissCount,getRadialColumnWidth:()=>getRadialColumnWidth,getShapeFill:()=>getShapeFill,getShapeStyle:()=>getShapeStyle,groupAccumulativeValueProperty:()=>groupAccumulativeValueProperty,hasDimmedOpacity:()=>hasDimmedOpacity,heatmapSeriesThemeableOptionsDef:()=>heatmapSeriesThemeableOptionsDef,initialStatePickedOptionsDef:()=>initialStatePickedOptionsDef,interpolatePoints:()=>interpolatePoints,isTooltipValueMissing:()=>isTooltipValueMissing,keyProperty:()=>keyProperty,makeSeriesTooltip:()=>makeSeriesTooltip,mapLineBackgroundSeriesThemeableOptionsDef:()=>mapLineBackgroundSeriesThemeableOptionsDef,mapLineSeriesThemeableOptionsDef:()=>mapLineSeriesThemeableOptionsDef,mapMarkerSeriesThemeableOptionsDef:()=>mapMarkerSeriesThemeableOptionsDef,mapShapeBackgroundSeriesThemeableOptionsDef:()=>mapShapeBackgroundSeriesThemeableOptionsDef,mapShapeSeriesThemeableOptionsDef:()=>mapShapeSeriesThemeableOptionsDef,markerEnabled:()=>markerEnabled,markerFadeInAnimation:()=>markerFadeInAnimation,markerSwipeScaleInAnimation:()=>markerSwipeScaleInAnimation,midpointStartingBarPosition:()=>midpointStartingBarPosition,minimumTimeAxisDatumGranularity:()=>minimumTimeAxisDatumGranularity,motion:()=>motion,nightingaleSeriesThemeableOptionsDef:()=>nightingaleSeriesThemeableOptionsDef,normaliseGroupTo:()=>normaliseGroupTo,ohlcSeriesThemeableOptionsDef:()=>ohlcSeriesThemeableOptionsDef,ordinalTimeAxisOptionsDefs:()=>ordinalTimeAxisOptionsDefs,pairUpSpans:()=>pairUpSpans,pathFadeInAnimation:()=>pathFadeInAnimation,pathMotion:()=>pathMotion,pathSwipeInAnimation:()=>pathSwipeInAnimation,plotAreaPathFill:()=>plotAreaPathFill,plotInterpolatedLinePathStroke:()=>plotInterpolatedLinePathStroke,plotLinePathStroke:()=>plotLinePathStroke,predictCartesianFinancialAxis:()=>predictCartesianFinancialAxis,predictCartesianNonPrimitiveAxis:()=>predictCartesianNonPrimitiveAxis,prepareAreaFillAnimationFns:()=>prepareAreaFillAnimationFns,prepareBarAnimationFunctions:()=>prepareBarAnimationFunctions,prepareLinePathPropertyAnimation:()=>prepareLinePathPropertyAnimation,processedDataIsAnimatable:()=>processedDataIsAnimatable,pyramidSeriesThemeableOptionsDef:()=>pyramidSeriesThemeableOptionsDef,radarAreaSeriesThemeableOptionsDef:()=>radarAreaSeriesThemeableOptionsDef,radarLineSeriesThemeableOptionsDef:()=>radarLineSeriesThemeableOptionsDef,radialBarSeriesThemeableOptionsDef:()=>radialBarSeriesThemeableOptionsDef,radialColumnSeriesThemeableOptionsDef:()=>radialColumnSeriesThemeableOptionsDef,radiusCategoryAxisOptionsDefs:()=>radiusCategoryAxisOptionsDefs,radiusNumberAxisOptionsDefs:()=>radiusNumberAxisOptionsDefs,rangeAreaSeriesThemeableOptionsDef:()=>rangeAreaSeriesThemeableOptionsDef,rangeBarSeriesThemeableOptionsDef:()=>rangeBarSeriesThemeableOptionsDef,resetAxisLabelSelectionFn:()=>resetAxisLabelSelectionFn,resetBarSelectionsDirect:()=>resetBarSelectionsDirect,resetBarSelectionsFn:()=>resetBarSelectionsFn,resetLabelFn:()=>resetLabelFn,resetMarkerFn:()=>resetMarkerFn,resetMarkerPositionFn:()=>resetMarkerPositionFn,resetMarkerSelectionsDirect:()=>resetMarkerSelectionsDirect,resetMotion:()=>resetMotion,sankeySeriesThemeableOptionsDef:()=>sankeySeriesThemeableOptionsDef,sectorBox:()=>sectorBox,seriesLabelFadeInAnimation:()=>seriesLabelFadeInAnimation,seriesLabelFadeOutAnimation:()=>seriesLabelFadeOutAnimation,stackCartesianSeries:()=>stackCartesianSeries,standaloneChartOptionsDefs:()=>standaloneChartOptionsDefs,sunburstSeriesThemeableOptionsDef:()=>sunburstSeriesThemeableOptionsDef,toHierarchyHighlightString:()=>toHierarchyHighlightString,toHighlightString:()=>toHighlightString,topologyChartOptionsDefs:()=>topologyChartOptionsDefs,trailingAccumulatedValueProperty:()=>trailingAccumulatedValueProperty,treemapSeriesThemeableOptionsDef:()=>treemapSeriesThemeableOptionsDef,updateClipPath:()=>updateClipPath,updateLabelNode:()=>updateLabelNode,upsertNodeDatum:()=>upsertNodeDatum,userInteraction:()=>userInteraction,validateCrossLineValue:()=>validateCrossLineValue,valueProperty:()=>valueProperty,visibleRangeIndices:()=>visibleRangeIndices,waterfallSeriesThemeableOptionsDef:()=>waterfallSeriesThemeableOptionsDef});var import_ag_charts_core188=require("ag-charts-core");function isAxisReversed(t){return t.isReversed()!==t.range[1]<t.range[0]}function calculateSegments(t,e,i,s,n,r=!0){if(e.scale.domain.length===0||i.scale.domain.length===0)return;const a=t.key===import_ag_charts_core188.ChartAxisDirection.X?e:i,{scale:o,direction:l}=a,c=l===import_ag_charts_core188.ChartAxisDirection.X,h=o.bandwidth??0,u=r?((o.step??0)-h)/2:0,d=Math.max(s.x,n.width-(s.x+s.width)),p=Math.max(s.y,n.height-(s.y+s.height)),g=()=>isAxisReversed(c?e:i)?c?s.width+d:s.height+p:c?-d:-p,f=()=>isAxisReversed(c?e:i)?c?-d:-p:c?s.width+d:s.height+p;return(m=>{const b=[];let v=-1;for(let x=0;x<m.length;x++){const S=m[x];if((0,import_ag_charts_core188.isEmptyObject)(S))continue;const{start:I,stop:D,...T}=m[x],A=m[v]?.stop,L=m.slice(x+1).find(O=>O.start!=null)?.start;let N=o.convert(I??A)-u,k=o.convert(D??L)+2*u;const w=I!=null&&Number.isNaN(N),E=D!=null&&Number.isNaN(k);w||E||(Number.isNaN(N)&&(N=g()),Number.isNaN(k)&&(k=f()),D!=null&&(v=x),b.push({start:N,stop:k,...T}))}return b})(t.segments).map(({stop:m,start:b,...v})=>{const x=c?b:-d,S=c?-p:b,I=c?m+h:s.width+d,D=c?s.height+p:m+h;return{clipRect:{x0:x,y0:S,x1:I,y1:D},...v}})}var TIME_AXIS_KEYS=new Set(["time","timestamp","date","datetime"]);function predictCartesianAxis(t,e,i,{allowPrimitiveTypes:s=!0}={}){if(t!==import_ag_charts_core188.ChartAxisDirection.X&&t!==import_ag_charts_core188.ChartAxisDirection.Y||!(0,import_ag_charts_core188.isObject)(e))return;const n=getSeriesOptionsKey(t,i);if(n==null||!(n in e))return;const r=e[n],a=getAxisPosition(t,i),o=predictGroupedCategoryAxisType(r);if(o)return{type:o,position:a};const l=predictTimeAxisType(n,r);if(l)return{type:l,position:a};if(s)return typeof r=="number"?{type:import_ag_charts_core188.CARTESIAN_AXIS_TYPE.NUMBER,position:a}:{type:import_ag_charts_core188.CARTESIAN_AXIS_TYPE.CATEGORY,position:a}}function predictCartesianNonPrimitiveAxis(t,e,i){return predictCartesianAxis(t,e,i,{allowPrimitiveTypes:!1})}function predictCartesianFinancialAxis(t,e,i){if(t!==import_ag_charts_core188.ChartAxisDirection.X||!(0,import_ag_charts_core188.isObject)(e))return;const s=getSeriesOptionsKey(t,i);if(s==null||!(s in e))return;const n=e[s],r=getAxisPosition(t,i),a=predictOrdinalTimeAxisType(s,n);if(a)return{type:a,position:r};if((0,import_ag_charts_core188.isString)(n))return{type:"category",position:r}}function predictGroupedCategoryAxisType(t){if((0,import_ag_charts_core188.isArray)(t)&&t.every(e=>(0,import_ag_charts_core188.isString)(e)||e===null))return import_ag_charts_core188.CARTESIAN_AXIS_TYPE.GROUPED_CATEGORY}function predictTimeAxisType(t,e){if((0,import_ag_charts_core188.isDate)(e)||TIME_AXIS_KEYS.has(t)&&(0,import_ag_charts_core188.isNumber)(e))return import_ag_charts_core188.CARTESIAN_AXIS_TYPE.TIME}function predictOrdinalTimeAxisType(t,e){if((0,import_ag_charts_core188.isDate)(e)||TIME_AXIS_KEYS.has(t)&&(0,import_ag_charts_core188.isNumber)(e))return import_ag_charts_core188.CARTESIAN_AXIS_TYPE.ORDINAL_TIME}function getSeriesOptionsKey(t,e){if(t===import_ag_charts_core188.ChartAxisDirection.X&&"xKey"in e)return e.xKey;if(t===import_ag_charts_core188.ChartAxisDirection.Y&&"yKey"in e)return e.yKey}function getAxisPosition(t,e){return"direction"in e&&e.direction==="horizontal"?t===import_ag_charts_core188.ChartAxisDirection.X?import_ag_charts_core188.CARTESIAN_POSITION.LEFT:import_ag_charts_core188.CARTESIAN_POSITION.BOTTOM:t===import_ag_charts_core188.ChartAxisDirection.X?import_ag_charts_core188.CARTESIAN_POSITION.BOTTOM:import_ag_charts_core188.CARTESIAN_POSITION.LEFT}var import_ag_charts_core197=require("ag-charts-core"),import_ag_charts_core189=require("ag-charts-core"),logFunctions={2:(t,e)=>Math.log2(e),[Math.E]:(t,e)=>Math.log(e),10:(t,e)=>Math.log10(e)},DEFAULT_LOG=(t,e)=>Math.log(e)/Math.log(t);function log(t,e,i){const s=Math.min(...e),n=logFunctions[t]??DEFAULT_LOG;return s>=0?n(t,i):-n(t,-i)}var powFunctions={[Math.E]:(t,e)=>Math.exp(e),10:(t,e)=>e>=0?10**e:1/10**-e},DEFAULT_POW=(t,e)=>t**e;function pow(t,e,i){const s=Math.min(...e),n=powFunctions[t]??DEFAULT_POW;return s>=0?n(t,i):-n(t,-i)}var LogScale=class Ve extends ContinuousScale{constructor(e=[1,10],i=[0,1]){super(e,i),this.type="log",this.defaultClamp=!0,this.base=10,this.log=s=>log(this.base,this.domain,s),this.pow=s=>pow(this.base,this.domain,s)}static is(e){return e instanceof Ve}transform(e){const[i,s]=(0,import_ag_charts_core189.findMinMax)(this.domain);return i>=0!=s>=0?Number.NaN:i>=0?Math.log(e):-Math.log(-e)}transformInvert(e){const[i,s]=(0,import_ag_charts_core189.findMinMax)(this.domain);return i>=0!=s>=0?Number.NaN:i>=0?Math.exp(e):-Math.exp(-e)}toDomain(e){return e}niceDomain(e,i=this.domain){if(i.length<2)return[];const{base:s}=this,[n,r]=i,a=n>r?Math.ceil:Math.floor,o=n>r?Math.floor:Math.ceil,l=pow(s,i,a(log(s,i,n))),c=pow(s,i,o(log(s,i,r)));return[e.nice[0]?l:i[0],e.nice[1]?c:i[1]]}ticks({interval:e,tickCount:i=ContinuousScale.defaultTickCount},s=this.domain,n){if(!s||s.length<2||i<1)return;const r=this.base,[a,o]=s,l=Math.min(a,o),c=Math.max(a,o);let h=this.log(l),u=this.log(c);if(e){const y=I=>I>=l&&I<=c,m=Math.min(Math.abs(e),Math.abs(u-h)),{ticks:b,count:v,firstTickIndex:x}=(0,import_ag_charts_core189.range)(h,u,m,n),S=b.map(this.pow).filter(y);if(!(0,import_ag_charts_core189.isDenseInterval)(S.length,this.getPixelRange()))return{ticks:S,count:v,firstTickIndex:x}}if(!(0,import_ag_charts_core189.isInteger)(r)||u-h>=i){const y=Math.min(u-h,i),{ticks:m,count:b,firstTickIndex:v}=(0,import_ag_charts_core189.createTicks)(h,u,y,void 0,void 0,n);return{ticks:m.map(this.pow),count:b,firstTickIndex:v}}const d=[],p=l>0;h=Math.floor(h)-1,u=Math.round(u)+1;const g=(0,import_ag_charts_core189.findRangeExtent)(this.range)/i;let f=1/0;for(let y=h;y<=u;y++){const m=this.convert(this.pow(y+1));for(let b=1;b<r;b++){const v=p?b:r-b+1,x=this.pow(y)*v,S=this.convert(x),I=Math.abs(f-S),D=Math.abs(S-m),T=I>=g&&D>=g;x>=l&&x<=c&&(b===1||T||d.length===0)&&(d.push(x),f=S)}}return filterVisibleTicks(d,p,n)}},import_ag_charts_core191=require("ag-charts-core"),import_ag_charts_core190=require("ag-charts-core"),SegmentedPath=class extends Path{constructor(){super(...arguments),this.segmentPath=new Path}drawPath(t){if(!this.segments||this.segments.length===0){super.drawPath(t);return}t.save();const e=(0,import_ag_charts_core190.getPath2D)(),i=new e;rect(i,{x0:0,y0:0,x1:t.canvas.width,y1:t.canvas.height},!1);for(const n of this.segments)rect(i,n.clipRect);t.clip(i),super.drawPath(t),t.restore();const{segmentPath:s}=this;s.setProperties({opacity:this.opacity,visible:this.visible,lineCap:this.lineCap,lineJoin:this.lineJoin,pointerEvents:this.pointerEvents});for(const{clipRect:n,fill:r,stroke:a,...o}of this.segments){t.save(),s.path=this.path,s.setProperties(o),s.fill=this.fill==null?"none":r,s.stroke=this.stroke==null?"none":a;const l=new e;rect(l,n),t.clip(l),s.drawPath(t),t.restore()}}};__decorateClass([(0,import_ag_charts_core190.SceneRefChangeDetection)()],SegmentedPath.prototype,"segments",2);function rect(t,{x0:e,y0:i,x1:s,y1:n},r=!0){const a=Math.min(e,s),o=Math.min(i,n),l=Math.max(e,s),c=Math.max(i,n);t.moveTo(a,o),r?(t.lineTo(l,o),t.lineTo(l,c),t.lineTo(a,c)):(t.lineTo(a,c),t.lineTo(l,c),t.lineTo(l,o)),t.closePath()}var SegmentedGroup=class extends TranslatableGroup{constructor(){super(...arguments),this.segments=[],this.scalablePath=new(Scalable(Path))}renderInContext(t){if(!this.visible)return;const{ctx:e}=t;if(!this.segments||this.segments?.length===0)return super.renderInContext(t);e.save();const i=(0,import_ag_charts_core191.getPath2D)(),s=new i;rect(s,{x0:0,y0:0,x1:e.canvas.width,y1:e.canvas.height},!1);for(const r of this.segments)rect(s,r.clipRect);e.clip(s);for(const r of this.children())r.visible&&r.render(t);e.restore();const{scalablePath:n}=this;for(const{clipRect:r,...a}of this.segments){e.save();const o=new i;rect(o,r),e.clip(o),n.setProperties(a);for(const l of this.children())!l.visible||!(l instanceof Path)||(n.path=l.path,n.setProperties({opacity:l.opacity,lineCap:l.lineCap,lineJoin:l.lineJoin,...isScalable(l)&&{scalingX:l.scalingX,scalingY:l.scalingY,scalingCenterX:l.scalingCenterX,scalingCenterY:l.scalingCenterY}}),n.render(t));e.restore()}}};__decorateClass([(0,import_ag_charts_core191.SceneRefChangeDetection)()],SegmentedGroup.prototype,"segments",2);var import_ag_charts_core192=require("ag-charts-core"),QuadtreeNearest=class{constructor(t,e,i){this.root=new QuadtreeNodeNearest(t,e,i)}clear(t){this.root.clear(t)}addValue(t,e){const i={hitTester:t,value:e,distanceSquared:(s,n)=>t.distanceSquared(s,n)};this.root.addElem(i)}find(t,e){const i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(t,e,i),i.best}},QuadtreeSubdivisions=class{constructor(t,e,i,s){this.nw=t,this.ne=e,this.sw=i,this.se=s}addElem(t){this.nw.addElem(t),this.ne.addElem(t),this.sw.addElem(t),this.se.addElem(t)}find(t,e,i){this.nw.find(t,e,i),this.ne.find(t,e,i),this.sw.find(t,e,i),this.se.find(t,e,i)}},QuadtreeNode=class{constructor(t,e,i){this.capacity=t,this.maxdepth=e,this.boundary=i??BBox.NaN,this.elems=[],this.subdivisions=void 0}clear(t){this.elems.length=0,this.boundary=t,this.subdivisions=void 0}addElem(t){this.addCondition(t)&&(this.subdivisions===void 0?this.maxdepth===0||this.elems.length<this.capacity?this.elems.push(t):this.subdivide(t):this.subdivisions.addElem(t))}find(t,e,i){this.findCondition(t,e,i)&&(this.subdivisions===void 0?this.findAction(t,e,i):this.subdivisions.find(t,e,i))}subdivide(t){this.subdivisions=this.makeSubdivisions();for(const e of this.elems)this.subdivisions.addElem(e);this.subdivisions.addElem(t),this.elems.length=0}makeSubdivisions(){const{x:t,y:e,width:i,height:s}=this.boundary,{capacity:n}=this,r=this.maxdepth-1,a=i/2,o=s/2,l=new BBox(t,e,a,o),c=new BBox(t+a,e,a,o),h=new BBox(t,e+o,a,o),u=new BBox(t+a,e+o,a,o);return new QuadtreeSubdivisions(this.child(n,r,l),this.child(n,r,c),this.child(n,r,h),this.child(n,r,u))}},QuadtreeNodeNearest=class Be extends QuadtreeNode{addCondition(e){const{x:i,y:s}=e.hitTester.midPoint;return this.boundary.containsPoint(i,s)}findCondition(e,i,s){const{best:n}=s;return n.distanceSquared!==0&&this.boundary.distanceSquared(e,i)<n.distanceSquared}findAction(e,i,s){const n=(0,import_ag_charts_core192.nearestSquared)(e,i,this.elems,s.best.distanceSquared);n.nearest!==void 0&&n.distanceSquared<s.best.distanceSquared&&(s.best=n)}child(e,i,s){return new Be(e,i,s)}},import_ag_charts_core194=require("ag-charts-core"),import_ag_charts_core193=require("ag-charts-core"),LinearScale=class Me extends ContinuousScale{constructor(){super([0,1],[0,1]),this.type="number"}static is(e){return e instanceof Me}static getTickStep(e,i,s){const{interval:n,tickCount:r=ContinuousScale.defaultTickCount,minTickCount:a,maxTickCount:o}=s;return n??(0,import_ag_charts_core193.tickStep)(e,i,r,a,o)}toDomain(e){return e}ticks({interval:e,tickCount:i=ContinuousScale.defaultTickCount,minTickCount:s,maxTickCount:n},r=this.domain,a){if(!r||r.length<2||i<1||!r.every(Number.isFinite))return{ticks:[],count:0,firstTickIndex:0};const[o,l]=r;if(e){const c=Math.abs(e);if(!(0,import_ag_charts_core193.isDenseInterval)((l-o)/c,this.getPixelRange()))return(0,import_ag_charts_core193.range)(o,l,c,a)}return(0,import_ag_charts_core193.createTicks)(o,l,i,s,n,a)}niceDomain(e,i=this.domain){if(i.length<2)return[];const{tickCount:s=ContinuousScale.defaultTickCount}=e;let[n,r]=i;if(s===1)[n,r]=(0,import_ag_charts_core193.niceTicksDomain)(n,r);else if(s>1){const a=n>r?Math.ceil:Math.floor,o=n>r?Math.floor:Math.ceil,l=4;for(let c=0;c<l;c++){const h=n,u=r,d=Me.getTickStep(n,r,e),[p,g]=i;if(n=a(p/d)*d,r=o(g/d)*d,n===h&&r===u)break}}return[e.nice[0]?n:i[0],e.nice[1]?r:i[1]]}},NumberAxis=class extends CartesianAxis{constructor(t,e=new LinearScale){super(t,e)}hasDefinedDomain(){const{min:t,max:e}=this;return t!=null&&e!=null&&t<e}normaliseDataDomain(t){const{min:e,max:i,preferredMin:s,preferredMax:n}=this,{extent:r,clipped:a}=(0,import_ag_charts_core194.normalisedExtentWithMetadata)(t.domain,e,i,s,n,void 0,t.sortMetadata?.sortOrder);return{domain:r,clipped:a}}getDomainExtentsNice(){return[this.min==null&&this.nice,this.max==null&&this.nice]}getVisibleDomain(t){const[e,i]=t,[s,n]=this.visibleRange,r=i-e;return[e+s*r,i-(1-n)*r]}tickFormatParams(t,e,i){return{type:"number",visibleDomain:this.getVisibleDomain(t),fractionDigits:i}}datumFormatParams(t,e,i){const{datum:s,seriesId:n,legendItemName:r,key:a,source:o,property:l,domain:c,boundSeries:h}=e,u=this.getVisibleDomain(c);return{type:"number",value:t,datum:s,seriesId:n,legendItemName:r,key:a,source:o,property:l,domain:c,visibleDomain:u,boundSeries:h,fractionDigits:i}}};NumberAxis.className="NumberAxis",NumberAxis.type="number",__decorateClass([import_ag_charts_core194.Property],NumberAxis.prototype,"min",2),__decorateClass([import_ag_charts_core194.Property],NumberAxis.prototype,"max",2),__decorateClass([import_ag_charts_core194.Property],NumberAxis.prototype,"preferredMin",2),__decorateClass([import_ag_charts_core194.Property],NumberAxis.prototype,"preferredMax",2);var import_ag_charts_core195=require("ag-charts-core"),TimeAxisParentLevel=class extends import_ag_charts_core195.BaseProperties{constructor(){super(...arguments),this.enabled=!1,this.label=new AxisLabel,this.tick=new AxisTick}};__decorateClass([import_ag_charts_core195.Property],TimeAxisParentLevel.prototype,"enabled",2),__decorateClass([import_ag_charts_core195.Property],TimeAxisParentLevel.prototype,"label",2),__decorateClass([import_ag_charts_core195.Property],TimeAxisParentLevel.prototype,"tick",2);var TimeAxis=class extends CartesianAxis{constructor(t){super(t,new TimeScale),this.parentLevel=new TimeAxisParentLevel,this.min=void 0,this.max=void 0,this.preferredMin=void 0,this.preferredMax=void 0}get _unit(){}set _unit(t){import_ag_charts_core195.Logger.warnOnce("To use 'unit', use an axis with type 'unit-time' instead of 'time'.")}hasDefinedDomain(){const{min:t,max:e}=this;return t!=null&&e!=null&&t<e}isCategoryLike(){return!1}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}normaliseDataDomain(t){const{extent:e,clipped:i}=(0,import_ag_charts_core195.normalisedTimeExtentWithMetadata)(t,this.min,this.max,this.preferredMin,this.preferredMax);return{domain:e,clipped:i}}processData(){super.processData();const{boundSeries:t,direction:e,min:i,max:s}=this;this.minimumTimeGranularity=minimumTimeAxisDatumGranularity(t,e,i,s)}tickFormatParams(t,e,i,s){s??(s=(0,import_ag_charts_core195.lowestGranularityUnitForTicks)(e));const n=(0,import_ag_charts_core195.dateTruncationForDomain)(t),r=(0,import_ag_charts_core195.intervalUnit)(s),a=(0,import_ag_charts_core195.intervalStep)(s),o=(0,import_ag_charts_core195.intervalEpoch)(s);return{type:"date",unit:r,step:a,epoch:o,truncateDate:n}}datumFormatParams(t,e,i,s,n){if(typeof t=="number"&&(t=new Date(t)),s==null){const{minimumTimeGranularity:y}=this,m=(0,import_ag_charts_core195.lowestGranularityUnitForValue)(t);y!=null&&(0,import_ag_charts_core195.intervalMilliseconds)(y)<(0,import_ag_charts_core195.intervalMilliseconds)(m)?s=y:s=m}const{datum:r,seriesId:a,legendItemName:o,key:l,source:c,property:h,domain:u,boundSeries:d}=e,p=(0,import_ag_charts_core195.intervalUnit)(s),g=(0,import_ag_charts_core195.intervalStep)(s),f=(0,import_ag_charts_core195.intervalEpoch)(s);return{type:"date",value:t,datum:r,seriesId:a,legendItemName:o,key:l,source:c,property:h,domain:u,boundSeries:d,unit:p,step:g,epoch:f,style:n}}};TimeAxis.className="TimeAxis",TimeAxis.type="time",__decorateClass([import_ag_charts_core195.Property],TimeAxis.prototype,"parentLevel",2),__decorateClass([import_ag_charts_core195.Property],TimeAxis.prototype,"min",2),__decorateClass([import_ag_charts_core195.Property],TimeAxis.prototype,"max",2),__decorateClass([import_ag_charts_core195.Property],TimeAxis.prototype,"preferredMin",2),__decorateClass([import_ag_charts_core195.Property],TimeAxis.prototype,"preferredMax",2),__decorateClass([import_ag_charts_core195.Property,(0,import_ag_charts_core195.ProxyPropertyOnWrite)("_unit")],TimeAxis.prototype,"unit",2);function minimumTimeAxisDatumGranularity(t,e,i,s){const n=t.reduce((r,a)=>Math.min(a.minTimeInterval()??1/0,r),1/0);return Number.isFinite(n)?(0,import_ag_charts_core195.lowestGranularityForInterval)(n):calculateDefaultUnit(t,e,i,s)?.unit}function calculateDefaultUnit(t,e,i,s){let n=1/0,r=-1/0,a,o=0;const l=[];for(const d of t){if(!d.visible)continue;const{extent:p}=(0,import_ag_charts_core195.normalisedTimeExtentWithMetadata)(d.getDomain(e));if(p.length===0)continue;const g=p[0].valueOf(),f=p.at(-1).valueOf();l.push(g,f),n=Math.min(n??1/0,g,f),r=Math.max(r??-1/0,g,f);const y=Math.abs(f-g);if(y===0)continue;const m=d.dataCount();if(o=Math.max(o,m),m<=1)continue;const b=y/(m-1);a=Math.min(a??1/0,b)}if(n=Math.min(n,i?.valueOf()??1/0,s?.valueOf()??1/0),r=Math.max(r,i?.valueOf()??-1/0,s?.valueOf()??-1/0),!Number.isFinite(n)||!Number.isFinite(r))return;a??(a=Math.abs(r-n)),a=Math.min(a,minNonZeroDifference(l));const c=(0,import_ag_charts_core195.lowestGranularityForInterval)(a);let h=a/(0,import_ag_charts_core195.intervalMilliseconds)(c);o<=2?h=Math.floor(h):h=Math.round(h),h=Math.max(h,1);const u=h===1?void 0:(0,import_ag_charts_core195.intervalFloor)(c,n);return{unit:c,step:h,epoch:u}}function minNonZeroDifference(t){t.sort((i,s)=>i-s);let e=1/0;for(let i=1;i<t.length;i++){const s=t[i-1],n=t[i];n-s>0&&(e=Math.min(e,Math.abs(n-s)))}return e}var import_ag_charts_core196=require("ag-charts-core"),DataModelSeries=class extends Series{constructor({clipFocusBox:t,categoryKey:e,...i}){super(i),this.categoryKey=e,this.clipFocusBox=t??!0}dataCount(){return this.processedData?.dataSources?.get(this.id)?.data?.length??0}invalidDataCount(){return this.processedData?.invalidDataCount?.get(this.id)??0}missingDataCount(){return this.dataModel?.resolveMissingDataCount(this)??0}get hasData(){return Math.max(0,this.dataCount()-this.invalidDataCount()-this.missingDataCount())>0}getScaleInformation({xScale:t,yScale:e}){const i=ContinuousScale.is(t),s=ContinuousScale.is(e);return{isContinuousX:i,isContinuousY:s,xScaleType:t?.type,yScaleType:e?.type}}getModulePropertyDefinitions(){const t=this.axes[import_ag_charts_core196.ChartAxisDirection.X]?.scale,e=this.axes[import_ag_charts_core196.ChartAxisDirection.Y]?.scale;return this.moduleMap.mapModules(i=>i.getPropertyDefinitions(this.getScaleInformation({xScale:t,yScale:e}))).flat()}async requestDataModel(t,e,i){i.props.push(...this.getModulePropertyDefinitions());const{dataModel:s,processedData:n}=await t.request(this.id,e??DataSet.empty(),i);return this.dataModel=s,this.processedData=n,this.events.emit("data-processed",{dataModel:s,processedData:n}),{dataModel:s,processedData:n}}isProcessedDataAnimatable(){const{processedData:t,ctx:e}=this;if(!t)return!1;const i=this.getNodeData();if(i!=null&&i.length>e.animationManager.maxAnimatableItems)return!1;const s=t.reduced?.animationValidation;if(!s)return!0;const{orderedKeys:n,uniqueKeys:r}=s;return n&&r}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}findNodeDatum(t){return findNodeDatumInArray(t,this.getNodeData())}pickFocus(t){const e=this.getNodeData();if(e===void 0||e.length===0)return;const i=this.computeFocusDatumIndex(t,e);if(i===void 0)return;const{clipFocusBox:s}=this,n=e[i],r={...t,datumIndex:i},a=this.computeFocusBounds(r);if(a!==void 0)return{bounds:a,clipFocusBox:s,datum:n,datumIndex:i}}pickNodesExactShape(t){const e=super.pickNodesExactShape(t);return e.sort((i,s)=>i.datumIndex-s.datumIndex),e}isDatumEnabled(t,e){const{missing:i=!1,enabled:s=!0,focusable:n=!0}=t[e];return!i&&s&&n}computeFocusDatumIndex(t,e){const i=(a,o)=>{for(;a>=0&&!this.isDatumEnabled(e,a);)a+=o;return a===-1?void 0:a},s=(a,o)=>{for(;a<e.length&&!this.isDatumEnabled(e,a);)a+=o;return a===e.length?void 0:a};let n;const r=(0,import_ag_charts_core196.clamp)(0,t.datumIndex,e.length-1);return t.datumIndexDelta<0?n=i(r,t.datumIndexDelta):t.datumIndexDelta>0?n=s(r,t.datumIndexDelta):n=s(r,1)??i(r,-1),n===void 0?t.datumIndexDelta===0?void 0:t.datumIndex-t.datumIndexDelta:n}dataModelPropertyIsKey(t){const{processedData:e}=this;return e?e.defs.keys.some(i=>i.id===t&&i.idsMap?.get(this.id)?.has(t)===!0):!1}keysOrValues(t){const{dataModel:e,processedData:i}=this;return!e||!i?[]:this.dataModelPropertyIsKey(t)?e.resolveKeysById(this,t,i):e.resolveColumnById(this,t,i)}sortOrder(t){const{dataModel:e,processedData:i}=this;if(!(!e||!i))return this.dataModelPropertyIsKey(t)?e.getKeySortOrder(this,t,i):e.getColumnSortOrder(this,t,i)}getCategoryKey(){return this.categoryKey}getCategoryValue(t){const{processedData:e,dataModel:i}=this,s=this.getCategoryKey();return!e||!i||!s||(e.invalidData?.get(this.id)?.[t]??!1)?void 0:this.keysOrValues(s)[t]}datumIndexForCategoryValue(t){const{processedData:e,dataModel:i}=this,s=this.getCategoryKey();if(!e||!i||!s)return;t=t.valueOf();const n=e.invalidData?.get(this.id),r=this.keysOrValues(s);for(let a=0;a<r.length;a+=1){if(n?.[a]===!0)continue;const o=r[a]?.valueOf();if((0,import_ag_charts_core196.objectsEqual)(t,o))return a}}},DEFAULT_CARTESIAN_DIRECTION_KEYS={[import_ag_charts_core197.ChartAxisDirection.X]:["xKey"],[import_ag_charts_core197.ChartAxisDirection.Y]:["yKey"]},DEFAULT_CARTESIAN_DIRECTION_NAMES={[import_ag_charts_core197.ChartAxisDirection.X]:["xName"],[import_ag_charts_core197.ChartAxisDirection.Y]:["yName"]},CartesianSeriesNodeEvent=class extends SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.yKey=s.properties.yKey}},CartesianSeriesProperties=class extends SeriesProperties{constructor(){super(...arguments),this.xKeyAxis="x",this.yKeyAxis="y",this.pickOutsideVisibleMinorAxis=!1,this.segmentation=new Segmentation}};__decorateClass([import_ag_charts_core197.Property],CartesianSeriesProperties.prototype,"xKeyAxis",2),__decorateClass([import_ag_charts_core197.Property],CartesianSeriesProperties.prototype,"yKeyAxis",2),__decorateClass([import_ag_charts_core197.Property],CartesianSeriesProperties.prototype,"legendItemName",2),__decorateClass([import_ag_charts_core197.Property],CartesianSeriesProperties.prototype,"pickOutsideVisibleMinorAxis",2),__decorateClass([import_ag_charts_core197.Property],CartesianSeriesProperties.prototype,"segmentation",2);var RENDER_TO_OFFSCREEN_CANVAS_THRESHOLD=100,CartesianSeries=class extends DataModelSeries{constructor({pathsPerSeries:t=["path"],pathsZIndexSubOrderOffset:e=[],datumSelectionGarbageCollection:i=!0,animationAlwaysUpdateSelections:s=!1,animationAlwaysPopulateNodeData:n=!1,segmentedDataNodes:r=!0,animationResetFns:a,propertyKeys:o,propertyNames:l,...c}){if(super({propertyKeys:o,propertyNames:l,canHaveAxes:!0,...c}),this.NodeEvent=CartesianSeriesNodeEvent,this.dataNodeGroup=this.contentGroup.appendChild(new SegmentedGroup({name:`${this.id}-series-dataNodes`,zIndex:1})),this.labelGroup=this.contentGroup.appendChild(new TranslatableGroup({name:`${this.id}-series-labels`})),this.labelSelection=Selection.select(this.labelGroup,Text),this.highlightSelection=Selection.select(this.highlightNodeGroup,()=>this.nodeFactory()),this.highlightLabelSelection=Selection.select(this.highlightLabelGroup,Text),this.annotationSelections=new Set,this.seriesBelowStackContext=void 0,this.debug=import_ag_charts_core197.Debug.create(),!o||!l)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:t,pathsZIndexSubOrderOffset:e,propertyKeys:o,propertyNames:l,animationResetFns:a,animationAlwaysUpdateSelections:s,animationAlwaysPopulateNodeData:n,datumSelectionGarbageCollection:i,segmentedDataNodes:r},this.paths=t.map(h=>new SegmentedPath({name:`${this.id}-${h}`})),this.datumSelection=Selection.select(this.dataNodeGroup,()=>this.nodeFactory(),i),this.animationState=new import_ag_charts_core197.StateMachine("empty",{empty:{update:{target:"ready",action:h=>this.animateEmptyUpdateReady(h)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:h=>this.animateReadyHighlight(h),resize:h=>this.animateReadyResize(h),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:h=>{this.ctx.animationManager.isSkipped()?this.resetAllAnimation(h):this.animateWaitingUpdateReady(h)}},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:h=>this.resetAllAnimation(h),reset:"empty"},clearing:{update:{target:"empty",action:h=>this.animateClearingUpdateEmpty(h)},reset:"empty",skip:"ready"}},this.checkProcessedDataAnimatable.bind(this)),this.cleanup.register(this.ctx.eventsHub.on("legend:item-click",h=>this.onLegendItemClick(h)),this.ctx.eventsHub.on("legend:item-double-click",h=>this.onLegendItemDoubleClick(h)))}get contextNodeData(){return this._contextNodeData}getNodeData(){return this.contextNodeData?.nodeData}getKeyAxis(t){if(this.shouldFlipXY()){if(t===import_ag_charts_core197.ChartAxisDirection.X)return this.properties.yKeyAxis;if(t===import_ag_charts_core197.ChartAxisDirection.Y)return this.properties.xKeyAxis}if(t===import_ag_charts_core197.ChartAxisDirection.X)return this.properties.xKeyAxis;if(t===import_ag_charts_core197.ChartAxisDirection.Y)return this.properties.yKeyAxis}attachSeries(t,e,i){super.attachSeries(t,e,i),this.attachPaths(this.paths)}detachSeries(t,e,i){super.detachSeries(t,e,i),this.detachPaths(this.paths)}updatedDomains(){this.animationState.transition("updateData")}attachPaths(t){for(const e of t)this.contentGroup.appendChild(e)}detachPaths(t){for(const e of t)e.remove()}renderToOffscreenCanvas(){const t=this.getNodeData();return t!=null&&t.length>RENDER_TO_OFFSCREEN_CANVAS_THRESHOLD}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"?this.animationState.transition("skip"):t==="disabled"&&this.animationState.transition("disable")}destroy(){super.destroy(),this._contextNodeData=void 0}isSeriesHighlighted(t){if(!this.properties.highlight.enabled)return!1;const{series:e,legendItemName:i}=t??{},{legendItemName:s}=this.properties;return e===this||s!=null&&s===i}strokewidthChange(){const t=("strokeWidth"in this.properties&&this.properties.strokeWidth)??0,e=this.properties.highlight.highlightedSeries.strokeWidth??t,i=this.properties.highlight.highlightedItem?.strokeWidth??t;return t>i||e>i}update({seriesRect:t}){const{_contextNodeData:e}=this,i=this.checkResize(t),s=this.updateHighlightSelection(),n=this;this.contentGroup.batchedUpdate(function(){const o=n.updateSelections(),l=n.contextNodeData?.segments;n.opts.segmentedDataNodes?n.dataNodeGroup.segments=l??n.dataNodeGroup.segments:n.dataNodeGroup.segments=void 0,n.updateNodes(s,i||o)});const r=this.getAnimationData(t,e);r&&(i&&this.animationState.transition("resize",r),this.animationState.transition("update",r),this.processedDataUpdated=!1)}createStackContext(){}canIncrementallyUpdateNodes(t=!1){if(this.contextNodeData?.nodeData==null)return!1;const{processedData:i}=this;return i?i.changeDescription!=null||!processedDataIsAnimatable(i)||t:!1}trimIncrementalNodeArray(t,e){e<t.length&&(t.length=e)}createNodeData(){const t=this.validateCreateNodeDataPreconditions();if(!t)return;const{xAxis:e,yAxis:i}=t,s=this.createNodeDatumContext(e,i);if(!s)return this.getEmptyResult();const n=this.initializeResult(s);return!this.visible&&(this.seriesGrouping==null&&!this.opts.animationAlwaysPopulateNodeData||!s.animationEnabled)?n:(this.populateNodeData(s),this.finalizeNodeData(s),this.assembleResult(s,n))}createNodeDatumContext(t,e){throw new Error(`${this.constructor.name}: createNodeDatumContext() must be implemented when using the template method pattern`)}populateNodeData(t){throw new Error(`${this.constructor.name}: populateNodeData() must be implemented when using the template method pattern`)}initializeResult(t){throw new Error(`${this.constructor.name}: initializeResult() must be implemented when using the template method pattern`)}validateCreateNodeDataPreconditions(){const t=this.axes[import_ag_charts_core197.ChartAxisDirection.X],e=this.axes[import_ag_charts_core197.ChartAxisDirection.Y];if(!(!t||!e||!this.dataModel||!this.processedData))return{xAxis:t,yAxis:e}}getEmptyResult(){}finalizeNodeData(t){t.canIncrementallyUpdate&&this.trimIncrementalNodeArray(t.nodes,t.nodeIndex)}assembleResult(t,e){return e}updateSelections(){var t;const e=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if(!this.visible&&e)return!1;const{nodeDataRefresh:i}=this;if(!i&&!this.isPathOrSelectionDirty())return!1;if(i){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=this.createNodeData();const s=this.isProcessedDataAnimatable();if(this._contextNodeData){(t=this._contextNodeData).animationValid??(t.animationValid=s);const a=this._contextNodeData.nodeData?.length;a!=null&&import_ag_charts_core197.DebugMetrics.record(`${this.type}:nodeData`,a)}const{dataModel:n,processedData:r}=this;n!==void 0&&r!==void 0&&this.events.emit("data-update",{dataModel:n,processedData:r}),this.updateSeriesSelections()}return i}updateSeriesSelections(){const{datumSelection:t,labelSelection:e,paths:i}=this,s=this._contextNodeData;if(!s)return;const{nodeData:n,labelData:r,itemId:a}=s;this.updatePaths({itemId:a,contextData:s,paths:i}),this.datumSelection=this.updateDatumSelection({nodeData:n,datumSelection:t}),this.labelGroup.batchedUpdate(()=>{this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:e})??e})}getShapeFillBBox(){const{axes:t}=this,e=t[import_ag_charts_core197.ChartAxisDirection.X],i=t[import_ag_charts_core197.ChartAxisDirection.Y],[s,n]=(0,import_ag_charts_core197.findMinMax)(e?.range??[0,1]),[r,a]=(0,import_ag_charts_core197.findMinMax)(i?.range??[0,1]),o=(0,import_ag_charts_core197.extractDomain)(this.getSeriesDomain(import_ag_charts_core197.ChartAxisDirection.X)),l=[e?.scale.convert(o.at(0)),e?.scale.convert(o.at(-1))],c=(0,import_ag_charts_core197.extractDomain)(this.getSeriesDomain(import_ag_charts_core197.ChartAxisDirection.Y)),h=[i?.scale.convert(c.at(0)),i?.scale.convert(c.at(-1))],[u,d]=(0,import_ag_charts_core197.findMinMax)(l),[p,g]=(0,import_ag_charts_core197.findMinMax)(h);return{axis:new BBox(s,r,n-s,a-r),series:new BBox(u,p,d-u,g-p)}}updateNodes(t,e){const{highlightSelection:i,datumSelection:s}=this,n=!this.ctx.animationManager.isSkipped(),r=this.visible&&this._contextNodeData!=null;this.contentGroup.visible=n||r,this.highlightGroup.visible=(n||r)&&t,this.updateDatumStyles({datumSelection:i,isHighlight:!0});const a=this.ctx.chartService.highlight?.drawingMode??"overlay";this.updateDatumNodes({datumSelection:i,isHighlight:!0,drawingMode:a}),this.highlightLabelGroup.batchedUpdate(()=>{this.updateLabelNodes({labelSelection:this.highlightLabelSelection,isHighlight:!0})}),this.animationState.transition("highlight",i);const{dataNodeGroup:o,labelSelection:l,paths:c,labelGroup:h}=this,{itemId:u}=this.contextNodeData??{};if(this.updatePathNodes({itemId:u,paths:c,visible:r,animationEnabled:n}),o.visible=n||r,h.visible=r,!o.visible)return;this.hasItemStylers()&&this.updateDatumStyles({datumSelection:s,isHighlight:!1});const d=this.strokewidthChange()||this.hasChangesOnHighlight;(e||d)&&(this.updateDatumNodes({datumSelection:s,isHighlight:!1,drawingMode:"overlay"}),this.usesPlacedLabels||this.labelGroup.batchedUpdate(()=>{this.updateLabelNodes({labelSelection:l,isHighlight:!1})}))}getHighlightData(t,e){return e?[{...e}]:void 0}getHighlightLabelData(t,e){const i=t.filter(s=>s.datum===e.datum&&s.itemId===e.itemId);return i.length===0?void 0:i}updateHighlightSelection(){const{highlightSelection:t,highlightLabelSelection:e,_contextNodeData:i}=this;if(!i)return!1;const s=this.ctx.highlightManager?.getActiveHighlight(),r=this.isSeriesHighlighted(s)&&s?.datum?s:void 0;if(r==null)return!1;const{nodeData:a,labelData:o}=i,l=this.getHighlightData(a,r);this.highlightSelection=this.updateHighlightSelectionItem({items:l,highlightSelection:t});const c=this.getHighlightLabelData(o,r)??[];return this.highlightLabelSelection=this.updateLabelSelection({labelData:c,labelSelection:e})??e,!0}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(const{node:t}of this.datumSelection)t.datum.missing!==!0&&(yield t)}getQuadTree(){if(this.quadtree===void 0){const t=this.ctx.scene?.canvas??{width:0,height:0},e=new BBox(0,0,t.width,t.height);this.quadtree=new QuadtreeNearest(100,10,e),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(t){}pickNodeDataExactShape(t){const{x:e,y:i}=t,{dataNodeGroup:s}=this,n=s.pickNodes(e,i).filter(r=>r.datum.missing!==!0);if(n.length!==0)return n.map(a=>a.datum)}pickModulesExactShape(t){for(const e of this.moduleMap.modules()){const{datum:i}=e.pickNodeExact(t)??{};if(i!=null&&i?.missing!==!0)return[i]}}pickNodesExactShape(t){const e=super.pickNodesExactShape(t);return e.length!==0?e:this.pickNodeDataExactShape(t)??this.pickModulesExactShape(t)??[]}pickNodeDataClosestDatum(t){const{x:e,y:i}=t,{axes:s,_contextNodeData:n}=this;if(!n)return;const r=s[import_ag_charts_core197.ChartAxisDirection.X],a=s[import_ag_charts_core197.ChartAxisDirection.Y],o={x:e,y:i};let l=1/0,c;for(const h of n.nodeData){const{point:{x:u=Number.NaN,y:d=Number.NaN}={}}=h;if(Number.isNaN(u)||Number.isNaN(d)||!(r?.inRange(u)&&a?.inRange(d)))continue;const g=Math.max((o.x-u)**2+(o.y-d)**2,0);g<l&&(l=g,c=h)}if(l!=null)return{datum:c,distance:Math.sqrt(l)}}pickModulesClosestDatum(t){let e=1/0,i;for(const s of this.moduleMap.modules()){const n=s.pickNodeNearest(t);n!==void 0&&n.distanceSquared<e&&(e=n.distanceSquared,i=n.datum)}if(e!=null)return{datum:i,distance:Math.sqrt(e)}}pickNodeClosestDatum(t){let e=1/0,i;const s=this.pickNodeDataClosestDatum(t);s!=null&&s.distance<e&&(e=s.distance,i=s.datum);const n=this.pickModulesClosestDatum(t);if(n!=null&&n.distance<e&&(e=n.distance,i=n.datum),i){const r=Math.max(e-(i.point?.size??0)/2,0);return{datum:i,distance:r}}}pickNodeMainAxisFirst(t,e){const{x:i,y:s}=t,{axes:n,_contextNodeData:r}=this,{pickOutsideVisibleMinorAxis:a}=this.properties;if(!r)return;const o=n[import_ag_charts_core197.ChartAxisDirection.X],l=n[import_ag_charts_core197.ChartAxisDirection.Y];if(o==null||l==null)return;const c=[o,l].filter(g=>g.isCategoryLike()).map(g=>g.direction);if(e&&c.length===0)return;const[h=import_ag_charts_core197.ChartAxisDirection.X]=c,u=[i,s];h!==import_ag_charts_core197.ChartAxisDirection.X&&u.reverse();const d=[1/0,1/0];let p;for(const g of r.nodeData){const{x:f=Number.NaN,y=Number.NaN}=g.point??g.midPoint??{};if(Number.isNaN(f)||Number.isNaN(y)||g.missing===!0)continue;const m=[o?.inRange(f,1),l?.inRange(y,1)];if(h!==import_ag_charts_core197.ChartAxisDirection.X&&m.reverse(),!m[0]||!a&&!m[1])continue;const b=[f,y];h!==import_ag_charts_core197.ChartAxisDirection.X&&b.reverse();let v=!0;for(let x=0;x<b.length;x++){const S=Math.abs(b[x]-u[x]);if(S>d[x]){v=!1;break}else S<d[x]&&(d[x]=S,d.fill(1/0,x+1,d.length))}v&&(p=g)}if(p){let g=Math.max(d[0]**2+d[1]**2-(p.point?.size??0),0);for(const f of this.moduleMap.modules()){const y=f.pickNodeMainAxisFirst(t,h);if(y!=null&&y.distanceSquared<g){p=y.datum,g=y.distanceSquared;break}}return{datum:p,distance:Math.sqrt(g)}}}isPathOrSelectionDirty(){return!1}shouldFlipXY(){return!1}visibleRangeIndices(t,e,i,s){let n;if(s==null){const{processedData:c,dataModel:h}=this;n=h.getColumnSortOrder(this,t,c)??1}else n=s.sortOrder;const r=this.keysOrValues(t),a=0,[o,l]=visibleRangeIndices(n,i?.length??r.length,e,c=>{const h=i?.[c]??c;return this.xCoordinateRange(r[h],a,h)});return o<l?[o,l]:[l,o]}domainForVisibleRange(t,e,i,s,n){const{processedData:r,dataModel:a}=this,[o,l]=s,c=this.keysOrValues(i),h=this.sortOrder(i);if(h!=null){const g=this.visibleRangeIndices(i,s,n,{sortOrder:h});return a.getDomainBetweenRange(this,e,g,r)}const u=e.map(g=>this.keysOrValues(g));let d=1/0,p=-1/0;for(const[g,f]of c.entries()){const[y,m]=this.xCoordinateRange(f,0,g);if(!(m<o||y>l))for(let b=0;b<e.length;b++){const v=u[b][g];d=Math.min(d,v),p=Math.max(p,v)}}return d>p?[Number.NaN,Number.NaN]:[d,p]}domainForClippedRange(t,e,i){const{processedData:s,dataModel:n,axes:r}=this,a=t===import_ag_charts_core197.ChartAxisDirection.X?import_ag_charts_core197.ChartAxisDirection.Y:import_ag_charts_core197.ChartAxisDirection.X,o=axisExtent(r[a]);if(!o)return e.flatMap(g=>n.getDomain(this,g,"value",s).domain);const l=this.keysOrValues(i),c=n.getColumnSortOrder(this,i,s);if(c!=null){const g=clippedRangeIndices(c,l.length,o,f=>l[f]);return n.getDomainBetweenRange(this,e,g,s)}const h=e.map(g=>this.keysOrValues(g)),u=o[0].valueOf(),d=o[1].valueOf(),p=[];for(const[g,f]of l.entries()){const y=f.valueOf();if(y<u||y>d)continue;const m=h.map(b=>b[g]);y>=u&&p.push(...m),y<=d&&p.push(...m)}return p}zoomFittingVisibleItems(t,e,i,s,n){const{dataModel:r,processedData:a}=this;if(!r||!a)return;const o=this.axes[import_ag_charts_core197.ChartAxisDirection.X];if(s!=null)return;const l=this.sortOrder(t);if(l==null)return;const c=this.keysOrValues(t);if(n>c.length)return{x:[0,1],y:void 0};const h=o.scale,u=h.range;h.range=[0,1];let[d,p]=this.visibleRangeIndices(t,i,void 0,{sortOrder:l});p-=1;const g=0;this.xCoordinateRange(c[d],g,d)[0]<i[0]&&(d+=1),this.xCoordinateRange(c[p],g,p)[1]>i[1]&&(p-=1);let f;if(Math.abs(p-d)>=n-1)f=i;else{const y=(i[0]+i[1])/2;for(;Math.abs(p-d)<n-1&&(d>0||p<c.length-1);)if(d===0)p+=1;else if(p===c.length-1)d-=1;else{const v=this.xCoordinateRange(c[d-1],g,d-1)[0],x=this.xCoordinateRange(c[p+1],g,p+1)[1];Math.abs(v-y)<Math.abs(x-y)?d-=1:p+=1}const m=this.xCoordinateRange(c[d],g,d)[0],b=this.xCoordinateRange(c[p],g,p)[1];f=[Math.min(i[0],m),Math.max(i[1],b)]}return h.range=u,{x:f,y:void 0}}countVisibleItems(t,e,i,s,n){const{dataModel:r,processedData:a}=this;if(!r||!a)return 1/0;const o=this.keysOrValues(t),l=e.map(D=>r.resolveColumnById(this,D,a)),c=this.shouldFlipXY(),h=c?this.axes[import_ag_charts_core197.ChartAxisDirection.Y]:this.axes[import_ag_charts_core197.ChartAxisDirection.X],u=c?this.axes[import_ag_charts_core197.ChartAxisDirection.X]:this.axes[import_ag_charts_core197.ChartAxisDirection.Y],d=c?s??[0,1]:i,p=c?i:s??[0,1];if(s==null){const D=this.sortOrder(t);if(D!=null){const T=h.scale,A=T.range;T.range=[0,1];const L=this.keysOrValues(t);let[N,k]=this.visibleRangeIndices(t,d,void 0,{sortOrder:D});if(k-=1,k<N)return 0;const w=0;this.xCoordinateRange(L[N],w,N)[0]<d[0]&&(N+=1),this.xCoordinateRange(L[k],w,k)[1]>d[1]&&(k-=1);const E=Math.abs(k-N)+1;return T.range=A,E}}const g=(D,T,A)=>D[0]+(A-T[0])/(T[1]-T[0])*(D[1]-D[0]),f=h.range.toSorted(),y=u.range.toSorted(),m=g(f,h.visibleRange,d[0]),b=g(f,h.visibleRange,d[1]),v=g(y,u.visibleRange,Math.min(...p)),x=g(y,u.visibleRange,Math.max(...p)),S=Math.round((d[0]+(d[1]-d[0])/2)*o.length),I=0;return countExpandingSearch(0,o.length-1,S,n,D=>{const[T,A]=this.xCoordinateRange(o[D],I,D),[L,N]=this.yCoordinateRange(l.map(k=>k[D]),I,D);return!(0,import_ag_charts_core197.isFiniteNumber)(T)||!(0,import_ag_charts_core197.isFiniteNumber)(A)||!(0,import_ag_charts_core197.isFiniteNumber)(L)||!(0,import_ag_charts_core197.isFiniteNumber)(N)?!1:T>=m&&A<=b&&L>=v&&N<=x})}minTimeInterval(){let t;try{t=this.keysOrValues("xValue")}catch{}if(t==null||t.length>1e3)return;let e=1/0,i=t[0],s;for(let n=1;n<t.length;n++){const r=t[n];if(r!=null&&i!=null){const a=r.valueOf()-i.valueOf(),o=Math.sign(a);if(o===0)continue;if(s!==void 0&&o!==s)return;e=Math.min(e,Math.abs(a)),s=o}i=r}if(Number.isFinite(e))return e}updateHighlightSelectionItem(t){const{items:e,highlightSelection:i}=t,s=e??[];return this.updateDatumSelection({nodeData:s,datumSelection:i})}updateDatumSelection(t){return t.datumSelection}updateDatumNodes(t){}updateDatumStyles(t){}updatePaths(t){for(const e of t.paths)e.visible=!1}updatePathNodes(t){const{paths:e,visible:i}=t;for(const s of e)s.visible=i}resetPathAnimation(t){const{path:e}=this.opts?.animationResetFns??{};if(e)for(const i of t.paths)resetMotion([i],e)}resetDatumAnimation(t){const{datum:e}=this.opts?.animationResetFns??{};e&&resetMotion([t.datumSelection],e)}resetLabelAnimation(t){const{label:e}=this.opts?.animationResetFns??{};e&&resetMotion([t.labelSelection],e)}resetAllAnimation(t){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(t),this.resetDatumAnimation(t),this.resetLabelAnimation(t),t.contextData?.animationValid===!1&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){const{datum:e}=this.opts?.animationResetFns??{};e&&resetMotion([t],e)}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}getAnimationData(t,e){const{_contextNodeData:i}=this;return i?{datumSelection:this.datumSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:e,paths:this.paths,seriesRect:t}:void 0}updateLabelSelection(t){return t.labelSelection}getScaling(t){if(t instanceof LogScale){const{range:e,domain:i}=t;return{type:"log",convert:s=>t.convert(s),domain:[i[0],i[1]],range:[e[0],e[1]]}}else if(t instanceof ContinuousScale){const{range:e,domain:i}=t;return{type:"continuous",domain:[i[0],i[1]],range:[e[0],e[1]]}}else if(t instanceof BandScale){if(t instanceof UnitTimeScale){const e=t.getLinearParams(),i=t.getBandCountForUpdate();if(e!=null&&i>0)return{type:"category",variant:"unit-time",firstBandTime:e.firstBandTime,lastBandTime:e.firstBandTime+(i-1)*e.intervalMs,bandCount:i,intervalMs:e.intervalMs,inset:t.inset,step:t.step}}return{type:"category",domain:t.domain,inset:t.inset,step:t.step}}}calculateScaling(){const t={};for(const e of Object.values(import_ag_charts_core197.ChartAxisDirection)){const i=this.axes[e];if(!i)continue;const s=this.getScaling(i.scale);s!=null&&(t[e]=s)}return t}};function axisExtent(t){let e,i;if((t instanceof NumberAxis||t instanceof TimeAxis)&&({min:e,max:i}=t),!(e==null&&i==null))return e??(e=-1/0),i??(i=1/0),[e,i]}function clippedRangeIndices(t,e,i,s){const n=i[0].valueOf(),r=i[1].valueOf();let a=(0,import_ag_charts_core197.findMinIndex)(0,e-1,l=>{const c=t===1?l:e-l,h=s(c)?.valueOf();return!Number.isFinite(h)||h>=n}),o=(0,import_ag_charts_core197.findMaxIndex)(0,e-1,l=>{const c=t===1?l:e-l,h=s(c)?.valueOf();return!Number.isFinite(h)||h<=r});return a==null||o==null?[0,0]:(t===-1&&([a,o]=[e-o,e-a]),a=Math.max(a,0),o=Math.min(o+1,e),[a,o])}function stackCartesianSeries(t){const e=new Map;for(const i of t){if(!(i instanceof CartesianSeries))continue;const n=(i.seriesGrouping?.stackCount??0)>0?i.seriesGrouping?.groupIndex:void 0;if(n==null){i.seriesBelowStackContext=void 0,i.createStackContext();continue}const r=`${i.type}-${n}`;let a=e.get(r);a==null&&(a=[],e.set(r,a)),a.push(i)}for(const i of e.values()){i.sort((n,r)=>(n.seriesGrouping?.stackIndex??0)-(r.seriesGrouping?.stackIndex??0));let s;for(const n of i)n.seriesBelowStackContext=s,s=n.createStackContext()}}var import_ag_charts_core198=require("ag-charts-core");function getLabelStyles(t,e,i,s,n,r,a=["series",`${t.declarationOrder}`,"label"]){if(t.visible&&s.itemStyler){const o=t.getHighlightStateString(r,n||e!=null&&r?.series===e.series&&r?.datumIndex===e.datumIndex,e?.datumIndex),l=typeof e?.datumIndex=="number"?e.datumIndex:e?.itemId,c={border:s.border,color:s.color,cornerRadius:s.cornerRadius,datum:e?.datum,enabled:s.enabled,fill:s.fill,fillOpacity:s.fillOpacity,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight,itemId:l,itemType:e?.itemType,seriesId:t.id,padding:s.padding,highlightState:o},h=t.ctx.optionsGraphService.resolvePartial(a,t.cachedCallWithContext(s.itemStyler,{...i,...c}),{pick:!1})??{};return(0,import_ag_charts_core198.mergeDefaults)(h,c)}return s}function updateLabelNode(t,e,i,s,n,r,a){if(t.visible&&s.enabled&&n){const o=getLabelStyles(t,e.datum,i,s,r,a);e.visible=!0,e.x=n.x,e.y=n.y,e.text=n.text,e.fill=o.color,e.setAlign(n),e.setFont(o),e.setBoxing(o)}else e.visible=!1}var placements={"inside-start":{inside:!0,direction:-1,textAlignment:1},"inside-end":{inside:!0,direction:1,textAlignment:-1},"outside-start":{inside:!1,direction:-1,textAlignment:-1},"outside-end":{inside:!1,direction:1,textAlignment:1}};function adjustLabelPlacement({isUpward:t,isVertical:e,placement:i,spacing:s=0,rect:n}){let r=n.x+n.width/2,a=n.y+n.height/2,o="center",l="middle";if(i!=="inside-center"){const c=(t?1:-1)*(e?-1:1),{direction:h,textAlignment:u}=placements[i],d=(h+1)*.5;if(e){const p=t?n.y+n.height:n.y,g=n.height*c;a=p+g*d+s*u*c,l=u===c?"top":"bottom"}else{const p=t?n.x:n.x+n.width,g=n.width*c;r=p+g*d+s*u*c,o=u===c?"left":"right"}}return{x:r,y:a,textAlign:o,textBaseline:l}}function seriesLabelFadeInAnimation({id:t},e,i,...s){for(const n of s)n.cleanup();staticFromToMotion(t,e,i,s,{opacity:0},{opacity:1},{phase:"trailing"})}function seriesLabelFadeOutAnimation({id:t},e,i,...s){staticFromToMotion(t,e,i,s,{opacity:1},{opacity:0},{phase:"remove"})}function resetLabelFn(t){return{opacity:1}}var import_ag_charts_core199=require("ag-charts-core"),SeriesMarker=class extends import_ag_charts_core199.ChangeDetectableProperties{constructor(){super(...arguments),this.enabled=!0,this.shape="circle",this.size=0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(){const{size:t,shape:e,fill:i,fillOpacity:s,stroke:n,strokeWidth:r,strokeOpacity:a,lineDash:o,lineDashOffset:l}=this;return{size:t,shape:e,fill:i,fillOpacity:s,stroke:n,strokeWidth:r,strokeOpacity:a,lineDash:o,lineDashOffset:l}}getDiameter(){return this.size+this.strokeWidth}};__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneChangeDetection)()],SeriesMarker.prototype,"enabled",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneObjectChangeDetection)({equals:import_ag_charts_core199.TRIPLE_EQ})],SeriesMarker.prototype,"shape",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneChangeDetection)()],SeriesMarker.prototype,"size",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneObjectChangeDetection)({equals:import_ag_charts_core199.objectsEqual})],SeriesMarker.prototype,"fill",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneChangeDetection)()],SeriesMarker.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneChangeDetection)()],SeriesMarker.prototype,"stroke",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneChangeDetection)()],SeriesMarker.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneChangeDetection)()],SeriesMarker.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core199.Property],SeriesMarker.prototype,"lineDash",2),__decorateClass([import_ag_charts_core199.Property],SeriesMarker.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core199.Property,(0,import_ag_charts_core199.SceneObjectChangeDetection)({equals:import_ag_charts_core199.TRIPLE_EQ})],SeriesMarker.prototype,"itemStyler",2);var import_ag_charts_core200=require("ag-charts-core");function buildLineWithMarkerDefaults(t,e){if(t!=null)return{enabled:t.enabled??!0,stroke:t.stroke??e?.stroke??"transparent",strokeWidth:t.strokeWidth??e?.strokeWidth??1,strokeOpacity:t.strokeOpacity??e?.strokeOpacity??1,lineDash:t.lineDash??e?.lineDash??[]}}var SeriesTooltipInteraction=class extends import_ag_charts_core200.BaseProperties{constructor(){super(...arguments),this.enabled=!1}};__decorateClass([import_ag_charts_core200.Property],SeriesTooltipInteraction.prototype,"enabled",2);var SeriesTooltip=class extends import_ag_charts_core200.BaseProperties{constructor(){super(...arguments),this.interaction=new SeriesTooltipInteraction,this.position=new TooltipPosition,this.range=void 0,this.class=void 0}formatTooltip(t,e,i){const s=this.renderer==null?void 0:(0,import_ag_charts_core200.callWithContext)(t,this.renderer,i);if((0,import_ag_charts_core200.isString)(s)||(0,import_ag_charts_core200.isNumber)(s)||(0,import_ag_charts_core200.isDate)(s))return{type:"raw",rawHtmlString:(0,import_ag_charts_core200.toTextString)(s)};if(s!=null){const n=(0,import_ag_charts_core200.mergeDefaults)(s.symbol?.marker,e.symbol?.marker),r=s.symbol?.line??e.symbol?.line?(0,import_ag_charts_core200.mergeDefaults)(s.symbol?.line,e.symbol?.line):void 0,a=e.symbol||s.symbol?{marker:n,line:buildLineWithMarkerDefaults(r,n)}:void 0;return{type:"structured",...e,...s,symbol:a}}return{type:"structured",...e}}};__decorateClass([import_ag_charts_core200.Property],SeriesTooltip.prototype,"enabled",2),__decorateClass([import_ag_charts_core200.Property],SeriesTooltip.prototype,"showArrow",2),__decorateClass([import_ag_charts_core200.Property],SeriesTooltip.prototype,"renderer",2),__decorateClass([import_ag_charts_core200.Property],SeriesTooltip.prototype,"interaction",2),__decorateClass([import_ag_charts_core200.Property],SeriesTooltip.prototype,"position",2),__decorateClass([import_ag_charts_core200.Property],SeriesTooltip.prototype,"range",2),__decorateClass([import_ag_charts_core200.Property],SeriesTooltip.prototype,"class",2);function makeSeriesTooltip(){return new SeriesTooltip}var import_ag_charts_core204=require("ag-charts-core"),import_ag_charts_core201=require("ag-charts-core"),_CategoryAxis=class ze extends CartesianAxis{constructor(e,i=new CategoryScale,s=!0){super(e,i),this.groupPaddingInner=.1,this.includeInvisibleDomains=s,this.nice=!1}static is(e){return e instanceof ze}isCategoryLike(){return!0}hasDefinedDomain(){return!1}normaliseDataDomain(e){return{domain:e.domain,clipped:!1}}getUpdateTypeOnResize(){return this.bandAlignment==null||this.bandAlignment==="justify"?super.getUpdateTypeOnResize():import_ag_charts_core201.ChartUpdateType.PROCESS_DOMAIN}updateScale(){super.updateScale();let{paddingInner:e,paddingOuter:i}=this;if(!(0,import_ag_charts_core201.isFiniteNumber)(e)||!(0,import_ag_charts_core201.isFiniteNumber)(i)){const s=this.reduceBandScalePadding();e??(e=s.inner),i??(i=s.outer)}this.scale.paddingInner=e??0,this.scale.paddingOuter=i??0}calculateGridLines(e,i,s){const n=super.calculateGridLines(e,i,s);return this.interval.placement==="between"&&e.length>0&&n.push(super.calculateGridLine({index:e.at(-1).index+1,tickId:`after:${e.at(-1).tickId}`,translation:this.range[1]},e.length,i,s,e)),n}calculateGridLine({index:e,tickId:i,translation:s},n,r,a,o){const{gridLine:l,horizontal:c,interval:h,scale:u}=this;if(h.placement!=="between")return super.calculateGridLine({index:e,tickId:i,translation:s},n,r,a,o);const d=s<u.step?Math.floor(u.step/2):u.step/2,p=s-d,[g,f,y,m]=c?[p,Math.max(r,a),p,Math.min(r,a)]:[Math.min(r,a),p,Math.max(r,a),p],{style:b}=l,{stroke:v,strokeWidth:x=0,lineDash:S}=b[e%b.length]??{};return{tickId:i,offset:p,x1:g,y1:f,x2:y,y2:m,stroke:v,strokeWidth:x,lineDash:S}}calculateGridFills(e,i,s){const{horizontal:n,range:r,scale:a}=this;if(this.interval.placement!=="between")return super.calculateGridFills(e,i,s);const o=[];if(e.length==0)return o;const l=e[0],c=l.translation>r[0]+a.step/2,h=e.at(-1),u=n&&h.translation<r[1]-a.step/2;if(c){const d={tickId:`before:${l.tickId}`,translation:l.translation-a.step};o.push(this.calculateGridFill(d,-1,l.index-1,i,s,e))}if(o.push(...e.map((d,p)=>this.calculateGridFill(d,p,d.index,i,s,e))),u){const d={tickId:`after:${h.tickId}`,translation:h.translation+a.step};o.push(this.calculateGridFill(d,e.length,h.index+1,i,s,e))}return o}calculateGridFill({tickId:e,translation:i},s,n,r,a,o){const{gridLine:l,horizontal:c,interval:h,scale:u}=this;if(h.placement!=="between")return super.calculateGridFill({tickId:e,translation:i},s,n,r,a,o);const d=i-u.step/2,p=i+u.step/2,[g,f,y,m]=c?[d,Math.max(r,a),p,Math.min(r,a)]:[Math.min(r,a),d,Math.max(r,a),p],{fill:b,fillOpacity:v}=l.style[n%l.style.length]??{};return{tickId:e,x1:g,y1:f,x2:y,y2:m,fill:b,fillOpacity:v}}calculateTickLines(e,i,s=0){const n=super.calculateTickLines(e,i,s);return this.interval.placement==="between"&&e.length>0&&n.push(super.calculateTickLine({isPrimary:!1,tickId:`after:${e.at(-1)?.tickId}`,translation:this.range[1]},e.length,i,e,s)),n}calculateTickLine({isPrimary:e,tickId:i,translation:s},n,r,a,o=0){const{horizontal:l,interval:c,primaryTick:h,scale:u,tick:d}=this;if(c.placement!=="between")return super.calculateTickLine({isPrimary:e,tickId:i,translation:s},n,r,a,o);const p=e&&h?.enabled?h:d,g=-r*this.getTickSize(p),f=s<u.step?Math.floor(u.step/2):u.step/2,y=s-f,m=-r*(o+this.getTickSpacing(p)),[b,v,x,S]=l?[y,m,y,m+g]:[m,y,m+g,y],{stroke:I,width:D}=p;return{tickId:i,offset:y,x1:b,y1:v,x2:x,y2:S,stroke:I,strokeWidth:D,lineDash:void 0}}reduceBandScalePadding(){return this.boundSeries.reduce((e,i)=>{const s=i.getBandScalePadding?.();return s&&(e.inner>s.inner&&(e.inner=s.inner),e.outer<s.outer&&(e.outer=s.outer)),e},{inner:1/0,outer:-1/0})}tickFormatParams(e,i,s,n){return{type:"category"}}datumFormatParams(e,i,s,n,r){const{datum:a,seriesId:o,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p}=i;return Array.isArray(e)&&e.some(g=>typeof g!="string")&&(e=e.map(String)),{type:"category",value:e,datum:a,seriesId:o,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p}}};_CategoryAxis.className="CategoryAxis",_CategoryAxis.type="category",__decorateClass([import_ag_charts_core201.Property],_CategoryAxis.prototype,"groupPaddingInner",2),__decorateClass([import_ag_charts_core201.Property],_CategoryAxis.prototype,"paddingInner",2),__decorateClass([import_ag_charts_core201.Property],_CategoryAxis.prototype,"paddingOuter",2),__decorateClass([(0,import_ag_charts_core201.ProxyPropertyOnWrite)("layoutConstraints","align")],_CategoryAxis.prototype,"bandAlignment",2),__decorateClass([(0,import_ag_charts_core201.ActionOnSet)({newValue(t){t==null||t<=0?(this.layoutConstraints.width=100,this.layoutConstraints.unit="percent"):(this.layoutConstraints.width=t,this.layoutConstraints.unit="px",this.animationManager.skipCurrentBatch())}})],_CategoryAxis.prototype,"requiredRange",2);var CategoryAxis=_CategoryAxis,import_ag_charts_core202=require("ag-charts-core"),MAX_ANIMATABLE_NODES2=1e3,GroupedCategoryScale=class Ge extends CategoryScale{constructor(){super(...arguments),this.previousDomainJson=void 0,this.animatable=!0}static is(e){return e instanceof Ge}set domain(e){if(e.length<=MAX_ANIMATABLE_NODES2){const i=JSON.stringify(e);this.animatable=this.previousDomainJson===void 0||this.previousDomainJson===i,this.previousDomainJson=i}else this.animatable=this.previousDomainJson===void 0,this.previousDomainJson="";super.domain=e}get domain(){return super.domain}normalizeDomains(...e){const{domain:i}=super.normalizeDomains(...e);return{domain:i,animatable:!1}}findIndex(e){return super.findIndex(e)??this.getMatchIndex(e)}getMatchIndex(e){const i=JSON.stringify(e),s=this._domain.find(n=>JSON.stringify(n)===i);if(s!=null)return super.findIndex(s)}},Dimensions=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(t,e){t>this.right&&(this.right=t),t<this.left&&(this.left=t),e>this.bottom&&(this.bottom=e),e<this.top&&(this.top=e)}},TreeNode=class je{constructor(e="",i,s){this.label=e,this.parent=i,this.refId=s,this.position=0,this.subtreeLeft=Number.NaN,this.subtreeRight=Number.NaN,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.index=0,this.screen=0,this.depth=i?i.depth+1:0}insertTick(e,i){let s=this,n;for(let r=0;r<e.length;r++){const a=e[r],o=r!==e.length-1,{children:l}=s,c=l.find(h=>h.label===a);if(c&&o)s=c,n=c;else{const h=new je(a,s,i);h.index=l.length,l.push(h),o&&(s=h),n=h}}return n}getLeftSibling(){return this.index>0?this.parent?.children[this.index-1]:void 0}getLeftmostSibling(){return this.index>0?this.parent?.children[0]:void 0}nextLeft(){return this.children[0]}nextRight(){return this.children.at(-1)}getSiblings(){return this.parent?.children.filter((e,i)=>i!==this.index)??[]}};function ticksToTree(t){const e=t.reduce((n,r)=>Math.max(n,r.length),0),i=new TreeNode,s=new Map;for(let n=0;n<t.length;n++){const r=t[n];for(;r.length<e;)r.push("");const a=i.insertTick(r,n);a!=null&&s.set(r,a)}return{root:i,tickNodes:s}}function moveSubtree(t,e,i){const s=e.index-t.index,n=i/s;e.change-=n,e.shift+=i,t.change+=n,e.prelim+=i,e.mod+=i}function ancestor(t,e,i){return e.getSiblings().includes(t.ancestor)?t.ancestor:i}function executeShifts({children:t}){let e=0,i=0;for(let s=t.length-1;s>=0;s--){const n=t[s];n.prelim+=e,n.mod+=e,i+=n.change,e+=n.shift+i}}function apportion(t,e){const i=t.getLeftSibling();if(i){let s=t,n=t,r=i,a=n.getLeftmostSibling(),o=n.mod,l=s.mod,c=r.mod,h=a.mod;for(;r.nextRight()&&n.nextLeft();){r=r.nextRight(),n=n.nextLeft(),a=a.nextLeft(),s=s.nextRight(),s.ancestor=t;const u=r.prelim+c-(n.prelim+o)+1;u>0&&(moveSubtree(ancestor(r,t,e),t,u),o+=u,l+=u),c+=r.mod,o+=n.mod,h+=a.mod,l+=s.mod}r.nextRight()&&!s.nextRight()?s.mod+=c-l:(n.nextLeft()&&!a.nextLeft()&&(a.mod+=o-h),e=t)}return e}function firstWalk(t){const{children:e}=t;if(e.length){let[i]=e;for(const r of e)firstWalk(r),i=apportion(r,i);executeShifts(t);const s=(e[0].prelim+e.at(-1).prelim)/2,n=t.getLeftSibling();n?(t.prelim=n.prelim+1,t.mod=t.prelim-s):t.prelim=s}else{const i=t.getLeftSibling();t.prelim=i?i.prelim+1:0}}function secondWalk(t,e,i){t.position=t.prelim+e,i.insertNode(t);for(const s of t.children)secondWalk(s,e+t.mod,i)}function thirdWalk(t){const{children:e}=t;let i=0;for(const s of e)thirdWalk(s),s.children.length?i+=s.leafCount:i++;t.leafCount=i,e.length?(t.subtreeLeft=e[0].subtreeLeft,t.subtreeRight=e.at(-1).subtreeRight,t.position=(t.subtreeLeft+t.subtreeRight)/2):(t.subtreeLeft=t.position,t.subtreeRight=t.position)}function treeLayout(t){const e=new TreeLayout,{root:i,tickNodes:s}=ticksToTree(t);return firstWalk(i),secondWalk(i,-i.prelim,e),thirdWalk(i),{layout:e,tickNodes:s}}var TreeLayout=class{constructor(){this.dimensions=new Dimensions,this.nodes=[],this.depth=0}insertNode(t){this.depth<t.depth&&(this.depth=t.depth),this.dimensions.update(t.position,t.depth),this.nodes.push(t)}scaling(t,e){let i=1;if(t>0){const{left:s,right:n}=this.dimensions;n!==s&&(i=t/(n-s))}return e&&(i*=-1),i}},MIN_CATEGORY_SPACING=5,DepthLabelProperties=class extends import_ag_charts_core202.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.border=new LabelBorder}};__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"avoidCollisions",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"border",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"color",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"rotation",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"wrapping",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"truncate",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"fontSize",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"fontFamily",2),__decorateClass([import_ag_charts_core202.Property],DepthLabelProperties.prototype,"padding",2);var DepthTickProperties=class extends import_ag_charts_core202.BaseProperties{constructor(){super(...arguments),this.enabled=!0}};__decorateClass([import_ag_charts_core202.Property],DepthTickProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core202.Property],DepthTickProperties.prototype,"width",2),__decorateClass([import_ag_charts_core202.Property],DepthTickProperties.prototype,"stroke",2);var DepthProperties=class extends import_ag_charts_core202.BaseProperties{constructor(){super(...arguments),this.label=new DepthLabelProperties,this.tick=new DepthTickProperties}};__decorateClass([import_ag_charts_core202.Property],DepthProperties.prototype,"label",2),__decorateClass([import_ag_charts_core202.Property],DepthProperties.prototype,"tick",2);var GroupedCategoryAxis=class extends CategoryAxis{constructor(t){super(t,new GroupedCategoryScale),this.tickScale=new GroupedCategoryScale,this.computedLayout=void 0,this.tickTreeLayout=void 0,this.tickNodes=void 0,this.depthOptions=new import_ag_charts_core202.PropertiesArray(DepthProperties),this.includeInvisibleDomains=!0,this.tickScale.paddingInner=1,this.tickScale.paddingOuter=0}resizeTickTree(){if(!this.tickTreeLayout)return;const{nodes:t}=this.tickTreeLayout,{range:e,step:i,inset:s,bandwidth:n}=this.scale,r=Math.abs(e[1]-e[0])-i,a=this.tickTreeLayout.scaling(r,e[0]>e[1]),o=s+n/2;let l=0;for(const c of t){const h=c.position*a;l>h&&(l=h),c.screen=h+o}for(const c of t)c.screen-=l}getDepthOptionsMap(t){const e=[],{depthOptions:i,label:s}=this,n=this.horizontal?0:-90;for(let r=0;r<t;r++)e.push(i[r]?.label.enabled??s.enabled?{enabled:!0,spacing:i[r]?.label.spacing??s.spacing,wrapping:i[r]?.label.wrapping??s.wrapping,truncate:i[r]?.label.truncate??s.truncate,rotation:i[r]?.label.rotation??(r?n:s.rotation),avoidCollisions:i[r]?.label.avoidCollisions??s.avoidCollisions}:{enabled:!1,spacing:0,rotation:0,avoidCollisions:!1});return e}updateCategoryLabels(){this.computedLayout&&this.tickLabelGroupSelection.update(this.computedLayout.tickLabelLayout).each((t,e)=>{t.fill=e.color,t.text=e.text,t.textBaseline=e.textBaseline,t.textAlign=e.textAlign??"center",t.pointerEvents=e.textUntruncated==null?1:0,t.setFont(e),t.setBoxing(e)})}updateAxisLine(){this.computedLayout&&(this.lineNode.visible=this.line.enabled,this.lineNode.stroke=this.line.stroke,this.lineNode.strokeWidth=this.line.width)}computeLayout(){this.updateDirection(),this.updateScale();const{step:t}=this.scale,{title:e,label:i,range:s,depthOptions:n,horizontal:r,line:a}=this,o=this.chartLayout?.scrollbars?.[this.id],l=this.getScrollbarThickness(o);if(this.lineNode.datum=r?{x1:s[0],x2:s[1],y1:0,y2:0}:{x1:0,x2:0,y1:s[0],y2:s[1]},this.lineNode.setProperties({stroke:a.stroke,strokeWidth:a.enabled?a.width:0}),this.resizeTickTree(),!this.tickTreeLayout?.depth)return{bbox:BBox.zero,spacing:0,depthLabelMaxSize:{},tickLabelLayout:[]};const{depth:c,nodes:h}=this.tickTreeLayout,u=r?-i.getSideFlag():i.getSideFlag(),d=[],p=new Map,g=new Map,f=new TransformableText,y=this.getDepthOptionsMap(c),m=u*(y[0].spacing+this.getTickSpacing()+l),b=this.tickFormatter(this.scale.domain,this.scale.domain,!1),v=(O,R)=>{const _=c-O.depth;if(!y[_]?.enabled||!(0,import_ag_charts_core202.inRange)(O.screen,s))return!1;let P=(O.leafCount||1)*t;if(P<MIN_CATEGORY_SPACING)return!1;const F=b(O.label,R-1);let V=F;const B=this.getLabelStyles({value:O.index,formattedValue:V,depth:_},n[_]?.label);if(i.avoidCollisions){const j=y[_].rotation;let Z=this.thickness;if(j!=null){const $=(0,import_ag_charts_core202.getMaxInnerRectSize)(j,P,Z);P=$.width,Z=$.height}const z={font:B,textWrap:y[_].wrapping,overflow:y[_].truncate?"ellipsis":"hide",maxWidth:P,maxHeight:Z};V=(0,import_ag_charts_core202.wrapTextOrSegments)(V,z)||V}return V!==F&&(0,import_ag_charts_core202.isTruncated)(V)?g.set(R,(0,import_ag_charts_core202.toPlainText)(F)):g.delete(R),f.x=r?O.screen:m,f.y=r?m:O.screen,f.rotation=0,f.fill=B.color,f.text=V,f.textAlign="center",f.textBaseline=i.parallel?"top":"bottom",f.setFont(B),f.setBoxing(B),!0},x={};for(const[O,R]of h.entries()){const _=c-R.depth;if(x[_]??(x[_]=0),!R.children.length&&t<MIN_CATEGORY_SPACING||!v(R,O)||!f.getBBox())continue;p.set(O,f.getBBox()),f.rotation=(0,import_ag_charts_core202.normalizeAngle360FromDegrees)(y[_]?.rotation);const{width:V,height:B}=f.getBBox(),j=r?B:V;x[_]<j&&(x[_]=j)}const S=(0,import_ag_charts_core202.createIdsGenerator)(),I=O=>{if(O===0)return 0;let R=x[0];for(let _=1;_<=O;_++)R+=y[_].spacing,_!==O&&(R+=x[_]);return R};for(const[O,R]of h.entries()){if(O===0)continue;const _=v(R,O),P=!R.children.length,F=c-R.depth;if(P&&t<MIN_CATEGORY_SPACING||!_)continue;const V=(0,import_ag_charts_core202.normalizeAngle360FromDegrees)(y[F].rotation),B=p.get(O);if(!B)continue;const{width:j,height:Z}=B,z=I(F);if(f.textAlign="center",f.textBaseline="middle",f.rotation=V,r?(f.y+=(z+(0,import_ag_charts_core202.angularPadding)(j/2,Z/2,V))*u,f.rotationCenterX=R.screen,f.rotationCenterY=f.y):(f.x+=z*u+(0,import_ag_charts_core202.angularPadding)((y[F].spacing*u+j)/2,i.mirrored?j:0,V)-j/2,f.rotationCenterX=f.x,f.rotationCenterY=R.screen),y[F].avoidCollisions){const{width:J,height:de}=f.getBBox(),pe=r?J:de,ge=P?t:R.leafCount*t;if(pe>ge){p.delete(O);continue}}const $=f.getPlainText(),ee=f.getBoxingProperties();d.push({text:$,textUntruncated:g.get(O),visible:!0,tickId:S($),range:this.scale.range,border:ee.border,color:f.fill,cornerRadius:ee.cornerRadius,fill:ee.fill,fontFamily:f.fontFamily,fontSize:f.fontSize,fontStyle:f.fontStyle,fontWeight:f.fontWeight,padding:ee.padding,rotation:f.rotation,rotationCenterX:f.rotationCenterX,rotationCenterY:f.rotationCenterY,textAlign:f.textAlign,textBaseline:f.textBaseline,x:f.x,y:f.y}),p.set(O,Transformable.toCanvas(f))}let D=x[0];for(let O=0;O<c;O++)D+=y[O].spacing,O!==0&&(D+=x[O]);const T=D+l,A=[this.lineNodeBBox(),BBox.merge(p.values()),new BBox(0,0,T*u,0)],L=BBox.merge(A),N=r?L.height:L.width,{spacing:k,scrollbarLayout:w}=this.applyScrollbarLayout(A,N,o);this.layout.labelThickness=N,this.layout.scrollbar=w,e.enabled&&A.push(this.titleBBox(this.scale.domain,k));const E=BBox.merge(A);return this.layoutCrossLines(),{bbox:E,spacing:k,depthLabelMaxSize:x,tickLabelLayout:d}}update(){if(!this.computedLayout)return;this.scale.animatable||this.moduleCtx.animationManager.skipCurrentBatch();const{tickScale:t,tick:e,gridLine:i,gridLength:s,visibleRange:n,tickTreeLayout:r}=this;if(!r)return;const{depthLabelMaxSize:a,spacing:o}=this.computedLayout,{depth:l}=r,c=this.getDepthOptionsMap(l),h=this.chartLayout?.scrollbars?.[this.id],u=this.getScrollbarThickness(h),{position:d,horizontal:p,gridPadding:g}=this,f=d==="bottom"||d==="right"?-1:1,y=g,m=f*s-g,b={nice:[!1,!1],interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},{ticks:v}=t.ticks(b,void 0,n),{tickInfos:x,minSpacingByDepth:S}=buildTickInfos(v,this.tickNodes,t,l),I=getMinDepthToShow(S),D=selectVisibleTickInfos(x,I,l,S),T=D.map(({tickLabel:A,position:L},N)=>({index:t.findIndex(A),tickId:createDatumId(N,...A),translation:Math.round(L)}));this.gridLineGroupSelection.update(i.enabled&&s?this.calculateGridLines(T,y,m):[]),this.gridFillGroupSelection.update(i.enabled&&s?this.calculateGridFills(T,y,m):[]),this.tickLineGroupSelection.update(e.enabled?D.map(({depth:A},L)=>{const{tickId:N,translation:k}=T[L],w=this.depthOptions[A]?.tick;let E=a[0];for(let z=0;z<=A;z++)E+=c[z].spacing,z!==0&&(E+=a[z]);const O=w?.stroke??e.stroke,R=w?.enabled===!1?0:w?.width??e.width,_=-f*E,P=-f*(u+this.getTickSpacing()),[F,V,B,j]=p?[k,P,k,P+_]:[P,k,P+_,k];return{tickId:N,offset:k,x1:F,y1:V,x2:B,y2:j,stroke:O,strokeWidth:R,lineDash:void 0}}):[]),this.updatePosition(),this.updateCategoryLabels(),this.updateAxisLine(),this.updateGridLines(),this.updateGridFills(),this.updateTickLines(),this.updateTitle(this.scale.domain,o),this.updateCrossLines(),this.resetSelectionNodes()}calculateLayout(t,e){this.chartLayout=e;const{depthLabelMaxSize:i,tickLabelLayout:s,spacing:n,bbox:r}=this.computeLayout();return this.computedLayout={depthLabelMaxSize:i,tickLabelLayout:s,spacing:n},{bbox:r,niceDomain:this.scale.domain}}onGridVisibilityChange(){super.onGridVisibilityChange(),this.tickLabelGroupSelection.clear()}updateScale(){super.updateScale(),this.tickScale.range=this.scale.range,this.scale.paddingOuter=this.scale.paddingInner/2}processData(){const{direction:t}=this,e=this.boundSeries.filter(l=>l.visible).flatMap(l=>(0,import_ag_charts_core202.extractDomain)(l.getDomain(t)));this.dataDomain={domain:(0,import_ag_charts_core202.extent)(e)??this.filterDuplicateArrays(e),clipped:!1},this.isReversed()&&this.dataDomain.domain.reverse();const i=this.dataDomain.domain.map(convertIntegratedCategoryValue),{layout:s,tickNodes:n}=treeLayout(i);this.tickTreeLayout=s,this.tickNodes=n;const r=[];for(const l of this.tickTreeLayout.nodes)l.leafCount||l.refId==null||r.push(this.dataDomain.domain[l.refId]);const a=(0,import_ag_charts_core202.sortBasedOnArray)(this.dataDomain.domain,r);this.scale.domain=a;const o=a.map(convertIntegratedCategoryValue);o.push([""]),this.tickScale.domain=o}filterDuplicateArrays(t){const e=new Set;return t.filter(i=>{const s=(0,import_ag_charts_core202.isArray)(i)?JSON.stringify(i):i;return e.has(s)?!1:(e.add(s),!0)})}};GroupedCategoryAxis.className="GroupedCategoryAxis",GroupedCategoryAxis.type="grouped-category",__decorateClass([import_ag_charts_core202.Property],GroupedCategoryAxis.prototype,"depthOptions",2);function separatorDepth2(t){let e=0,i=t;for(;i?.index===0;)e+=1,i=i.parent;return e}function buildTickInfos(t,e,i,s){const n=new Array(t.length),r=new Array(s).fill(1/0),a=new Array(s).fill(Number.NaN);for(let o=0;o<t.length;o++){const l=t[o],c=e?.get(l),h=c==null?s-1:Math.min(separatorDepth2(c),s-1),u=i.convert(l);if(n[o]={tickLabel:l,depth:h,position:u},!!Number.isFinite(u))for(let d=0;d<=h;d++){const p=a[d];Number.isFinite(p)&&(r[d]=Math.min(r[d],Math.abs(u-p))),a[d]=u}}return{tickInfos:n,minSpacingByDepth:r}}function getMinDepthToShow(t){for(let e=0;e<t.length;e++){const i=t[e];if(!Number.isFinite(i)||i>=MIN_CATEGORY_SPACING)return e}return t.length}function getTickStepForSpacing(t){return!Number.isFinite(t)||t<=0?1:Math.max(1,Math.ceil(MIN_CATEGORY_SPACING/t))}function selectVisibleTickInfos(t,e,i,s){if(e<=0)return t;const n=Math.min(e-1,i-1);if(n<0)return t;const r=getTickStepForSpacing(s[n]),a=[];let o=0;for(const l of t){if(l.depth>=e){a.push(l);continue}l.depth===n&&(o%r===0&&a.push(l),o++)}return a}function convertIntegratedCategoryValue(t){return(0,import_ag_charts_core202.toArray)((0,import_ag_charts_core202.isObject)(t)&&"value"in t?t.value:t)}var import_ag_charts_core203=require("ag-charts-core");function addHitTestersToQuadtree(t,e){for(const i of e){const s=i.datum;s===void 0?import_ag_charts_core203.Logger.error("undefined datum"):t.addValue(i,s)}}function findQuadtreeMatch(t,e){const{x:i,y:s}=e,{nearest:n,distanceSquared:r}=t.getQuadTree().find(i,s);if(n!==void 0)return{datum:n.value,distance:Math.sqrt(r)}}var AbstractBarSeriesProperties=class extends CartesianSeriesProperties{constructor(){super(...arguments),this.direction="vertical",this.width=void 0,this.widthRatio=void 0}};__decorateClass([import_ag_charts_core204.Property],AbstractBarSeriesProperties.prototype,"direction",2),__decorateClass([import_ag_charts_core204.Property],AbstractBarSeriesProperties.prototype,"width",2),__decorateClass([import_ag_charts_core204.Property],AbstractBarSeriesProperties.prototype,"widthRatio",2);var AbstractBarSeries=class extends CartesianSeries{constructor(){super(...arguments),this.smallestDataInterval=void 0,this.largestDataInterval=void 0}padBandExtent(t,e){const i=typeof e=="boolean"?1:.5,s=(0,import_ag_charts_core204.isFiniteNumber)(this.smallestDataInterval)?this.smallestDataInterval*i:0,n=(0,import_ag_charts_core204.extent)(t)??[Number.NaN,Number.NaN];return typeof e=="boolean"?n[e?0:1]-=(e?1:-1)*s:(n[0]-=s,n[1]+=s),fixNumericExtent(n)}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return this.properties.direction==="vertical"}getBarDirection(){return this.shouldFlipXY()?import_ag_charts_core204.ChartAxisDirection.X:import_ag_charts_core204.ChartAxisDirection.Y}getCategoryDirection(){return this.shouldFlipXY()?import_ag_charts_core204.ChartAxisDirection.Y:import_ag_charts_core204.ChartAxisDirection.X}getValueAxis(){const t=this.getBarDirection();return this.axes[t]}getCategoryAxis(){const t=this.getCategoryDirection();return this.axes[t]}getMinimumRangeSeries(t){const{width:e}=this.properties;if(e==null||!this.getCategoryAxis())return;const{index:s}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);t[s]=Math.max(t[s]??0,e)}getMinimumRangeChart(t){if(t.length===0)return 0;const e=this.getCategoryAxis();if(!(e instanceof GroupedCategoryAxis||e instanceof CategoryAxis))return 0;const i=this.data?.netSize()??0;if(i===0)return 0;const s=this.getBandScalePadding(),{paddingInner:n=s.inner,paddingOuter:r=s.outer,groupPaddingInner:a}=e,o=t.reduce((d,p)=>d+p,0),l=o/t.length,{visibleGroupCount:c}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this),h=o+a*l*(c-1),u=(i-n+r*2)/(1-n);return h*u}validateCreateNodeDataPreconditions(){const t=this.getCategoryAxis(),e=this.getValueAxis();if(!(!t||!e||!this.dataModel||!this.processedData))return{xAxis:t,yAxis:e}}getBandwidth(t,e){return ContinuousScale.is(t.scale)?t.scale.calcBandwidth(this.smallestDataInterval,e):t.scale.bandwidth}xCoordinateRange(t){const e=this.axes[this.getCategoryDirection()],i=e.scale,s=this.getBandwidth(e,0)??0,n=ContinuousScale.is(i)?s*-.5:0,r=i.convert(t)+n;return[r,r+s]}yCoordinateRange(t){const i=this.axes[this.getBarDirection()].scale,s=t.map(n=>i.convert(n));if(s.length===1){const n=i.convert(0);return[Math.min(s[0],n),Math.max(s[0],n)]}return[Math.min(...s),Math.max(...s)]}getBarDimensions(){const t=this.getCategoryAxis(),e=this.getBandwidth(t)??0;this.ctx.seriesStateManager.updateGroupScale(this,e,t);const i=this.getGroupOffset(),s=this.getBarWidth(),n=this.getBarOffset(s);return{groupOffset:i,barOffset:n,barWidth:s}}getGroupOffset(){return this.ctx.seriesStateManager.getGroupOffset(this)}getBarOffset(t){const e=this.ctx.seriesStateManager.getGroupScale(this),i=this.getCategoryAxis();let s=0;ContinuousScale.is(i.scale)?s=-t/2:this.seriesGrouping==null&&e?s=(this.getGroupScaleRangeWidth(e)-t)/2:e&&this.properties.widthRatio!=null&&(s=(e.bandwidth-t)/2);const n=this.ctx.seriesStateManager.getStackOffset(this,t);return s+n}getBarWidth(){const{seriesGrouping:t}=this,{width:e}=this.properties;let{widthRatio:i}=this.properties;const s=this.ctx.seriesStateManager.getGroupScale(this),n=s?.bandwidth??0;if(t==null&&(i??(i=1)),i!=null){let r=e;return t==null&&r==null&&s&&(r=this.getGroupScaleRangeWidth(s)),r==null&&n<1&&s?s.rawBandwidth:(r??n)*i}return e??(n<1&&s?s.rawBandwidth:n)}getGroupScaleRangeWidth(t){let e=t.range[1]-t.range[0];return t.round&&e>0&&(e=Math.floor(e)),e}resolveKeyDirection(t){return this.getBarDirection()===import_ag_charts_core204.ChartAxisDirection.X?t===import_ag_charts_core204.ChartAxisDirection.X?import_ag_charts_core204.ChartAxisDirection.Y:import_ag_charts_core204.ChartAxisDirection.X:t}initQuadTree(t){addHitTestersToQuadtree(t,this.datumNodesIter())}pickNodeClosestDatum(t){return findQuadtreeMatch(this,t)}},import_ag_charts_core207=require("ag-charts-core"),import_ag_charts_core205=require("ag-charts-core");function lerp(t,e,i){return(e-t)*i+t}function linearSupertype(t,e){const{x0:i,y0:s,x1:n,y1:r}=t,o=(r-s)/(n-i)*(e-i)+s;return{leftCp1x:i,leftCp1y:s,leftCp2x:e,leftCp2y:o,stepX:e,stepY0:o,stepY1:o,rightCp1x:e,rightCp1y:o,rightCp2x:n,rightCp2y:r}}function bezierSupertype(t,e){const{cp0x:i,cp0y:s,cp1x:n,cp1y:r,cp2x:a,cp2y:o,cp3x:l,cp3y:c}=t,h=(0,import_ag_charts_core205.solveBezier)(i,n,a,l,e),[u,d]=(0,import_ag_charts_core205.splitBezier2D)(i,s,n,r,a,o,l,c,h),p=u[3].y;return{leftCp1x:u[1].x,leftCp1y:u[1].y,leftCp2x:u[2].x,leftCp2y:u[2].y,stepX:e,stepY0:p,stepY1:p,rightCp1x:d[1].x,rightCp1y:d[1].y,rightCp2x:d[2].x,rightCp2y:d[2].y}}function stepSupertype(t){const{x0:e,y0:i,x1:s,y1:n,stepX:r}=t;return{leftCp1x:(e+r)/2,leftCp1y:i,leftCp2x:(e+r)/2,leftCp2y:i,stepX:r,stepY0:i,stepY1:n,rightCp1x:(r+s)/2,rightCp1y:n,rightCp2x:(r+s)/2,rightCp2y:n}}function spanSupertype(t,e){return t.type==="linear"?linearSupertype(t,e):t.type==="cubic"?bezierSupertype(t,e):t.type==="step"?stepSupertype(t):linearSupertype(t,e)}function plotStart(t,e,i,s,n,r,a){switch(e){case import_ag_charts_core205.SpanJoin.MoveTo:a?t.moveTo(n,r):t.moveTo(i,s);break;case import_ag_charts_core205.SpanJoin.LineTo:a?t.lineTo(n,r):t.lineTo(i,s);break;case import_ag_charts_core205.SpanJoin.Skip:break}}function plotLinear(t,e,i,s,n,r){r?t.lineTo(e,i):t.lineTo(s,n)}function plotCubic(t,e,i,s,n,r,a,o,l,c){c?t.cubicCurveTo(r,a,s,n,e,i):t.cubicCurveTo(s,n,r,a,o,l)}function plotStep(t,e,i,s,n,r,a){a?(t.lineTo(r,n),t.lineTo(r,i),t.lineTo(e,i)):(t.lineTo(r,i),t.lineTo(r,n),t.lineTo(s,n))}function plotMultiLine(t,e,i,s,n,r,a){if(a){for(let o=r.length-1;o>=0;o--){const{x:l,y:c}=r[o];t.lineTo(l,c)}t.lineTo(e,i)}else{for(const{x:o,y:l}of r)t.lineTo(o,l);t.lineTo(s,n)}}function plotSpan(t,e,i,s){const[n,r]=(0,import_ag_charts_core205.spanRange)(e);switch(plotStart(t,i,n.x,n.y,r.x,r.y,s),e.type){case"linear":plotLinear(t,e.x0,e.y0,e.x1,e.y1,s);break;case"cubic":plotCubic(t,e.cp0x,e.cp0y,e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y,s);break;case"step":plotStep(t,e.x0,e.y0,e.x1,e.y1,e.stepX,s);break;case"multi-line":plotMultiLine(t,e.x0,e.y0,e.x1,e.y1,e.midPoints,s);break}}function interpolatedSpanRange(t,e,i){const[s,n]=(0,import_ag_charts_core205.spanRange)(t),[r,a]=(0,import_ag_charts_core205.spanRange)(e),o=lerp(s.x,r.x,i),l=lerp(s.y,r.y,i),c=lerp(n.x,a.x,i),h=lerp(n.y,a.y,i);return[{x:o,y:l},{x:c,y:h}]}function plotInterpolatedSpans(t,e,i,s,n,r){const[{x:a,y:o},{x:l,y:c}]=interpolatedSpanRange(e,i,s);if(plotStart(t,n,a,o,l,c,r),e.type==="cubic"&&i.type==="cubic"){const h=lerp(e.cp1x,i.cp1x,s),u=lerp(e.cp1y,i.cp1y,s),d=lerp(e.cp2x,i.cp2x,s),p=lerp(e.cp2y,i.cp2y,s);plotCubic(t,a,o,h,u,d,p,l,c,r)}else if(e.type==="step"&&i.type==="step"){const h=lerp(e.stepX,i.stepX,s);plotStep(t,a,o,l,c,h,r)}else if(e.type==="linear"&&i.type==="linear")plotLinear(t,a,o,l,c,r);else{let h;e.type==="step"?h=e.stepX:i.type==="step"?h=i.stepX:h=(a+l)/2;const u=spanSupertype(e,h),d=spanSupertype(i,h),p=lerp(u.leftCp1x,d.leftCp1x,s),g=lerp(u.leftCp1y,d.leftCp1y,s),f=lerp(u.leftCp2x,d.leftCp2x,s),y=lerp(u.leftCp2y,d.leftCp2y,s),m=lerp(u.stepX,d.stepX,s),b=lerp(u.stepY0,d.stepY0,s),v=lerp(u.stepY1,d.stepY1,s),x=lerp(u.rightCp1x,d.rightCp1x,s),S=lerp(u.rightCp1y,d.rightCp1y,s),I=lerp(u.rightCp2x,d.rightCp2x,s),D=lerp(u.rightCp2y,d.rightCp2y,s);r?(t.cubicCurveTo(I,D,x,S,m,v),t.lineTo(m,b),t.cubicCurveTo(f,y,p,g,a,o)):(t.cubicCurveTo(p,g,f,y,m,b),t.lineTo(m,v),t.cubicCurveTo(x,S,I,D,l,c))}}var import_ag_charts_core206=require("ag-charts-core"),MAX_CATEGORIES=1e3,CollapseMode=(t=>(t[t.Zero=0]="Zero",t[t.Split=1]="Split",t))(CollapseMode||{});function integratedCategoryMatch(t,e){return t==null||e==null||typeof t!="object"||typeof e!="object"?!1:"id"in t&&"id"in e?t.id===e.id:t.toString()===e.toString()}function toAxisValue(t){return(0,import_ag_charts_core206.transformIntegratedCategoryValue)(t).valueOf()}function scale(t,e){if(!e)return Number.NaN;if(t instanceof Date&&(t=t.getTime()),e.type==="continuous"&&typeof t=="number")return(t-e.domain[0])/(e.domain[1]-e.domain[0])*(e.range[1]-e.range[0])+e.range[0];if(e.type==="log"&&typeof t=="number")return e.convert(t);if(e.type!=="category")return Number.NaN;if((0,import_ag_charts_core206.isUnitTimeCategoryScaling)(e)){if(typeof t=="number"){const{firstBandTime:n,intervalMs:r,bandCount:a,inset:o,step:l}=e,c=Math.round((t-n)/r);if(c>=0&&c<a)return o+l*c}return Number.NaN}const i=toAxisValue(t);let s=e.domain.findIndex(n=>toAxisValue(n)===i);return s===-1&&(s=e.domain.findIndex(n=>integratedCategoryMatch(t,n))),s>=0?e.inset+e.step*s:Number.NaN}function getAxisIndices({data:t},e){return t.map((i,s)=>({xValue0Index:e.indexOf(toAxisValue(i.xValue0)),xValue1Index:e.indexOf(toAxisValue(i.xValue1)),datumIndex:s}))}function isValidScaling(t){return Object.values(t.scales).every(e=>e.type==="category"?(0,import_ag_charts_core206.isUnitTimeCategoryScaling)(e)?e.bandCount<MAX_CATEGORIES:e.domain.length<MAX_CATEGORIES:!0)}function validateCategorySorting(t,e){const i=e.scales.x,s=t.scales.x;if(i?.type!=="category"||s?.type!=="category"||(0,import_ag_charts_core206.isUnitTimeCategoryScaling)(i)||(0,import_ag_charts_core206.isUnitTimeCategoryScaling)(s))return!0;let n=-1/0;for(const r of i.domain){const a=scale(r,s);if(Number.isFinite(a)){if(a<n)return!1;n=a}}return!0}function validateAxisEntriesOrder(t,e){let i=-1/0;for(const s of t){const n=scale(s.value,e.scales.x);if(Number.isFinite(n)){if(n<i)return!1;i=n}}return!0}function spanAxisContext(t,e){const i=new Map;for(const{xValue0:h,xValue1:u}of t.data){const d=toAxisValue(h),p=toAxisValue(u);i.set(d,h).set(p,u)}const s=Array.from(i,([h,u])=>({axisValue:h,value:u}));s.sort((h,u)=>scale(h.value,t.scales.x)-scale(u.value,t.scales.x));const n=[];for(const{xValue0:h,xValue1:u}of e.data){const d=toAxisValue(h),p=toAxisValue(u);i.has(d)||(i.set(d,h),n.push({axisValue:d,value:h})),i.has(p)||(i.set(p,u),n.push({axisValue:p,value:u}))}n.sort((h,u)=>scale(h.value,e.scales.x)-scale(u.value,e.scales.x));const r=s;let a=0;for(const h of n){for(let u=r.length-1;u>=a;u-=1){const d=scale(h.value,e.scales.x),p=scale(r[u].value,e.scales.x);if(d>p){a=u+1;break}}r.splice(a,0,h),a+=1}if(!validateAxisEntriesOrder(r,e))return;const o=r.map(h=>h.axisValue),l=getAxisIndices(e,o),c=getAxisIndices(t,o);return{axisValues:o,oldDataAxisIndices:l,newDataAxisIndices:c}}function clipSpan(t,e,i,s,n){if(n.xValue1Index===n.xValue0Index+1)return t;const r=(0,import_ag_charts_core206.spanRange)(t);let a,o;if(e.scales.x?.type==="category"){const l=(r[1].x-r[0].x)/(n.xValue1Index-n.xValue0Index);a=r[0].x+(s-n.xValue0Index)*l,o=a+l}else{const l=i[s],c=i[s+1];a=scale(l,e.scales.x),o=scale(c,e.scales.x)}return(0,import_ag_charts_core206.clipSpanX)(t,a,o)}function axisZeroSpan(t,e){const[i,s]=(0,import_ag_charts_core206.spanRange)(t),n=scale(0,e.scales.y);return(0,import_ag_charts_core206.rescaleSpan)(t,{x:i.x,y:n},{x:s.x,y:n})}function collapseSpanToMidpoint(t){const[e,i]=(0,import_ag_charts_core206.spanRange)(t);return(0,import_ag_charts_core206.collapseSpanToPoint)(t,{x:(e.x+i.x)/2,y:(e.y+i.y)/2})}function collapseSpan(t,e,i,s,n,r){let a,o;if(n.xValue0Index>=r.xValue1Index){const u=s.findLast(p=>p.xValue1Index<=r.xValue1Index)?.datumIndex,d=u==null?void 0:i.data[u];a=d?.xValue1,o=d?.yValue1}else if(n.xValue0Index<=r.xValue0Index){const u=s.find(p=>p.xValue0Index>=r.xValue0Index)?.datumIndex,d=u==null?void 0:i.data[u];a=d?.xValue0,o=d?.yValue0}if(a==null||o==null)switch(e){case 0:return axisZeroSpan(t,i);case 1:return collapseSpanToMidpoint(t)}const l=scale(a,i.scales.x),c=scale(o,i.scales.y),h={x:l,y:c};return(0,import_ag_charts_core206.rescaleSpan)(t,h,h)}function zeroDataSpan(t,e){if(e==null)return;const i=toAxisValue(t.xValue0),s=toAxisValue(t.xValue1);return e.find(n=>toAxisValue(n.xValue0)===i&&toAxisValue(n.xValue1)===s)?.span}function addSpan(t,e,i,s,n,r,a){const o=t.data[s.datumIndex],l=o.span,c=zeroDataSpan(o,n);if(c==null){const h=collapseSpan(l,e,t,i,s,r);a.added.push({from:h,to:l})}else a.removed.push({from:c,to:c}),a.moved.push({from:c,to:l}),a.added.push({from:l,to:l})}function removeSpan(t,e,i,s,n,r,a){const o=t.data[s.datumIndex],l=o.span,c=zeroDataSpan(o,n);if(c==null){const h=collapseSpan(l,e,t,i,s,r);a.removed.push({from:l,to:h})}else a.removed.push({from:l,to:l}),a.moved.push({from:l,to:c}),a.added.push({from:c,to:c})}function alignSpanToContainingSpan(t,e,i,s,n){const r=s.scales.x,a=e[n.xValue0Index],o=e[n.xValue1Index];let l,c;if(r?.type==="continuous"||r?.type==="log"?(l=i.data.findLast(m=>toAxisValue(m.xValue0)<=a),c=i.data.find(m=>toAxisValue(m.xValue1)>=o)):(l=i.data.find(m=>toAxisValue(m.xValue0)===a),c=i.data.find(m=>toAxisValue(m.xValue1)===o)),l==null||c==null)return;const[{x:h},{x:u}]=(0,import_ag_charts_core206.spanRange)(t),d=scale(l.xValue0,i.scales.x),p=scale(l.yValue0,i.scales.y),g=scale(c.xValue1,i.scales.x),f=scale(c.yValue1,i.scales.y);let y=s.data[n.datumIndex].span;return y=(0,import_ag_charts_core206.rescaleSpan)(y,{x:d,y:p},{x:g,y:f}),y=(0,import_ag_charts_core206.clipSpanX)(y,h,u),y}function appendSpanPhases(t,e,i,s,n,r,a,o,l){const c=n+1,h=a.find(v=>v.xValue0Index<=n&&v.xValue1Index>=c),u=r.find(v=>v.xValue0Index<=n&&v.xValue1Index>=c),d=e.zeroData,p=t.zeroData;if(h==null&&u!=null){addSpan(t,i,r,u,d,o,l);return}else if(h!=null&&u==null){removeSpan(e,i,a,h,p,o,l);return}else if(h==null||u==null)return;let g;h.xValue0Index===u.xValue0Index&&h.xValue1Index===u.xValue1Index?g=0:h.xValue0Index<=u.xValue0Index&&h.xValue1Index>=u.xValue1Index?g=-1:h.xValue0Index>=u.xValue0Index&&h.xValue1Index<=u.xValue1Index?g=1:g=0;const f=e.data[h.datumIndex],y=clipSpan(f.span,e,s,n,h),m=t.data[u.datumIndex],b=clipSpan(m.span,t,s,n,u);if(g===1){const v=alignSpanToContainingSpan(y,s,e,t,u);v==null?removeSpan(e,i,a,h,p,o,l):(l.removed.push({from:y,to:v}),l.moved.push({from:v,to:b}),l.added.push({from:b,to:b}))}else if(g===-1){const v=alignSpanToContainingSpan(b,s,t,e,h);v==null?addSpan(t,i,r,u,d,o,l):(l.removed.push({from:y,to:y}),l.moved.push({from:y,to:v}),l.added.push({from:v,to:b}))}else l.removed.push({from:y,to:y}),l.moved.push({from:y,to:b}),l.added.push({from:b,to:b})}function phaseAnimation(t,e,i,s){const n={removed:[],moved:[],added:[]},{axisValues:r,oldDataAxisIndices:a,newDataAxisIndices:o}=t,l={xValue0Index:Math.max(a.at(0)?.xValue0Index??-1/0,o.at(0)?.xValue0Index??-1/0),xValue1Index:Math.min(a.at(-1)?.xValue1Index??1/0,o.at(-1)?.xValue1Index??1/0)};for(let c=0;c<r.length-1;c+=1)appendSpanPhases(e,i,s,r,c,o,a,l,n);return n}function replotXAnimation(t,e){const i=[],s=[],n=[];for(let r=0;r<e.data.length;r+=1){const a=e.data[r].span,o=t.data[r].span;i.push({from:a,to:a}),s.push({from:a,to:o}),n.push({from:o,to:o})}return{removed:i,moved:s,added:n}}function resetSpan(t,e,i){const{span:s}=e;switch(i){case 0:return zeroDataSpan(e,t.zeroData)??axisZeroSpan(s,t);case 1:return collapseSpanToMidpoint(s)}}function resetAnimation(t,e,i){const s=[],n=[];for(const r of e.data){const a=r.span,o=resetSpan(e,r,i);n.push({from:a,to:o})}for(const r of t.data){const a=r.span,o=resetSpan(t,r,i);s.push({from:o,to:a})}return{removed:n,moved:[],added:s}}function pairUpSpans(t,e,i){if(!isValidScaling(t)||!isValidScaling(e)||!validateCategorySorting(t,e))return;const s=spanAxisContext(t,e);return s==null?resetAnimation(t,e,i):s.axisValues.length===s.oldDataAxisIndices.length+s.newDataAxisIndices.length+2?replotXAnimation(t,e):phaseAnimation(s,t,e,i)}function interpolatePoints(t,e){const i=t.map(n=>n.point);let s=(0,import_ag_charts_core207.linearPoints)(i);switch(e.type){case"linear":break;case"smooth":s=(0,import_ag_charts_core207.smoothPoints)(i,e.tension);break;case"step":s=(0,import_ag_charts_core207.stepPoints)(i,e.position);break}return s.map(function(r,a){return{span:r,xValue0:t[a].xDatum,yValue0:t[a].yDatum,xValue1:t[a+1].xDatum,yValue1:t[a+1].yDatum}})}function pointsEq(t,e,i=.001){return Math.abs(t.x-e.x)<i&&Math.abs(t.y-e.y)<i}function plotLinePathStroke({path:t},e){let i;for(const{span:s}of e){const[n,r]=(0,import_ag_charts_core207.spanRange)(s),a=i!=null&&pointsEq(i,n)?import_ag_charts_core207.SpanJoin.Skip:import_ag_charts_core207.SpanJoin.MoveTo;plotSpan(t,s,a,!1),i=r}}function plotInterpolatedLinePathStroke(t,e,i){let s;for(const n of i){const[r,a]=interpolatedSpanRange(n.from,n.to,t),o=s!=null&&pointsEq(s,r)?import_ag_charts_core207.SpanJoin.Skip:import_ag_charts_core207.SpanJoin.MoveTo;plotInterpolatedSpans(e.path,n.from,n.to,t,o,!1),s=a}}function prepareLinePathStrokeAnimationFns(t,e,i,s=1){const n=(l,c)=>plotInterpolatedLinePathStroke(l,c,e.removed),r=(l,c)=>plotInterpolatedLinePathStroke(l,c,e.moved),a=(l,c)=>plotInterpolatedLinePathStroke(l,c,e.added),o=prepareLinePathPropertyAnimation(t,i,s);return{status:t,path:{addPhaseFn:a,updatePhaseFn:r,removePhaseFn:n},pathProperties:o}}function prepareLinePathPropertyAnimation(t,e,i=1){const s=e==="none"?"updated":t,n={fromFn(r,a){const o={phase:NODE_UPDATE_STATE_TO_PHASE_MAPPING[s]},l=r.previousDatum??a;return l!=null&&(o.segments=l),t==="removed"?o.finish={visible:!1}:t==="added"&&(o.start={visible:!0}),o},toFn(r,a){const o={phase:NODE_UPDATE_STATE_TO_PHASE_MAPPING[s]},l=a;return l!=null&&(o.segments=l),o}};return e==="fade"?{fromFn(r,a){const o=t==="added"?0:i,l=t==="removed"?r.previousDatum??a:a;return{...n.fromFn(r,a),opacity:o,segments:l}},toFn(r,a){const o=t==="removed"?0:i,l=t==="removed"?r.previousDatum??a:a;return{...n.toFn(r,a),opacity:o,segments:l}}}:n}function prepareLinePathAnimation(t,e,i,s=1){const n=t.scales.x?.type==="category",r=e.scales.x?.type==="category";if(n!==r||!(0,import_ag_charts_core207.isScaleValid)(t.scales.x)||!(0,import_ag_charts_core207.isScaleValid)(e.scales.x)||t.strokeData==null||e.strokeData==null)return;let a="updated";e.visible&&!t.visible?a="removed":!e.visible&&t.visible&&(a="added");const o=pairUpSpans({scales:t.scales,data:t.strokeData.spans},{scales:e.scales,data:e.strokeData.spans},1);if(o==null)return;const l=prepareLinePathStrokeAnimationFns(a,o,"fade",s),c=(i?.changed??!0)||!(0,import_ag_charts_core207.areScalingEqual)(t.scales.x,e.scales.x)||!(0,import_ag_charts_core207.areScalingEqual)(t.scales.y,e.scales.y)||a!=="updated";return{status:a,stroke:l,hasMotion:c}}var import_ag_charts_core208=require("ag-charts-core");function checkCrisp(t,e,i,s){if(e!=null){const[n,r]=e;if(n!==0||r!==1)return!1}if(ContinuousScale.is(t)){const n=t.calcBandwidth(s)-t.calcBandwidth(i);if(n>0&&n<1)return!1}if(BandScale.is(t)){const{bandwidth:n,step:r}=t;if(n>0&&n<1)return!1;const a=r-n;if(a>0&&a<1)return!1}return!0}var isDatumNegative=t=>(0,import_ag_charts_core208.isNegative)(t.yValue??0);function collapsedStartingBarPosition(t,e,i){const{startingX:s,startingY:n}=getStartingValues(t,e);return{isVertical:t,calculate:(a,o)=>{let l=t?a.x:s,c=t?n:a.y,h=t?a.width:0,u=t?0:a.height;const{opacity:d=1}=a;o&&(Number.isNaN(l)||Number.isNaN(c))&&({x:l,y:c}=o,h=t?o.width:0,u=t?0:o.height,t&&!isDatumNegative(o)?c+=o.height:!t&&isDatumNegative(o)&&(l+=o.width));let p;return a.clipBBox==null?p=void 0:isDatumNegative(a)?p=t?new BBox(l,c-u,h,u):new BBox(l-h,c,h,u):p=new BBox(l,c,h,u),{x:l,y:c,width:h,height:u,clipBBox:p,opacity:d}},mode:i}}function midpointStartingBarPosition(t,e){return{isVertical:t,calculate:i=>({x:t?i.x:i.x+i.width/2,y:t?i.y+i.height/2:i.y,width:t?i.width:0,height:t?0:i.height,clipBBox:i.clipBBox,opacity:i.opacity??1}),mode:e}}function prepareBarAnimationFunctions(t,e){const i=a=>a==null||Number.isNaN(a.x)||Number.isNaN(a.y);return{toFn:(a,o,l)=>l==="removed"&&a.datum==null&&t.mode==="fade"?{...resetBarSelectionsFn(a,o),opacity:0}:l==="removed"||i(o)?t.calculate(o,a.previousDatum):{x:o.x,y:o.y,width:o.width,height:o.height,clipBBox:o.clipBBox,opacity:o.opacity??1},fromFn:(a,o,l)=>{l==="updated"&&i(o)?l="removed":l==="updated"&&i(a.previousDatum)&&(l="added");let c;l==="unknown"||l==="added"?(a.previousDatum==null&&t.mode==="fade"?c={...resetBarSelectionsFn(a,o),opacity:0}:c=t.calculate(o,a.previousDatum),l==="unknown"&&(l=e)):c={x:a.x,y:a.y,width:a.width,height:a.height,clipBBox:a.clipBBox,opacity:a.opacity??1};const h=NODE_UPDATE_STATE_TO_PHASE_MAPPING[l];return{...c,phase:h}},applyFn:(a,o,l)=>{a.resetAnimationProperties(o.x,o.y,o.width,o.height,o.opacity??1,o.clipBBox),a.crisp=l==="end"&&(a.datum?.crisp??!1)}}}function getStartingValues(t,e){const i=e[t?import_ag_charts_core208.ChartAxisDirection.Y:import_ag_charts_core208.ChartAxisDirection.X];let s=1/0,n=0;return i?(t?n=i.scale.convert(ContinuousScale.is(i.scale)?0:Math.max(...i.range)):s=i.scale.convert(ContinuousScale.is(i.scale)?0:Math.min(...i.range)),{startingX:s,startingY:n}):{startingX:s,startingY:n}}function resetBarSelectionsFn(t,{x:e,y:i,width:s,height:n,clipBBox:r,opacity:a=1}){return{x:e,y:i,width:s,height:n,clipBBox:r,opacity:a,crisp:t.datum?.crisp??!1}}function resetBarSelectionsDirect(t){for(const e of t){const i=e.nodes();e.batchedUpdate(function(){for(const n of i){const r=n.datum;r!=null&&(n.resetAnimationProperties(r.x,r.y,r.width,r.height,r.opacity??1,r.clipBBox),n.crisp=r.crisp??!1)}e.cleanup()})}}function computeBarFocusBounds(t,e){if(e===void 0)return;const{x:i,y:s,width:n,height:r}=e;return Transformable.toCanvas(t.contentGroup,new BBox(i,s,n,r))}function upsertNodeDatum(t,e,i,s){const n=t.canIncrementallyUpdate&&t.nodeIndex<t.nodes.length;let r;return n?(r=t.nodes[t.nodeIndex],s(t,r,e)):(r=i(t,e),r!=null&&t.nodes.push(r)),t.nodeIndex++,r}var import_ag_charts_core209=require("ag-charts-core");function plotAreaPathFill({path:t},{spans:e,phantomSpans:i}){let s=0,n={x:Number.NaN,y:Number.NaN},r={x:Number.NaN,y:Number.NaN};for(let a=0;a<e.length;a+=1){const{span:o}=e[a],{span:l}=i[a],{0:c,1:h}=(0,import_ag_charts_core209.spanRange)(o),{0:u,1:d}=(0,import_ag_charts_core209.spanRange)(l);if(pointsEq(n,c)&&pointsEq(r,u))plotSpan(t,o,import_ag_charts_core209.SpanJoin.Skip,!1);else{for(let p=a-1;p>=s;p-=1)plotSpan(t,i[p].span,import_ag_charts_core209.SpanJoin.LineTo,!0);t.closePath(),plotSpan(t,o,import_ag_charts_core209.SpanJoin.MoveTo,!1),s=a}n=h,r=d}for(let a=e.length-1;a>=s;a-=1)plotSpan(t,i[a].span,import_ag_charts_core209.SpanJoin.LineTo,!0);t.closePath()}function plotInterpolatedAreaSeriesFillSpans(t,{path:e},i,s){for(let n=0;n<i.length;n+=1){const r=i[n],a=s[n];plotInterpolatedSpans(e,r.from,r.to,t,import_ag_charts_core209.SpanJoin.MoveTo,!1),plotInterpolatedSpans(e,a.from,a.to,t,import_ag_charts_core209.SpanJoin.LineTo,!0),e.closePath()}}function prepareAreaFillAnimationFns(t,e,i,s){const n=(l,c)=>plotInterpolatedAreaSeriesFillSpans(l,c,e.removed,i.removed),r=(l,c)=>plotInterpolatedAreaSeriesFillSpans(l,c,e.moved,i.moved),a=(l,c)=>plotInterpolatedAreaSeriesFillSpans(l,c,e.added,i.added),o=prepareLinePathPropertyAnimation(t,s);return{status:t,path:{addPhaseFn:a,updatePhaseFn:r,removePhaseFn:n},pathProperties:o}}function prepareAreaPathAnimation(t,e){const i=t.scales.x?.type==="category",s=e.scales.x?.type==="category";if(i!==s||!(0,import_ag_charts_core209.isScaleValid)(t.scales.x)||!(0,import_ag_charts_core209.isScaleValid)(e.scales.x))return;let n="updated";e.visible&&!t.visible?n="removed":!e.visible&&t.visible&&(n="added");const r=pairUpSpans({scales:t.scales,data:t.fillData.spans},{scales:e.scales,data:e.fillData.spans},0);if(r==null)return;const a=pairUpSpans({scales:t.scales,data:t.fillData.phantomSpans},{scales:e.scales,data:e.fillData.phantomSpans},0);if(a==null)return;const o=pairUpSpans({scales:t.scales,data:t.strokeData.spans,zeroData:t.fillData.phantomSpans},{scales:e.scales,data:e.strokeData.spans,zeroData:e.fillData.phantomSpans},0);if(o==null)return;const l="none",c=prepareAreaFillAnimationFns(n,r,a,l),h=prepareLinePathStrokeAnimationFns(n,o,l);return{status:n,fill:c,stroke:h}}var import_ag_charts_core210=require("ag-charts-core");function calculateDataDiff(t,e,i,s,n,r,a){let o=r?.reduced?.diff?.[t];if(o?.changed)return o;if(!a)return{changed:!1,added:new Set,updated:new Set,removed:new Set,moved:new Set};const l=hasScalingChanged(s,n);return o==null&&r?.reduced?.diff!=null?(o={changed:!0,added:new Set,updated:new Set,removed:new Set,moved:new Set},l?o.updated=new Set(Array.from(e,({datum:c})=>i(c))):o.added=new Set(Array.from(e,({datum:c})=>i(c)))):l&&(o={changed:!0,added:new Set,updated:new Set(Array.from(e,({datum:c})=>i(c))),removed:new Set,moved:new Set}),o}function isGroupScaleContext(t){return typeof t=="object"&&t!==null&&"groupScale"in t}function hasScalingChanged(t,e){if(!e)return!1;const i=t.scales,s=e.scales;if(!(0,import_ag_charts_core210.areScalingEqual)(i.x,s.x)||!(0,import_ag_charts_core210.areScalingEqual)(i.y,s.y))return!0;if(!isGroupScaleContext(t)||!isGroupScaleContext(e))return!1;const n=t.groupScale,r=e.groupScale;return!(0,import_ag_charts_core210.areScalingEqual)(n,r)}var import_ag_charts_core211=require("ag-charts-core");function markerFadeInAnimation({id:t},e,i,s,...n){const r={...s,phase:s?.phase??(i?NODE_UPDATE_STATE_TO_PHASE_MAPPING[i]:"trailing")};staticFromToMotion(t,"markers",e,n,{opacity:0},{opacity:1},r);for(const a of n)a.cleanup()}function markerScaleInAnimation({id:t},e,...i){staticFromToMotion(t,"markers",e,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"});for(const s of i)s.cleanup()}function markerSwipeScaleInAnimation({id:t,nodeDataDependencies:e},i,s,...n){const r=e.seriesRectWidth;fromToMotion(t,"markers",i,n,{fromFn:(l,c)=>{const h=c.midPoint?.x??r;let u=(0,import_ag_charts_core211.clamp)(0,(0,import_ag_charts_core211.inverseEaseOut)(h/r),1);return Number.isNaN(u)&&(u=0),{scalingX:0,scalingY:0,delay:s?.delay??u,duration:s?.duration??QUICK_TRANSITION,phase:s?.phase??"initial",start:s?.start,finish:s?.finish}},toFn:()=>({scalingX:1,scalingY:1})})}function resetMarkerFn(t){return{opacity:1,scalingX:1,scalingY:1}}function resetMarkerSelectionsDirect(t){for(const e of t){const i=e.nodes();e.batchedUpdate(function(){for(const n of i){const r=n.datum;if(r?.point==null)continue;const{x:a,y:o}=r.point;!Number.isFinite(a)||!Number.isFinite(o)||n.resetAnimationProperties(a,o,n.size,1,1,1)}e.cleanup()})}}function resetMarkerPositionFn(t,e){return{x:e.point?.x??Number.NaN,y:e.point?.y??Number.NaN,scalingCenterX:e.point?.x??Number.NaN,scalingCenterY:e.point?.y??Number.NaN}}function computeMarkerFocusBounds(t,{datumIndex:e}){const i=t.getNodeData();if(i===void 0)return;const s=i[e],{point:n}=s??{};if(s==null||n==null)return;const r=t.getFormattedMarkerStyle(s),a=Marker.anchor(r.shape),o=n.focusSize??r.size,l=4+o,c=l/2,h=(a.x-.5)*o,u=(a.y-.5)*o,d=s.point.x-c-h,p=s.point.y-c-u;return Transformable.toCanvas(t.contentGroup,new BBox(d,p,l,l))}function markerEnabled(t,e,i,s=i){if(!(s.enabled??i.enabled))return!1;const r=1;return(e.step??(0,import_ag_charts_core211.findRangeExtent)(e.range)/Math.max(1,t))>r}function getMarkerStyles(t,e,i,s){return s??(s={stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeWidth:e.strokeWidth}),highlightStates.reduce((n,r)=>(n[r]=t.getMarkerStyle(i,{},void 0,{highlightState:r},void 0,s),n),{})}function pathSwipeInAnimation({id:t,visible:e,nodeDataDependencies:i},s,...n){const{seriesRectWidth:r,seriesRectHeight:a}=i;staticFromToMotion(t,"path_properties",s,n,{clipX:0},{clipX:r},{phase:"initial",start:{clip:!0,clipY:a,visible:e},finish:{clip:!1,visible:e}})}function pathFadeInAnimation({id:t},e,i,s="add",...n){staticFromToMotion(t,e,i,n,{opacity:0},{opacity:1},{phase:s})}function buildResetPathFn(t){return e=>({visible:t.getVisible(),opacity:t.getOpacity(),clipScalingX:1,clip:!1})}function updateClipPath({nodeDataDependencies:t},e){const i=s=>Number.isFinite(s)?s:0;e.clipX=i(t.seriesRectWidth),e.clipY=i(t.seriesRectHeight)}var import_ag_charts_core212=require("ag-charts-core"),DEFAULT_POLAR_DIRECTION_KEYS={[import_ag_charts_core212.ChartAxisDirection.Angle]:["angleKey"],[import_ag_charts_core212.ChartAxisDirection.Radius]:["radiusKey"]},DEFAULT_POLAR_DIRECTION_NAMES={[import_ag_charts_core212.ChartAxisDirection.Angle]:["angleName"],[import_ag_charts_core212.ChartAxisDirection.Radius]:["radiusName"]},PolarSeries=class extends DataModelSeries{constructor({categoryKey:t,pickModes:e=[1,0],canHaveAxes:i=!1,animationResetFns:s,...n}){super({...n,categoryKey:t,pickModes:e,canHaveAxes:i}),this.directions=[import_ag_charts_core212.ChartAxisDirection.Angle,import_ag_charts_core212.ChartAxisDirection.Radius],this.itemGroup=this.contentGroup.appendChild(new Group({name:"items"})),this.nodeData=[],this.itemSelection=Selection.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=Selection.select(this.labelGroup,()=>this.labelFactory(),!1),this.highlightSelection=Selection.select(this.highlightNodeGroup,()=>this.nodeFactory()),this.highlightLabelSelection=Selection.select(this.highlightLabelGroup,()=>this.labelFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.maxChartMarkerSize=0,this.animationResetFns=s,this.animationState=new import_ag_charts_core212.StateMachine("empty",{empty:{update:{target:"ready",action:r=>this.animateEmptyUpdateReady(r)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:r=>this.animateReadyHighlight(r),highlightMarkers:r=>this.animateReadyHighlightMarkers(r),resize:r=>this.animateReadyResize(r),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:r=>this.animateWaitingUpdateReady(r)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:r=>this.animateClearingUpdateEmpty(r)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable()),this.cleanup.register(this.ctx.eventsHub.on("legend:item-click",r=>this.onLegendItemClick(r)),this.ctx.eventsHub.on("legend:item-double-click",r=>this.onLegendItemDoubleClick(r)))}getItemNodes(){return[...this.itemGroup.children()]}getNodeData(){return this.nodeData}getKeyAxis(t){if(t===import_ag_charts_core212.ChartAxisDirection.Angle)return this.properties.angleKeyAxis;if(t===import_ag_charts_core212.ChartAxisDirection.Radius)return this.properties.radiusKeyAxis}setZIndex(t){super.setZIndex(t),this.contentGroup.zIndex=[t,import_ag_charts_core212.PolarZIndexMap.FOREGROUND],this.highlightGroup.zIndex=[t,import_ag_charts_core212.PolarZIndexMap.HIGHLIGHT],this.labelGroup.zIndex=[t,import_ag_charts_core212.PolarZIndexMap.LABEL]}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}labelFactory(){const t=new Text;return t.pointerEvents=1,t}getInnerRadius(){return 0}computeLabelsBBox(t,e){return null}getShapeFillBBox(){const t=this.radius;return{series:new BBox(-t,-t,t*2,t*2),axis:new BBox(-t,-t,t*2,t*2)}}resetAllAnimation(){const{item:t,label:e}=this.animationResetFns??{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&resetMotion([this.itemSelection,this.highlightSelection],t),e&&resetMotion([this.labelSelection,this.highlightLabelSelection],e),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(t){const{item:e,label:i}=this.animationResetFns??{};e&&resetMotion([this.highlightSelection],e),i&&resetMotion([this.highlightLabelSelection],i)}animateReadyHighlightMarkers(t){}animateReadyResize(t){this.resetAllAnimation()}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}computeFocusBounds(t){const e=this.getNodeData()?.[t.datumIndex];if(e!==void 0)return this.itemSelection.select(i=>i instanceof Path&&i.datum===e)[0]}getSeriesRange(){return[Number.NaN,Number.NaN]}isSeriesHighlighted(t,e){if(!this.properties.highlight.enabled)return!1;const{series:i,legendItemName:s,datumIndex:n}=t??{},r=typeof n=="number"?e?.[n]:void 0;return i===this||r!=null&&r===s}},import_ag_charts_core214=require("ag-charts-core"),import_ag_charts_core213=require("ag-charts-core"),HierarchyHighlightState=(t=>(t[t.None=0]="None",t[t.Item=1]="Item",t[t.OtherItem=2]="OtherItem",t[t.Branch=3]="Branch",t[t.OtherBranch=4]="OtherBranch",t))(HierarchyHighlightState||{});function toHierarchyHighlightString(t){const e=i=>i;switch(t){case 1:return"highlighted-item";case 2:return"unhighlighted-item";case 3:return"highlighted-branch";case 4:return"unhighlighted-branch";case 0:return"none";default:return e(t)}}var HierarchySeriesProperties=class extends SeriesProperties{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(DEFAULT_FILLS),this.strokes=Object.values(DEFAULT_STROKES)}};__decorateClass([import_ag_charts_core213.Property],HierarchySeriesProperties.prototype,"childrenKey",2),__decorateClass([import_ag_charts_core213.Property],HierarchySeriesProperties.prototype,"sizeKey",2),__decorateClass([import_ag_charts_core213.Property],HierarchySeriesProperties.prototype,"colorKey",2),__decorateClass([import_ag_charts_core213.Property],HierarchySeriesProperties.prototype,"colorName",2),__decorateClass([import_ag_charts_core213.Property],HierarchySeriesProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core213.Property],HierarchySeriesProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core213.Property],HierarchySeriesProperties.prototype,"colorRange",2);var _HierarchyNode=class ve{constructor(e,i,s,n,r,a,o,l,c,h,u){this.series=e,this.itemId=i,this.datumIndex=s,this.datum=n,this.sizeValue=r,this.colorValue=a,this.sumSize=o,this.depth=l,this.parent=c,this.children=h,this.style=u,this.midPoint={x:0,y:0}}get hasChildren(){return this.children.length>0}walk(e,i=ve.Walk.PreOrder){i===ve.Walk.PreOrder&&e(this);for(const s of this.children)s.walk(e,i);i===ve.Walk.PostOrder&&e(this)}find(e){if(e(this))return this;for(const i of this.children){const s=i.find(e);if(s!=null)return s}}*[Symbol.iterator](){yield this;for(const e of this.children)yield*e}};_HierarchyNode.Walk={PreOrder:0,PostOrder:1};var HierarchyNode=_HierarchyNode,HierarchySeries=class extends Series{constructor(t){super({moduleCtx:t,pickModes:[1,0]}),this.colorDomain=[0,0],this.maxDepth=0,this.colorScale=new ColorScale,this.animationState=new import_ag_charts_core214.StateMachine("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}processData(){const{NodeClass:t}=this,{childrenKey:e,sizeKey:i,colorKey:s,colorRange:n}=this.properties;let r=0,a=1/0,o=-1/0;const l=(d,p,g)=>{const f=g.depth==null?0:g.depth+1,y=e==null?void 0:d[e],m=y==null||y.length===0;let b=i==null?void 0:d[i];Number.isFinite(b)?b=Math.max(b,0):b=m?1:0;const v=b;r=Math.max(r,f);const x=s==null?void 0:d[s];typeof x=="number"&&(a=Math.min(a,x),o=Math.max(o,x));const S=this.getItemStyle({datumIndex:p,datum:d,depth:f,colorValue:x},m,!1);return c(new t(this,createDatumId(p.join(";")),p,d,b,x,v,f,g,[],S),y)},c=(d,p)=>{const{datumIndex:g}=d;if(p)for(const[f,y]of p.entries()){const m=l(y,g.concat(f),d);d.children.push(m),d.sumSize+=m.sumSize}return d},h=c(new t(this,"root",[],void 0,0,void 0,0,void 0,void 0,[],{}),this.data?.data),u=[a,o];this.colorScale.domain=a<o?[a,o]:[0,1],this.colorScale.range=n??["black"],this.colorScale.update(),this.rootNode=h,this.maxDepth=r,this.colorDomain=u}update({seriesRect:t}){this.updateSelections(),this.updateNodes();const e=this.getAnimationData();this.checkResize(t)&&this.animationState.transition("resize",e),this.animationState.transition("update",e)}resetAllAnimation(t){this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}getAnimationData(){return{}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}findNodeDatum(t){return this.rootNode?.find(e=>e.itemId===t)}dataCount(){return Number.NaN}getSeriesDomain(){return{domain:[Number.NaN,Number.NaN]}}getSeriesRange(){return[Number.NaN,Number.NaN]}getLegendData(t){const{colorKey:e,colorRange:i}=this.properties,{id:s,ctx:{legendManager:n},visible:r}=this;return t==="gradient"&&e!=null&&i!=null?[{legendType:"gradient",enabled:r&&n.getItemEnabled({seriesId:s}),seriesId:s,series:this.getFormatterContext("color"),colorRange:i,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(t){return t.datumIndex.join(":")}getDatumId(t){return this.getDatumIdFromData(t)}removeMeIndexPathForIndex(t){return this.datumSelection.at(t+1)?.datum.datumIndex??[]}removeMeIndexForIndexPath(t){for(const{index:e,datum:i}of this.datumSelection)if((0,import_ag_charts_core214.arraysEqual)(i.datumIndex,t))return e-1;return 0}pickFocus(t){if(!this.rootNode?.children.length)return;const e=(0,import_ag_charts_core214.clamp)(0,t.datumIndex-t.datumIndexDelta,this.datumSelection.length-1),{datumIndexDelta:i,otherIndexDelta:s}=t;let n=this.removeMeIndexPathForIndex(e);const r=n.reduce((l,c)=>l.children[c],this.rootNode);if(s>0&&r.hasChildren)n=[...n,0];else if(s<0&&n.length>1)n=n.slice(0,-1);else if(s===0&&i!==0){const l=r.parent.children.length-1;n=n.slice(),n[n.length-1]=(0,import_ag_charts_core214.clamp)(0,n.at(-1)+i,l)}const a=n.reduce((l,c)=>l.children[c],this.rootNode),o=this.computeFocusBounds(this.datumSelection.at(e+1));if(o!=null)return{datum:a,datumIndex:this.removeMeIndexForIndexPath(n),otherIndex:a.depth,bounds:o,clipFocusBox:!0}}getDatumAriaText(t,e){if(!(t instanceof this.NodeClass)){import_ag_charts_core214.Logger.error(`datum is not HierarchyNode: ${JSON.stringify(t)}`);return}return this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(t.depth??-1)+1,count:t.children.length,description:e})}getCategoryValue(t){}datumIndexForCategoryValue(t){}getActiveHighlightNode(){if(!this.properties.highlight.enabled)return;const t=this.ctx.highlightManager?.getActiveHighlight();if(t?.series===this)return t}getHierarchyHighlightState(t,e,i){if(t)return 1;if(e==null)return 0;const s=i.datumIndex?.[0],n=e.datumIndex?.[0];return s==null||n==null?0:s===n?3:4}getHierarchyHighlightStyles(t,e){switch(t){case 1:return(0,import_ag_charts_core214.mergeDefaults)(e.highlightedItem,e.highlightedBranch);case 3:return(0,import_ag_charts_core214.mergeDefaults)(e.unhighlightedItem,e.highlightedBranch);case 4:return e.unhighlightedBranch;default:return}}getHighlightStateString(t,e,i,s){if(!this.properties.highlight.enabled||i==null)return toHierarchyHighlightString(0);const n=i.reduce((o,l)=>o?.children[l],this.rootNode),r=this.getActiveHighlightNode();if(n==null)return toHierarchyHighlightString(0);const a=this.getHierarchyHighlightState(e??!1,r,n);return toHierarchyHighlightString(a)}},radsInDeg=Math.PI/180,lonX=t=>t*radsInDeg,latY=t=>-Math.log(Math.tan(Math.PI*.25+t*radsInDeg*.5)),xLon=t=>t/radsInDeg,yLat=t=>(Math.atan(Math.exp(-t))-Math.PI*.25)/(radsInDeg*.5),MercatorScale=class Ae extends AbstractScale{constructor(e,i){super(),this.domain=e,this.range=i,this.type="mercator",this.defaultTickCount=0,this.bounds=Ae.bounds(e)}static bounds(e){const[[i,s],[n,r]]=e,a=lonX(i),o=latY(s),l=lonX(n),c=latY(r);return new BBox(Math.min(a,l),Math.min(o,c),Math.abs(l-a),Math.abs(c-o))}static fixedScale(){return new Ae([[xLon(0),yLat(0)],[xLon(1),yLat(1)]],[[0,0],[1,1]])}toDomain(){}normalizeDomains(...e){let i=-1/0,s=1/0,n=-1/0,r=1/0;for(const a of e){const o=a.domain;for(const[l,c]of o)i=Math.min(l,i),s=Math.max(l,s),n=Math.min(c,n),r=Math.max(c,r)}return{domain:[[i,n],[s,r]],animatable:!0}}convert([e,i]){const[[s,n],[r,a]]=this.range,o=(r-s)/this.bounds.width,l=(a-n)/this.bounds.height;return[(lonX(e)-this.bounds.x)*o+s,(latY(i)-this.bounds.y)*l+n]}invert([e,i]){const[[s,n],[r,a]]=this.range,o=(r-s)/this.bounds.width,l=(a-n)/this.bounds.height;return[xLon((e-s)/o+this.bounds.x),yLat((i-n)/l+this.bounds.y)]}getDomainMinMax(){return unpackDomainMinMax(this.domain)}},import_ag_charts_core215=require("ag-charts-core"),DeferredExecutor=class{constructor(t){this.minimumDelay=t?.minimumDelay??50,this.timeout=t?.timeout??100}schedule(t,e){this.cancel(),this.pending={computation:t,onComplete:e},this.minimumDelay>0?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=void 0,this.scheduleIdleCallback()},this.minimumDelay):this.scheduleIdleCallback()}demand(){if(this.pending)return this.cancelScheduled(),this.execute()}cancel(){this.cancelScheduled(),this.pending=void 0}isPending(){return this.pending!=null}scheduleIdleCallback(){const t=(0,import_ag_charts_core215.getWindow)(),e=Math.max(0,this.timeout-this.minimumDelay);typeof t.requestIdleCallback=="function"?this.idleCallbackId=t.requestIdleCallback(this.execute.bind(this),{timeout:e}):this.idleCallbackId=setTimeout(()=>this.execute(),e)}cancelScheduled(){if(this.delayTimeoutId!=null&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=void 0),this.idleCallbackId==null)return;const t=(0,import_ag_charts_core215.getWindow)();typeof t.cancelIdleCallback=="function"?t.cancelIdleCallback(this.idleCallbackId):clearTimeout(this.idleCallbackId),this.idleCallbackId=void 0}execute(){const t=this.pending;if(!t)return;this.pending=void 0,this.delayTimeoutId=void 0,this.idleCallbackId=void 0;const e=t.computation();return t.onComplete(e),e}},AggregationManager=class{constructor(){this._dataLength=0,this.executor=new DeferredExecutor}get filters(){return this._filters}aggregate(t){if(this.executor.cancel(),t.targetRange>1&&t.computePartial){const e=t.computePartial(this._filters);if(e){const{immediate:i,computeRemaining:s}=e;return s&&this.executor.schedule(s,n=>{this.mergeFilters(n)}),this._filters=i,i}}return this._filters=t.computeFull(this._filters),this._filters}ensureLevelForRange(t){if(!this._filters?.some(i=>i.maxRange>t)&&this.executor.isPending()){const i=this.executor.demand();i&&this.mergeFilters(i)}}getFilterForRange(t){return this._filters?.find(e=>e.maxRange>t)}cancel(){this.executor.cancel()}markStale(t){const e=this._dataLength>0?t/this._dataLength:0;if(e>10||e<.1||this._dataLength===0)this._filters=void 0,this._dataLength=t;else if(this._filters)for(const i of this._filters)i.stale=!0;else this._dataLength=t;this.executor.cancel()}mergeFilters(t){if(!this._filters||t.length===0)return;const e=[...this._filters,...t];e.sort((i,s)=>i.maxRange-s.maxRange),this._filters=e}},import_ag_charts_core216=require("ag-charts-core"),PolarAxis=class extends Axis{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}update(){super.update(),this.tickLineGroup.visible=this.tick.enabled,this.tickLabelGroup.visible=this.label.enabled}layoutCrossLines(){const t=this.label.getSideFlag(),e=this.hasDefinedDomain()||this.hasVisibleSeries(),{rotation:i,parallelFlipRotation:s,regularFlipRotation:n}=this.calculateRotations();for(const r of this.crossLines)r.sideFlag=-t,r.direction=i===-Math.PI/2?import_ag_charts_core216.ChartAxisDirection.Angle:import_ag_charts_core216.ChartAxisDirection.Radius,r.parallelFlipRotation=s,r.regularFlipRotation=n,r.calculateLayout?.(e,this.reverse)}updatePosition(){super.updatePosition();const t=Math.floor(this.translation.x),e=Math.floor(this.translation.y);this.tickLineGroup.translationX=t,this.tickLineGroup.translationY=e,this.tickLabelGroup.translationX=t,this.tickLabelGroup.translationY=e,this.crossLineRangeGroup.translationX=t,this.crossLineRangeGroup.translationY=e,this.crossLineLineGroup.translationX=t,this.crossLineLineGroup.translationY=e,this.crossLineLabelGroup.translationX=t,this.crossLineLabelGroup.translationY=e,this.tickLabelGroupSelection.each(resetAxisLabelSelectionFn())}computeLabelsBBox(t,e){return null}computeRange(){}getAxisLinePoints(){}};__decorateClass([import_ag_charts_core216.Property],PolarAxis.prototype,"shape",2),__decorateClass([import_ag_charts_core216.Property],PolarAxis.prototype,"innerRadiusRatio",2);var DiscreteTimeAxis=class extends CategoryAxis{calculateGridLine({index:t,tickId:e,translation:i},s,n,r,a){const{gridLine:o,horizontal:l,interval:c,range:h}=this;if(c.placement!=="between")return super.calculateGridLine({index:t,tickId:e,translation:i},s,n,r,a);const u=a[s-1],d=u?i-(i-u.translation)/2:h[0],[p,g,f,y]=l?[d,Math.max(n,r),d,Math.min(n,r)]:[Math.min(n,r),d,Math.max(n,r),d],{style:m}=o,{stroke:b,strokeWidth:v=0,lineDash:x}=m[t%m.length]??{};return{tickId:e,offset:d,x1:p,y1:g,x2:f,y2:y,stroke:b,strokeWidth:v,lineDash:x}}calculateGridFills(t,e,i){return this.interval.placement!=="between"?super.calculateGridFills(t,e,i):t.map((s,n)=>this.calculateGridFill(s,n,s.index,e,i,t))}calculateGridFill({tickId:t,translation:e},i,s,n,r,a){const{gridLine:o,horizontal:l,interval:c,range:h}=this;if(c.placement!=="between")return super.calculateGridFill({tickId:t,translation:e},i,s,n,r,a);const u=a[i-1],d=a[i+1],p=u?e-(e-u.translation)/2:h[0],g=d?e+(d.translation-e)/2:h[1],[f,y,m,b]=l?[p,Math.max(n,r),g,Math.min(n,r)]:[Math.min(n,r),p,Math.max(n,r),g],{fill:v,fillOpacity:x}=o.style[s%o.style.length]??{};return{tickId:t,x1:f,y1:y,x2:m,y2:b,fill:v,fillOpacity:x}}calculateTickLine({isPrimary:t,tickId:e,translation:i},s,n,r,a=0){const{horizontal:o,interval:l,primaryTick:c,range:h,tick:u}=this;if(l.placement!=="between")return super.calculateTickLine({isPrimary:t,tickId:e,translation:i},s,n,r,a);const d=t&&c?.enabled?c:u,p=-n*this.getTickSize(d),g=r[s-1],f=g?i-(i-g.translation)/2:h[0],y=-n*(a+this.getTickSpacing(d)),[m,b,v,x]=o?[f,y,f,y+p]:[y,f,y+p,f],{stroke:S,width:I}=d;return{tickId:e,offset:f,x1:m,y1:b,x2:v,y2:x,stroke:S,strokeWidth:I,lineDash:void 0}}},horizontalCrosslineTranslationDirections={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},"top-left":{xTranslationDirection:1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"bottom-right":{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:1,yTranslationDirection:0},"inside-right":{xTranslationDirection:-1,yTranslationDirection:0},"inside-top":{xTranslationDirection:0,yTranslationDirection:1},"inside-bottom":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-right":{xTranslationDirection:-1,yTranslationDirection:-1}},verticalCrossLineTranslationDirections={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},"top-left":{xTranslationDirection:-1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"bottom-right":{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:0,yTranslationDirection:1},"inside-right":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top":{xTranslationDirection:-1,yTranslationDirection:0},"inside-bottom":{xTranslationDirection:1,yTranslationDirection:0},"inside-top-left":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"inside-bottom-right":{xTranslationDirection:1,yTranslationDirection:-1}};function calculateLabelTranslation({yDirection:t,padding:e=0,position:i="top",bbox:s}){const n=t?horizontalCrosslineTranslationDirections:verticalCrossLineTranslationDirections,{xTranslationDirection:r,yTranslationDirection:a}=n[i],o=r*(e+s.width/2),l=a*(e+s.height/2);return{xTranslation:o,yTranslation:l}}var import_ag_charts_core217=require("ag-charts-core");function pathMotion(t,e,i,s,n){const r=(u,d,p,g)=>{i.animate({id:`${t}_${e}_${d.id}_${u}`,groupId:t,from:p?1:0,to:1,ease:import_ag_charts_core217.easeOut,collapsable:p,onUpdate(f,y){y&&u!=="removed"||(d.path.clear(!0),g(f,d),d.checkPathDirty())},onStop(){u==="added"&&(d.path.clear(!0),g(1,d),d.checkPathDirty())},phase:NODE_UPDATE_STATE_TO_PHASE_MAPPING[u]})},a=new Path,o=u=>(a.resetPathDirty(),u(0,a),a.resetPathDirty(),u(1,a),a.checkPathDirty(),a.isPathDirty()),{addPhaseFn:l,updatePhaseFn:c,removePhaseFn:h}=n;for(const u of s)i.isSkipped()||(r("removed",u,!o(h),h),r("updated",u,!o(c),c)),r("added",u,!o(l),l)}var import_ag_charts_core218=require("ag-charts-core"),DropShadow=class extends import_ag_charts_core218.ChangeDetectableProperties{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};__decorateClass([import_ag_charts_core218.Property,(0,import_ag_charts_core6.SceneChangeDetection)()],DropShadow.prototype,"enabled",2),__decorateClass([import_ag_charts_core218.Property,(0,import_ag_charts_core6.SceneChangeDetection)()],DropShadow.prototype,"color",2),__decorateClass([import_ag_charts_core218.Property,(0,import_ag_charts_core6.SceneChangeDetection)()],DropShadow.prototype,"xOffset",2),__decorateClass([import_ag_charts_core218.Property,(0,import_ag_charts_core6.SceneChangeDetection)()],DropShadow.prototype,"yOffset",2),__decorateClass([import_ag_charts_core218.Property,(0,import_ag_charts_core6.SceneChangeDetection)()],DropShadow.prototype,"blur",2);var import_ag_charts_core219=require("ag-charts-core");function sectorBox({startAngle:t,endAngle:e,innerRadius:i,outerRadius:s}){let n=1/0,r=1/0,a=-1/0,o=-1/0;const l=(c,h)=>{n=Math.min(c,n),r=Math.min(h,r),a=Math.max(c,a),o=Math.max(h,o)};return l(i*Math.cos(t),i*Math.sin(t)),l(i*Math.cos(e),i*Math.sin(e)),l(s*Math.cos(t),s*Math.sin(t)),l(s*Math.cos(e),s*Math.sin(e)),(0,import_ag_charts_core219.isBetweenAngles)(0,t,e)&&l(s,0),(0,import_ag_charts_core219.isBetweenAngles)(Math.PI*.5,t,e)&&l(0,s),(0,import_ag_charts_core219.isBetweenAngles)(Math.PI,t,e)&&l(-s,0),(0,import_ag_charts_core219.isBetweenAngles)(Math.PI*1.5,t,e)&&l(0,-s),new BBox(n,r,a-n,o-r)}function isPointInSector(t,e,i){const s=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),{innerRadius:n,outerRadius:r}=i;if(i.startAngle===i.endAngle||s<Math.min(n,r)||s>Math.max(n,r))return!1;const a=(0,import_ag_charts_core219.normalizeAngle180)(i.startAngle),o=(0,import_ag_charts_core219.normalizeAngle180)(i.endAngle),l=Math.atan2(e,t);return a<o?l<=o&&l>=a:l<=o&&l>=-Math.PI||l>=a&&l<=Math.PI}function arcIntersections(t,e,i,s,n,r,a,o,l,c){if(Number.isNaN(t)||Number.isNaN(e))return 0;r&&([n,s]=[s,n]);const h=(c-o)/(l-a),u=o-h*a,d=Math.pow(h,2)+1,p=2*(h*(u-e)-t),g=Math.pow(t,2)+Math.pow(u-e,2)-Math.pow(i,2),f=Math.pow(p,2)-4*d*g;if(f<0)return 0;const y=(-p+Math.sqrt(f))/2/d,m=(-p-Math.sqrt(f))/2/d;let b=0;for(const v of[y,m]){if(!(v>=Math.min(a,l)&&v<=Math.max(a,l)))continue;const S=h*v+u,I=v-t,D=S-e,T=Math.atan2(D,I);(0,import_ag_charts_core219.isBetweenAngles)(T,s,n)&&b++}return b}function lineCollidesSector(t,e){const{startAngle:i,endAngle:s,innerRadius:n,outerRadius:r}=e,a={x:r*Math.cos(i),y:r*Math.sin(i)},o={x:r*Math.cos(s),y:r*Math.sin(s)},l=n===0?{x:0,y:0}:{x:n*Math.cos(i),y:n*Math.sin(i)},c=n===0?{x:0,y:0}:{x:n*Math.cos(s),y:n*Math.sin(s)};return segmentIntersection(t.start.x,t.start.y,t.end.x,t.end.y,a.x,a.y,l.x,l.y)||segmentIntersection(t.start.x,t.start.y,t.end.x,t.end.y,o.x,o.y,c.x,c.y)||arcIntersections(0,0,r,i,s,!0,t.start.x,t.start.y,t.end.x,t.end.y)}function boxCollidesSector(t,e){const i={x:t.x,y:t.y},s={x:t.x+t.width,y:t.y},n={x:t.x,y:t.y+t.height},r={x:t.x+t.width,y:t.y+t.height};return lineCollidesSector({start:i,end:s},e)||lineCollidesSector({start:n,end:r},e)}function radiiScalingFactor(t,e,i,s){if(i===0&&s===0)return 0;if(Math.asin(Math.abs(1*i)/(t+1*i))+Math.asin(Math.abs(1*s)/(t+1*s))-e<0)return 1;let r=0,a=1;for(let o=0;o<8;o+=1){const l=(r+a)/2;Math.asin(Math.abs(l*i)/(t+l*i))+Math.asin(Math.abs(l*s)/(t+l*s))-e<0?r=l:a=l}return r}var delta2=1e-6;function clockwiseAngle(t,e){return(0,import_ag_charts_core219.angleBetween)(t,e)<delta2?e:(0,import_ag_charts_core219.normalizeAngle360)(t-e)+e}function clockwiseAngles(t,e,i=0){const n=Math.abs(e-t)>=2*Math.PI?2*Math.PI:(0,import_ag_charts_core219.normalizeAngle360)(e-t);return t=clockwiseAngle(t,i),e=t+n,{startAngle:t,endAngle:e}}function arcRadialLineIntersectionAngle(t,e,i,s,n,r){const a=Math.sin(r),o=Math.cos(r),l=t**2+e**2-i**2;let c,h,u,d;if(o>.5){const v=a/o,x=1+v**2,S=-2*(t+e*v),I=S**2-4*x*l;if(I<0)return;const D=(-S+Math.sqrt(I))/(2*x),T=(-S-Math.sqrt(I))/(2*x);c=D,h=D*v,u=T,d=T*v}else{const v=o/a,x=1+v**2,S=-2*(e+t*v),I=S**2-4*x*l;if(I<0)return;const D=(-S+Math.sqrt(I))/(2*x),T=(-S-Math.sqrt(I))/(2*x);c=D*v,h=D,u=T*v,d=T}const p=o,g=a,f=c*p+h*g,y=u*p+d*g,m=f>0?clockwiseAngle(Math.atan2(h-e,c-t),s):Number.NaN,b=y>0?clockwiseAngle(Math.atan2(d-e,u-t),s):Number.NaN;if(m>=s&&m<=n)return m;if(b>=s&&b<=n)return b}function arcCircleIntersectionAngle(t,e,i,s,n,r){const a=Math.hypot(t,e),o=(a**2-i**2+r**2)/(2*a),l=a-o,c=Math.atan2(e,t),h=Math.acos(-l/i),u=clockwiseAngle(c+h,s),d=clockwiseAngle(c-h,s);if(u>=s&&u<=n)return u;if(d>=s&&d<=n)return d}var SvgPath=class extends Path{constructor(t=""){super(),this._d="",this.d=t}get d(){return this._d}set d(t){t!==this._d&&(this._d=t,this.path.clear(),this.path.appendSvg(t),this.checkPathDirty())}},TranslatableSvgPath=class extends Translatable(SvgPath){isPointInPath(t,e){return super.isPointInPath(t-this.translationX,e-this.translationY)}},import_ag_charts_core220=require("ag-charts-core"),ApproximateOrdinalTimeScale=class Ue extends OrdinalTimeScale{static is(e){return e instanceof Ue}setSourceScale(e){this._sourceScale=e;const i=n=>{Object.defineProperty(this,n,{get:()=>e[n],set:r=>{e[n]=r},configurable:!0})};i("domain"),i("range"),i("paddingInner"),i("paddingOuter"),i("round");const s=n=>{Object.defineProperty(this,n,{get:()=>e[n],configurable:!0})};s("bandwidth"),s("step"),s("inset"),s("rawBandwidth")}get bands(){return this._sourceScale?.bands??super.bands}refresh(){this._sourceScale?.refresh?.()}ordinalRange(e){return this._sourceScale?this._sourceScale.ordinalRange(e):super.ordinalRange(e)}convert(e,i){this.refresh();const s=this.findIndex(e,i?.alignment);return s==null||s<0||s>=this.bands.length?Number.NaN:this.ordinalRange(s)}findIndex(e,i=import_ag_charts_core220.ScaleAlignment.Leading){if(e==null)return;const{bands:s,reversed:n}=this,r=s.length;if(r===0)return;if(r===1)return 0;const a=s[0],o=s[r-1];if(a==null||o==null)return this._sourceScale?.findIndex(e,i);const l=e.valueOf(),c=a.valueOf(),h=o.valueOf(),u=(l-c)/(h-c),d=n?(1-u)*(r-1):u*(r-1);return i===import_ag_charts_core220.ScaleAlignment.Leading?Math.max(0,Math.min(r-1,Math.floor(d))):Math.max(0,Math.min(r-1,Math.ceil(d)))}},SectorBox=class Ce{constructor(e,i,s,n){this.startAngle=e,this.endAngle=i,this.innerRadius=s,this.outerRadius=n}clone(){const{startAngle:e,endAngle:i,innerRadius:s,outerRadius:n}=this;return new Ce(e,i,s,n)}equals(e){return this.startAngle===e.startAngle&&this.endAngle===e.endAngle&&this.innerRadius===e.innerRadius&&this.outerRadius===e.outerRadius}[interpolate](e,i){return new Ce(this.startAngle*(1-i)+e.startAngle*i,this.endAngle*(1-i)+e.endAngle*i,this.innerRadius*(1-i)+e.innerRadius*i,this.outerRadius*(1-i)+e.outerRadius*i)}},Image2=class extends Node{constructor(t){super(),this.sourceImage=t,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}render(t){const{ctx:e}=t,i=this.sourceImage;i&&(e.globalAlpha=this.opacity,e.drawImage(i,0,0,i.width,i.height,this.x,this.y,this.width,this.height)),super.render(t)}};__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Image2.prototype,"x",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Image2.prototype,"y",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Image2.prototype,"width",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Image2.prototype,"height",2),__decorateClass([(0,import_ag_charts_core6.SceneChangeDetection)()],Image2.prototype,"opacity",2);var import_ag_charts_core221=require("ag-charts-core"),Arc=class extends Path{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=Math.PI*2,this.counterClockwise=!1,this.type=0}get fullPie(){return(0,import_ag_charts_core221.isNumberEqual)((0,import_ag_charts_core221.normalizeAngle360)(this.startAngle),(0,import_ag_charts_core221.normalizeAngle360)(this.endAngle))}updatePath(){const t=this.path;t.clear(),t.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===1?t.closePath():this.type===2&&!this.fullPie&&(t.lineTo(this.centerX,this.centerY),t.closePath())}computeBBox(){return new BBox(this.centerX-this.radius,this.centerY-this.radius,this.radius*2,this.radius*2)}isPointInPath(t,e){const i=this.getBBox();return this.type!==0&&i.containsPoint(t,e)&&this.path.isPointInPath(t,e)}};Arc.className="Arc",__decorateClass([(0,import_ag_charts_core221.SceneChangeDetection)()],Arc.prototype,"centerX",2),__decorateClass([(0,import_ag_charts_core221.SceneChangeDetection)()],Arc.prototype,"centerY",2),__decorateClass([(0,import_ag_charts_core221.SceneChangeDetection)()],Arc.prototype,"radius",2),__decorateClass([(0,import_ag_charts_core221.SceneChangeDetection)()],Arc.prototype,"startAngle",2),__decorateClass([(0,import_ag_charts_core221.SceneChangeDetection)()],Arc.prototype,"endAngle",2),__decorateClass([(0,import_ag_charts_core221.SceneChangeDetection)()],Arc.prototype,"counterClockwise",2),__decorateClass([(0,import_ag_charts_core221.SceneChangeDetection)()],Arc.prototype,"type",2);var import_ag_charts_core222=require("ag-charts-core");function rotatePoint2(t,e,i){const s=Math.hypot(t,e),r=Math.atan2(e,t)+i;return{x:Math.cos(r)*s,y:Math.sin(r)*s}}var RadialColumnShape=class extends Path{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0}set cornerRadius(t){}computeBBox(){const{columnWidth:t}=this,[e,i]=this.normalizeRadii(this.innerRadius,this.outerRadius),s=this.getRotation(),n=-t/2,r=t/2,a=-i,o=-e;let l=1/0,c=1/0,h=-1/0,u=-1/0;for(let d=0;d<4;d+=1){const{x:p,y:g}=rotatePoint2(d%2===0?n:r,d<2?a:o,s);l=Math.min(p,l),c=Math.min(g,c),h=Math.max(p,h),u=Math.max(g,u)}return new BBox(l,c,h-l,u-c)}getRotation(){const{startAngle:t,endAngle:e}=this,i=(0,import_ag_charts_core222.angleBetween)(t,e);return(0,import_ag_charts_core222.normalizeAngle360)(t+i/2+Math.PI/2)}normalizeRadii(t,e){return t>e?[e,t]:[t,e]}updatePath(){const{isBeveled:t}=this;t?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){const{columnWidth:t,path:e}=this,[i,s]=this.normalizeRadii(this.innerRadius,this.outerRadius),n=-t/2,r=t/2,a=-s,o=-i,l=this.getRotation(),c=[[n,o],[n,a],[r,a],[r,o]].map(([h,u])=>rotatePoint2(h,u,l));e.clear(!0),e.moveTo(c[0].x,c[0].y),e.lineTo(c[1].x,c[1].y),e.lineTo(c[2].x,c[2].y),e.lineTo(c[3].x,c[3].y),e.closePath()}calculateCircleIntersection(t,e){const i=t*t;if(e<i)return null;const s=-Math.sqrt(e-i),n=Math.atan2(s,t);return{y:s,angle:n}}calculateBothIntersections(t,e,i){const s=i*i,n=this.calculateCircleIntersection(t,s),r=this.calculateCircleIntersection(e,s);return!n||!r?null:{left:n,right:r}}calculateAxisOuterIntersections(t,e,i){const s=i*i,n=this.calculateCircleIntersection(t,s),r=this.calculateCircleIntersection(e,s);return!n||!r?null:{left:n,right:r,radiusSquared:s}}moveToRotated(t,e,i){const s=rotatePoint2(t,e,i);this.path.moveTo(s.x,s.y)}lineToRotated(t,e,i){const s=rotatePoint2(t,e,i);this.path.lineTo(s.x,s.y)}renderTopWithCornerClipping(t,e,i){const{path:s}=this,{right:n,top:r,rotation:a}=i,o=r*r,l=e.radiusSquared-o;if(l<=0)this.lineToRotated(n,e.right.y,a),s.arc(0,0,t,a+e.right.angle,a+e.left.angle,!0);else{const c=Math.sqrt(l),h=Math.atan2(r,c),u=Math.atan2(r,-c);this.lineToRotated(n,e.right.y,a),s.arc(0,0,t,a+e.right.angle,a+h,!0),this.lineToRotated(-c,r,a),s.arc(0,0,t,a+u,a+e.left.angle,!0)}}updateBeveledPath(){const{columnWidth:t,path:e,axisInnerRadius:i,axisOuterRadius:s}=this,[n,r]=this.normalizeRadii(this.innerRadius,this.outerRadius),a=-t/2,o=t/2,l=-r,c=-n,h=this.getRotation(),u=(0,import_ag_charts_core222.isNumberEqual)(n,i),d=(0,import_ag_charts_core222.isNumberEqual)(r,s),p=Math.hypot(a,l)>s||Math.hypot(o,l)>s;if(!u&&!d&&!p){this.updateRectangularPath();return}const g=u?this.calculateBothIntersections(a,o,n):null,f=d?this.calculateBothIntersections(a,o,r):null,y=p?this.calculateAxisOuterIntersections(a,o,s):null;if(u&&!g||d&&!f||p&&!y){this.updateRectangularPath();return}e.clear(!0);const m={left:a,right:o,top:l,bottom:c,rotation:h};g?this.moveToRotated(a,g.left.y,h):this.moveToRotated(a,c,h),g?e.arc(0,0,n,h+g.left.angle,h+g.right.angle,!1):this.lineToRotated(o,c,h),f?(this.lineToRotated(o,f.right.y,h),e.arc(0,0,r,h+f.right.angle,h+f.left.angle,!0)):y?this.renderTopWithCornerClipping(s,y,m):(this.lineToRotated(o,l,h),this.lineToRotated(a,l,h)),e.closePath()}};RadialColumnShape.className="RadialColumnShape",__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"isBeveled",2),__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"columnWidth",2),__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"startAngle",2),__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"endAngle",2),__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"outerRadius",2),__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"innerRadius",2),__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"axisInnerRadius",2),__decorateClass([(0,import_ag_charts_core222.SceneChangeDetection)()],RadialColumnShape.prototype,"axisOuterRadius",2);function getRadialColumnWidth(t,e,i,s,n){const r=(0,import_ag_charts_core222.angleBetween)(t,e),a=r*(1-s)/2;if(t+=a,e-=a,r<.001)return 2*i*n;if(r>=2*Math.PI){const p=t+r/2;t=p-Math.PI,e=p+Math.PI}const o=i*Math.cos(t),l=i*Math.sin(t),c=i*Math.cos(e),h=i*Math.sin(e),u=Math.floor(Math.hypot(o-c,l-h)),d=2*i*n;return Math.max(1,Math.min(d,u))}var import_ag_charts_core223=require("ag-charts-core"),Arc2=class{constructor(t,e,i,s,n){this.cx=t,this.cy=e,this.r=i,this.a0=s,this.a1=n,this.a0>=this.a1&&(this.a0=Number.NaN,this.a1=Number.NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(t){return{x:this.cx+this.r*Math.cos(t),y:this.cy+this.r*Math.sin(t)}}clipStart(t){t==null||!this.isValid()||t<this.a0||(this.a0=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=Number.NaN,this.a1=Number.NaN))}clipEnd(t){t==null||!this.isValid()||t>this.a1||(this.a1=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=Number.NaN,this.a1=Number.NaN))}},Sector=class extends Path{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=Math.PI*2,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(t){this.concentricEdgeInset=t,this.radialEdgeInset=t}set cornerRadius(t){this.startOuterCornerRadius=t,this.endOuterCornerRadius=t,this.startInnerCornerRadius=t,this.endInnerCornerRadius=t}computeBBox(){return sectorBox(this).translate(this.centerX,this.centerY)}normalizedRadii(){const{concentricEdgeInset:t}=this;let{innerRadius:e,outerRadius:i}=this;return e=e>0?e+t:0,i=Math.max(i-t,0),{innerRadius:e,outerRadius:i}}normalizedClipSector(){const{clipSector:t}=this;if(t==null)return;const{startAngle:e,endAngle:i}=clockwiseAngles(this.startAngle,this.endAngle),{innerRadius:s,outerRadius:n}=this.normalizedRadii(),r=clockwiseAngles(t.startAngle,t.endAngle,e);return new SectorBox(Math.max(e,r.startAngle),Math.min(i,r.endAngle),Math.max(s,t.innerRadius),Math.min(n,t.outerRadius))}getAngleOffset(t){return t>0?this.radialEdgeInset/t:0}arc(t,e,i,s,n,r,a,o){if(t<=0)return;const{startAngle:l,endAngle:c}=clockwiseAngles(this.startAngle,this.endAngle),{innerRadius:h,outerRadius:u}=this.normalizedRadii(),d=this.normalizedClipSector();if(o&&h<=0)return;const p=o?this.getAngleOffset(h+t):this.getAngleOffset(u-t),g=a?l+p+e:c-p-e,f=o?h+t:u-t,y=f*Math.cos(g),m=f*Math.sin(g);if(d!=null&&(!a&&!(g>=l-1e-6&&g<=d.endAngle-1e-6)||a&&!(g>=d.startAngle+1e-6&&g<=c-1e-6)||o&&f<d.innerRadius-1e-6||!o&&f>d.outerRadius+1e-6))return;const b=new Arc2(y,m,t,i,s);if(d!=null){o?(b.clipStart(arcRadialLineIntersectionAngle(y,m,t,i,s,d.endAngle)),b.clipEnd(arcRadialLineIntersectionAngle(y,m,t,i,s,d.startAngle))):(b.clipStart(arcRadialLineIntersectionAngle(y,m,t,i,s,d.startAngle)),b.clipEnd(arcRadialLineIntersectionAngle(y,m,t,i,s,d.endAngle)));let D,T;if(a?(D=arcCircleIntersectionAngle(y,m,t,i,s,d.innerRadius),T=arcCircleIntersectionAngle(y,m,t,i,s,d.outerRadius)):(D=arcCircleIntersectionAngle(y,m,t,i,s,d.outerRadius),T=arcCircleIntersectionAngle(y,m,t,i,s,d.innerRadius)),b.clipStart(D),b.clipEnd(T),D!=null){const{x:A,y:L}=b.pointAt(D),N=clockwiseAngle(Math.atan2(L,A),l);a?r?.clipStart(N):n.clipEnd(N)}if(T!=null){const{x:A,y:L}=b.pointAt(T),N=clockwiseAngle(Math.atan2(L,A),l);a?n.clipStart(N):r?.clipEnd(N)}}if(d!=null){const{x:D,y:T}=b.pointAt((b.a0+b.a1)/2);if(!isPointInSector(D,T,d))return}const{x:v,y:x}=b.pointAt(a===o?b.a0:b.a1),S=clockwiseAngle(Math.atan2(x,v),l),I=o?r:n;return a?I?.clipStart(S):I?.clipEnd(S),b}updatePath(){const{path:e,centerX:i,centerY:s,concentricEdgeInset:n,radialEdgeInset:r}=this;let{startOuterCornerRadius:a,endOuterCornerRadius:o,startInnerCornerRadius:l,endInnerCornerRadius:c}=this;const{startAngle:h,endAngle:u}=clockwiseAngles(this.startAngle,this.endAngle),{innerRadius:d,outerRadius:p}=this.normalizedRadii(),g=this.normalizedClipSector(),f=u-h,y=f>=2*Math.PI-1e-6;e.clear();const m=this.getAngleOffset(d),b=f-2*m,v=p-d,x=d>0&&b>0?2*d*Math.sin(b/2):0,S=p>0&&b>0?2*p*Math.sin(b/2):0;if(a=Math.floor(Math.max(0,Math.min(a,S/2,v/2))),o=Math.floor(Math.max(0,Math.min(o,S/2,v/2))),l=Math.floor(Math.max(0,Math.min(l,x/2,v/2))),c=Math.floor(Math.max(0,Math.min(c,x/2,v/2))),d===0&&p===0||d>p||x<0||S<=0)return;if((g?.startAngle??h)===(g?.endAngle??u))return;if(y&&this.clipSector==null&&a===0&&o===0&&l===0&&c===0){e.moveTo(i+p*Math.cos(h),s+p*Math.sin(h)),e.arc(i,s,p,h,u),d>n&&(e.moveTo(i+d*Math.cos(u),s+d*Math.sin(u)),e.arc(i,s,d,u,h,!0)),e.closePath();return}else if(this.clipSector==null&&Math.abs(d-p)<1e-6){e.arc(i,s,p,h,u,!1),e.arc(i,s,p,u,h,!0),e.closePath();return}const D=this.getAngleOffset(p);if(f<2*D)return;const A=(g?.innerRadius??d)>n,L=d<n||f<2*m,N=Math.max(a,l,o,c),k=N>0?Math.min(v/N,1):1;a*=k,o*=k,l*=k,c*=k;const w=radiiScalingFactor(p,f-2*D,-a,-o);if(a*=w,o*=w,!L&&A){const G=radiiScalingFactor(d,f-2*m,l,c);l*=G,c*=G}else l=0,c=0;const E=Math.max(a+l,o+c),O=E>0?Math.min(v/E,1):1;a*=O,o*=O,l*=O,c*=O;let R=0,_=0;const P=a/(p-a),F=o/(p-o);if(P>=0&&P<1-1e-6)R=Math.asin(P);else{R=f/2;const G=p/(1/Math.sin(R)+1);a=Math.min(G,a)}if(F>=0&&F<1-1e-6)_=Math.asin(F);else{_=f/2;const G=p/(1/Math.sin(_)+1);o=Math.min(G,o)}const V=Math.asin(l/(d+l)),B=Math.asin(c/(d+c)),j=g?.outerRadius??p,Z=this.getAngleOffset(j),z=new Arc2(0,0,j,h+Z,u-Z),$=g?.innerRadius??d,ee=this.getAngleOffset($),J=A?new Arc2(0,0,$,h+ee,u-ee):void 0;g!=null&&(z.clipStart(g.startAngle),z.clipEnd(g.endAngle),J?.clipStart(g.startAngle),J?.clipEnd(g.endAngle));const de=this.arc(a,R,h-Math.PI*.5,h+R,z,J,!0,!1),pe=this.arc(o,_,u-_,u+Math.PI*.5,z,J,!1,!1),ge=this.arc(c,B,u+Math.PI*.5,u+Math.PI-B,z,J,!1,!0),xe=this.arc(l,V,h+Math.PI+V,h+Math.PI*1.5,z,J,!0,!0);if(!(L&&A)){if(L){const G=f<Math.PI*.5?r*(1+Math.cos(f))/Math.sin(f):Number.NaN;let U;G>0&&G<p?U=Math.max(Math.hypot(r,G),d):U=r,U=Math.max(U,d);const Y=h+f*.5;e.moveTo(i+U*Math.cos(Y),s+U*Math.sin(Y))}else if(!(xe?.isValid()===!0||J?.isValid()===!0)){const G=h+f/2,U=d*Math.cos(G),Y=d*Math.sin(G);e.moveTo(i+U,s+Y)}}if(de?.isValid()===!0){const{cx:G,cy:U,r:Y,a0:ie,a1:se}=de;e.arc(i+G,s+U,Y,ie,se)}if(z.isValid()){const{r:G,a0:U,a1:Y}=z;e.arc(i,s,G,U,Y)}if(pe?.isValid()===!0){const{cx:G,cy:U,r:Y,a0:ie,a1:se}=pe;e.arc(i+G,s+U,Y,ie,se)}if(!L){if(ge?.isValid()===!0){const{cx:G,cy:U,r:Y,a0:ie,a1:se}=ge;e.arc(i+G,s+U,Y,ie,se)}if(J?.isValid()===!0){const{r:G,a0:U,a1:Y}=J;e.arc(i,s,G,Y,U,!0)}if(xe?.isValid()===!0){const{cx:G,cy:U,r:Y,a0:ie,a1:se}=xe;e.arc(i+G,s+U,Y,ie,se)}}e.closePath()}isPointInPath(t,e){const{startAngle:i,endAngle:s,innerRadius:n,outerRadius:r}=this.clipSector??this;return isPointInSector(t-this.centerX,e-this.centerY,{startAngle:i,endAngle:s,innerRadius:Math.min(n,r),outerRadius:Math.max(n,r)})}};Sector.className="Sector",__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"centerX",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"centerY",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"innerRadius",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"outerRadius",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"startAngle",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"endAngle",2),__decorateClass([(0,import_ag_charts_core223.SceneObjectChangeDetection)({equals:(t,e)=>t.equals(e)})],Sector.prototype,"clipSector",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"concentricEdgeInset",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"radialEdgeInset",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"startOuterCornerRadius",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"endOuterCornerRadius",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"startInnerCornerRadius",2),__decorateClass([(0,import_ag_charts_core223.SceneChangeDetection)()],Sector.prototype,"endInnerCornerRadius",2);var import_ag_charts_core228=require("ag-charts-core"),import_ag_charts_core224=require("ag-charts-core"),MenuItemWidget=class extends AbstractButtonWidget{constructor(){super((0,import_ag_charts_core224.createElement)("div"),"menuitem")}},MenuItemRadioWidget=class extends AbstractButtonWidget{constructor(){super((0,import_ag_charts_core224.createElement)("div"),"menuitemradio")}setChecked(t){(0,import_ag_charts_core224.setAttribute)(this.elem,"aria-checked",t)}},import_ag_charts_core225=require("ag-charts-core"),closeKeys=["Escape","ArrowLeft"],MenuWidget=class He extends RovingTabContainerWidget{constructor(e="vertical"){super(e,"menu"),this.handleMouseEnter=(i,s)=>{s.hasPopup()||this.expandSubMenu(i,void 0)},this.handleMouseMove=(i,s)=>{s.focus({preventScroll:!0})}}destructor(){this.collapse({mode:"2"})}addSeparator(){const e=(0,import_ag_charts_core225.getDocument)().createElement("div");return(0,import_ag_charts_core225.setAttribute)(e,"role","separator"),this.elem.appendChild(e),e}onChildAdded(e){super.onChildAdded(e),e.addListener("mouseenter",this.handleMouseEnter),e.addListener("mousemove",this.handleMouseMove)}onChildRemoved(e){super.onChildRemoved(e),e.removeListener("mouseenter",this.handleMouseEnter),e.removeListener("mousemove",this.handleMouseMove)}addSubMenu(){const e=new MenuItemWidget,i=new He(this.orientation);i.id=(0,import_ag_charts_core225.createElementId)();const s=()=>{this.collapseExpandedSubMenu(i),e.expandControlled()},n=r=>{(0,import_ag_charts_core225.hasNoModifiers)(r.sourceEvent)&&r.sourceEvent.code==="ArrowRight"&&(this.collapseExpandedSubMenu(i),e.expandControlled())};return e.setControlled(i),e.setAriaHasPopup("menu"),e.addListener("click",s),e.addListener("mouseenter",s),e.addListener("keydown",n),this.addChild(e),{subMenuButton:e,subMenu:i}}expandSubMenu(e,i){const{expansionScope:s}=this;s&&(this.collapseExpandedSubMenu(i),i?.expand(e))}collapseExpandedSubMenu(e){const{expansionScope:i}=this;i&&(i.expandedSubMenu?.collapse({mode:"4"}),i.expandedSubMenu=e)}expand(e){if(this.expansionScope!=null)return;this.expansionScope={lastFocus:(0,import_ag_charts_core225.getLastFocus)(e.sourceEvent),expandedSubMenu:void 0,abort:()=>this.collapse({mode:"1"}),close:()=>this.collapse({mode:"0"}),removers:new import_ag_charts_core225.CleanupRegistry};const i=this.expansionScope,s=this.children.map(n=>n.getElement());(0,import_ag_charts_core225.setAttribute)(i.lastFocus,"aria-expanded",!0),i.removers.register((0,import_ag_charts_core225.addMouseCloseListener)(this.elem,i.abort),(0,import_ag_charts_core225.addTouchCloseListener)(this.elem,i.abort),...this.children.map(n=>(0,import_ag_charts_core225.addEscapeEventListener)(n.getElement(),i.close,closeKeys)),e?.overrideFocusVisible&&(0,import_ag_charts_core225.addOverrideFocusVisibleEventListener)(this.elem,s,e.overrideFocusVisible)),this.internalListener?.dispatch("expand-widget",this,{type:"expand-widget"}),this.children[0]?.focus({preventScroll:!0})}collapse(e){const{mode:i="0"}=e??{};if(this.expansionScope===void 0)return;const{lastFocus:s,removers:n,expandedSubMenu:r}=this.expansionScope;this.expansionScope=void 0,r?.collapse({mode:"3"}),(0,import_ag_charts_core225.setAttribute)(s,"aria-expanded",!1),i==="0"&&s?.focus({preventScroll:!0}),n.flush(),this.internalListener?.dispatch("collapse-widget",this,{type:"collapse-widget",mode:i})}},import_ag_charts_core227=require("ag-charts-core"),import_ag_charts_core226=require("ag-charts-core"),canvasOverlay="canvas-overlay",Popover=class extends import_ag_charts_core226.AbstractModuleInstance{constructor(t,e,i){super(),this.ctx=t,this.hideFns=[],this.setOwnedWidget=(()=>{let s;return n=>{s?.destroy(),s=n}})(),this.moduleId=`popover-${e}`,i?.detached?this.element=(0,import_ag_charts_core226.createElement)("div"):this.element=t.domManager.addChild(canvasOverlay,this.moduleId),this.element.setAttribute("role","presentation"),this.hideFns.push(()=>this.setOwnedWidget(void 0)),this.cleanup.register(()=>t.domManager.removeChild(canvasOverlay,this.moduleId))}attachTo(t){this.element.parentElement||t.element.append(this.element)}hide(t){const{lastFocus:e=this.lastFocus}=t??{};if(this.element.children.length!==0){for(const i of this.hideFns)i();e?.focus(),this.lastFocus=void 0}}removeChildren(){this.element.replaceChildren()}initPopoverElement(t,e){if(!this.element.parentElement)throw new Error("Can not show popover that has not been attached to a parent.");return t??(t=(0,import_ag_charts_core226.createElement)("div","ag-charts-popover")),t.classList.toggle("ag-charts-popover",!0),e.ariaLabel!=null&&t.setAttribute("aria-label",e.ariaLabel),e.class!=null&&t.classList.add(e.class),this.element.replaceChildren(t),t}showWidget(t,e,i){this.setOwnedWidget(e),this.initPopoverElement(e.getElement(),i),e.addListener("collapse-widget",()=>{t.setControlled(void 0),this.setOwnedWidget(void 0)}),t.setControlled(e),t.expandControlled()}showWithChildren(t,e){const i=this.initPopoverElement(void 0,e);if(i.replaceChildren(...t),this.hideFns.push(()=>this.removeChildren()),e.onHide&&this.hideFns.push(e.onHide),e.initialFocus&&e.sourceEvent){const s=(0,import_ag_charts_core226.getLastFocus)(e.sourceEvent);s!==void 0&&(this.lastFocus=s,this.initialFocus=e.initialFocus)}return i}getPopoverElement(){return this.element.firstElementChild}updatePosition(t){const e=this.getPopoverElement();e&&(e.style.setProperty("right","unset"),e.style.setProperty("bottom","unset"),t.x!=null&&e.style.setProperty("left",`${Math.floor(t.x)}px`),t.y!=null&&e.style.setProperty("top",`${Math.floor(t.y)}px`),this.initialFocus?.focus(),this.initialFocus=void 0)}},AnchoredPopover=class extends Popover{setAnchor(t,e){this.anchor=t,this.fallbackAnchor=e,this.updatePosition(t),this.repositionWithinBounds()}updateAnchor(t){const e=t.anchor??this.anchor,i=t.fallbackAnchor??this.fallbackAnchor;e&&this.setAnchor(e,i)}showWidget(t,e,i){super.showWidget(t,e,i),this.updateAnchor(i)}showWithChildren(t,e){const i=super.showWithChildren(t,e);return this.updateAnchor(e),(0,import_ag_charts_core227.getWindow)().requestAnimationFrame(()=>{this.repositionWithinBounds()}),i}repositionWithinBounds(){const{anchor:t,ctx:e,fallbackAnchor:i}=this,s=this.getPopoverElement();if(!t||!s)return;const n=e.domManager.getBoundingClientRect(),{offsetWidth:r,offsetHeight:a}=s;let o=(0,import_ag_charts_core227.clamp)(0,t.x,n.width-r),l=(0,import_ag_charts_core227.clamp)(0,t.y,n.height-a);o!==t.x&&i?.x!=null&&(o=(0,import_ag_charts_core227.clamp)(0,i.x-r,n.width-r)),l!==t.y&&i?.y!=null&&(l=(0,import_ag_charts_core227.clamp)(0,i.y-a,n.height-a)),this.updatePosition({x:o,y:l})}},Menu=class extends AnchoredPopover{show(t,e){const i=new MenuWidget("vertical");for(const s of e.items)i.addChild(this.createRow(e,s,i));i.addClass("ag-charts-menu"),this.showWidget(t,i,e)}allocRow(t,e){if(t.menuItemRole==null||t.menuItemRole==="menuitem")return new MenuItemWidget;{t.menuItemRole;const i=new MenuItemRadioWidget;return i.setChecked(t.value===e.value),i}}createRow(t,e,i){const s=e.value===t.value,n=this.allocRow(t,e);if(n.addClass("ag-charts-menu__row"),n.toggleClass("ag-charts-menu__row--active",s),typeof e.value=="string"&&(n.getElement().dataset.popoverId=e.value),e.icon!=null){const a=(0,import_ag_charts_core228.createElement)("span",`ag-charts-menu__icon ${(0,import_ag_charts_core228.getIconClassNames)(e.icon)}`);n.getElement().appendChild(a)}const r=e.strokeWidth!=null;if(r&&(n.toggleClass("ag-charts-menu__row--stroke-width-visible",r),n.setCSSVariable("--strokeWidth",r?`${e.strokeWidth}px`:null)),e.label!=null){const a=(0,import_ag_charts_core228.createElement)("span","ag-charts-menu__label");a.textContent=this.ctx.localeManager.t(e.label),n.getElement().appendChild(a)}return"altText"in e&&n.setAriaLabel(this.ctx.localeManager.t(e.altText)),n.addListener("click",({sourceEvent:a})=>{t.onPress?.(e),a.preventDefault(),a.stopPropagation(),i.collapse()}),n}},import_ag_charts_core229=require("ag-charts-core"),DraggablePopover=class extends Popover{constructor(){super(...arguments),this.dragged=!1}setDragHandle(t){t.addListener("drag-start",e=>{t.addClass(this.dragHandleDraggingClass),this.onDragStart(e)}),t.addListener("drag-move",this.onDragMove.bind(this)),t.addListener("drag-end",()=>{t.removeClass(this.dragHandleDraggingClass),this.onDragEnd.bind(this)})}onDragStart(t){const e=this.getPopoverElement();e&&(t.sourceEvent.preventDefault(),this.dragged=!0,this.dragStartState={client:import_ag_charts_core229.Vec2.from(t.clientX,t.clientY),position:import_ag_charts_core229.Vec2.from(Number(e.style.getPropertyValue("left").replace("px","")),Number(e.style.getPropertyValue("top").replace("px","")))})}onDragMove(t){const{dragStartState:e}=this,i=this.getPopoverElement();if(!e||!i)return;const s=import_ag_charts_core229.Vec2.sub(import_ag_charts_core229.Vec2.from(t.clientX,t.clientY),e.client),n=import_ag_charts_core229.Vec2.add(e.position,s),r=this.ctx.domManager.getBoundingClientRect(),a={};n.x>=0&&n.x+i.offsetWidth<=r.width&&(a.x=n.x),n.y>=0&&n.y+i.offsetHeight<=r.height&&(a.y=n.y),this.updatePosition(a)}onDragEnd(){this.dragStartState=void 0}},import_ag_charts_core230=require("ag-charts-core"),ARIA_HASPOPUP={"disjoint-channel":"false","fibonacci-menu":"menu","fibonacci-retracement":"false","fibonacci-retracement-trend-based":"false","fill-color":"dialog","horizontal-line":"false","line-color":"dialog","line-menu":"menu","line-stroke-width":"menu","line-style-type":"menu","measurer-menu":"menu","pan-end":"false","pan-left":"false","pan-right":"false","pan-start":"false","parallel-channel":"false","shape-menu":"menu","text-color":"dialog","text-menu":"menu","text-size":"menu","vertical-line":"false","zoom-in":"false","zoom-out":"false",callout:"false",clear:"false",comment:"false",delete:"false",line:"false",lock:"false",menu:"menu",note:"false",reset:"false",settings:"dialog",text:"false"};function getAriaHasPopupOfValue(t){return typeof t!="string"?"false":ARIA_HASPOPUP[t]}var ToolbarButtonWidget=class extends ButtonWidget{constructor(t){super(),this.localeManager=t}update(t){const{localeManager:e}=this;if(t.tooltip){const n=e.t(t.tooltip);n!==this.lastTooltip&&(this.elem.title=n,this.lastTooltip=n)}let i="";if(t.icon!=null&&(i=`<span class="${(0,import_ag_charts_core230.getIconClassNames)(t.icon)} ag-charts-toolbar__icon"></span>`),t.label!=null){const n=e.t(t.label);i=`${i}<span class="ag-charts-toolbar__label">${n}</span>`}const s=getAriaHasPopupOfValue(t.value);s=="false"?(this.setAriaHasPopup(void 0),this.setAriaExpanded(void 0)):(this.setAriaHasPopup(s),this.setAriaExpanded(!1)),i!==this.lastInnerHTML&&(this.elem.innerHTML=i,this.lastInnerHTML=i)}setChecked(t){(0,import_ag_charts_core230.setAttribute)(this.elem,"aria-checked",t)}},import_ag_charts_core231=require("ag-charts-core"),BUTTON_ACTIVE_CLASS="ag-charts-toolbar__button--active",BaseToolbar=class extends ToolbarWidget{constructor({eventsHub:t,localeManager:e},i,s){super(s),this.ariaLabelId=i,this.horizontalSpacing=10,this.verticalSpacing=10,this.events=new Listeners,this.hasPrefix=!1,this.buttonWidgets=[],this.updateAriaLabel=()=>this.setAriaLabel(this.localeManager.t(this.ariaLabelId)),this.eventsHub=t,this.localeManager=e,this.addClass("ag-charts-toolbar"),this.toggleClass("ag-charts-toolbar--horizontal",s==="horizontal"),this.toggleClass("ag-charts-toolbar--vertical",s==="vertical"),this.eventsHub.on("locale:change",this.updateAriaLabel),this.updateAriaLabel()}setAriaLabelId(t){this.ariaLabelId=t,this.updateAriaLabel()}addToolbarListener(t,e){return this.events.addListener(t,e)}clearButtons(){this.expanded?.collapse({mode:"2"});for(const t of this.buttonWidgets)t.destroy();this.buttonWidgets.splice(0)}updateButtons(t){const{buttonWidgets:e}=this;for(const[i,s]of t.entries())(this.buttonWidgets.at(i)??this.createButton(i,s)).update(s);for(let i=t.length;i<e.length;i++)this.buttonWidgets.at(i)?.destroy();this.buttonWidgets.splice(t.length),this.refreshButtonClasses()}updateButtonByIndex(t,e){this.buttonWidgets.at(t)?.update(e)}clearActiveButton(){for(const t of this.buttonWidgets)t.toggleClass(BUTTON_ACTIVE_CLASS,!1)}toggleActiveButtonByIndex(t){if(t!==-1)for(const[e,i]of this.buttonWidgets.entries())i.toggleClass(BUTTON_ACTIVE_CLASS,t!=null&&t===e)}toggleButtonEnabledByIndex(t,e){t!==-1&&this.buttonWidgets.at(t)?.setEnabled(e)}toggleSwitchCheckedByIndex(t,e){t!==-1&&this.buttonWidgets.at(t)?.setChecked(e)}getButtonBounds(){return this.buttonWidgets.map(t=>this.getButtonWidgetBounds(t))}setButtonHiddenByIndex(t,e){this.buttonWidgets.at(t)?.setHidden(e)}getButtonWidgetBounds(t){const e=this.getBounds(),i=t.getBounds();return new BBox(i.x+e.x,i.y+e.y,i.width,i.height)}refreshButtonClasses(){const{buttonWidgets:t,hasPrefix:e}=this;let i,s,n;for(const[r,a]of t.entries())i=!e&&r===0||n!=a.section,s=r===t.length-1||a.section!=t.at(r+1)?.section,a.toggleClass("ag-charts-toolbar__button--first",i),a.toggleClass("ag-charts-toolbar__button--last",s),a.toggleClass("ag-charts-toolbar__button--gap",r>0&&i),n=a.section}createButton(t,e){const i=this.createButtonWidget();return i.addClass("ag-charts-toolbar__button"),i.addListener("click",s=>{const n={index:t,...e instanceof import_ag_charts_core231.BaseProperties?e.toJson():e},r=this.getButtonWidgetBounds(i),a={event:s,button:n,buttonBounds:r,buttonWidget:i};this.events.dispatch("button-pressed",a)}),i.addListener("focus",()=>{const s={button:{index:t}};this.events.dispatch("button-focused",s)}),i.addListener("expand-controlled-widget",s=>{this.expanded?.collapse({mode:"4"}),this.expanded=s.controlled;const n=this.expanded.addListener("collapse-widget",()=>{this.expanded=void 0,n()})}),e.section&&(i.section=e.section),this.buttonWidgets.push(i),this.addChild(i),i}},Toolbar=class extends BaseToolbar{createButtonWidget(){return new ToolbarButtonWidget(this.localeManager)}},import_ag_charts_core232=require("ag-charts-core"),FloatingToolbarPopover=class extends DraggablePopover{constructor(t,e,i){super(t,e),this.onPopoverMoved=i,this.dragHandleDraggingClass="ag-charts-floating-toolbar__drag-handle--dragging"}show(t,e={}){this.showWithChildren(t,{...e,class:"ag-charts-floating-toolbar"})}hide(){this.dragged=!1,super.hide()}getBounds(){const t=this.getPopoverElement();return new BBox(t?.offsetLeft??0,t?.offsetTop??0,t?.offsetWidth??0,t?.offsetHeight??0)}hasBeenDragged(){return this.dragged}setAnchor(t,e,i){const s=this.getPopoverElement();if(!s)return;const n=t.position??"above",{offsetWidth:r,offsetHeight:a}=s;let o=t.y-a-i,l=t.x-r/2;n==="below"?o=t.y+i:n==="right"?(o=t.y-a/2,l=t.x+e):n==="above-left"&&(l=t.x),this.updatePosition({x:l,y:o})}ignorePointerEvents(){const t=this.getPopoverElement();t&&(t.style.pointerEvents="none")}capturePointerEvents(){const t=this.getPopoverElement();t&&(t.style.pointerEvents="unset")}updatePosition(t){const e=this.getBounds(),i=this.ctx.domManager.getBoundingClientRect();t.x=Math.floor((0,import_ag_charts_core232.clamp)(0,t.x,i.width-e.width)),t.y=Math.floor((0,import_ag_charts_core232.clamp)(0,t.y,i.height-e.height)),super.updatePosition(t),this.onPopoverMoved()}},FloatingToolbar=class extends BaseToolbar{constructor(t,e,i){super(t,e,"horizontal"),this.hasPrefix=!0,this.popover=new FloatingToolbarPopover(t,i,this.onPopoverMoved.bind(this)),this.dragHandle=new DragHandleWidget(t.localeManager.t("toolbarAnnotationsDragHandle")),this.popover.setDragHandle(this.dragHandle)}destroy(){super.destroy(),this.popover.destroy()}show(t={}){this.popover.show([this.dragHandle.getElement(),this.getElement()],t)}hide(){this.popover.hide()}setAnchor(t){this.popover.setAnchor(t,this.horizontalSpacing,this.verticalSpacing)}hasBeenDragged(){return this.popover.hasBeenDragged()}ignorePointerEvents(){this.popover.ignorePointerEvents()}capturePointerEvents(){this.popover.capturePointerEvents()}onPopoverMoved(){const t=this.popover.getBounds();if(this.popoverBounds?.equals(t))return;this.popoverBounds=t.clone();const e=this.getButtonBounds();this.events.dispatch("toolbar-moved",{popoverBounds:t,buttonBounds:e})}getButtonWidgetBounds(t){const e=this.popover.getBounds(),i=super.getButtonWidgetBounds(t),s=this.dragHandle.getBounds();return new BBox(i.x+e.x-s.width,i.y+e.y,i.width,i.height)}},DragHandleWidget=class extends NativeWidget{constructor(t){super((0,import_ag_charts_core232.createElement)("div","ag-charts-floating-toolbar__drag-handle"));const e=new NativeWidget((0,import_ag_charts_core232.createElement)("span",`${(0,import_ag_charts_core232.getIconClassNames)("drag-handle")} ag-charts-toolbar__icon`));e.setAriaHidden(!0),this.addChild(e),this.elem.title=t}},motion={...fromToMotion_exports,...resetMotion_exports},exports_exports={};__export(exports_exports,{ButtonWidget:()=>ButtonWidget,MenuItemRadioWidget:()=>MenuItemRadioWidget,MenuItemWidget:()=>MenuItemWidget,MenuWidget:()=>MenuWidget,NativeWidget:()=>NativeWidget,SliderWidget:()=>SliderWidget,ToolbarWidget:()=>ToolbarWidget,WIDGET_HTML_EVENTS:()=>WIDGET_HTML_EVENTS,Widget:()=>Widget,WidgetEventUtil:()=>WidgetEventUtil});var import_ag_charts_core234=require("ag-charts-core"),import_ag_charts_core233=require("ag-charts-core"),commonAxisProperties={title:{enabled:!1},label:{enabled:!1},line:{enabled:!1},gridLine:{enabled:!1},crosshair:{enabled:!1,stroke:import_ag_charts_core233.DEFAULT_SPARKLINE_CROSSHAIR_STROKE,lineDash:[0],label:{enabled:!1}}},numericAxisProperties={...commonAxisProperties,nice:!1},chartTooltipDefaults={mode:"compact",position:{anchorTo:"node",placement:["right","left"]},showArrow:!1},barGridLineDefaults={style:[{stroke:{$ref:"gridLineColor"}}],width:2},barAxisDefaults={number:{gridLine:barGridLineDefaults},time:{gridLine:barGridLineDefaults},category:{gridLine:barGridLineDefaults}},SPARKLINE_THEME={overrides:{common:{animation:{enabled:!1},contextMenu:{enabled:!1},keyboard:{enabled:!1},background:{visible:!1},navigator:{enabled:!1},padding:{top:0,right:0,bottom:0,left:0},axes:{number:{...numericAxisProperties,interval:{values:[0]}},log:{...numericAxisProperties},time:{...numericAxisProperties},category:{...commonAxisProperties}}},bar:{series:{crisp:!1,label:{placement:"inside-end",padding:4},sparklineMode:!0},tooltip:{...chartTooltipDefaults,position:{...chartTooltipDefaults.position,anchorTo:"pointer"},range:"nearest"},axes:barAxisDefaults},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},series:{sparklineMode:!0,strokeWidth:1,marker:{enabled:!1,size:3}},tooltip:chartTooltipDefaults},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},series:{strokeWidth:1,fillOpacity:.4},tooltip:chartTooltipDefaults}}},setInitialBaseTheme=(0,import_ag_charts_core233.simpleMemorize)(createInitialBaseTheme);function createInitialBaseTheme(t,e){return typeof t=="string"?{...e,baseTheme:t}:t!=null?{...t,baseTheme:setInitialBaseTheme(t.baseTheme,e)}:e}function sparklineDataPreset(t){if(Array.isArray(t)&&t.length!==0){const e=t.find(i=>i!=null);if(typeof e=="number")return{data:t.map((s,n)=>({x:n,y:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"y"};if(Array.isArray(e))return{data:t.map(s=>({x:s?.[0],y:s?.[1],datum:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"datum"}}else if(t?.length===0)return{data:t,series:[{xKey:"x",yKey:"y"}],datumKey:"y"};return{data:t}}function axisPreset(t){switch(t?.type){case"number":{const{reverse:e,min:i,max:s}=t??{};return{type:"number",reverse:e,min:i,max:s}}case"time":{const{reverse:e,min:i,max:s}=t??{};return{type:"time",reverse:e,min:i,max:s}}case"category":default:{if(t==null)return{type:"category"};const{reverse:e,paddingInner:i,paddingOuter:s}=t;return{type:"category",reverse:e,paddingInner:i,paddingOuter:s}}}}function gridLinePreset(t,e,i){const s={};return t?.stroke!=null&&(s.style=[{stroke:t?.stroke}],s.enabled??(s.enabled=!0)),t?.strokeWidth!=null&&(s.width=t?.strokeWidth,s.enabled??(s.enabled=!0)),i.type==="bar"&&i.direction!=="horizontal"&&(s.enabled??(s.enabled=!0)),t?.visible!=null&&(s.enabled=t.visible),s.enabled??(s.enabled=e),s}var tooltipRendererFn=(0,import_ag_charts_core233.simpleMemorize)((t,e,i)=>s=>{const n=s.datum[s.xKey],r=s.datum[s.yKey],a=i==null?s.datum:s.datum[i],o=e?.renderer?.({context:t,datum:a,xValue:n,yValue:r});if((0,import_ag_charts_core233.isString)(o)||(0,import_ag_charts_core233.isNumber)(o)||(0,import_ag_charts_core233.isDate)(o))return(0,import_ag_charts_core233.toTextString)(o);const l=o?.content??r.toFixed(2);return o?.title?{heading:void 0,title:void 0,data:[{label:o.title,value:l}]}:{heading:void 0,title:l,data:[]}});function sparkline(t){const{background:e,container:i,foreground:s,height:n,listeners:r,locale:a,minHeight:o,minWidth:l,overrideDevicePixelRatio:c,padding:h,width:u,theme:d,data:p,crosshair:g,axis:f,min:y,max:m,tooltip:b,context:v,styleNonce:x,...S}=t,I={background:e,container:i,foreground:s,height:n,listeners:r,locale:a,minHeight:o,minWidth:l,overrideDevicePixelRatio:c,padding:h,width:u,styleNonce:x},{data:D,series:[T]=[],datumKey:A}=sparklineDataPreset(p),L=S;T!=null&&Object.assign(L,T),L.tooltip={...b,renderer:tooltipRendererFn(v,b,A)},I.theme=setInitialBaseTheme(d,SPARKLINE_THEME),I.data=D,I.series=[L];const N=L.type==="bar"&&L.direction==="horizontal",[k,w]=N?["left","bottom"]:["bottom","left"],E={...axisPreset(f),position:k,...g==null?{}:{crosshair:g}},O={type:"number",gridLine:gridLinePreset(f,!1,t),position:w,...y==null?{}:{min:y},...m==null?{}:{max:m}};return I.axes=N?{x:O,y:E}:{x:E,y:O},I}var commonSparklineOmit=["showInLegend","showInMiniChart","grouped","stacked","stackGroup","tooltip","listeners","errorBar","xKey","yKey","type"],commonSparklineAxisOptionsDef={visible:import_ag_charts_core234.boolean,reverse:import_ag_charts_core234.boolean,stroke:import_ag_charts_core234.color,strokeWidth:import_ag_charts_core234.positiveNumber},commonSparklineOptionsDef={context:()=>!0,tooltip:import_ag_charts_core234.defined,theme:import_ag_charts_core234.defined,background:import_ag_charts_core234.defined,container:import_ag_charts_core234.defined,width:import_ag_charts_core234.defined,height:import_ag_charts_core234.defined,minWidth:import_ag_charts_core234.defined,minHeight:import_ag_charts_core234.defined,padding:import_ag_charts_core234.defined,listeners:import_ag_charts_core234.defined,locale:import_ag_charts_core234.defined,data:import_ag_charts_core234.defined,styleNonce:import_ag_charts_core234.string,axis:(0,import_ag_charts_core234.typeUnion)({number:{...commonSparklineAxisOptionsDef,min:(0,import_ag_charts_core234.and)(import_ag_charts_core234.number,(0,import_ag_charts_core234.lessThan)("max")),max:(0,import_ag_charts_core234.and)(import_ag_charts_core234.number,(0,import_ag_charts_core234.greaterThan)("min"))},category:{...commonSparklineAxisOptionsDef,paddingInner:import_ag_charts_core234.ratio,paddingOuter:import_ag_charts_core234.ratio},time:{...commonSparklineAxisOptionsDef,min:(0,import_ag_charts_core234.and)((0,import_ag_charts_core234.or)(import_ag_charts_core234.number,import_ag_charts_core234.date),(0,import_ag_charts_core234.lessThan)("max")),max:(0,import_ag_charts_core234.and)((0,import_ag_charts_core234.or)(import_ag_charts_core234.number,import_ag_charts_core234.date),(0,import_ag_charts_core234.greaterThan)("min"))}},"axis options","category"),min:(0,import_ag_charts_core234.and)(import_ag_charts_core234.number,(0,import_ag_charts_core234.lessThan)("max")),max:(0,import_ag_charts_core234.and)(import_ag_charts_core234.number,(0,import_ag_charts_core234.greaterThan)("min")),crosshair:{enabled:import_ag_charts_core234.boolean,snap:import_ag_charts_core234.boolean,...import_ag_charts_core234.strokeOptionsDef,...import_ag_charts_core234.lineDashOptionsDef},xKey:import_ag_charts_core234.string,yKey:import_ag_charts_core234.string};commonSparklineOptionsDef.overrideDevicePixelRatio=(0,import_ag_charts_core234.undocumented)(import_ag_charts_core234.number),commonSparklineOptionsDef.foreground=(0,import_ag_charts_core234.undocumented)(import_ag_charts_core234.defined);var SparklinePresetModule={type:"preset",name:"sparkline",version:VERSION,options:(0,import_ag_charts_core234.typeUnion)({area:{...commonSparklineOptionsDef,...(0,import_ag_charts_core234.without)(areaSeriesOptionsDef,commonSparklineOmit)},bar:{...commonSparklineOptionsDef,...(0,import_ag_charts_core234.without)(barSeriesOptionsDef,commonSparklineOmit)},line:{...commonSparklineOptionsDef,...(0,import_ag_charts_core234.without)(lineSeriesOptionsDef,commonSparklineOmit)}},"sparkline options"),create:sparkline,processData:sparklineDataPreset},import_ag_charts_core236=require("ag-charts-core"),import_ag_charts_core235=require("ag-charts-core"),directions=["top","right","bottom","left"],_CartesianChart=class We extends Chart{constructor(e,i){super(e,i),this.paired=!0,this.axes=this.createChartAxes(),this.lastUpdateClipRect=void 0,this.lastLayoutWidth=Number.NaN,this.lastLayoutHeight=Number.NaN}createChartAxes(){return new CartesianChartAxes}onAxisChange(e,i){super.onAxisChange(e,i),this.syncAxisChanges(e,i),this.ctx!=null&&this.ctx.zoomManager.setAxes(e)}destroySeries(e){super.destroySeries(e),this.lastLayoutWidth=Number.NaN,this.lastLayoutHeight=Number.NaN}getChartType(){return"cartesian"}setRootClipRects(e){const{seriesRoot:i,annotationRoot:s}=this;i.setClipRect(e),s.setClipRect(e)}async processData(){await super.processData(),this.syncStatus==="init"&&(this.syncStatus="domains-calculated"),this.ctx.updateService.dispatchProcessData({series:{shouldFlipXY:this.shouldFlipXY()}})}async processDomains(){await super.processDomains();for(const e of this.axes){const i=await this.getSyncedDomain(e);i!=null&&e.setDomains({domain:i})}}performLayout(e){const{seriesRoot:i,annotationRoot:s}=this,{clipSeries:n,seriesRect:r,visible:a}=this.updateAxes(e);this.seriesRoot.visible=a,this.seriesRect=r,this.animationRect=e.layoutBox;const{x:o,y:l}=r;if(e.width!==this.lastLayoutWidth||e.height!==this.lastLayoutHeight)for(const g of[i,s])g.translationX=Math.floor(o),g.translationY=Math.floor(l);else{const{translationX:g,translationY:f}=i;staticFromToMotion(this.id,"seriesRect",this.ctx.animationManager,[i,s],{translationX:g,translationY:f},{translationX:Math.floor(o),translationY:Math.floor(l)},{phase:"update"})}this.lastLayoutWidth=e.width,this.lastLayoutHeight=e.height;const c=r.clone().grow(this.seriesArea.getPadding()),d=this.series.some(g=>g.alwaysClip)||(this.seriesArea.clip??!1)||n?c:void 0,{lastUpdateClipRect:p}=this;this.lastUpdateClipRect=d,this.ctx.animationManager.isActive()&&p!=null?this.ctx.animationManager.animate({id:this.id,groupId:"clip-rect",phase:"update",from:p,to:c,onUpdate:g=>this.setRootClipRects(g),onStop:()=>this.setRootClipRects(d),onComplete:()=>this.setRootClipRects(d)}):this.setRootClipRects(d),this.ctx.layoutManager.emitLayoutComplete(e,{axes:(0,import_ag_charts_core235.fromPairs)(this.axes.map(g=>[g.id,g.getLayoutState()])),series:{visible:a,rect:r,paddedRect:c},clipSeries:n}),stackCartesianSeries(this.series)}updateAxes(e){const{layoutBox:i,scrollbars:s}=e,{clipSeries:n,seriesRect:r,overflows:a}=this.resolveAxesLayout(i,s);for(const o of this.axes)o.update(),o.setCrossLinesVisible(!a),this.clipAxis(o,r,i);return{clipSeries:n,seriesRect:r,visible:!a}}resolveAxesLayout(e,i){let s,n,r=0;const a=10,o=this.axes.filter(l=>l.crossAt?.value!=null);do if(n=s??this.getDefaultState(),s=this.updateAxesPass(new Map(n.axisAreaWidths),e.clone(),o,i),r++>a){import_ag_charts_core235.Logger.warn("Max iterations reached. Unable to stabilize axes layout.");break}while(!this.isLayoutStable(s,n));return this.lastAreaWidths=s.axisAreaWidths,s}updateAxesPass(e,i,s,n){const r=new Map,a={};let o=!1,l=!1;const c=this.seriesArea.getPadding();for(const S of directions){const I=c[S]??0,D=this.axes.findLast(T=>T.position===S);D?D.seriesAreaPadding=I:i.shrink(I,S)}const h=(e.get("left")??0)+(e.get("right")??0),u=(e.get("top")??0)+(e.get("bottom")??0),d=this.buildCrossLinePadding(e),p=d.left+d.right,g=d.top+d.bottom;i.width<=h+p||i.height<=u+g?o=!0:i.shrink(d);const{scene:f}=this.ctx,y=i.clone().shrink(Object.fromEntries(e));for(const S of this.axes){const{position:I="left",direction:D}=S,T=D===import_ag_charts_core235.ChartAxisDirection.Y;let A;this.sizeAxis(S,y,I),S.thickness==null?A=getSize(T,f)*(S.maxThicknessRatio??1):A=S.thickness;const L={sizeLimit:A-S.label.spacing,padding:this.padding,scrollbars:n},{primaryTickCount:N,bbox:k}=S.calculateLayout(S.nice?a[D]:void 0,L);a[D]??(a[D]=N),l||(l=S.dataDomain.clipped||S.visibleRange[0]>0||S.visibleRange[1]<1),S.thickness==null&&(A=Math.min(getSize(T,k)??0,A)),r.set(S.id,Math.ceil(A))}let m;s.length>0&&(m=this.calculateAxesCrossPositions(r,y,s));const b=(0,import_ag_charts_core235.groupBy)(this.axes,S=>S.position??"left"),v=new Map,x=new Map;for(const[S,I]of(0,import_ag_charts_core235.entries)(b)){let D=getSize(S!=="left"&&S!=="right",f)%f.pixelRatio,T=0;for(const A of I??[]){x.set(A.id,D);const L=r.get(A.id)??0;T=Math.max(T,D+L),A.layoutConstraints.stacked&&(D+=L+We.AxesPadding)}v.set(S,Math.ceil(T))}for(const[S,I]of(0,import_ag_charts_core235.entries)(b))this.positionAxes({axes:I??[],position:S,axisWidths:r,axisOffsets:x,axisAreaWidths:v,axisBound:i,seriesRect:y});return m!=null&&this.applyAxisCrossing(y,m),{clipSeries:l,seriesRect:y,axisAreaWidths:v,overflows:o}}calculateAxesCrossPositions(e,i,s){const n=new Map;for(const r of s){const{crossPosition:a,visible:o}=this.calculateAxisCrossPosition(r);r.setAxisVisible(o),this.adjustAxisWidth(r,e,a,i,o),a!=null&&n.set(r.id,a)}return n}calculateAxisCrossPosition(e){const i=this.axes.perpendicular(e),{scale:{domain:s,bandwidth:n},range:r}=i,a=(n??0)/2,o=i.scale.convert(e.crossAt?.value,{clamp:!1})+a;return i.inRange(o)?{crossPosition:o,visible:!0}:e.crossAt?.sticky===!1?{crossPosition:void 0,visible:!1}:{crossPosition:Number.isNaN(o)?r[s[0]]:(0,import_ag_charts_core235.clampArray)(o,r),visible:!0}}adjustAxisWidth(e,i,s,n,r){if(e.getModuleMap().getModule("crosshair")?.enabled||this.modulesManager.getModule("annotations")?.enabled===!0||this.ctx.annotationManager.createMemento().some(u=>{switch(u.type){case"vertical-line":return e.direction===import_ag_charts_core235.ChartAxisDirection.X;case"horizontal-line":return e.direction===import_ag_charts_core235.ChartAxisDirection.Y}}))return;const c=i.get(e.id)??0,h=r?this.calculateAxisBleedingWidth(e,c,s,n):0;i.set(e.id,h)}calculateAxisBleedingWidth(e,i,s,n){if(s==null)return i;switch(e.position){case"left":case"top":return Math.max(0,i-s);case"right":return Math.max(0,s+i-n.width);case"bottom":return Math.max(0,s+i-n.height);default:return i}}applyAxisCrossing(e,i){for(const s of this.axes){const n=i.get(s.id);if(n==null){s.crossAxisTranslation.x=0,s.crossAxisTranslation.y=0;continue}const r=s.direction===import_ag_charts_core235.ChartAxisDirection.X;s.crossAxisTranslation.x=r?0:e.x+n-s.translation.x,s.crossAxisTranslation.y=r?e.y+n-s.translation.y:0}}buildCrossLinePadding(e){var i;const s={top:0,right:0,bottom:0,left:0};for(const n of this.axes){const{position:r,label:a}=n;if(n.crossLines)for(const o of n.crossLines)o instanceof CartesianCrossLine&&(o.position=r??"top",(i=o.label).parallel??(i.parallel=a.parallel)),o.calculatePadding?.(s)}for(const[n,r=0]of(0,import_ag_charts_core235.entries)(s))s[n]=Math.max(r-(e.get(n)??0),0);return s}clampToOutsideSeriesRect(e,i,s,n){const r=s==="x"?e.x:e.y,a=s==="x"?e.width:e.height;return n===1?Math.min(i,r+a):Math.max(i,r)}async getSyncedDomain(e){const i=this.modulesManager.getModule("sync");if(i?.enabled)return await i.getSyncedDomain(e)}syncAxisChanges(e,i){const s=this.modulesManager.getModule("sync");if(!s?.enabled)return;const n=new Set(i??[]);for(const r of e)n.delete(r);for(const r of n)s.removeAxis(r)}sizeAxis(e,i,s){const n=e instanceof NumberAxis,r=s==="left"||s==="right",{width:a,height:o}=i,l=r?o:a;let c=0,h=l,{min:u,max:d}=this.ctx.zoomManager.getAxisZoom(e.id);const{width:p,unit:g,align:f}=e.layoutConstraints;g==="px"?h=c+p:h=h*p/100;const y=h-c;if(f==="end")c=l-y,h=l;else if(f==="center"){const m=c+(l-c)/2;c=m-y/2,h=m+y/2}else f==="justify"&&(h=l);r&&(n?[c,h]=[h,c]:[u,d]=[1-d,1-u]),e.range=[c,h],e.visibleRange=[u,d],e.gridLength=r?a:o,e.lineRange=r?[o,0]:[0,a]}positionAxes(e){const{axes:i,axisBound:s,axisWidths:n,axisOffsets:r,axisAreaWidths:a,seriesRect:o,position:l}=e,c=a.get(l)??0;let h="x",u="y",d=1;(l==="top"||l==="bottom")&&(h="y",u="x");let p=s[h];(l==="right"||l==="bottom")&&(d=-1,p+=h==="x"?s.width:s.height);for(const g of i){const f=a.get(u==="x"?"left":"top")??0,y=n.get(g.id)??0,m=r.get(g.id)??0;g.gridPadding=c-m-y,g.translation[u]=s[u]+f,g.translation[h]=this.clampToOutsideSeriesRect(o,p+d*(m+y),h,d)}}shouldFlipXY(){return this.series.every(e=>e instanceof CartesianSeries&&e.shouldFlipXY())}getDefaultState(){const e=new Map;if(this.lastAreaWidths)for(const{position:i="left"}of this.axes){const s=this.lastAreaWidths.get(i);s!=null&&e.set(i,s)}return{axisAreaWidths:e,clipSeries:!1,overflows:!1}}isLayoutStable(e,i){if(i.overflows!==e.overflows||i.clipSeries!==e.clipSeries)return!1;for(const s of e.axisAreaWidths.keys())if(!i.axisAreaWidths.has(s))return!1;for(const[s,n]of i.axisAreaWidths.entries()){const r=e.axisAreaWidths.get(s);if((n!=null||r!=null)&&n!==r)return!1}return!0}clipAxis(e,i,s){const n=Math.ceil(e.gridLine?.width??0),r=Math.ceil(e.line?.width??0);let{width:a,height:o}=i;switch(a+=e.direction===import_ag_charts_core235.ChartAxisDirection.X?n:r,o+=e.direction===import_ag_charts_core235.ChartAxisDirection.Y?n:r,e.clipGrid(i.x,i.y,a,o),e.position){case"left":case"right":e.clipTickLines(s.x,i.y-n,s.width+n,i.height+n*2);break;case"top":case"bottom":e.clipTickLines(i.x-n,s.y,i.width+n*2,s.height+n);break}}};_CartesianChart.className="CartesianChart",_CartesianChart.type="cartesian",_CartesianChart.AxesPadding=15,__decorateClass([(0,import_ag_charts_core235.ActionOnSet)({changeValue(t,e){this.onAxisChange(t,e)}})],_CartesianChart.prototype,"axes",2);var CartesianChart=_CartesianChart;function getSize(t,e){return t?e?.width:e?.height}var histogramAxisTypes=new Set(["number","log","time"]),invalidHistogramAxis=t=>(0,import_ag_charts_core236.isObject)(t)&&t.type!=null&&!histogramAxisTypes.has(t.type),CartesianChartModule={type:"chart",name:"cartesian",version:VERSION,options:cartesianChartOptionsDefs,create(t,e){return new CartesianChart(t,e)},validate(t,e,i){const s=[];t?.series?.[0]?.type==="histogram"&&Object.values(t?.axes??{}).some(invalidHistogramAxis)&&(s.push(new import_ag_charts_core236.ValidationError("invalid","only continuous axis types when histogram series is used",t.axes,i,"axes")),t=(0,import_ag_charts_core236.without)(t,["axes"]));const n=(0,import_ag_charts_core236.validate)(t,e,i);return n.invalid.push(...s),n}},import_ag_charts_core238=require("ag-charts-core"),import_ag_charts_core237=require("ag-charts-core"),PolarChart=class extends Chart{constructor(t,e){super(t,e),this.axes=this.createChartAxes(),this.padding=new import_ag_charts_core237.Padding(40),this.ctx.axisManager.axisGroup.zIndex=import_ag_charts_core237.ZIndexMap.AXIS_FOREGROUND}createChartAxes(){return new PolarChartAxes}getChartType(){return"polar"}isDataTransactionSupported(){return!this.series.some(t=>t.type==="pie"||t.type==="donut")}async performLayout(t){const e=t.layoutBox.clone().shrink(this.seriesArea.getPadding());this.seriesRect=e,this.animationRect=e,this.seriesRoot.translationX=e.x,this.seriesRoot.translationY=e.y,await this.computeCircle(e);for(const s of this.axes)s.update();let i=0;for(const s of this.series)i=Math.max(i,s.properties.marker?.size??0);for(const s of this.series.filter(isPolarSeries))s.maxChartMarkerSize=i;this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:e,paddedRect:t.layoutBox}})}updateAxes(t,e,i,s){if(this.axes.length===0)return;const n=this.axes[import_ag_charts_core237.ChartAxisDirection.Angle],r=this.axes[import_ag_charts_core237.ChartAxisDirection.Radius],a=n.scale,o=r.innerRadiusRatio;n.innerRadiusRatio=o,n.computeRange(),n.gridLength=s,r.gridAngles=a.ticks({nice:[n.nice,n.nice],interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.map(l=>a.convert(l)),r.gridRange=n.range,r.range=[s,s*o];for(const l of[n,r])l.translation.x=t.x+e,l.translation.y=t.y+i,l.calculateLayout()}async computeCircle(t){const e=this.series.filter(isPolarSeries),i=(l,c,h)=>{this.updateAxes(t,l,c,h);for(const d of e)d.centerX=l,d.centerY=c,d.radius=h;const u=e.filter(d=>d.type==="donut"||d.type==="pie");if(u.length>1){const d=u.map(p=>{const g=p.getInnerRadius();return{series:p,innerRadius:g}}).sort((p,g)=>p.innerRadius-g.innerRadius);d.at(-1).series.surroundingRadius=void 0;for(let p=0;p<d.length-1;p++)d[p].series.surroundingRadius=d[p+1].innerRadius}},s=t.width/2,n=t.height/2,r=Math.max(0,Math.min(t.width,t.height)/2);let a=r;i(s,n,a);const o=async({hideWhenNecessary:l=!1}={})=>{const c=[];for(const d of(0,import_ag_charts_core237.iterate)(this.axes,e)){const p=await d.computeLabelsBBox({hideWhenNecessary:l},t);p&&c.push(p)}if(c.length===0){i(s,n,r);return}const h=BBox.merge(c),u=this.refineCircle(h,a,t);i(u.centerX,u.centerY,u.radius),a=u.radius};await o(),await o(),await o(),await o({hideWhenNecessary:!0}),await o({hideWhenNecessary:!0});for(const l of(0,import_ag_charts_core237.iterate)(this.axes,e))await l.computeLabelsBBox({hideWhenNecessary:!0},t);return{radius:a,centerX:s,centerY:n}}refineCircle(t,e,i){const n=-e,r=-e,a=e,o=e;let l=Math.max(0,n-t.x),c=Math.max(0,r-t.y),h=Math.max(0,t.x+t.width-a),u=Math.max(0,t.y+t.height-o);l=h=Math.max(l,h),c=u=Math.max(c,u);const d=i.width-l-h,p=i.height-c-u;let g=Math.min(d,p)/2;const f=.5*i.width/2,y=.5*i.height/2,m=Math.min(f,y);if(g<m){g=m;const x=l+h,S=c+u;if(2*g+S>i.height){const I=i.height-2*g;Math.min(c,u)*2>I?(c=I/2,u=I/2):c>u?c=I-u:u=I-c}if(2*g+x>i.width){const I=i.width-2*g;Math.min(l,h)*2>I?(l=I/2,h=I/2):l>h?l=I-h:h=I-l}}const b=l+2*g+h,v=c+2*g+u;return{centerX:(i.width-b)/2+l+g,centerY:(i.height-v)/2+c+g,radius:g}}};PolarChart.className="PolarChart",PolarChart.type="polar";function isPolarSeries(t){return t instanceof PolarSeries}var PolarChartModule={type:"chart",name:"polar",version:VERSION,options:polarChartOptionsDefs,create(t,e){return new PolarChart(t,e)},validate(t,e,i){const s=[],n=t?.series?.[0]?.type;(n==="pie"||n==="donut")&&t?.axes&&(s.push(new import_ag_charts_core238.UnknownError([],t.axes,i,"axes")),t=(0,import_ag_charts_core238.without)(t,["axes"]));const r=(0,import_ag_charts_core238.validate)(t,e,i);return r.invalid.push(...s),r}},import_ag_charts_core244=require("ag-charts-core"),import_ag_charts_core243=require("ag-charts-core");function gridLayout({orientation:t,bboxes:e,maxHeight:i,maxWidth:s,itemPaddingY:n=0,itemPaddingX:r=0,forceResult:a=!1}){const o=t==="horizontal",l={max:o?s:i,fn:o?d=>d.width:d=>d.height,padding:o?r:n},c={max:o?i:s,fn:o?d=>d.height:d=>d.width,padding:o?n:r};let h=0;const u=[];for(;h<e.length;){const d=e.slice(h),p=processBBoxes(d,h,l,c,a);if(!p)return;h+=p.processedBBoxCount,u.push(p.pageIndices)}return buildPages(u,t,e,n,r)}function processBBoxes(t,e,i,s,n){let a=estimateStartingGuess(t,i);if(a<1){if(!n)return;a=1}let o=a;for(;o>=1;){const l=calculatePage(t,e,o,i,s,n);if(l==null&&o<=1)return;if(l==null){o--;continue}if(typeof l=="number"){if(l<=1)return;o=l<o&&l>1?l:o,o--;continue}return{processedBBoxCount:l.length*l[0].length,pageIndices:l}}}function calculatePage(t,e,i,s,n,r){const a=[];let o=0,l=0,c=[];const h=[];for(let u=0;u<t.length;u++){const d=(u+i)%i;d===0&&(o+=l,l=0,c.length>0&&a.push(c),c=[]);const p=s.fn(t[u])+s.padding;h[d]=Math.max(h[d]??0,p),l=Math.max(l,n.fn(t[u])+n.padding);const g=o+l,f=!r||a.length>0;if(g>n.max&&f){c=[];break}if(h.reduce((m,b)=>m+b,0)>s.max&&!r)return h.length<i?h.length:void 0;c.push(u+e)}return c.length>0&&a.push(c),a.length>0?a:void 0}function buildPages(t,e,i,s,n){let r=0,a=0;return{pages:t.map(l=>{e==="horizontal"&&(l=transpose(l));let c=0;const h=l.map(p=>{const g=p.map(m=>(c=Math.max(m,c),i[m]));let f=0,y=0;for(const m of g)f+=m.height+s,y=Math.max(y,m.width+n);return{indices:p,bboxes:g,columnHeight:Math.ceil(f),columnWidth:Math.ceil(y)}});let u=0,d=0;for(const p of h)u+=p.columnWidth,d=Math.max(d,p.columnHeight);return r=Math.max(u,r),a=Math.max(d,a),{columns:h,startIndex:l[0][0],endIndex:c,pageWidth:u,pageHeight:d}}),maxPageWidth:r,maxPageHeight:a}}function transpose(t){const e=[];for(const i of t[0])e.push([]);for(const[i,s]of t.entries())for(const[n,r]of s.entries())e[n][i]=r;return e}function estimateStartingGuess(t,e){const i=t.length;let s=0;for(let n=0;n<i;n++)if(s+=e.fn(t[n])+e.padding,s>e.max)return i/n<2?Math.ceil(i/2):n;return i}var import_ag_charts_core239=require("ag-charts-core"),PaginationLabel=class extends import_ag_charts_core239.BaseProperties{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=import_ag_charts_core239.FONT_SIZE.SMALL,this.fontFamily="Verdana, sans-serif"}};__decorateClass([import_ag_charts_core239.Property],PaginationLabel.prototype,"color",2),__decorateClass([import_ag_charts_core239.Property],PaginationLabel.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core239.Property],PaginationLabel.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core239.Property],PaginationLabel.prototype,"fontSize",2),__decorateClass([import_ag_charts_core239.Property],PaginationLabel.prototype,"fontFamily",2);var PaginationMarkerStyle=class extends import_ag_charts_core239.BaseProperties{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};__decorateClass([import_ag_charts_core239.Property],PaginationMarkerStyle.prototype,"size",2),__decorateClass([import_ag_charts_core239.Property],PaginationMarkerStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core239.Property],PaginationMarkerStyle.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core239.Property],PaginationMarkerStyle.prototype,"stroke",2),__decorateClass([import_ag_charts_core239.Property],PaginationMarkerStyle.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core239.Property],PaginationMarkerStyle.prototype,"strokeOpacity",2);var PaginationMarker=class extends import_ag_charts_core239.BaseProperties{constructor(t){super(),this.parent=t,this.shape="triangle",this.size=15,this.padding=8}};__decorateClass([(0,import_ag_charts_core239.ActionOnSet)({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],PaginationMarker.prototype,"shape",2),__decorateClass([import_ag_charts_core239.Property],PaginationMarker.prototype,"size",2),__decorateClass([import_ag_charts_core239.Property],PaginationMarker.prototype,"padding",2);var Pagination=class extends import_ag_charts_core239.BaseProperties{constructor(t,e){super(),this.chartUpdateCallback=t,this.pageUpdateCallback=e,this.id=(0,import_ag_charts_core239.createId)(this),this.marker=new PaginationMarker(this),this.activeStyle=new PaginationMarkerStyle,this.inactiveStyle=new PaginationMarkerStyle,this.highlightStyle=new PaginationMarkerStyle,this.label=new PaginationLabel,this.group=new TranslatableGroup({name:"pagination"}),this.labelNode=new Text,this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this.nextButton=new Marker,this.previousButton=new Marker,this.labelNode.setProperties({textBaseline:"middle",fontSize:import_ag_charts_core239.FONT_SIZE.SMALL,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]),this.update(),this.updateMarkers()}set visible(t){this._visible=t,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(t){this._enabled=t,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(t){switch(this._orientation=t,t){case"horizontal":{this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;break}case"vertical":default:this.previousButton.rotation=0,this.nextButton.rotation=Math.PI}}get orientation(){return this._orientation}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){const{size:t,padding:e}=this.marker;this.nextButton.size=t,this.previousButton.size=t,this.labelNode.x=t/2+e}updateNextButtonPosition(){const t=this.labelNode.getBBox();this.nextButton.translationX=t.width+(this.marker.size/2+this.marker.padding)*2}updateLabel(){const{currentPage:t,totalPages:e,labelNode:i,label:{color:s,fontStyle:n,fontWeight:r,fontSize:a,fontFamily:o}}=this;i.text=`${t+1} / ${e}`,i.fill=s,i.fontStyle=n,i.fontWeight=r,i.fontSize=a,i.fontFamily=o}updateMarkers(){const{nextButton:t,previousButton:e,nextButtonDisabled:i,previousButtonDisabled:s,activeStyle:n,inactiveStyle:r,highlightStyle:a,highlightActive:o}=this,l=(c,h)=>h?r:c===o?a:n;this.updateMarker(t,l("next",i)),this.updateMarker(e,l("previous",s))}updateMarker(t,e){const{shape:i,size:s}=this.marker;t.shape=i,t.size=s,t.fill=e.fill,t.fillOpacity=e.fillOpacity??1,t.stroke=e.stroke,t.strokeWidth=e.strokeWidth,t.strokeOpacity=e.strokeOpacity}enableOrDisableButtons(){const{currentPage:t,totalPages:e}=this,i=e===0,s=t===e-1,n=t===0;this.nextButtonDisabled=s||i,this.previousButtonDisabled=n||i}setPage(t){t=(0,import_ag_charts_core239.clamp)(0,t,Math.max(0,this.totalPages-1)),this.currentPage!==t&&(this.currentPage=t,this.onPaginationChanged())}getCursor(t){return{previous:this.previousButtonDisabled,next:this.nextButtonDisabled}[t]?void 0:"pointer"}onClick(t,e){t.preventDefault(),e==="next"&&!this.nextButtonDisabled?(this.incrementPage(),this.onPaginationChanged()):e==="previous"&&!this.previousButtonDisabled&&(this.decrementPage(),this.onPaginationChanged())}onMouseHover(t){this.highlightActive=t,this.updateMarkers(),this.chartUpdateCallback(import_ag_charts_core239.ChartUpdateType.SCENE_RENDER)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(import_ag_charts_core239.ChartUpdateType.SCENE_RENDER)}attachPagination(t){t.append(this.group)}getBBox(){return this.group.getBBox()}computeCSSBounds(){const t=Transformable.toCanvas(this.previousButton),e=Transformable.toCanvas(this.nextButton);return{prev:t,next:e}}};Pagination.className="Pagination",__decorateClass([import_ag_charts_core239.Property],Pagination.prototype,"marker",2),__decorateClass([import_ag_charts_core239.Property],Pagination.prototype,"activeStyle",2),__decorateClass([import_ag_charts_core239.Property],Pagination.prototype,"inactiveStyle",2),__decorateClass([import_ag_charts_core239.Property],Pagination.prototype,"highlightStyle",2),__decorateClass([import_ag_charts_core239.Property],Pagination.prototype,"label",2);var import_ag_charts_core240=require("ag-charts-core"),LegendDOMProxy=class{constructor(t,e){this.dirty=!0,this.itemList=t.proxyInteractionService.createProxyContainer({type:"list",domManagerId:`${e}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"}}),this.paginationGroup=t.proxyInteractionService.createProxyContainer({type:"group",domManagerId:`${e}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"}}),this.itemDescription=(0,import_ag_charts_core240.createElement)("p"),this.itemDescription.style.display="none",this.itemDescription.id=(0,import_ag_charts_core240.createElementId)(),this.itemDescription.textContent=this.getItemAriaDescription(t.localeManager),this.itemList.getElement().append(this.itemDescription)}initLegendList(t){if(!this.dirty)return;const{ctx:e,itemSelection:i,datumReader:s,itemListener:n}=t,r=e.localeManager,a=i.length;i.each((o,l,c)=>{o.proxyButton?.destroy(),o.proxyButton=e.proxyInteractionService.createProxyElement({type:"listswitch",textContent:this.getItemAriaText(r,(0,import_ag_charts_core240.toPlainText)(s.getItemLabel(l)),c,a),ariaChecked:!!o.datum.enabled,ariaDescribedBy:this.itemDescription.id,parent:this.itemList});const h=o.proxyButton;h.addListener("click",u=>n.onClick(u.sourceEvent,o.datum,h)),h.addListener("dblclick",u=>n.onDoubleClick(u.sourceEvent,o.datum)),h.addListener("mouseenter",u=>n.onHover(u.sourceEvent,o)),h.addListener("mouseleave",()=>n.onLeave()),h.addListener("contextmenu",u=>n.onContextClick(u,o)),h.addListener("blur",()=>n.onLeave()),h.addListener("focus",u=>n.onHover(u.sourceEvent,o)),h.addListener("drag-start",()=>{})}),this.dirty=!1}update(t){t.visible&&(this.initLegendList(t),this.updateItemProxyButtons(t),this.updatePaginationProxyButtons(t,!0)),this.updateVisibility(t.visible)}updateVisibility(t){this.itemList.setHidden(!t),this.paginationGroup.setHidden(!t)}updateItemProxyButtons({itemSelection:t,group:e,pagination:i,interactive:s}){const n=Transformable.toCanvas(e);this.itemList.setBounds(n);const r=Math.max(...t.nodes().map(a=>a.getTextMeasureBBox().height));t.each((a,o)=>{if(a.proxyButton){const l=a.pageIndex===i.currentPage,{x:c,y:h,height:u,width:d}=Transformable.toCanvas(a,a.getTextMeasureBBox()),p=(r-u)/2,g={x:c-n.x,y:h-p-n.y,height:r,width:d},f=s&&l;a.proxyButton.setCursor("pointer"),a.proxyButton.setEnabled(f),a.proxyButton.setPointerEvents(f?void 0:"none"),a.proxyButton.setBounds(g)}})}updatePaginationProxyButtons(t,e){const{pagination:i}=t;if(this.paginationGroup.setHidden(!i.visible),e&&"ctx"in t){const{oldPages:s,newPages:n}=t,r=(s?.length??n.length)>1,a=n.length>1;r!==a&&(a?this.createPaginationButtons(t):this.destroyPaginationButtons()),this.paginationGroup.setAriaHidden(a?void 0:!0)}if(this.prevButton&&this.nextButton){const{prev:s,next:n}=i.computeCSSBounds(),r=BBox.merge([s,n]);s.x-=r.x,s.y-=r.y,n.x-=r.x,n.y-=r.y,this.paginationGroup.setBounds(r),this.prevButton.setBounds(s),this.nextButton.setBounds(n),this.prevButton.setEnabled(i.currentPage!==0),this.nextButton.setEnabled(i.currentPage!==i.totalPages-1),this.nextButton.setCursor(i.getCursor("next")),this.prevButton.setCursor(i.getCursor("previous"))}}createPaginationButtons(t){const{ctx:e,pagination:i}=t;this.prevButton||(this.prevButton=e.proxyInteractionService.createProxyElement({type:"button",textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.paginationGroup}),this.prevButton.addListener("click",s=>this.onPageButton(t,s,"previous")),this.prevButton.addListener("mouseenter",()=>i.onMouseHover("previous")),this.prevButton.addListener("mouseleave",()=>i.onMouseHover(void 0))),this.nextButton||(this.nextButton=e.proxyInteractionService.createProxyElement({type:"button",textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.paginationGroup}),this.nextButton.addListener("click",s=>this.onPageButton(t,s,"next")),this.nextButton.addListener("mouseenter",()=>i.onMouseHover("next")),this.nextButton.addListener("mouseleave",()=>i.onMouseHover(void 0)))}destroyPaginationButtons(){this.nextButton?.destroy(),this.prevButton?.destroy(),this.nextButton=void 0,this.prevButton=void 0}onPageButton(t,e,i){t.pagination.onClick(e.sourceEvent,i),this.updatePaginationProxyButtons(t,!1)}onDataUpdate(t,e){this.dirty=t.length!==e.length||t.some((i,s,n)=>{const[r,a]=[e[s],t[s]];return r.id!==a.id})}onLocaleChanged(t,e,i){const s=e.length;e.each(({proxyButton:n},r,a)=>{const o=n?.getElement();if(o!=null){const l=(0,import_ag_charts_core240.toPlainText)(i.getItemLabel(r));o.textContent=this.getItemAriaText(t,l,a,s)}}),this.itemDescription.textContent=this.getItemAriaDescription(t)}onPageChange(t){this.updateItemProxyButtons(t),this.updatePaginationProxyButtons(t,!1)}getItemAriaText(t,e,i,s){return i>=0&&e?(i++,t.t("ariaLabelLegendItem",{label:e,index:i,count:s})):t.t("ariaLabelLegendItemUnknown")}getItemAriaDescription(t){return t.t("ariaDescriptionLegendItem")}},import_ag_charts_core241=require("ag-charts-core");function makeLegendItemEvent(t,{itemId:e,seriesId:i,label:{text:s}},n){const r={defaultPrevented:!1,apiEvent:{type:t,itemId:e,seriesId:i,event:n,text:(0,import_ag_charts_core241.toPlainText)(s),preventDefault:()=>r.defaultPrevented=!0}};return r}var import_ag_charts_core242=require("ag-charts-core"),LegendMarkerLabel=class extends TranslatableGroup{constructor(){super({name:"markerLabelGroup"}),this.symbolsGroup=this.appendChild(new Group({name:"legend-markerLabel-symbols",renderToOffscreenCanvas:!0,optimizeForInfrequentRedraws:!0})),this.label=this.appendChild(new Text),this.enabled=!0,this.pageIndex=Number.NaN,this.spacing=0,this.length=0,this.isCustomMarker=!1,this.marker=this.symbolsGroup.appendChild(new Marker({zIndex:1})),this.line=this.symbolsGroup.appendChild(new Line({zIndex:0})),this.line.visible=!1,this.label.textBaseline="middle",this.label.y=1}destroy(){super.destroy(),this.proxyButton?.destroy()}setEnabled(t){this.enabled=t,this.refreshVisibilities()}getTextMeasureBBox(){return this.layout(),BBox.merge([this.symbolsGroup.getBBox(),this.label.getTextMeasureBBox()])}refreshVisibilities(){const t=this.enabled?1:.5;this.label.opacity=t,this.opacity=t}layout(){const{marker:t,line:e,length:i,isCustomMarker:s}=this;let n=0,r=0;if(t.visible){const{size:a}=t,o=Marker.anchor(t.shape);n=(o.x-.5)*a+i/2,r=(o.y-.5)*a,s?(t.x=0,t.y=0,t.translationX=n,t.translationY=r):(t.x=n,t.y=r,t.translationX=0,t.translationY=0)}e.visible&&(e.x1=0,e.x2=i,e.y1=0,e.y2=0)}preRender(t){const e=super.preRender(t);return this.layout(),e}layoutLabel(){const{length:t,spacing:e}=this;this.label.x=t+e}computeBBox(){return this.layout(),super.computeBBox()}};LegendMarkerLabel.className="MarkerLabel",__decorateClass([(0,import_ag_charts_core242.ProxyPropertyOnWrite)("label")],LegendMarkerLabel.prototype,"text",2),__decorateClass([(0,import_ag_charts_core242.ProxyPropertyOnWrite)("label")],LegendMarkerLabel.prototype,"fontStyle",2),__decorateClass([(0,import_ag_charts_core242.ProxyPropertyOnWrite)("label")],LegendMarkerLabel.prototype,"fontWeight",2),__decorateClass([(0,import_ag_charts_core242.ProxyPropertyOnWrite)("label")],LegendMarkerLabel.prototype,"fontSize",2),__decorateClass([(0,import_ag_charts_core242.ProxyPropertyOnWrite)("label")],LegendMarkerLabel.prototype,"fontFamily",2),__decorateClass([(0,import_ag_charts_core242.ProxyPropertyOnWrite)("label","fill")],LegendMarkerLabel.prototype,"color",2),__decorateClass([(0,import_ag_charts_core242.ObserveChanges)(t=>t.layoutLabel())],LegendMarkerLabel.prototype,"spacing",2),__decorateClass([(0,import_ag_charts_core242.ObserveChanges)(t=>t.layoutLabel())],LegendMarkerLabel.prototype,"length",2),__decorateClass([(0,import_ag_charts_core242.SceneChangeDetection)()],LegendMarkerLabel.prototype,"isCustomMarker",2);function toHighlightNodeDatum(t,e){switch(typeof e.itemId){case"number":return{series:t,itemId:void 0,datum:void 0,datumIndex:e.itemId,legendItemName:e.legendItemName};case"string":return{series:t,itemId:e.itemId,datum:void 0,datumIndex:void 0,legendItemName:e.legendItemName};default:return e.itemId}}var LegendLabel=class extends import_ag_charts_core243.BaseProperties{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=import_ag_charts_core243.FONT_SIZE.SMALL,this.fontFamily="Verdana, sans-serif"}};__decorateClass([import_ag_charts_core243.Property],LegendLabel.prototype,"maxLength",2),__decorateClass([import_ag_charts_core243.Property],LegendLabel.prototype,"color",2),__decorateClass([import_ag_charts_core243.Property],LegendLabel.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core243.Property],LegendLabel.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core243.Property],LegendLabel.prototype,"fontSize",2),__decorateClass([import_ag_charts_core243.Property],LegendLabel.prototype,"fontFamily",2),__decorateClass([import_ag_charts_core243.Property],LegendLabel.prototype,"formatter",2);var LegendMarker=class extends import_ag_charts_core243.BaseProperties{constructor(){super(...arguments),this.shape=void 0,this.size=15,this.padding=8}};__decorateClass([import_ag_charts_core243.Property],LegendMarker.prototype,"shape",2),__decorateClass([import_ag_charts_core243.Property],LegendMarker.prototype,"size",2),__decorateClass([import_ag_charts_core243.Property],LegendMarker.prototype,"padding",2),__decorateClass([import_ag_charts_core243.Property],LegendMarker.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core243.Property],LegendMarker.prototype,"enabled",2);var LegendLine=class extends import_ag_charts_core243.BaseProperties{};__decorateClass([import_ag_charts_core243.Property],LegendLine.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core243.Property],LegendLine.prototype,"length",2);var LegendItem=class extends import_ag_charts_core243.BaseProperties{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new LegendMarker,this.label=new LegendLabel,this.line=new LegendLine}};__decorateClass([import_ag_charts_core243.Property],LegendItem.prototype,"maxWidth",2),__decorateClass([import_ag_charts_core243.Property],LegendItem.prototype,"paddingX",2),__decorateClass([import_ag_charts_core243.Property],LegendItem.prototype,"paddingY",2),__decorateClass([import_ag_charts_core243.Property],LegendItem.prototype,"showSeriesStroke",2),__decorateClass([import_ag_charts_core243.Property],LegendItem.prototype,"marker",2),__decorateClass([import_ag_charts_core243.Property],LegendItem.prototype,"label",2),__decorateClass([import_ag_charts_core243.Property],LegendItem.prototype,"line",2);var LegendListeners=class extends import_ag_charts_core243.BaseProperties{};__decorateClass([import_ag_charts_core243.Property],LegendListeners.prototype,"legendItemClick",2),__decorateClass([import_ag_charts_core243.Property],LegendListeners.prototype,"legendItemDoubleClick",2);var fillGradientDefaults={type:"gradient",bounds:"item",gradient:"linear",colorStops:[{color:"black"}],rotation:0,reverse:!1,colorSpace:"rgb"},fillPatternDefaults={type:"pattern",pattern:"forward-slanted-lines",width:8,height:8,padding:1,fill:"black",fillOpacity:1,backgroundFill:"white",backgroundFillOpacity:1,stroke:"black",strokeOpacity:1,strokeWidth:1,rotation:0,scale:1},fillImageDefaults={type:"image",backgroundFill:"black",backgroundFillOpacity:1,rotation:0,repeat:"no-repeat",fit:"contain",width:8,height:8},Legend=class extends import_ag_charts_core243.BaseProperties{constructor(t){super(),this.ctx=t,this.id=(0,import_ag_charts_core243.createId)(this),this.group=new TranslatableGroup({name:"legend",zIndex:import_ag_charts_core243.ZIndexMap.LEGEND}),this.itemSelection=Selection.select(this.group,LegendMarkerLabel),this.containerNode=this.group.appendChild(new Rect({name:"legend-container"})),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this.toggleSeries=!0,this.item=new LegendItem,this.listeners=new LegendListeners,this.enabled=!1,this.position="bottom",this.border=new import_ag_charts_core243.Border(this.containerNode),this.cornerRadius=0,this.fillOpacity=1,this.padding=4,this.spacing=0,this.cleanup=new import_ag_charts_core243.CleanupRegistry,this.size=[0,0],this._visible=!0,this.pagination=new Pagination(i=>t.updateService.update(i),i=>this.updatePageNumber(i)),this.pagination.attachPagination(this.group);const{items:e}=t.contextMenuRegistry.builtins;e["toggle-series-visibility"].action=i=>this.contextToggleVisibility(i),e["toggle-other-series"].action=i=>this.contextToggleOtherSeries(i),this.cleanup.register(t.eventsHub.on("active:load-memento",i=>this.onActiveLoadMemento(i)),t.eventsHub.on("active:update",i=>this.onActiveUpdate(i)),t.eventsHub.on("legend:change",this.onLegendDataChange.bind(this)),t.eventsHub.on("legend:change-partial",this.onLegendDataChangePartial.bind(this)),t.layoutManager.registerElement(1,i=>this.positionLegend(i)),t.eventsHub.on("locale:change",()=>this.onLocaleChanged()),()=>delete e["toggle-series-visibility"].action,()=>delete e["toggle-other-series"].action,()=>this.group.remove()),this.domProxy=new LegendDOMProxy(this.ctx,this.id),this.ctx.historyManager.addMementoOriginator(t.legendManager)}set data(t){(0,import_ag_charts_core243.objectsEqual)(t,this._data)||(this.domProxy.onDataUpdate(this._data,t),this._data=t,this.updateGroupVisibility())}get data(){return this._data}onLegendDataChange({legendData:t=[]}){this.enabled&&(this.data=t.filter(e=>!e.hideInLegend))}onLegendDataChangePartial(t){this.itemSelection.each(({proxyButton:e},{itemId:i})=>{if(e!=null)for(const s of t.legendData)s.itemId===i&&e.setChecked(s.enabled)})}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-pagination`),this.cleanup.flush(),this.itemSelection.clear()}getOrientation(){return this.orientation??"horizontal"}set visible(t){this._visible=t,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}updateItemSelection(){const t=[...this.data];this.reverseOrder&&t.reverse(),this.itemSelection.update(t)}isInteractive(){const{toggleSeries:t,listeners:{legendItemClick:e,legendItemDoubleClick:i}}=this;return t||i!=null||e!=null}checkInteractionState(){return this.ctx.interactionManager.isState(1)}attachLegend(t){t.appendChild(this.group)}getItemLabel(t){const{formatter:e}=this.item.label;if(e){const i=t.datum;return this.cachedCallWithContext(e,{itemId:t.itemId,value:t.label.text,seriesId:t.seriesId,...i&&{datum:i}})}return t.label.text}calcLayout(t,e){const{paddingX:i,paddingY:s,label:n,maxWidth:r,label:{maxLength:a=1/0,fontStyle:o,fontWeight:l,fontSize:c,fontFamily:h}}=this.item;this.updateItemSelection();const u=[],d=(0,import_ag_charts_core243.cachedTextMeasurer)(n),g=r??t*.8,{markerWidth:f,anyLineEnabled:y}=this.calculateMarkerWidth();if(this.itemSelection.each((A,L)=>{A.fontStyle=o,A.fontWeight=l,A.fontSize=c,A.fontFamily=h;const N=this.updateMarkerLabel(A,L,f,y),k=L.itemId??L.id,w=this.getItemLabel(L),E=(0,import_ag_charts_core243.toPlainText)(w,"<unknown>").replace(import_ag_charts_core243.LineSplitter," ");A.text=this.truncate(E,a,g,N,d,k),u.push(A.getTextMeasureBBox())}),t=Math.max(1,t),e=Math.max(1,e),!Number.isFinite(t))return{};[t,e]=this.updateContainer(t,e);const m=this.size,b=this.oldSize;m[0]=t,m[1]=e,(m[0]!==b[0]||m[1]!==b[1])&&(b[0]=m[0],b[1]=m[1]);const{pages:v,maxPageHeight:x,maxPageWidth:S}=this.updatePagination(u,t,e),I=this.pages;this.pages=v,this.maxPageSize=[S-i,x-s];const D=this.pagination.currentPage,T=this.pages[D];return this.pages.length<1||!T?(this.visible=!1,{oldPages:I}):(this.visible=!0,this.updatePositions(D),this.update(),{oldPages:I})}isCustomMarker(t,e){return t&&e!==void 0&&typeof e!="string"}calcSymbolsEnabled(t){const{showSeriesStroke:e,marker:i}=this.item,s=!!i.enabled||!e||(t.marker.enabled??!0),n=!!(t.line&&e),r=this.isCustomMarker(s,t.marker.shape);return{markerEnabled:s,lineEnabled:n,isCustomMarker:r}}calcSymbolsLengths(t,e,i){const{marker:s,line:n}=this.item;let r;const{shape:a}=t.marker;if(this.isCustomMarker(e,a)){const c=new Marker;c.shape=a,c.updatePath();const h=c.getBBox();r=Math.max(h.width,h.height)}const o=e?s.size:0,l=i?n.length??25:0;return{markerLength:o,lineLength:l,customMarkerSize:r}}calculateMarkerWidth(){let t=0,e=!1;return this.itemSelection.each((i,s)=>{const{symbol:n}=s,{lineEnabled:r,markerEnabled:a}=this.calcSymbolsEnabled(n),{markerLength:o,lineLength:l,customMarkerSize:c=-1/0}=this.calcSymbolsLengths(n,a,r);t=Math.max(t,l,c,o),e||(e=r)}),{markerWidth:t,anyLineEnabled:e}}updateMarkerLabel(t,e,i,s){const{marker:n,paddingX:r}=this.item,{symbol:a}=e;let o=r;const{markerEnabled:l,isCustomMarker:c}=this.calcSymbolsEnabled(a),h=n.padding;(l||s)&&(o+=h+i);const{marker:u,line:d}=t;return u.visible=l,u.visible&&(u.shape=n.shape??a.marker.shape??"square",u.size=n.size,u.setStyleProperties(this.getMarkerStyles((0,import_ag_charts_core243.deepClone)(a)))),d.visible=s,d.visible&&d.setStyleProperties(this.getLineStyles(a)),t.length=i,t.spacing=h,t.isCustomMarker=c,o}updateContainer(t,e){const i=this.getContainerStyles();return this.containerNode.width=0,this.containerNode.height=0,this.containerNode.setStyleProperties(i),this.containerNode.cornerRadius=i.cornerRadius,t-=i.strokeWidth*2+i.padding.left+i.padding.right,e-=i.strokeWidth*2+i.padding.top+i.padding.bottom,[t,e]}truncate(t,e,i,s,n,r){let a=!1;t.length>e&&(t=t.substring(0,e),a=!0);const o=(0,import_ag_charts_core243.truncateLine)(t,n,i-s,a);return(0,import_ag_charts_core243.isTextTruncated)(o)?this.truncatedItems.add(r):this.truncatedItems.delete(r),o}updatePagination(t,e,i){const s=this.getOrientation(),n=Math.min(this.paginationTrackingIndex,t.length);this.pagination.orientation=s,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:r,maxPageHeight:a,maxPageWidth:o,paginationBBox:l,paginationVertical:c}=this.calculatePagination(t,e,i),h=r.findIndex(v=>v.endIndex>=n);this.pagination.currentPage=(0,import_ag_charts_core243.clamp)(0,h,r.length-1);const{paddingX:u,paddingY:d}=this.item,p=8,g=o-u,f=a-d;let y=0,m=-l.y-this.item.marker.size/2;c?m+=f+p:(y+=-l.x+g+p,m+=(f-l.height)/2),this.pagination.translationX=y,this.pagination.translationY=m,this.pagination.update(),this.pagination.updateMarkers();let b=0;return this.itemSelection.each((v,x,S)=>{S>(r[b]?.endIndex??1/0)&&b++,v.pageIndex=b}),{maxPageHeight:a,maxPageWidth:o,pages:r}}calculatePagination(t,e,i){const{paddingX:s,paddingY:n}=this.item,r=["left","left-top","left-bottom","right","right-top","right-bottom"],{placement:a}=(0,import_ag_charts_core243.expandLegendPosition)(this.position),o=this.getOrientation(),l=r.includes(a);let c=this.pagination.getBBox(),h=new BBox(0,0,0,0),u=[],d=0,p=0,g=0;const f=m=>m.width===c.width&&m.height===c.height,y=this.maxWidth!==void 0&&this.maxHeight!==void 0;do{if(g++>10){import_ag_charts_core243.Logger.warn("unable to find stable legend layout.");break}c=h;const m=e-(l?0:c.width),b=i-(l?c.height:0),v=gridLayout({orientation:o,bboxes:t,maxHeight:b,maxWidth:m,itemPaddingY:n,itemPaddingX:s,forceResult:y});u=v?.pages??[],d=v?.maxPageWidth??0,p=v?.maxPageHeight??0;const x=u.length;if(this.pagination.visible=x>1,this.pagination.totalPages=x,this.pagination.update(),this.pagination.updateMarkers(),h=this.pagination.getBBox(),!this.pagination.visible)break}while(!f(h));return{maxPageWidth:d,maxPageHeight:p,pages:u,paginationBBox:h,paginationVertical:l}}updatePositions(t=0){const{item:{paddingY:e},itemSelection:i,pages:s}=this;if(s.length<1||!s[t])return;const{columns:n,startIndex:r,endIndex:a}=s[t];let o=0,l=0;const c=n.length,h=n[0].indices.length,u=this.getOrientation()==="horizontal",d=n[0].bboxes[0].height+e,p=[];i.each((g,f,y)=>{if(y<r||y>a){g.visible=!1;return}const m=y-r;let b,v;u?(b=m%c,v=Math.floor(m/c)):(b=Math.floor(m/h),v=m%h),g.visible=!0;const x=n[b];x&&(l=Math.floor(d*v),o=Math.floor(p[v]??0),p[v]=(p[v]??0)+x.columnWidth,g.translationX=o,g.translationY=l)})}updatePageNumber(t){const{itemSelection:e,group:i,pagination:s,pages:n}=this,{startIndex:r,endIndex:a}=n[t];r===0?this.paginationTrackingIndex=0:t===n.length-1?this.paginationTrackingIndex=a:this.paginationTrackingIndex=Math.floor((r+a)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(t),this.domProxy.onPageChange({itemSelection:e,group:i,pagination:s,interactive:this.isInteractive()}),this.ctx.updateService.update(import_ag_charts_core243.ChartUpdateType.SCENE_RENDER)}update(){const{label:{color:t}}=this.item;this.itemSelection.each((e,i)=>{e.setEnabled(i.enabled),e.color=t}),this.updateContextMenu()}updateContextMenu(){const t=this.toggleSeries?"show":"hide";this.ctx.contextMenuRegistry.toggle("toggle-series-visibility",t),this.ctx.contextMenuRegistry.toggle("toggle-other-series",t)}getLineStyles(t){const{stroke:e,strokeOpacity:i=1,strokeWidth:s,lineDash:n}=t.line??{},r=Math.min(2,s??1);return{stroke:e,strokeOpacity:i,strokeWidth:this.item.line.strokeWidth??r,lineDash:n}}getMarkerStyles({marker:t}){const{fill:e,stroke:i,strokeOpacity:s=1,fillOpacity:n=1,strokeWidth:r,lineDash:a,lineDashOffset:o}=t,l=Math.min(2,r??1);return(0,import_ag_charts_core243.isPatternFill)(e)&&(e.width=8,e.height=8,e.padding=1,e.strokeWidth=Math.min(2,e.strokeWidth??2)),(0,import_ag_charts_core243.isImageFill)(e)&&(e.fit="contain",e.width=void 0,e.height=void 0,e.repeat="no-repeat"),getShapeStyle({fill:e,stroke:i,strokeOpacity:s,fillOpacity:n,strokeWidth:this.item.marker.strokeWidth??l,lineDash:a,lineDashOffset:o},fillGradientDefaults,fillPatternDefaults,fillImageDefaults)}getContainerStyles(){const{stroke:t,strokeOpacity:e,strokeWidth:i}=this.border,{cornerRadius:s,fill:n,fillOpacity:r,padding:a}=this,o=typeof a=="number";return getShapeStyle({cornerRadius:s,fill:n,fillOpacity:r,padding:{top:o?a:a.top??0,right:o?a:a.right??0,bottom:o?a:a.bottom??0,left:o?a:a.left??0},stroke:t,strokeOpacity:e,strokeWidth:this.border.enabled?i:0},fillGradientDefaults,fillPatternDefaults,fillImageDefaults)}computePagedBBox(){const t=Group.computeChildrenBBox(this.group.excludeChildren({name:"legend-container"}));if(this.pages.length>1){const[s,n]=this.maxPageSize;t.height=Math.max(n,t.height),t.width=Math.max(s,t.width)}const{strokeWidth:e,padding:i}=this.getContainerStyles();return t.grow(i).grow(e),t}findNode(t){const{datum:e,proxyButton:i}=this.itemSelection.select(s=>s.datum?.itemId===t.itemId)[0]??{};if(e===void 0||i===void 0)throw new Error(`AG Charts - Missing required properties { datum: ${e}, proxyButton: ${JSON.stringify(i)} }`);return{datum:e,proxyButton:i}}contextToggleVisibility(t){const{datum:e,proxyButton:i}=this.findNode(t);this.doClick(t.event,e,i),this.clearHighlight()}contextToggleOtherSeries(t){this.doDoubleClick(t.event,this.findNode(t).datum),this.clearHighlight()}onContextClick(t,e){if(this.checkInteractionState())return;const{sourceEvent:i}=t,s=e.datum;this.clearHighlight(),this.preventHidingAll&&this.contextMenuDatum?.enabled&&this.getVisibleItemCount()<=1?this.ctx.contextMenuRegistry.builtins.items["toggle-series-visibility"].enabled=!1:this.ctx.contextMenuRegistry.builtins.items["toggle-series-visibility"].enabled=!0;const r=this.ctx.chartService.series.length>1&&this.ctx.chartService.series[0]?.getLegendData("category")[0]?.hideToggleOtherSeries!==!0?"show":"hide";this.ctx.contextMenuRegistry.toggle("toggle-other-series",r);const{offsetX:a,offsetY:o}=i,{x:l,y:c}=Transformable.toCanvasPoint(e,a,o);this.ctx.contextMenuRegistry.dispatchContext("legend-item",{widgetEvent:t,canvasX:l,canvasY:c},{legendItem:s})}onClick(t,e,i){this.checkInteractionState()||this.doClick(t,e,i)&&t.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap(t=>t.getLegendData("category")).filter(t=>t.enabled).length}doClick(t,e,i){const{listeners:{legendItemClick:s},ctx:{chartService:n},preventHidingAll:r,toggleSeries:a}=this;if(!e)return!1;const{legendType:o,seriesId:l,itemId:c,enabled:h,legendItemName:u}=e,d=n.series.find(f=>f.id===l);if(!d)return!1;let p=h;const g=makeLegendItemEvent("click",e,t);return s&&(0,import_ag_charts_core243.callWithContext)([d.properties,this.ctx.chartService],s,g.apiEvent),g.defaultPrevented||(a&&(p=!h,r&&!p&&this.getVisibleItemCount()<2&&(p=!0),i.setChecked(p),this.ctx.eventsHub.emit("legend:item-click",{legendType:o,series:d,itemId:c,enabled:p,legendItemName:u})),this.updateHighlight(p,e,d),this.ctx.legendManager.update(),this.ctx.updateService.update(import_ag_charts_core243.ChartUpdateType.PROCESS_DATA,{forceNodeDataRefresh:!0,skipAnimations:e.skipAnimations??!1})),!0}onDoubleClick(t,e){this.checkInteractionState()||this.doDoubleClick(t,e)&&t.preventDefault()}doDoubleClick(t,e){const{listeners:{legendItemDoubleClick:i},ctx:{chartService:s},toggleSeries:n}=this;if(!e)return!1;const{legendType:r,id:a,itemId:o,seriesId:l}=e,c=s.series.find(u=>u.id===a);if(!c)return!1;const h=makeLegendItemEvent("dblclick",e,t);if(i&&(0,import_ag_charts_core243.callWithContext)([c.properties,this.ctx.chartService],i,h.apiEvent),h.defaultPrevented)return!0;if(n){const u=s.series.flatMap(f=>f.getLegendData("category"));let d=0;const p=new Set;for(const f of u)f.enabled&&(d+=1,f.legendItemName!=null&&p.add(f.legendItemName));p.size>0&&(d=p.size);const g=u.find(f=>f.itemId===o&&f.seriesId===l);this.ctx.eventsHub.emit("legend:item-double-click",{legendType:r,series:c,itemId:o,numVisibleItems:d,enabled:g?.enabled??!1,legendItemName:g?.legendItemName})}return this.ctx.legendManager.update(),this.ctx.updateService.update(import_ag_charts_core243.ChartUpdateType.PROCESS_DATA,{forceNodeDataRefresh:!0}),!0}toTooltipMeta(t,e){let i;return t instanceof FocusEvent?i=Transformable.toCanvas(e).computeCenter():(t.preventDefault(),i=Transformable.toCanvasPoint(e,t.offsetX,t.offsetY)),{canvasX:i.x,canvasY:i.y,showArrow:!1}}onHover(t,e){if(this.checkInteractionState())return;if(!this.enabled)throw new Error("AG Charts - onHover handler called on disabled legend");this.pagination.setPage(e.pageIndex);const i=e.datum,s=i?this.ctx.chartService.series.find(n=>n.id===i?.id):void 0;if(i&&this.truncatedItems.has(i.itemId??i.id)){const n=this.toTooltipMeta(t,e);this.ctx.tooltipManager.updateTooltip(this.id,n,[{type:"structured",title:this.getItemLabel(i)}])}else this.ctx.tooltipManager.removeTooltip(this.id,void 0,!0);this.updateHighlight(i?.enabled,i,s)}onLeave(){this.checkInteractionState()||(this.ctx.tooltipManager.removeTooltip(this.id,void 0,!0),this.clearHighlight())}clearHighlight(){this.updateHighlight(void 0,void 0,void 0)}updateHighlight(t,e,i,s){const n=a=>{if(a===void 0)this.ctx.activeManager.clear();else{const o=a.nodeDatum.series.id,l=a.itemId;this.ctx.activeManager.update({type:"legend",seriesId:o,itemId:l},void 0)}this.ctx.highlightManager.updateHighlight(this.id,a?.nodeDatum)},r=a=>{this.ctx.interactionManager.isState(64)||s?.initialState?n(a):this.ctx.interactionManager.isState(4)?this.ctx.animationManager.onBatchStop(()=>{n(a)}):a===void 0&&n(a)};if(t===!0&&i!==void 0&&e!==void 0){const a=e.itemId,o=toHighlightNodeDatum(i,e);r({itemId:a,nodeDatum:o})}else r(void 0)}onActiveUpdate(t){t?.type==="series-node"&&this.ctx.highlightManager.updateHighlight(this.id,void 0)}onActiveLoadMemento(t){const{activeItem:e}=t;if(e?.type!=="legend")return this.ctx.highlightManager.updateHighlight(this.id,void 0);const i=this.data.find(n=>n.seriesId===e.seriesId&&n.itemId===e.itemId),s=this.ctx.chartService.series.find(n=>n.id===e.seriesId);if(s===void 0)import_ag_charts_core243.Logger.warn(`Cannot find seriesId: "${e.seriesId}"`),t.reject();else if(i===void 0){const n=JSON.stringify({seriesId:e.seriesId,itemId:e.itemId});import_ag_charts_core243.Logger.warn(`cannot find legend item: ${n}`),t.reject()}else this.updateHighlight(i.enabled,i,s,t)}onLocaleChanged(){this.updateItemSelection(),this.domProxy.onLocaleChanged(this.ctx.localeManager,this.itemSelection,this)}positionLegend(t){const e=this.positionLegendScene(t);this.positionLegendDOM(e)}positionLegendScene(t){if(!this.enabled||!this.data.length)return;const{placement:e,floating:i,xOffset:s,yOffset:n}=(0,import_ag_charts_core243.expandLegendPosition)(this.position),r=i?new BBox(0,0,t.width,t.height):t.layoutBox,{x:a,y:o,width:l,height:c}=r,[h,u]=this.calculateLegendDimensions(r),{oldPages:d}=this.calcLayout(h,u),p=this.computePagedBBox();if(this.visible){let f=function(v){};var g=f;const y=this.spacing;let m,b;switch(e){case"top":m=(l-p.width)/2,b=0;break;case"bottom":m=(l-p.width)/2,b=c-p.height;break;case"right":m=l-p.width,b=(c-p.height)/2;break;case"left":m=0,b=(c-p.height)/2;break;case"top-right":case"right-top":m=l-p.width,b=0;break;case"top-left":case"left-top":m=0,b=0;break;case"bottom-right":case"right-bottom":m=l-p.width,b=c-p.height;break;case"bottom-left":case"left-bottom":m=0,b=c-p.height;break;default:f(e)}if(!i){let v,x;switch(e){case"top":case"top-right":case"top-left":v=p.height+y,x="top";break;case"bottom":case"bottom-right":case"bottom-left":v=p.height+y,x="bottom";break;case"left":case"left-top":case"left-bottom":v=p.width+y,x="left";break;case"right":case"right-top":case"right-bottom":v=p.width+y,x="right";break;default:f(e)}r.shrink(v,x)}m+=s,b+=n,this.group.translationX=Math.floor(a+m-p.x),this.group.translationY=Math.floor(o+b-p.y),this.containerNode.x=p.x,this.containerNode.y=p.y,this.containerNode.width=p.width,this.containerNode.height=p.height}return d}positionLegendDOM(t){const{ctx:e,itemSelection:i,pagination:s,pages:n,group:r}=this,a=this.visible&&this.enabled,o=this.isInteractive();this.domProxy.update({visible:a,interactive:o,ctx:e,itemSelection:i,group:r,pagination:s,oldPages:t,newPages:n,datumReader:this,itemListener:this})}calculateLegendDimensions(t){const{width:e,height:i}=t,{placement:s}=(0,import_ag_charts_core243.expandLegendPosition)(this.position),n=e/i,r=.5,a=.2,o=.25;let l,c;function h(u){}switch(s){case"top":case"top-left":case"top-right":case"bottom":case"bottom-left":case"bottom-right":{const u=n<1?Math.min(r,a*(1/n)):a;l=this.maxWidth?Math.min(this.maxWidth,e):e,c=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*u);break}case"left":case"left-top":case"left-bottom":case"right":case"right-top":case"right-bottom":{const u=n>1?Math.min(r,o*n):o;l=this.maxWidth?Math.min(this.maxWidth,e):Math.round(e*u),c=this.maxHeight?Math.min(this.maxHeight,i):i;break}default:}return[l,c]}cachedCallWithContext(t,e){const{callbackCache:i,chartService:s}=this.ctx;return i.call([this,s],t,e)}};Legend.className="Legend",__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"toggleSeries",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"pagination",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"item",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"listeners",2),__decorateClass([(0,import_ag_charts_core243.ObserveChanges)((t,e,i)=>{if(t.updateGroupVisibility(),e===i)return;const{ctx:{legendManager:s,stateManager:n}}=t;i===!1&&e===!0&&n.restoreState(s)}),import_ag_charts_core243.Property],Legend.prototype,"enabled",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"position",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"maxWidth",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"maxHeight",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"reverseOrder",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"orientation",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"preventHidingAll",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"border",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"fill",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"padding",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"spacing",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"xOffset",2),__decorateClass([import_ag_charts_core243.Property],Legend.prototype,"yOffset",2);var LegendModule={type:"plugin",name:"legend",version:VERSION,options:{enabled:import_ag_charts_core244.boolean,position:import_ag_charts_core244.legendPositionValidator,orientation:(0,import_ag_charts_core244.union)("horizontal","vertical"),maxWidth:import_ag_charts_core244.positiveNumber,maxHeight:import_ag_charts_core244.positiveNumber,spacing:import_ag_charts_core244.positiveNumber,border:import_ag_charts_core244.borderOptionsDef,cornerRadius:import_ag_charts_core244.number,padding:import_ag_charts_core244.padding,fill:import_ag_charts_core244.colorUnion,fillOpacity:import_ag_charts_core244.ratio,preventHidingAll:import_ag_charts_core244.boolean,reverseOrder:import_ag_charts_core244.boolean,toggleSeries:import_ag_charts_core244.boolean,item:{marker:{size:import_ag_charts_core244.positiveNumber,shape:import_ag_charts_core244.shapeValidator,padding:import_ag_charts_core244.positiveNumber,strokeWidth:import_ag_charts_core244.positiveNumber},line:{length:import_ag_charts_core244.positiveNumber,strokeWidth:import_ag_charts_core244.positiveNumber},label:{maxLength:import_ag_charts_core244.positiveNumber,formatter:import_ag_charts_core244.callback,...import_ag_charts_core244.fontOptionsDef},maxWidth:import_ag_charts_core244.positiveNumber,paddingX:import_ag_charts_core244.positiveNumber,paddingY:import_ag_charts_core244.positiveNumber,showSeriesStroke:import_ag_charts_core244.boolean},pagination:{marker:{size:import_ag_charts_core244.positiveNumber,shape:import_ag_charts_core244.shapeValidator,padding:import_ag_charts_core244.positiveNumber},activeStyle:{...import_ag_charts_core244.fillOptionsDef,...import_ag_charts_core244.strokeOptionsDef},inactiveStyle:{...import_ag_charts_core244.fillOptionsDef,...import_ag_charts_core244.strokeOptionsDef},highlightStyle:{...import_ag_charts_core244.fillOptionsDef,...import_ag_charts_core244.strokeOptionsDef},label:import_ag_charts_core244.fontOptionsDef},listeners:{legendItemClick:import_ag_charts_core244.callback,legendItemDoubleClick:import_ag_charts_core244.callback}},themeTemplate:{...import_ag_charts_core244.LEGEND_CONTAINER_THEME,enabled:{$and:[{$greaterThan:[{$size:{$path:"/series"}},1]},{$or:[{$isChartType:"cartesian"},{$isChartType:"standalone"},{$and:[{$isChartType:"polar"},{$not:{$isSeriesType:"pie"}},{$not:{$isSeriesType:"donut"}}]}]}]},position:import_ag_charts_core244.CARTESIAN_POSITION.BOTTOM,orientation:{$if:[{$or:[{$eq:[{$path:"./position"},import_ag_charts_core244.CARTESIAN_POSITION.LEFT]},{$eq:[{$path:"./position"},import_ag_charts_core244.CARTESIAN_POSITION.LEFT_TOP]},{$eq:[{$path:"./position"},import_ag_charts_core244.CARTESIAN_POSITION.LEFT_BOTTOM]},{$eq:[{$path:"./position"},import_ag_charts_core244.CARTESIAN_POSITION.RIGHT]},{$eq:[{$path:"./position"},import_ag_charts_core244.CARTESIAN_POSITION.RIGHT_TOP]},{$eq:[{$path:"./position"},import_ag_charts_core244.CARTESIAN_POSITION.RIGHT_BOTTOM]},{$eq:[{$path:"./position/placement"},import_ag_charts_core244.CARTESIAN_POSITION.LEFT]},{$eq:[{$path:"./position/placement"},import_ag_charts_core244.CARTESIAN_POSITION.LEFT_TOP]},{$eq:[{$path:"./position/placement"},import_ag_charts_core244.CARTESIAN_POSITION.LEFT_BOTTOM]},{$eq:[{$path:"./position/placement"},import_ag_charts_core244.CARTESIAN_POSITION.RIGHT]},{$eq:[{$path:"./position/placement"},import_ag_charts_core244.CARTESIAN_POSITION.RIGHT_TOP]},{$eq:[{$path:"./position/placement"},import_ag_charts_core244.CARTESIAN_POSITION.RIGHT_BOTTOM]}]},"vertical","horizontal"]},spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:{$ref:"textColor"},fontSize:{$rem:import_ag_charts_core244.FONT_SIZE_RATIO.SMALL},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"}}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:{$ref:"foregroundColor"}},inactiveStyle:{fill:{$ref:"subtleTextColor"}},highlightStyle:{fill:{$ref:"foregroundColor"}},label:{color:{$ref:"textColor"}}},fill:{$if:[{$path:["./position/floating",!1]},{$ref:"chartBackgroundColor"},"transparent"]}},create:t=>{const e=new Legend(t);return e.attachLegend(t.scene),e}},import_ag_charts_core249=require("ag-charts-core"),import_ag_charts_core248=require("ag-charts-core"),import_ag_charts_core245=require("ag-charts-core"),LogAxis=class extends NumberAxis{getVisibleDomain(t){const[e,i]=t,[s,n]=this.visibleRange;if(t.length<2)return[e,i];const r=Math.min(e,i),a=Math.max(e,i);if(r>=0){const o=Math.log(e),c=Math.log(i)-o;return[Math.exp(o+s*c),Math.exp(o+n*c)]}if(a<=0){const o=-Math.log(-e),c=-Math.log(-i)-o;return[-Math.exp(-(o+s*c)),-Math.exp(-(o+n*c))]}return[Number.NaN,Number.NaN]}normaliseDataDomain(t){const{min:e,max:i,preferredMin:s,preferredMax:n}=this,{extent:r,clipped:a}=(0,import_ag_charts_core245.normalisedExtentWithMetadata)(t.domain,e,i,s,n,void 0,t.sortMetadata?.sortOrder);return r[0]<0&&r[1]>0||t.domain[0]<0&&t.domain[1]>0?(import_ag_charts_core245.Logger.warn("The log axis domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:a}):r[0]===0||r[1]===0||t.domain[0]===0||t.domain[1]===0?(import_ag_charts_core245.Logger.warn("The log axis domain contains a value of 0, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:a}):{domain:r,clipped:a}}set base(t){this.scale.base=t}get base(){return this.scale.base}constructor(t){super(t,new LogScale)}};LogAxis.className="LogAxis",LogAxis.type="log";var import_ag_charts_core246=require("ag-charts-core"),MAX_POINTS=10;function aggregationIndexType(t,e,i,s,n,r,a){const o=t[r];if(o===void 0)return-1;const l=Number.isFinite(e)?(0,import_ag_charts_core246.aggregationXRatioForXValue)(o,e,i,a):(0,import_ag_charts_core246.aggregationXRatioForDatumIndex)(r,t.length),c=(0,import_ag_charts_core246.aggregationIndexForXRatio)(l,n);return r===s[c+import_ag_charts_core246.AGGREGATION_INDEX_X_MIN]||r===s[c+import_ag_charts_core246.AGGREGATION_INDEX_X_MAX]||r===s[c+import_ag_charts_core246.AGGREGATION_INDEX_Y_MIN]||r===s[c+import_ag_charts_core246.AGGREGATION_INDEX_Y_MAX]?c:-1}function buildIndicesFromAggregation(t,e,i,s,n,r,a,o,l){let c=0,h=0,u=-1;for(let y=0;y<a;y++){const m=aggregationIndexType(t,e,i,s,n,y,r);m!==-1&&(c++,m!==u&&(h++,u=m))}h++;const d=o?.length===c?o:new Uint32Array(c),p=l?.length===h?l:new Uint32Array(h);let g=0,f=0;u=-1;for(let y=0;y<a;y++){const m=aggregationIndexType(t,e,i,s,n,y,r);m!==-1&&(m!==u&&(p[f++]=g,u=m),d[g++]=y)}return p[f]=c-1,{indices:d,metaIndices:p}}function computeAreaAggregation(t,e,i,s){const n=e.length;if(n<import_ag_charts_core246.AGGREGATION_THRESHOLD)return;const[r,a]=t,{xNeedsValueOf:o,yNeedsValueOf:l,existingFilters:c}=s;let h=(0,import_ag_charts_core246.aggregationRangeFittingPoints)(e,r,a,{xNeedsValueOf:o});const u=c?.find(m=>m.maxRange===h);let{indexData:d,valueData:p}=(0,import_ag_charts_core246.createAggregationIndices)(e,i,i,r,a,h,{xNeedsValueOf:o,yNeedsValueOf:l,reuseIndexData:u?.indexData,reuseValueData:u?.valueData}),{indices:g,metaIndices:f}=buildIndicesFromAggregation(e,r,a,d,h,o,n,u?.indices,u?.metaIndices);const y=[{maxRange:h,metaIndices:f,indices:g,indexData:d,valueData:p}];for(;g.length>MAX_POINTS&&h>import_ag_charts_core246.AGGREGATION_MIN_RANGE;){const m=h,b=Math.trunc(m/2),v=c?.find(w=>w.maxRange===b),x=(0,import_ag_charts_core246.compactAggregationIndices)(d,p,m,{reuseIndexData:v?.indexData,reuseValueData:v?.valueData});h=x.maxRange,d=x.indexData,p=x.valueData;const S=g;let I=0,D=0,T=-1;for(const w of S){const E=aggregationIndexType(e,r,a,d,h,w,o);E!==-1&&(I++,E!==T&&(D++,T=E))}D++;const A=v?.indices?.length===I?v.indices:new Uint32Array(I),L=v?.metaIndices?.length===D?v.metaIndices:new Uint32Array(D);let N=0,k=0;T=-1;for(const w of S){const E=aggregationIndexType(e,r,a,d,h,w,o);E!==-1&&(E!==T&&(L[k++]=N,T=E),A[N++]=w)}L[k]=I-1,g=A,f=L,y.push({maxRange:h,metaIndices:f,indices:g,indexData:d,valueData:p})}return y.reverse(),y}function computeAreaAggregationPartial(t,e,i,s){const n=e.length;if(n<import_ag_charts_core246.AGGREGATION_THRESHOLD)return;const[r,a]=t,{xNeedsValueOf:o,yNeedsValueOf:l,targetRange:c,existingFilters:h}=s,u=(0,import_ag_charts_core246.aggregationRangeFittingPoints)(e,r,a,{xNeedsValueOf:o}),d=Math.min(u,(0,import_ag_charts_core246.nextPowerOf2)(Math.max(c,import_ag_charts_core246.AGGREGATION_MIN_RANGE))),p=h?.find(x=>x.maxRange===d),{indexData:g,valueData:f}=(0,import_ag_charts_core246.createAggregationIndices)(e,i,i,r,a,d,{xNeedsValueOf:o,yNeedsValueOf:l,reuseIndexData:p?.indexData,reuseValueData:p?.valueData}),{indices:y,metaIndices:m}=buildIndicesFromAggregation(e,r,a,g,d,o,n,p?.indices,p?.metaIndices),b={maxRange:d,indices:y,metaIndices:m,indexData:g,valueData:f};function v(){return computeAreaAggregation([r,a],e,i,{xNeedsValueOf:o,yNeedsValueOf:l,existingFilters:h})?.filter(S=>S.maxRange!==d)??[]}return{immediate:[b],computeRemaining:v}}function aggregateAreaData(t,e,i,s,n,r){const[a,o]=(0,import_ag_charts_core246.aggregationDomain)(t,s);return computeAreaAggregation([a,o],e,i,{xNeedsValueOf:n,yNeedsValueOf:r})}var memoizedAggregateAreaData=(0,import_ag_charts_core246.simpleMemorize2)(aggregateAreaData);function aggregateAreaDataFromDataModel(t,e,i,s,n,r){const a=e.resolveKeysById(n,"xValue",i),o=e.resolveColumnById(n,s,i),l=e.getDomain(n,"xValue","key",i),c=e.resolveColumnNeedsValueOf(n,"xValue",i),h=e.resolveColumnNeedsValueOf(n,s,i);if(r){const[u,d]=(0,import_ag_charts_core246.aggregationDomain)(t,l);return computeAreaAggregation([u,d],a,o,{xNeedsValueOf:c,yNeedsValueOf:h,existingFilters:r})}return memoizedAggregateAreaData(t,a,o,l,c,h)}function aggregateAreaDataFromDataModelPartial(t,e,i,s,n,r,a){const o=e.resolveKeysById(n,"xValue",i),l=e.resolveColumnById(n,s,i),c=e.getDomain(n,"xValue","key",i),h=e.resolveColumnNeedsValueOf(n,"xValue",i),u=e.resolveColumnNeedsValueOf(n,s,i),[d,p]=(0,import_ag_charts_core246.aggregationDomain)(t,c);return computeAreaAggregationPartial([d,p],o,l,{xNeedsValueOf:h,yNeedsValueOf:u,targetRange:r,existingFilters:a})}var import_ag_charts_core247=require("ag-charts-core"),AreaSeriesProperties=class extends CartesianSeriesProperties{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new import_ag_charts_core247.InterpolationProperties,this.shadow=new DropShadow,this.marker=new SeriesMarker,this.label=new Label,this.tooltip=makeSeriesTooltip(),this.connectMissingData=!1}};__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"yKey",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"yFilterKey",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"stackGroup",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"normalizedTo",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"interpolation",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"marker",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core247.Property],AreaSeriesProperties.prototype,"connectMissingData",2);var CROSS_FILTER_AREA_FILL_OPACITY_FACTOR=.125,CROSS_FILTER_AREA_STROKE_OPACITY_FACTOR=.25,AreaSeries=class extends CartesianSeries{constructor(t){super({moduleCtx:t,propertyKeys:DEFAULT_CARTESIAN_DIRECTION_KEYS,propertyNames:DEFAULT_CARTESIAN_DIRECTION_NAMES,categoryKey:"xValue",pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],datumSelectionGarbageCollection:!1,segmentedDataNodes:!1,pickModes:[2,0],animationResetFns:{path:buildResetPathFn({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:resetLabelFn,datum:(e,i)=>({...resetMarkerFn(e),...resetMarkerPositionFn(e,i)})},clipFocusBox:!1}),this.properties=new AreaSeriesProperties,this.connectsToYAxis=!0,this.aggregationManager=new AggregationManager,this.backgroundGroup=new Group({name:`${this.id}-background`,zIndex:import_ag_charts_core248.SeriesZIndexMap.BACKGROUND}),this._isStacked=void 0,this.fillSpans=[],this.phantomSpans=[],this.strokeSpans=[]}get pickModeAxis(){return"main"}renderToOffscreenCanvas(){const t=(this.contextNodeData?.nodeData?.length??0)>0;return super.renderToOffscreenCanvas()||t&&this.getDrawingMode(!1)==="cutout"||this.contextNodeData!=null&&(this.contextNodeData.fillData.spans.length>RENDER_TO_OFFSCREEN_CANVAS_THRESHOLD||this.contextNodeData.strokeData.spans.length>RENDER_TO_OFFSCREEN_CANVAS_THRESHOLD)}attachSeries(t,e,i){super.attachSeries(t,e,i),t.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),this.backgroundGroup.remove()}attachPaths([t,e]){this.backgroundGroup.appendChild(t),this.contentGroup.appendChild(e),e.zIndex=-1}detachPaths([t,e]){t.remove(),e.remove()}isStacked(){return(this.seriesGrouping?.stackCount??1)>1}isNormalized(){return this.properties.normalizedTo!=null}setSeriesIndex(t){const i=this.isStacked()===this._isStacked;return this._isStacked=i,super.setSeriesIndex(t,i)}setZIndex(t){super.setZIndex(t),this.isStacked()?(this.backgroundGroup.zIndex=[import_ag_charts_core248.SeriesZIndexMap.BACKGROUND,t],this.contentGroup.zIndex=[import_ag_charts_core248.SeriesZIndexMap.ANY_CONTENT,t,import_ag_charts_core248.SeriesContentZIndexMap.FOREGROUND]):(this.backgroundGroup.zIndex=[import_ag_charts_core248.SeriesZIndexMap.ANY_CONTENT,t,import_ag_charts_core248.SeriesContentZIndexMap.FOREGROUND,0],this.contentGroup.zIndex=[import_ag_charts_core248.SeriesZIndexMap.ANY_CONTENT,t,import_ag_charts_core248.SeriesContentZIndexMap.FOREGROUND,1])}async processData(t){if(this.data==null)return;const{data:e,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:n=1}={}}=this,{xKey:r,yKey:a,yFilterKey:o,connectMissingData:l,normalizedTo:c}=this.properties,h=!this.ctx.animationManager.isSkipped(),u=this.axes[import_ag_charts_core248.ChartAxisDirection.X]?.scale,d=this.axes[import_ag_charts_core248.ChartAxisDirection.Y]?.scale,{xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:u,yScale:d}),f=n>1||c!=null,y={value:`area-stack-${s}-yValue`,marker:`area-stack-${s}-yValues-marker`},m={invalidValue:null};((0,import_ag_charts_core248.isDefined)(c)||l)&&n>1&&(m.invalidValue=0),i||(m.forceValue=0);const b=this.properties.allowNullKeys??!1,v=[keyProperty(r,p,{id:"xValue",allowNullKey:b}),valueProperty(a,g,{id:"yValueRaw",...m}),...o==null?[]:[valueProperty(o,g,{id:"yFilterRaw"})]];f&&v.push(...groupAccumulativeValueProperty(a,"normal",{id:"yValueCumulative",...m,groupId:y.marker},g)),(0,import_ag_charts_core248.isDefined)(c)&&v.push(valueProperty(a,g,{id:"yValue",...m,groupId:y.value}),normaliseGroupTo(Object.values(y),c)),h&&v.push(animationValidation());const{dataModel:x,processedData:S}=await this.requestDataModel(t,e,{props:v,groupByKeys:f,groupByData:!f});this.aggregateData(x,S),this.animationState.transition("updateData")}xCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes[import_ag_charts_core248.ChartAxisDirection.X].scale.convert(t),n=i.enabled?.5*i.size*e:0;return[s-n,s+n]}yCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes[import_ag_charts_core248.ChartAxisDirection.Y].scale.convert(t[0]),n=i.enabled?.5*i.size*e:0;return[s-n,s+n]}yValueKey(){return this.isNormalized()?"yValue":"yValueRaw"}yCumulativeKey(t){return t.type==="grouped"?"yValueCumulative":this.yValueKey()}getSeriesDomain(t){const{dataModel:e,processedData:i,axes:s}=this;if(!e||!i)return{domain:[]};const n=s[import_ag_charts_core248.ChartAxisDirection.Y];if(t===import_ag_charts_core248.ChartAxisDirection.X){const a=e.resolveProcessedDataDefById(this,"xValue"),o=e.getDomain(this,"xValue","key",i);return a?.def.type==="key"&&a.def.valueType==="category"?o:{domain:fixNumericExtent((0,import_ag_charts_core248.extent)(o.domain))}}const r=this.domainForClippedRange(import_ag_charts_core248.ChartAxisDirection.Y,[this.yCumulativeKey(i)],"xValue");if(n instanceof NumberAxis&&!(n instanceof LogAxis)){const a=Number.isFinite(r[1]-r[0])?[Math.min(r[0],0),Math.max(r[1],0)]:[];return{domain:fixNumericExtent(a)}}else return{domain:fixNumericExtent(r)}}getSeriesRange(t,e){const[i,s]=this.domainForVisibleRange(import_ag_charts_core248.ChartAxisDirection.Y,[this.yCumulativeKey(this.processedData)],"xValue",e);return[Math.min(i,0),Math.max(s,0)]}getZoomRangeFittingItems(t,e,i){return this.zoomFittingVisibleItems("xValue",[this.yCumulativeKey(this.processedData)],t,e,i)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",[this.yCumulativeKey(this.processedData)],t,e,i)}aggregateData(t,e){if(this.aggregationManager.markStale(e.input.count),processedDataIsAnimatable(e))return;const i=this.axes[import_ag_charts_core248.ChartAxisDirection.X];if(i==null)return;const s=this.estimateTargetRange();this.aggregationManager.aggregate({computePartial:r=>aggregateAreaDataFromDataModelPartial(i.scale.type,t,e,this.yCumulativeKey(e),this,s,r),computeFull:r=>aggregateAreaDataFromDataModel(i.scale.type,t,e,this.yCumulativeKey(e),this,r),targetRange:s});const n=this.aggregationManager.filters;n&&n.length>0&&import_ag_charts_core248.DebugMetrics.record(`${this.type}:aggregation`,n.map(r=>r.maxRange))}estimateTargetRange(){const t=this.axes[import_ag_charts_core248.ChartAxisDirection.X];if(t?.scale?.range){const[e,i]=t.scale.range;return Math.abs(i-e)}return this.ctx.scene?.canvas?.width??800}stackAggregatedData(t){const{indices:e,metaIndices:i}=t,{visible:s,axes:n,dataModel:r,processedData:a,seriesBelowStackContext:o}=this,l=n[import_ag_charts_core248.ChartAxisDirection.X],c=n[import_ag_charts_core248.ChartAxisDirection.Y];if(!s)return this.phantomSpans=[],this.fillSpans=[],this.strokeSpans=[],o;if(l==null||c==null||r==null||a==null)return;const{scale:h}=l,{scale:u}=c,d=(h.bandwidth??0)/2,p=!this.isStacked()&&this.properties.connectMissingData,g=a.invalidData?.get(this.id),f=r.resolveKeysById(this,"xValue",a),y=r.resolveColumnById(this,this.yCumulativeKey(a),a);let[m,b]=visibleRangeIndices(1,i.length-1,l.range,D=>{const T=i[D],A=i[D+1],L=e[T],N=e[A],k=f[L],w=f[N],{0:E}=this.xCoordinateRange(k,0),{1:O}=this.xCoordinateRange(w,0);return[E,O]});m=Math.max(m-1,0),b=Math.min(b+1,i.length-1);let v=[];if(o?.fillSpans)v=o?.fillSpans;else for(let D=m;D<b;D+=1){const T=i[D],A=i[D+1],L=e[T],N=e[A],k=f[L],w=f[N],E={type:"linear",moveTo:!1,x0:h.convert(k)+d,y0:u.convert(0),x1:h.convert(w)+d,y1:u.convert(0)};v.push({span:E,xValue0:k,xValue1:w,yValue0:0,yValue1:0})}this.phantomSpans=v;const x=[],S=[];let I=0;for(let D=m;D<b;D+=1){const T=i[D],A=i[D+1],L=e[T],N=e[A],k=!p&&this.hasInvalidDatumsInRange(g,y,L,N),w=v[I++];if(k){x.push(w),S.push(w);continue}const E=[];for(let V=T;V<=A;V++){const B=e[V];if(g?.[B])continue;const j=y[B];if(!Number.isFinite(j))continue;const Z=f[B];E.push({point:{x:h.convert(Z)+d,y:u.convert(j)},xDatum:Z,yDatum:j})}if(E.length<2){x.push(w),S.push(w);continue}const O=E[0],R=E.at(-1),_=E.slice(1,-1).map(V=>V.point),F={span:{type:"multi-line",moveTo:!1,x0:O.point.x,y0:O.point.y,x1:R.point.x,y1:R.point.y,midPoints:_},xValue0:O.xDatum,xValue1:R.xDatum,yValue0:O.yDatum,yValue1:R.yDatum};x.push(F),S.push(F)}return this.fillSpans=x,this.strokeSpans=S,{stack:[],fillSpans:x,strokeSpans:S}}hasInvalidDatumsInRange(t,e,i,s){const n=Math.min(i,s),r=Math.max(i,s);for(let a=n;a<=r;a++){if(t?.[a])return!0;const o=e[a];if(!Number.isFinite(o))return!0}return!1}stackYValueData(){const{visible:t,axes:e,dataModel:i,processedData:s,seriesBelowStackContext:n,properties:r}=this,a=e[import_ag_charts_core248.ChartAxisDirection.X],o=e[import_ag_charts_core248.ChartAxisDirection.Y];if(a==null||o==null||i==null||s==null)return;const{interpolation:l}=r,{scale:c}=a,{scale:h}=o,u=(c.bandwidth??0)/2;let d=i.resolveKeysById(this,"xValue",s),p=i.resolveColumnById(this,this.yValueKey(),s);const g=!this.isStacked()&&this.properties.connectMissingData,f=s.invalidKeys?.get(this.id),m=(g?s.invalidData?.get(this.id):void 0)??f;m!=null&&(d=d.filter((N,k)=>m[k]===!1),p=p.filter((N,k)=>m[k]===!1));let[b,v]=visibleRangeIndices(1,d.length,a.range,N=>this.xCoordinateRange(d[N],0));b=Math.max(b-2,0),v=Math.min(v+2,d.length);let x;if(n?.fillSpans)x=n?.fillSpans;else{const N=[];for(let k=b;k<v;k+=1){const w=d[k];N.push({point:{x:c.convert(w)+u,y:h.convert(0)},xDatum:w,yDatum:0})}x=interpolatePoints(N,{type:"linear"})}if(this.phantomSpans=x,!t)return this.fillSpans=x,this.strokeSpans=[],n;let S=n?.stack;if(S==null){S=[];for(let N=b;N<v-1;N+=1)S.push({leading:0,trailing:0,dataValid:!0,breakBefore:!1})}const I=S.slice();let D=!1;for(let N=0;N<I.length;N+=1){const k=b+N,w=b+N+1;let{leading:E,trailing:O,breakBefore:R}=S[N];const _=p[k],P=p[w],F=!Number.isFinite(_),V=!Number.isFinite(P),B=!F&&!V;B&&(E+=_,O+=P),N!==0&&B!==D&&(R=!0),D=B,I[N]={leading:E,trailing:O,dataValid:B,breakBefore:R}}const T=[],A=[],L=[];for(let N=0;N<I.length;N+=1){const{leading:k,dataValid:w,breakBefore:E}=I[N],O=b+N;if(E){if(L.length!==0){const R=I[N-1],_={point:{x:c.convert(d[O])+u,y:h.convert(R.trailing)},xDatum:d[O],yDatum:R.trailing};L.push(_);const P=interpolatePoints(L,l);T.push(...P),A.push(...P)}L.length=0}if(w){const R={point:{x:c.convert(d[O])+u,y:h.convert(k)},xDatum:d[O],yDatum:k};L.push(R)}else T.push(x[N])}if(L.length!==0){const N=I.at(-1),k=b+I.length,w={point:{x:c.convert(d[k])+u,y:h.convert(N.trailing)},xDatum:d[k],yDatum:N.trailing};L.push(w);const E=interpolatePoints(L,l);T.push(...E),A.push(...E),L.length=0}return this.fillSpans=T,this.strokeSpans=A,{stack:I,fillSpans:T,strokeSpans:A}}createStackContext(){const t=this.axes[import_ag_charts_core248.ChartAxisDirection.X];if(t==null)return;const{scale:e}=t,[i,s]=e.range,n=Math.abs(s-i);this.aggregationManager.ensureLevelForRange(n);const r=this.aggregationManager.getFilterForRange(n);return r?this.stackAggregatedData(r):this.stackYValueData()}createNodeDatumContext(t,e){const{dataModel:i,processedData:s}=this;if(!i||!s)return;const{xKey:n,xName:r,yFilterKey:a,yKey:o,yName:l,legendItemName:c,marker:h,label:u,fill:d,stroke:p,normalizedTo:g}=this.properties,f=t.scale,y=e.scale,{isContinuousY:m}=this.getScaleInformation({xScale:f,yScale:y}),b=s.type==="grouped",[v,x]=f.range,S=Math.abs(x-v);this.aggregationManager.ensureLevelForRange(S);const I=this.aggregationManager.getFilterForRange(S),D=this.contextNodeData?.nodeData,T=D!=null&&this.canIncrementallyUpdateNodes(I!=null);return{xAxis:t,yAxis:e,rawData:s.dataSources.get(this.id)?.data??[],xValues:i.resolveKeysById(this,"xValue",s),yRawValues:i.resolveColumnById(this,"yValueRaw",s),yCumulativeValues:b?i.resolveColumnById(this,"yValueCumulative",s):i.resolveColumnById(this,"yValueRaw",s),yFilterValues:a==null?void 0:i.resolveColumnById(this,"yFilterRaw",s),invalidData:s.invalidData?.get(this.id),xScale:f,yScale:y,xOffset:(f.bandwidth??0)/2,yOffset:0,indices:I?.indices,isContinuousY:m,labelsEnabled:u.enabled,normalizedTo:g,canIncrementallyUpdate:T,animationEnabled:!this.ctx.animationManager.isSkipped(),xKey:n,yKey:o,xName:r,yName:l,legendItemName:c,markerSize:h.size,markerFill:h.fill??d,markerStroke:h.stroke??p,markerStrokeWidth:h.strokeWidth??this.properties.strokeWidth,yDomain:this.getSeriesDomain(import_ag_charts_core248.ChartAxisDirection.Y).domain,nodes:T?D:[],labelData:[],nodeIndex:0,crossFiltering:!1}}computeMarkerCoordinate(t,e){let i;((0,import_ag_charts_core248.isDefined)(t.normalizedTo)?t.isContinuousY&&(0,import_ag_charts_core248.isContinuous)(e.yDatum):!Number.isNaN(e.yDatum))&&(i=e.yCumulative),e.x=t.xScale.convert(e.xDatum)+t.xOffset,e.y=t.yScale.convert(i),Number.isFinite(e.x)||(e.validPoint=!1)}handleDatum(t,e,i){if(e.xDatum=t.xValues[i],!(e.xDatum===void 0&&!this.properties.allowNullKeys)){if(e.datum=t.rawData[i],e.yDatum=t.yRawValues[i],e.yCumulative=+t.yCumulativeValues[i],e.validPoint=Number.isFinite(e.yDatum)&&t.invalidData?.[i]!==!0,this.computeMarkerCoordinate(t,e),e.selected=t.yFilterValues==null?void 0:t.yFilterValues[i]===e.yDatum,e.selected===!1&&(t.crossFiltering=!0),e.validPoint){if(t.canIncrementallyUpdate&&t.nodeIndex<t.nodes.length){const n=t.nodes[t.nodeIndex];n.datum=e.datum,n.datumIndex=i,n.midPoint={x:e.x,y:e.y},n.cumulativeValue=e.yCumulative,n.yValue=e.yDatum,n.xValue=e.xDatum,n.point={x:e.x,y:e.y,size:t.markerSize},n.selected=e.selected}else t.nodes.push({series:this,datum:e.datum,datumIndex:i,midPoint:{x:e.x,y:e.y},cumulativeValue:e.yCumulative,yValue:e.yDatum,xValue:e.xDatum,yKey:t.yKey,xKey:t.xKey,point:{x:e.x,y:e.y,size:t.markerSize},fill:t.markerFill,stroke:t.markerStroke,strokeWidth:t.markerStrokeWidth,selected:e.selected});t.nodeIndex++}if(t.labelsEnabled&&e.validPoint){const s=this.getLabelText(e.yDatum,e.datum,t.yKey,"y",t.yDomain,this.properties.label,{value:e.yDatum,datum:e.datum,xKey:t.xKey,yKey:t.yKey,xName:t.xName,yName:t.yName,legendItemName:t.legendItemName});t.labelData.push({series:this,datum:e.datum,datumIndex:i,x:e.x,y:e.y,labelText:s})}}}populateNodeData(t){const e={datum:void 0,xDatum:void 0,yDatum:void 0,yCumulative:0,selected:void 0,x:0,y:0,validPoint:!1};let[i,s]=this.visibleRangeIndices("xValue",t.xAxis.range,t.indices);i=Math.max(i-2,0),s=Math.min(s+2,t.indices?.length??t.xValues.length),this.processedData.input.count<1e3&&(i=0,s=this.processedData.input.count);for(let n=i;n<s;n+=1){const r=t.indices?.[n]??n;this.handleDatum(t,e,r)}}initializeResult(t){const{visibleSameStackCount:e}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);return{itemId:t.yKey,fillData:{spans:this.fillSpans,phantomSpans:this.phantomSpans},strokeData:{spans:this.strokeSpans},labelData:t.labelData,nodeData:t.nodes,scales:this.calculateScaling(),visible:this.visible,stackVisible:e>0,crossFiltering:t.crossFiltering,styles:getMarkerStyles(this,this.properties,this.properties.marker),segments:void 0}}assembleResult(t,e){return e.segments=calculateSegments(this.properties.segmentation,t.xAxis,t.yAxis,this.chart.seriesRect,this.ctx.scene,!1),e}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{paths:[e,i],visible:s,animationEnabled:n}=t,r=this.contextNodeData?.crossFiltering===!0,a=this.contextNodeData?.segments,o=(0,import_ag_charts_core248.mergeDefaults)(this.getHighlightStyle(),this.getStyle()),{strokeWidth:l,stroke:c,strokeOpacity:h,lineDash:u,lineDashOffset:d,fill:p,fillOpacity:g,opacity:f}=o;i.setProperties({segments:a,fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:1,stroke:c,strokeWidth:l,strokeOpacity:h*(r?CROSS_FILTER_AREA_STROKE_OPACITY_FACTOR:1),lineDash:u,lineDashOffset:d,opacity:f,visible:s||n}),i.datum=a,e.setStyleProperties({fill:p,stroke:void 0,fillOpacity:g*(r?CROSS_FILTER_AREA_FILL_OPACITY_FACTOR:1)},this.getShapeFillBBox()),e.setProperties({segments:a,lineJoin:"round",pointerEvents:1,fillShadow:this.properties.shadow,opacity:f,visible:s||n}),e.datum=a,updateClipPath(this,i),updateClipPath(this,e)}updatePaths(t){this.updateAreaPaths(t.paths,t.contextData)}updateAreaPaths(t,e){for(const i of t)i.visible=e.visible;if(e.visible)this.updateFillPath(t,e),this.updateStrokePath(t,e);else for(const i of t)i.path.clear(),i.markDirty("AreaSeries")}updateFillPath(t,e){const[i]=t;i.path.clear(),plotAreaPathFill(i,e.fillData),i.markDirty("AreaSeries")}updateStrokePath(t,e){const{spans:i}=e.strokeData,[,s]=t;s.path.clear(),plotLinePathStroke(s,i),s.markDirty("AreaSeries")}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,{contextNodeData:s,processedData:n,axes:r,properties:a}=this,{marker:o,styler:l}=a,c=l?this.getStyle().marker:void 0,h=s?.crossFiltering===!0||markerEnabled(n.input.count,r[import_ag_charts_core248.ChartAxisDirection.X].scale,o,c);o.isDirty()&&(i.clear(),i.cleanup());const u=h?e:[];return processedDataIsAnimatable(this.processedData)?i.update(u,void 0,d=>createDatumId(d.xValue)):i.update(u)}updateDatumStyles(t){const{datumSelection:e,isHighlight:i}=t,{marker:s}=this.properties,n=this.ctx.highlightManager.getActiveHighlight();e.each((r,a)=>{if(!e.isGarbage(r)){const o=this.getHighlightState(n,t.isHighlight,a.datumIndex),l=this.getStyle(o),{stroke:c,strokeWidth:h,strokeOpacity:u}=l,d=this.makeItemStylerParams(this.dataModel,this.processedData,a.datumIndex,l.marker);a.style=this.getMarkerStyle(s,a,d,{isHighlight:i,highlightState:o},l.marker,{stroke:c,strokeWidth:h,strokeOpacity:u})}})}updateDatumNodes(t){const{contextNodeData:e}=this;if(!e)return;const{datumSelection:i,isHighlight:s}=t,n=this.getShapeFillBBox(),r=this.ctx.highlightManager.getActiveHighlight(),a=this.getDrawingMode(s,t.drawingMode);i.each((o,l)=>{const c=this.getHighlightState(r,s,l.datumIndex),h=l.style??e.styles[c];this.applyMarkerStyle(h,o,l.point,n,{selected:l.selected}),o.drawingMode=this.resolveMarkerDrawingModeForState(a,h)}),s||this.properties.marker.markClean()}updateLabelSelection(t){return t.labelSelection.update(this.isLabelEnabled()?t.labelData:[])}updateLabelNodes(t){const{isHighlight:e=!1}=t,i=this.ctx.highlightManager?.getActiveHighlight(),s=this.makeLabelFormatterParams();t.labelSelection.each((n,r)=>{const a=getLabelStyles(this,r,s,this.properties.label,e,i),{enabled:o,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u,color:d}=a;o&&r?.labelText?(n.fontStyle=l,n.fontWeight=c,n.fontSize=h,n.fontFamily=u,n.textAlign="center",n.textBaseline="bottom",n.text=r.labelText,n.x=r.x,n.y=r.y-10,n.fill=d,n.visible=!0,n.fillOpacity=this.getHighlightStyle(e,r.datumIndex).opacity??1,n.setBoxing(a)):n.visible=!1})}makeStylerParams(t){const{id:e}=this,{marker:i,fill:s,fillOpacity:n,lineDash:r,lineDashOffset:a,stroke:o,strokeOpacity:l,strokeWidth:c,xKey:h,yKey:u}=this.properties,d=toHighlightString(t??0);return{marker:{fill:i.fill,fillOpacity:i.fillOpacity,size:i.size,shape:i.shape,stroke:i.stroke,strokeOpacity:i.strokeOpacity,strokeWidth:i.strokeWidth,lineDash:i.lineDash,lineDashOffset:i.lineDashOffset},highlightState:d,fill:s,fillOpacity:n,lineDash:r,lineDashOffset:a,seriesId:e,stroke:o,strokeOpacity:l,strokeWidth:c,xKey:h,yKey:u}}makeItemStylerParams(t,e,i,s){const{xKey:n,yKey:r}=this.properties,a=t.resolveKeysById(this,"xValue",e)[i],o=t.resolveColumnById(this,"yValueRaw",e)[i],l=t.getDomain(this,"xValue","key",e).domain,c=t.getDomain(this,this.yCumulativeKey(e),"value",e).domain,h=this.filterItemStylerFillParams(s.fill)??s.fill;return{...datumStylerProperties(a,o,n,r,l,c),xValue:a,yValue:o,...s,fill:h}}makeLabelFormatterParams(){const{xKey:t,xName:e,yKey:i,yName:s,legendItemName:n}=this.properties;return{xKey:t,xName:e,yKey:i,yName:s,legendItemName:n}}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:n,properties:r}=this,{xKey:a,xName:o,yKey:l,yName:c,tooltip:h,legendItemName:u}=r,d=r.allowNullKeys??!1,p=n[import_ag_charts_core248.ChartAxisDirection.X],g=n[import_ag_charts_core248.ChartAxisDirection.Y];if(!i||!s||!p||!g)return;const f=s.dataSources.get(this.id)?.data?.[t],y=i.resolveKeysById(this,"xValue",s)[t],m=i.resolveColumnById(this,"yValueRaw",s)[t];if(y===void 0&&!d)return;const b=this.getStyle(),v=this.makeItemStylerParams(i,s,t,b.marker),x=this.getMarkerStyle(this.properties.marker,{datumIndex:t,datum:f},v,{isHighlight:!1},b.marker);return this.formatTooltipWithContext(h,{heading:this.getAxisValueText(p,"tooltip",y,f,a,u,d),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:this.getAxisValueText(g,"tooltip",m,f,l,u),missing:isTooltipValueMissing(m)}]},{seriesId:e,datum:f,title:c,xKey:a,xName:o,yKey:l,yName:c,...x,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:s,strokeWidth:n,lineDash:r,marker:a}=this.getStyle(),o=!a.enabled||a.fill==null,l=o?t:a.fill;return{marker:{...this.getMarkerStyle(this.properties.marker,{},void 0,{isHighlight:!1,checkForHighlight:!1},{size:a.size,shape:a.shape,fill:l,fillOpacity:o?i:a.fillOpacity,stroke:a.stroke}),enabled:a.enabled||n<=0},line:{enabled:!0,stroke:e,strokeOpacity:s,strokeWidth:n,lineDash:r}}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{yKey:n,yName:r,legendItemName:a,showInLegend:o}=this.properties;return[{legendType:t,id:e,itemId:n,legendItemName:a,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:n}),label:{text:a??r??n},symbol:this.legendItemSymbol(),hideInLegend:!o}]}resetDatumAnimation(t){resetMarkerSelectionsDirect([t.datumSelection])}animateEmptyUpdateReady(t){const{datumSelection:e,labelSelection:i,contextData:s,paths:n}=t,{animationManager:r}=this.ctx;this.updateAreaPaths(n,s),pathSwipeInAnimation(this,r,...n),resetMotion([e],resetMarkerPositionFn),markerSwipeScaleInAnimation(this,r,{...this.getAnimationDrawingModes(),phase:"initial"},e),seriesLabelFadeInAnimation(this,"labels",r,i)}animateReadyResize(t){const{contextData:e,paths:i}=t;this.updateAreaPaths(i,e),super.animateReadyResize(t)}animateWaitingUpdateReady(t){const{animationManager:e}=this.ctx,{datumSelection:i,labelSelection:s,contextData:n,paths:r,previousContextData:a}=t,[o,l]=r;if(n.visible===!1&&a?.visible===!1||o==null&&l==null)return;this.resetDatumAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateAreaPaths(r,n)},h=()=>{e.skipCurrentBatch(),c()};if(n==null||a==null){c(),markerFadeInAnimation(this,e,"added",this.getAnimationDrawingModes(),i),pathFadeInAnimation(this,"fill_path_properties",e,"add",o),pathFadeInAnimation(this,"stroke_path_properties",e,"add",l),seriesLabelFadeInAnimation(this,"labels",e,s);return}if(n.crossFiltering!==a.crossFiltering){h();return}const u=prepareAreaPathAnimation(n,a);if(u===void 0){h();return}else if(u.status==="no-op")return;markerFadeInAnimation(this,e,void 0,this.getAnimationDrawingModes(),i),fromToMotion(this.id,"fill_path_properties",e,[o],u.fill.pathProperties),pathMotion(this.id,"fill_path_update",e,[o],u.fill.path),fromToMotion(this.id,"stroke_path_properties",e,[l],u.stroke.pathProperties),pathMotion(this.id,"stroke_path_update",e,[l],u.stroke.path),seriesLabelFadeInAnimation(this,"labels",e,s),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(r,n)})}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Marker}getStyle(t){const{styler:e,marker:i,fill:s,fillOpacity:n,lineDash:r,lineDashOffset:a,stroke:o,strokeOpacity:l,strokeWidth:c}=this.properties,{size:h,shape:u,fill:d="transparent",fillOpacity:p}=i;let g={};if(e){const f=this.makeStylerParams(t),y=this.cachedCallWithContext(e,f)??{};g=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],y,{pick:!1})??{}}return g.marker??(g.marker={}),{fill:g.fill??s,fillOpacity:g.fillOpacity??n,lineDash:g.lineDash??r,lineDashOffset:g.lineDashOffset??a,stroke:g.stroke??o,strokeOpacity:g.strokeOpacity??l,strokeWidth:g.strokeWidth??c,marker:{enabled:g.marker.enabled??i.enabled,fill:g.marker.fill??d,fillOpacity:g.marker.fillOpacity??p,shape:g.marker.shape??u,size:g.marker.size??h,lineDash:g.marker.lineDash??i.lineDash??r,lineDashOffset:g.marker.lineDashOffset??i.lineDashOffset??a,stroke:g.marker.stroke??i.stroke??o,strokeOpacity:g.marker.strokeOpacity??i.strokeOpacity??l,strokeWidth:g.marker.strokeWidth??i.strokeWidth??c}}}getFormattedMarkerStyle(t){const e=this.getStyle(),i=this.makeItemStylerParams(this.dataModel,this.processedData,t.datumIndex,e.marker);return this.getMarkerStyle(this.properties.marker,t,i,{isHighlight:!0},void 0,e)}isPointInArea(t,e){let i;for(const s of this.backgroundGroup.children())if(s instanceof Path){i=s;break}return i?.getBBox().containsPoint(t,e)?i.isPointInPath(t,e):!1}computeFocusBounds(t){return computeMarkerFocusBounds(this,t)}hasItemStylers(){return this.properties.styler!=null||this.properties.marker.itemStyler!=null||this.properties.label.itemStyler!=null}};AreaSeries.className="AreaSeries",AreaSeries.type="area";var themeTemplate={series:{nodeClickRange:"nearest",fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core249.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core249.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core249.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},fillOpacity:.8,strokeOpacity:1,strokeWidth:{$isUserOption:["./stroke",2,0]},lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:import_ag_charts_core249.DEFAULT_SHADOW_COLOUR,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:{$isUserOption:["./stroke",1,0]},fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core249.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["pattern",import_ag_charts_core249.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"}},label:{...import_ag_charts_core249.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},tooltip:{range:{$path:["/tooltip/range","nearest"]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:import_ag_charts_core249.MARKER_SERIES_HIGHLIGHT_STYLE,segmentation:import_ag_charts_core249.SEGMENTATION_DEFAULTS}},AreaSeriesModule={type:"series",name:"area",chartType:"cartesian",stackable:!0,version:VERSION,dependencies:[CartesianChartModule],options:areaSeriesOptionsDef,predictAxis:predictCartesianNonPrimitiveAxis,defaultAxes:{y:{type:import_ag_charts_core249.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core249.CARTESIAN_POSITION.LEFT},x:{type:import_ag_charts_core249.CARTESIAN_AXIS_TYPE.CATEGORY,position:import_ag_charts_core249.CARTESIAN_POSITION.BOTTOM}},axisKeys:{[import_ag_charts_core249.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core249.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate,create:t=>new AreaSeries(t)},import_ag_charts_core254=require("ag-charts-core"),import_ag_charts_core253=require("ag-charts-core"),import_ag_charts_core250=require("ag-charts-core"),FEATHERED_THRESHOLD=.001,BarShape=class extends Rect{constructor(){super(...arguments),this.direction="x",this.featherRatio=0}setStaticProperties(t,e,i,s,n,r,a,o,l,c){this.__direction=l??"x",this.__featherRatio=c??0,super.setStaticProperties(t,e,i,s,n,r,a,o)}get feathered(){return Math.abs(this.featherRatio)>FEATHERED_THRESHOLD}isPointInPath(t,e){return this.feathered?this.getBBox().containsPoint(t,e):super.isPointInPath(t,e)}updatePath(){if(!this.feathered){super.updatePath();return}const{path:t,borderPath:e,__direction:i,__featherRatio:s,__x:n,__y:r,__width:a,__height:o}=this;if(t.clear(),e.clear(),i==="x"){const l=Math.abs(s)*a;s>0?(t.moveTo(n,r),t.lineTo(n+a-l,r),t.lineTo(n+a,r+o/2),t.lineTo(n+a-l,r+o),t.lineTo(n,r+o),t.closePath()):(t.moveTo(n+l,r),t.lineTo(n+a,r),t.lineTo(n+a,r+o),t.lineTo(n+l,r+o),t.lineTo(n,r+o/2),t.closePath())}else{const l=Math.abs(s)*o;s>0?(t.moveTo(n,r+l),t.lineTo(n+a/2,r),t.lineTo(n+a,r+l),t.lineTo(n+a,r+o),t.lineTo(n,r+o),t.closePath()):(t.moveTo(n,r),t.lineTo(n+a,r),t.lineTo(n+a,r+o-l),t.lineTo(n+a/2,r+o),t.lineTo(n,r+o-l),t.closePath())}}renderStroke(t){if(!this.feathered){super.renderStroke(t);return}const{__stroke:e,__strokeWidth:i,__lineDash:s,__lineDashOffset:n,__lineCap:r,__lineJoin:a,path:o}=this;if(e&&i){const{globalAlpha:l}=t;this.applyStrokeAndAlpha(t),t.lineWidth=i,s&&t.setLineDash(s),n&&(t.lineDashOffset=n),r&&(t.lineCap=r),a&&(t.lineJoin=a),t.stroke(o.getPath2D()),t.globalAlpha=l}}};__decorateClass([(0,import_ag_charts_core250.DeclaredSceneChangeDetection)()],BarShape.prototype,"direction",2),__decorateClass([(0,import_ag_charts_core250.DeclaredSceneChangeDetection)()],BarShape.prototype,"featherRatio",2);var import_ag_charts_core251=require("ag-charts-core");function computeBarAggregation(t,e,i,s,n){if(e.length<import_ag_charts_core251.AGGREGATION_THRESHOLD)return;const[r,a]=t,{smallestKeyInterval:o,xNeedsValueOf:l,yNeedsValueOf:c,existingFilters:h}=n;let u=(0,import_ag_charts_core251.aggregationRangeFittingPoints)(e,r,a,{smallestKeyInterval:o,xNeedsValueOf:l});const d=h?.find(x=>x.maxRange===u);let{indexData:p,valueData:g,negativeIndexData:f,negativeValueData:y}=(0,import_ag_charts_core251.createAggregationIndices)(e,s,i??s,r,a,u,{split:!0,xNeedsValueOf:l,yNeedsValueOf:c,reuseIndexData:d?.positiveIndexData,reuseValueData:d?.positiveValueData,reuseNegativeIndexData:d?.negativeIndexData,reuseNegativeValueData:d?.negativeValueData});if(!f||!y)throw new Error("Negative aggregation data missing in split mode");let m=(0,import_ag_charts_core251.getMidpointsForIndices)(u,p,d?.positiveIndices),b=(0,import_ag_charts_core251.getMidpointsForIndices)(u,f,d?.negativeIndices);const v=[{maxRange:u,positiveIndices:m,positiveIndexData:p,positiveValueData:g,negativeIndices:b,negativeIndexData:f,negativeValueData:y}];for(;u>64;){const x=u,S=Math.trunc(x/2),I=h?.find(A=>A.maxRange===S),D=(0,import_ag_charts_core251.compactAggregationIndices)(p,g,x,{reuseIndexData:I?.positiveIndexData,reuseValueData:I?.positiveValueData}),T=(0,import_ag_charts_core251.compactAggregationIndices)(f,y,x,{reuseIndexData:I?.negativeIndexData,reuseValueData:I?.negativeValueData});u=D.maxRange,p=D.indexData,g=D.valueData,m=D.midpointData??(0,import_ag_charts_core251.getMidpointsForIndices)(u,p,I?.positiveIndices),f=T.indexData,y=T.valueData,b=T.midpointData??(0,import_ag_charts_core251.getMidpointsForIndices)(u,f,I?.negativeIndices),v.push({maxRange:u,positiveIndices:m,positiveIndexData:p,positiveValueData:g,negativeIndices:b,negativeIndexData:f,negativeValueData:y})}return v.reverse(),v}function computeBarAggregationPartial(t,e,i,s,n){if(e.length<import_ag_charts_core251.AGGREGATION_THRESHOLD)return;const[r,a]=t,{smallestKeyInterval:o,xNeedsValueOf:l,yNeedsValueOf:c,targetRange:h,existingFilters:u}=n,d=(0,import_ag_charts_core251.aggregationRangeFittingPoints)(e,r,a,{smallestKeyInterval:o,xNeedsValueOf:l}),p=Math.min(d,(0,import_ag_charts_core251.nextPowerOf2)(Math.max(h,import_ag_charts_core251.AGGREGATION_MIN_RANGE))),g=u?.find(S=>S.maxRange===p),{indexData:f,valueData:y,negativeIndexData:m,negativeValueData:b}=(0,import_ag_charts_core251.createAggregationIndices)(e,s,i??s,r,a,p,{split:!0,xNeedsValueOf:l,yNeedsValueOf:c,reuseIndexData:g?.positiveIndexData,reuseValueData:g?.positiveValueData,reuseNegativeIndexData:g?.negativeIndexData,reuseNegativeValueData:g?.negativeValueData});if(!m||!b)throw new Error("Negative aggregation data missing in split mode");const v={maxRange:p,positiveIndices:(0,import_ag_charts_core251.getMidpointsForIndices)(p,f,g?.positiveIndices),positiveIndexData:f,positiveValueData:y,negativeIndices:(0,import_ag_charts_core251.getMidpointsForIndices)(p,m,g?.negativeIndices),negativeIndexData:m,negativeValueData:b};function x(){return computeBarAggregation([r,a],e,i,s,{smallestKeyInterval:o,xNeedsValueOf:l,yNeedsValueOf:c,existingFilters:u})?.filter(I=>I.maxRange!==p)??[]}return{immediate:[v],computeRemaining:x}}function aggregateBarData(t,e,i,s,n,r,a,o){const[l,c]=(0,import_ag_charts_core251.aggregationDomain)(t,n);return computeBarAggregation([l,c],e,i,s,{smallestKeyInterval:r,xNeedsValueOf:a,yNeedsValueOf:o})}var memoizedAggregateBarData=(0,import_ag_charts_core251.simpleMemorize2)(aggregateBarData);function aggregateBarDataFromDataModel(t,e,i,s,n){const r=e.resolveKeysById(s,"xValue",i),a=e.hasColumnById(s,"yValue-start"),o=a?e.resolveColumnById(s,"yValue-start",i):void 0,l=a?e.resolveColumnById(s,"yValue-end",i):e.resolveColumnById(s,"yValue-raw",i),c=e.getDomain(s,"xValue","key",i),h=e.resolveColumnNeedsValueOf(s,"xValue",i),u=e.resolveColumnNeedsValueOf(s,a?"yValue-end":"yValue-raw",i);if(n){const[d,p]=(0,import_ag_charts_core251.aggregationDomain)(t,c);return computeBarAggregation([d,p],r,o,l,{smallestKeyInterval:i.reduced?.smallestKeyInterval,xNeedsValueOf:h,yNeedsValueOf:u,existingFilters:n})}return memoizedAggregateBarData(t,r,o,l,c,i.reduced?.smallestKeyInterval,h,u)}function aggregateBarDataFromDataModelPartial(t,e,i,s,n,r){const a=e.resolveKeysById(s,"xValue",i),o=e.hasColumnById(s,"yValue-start"),l=o?e.resolveColumnById(s,"yValue-start",i):void 0,c=o?e.resolveColumnById(s,"yValue-end",i):e.resolveColumnById(s,"yValue-raw",i),h=e.getDomain(s,"xValue","key",i),u=e.resolveColumnNeedsValueOf(s,"xValue",i),d=e.resolveColumnNeedsValueOf(s,o?"yValue-end":"yValue-raw",i),[p,g]=(0,import_ag_charts_core251.aggregationDomain)(t,h);return computeBarAggregationPartial([p,g],a,l,c,{smallestKeyInterval:i.reduced?.smallestKeyInterval,xNeedsValueOf:u,yNeedsValueOf:d,targetRange:n,existingFilters:r})}var import_ag_charts_core252=require("ag-charts-core"),BarSeriesLabel=class extends Label{constructor(){super(...arguments),this.placement="inside-center",this.spacing=0}};__decorateClass([import_ag_charts_core252.Property],BarSeriesLabel.prototype,"placement",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesLabel.prototype,"spacing",2);var BarSeriesProperties=class extends AbstractBarSeriesProperties{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new DropShadow,this.label=new BarSeriesLabel,this.tooltip=makeSeriesTooltip(),this.sparklineMode=!1}};__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"yKey",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"yFilterKey",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"stackGroup",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"normalizedTo",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"crisp",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"simpleItemStyler",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core252.Property],BarSeriesProperties.prototype,"sparklineMode",2);var BarSeries=class extends AbstractBarSeries{constructor(t){super({moduleCtx:t,propertyKeys:DEFAULT_CARTESIAN_DIRECTION_KEYS,propertyNames:DEFAULT_CARTESIAN_DIRECTION_NAMES,categoryKey:"xValue",pickModes:[2,1,0],pathsPerSeries:[],datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:resetBarSelectionsFn,label:resetLabelFn}}),this.properties=new BarSeriesProperties,this.connectsToYAxis=!0,this.aggregationManager=new AggregationManager,this.phantomGroup=this.contentGroup.appendChild(new Group({name:"phantom",zIndex:-1})),this.phantomSelection=Selection.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.phantomHighlightGroup=this.highlightGroup.appendChild(new Group({name:`${this.internalId}-highlight-node`})),this.phantomHighlightSelection=Selection.select(this.phantomHighlightGroup,()=>this.nodeFactory(),!1),this.phantomGroup.opacity=.2,this.phantomHighlightGroup.opacity=.2}get pickModeAxis(){return this.properties.sparklineMode?"main":void 0}crossFilteringEnabled(){return this.properties.yFilterKey!=null&&(this.seriesGrouping==null||this.seriesGrouping.stackIndex===0)}async processData(t){if(!this.data)return;const{xKey:e,yKey:i,yFilterKey:s,normalizedTo:n}=this.properties,{seriesGrouping:{groupIndex:r=this.id}={},data:a}=this,l=(this.seriesGrouping?.stackCount??0)>1||n!=null,c=l,h=!this.ctx.animationManager.isSkipped(),u=this.getCategoryAxis()?.scale,d=this.getValueAxis()?.scale,{isContinuousX:p,xScaleType:g,yScaleType:f}=this.getScaleInformation({xScale:u,yScale:d}),y=`bar-stack-${r}-yValues`,m=`${y}-trailing`,b=this.visible?{}:{forceValue:0},v=this.properties.allowNullKeys??!1,x=[keyProperty(e,g,{id:"xValue",allowNullKey:v}),valueProperty(i,f,{id:"yValue-raw",invalidValue:null,...b})];this.crossFilteringEnabled()&&x.push(valueProperty(s,f,{id:"yFilterValue",invalidValue:null,...b})),l&&x.push(...groupAccumulativeValueProperty(i,"normal",{id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:y,separateNegative:!0,...b},f),...groupAccumulativeValueProperty(i,"trailing",{id:"yValue-start",invalidValue:null,missingValue:0,groupId:m,separateNegative:!0,...b},f)),p&&x.push(SMALLEST_KEY_INTERVAL,LARGEST_KEY_INTERVAL),(0,import_ag_charts_core253.isFiniteNumber)(n)&&x.push(normaliseGroupTo([y,m],Math.abs(n))),this.needsDataModelDiff()&&this.processedData&&x.push(diff(this.id,this.processedData)),(h||!c)&&x.push(animationValidation());const{dataModel:S,processedData:I}=await this.requestDataModel(t,a,{props:x,groupByKeys:c,groupByData:!c});this.aggregateData(S,I),this.smallestDataInterval=I.reduced?.smallestKeyInterval,this.largestDataInterval=I.reduced?.largestKeyInterval,this.animationState.transition("updateData")}yCumulativeKey(t){return t.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw"}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(i==null||e==null)return{domain:[]};if(t===this.getCategoryDirection()){const o=i.resolveProcessedDataDefById(this,"xValue"),l=i.getDomain(this,"xValue","key",e);return o?.def.type==="key"&&o.def.valueType==="category"?l:{domain:this.padBandExtent(l.domain)}}const s=this.yCumulativeKey(i);let n=this.domainForClippedRange(t,[s],"xValue");const r=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",e).domain:void 0;r!=null&&(n=[Math.min(n[0],r[0]),Math.max(n[1],r[1])]);const a=this.getValueAxis();if(a instanceof NumberAxis&&!(a instanceof LogAxis)){const o=Number.isFinite(n[1]-n[0])?[Math.min(0,n[0]),Math.max(0,n[1])]:[];return{domain:fixNumericExtent(o)}}else return{domain:fixNumericExtent(n)}}getSeriesRange(t,e){if((this.properties.direction==="horizontal"?import_ag_charts_core253.ChartAxisDirection.X:import_ag_charts_core253.ChartAxisDirection.Y)!==t)return[];const s=this.yCumulativeKey(this.dataModel),[n,r]=this.domainForVisibleRange(import_ag_charts_core253.ChartAxisDirection.Y,[s],"xValue",e);return[Math.min(n,0),Math.max(r,0)]}getZoomRangeFittingItems(t,e,i){const s=this.yCumulativeKey(this.dataModel);return this.zoomFittingVisibleItems("xValue",[s],t,e,i)}getVisibleItems(t,e,i){const s=this.yCumulativeKey(this.dataModel);return this.countVisibleItems("xValue",[s],t,e,i)}aggregateData(t,e){if(this.aggregationManager.markStale(e.input.count),processedDataIsAnimatable(e))return;const i=this.axes[import_ag_charts_core253.ChartAxisDirection.X];if(i==null)return;const s=this.estimateTargetRange();this.aggregationManager.aggregate({computePartial:r=>aggregateBarDataFromDataModelPartial(i.scale.type,t,e,this,s,r),computeFull:r=>aggregateBarDataFromDataModel(i.scale.type,t,e,this,r),targetRange:s});const n=this.aggregationManager.filters;n&&n.length>0&&import_ag_charts_core253.DebugMetrics.record(`${this.type}:aggregation`,n.map(r=>r.maxRange))}estimateTargetRange(){const t=this.axes[import_ag_charts_core253.ChartAxisDirection.X];if(t?.scale?.range){const[e,i]=t.scale.range;return Math.abs(i-e)}return this.ctx.scene?.canvas?.width??800}createNodeDatumContext(t,e){const{dataModel:i,processedData:s}=this;if(!i||!s)return;const n=s.dataSources?.get(this.id);if(n==null)return;const r=t.scale,a=e.scale,o=Math.abs(r.range[1]-r.range[0]);this.aggregationManager.ensureLevelForRange(o);const l=this.aggregationManager.getFilterForRange(o),c=i.hasColumnById(this,"yValue-start"),{label:h}=this.properties,u=this.canIncrementallyUpdateNodes(l!=null),{groupOffset:d,barOffset:p,barWidth:g}=this.getBarDimensions();return{dataSource:n,rawData:n.data,xValues:i.resolveKeysById(this,"xValue",s),yRawValues:i.resolveColumnById(this,"yValue-raw",s),yFilterValues:this.crossFilteringEnabled()?i.resolveColumnById(this,"yFilterValue",s):void 0,yStartValues:c?i.resolveColumnById(this,"yValue-start",s):void 0,yEndValues:c?i.resolveColumnById(this,"yValue-end",s):void 0,xScale:r,yScale:a,xAxis:t,yAxis:e,groupOffset:d,barOffset:p,barWidth:g,range:o,yReversed:e.isReversed(),bboxBottom:a.convert(0),labelSpacing:h.spacing+(typeof h.padding=="number"?h.padding:0),crisp:l==null&&(this.properties.crisp??checkCrisp(t?.scale,t?.visibleRange,this.smallestDataInterval,this.largestDataInterval)),isStacked:c,animationEnabled:!this.ctx.animationManager.isSkipped(),dataAggregationFilter:l,canIncrementallyUpdate:u,phantomNodes:u?this.contextNodeData.phantomNodeData??[]:[],nodes:u?this.contextNodeData.nodeData:[],labels:u?this.contextNodeData.labelData:[],nodeIndex:0,phantomIndex:0,barAlongX:this.getBarDirection()===import_ag_charts_core253.ChartAxisDirection.X,shouldFlipXY:this.shouldFlipXY(),xKey:this.properties.xKey,yKey:this.properties.yKey,xName:this.properties.xName,yName:this.properties.yName,legendItemName:this.properties.legendItemName,label:h,yDomain:this.getSeriesDomain(import_ag_charts_core253.ChartAxisDirection.Y).domain}}computeXPosition(t,e){const i=t.xScale.convert(t.xValues[e]);return Number.isFinite(i)?i+t.groupOffset+t.barOffset:Number.NaN}prepareNodeDatumState(t,e,i,s,n){if(!Number.isFinite(n))return;const r=t.xValues[i];if(r===void 0&&!this.properties.allowNullKeys)return;const a=t.dataSource?.data[i],o=t.yRawValues[i],l=t.yFilterValues==null?void 0:Number(t.yFilterValues[i]);if(l!=null&&!Number.isFinite(l))return;const c=t.label.enabled&&o!=null?this.getLabelText(l??o,a,t.yKey,"y",t.yDomain,t.label,{datum:a,value:l??o,xKey:t.xKey,yKey:t.yKey,xName:t.xName,yName:t.yName,legendItemName:t.legendItemName}):void 0,h=o>=0&&!Object.is(o,-0);return e.datum=a,e.xValue=r,e.yRawValue=o,e.yFilterValue=l,e.labelText=c,e.inset=l!=null&&l>o,e.isPositive=h,e.precomputedBottomY=l==null?void 0:t.yScale.convert(s),e.precomputedIsUpward=l==null?void 0:h!==t.yReversed,e}createSkeletonNodeDatum(t,e,i){const s=e.nodeDatumScratch;return{series:this,datum:s.datum,datumIndex:e.datumIndex,cumulativeValue:0,phantom:i,xValue:s.xValue??"",yValue:0,yKey:t.yKey,xKey:t.xKey,capDefaults:{lengthRatioMultiplier:0,lengthMax:0},x:0,y:0,width:0,height:0,midPoint:{x:0,y:0},opacity:e.opacity,featherRatio:e.featherRatio,topLeftCornerRadius:!1,topRightCornerRadius:!1,bottomRightCornerRadius:!1,bottomLeftCornerRadius:!1,clipBBox:void 0,crisp:t.crisp,label:void 0,missing:!1,focusable:!i}}createNodeDatum(t,e){const i=this.prepareNodeDatumState(t,e.nodeDatumScratch,e.datumIndex,e.yStart,e.yEnd);if(!i)return{nodeData:void 0,phantomNodeData:void 0};const s=this.createSkeletonNodeDatum(t,e,!1);this.updateNodeDatum(t,s,e,i);let n;return i.yFilterValue!=null&&(n=this.createSkeletonNodeDatum(t,e,!0),this.updateNodeDatum(t,n,e)),{nodeData:s,phantomNodeData:n}}updateNodeDatum(t,e,i,s){if(s??(s=this.prepareNodeDatumState(t,i.nodeDatumScratch,i.datumIndex,i.yStart,i.yEnd)),!s)return;const n=e,r=e.phantom,a=i.yStart,o=r?s.yFilterValue:s.yFilterValue??s.yRawValue,l=r?s.yFilterValue:s.yFilterValue??i.yEnd,c=r?void 0:s.labelText;let h;r||s.yFilterValue==null?h=i.yEnd:h=i.yStart+s.yFilterValue;let u;r?u=i.yRange:u=Math.max(i.yStart+(s.yFilterValue??-1/0),i.yRange);let d;r?d=void 0:s.inset?d=.6:d=void 0;const p=s.precomputedIsUpward??s.isPositive!==t.yReversed,g=t.yScale.convert(h),f=s.precomputedBottomY??t.yScale.convert(a),y=t.yScale.convert(u),m=i.width*.5*(1-(d??1)),b=t.barAlongX?Math.min(g,f):i.x+m,v=t.barAlongX?i.x+m:Math.min(g,f),x=t.barAlongX?Math.abs(f-g):i.width*(d??1),S=t.barAlongX?i.width*(d??1):Math.abs(f-g),I=t.barAlongX?Math.min(t.bboxBottom,y):i.x+m,D=t.barAlongX?i.x+m:Math.min(t.bboxBottom,y),T=t.barAlongX?Math.abs(t.bboxBottom-y):i.width*(d??1),A=t.barAlongX?i.width*(d??1):Math.abs(t.bboxBottom-y);n.datum=s.datum,n.datumIndex=i.datumIndex,n.cumulativeValue=l,n.xValue=s.xValue,n.yValue=o,n.x=I,n.y=D,n.width=T,n.height=A;const L=n.midPoint;L.x=b+x/2,L.y=v+S/2;const N=t.shouldFlipXY?S:x;n.capDefaults.lengthRatioMultiplier=N,n.capDefaults.lengthMax=N,n.opacity=i.opacity,n.featherRatio=i.featherRatio,n.topLeftCornerRadius=t.barAlongX!==p,n.topRightCornerRadius=p,n.bottomRightCornerRadius=t.barAlongX===p,n.bottomLeftCornerRadius=!p;const k=n.clipBBox;if(k?(k.x=b,k.y=v,k.width=x,k.height=S):n.clipBBox=new BBox(b,v,x,S),n.crisp=t.crisp,c==null)n.label=void 0;else{const w=adjustLabelPlacement({isUpward:p,isVertical:!t.barAlongX,placement:t.label.placement,spacing:t.labelSpacing,rect:{x:b,y:v,width:x,height:S}}),E=n.label;E?(E.text=c,E.x=w.x,E.y=w.y,E.textAlign=w.textAlign,E.textBaseline=w.textBaseline):n.label={text:c,...w}}n.missing=isTooltipValueMissing(o)}createNodeDataWithAggregation(t,e,i){const s=t.yReversed?-1:1;for(let n=0;n<2;n+=1){const r=n===0,a=r?t.dataAggregationFilter.positiveIndices:t.dataAggregationFilter.negativeIndices,o=r?t.dataAggregationFilter.positiveIndexData:t.dataAggregationFilter.negativeIndexData,l=r?import_ag_charts_core253.AGGREGATION_INDEX_Y_MIN:import_ag_charts_core253.AGGREGATION_INDEX_Y_MAX,c=r?import_ag_charts_core253.AGGREGATION_INDEX_Y_MAX:import_ag_charts_core253.AGGREGATION_INDEX_Y_MIN,h=this.visibleRangeIndices("xValue",t.xAxis.range,a),u=h[0],d=h[1];for(let p=u;p<d;p+=1){const g=p*import_ag_charts_core253.AGGREGATION_SPAN,f=o[g+import_ag_charts_core253.AGGREGATION_INDEX_X_MIN],y=o[g+import_ag_charts_core253.AGGREGATION_INDEX_X_MAX],m=o[g+l],b=o[g+c];if(f===import_ag_charts_core253.AGGREGATION_INDEX_UNSET||t.xValues[b]==null||t.xValues[m]==null)continue;const v=e(Math.trunc((f+y)/2)),x=Math.abs(e(y)-e(f))+t.barWidth;if(v-x<0||v>t.range)continue;const S=Math.abs(y-f)+1,I=BandScale.is(t.xScale)?Math.min(t.xScale.bandwidth*Math.max(S-1,1)/(t.xScale.step*S),1):1;if(i.datumIndex=b,i.x=v,i.width=x,i.opacity=I,t.isStacked)i.yStart=Number(t.yStartValues[m]),i.yEnd=Number(t.yEndValues[b]),i.featherRatio=0;else{const D=Number(t.yRawValues[b]),T=Number(t.yRawValues[m]);i.yStart=0,i.yEnd=D,i.featherRatio=(r?1:-1)*s*(1-T/D)}i.yRange=i.yEnd,this.upsertNodeDatum(t,i)}}}createNodeDataGrouped(t,e,i){const s=this.processedData,n=s.invalidData?.get(this.id),r=t.barWidth,a=t.isStacked?this.dataModel.resolveProcessedDataIndexById(this,"yValue-range"):-1,o=s.columnScopes.findIndex(d=>d.has(this.id)),l=s.groups,c=visibleRangeIndices(1,l.length,t.xAxis.range,d=>{const g=l[d].keys[0];return this.xCoordinateRange(g)}),h=c[0],u=c[1];for(let d=h;d<u;d+=1){const p=l[d],g=p.aggregation,f=p.datumIndices[o];if(f!=null)for(const y of f){const m=d+y,b=e(m);if(n?.[m]===!0)continue;const v=t.yRawValues[m];if(v==null)continue;const x=v>=0&&!Object.is(v,-0),S=t.isStacked?Number(t.yStartValues?.[m]):0,I=t.isStacked?Number(t.yEndValues?.[m]):v;let D=I;t.isStacked&&(D=g[a][x?1:0]),i.datumIndex=m,i.x=b,i.width=r,i.yStart=S,i.yEnd=I,i.yRange=D,i.featherRatio=0,i.opacity=1,this.upsertNodeDatum(t,i)}}}createNodeDataSimple(t,e,i){const s=this.processedData.invalidData?.get(this.id),n=t.barWidth,r=this.visibleRangeIndices("xValue",t.xAxis.range);let a=r[0],o=r[1];this.processedData.input.count<1e3&&(a=0,o=this.processedData.input.count);for(let l=a;l<o;l+=1){if(s?.[l]===!0)continue;const c=t.yRawValues[l];if(c==null)continue;const h=e(l),u=Number(c);i.datumIndex=l,i.x=h,i.width=n,i.yStart=0,i.yEnd=u,i.yRange=u,i.featherRatio=0,i.opacity=1,this.upsertNodeDatum(t,i)}}upsertNodeDatum(t,e){const i=t.canIncrementallyUpdate&&t.nodeIndex<t.nodes.length,s=t.yFilterValues!=null,n=s&&t.canIncrementallyUpdate&&t.phantomIndex<t.phantomNodes.length;let r,a;if(i)r=t.nodes[t.nodeIndex],this.updateNodeDatum(t,r,e),t.nodeIndex>=t.labels.length&&t.labels.push(r);else{const o=this.createNodeDatum(t,e);o.nodeData&&(t.nodes.push(o.nodeData),t.labels.push(o.nodeData)),a=o.phantomNodeData}if(t.nodeIndex++,!s)return{nodeData:t.nodes[t.nodeIndex]};if(n)a=t.phantomNodes[t.phantomIndex],this.updateNodeDatum(t,a,e);else if(a)t.phantomNodes.push(a);else{const o=this.createNodeDatum(t,e);o.phantomNodeData&&t.phantomNodes.push(o.phantomNodeData)}return t.phantomIndex++,{nodeData:r,phantomNodeData:a}}populateNodeData(t){const e=s=>this.computeXPosition(t,s),i={nodeDatumScratch:{datum:void 0,xValue:void 0,yRawValue:0,yFilterValue:void 0,labelText:void 0,inset:!1,isPositive:!1,precomputedBottomY:void 0,precomputedIsUpward:void 0},datumIndex:0,x:0,width:0,yStart:0,yEnd:0,yRange:0,featherRatio:0,opacity:1};t.dataAggregationFilter!=null?this.createNodeDataWithAggregation(t,e,i):this.processedData.type==="grouped"?this.createNodeDataGrouped(t,e,i):this.createNodeDataSimple(t,e,i)}initializeResult(t){return{itemId:this.properties.yKey,nodeData:t.nodes,phantomNodeData:t.phantomNodes,labelData:t.labels,scales:this.calculateScaling(),visible:this.visible||t.animationEnabled,groupScale:this.getScaling(this.ctx.seriesStateManager.getGroupScale(this)),styles:getItemStyles(this.getItemStyle.bind(this)),segments:void 0}}finalizeNodeData(t){t.canIncrementallyUpdate&&(this.trimIncrementalNodeArray(t.nodes,t.nodeIndex),this.trimIncrementalNodeArray(t.phantomNodes,t.phantomIndex),this.trimIncrementalNodeArray(t.labels,t.nodes.length))}assembleResult(t,e){return e.segments=calculateSegments(this.properties.segmentation,t.xAxis,t.yAxis,this.chart.seriesRect,this.ctx.scene),e}nodeFactory(){return new BarShape}updateSeriesSelections(){super.updateSeriesSelections(),this.phantomSelection=this.updateDatumSelection({nodeData:this.contextNodeData?.phantomNodeData??[],datumSelection:this.phantomSelection})}updateHighlightSelectionItem(t){const e=super.updateHighlightSelectionItem(t),i=this.ctx.highlightManager?.getActiveHighlight(),n=this.isSeriesHighlighted(i)&&i?.datum?i:void 0;return this.phantomHighlightSelection=this.updateDatumSelection({nodeData:n?this.getHighlightData(this.contextNodeData?.phantomNodeData??[],n)??[]:[],datumSelection:this.phantomHighlightSelection}),e}updateNodes(t,e){super.updateNodes(t,e),this.updateDatumNodes({datumSelection:this.phantomSelection,isHighlight:!1,drawingMode:"overlay"}),this.updateDatumNodes({datumSelection:this.phantomHighlightSelection,isHighlight:!0,drawingMode:"overlay"})}getHighlightData(t,e){const i=t.find(s=>s.datum===e.datum);return i==null?void 0:[{...i}]}updateDatumSelection(t){return processedDataIsAnimatable(this.processedData)?t.datumSelection.update(t.nodeData,void 0,this.getDatumId.bind(this)):t.datumSelection.update(t.nodeData)}makeStylerParams(t){const{id:e}=this,{cornerRadius:i,fill:s,fillOpacity:n,lineDash:r,lineDashOffset:a,stackGroup:o,stroke:l,strokeOpacity:c,strokeWidth:h,xKey:u,yKey:d}=this.properties,p=toHighlightString(t??0);return{cornerRadius:i,fill:s,fillOpacity:n,highlightState:p,lineDash:r,lineDashOffset:a,seriesId:e,stackGroup:o,stroke:l,strokeOpacity:c,strokeWidth:h,xKey:u,yKey:d}}makeItemStylerParams(t,e,i,s,n,r){const{id:a}=this,{xKey:o,yKey:l,stackGroup:c}=this.properties,h=e.dataSources.get(a)?.data?.[i],u=t.resolveColumnById(this,"yValue-raw",e)[i],d=t.getDomain(this,"xValue","key",e).domain,p=t.getDomain(this,this.yCumulativeKey(t),"value",e).domain,g=this.ctx.highlightManager?.getActiveHighlight(),f=this.getHighlightStateString(g,n,i),y=this.filterItemStylerFillParams(r.fill)??r.fill;return{seriesId:a,...datumStylerProperties(s,u,o,l,d,p),datum:h,xValue:s,yValue:u,stackGroup:c,highlightState:f,...r,fill:y}}getStyle(t,e){const{cornerRadius:i,fill:s,fillOpacity:n,lineDash:r,lineDashOffset:a,stroke:o,strokeOpacity:l,strokeWidth:c,styler:h}=this.properties;let u={};if(!t&&h){const d=this.makeStylerParams(e);u=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.cachedCallWithContext(h,d)??{},{pick:!1})??{}}return{cornerRadius:u.cornerRadius??i,fill:u.fill??s,fillOpacity:u.fillOpacity??n,lineDash:u.lineDash??r,lineDashOffset:u.lineDashOffset??a,opacity:1,stroke:u.stroke??o,strokeOpacity:u.strokeOpacity??l,strokeWidth:u.strokeWidth??c}}getItemStyle(t,e,i){const{properties:s,dataModel:n,processedData:r}=this,{itemStyler:a,simpleItemStyler:o}=s,l=this.getHighlightStyle(e,t,i);if(o&&r!=null&&t!=null){const h=r.dataSources.get(this.id)?.data?.[t],u=o(h);return(0,import_ag_charts_core253.mergeDefaults)(u,l,this.getStyle(!1,i))}let c=(0,import_ag_charts_core253.mergeDefaults)(l,this.getStyle(t===void 0,i));if(a&&n!=null&&r!=null&&t!=null){const h=n.resolveKeysById(this,"xValue",r)[t],u=this.cachedDatumCallback(createDatumId(this.getDatumId({xValue:h,phantom:!1}),e?"highlight":"node"),()=>{const d=this.makeItemStylerParams(n,r,t,h,e,c);return this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.callWithContext(a,d))});u&&(c=(0,import_ag_charts_core253.mergeDefaults)(u,c))}return c}updateDatumStyles(t){const e=this.ctx.highlightManager.getActiveHighlight(),i=this;function s(n,r){if(!t.datumSelection.isGarbage(n)){const a=i.getHighlightState(e,t.isHighlight,r.datumIndex);r.style=i.getItemStyle(r.datumIndex,t.isHighlight,a)}}t.datumSelection.each(s)}updateDatumNodes(t){const{contextNodeData:e}=this;if(!e)return;const i=this.ctx.highlightManager.getActiveHighlight(),{shadow:s}=this.properties,n=this.getCategoryDirection()===import_ag_charts_core253.ChartAxisDirection.X,r=this.getShapeFillBBox(),a=this.getBarDirection(),{drawingMode:o,isHighlight:l}=t,c=this,h=e.styles;function u(d,p){const g=p.style??h[c.getHighlightState(i,l,p.datumIndex)];d.setStyleProperties(g,r);const f=g.cornerRadius??0,y=n?(p.clipBBox?.width??p.width)>0:(p.clipBBox?.height??p.height)>0;d.setStaticProperties(o,p.topLeftCornerRadius?f:0,p.topRightCornerRadius?f:0,p.bottomRightCornerRadius?f:0,p.bottomLeftCornerRadius?f:0,y,p.crisp,s,a,p.featherRatio)}t.datumSelection.each(u)}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e,i=>{i.pointerEvents=1})}updateLabelNodes(t){const{isHighlight:e=!1}=t,i={xKey:this.properties.xKey,xName:this.properties.xName??this.properties.xKey,yKey:this.properties.yKey,yName:this.properties.yName??this.properties.yKey,legendItemName:this.properties.legendItemName??this.properties.xName??this.properties.xKey},s=this.ctx.highlightManager?.getActiveHighlight();t.labelSelection.each((n,r)=>{n.fillOpacity=this.getHighlightStyle(e,r?.datumIndex).opacity??1,updateLabelNode(this,n,i,this.properties.label,r.label,e,s)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:n}=this,{xKey:r,xName:a,yKey:o,yName:l,legendItemName:c,stackGroup:h,tooltip:u}=n,d=n.allowNullKeys??!1,p=this.getCategoryAxis(),g=this.getValueAxis();if(!i||!s||!p||!g)return;const f=s.dataSources.get(this.id)?.data?.[t],y=i.resolveKeysById(this,"xValue",s)[t],m=i.resolveColumnById(this,"yValue-raw",s)[t];if(y===void 0&&!d)return;const b=this.getItemStyle(t,!1);return this.formatTooltipWithContext(u,{heading:this.getAxisValueText(p,"tooltip",y,f,r,c,d),symbol:this.legendItemSymbol(),data:[{label:l,fallbackLabel:o,value:this.getAxisValueText(g,"tooltip",m,f,o,c),missing:isTooltipValueMissing(m)}]},{seriesId:e,datum:f,title:l,xKey:r,xName:a,yKey:o,yName:l,legendItemName:c,stackGroup:h,...b,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,fillOpacity:s,strokeOpacity:n,lineDash:r,lineDashOffset:a}=this.getStyle(!1,0);return{marker:{fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:s,strokeOpacity:n,strokeWidth:i,lineDash:r,lineDashOffset:a}}}getLegendData(t){const{showInLegend:e}=this.properties;if(t!=="category")return[];const{id:i,ctx:{legendManager:s},visible:n}=this,{yKey:r,yName:a,legendItemName:o}=this.properties;return[{legendType:"category",id:i,itemId:r,seriesId:i,enabled:n&&s.getItemEnabled({seriesId:i,itemId:r}),label:{text:o??a??r},symbol:this.legendItemSymbol(),legendItemName:o,hideInLegend:!e}]}resetDatumAnimation(t){resetBarSelectionsDirect([t.datumSelection,this.phantomSelection])}animateReadyHighlight(t){resetBarSelectionsDirect([t,this.phantomHighlightSelection])}animateEmptyUpdateReady({datumSelection:t,labelSelection:e,annotationSelections:i}){const{phantomSelection:s}=this,n=prepareBarAnimationFunctions(collapsedStartingBarPosition(this.isVertical(),this.axes,"normal"),"unknown");fromToMotion(this.id,"nodes",this.ctx.animationManager,[t,s],n),seriesLabelFadeInAnimation(this,"labels",this.ctx.animationManager,e),seriesLabelFadeInAnimation(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(t){const{phantomSelection:e}=this,{datumSelection:i,labelSelection:s,annotationSelections:n,contextData:r,previousContextData:a}=t;this.ctx.animationManager.stopByAnimationGroupId(this.id);const o=calculateDataDiff(this.id,i,this.getDatumId.bind(this),t.contextData,a,this.processedData,this.processedDataUpdated),l=a==null?"fade":"normal",c=prepareBarAnimationFunctions(collapsedStartingBarPosition(this.isVertical(),this.axes,l),"added");fromToMotion(this.id,"nodes",this.ctx.animationManager,[i,e],c,(h,u)=>this.getDatumId(u),o),(!o||o?.changed||!(0,import_ag_charts_core253.areScalingEqual)(r.groupScale,a?.groupScale))&&(seriesLabelFadeInAnimation(this,"labels",this.ctx.animationManager,s),seriesLabelFadeInAnimation(this,"annotations",this.ctx.animationManager,...n))}getDatumId(t){return createDatumId(t.xValue,t.phantom)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){const e=this.contextNodeData?.nodeData[t].clipBBox;return computeBarFocusBounds(this,e)}hasItemStylers(){return this.properties.styler!=null||this.properties.itemStyler!=null||this.properties.simpleItemStyler!=null||this.properties.label.itemStyler!=null}};BarSeries.className="BarSeries",BarSeries.type="bar";var themeTemplate2={series:{direction:"vertical",fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core254.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core254.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core254.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},fillOpacity:1,strokeWidth:{$isUserOption:["./stroke",2,0]},lineDash:[0],lineDashOffset:0,label:{...import_ag_charts_core254.LABEL_BOXING_DEFAULTS,padding:{$isUserOption:["./spacing",0,8]},enabled:!1,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$if:[{$or:[{$eq:[{$path:"./placement"},"outside-start"]},{$eq:[{$path:"./placement"},"outside-end"]}]},{$ref:"textColor"},{$ref:"chartBackgroundColor"}]},placement:"inside-center"},shadow:{enabled:!1,color:import_ag_charts_core254.DEFAULT_SHADOW_COLOUR,xOffset:3,yOffset:3,blur:5},highlight:import_ag_charts_core254.MULTI_SERIES_HIGHLIGHT_STYLE,segmentation:import_ag_charts_core254.SEGMENTATION_DEFAULTS}},BarSeriesModule={type:"series",name:"bar",chartType:"cartesian",stackable:!0,groupable:!0,version:VERSION,dependencies:[CartesianChartModule],options:barSeriesOptionsDef,predictAxis:predictCartesianNonPrimitiveAxis,defaultAxes:import_ag_charts_core254.DIRECTION_SWAP_AXES,axisKeys:{[import_ag_charts_core254.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core254.ChartAxisDirection.Y]:"yKeyAxis"},axisKeysFlipped:{[import_ag_charts_core254.ChartAxisDirection.X]:"yKeyAxis",[import_ag_charts_core254.ChartAxisDirection.Y]:"xKeyAxis"},themeTemplate:themeTemplate2,create:t=>new BarSeries(t)},import_ag_charts_core258=require("ag-charts-core"),import_ag_charts_core257=require("ag-charts-core"),import_ag_charts_core255=require("ag-charts-core"),SIZE_QUANTIZATION=3,FILTER_DATUM_THRESHOLD=5,FILTER_RANGE_THRESHOLD=.05;function getPrimaryDatumIndex(t,e,i){const{xValues:s,yValues:n,xDomain:r,yDomain:a,xNeedsValueOf:o,yNeedsValueOf:l}=t,{x0:c,y0:h,x1:u,y1:d}=i;let p=0,g=1/0;const f=(c+u)/2,y=(h+d)/2;for(const m of e){const b=s[m],v=n[m];if(b==null||v==null)continue;const x=(0,import_ag_charts_core255.aggregationXRatioForXValue)(b,r.min,r.max,o),S=(0,import_ag_charts_core255.aggregationXRatioForXValue)(v,a.min,a.max,l),I=(x-f)**2+(S-y)**2;I<g&&(g=I,p=m)}return p}function countVisibleItems(t,e,i){const{xValues:s,yValues:n,xDomain:r,yDomain:a,xNeedsValueOf:o,yNeedsValueOf:l}=t,{x0:c,y0:h,x1:u,y1:d}=i;let p=0;for(const g of e){const f=s[g],y=n[g];if(f==null||y==null)continue;const m=(0,import_ag_charts_core255.aggregationXRatioForXValue)(f,r.min,r.max,o),b=(0,import_ag_charts_core255.aggregationXRatioForXValue)(y,a.min,a.max,l);m>=c&&m<=u&&b>=h&&b<=d&&(p+=1)}return p}function quadChildren(t,e,i){const{xValues:s,yValues:n,xDomain:r,yDomain:a,xNeedsValueOf:o,yNeedsValueOf:l}=t,{x0:c,y0:h,x1:u,y1:d}=i,p=[{x0:1,y0:1,x1:0,y1:0,indices:[]},{x0:1,y0:1,x1:0,y1:0,indices:[]},{x0:1,y0:1,x1:0,y1:0,indices:[]},{x0:1,y0:1,x1:0,y1:0,indices:[]}],g=(c+u)/2,f=(h+d)/2;for(const m of e){const b=s[m],v=n[m];if(b==null||v==null)continue;const x=(0,import_ag_charts_core255.aggregationXRatioForXValue)(b,r.min,r.max,o),S=(0,import_ag_charts_core255.aggregationXRatioForXValue)(v,a.min,a.max,l),I=(x>g?1:0)+(S>f?2:0),D=p[I];D.indices.push(m),D.x0=Math.min(D.x0,x),D.y0=Math.min(D.y0,S),D.x1=Math.max(D.x1,x),D.y1=Math.max(D.y1,S)}const y=[];for(const m of p){const{indices:b,x0:v,x1:x,y0:S,y1:I}=m;if(b.length===0)continue;const D=aggregateQuad(t,b,{x0:v,y0:S,x1:x,y1:I});y.push(D)}return y}function aggregateQuad(t,e,i){const{x0:s,y0:n,x1:r,y1:a}=i;let l=e.length<FILTER_DATUM_THRESHOLD&&r-s<FILTER_RANGE_THRESHOLD&&a-n<FILTER_RANGE_THRESHOLD||s===r&&n===a?null:quadChildren(t,e,i);if(l?.length===1)return l[0];l?.length===0&&(l=null);const c=Math.hypot(r-s,a-n),h=getPrimaryDatumIndex(t,e,i);return{scale:c,x0:s,y0:n,x1:r,y1:a,indices:e,primaryDatumIndex:h,children:l}}function computeBubbleAggregation(t,e,i,s,n,r,a){const[o,l]=t,[c,h]=e,[u,d]=r,{xNeedsValueOf:p,yNeedsValueOf:g}=a,f={xValues:i,yValues:s,xDomain:{min:o,max:l},yDomain:{min:c,max:h},xNeedsValueOf:p,yNeedsValueOf:g},y=[];if(n!=null&&d>u){const m=Array.from({length:SIZE_QUANTIZATION},()=>[]);for(let b=0;b<n.length;b+=1){const x=(n[b]-u)/(d-u),S=Math.trunc(x*SIZE_QUANTIZATION);S>=0&&S<SIZE_QUANTIZATION&&m[S].push(b)}for(let b=0;b<m.length;b+=1){const v=m[b],x=aggregateQuad(f,v,{x0:0,y0:0,x1:1,y1:1});if(x!=null){const S=b/SIZE_QUANTIZATION;y.push({sizeRatio:S,node:x})}}}else{const m=i.map((v,x)=>x),b=aggregateQuad(f,m,{x0:0,y0:0,x1:1,y1:1});b!=null&&y.push({sizeRatio:0,node:b})}return y.length>0?{xValues:i,yValues:s,xd0:o,xd1:l,yd0:c,yd1:h,filters:y,xNeedsValueOf:p,yNeedsValueOf:g}:void 0}function aggregateBubbleData(t,e,i,s,n,r,a,o,l,c){const[h,u]=(0,import_ag_charts_core255.aggregationDomain)(t,r),[d,p]=(0,import_ag_charts_core255.aggregationDomain)(e,a);return computeBubbleAggregation([h,u],[d,p],i,s,n,[o[0],o[1]],{xNeedsValueOf:l,yNeedsValueOf:c})}function aggregateBubbleDataFromDataModel(t,e,i,s,n,r,a){const o=i.resolveColumnById(a,"xValue",s),l=i.resolveColumnById(a,"yValue",s),c=r?i.resolveColumnById(a,"sizeValue",s):void 0,h=i.getDomain(a,"xValue","value",s),u=i.getDomain(a,"yValue","value",s),d=r?n.domain:[0,0],p=i.resolveColumnNeedsValueOf(a,"xValue",s),g=i.resolveColumnNeedsValueOf(a,"yValue",s);return aggregateBubbleData(t,e,o,l,c,h,u,d,p,g)}function computeBubbleAggregationCountIndices(t,e,i,s,n,r){const{xRange:a,yRange:o,xVisibleRange:[l,c],yVisibleRange:[h,u],minSize:d,maxSize:p}=i,{xValues:g,yValues:f,xd0:y,xd1:m,yd0:b,yd1:v,xNeedsValueOf:x,yNeedsValueOf:S}=e,I=1/Math.min(a/(c-l),o/(u-h)),D={xValues:g,yValues:f,xDomain:{min:y,max:m},yDomain:{min:b,max:v},xNeedsValueOf:x,yNeedsValueOf:S};for(const{sizeRatio:T,node:A}of e.filters){const L=.5*(d+T*(p-d)),N=L*I,k=t*N,w=l-L/a,E=c+L/a,O=h-L/o,R=u+L/o,_=[A];for(;_.length>0;){const P=_.pop();if(!(P.x1<w||P.x0>E||P.y1<O||P.y0>R))if(t!==1&&P.scale<=k)s!=null&&(s.count+=1),n?.push({datumIndex:P.primaryDatumIndex,count:P.indices.length,area:(P.x1-P.x0)*(P.y1-P.y0),dilation:(0,import_ag_charts_core255.clamp)(1,P.scale/N,t)});else if(P.children==null){const{indices:F}=P;if(s!=null){const B=P.x0>=l&&P.x1<=c&&P.y0>=h&&P.y1<=u?F.length:countVisibleItems(D,F,{x0:l,y0:h,x1:c,y1:u});s.count+=B}r?.push(...F)}else _.push(...P.children)}}}function computeBubbleAggregationCount(t,e,i){const s={count:0};return computeBubbleAggregationCountIndices(t,e,i,s,void 0,void 0),s.count}var MAX_AGGREGATION_DILATION=100,DILATION_ITERATIONS=12;function computeBubbleAggregationDilation(t,e,i){if(computeBubbleAggregationCount(1,t,e)<=i)return 1;let s=1,n=2;for(;computeBubbleAggregationCount(n,t,e)>i&&n<MAX_AGGREGATION_DILATION;)s*=2,n*=2;for(let r=0;r<DILATION_ITERATIONS;r+=1){const a=(n+s)/2;computeBubbleAggregationCount(a,t,e)>i?s=a:n=a}return(s+n)/2}function computeBubbleAggregationData(t,e,i){const s=[],n=[];return computeBubbleAggregationCountIndices(t,e,i,void 0,s,n),{groupedAggregation:s,singleDatumIndices:n}}var import_ag_charts_core256=require("ag-charts-core"),BubbleSeriesMarker=class extends SeriesMarker{constructor(){super(...arguments),this.maxSize=30}};__decorateClass([import_ag_charts_core256.Property,(0,import_ag_charts_core256.SceneChangeDetection)()],BubbleSeriesMarker.prototype,"maxSize",2),__decorateClass([import_ag_charts_core256.Property,(0,import_ag_charts_core256.SceneArrayChangeDetection)()],BubbleSeriesMarker.prototype,"domain",2);var BubbleSeriesLabel=class extends Label{constructor(){super(...arguments),this.placement="top"}};__decorateClass([import_ag_charts_core256.Property],BubbleSeriesLabel.prototype,"placement",2);var BubbleSeriesProperties=class extends CartesianSeriesProperties{constructor(){super(...arguments),this.label=new BubbleSeriesLabel,this.tooltip=makeSeriesTooltip(),this.maxRenderedItems=1/0,this.marker=new BubbleSeriesMarker}};__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"yKey",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"sizeKey",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"xFilterKey",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"yFilterKey",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"sizeFilterKey",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"sizeName",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"labelName",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"title",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.shape")],BubbleSeriesProperties.prototype,"shape",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.size")],BubbleSeriesProperties.prototype,"size",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.maxSize")],BubbleSeriesProperties.prototype,"maxSize",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.domain")],BubbleSeriesProperties.prototype,"domain",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.fill")],BubbleSeriesProperties.prototype,"fill",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.fillOpacity")],BubbleSeriesProperties.prototype,"fillOpacity",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.stroke")],BubbleSeriesProperties.prototype,"stroke",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.strokeWidth")],BubbleSeriesProperties.prototype,"strokeWidth",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.strokeOpacity")],BubbleSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.lineDash")],BubbleSeriesProperties.prototype,"lineDash",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.lineDashOffset")],BubbleSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([(0,import_ag_charts_core256.ProxyProperty)("marker.itemStyler")],BubbleSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core256.Property],BubbleSeriesProperties.prototype,"maxRenderedItems",2);var BubbleScatterSeriesNodeEvent=class extends CartesianSeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.sizeKey=s.properties.sizeKey}},BubbleSeries=class extends CartesianSeries{constructor(t){super({moduleCtx:t,propertyKeys:{...DEFAULT_CARTESIAN_DIRECTION_KEYS,label:["labelKey"],size:["sizeKey"]},propertyNames:{...DEFAULT_CARTESIAN_DIRECTION_NAMES,label:["labelName"],size:["sizeName"]},categoryKey:void 0,pickModes:[2,1,0],pathsPerSeries:[],datumSelectionGarbageCollection:!1,animationResetFns:{label:resetLabelFn,datum:resetMarkerFn},usesPlacedLabels:!0,clipFocusBox:!1}),this.NodeEvent=BubbleScatterSeriesNodeEvent,this.properties=new BubbleSeriesProperties,this.dataAggregation=void 0,this.sizeScale=new LinearScale,this.placedLabelData=[]}get pickModeAxis(){return"main-category"}get type(){return super.type}async processData(t){if(this.data==null||!this.visible)return;const e=this.axes[import_ag_charts_core257.ChartAxisDirection.X]?.scale,i=this.axes[import_ag_charts_core257.ChartAxisDirection.Y]?.scale,{xScaleType:s,yScaleType:n}=this.getScaleInformation({xScale:e,yScale:i}),r=this.sizeScale.type,{xKey:a,yKey:o,sizeKey:l,xFilterKey:c,yFilterKey:h,sizeFilterKey:u,labelKey:d,marker:p}=this.properties,g=this.properties.allowNullKeys??!1,{dataModel:f,processedData:y}=await this.requestDataModel(t,this.data,{props:[valueProperty(a,s,{id:"xValue",allowNullKey:g}),valueProperty(o,n,{id:"yValue",allowNullKey:g}),...c==null?[]:[valueProperty(c,s,{id:"xFilterValue"})],...h==null?[]:[valueProperty(h,n,{id:"yFilterValue"})],...u==null?[]:[valueProperty(u,r,{id:"sizeFilterValue"})],...l?[valueProperty(l,r,{id:"sizeValue"})]:[],...d?[valueProperty(d,"category",{id:"labelValue"})]:[]]}),m=l?f.resolveProcessedDataIndexById(this,"sizeValue"):void 0,b=p.domain?[p.domain[0],p.domain[1]]:void 0;this.sizeScale.domain=b??(m==null?void 0:y.domain.values[m])??[],this.dataAggregation=this.aggregateData(f,y),this.animationState.transition("updateData")}xCoordinateRange(t,e,i){const{properties:s,sizeScale:n}=this,{size:r,sizeKey:a}=s,o=this.axes[import_ag_charts_core257.ChartAxisDirection.X].scale.convert(t),l=a==null?void 0:this.dataModel.resolveColumnById(this,"sizeValue",this.processedData),h=.5*(l==null?r:n.convert(l[i]))*e;return[o-h,o+h]}yCoordinateRange(t,e,i){const{properties:s,sizeScale:n}=this,{size:r,sizeKey:a}=s,o=this.axes[import_ag_charts_core257.ChartAxisDirection.Y].scale.convert(t[0]),l=a==null?void 0:this.dataModel.resolveColumnById(this,"sizeValue",this.processedData),h=.5*(l==null?r:n.convert(l[i]))*e;return[o-h,o+h]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return{domain:[]};const s={[import_ag_charts_core257.ChartAxisDirection.X]:"xValue",[import_ag_charts_core257.ChartAxisDirection.Y]:"yValue"},n=s[t],r=e.resolveProcessedDataDefById(this,n),a=e.getDomain(this,n,"value",i);if(r?.def.type==="value"&&r?.def.valueType==="category")return{domain:a.domain};const o=t===import_ag_charts_core257.ChartAxisDirection.X?import_ag_charts_core257.ChartAxisDirection.Y:import_ag_charts_core257.ChartAxisDirection.X,l=s[o],c=this.domainForClippedRange(t,[n],l);return{domain:fixNumericExtent((0,import_ag_charts_core257.extent)(c))}}getSeriesRange(t,e){return this.domainForVisibleRange(import_ag_charts_core257.ChartAxisDirection.Y,["yValue"],"xValue",e)}getVisibleItems(t,e,i){const{dataAggregation:s,axes:n}=this,r=n[import_ag_charts_core257.ChartAxisDirection.X],a=n[import_ag_charts_core257.ChartAxisDirection.Y];if(s==null||r==null||a==null)return this.countVisibleItems("xValue",["yValue"],t,e,i);const o=this.aggregationOptions(r,a,t,e??[0,1]);return computeBubbleAggregationCount(0,s,o)}aggregateData(t,e){if(e.type==="grouped"||e.input.count<=this.properties.maxRenderedItems)return;const i=this.axes[import_ag_charts_core257.ChartAxisDirection.X],s=this.axes[import_ag_charts_core257.ChartAxisDirection.Y];if(i==null||s==null)return;const n=i.scale,r=s.scale;if(!(!ContinuousScale.is(n)||!ContinuousScale.is(r)))return aggregateBubbleDataFromDataModel(n.type,r.type,t,e,this.sizeScale,this.properties.sizeKey!=null,this)}aggregationOptions(t,e,i=t.visibleRange,s=e.visibleRange){const{processedData:n,dataModel:r}=this,{sizeKey:a}=this.properties,[o,l]=this.getSizeRange(),c=Math.abs(t.range[1]-t.range[0]),h=Math.abs(e.range[1]-e.range[0]),u=Math.max(o,1),d=a?Math.max(l,1):u,p=t.scale,g=e.scale;return n!=null&&r!=null&&(ContinuousScale.is(p)&&(i=(0,import_ag_charts_core257.rescaleVisibleRange)(i,p.domain.map(import_ag_charts_core257.dateToNumber),r.getDomain(this,"xValue","value",n).domain.map(import_ag_charts_core257.dateToNumber))),ContinuousScale.is(g)&&(s=(0,import_ag_charts_core257.rescaleVisibleRange)(s,g.domain.map(import_ag_charts_core257.dateToNumber),r.getDomain(this,"yValue","value",n).domain.map(import_ag_charts_core257.dateToNumber)))),{xRange:c,yRange:h,minSize:u,maxSize:d,xVisibleRange:i,yVisibleRange:s}}createNodeDatumContext(t,e){const{dataModel:i,processedData:s,sizeScale:n,visible:r}=this;if(!i||!s)return;const a=s.dataSources.get(this.id)?.data;if(a==null)return;const{xKey:o,yKey:l,sizeKey:c,xFilterKey:h,yFilterKey:u,sizeFilterKey:d,labelKey:p,xName:g,yName:f,sizeName:y,labelName:m,label:b,legendItemName:v,marker:x}=this.properties,S=t.scale,I=e.scale,D=s.changeDescription!=null&&this.contextNodeData?.nodeData!=null;let T;p?T=[]:c?T=i.getDomain(this,"sizeValue","value",s).domain:T=[];const A=i.resolveColumnById(this,"xValue",s);return{xAxis:t,yAxis:e,rawData:a,xValues:A,xDataValues:A,yDataValues:i.resolveColumnById(this,"yValue",s),sizeDataValues:c==null?void 0:i.resolveColumnById(this,"sizeValue",s),labelDataValues:p==null?void 0:i.resolveColumnById(this,"labelValue",s),xFilterDataValues:h==null?void 0:i.resolveColumnById(this,"xFilterValue",s),yFilterDataValues:u==null?void 0:i.resolveColumnById(this,"yFilterValue",s),sizeFilterDataValues:d==null?void 0:i.resolveColumnById(this,"sizeFilterValue",s),xScale:S,yScale:I,sizeScale:n,xOffset:(S.bandwidth??0)/2,yOffset:(I.bandwidth??0)/2,xKey:o,yKey:l,sizeKey:c,labelKey:p,xName:g,yName:f,sizeName:y,labelName:m,legendItemName:v,labelsEnabled:b.enabled,labelPlacement:b.placement,labelAnchor:Marker.anchor(x.shape),labelTextDomain:T,labelPadding:expandLabelPadding(b),labelTextMeasurer:(0,import_ag_charts_core257.cachedTextMeasurer)(b),label:b,animationEnabled:!this.ctx.animationManager.isSkipped(),visible:r,canIncrementallyUpdate:D,nodes:D?this.contextNodeData.nodeData:[],nodeIndex:0}}populateNodeData(t){this.sizeScale.range=this.getSizeRange();const e={datum:void 0,xDatum:void 0,yDatum:void 0,sizeValue:void 0,x:0,y:0,selected:void 0,nodeLabel:{text:"",width:0,height:0},markerSize:0,count:1,dilation:1,area:0},{dataAggregation:i}=this;i==null?this.createNodeDataSimple(t,e):this.createNodeDataWithAggregation(t,e,t.xAxis,t.yAxis,i)}initializeResult(t){const{marker:e}=this.properties;return{itemId:t.yKey,nodeData:t.nodes,labelData:t.labelsEnabled?t.nodes:[],scales:this.calculateScaling(),visible:this.visible||t.animationEnabled,styles:getMarkerStyles(this,this.properties,e)}}upsertBubbleNodeDatum(t,e,i){this.prepareNodeDatumState(t,e,i)&&upsertNodeDatum(t,{scratch:e,datumIndex:i},(s,n)=>{const r=this.createSkeletonNodeDatum(s,n.scratch,n.datumIndex);return this.updateNodeDatum(s,r,n.scratch,n.datumIndex),r},(s,n,r)=>this.updateNodeDatum(s,n,r.scratch,r.datumIndex))}createNodeDataSimple(t,e){const i=t.rawData.length;for(let s=0;s<i;s++)e.count=1,e.dilation=1,e.area=0,this.upsertBubbleNodeDatum(t,e,s)}createNodeDataWithAggregation(t,e,i,s,n){const{maxRenderedItems:r}=this.properties,a=this.aggregationOptions(i,s),o=computeBubbleAggregationDilation(n,a,r),{groupedAggregation:l,singleDatumIndices:c}=computeBubbleAggregationData(o,n,a);for(const{datumIndex:h,count:u,dilation:d,area:p}of l)e.count=u,e.dilation=d,e.area=p,this.upsertBubbleNodeDatum(t,e,h);for(const h of c)e.count=1,e.dilation=1,e.area=0,this.upsertBubbleNodeDatum(t,e,h)}prepareNodeDatumState(t,e,i){const s=t.rawData[i],n=t.xDataValues[i],r=t.yDataValues[i],a=this.properties.allowNullKeys??!1;if((n===void 0||r===void 0)&&!a)return;const o=t.sizeDataValues?.[i],l=t.xScale.convert(n)+t.xOffset,c=t.yScale.convert(r)+t.yOffset;if(!Number.isFinite(l)||!Number.isFinite(c))return;let h;t.xFilterDataValues!=null&&t.yFilterDataValues!=null&&(h=t.xFilterDataValues[i]===n&&t.yFilterDataValues[i]===r,t.sizeFilterDataValues!=null&&h&&(h=t.sizeFilterDataValues[i]===o));let u;t.labelsEnabled?u=this.computeLabel(t,s,r,o,i):u={text:"",width:0,height:0};const d=o==null?t.sizeScale.range[0]:t.sizeScale.convert(o);return e.datum=s,e.xDatum=n,e.yDatum=r,e.sizeValue=o,e.x=l,e.y=c,e.selected=h,e.nodeLabel=u,e.markerSize=d,e}computeLabel(t,e,i,s,n){let r,a,o;t.labelKey&&t.labelDataValues?(r=t.labelDataValues[n],a=t.labelKey,o="label"):t.sizeKey?(r=s,a=t.sizeKey,o="size"):(r=i,a=t.yKey,o="y");const l=this.getLabelText(r,e,a,o,t.labelTextDomain,t.label,{value:r,datum:e,xKey:t.xKey,yKey:t.yKey,sizeKey:t.sizeKey,labelKey:t.labelKey,xName:t.xName,yName:t.yName,sizeName:t.sizeName,labelName:t.labelName,legendItemName:t.legendItemName});let{width:c,height:h}=(0,import_ag_charts_core257.isArray)(l)?(0,import_ag_charts_core257.measureTextSegments)(l,t.label):t.labelTextMeasurer.measureLines(String(l));return c+=t.labelPadding.left+t.labelPadding.right,h+=t.labelPadding.bottom+t.labelPadding.top,{text:l,width:c,height:h}}createSkeletonNodeDatum(t,e,i){return{series:this,yKey:t.yKey,xKey:t.xKey,datum:void 0,datumIndex:0,xValue:void 0,yValue:void 0,sizeValue:void 0,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},point:{x:0,y:0,size:0},midPoint:{x:0,y:0},label:{text:"",width:0,height:0},anchor:t.labelAnchor,placement:t.labelPlacement,count:1,dilation:1,area:0,selected:void 0}}updateNodeDatum(t,e,i,s){const n=e,{x:r,y:a,markerSize:o,dilation:l}=i;n.datum=i.datum,n.datumIndex=s,n.xValue=i.xDatum,n.yValue=i.yDatum,n.sizeValue=i.sizeValue,n.selected=i.selected,n.count=i.count,n.dilation=i.dilation,n.area=i.area,n.label=i.nodeLabel,n.anchor=t.labelAnchor,n.placement=t.labelPlacement;const c=n.point;c.x=r,c.y=a,c.size=Math.sqrt(l)*o;const h=n.midPoint;h.x=r,h.y=a}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t;if(this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),!processedDataIsAnimatable(this.processedData))return i.update(e);const{sizeKey:s}=this.properties;let n;return s&&(n=r=>createDatumId(r.xValue,r.yValue,r.sizeValue,(0,import_ag_charts_core257.toPlainText)(r.label.text))),i.update(e,void 0,n)}updateDatumStyles(t){const{datumSelection:e,isHighlight:i}=t,{xKey:s,yKey:n,sizeKey:r,labelKey:a,marker:o}=this.properties,l={xKey:s,yKey:n,sizeKey:r,labelKey:a},c=this.ctx.highlightManager.getActiveHighlight();e.each((h,u)=>{if(!e.isGarbage(h)){const d=this.getHighlightState(c,t.isHighlight,u.datumIndex),p=this.getStyle(d);u.style=this.getMarkerStyle(o,u,l,{isHighlight:i,highlightState:d,resolveMarkerSubPath:[]},p)}})}updateDatumNodes(t){const{contextNodeData:e}=this;if(!e)return;const{datumSelection:i,isHighlight:s,drawingMode:n}=t;this.sizeScale.range=this.getSizeRange();const r=this.getShapeFillBBox(),a=this.dataAggregation!=null,o=this.ctx.highlightManager.getActiveHighlight();i.each((l,c,h)=>{const{point:{size:u},count:d,area:p,dilation:g}=c,f=this.getHighlightState(o,s,c.datumIndex),y={...c.style??e.styles[f]};if(y.size=u,g>1){const m=y.fillOpacity??0,b=.269669+683e-6*d+-37.534348*p+.004449*d*p+-0*d**2+44.428603*p**2;y.fillOpacity=(0,import_ag_charts_core257.clamp)(m/g,m/.1*b,1)}this.applyMarkerStyle(y,l,c.point,r,{selected:c.selected}),l.drawingMode=this.resolveMarkerDrawingModeForState(n,y),l.zIndex=a?[-d,h]:0}),s||this.properties.marker.markClean()}updatePlacedLabelData(t){this.placedLabelData=t,this.labelSelection.update(t.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})),e=>{e.pointerEvents=1}),this.updateLabelNodes({labelSelection:this.labelSelection}),this.updateHighlightLabelSelection()}updateHighlightLabelSelection(){const t=this.ctx.highlightManager?.getActiveHighlight(),e=this.isSeriesHighlighted(t)&&t?.datum?t:void 0,i=e==null?[]:this.placedLabelData.filter(s=>s.datum.datumIndex===e.datumIndex).map(s=>({...s.datum,point:{x:s.x,y:s.y,size:s.datum.point.size}}));this.highlightLabelSelection=this.updateLabelSelection({labelData:i,labelSelection:this.highlightLabelSelection})??this.highlightLabelSelection,this.highlightLabelGroup.visible=i.length>0,this.highlightLabelGroup.batchedUpdate(()=>{this.updateLabelNodes({labelSelection:this.highlightLabelSelection,isHighlight:!0})})}updateLabelNodes(t){const{isHighlight:e=!1}=t,i=this.ctx.highlightManager?.getActiveHighlight(),s=this.makeLabelFormatterParams();t.labelSelection.each((n,r)=>{const a=getLabelStyles(this,r,s,this.properties.label,e,i);n.text=r.label.text,n.fill=a.color,n.x=r.point?.x??0,n.y=r.point?.y??0,n.fontStyle=a.fontStyle,n.fontWeight=a.fontWeight,n.fontSize=a.fontSize,n.fontFamily=a.fontFamily,n.textBaseline="top",n.fillOpacity=this.getHighlightStyle(e,r.datumIndex).opacity??1,n.setBoxing(a)})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e,s=>{s.pointerEvents=1})}makeStylerParams(t){const{id:e,properties:{size:i,maxSize:s,shape:n,fill:r,fillOpacity:a,lineDash:o,lineDashOffset:l,stroke:c,strokeOpacity:h,strokeWidth:u,xKey:d,yKey:p,sizeKey:g,labelKey:f}}=this,y=toHighlightString(t??0);return this.type==="bubble"?{highlightState:y,size:i,maxSize:s,shape:n,fill:r,fillOpacity:a,lineDash:o,lineDashOffset:l,seriesId:e,sizeKey:g,stroke:c,strokeOpacity:h,strokeWidth:u,xKey:d,yKey:p,labelKey:f}:this.type==="scatter"?{highlightState:y,size:i,shape:n,fill:r,fillOpacity:a,lineDash:o,lineDashOffset:l,seriesId:e,stroke:c,strokeOpacity:h,strokeWidth:u,xKey:d,yKey:p,labelKey:f}:this.type}makeLabelFormatterParams(){const{xKey:t,xName:e,yKey:i,yName:s,sizeKey:n,sizeName:r,labelKey:a,labelName:o,legendItemName:l}=this.properties;return{xKey:t,xName:e,yKey:i,yName:s,sizeKey:n,sizeName:r,labelKey:a,labelName:o,legendItemName:l}}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:n,properties:r,ctx:a}=this,{formatManager:o}=a,{xKey:l,xName:c,yKey:h,yName:u,sizeKey:d,sizeName:p,labelKey:g,labelName:f,title:y,tooltip:m,marker:b,legendItemName:v}=r,x=n[import_ag_charts_core257.ChartAxisDirection.X],S=n[import_ag_charts_core257.ChartAxisDirection.Y];if(!i||!s||!x||!S)return;const I=s.dataSources.get(this.id)?.data?.[t],D=i.resolveColumnById(this,"xValue",s)[t],T=i.resolveColumnById(this,"yValue",s)[t],A=this.properties.allowNullKeys??!1;if(D===void 0&&!A)return;const L=[];if(this.isLabelEnabled()&&g!=null){const k=i.resolveColumnById(this,"labelValue",s)[t],w=o.format(this.callWithContext.bind(this),{type:"category",value:k,datum:I,seriesId:e,legendItemName:v,key:g,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});L.push({label:f,fallbackLabel:g,value:w??(0,import_ag_charts_core257.formatValue)(k)})}if(L.push({label:c,fallbackLabel:l,value:this.getAxisValueText(x,"tooltip",D,I,l,v,A),missing:isTooltipValueMissing(D,A)},{label:u,fallbackLabel:h,value:this.getAxisValueText(S,"tooltip",T,I,h,v,A),missing:isTooltipValueMissing(T,A)}),d!=null){const k=i.resolveColumnById(this,"sizeValue",s)[t];if(k!=null){const w=i.getDomain(this,"sizeValue","value",s).domain,E=o.format(this.callWithContext.bind(this),{type:"number",value:k,datum:I,seriesId:e,legendItemName:v,key:d,source:"tooltip",property:"size",boundSeries:this.getFormatterContext("size"),domain:w,fractionDigits:void 0,visibleDomain:void 0});L.push({label:p,fallbackLabel:d,value:E??(0,import_ag_charts_core257.formatValue)(k)})}}const N=this.getMarkerStyle(b,{datum:I,datumIndex:t},{xKey:l,yKey:h,sizeKey:d,labelKey:g},{resolveMarkerSubPath:[]});return this.formatTooltipWithContext(m,{title:y,symbol:this.legendItemSymbol(),data:L},{seriesId:e,datum:I,title:h,xKey:l,xName:c,yKey:h,yName:u,sizeKey:d,sizeName:p,labelKey:g,labelName:f,legendItemName:v,...N,...this.getModuleTooltipParams()})}legendItemSymbol(){const t=this.getStyle();return{marker:this.getMarkerStyle(this.properties.marker,{},void 0,{isHighlight:!1,checkForHighlight:!1,resolveMarkerSubPath:[]},t)}}getLegendData(){const{id:t,ctx:{legendManager:e},visible:i}=this,{yKey:s,yName:n,legendItemName:r,title:a,showInLegend:o}=this.properties;return[{legendType:"category",id:t,itemId:s,seriesId:t,enabled:i&&e.getItemEnabled({seriesId:t,itemId:s}),label:{text:r??a??n??s},symbol:this.legendItemSymbol(),legendItemName:r,hideInLegend:!o}]}animateEmptyUpdateReady({datumSelection:t,labelSelection:e}){markerScaleInAnimation(this,this.ctx.animationManager,t),seriesLabelFadeInAnimation(this,"labels",this.ctx.animationManager,e)}resetDatumAnimation(t){resetMarkerSelectionsDirect([t.datumSelection])}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Marker}getStyle(t){const{properties:e}=this;let i={};if(e.styler){const s=this.makeStylerParams(t),n=this.cachedCallWithContext(e.styler,s)??{};i=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],n,{pick:!1})??{}}return{fill:i.fill??e.fill,fillOpacity:i.fillOpacity??e.fillOpacity,lineDash:i.lineDash??e.lineDash,lineDashOffset:i.lineDashOffset??e.lineDashOffset,shape:i.shape??e.shape,size:i.size??e.size,maxSize:i.maxSize??e.maxSize,stroke:i.stroke??e.stroke,strokeOpacity:i.strokeOpacity??e.strokeOpacity,strokeWidth:i.strokeWidth??e.strokeWidth}}getSizeRange(){const{size:t,maxSize:e}=this.getStyle();return[t,e]}getFormattedMarkerStyle(t){const{xKey:e,yKey:i,sizeKey:s,labelKey:n,marker:r}=this.properties;return this.getMarkerStyle(r,t,{xKey:e,yKey:i,sizeKey:s,labelKey:n},{resolveMarkerSubPath:[]})}computeFocusBounds(t){return computeMarkerFocusBounds(this,t)}hasItemStylers(){const{styler:t,itemStyler:e,marker:i,label:s}=this.properties;return!!(t??e??i.itemStyler??s.itemStyler)}initQuadTree(t){addHitTestersToQuadtree(t,this.datumNodesIter())}pickNodeDataClosestDatum(t){return findQuadtreeMatch(this,t)}};BubbleSeries.className="BubbleSeries",BubbleSeries.type="bubble";var themeTemplate3={series:{shape:"circle",size:7,maxSize:30,fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core258.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core258.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core258.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},fillOpacity:.8,maxRenderedItems:2e3,label:{...import_ag_charts_core258.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},tooltip:{range:{$if:[{$eq:[{$path:["/tooltip/range","nearest"]},"area"]},"nearest",{$path:["/tooltip/range","nearest"]}]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:import_ag_charts_core258.MULTI_SERIES_HIGHLIGHT_STYLE}},BubbleSeriesModule={type:"series",name:"bubble",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:bubbleSeriesOptionsDef,predictAxis:predictCartesianAxis,defaultAxes:{x:{type:import_ag_charts_core258.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core258.CARTESIAN_POSITION.BOTTOM},y:{type:import_ag_charts_core258.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core258.CARTESIAN_POSITION.LEFT}},axisKeys:{[import_ag_charts_core258.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core258.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:themeTemplate3,create:t=>new BubbleSeries(t)},import_ag_charts_core261=require("ag-charts-core"),import_ag_charts_core260=require("ag-charts-core"),import_ag_charts_core259=require("ag-charts-core"),HistogramSeriesProperties=class extends CartesianSeriesProperties{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new DropShadow,this.label=new Label,this.tooltip=makeSeriesTooltip()}getStyle(){const{fill:t,fillOpacity:e,stroke:i,strokeWidth:s,strokeOpacity:n,lineDash:r,lineDashOffset:a,cornerRadius:o}=this;return{fill:t,fillOpacity:e,stroke:i,strokeWidth:s,strokeOpacity:n,lineDash:r,lineDashOffset:a,cornerRadius:o,opacity:1}}};__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"yKey",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"areaPlot",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"bins",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"aggregation",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"binCount",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core259.Property],HistogramSeriesProperties.prototype,"tooltip",2);var defaultBinCount=10,HistogramSeries=class extends CartesianSeries{constructor(t){super({moduleCtx:t,propertyKeys:DEFAULT_CARTESIAN_DIRECTION_KEYS,propertyNames:DEFAULT_CARTESIAN_DIRECTION_NAMES,categoryKey:void 0,pickModes:[1,0],datumSelectionGarbageCollection:!0,animationAlwaysPopulateNodeData:!0,alwaysClip:!0,animationResetFns:{datum:resetBarSelectionsFn,label:resetLabelFn}}),this.properties=new HistogramSeriesProperties,this.calculatedBins=[]}get hasData(){return this.calculatedBins.length>0}deriveBins(t){const e=(0,import_ag_charts_core260.createTicks)(t[0],t[1],defaultBinCount).ticks,i=(0,import_ag_charts_core260.tickStep)(t[0],t[1],defaultBinCount),[s]=e,n=r=>[r,r+i];return[[s-i,s],...e.map(n)]}calculateNiceBins(t,e){const i=Math.floor(t[0]),s=t[1],n=e||1,{start:r,binSize:a}=this.calculateNiceStart(i,s,n);return this.getBins(r,s,a,n)}getBins(t,e,i,s){const n=[],r=this.calculatePrecision(i);for(let a=0;a<s;a++){const o=Math.round((t+a*i)*r)/r;let l=Math.round((t+(a+1)*i)*r)/r;a===s-1&&(l=Math.max(l,e)),n[a]=[o,l]}return n}calculatePrecision(t){let e=10;if(Number.isFinite(t)&&t>0)for(;t<1;)e*=10,t*=10;return e}calculateNiceStart(t,e,i){const s=Math.abs(e-t)/i,n=Math.floor(Math.log10(s)),r=Math.pow(10,n);return{start:Math.floor(t/r)*r,binSize:s}}async processData(t){const{visible:e}=this,{xKey:i,yKey:s,areaPlot:n,aggregation:r}=this.properties,a=this.axes[import_ag_charts_core260.ChartAxisDirection.X]?.scale,o=this.axes[import_ag_charts_core260.ChartAxisDirection.Y]?.scale,{xScaleType:l,yScaleType:c}=this.getScaleInformation({yScale:o,xScale:a}),h=e?{}:{forceValue:0},u=[keyProperty(i,l),SORT_DOMAIN_GROUPS];if(s){let b=groupCount("groupAgg",{visible:e});r==="count"||(r==="sum"?b=groupSum("groupAgg",{visible:e}):r==="mean"&&(b=groupAverage("groupAgg",{visible:e}))),n&&(b=area("groupAgg",b)),u.push(valueProperty(s,c,{invalidValue:void 0,...h}),b)}else{u.push(rowCountProperty("count"));let b=groupCount("groupAgg",{visible:e});n&&(b=area("groupAgg",b)),u.push(b)}let d=[];const p=b=>{const v=fixNumericExtent(b.domain.keys[0]);if(v.length===0)return b.domain.groups=[],()=>[];const x=(0,import_ag_charts_core260.isNumber)(this.properties.binCount)?this.calculateNiceBins(v,this.properties.binCount):this.properties.bins??this.deriveBins(v),S=x.length;return d=[...x],I=>{let D=I[0];if((0,import_ag_charts_core260.isDate)(D)&&(D=D.getTime()),!(0,import_ag_charts_core260.isNumber)(D))return[];for(let T=0;T<S;T++){const A=x[T];if(D>=A[0]&&D<A[1]||T===S-1&&D<=A[1])return A}return[]}},{dataModel:g,processedData:f}=await this.requestDataModel(t,this.data,{props:u,groupByFn:p}),y=f,m=new Map;for(const[b,v]of y.groups.entries()){const x=v.keys;m.set(createDatumId(...x),{group:v,groupIndex:b})}this.calculatedBins=d.map(b=>{const v=m.get(createDatumId(...b));if(v){const{group:x,groupIndex:S}=v,[[I,D]=[0,0]]=x.aggregation,T=[...g.forEachDatum(this,y,x,S)],A=this.frequency(x),L=I+D;return{domain:b,datum:T,groupIndex:S,frequency:A,total:L}}else return{domain:b,datum:[],groupIndex:-1,frequency:0,total:0}}),this.animationState.transition("updateData")}xCoordinateRange(){return[Number.NaN,Number.NaN]}yCoordinateRange(){return[Number.NaN,Number.NaN]}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i||!this.calculatedBins.length)return{domain:[]};const s=i.getDomain(this,"groupAgg","aggregate",e).domain,n=this.calculatedBins[0].domain[0],r=this.calculatedBins[(this.calculatedBins?.length??0)-1].domain[1];return t===import_ag_charts_core260.ChartAxisDirection.X?{domain:fixNumericExtent([n,r])}:{domain:fixNumericExtent(s)}}getSeriesRange(t,[e,i]){const{dataModel:s,processedData:n}=this;if(!s||n?.type!=="grouped")return[Number.NaN,Number.NaN];const r=this.axes[import_ag_charts_core260.ChartAxisDirection.X].scale,a=0;let o=-1/0;for(const{keys:l,aggregation:c}of n.groups){const[[h,u]=[0,0]]=c,[d,p]=l,[g,f]=(0,import_ag_charts_core260.findMinMax)([r.convert(d),r.convert(p)]);if(f>=e&&g<=i){const y=h+u;o=Math.max(o,y)}}return a>o?[Number.NaN,Number.NaN]:[a,o]}frequency(t){return t.datumIndices.reduce((e,i)=>e+i.length,0)}createNodeDatumContext(t,e){const{xKey:i,yKey:s,xName:n,yName:r,label:a}=this.properties,{contextNodeData:o,processedData:l}=this,c=o?.nodeData!=null&&l?.changeDescription!=null;return{xAxis:t,yAxis:e,xScale:t.scale,yScale:e.scale,yAxisReversed:e.isReversed(),rawData:[],xValues:[],xKey:i,yKey:s,xName:n,yName:r,label:a,animationEnabled:!this.ctx.animationManager.isSkipped(),canIncrementallyUpdate:c,nodes:c?o.nodeData:[],nodeIndex:0}}createLabelData(t,e,i,s,n,r){const{label:a,yKey:o,xKey:l,xName:c,yName:h}=t,{total:u,datum:d}=e;if(!(!a.enabled||u===0))return{x:i+n/2,y:s+r/2,text:this.getLabelText(u,d,o,"y",[],a,{value:u,datum:d,xKey:l,yKey:o,xName:c,yName:h})}}createSkeletonNodeDatum(t,e){const{xKey:i,yKey:s}=t,{domain:n,datum:r,groupIndex:a,frequency:o,total:l}=e;return{series:this,datumIndex:a,datum:r,aggregatedValue:l,frequency:o,domain:n,yKey:s,xKey:i,x:0,y:0,xValue:0,yValue:0,width:0,height:0,midPoint:{x:0,y:0},topLeftCornerRadius:!1,topRightCornerRadius:!1,bottomRightCornerRadius:!1,bottomLeftCornerRadius:!1,label:void 0,crisp:!0}}updateNodeDatum(t,e,i){const{xScale:s,yScale:n,yAxisReversed:r}=t,{domain:a,datum:o,groupIndex:l,frequency:c,total:h}=i,u=e,[d,p]=a,g=s.convert(d),f=s.convert(p),y=n.convert(0),m=n.convert(h),b=Math.abs(f-g),v=Math.abs(m-y),x=Math.min(g,f),S=Math.min(y,m);u.datumIndex=l,u.datum=o,u.aggregatedValue=h,u.frequency=c,u.domain=a,u.x=x,u.y=S,u.xValue=g,u.yValue=m,u.width=b,u.height=v,u.midPoint?(u.midPoint.x=x+b/2,u.midPoint.y=S+v/2):u.midPoint={x:x+b/2,y:S+v/2},u.topLeftCornerRadius=!r,u.topRightCornerRadius=!r,u.bottomRightCornerRadius=r,u.bottomLeftCornerRadius=r,u.label=this.createLabelData(t,i,x,S,b,v)}createNodeDatum(t,e){const i=this.createSkeletonNodeDatum(t,e);return this.updateNodeDatum(t,i,e),i}populateNodeData(t){const{processedData:e}=this;if(e?.type==="grouped")for(const i of this.calculatedBins)upsertNodeDatum(t,i,(s,n)=>this.createNodeDatum(s,n),(s,n,r)=>this.updateNodeDatum(s,n,r))}initializeResult(t){return{itemId:this.properties.yKey??this.id,nodeData:t.nodes,labelData:t.nodes,scales:this.calculateScaling(),animationValid:!0,visible:this.visible||t.animationEnabled,styles:getItemStyles(this.getItemStyle.bind(this))}}finalizeNodeData(t){super.finalizeNodeData(t),t.nodes.sort((e,i)=>e.x-i.x)}nodeFactory(){return new Rect}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t;return processedDataIsAnimatable(this.processedData)?i.update(e,void 0,s=>createDatumId(...s.domain)):i.update(e)}getItemStyle(t,e,i){const{properties:s}=this,n=this.getHighlightStyle(e,t,i);return(0,import_ag_charts_core260.mergeDefaults)(n,s.getStyle())}updateDatumStyles(t){const{datumSelection:e,isHighlight:i}=t;e.each((s,n)=>{e.isGarbage(s)||(n.style=this.getItemStyle(n.datumIndex,i))})}updateDatumNodes(t){const{contextNodeData:e}=this;if(!e)return;const i=this.ctx.highlightManager.getActiveHighlight(),{shadow:s}=this.properties,n=this.getShapeFillBBox();t.datumSelection.each((r,a)=>{const o=a.style??e.styles[this.getHighlightState(i,t.isHighlight,a.datumIndex)],{cornerRadius:l=0}=o,{topLeftCornerRadius:c,topRightCornerRadius:h,bottomRightCornerRadius:u,bottomLeftCornerRadius:d}=a;r.setStyleProperties(o,n),r.topLeftCornerRadius=c?l:0,r.topRightCornerRadius=h?l:0,r.bottomRightCornerRadius=u?l:0,r.bottomLeftCornerRadius=d?l:0,r.crisp=a.crisp,r.fillShadow=s})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e,s=>{s.pointerEvents=1,s.textAlign="center",s.textBaseline="middle"})}updateLabelNodes(t){const e=this.isLabelEnabled(),{isHighlight:i=!1}=t,s=this.ctx.highlightManager?.getActiveHighlight();t.labelSelection.each((n,r)=>{const a=getLabelStyles(this,r,this.properties,this.properties.label,i,s),{enabled:o,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u,color:d}=a;o&&e&&r?.label?(n.text=r.label.text,n.x=r.label.x,n.y=r.label.y,n.fontStyle=l,n.fontWeight=c,n.fontFamily=u,n.fontSize=h,n.fill=d,n.visible=!0,n.fillOpacity=this.getHighlightStyle(i,r.datumIndex).opacity??1,n.setBoxing(a)):n.visible=!1})}initQuadTree(t){const{value:e}=this.contentGroup.children().next();e instanceof Group&&addHitTestersToQuadtree(t,e.children())}pickNodeClosestDatum(t){return findQuadtreeMatch(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:n,properties:r,ctx:{localeManager:a}}=this,{xKey:o,xName:l,yKey:c,yName:h,tooltip:u,legendItemName:d}=r,p=n[import_ag_charts_core260.ChartAxisDirection.X],g=n[import_ag_charts_core260.ChartAxisDirection.Y];if(!i||s?.type!=="grouped"||!p||!g)return;const f=s.groups[t],{aggregation:y,keys:m}=f,[[b,v]=[0,0]]=y,x=this.frequency(f),S=m,[I,D]=S,T=b+v,A={data:[...i.forEachDatum(this,s,f,t)],aggregatedValue:T,frequency:x,domain:S},L=[{label:l,fallbackLabel:o,value:`${this.getAxisValueText(p,"tooltip",I,A,o,d)} - ${this.getAxisValueText(p,"tooltip",D,A,o,d)}`},{label:a.t("seriesHistogramTooltipFrequency"),value:this.getAxisValueText(g,"tooltip",x,A,c,d)}];if(c!=null){let N;switch(r.aggregation){case"sum":N=a.t("seriesHistogramTooltipSum",{yName:h??c});break;case"mean":N=a.t("seriesHistogramTooltipMean",{yName:h??c});break;case"count":N=a.t("seriesHistogramTooltipCount",{yName:h??c});break}L.push({label:N,value:this.getAxisValueText(g,"tooltip",T,A,c,d)})}return this.formatTooltipWithContext(u,{symbol:this.legendItemSymbol(),data:L},{seriesId:e,datum:A,title:h,xKey:o,xName:l,yKey:c,yName:h,xRange:[I,D],frequency:x,...this.getItemStyle(t,!1)})}legendItemSymbol(){const{fill:t,fillOpacity:e,stroke:i,strokeWidth:s,strokeOpacity:n,lineDash:r,lineDashOffset:a}=this.properties;return{marker:{fill:(0,import_ag_charts_core260.deepClone)(t)??"rgba(0, 0, 0, 0)",stroke:i??"rgba(0, 0, 0, 0)",fillOpacity:e,strokeOpacity:n,strokeWidth:s,lineDash:r,lineDashOffset:a}}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{xKey:n,yName:r,showInLegend:a}=this.properties;return[{legendType:"category",id:e,itemId:n,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:n}),label:{text:r??n??"Frequency"},symbol:this.legendItemSymbol(),hideInLegend:!a}]}resetDatumAnimation(t){resetBarSelectionsDirect([t.datumSelection])}animateEmptyUpdateReady({datumSelection:t,labelSelection:e}){const i=prepareBarAnimationFunctions(collapsedStartingBarPosition(!0,this.axes,"normal"),"unknown");fromToMotion(this.id,"datums",this.ctx.animationManager,[t],i),seriesLabelFadeInAnimation(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(t){const e=prepareBarAnimationFunctions(collapsedStartingBarPosition(!0,this.axes,"normal"),"added"),i={changed:!0,added:new Set,updated:new Set,removed:new Set,moved:new Set};fromToMotion(this.id,"datums",this.ctx.animationManager,[t.datumSelection],e,(s,n)=>createDatumId(...n.domain),i),i?.changed&&seriesLabelFadeInAnimation(this,"labels",this.ctx.animationManager,t.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){return computeBarFocusBounds(this,this.contextNodeData?.nodeData[t])}hasItemStylers(){return this.properties.label.itemStyler!=null}};HistogramSeries.className="HistogramSeries",HistogramSeries.type="histogram";var themeTemplate4={series:{fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core261.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core261.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core261.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{...import_ag_charts_core261.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},shadow:{enabled:!1,color:import_ag_charts_core261.DEFAULT_SHADOW_COLOUR,xOffset:3,yOffset:3,blur:5},highlight:import_ag_charts_core261.MULTI_SERIES_HIGHLIGHT_STYLE}},HistogramSeriesModule={type:"series",name:"histogram",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:histogramSeriesOptionsDef,predictAxis:predictCartesianNonPrimitiveAxis,defaultAxes:{x:{type:import_ag_charts_core261.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core261.CARTESIAN_POSITION.BOTTOM},y:{type:import_ag_charts_core261.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core261.CARTESIAN_POSITION.LEFT}},axisKeys:{[import_ag_charts_core261.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core261.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:themeTemplate4,create:t=>new HistogramSeries(t)},import_ag_charts_core265=require("ag-charts-core"),import_ag_charts_core264=require("ag-charts-core"),import_ag_charts_core262=require("ag-charts-core"),MAX_POINTS2=10;function isIndexInAggregation(t,e,i,s,n,r,a,o){const l=t[r];if(l===void 0)return!1;const c=Number.isFinite(e)?(0,import_ag_charts_core262.aggregationXRatioForXValue)(l,e,i,a):(0,import_ag_charts_core262.aggregationXRatioForDatumIndex)(r,o),h=(0,import_ag_charts_core262.aggregationIndexForXRatio)(c,n);return r===s[h+import_ag_charts_core262.AGGREGATION_INDEX_X_MIN]||r===s[h+import_ag_charts_core262.AGGREGATION_INDEX_X_MAX]||r===s[h+import_ag_charts_core262.AGGREGATION_INDEX_Y_MIN]||r===s[h+import_ag_charts_core262.AGGREGATION_INDEX_Y_MAX]}function buildIndicesFromAggregation2(t,e,i,s,n,r,a,o){let l=0;for(let u=0;u<a;u++)isIndexInAggregation(t,e,i,s,n,u,r,a)&&l++;const c=o?.length===l?o:new Uint32Array(l);let h=0;for(let u=0;u<a;u++)isIndexInAggregation(t,e,i,s,n,u,r,a)&&(c[h++]=u);return c}function filterIndicesFromPrevious(t,e,i,s,n,r,a,o,l){let c=0;for(const d of t)isIndexInAggregation(e,i,s,n,r,d,a,o)&&c++;const h=l?.length===c?l:new Uint32Array(c);let u=0;for(const d of t)isIndexInAggregation(e,i,s,n,r,d,a,o)&&(h[u++]=d);return h}function computeLineAggregation(t,e,i,s){const n=e.length;if(n<import_ag_charts_core262.AGGREGATION_THRESHOLD)return;const[r,a]=t,{xNeedsValueOf:o,yNeedsValueOf:l,existingFilters:c}=s;let h=(0,import_ag_charts_core262.aggregationRangeFittingPoints)(e,r,a,{xNeedsValueOf:o});const u=c?.find(y=>y.maxRange===h);let{indexData:d,valueData:p}=(0,import_ag_charts_core262.createAggregationIndices)(e,i,i,r,a,h,{xNeedsValueOf:o,yNeedsValueOf:l,reuseIndexData:u?.indexData,reuseValueData:u?.valueData}),g=buildIndicesFromAggregation2(e,r,a,d,h,o,n,u?.indices);const f=[{maxRange:h,indices:g,indexData:d,valueData:p}];for(;g.length>MAX_POINTS2&&h>64;){const y=h,m=Math.trunc(y/2),b=c?.find(x=>x.maxRange===m),v=(0,import_ag_charts_core262.compactAggregationIndices)(d,p,y,{reuseIndexData:b?.indexData,reuseValueData:b?.valueData});h=v.maxRange,d=v.indexData,p=v.valueData,g=filterIndicesFromPrevious(g,e,r,a,d,h,o,n,b?.indices),f.push({maxRange:h,indices:g,indexData:d,valueData:p})}return f.reverse(),f}function computeLineAggregationPartial(t,e,i,s){const n=e.length;if(n<import_ag_charts_core262.AGGREGATION_THRESHOLD)return;const[r,a]=t,{xNeedsValueOf:o,yNeedsValueOf:l,targetRange:c,existingFilters:h}=s,u=(0,import_ag_charts_core262.aggregationRangeFittingPoints)(e,r,a,{xNeedsValueOf:o}),d=Math.min(u,(0,import_ag_charts_core262.nextPowerOf2)(Math.max(c,import_ag_charts_core262.AGGREGATION_MIN_RANGE))),p=h?.find(v=>v.maxRange===d),{indexData:g,valueData:f}=(0,import_ag_charts_core262.createAggregationIndices)(e,i,i,r,a,d,{xNeedsValueOf:o,yNeedsValueOf:l,reuseIndexData:p?.indexData,reuseValueData:p?.valueData}),y=buildIndicesFromAggregation2(e,r,a,g,d,o,n,p?.indices),m={maxRange:d,indices:y,indexData:g,valueData:f};function b(){return computeLineAggregation([r,a],e,i,{xNeedsValueOf:o,yNeedsValueOf:l,existingFilters:h})?.filter(x=>x.maxRange!==d)??[]}return{immediate:[m],computeRemaining:b}}function aggregateLineData(t,e,i,s,n,r){const[a,o]=(0,import_ag_charts_core262.aggregationDomain)(t,s);return computeLineAggregation([a,o],e,i,{xNeedsValueOf:n,yNeedsValueOf:r})}var memoizedAggregateLineData=(0,import_ag_charts_core262.simpleMemorize2)(aggregateLineData);function aggregateLineDataFromDataModel(t,e,i,s,n,r){const a=e.resolveColumnById(n,"xValue",i),o=e.resolveColumnById(n,s,i),l=e.getDomain(n,"xValue","value",i),c=e.resolveColumnNeedsValueOf(n,"xValue",i),h=e.resolveColumnNeedsValueOf(n,s,i);if(r){const[u,d]=(0,import_ag_charts_core262.aggregationDomain)(t,l);return computeLineAggregation([u,d],a,o,{xNeedsValueOf:c,yNeedsValueOf:h,existingFilters:r})}return memoizedAggregateLineData(t,a,o,l,c,h)}function aggregateLineDataFromDataModelPartial(t,e,i,s,n,r,a){const o=e.resolveColumnById(n,"xValue",i),l=e.resolveColumnById(n,s,i),c=e.getDomain(n,"xValue","value",i),h=e.resolveColumnNeedsValueOf(n,"xValue",i),u=e.resolveColumnNeedsValueOf(n,s,i),[d,p]=(0,import_ag_charts_core262.aggregationDomain)(t,c);return computeLineAggregationPartial([d,p],o,l,{xNeedsValueOf:h,yNeedsValueOf:u,targetRange:r,existingFilters:a})}var import_ag_charts_core263=require("ag-charts-core"),LineSeriesProperties=class extends CartesianSeriesProperties{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new import_ag_charts_core263.InterpolationProperties,this.marker=new SeriesMarker,this.label=new Label,this.tooltip=makeSeriesTooltip(),this.connectMissingData=!1,this.sparklineMode=!1}};__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"yKey",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"yFilterKey",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"stackGroup",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"normalizedTo",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"title",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"interpolation",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"marker",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"connectMissingData",2),__decorateClass([import_ag_charts_core263.Property],LineSeriesProperties.prototype,"sparklineMode",2);var CROSS_FILTER_LINE_STROKE_OPACITY_FACTOR=.25,LineSeries=class extends CartesianSeries{constructor(t){super({moduleCtx:t,propertyKeys:DEFAULT_CARTESIAN_DIRECTION_KEYS,propertyNames:DEFAULT_CARTESIAN_DIRECTION_NAMES,categoryKey:"xValue",pickModes:[2,1,0],datumSelectionGarbageCollection:!1,segmentedDataNodes:!1,animationResetFns:{path:buildResetPathFn({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:resetLabelFn,datum:(e,i)=>({...resetMarkerFn(e),...resetMarkerPositionFn(e,i)})},clipFocusBox:!1}),this.properties=new LineSeriesProperties,this.aggregationManager=new AggregationManager}get pickModeAxis(){return this.properties.sparklineMode?"main":"main-category"}isNormalized(){return this.properties.normalizedTo!=null}renderToOffscreenCanvas(){return(this.contextNodeData?.nodeData?.length??0)>0&&this.getDrawingMode(!1)==="cutout"||super.renderToOffscreenCanvas()}async processData(t){if(this.data==null)return;const{data:e,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:n=0}={}}=this,{xKey:r,yKey:a,yFilterKey:o,connectMissingData:l,normalizedTo:c}=this.properties,h=this.axes[import_ag_charts_core264.ChartAxisDirection.X]?.scale,u=this.axes[import_ag_charts_core264.ChartAxisDirection.Y]?.scale,{isContinuousX:d,xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:h,yScale:u}),f=n>1||c!=null,y={invalidValue:null};l&&f&&(y.invalidValue=0),f&&!i&&(y.forceValue=0);const m={value:`area-stack-${s}-yValue`,marker:`area-stack-${s}-yValues-marker`},b=[],v=this.properties.allowNullKeys??!1;(!d||f)&&b.push(keyProperty(r,p,{id:"xKey",allowNullKey:v})),b.push(valueProperty(r,p,{id:"xValue",allowNullKey:v}),valueProperty(a,g,{id:"yValueRaw",...y,invalidValue:void 0})),o!=null&&b.push(valueProperty(o,g,{id:"yFilterRaw"})),f&&b.push(...groupAccumulativeValueProperty(a,"normal",{id:"yValueCumulative",...y,groupId:m.marker},g)),(0,import_ag_charts_core264.isDefined)(c)&&b.push(valueProperty(a,g,{id:"yValue",...y,groupId:m.value}),normaliseGroupTo(Object.values(m),c)),this.needsDataModelDiff()&&(b.push(animationValidation(d?["xValue"]:void 0)),this.processedData&&b.push(diff(this.id,this.processedData)));const{dataModel:x,processedData:S}=await this.requestDataModel(t,e,{props:b,groupByKeys:f,groupByData:!f});this.aggregateData(x,S),this.animationState.transition("updateData")}yValueKey(){return this.isNormalized()?"yValue":"yValueRaw"}yCumulativeKey(t){return t.type==="grouped"?"yValueCumulative":this.yValueKey()}xCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes[import_ag_charts_core264.ChartAxisDirection.X].scale.convert(t),n=i.enabled?.5*i.size*e:0;return[s-n,s+n]}yCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes[import_ag_charts_core264.ChartAxisDirection.Y].scale.convert(t[0]),n=i.enabled?.5*i.size*e:0;return[s-n,s+n]}getSeriesDomain(t){const{dataModel:e,processedData:i,axes:s}=this;if(!e||!i)return{domain:[]};const n=s[import_ag_charts_core264.ChartAxisDirection.Y];if(t===import_ag_charts_core264.ChartAxisDirection.X){const a=e.resolveProcessedDataDefById(this,"xValue"),o=e.getDomain(this,"xValue","value",i);if(a?.def.type==="value"&&a.def.valueType==="category"){const l=e.getKeySortMetadata(this,"xValue",i);return{domain:o.domain,sortMetadata:l}}return{domain:fixNumericExtent((0,import_ag_charts_core264.extent)(o.domain))}}const r=this.domainForClippedRange(import_ag_charts_core264.ChartAxisDirection.Y,[this.yCumulativeKey(i)],"xValue");if(this.isNormalized()&&n instanceof NumberAxis&&!(n instanceof LogAxis)){const a=Number.isFinite(r[1]-r[0])?[Math.min(r[0],0),Math.max(r[1],0)]:[];return{domain:fixNumericExtent(a)}}else return{domain:fixNumericExtent(r)}}getSeriesRange(t,e){return this.domainForVisibleRange(import_ag_charts_core264.ChartAxisDirection.Y,[this.yCumulativeKey(this.processedData)],"xValue",e)}getZoomRangeFittingItems(t,e,i){return this.zoomFittingVisibleItems("xValue",[this.yCumulativeKey(this.processedData)],t,e,i)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",[this.yCumulativeKey(this.processedData)],t,e,i)}aggregateData(t,e){if(this.aggregationManager.markStale(e.input.count),e.type!=="ungrouped"||processedDataIsAnimatable(e))return;const i=this.axes[import_ag_charts_core264.ChartAxisDirection.X];if(i==null)return;const s=this.estimateTargetRange();this.aggregationManager.aggregate({computePartial:r=>aggregateLineDataFromDataModelPartial(i.scale.type,t,e,this.yCumulativeKey(e),this,s,r),computeFull:r=>aggregateLineDataFromDataModel(i.scale.type,t,e,this.yCumulativeKey(e),this,r),targetRange:s});const n=this.aggregationManager.filters;n&&n.length>0&&import_ag_charts_core264.DebugMetrics.record(`${this.type}:aggregation`,n.map(r=>r.maxRange))}estimateTargetRange(){const t=this.axes[import_ag_charts_core264.ChartAxisDirection.X];if(t?.scale?.range){const[e,i]=t.scale.range;return Math.abs(i-e)}return this.ctx.scene?.canvas?.width??800}createNodeDatumContext(t,e){const{dataModel:i,processedData:s}=this;if(!i||!s)return;const n=t.scale,r=e.scale,a=s.dataSources.get(this.id)?.data??[],[o,l]=n.range,c=Math.abs(l-o);this.aggregationManager.ensureLevelForRange(c);const h=this.aggregationManager.getFilterForRange(c),u=this.canIncrementallyUpdateNodes(h!=null);return{xAxis:t,yAxis:e,rawData:a,xValues:i.resolveColumnById(this,"xValue",s),yRawValues:i.resolveColumnById(this,"yValueRaw",s),yCumulativeValues:i.resolveColumnById(this,this.yCumulativeKey(s),s),selectionValues:this.properties.yFilterKey?i.resolveColumnById(this,"yFilterRaw",s):void 0,xScale:n,yScale:r,xOffset:(n.bandwidth??0)/2,yOffset:(r.bandwidth??0)/2,size:this.properties.marker.enabled?this.properties.marker.size:0,yDomain:this.getSeriesDomain(import_ag_charts_core264.ChartAxisDirection.Y).domain,labelsEnabled:this.properties.label.enabled,animationEnabled:!this.ctx.animationManager.isSkipped(),canIncrementallyUpdate:u,dataAggregationFilter:h,range:c,xKey:this.properties.xKey,yKey:this.properties.yKey,xName:this.properties.xName,yName:this.properties.yName,legendItemName:this.properties.legendItemName,connectMissingData:this.properties.connectMissingData,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},nodes:u?this.contextNodeData.nodeData:[],spanPoints:[],nodeIndex:0}}handleDatum(t,e,i){if(e.datum=t.rawData[i],e.xDatum=t.xValues[i],e.yDatum=t.yRawValues[i],e.yCumulative=t.yCumulativeValues[i],e.selected=t.selectionValues?.[i],e.x=t.xScale.convert(e.xDatum)+t.xOffset,e.y=t.yScale.convert(e.yCumulative)+t.yOffset,!!Number.isFinite(e.x)){if(e.yDatum!=null){const s=t.labelsEnabled?this.getLabelText(e.yDatum,e.datum,t.yKey,"y",t.yDomain,this.properties.label,{value:e.yDatum,datum:e.datum,xKey:t.xKey,yKey:t.yKey,xName:t.xName,yName:t.yName,legendItemName:t.legendItemName}):void 0;if(t.canIncrementallyUpdate&&t.nodeIndex<t.nodes.length){const r=t.nodes[t.nodeIndex];r.datum=e.datum,r.datumIndex=i,r.point={x:e.x,y:e.y,size:t.size},r.midPoint={x:e.x,y:e.y},r.cumulativeValue=e.yCumulative,r.yValue=e.yDatum,r.xValue=e.xDatum,r.labelText=s,r.selected=e.selected}else t.nodes.push({series:this,datum:e.datum,datumIndex:i,yKey:t.yKey,xKey:t.xKey,point:{x:e.x,y:e.y,size:t.size},midPoint:{x:e.x,y:e.y},cumulativeValue:e.yCumulative,yValue:e.yDatum,xValue:e.xDatum,capDefaults:t.capDefaults,labelText:s,selected:e.selected});t.nodeIndex++}this.updateSpanPoints(t,e)}}updateSpanPoints(t,e){const i=t.spanPoints.at(-1);if(e.yDatum!=null){const s={point:{x:e.x,y:e.y},xDatum:e.xDatum,yDatum:e.yCumulative};Array.isArray(i)?i.push(s):i==null?t.spanPoints.push([s]):(i.skip+=1,t.spanPoints.push([s]))}else t.connectMissingData||(Array.isArray(i)||i==null?t.spanPoints.push({skip:0}):i.skip+=1)}populateNodeData(t){const e={datum:void 0,xDatum:void 0,yDatum:void 0,yCumulative:0,selected:void 0,x:0,y:0},i=t.dataAggregationFilter?.indices;let[s,n]=this.visibleRangeIndices("xValue",t.xAxis.range,i);s=Math.max(s-1,0),n=Math.min(n+1,i?.length??t.xValues.length),this.processedData.input.count<1e3&&(s=0,n=this.processedData.input.count);for(let r=s;r<n;r+=1)this.handleDatum(t,e,i?.[r]??r)}initializeResult(t){return{itemId:t.yKey,nodeData:t.nodes,labelData:t.nodes,strokeData:{itemId:t.yKey,spans:[]},scales:this.calculateScaling(),visible:this.visible,crossFiltering:!1,styles:getMarkerStyles(this,this.properties,this.properties.marker),segments:void 0}}assembleResult(t,e){const i=t.spanPoints.flatMap(s=>Array.isArray(s)?interpolatePoints(s,this.properties.interpolation):[]);return e.strokeData={itemId:t.yKey,spans:i},e.crossFiltering=t.selectionValues?.some((s,n)=>s===t.yRawValues[n])??!1,e.segments=calculateSegments(this.properties.segmentation,t.xAxis,t.yAxis,this.chart.seriesRect,this.ctx.scene,!1),e}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{paths:[e],visible:i,animationEnabled:s}=t,n=this.contextNodeData?.crossFiltering===!0,r=(0,import_ag_charts_core264.mergeDefaults)(this.getHighlightStyle(),this.getStyle()),{strokeWidth:a,stroke:o,strokeOpacity:l,lineDash:c,lineDashOffset:h,opacity:u}=r,d=this.contextNodeData?.segments;e.setProperties({segments:d,fill:void 0,lineJoin:"round",pointerEvents:1,opacity:u,stroke:o,strokeWidth:a,strokeOpacity:l*(n?CROSS_FILTER_LINE_STROKE_OPACITY_FACTOR:1),lineDash:c,lineDashOffset:h}),e.datum=d,s||(e.visible=i),updateClipPath(this,e)}updateDatumSelection(t){let{nodeData:e}=t;const{datumSelection:i}=t,{contextNodeData:s,processedData:n,axes:r,properties:a}=this,{marker:o}=a;return e=s?.crossFiltering===!0||markerEnabled(n.input.count,r[import_ag_charts_core264.ChartAxisDirection.X].scale,o)?e:[],o.isDirty()&&(i.clear(),i.cleanup()),processedDataIsAnimatable(this.processedData)?i.update(e,void 0,c=>createDatumId(c.xValue)):i.update(e)}updateDatumStyles(t){const{datumSelection:e,isHighlight:i}=t,{marker:s}=this.properties,n=this.ctx.highlightManager.getActiveHighlight();e.each((r,a)=>{if(!e.isGarbage(r)){const o=this.getHighlightState(n,t.isHighlight,a.datumIndex),l=this.getStyle(o),{stroke:c,strokeWidth:h,strokeOpacity:u}=l,d=this.makeItemStylerParams(this.dataModel,this.processedData,a.datumIndex,l.marker);a.style=this.getMarkerStyle(s,a,d,{isHighlight:i,highlightState:o},l.marker,{stroke:c,strokeWidth:h,strokeOpacity:u})}})}updateDatumNodes(t){const{contextNodeData:e}=this;if(!e)return;const{datumSelection:i,isHighlight:s}=t,n=this.ctx.animationManager.isSkipped(),r=this.getShapeFillBBox(),a=this.ctx.highlightManager.getActiveHighlight(),o=this.getDrawingMode(s,t.drawingMode);i.each((l,c)=>{const h=this.getHighlightState(a,s,c.datumIndex),u=c.style??e.styles[h];this.applyMarkerStyle(u,l,c.point,r,{applyTranslation:n,selected:c.selected}),l.drawingMode=this.resolveMarkerDrawingModeForState(o,u)}),s||this.properties.marker.markClean()}updateLabelSelection(t){return t.labelSelection.update(this.isLabelEnabled()?t.labelData:[])}updateLabelNodes(t){const{isHighlight:e=!1}=t,i=this.ctx.highlightManager?.getActiveHighlight(),s=this.makeLabelFormatterParams();t.labelSelection.each((n,r)=>{const a=getLabelStyles(this,r,s,this.properties.label,e,i),{enabled:o,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u,color:d}=a;o&&r?.labelText?(n.fontStyle=l,n.fontWeight=c,n.fontSize=h,n.fontFamily=u,n.textAlign="center",n.textBaseline="bottom",n.text=r.labelText,n.x=r.point.x,n.y=r.point.y-10,n.fill=d,n.visible=!0,n.fillOpacity=this.getHighlightStyle(e,r.datumIndex).opacity??1,n.setBoxing(a)):n.visible=!1})}makeStylerParams(t){const{id:e}=this,{marker:i,lineDash:s,lineDashOffset:n,stroke:r,strokeOpacity:a,strokeWidth:o,xKey:l,yKey:c}=this.properties,h=toHighlightString(t??0);return{marker:{fill:i.fill,fillOpacity:i.fillOpacity,size:i.size,shape:i.shape,stroke:i.stroke,strokeOpacity:i.strokeOpacity,strokeWidth:i.strokeWidth,lineDash:i.lineDash,lineDashOffset:i.lineDashOffset},highlightState:h,lineDash:s,lineDashOffset:n,seriesId:e,stroke:r,strokeOpacity:a,strokeWidth:o,xKey:l,yKey:c}}makeItemStylerParams(t,e,i,s){const{xKey:n,yKey:r}=this.properties,a=t.resolveColumnById(this,"xValue",e)[i],o=t.resolveColumnById(this,"yValueRaw",e)[i],l=t.getDomain(this,"xValue","key",e).domain,c=t.getDomain(this,this.yCumulativeKey(e),"value",e).domain,h=this.filterItemStylerFillParams(s.fill)??s.fill;return{...datumStylerProperties(a,o,n,r,l,c),xValue:a,yValue:o,...s,fill:h}}makeLabelFormatterParams(){const{xKey:t,xName:e,yKey:i,yName:s,legendItemName:n}=this.properties;return{xKey:t,xName:e,yKey:i,yName:s,legendItemName:n}}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:n,properties:r}=this,{xKey:a,xName:o,yKey:l,yName:c,tooltip:h,legendItemName:u}=r,d=r.allowNullKeys??!1,p=n[import_ag_charts_core264.ChartAxisDirection.X],g=n[import_ag_charts_core264.ChartAxisDirection.Y];if(!i||!s||!p||!g)return;const f=s.dataSources.get(this.id)?.data?.[t],y=i.resolveColumnById(this,"xValue",s)[t],m=i.resolveColumnById(this,"yValueRaw",s)[t];if(y===void 0&&!d)return;const b=this.getStyle(),v=this.makeItemStylerParams(i,s,t,b.marker),x=this.getMarkerStyle(this.properties.marker,{datumIndex:t,datum:f},v,{isHighlight:!1},b.marker);return this.formatTooltipWithContext(h,{heading:this.getAxisValueText(p,"tooltip",y,f,a,u,d),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:this.getAxisValueText(g,"tooltip",m,f,l,u),missing:isTooltipValueMissing(m)}]},{seriesId:e,datum:f,title:c,xKey:a,xName:o,yKey:l,yName:c,...x,...this.getModuleTooltipParams()})}legendItemSymbol(){const{stroke:t,strokeOpacity:e,strokeWidth:i,lineDash:s,marker:n}=this.getStyle();return{marker:{...this.getMarkerStyle(this.properties.marker,{},void 0,{isHighlight:!1,checkForHighlight:!1},{size:n.size,shape:n.shape,fill:n.fill,fillOpacity:n.fillOpacity,stroke:n.stroke,strokeOpacity:n.strokeOpacity,strokeWidth:n.strokeWidth,lineDash:n.lineDash,lineDashOffset:n.lineDashOffset}),enabled:this.properties.marker.enabled},line:{enabled:!0,stroke:t,strokeOpacity:e,strokeWidth:i,lineDash:s}}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{yKey:n,yName:r,title:a,legendItemName:o,showInLegend:l}=this.properties;return[{legendType:t,id:e,itemId:n,legendItemName:o,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:n}),label:{text:o??a??r??n},symbol:this.legendItemSymbol(),hideInLegend:!l}]}updatePaths(t){this.updateLinePaths(t.paths,t.contextData)}updateLinePaths(t,e){const i=e.strokeData.spans,[s]=t;s.path.clear(),plotLinePathStroke(s,i),s.markDirty("LineSeries")}resetDatumAnimation(t){resetMarkerSelectionsDirect([t.datumSelection])}animateEmptyUpdateReady(t){const{datumSelection:e,labelSelection:i,annotationSelections:s,contextData:n,paths:r}=t,{animationManager:a}=this.ctx;this.updateLinePaths(r,n),pathSwipeInAnimation(this,a,...r),resetMotion([e],resetMarkerPositionFn),markerSwipeScaleInAnimation(this,a,{...this.getAnimationDrawingModes(),phase:"initial"},e),seriesLabelFadeInAnimation(this,"labels",a,i),seriesLabelFadeInAnimation(this,"annotations",a,...s)}animateReadyResize(t){const{contextData:e,paths:i}=t;this.updateLinePaths(i,e),super.animateReadyResize(t)}animateWaitingUpdateReady(t){const{animationManager:e}=this.ctx,{datumSelection:i,labelSelection:s,annotationSelections:n,contextData:r,paths:a,previousContextData:o}=t,[l]=a;if(r.visible===!1&&o?.visible===!1)return;this.resetDatumAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateLinePaths(a,r)},h=()=>{e.skipCurrentBatch(),c()};if(r==null||o==null){c(),markerFadeInAnimation(this,e,"added",this.getAnimationDrawingModes(),i),staticFromToMotion(this.id,"path_properties",e,[l],{opacity:0},{opacity:this.getOpacity()},{phase:"add"}),seriesLabelFadeInAnimation(this,"labels",e,s),seriesLabelFadeInAnimation(this,"annotations",e,...n);return}if(r.crossFiltering!==o.crossFiltering){h();return}const u=prepareLinePathAnimation(r,o,this.processedData?.reduced?.diff?.[this.id],this.getOpacity());if(u===void 0){h();return}else if(u.status==="no-op")return;fromToMotion(this.id,"path_properties",e,[l],u.stroke.pathProperties),u.status==="added"?this.updateLinePaths(a,r):u.status==="removed"?this.updateLinePaths(a,o):pathMotion(this.id,"path_update",e,[l],u.stroke.path),u.hasMotion&&(markerFadeInAnimation(this,e,void 0,this.getAnimationDrawingModes(),i),seriesLabelFadeInAnimation(this,"labels",e,s),seriesLabelFadeInAnimation(this,"annotations",e,...n)),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateLinePaths(a,r)})}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new Marker}getStyle(t){const{styler:e,marker:i,lineDash:s,lineDashOffset:n,stroke:r,strokeOpacity:a,strokeWidth:o}=this.properties,{size:l,shape:c,fill:h="transparent",fillOpacity:u}=i;let d={};if(e){const p=this.makeStylerParams(t),g=this.cachedCallWithContext(e,p)??{};d=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],g,{pick:!1})??{}}return d.marker??(d.marker={}),{lineDash:d.lineDash??s,lineDashOffset:d.lineDashOffset??n,stroke:d.stroke??r,strokeOpacity:d.strokeOpacity??a,strokeWidth:d.strokeWidth??o,marker:{fill:d.marker.fill??h,fillOpacity:d.marker.fillOpacity??u,shape:d.marker.shape??c,size:d.marker.size??l,lineDash:d.marker.lineDash??i.lineDash??s,lineDashOffset:d.marker.lineDashOffset??i.lineDashOffset??n,stroke:d.marker.stroke??i.stroke??r,strokeOpacity:d.marker.strokeOpacity??i.strokeOpacity??a,strokeWidth:d.marker.strokeWidth??i.strokeWidth??o}}}getFormattedMarkerStyle(t){const e=this.getStyle(),i=this.makeItemStylerParams(this.dataModel,this.processedData,t.datumIndex,e.marker);return this.getMarkerStyle(this.properties.marker,t,i,{isHighlight:!0},void 0,e)}computeFocusBounds(t){return computeMarkerFocusBounds(this,t)}hasItemStylers(){return this.properties.styler!=null||this.properties.marker.itemStyler!=null||this.properties.label.itemStyler!=null}};LineSeries.className="LineSeries",LineSeries.type="line";var themeTemplate5={series:{stroke:import_ag_charts_core265.SAFE_STROKE_FILL_OPERATION,strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear"},marker:{shape:"circle",size:7,strokeWidth:{$isUserOption:["./stroke",1,0]},fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core265.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core265.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core265.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"}},label:{...import_ag_charts_core265.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},tooltip:{range:{$if:[{$eq:[{$path:["/tooltip/range","nearest"]},"area"]},"nearest",{$path:["/tooltip/range","nearest"]}]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:import_ag_charts_core265.MARKER_SERIES_HIGHLIGHT_STYLE,segmentation:import_ag_charts_core265.SEGMENTATION_DEFAULTS}},LineSeriesModule={type:"series",name:"line",chartType:"cartesian",stackable:!0,version:VERSION,dependencies:[CartesianChartModule],options:lineSeriesOptionsDef,predictAxis:predictCartesianNonPrimitiveAxis,defaultAxes:{y:{type:import_ag_charts_core265.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core265.CARTESIAN_POSITION.LEFT},x:{type:import_ag_charts_core265.CARTESIAN_AXIS_TYPE.CATEGORY,position:import_ag_charts_core265.CARTESIAN_POSITION.BOTTOM}},axisKeys:{[import_ag_charts_core265.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core265.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:themeTemplate5,create:t=>new LineSeries(t)},import_ag_charts_core266=require("ag-charts-core"),ScatterSeries=class extends BubbleSeries{};ScatterSeries.className="ScatterSeries",ScatterSeries.type="scatter";var themeTemplate6={series:{shape:"circle",size:7,fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core266.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core266.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core266.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},fillOpacity:.8,maxRenderedItems:2e3,label:{...import_ag_charts_core266.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},tooltip:{range:{$if:[{$eq:[{$path:["/tooltip/range","nearest"]},"area"]},"nearest",{$path:["/tooltip/range","nearest"]}]},position:{anchorTo:{$path:["/tooltip/position/anchorTo","node"]}}},highlight:import_ag_charts_core266.MULTI_SERIES_HIGHLIGHT_STYLE}},ScatterSeriesModule={type:"series",name:"scatter",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:scatterSeriesOptionsDef,predictAxis:predictCartesianAxis,defaultAxes:{x:{type:import_ag_charts_core266.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core266.CARTESIAN_POSITION.BOTTOM},y:{type:import_ag_charts_core266.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core266.CARTESIAN_POSITION.LEFT}},axisKeys:{[import_ag_charts_core266.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core266.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:themeTemplate6,create:t=>new ScatterSeries(t)},import_ag_charts_core269=require("ag-charts-core"),import_ag_charts_core267=require("ag-charts-core"),DonutTitle=class extends Caption{constructor(){super(...arguments),this.showInLegend=!1}};__decorateClass([import_ag_charts_core267.Property],DonutTitle.prototype,"showInLegend",2);var DonutInnerLabel=class extends Label{constructor(){super(...arguments),this.spacing=2}set(t,e){return super.set(t)}};__decorateClass([import_ag_charts_core267.Property],DonutInnerLabel.prototype,"text",2),__decorateClass([import_ag_charts_core267.Property],DonutInnerLabel.prototype,"spacing",2);var DonutInnerCircle=class extends import_ag_charts_core267.BaseProperties{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};__decorateClass([import_ag_charts_core267.Property],DonutInnerCircle.prototype,"fill",2),__decorateClass([import_ag_charts_core267.Property],DonutInnerCircle.prototype,"fillOpacity",2);var DonutSeriesCalloutLabel=class extends Label{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLabel.prototype,"offset",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLabel.prototype,"minAngle",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLabel.prototype,"minSpacing",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLabel.prototype,"maxCollisionOffset",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLabel.prototype,"avoidCollisions",2);var DonutSeriesSectorLabel=class extends Label{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};__decorateClass([import_ag_charts_core267.Property],DonutSeriesSectorLabel.prototype,"positionOffset",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesSectorLabel.prototype,"positionRatio",2);var DonutSeriesCalloutLine=class extends import_ag_charts_core267.BaseProperties{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLine.prototype,"colors",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLine.prototype,"length",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLine.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesCalloutLine.prototype,"itemStyler",2);var DonutSeriesProperties=class extends SeriesProperties{constructor(){super(...arguments),this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=Object.values(DEFAULT_FILLS),this.strokes=Object.values(DEFAULT_STROKES),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.hideZeroValueSectorsInLegend=!1,this.innerLabels=new import_ag_charts_core267.PropertiesArray(DonutInnerLabel),this.title=new DonutTitle,this.innerCircle=new DonutInnerCircle,this.shadow=new DropShadow,this.calloutLabel=new DonutSeriesCalloutLabel,this.sectorLabel=new DonutSeriesSectorLabel,this.calloutLine=new DonutSeriesCalloutLine,this.tooltip=makeSeriesTooltip()}};__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"angleKey",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"angleName",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"angleFilterKey",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"radiusKey",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"radiusName",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"radiusMin",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"radiusMax",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"calloutLabelKey",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"calloutLabelName",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"sectorLabelKey",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"sectorLabelName",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"legendItemKey",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"defaultColorRange",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"defaultPatternFills",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"rotation",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"outerRadiusOffset",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"outerRadiusRatio",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"innerRadiusOffset",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"innerRadiusRatio",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"sectorSpacing",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"hideZeroValueSectorsInLegend",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"innerLabels",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"title",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"innerCircle",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"calloutLabel",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"sectorLabel",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"calloutLine",2),__decorateClass([import_ag_charts_core267.Property],DonutSeriesProperties.prototype,"tooltip",2);var import_ag_charts_core268=require("ag-charts-core");function preparePieSeriesAnimationFunctions(t,e,i,s){const n=[i.convert(0),i.convert(1)],r=[s.convert(0),s.convert(1)],a=Math.PI/-2+(0,import_ag_charts_core268.toRadians)(e),o=t?"initial":"update",l=({radius:g})=>({innerRadius:n[0],outerRadius:n[0]+(n[1]-n[0])*g}),c=({radius:g})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*g});return{nodes:{toFn:(g,f,y,{prevLive:m})=>{let{startAngle:b,endAngle:v,innerRadius:x,outerRadius:S}=f;const{stroke:I,fill:D}=f.sectorFormat;if(y==="removed"&&m?(b=m.datum?.endAngle,v=m.datum?.endAngle):y==="removed"&&!m&&(b=a,v=a),y==="removed"){const A=l(f);x=A.innerRadius,S=A.outerRadius}return{startAngle:b,endAngle:v,outerRadius:S,innerRadius:x,stroke:I,...typeof D=="string"?{fill:D}:{}}},fromFn:(g,f,y,{prevFromProps:m})=>{let{startAngle:b,endAngle:v,innerRadius:x,outerRadius:S}=g,{fill:I,stroke:D}=f.sectorFormat;if(y==="updated"&&g.previousDatum==null&&(y="added"),y==="unknown"||y==="added"&&!m?(b=a,v=a,x=f.innerRadius,S=f.outerRadius):y==="added"&&m&&(b=m.endAngle??a,v=m.endAngle??a,x=m.innerRadius??f.innerRadius,S=m.outerRadius??f.outerRadius),y==="added"&&!t){const A=c(f);x=A.innerRadius,S=A.outerRadius}return y==="updated"&&(I=g.fill??I,D=(typeof g.stroke=="string"?g.stroke:void 0)??D),{startAngle:b,endAngle:v,innerRadius:x,outerRadius:S,stroke:D,phase:o,...typeof I=="string"?{fill:I}:{}}}},innerCircle:{fromFn:(g,f)=>({size:g.previousDatum?.radius??g.size??0,phase:o}),toFn:(g,f)=>({size:f.radius??0})}}}function resetPieSelectionsFn(t,e){return{startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,stroke:e.sectorFormat.stroke}}function pickByMatchingAngle(t,e){const i=e.y-t.centerY,s=e.x-t.centerX,n=Math.atan2(i,s),r=t.getItemNodes();for(const a of r)if(a.datum.missing!==!0&&(0,import_ag_charts_core268.isBetweenAngles)(n,a.startAngle,a.endAngle)){const o=Math.hypot(s,i);let l=0;return o<a.innerRadius?l=a.innerRadius-o:o>a.outerRadius&&(l=o-a.outerRadius),{datum:a.datum,distance:l}}}var PieDonutSeriesNodeEvent=class extends SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},DonutSeries=class extends PolarSeries{constructor(t){super({moduleCtx:t,categoryKey:void 0,propertyKeys:{...DEFAULT_POLAR_DIRECTION_KEYS,sectorLabel:["sectorLabelKey"],calloutLabel:["calloutLabelKey"]},propertyNames:{...DEFAULT_POLAR_DIRECTION_NAMES,sectorLabel:["sectorLabelName"],calloutLabel:["calloutLabelName"]},pickModes:[1,0],animationResetFns:{item:resetPieSelectionsFn,label:resetLabelFn}}),this.properties=new DonutSeriesProperties,this.phantomNodeData=void 0,this.backgroundGroup=new TranslatableGroup({name:`${this.id}-background`,zIndex:import_ag_charts_core269.PolarZIndexMap.BACKGROUND}),this.noVisibleData=!1,this.previousRadiusScale=new LinearScale,this.radiusScale=new LinearScale,this.phantomGroup=this.contentGroup.appendChild(new Group({name:"phantom",zIndex:-1})),this.phantomSelection=Selection.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.phantomHighlightGroup=this.highlightGroup.appendChild(new Group({name:"phantom",zIndex:-1})),this.phantomHighlightSelection=Selection.select(this.phantomHighlightGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new Group({name:"pieCalloutLabels"})),this.calloutLabelSelection=new Selection(this.calloutLabelGroup,Group),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new Group({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new Marker({shape:"circle"})),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new Marker({shape:"circle"})),this.innerLabelsGroup=this.contentGroup.appendChild(new Group({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new Group({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=Selection.select(this.innerLabelsGroup,Text),this.innerCircleSelection=Selection.select(this.innerCircleGroup,()=>new Marker({shape:"circle"})),this.surroundingRadius=void 0,this.NodeEvent=PieDonutSeriesNodeEvent,this.angleScale=new LinearScale,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2,this.phantomHighlightGroup.opacity=.2,this.innerLabelsGroup.pointerEvents=1}get calloutNodeData(){return this.phantomNodeData??this.nodeData}attachSeries(t,e,i){super.attachSeries(t,e,i),t?.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),this.backgroundGroup.remove()}setZIndex(t){super.setZIndex(t),this.backgroundGroup.zIndex=[import_ag_charts_core269.PolarZIndexMap.BACKGROUND,t]}nodeFactory(){const t=new Sector;return t.miterLimit=1e9,t}getSeriesDomain(t){return t===import_ag_charts_core269.ChartAxisDirection.Angle?{domain:this.angleScale.domain}:{domain:this.radiusScale.domain}}async processData(t){if(this.data==null)return;const{visible:e,id:i,ctx:{legendManager:s}}=this,{angleKey:n,angleFilterKey:r,radiusKey:a,calloutLabelKey:o,sectorLabelKey:l,legendItemKey:c}=this.properties,h=()=>(m,b)=>e&&s.getItemEnabled({seriesId:i,itemId:b})?m:0,u=!this.ctx.animationManager.isSkipped(),d=this.properties.allowNullKeys??!1,p=[],g=[];c?p.push(keyProperty(c,"category",{id:"legendItemKey",allowNullKey:d})):o?p.push(keyProperty(o,"category",{id:"calloutLabelKey",allowNullKey:d})):l&&p.push(keyProperty(l,"category",{id:"sectorLabelKey",allowNullKey:d}));const f=this.radiusScale.type,y=this.angleScale.type;a&&g.push(rangedValueProperty(a,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax,missingValue:this.properties.radiusMax??1,processor:h}),valueProperty(a,f,{id:"radiusRaw",processor:h}),normalisePropertyTo("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),o&&g.push(valueProperty(o,"category",{id:"calloutLabelValue",allowNullKey:d})),l&&g.push(valueProperty(l,"category",{id:"sectorLabelValue",allowNullKey:d})),c&&g.push(valueProperty(c,"category",{id:"legendItemValue",allowNullKey:d})),r&&g.push(accumulativeValueProperty(r,y,{id:"angleFilterValue",onlyPositive:!0,invalidValue:0,processor:h}),valueProperty(r,y,{id:"angleFilterRaw"}),normalisePropertyTo("angleFilterValue",[0,1],0,0)),u&&this.processedData?.reduced?.animationValidation?.uniqueKeys&&p.length>0&&g.push(diff(this.id,this.processedData)),g.push(animationValidation()),await this.requestDataModel(t,this.data,{props:[...p,accumulativeValueProperty(n,y,{id:"angleValue",onlyPositive:!0,invalidValue:0,processor:h}),valueProperty(n,y,{id:"angleRaw"}),normalisePropertyTo("angleValue",[0,1],0,0),...g]});for(const m of this.processedData?.defs?.values??[]){const{id:b,missing:v,property:x}=m,S=getMissCount(this,v);b!=="angleRaw"&&S>0&&import_ag_charts_core269.Logger.warnOnce(`no value was found for the key '${String(x)}' on ${S} data element${S>1?"s":""}`)}this.animationState.transition("updateData")}maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:t=[],phantomNodeData:e}=this.createNodeData()??{};this.nodeData=t,this.phantomNodeData=e,t.length>0&&import_ag_charts_core269.DebugMetrics.record(`${this.type}:nodeData`,t.length),this.nodeDataRefresh=!1}getProcessedDataValues(t,e){const i=t.resolveColumnById(this,"angleValue",e),s=t.resolveColumnById(this,"angleRaw",e),n=this.properties.angleFilterKey==null?void 0:t.resolveColumnById(this,"angleFilterValue",e),r=this.properties.angleFilterKey==null?void 0:t.resolveColumnById(this,"angleFilterRaw",e),a=this.properties.radiusKey?t.resolveColumnById(this,"radiusValue",e):void 0,o=this.properties.radiusKey?t.resolveColumnById(this,"radiusRaw",e):void 0,l=this.properties.calloutLabelKey?t.resolveColumnById(this,"calloutLabelValue",e):void 0,c=this.properties.sectorLabelKey?t.resolveColumnById(this,"sectorLabelValue",e):void 0,h=this.properties.legendItemKey?t.resolveColumnById(this,"legendItemValue",e):void 0;return{angleValues:i,angleRawValues:s,angleFilterValues:n,angleFilterRawValues:r,radiusValues:a,radiusRawValues:o,calloutLabelValues:l,sectorLabelValues:c,legendItemValues:h}}createNodeData(){const{id:t,processedData:e,dataModel:i,angleScale:s,ctx:{legendManager:n},visible:r}=this,{rotation:a,innerRadiusRatio:o}=this.properties;if(!i||e?.type!=="ungrouped")return;const l=this.getProcessedDataValues(i,e),{angleValues:c,angleRawValues:h,angleFilterValues:u,angleFilterRawValues:d,radiusValues:p,radiusRawValues:g,legendItemValues:f}=l,y=d?.some((D,T)=>D>h[T])??!1;let m=0,b=0;const v=[],x=d==null?void 0:[],S=e.dataSources.get(this.id)?.data??[],I=e.invalidData?.get(this.id);for(const[D,T]of S.entries()){if(I?.[D]===!0)continue;const A=y?u[D]:c[D],L=d!=null&&!y?Math.sqrt(d[D]/h[D]):1,N=s.convert(m)+(0,import_ag_charts_core269.toRadians)(a);m=A,b+=A;const k=s.convert(m)+(0,import_ag_charts_core269.toRadians)(a),w=Math.abs(k-N),E=N+w/2,O=h[D],_=(p?.[D]??1)*L,P=g?.[D],F=f?.[D],V=this.getLabels(D,T,E,w,l),B=this.getItemStyle({datum:T,datumIndex:D},!1),j={series:this,datum:T,datumIndex:D,angleValue:O,midAngle:E,midCos:Math.cos(E),midSin:Math.sin(E),startAngle:N,endAngle:k,radius:_,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(_),0),sectorFormat:B,radiusValue:P,legendItemValue:F,enabled:r&&n.getItemEnabled({seriesId:t,itemId:D}),focusable:!0,...V};v.push(j),x?.push({...j,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1})}return this.zerosumOuterRing.visible=b===0,this.zerosumInnerRing.visible=b===0&&o!=null&&o!==1&&o>0,{itemId:t,nodeData:v,labelData:v,phantomNodeData:x}}getLabelContent(t,e,i){const{id:s,ctx:n,properties:r}=this,{formatManager:a}=n,{calloutLabel:o,sectorLabel:l,calloutLabelKey:c,sectorLabelKey:h,legendItemKey:u}=r,d=r.allowNullKeys??!1,p=i.calloutLabelValues?.[t],g=i.sectorLabelValues?.[t],f=i.legendItemValues?.[t],y={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},m={callout:void 0,sector:void 0,legendItem:void 0};if(c&&(m.callout=this.getLabelText(p,e,c,"calloutLabel",[],o,{...y,value:p},d)),h&&(m.sector=this.getLabelText(g,e,h,"sectorLabel",[],l,{...y,value:g},d)),u!=null&&(f!=null||d)){const b=f??"";m.legendItem=a.format(this.callWithContext.bind(this),{type:"category",value:d?f:b,datum:e,seriesId:s,legendItemName:void 0,key:u,source:"legend-label",property:"legendItem",domain:[],boundSeries:this.getFormatterContext("legendItem")})??b}return m}getLabels(t,e,i,s,n){const{properties:r}=this,{calloutLabel:a,sectorLabel:o,legendItemKey:l}=r,c=this.getLabelContent(t,e,n),h={};return a.enabled&&c.callout&&s>=(0,import_ag_charts_core269.toRadians)(a.minAngle)&&(h.calloutLabel={...this.getTextAlignment(i),text:c.callout,hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),o.enabled&&c.sector&&(h.sectorLabel={text:c.sector}),l&&c.legendItem&&(h.legendItem={key:l,text:c.legendItem}),h}getTextAlignment(t){const e=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"top"},{textAlign:"right",textBaseline:"middle"}],i=(0,import_ag_charts_core269.normalizeAngle180)(t),s=-.75*Math.PI,n=i-s,r=Math.floor(n/(Math.PI/2)),a=(0,import_ag_charts_core269.modulus)(r,e.length);return e[a]}getFillParams(t,e,i){if(!(!(0,import_ag_charts_core269.isGradientFill)(t)||t.bounds==="item"))return{centerX:0,centerY:0,innerRadius:e,outerRadius:i}}getItemStyle({datum:t,datumIndex:e},i,s,n){const{fills:r,strokes:a,itemStyler:o}=this.properties,l=a[e],c=r[e],{fill:h,fillOpacity:u,stroke:d,strokeWidth:p,strokeOpacity:g,lineDash:f,lineDashOffset:y,cornerRadius:m,opacity:b}=(0,import_ag_charts_core269.mergeDefaults)(this.getHighlightStyle(i,e,s,n),{fill:c,stroke:l},this.properties);let v;return o&&(v=this.cachedDatumCallback(this.getDatumId(e)+(i?"-highlight":"-hide"),()=>{const x=this.makeItemStylerParams(t,e,i,{fill:h,fillOpacity:u,stroke:d,strokeWidth:p,strokeOpacity:g,lineDash:f,lineDashOffset:y,cornerRadius:m});return this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.callWithContext(o,x),{proxyPaths:{fill:["fills",`${e}`],stroke:["strokes",`${e}`]}})})),{fill:v?.fill??h,fillOpacity:v?.fillOpacity??u,stroke:v?.stroke??d,strokeWidth:v?.strokeWidth??p,strokeOpacity:v?.strokeOpacity??g,lineDash:v?.lineDash??f,lineDashOffset:v?.lineDashOffset??y,cornerRadius:v?.cornerRadius??m,opacity:b}}makeItemStylerParams(t,e,i,s){const{angleKey:n,radiusKey:r,calloutLabelKey:a,sectorLabelKey:o,legendItemKey:l}=this.properties,c=this.filterItemStylerFillParams(s.fill)??s.fill;return{datum:t,angleKey:n,radiusKey:r,calloutLabelKey:a,sectorLabelKey:o,legendItemKey:l,...s,fill:c,highlightState:this.getHighlightStateString(this.ctx.highlightManager?.getActiveHighlight(),i,e),seriesId:this.id}}getCalloutLineStyle(t,e){const{properties:i}=this;let s={};if(i.calloutLine.itemStyler){const n=this.getHighlightStateString(this.ctx.highlightManager?.getActiveHighlight(),e,t.datumIndex),r={angleKey:i.angleKey,angleName:i.angleName??i.angleKey,calloutLabelKey:i.calloutLabelKey,calloutLabelName:i.calloutLabelName??i.calloutLabelKey,datum:t.datum,highlightState:n,legendItemKey:i.legendItemKey,radiusKey:i.radiusKey,radiusName:i.radiusName??i.radiusKey,sectorLabelKey:i.sectorLabelKey,sectorLabelName:i.sectorLabelName??i.sectorLabelKey,seriesId:this.id};s=this.cachedCallWithContext(i.calloutLine.itemStyler,r)??{}}return{length:s.length??i.calloutLine.length,strokeWidth:s.strokeWidth??i.calloutLine.strokeWidth,color:s.color,colors:i.calloutLine.colors}}getInnerRadius(){const{radius:t}=this,{innerRadiusRatio:e=1,innerRadiusOffset:i=0}=this.properties,s=t*e+i;return s===t||s<0?0:s}getOuterRadius(){const{outerRadiusRatio:t,outerRadiusOffset:e}=this.properties;return Math.max(this.radius*t+e,0)}updateRadiusScale(t){const e=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=e,t&&(this.previousRadiusScale.range=e);const i=s=>({...s,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(s.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const t=Math.max(0,this.radiusScale.range[1]);if(t===0)return Number.NaN;const i=2+(this.properties.title?.spacing??0),s=Math.max(0,-t);return-t-i-s}update({seriesRect:t}){const{title:e}=this.properties,i={seriesRectWidth:t?.width,seriesRectHeight:t?.height},s=(0,import_ag_charts_core269.jsonDiff)(this.nodeDataDependencies,i)!=null;if(s&&(this._nodeDataDependencies=i),this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),e){const n=this.getTitleTranslationY();e.node.y=Number.isFinite(n)?n:0;const r=e.node.getBBox();e.node.visible=e.enabled&&Number.isFinite(n)&&!this.bboxIntersectsSurroundingSeries(r)}for(const n of[this.zerosumInnerRing,this.zerosumOuterRing])n.fillOpacity=0,n.stroke=this.properties.calloutLabel.color,n.strokeWidth=1,n.strokeOpacity=1;this.updateNodeMidPoint(),this.updateSelections(),this.updateNodes(t)}updateTitleNodes(){const{oldTitle:t}=this,{title:e}=this.properties;t!==e&&(t&&t.node.remove(),e&&(e.node.textBaseline="bottom",this.labelGroup?.appendChild(e.node)),this.oldTitle=e)}updateNodeMidPoint(){const t=e=>{const i=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,i),y:e.midSin*Math.max(0,i)}};for(const e of this.nodeData)t(e);if(this.phantomNodeData)for(const e of this.phantomNodeData)t(e)}updateSelections(){this.updateGroupSelection(),this.updateInnerCircleSelection()}updateGroupSelection(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,phantomHighlightSelection:s,calloutLabelSelection:n,labelSelection:r,highlightLabelSelection:a,innerLabelsSelection:o}=this,l=this.nodeData.map(u=>({...u,sectorFormat:{...u.sectorFormat}})),c=this.phantomNodeData?.map(u=>({...u,sectorFormat:{...u.sectorFormat}})),h=(u,d)=>{u.update(d,void 0,p=>this.getDatumId(p.datumIndex)),this.ctx.animationManager.isSkipped()&&u.cleanup()};h(t,this.nodeData),h(e,l),h(i,this.phantomNodeData??[]),h(s,c??[]),n.update(this.calloutNodeData,u=>{const d=new Line;d.tag=0,d.pointerEvents=1,u.appendChild(d);const p=new Text;p.tag=1,p.pointerEvents=1,u.appendChild(p)}),r.update(this.nodeData),a.update(l),o.update(this.properties.innerLabels,u=>{u.pointerEvents=1})}updateInnerCircleSelection(){const{innerCircle:t}=this.properties;let e=0;const i=this.getInnerRadius();if(i>0){const n=Math.min(i,this.getOuterRadius()),r=1;e=Math.ceil(n*2+r)}const s=t?[{radius:e}]:[];this.innerCircleSelection.update(s)}updateNodes(t){const e=this.ctx.highlightManager.getActiveHighlight(),{visible:i,dataModel:s,processedData:n}=this;if(this.backgroundGroup.visible=i,this.contentGroup.visible=i,!s||!n)return;const{legendItemValues:r}=this.getProcessedDataValues(s,n),a=this.isSeriesHighlighted(e,r),o=this.ctx.chartService.highlight?.drawingMode??"overlay";this.highlightGroup.visible=i&&a,this.labelGroup.visible=i,this.innerCircleSelection.each((p,{radius:g})=>{p.setProperties({fill:this.properties.innerCircle?.fill,opacity:this.properties.innerCircle?.fillOpacity,size:g})});const l=this.radiusScale.range[0],c=this.radiusScale.range[1],h=this.getShapeFillBBox(),u=this.ctx.animationManager.isSkipped(),d=(p,g,f,y,m)=>{const b=this.getItemStyle(g,y,void 0,r);g.sectorFormat.fill=b.fill,g.sectorFormat.stroke=b.stroke,u&&(p.startAngle=g.startAngle,p.endAngle=g.endAngle,p.innerRadius=g.innerRadius,p.outerRadius=g.outerRadius),(y||u)&&(p.fill=b.fill,p.stroke=b.stroke);const v=this.getFillParams(b.fill,l,c);p.setStyleProperties(b,h,v),p.drawingMode=m,p.cornerRadius=b.cornerRadius,p.fillShadow=this.properties.shadow;const x=Math.max((this.properties.sectorSpacing+(b.stroke==null?0:b.strokeWidth))/2,0);p.inset=x,p.lineJoin=this.properties.sectorSpacing>=0||x>0?"miter":"round"};this.itemSelection.each((p,g,f)=>d(p,g,f,!1,"overlay")),this.phantomSelection.each((p,g,f)=>d(p,g,f,!1,"overlay")),this.highlightSelection.each((p,g,f)=>{d(p,g,f,!0,o),p.visible=g.datumIndex===e?.datumIndex}),this.phantomHighlightSelection.each((p,g,f)=>{d(p,g,f,!0,o),p.visible=g.datumIndex===e?.datumIndex}),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(t),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{strokes:t}=this.properties,{offset:e}=this.properties.calloutLabel,i=this.ctx.highlightManager?.getActiveHighlight(),s=this.isSeriesHighlighted(i);for(const n of this.calloutLabelSelection.selectByTag(0)){const r=n.closestDatum(),a=s&&this.isItemHighlighted(i,r.datumIndex)===!0,{length:o,strokeWidth:l,color:c,colors:h}=this.getCalloutLineStyle(r,!1),u=l,d=(0,import_ag_charts_core269.isStringFillArray)(h)?h:t,{calloutLabel:p,outerRadius:g,datumIndex:f}=r;if(p?.text&&!p.hidden&&g!==0){n.visible=!0,n.strokeWidth=u,n.stroke=c??d[f%d.length],n.strokeOpacity=this.getHighlightStyle(a,r.datumIndex).opacity??1,n.fill=void 0;const y=r.midCos*g,m=r.midSin*g;let b=r.midCos*(g+o),v=r.midSin*(g+o);if((p.collisionTextAlign??p.collisionOffsetY!==0)&&p.box!=null){const S=p.box;let I=b,D=v;b<S.x?I=S.x:b>S.x+S.width&&(I=S.x+S.width),v<S.y?D=S.y:v>S.y+S.height&&(D=S.y+S.height);const T=I-b,A=D-v,L=Math.sqrt(Math.pow(T,2)+Math.pow(A,2)),N=L-e;N>0&&(b=b+T*N/L,v=v+A*N/L)}n.x1=y,n.y1=m,n.x2=b,n.y2=v}else n.visible=!1}}getLabelOverflow(t,e){const i=-this.centerX,s=i+e.width,n=-this.centerY,r=n+e.height,a=1;let o=t.width;t.x+a<i?o=(t.x+t.width-i)/t.width:t.x+t.width-a>s&&(o=(s-t.x)/t.width);const l=t.y+a<n||t.y+t.height-a>r,c=this.bboxIntersectsSurroundingSeries(t);return{maxWidth:o,hasVerticalOverflow:l,hasSurroundingSeriesOverflow:c}}bboxIntersectsSurroundingSeries(t){const{surroundingRadius:e}=this;if(e==null)return!1;const i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=e**2;return i.some(n=>n.x**2+n.y**2>s)}computeCalloutLabelCollisionOffsets(){const{radiusScale:t}=this,{calloutLabel:e}=this.properties,{offset:i,minSpacing:s}=e,n=t.convert(0),r=y=>!y.calloutLabel||y.outerRadius===0,a=this.calloutNodeData,o=a.filter(y=>!r(y));for(const y of o){const m=y.calloutLabel;m!=null&&(m.hidden=!1,m.collisionTextAlign=void 0,m.collisionOffsetY=0)}if(o.length<=1)return;const l=o.filter(y=>y.midCos<0).sort((y,m)=>y.midSin-m.midSin),c=o.filter(y=>y.midCos>=0).sort((y,m)=>y.midSin-m.midSin),h=o.filter(y=>y.midSin<0&&y.calloutLabel?.textAlign==="center").sort((y,m)=>y.midCos-m.midCos),u=o.filter(y=>y.midSin>=0&&y.calloutLabel?.textAlign==="center").sort((y,m)=>y.midCos-m.midCos),d=y=>{const m=y.calloutLabel;if(m==null)return BBox.zero.clone();const b=this.getLabelStyle(y,e,"calloutLabel"),v=expandLabelPadding(b),x=this.getCalloutLineStyle(y,!1).length,S=y.outerRadius+x+i,I=y.midCos*S,D=y.midSin*S+m.collisionOffsetY,T=m.collisionTextAlign??m.textAlign,A=m.textBaseline;return Text.measureBBox(m.text,I,D,{font:this.properties.calloutLabel,textAlign:T,textBaseline:A}).grow(v)},p=(y,m,b)=>{const v=d(y).grow(s/2),x=d(m).grow(s/2);v.x<x.x+x.width&&v.x+v.width>x.x&&(b==="to-top"?v.y<x.y+x.height:v.y+v.height>x.y)&&(m.calloutLabel.collisionOffsetY=b==="to-top"?v.y-x.y-x.height:v.y+v.height-x.y)},g=y=>{const m=y.slice().sort((v,x)=>Math.abs(v.midSin)-Math.abs(x.midSin))[0],b=y.indexOf(m);for(let v=b-1;v>=0;v--){const x=y[v+1],S=y[v];p(x,S,"to-top")}for(let v=b+1;v<y.length;v++){const x=y[v-1],S=y[v];p(x,S,"to-bottom")}},f=y=>{const m=o.some(D=>D.calloutLabel.collisionOffsetY!==0),b=y.map(D=>d(D)),v=b.map(D=>D.clone().grow(s/2));let x=!1;for(let D=0;D<v.length&&!x;D++){const T=v[D];for(let A=D+1;A<y.length;A++){const L=v[A];if(T.collidesBBox(L)){x=!0;break}}}const S=a.map(D=>{const{startAngle:T,endAngle:A,outerRadius:L}=D;return{startAngle:T,endAngle:A,innerRadius:n,outerRadius:L}}),I=b.some(D=>S.some(T=>boxCollidesSector(D,T)));if(!(!x&&!m&&!I))for(const D of y){if(D.calloutLabel.textAlign!=="center")continue;const T=D.calloutLabel;D.midCos<0?T.collisionTextAlign="right":D.midCos>0?T.collisionTextAlign="left":T.collisionTextAlign="center"}};g(l),g(c),f(h),f(u)}getLabelStyle(t,e,i,s=!1){const n=this.ctx.highlightManager?.getActiveHighlight();return getLabelStyles(this,t,this.properties,e,s,n,["series",`${this.declarationOrder}`,i])}updateCalloutLabelNodes(t){const{radiusScale:e}=this,{calloutLabel:i}=this.properties,s=new Text,n=this.ctx.highlightManager?.getActiveHighlight(),r=this.isSeriesHighlighted(n);for(const a of this.calloutLabelSelection.selectByTag(1)){const o=a.closestDatum(),l=o.calloutLabel,c=e.convert(o.radius),h=Math.max(0,c);if(!l?.text||h===0||l.hidden){a.visible=!1;continue}const u=r&&this.isItemHighlighted(n,o.datumIndex)===!0,d=this.getLabelStyle(o,i,"calloutLabel",u),p=this.getCalloutLineStyle(o,!1).length,g=h+p+i.offset,f=o.midCos*g,y=o.midSin*g+l.collisionOffsetY,m={textAlign:l.collisionTextAlign??l.textAlign,textBaseline:l.textBaseline};s.text=l.text,s.x=f,s.y=y,s.setFont(d),s.setAlign(m),s.setBoxing(d);const b=s.getBBox();let v=l.text,x=!0;if(i.avoidCollisions){const{maxWidth:S,hasVerticalOverflow:I}=this.getLabelOverflow(b,t);if(b.width>S){const D={font:this.properties.calloutLabel,textWrap:"on-space",overflow:"hide",maxWidth:S};v=(0,import_ag_charts_core269.wrapTextOrSegments)(l.text,D)}x=!I}a.text=v,a.x=f,a.y=y,a.setFont(d),a.setAlign(m),a.setBoxing(d),a.fill=d.color,a.fillOpacity=this.getHighlightStyle(u,o.datumIndex).opacity??1,a.visible=x}}computeLabelsBBox(t,e){const{calloutLabel:i}=this.properties,{offset:s,maxCollisionOffset:n,minSpacing:r}=i;if(!i.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const a=[],o=new Text;let l;const{title:c}=this.properties;if(c?.text&&c.enabled){const h=this.getTitleTranslationY();Number.isFinite(h)&&(o.text=c.text,o.x=0,o.y=h,o.setFont(c),o.setAlign({textBaseline:"bottom",textAlign:"center"}),l=o.getBBox(),a.push(l))}for(const h of this.calloutNodeData){const u=h.calloutLabel;if(!u||h.outerRadius===0)continue;const d=this.getLabelStyle(h,i,"calloutLabel"),p=this.getCalloutLineStyle(h,!1).length,g=h.outerRadius+p+s,f=h.midCos*g,y=h.midSin*g+u.collisionOffsetY;o.text=u.text,o.x=f,o.y=y,o.setFont(d),o.setAlign({textAlign:u.collisionTextAlign??u.textAlign,textBaseline:u.textBaseline}),o.setBoxing(d);const m=o.getBBox();if(u.box=m,Math.abs(u.collisionOffsetY)>n){u.hidden=!0;continue}if(l){const b=-this.centerY,v=new BBox(l.x-r,b,l.width+2*r,l.y+l.height+r-b);if(m.collidesBBox(v)){u.hidden=!0;continue}}if(t.hideWhenNecessary){const{maxWidth:b,hasVerticalOverflow:v,hasSurroundingSeriesOverflow:x}=this.getLabelOverflow(m,e),S=m.width>b;if(v||S||x){u.hidden=!0;continue}}u.hidden=!1,a.push(m)}return a.length===0?null:BBox.merge(a)}updateSectorLabelNodes(){const{properties:t}=this,{positionOffset:e,positionRatio:i}=this.properties.sectorLabel,s=this.ctx.highlightManager?.getActiveHighlight(),n=this.isSeriesHighlighted(s),r=this.radiusScale.convert(0),a=r<=0&&this.ctx.legendManager.getData(this.id)?.filter(c=>c.enabled).length===1,o={textAlign:"center",textBaseline:"middle"},l=c=>c.each((h,u)=>{const{outerRadius:d,startAngle:p,endAngle:g}=u,f=n&&this.isItemHighlighted(s,u.datumIndex)===!0;let y=!1;if(u.sectorLabel&&d!==0){const m=this.getLabelStyle(u,t.sectorLabel,"sectorLabel",f),b=r*(1-i)+d*i+e;h.fill=m.color,h.fillOpacity=this.getHighlightStyle(f,u.datumIndex).opacity??1,h.text=u.sectorLabel.text,a?(h.x=0,h.y=0):(h.x=u.midCos*b,h.y=u.midSin*b),h.setFont(m),h.setAlign(o),h.setBoxing(m);const v=h.getBBox(),x=[[v.x,v.y],[v.x+v.width,v.y],[v.x+v.width,v.y+v.height],[v.x,v.y+v.height]],S={startAngle:p,endAngle:g,innerRadius:r,outerRadius:d};x.every(([I,D])=>isPointInSector(I,D,S))&&(y=!0)}h.visible=y});l(this.labelSelection),l(this.highlightLabelSelection)}updateInnerLabelNodes(){const t=[],e=[];this.innerLabelsSelection.each((h,u)=>{const{fontStyle:d,fontWeight:p,fontSize:g,fontFamily:f,color:y}=u;h.fontStyle=d,h.fontWeight=p,h.fontSize=g,h.fontFamily=f,h.text=u.text,h.x=0,h.y=0,h.fill=y,h.textAlign="center",t.push(h.getBBox()),e.push(u.spacing)});const i=h=>h===0?0:e[h],s=h=>h===e.length-1?0:e[h],n=t.reduce((h,u)=>Math.max(h,u.width),0),r=t.reduce((h,u,d)=>h+u.height+i(d)+s(d),0),a=this.getInnerRadius(),l=Math.sqrt(Math.pow(n/2,2)+Math.pow(r/2,2))<=(a>0?a:this.getOuterRadius()),c=[];for(let h=0,u=-r/2;h<t.length;h++){const p=t[h].height+u+i(h);c.push(p),u=p+s(h)}this.innerLabelsSelection.each((h,u,d)=>{h.visible=l,Array.isArray(h.text)?h.y=c[d]-t[d].height:h.y=c[d]})}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2,this.zerosumInnerRing.size=this.getInnerRadius()*2}pickNodeClosestDatum(t){return pickByMatchingAngle(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:n,ctx:{formatManager:r}}=this,{legendItemKey:a,calloutLabelKey:o,calloutLabelName:l,sectorLabelKey:c,sectorLabelName:h,angleKey:u,angleName:d,radiusKey:p,radiusName:g,tooltip:f}=n,y=this.properties.title.node.getPlainText();if(!i||!s)return;const m=s.dataSources.get(this.id)?.data?.[t],b=this.getProcessedDataValues(i,s),{angleRawValues:v}=b,x=v[t],S=this.getLabelContent(t,m,b),I=S.legendItem??S.callout??S.sector??d,D=(0,import_ag_charts_core269.extractDomain)(i.getDomain(this,"angleRaw","value",s)),T=r.format(this.callWithContext.bind(this),{type:"number",value:x,datum:m,seriesId:e,legendItemName:void 0,key:u,source:"tooltip",property:"angle",domain:D,boundSeries:this.getFormatterContext("angle"),fractionDigits:void 0,visibleDomain:void 0})??(0,import_ag_charts_core269.formatValue)(x,3);return this.formatTooltipWithContext(f,{title:y,symbol:this.legendItemSymbol(t),data:[{label:(0,import_ag_charts_core269.toPlainText)(I),fallbackLabel:u,value:T}]},{seriesId:e,datum:m,title:d,legendItemKey:a,calloutLabelKey:o,calloutLabelName:l,sectorLabelKey:c,sectorLabelName:h,angleKey:u,angleName:d,radiusKey:p,radiusName:g,...this.getItemStyle({datum:m,datumIndex:t},!1)})}legendItemSymbol(t){const e=this.processedData?.dataSources.get(this.id)?.data?.[t],i=this.getItemStyle({datum:e,datumIndex:t},!1),{fillOpacity:s,strokeOpacity:n,strokeWidth:r,lineDash:a,lineDashOffset:o}=this.properties;let{fill:l}=i;const{stroke:c}=i;return(0,import_ag_charts_core269.isGradientFill)(l)&&(l={...l,gradient:"linear",rotation:0,reverse:!1}),{marker:{fill:l,stroke:c,fillOpacity:s,strokeOpacity:n,strokeWidth:r,lineDash:a,lineDashOffset:o}}}getLegendData(t){const{visible:e,processedData:i,dataModel:s,id:n,ctx:{legendManager:r}}=this;if(!s||!i||t!=="category")return[];const{angleKey:a,calloutLabelKey:o,sectorLabelKey:l,legendItemKey:c,showInLegend:h}=this.properties;if(!c&&(!o||o===a)&&(!l||l===a))return[];const u=this.getProcessedDataValues(s,i),{angleRawValues:d}=u,p=this.properties.title?.showInLegend&&this.properties.title.text,g=[],f=this.properties.hideZeroValueSectorsInLegend,y=i.dataSources.get(this.id)?.data,m=i.invalidData?.get(this.id);for(let b=0;b<i.input.count;b++){const v=y?.[b],x=d[b];if(m?.[b]===!0||f&&x===0)continue;const S=[];p&&S.push(p);const I=this.getLabelContent(b,v,u);c&&I.legendItem!==void 0?S.push(I.legendItem):o&&o!==a&&I.callout!==void 0?S.push(I.callout):l&&l!==a&&I.sector!==void 0&&S.push(I.sector),S.length!==0&&g.push({legendType:"category",id:n,datum:v,itemId:b,seriesId:n,hideToggleOtherSeries:!0,enabled:e&&r.getItemEnabled({seriesId:n,itemId:b}),label:{text:S.map(D=>(0,import_ag_charts_core269.toPlainText)(D)).join(" - ")},symbol:this.legendItemSymbol(b),legendItemName:c==null?void 0:v[c],hideInLegend:!h})}return g}setLegendState(t){const{id:e,ctx:{legendManager:i,updateService:s}}=this;for(const[n,r]of t.entries())i.toggleItem(r,e,n);i.update(),s.update(import_ag_charts_core269.ChartUpdateType.SERIES_UPDATE)}animateEmptyUpdateReady(t){const{animationManager:e}=this.ctx,i=preparePieSeriesAnimationFunctions(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);fromToMotion(this.id,"nodes",e,[this.itemSelection,this.highlightSelection,this.phantomSelection,this.phantomHighlightSelection],i.nodes,(s,n)=>this.getDatumId(n.datumIndex)),fromToMotion(this.id,"innerCircle",e,[this.innerCircleSelection],i.innerCircle),seriesLabelFadeInAnimation(this,"callout",e,this.calloutLabelSelection),seriesLabelFadeInAnimation(this,"sector",e,this.labelSelection,this.highlightLabelSelection),seriesLabelFadeInAnimation(this,"inner",e,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,phantomHighlightSelection:s,processedData:n,radiusScale:r,previousRadiusScale:a}=this,{animationManager:o}=this.ctx,l=n?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const c=(l?.moved.size??0)===0,h=(n?.defs.keys.length??0)>0,u=n?.reduced?.animationValidation?.uniqueKeys??!0;(!c||!h||!u)&&this.ctx.animationManager.skipCurrentBatch();const d=!this.nodeData.some(g=>g.enabled),p=preparePieSeriesAnimationFunctions(!1,this.properties.rotation,r,a);fromToMotion(this.id,"nodes",o,[t,e,i,s],p.nodes,(g,f)=>this.getDatumId(f.datumIndex),l),fromToMotion(this.id,"innerCircle",o,[this.innerCircleSelection],p.innerCircle),seriesLabelFadeInAnimation(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),seriesLabelFadeInAnimation(this,"sector",this.ctx.animationManager,this.labelSelection,this.highlightLabelSelection),this.noVisibleData!==d&&(this.noVisibleData=d,seriesLabelFadeInAnimation(this,"inner",this.ctx.animationManager,this.innerLabelsSelection)),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,phantomHighlightSelection:s,radiusScale:n,previousRadiusScale:r}=this,{animationManager:a}=this.ctx,o=preparePieSeriesAnimationFunctions(!1,this.properties.rotation,n,r);fromToMotion(this.id,"nodes",a,[t,e,i,s],o.nodes,(l,c)=>this.getDatumId(c.datumIndex)),fromToMotion(this.id,"innerCircle",a,[this.innerCircleSelection],o.innerCircle),seriesLabelFadeOutAnimation(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),seriesLabelFadeOutAnimation(this,"sector",this.ctx.animationManager,this.labelSelection,this.highlightLabelSelection),seriesLabelFadeOutAnimation(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumId(t){const{dataModel:e,processedData:i}=this;if(!e||!i)return`${t}`;const{calloutLabelKey:s,sectorLabelKey:n,legendItemKey:r}=this.properties;if(!i.reduced?.animationValidation?.uniqueKeys)return`${t}`;if(r){const a=e.resolveKeysById(this,"legendItemKey",i);return createDatumId(a[t])}else if(s){const a=e.resolveKeysById(this,"calloutLabelKey",i);return createDatumId(a[t])}else if(n){const a=e.resolveKeysById(this,"sectorLabelKey",i);return createDatumId(a[t])}return`${t}`}hasItemStylers(){return!(this.properties.itemStyler==null&&this.properties.calloutLabel.itemStyler==null&&this.properties.sectorLabel.itemStyler==null&&this.properties.innerLabels.every(t=>t.itemStyler==null))}};DonutSeries.className="DonutSeries",DonutSeries.type="donut";var import_ag_charts_core271=require("ag-charts-core"),import_ag_charts_core270=require("ag-charts-core"),pieTheme={series:{title:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:import_ag_charts_core270.FONT_SIZE_RATIO.LARGE},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},spacing:5},calloutLabel:{...import_ag_charts_core270.LABEL_BOXING_DEFAULTS,enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},offset:3,minAngle:.001},sectorLabel:{...import_ag_charts_core270.LABEL_BOXING_DEFAULTS,enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"chartBackgroundColor"},positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2,colors:{$map:[{$if:[{$or:[{$isGradient:{$value:"$1"}},{$isPattern:{$value:"$1"}},{$isImage:{$value:"$1"}}]},{$path:["../../strokes/$index",{$ref:"foregroundColor"}]},{$value:"$1"}]},{$if:[{$eq:[{$path:"../strokeWidth"},0]},{$path:"../fills"},{$path:"../strokes"}]}]}},fills:{$applyCycle:[{$cacheMax:{$size:{$path:["./data",{$path:"/data"}]}}},{$palette:"fills"},{$applySwitch:[{$path:["/type",void 0,{$value:"$1"}]},{$value:"$1"},["gradient",import_ag_charts_core270.FILL_GRADIENT_RADIAL_REVERSED_SERIES_DEFAULTS],["pattern",import_ag_charts_core270.FILL_PATTERN_DEFAULTS],["image",import_ag_charts_core270.FILL_IMAGE_DEFAULTS]]}]},strokes:{$applyCycle:[{$cacheMax:{$size:{$path:["./data",{$path:"/data"}]}}},{$palette:"strokes"}]},fillOpacity:1,strokeOpacity:1,strokeWidth:{$isUserOption:["./strokes/0",2,0]},lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:import_ag_charts_core270.DEFAULT_SHADOW_COLOUR,xOffset:3,yOffset:3,blur:5},highlight:import_ag_charts_core270.PART_WHOLE_HIGHLIGHT_STYLE},legend:{enabled:!0}},donutTheme={...pieTheme,series:{...pieTheme.series,innerRadiusRatio:{$if:[{$eq:[{$path:["./innerRadiusOffset",void 0]},void 0]},.7,void 0]},innerLabels:{$apply:{...import_ag_charts_core271.LABEL_BOXING_DEFAULTS,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:2}},highlight:import_ag_charts_core271.PART_WHOLE_HIGHLIGHT_STYLE}},DonutSeriesModule={type:"series",name:"donut",chartType:"polar",version:VERSION,dependencies:[PolarChartModule],options:donutSeriesOptionsDef,themeTemplate:donutTheme,create:t=>new DonutSeries(t)},PieSeries=class extends DonutSeries{};PieSeries.className="PieSeries",PieSeries.type="pie";var PieSeriesModule={type:"series",name:"pie",chartType:"polar",version:VERSION,dependencies:[PolarChartModule],options:pieSeriesOptionsDef,themeTemplate:pieTheme,create:t=>new PieSeries(t)},import_ag_charts_core273=require("ag-charts-core"),import_ag_charts_core272=require("ag-charts-core"),Locale=class extends import_ag_charts_core272.AbstractModuleInstance{constructor(t){super(),this.ctx=t,this.localeText=void 0}};__decorateClass([(0,import_ag_charts_core272.ObserveChanges)(t=>{t.ctx.localeManager.setLocaleText(t.localeText)}),import_ag_charts_core272.Property],Locale.prototype,"localeText",2),__decorateClass([(0,import_ag_charts_core272.ObserveChanges)(t=>{t.ctx.localeManager.setLocaleTextFormatter(t.getLocaleText)}),import_ag_charts_core272.Property],Locale.prototype,"getLocaleText",2);var LocaleModule={type:"plugin",name:"locale",version:VERSION,options:{localeText:import_ag_charts_core273.object,getLocaleText:(0,import_ag_charts_core273.callbackOf)(import_ag_charts_core273.string)},create:t=>new Locale(t)},import_ag_charts_core274=require("ag-charts-core"),NumberAxisModule={type:"axis",name:"number",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:numberAxisOptionsDefs,themeTemplate:{line:{enabled:!1}},create:t=>new NumberAxis(t)},import_ag_charts_core275=require("ag-charts-core"),LogAxisModule={type:"axis",name:"log",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:logAxisOptionsDefs,themeTemplate:{base:10,line:{enabled:!1}},create:t=>new LogAxis(t)},import_ag_charts_core276=require("ag-charts-core"),TimeAxisModule={type:"axis",name:"time",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:timeAxisOptionsDefs,themeTemplate:{gridLine:{enabled:!1}},create:t=>new TimeAxis(t)},import_ag_charts_core277=require("ag-charts-core"),CategoryAxisModule={type:"axis",name:"category",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:categoryAxisOptionsDefs,themeTemplate:{groupPaddingInner:.1,label:{autoRotate:!0,wrapping:"on-space"},gridLine:{enabled:!1},interval:{placement:"between"}},create:t=>new CategoryAxis(t)},import_ag_charts_core278=require("ag-charts-core"),GroupedCategoryAxisModule={type:"axis",name:"grouped-category",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:groupedCategoryAxisOptionsDefs,themeTemplate:{tick:{enabled:!0,stroke:{$ref:"separationLinesColor"}},label:{spacing:10,rotation:270,wrapping:"on-space"},maxThicknessRatio:.5,paddingInner:.4,groupPaddingInner:.2},create:t=>new GroupedCategoryAxis(t)},import_ag_charts_core280=require("ag-charts-core"),import_ag_charts_core279=require("ag-charts-core"),UnitTimeAxis=class extends DiscreteTimeAxis{constructor(t){super(t,new UnitTimeScale,!1),this.parentLevel=new TimeAxisParentLevel,this.min=void 0,this.max=void 0,this.preferredMin=void 0,this.preferredMax=void 0,this.unit=void 0,this.defaultUnit=void 0}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}hasDefinedDomain(){const{min:t,max:e}=this;return t!=null&&e!=null&&t<e}isCategoryLike(){return!0}processData(){super.processData();let t;const{domain:e}=this.dataDomain;if(e.length===2&&e[0].valueOf()===e[1].valueOf())t=(0,import_ag_charts_core279.lowestGranularityUnitForValue)(e[0]);else{const{boundSeries:i,direction:s,min:n,max:r}=this;t=calculateDefaultUnit(i,s,n,r)}(0,import_ag_charts_core279.objectsEqual)(this.defaultUnit,t)||(this.defaultUnit=t)}updateScale(){super.updateScale(),this.scale.interval=this.unit??this.defaultUnit}normaliseDataDomain(t){const{extent:e,clipped:i}=(0,import_ag_charts_core279.normalisedTimeExtentWithMetadata)(t,this.min,this.max,this.preferredMin,this.preferredMax);return{domain:e,clipped:i}}tickFormatParams(t,e,i,s){s??(s=(0,import_ag_charts_core279.lowestGranularityUnitForTicks)(e));const n=(0,import_ag_charts_core279.dateTruncationForDomain)(t),r=(0,import_ag_charts_core279.intervalUnit)(s),a=(0,import_ag_charts_core279.intervalStep)(s),o=(0,import_ag_charts_core279.intervalEpoch)(s);return{type:"date",unit:r,step:a,epoch:o,truncateDate:n}}datumFormatParams(t,e,i,s,n){const r=this.unit??this.defaultUnit??"millisecond";s??(s=r);const{datum:a,seriesId:o,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p}=e,g=(0,import_ag_charts_core279.intervalUnit)(s),f=(0,import_ag_charts_core279.intervalStep)(s),y=(0,import_ag_charts_core279.intervalEpoch)(s);return{type:"date",value:(0,import_ag_charts_core279.intervalFloor)(r,t),datum:a,seriesId:o,legendItemName:l,key:c,source:h,property:u,domain:d,boundSeries:p,unit:g,step:f,epoch:y,style:n}}};UnitTimeAxis.className="UnitTimeAxis",UnitTimeAxis.type="unit-time",__decorateClass([import_ag_charts_core279.Property],UnitTimeAxis.prototype,"parentLevel",2),__decorateClass([import_ag_charts_core279.Property],UnitTimeAxis.prototype,"min",2),__decorateClass([import_ag_charts_core279.Property],UnitTimeAxis.prototype,"max",2),__decorateClass([import_ag_charts_core279.Property],UnitTimeAxis.prototype,"preferredMin",2),__decorateClass([import_ag_charts_core279.Property],UnitTimeAxis.prototype,"preferredMax",2),__decorateClass([import_ag_charts_core279.Property],UnitTimeAxis.prototype,"unit",2);var UnitTimeAxisModule={type:"axis",name:"unit-time",chartType:"cartesian",version:VERSION,dependencies:[CartesianChartModule],options:unitTimeAxisOptionsDefs,themeTemplate:{groupPaddingInner:.1,label:{autoRotate:!1},gridLine:{enabled:!1},parentLevel:{enabled:!0},interval:{placement:"between"}},create:t=>new UnitTimeAxis(t)},import_ag_charts_core281=require("ag-charts-core"),AllCartesianAxesModule=[NumberAxisModule,LogAxisModule,TimeAxisModule,CategoryAxisModule,GroupedCategoryAxisModule,UnitTimeAxisModule],AllCartesianSeriesModule=[AreaSeriesModule,BarSeriesModule,BubbleSeriesModule,HistogramSeriesModule,LineSeriesModule,ScatterSeriesModule],AllCartesianModule=[AllCartesianAxesModule,AllCartesianSeriesModule,LegendModule,LocaleModule].flat(),AllPolarModule=[PolarChartModule,DonutSeriesModule,PieSeriesModule,LegendModule,LocaleModule],AllCommunityModule=[AllCartesianModule,AllPolarModule,SparklinePresetModule].flat(),import_ag_charts_core285=require("ag-charts-core"),integrated_charts_scene_exports={};__export(integrated_charts_scene_exports,{Arc:()=>Arc,BBox:()=>BBox,Caption:()=>Caption,CategoryScale:()=>CategoryScale,Group:()=>Group,Line:()=>Line,LinearScale:()=>LinearScale,Marker:()=>Marker,Path:()=>Path,RadialColumnShape:()=>RadialColumnShape,Rect:()=>Rect,Scene:()=>Scene,Sector:()=>Sector,Shape:()=>Shape,TranslatableGroup:()=>TranslatableGroup,getRadialColumnWidth:()=>getRadialColumnWidth,toRadians:()=>import_ag_charts_core282.toRadians});var import_ag_charts_core282=require("ag-charts-core"),integrated_charts_theme_exports={};__export(integrated_charts_theme_exports,{ChartTheme:()=>ChartTheme,getChartTheme:()=>getChartTheme,resolveOperation:()=>resolveOperation,themeNames:()=>themeNames,themeSymbols:()=>themeSymbols,themes:()=>themes});var import_ag_charts_core283=require("ag-charts-core");__reExport(integrated_charts_theme_exports,require("ag-charts-core"));var themeSymbols={DEFAULT_ANNOTATION_HANDLE_FILL:import_ag_charts_core283.DEFAULT_ANNOTATION_HANDLE_FILL,DEFAULT_ANNOTATION_STATISTICS_COLOR:import_ag_charts_core283.DEFAULT_ANNOTATION_STATISTICS_COLOR,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:import_ag_charts_core283.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:import_ag_charts_core283.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:import_ag_charts_core283.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,DEFAULT_ANNOTATION_STATISTICS_FILL:import_ag_charts_core283.DEFAULT_ANNOTATION_STATISTICS_FILL,DEFAULT_ANNOTATION_STATISTICS_STROKE:import_ag_charts_core283.DEFAULT_ANNOTATION_STATISTICS_STROKE,DEFAULT_CAPTION_ALIGNMENT:import_ag_charts_core283.DEFAULT_CAPTION_ALIGNMENT,DEFAULT_CAPTION_LAYOUT_STYLE:import_ag_charts_core283.DEFAULT_CAPTION_LAYOUT_STYLE,DEFAULT_FIBONACCI_STROKES:import_ag_charts_core283.DEFAULT_FIBONACCI_STROKES,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:import_ag_charts_core283.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:import_ag_charts_core283.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,DEFAULT_POLAR_SERIES_STROKE:import_ag_charts_core283.DEFAULT_POLAR_SERIES_STROKE,DEFAULT_SHADOW_COLOUR:import_ag_charts_core283.DEFAULT_SHADOW_COLOUR,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:import_ag_charts_core283.DEFAULT_SPARKLINE_CROSSHAIR_STROKE,DEFAULT_TEXTBOX_COLOR:import_ag_charts_core283.DEFAULT_TEXTBOX_COLOR,DEFAULT_TEXTBOX_FILL:import_ag_charts_core283.DEFAULT_TEXTBOX_FILL,DEFAULT_TEXTBOX_STROKE:import_ag_charts_core283.DEFAULT_TEXTBOX_STROKE,DEFAULT_TEXT_ANNOTATION_COLOR:import_ag_charts_core283.DEFAULT_TEXT_ANNOTATION_COLOR,DEFAULT_TOOLBAR_POSITION:import_ag_charts_core283.DEFAULT_TOOLBAR_POSITION,IS_DARK_THEME:import_ag_charts_core283.IS_DARK_THEME,PALETTE_ALT_DOWN_FILL:import_ag_charts_core283.PALETTE_ALT_DOWN_FILL,PALETTE_ALT_DOWN_STROKE:import_ag_charts_core283.PALETTE_ALT_DOWN_STROKE,PALETTE_ALT_NEUTRAL_FILL:import_ag_charts_core283.PALETTE_ALT_NEUTRAL_FILL,PALETTE_ALT_NEUTRAL_STROKE:import_ag_charts_core283.PALETTE_ALT_NEUTRAL_STROKE,PALETTE_ALT_UP_FILL:import_ag_charts_core283.PALETTE_ALT_UP_FILL,PALETTE_ALT_UP_STROKE:import_ag_charts_core283.PALETTE_ALT_UP_STROKE,PALETTE_DOWN_FILL:import_ag_charts_core283.PALETTE_DOWN_FILL,PALETTE_DOWN_STROKE:import_ag_charts_core283.PALETTE_DOWN_STROKE,PALETTE_NEUTRAL_FILL:import_ag_charts_core283.PALETTE_NEUTRAL_FILL,PALETTE_NEUTRAL_STROKE:import_ag_charts_core283.PALETTE_NEUTRAL_STROKE,PALETTE_UP_FILL:import_ag_charts_core283.PALETTE_UP_FILL,PALETTE_UP_STROKE:import_ag_charts_core283.PALETTE_UP_STROKE},themeNames=Object.keys(themes);function resolveOperation(t){const e=ChartTheme.getDefaultPublicParameters(),i=ChartTheme.getDefaultColors();return new OptionsGraph({line:{operation:t}},{series:[{type:"line"}]},e,i).resolve().operation}var integrated_charts_util_exports={};__export(integrated_charts_util_exports,{Color:()=>import_ag_charts_core284.Color,interpolateColor:()=>interpolateColor});var import_ag_charts_core284=require("ag-charts-core"),AgChartsCommunityModule={VERSION,_Scene:integrated_charts_scene_exports,_Theme:integrated_charts_theme_exports,_Util:integrated_charts_util_exports,create:AgCharts.create.bind(AgCharts),createSparkline:AgCharts.__createSparkline.bind(AgCharts),setup:()=>{import_ag_charts_core285.ModuleRegistry.setRegistryMode(import_ag_charts_core285.ModuleRegistry.RegistryMode.Integrated),import_ag_charts_core285.ModuleRegistry.registerModules(AllCommunityModule)},isEnterprise:!1};
|