UNPKG

sryd-charts-enterprise

Version:

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

2 lines 1.59 MB
var N_=Object.defineProperty,w_=Object.getOwnPropertyDescriptor,y=(t,e,i,s)=>{for(var n=s>1?void 0:s?w_(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&&N_(e,i,n),n},O_=Object.defineProperty,zT=(t,e)=>{for(var i in e)O_(t,i,{get:e[i],enumerable:!0})},$={};zT($,{error:()=>_T,errorOnce:()=>B_,log:()=>E_,logGroup:()=>F_,reset:()=>z_,table:()=>R_,warn:()=>FT,warnOnce:()=>P_});var xu=new Set;function E_(...t){console.log(...t)}function FT(t,...e){console.warn(`AG Charts - ${t}`,...e)}function _T(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function R_(...t){console.table(...t)}function P_(t,...e){const i=`Logger.warn: ${t}`;xu.has(i)||(FT(t,...e),xu.add(i))}function B_(t,...e){const i=`Logger.error: ${t}`;xu.has(i)||(_T(t,...e),xu.add(i))}function z_(){xu.clear()}function F_(t,e){console.groupCollapsed(t);try{return e()}finally{console.groupEnd()}}var ln={};zT(ln,{detectChartDefinition:()=>W_,getAxisModule:()=>U_,getSeriesModule:()=>H_,hasModule:()=>V_,listModulesByType:()=>j_,register:()=>GT,registerMany:()=>__,reset:()=>G_});var df=(t=>(t.Axis="axis",t.Chart="chart",t.Preset="preset",t.Plugin="plugin",t.Series="series",t))(df||{}),Or=new Map;function GT(t){const e=Or.get(t.name);if(e&&(e.enterprise||!t.enterprise))throw new Error(`AG Charts - Module '${t.name}' already registered`);Or.set(t.name,t)}function __(t){for(const e of t)GT(e)}function G_(){Or.clear()}function V_(t){return Or.has(t)}function*j_(t){for(const e of Or.values())e.type===t&&(yield e)}function W_(t){for(const e of Or.values())if(Y_(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 H_(t){const e=Or.get(t);if($_(e))return e}function U_(t){const e=Or.get(t);if(K_(e))return e}function Y_(t){return t?.type==="chart"}function K_(t){return t?.type==="axis"}function $_(t){return t?.type==="series"}var IS=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 TS(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 kS(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 X_(t){let e=1;for(let i=0;i<t.length;i++)t.charCodeAt(i)===10&&e++;return e}function Z_(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 Uo={};typeof window<"u"?Uo.window=window:typeof global<"u"&&(Uo.window=global.window),typeof document<"u"?Uo.document=document:typeof global<"u"&&(Uo.document=global.document);function Ea(t){return t?Uo.document?.[t]:Uo.document}function re(t){return t?Uo.window?.[t]:Uo.window}function Q_(t){Uo.document=t}function q_(t){Uo.window=t}function Mt(t,e,i){const s=Ea().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 Bi(t){return Ea().createElementNS("http://www.w3.org/2000/svg",t)}function J_(t,e){const i=Ea("body"),s=Mt("a",{display:"none"});s.href=t,s.download=e,i.appendChild(s),s.click(),setTimeout(()=>i.removeChild(s))}function tG(t){const e=re("Option"),{style:i}=new e;return i.color=t,i.color||null}function $e(t){return t!=null}function wt(t){return Array.isArray(t)}function VT(t){return typeof t=="boolean"}function Yo(t){return t instanceof Date}function Er(t){return Yo(t)&&!isNaN(Number(t))}function eG(t){return t instanceof RegExp}function Rr(t){return typeof t=="function"}function Rt(t){return typeof t=="object"&&t!==null&&!wt(t)}function Xe(t){return typeof t=="object"&&t!==null&&t.constructor?.name==="Object"}function Ti(t){return typeof t=="string"}function pe(t){return typeof t=="number"}function Pt(t){return Number.isFinite(t)}function iG(t){return typeof window<"u"&&t instanceof HTMLElement}function CS(t,e){return Object.values(t).includes(e)}function sG(t){return typeof t=="symbol"}function jT(t){return Ti(t)&&tG(t)!=null}var $l=Symbol("description"),WT=Symbol("required"),uf=class{constructor(t,e,i,s){this.message=t,this.path=e,this.required=i,this.unknown=s}toString(){return this.message}};function wn(t,e,i=""){if(!Rt(t)){const l=HT(i,t,"an object",!0);return{valid:null,errors:[new uf(l,i,!0)]}}const s=[],n=new Set(Object.keys(t)),o=[],a={};function r(l){return wt(e)?`${i}[${l}]`:i?`${i}.${l}`:l}for(const l of Object.keys(e)){const c=e[l],h=t[l],d=c[WT];if(n.delete(l),typeof h>"u"&&(s.push(l),!d))continue;const u=r(l);if(Rr(c)){const p={options:t,path:u};if(c(h,p))a[l]=p.result?.valid??h;else if(!p.result){const g=HT(u,h,c,d);o.push(new uf(g,i,d))}p.result&&o.push(...p.result.errors)}else{const p=wn(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=nG(l,r(l),s);o.push(new uf(h,i,void 0,!0))}return{valid:a,errors:o}}function HT(t,e,i,s){const n=Ti(i)?i:i[$l],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 \`${kS(e,50)}\`${o}, ignoring.`}function nG(t,e,i){const s=oG(t,i),n=s?`; Did you mean \`${s}\`? Ignoring.`:", ignoring.";return`Unknown option \`${e}\`${n}`}function oG(t,e,i=2){let s=1/0;const n=t.toLowerCase();return e.reduce((o,a)=>{const r=Z_(n,a.toLowerCase());return s>r&&r<=i?(s=r,a):o},null)}function ne(t,e){return Object.assign(Rr(t)?(i,s)=>t(i,s):{...t},{[$l]:e})}function K(t){return Object.assign(Rr(t)?(e,i)=>t(e,i):Ra(t),{[WT]:!0,[$l]:t[$l]})}var Ra=(t,e="an object")=>ne((i,s)=>(s.result=wn(i,t,s.path),!s.result.errors.some(n=>n.required&&n.path===s.path)),e),aG=(t,e="an object")=>ne((i,s)=>(s.result=wn(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),Ze=(...t)=>ne((e,i)=>t.every(s=>{const n=s(e,i);return i.result&&!n&&delete i.result,n}),t.map(e=>e[$l]).filter(Boolean).join(" and ")),Qt=(...t)=>ne((e,i)=>t.some(s=>{const n=s(e,i);return i.result&&!n&&delete i.result,n}),t.map(e=>e[$l]).filter(Boolean).join(" or ")),pf=t=>Pt(t)||Er(t),rG=t=>Yo(t)||(Pt(t)||Ti(t))&&Er(new Date(t)),On=ne(wt,"an array"),j=ne(VT,"a boolean"),bt=ne(Rr,"a function"),dt=ne(jT,"a color string"),Xl=ne(rG,"a date"),cn=ne($e,"a defined value"),J=ne(Pt,"a number"),Ko=ne(Rt,"an object"),E=ne(Ti,"a string"),bu=(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`,ne(s=>wt(s)&&s.length>=t&&s.length<=e,i)},UT=(t,e=!0)=>ne(i=>Pt(i)&&(i>t||e&&i===t),`a number greater than ${e?"or equal to ":""}${t}`),lG=(t,e)=>ne(i=>Pt(i)&&i>=t&&i<=e,`a number between ${t} and ${e} inclusive`),H=UT(0),gf=UT(0,!1),Tt=lG(0,1),Zl=t=>ne((e,{options:i})=>!pf(e)||!pf(i[t])||e<i[t],`the value to be less than \`${t}\``),Su=t=>ne((e,{options:i})=>!pf(e)||!pf(i[t])||e>i[t],`the value to be greater than \`${t}\``);function st(...t){Rt(t[0])&&(t=Object.values(t[0]));const e=TS(t,"or",i=>`'${i}'`);return ne(i=>t.includes(i),`a keyword such as ${e}`)}var Ct=t=>ne(e=>t===e,`the value ${JSON.stringify(t)}`),cG=(t,e)=>ne(i=>i instanceof t,e??`an instance of ${t.name}`),mt=(t,e)=>ne((i,s)=>wt(i)&&i.every(n=>{const o=t(n,s);return delete s.result,o}),e??`${t[$l]} array`),gs=(t,e="an object array")=>ne((i,s)=>{if(!wt(i))return!1;const n=[],o=[];for(let a=0;a<i.length;a++){const r=`${s.path}[${a}]`,l=wn(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),vu=(t,e="an object")=>{const i=aG({type:K(st(...Object.keys(t)))});return ne((s,n)=>{if(i(s,n)){const o=s.type,a={type:K(Ct(o)),...t[o]},r=Ra(a)(s,n);if(n.result)for(const l of n.result.errors)l.message+=` (type="${o}")`;return r}return!1},e)},hG=Ra({color:dt,stop:Tt},""),dG=ne(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"),ff=Ze(bu(2),Ze(mt(hG),dG)),LS=st("axis","item","series"),NS=vu({gradient:{gradient:st("linear","radial","conic"),bounds:LS,colorStops:K(ff),rotation:J,reverse:j}},"a gradient object with color stops"),rt={stroke:dt,strokeWidth:H,strokeOpacity:Tt},yf=Ra({type:K(Ct("gradient")),gradient:K(st("linear","radial","conic")),bounds:K(LS),colorStops:K(Qt(ff,Ze(bu(2),mt(dt)))),rotation:K(J),reverse:K(j)}),mf=Ra({type:K(Ct("pattern")),pattern:K(st("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),width:K(H),height:K(H),fill:K(dt),fillOpacity:K(Tt),backgroundFill:K(dt),backgroundFillOpacity:K(Tt),padding:K(H),rotation:K(J),stroke:K(dt),strokeWidth:K(H),strokeOpacity:K(Tt)}),uG={gradient:st("linear","radial","conic"),bounds:LS,reverse:j},pG={rotation:J,padding:H},gG=vu({gradient:{...uG,colorStops:ff,rotation:J},pattern:{...pG,pattern:st("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),width:H,height:H,fill:dt,fillOpacity:Tt,backgroundFill:dt,backgroundFillOpacity:Tt,...rt}},"a color object"),$o=Qt(dt,gG),St={fill:$o,fillOpacity:Tt};St.fillGradientDefaults=yf,St.fillPatternDefaults=mf;var Ot={lineDash:mt(H),lineDashOffset:J},ge={color:dt,fontFamily:E,fontSize:H,fontStyle:st("normal","italic","oblique"),fontWeight:Qt(H,st("normal","bold","bolder","lighter"))};function xf(t){return typeof t>"u"?[]:Array.isArray(t)?t:[t]}function YT(t){return Array.from(new Set(t))}function wS(t,e){return t.reduce((i,s)=>{const n=e(s);return i[n]??(i[n]=[]),i[n].push(s),i},{})}function Xo(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(!Xo(t[i],e[i]))return!1}else if(t[i]!==e[i])return!1;return!0}function Mu(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 fG(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 KT(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 $T(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 XT(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 yG(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 mG(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 xG(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 ZT(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*Pr(...t){for(const e of t)yield*e}function bG(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t?t:[t]}function Du(t){for(const e of t)return e;throw new Error("AG Charts - no first() value found")}function*ke(t){const e=[void 0,void 0];for(const i of Object.keys(t))e[0]=i,e[1]=t[i],yield e}function ft(t,e,i){return Math.min(i,Math.max(t,e))}function SG(t,e,i=1e-10){return t>=e[0]-i&&t<=e[1]+i}function de(t,e,i=1e-10){return t===e||Math.abs(t-e)<i}function OS(t){return Math.sign(t)===-1||Object.is(t,-0)}function QT(t){return t%1===0}function ES(t,e=2){const i=10**e;return Math.round(t*i)/i}function qT(t,e){return Math.floor(t%e+(t<0?Math.abs(e):0))}function Au(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 JT=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,tk=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function vG(t){if(!Ti(t))return!1;const e=tk.exec(t);return JT.test(e?e[2]:t)}function ek(t){let e,i;const s=tk.exec(t);s&&([,e,t,i]=s);const n=JT.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 ik(t){const e=typeof t=="string"?ek(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=En.g,p=!0;else if(c in En&&c in Lh)f=g?Lh[c]:En[c];else if(c in En)f=En[c];else if(c in Lh)f=Lh[c];else throw new Error(`The number formatter type is invalid: ${c}`);let x;return g?x=c?6:12:x=u,m=>{let b=f(m,x);return p&&(b=AG(b)),l&&(b=IG(b,l)),b=kG(m,b,n),o&&o!=="#"&&(b=`${o}${b}`),o==="#"&&c==="x"&&(b=`0x${b}`),c==="s"&&(b=`${b}${TG(m)}`),(c==="%"||c==="p")&&(b=`${b}%`),r!=null&&!isNaN(r)&&(b=CG(b,r,i??a,s)),b=`${h}${b}${d}`,b}}var Lh={b:t=>bf(t).toString(2),c:t=>String.fromCharCode(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>bf(t).toString(8),x:t=>bf(t).toString(16),X:t=>Lh.x(t).toUpperCase(),n:t=>Lh.d(t),"%":t=>`${bf(t*100).toFixed(0)}`},En={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>En.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>En.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)=>En.g(t,e).toUpperCase(),n:(t,e)=>En.g(t,e),p:(t,e)=>En.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=ok(t);return En.r(t/10**i,e)},"%":(t,e)=>En.f(t*100,e)},sk=-24,nk=24,MG={[sk]:"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",[nk]:"Y"},DG="\u2212";function bf(t){return Math.floor(Math.abs(t))}function AG(t){return t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function IG(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 TG(t){return MG[ok(t)]}function ok(t){return ft(sk,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,nk)}function kG(t,e,i=""){if(i==="(")return t>=0?e:`(${e})`;const s=i==="+"?"+":"";return`${t>=0?s:DG}${e}`}function CG(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 ak=Object.defineProperty,LG=Object.getOwnPropertyDescriptor,ho=(t,e)=>{for(var i in e)ak(t,i,{get:e[i],enumerable:!0})},v=(t,e,i,s)=>{for(var n=s>1?void 0:s?LG(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&&ak(e,i,n),n},Sf=class{constructor(){this.destroyFns=[]}destroy(){for(const t of this.destroyFns)t()}},NG=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)}},Zo=new NG,vf={containsPoint:wG,isEmpty:OG,normalize:EG};function wG(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height}function OG(t){return t==null||t.height===0||t.width===0||isNaN(t.height)||isNaN(t.width)}function EG(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 Mf=Symbol("interpolate"),Df=t=>t[Mf]!=null;function Af(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 RG(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 Iu=class mu{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 mu(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 mu(i,s,n-i,o-s)}static nearestBox(e,i,s){return Af(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 mu(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 vf.containsPoint(this,e,i)}intersection(e){if(!this.collidesBBox(e))return;const i=ft(e.x,this.x,e.x+e.width),s=ft(e.y,this.y,e.y+e.height),n=ft(e.x,this.x+this.width,e.x+e.width),o=ft(e.y,this.y+this.height,e.y+e.height);return new mu(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-ft(this.x,e,this.x+this.width),n=i-ft(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}[Mf](e,i){return new mu(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)}};Iu.zero=Object.freeze(new Iu(0,0,0,0)),Iu.NaN=Object.freeze(new Iu(NaN,NaN,NaN,NaN));var pt=Iu,PG=2e3,rk=Date.now(),BG=()=>{const t=Date.now()-rk;if(t>PG){const e=(Math.floor(t/100)/10).toFixed(1);$.log(`**** ${e}s since last log message ****`)}rk=Date.now()},qt={create(...t){return Object.assign((...i)=>{qt.check(...t)&&(typeof i[0]=="function"&&(i=xf(i[0]())),BG(),$.log(...i))},{check:()=>qt.check(...t),group:(i,s)=>qt.check(...t)?$.logGroup(i,s):s()})},check(...t){return t.length===0&&t.push(!0),xf(re("agChartsDebug")).some(i=>t.includes(i))},inDevelopmentMode(t){if(qt.check("dev"))return t()}};function lk({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 ck(t){if(qt.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 hk(t,e,i){return[Math.floor(t*i),Math.floor(e*i)]}var RS=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]=hk(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),ck(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]=hk(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(){lk(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)}},PS=new Map;function zG(){PS.clear()}function hn(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=(PS.get(i)??0)+1;return PS.set(i,s),`${i}-${s}`}function BS(){return crypto.randomUUID?.()??FG()}function FG(){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 gt(t){return function(e,i){const s=`__${i}`;e[i]||_G(e,i,s,t)}}function _G(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=WG(i,l);break;case"transform":c=HG(i);break;case"path":c=UG(i);break}c=jG(i,VG(GG(c,l),l),l),Object.defineProperty(t,e,{set:c,get:function(){return this[i]},enumerable:!0,configurable:!0})}function GG(t,e){const{convertor:i}=e;return i?function(s){t.call(this,i(s))}:t}var If=Symbol("no-change");function VG(t,e){const{changeCb:i}=e;return i?function(s){const n=t.call(this,s);return n!==If&&i.call(this,this),n}:t}function jG(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 WG(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):If}}function HG(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this.markDirtyTransform(),e):If}}function UG(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(t)),e):If}}var dk=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(dk||{}),Tu=class NT{constructor(e){this.serialNumber=NT._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=hn(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??NT._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=Bi("svg");if(o.setAttribute("width",String(i)),o.setAttribute("height",String(s)),o.setAttribute("viewBox",`0 0 ${i} ${s}`),n.defs?.length){const a=Bi("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 bG(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(){}};Tu._nextSerialNumber=0,Tu._debugEnabled=!1,v([gt()],Tu.prototype,"visible",2),v([gt({changeCb:t=>t.onZIndexChange()})],Tu.prototype,"zIndex",2);var Pa=Tu,Tf=Symbol("BREAK"),Nh="__decorator_config";function YG(t,e){zS(t,e).optional=!0}function zS(t,e){Object.getOwnPropertyDescriptor(t,Nh)==null&&Object.defineProperty(t,Nh,{value:{}});const i=t[Nh],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===Tf)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===Tf)return;return h},enumerable:!0,configurable:!1}),i[s]}function Ba(t,e,i){return(s,n)=>{const o=zS(s,n);o.setters.push(t),e&&o.getters.unshift(e),i&&Object.assign(o,i)}}function uk(t){return(e,i)=>{zS(e,i).observers.push(t)}}function ku(t){return typeof t<"u"&&Nh in t}function Br(t){const e=new Set;for(;ku(t);)e.add(t?.[Nh]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(i=>Object.keys(i))}function pk(t){return Br(t).reduce((e,i)=>(e[i]=t[i]??null,e),{})}function KG(t,e){const i=e.toString();for(;ku(t);){const s=t[Nh];if(Object.hasOwn(s,i))return s[i];t=Object.getPrototypeOf(t)}}function Qo(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every((i,s)=>Qo(i,e[s])):Xe(t)?Xe(e)?FS(t,e,Qo):!1:t===e}function FS(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 jt(...t){const e={};for(const i of t){if(!Rt(i))continue;const s=ku(i)?Br(i):Object.keys(i);for(const n of s)Xe(e[n])&&Xe(i[n])?e[n]=jt(e[n],i[n]):e[n]??(e[n]=i[n])}return e}function Cu(...t){const e={};for(const i of t){if(!Rt(i))continue;const s=ku(i)?Br(i):Object.keys(i);for(const n of s)Xe(e[n])&&Xe(i[n])?e[n]=Cu(e[n],i[n]):n in e||(e[n]??(e[n]=i[n]))}return e}function kf(t,...e){return e&&wt(t)?t.map(i=>jt(i,...e)):t}function gk(t,e){const i={};for(const[s,n]of ke(t))i[s]=e(n,s,t);return i}function zr(t,e){const i={...t};for(const s of e)delete i[s];return i}function wh(t,e){return(wt(e)?e:e.split(".")).reduce((s,n)=>s[n],t)}var _S=new Set(["__proto__","constructor","prototype"]);function GS(t,e,i){const s=wt(e)?e.slice():e.split("."),n=s.pop();if(s.some(a=>_S.has(a)))return;const o=s.reduce((a,r)=>a[r],t);return o[n]=i,o[n]}function VS(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 Ql(t){return t==null||typeof t!="object"||!Xe(t)||(Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{const i=t[e];i!==null&&(typeof i=="object"||typeof i=="function")&&!Object.isFrozen(i)&&Ql(i)})),t}var Rn=Math.PI*2,Lu=Math.PI/2;function me(t){return t%=Rn,t+=Rn,t%=Rn,t}function $G(t){return t%=Rn,t+=Rn,t!==Rn&&(t%=Rn),t}function Nu(t){return t%=Rn,t<-Math.PI?t+=Rn:t>=Math.PI&&(t-=Rn),t}function Fr(t,e,i){const s=me(t),n=me(e),o=me(i);return n<o?n<=s&&s<=o:n>o?n<=s||s<=o:!0}function Me(t){return t/180*Math.PI}function XG(t){return t/Math.PI*180}function Cf(t,e){return t=me(t),e=me(e),e-t+(t>e?Rn:0)}function fk(t){const e=me(t);return e<=Lu?e/Lu:e<=Math.PI?(Math.PI-e)/Lu:e<=1.5*Math.PI?(e-Math.PI)/Lu:(Rn-e)/Lu}var ql=(t,e,i)=>t*(1-i)+e*i,jS=t=>{const e=t<0?-1:1,i=Math.abs(t);return i<=.04045?t/12.92:e*((i+.055)/1.055)**2.4},WS=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},yk=class se{constructor(e,i,s,n=1){this.r=ft(0,e||0,1),this.g=ft(0,i||0,1),this.b=ft(0,s||0,1),this.a=ft(0,n||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!se.parseHex(e):e.indexOf("rgb")>=0?!!se.stringToRgba(e):se.nameToHex.has(e.toLowerCase())}static fromString(e){if(e.indexOf("#")>=0)return se.fromHexString(e);const i=se.nameToHex.get(e.toLowerCase());if(i)return se.fromHexString(i);if(e.indexOf("rgb")>=0)return se.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=se.parseHex(e);if(i){const[s,n,o,a]=i;return new se(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=ft(0,c,100),c/=100):r===3?c=ft(0,c,1):(c=ft(0,c,255),c/=255),a.push(c)}return a}static fromRgbaString(e){const i=se.stringToRgba(e);if(i){if(i.length===3)return new se(i[0],i[1],i[2]);if(i.length===4)return new se(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 se(e[0],e[1],e[2],e[3]);if(e.length===3)return new se(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=se.HSBtoRGB(e,i,s);return new se(o[0],o[1],o[2],n)}static fromHSL(e,i,s,n=1){const o=se.HSLtoRGB(e,i,s);return new se(o[0],o[1],o[2],n)}static fromOKLCH(e,i,s,n=1){const o=se.OKLCHtoRGB(e,i,s);return new se(o[0],o[1],o[2],n)}static padHex(e){return e.length===1?"0"+e:e}toHexString(){let e="#"+se.padHex(Math.round(this.r*255).toString(16))+se.padHex(Math.round(this.g*255).toString(16))+se.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(e+=se.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 se.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,i,s){const n=jS(e),o=jS(i),a=jS(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),x=p>=0?p:p+360;return[g,f,x]}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=WS(h),g=WS(d),f=WS(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 se(ql(e.r,i.r,s),ql(e.g,i.g,s),ql(e.b,i.b,s),ql(e.a,i.a,s))}static lighten(e,i){const s=se.RGBtoOKLCH(e.r,e.g,e.b);return se.fromOKLCH(ft(0,s[0]+i,1),s[1],s[2])}static darken(e,i){const s=se.RGBtoOKLCH(e.r,e.g,e.b);return se.fromOKLCH(ft(0,s[0]-i,1),s[1],s[2])}static interpolate(e,i){const s=1/(e.length-1),n=e.map(o=>se.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 se.fromOKLCH(ql(h[0],d[0],c),ql(h[1],d[1],c),ql(h[2],d[2],c))})}};yk.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 oe=yk,Lf=class{ticks(t,e,i){}niceDomain(t,e=this.domain){return e}tickFormatter(t){}datumFormatter(t){}get bandwidth(){}get step(){}get inset(){}},Oh=(t,e)=>{const i=Symbol(String(e));t[i]=void 0,Object.defineProperty(t,e,{get(){return this[i]},set(s){this[i]!==s&&(this[i]=s,this.invalid=!0)},enumerable:!0,configurable:!1})},mk=t=>{const e=oe.fromString(t),[i,s,n]=oe.RGBtoOKLCH(e.r,e.g,e.b);return{l:i,c:s,h:n,a:e.a}},HS=1e-6,xk=t=>t.c<HS||t.l<HS||t.l>1-HS,ZG=(t,e,i)=>{i=ft(0,i,1);let s;if(xk(t))s=e.h;else if(xk(e))s=t.h;else{const r=t.h;let l=e.h;const c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),s=r*(1-i)+l*i}const n=t.c*(1-i)+e.c*i,o=t.l*(1-i)+e.l*i,a=t.a*(1-i)+e.a*i;return oe.fromOKLCH(o,n,s,a)},Eh=class extends Lf{constructor(){super(...arguments),this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(mk)}update(){const{domain:t,range:e}=this;t.length<2&&($.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let i=1;i<t.length;i++){const s=t[i-1],n=t[i];if(s>=n){$.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((o,a)=>o-a);break}}if(e.length<t.length)for(let i=e.length;i<t.length;i++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(mk)}normalizeDomains(...t){return{domain:t.flat(),animatable:!0}}toDomain(){}convert(t){this.refresh();const{domain:e,range:i,parsedRange:s}=this,n=e[0],o=e.at(-1),a=i[0],r=i[i.length-1];if(t<=n)return a;if(t>=o)return r;let l,c;if(e.length===2){const u=(t-n)/(o-n),p=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(u*(i.length-1)),i.length-2),c=(u-l*p)/p}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);const u=e[l],p=e[l+1];c=(t-u)/(p-u)}const h=s[l],d=s[l+1];return ZG(h,d,c).toRgbaString()}invert(){}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&$.warnOnce("Expected update to not invalidate scale"))}};v([Oh],Eh.prototype,"domain",2),v([Oh],Eh.prototype,"range",2);var Nf=class{constructor(t,e=[],i){this.colorSpace=t,this.stops=e,this.bbox=i,this._cache=void 0}createGradient(t,e,i){const s=this.bbox??e;if(isNaN(s.x)||isNaN(s.y))return;if(this._cache!=null&&this._cache.ctx===t&&this._cache.bbox.equals(s))return this._cache.gradient;const{stops:n,colorSpace:o}=this;if(n.length===0)return;if(n.length===1)return n[0].color;let a=this.createCanvasGradient(t,s,i);if(a==null)return;const r=o==="oklch",l=.05;let c=n[0];a.addColorStop(c.stop,c.color);for(let h=1;h<n.length;h+=1){const d=n[h];if(r){const u=new Eh;u.domain=[c.stop,d.stop],u.range=[c.color,d.color];for(let p=c.stop+l;p<d.stop;p+=l)a.addColorStop(p,u.convert(p))}a.addColorStop(d.stop,d.color),c=d}return"createPattern"in a&&(a=a.createPattern()),this._cache={ctx:t,bbox:s,gradient:a},a}toSvg(t){const e=this.bbox??t,i=this.createSvgGradient(e);return this.stops.forEach(({stop:s,color:n})=>{const o=Bi("stop");o.setAttribute("offset",`${s}`),o.setAttribute("stop-color",`${n}`),i.appendChild(o)}),i}},bk=class extends Nf{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}createCanvasGradient(t,e,i){const{angle:n}=this,o=me(Me(n+-90)),a=i?.centerX??e.x+e.width*.5,r=i?.centerY??e.y+e.height*.5;return t.createConicGradient(o,a,r)}createSvgGradient(t){return Bi("linearGradient")}},Sk=class extends Nf{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}getGradientPoints(t){const{angle:i}=this,s=me(Me(i+90)),n=Math.cos(s),o=Math.sin(s),a=t.width,r=t.height,l=t.x+a*.5,c=t.y+r*.5,h=Math.sqrt(r*r+a*a)/2,d=Math.atan2(r,a);let u;s<Math.PI/2?u=s:s<Math.PI?u=Math.PI-s:s<1.5*Math.PI?u=s-Math.PI:u=2*Math.PI-s;const p=h*Math.abs(Math.cos(u-d));return{x0:l+n*p,y0:c+o*p,x1:l-n*p,y1:c-o*p}}createCanvasGradient(t,e){const{x0:i,y0:s,x1:n,y1:o}=this.getGradientPoints(e);return t.createLinearGradient(i,s,n,o)}createSvgGradient(t){const{x0:e,y0:i,x1:s,y1:n}=this.getGradientPoints(t),o=Bi("linearGradient");return o.setAttribute("x1",String(e)),o.setAttribute("y1",String(i)),o.setAttribute("x2",String(s)),o.setAttribute("y2",String(n)),o.setAttribute("gradientUnits","userSpaceOnUse"),o}},QG=class extends Nf{constructor(t,e,i){super(t,e,i)}createCanvasGradient(t,e,i){const s=i?.centerX??e.x+e.width*.5,n=i?.centerY??e.y+e.height*.5,o=i?.innerRadius??0,a=i?.outerRadius??Math.hypot(e.width*.5,e.height*.5)/Math.SQRT2;return t.createRadialGradient(s,n,o,s,n,a)}createSvgGradient(t){const e=t.x+t.width*.5,i=t.y+t.height*.5,s=Bi("radialGradient");return s.setAttribute("cx",String(e)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(t.width*.5,t.height*.5)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}},kt=class{handleUnknownProperties(t,e){}set(t){const{className:e=this.constructor.name}=this.constructor;if(typeof t!="object")return $.warn(`unable to set ${e} - expecting a properties object`),this;const i=new Set(Object.keys(t));for(const s of Br(this))if(i.has(s)){const n=t[s],o=this;if(Pn(o[s]))if(o[s]instanceof wu){const a=o[s].reset(n);a!=null?o[s]=a:$.warn(`unable to set [${s}] - expecting a properties array`)}else o[s].set(n);else Xe(n)?o[s]=Cu(n,o[s]??{}):o[s]=n;i.delete(s)}this.handleUnknownProperties(i,t);for(const s of i)$.warn(`unable to set [${s}] in ${e} - property is unknown`);return this}isValid(t){return Br(this).every(e=>{const i=KG(this,e);if(i==null)return!0;const s=i.optional===!0||typeof this[e]<"u";return s||$.warnOnce(`${t??""}[${e}] is required.`),s})}toJson(){return Br(this).reduce((t,e)=>{const i=this[e];return t[e]=Pn(i)?i.toJson():i,t},{})}},wu=class u_ extends Array{constructor(e,...i){super(i.length);const n=(o=>!!o?.prototype?.constructor?.name)(e)?o=>new e().set(o):e;Object.defineProperty(this,"itemFactory",{value:n,enumerable:!1,configurable:!1}),this.set(i)}set(e){if(wt(e)){this.length=e.length;for(let i=0;i<e.length;i++)this[i]=this.itemFactory(e[i])}return this}reset(e){if(Array.isArray(e))return new u_(this.itemFactory,...e)}toJson(){return this.map(e=>e?.toJson?.()??e)}};function Pn(t){return t instanceof kt||t instanceof wu}function qG(t,e={}){const{optional:i=!1}=e;return Ba((s,n,o)=>{const a={...e,target:s,property:n};if(i&&typeof o>"u"||t(o,a))return Pn(s[n])&&!Pn(o)?(s[n].set(o),s[n]):o;const r=kS(o,50),l=String(n).replace(/^_*/,""),c=s.constructor.className??s.constructor.name.replace(/Properties$/,""),h=t.message?`; expecting ${Rh(t,a)}`:"";return $.warn(`Property [${l}] of [${c}] cannot be set to [${r}]${h}, ignoring.`),Tf},void 0,{optional:i})}var JG=!1,A=JG?(t,e={})=>{const{optional:i=!1}=e;return Ba((s,n,o)=>{const a={...e,target:s,property:n};if(i&&typeof o>"u"||t(o,a)){if(Pn(s[n])&&!Pn(o))return s[n].set(o),s[n]}else{const r=kS(o,50),l=String(n).replace(/^_*/,""),c=s.constructor.className??s.constructor.name.replace(/Properties$/,""),h=t.message?`; expecting ${Rh(t,a)}`:"";$.warn(`TempValidation!!! Property [${l}] of [${c}] cannot be set to [${r}]${h}, ignoring.`)}return o},void 0,{optional:i})}:()=>YG,_r=(...t)=>{const e=[];return ce((i,s)=>(e.length=0,t.every(n=>{const o=n(i,s);return o||e.push(Rh(n,s)),o})),()=>e.filter(Boolean).join(" AND "))},Zi=(...t)=>ce((e,i)=>t.some(s=>s(e,i)),e=>t.map(c4(e)).filter(Boolean).join(" OR ")),at=Ff(ce((t,e)=>Pn(t)||Rt(t)&&Pn(e.target[e.property]),"a properties object")),vk=Ff(ce(t=>Rt(t),"an object")),xt=ce(VT,"a boolean"),Ls=ce(Rr,"a function"),et=ce(Ti,"a string"),Et=d4(ce(Pt,"a number")),Mk=ce(t=>pe(t)&&!isNaN(t),"a real number"),wf=ce(t=>pe(t)&&isNaN(t),"NaN"),ot=Et.restrict({min:0}),ae=Et.restrict({min:0,max:1}),Of=Zi(Et,wf),Jl=h4(ce(wt,"an array")),ki=(t,e)=>ce((i,s)=>wt(i)&&i.every(n=>t(n,s)),i=>{const s=Rh(Jl,i)??"";return typeof e=="function"?`${s} of ${e(i)}`:e?`${s} of ${e}`:s}),Ef=t=>Pt(t)||Er(t),Rf=t=>ce((e,i)=>!Ef(e)||!Ef(i.target[t])||e<i.target[t],`to be less than ${t}`),Pf=t=>ce((e,i)=>!Ef(e)