UNPKG

ag-charts-community

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

2 lines 1.08 MB
"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_exports={};__export(main_exports,{AG_CHARTS_LOCALE_EN_US:()=>AG_CHARTS_LOCALE_EN_US,AgCharts:()=>AgCharts,AgChartsCommunityModule:()=>AgChartsCommunityModule,AgErrorBarSupportedSeriesTypes:()=>AgErrorBarSupportedSeriesTypes,AgTooltipAnchorToType:()=>AgTooltipAnchorToType,AgTooltipPlacementType:()=>AgTooltipPlacementType,AgTooltipPositionType:()=>AgTooltipPositionType,VERSION:()=>VERSION,_ModuleSupport:()=>module_support_exports,_Scene:()=>integrated_charts_scene_exports,_Theme:()=>integrated_charts_theme_exports,_Util:()=>integrated_charts_util_exports,_Widget:()=>exports_exports,setupCommunityModules:()=>registerInbuiltModules,time:()=>time_exports}),module.exports=__toCommonJS(main_exports);var import_ag_charts_core159=require("ag-charts-core"),import_ag_charts_core103=require("ag-charts-core"),BaseModuleInstance=class{constructor(){this.destroyFns=[]}destroy(){for(const e of this.destroyFns)e()}},ModuleRegistry=class{constructor(){this.modules=[],this.dependencies=new Map,this.modulesByOptionKey=new Map}register(...e){for(const t of e){this.registerDependencies(t);const i=this.modules.find(s=>t.type===s.type&&("optionsKey"in t&&"optionsKey"in s?t.optionsKey===s.optionsKey:!0)&&t.identifier===s.identifier);if(i){if(t.packageType==="enterprise"&&i.packageType==="community"){const s=this.modules.indexOf(i);this.modules.splice(s,1,t),"optionsKey"in t&&this.modulesByOptionKey.set(t.optionsKey,t)}}else this.modules.push(t),"optionsKey"in t&&this.modulesByOptionKey.set(t.optionsKey,t)}}hasEnterpriseModules(){return this.modules.some(e=>e.packageType==="enterprise")}*byType(...e){const t=new Set,i=this.modules.filter(r=>e.includes(r.type)),s=r=>{const a=this.dependencies.get(r);return a?.flatMap(s).concat(a)??[]},n=[];for(const r of i){const a="optionsKey"in r?r.optionsKey:r.contextKey;if(!t.has(a)){for(const o of s(a)){if(t.has(o))continue;const l=this.modulesByOptionKey.get(o);if(!l){n.push(o);continue}e.includes(l.type)&&(yield l,t.add(o))}yield r,t.add(a)}}if(n.length>0)throw new Error(`Could not resolve module dependencies: ${n}`)}registerDependencies(e){if(e.dependencies==null||e.dependencies.length===0)return;const t="optionsKey"in e?e.optionsKey:e.contextKey;this.dependencies.set(t,e.dependencies)}},moduleRegistry=new ModuleRegistry,import_ag_charts_core=require("ag-charts-core"),BBoxValues={containsPoint,equals,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 equals(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.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}function nearestSquaredInContainer(e,t,i,s=1/0){const{x:n=e,y:r=t}=i.transformPoint?.(e,t)??{},a={nearest:void 0,distanceSquared:s};for(const o of i.children){const{nearest:l,distanceSquared:c}=o.nearestSquared(n,r,a.distanceSquared);if(c===0)return{nearest:l,distanceSquared:c};c<a.distanceSquared&&(a.nearest=l,a.distanceSquared=c)}return a}var _BBox=class be{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 be(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 be(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 be(t,i,s,n)}equals(t){return BBoxValues.equals(this,t)}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 be(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 be(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,import_ag_charts_core22=require("ag-charts-core"),import_ag_charts_core2=require("ag-charts-core"),LONG_TIME_PERIOD_THRESHOLD=2e3,timeOfLastLog=Date.now(),logTimeGap=()=>{const e=Date.now()-timeOfLastLog;if(e>LONG_TIME_PERIOD_THRESHOLD){const t=(Math.floor(e/100)/10).toFixed(1);import_ag_charts_core2.Logger.log(`**** ${t}s since last log message ****`)}timeOfLastLog=Date.now()},Debug={create(...e){return Object.assign((...i)=>{Debug.check(...e)&&(typeof i[0]=="function"&&(i=(0,import_ag_charts_core2.toArray)(i[0]())),logTimeGap(),import_ag_charts_core2.Logger.log(...i))},{check:()=>Debug.check(...e),group:(i,s)=>Debug.check(...e)?import_ag_charts_core2.Logger.logGroup(i,s):s()})},check(...e){return e.length===0&&e.push(!0),(0,import_ag_charts_core2.toArray)((0,import_ag_charts_core2.getWindow)("agChartsDebug")).some(i=>e.includes(i))},inDevelopmentMode(e){if(Debug.check("dev"))return e()}};function clearContext({context:e,pixelRatio:t,width:i,height:s}){e.save(),e.resetTransform(),e.clearRect(0,0,Math.ceil(i*t),Math.ceil(s*t)),e.restore()}function debugContext(e){if(Debug.check("canvas")){const t=e.save.bind(e),i=e.restore.bind(e);let s=0;Object.assign(e,{save(){t(),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(e,t,i){return[Math.floor(e*i),Math.floor(t*i)]}var HdpiOffscreenCanvas=class{constructor(e){const{width:t,height:i,pixelRatio:s,willReadFrequently:n=!1}=e;this.width=t,this.height=i,this.pixelRatio=s;const[r,a]=canvasDimensions(t,i,s);this.canvas=new OffscreenCanvas(r,a),this.context=this.canvas.getContext("2d",{willReadFrequently:n}),this.context.setTransform(s,0,0,s,0,0),debugContext(this.context)}drawImage(e,t=0,i=0){return e.drawImage(this.canvas,t,i)}transferToImageBitmap(){return this.canvas.transferToImageBitmap()}resize(e,t,i){if(!(e>0&&t>0))return;const{canvas:s,context:n}=this;if(e!==this.width||t!==this.height||i!==this.pixelRatio){const[r,a]=canvasDimensions(e,t,i);s.width=r,s.height=a}n.setTransform(i,0,0,i,0,0),this.width=e,this.height=t,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"),import_ag_charts_core3=require("ag-charts-core"),BREAK_TRANSFORM_CHAIN=Symbol("BREAK"),CONFIG_KEY="__decorator_config",ACCESSORS_KEY="__decorator_accessors";function addFakeTransformToInstanceProperty(e,t){initialiseConfig(e,t).optional=!0}function initialiseConfig(e,t){if(Object.getOwnPropertyDescriptor(e,CONFIG_KEY)==null&&Object.defineProperty(e,CONFIG_KEY,{value:{}}),Object.getOwnPropertyDescriptor(e,ACCESSORS_KEY)==null){const h=Object.getPrototypeOf(e)?.[ACCESSORS_KEY]?.slice()??[];Object.defineProperty(e,ACCESSORS_KEY,{value:h})}const i=e[CONFIG_KEY],s=t.toString();if(i[s]!=null)return i[s];i[s]={setters:[],getters:[],observers:[]};const n=Object.getOwnPropertyDescriptor(e,t);let r=n?.get,a=n?.set;if(r==null||a==null){const c=e[ACCESSORS_KEY];let h=c.indexOf(t);h===-1&&(h=c.push(t)-1),r??(r=function(){let u=this.__accessors;return u==null&&(u=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:u})),u[h]}),a??(a=function(u){let d=this.__accessors;d==null&&(d=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:d})),d[h]=u})}return Object.defineProperty(e,t,{set:function(c){const{setters:h,observers:u}=i[s];let d;h.some(p=>p.length>2)&&(d=r.call(this));for(const p of h)if(c=p(this,t,c,d),c===BREAK_TRANSFORM_CHAIN)return;a.call(this,c);for(const p of u)p(this,c,d)},get:function(){let c=r.call(this);for(const h of i[s].getters)if(c=h(this,t,c),c===BREAK_TRANSFORM_CHAIN)return;return c},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 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_core3.isPlainObject)(e)?(0,import_ag_charts_core3.isPlainObject)(t)?objectsEqualWith(e,t,objectsEqual):!1:e===t}function objectsEqualWith(e,t,i){if(Object.is(e,t))return!0;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_core3.isObject)(i))continue;const s=isDecoratedObject(i)?listDecoratedProperties(i):Object.keys(i);for(const n of s)(0,import_ag_charts_core3.isPlainObject)(t[n])&&(0,import_ag_charts_core3.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_core3.isObject)(i))continue;const s=isDecoratedObject(i)?listDecoratedProperties(i):Object.keys(i);for(const n of s)(0,import_ag_charts_core3.isPlainObject)(t[n])&&(0,import_ag_charts_core3.isPlainObject)(i[n])?t[n]=merge(t[n],i[n]):n in t||(t[n]??(t[n]=i[n]))}return t}function mergeArrayDefaults(e,...t){return t&&(0,import_ag_charts_core3.isArray)(e)?e.map(i=>mergeDefaults(i,...t)):e}function mapValues(e,t){const i={};for(const[s,n]of(0,import_ag_charts_core3.entries)(e))i[s]=t(n,s,e);return i}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_core3.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_core3.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}function deepFreeze(e){return e==null||typeof e!="object"||!(0,import_ag_charts_core3.isPlainObject)(e)||(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const i=e[t];i!==null&&(typeof i=="object"||typeof i=="function")&&!Object.isFrozen(i)&&deepFreeze(i)})),e}function isObjectWithProperty(e,t){return(0,import_ag_charts_core3.isPlainObject)(e)&&t in e}function isObjectWithStringProperty(e,t){return isObjectWithProperty(e,t)&&typeof e[t]=="string"}var import_ag_charts_core4=require("ag-charts-core"),TRIPLE_EQ=(e,t)=>e===t;function SceneChangeDetection(e){return function(t,i){const s=`__${i}`;t[i]||prepareGetSet(t,i,s,e)}}function SceneObjectChangeDetection(e){return SceneChangeDetection(e)}function SceneArrayChangeDetection(e){const t=e??{};return t.equals=import_ag_charts_core4.arraysEqual,SceneChangeDetection(e)}function prepareGetSet(e,t,i,s){const{changeCb:n,convertor:r,checkDirtyOnAssignment:a=!1}=s??{},o={changeCb:n,checkDirtyOnAssignment:a,convertor:r},l=buildCheckDirtyChain(i,buildChangeCallbackChain(buildConvertorChain(buildSetter(i,o),o),o),o);Object.defineProperty(e,t,{set:l,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 buildSetter(e,t){const{equals:i=TRIPLE_EQ}=t;return function(s){const n=this[e];return i(s,n)?NO_CHANGE:(this[e]=s,this.onChangeDetection(e),s)}}var PointerEvents=(e=>(e[e.All=0]="All",e[e.None=1]="None",e))(PointerEvents||{}),_Node=class Ce{constructor(t){this.serialNumber=Ce._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=(0,import_ag_charts_core5.createId)(this),this.pointerEvents=0,this.scene=void 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??Ce._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_core5.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_core5.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.scene?.layersManager}get imageLoader(){return this.scene?.imageLoader}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)}setScene(t){this.scene=t,this._debug=t?.layersManager?.debug;for(const i of this.children())i.setScene(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_core5.toIterable)(t))i.parentNode?.removeChild(i),this.childNodes.add(i),i.parentNode=this,i.setScene(this.scene);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.setScene(),this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}remove(){this.parentNode?.removeChild(this)}clear(){for(const t of this.children())delete t.parentNode,t.setScene();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(){}onChangeDetection(t){this.markDirty(t)}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([SceneObjectChangeDetection({equals:objectsEqual,changeCb:e=>e.onZIndexChange()})],_Node.prototype,"zIndex",2);var Node2=_Node,import_ag_charts_core19=require("ag-charts-core"),import_ag_charts_core9=require("ag-charts-core"),twoPi=Math.PI*2,halfPi=Math.PI/2;function normalizeAngle360(e){return e%=twoPi,e+=twoPi,e%=twoPi,e}function normalizeAngle360Inclusive(e){return e%=twoPi,e+=twoPi,e!==twoPi&&(e%=twoPi),e}function normalizeAngle180(e){return e%=twoPi,e<-Math.PI?e+=twoPi:e>=Math.PI&&(e-=twoPi),e}function isBetweenAngles(e,t,i){const s=normalizeAngle360(e),n=normalizeAngle360(t),r=normalizeAngle360(i);return n<r?n<=s&&s<=r:n>r?n<=s||s<=r:!0}function toRadians(e){return e/180*Math.PI}function toDegrees(e){return e/Math.PI*180}function angleBetween(e,t){return e=normalizeAngle360(e),t=normalizeAngle360(t),t-e+(e>t?twoPi:0)}function getAngleRatioRadians(e){const t=normalizeAngle360(e);return t<=halfPi?t/halfPi:t<=Math.PI?(Math.PI-t)/halfPi:t<=1.5*Math.PI?(t-Math.PI)/halfPi:(twoPi-t)/halfPi}function angularPadding(e,t,i){const s=getAngleRatioRadians(i);return e*s+t*Math.abs(1-s)}function normalizeAngle360FromDegrees(e){return e?normalizeAngle360(toRadians(e)):0}var import_ag_charts_core8=require("ag-charts-core"),import_ag_charts_core7=require("ag-charts-core"),import_ag_charts_core6=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 J{constructor(t,i,s,n=1){this.r=(0,import_ag_charts_core6.clamp)(0,t||0,1),this.g=(0,import_ag_charts_core6.clamp)(0,i||0,1),this.b=(0,import_ag_charts_core6.clamp)(0,s||0,1),this.a=(0,import_ag_charts_core6.clamp)(0,n||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!J.parseHex(t):t.indexOf("rgb")>=0?!!J.stringToRgba(t):J.nameToHex.has(t.toLowerCase())}static fromString(t){if(t.indexOf("#")>=0)return J.fromHexString(t);const i=J.nameToHex.get(t.toLowerCase());if(i)return J.fromHexString(i);if(t.indexOf("rgb")>=0)return J.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=J.parseHex(t);if(i){const[s,n,r,a]=i;return new J(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_core6.clamp)(0,c,100),c/=100):o===3?c=(0,import_ag_charts_core6.clamp)(0,c,1):(c=(0,import_ag_charts_core6.clamp)(0,c,255),c/=255),a.push(c)}return a}static fromRgbaString(t){const i=J.stringToRgba(t);if(i){if(i.length===3)return new J(i[0],i[1],i[2]);if(i.length===4)return new J(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 J(t[0],t[1],t[2],t[3]);if(t.length===3)return new J(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=J.HSBtoRGB(t,i,s);return new J(r[0],r[1],r[2],n)}static fromHSL(t,i,s,n=1){const r=J.HSLtoRGB(t,i,s);return new J(r[0],r[1],r[2],n)}static fromOKLCH(t,i,s,n=1){const r=J.OKLCHtoRGB(t,i,s);return new J(r[0],r[1],r[2],n)}static padHex(t){return t.length===1?"0"+t:t}toHexString(){let t="#"+J.padHex(Math.round(this.r*255).toString(16))+J.padHex(Math.round(this.g*255).toString(16))+J.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(t+=J.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 J.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 J(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=J.RGBtoOKLCH(t.r,t.g,t.b);return J.fromOKLCH((0,import_ag_charts_core6.clamp)(0,s[0]+i,1),s[1],s[2])}static darken(t,i){const s=J.RGBtoOKLCH(t.r,t.g,t.b);return J.fromOKLCH((0,import_ag_charts_core6.clamp)(0,s[0]-i,1),s[1],s[2])}static interpolate(t,i){const s=1/(t.length-1),n=t.map(r=>J.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 J.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,AbstractScale=class{ticks(e,t,i){}niceDomain(e,t=this.domain){return t}tickFormatter(e){}datumFormatter(e){}get bandwidth(){}get step(){}get inset(){}},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})},convertColorStringToOklcha=e=>{const t=Color.fromString(e),[i,s,n]=Color.RGBtoOKLCH(t.r,t.g,t.b);return{l:i,c:s,h:n,a:t.a}},delta=1e-6,isAchromatic=e=>e.c<delta||e.l<delta||e.l>1-delta,interpolateOklch=(e,t,i)=>{i=(0,import_ag_charts_core7.clamp)(0,i,1);let s;if(isAchromatic(e))s=t.h;else if(isAchromatic(t))s=e.h;else{const o=e.h;let l=t.h;const c=t.h-e.h;c>180?l-=360:c<-180&&(l+=360),s=o*(1-i)+l*i}const n=e.c*(1-i)+t.c*i,r=e.l*(1-i)+t.l*i,a=e.a*(1-i)+t.a*i;return Color.fromOKLCH(r,n,s,a)},ColorScale=class extends AbstractScale{constructor(){super(...arguments),this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(convertColorStringToOklcha)}update(){const{domain:e,range:t}=this;e.length<2&&(import_ag_charts_core7.Logger.warnOnce("`colorDomain` should have at least 2 values."),e.length===0?e.push(0,1):e.length===1&&e.push(e[0]+1));for(let i=1;i<e.length;i++){const s=e[i-1],n=e[i];if(s>=n){import_ag_charts_core7.Logger.warnOnce("`colorDomain` values should be supplied in ascending order."),e.sort((r,a)=>r-a);break}}if(t.length<e.length)for(let i=t.length;i<e.length;i++)t.push(t.length>0?t[0]:"black");this.parsedRange=this.range.map(convertColorStringToOklcha)}normalizeDomains(...e){return{domain:e.flat(),animatable:!0}}toDomain(){}convert(e){this.refresh();const{domain:t,range:i,parsedRange:s}=this,n=t[0],r=t.at(-1),a=i[0],o=i[i.length-1];if(e<=n)return a;if(e>=r)return o;let l,c;if(t.length===2){const d=(e-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<t.length-2&&!(e<t[l+1]);l++);const d=t[l],p=t[l+1];c=(e-d)/(p-d)}const h=s[l],u=s[l+1];return interpolateOklch(h,u,c).toRgbaString()}invert(){}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&import_ag_charts_core7.Logger.warnOnce("Expected update to not invalidate scale"))}};__decorateClass([Invalidating],ColorScale.prototype,"domain",2),__decorateClass([Invalidating],ColorScale.prototype,"range",2);var Gradient=class{constructor(e,t=[],i){this.colorSpace=e,this.stops=t,this.bbox=i,this._cache=void 0}createGradient(e,t,i){const s=this.bbox??t;if(isNaN(s.x)||isNaN(s.y))return;if(this._cache!=null&&this._cache.ctx===e&&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(e,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))}a.addColorStop(u.stop,u.color),c=u}return"createPattern"in a&&(a=a.createPattern()),this._cache={ctx:e,bbox:s,gradient:a},a}toSvg(e){const t=this.bbox??e,i=this.createSvgGradient(t);return this.stops.forEach(({stop:s,color:n})=>{const r=(0,import_ag_charts_core8.createSvgElement)("stop");r.setAttribute("offset",`${s}`),r.setAttribute("stop-color",`${n}`),i.appendChild(r)}),i}},ConicGradient=class extends Gradient{constructor(e,t,i=0,s){super(e,t,s),this.angle=i}createCanvasGradient(e,t,i){const{angle:n}=this,r=normalizeAngle360FromDegrees(n+-90),a=i?.centerX??t.x+t.width*.5,o=i?.centerY??t.y+t.height*.5;return e.createConicGradient(r,a,o)}createSvgGradient(e){return(0,import_ag_charts_core9.createSvgElement)("linearGradient")}},import_ag_charts_core10=require("ag-charts-core"),LinearGradient=class extends Gradient{constructor(e,t,i=0,s){super(e,t,s),this.angle=i}getGradientPoints(e){const{angle:i}=this,s=normalizeAngle360FromDegrees(i+90),n=Math.cos(s),r=Math.sin(s),a=e.width,o=e.height,l=e.x+a*.5,c=e.y+o*.5,h=Math.sqrt(o*o+a*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(e,t){const{x0:i,y0:s,x1:n,y1:r}=this.getGradientPoints(t);if(!(isNaN(i)||isNaN(s)||isNaN(n)||isNaN(r)))return e.createLinearGradient(i,s,n,r)}createSvgGradient(e){const{x0:t,y0:i,x1:s,y1:n}=this.getGradientPoints(e),r=(0,import_ag_charts_core10.createSvgElement)("linearGradient");return r.setAttribute("x1",String(t)),r.setAttribute("y1",String(i)),r.setAttribute("x2",String(s)),r.setAttribute("y2",String(n)),r.setAttribute("gradientUnits","userSpaceOnUse"),r}},import_ag_charts_core11=require("ag-charts-core"),RadialGradient=class extends Gradient{constructor(e,t,i){super(e,t,i)}createCanvasGradient(e,t,i){const s=i?.centerX??t.x+t.width*.5,n=i?.centerY??t.y+t.height*.5,r=i?.innerRadius??0,a=i?.outerRadius??Math.hypot(t.width*.5,t.height*.5)/Math.SQRT2;return e.createRadialGradient(s,n,r,s,n,a)}createSvgGradient(e){const t=e.x+e.width*.5,i=e.y+e.height*.5,s=(0,import_ag_charts_core11.createSvgElement)("radialGradient");return s.setAttribute("cx",String(t)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(e.width*.5,e.height*.5)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}},import_ag_charts_core13=require("ag-charts-core"),import_ag_charts_core12=require("ag-charts-core"),Property=addFakeTransformToInstanceProperty,BaseProperties=class{handleUnknownProperties(e,t){}set(e){const{className:t=this.constructor.name}=this.constructor;if(typeof e!="object")return import_ag_charts_core12.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_core12.Logger.warn(`unable to set [${s}] - expecting a properties array`)}else r[s].set(n);else(0,import_ag_charts_core12.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_core12.Logger.warn(`unable to set [${s}] in ${t} - property is unknown`);return this}toJson(){return listDecoratedProperties(this).reduce((e,t)=>{const i=this[t];return e[t]=isProperties(i)?i.toJson():i,e},{})}},PropertiesArray=class ze 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_core12.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 ze(this.itemFactory,...t)}toJson(){return this.map(t=>t?.toJson?.()??t)}};function isProperties(e){return e instanceof BaseProperties||e instanceof PropertiesArray}var StopProperties=class extends BaseProperties{constructor(){super(...arguments),this.color="black"}};__decorateClass([Property],StopProperties.prototype,"stop",2),__decorateClass([Property],StopProperties.prototype,"color",2);function stopsAreAscending(e){let t;for(const i of e)if(i?.stop!=null){if(t!=null&&i.stop<t)return!1;t=i.stop}return!0}function discreteColorStops(e){return e.flatMap((t,i)=>{const{stop:s}=t,n=e.at(i+1)?.color;return n!=null?[t,{stop:s,color:n}]:[t]})}function getDefaultColorStops(e,t){const i=t==="discrete"?1:0,s=e.map((n,r,{length:a})=>({stop:(r+i)/(a-1+i),color:n}));return t==="discrete"?discreteColorStops(s):s}function getColorStops(e,t,i,s="continuous"){const n=e.map(g=>typeof g=="string"?{color:g}:g);if(n.length===0)return getDefaultColorStops(t,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 m=n[g];if(g>=h){h=n.length-1;for(let f=g+1;f<n.length;f+=1)if(n[f]?.stop!=null){h=f;break}}let y=m?.stop;if(y==null){const f=n[c]?.stop,b=n[h]?.stop,x=f??r,v=b??a,S=o&&f==null?1:0;y=x+(v-x)*(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,m)=>{let y=g?.color;const f=l[m];return y!=null?u=y:u!=null?y=u:(d==null&&(d=new ColorScale,d.domain=[0,1],d.range=t),y=d.convert(f)),{stop:f,color:y}});return s==="discrete"?discreteColorStops(p):p}var import_ag_charts_core14=require("ag-charts-core"),Image2=class{constructor(e,t){this.imageLoader=e,this._cache=void 0,this.url=t.url,this.backgroundFill=t.backgroundFill??"black",this.backgroundFillOpacity=t.backgroundFillOpacity??1,this.repeat=t.repeat??"no-repeat",this.width=t.width,this.height=t.height,this.fit=t.fit??"stretch",this.rotation=t.rotation??0}createCanvasImage(e,t,i,s){if(!t)return null;const[n,r]=this.getSize(t.width,t.height,i,s);return n<1||r<1?(import_ag_charts_core14.Logger.warnOnce("Image fill is too small to render, ignoring."),null):e.createPattern(t,this.repeat)}getSize(e,t,i,s){const{fit:n}=this;let r=e,a=t,o=1;const l=i/s,c=e/t;return n==="stretch"||e===0||t===0?(r=i,a=s):n==="contain"?o=c>l?i/e:s/t:n==="cover"&&(o=c>l?s/t:i/e),[Math.max(1,r*o),Math.max(1,a*o)]}setImageTransform(e,t){if(typeof e=="string")return;const{url:i,rotation:s,width:n,height:r}=this,a=this.imageLoader?.loadImage(i);if(!a)return;const o=normalizeAngle360FromDegrees(s),l=Math.cos(o),c=Math.sin(o),[h,u]=this.getSize(a.width,a.height,n??t.width,r??t.height),d=h/a.width,p=u/a.height,g=t.x+t.width/2,m=t.y+t.height/2,y=l*h-c*u,f=c*h+l*u,b=y/2,x=f/2;e?.setTransform(new DOMMatrix([l*d,c*p,-c*d,l*p,g-b,m-x]))}createPattern(e,t,i,s){const n=this.width??t,r=this.height??i,a=this._cache;if(a!=null&&a.ctx===e&&a.width===n&&a.height===r)return a.pattern;const o=this.imageLoader?.loadImage(this.url,s),l=this.createCanvasImage(e,o,n,r);return l==null?this.backgroundFill:(this._cache={ctx:e,pattern:l,width:n,height:r},l)}toSvg(e,t){const{url:i,rotation:s,backgroundFill:n,backgroundFillOpacity:r}=this,{x:a,y:o,width:l,height:c}=e,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/t}) rotate(${s}, ${l/2}, ${c/2})`),h.appendChild(d),h}},import_ag_charts_core17=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(e){if(!e)return;const t=[];let i=0,s;for(;i<e.length;){const n=commandEx.exec(e.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,e,i);if(!a)return;i=a[0],s=r,t.push(a[1])}return t}function parseSegment(e,t,i){const s=pathParams[e.toLocaleLowerCase()],n={command:e,params:[]};for(const r of s){const a=t.slice(i),o=r.exec(a);if(o!=null){n.params.push(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 [${e}]`);return}}return[i,n]}var import_ag_charts_core16=require("ag-charts-core");function pointsDistanceSquared(e,t,i,s){const n=e-i,r=t-s;return n*n+r*r}function lineDistanceSquared(e,t,i,s,n,r,a){if(i===n&&s===r)return Math.min(a,pointsDistanceSquared(e,t,i,s));const o=n-i,l=r-s,c=Math.max(0,Math.min(1,((e-i)*o+(t-s)*l)/(o*o+l*l))),h=i+c*o,u=s+c*l;return Math.min(a,pointsDistanceSquared(e,t,h,u))}function arcDistanceSquared(e,t,i,s,n,r,a,o,l){o&&([a,r]=[r,a]);const c=Math.atan2(t-s,e-i);if(!isBetweenAngles(c,r,a)){const u=i+Math.cos(r)*n,d=s+Math.sin(r)*n,p=i+Math.cos(r)*n,g=s+Math.sin(r)*n;return Math.min(l,pointsDistanceSquared(e,t,u,d),pointsDistanceSquared(e,t,p,g))}const h=n-Math.sqrt(pointsDistanceSquared(e,t,i,s));return Math.min(l,h*h)}function linearRoot(e,t){const i=-t/e;return e!==0&&i>=0&&i<=1?[i]:[]}function quadraticRoots(e,t,i){if(e===0)return linearRoot(t,i);const s=t*t-4*e*i,n=[];if(s===0){const r=-t/(2*e);r>=0&&r<=1&&n.push(r)}else if(s>0){const r=Math.sqrt(s),a=(-t-r)/(2*e),o=(-t+r)/(2*e);a>=0&&a<=1&&n.push(a),o>=0&&o<=1&&n.push(o)}return n}function cubicRoots(e,t,i,s){if(e===0)return quadraticRoots(t,i,s);const n=t/e,r=i/e,a=s/e,o=(3*r-n*n)/9,l=(9*n*r-27*a-2*n*n*n)/54,c=o*o*o+l*l,h=1/3,u=[];if(c>=0){const d=Math.sqrt(c),p=Math.sign(l+d)*Math.pow(Math.abs(l+d),h),g=Math.sign(l-d)*Math.pow(Math.abs(l-d),h),m=Math.abs(Math.sqrt(3)*(p-g)/2),y=-h*n+(p+g);if(y>=0&&y<=1&&u.push(y),m===0){const f=-h*n-(p+g)/2;f>=0&&f<=1&&u.push(f)}}else{const d=Math.acos(l/Math.sqrt(-o*o*o)),p=h*n,g=2*Math.sqrt(-o),m=g*Math.cos(h*d)-p,y=g*Math.cos(h*(d+2*Math.PI))-p,f=g*Math.cos(h*(d+4*Math.PI))-p;m>=0&&m<=1&&u.push(m),y>=0&&y<=1&&u.push(y),f>=0&&f<=1&&u.push(f)}return u}function segmentIntersection(e,t,i,s,n,r,a,o){const l=(i-e)*(o-r)-(s-t)*(a-n);if(l===0)return 0;const c=((a-n)*(t-r)-(e-n)*(o-r))/l,h=((i-e)*(t-r)-(s-t)*(e-n))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function cubicSegmentIntersections(e,t,i,s,n,r,a,o,l,c,h,u){let d=0;const p=c-u,g=h-l,m=l*(u-c)-c*(h-l),y=bezierCoefficients(e,i,n,a),f=bezierCoefficients(t,s,r,o),b=p*y[0]+g*f[0],x=p*y[1]+g*f[1],v=p*y[2]+g*f[2],S=p*y[3]+g*f[3]+m,A=cubicRoots(b,x,v,S);for(const I of A){const D=I*I,L=I*D,k=y[0]*L+y[1]*D+y[2]*I+y[3],w=f[0]*L+f[1]*D+f[2]*I+f[3];let N;l===h?N=(w-c)/(u-c):N=(k-l)/(h-l),N>=0&&N<=1&&d++}return d}function bezierCoefficients(e,t,i,s){return[-e+3*t-3*i+s,3*e-6*t+3*i,-3*e+3*t,e]}function arcIntersections(e,t,i,s,n,r,a,o,l,c){if(isNaN(e)||isNaN(t))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-t)-e),g=Math.pow(e,2)+Math.pow(u-t,2)-Math.pow(i,2),m=Math.pow(p,2)-4*d*g;if(m<0)return 0;const y=(-p+Math.sqrt(m))/2/d,f=(-p-Math.sqrt(m))/2/d;let b=0;return[y,f].forEach(x=>{if(!(x>=Math.min(a,l)&&x<=Math.max(a,l)))return;const S=h*x+u,A=x-e,I=S-t,D=Math.atan2(I,A);isBetweenAngles(D,s,n)&&b++}),b}function evaluateBezier(e,t,i,s,n){return(1-n)**3*e+3*(1-n)**2*n*t+3*(1-n)*n**2*i+n**3*s}function solveBezier(e,t,i,s,n){if(n<=Math.min(e,s))return e<s?0:1;if(n>=Math.max(e,s))return e<s?1:0;let r=0,a=1,o=NaN;for(let l=0;l<12;l+=1)o=(r+a)/2,evaluateBezier(e,t,i,s,o)<n?r=o:a=o;return o}function splitBezier(e,t,i,s,n,r,a,o,l){const c=(1-l)*e+l*i,h=(1-l)*t+l*s,u=(1-l)*i+l*n,d=(1-l)*s+l*r,p=(1-l)*n+l*a,g=(1-l)*r+l*o,m=(1-l)*c+l*u,y=(1-l)*h+l*d,f=(1-l)*u+l*p,b=(1-l)*d+l*g,x=(1-l)*m+l*f,v=(1-l)*y+l*b;return[[{x:e,y:t},{x:c,y:h},{x:m,y},{x,y:v}],[{x,y:v},{x:f,y:b},{x:p,y:g},{x:a,y:o}]]}function calculateDerivativeExtrema(e,t,i,s){const n=-e+3*t-3*i+s,r=2*(e-2*t+i),a=-e+t;if(n===0){if(r!==0){const l=-a/r;if(l>0&&l<1)return[l]}return[]}const o=r*r-4*n*a;if(o>=0){const l=Math.sqrt(o),c=(-r+l)/(2*n),h=(-r-l)/(2*n);return[c,h].filter(u=>u>0&&u<1)}return[]}function calculateDerivativeExtremaXY(e,t,i,s,n,r,a,o){const l=calculateDerivativeExtrema(e,i,n,a),c=calculateDerivativeExtrema(t,s,r,o);return[...l,...c]}var ExtendedPath2D=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isEmpty(){return this.commands.length===0}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(e,t){this.openedPath=!0,this.path2d.moveTo(e,t),this.commands.push(0),this.params.push(e,t)}lineTo(e,t){this.openedPath?(this.path2d.lineTo(e,t),this.commands.push(1),this.params.push(e,t)):this.moveTo(e,t)}rect(e,t,i,s){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+s),this.lineTo(e,t+s),this.closePath()}appendSvg(e){let t=0,i=0,s,n,r=0,a=0;for(const{command:o,params:l}of e){s??(s=l[0]),n??(n=l[1]);const c=o===o.toLowerCase(),h=c?s:0,u=c?n:0;switch(o.toLowerCase()){case"m":this.moveTo(h+l[0],u+l[1]),s=h+l[0],n=u+l[1],t=s,i=n;break;case"c":this.cubicCurveTo(h+l[0],u+l[1],h+l[2],u+l[3],h+l[4],u+l[5]),r=h+l[2],a=u+l[3],s=h+l[4],n=u+l[5];break;case"s":this.cubicCurveTo(s+s-r,n+n-a,h+l[0],u+l[1],h+l[2],u+l[3]),r=h+l[0],a=u+l[1],s=h+l[2],n=u+l[3];break;case"q":this.cubicCurveTo((h+2*l[0])/3,(u+2*l[1])/3,(2*l[0]+l[2])/3,(2*l[1]+l[3])/3,l[2],l[3]),r=l[0],a=l[1],s=l[2],n=l[3];break;case"t":this.cubicCurveTo((s+2*(s+s-r))/3,(n+2*(n+n-a))/3,(2*(s+s-r)+l[0])/3,(2*(n+n-a)+l[1])/3,l[0],l[1]),r=s+s-r,a=n+n-a,s=l[0],n=l[1];break;case"a":this.ellipse(s,n,l[0],l[1],l[2]*Math.PI/180,l[3],l[4],h+l[5],u+l[6]),s=h+l[5],n=u+l[6];break;case"h":this.lineTo(h+l[0],n),s=h+l[0];break;case"l":this.lineTo(h+l[0],u+l[1]),s=h+l[0],n=u+l[1];break;case"v":this.lineTo(s,u+l[0]),n=u+l[0];break;case"z":this.closePath(),s=t,n=i;break;default:throw new Error(`Could not translate command '${o}' with '${l.join(" ")}'`)}}}ellipse(e,t,i,s,n,r,a,o,l){i=Math.abs(i),s=Math.abs(s);const c=(e-o)/2,h=(t-l)/2,u=Math.sin(n),d=Math.cos(n),p=d*c+u*h,g=-u*c+d*h,m=p/i,y=g/s;let f=m*m+y*y,b=(e+o)/2,x=(t+l)/2,v=0,S=0;f>=1?(f=Math.sqrt(f),i*=f,s*=f):(f=Math.sqrt(1/f-1),r===a&&(f=-f),v=f*i*y,S=-f*s*m,b+=d*v-u*S,x+=u*v+d*S);const A=Math.atan2((g-S)/s,(p-v)/i),I=Math.atan2((-g-S)/s,(-p-v)/i)-A,D=A+I,L=!!(1-a);this.ellipticalArc(b,x,i,s,n,A,