sryd-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
2 lines • 1.89 MB
JavaScript
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var i in e)__defProp(t,i,{get:e[i],enumerable:!0})},__copyProps=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of __getOwnPropNames(e))!__hasOwnProp.call(t,n)&&n!==i&&__defProp(t,n,{get:()=>e[n],enumerable:!(s=__getOwnPropDesc(e,n))||s.enumerable});return t},__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),__decorateClass=(t,e,i,s)=>{for(var n=s>1?void 0:s?__getOwnPropDesc(e,i):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(n=(s?a(e,i,n):a(n))||n);return s&&n&&__defProp(e,i,n),n},main_exports={};__export(main_exports,{AG_CHARTS_LOCALE_EN_US:()=>AG_CHARTS_LOCALE_EN_US,AgCharts:()=>AgCharts,AgChartsCommunityModule:()=>AgChartsCommunityModule,AgChartsEnterpriseModule:()=>AgChartsEnterpriseModule,AgErrorBarSupportedSeriesTypes:()=>AgErrorBarSupportedSeriesTypes,AgTooltipAnchorToType:()=>AgTooltipAnchorToType,AgTooltipPlacementType:()=>AgTooltipPlacementType,AgTooltipPositionType:()=>AgTooltipPositionType,LicenseManager:()=>LicenseManager2,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,setupEnterpriseModules:()=>setupEnterpriseModules2,time:()=>time_exports}),module.exports=__toCommonJS(main_exports);var __defProp2=Object.defineProperty,__export2=(t,e)=>{for(var i in e)__defProp2(t,i,{get:e[i],enumerable:!0})},logger_exports={};__export2(logger_exports,{error:()=>error,errorOnce:()=>errorOnce,log:()=>log,logGroup:()=>logGroup,reset:()=>reset,table:()=>table,warn:()=>warn,warnOnce:()=>warnOnce});var doOnceCache=new Set;function log(...t){console.log(...t)}function warn(t,...e){console.warn(`AG Charts - ${t}`,...e)}function error(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function table(...t){console.table(...t)}function warnOnce(t,...e){const i=`Logger.warn: ${t}`;doOnceCache.has(i)||(warn(t,...e),doOnceCache.add(i))}function errorOnce(t,...e){const i=`Logger.error: ${t}`;doOnceCache.has(i)||(error(t,...e),doOnceCache.add(i))}function reset(){doOnceCache.clear()}function logGroup(t,e){console.groupCollapsed(t);try{return e()}finally{console.groupEnd()}}var moduleRegistry_exports={};__export2(moduleRegistry_exports,{detectChartDefinition:()=>detectChartDefinition,getAxisModule:()=>getAxisModule,getSeriesModule:()=>getSeriesModule,hasModule:()=>hasModule,listModulesByType:()=>listModulesByType,register:()=>register,registerMany:()=>registerMany,reset:()=>reset2});var ModuleType=(t=>(t.Axis="axis",t.Chart="chart",t.Preset="preset",t.Plugin="plugin",t.Series="series",t))(ModuleType||{}),registeredModules=new Map;function register(t){const e=registeredModules.get(t.name);if(e&&(e.enterprise||!t.enterprise))throw new Error(`AG Charts - Module '${t.name}' already registered`);registeredModules.set(t.name,t)}function registerMany(t){for(const e of t)register(e)}function reset2(){registeredModules.clear()}function hasModule(t){return registeredModules.has(t)}function*listModulesByType(t){for(const e of registeredModules.values())e.type===t&&(yield e)}function detectChartDefinition(t){for(const e of registeredModules.values())if(isChartModule(e)&&e.detect(t))return e;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function getSeriesModule(t){const e=registeredModules.get(t);if(isSeriesModule(e))return e}function getAxisModule(t){const e=registeredModules.get(t);if(isAxisModule(e))return e}function isChartModule(t){return t?.type==="chart"}function isAxisModule(t){return t?.type==="axis"}function isSeriesModule(t){return t?.type==="series"}var EventEmitter=class{constructor(){this.events=new Map}on(t,e){return this.events.has(t)||this.events.set(t,new Set),this.events.get(t)?.add(e),()=>this.off(t,e)}off(t,e){const i=this.events.get(t);i&&(i.delete(e),i.size===0&&this.events.delete(t))}emit(t,e){this.events.get(t)?.forEach(i=>i(e))}clear(t){t?this.events.delete(t):this.events.clear()}};function joinFormatted(t,e="and",i=String,s=1/0){if(t.length===1)return i(t[0]);t=t.map(i);const n=t.pop();if(t.length>=s){const o=t.length-(s-1);return`${t.slice(0,s-1).join(", ")}, and ${o} more ${e} ${n}`}return`${t.join(", ")} ${e} ${n}`}function stringifyValue(t,e=1/0){if(typeof t=="number"){if(isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}const i=JSON.stringify(t)??typeof t;return i.length>e?`${i.slice(0,e)}... (+${i.length-e} characters)`:i}function countLines(t){let e=1;for(let i=0;i<t.length;i++)t.charCodeAt(i)===10&&e++;return e}function levenshteinDistance(t,e){if(t===e)return 0;const[i,s]=t.length<e.length?[t,e]:[e,t],n=i.length,o=s.length;let a=new Array(n+1).fill(0).map((l,c)=>c),r=new Array(n+1);for(let l=1;l<=o;l++){r[0]=l;for(let c=1;c<=n;c++){const h=s[l-1]===i[c-1]?0:1;r[c]=Math.min(a[c]+1,r[c-1]+1,a[c-1]+h)}[a,r]=[r,a]}return a[n]}var verifiedGlobals={};typeof window<"u"?verifiedGlobals.window=window:typeof global<"u"&&(verifiedGlobals.window=global.window),typeof document<"u"?verifiedGlobals.document=document:typeof global<"u"&&(verifiedGlobals.document=global.document);function getDocument(t){return t?verifiedGlobals.document?.[t]:verifiedGlobals.document}function getWindow(t){return t?verifiedGlobals.window?.[t]:verifiedGlobals.window}function setDocument(t){verifiedGlobals.document=t}function setWindow(t){verifiedGlobals.window=t}function createElement(t,e,i){const s=getDocument().createElement(t);if(typeof e=="object"&&(i=e,e=void 0),e)for(const n of e.split(" "))s.classList.add(n);return i&&Object.assign(s.style,i),s}function createSvgElement(t){return getDocument().createElementNS("http://www.w3.org/2000/svg",t)}function downloadUrl(t,e){const i=getDocument("body"),s=createElement("a",{display:"none"});s.href=t,s.download=e,i.appendChild(s),s.click(),setTimeout(()=>i.removeChild(s))}function parseColor(t){const e=getWindow("Option"),{style:i}=new e;return i.color=t,i.color||null}function isDefined(t){return t!=null}function isArray(t){return Array.isArray(t)}function isBoolean(t){return typeof t=="boolean"}function isDate(t){return t instanceof Date}function isValidDate(t){return isDate(t)&&!isNaN(Number(t))}function isRegExp(t){return t instanceof RegExp}function isFunction(t){return typeof t=="function"}function isObject(t){return typeof t=="object"&&t!==null&&!isArray(t)}function isPlainObject(t){return typeof t=="object"&&t!==null&&t.constructor?.name==="Object"}function isString(t){return typeof t=="string"}function isNumber(t){return typeof t=="number"}function isFiniteNumber(t){return Number.isFinite(t)}function isHtmlElement(t){return typeof window<"u"&&t instanceof HTMLElement}function isEnumValue(t,e){return Object.values(t).includes(e)}function isSymbol(t){return typeof t=="symbol"}function isColor(t){return isString(t)&&parseColor(t)!=null}var descriptionSymbol=Symbol("description"),requiredSymbol=Symbol("required"),ValidationError=class{constructor(t,e,i,s){this.message=t,this.path=e,this.required=i,this.unknown=s}toString(){return this.message}};function validate(t,e,i=""){if(!isObject(t)){const l=validateMessage(i,t,"an object",!0);return{valid:null,errors:[new ValidationError(l,i,!0)]}}const s=[],n=new Set(Object.keys(t)),o=[],a={};function r(l){return isArray(e)?`${i}[${l}]`:i?`${i}.${l}`:l}for(const l of Object.keys(e)){const c=e[l],h=t[l],d=c[requiredSymbol];if(n.delete(l),typeof h>"u"&&(s.push(l),!d))continue;const u=r(l);if(isFunction(c)){const p={options:t,path:u};if(c(h,p))a[l]=p.result?.valid??h;else if(!p.result){const g=validateMessage(u,h,c,d);o.push(new ValidationError(g,i,d))}p.result&&o.push(...p.result.errors)}else{const p=validate(h,c,u);p.valid!=null&&(a[l]=p.valid),o.push(...p.errors)}}for(const l of n){if(typeof t[l]>"u")continue;const h=unknownMessage(l,r(l),s);o.push(new ValidationError(h,i,void 0,!0))}return{valid:a,errors:o}}function validateMessage(t,e,i,s){const n=isString(i)?i:i[descriptionSymbol],o=n?`; expecting ${n}`:"",a=t?`Option \`${t}\``:"Value";return s&&e==null?`${a} is required and has not been provided${o}, ignoring.`:`${a} cannot be set to \`${stringifyValue(e,50)}\`${o}, ignoring.`}function unknownMessage(t,e,i){const s=findSuggestion(t,i),n=s?`; Did you mean \`${s}\`? Ignoring.`:", ignoring.";return`Unknown option \`${e}\`${n}`}function findSuggestion(t,e,i=2){let s=1/0;const n=t.toLowerCase();return e.reduce((o,a)=>{const r=levenshteinDistance(n,a.toLowerCase());return s>r&&r<=i?(s=r,a):o},null)}function attachDescription(t,e){return Object.assign(isFunction(t)?(i,s)=>t(i,s):{...t},{[descriptionSymbol]:e})}function required(t){return Object.assign(isFunction(t)?(e,i)=>t(e,i):optionsDefs(t),{[requiredSymbol]:!0,[descriptionSymbol]:t[descriptionSymbol]})}var optionsDefs=(t,e="an object")=>attachDescription((i,s)=>(s.result=validate(i,t,s.path),!s.result.errors.some(n=>n.required&&n.path===s.path)),e),partialDefs=(t,e="an object")=>attachDescription((i,s)=>(s.result=validate(i,t,s.path),s.result.errors=s.result.errors.filter(n=>!n.unknown),!s.result.errors.some(n=>n.required&&n.path===s.path)),e),and=(...t)=>attachDescription((e,i)=>t.every(s=>{const n=s(e,i);return i.result&&!n&&delete i.result,n}),t.map(e=>e[descriptionSymbol]).filter(Boolean).join(" and ")),or=(...t)=>attachDescription((e,i)=>t.some(s=>{const n=s(e,i);return i.result&&!n&&delete i.result,n}),t.map(e=>e[descriptionSymbol]).filter(Boolean).join(" or ")),isComparable=t=>isFiniteNumber(t)||isValidDate(t),isValidDateValue=t=>isDate(t)||(isFiniteNumber(t)||isString(t))&&isValidDate(new Date(t)),array=attachDescription(isArray,"an array"),boolean=attachDescription(isBoolean,"a boolean"),callback=attachDescription(isFunction,"a function"),color=attachDescription(isColor,"a color string"),date=attachDescription(isValidDateValue,"a date"),defined=attachDescription(isDefined,"a defined value"),number=attachDescription(isFiniteNumber,"a number"),object=attachDescription(isObject,"an object"),string=attachDescription(isString,"a string"),arrayLength=(t,e=1/0)=>{let i;return e===1/0?i=`an array of at least ${t} items`:t===e?i=`an array of exactly ${t} items`:t===0?i=`an array of no more than ${e} items`:i=`an array of at least ${t} and no more than ${e} items`,attachDescription(s=>isArray(s)&&s.length>=t&&s.length<=e,i)},numberMin=(t,e=!0)=>attachDescription(i=>isFiniteNumber(i)&&(i>t||e&&i===t),`a number greater than ${e?"or equal to ":""}${t}`),numberRange=(t,e)=>attachDescription(i=>isFiniteNumber(i)&&i>=t&&i<=e,`a number between ${t} and ${e} inclusive`),positiveNumber=numberMin(0),positiveNumberNonZero=numberMin(0,!1),ratio=numberRange(0,1),lessThan=t=>attachDescription((e,{options:i})=>!isComparable(e)||!isComparable(i[t])||e<i[t],`the value to be less than \`${t}\``),greaterThan=t=>attachDescription((e,{options:i})=>!isComparable(e)||!isComparable(i[t])||e>i[t],`the value to be greater than \`${t}\``);function union(...t){isObject(t[0])&&(t=Object.values(t[0]));const e=joinFormatted(t,"or",i=>`'${i}'`);return attachDescription(i=>t.includes(i),`a keyword such as ${e}`)}var constant=t=>attachDescription(e=>t===e,`the value ${JSON.stringify(t)}`),instanceOf=(t,e)=>attachDescription(i=>i instanceof t,e??`an instance of ${t.name}`),arrayOf=(t,e)=>attachDescription((i,s)=>isArray(i)&&i.every(n=>{const o=t(n,s);return delete s.result,o}),e??`${t[descriptionSymbol]} array`),arrayOfDefs=(t,e="an object array")=>attachDescription((i,s)=>{if(!isArray(i))return!1;const n=[],o=[];for(let a=0;a<i.length;a++){const r=`${s.path}[${a}]`,l=validate(i[a],t,r);o.push(...l.errors),l.errors.some(c=>c.required&&c.path===r)||n.push(l.valid)}return s.result={valid:n,errors:o},!0},e),typeUnion=(t,e="an object")=>{const i=partialDefs({type:required(union(...Object.keys(t)))});return attachDescription((s,n)=>{if(i(s,n)){const o=s.type,a={type:required(constant(o)),...t[o]},r=optionsDefs(a)(s,n);if(n.result)for(const l of n.result.errors)l.message+=` (type="${o}")`;return r}return!1},e)},colorStop=optionsDefs({color,stop:ratio},""),colorStopsOrderValidator=attachDescription(t=>{let e=-1/0;for(const i of t)if(i?.stop!=null){if(i.stop<e)return!1;e=i.stop}return!0},"color stops to be defined in ascending order"),gradientColorStops=and(arrayLength(2),and(arrayOf(colorStop),colorStopsOrderValidator)),gradientBounds=union("axis","item","series"),gradientStrict=typeUnion({gradient:{gradient:union("linear","radial","conic"),bounds:gradientBounds,colorStops:required(gradientColorStops),rotation:number,reverse:boolean}},"a gradient object with color stops"),strokeOptionsDef={stroke:color,strokeWidth:positiveNumber,strokeOpacity:ratio},fillGradientDefaults=optionsDefs({type:required(constant("gradient")),gradient:required(union("linear","radial","conic")),bounds:required(gradientBounds),colorStops:required(or(gradientColorStops,and(arrayLength(2),arrayOf(color)))),rotation:required(number),reverse:required(boolean)}),fillPatternDefaults=optionsDefs({type:required(constant("pattern")),pattern:required(union("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),width:required(positiveNumber),height:required(positiveNumber),fill:required(color),fillOpacity:required(ratio),backgroundFill:required(color),backgroundFillOpacity:required(ratio),padding:required(positiveNumber),rotation:required(number),stroke:required(color),strokeWidth:required(positiveNumber),strokeOpacity:required(ratio)}),gradientUndocumentedOpts={gradient:union("linear","radial","conic"),bounds:gradientBounds,reverse:boolean},patternUndocumentedOpts={rotation:number,padding:positiveNumber},colorObject=typeUnion({gradient:{...gradientUndocumentedOpts,colorStops:gradientColorStops,rotation:number},pattern:{...patternUndocumentedOpts,pattern:union("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),width:positiveNumber,height:positiveNumber,fill:color,fillOpacity:ratio,backgroundFill:color,backgroundFillOpacity:ratio,...strokeOptionsDef}},"a color object"),colorUnion=or(color,colorObject),fillOptionsDef={fill:colorUnion,fillOpacity:ratio};fillOptionsDef.fillGradientDefaults=fillGradientDefaults,fillOptionsDef.fillPatternDefaults=fillPatternDefaults;var lineDashOptionsDef={lineDash:arrayOf(positiveNumber),lineDashOffset:number},fontOptionsDef={color,fontFamily:string,fontSize:positiveNumber,fontStyle:union("normal","italic","oblique"),fontWeight:or(positiveNumber,union("normal","bold","bolder","lighter"))};function toArray(t){return typeof t>"u"?[]:Array.isArray(t)?t:[t]}function unique(t){return Array.from(new Set(t))}function groupBy(t,e){return t.reduce((i,s)=>{const n=e(s);return i[n]??(i[n]=[]),i[n].push(s),i},{})}function arraysEqual(t,e){if(t==null||e==null||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(Array.isArray(t[i])&&Array.isArray(e[i])){if(!arraysEqual(t[i],e[i]))return!1}else if(t[i]!==e[i])return!1;return!0}function circularSliceArray(t,e,i=0){if(t.length===0)return[];const s=[];for(let n=0;n<e;n++)s.push(t.at((n+i)%t.length));return s}function sortBasedOnArray(t,e){const i=new Map;return e.forEach((s,n)=>{i.set(s,n)}),t.sort((s,n)=>{const o=i.get(s)??1/0,a=i.get(n)??1/0;return o-a})}function findMaxIndex(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2);i(n)?(s=n,t=n+1):e=n-1}return s}function findMinIndex(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2);i(n)?(s=n,e=n-1):t=n+1}return s}function findMaxValue(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2),o=i(n);o==null?e=n-1:(s=o,t=n+1)}return s}function findMinValue(t,e,i){if(t>e)return;let s;for(;e>=t;){const n=Math.floor((e+t)/2),o=i(n);o==null?t=n+1:(s=o,e=n-1)}return s}function diffArrays(t,e){const i=Math.max(t.length,e.length),s=new Set,n=new Set;for(let o=0;o<i;o++){const a=t[o],r=e[o];a!==r&&(n.has(r)?n.delete(r):r&&s.add(r),s.has(a)?s.delete(a):a&&n.add(a))}return{changed:s.size>0||n.size>0,added:s,removed:n}}function debounce(t,e=0,i){const{leading:s=!1,trailing:n=!0,maxWait:o=1/0}=i??{};let a,r;if(o<e)throw new Error("Value of maxWait cannot be lower than waitMs.");function l(...c){if(s&&!r){r=Date.now(),a=setTimeout(()=>r=null,e),t(...c);return}let h=e;if(o!==1/0&&r){const d=Date.now()-r;e>o-d&&(h=o-d)}clearTimeout(a),r??(r=Date.now()),a=setTimeout(()=>{r=null,n&&t(...c)},h)}return Object.assign(l,{cancel(){clearTimeout(a),r=null}})}function throttle(t,e,i){const{leading:s=!0,trailing:n=!0}=i??{};let o,a,r=!1;function l(){n&&a?(o=setTimeout(l,e),t(...a)):r=!1,a=null}function c(...h){r?a=h:(r=!0,o=setTimeout(l,e),s?t(...h):a=h)}return Object.assign(c,{cancel(){clearTimeout(o),r=!1,a=null}})}function*iterate(...t){for(const e of t)yield*e}function toIterable(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t?t:[t]}function first(t){for(const e of t)return e;throw new Error("AG Charts - no first() value found")}function*entries(t){const e=[void 0,void 0];for(const i of Object.keys(t))e[0]=i,e[1]=t[i],yield e}function clamp(t,e,i){return Math.min(i,Math.max(t,e))}function inRange(t,e,i=1e-10){return t>=e[0]-i&&t<=e[1]+i}function isNumberEqual(t,e,i=1e-10){return t===e||Math.abs(t-e)<i}function isNegative(t){return Math.sign(t)===-1||Object.is(t,-0)}function isInteger(t){return t%1===0}function roundTo(t,e=2){const i=10**e;return Math.round(t*i)/i}function modulus(t,e){return Math.floor(t%e+(t<0?Math.abs(e):0))}function countFractionDigits(t){if(Math.floor(t)===t)return 0;let e=String(t),i=0;if(t<1e-6||t>=1e21){let n;[e,n]=e.split("e"),n!=null&&(i=Number(n))}const s=e.split(".")[1]?.length??0;return Math.max(s-i,0)}var formatRegEx=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,surroundedRegEx=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function isValidNumberFormat(t){if(!isString(t))return!1;const e=surroundedRegEx.exec(t);return formatRegEx.test(e?e[2]:t)}function parseNumberFormat(t){let e,i;const s=surroundedRegEx.exec(t);s&&([,e,t,i]=s);const n=formatRegEx.exec(t);if(!n)throw new Error(`The number formatter is invalid: ${t}`);const[,o,a,r,l,c,h,d,u,p,g]=n;return{fill:o,align:a,sign:r,symbol:l,zero:c,width:parseInt(h),comma:d,precision:parseInt(u),trim:!!p,type:g,prefix:e,suffix:i}}function createNumberFormatter(t){const e=typeof t=="string"?parseNumberFormat(t):t,{fill:i,align:s,sign:n="-",symbol:o,zero:a,width:r,comma:l,type:c,prefix:h="",suffix:d="",precision:u}=e;let{trim:p}=e;const g=u==null||isNaN(u);let f;if(!c)f=decimalTypes.g,p=!0;else if(c in decimalTypes&&c in integerTypes)f=g?integerTypes[c]:decimalTypes[c];else if(c in decimalTypes)f=decimalTypes[c];else if(c in integerTypes)f=integerTypes[c];else throw new Error(`The number formatter type is invalid: ${c}`);let m;return g?m=c?6:12:m=u,y=>{let x=f(y,m);return p&&(x=removeTrailingZeros(x)),l&&(x=insertSeparator(x,l)),x=addSign(y,x,n),o&&o!=="#"&&(x=`${o}${x}`),o==="#"&&c==="x"&&(x=`0x${x}`),c==="s"&&(x=`${x}${getSIPrefix(y)}`),(c==="%"||c==="p")&&(x=`${x}%`),r!=null&&!isNaN(r)&&(x=addPadding(x,r,i??a,s)),x=`${h}${x}${d}`,x}}var integerTypes={b:t=>absFloor(t).toString(2),c:t=>String.fromCharCode(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>absFloor(t).toString(8),x:t=>absFloor(t).toString(16),X:t=>integerTypes.x(t).toUpperCase(),n:t=>integerTypes.d(t),"%":t=>`${absFloor(t*100).toFixed(0)}`},decimalTypes={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>decimalTypes.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>decimalTypes.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),s=Math.floor(Math.log10(i));return s>=-4&&s<e?i.toFixed(e-1-s):i.toExponential(e-1)},G:(t,e)=>decimalTypes.g(t,e).toUpperCase(),n:(t,e)=>decimalTypes.g(t,e),p:(t,e)=>decimalTypes.r(t*100,e),r:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),n=Math.floor(Math.log10(i))-(e-1);if(n<=0)return i.toFixed(-n);const o=10**n;return(Math.round(i/o)*o).toFixed()},s:(t,e)=>{const i=getSIPrefixPower(t);return decimalTypes.r(t/10**i,e)},"%":(t,e)=>decimalTypes.f(t*100,e)},minSIPrefix=-24,maxSIPrefix=24,siPrefixes={[minSIPrefix]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xB5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[maxSIPrefix]:"Y"},minusSign="\u2212";function absFloor(t){return Math.floor(Math.abs(t))}function removeTrailingZeros(t){return t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function insertSeparator(t,e){let i=t.indexOf(".");i<0&&(i=t.length);const s=t.substring(0,i).split(""),n=t.substring(i);for(let o=s.length-3;o>0;o-=3)s.splice(o,0,e);return`${s.join("")}${n}`}function getSIPrefix(t){return siPrefixes[getSIPrefixPower(t)]}function getSIPrefixPower(t){return clamp(minSIPrefix,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,maxSIPrefix)}function addSign(t,e,i=""){if(i==="(")return t>=0?e:`(${e})`;const s=i==="+"?"+":"";return`${t>=0?s:minusSign}${e}`}function addPadding(t,e,i=" ",s=">"){let n=t;if(s===">"||!s)n=n.padStart(e,i);else if(s==="<")n=n.padEnd(e,i);else if(s==="^"){const o=Math.max(0,e-n.length),a=Math.ceil(o/2),r=Math.floor(o/2);n=n.padStart(a+n.length,i),n=n.padEnd(r+n.length,i)}return n}var __defProp3=Object.defineProperty,__getOwnPropDesc2=Object.getOwnPropertyDescriptor,__export3=(t,e)=>{for(var i in e)__defProp3(t,i,{get:e[i],enumerable:!0})},__decorateClass2=(t,e,i,s)=>{for(var n=s>1?void 0:s?__getOwnPropDesc2(e,i):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(n=(s?a(e,i,n):a(n))||n);return s&&n&&__defProp3(e,i,n),n},BaseModuleInstance=class{constructor(){this.destroyFns=[]}destroy(){for(const t of this.destroyFns)t()}},ModuleRegistry=class{constructor(){this.modules=[],this.dependencies=new Map,this.modulesByOptionKey=new Map}register(...t){for(const e of t){this.registerDependencies(e);const i=this.modules.find(s=>e.type===s.type&&("optionsKey"in e&&"optionsKey"in s?e.optionsKey===s.optionsKey:!0)&&e.identifier===s.identifier);if(i){if(e.packageType==="enterprise"&&i.packageType==="community"){const s=this.modules.indexOf(i);this.modules.splice(s,1,e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}else this.modules.push(e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}hasEnterpriseModules(){return this.modules.some(t=>t.packageType==="enterprise")}*byType(...t){const e=new Set,i=this.modules.filter(o=>t.includes(o.type)),s=o=>{const a=this.dependencies.get(o);return a?.flatMap(s).concat(a)??[]},n=[];for(const o of i){const a="optionsKey"in o?o.optionsKey:o.contextKey;if(!e.has(a)){for(const r of s(a)){if(e.has(r))continue;const l=this.modulesByOptionKey.get(r);if(!l){n.push(r);continue}t.includes(l.type)&&(yield l,e.add(r))}yield o,e.add(a)}}if(n.length>0)throw new Error(`Could not resolve module dependencies: ${n}`)}registerDependencies(t){if(t.dependencies==null||t.dependencies.length===0)return;const e="optionsKey"in t?t.optionsKey:t.contextKey;this.dependencies.set(e,t.dependencies)}},moduleRegistry=new ModuleRegistry,BBoxValues={containsPoint,isEmpty,normalize};function containsPoint(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height}function isEmpty(t){return t==null||t.height===0||t.width===0||isNaN(t.height)||isNaN(t.width)}function normalize(t){let{x:e,y:i,width:s,height:n}=t;return(s==null||s>0)&&(n==null||n>0)?t:(e!=null&&s!=null&&s<0&&(s=-s,e=e-s),i!=null&&n!=null&&n<0&&(n=-n,i=i-n),{x:e,y:i,width:s,height:n})}var interpolate=Symbol("interpolate"),isInterpolating=t=>t[interpolate]!=null;function nearestSquared(t,e,i,s=1/0){const n={nearest:void 0,distanceSquared:s};for(const o of i){const a=o.distanceSquared(t,e);if(a===0)return{nearest:o,distanceSquared:0};a<n.distanceSquared&&(n.nearest=o,n.distanceSquared=a)}return n}function nearestSquaredInContainer(t,e,i,s=1/0){const{x:n=t,y:o=e}=i.transformPoint?.(t,e)??{},a={nearest:void 0,distanceSquared:s};for(const r of i.children){const{nearest:l,distanceSquared:c}=r.nearestSquared(n,o,a.distanceSquared);if(c===0)return{nearest:l,distanceSquared:c};c<a.distanceSquared&&(a.nearest=l,a.distanceSquared=c)}return a}var _BBox=class kt{constructor(e,i,s,n){this.x=e,this.y=i,this.width=s,this.height=n}static fromDOMRect({x:e,y:i,width:s,height:n}){return new kt(e,i,s,n)}static merge(e){let i=1/0,s=1/0,n=-1/0,o=-1/0;for(const a of e)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>o&&(o=a.y+a.height);return new kt(i,s,n-i,o-s)}static nearestBox(e,i,s){return nearestSquared(e,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON(){return{}}}}clone(){const{x:e,y:i,width:s,height:n}=this;return new kt(e,i,s,n)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,i){return BBoxValues.containsPoint(this,e,i)}intersection(e){if(!this.collidesBBox(e))return;const i=clamp(e.x,this.x,e.x+e.width),s=clamp(e.y,this.y,e.y+e.height),n=clamp(e.x,this.x+this.width,e.x+e.width),o=clamp(e.y,this.y+this.height,e.y+e.height);return new kt(i,s,n-i,o-s)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,i){if(this.containsPoint(e,i))return 0;const s=e-clamp(this.x,e,this.x+this.width),n=i-clamp(this.y,i,this.y+this.height);return s*s+n*n}shrink(e,i){if(typeof e=="number")this.applyMargin(e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(n,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(e,i){if(typeof e=="number")this.applyMargin(-e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(-n,s)}return this}applyMargin(e,i){switch(i){case"top":this.y+=e;case"bottom":this.height-=e;break;case"left":this.x+=e;case"right":this.width-=e;break;case"vertical":this.y+=e,this.height-=e*2;break;case"horizontal":this.x+=e,this.width-=e*2;break;case void 0:this.x+=e,this.y+=e,this.width-=e*2,this.height-=e*2;break}}translate(e,i){return this.x+=e,this.y+=i,this}[interpolate](e,i){return new kt(this.x*(1-i)+e.x*i,this.y*(1-i)+e.y*i,this.width*(1-i)+e.width*i,this.height*(1-i)+e.height*i)}};_BBox.zero=Object.freeze(new _BBox(0,0,0,0)),_BBox.NaN=Object.freeze(new _BBox(NaN,NaN,NaN,NaN));var BBox=_BBox,LONG_TIME_PERIOD_THRESHOLD=2e3,timeOfLastLog=Date.now(),logTimeGap=()=>{const t=Date.now()-timeOfLastLog;if(t>LONG_TIME_PERIOD_THRESHOLD){const e=(Math.floor(t/100)/10).toFixed(1);logger_exports.log(`**** ${e}s since last log message ****`)}timeOfLastLog=Date.now()},Debug={create(...t){return Object.assign((...i)=>{Debug.check(...t)&&(typeof i[0]=="function"&&(i=toArray(i[0]())),logTimeGap(),logger_exports.log(...i))},{check:()=>Debug.check(...t),group:(i,s)=>Debug.check(...t)?logger_exports.logGroup(i,s):s()})},check(...t){return t.length===0&&t.push(!0),toArray(getWindow("agChartsDebug")).some(i=>t.includes(i))},inDevelopmentMode(t){if(Debug.check("dev"))return t()}};function clearContext({context:t,pixelRatio:e,width:i,height:s}){t.save(),t.resetTransform(),t.clearRect(0,0,Math.ceil(i*e),Math.ceil(s*e)),t.restore()}function debugContext(t){if(Debug.check("canvas")){const e=t.save.bind(t),i=t.restore.bind(t);let s=0;Object.assign(t,{save(){e(),s++},restore(){if(s===0)throw new Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(s!==0)throw new Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}function canvasDimensions(t,e,i){return[Math.floor(t*i),Math.floor(e*i)]}var HdpiOffscreenCanvas=class{constructor(t){const{width:e,height:i,pixelRatio:s,willReadFrequently:n=!1}=t;this.width=e,this.height=i,this.pixelRatio=s;const[o,a]=canvasDimensions(e,i,s);this.canvas=new OffscreenCanvas(o,a),this.context=this.canvas.getContext("2d",{willReadFrequently:n}),this.context.setTransform(s,0,0,s,0,0),debugContext(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.canvas,e,i)}transferToImageBitmap(){return this.canvas.transferToImageBitmap()}resize(t,e,i){if(!(t>0&&e>0))return;const{canvas:s,context:n}=this;if(t!==this.width||e!==this.height||i!==this.pixelRatio){const[o,a]=canvasDimensions(t,e,i);s.width=o,s.height=a}n.setTransform(i,0,0,i,0,0),this.width=t,this.height=e,this.pixelRatio=i}clear(){clearContext(this)}destroy(){this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0),this.canvas=null,this.context=null,Object.freeze(this)}},ID_MAP=new Map;function resetIds(){ID_MAP.clear()}function createId(t){const e=t.constructor,i=Object.hasOwn(e,"className")?e.className:e.name;if(!i)throw new Error(`The ${e} 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 t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let e="";for(let i=0;i<t.length;i++)(i===4||i===6||i===8||i===10)&&(e+="-"),e+=t[i].toString(16).padStart(2,"0");return e}function SceneChangeDetection(t){return function(e,i){const s=`__${i}`;e[i]||prepareGetSet(e,i,s,t)}}function prepareGetSet(t,e,i,s){const{type:n="normal",changeCb:o,convertor:a,checkDirtyOnAssignment:r=!1}=s??{},l={type:n,changeCb:o,checkDirtyOnAssignment:r,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(t,e,{set:c,get:function(){return this[i]},enumerable:!0,configurable:!0})}function buildConvertorChain(t,e){const{convertor:i}=e;return i?function(s){t.call(this,i(s))}:t}var NO_CHANGE=Symbol("no-change");function buildChangeCallbackChain(t,e){const{changeCb:i}=e;return i?function(s){const n=t.call(this,s);return n!==NO_CHANGE&&i.call(this,this),n}:t}function buildCheckDirtyChain(t,e,i){const{checkDirtyOnAssignment:s}=i;return s?function(n){const o=e.call(this,n);return n?._dirty===!0&&this.markDirty(t),o}:e}function buildNormalSetter(t,e){const{changeCb:i}=e;return function(s){const n=this[t];return s!==n?(this[t]=s,this.markDirty(t),i?.(this),s):NO_CHANGE}}function buildTransformSetter(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this.markDirtyTransform(),e):NO_CHANGE}}function buildPathSetter(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(t)),e):NO_CHANGE}}var PointerEvents=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(PointerEvents||{}),_Node=class Ft{constructor(e){this.serialNumber=Ft._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=e?.name,this.tag=e?.tag??NaN,this.zIndex=e?.zIndex??0,(e?.debugDirty??Ft._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(e,i,s){const n=e?.toSVG();if(n==null||!n.elements.length&&!n.defs?.length)return;const o=createSvgElement("svg");if(o.setAttribute("width",String(i)),o.setAttribute("height",String(s)),o.setAttribute("viewBox",`0 0 ${i} ${s}`),n.defs?.length){const a=createSvgElement("defs");a.append(...n.defs),o.append(a)}return o.append(...n.elements),o.outerHTML}static*extractBBoxes(e,i){for(const s of e)if(!i||s.visible&&!s.transitionOut){const n=s.getBBox();n&&(yield n)}}get datum(){return this._datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this._layerManager}get dirty(){return this._dirty}closestDatum(){for(const{datum:e}of this.traverseUp(!0))if(e!=null)return e}preRender(e,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(e);this.childNodeCounts.groups+=n.groups,this.childNodeCounts.nonGroups+=n.nonGroups,this.childNodeCounts.complexity+=n.complexity}return this.childNodeCounts}render(e){const{stats:i}=e;if(this._dirty=!1,this.debugDirtyProperties(),e.debugNodeSearch){const s=this.name??this.id;e.debugNodeSearch.some(n=>typeof n=="string"?n===s:n.test(s))&&(e.debugNodes[this.name??this.id]=this)}i&&(i.nodesRendered++,i.opsPerformed+=this.childNodeCounts.thisComplexity)}_setLayerManager(e){this._layerManager=e,this._debug=e?.debug;for(const i of this.children())i._setLayerManager(e)}sortChildren(e){if(this.dirtyZIndex=!1,!this.childNodes)return;const i=[...this.childNodes].sort(e);this.childNodes.clear();for(const s of i)this.childNodes.add(s)}*traverseUp(e){let i=this;for(e&&(yield i);i=i.parentNode;)yield i}*children(){if(this.childNodes)for(const e of this.childNodes)yield e}*descendants(){for(const e of this.children())yield e,yield*e.descendants()}isLeaf(){return!this.childNodes?.size}isRoot(){return!this.parentNode}append(e){this.childNodes??(this.childNodes=new Set);for(const i of toIterable(e))i.parentNode?.removeChild(i),this.childNodes.add(i),i.parentNode=this,i._setLayerManager(this.layerManager);this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}appendChild(e){return this.append(e),e}removeChild(e){if(!this.childNodes?.delete(e))throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`);delete e.parentNode,e._setLayerManager(),this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}remove(){this.parentNode?.removeChild(this)}clear(){for(const e of this.children())delete e.parentNode,e._setLayerManager();this.childNodes?.clear(),this.invalidateCachedBBox()}destroy(){this.parentNode?.removeChild(this)}setProperties(e,i){if(i)for(const s of i)this[s]=e[s];else Object.assign(this,e);return this}containsPoint(e,i){return!1}pickNode(e,i){if(!(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))){if(this.childNodes!=null&&this.childNodes.size!==0){const s=[...this.children()];for(let n=s.length-1;n>=0;n--){const o=s[n].pickNode(e,i);if(o)return o}}else if(!this.isContainerNode)return this}}pickNodes(e,i,s=[]){if(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))return s;this.isContainerNode||s.push(this);for(const n of this.children())n.pickNodes(e,i,s);return s}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(e){const{_dirty:i}=this;e!=null&&this._debugDirtyProperties&&this.markDebugProperties(e),!(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 e of this.children())e.markClean()}}markDebugProperties(e){const i=this._debugDirtyProperties?.get(e)??[],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(e,i)}debugDirtyProperties(){this._debugDirtyProperties!=null&&(this._debugDirtyProperties.has("__first__")||this._debugDirtyProperties.forEach((e,i)=>{e.length>1&&(console.groupCollapsed(`Property changed multiple times before render: ${this.constructor.name}.${i} (${e.length}x)`),e.forEach(s=>console.log(s)),console.groupEnd())}),this._debugDirtyProperties.clear())}onZIndexChange(){const{parentNode:e}=this;e&&(e.dirtyZIndex=!0)}toSVG(){}};_Node._nextSerialNumber=0,_Node._debugEnabled=!1,__decorateClass2([SceneChangeDetection()],_Node.prototype,"visible",2),__decorateClass2([SceneChangeDetection({changeCb:t=>t.onZIndexChange()})],_Node.prototype,"zIndex",2);var Node=_Node,BREAK_TRANSFORM_CHAIN=Symbol("BREAK"),CONFIG_KEY="__decorator_config";function addFakeTransformToInstanceProperty(t,e){initialiseConfig(t,e).optional=!0}function initialiseConfig(t,e){Object.getOwnPropertyDescriptor(t,CONFIG_KEY)==null&&Object.defineProperty(t,CONFIG_KEY,{value:{}});const i=t[CONFIG_KEY],s=e.toString();if(typeof i[s]<"u")return i[s];const n=new WeakMap;i[s]={setters:[],getters:[],observers:[],valuesMap:n};const o=Object.getOwnPropertyDescriptor(t,e),a=o?.set,r=o?.get;return Object.defineProperty(t,e,{set:function(h){const{setters:d,observers:u}=i[s];let p;d.some(g=>g.length>2)&&(p=r?r.call(this):n.get(this));for(const g of d)if(h=g(this,e,h,p),h===BREAK_TRANSFORM_CHAIN)return;a?a.call(this,h):n.set(this,h);for(const g of u)g(this,h,p)},get:function(){let h=r?r.call(this):n.get(this);for(const d of i[s].getters)if(h=d(this,e,h),h===BREAK_TRANSFORM_CHAIN)return;return h},enumerable:!0,configurable:!1}),i[s]}function addTransformToInstanceProperty(t,e,i){return(s,n)=>{const o=initialiseConfig(s,n);o.setters.push(t),e&&o.getters.unshift(e),i&&Object.assign(o,i)}}function addObserverToInstanceProperty(t){return(e,i)=>{initialiseConfig(e,i).observers.push(t)}}function isDecoratedObject(t){return typeof t<"u"&&CONFIG_KEY in t}function listDecoratedProperties(t){const e=new Set;for(;isDecoratedObject(t);)e.add(t?.[CONFIG_KEY]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(i=>Object.keys(i))}function extractDecoratedProperties(t){return listDecoratedProperties(t).reduce((e,i)=>(e[i]=t[i]??null,e),{})}function extractDecoratedPropertyMetadata(t,e){const i=e.toString();for(;isDecoratedObject(t);){const s=t[CONFIG_KEY];if(Object.hasOwn(s,i))return s[i];t=Object.getPrototypeOf(t)}}function objectsEqual(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every((i,s)=>objectsEqual(i,e[s])):isPlainObject(t)?isPlainObject(e)?objectsEqualWith(t,e,objectsEqual):!1:t===e}function objectsEqualWith(t,e,i){for(const s of Object.keys(e))if(!(s in t))return!1;for(const s of Object.keys(t))if(!(s in e)||!i(t[s],e[s]))return!1;return!0}function mergeDefaults(...t){const e={};for(const i of t){if(!isObject(i))continue;const s=isDecoratedObject(i)?listDecoratedProperties(i):Object.keys(i);for(const n of s)isPlainObject(e[n])&&isPlainObject(i[n])?e[n]=mergeDefaults(e[n],i[n]):e[n]??(e[n]=i[n])}return e}function merge(...t){const e={};for(const i of t){if(!isObject(i))continue;const s=isDecoratedObject(i)?listDecoratedProperties(i):Object.keys(i);for(const n of s)isPlainObject(e[n])&&isPlainObject(i[n])?e[n]=merge(e[n],i[n]):n in e||(e[n]??(e[n]=i[n]))}return e}function mergeArrayDefaults(t,...e){return e&&isArray(t)?t.map(i=>mergeDefaults(i,...e)):t}function mapValues(t,e){const i={};for(const[s,n]of entries(t))i[s]=e(n,s,t);return i}function without(t,e){const i={...t};for(const s of e)delete i[s];return i}function getPath(t,e){return(isArray(e)?e:e.split(".")).reduce((s,n)=>s[n],t)}var SKIP_JS_BUILTINS=new Set(["__proto__","constructor","prototype"]);function setPath(t,e,i){const s=isArray(e)?e.slice():e.split("."),n=s.pop();if(s.some(a=>SKIP_JS_BUILTINS.has(a)))return;const o=s.reduce((a,r)=>a[r],t);return o[n]=i,o[n]}function partialAssign(t,e,i){if(i===void 0)return e;for(const s of t){const n=i[s];n!==void 0&&(e[s]=n)}return e}function deepFreeze(t){return t==null||typeof t!="object"||!isPlainObject(t)||(Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{const i=t[e];i!==null&&(typeof i=="object"||typeof i=="function")&&!Object.isFrozen(i)&&deepFreeze(i)})),t}var twoPi=Math.PI*2,halfPi=Math.PI/2;function normalizeAngle360(t){return t%=twoPi,t+=twoPi,t%=twoPi,t}function normalizeAngle360Inclusive(t){return t%=twoPi,t+=twoPi,t!==twoPi&&(t%=twoPi),t}function normalizeAngle180(t){return t%=twoPi,t<-Math.PI?t+=twoPi:t>=Math.PI&&(t-=twoPi),t}function isBetweenAngles(t,e,i){const s=normalizeAngle360(t),n=normalizeAngle360(e),o=normalizeAngle360(i);return n<o?n<=s&&s<=o:n>o?n<=s||s<=o:!0}function toRadians(t){return t/180*Math.PI}function toDegrees(t){return t/Math.PI*180}function angleBetween(t,e){return t=normalizeAngle360(t),e=normalizeAngle360(e),e-t+(t>e?twoPi:0)}function getAngleRatioRadians(t){const e=normalizeAngle360(t);return e<=halfPi?e/halfPi:e<=Math.PI?(Math.PI-e)/halfPi:e<=1.5*Math.PI?(e-Math.PI)/halfPi:(twoPi-e)/halfPi}var lerp=(t,e,i)=>t*(1-i)+e*i,srgbToLinear=t=>{const e=t<0?-1:1,i=Math.abs(t);return i<=.04045?t/12.92:e*((i+.055)/1.055)**2.4},srgbFromLinear=t=>{const e=t<0?-1:1,i=Math.abs(t);return i>.0031308?e*(1.055*i**(1/2.4)-.055):12.92*t},_Color=class ct{constructor(e,i,s,n=1){this.r=clamp(0,e||0,1),this.g=clamp(0,i||0,1),this.b=clamp(0,s||0,1),this.a=clamp(0,n||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!ct.parseHex(e):e.indexOf("rgb")>=0?!!ct.stringToRgba(e):ct.nameToHex.has(e.toLowerCase())}static fromString(e){if(e.indexOf("#")>=0)return ct.fromHexString(e);const i=ct.nameToHex.get(e.toLowerCase());if(i)return ct.fromHexString(i);if(e.indexOf("rgb")>=0)return ct.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static parseHex(e){e=e.replace(/ /g,"").slice(1);let i;switch(e.length){case 6:case 8:i=[];for(let s=0;s<e.length;s+=2)i.push(parseInt(`${e[s]}${e[s+1]}`,16));break;case 3:case 4:i=e.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(e){const i=ct.parseHex(e);if(i){const[s,n,o,a]=i;return new ct(s/255,n/255,o/255,a/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let i=-1,s=-1;for(let r=0;r<e.length;r++){const l=e[r];if(i===-1&&l==="(")i=r;else if(l===")"){s=r;break}}if(i===-1||s===-1)return;const o=e.substring(i+1,s).split(","),a=[];for(let r=0;r<o.length;r++){const l=o[r];let c=parseFloat(l);if(!Number.isFinite(c))return;l.indexOf("%")>=0?(c=clamp(0,c,100),c/=100):r===3?c=clamp(0,c,1):(c=clamp(0,c,255),c/=255),a.push(c)}return a}static fromRgbaString(e){const i=ct.stringToRgba(e);if(i){if(i.length===3)return new ct(i[0],i[1],i[2]);if(i.length===4)return new ct(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(e.length===4)return new ct(e[0],e[1],e[2],e[3]);if(e.length===3)return new ct(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,i,s,n=1){const o=ct.HSBtoRGB(e,i,s);return new ct(o[0],o[1],o[2],n)}static fromHSL(e,i,s,n=1){const o=ct.HSLtoRGB(e,i,s);return new ct(o[0],o[1],o[2],n)}static fromOKLCH(e,i,s,n=1){const o=ct.OKLCHtoRGB(e,i,s);return new ct(o[0],o[1],o[2],n)}static padHex(e){return e.length===1?"0"+e:e}toHexString(){let e="#"+ct.padHex(Math.round(this.r*255).toString(16))+ct.padHex(Math.round(this.g*255).toString(16))+ct.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(e+=ct.padHex(Math.round(this.a*255).toString(16))),e}toRgbaString(e=3){const i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],s=Math.pow(10,e);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 ct.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,i,s){const n=srgbToLinear(e),o=srgbToLinear(i),a=srgbToLinear(s),r=Math.cbrt(.4122214708*n+.5363325363*o+.0514459929*a),l=Math.cbrt(.2119034982*n+.6806995451*o+.1073969566*a),c=Math.cbrt(.0883024619*n+.2817188376*o+.6299787005*a),h=.2104542553*r+.793617785*l-.0040720468*c,d=1.9779984951*r-2.428592205*l+.4505937099*c,u=.0259040371*r+.7827717662*l-.808675766*c,p=Math.atan2(u,d)*180/Math.PI,g=h,f=Math.hypot(d,u),m=p>=0?p:p+360;return[g,f,m]}static OKLCHtoRGB(e,i,s){const n=e,o=i*Math.cos(s*Math.PI/180),a=i*Math.sin(s*Math.PI/180),r=(n+.3963377774*o+.2158037573*a)**3,l=(n-.1055613458*o-.0638541728*a)**3,c=(n-.0894841775*o-1.291485548*a)**3,h=4.0767416621*r-3.3077115913*l+.2309699292*c,d=-1.2684380046*r+2.6097574011*l-.3413193965*c,u=-.0041960863*r-.7034186147*l+1.707614701*c,p=srgbFromLinear(h),g=srgbFromLinear(d),f=srgbFromLinear(u);return[p,g,f]}static RGBtoHSL(e,i,s){const n=Math.min(e,i,s),o=Math.max(e,i,s),a=(o+n)/2;let r,l;if(o===n)r=0,l=0;else{const c=o-n;l=a>.5?c/(2-o-n):c/(o+n),o===e?r=(i-s)/c+(i<s?6:0):o===i?r=(s-e)/c+2:r=(e-i)/c+4,r*=360/6}return[r,l,a]}static HSLtoRGB(e,i,s){if(e=(e%360+360)%360,i===0)return[s,s,s];const n=s<.5?s*(1+i):s+i-s*i,o=2*s-n;function a(h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?o+(n-o)*6*h:h<1/2?n:h<2/3?o+(n-o)*(2/3-h)*6:o}const r=a(e/360+1/3),l=a(e/360),c=a(e/360-1/3);return[r,l,c]}static RGBtoHSB(e,i,s){const n=Math.min(e,i,s),o=Math.max(e,i,s),a=o===0?0:(o-n)/o;let r=0;if(n!==o){const l=o-n,c=(o-e)/l,h=(o-i)/l,d=(o-s)/l;e===o?r=d-h:i===o?r=2+c-d:r=4+h-c,r/=6,r<0&&(r=r+1)}return[r*360,a,o]}static HSBtoRGB(e,i,s){e=(e%360+360)%360/360;let n=0,o=0,a=0;if(i===0)n=o=a=s;else{const r=(e-Math.floor(e))*6,l=r-Math.floor(r),c=s*(1-i),h=s*(1-i*l),d=s*(1-i*(1-l));switch(r>>0){case 0:n=s,o=d,a=c;break;case 1:n=h,o=s,a=c;break;case 2:n=c,o=s,a=d;break;case 3:n=c,o=h,a=s;break;case 4:n=d,o=c,a=s;break;case 5:n=s,o=c,a=h;break}}return[n,o,a]}static mix(e,i,s){return new ct(lerp(e.r,i.r,s),lerp(e.g,i.g,s),lerp(e.b,i.b,s),lerp(e.a,i.a,s))}static lighten(e,i){const s=ct.RGBtoOKLCH(e.r,e.g,e.b);return ct.fromOKLCH(clamp(0,s[0]+i,1),s[1],s[2])}static darken(e,i){const s=ct.RGBtoOKLCH(e.r,e.g,e.b);return ct.fromOKLCH(clamp(0,s[0]-i,1),s[1],s[2])}static interpolate(e,i){const s=1/(e.length-1),n=e.map(o=>ct.RGBtoOKLCH(o.r,o.g,o.b));return Array.from({length:i},(o,a)=>{const r=a/(i-1),l=e.length<=2?0:Math.min(Math.floor(r*(e.length-1)),e.length-2),c=(r-l*s)/s,h=n[l],d=n[l+1];return ct.fromOKLCH(lerp(h[0],d[0],c),lerp(h[1],d[1],c),lerp(h[2],d[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(t,e,i){}niceDomain(t,e=this.domain){return e