ag-charts-community
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
2 lines • 789 kB
JavaScript
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of __getOwnPropNames(t))!__hasOwnProp.call(e,n)&&n!==i&&__defProp(e,n,{get:()=>t[n],enumerable:!(s=__getOwnPropDesc(t,n))||s.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__decorateClass=(e,t,i,s)=>{for(var n=s>1?void 0:s?__getOwnPropDesc(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&__defProp(t,i,n),n},main_modules_exports={};__export(main_modules_exports,{AllCartesianCommunityModules:()=>AllCartesianCommunityModules,AllCommunityModules:()=>AllCommunityModules,AllPolarCommunityModules:()=>AllPolarCommunityModules,CartesianChartModule:()=>CartesianChartModule,CategoryAxisModule:()=>CategoryAxisModule,GroupedCategoryAxisModule:()=>GroupedCategoryAxisModule,LogAxisModule:()=>LogAxisModule,ModuleRegistry:()=>import_ag_charts_core130.ModuleRegistry,NewAreaSeriesModule:()=>NewAreaSeriesModule,NewBarSeriesModule:()=>NewBarSeriesModule,NewBubbleSeriesModule:()=>NewBubbleSeriesModule,NewDonutSeriesModule:()=>NewDonutSeriesModule,NewHistogramSeriesModule:()=>NewHistogramSeriesModule,NewLineSeriesModule:()=>NewLineSeriesModule,NewPieSeriesModule:()=>NewPieSeriesModule,NewScatterSeriesModule:()=>NewScatterSeriesModule,NumberAxisModule:()=>NumberAxisModule,PolarChartModule:()=>PolarChartModule,TimeAxisModule:()=>TimeAxisModule}),module.exports=__toCommonJS(main_modules_exports);var import_ag_charts_core98=require("ag-charts-core"),import_ag_charts_core5=require("ag-charts-core"),import_ag_charts_core2=require("ag-charts-core"),ID_MAP=new Map;function createId(e){const t=e.constructor,i=Object.hasOwn(t,"className")?t.className:t.name;if(!i)throw new Error(`The ${t} is missing the 'className' property.`);const s=(ID_MAP.get(i)??0)+1;return ID_MAP.set(i,s),`${i}-${s}`}function generateUUID(){return crypto.randomUUID?.()??generateUUIDv4()}function generateUUIDv4(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t="";for(let i=0;i<e.length;i++)(i===4||i===6||i===8||i===10)&&(t+="-"),t+=e[i].toString(16).padStart(2,"0");return t}var import_ag_charts_core=require("ag-charts-core"),BBoxValues={containsPoint,isEmpty,normalize};function containsPoint(e,t,i){return t>=e.x&&t<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function isEmpty(e){return e==null||e.height===0||e.width===0||isNaN(e.height)||isNaN(e.width)}function normalize(e){let{x:t,y:i,width:s,height:n}=e;return(s==null||s>0)&&(n==null||n>0)?e:(t!=null&&s!=null&&s<0&&(s=-s,t=t-s),i!=null&&n!=null&&n<0&&(n=-n,i=i-n),{x:t,y:i,width:s,height:n})}var interpolate=Symbol("interpolate"),isInterpolating=e=>e[interpolate]!=null;function nearestSquared(e,t,i,s=1/0){const n={nearest:void 0,distanceSquared:s};for(const r of i){const a=r.distanceSquared(e,t);if(a===0)return{nearest:r,distanceSquared:0};a<n.distanceSquared&&(n.nearest=r,n.distanceSquared=a)}return n}var _BBox=class ft{constructor(t,i,s,n){this.x=t,this.y=i,this.width=s,this.height=n}static fromDOMRect({x:t,y:i,width:s,height:n}){return new ft(t,i,s,n)}static merge(t){let i=1/0,s=1/0,n=-1/0,r=-1/0;for(const a of t)a.x<i&&(i=a.x),a.y<s&&(s=a.y),a.x+a.width>n&&(n=a.x+a.width),a.y+a.height>r&&(r=a.y+a.height);return new ft(i,s,n-i,r-s)}static nearestBox(t,i,s){return nearestSquared(t,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON(){return{}}}}clone(){const{x:t,y:i,width:s,height:n}=this;return new ft(t,i,s,n)}equals(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}containsPoint(t,i){return BBoxValues.containsPoint(this,t,i)}intersection(t){if(!this.collidesBBox(t))return;const i=(0,import_ag_charts_core.clamp)(t.x,this.x,t.x+t.width),s=(0,import_ag_charts_core.clamp)(t.y,this.y,t.y+t.height),n=(0,import_ag_charts_core.clamp)(t.x,this.x+this.width,t.x+t.width),r=(0,import_ag_charts_core.clamp)(t.y,this.y+this.height,t.y+t.height);return new ft(i,s,n-i,r-s)}collidesBBox(t){return this.x<t.x+t.width&&this.x+this.width>t.x&&this.y<t.y+t.height&&this.y+this.height>t.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(t,i){if(this.containsPoint(t,i))return 0;const s=t-(0,import_ag_charts_core.clamp)(this.x,t,this.x+this.width),n=i-(0,import_ag_charts_core.clamp)(this.y,i,this.y+this.height);return s*s+n*n}shrink(t,i){if(typeof t=="number")this.applyMargin(t,i);else for(const s of Object.keys(t)){const n=t[s];typeof n=="number"&&this.applyMargin(n,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(t,i){if(typeof t=="number")this.applyMargin(-t,i);else for(const s of Object.keys(t)){const n=t[s];typeof n=="number"&&this.applyMargin(-n,s)}return this}applyMargin(t,i){switch(i){case"top":this.y+=t;case"bottom":this.height-=t;break;case"left":this.x+=t;case"right":this.width-=t;break;case"vertical":this.y+=t,this.height-=t*2;break;case"horizontal":this.x+=t,this.width-=t*2;break;case void 0:this.x+=t,this.y+=t,this.width-=t*2,this.height-=t*2;break}}translate(t,i){return this.x+=t,this.y+=i,this}[interpolate](t,i){return new ft(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};_BBox.zero=Object.freeze(new _BBox(0,0,0,0)),_BBox.NaN=Object.freeze(new _BBox(NaN,NaN,NaN,NaN));var BBox=_BBox;function SceneChangeDetection(e){return function(t,i){const s=`__${i}`;t[i]||prepareGetSet(t,i,s,e)}}function prepareGetSet(e,t,i,s){const{type:n="normal",changeCb:r,convertor:a,checkDirtyOnAssignment:o=!1}=s??{},l={type:n,changeCb:r,checkDirtyOnAssignment:o,convertor:a};let c;switch(n){case"normal":c=buildNormalSetter(i,l);break;case"transform":c=buildTransformSetter(i);break;case"path":c=buildPathSetter(i);break}c=buildCheckDirtyChain(i,buildChangeCallbackChain(buildConvertorChain(c,l),l),l),Object.defineProperty(e,t,{set:c,get:function(){return this[i]},enumerable:!0,configurable:!0})}function buildConvertorChain(e,t){const{convertor:i}=t;return i?function(s){e.call(this,i(s))}:e}var NO_CHANGE=Symbol("no-change");function buildChangeCallbackChain(e,t){const{changeCb:i}=t;return i?function(s){const n=e.call(this,s);return n!==NO_CHANGE&&i.call(this,this),n}:e}function buildCheckDirtyChain(e,t,i){const{checkDirtyOnAssignment:s}=i;return s?function(n){const r=t.call(this,n);return n?._dirty===!0&&this.markDirty(e),r}:t}function buildNormalSetter(e,t){const{changeCb:i}=t;return function(s){const n=this[e];return s!==n?(this[e]=s,this.markDirty(e),i?.(this),s):NO_CHANGE}}function buildTransformSetter(e){return function(t){const i=this[e];return t!==i?(this[e]=t,this.markDirtyTransform(),t):NO_CHANGE}}function buildPathSetter(e){return function(t){const i=this[e];return t!==i?(this[e]=t,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(e)),t):NO_CHANGE}}var _Node=class It{constructor(t){this.serialNumber=It._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=createId(this),this.pointerEvents=0,this._dirty=!0,this.dirtyZIndex=!1,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.name=t?.name,this.tag=t?.tag??NaN,this.zIndex=t?.zIndex??0,(t?.debugDirty??It._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(t,i,s){const n=t?.toSVG();if(n==null||!n.elements.length&&!n.defs?.length)return;const r=(0,import_ag_charts_core2.createSvgElement)("svg");if(r.setAttribute("width",String(i)),r.setAttribute("height",String(s)),r.setAttribute("viewBox",`0 0 ${i} ${s}`),n.defs?.length){const a=(0,import_ag_charts_core2.createSvgElement)("defs");a.append(...n.defs),r.append(a)}return r.append(...n.elements),r.outerHTML}static*extractBBoxes(t,i){for(const s of t)if(!i||s.visible&&!s.transitionOut){const n=s.getBBox();n&&(yield n)}}get datum(){return this._datum}set datum(t){this._datum!==t&&(this._previousDatum=this._datum,this._datum=t)}get previousDatum(){return this._previousDatum}get layerManager(){return this._layerManager}get dirty(){return this._dirty}closestDatum(){for(const{datum:t}of this.traverseUp(!0))if(t!=null)return t}preRender(t,i=1){this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.childNodeCounts.complexity=i,this.childNodeCounts.thisComplexity=i;for(const s of this.children()){const n=s.preRender(t);this.childNodeCounts.groups+=n.groups,this.childNodeCounts.nonGroups+=n.nonGroups,this.childNodeCounts.complexity+=n.complexity}return this.childNodeCounts}render(t){const{stats:i}=t;if(this._dirty=!1,this.debugDirtyProperties(),t.debugNodeSearch){const s=this.name??this.id;t.debugNodeSearch.some(n=>typeof n=="string"?n===s:n.test(s))&&(t.debugNodes[this.name??this.id]=this)}i&&(i.nodesRendered++,i.opsPerformed+=this.childNodeCounts.thisComplexity)}_setLayerManager(t){this._layerManager=t,this._debug=t?.debug;for(const i of this.children())i._setLayerManager(t)}sortChildren(t){if(this.dirtyZIndex=!1,!this.childNodes)return;const i=[...this.childNodes].sort(t);this.childNodes.clear();for(const s of i)this.childNodes.add(s)}*traverseUp(t){let i=this;for(t&&(yield i);i=i.parentNode;)yield i}*children(){if(this.childNodes)for(const t of this.childNodes)yield t}*descendants(){for(const t of this.children())yield t,yield*t.descendants()}isLeaf(){return!this.childNodes?.size}isRoot(){return!this.parentNode}append(t){this.childNodes??(this.childNodes=new Set);for(const i of(0,import_ag_charts_core2.toIterable)(t))i.parentNode?.removeChild(i),this.childNodes.add(i),i.parentNode=this,i._setLayerManager(this.layerManager);this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}appendChild(t){return this.append(t),t}removeChild(t){if(!this.childNodes?.delete(t))throw new Error(`AG Charts - internal error, unknown child node ${t.name??t.id} in $${this.name??this.id}`);delete t.parentNode,t._setLayerManager(),this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}remove(){this.parentNode?.removeChild(this)}clear(){for(const t of this.children())delete t.parentNode,t._setLayerManager();this.childNodes?.clear(),this.invalidateCachedBBox()}destroy(){this.parentNode?.removeChild(this)}setProperties(t,i){if(i)for(const s of i)this[s]=t[s];else Object.assign(this,t);return this}containsPoint(t,i){return!1}pickNode(t,i){if(!(!this.visible||this.pointerEvents===1||!this.containsPoint(t,i))){if(this.childNodes!=null&&this.childNodes.size!==0){const s=[...this.children()];for(let n=s.length-1;n>=0;n--){const r=s[n].pickNode(t,i);if(r)return r}}else if(!this.isContainerNode)return this}}pickNodes(t,i,s=[]){if(!this.visible||this.pointerEvents===1||!this.containsPoint(t,i))return s;this.isContainerNode||s.push(this);for(const n of this.children())n.pickNodes(t,i,s);return s}invalidateCachedBBox(){this.cachedBBox!=null&&(this.cachedBBox=void 0,this.parentNode?.invalidateCachedBBox())}getBBox(){return this.cachedBBox==null&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}markDirty(t){const{_dirty:i}=this;t!=null&&this._debugDirtyProperties&&this.markDebugProperties(t),!(this.cachedBBox==null&&i)&&(this.invalidateCachedBBox(),this._dirty=!0,this.parentNode&&this.parentNode.markDirty())}markClean(){if(this._dirty){this._dirty=!1,this.debugDirtyProperties();for(const t of this.children())t.markClean()}}markDebugProperties(t){const i=this._debugDirtyProperties?.get(t)??[],s=new Error().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(t,i)}debugDirtyProperties(){this._debugDirtyProperties!=null&&(this._debugDirtyProperties.has("__first__")||this._debugDirtyProperties.forEach((t,i)=>{t.length>1&&(console.groupCollapsed(`Property changed multiple times before render: ${this.constructor.name}.${i} (${t.length}x)`),t.forEach(s=>console.log(s)),console.groupEnd())}),this._debugDirtyProperties.clear())}onZIndexChange(){const{parentNode:t}=this;t&&(t.dirtyZIndex=!0)}toSVG(){}};_Node._nextSerialNumber=0,_Node._debugEnabled=!1,__decorateClass([SceneChangeDetection()],_Node.prototype,"visible",2),__decorateClass([SceneChangeDetection({changeCb:e=>e.onZIndexChange()})],_Node.prototype,"zIndex",2);var Node=_Node,import_ag_charts_core3=require("ag-charts-core"),lerp=(e,t,i)=>e*(1-i)+t*i,srgbToLinear=e=>{const t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*((i+.055)/1.055)**2.4},srgbFromLinear=e=>{const t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*i**(1/2.4)-.055):12.92*e},_Color=class ${constructor(t,i,s,n=1){this.r=(0,import_ag_charts_core3.clamp)(0,t||0,1),this.g=(0,import_ag_charts_core3.clamp)(0,i||0,1),this.b=(0,import_ag_charts_core3.clamp)(0,s||0,1),this.a=(0,import_ag_charts_core3.clamp)(0,n||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!$.parseHex(t):t.indexOf("rgb")>=0?!!$.stringToRgba(t):$.nameToHex.has(t.toLowerCase())}static fromString(t){if(t.indexOf("#")>=0)return $.fromHexString(t);const i=$.nameToHex.get(t.toLowerCase());if(i)return $.fromHexString(i);if(t.indexOf("rgb")>=0)return $.fromRgbaString(t);throw new Error(`Invalid color string: '${t}'`)}static parseHex(t){t=t.replace(/ /g,"").slice(1);let i;switch(t.length){case 6:case 8:i=[];for(let s=0;s<t.length;s+=2)i.push(parseInt(`${t[s]}${t[s+1]}`,16));break;case 3:case 4:i=t.split("").map(s=>parseInt(s,16)).map(s=>s+s*16);break}if(i?.length>=3&&i.every(s=>s>=0))return i.length===3&&i.push(255),i}static fromHexString(t){const i=$.parseHex(t);if(i){const[s,n,r,a]=i;return new $(s/255,n/255,r/255,a/255)}throw new Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(t){let i=-1,s=-1;for(let o=0;o<t.length;o++){const l=t[o];if(i===-1&&l==="(")i=o;else if(l===")"){s=o;break}}if(i===-1||s===-1)return;const r=t.substring(i+1,s).split(","),a=[];for(let o=0;o<r.length;o++){const l=r[o];let c=parseFloat(l);if(!Number.isFinite(c))return;l.indexOf("%")>=0?(c=(0,import_ag_charts_core3.clamp)(0,c,100),c/=100):o===3?c=(0,import_ag_charts_core3.clamp)(0,c,1):(c=(0,import_ag_charts_core3.clamp)(0,c,255),c/=255),a.push(c)}return a}static fromRgbaString(t){const i=$.stringToRgba(t);if(i){if(i.length===3)return new $(i[0],i[1],i[2]);if(i.length===4)return new $(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(t.length===4)return new $(t[0],t[1],t[2],t[3]);if(t.length===3)return new $(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,s,n=1){const r=$.HSBtoRGB(t,i,s);return new $(r[0],r[1],r[2],n)}static fromHSL(t,i,s,n=1){const r=$.HSLtoRGB(t,i,s);return new $(r[0],r[1],r[2],n)}static fromOKLCH(t,i,s,n=1){const r=$.OKLCHtoRGB(t,i,s);return new $(r[0],r[1],r[2],n)}static padHex(t){return t.length===1?"0"+t:t}toHexString(){let t="#"+$.padHex(Math.round(this.r*255).toString(16))+$.padHex(Math.round(this.g*255).toString(16))+$.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(t+=$.padHex(Math.round(this.a*255).toString(16))),t}toRgbaString(t=3){const i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],s=Math.pow(10,t);return this.a!==1?(i.push(Math.round(this.a*s)/s),`rgba(${i.join(", ")})`):`rgb(${i.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return $.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(t,i,s){const n=srgbToLinear(t),r=srgbToLinear(i),a=srgbToLinear(s),o=Math.cbrt(.4122214708*n+.5363325363*r+.0514459929*a),l=Math.cbrt(.2119034982*n+.6806995451*r+.1073969566*a),c=Math.cbrt(.0883024619*n+.2817188376*r+.6299787005*a),h=.2104542553*o+.793617785*l-.0040720468*c,u=1.9779984951*o-2.428592205*l+.4505937099*c,d=.0259040371*o+.7827717662*l-.808675766*c,p=Math.atan2(d,u)*180/Math.PI,g=h,m=Math.hypot(u,d),y=p>=0?p:p+360;return[g,m,y]}static OKLCHtoRGB(t,i,s){const n=t,r=i*Math.cos(s*Math.PI/180),a=i*Math.sin(s*Math.PI/180),o=(n+.3963377774*r+.2158037573*a)**3,l=(n-.1055613458*r-.0638541728*a)**3,c=(n-.0894841775*r-1.291485548*a)**3,h=4.0767416621*o-3.3077115913*l+.2309699292*c,u=-1.2684380046*o+2.6097574011*l-.3413193965*c,d=-.0041960863*o-.7034186147*l+1.707614701*c,p=srgbFromLinear(h),g=srgbFromLinear(u),m=srgbFromLinear(d);return[p,g,m]}static RGBtoHSL(t,i,s){const n=Math.min(t,i,s),r=Math.max(t,i,s),a=(r+n)/2;let o,l;if(r===n)o=0,l=0;else{const c=r-n;l=a>.5?c/(2-r-n):c/(r+n),r===t?o=(i-s)/c+(i<s?6:0):r===i?o=(s-t)/c+2:o=(t-i)/c+4,o*=360/6}return[o,l,a]}static HSLtoRGB(t,i,s){if(t=(t%360+360)%360,i===0)return[s,s,s];const n=s<.5?s*(1+i):s+i-s*i,r=2*s-n;function a(h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?r+(n-r)*6*h:h<1/2?n:h<2/3?r+(n-r)*(2/3-h)*6:r}const o=a(t/360+1/3),l=a(t/360),c=a(t/360-1/3);return[o,l,c]}static RGBtoHSB(t,i,s){const n=Math.min(t,i,s),r=Math.max(t,i,s),a=r===0?0:(r-n)/r;let o=0;if(n!==r){const l=r-n,c=(r-t)/l,h=(r-i)/l,u=(r-s)/l;t===r?o=u-h:i===r?o=2+c-u:o=4+h-c,o/=6,o<0&&(o=o+1)}return[o*360,a,r]}static HSBtoRGB(t,i,s){t=(t%360+360)%360/360;let n=0,r=0,a=0;if(i===0)n=r=a=s;else{const o=(t-Math.floor(t))*6,l=o-Math.floor(o),c=s*(1-i),h=s*(1-i*l),u=s*(1-i*(1-l));switch(o>>0){case 0:n=s,r=u,a=c;break;case 1:n=h,r=s,a=c;break;case 2:n=c,r=s,a=u;break;case 3:n=c,r=h,a=s;break;case 4:n=u,r=c,a=s;break;case 5:n=s,r=c,a=h;break}}return[n,r,a]}static mix(t,i,s){return new $(lerp(t.r,i.r,s),lerp(t.g,i.g,s),lerp(t.b,i.b,s),lerp(t.a,i.a,s))}static lighten(t,i){const s=$.RGBtoOKLCH(t.r,t.g,t.b);return $.fromOKLCH((0,import_ag_charts_core3.clamp)(0,s[0]+i,1),s[1],s[2])}static darken(t,i){const s=$.RGBtoOKLCH(t.r,t.g,t.b);return $.fromOKLCH((0,import_ag_charts_core3.clamp)(0,s[0]-i,1),s[1],s[2])}static interpolate(t,i){const s=1/(t.length-1),n=t.map(r=>$.RGBtoOKLCH(r.r,r.g,r.b));return Array.from({length:i},(r,a)=>{const o=a/(i-1),l=t.length<=2?0:Math.min(Math.floor(o*(t.length-1)),t.length-2),c=(o-l*s)/s,h=n[l],u=n[l+1];return $.fromOKLCH(lerp(h[0],u[0],c),lerp(h[1],u[1],c),lerp(h[2],u[2],c))})}};_Color.nameToHex=new Map([["aliceblue","#F0F8FF"],["antiquewhite","#FAEBD7"],["aqua","#00FFFF"],["aquamarine","#7FFFD4"],["azure","#F0FFFF"],["beige","#F5F5DC"],["bisque","#FFE4C4"],["black","#000000"],["blanchedalmond","#FFEBCD"],["blue","#0000FF"],["blueviolet","#8A2BE2"],["brown","#A52A2A"],["burlywood","#DEB887"],["cadetblue","#5F9EA0"],["chartreuse","#7FFF00"],["chocolate","#D2691E"],["coral","#FF7F50"],["cornflowerblue","#6495ED"],["cornsilk","#FFF8DC"],["crimson","#DC143C"],["cyan","#00FFFF"],["darkblue","#00008B"],["darkcyan","#008B8B"],["darkgoldenrod","#B8860B"],["darkgray","#A9A9A9"],["darkgreen","#006400"],["darkgrey","#A9A9A9"],["darkkhaki","#BDB76B"],["darkmagenta","#8B008B"],["darkolivegreen","#556B2F"],["darkorange","#FF8C00"],["darkorchid","#9932CC"],["darkred","#8B0000"],["darksalmon","#E9967A"],["darkseagreen","#8FBC8F"],["darkslateblue","#483D8B"],["darkslategray","#2F4F4F"],["darkslategrey","#2F4F4F"],["darkturquoise","#00CED1"],["darkviolet","#9400D3"],["deeppink","#FF1493"],["deepskyblue","#00BFFF"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1E90FF"],["firebrick","#B22222"],["floralwhite","#FFFAF0"],["forestgreen","#228B22"],["fuchsia","#FF00FF"],["gainsboro","#DCDCDC"],["ghostwhite","#F8F8FF"],["gold","#FFD700"],["goldenrod","#DAA520"],["gray","#808080"],["green","#008000"],["greenyellow","#ADFF2F"],["grey","#808080"],["honeydew","#F0FFF0"],["hotpink","#FF69B4"],["indianred","#CD5C5C"],["indigo","#4B0082"],["ivory","#FFFFF0"],["khaki","#F0E68C"],["lavender","#E6E6FA"],["lavenderblush","#FFF0F5"],["lawngreen","#7CFC00"],["lemonchiffon","#FFFACD"],["lightblue","#ADD8E6"],["lightcoral","#F08080"],["lightcyan","#E0FFFF"],["lightgoldenrodyellow","#FAFAD2"],["lightgray","#D3D3D3"],["lightgreen","#90EE90"],["lightgrey","#D3D3D3"],["lightpink","#FFB6C1"],["lightsalmon","#FFA07A"],["lightseagreen","#20B2AA"],["lightskyblue","#87CEFA"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#B0C4DE"],["lightyellow","#FFFFE0"],["lime","#00FF00"],["limegreen","#32CD32"],["linen","#FAF0E6"],["magenta","#FF00FF"],["maroon","#800000"],["mediumaquamarine","#66CDAA"],["mediumblue","#0000CD"],["mediumorchid","#BA55D3"],["mediumpurple","#9370DB"],["mediumseagreen","#3CB371"],["mediumslateblue","#7B68EE"],["mediumspringgreen","#00FA9A"],["mediumturquoise","#48D1CC"],["mediumvioletred","#C71585"],["midnightblue","#191970"],["mintcream","#F5FFFA"],["mistyrose","#FFE4E1"],["moccasin","#FFE4B5"],["navajowhite","#FFDEAD"],["navy","#000080"],["oldlace","#FDF5E6"],["olive","#808000"],["olivedrab","#6B8E23"],["orange","#FFA500"],["orangered","#FF4500"],["orchid","#DA70D6"],["palegoldenrod","#EEE8AA"],["palegreen","#98FB98"],["paleturquoise","#AFEEEE"],["palevioletred","#DB7093"],["papayawhip","#FFEFD5"],["peachpuff","#FFDAB9"],["peru","#CD853F"],["pink","#FFC0CB"],["plum","#DDA0DD"],["powderblue","#B0E0E6"],["purple","#800080"],["rebeccapurple","#663399"],["red","#FF0000"],["rosybrown","#BC8F8F"],["royalblue","#4169E1"],["saddlebrown","#8B4513"],["salmon","#FA8072"],["sandybrown","#F4A460"],["seagreen","#2E8B57"],["seashell","#FFF5EE"],["sienna","#A0522D"],["silver","#C0C0C0"],["skyblue","#87CEEB"],["slateblue","#6A5ACD"],["slategray","#708090"],["slategrey","#708090"],["snow","#FFFAFA"],["springgreen","#00FF7F"],["steelblue","#4682B4"],["tan","#D2B48C"],["teal","#008080"],["thistle","#D8BFD8"],["tomato","#FF6347"],["transparent","#00000000"],["turquoise","#40E0D0"],["violet","#EE82EE"],["wheat","#F5DEB3"],["white","#FFFFFF"],["whitesmoke","#F5F5F5"],["yellow","#FFFF00"],["yellowgreen","#9ACD32"]]);var Color=_Color;function interpolateNumber(e,t){return i=>Number(e)*(1-i)+Number(t)*i}function interpolateColor(e,t){if(typeof e=="string")try{e=Color.fromString(e)}catch{e=Color.fromArray([0,0,0])}if(typeof t=="string")try{t=Color.fromString(t)}catch{t=Color.fromArray([0,0,0])}return i=>Color.mix(e,t,i).toRgbaString()}var import_ag_charts_core4=require("ag-charts-core"),BREAK_TRANSFORM_CHAIN=Symbol("BREAK"),CONFIG_KEY="__decorator_config";function addFakeTransformToInstanceProperty(e,t){initialiseConfig(e,t).optional=!0}function initialiseConfig(e,t){Object.getOwnPropertyDescriptor(e,CONFIG_KEY)==null&&Object.defineProperty(e,CONFIG_KEY,{value:{}});const i=e[CONFIG_KEY],s=t.toString();if(typeof i[s]<"u")return i[s];const n=new WeakMap;i[s]={setters:[],getters:[],observers:[],valuesMap:n};const r=Object.getOwnPropertyDescriptor(e,t),a=r?.set,o=r?.get;return Object.defineProperty(e,t,{set:function(h){const{setters:u,observers:d}=i[s];let p;u.some(g=>g.length>2)&&(p=o?o.call(this):n.get(this));for(const g of u)if(h=g(this,t,h,p),h===BREAK_TRANSFORM_CHAIN)return;a?a.call(this,h):n.set(this,h);for(const g of d)g(this,h,p)},get:function(){let h=o?o.call(this):n.get(this);for(const u of i[s].getters)if(h=u(this,t,h),h===BREAK_TRANSFORM_CHAIN)return;return h},enumerable:!0,configurable:!1}),i[s]}function addTransformToInstanceProperty(e,t,i){return(s,n)=>{const r=initialiseConfig(s,n);r.setters.push(e),t&&r.getters.unshift(t),i&&Object.assign(r,i)}}function addObserverToInstanceProperty(e){return(t,i)=>{initialiseConfig(t,i).observers.push(e)}}function isDecoratedObject(e){return typeof e<"u"&&CONFIG_KEY in e}function listDecoratedProperties(e){const t=new Set;for(;isDecoratedObject(e);)t.add(e?.[CONFIG_KEY]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(i=>Object.keys(i))}function extractDecoratedProperties(e){return listDecoratedProperties(e).reduce((t,i)=>(t[i]=e[i]??null,t),{})}function extractDecoratedPropertyMetadata(e,t){const i=t.toString();for(;isDecoratedObject(e);){const s=e[CONFIG_KEY];if(Object.hasOwn(s,i))return s[i];e=Object.getPrototypeOf(e)}}function objectsEqual(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every((i,s)=>objectsEqual(i,t[s])):(0,import_ag_charts_core4.isPlainObject)(e)?(0,import_ag_charts_core4.isPlainObject)(t)?objectsEqualWith(e,t,objectsEqual):!1:e===t}function objectsEqualWith(e,t,i){for(const s of Object.keys(t))if(!(s in e))return!1;for(const s of Object.keys(e))if(!(s in t)||!i(e[s],t[s]))return!1;return!0}function mergeDefaults(...e){const t={};for(const i of e){if(!(0,import_ag_charts_core4.isObject)(i))continue;const s=isDecoratedObject(i)?listDecoratedProperties(i):Object.keys(i);for(const n of s)(0,import_ag_charts_core4.isPlainObject)(t[n])&&(0,import_ag_charts_core4.isPlainObject)(i[n])?t[n]=mergeDefaults(t[n],i[n]):t[n]??(t[n]=i[n])}return t}function merge(...e){const t={};for(const i of e){if(!(0,import_ag_charts_core4.isObject)(i))continue;const s=isDecoratedObject(i)?listDecoratedProperties(i):Object.keys(i);for(const n of s)(0,import_ag_charts_core4.isPlainObject)(t[n])&&(0,import_ag_charts_core4.isPlainObject)(i[n])?t[n]=merge(t[n],i[n]):n in t||(t[n]??(t[n]=i[n]))}return t}function without(e,t){const i={...e};for(const s of t)delete i[s];return i}function getPath(e,t){return((0,import_ag_charts_core4.isArray)(t)?t:t.split(".")).reduce((s,n)=>s[n],e)}var SKIP_JS_BUILTINS=new Set(["__proto__","constructor","prototype"]);function setPath(e,t,i){const s=(0,import_ag_charts_core4.isArray)(t)?t.slice():t.split("."),n=s.pop();if(s.some(a=>SKIP_JS_BUILTINS.has(a)))return;const r=s.reduce((a,o)=>a[o],e);return r[n]=i,r[n]}function partialAssign(e,t,i){if(i===void 0)return t;for(const s of e){const n=i[s];n!==void 0&&(t[s]=n)}return t}var linear=e=>e,easeOut=e=>Math.sin(e*Math.PI/2),inverseEaseOut=e=>2*Math.asin(e)/Math.PI,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(e){return e.every(t=>t instanceof Node)}function deconstructSelectionsOrNodes(e){return isNodeArray(e)?{nodes:e,selections:[]}:{nodes:[],selections:e}}function animationValuesEqual(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((i,s)=>animationValuesEqual(i,t[s])):isInterpolating(e)&&isInterpolating(t)?e.equals(t):(0,import_ag_charts_core5.isPlainObject)(e)&&(0,import_ag_charts_core5.isPlainObject)(t)?objectsEqualWith(e,t,animationValuesEqual):!1}var Animation=class{constructor(e){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=e.id,this.groupId=e.groupId,this.autoplay=e.autoplay??!0,this.ease=e.ease??linear,this.phase=e.phase;const t=e.duration??PHASE_METADATA[this.phase].animationDuration;this.duration=t*e.defaultDuration,this.delay=(e.delay??0)*e.defaultDuration,this.onComplete=e.onComplete,this.onPlay=e.onPlay,this.onStop=e.onStop,this.onUpdate=e.onUpdate,this.interpolate=this.createInterpolator(e.from,e.to),this.from=e.from,e.skip===!0&&(this.onUpdate?.(e.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),e.collapsable!==!1&&(this.duration=this.checkCollapse(e,this.duration))}checkCollapse(e,t){return animationValuesEqual(e.from,e.to)?0:t}play(e=!1){this.isPlaying||this.isComplete||(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,e&&this.onUpdate?.(this.from,!0,this)))}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(e){if(this.isComplete)return e;!this.isPlaying&&this.autoplay&&this.play(!0);const t=this.elapsed;if(this.elapsed+=e,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),e-(s-t)):0}get delta(){return this.ease((0,import_ag_charts_core5.clamp)(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(e,t){if(typeof t!="object"||isInterpolating(t))return this.interpolateValue(e,t);const i=[];for(const s of Object.keys(t)){const n=this.interpolateValue(e[s],t[s]);n!=null&&i.push([s,n])}return s=>{const n={};for(const[r,a]of i)n[r]=a(s);return n}}interpolateValue(e,t){if(!(e==null||t==null)){if(isInterpolating(e))return i=>e[interpolate](t,i);try{switch(typeof e){case"number":return interpolateNumber(e,t);case"string":return interpolateColor(e,t);case"boolean":if(e===t)return()=>e;break;case"object":return()=>e}}catch{}throw new Error(`Unable to interpolate values: ${e}, ${t}`)}}},NODE_UPDATE_STATE_TO_PHASE_MAPPING={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};function fromToMotion(e,t,i,s,n,r,a){const{fromFn:o,toFn:l,applyFn:c=(g,m)=>g.setProperties(m)}=n,{nodes:h,selections:u}=deconstructSelectionsOrNodes(s),d=(g,m)=>{let y,f=0,b=0;for(const v of m){const x=g[f]===v,S={last:b>=m.length-1,lastLive:f>=g.length-1,prev:m[b-1],prevFromProps:y,prevLive:g[f-1],next:m[b+1],nextLive:g[f+(x?1:0)]},w=`${e}_${t}_${v.id}`;i.stopByAnimationId(w);let D="unknown";x?r&&a&&(D=calculateStatus(v,v.datum,r,a)):D="removed",v.transitionOut=D==="removed";const{phase:I,start:A,finish:L,delay:k,duration:T,...F}=o(v,v.datum,D,S),{phase:q,start:R,finish:B,delay:G,duration:Z,...W}=l(v,v.datum,D,S),E=L==null;i.animate({id:w,groupId:e,phase:I??q??"update",duration:T??Z,delay:k??G,from:F,to:W,ease:easeOut,collapsable:E,onPlay:()=>{const O={...A,...R,...F};c(v,O,"start")},onUpdate(O){c(v,O,"update")},onStop:()=>{const O={...A,...R,...F,...W,...L,...B};c(v,O,"end")}}),x&&f++,b++,y=F}};let p=0;for(const g of u){const m=g.nodes(),y=m.filter(f=>!g.isGarbage(f));d(y,m),i.animate({id:`${e}_${t}_selection_${p}`,groupId:e,phase:"end",from:0,to:1,ease:easeOut,onStop(){g.cleanup()}}),p++}d(h,h)}function staticFromToMotion(e,t,i,s,n,r,a){const{nodes:o,selections:l}=deconstructSelectionsOrNodes(s),{start:c,finish:h,phase:u}=a;i.animate({id:`${e}_${t}`,groupId:e,phase:u??"update",from:n,to:r,ease:easeOut,onPlay:()=>{if(c){for(const d of o)d.setProperties(c);for(const d of l)for(const p of d.nodes())p.setProperties(c)}},onUpdate(d){for(const p of o)p.setProperties(d);for(const p of l)for(const g of p.nodes())g.setProperties(d)},onStop:()=>{for(const d of o)d.setProperties({...r,...h});for(const d of l){for(const p of d.nodes())p.setProperties({...r,...h});d.cleanup()}}})}function calculateStatus(e,t,i,s){const n=i(e,t);return s.added.has(n)?"added":s.removed.has(n)?"removed":"updated"}var import_ag_charts_core6=require("ag-charts-core");function clampArray(e,t){const[i,s]=findMinMax(t);return(0,import_ag_charts_core6.clamp)(i,e,s)}function findMinMax(e){if(e.length===0)return[];const t=[1/0,-1/0];for(const i of e)i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i);return t}function findRangeExtent(e){const[t,i]=findMinMax(e);return i-t}var AbstractScale=class{ticks(e,t,i){}niceDomain(e,t=this.domain){return t}tickFormatter(e){}datumFormatter(e){}get bandwidth(){}get step(){}get inset(){}},_ContinuousScale=class Lt extends AbstractScale{constructor(t=[],i=[]){super(),this.domain=t,this.range=i,this.defaultClamp=!1}static is(t){return t instanceof Lt}normalizeDomains(...t){let i,s=1/0,n,r=-1/0;for(const a of t)for(const o of a){const l=o.valueOf();l<s&&(s=l,i=o),l>r&&(r=l,n=o)}return i!=null&&n!=null?{domain:[i,n],animatable:!0}:{domain:[],animatable:!1}}transform(t){return t}transformInvert(t){return t}calcBandwidth(t=1){const{domain:i}=this,s=this.getPixelRange();if(i.length===0)return s;const n=Math.abs(i[1].valueOf()-i[0].valueOf())/t+1,r=Math.floor(s),a=Math.min(n,r);return s/Math.max(1,a)}convert(t,i=this.defaultClamp){const{domain:s}=this;if(!s||s.length<2)return NaN;const n=Number(this.transform(s[0])),r=Number(this.transform(s[1])),a=Number(this.transform(t)),{range:o}=this,[l,c]=o;if(i){const[h,u]=findMinMax([n,r]);if(a<h)return l;if(a>u)return c}return n===r?(l+c)/2:a===n?l:a===r?c:l+(a-n)/(r-n)*(c-l)}invert(t,i){const s=this.domain.map(h=>this.transform(h)),[n,r]=s,{range:a}=this,[o,l]=a;let c;return o===l?c=this.toDomain((Number(n)+Number(r))/2):c=this.toDomain(Number(n)+(t-o)/(l-o)*(Number(r)-Number(n))),this.transformInvert(c)}getPixelRange(){const[t,i]=this.range;return Math.abs(i-t)}};_ContinuousScale.defaultTickCount=5;var ContinuousScale=_ContinuousScale,import_ag_charts_core39=require("ag-charts-core"),import_ag_charts_core7=require("ag-charts-core"),TimeInterval=class{constructor(e,t,i){this._encode=e,this._decode=t,this._rangeCallback=i}floor(e){const t=new Date(e),i=this._encode(t);return this._decode(i)}ceil(e){const t=new Date(Number(e)-1),i=this._encode(t);return this._decode(i+1)}range(e,t,{extend:i=!1,visibleRange:s=[0,1]}={}){let n=!1;e.getTime()>t.getTime()&&([e,t]=[t,e],n=!0);const r=this._rangeCallback?.(e,t),a=this._encode(i?this.floor(e):this.ceil(e)),o=this._encode(i?this.ceil(t):this.floor(t));if(o<a)return[];const l=o-a;let c,h;n?(c=Math.ceil(a+(1-s[1])*l),h=Math.floor(a+(1-s[0])*l)):(c=Math.floor(a+s[0]*l),h=Math.ceil(a+s[1]*l));const u=[];for(let d=c;d<=h;d+=1){const p=this._decode(d);u.push(p)}return r?.(),u}},CountableTimeInterval=class extends TimeInterval{getOffset(e,t){return Math.floor(this._encode(new Date(e)))%t}every(e,t){let i=0,s;const n=e;e=Math.max(1,Math.round(e)),n!==e&&import_ag_charts_core7.Logger.warnOnce(`interval step of [${n}] rounded to [${e}].`);const{snapTo:r="start"}=t??{};if(typeof r=="string"){const l=i;s=(c,h)=>{const u=r==="start"?c:h;return i=this.getOffset(u,e),()=>i=l}}else typeof r=="number"?i=this.getOffset(new Date(r),e):r instanceof Date&&(i=this.getOffset(r,e));const a=l=>Math.floor((this._encode(l)-i)/e),o=l=>this._decode(l*e+i);return new TimeInterval(a,o,s)}};function encode(e){return e.getTime()}function decode(e){return new Date(e)}var millisecond=new CountableTimeInterval(encode,decode),durationSecond=1e3,durationMinute=durationSecond*60,durationHour=durationMinute*60,durationDay=durationHour*24,durationWeek=durationDay*7,durationMonth=durationDay*30,durationYear=durationDay*365,offset=new Date().getTimezoneOffset()*durationMinute;function encode2(e){return Math.floor((e.getTime()-offset)/durationSecond)}function decode2(e){return new Date(offset+e*durationSecond)}var second=new CountableTimeInterval(encode2,decode2),offset2=new Date().getTimezoneOffset()*durationMinute;function encode3(e){return Math.floor((e.getTime()-offset2)/durationMinute)}function decode3(e){return new Date(offset2+e*durationMinute)}var minute=new CountableTimeInterval(encode3,decode3),offset3=new Date().getTimezoneOffset()*durationMinute;function encode4(e){return Math.floor((e.getTime()-offset3)/durationHour)}function decode4(e){return new Date(offset3+e*durationHour)}var hour=new CountableTimeInterval(encode4,decode4);function encode5(e){const t=e.getTimezoneOffset()*durationMinute;return Math.floor((e.getTime()-t)/durationDay)}function decode5(e){const t=new Date(1970,0,1);return t.setDate(t.getDate()+e),t}var day=new CountableTimeInterval(encode5,decode5);function weekday(e){const i=(7+e-4)%7;function s(r){const a=r.getTimezoneOffset()*durationMinute;return Math.floor((r.getTime()-a)/durationWeek-i/7)}function n(r){const a=new Date(1970,0,1);return a.setDate(a.getDate()+r*7+i),a}return new CountableTimeInterval(s,n)}var sunday=weekday(0),monday=weekday(1),tuesday=weekday(2),wednesday=weekday(3),thursday=weekday(4),friday=weekday(5),saturday=weekday(6);function encode6(e){return e.getFullYear()*12+e.getMonth()}function decode6(e){const t=Math.floor(e/12),i=e-t*12;return new Date(t,i,1)}var month=new CountableTimeInterval(encode6,decode6);function encode7(e){return e.getFullYear()}function decode7(e){const t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}var year=new CountableTimeInterval(encode7,decode7),CONSTANTS={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function dayOfYear(e,t=new Date(e.getFullYear(),0,1)){const i=e.getTimezoneOffset()-t.getTimezoneOffset(),s=e.getTime()-t.getTime()+i*6e4,n=36e5*24;return Math.floor(s/n)}function weekOfYear(e,t){const s=new Date(e.getFullYear(),0,1).getDay(),n=(t-s+7)%7,r=new Date(e.getFullYear(),0,n+1);return r<=e?Math.floor(dayOfYear(e,r)/7)+1:0}var SUNDAY=0,MONDAY=1,THURSDAY=4;function isoWeekOfYear(e,t=e.getFullYear()){const s=new Date(t,0,1).getDay(),n=(THURSDAY-s+7)%7,r=new Date(t,0,n-(THURSDAY-MONDAY)+1);return r<=e?Math.floor(dayOfYear(e,r)/7)+1:isoWeekOfYear(e,t-1)}function timezone(e){const t=e.getTimezoneOffset(),i=Math.abs(t);return`${t>0?"-":"+"}${pad(Math.floor(i/60),2,"0")}${pad(Math.floor(i%60),2,"0")}`}var FORMATTERS={a:e=>CONSTANTS.shortDays[e.getDay()],A:e=>CONSTANTS.days[e.getDay()],b:e=>CONSTANTS.shortMonths[e.getMonth()],B:e=>CONSTANTS.months[e.getMonth()],c:"%x, %X",d:(e,t)=>pad(e.getDate(),2,t??"0"),e:"%_d",f:(e,t)=>pad(e.getMilliseconds()*1e3,6,t??"0"),H:(e,t)=>pad(e.getHours(),2,t??"0"),I:(e,t)=>{const i=e.getHours()%12;return i===0?"12":pad(i,2,t??"0")},j:(e,t)=>pad(dayOfYear(e)+1,3,t??"0"),m:(e,t)=>pad(e.getMonth()+1,2,t??"0"),M:(e,t)=>pad(e.getMinutes(),2,t??"0"),L:(e,t)=>pad(e.getMilliseconds(),3,t??"0"),p:e=>e.getHours()<12?"AM":"PM",Q:e=>String(e.getTime()),s:e=>String(Math.floor(e.getTime()/1e3)),S:(e,t)=>pad(e.getSeconds(),2,t??"0"),u:e=>{let t=e.getDay();return t<1&&(t+=7),String(t%7)},U:(e,t)=>pad(weekOfYear(e,SUNDAY),2,t??"0"),V:(e,t)=>pad(isoWeekOfYear(e),2,t??"0"),w:(e,t)=>pad(e.getDay(),2,t??"0"),W:(e,t)=>pad(weekOfYear(e,MONDAY),2,t??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(e,t)=>pad(e.getFullYear()%100,2,t??"0"),Y:(e,t)=>pad(e.getFullYear(),4,t??"0"),Z:e=>timezone(e),"%":()=>"%"},PADS={_:" ",0:"0","-":""};function pad(e,t,i){const s=String(Math.floor(e));return s.length>=t?s:`${i.repeat(t-s.length)}${s}`}function buildFormatter(e){const t=[];for(;e.length>0;){let i=e.indexOf("%");if(i!==0){const o=i>0?e.substring(0,i):e;t.push(o)}if(i<0)break;const s=e[i+1],n=PADS[s];n!=null&&i++;const r=e[i+1],a=FORMATTERS[r];if(typeof a=="function")t.push([a,n]);else if(typeof a=="string"){const o=buildFormatter(a);t.push([o,n])}else t.push(`${n??""}${r}`);e=e.substring(i+2)}return i=>{const s=typeof i=="number"?new Date(i):i;return t.map(n=>typeof n=="string"?n:n[0](s,n[1])).join("")}}function dateToNumber(e){return e instanceof Date?e.getTime():e}function defaultTimeTickFormat(e,t,i){const s=calculateDefaultTimeTickFormat(e,t,i),n=buildFormatter(s);return r=>n(r)}function calculateDefaultTimeTickFormat(e,t,i=0){let s=1/0;for(let h=1;h<e.length;h++)s=Math.min(s,Math.abs(e[h].valueOf()-e[h-1].valueOf()));const[n,r]=t.length===0?[0,0]:findMinMax([t[0].valueOf(),t[t.length-1].valueOf()]),a=new Date(n).getFullYear(),l=new Date(r).getFullYear()-a>0,c=isFinite(s)?getIntervalLowestGranularityFormat(s,e):getLowestGranularityFormat(e[0]);return formatStringBuilder(Math.max(c-i,0),l,e)}function getIntervalLowestGranularityFormat(e,t){return e<durationSecond?0:e<durationMinute?1:e<durationHour?2:e<durationDay?3:e<durationWeek?4:e<durationDay*28||e<durationDay*31&&hasDuplicateMonth(t)?5:e<durationYear?6:7}function getLowestGranularityFormat(e){return second.floor(e)<e?0:minute.floor(e)<e?1:hour.floor(e)<e?2:day.floor(e)<e?3:month.floor(e)<e?sunday.floor(e)<e?4:5:year.floor(e)<e?6:7}function hasDuplicateMonth(e){let t=new Date(e[0]).getMonth();for(let i=1;i<e.length;i++){const s=new Date(e[i]).getMonth();if(t===s)return!0;t=s}return!1}function formatStringBuilder(e,t,i){const s=dateToNumber(i[0]),n=dateToNumber(i.at(-1)),r=Math.abs(n-s),a=t||e===7,o=r===0,c=[["hour",6*durationHour,14*durationDay,3,"%I %p"],["hour",durationMinute,6*durationHour,3,"%I:%M"],["second",1e3,6*durationHour,1,":%S"],["ms",0,6*durationHour,0,".%L"],["am/pm",durationMinute,6*durationHour,3,"%p"]," ",["day",durationDay,durationWeek,4,"%a"],["month",o?0:durationWeek,52*durationWeek,5,"%b %d"],["month",5*durationWeek,10*durationYear,6,"%B"]," ",["year",a?0:durationYear,1/0,7,"%Y"]].filter(d=>{if(typeof d=="string")return!0;const[p,g,m,y]=d;return y>=e&&g<=r&&r<m}).reduce((d,p)=>(typeof p=="string"?d.result.push(p):d.used.has(p[0])||(d.result.push(p),d.used.add(p[0])),d),{result:[],used:new Set}).result,h=c.findIndex(d=>typeof d!="string"),u=c.findLastIndex(d=>typeof d!="string");return c.slice(h,u+1).map(d=>typeof d=="string"?d:d[4]).join("").replaceAll(/\s+/g," ").trim()}var import_ag_charts_core9=require("ag-charts-core"),Invalidating=(e,t)=>{const i=Symbol(String(t));e[i]=void 0,Object.defineProperty(e,t,{get(){return this[i]},set(s){this[i]!==s&&(this[i]=s,this.invalid=!0)},enumerable:!0,configurable:!1})},import_ag_charts_core8=require("ag-charts-core");function filterVisibleTicks(e,t,i){if(i==null||i[0]===0&&i[1]===1)return e;const s=(0,import_ag_charts_core8.clamp)(0,Math.floor(i[0]*e.length),e.length),n=(0,import_ag_charts_core8.clamp)(0,Math.ceil(i[1]*e.length),e.length),r=t?e.length-n:s,a=t?e.length-s:n;return e.slice(r,a)}var _BandScale=class Ct extends AbstractScale{constructor(){super(...arguments),this.invalid=!0,this.range=[0,1],this.round=!1,this.interval=void 0,this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(t){return t instanceof Ct}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(t){t=(0,import_ag_charts_core9.clamp)(0,t,1),this._paddingInner=t,this._paddingOuter=t}get padding(){return this._paddingInner}set paddingInner(t){this.invalid=!0,this._paddingInner=(0,import_ag_charts_core9.clamp)(0,t,1)}get paddingInner(){return this._paddingInner}set paddingOuter(t){this.invalid=!0,this._paddingOuter=(0,import_ag_charts_core9.clamp)(0,t,1)}get paddingOuter(){return this._paddingOuter}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&import_ag_charts_core9.Logger.warnOnce("Expected update to not invalidate scale"))}ticks(t,i=this.domain,s){return filterVisibleTicks(i,!1,s)}convert(t,i){this.refresh();const s=this.getIndex(t);return s==null||s<0||s>=this.domain.length?NaN:this.ordinalRange(s)}invertNearestIndex(t){this.refresh();const{domain:i}=this;if(i.length===0)return-1;let s=0,n=i.length-1,r=1/0,a=0;for(;s<=n;){const o=(n+s)/2|0,l=this.ordinalRange(o),c=Math.abs(l-t);if(c===0)return o;c<r&&(r=c,a=o),l<t?s=o+1:n=o-1}return a}update(){const t=this.domain.length;if(t===0)return;const[i,s]=this.range;let{_paddingInner:n}=this;const{_paddingOuter:r,round:a}=this,o=s-i;let l;t===1?(n=0,l=o*(1-r*2)):l=o/Math.max(1,t-n+r*2);const c=a?Math.floor(l):l;let h=i+(o-c*(t-n))/2,u=c*(1-n);a&&(h=Math.round(h),u=Math.round(u)),this._step=c,this._inset=h,this._bandwidth=u,this._rawBandwidth=l*(1-n)}ordinalRange(t){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_core9.clamp)(r,i+s*t,a)}};__decorateClass([Invalidating],_BandScale.prototype,"range",2),__decorateClass([Invalidating],_BandScale.prototype,"round",2),__decorateClass([Invalidating],_BandScale.prototype,"interval",2);var BandScale=_BandScale,CategoryScale=class extends BandScale{constructor(){super(...arguments),this.type="band",this.index=void 0,this._domain=[]}set domain(e){this._domain!==e&&(this.invalid=!0,this._domain=e,this.index=void 0)}get domain(){return this._domain}normalizeDomains(...e){let t;const i=new Set;let s=!0;for(const n of e)i.has(n)||(i.add(n),t==null?t=deduplicateCategories(n):(s&&(s=domainOrderedToNormalizedDomain(n,t)),t=deduplicateCategories([...t,...n])));return t??(t=[]),{domain:t,animatable:s}}toDomain(e){}invert(e,t=!1){this.refresh();const i=t?this.bandwidth/2:0,s=this.invertNearestIndex(Math.max(0,e-i));return t||e===this.ordinalRange(s)?this.domain[s]:void 0}getIndex(e){let{index:t}=this;if(t==null){const{domain:i}=this;t=new Map;for(let s=0;s<i.length;s++)t.set(dateToNumber(i[s]),s);this.index=t}return t.get(dateToNumber(e))}};function deduplicateCategories(e){let t;const i=new Set;for(const s of e){const n=dateToNumber(s),r=i.size;i.add(n),i.size!==r?t?.push(s):t??(t=e.slice(0,i.size))}return t??e}function domainOrderedToNormalizedDomain(e,t){let i=-1;for(const s of e){const n=t.indexOf(s);if(n===-1)i=1/0;else{if(n<=i)return!1;i=n}}return!0}var import_ag_charts_core11=require("ag-charts-core"),import_ag_charts_core10=require("ag-charts-core"),BaseProperties=class{handleUnknownProperties(e,t){}set(e){const{className:t=this.constructor.name}=this.constructor;if(typeof e!="object")return import_ag_charts_core10.Logger.warn(`unable to set ${t} - expecting a properties object`),this;const i=new Set(Object.keys(e));for(const s of listDecoratedProperties(this))if(i.has(s)){const n=e[s],r=this;if(isProperties(r[s]))if(r[s]instanceof PropertiesArray){const a=r[s].reset(n);a!=null?r[s]=a:import_ag_charts_core10.Logger.warn(`unable to set [${s}] - expecting a properties array`)}else r[s].set(n);else(0,import_ag_charts_core10.isPlainObject)(n)?r[s]=merge(n,r[s]??{}):r[s]=n;i.delete(s)}this.handleUnknownProperties(i,e);for(const s of i)import_ag_charts_core10.Logger.warn(`unable to set [${s}] in ${t} - property is unknown`);return this}isValid(e){return listDecoratedProperties(this).every(t=>{const i=extractDecoratedPropertyMetadata(this,t);if(i==null)return!0;const s=i.optional===!0||typeof this[t]<"u";return s||import_ag_charts_core10.Logger.warnOnce(`${e??""}[${t}] is required.`),s})}toJson(){return listDecoratedProperties(this).reduce((e,t)=>{const i=this[t];return e[t]=isProperties(i)?i.toJson():i,e},{})}},PropertiesArray=class kt extends Array{constructor(t,...i){super(i.length);const n=(r=>!!r?.prototype?.constructor?.name)(t)?r=>new t().set(r):t;Object.defineProperty(this,"itemFactory",{value:n,enumerable:!1,configurable:!1}),this.set(i)}set(t){if((0,import_ag_charts_core10.isArray)(t)){this.length=t.length;for(let i=0;i<t.length;i++)this[i]=this.itemFactory(t[i])}return this}reset(t){if(Array.isArray(t))return new kt(this.itemFactory,...t)}toJson(){return this.map(t=>t?.toJson?.()??t)}};function isProperties(e){return e instanceof BaseProperties||e instanceof PropertiesArray}var TestEnv=!1,TempValidate=TestEnv?(e,t={})=>{const{optional:i=!1}=t;return addTransformToInstanceProperty((s,n,r)=>{const a={...t,target:s,property:n};if(i&&typeof r>"u"||e(r,a)){if(isProperties(s[n])&&!isProperties(r))return s[n].set(r),s[n]}else{const o=(0,import_ag_charts_core11.stringifyValue)(r,50),l=String(n).replace(/^_*/,""),c=s.constructor.className??s.constructor.name.replace(/Properties$/,""),h=e.message?`; expecting ${getPredicateMessage(e,a)}`:"";import_ag_charts_core11.Logger.warn(`TempValidation!!! Property [${l}] of [${c}] cannot be set to [${o}]${h}, ignoring.`)}return r},void 0,{optional:i})}:()=>addFakeTransformToInstanceProperty,AND=(...e)=>{const t=[];return predicateWithMessage((i,s)=>(t.length=0,e.every(n=>{const r=n(i,s);return r||t.push(getPredicateMessage(n,s)),r})),()=>t.filter(Boolean).join(" AND "))},OR=(...e)=>predicateWithMessage((t,i)=>e.some(s=>s(t,i)),t=>e.map(getPredicateMessageMapper(t)).filter(Boolean).join(" OR ")),OBJECT=attachObjectRestrictions(predicateWithMessage((e,t)=>isProperties(e)||(0,import_ag_charts_core11.isObject)(e)&&isProperties(t.target[t.property]),"a properties object")),PLAIN_OBJECT=attachObjectRestrictions(predicateWithMessage(e=>(0,import_ag_charts_core11.isObject)(e),"an object")),BOOLEAN=predicateWithMessage(import_ag_charts_core11.isBoolean,"a boolean"),FUNCTION=predicateWithMessage(import_ag_charts_core11.isFunction,"a function"),STRING=predicateWithMessage(import_ag_charts_core11.isString,"a string"),NUMBER=attachNumberRestrictions(predicateWithMessage(import_ag_charts_core11.isFiniteNumber,"a number")),REAL_NUMBER=predicateWithMessage(e=>(0,import_ag_charts_core11.isNumber)(e)&&!isNaN(e),"a real number"),NAN=predicateWithMessage(e=>(0,import_ag_charts_core11.isNumber)(e)&&isNaN(e),"NaN"),POSITIVE_NUMBER=NUMBER.restrict({min:0}),RATIO=NUMBER.restrict({min:0,max:1}),NUMBER_OR_NAN=OR(NUMBER,NAN),ARRAY=attachArrayRestrictions(predicateWithMessage(import_ag_charts_core11.isArray,"an array")),ARRAY_OF=(e,t)=>predicateWithMessage((i,s)=>(0,import_ag_charts_core11.isArray)(i)&&i.every(n=>e(n,s)),i=>{const s=getPredicateMessage(ARRAY,i)??"";return typeof t=="function"?`${s} of ${t(i)}`:t?`${s} of ${t}`:s}),isComparable=e=>(0,import_ag_charts_core11.isFiniteNumber)(e)||(0,import_ag_charts_core11.isValidDate)(e),LESS_THAN=e=>predicateWithMessage((t,i)=>!isComparable(t)||!isComparable(i.target[e])||t<i.target[e],`to be less than ${e}`),GREATER_THAN=e=>predicateWithMessage((t,i)=>!isComparable(t)||!isComparable(i.target[e])||t>i.target[e],`to be greater than ${e}`),DATE=predicateWithMessage(import_ag_charts_core11.isValidDate,"Date object"),DATE_OR_DATETIME_MS=OR(DATE,POSITIVE_NUMBER),colorMessage="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",COLOR_STRING=predicateWithMessage(import_ag_charts_core11.isColor,`color string. ${colorMessage}`),COLOR_GRADIENT=attachObjectRestrictions(predicateWithMessage(e=>(0,import_ag_charts_core11.isObject)(e)&&e.type==="gradient","a color gradient object