ag-charts-core
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
2 lines • 150 kB
JavaScript
var Bi=Object.defineProperty,Za=Object.getOwnPropertyDescriptor,lt=(e,t)=>{for(var n in t)Bi(e,n,{get:t[n],enumerable:!0})},ve=(e,t,n,r)=>{for(var i=r>1?void 0:r?Za(t,n):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=(r?s(t,n,i):s(i))||i);return r&&i&&Bi(t,n,i),i},Hi=(e=>(e.Chart="chart",e.Axis="axis",e.Series="series",e.Plugin="plugin",e.AxisPlugin="axis:plugin",e.SeriesPlugin="series:plugin",e.Preset="preset",e))(Hi||{});function el(e){return e.domain}var Wi=(e=>(e[e.Leading=0]="Leading",e[e.Trailing=1]="Trailing",e[e.Interpolate=2]="Interpolate",e))(Wi||{}),tl=class{constructor(){this.events=new Map}on(e,t){return this.events.has(e)||this.events.set(e,new Set),this.events.get(e)?.add(t),()=>this.off(e,t)}off(e,t){const n=this.events.get(e);n&&(n.delete(t),n.size===0&&this.events.delete(e))}emit(e,t){const n=this.events.get(e);if(n)for(const r of n)r(t)}clear(e){e?this.events.delete(e):this.events.clear()}},dr=class{constructor(e){if(this.maxCacheSize=e,this.store=new Map,e<=0)throw new Error("LRUCache size must be greater than 0")}get(e){if(!this.store.has(e))return;const t=this.store.get(e);return this.store.delete(e),this.store.set(e,t),t}has(e){return this.store.has(e)}set(e,t){return this.store.set(e,t),this.store.size>this.maxCacheSize&&this.store.delete(this.store.keys().next().value),t}clear(){this.store.clear()}},Vi={};lt(Vi,{Time:()=>Sl,check:()=>ut,create:()=>to,inDevelopmentMode:()=>no});function gr(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function nl(e){return Array.from(new Set(e))}function rl(e,t){return e.reduce((n,r)=>{const i=t(r);return n[i]??(n[i]=[]),n[i].push(r),n},{})}function ct(e,t){if(e==null||t==null||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(Array.isArray(e[n])&&Array.isArray(t[n])){if(!ct(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1;return!0}function il(e,t,n=0){if(e.length===0)return[];const r=[];for(let i=0;i<t;i++)r.push(e.at((i+n)%e.length));return r}function ol(e,t){const n=new Map;for(const[r,i]of t.entries())n.set(i,r);return e.sort((r,i)=>{const o=n.get(r)??1/0,s=n.get(i)??1/0;return o-s})}function sl(e,t){let n=0;for(;n<e.length&&t(e[n]);)n+=1;const r=n;r!==0&&e.splice(0,r)}function al(e,t){let n=e.length-1;for(;n>=0&&t(e[n]);)n-=1;const r=e.length-1-n;r!==0&&e.splice(e.length-r,r)}function ll(e,t,n){const r=[e],i=Math.round((t-e)/(n-1));if(i>0)for(let o=e+i;o<t&&!(r.push(o)>=n-1);o+=i);return r.push(t),r}var oe={};typeof globalThis.window<"u"&&(oe.window=globalThis.window),typeof document<"u"?oe.document=document:typeof globalThis.global<"u"&&(oe.document=globalThis.document);function ln(e){return e?oe.document?.[e]:oe.document}function cn(e){return e?oe.window?.[e]:oe.window}function cl(e){oe.document=e}function ul(e){oe.window=e}function Ki(){return oe.window?.OffscreenCanvas??globalThis.OffscreenCanvas}function fl(){return oe.window?.Path2D??globalThis.Path2D}function hl(){return oe.window?.DOMMatrix??globalThis.DOMMatrix}function dl(){return oe.window?.Image??globalThis.Image}function gl(){return oe.window?.ResizeObserver??globalThis.ResizeObserver}var zi=1,pl=11;function qi(e){return e!=null&&typeof e.nodeType=="number"}function pr(e){return e!=null&&e.nodeType===zi}function yl(e){return e!=null&&e.nodeType===pl}function Yi(e){return e!=null&&e.nodeType===zi&&"style"in e}var Xi={};lt(Xi,{error:()=>Ji,errorOnce:()=>bl,log:()=>un,logGroup:()=>Zi,reset:()=>vl,table:()=>ml,warn:()=>Oe,warnOnce:()=>te});var yr=new Set;function un(...e){console.log(...e)}function Oe(e,...t){console.warn(`AG Charts - ${e}`,...t)}function Ji(e,...t){typeof e=="object"?console.error("AG Charts error",e,...t):console.error(`AG Charts - ${e}`,...t)}function ml(...e){console.table(...e)}function Qi(e,t,n){let r;e instanceof Error?r=e.message:typeof e=="string"?r=e:typeof e=="object"?r=JSON.stringify(e):r=String(e);const i=`${t}: ${r}`;yr.has(i)||(n(e),yr.add(i))}function te(e,...t){Qi(e,"Logger.warn",n=>Oe(n,...t))}function bl(e,...t){Qi(e,"Logger.error",n=>Ji(n,...t))}function vl(){yr.clear()}function wl(e){return typeof e=="object"&&e!==null&&"then"in e}function Zi(e,t){console.groupCollapsed(e);let n=!0;try{const r=t();return wl(r)?(n=!1,r.finally(()=>{console.groupEnd()})):r}finally{n&&console.groupEnd()}}var xl=2e3,eo=Date.now();function El(){const e=Date.now()-eo;if(e>xl){const t=(Math.floor(e/100)/10).toFixed(1);un(`**** ${t}s since last log message ****`)}eo=Date.now()}function to(...e){return Object.assign((...n)=>{ut(...e)&&(typeof n[0]=="function"&&(n=gr(n[0]())),El(),un(...n))},{check:()=>ut(...e),group:(n,r)=>ut(...e)?Zi(n,r):r()})}function ut(...e){return e.length===0&&e.push(!0),gr(cn("agChartsDebug")).some(n=>e.includes(n))}function no(e){if(ut("dev"))return e()}function Sl(e,t={}){const{logResult:n=!0,logStack:r=!1,logArgs:i=!1,logData:o}=t;return function(s,a,l){const c=l.value;l.value=function(...u){const f=performance.now(),h=c.apply(this,u),g={duration:performance.now()-f};return n&&(g.result=h),i&&(g.args=u),r&&(g.stack=new Error("Stack trace for timing debug").stack),o&&(g.logData=o(this)),un(e,g),h}}}var ro={};lt(ro,{flush:()=>oo,record:()=>io});var mr=new Map;function io(e,t){ut("scene:stats:verbose")&&mr.set(e,t)}function oo(){const e=Object.fromEntries(mr);return mr.clear(),e}var Al={},so={};lt(so,{RegistryMode:()=>ao,getAxisModule:()=>Nl,getChartModule:()=>Rl,getPresetModule:()=>_l,getSeriesModule:()=>Pl,hasModule:()=>Cl,ifRegistryChanged:()=>Fl,isEnterprise:()=>lo,isIntegrated:()=>Ml,isModuleType:()=>ft,isUmd:()=>Dl,listModules:()=>Ll,listModulesByType:()=>Il,register:()=>br,registerModules:()=>$l,reset:()=>kl,setRegistryMode:()=>Ol});var ao=(e=>(e.Enterprise="enterprise",e.Integrated="integrated",e.UMD="umd",e))(ao||{}),Nt=new Set;function Ol(e){Nt.add(e)}function Tl(){Nt.clear()}function lo(){return Nt.has("enterprise")}function Ml(){return Nt.has("integrated")}function Dl(){return Nt.has("umd")}var Te=new Map,fn=0;function co(e){if(Te.set(e.name,e),fn++,e.dependencies)for(const t of e.dependencies)br(t)}function Fl(e,t){return fn!==e&&t(),fn}function br(e){const t=Te.get(e.name);if(!t){co(e);return}if(t.version===e.version){!t.enterprise&&e.enterprise&&co(e);return}throw new Error([`AG Charts - Module '${e.name}' already registered with different version:`,`${t.version} vs ${e.version}`,"","Check your package.json for conflicting dependencies - depending on your package manager","one of these commands may help:","- npm ls ag-charts-community","- yarn why ag-charts-community"].join(`
`))}function $l(e){for(const t of e.flat())br(t)}function kl(){Tl(),Te.clear(),fn++}function Cl(e){return Te.has(e)}function*Ll(){for(const e of Te.values())yield e}function*Il(e){for(const t of Te.values())ft(e,t)&&(yield t)}function Nl(e){const t=Te.get(e);if(ft("axis",t))return t}function Rl(e){const t=Te.get(e);if(ft("chart",t))return t;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function _l(e){const t=Te.get(e);if(ft("preset",t))return t}function Pl(e){const t=Te.get(e);if(ft("series",t))return t}function ft(e,t){return t?.type===e}var hn=class{constructor(){this.callbacks=new Set}flush(){for(const e of this.callbacks)e();this.callbacks.clear()}merge(e){for(const t of e.callbacks)this.callbacks.add(t)}register(...e){for(const t of e)t&&this.callbacks.add(t)}},Gl=class{constructor(){this.cleanup=new hn}destroy(){this.cleanup.flush()}};function Dp(e){return e}var uo=new WeakMap;function Me(e){const t=uo.get(e);if(!t)throw new Error("AG Charts - DynamicContext: missing internal state.");return t}var jl=class Ya{constructor(t){const n={cleanup:new hn,self:this,resolving:new Set,children:new Set,refs:new Set,parent:t,destroyed:!1};uo.set(this,n),t&&Me(t).children.add(this)}get cleanup(){return Me(this).cleanup}constant(t,n){return this.assertNotDestroyed(),Object.defineProperty(this,t,{value:n,configurable:!0,enumerable:!0}),Me(this).self}ref(t,n){this.assertNotDestroyed();const r=Me(this);return r.refs.add(t),Object.defineProperty(this,t,{value:n,configurable:!0,enumerable:!0}),r.self}service(t,n){return this.assertNotDestroyed(),Object.defineProperty(this,t,{configurable:!0,enumerable:!0,get:()=>{const r=this.resolve(t,n);return Object.defineProperty(this,t,{value:r,configurable:!0,enumerable:!0}),r}}),Me(this).self}factory(t,n){return this.assertNotDestroyed(),Object.defineProperty(this,t,{configurable:!0,enumerable:!0,get:()=>this.resolve(t,n)}),Me(this).self}has(t){return t in this}child(){const t=new Ya(this);return Object.setPrototypeOf(t,this),t}destroy(){const t=Me(this);if(t.destroyed)return;t.destroyed=!0;for(const r of t.children)r.destroy();t.children.clear();const n=Object.keys(this);for(let r=n.length-1;r>=0;r--){const i=n[r];if(t.refs.has(i))continue;const o=Object.getOwnPropertyDescriptor(this,i);o?.value!=null&&typeof o.value=="object"&&o.value.destroy?.()}t.cleanup.flush(),t.parent&&Me(t.parent).children.delete(this)}resolve(t,n){const r=Me(this);if(r.destroyed)throw new Error(`AG Charts - DynamicContext: cannot resolve '${t}' on a destroyed context.`);if(r.resolving.has(t))throw new Error(`AG Charts - DynamicContext: circular dependency detected while resolving '${t}'.`);r.resolving.add(t);try{return n(r.self)}finally{r.resolving.delete(t)}}assertNotDestroyed(){if(Me(this).destroyed)throw new Error("AG Charts - DynamicContext: cannot register on a destroyed context.")}};function Ul(){return new jl}function K(e,t,n){return Math.min(n,Math.max(e,t))}function Bl(e,t,n=1e-10){return e>=t[0]-n&&e<=t[1]+n}function vr(e,t,n=1e-10){return e===t||Math.abs(e-t)<n}function Hl(e){return Math.sign(e)===-1||Object.is(e,-0)}function Wl(e){return e%1===0}function wr(e,t=2){const n=10**t;return Math.round(e*n)/n}function Vl(e,t=2){const n=10**t;return Math.ceil(e*n)/n}function Kl(e,t){return Math.floor(e%t+(e<0?Math.abs(t):0))}function fo(e){if(Math.floor(e)===e)return 0;let t=String(e),n=0;if(e<1e-6||e>=1e21){let i;[t,i]=t.split("e"),i!=null&&(n=Number(i))}const r=t.split(".")[1]?.length??0;return Math.max(r-n,0)}function zl(e,t){for(let n=t+1;n<e.length;n++)if(e[n]?.stop!=null)return n;return e.length-1}function ho(e,t,n,r){const i=new Array(e.length);let o=0,s=-1;for(let a=0;a<e.length;a++){a>=s&&(s=zl(e,a));const l=e[a]?.stop;if(l==null){const c=e[o]?.stop,u=e[s]?.stop,f=c??t,h=u??n,d=r&&c==null?1:0;i[a]=f+(h-f)*(a-o+d)/(s-o+d)}else i[a]=l,o=a}return i}function go(e,t,n,r){if(e.name!=null)return e.name;const i=t===n.length-1;return Number.isInteger(e.start)&&Number.isInteger(e.end)&&!i&&e.end-e.start>=1?`${r(e.start,0)}\u2013${r(e.end-1,0)}`:`${r(e.start)}\u2013${r(e.end)}`}function ql(e,t,n){if(e.length===0)return{domain:[],range:[],bins:[]};const[r,i]=t,o=n==="discrete",s=ho(e,r,i,o),a=e.map(l=>l.color);return o?Yl(s,a,e,r,i):{domain:s,range:a,bins:[]}}function Yl(e,t,n,r,i){const o=[],s=[],a=[];for(let l=0;l<n.length;l++){const c=l===0?r:e[l-1],u=e[l],f=K(r,c,i),h=Math.max(f,K(r,u,i));o.push(f),s.push(t[l]),a.push({start:f,end:h,color:t[l],name:n[l].name})}return o.push(a.at(-1).end),{domain:o,range:s,bins:a}}function Xl(e){const{domain:t,range:n,mode:r,displayDomain:i}=e;if(n.length===0)return[];const[o,s]=i??[t[0],t.at(-1)],a=s-o||1;if(r==="discrete"){const l=[];for(let c=0;c<n.length;c++){const u=K(0,(t[c]-o)/a,1),f=K(0,(t[c+1]-o)/a,1);f<u||(l.push({stop:u,color:n[c]}),f>u&&l.push({stop:f,color:n[c]}))}return l}if(t.length<n.length){const l=Math.max(n.length-1,1);return n.map((c,u)=>({stop:u/l,color:c}))}return t.map((l,c)=>({stop:(l-o)/a,color:n[c]}))}function po(e,t,n,r,i){return go({start:e,end:t,color:""},n,{length:r},i)}function Jl(e,t,n,r){const{domain:i,range:o,mode:s}=e;if(s!=="discrete"||o.length===0)return;let a=0;for(;a<o.length-1&&n>=i[a+1];)a++;return t[a]?.name??po(i[a],i[a+1],a,o.length,r)}function Ql(e){return e.flatMap((t,n)=>{const{stop:r}=t,i=e.at(n+1)?.color;return i==null?[t]:[t,{stop:r,color:i}]})}var Zl=void 0,ec=void 0,tc=void 0,nc=void 0,rc=void 0,ic=void 0,oc=void 0,sc=void 0,Rt="\u2026",dn=/\r?\n/g,_t="\u200B",yo=/[\s.,;:-]{1,5}$/,Pt;function mo(e){if(Pt==null){const n=cn("Option");Pt=new n().style}Pt.color=e;const t=Pt.color||null;return Pt.color="",t}function bo(e){return e?.ownerDocument.defaultView?.getComputedStyle(e).direction==="rtl"}function ac(e,t){if(!e)return;const{x:n,y:r,width:i,height:o}=hc(t);gn(e.style,"width",i),gn(e.style,"height",o),gn(e.style,"left",n),gn(e.style,"top",r)}function lc(e){const t=Number.parseFloat(e.style.width),n=Number.parseFloat(e.style.height),r=Number.parseFloat(e.style.left),i=Number.parseFloat(e.style.top),o=Number.isFinite(t)?t:e.offsetWidth,s=Number.isFinite(n)?n:e.offsetHeight,a=Number.isFinite(r)?r:e.offsetLeft,l=Number.isFinite(i)?i:e.offsetTop;return{x:a,y:l,width:o,height:s}}function cc(e){if(e.focus({preventScroll:!0}),e.lastChild?.textContent==null)return;const{ownerDocument:t}=e,n=t.createRange();n.setStart(e.lastChild,e.lastChild.textContent.length),n.setEnd(e.lastChild,e.lastChild.textContent.length);const r=t.defaultView?.getSelection();r?.removeAllRanges(),r?.addRange(n)}function uc(){const e=cn("navigator");if("scheduling"in e){const t=e.scheduling;if("isInputPending"in t)return t.isInputPending({includeContinuous:!0})}return!1}function fc(e){return`ag-charts-icon ag-charts-icon-${e}`}function hc(e){let{x:t,y:n,width:r,height:i}=e;return(r==null||r>0)&&(i==null||i>0)?e:(t!=null&&r!=null&&r<0&&(r=-r,t=t-r),n!=null&&i!=null&&i<0&&(i=-i,n=n-i),{x:t,y:n,width:r,height:i})}function gn(e,t,n){n==null?e.removeProperty(t):e.setProperty(t,`${n}px`)}function pn(e){return e!=null}function R(e){return Array.isArray(e)}function vo(e){return typeof e=="boolean"}function Ve(e){return e instanceof Date}function yn(e){return Ve(e)&&!Number.isNaN(Number(e))}function wo(e){return e instanceof RegExp}function we(e){return typeof e=="function"}function Y(e){return typeof e=="object"&&e!==null&&!R(e)}function dc(e){return R(e)||z(e)}function z(e){return typeof e=="object"&&e!==null&&e.constructor?.name==="Object"}function gc(e){if(typeof e!="object"||e===null)return!1;for(const t in e)return!1;return!0}function De(e){return typeof e=="string"}function ht(e){return typeof e=="number"}function xe(e){return Number.isFinite(e)}function xr(e){return e!=null&&e.nodeType===1&&"style"in e}function pc(e,t){return De(t)&&Object.keys(e).includes(t)}function yc(e,t){return Object.values(e).includes(t)}function mc(e){return typeof e=="symbol"}function xo(e){return De(e)&&(e==="none"||mo(e)!=null)}function bc(e,t){return e in t}function Eo({fontSize:e,fontStyle:t,fontWeight:n,fontFamily:r}){let i="";return t&&t!=="normal"&&(i+=`${t} `),n&&n!=="normal"&&n!==400&&(i+=`${n===700?"bold":n} `),i+=`${e}px`,i+=` ${r}`,i}function vc(e,t=1.15){return Math.round(e*t)}function Ke(e){return String(e??"")}function wc(e){return ht(e)||Ve(e)?Ke(e):e}function Er(e){return Sr(e.replace(yo,""))+Rt}var xc=new Set([1575,1577,1583,1584,1585,1586,1608]);function Ec(e){return e>=1568&&e<=1610&&!xc.has(e)}function Sr(e){if(!e)return e;const t=e.codePointAt(e.length-1);return Ec(t)?e+"\u200D":e}function So(e){return _t+e+_t}function Ao(e){return e.replaceAll(_t,"")}function Sc(e){return R(e)?Oo(e.at(-1)):Gt(Ke(e))}function Gt(e){return e.endsWith(Rt)}function Oo(e){return Ke(e?.text).endsWith(Rt)}var To=typeof Intl<"u"&&typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function Fe(e){return To?Array.from(To.segment(e),t=>t.segment):Array.from(e)}function dt(e,t="and",n=String,r=1/0){if(e.length===0)return"";if(e.length===1)return n(e[0]);e=e.map(n);const i=e.pop();if(e.length>=r){const o=e.length-(r-1);return`${e.slice(0,r-1).join(", ")}, and ${o} more ${t} ${i}`}return`${e.join(", ")} ${t} ${i}`}function jt(e,t=1/0){if(typeof e=="number"){if(Number.isNaN(e))return"NaN";if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity"}const n=JSON.stringify(e)??typeof e;return n.length>t?`${n.slice(0,t)}... (+${n.length-t} characters)`:n}function Ac(e){let t=1;for(let n=0;n<e.length;n++)e.codePointAt(n)===10&&t++;return t}function Mo(e,t){if(e===t)return 0;const[n,r]=e.length<t.length?[e,t]:[t,e],i=n.length,o=r.length;let s=new Array(i+1).fill(0).map((l,c)=>c),a=new Array(i+1);for(let l=1;l<=o;l++){a[0]=l;for(let c=1;c<=i;c++){const u=r[l-1]===n[c-1]?0:1;a[c]=Math.min(s[c]+1,a[c-1]+1,s[c-1]+u)}[s,a]=[a,s]}return s[i]}function Oc(e){return e.replaceAll(Tc,(t,n)=>(n>0?"-":"")+t.toLowerCase())}var Tc=/[A-Z]+(?![a-z])|[A-Z]/g;function Mc(e,t=""){return e==null?t:R(e)?e.map(n=>Ke(n.text)).join(""):De(e)?e:String(e)}function Dc(e,t=0,n){const{leading:r=!1,trailing:i=!0,maxWait:o=1/0}=n??{};let s,a;if(o<t)throw new Error("Value of maxWait cannot be lower than waitMs.");function l(...c){if(r&&!a){a=Date.now(),s=setTimeout(()=>a=null,t),e(...c);return}let u=t;if(o!==1/0&&a){const f=Date.now()-a;t>o-f&&(u=o-f)}clearTimeout(s),a??(a=Date.now()),s=setTimeout(()=>{a=null,i&&e(...c)},u)}return Object.assign(l,{cancel(){clearTimeout(s),a=null}})}function Fc(e,t,n){const{leading:r=!0,trailing:i=!0}=n??{};let o,s,a=!1;function l(){i&&s?(o=setTimeout(l,t),e(...s)):a=!1,s=null}function c(...u){a?s=u:(a=!0,o=setTimeout(l,t),r?e(...u):s=u)}return Object.assign(c,{cancel(){clearTimeout(o),a=!1,s=null}})}function Ar(e,t,n=""){try{return e(...t)}catch(r){const i=n?` \`${n}\``:"";te(`Uncaught exception in user callback${i}`,r)}}var Z=Symbol("description"),Or=Symbol("required"),mn=Symbol("marked"),bn=Symbol("undocumented"),Do=Symbol("enterprise"),$c=Symbol("deprecated"),vn=Symbol("union"),kc=[["placement","position"],["padding","spacing","gap"],["color","fill","stroke"],["whisker","wick"],["src","url"],["width","thickness"],["show","visible","enabled"]].reduce((e,t)=>{for(const n of t)e.set(n.toLowerCase(),new Set(t.filter(r=>r!==n)));return e},new Map),Fo=(e=>(e.Enterprise="enterprise",e.Invalid="invalid",e.Required="required",e.Unknown="unknown",e))(Fo||{});function Ut(e,t){return xe(t)?`${e}[${t}]`:e?`${e}.${t}`:t}var Ce=class{constructor(e,t,n,r,i){this.type=e,this.description=t,this.value=n,this.path=r,this.key=i}setUnionType(e,t){if(this.path.startsWith(t)){const n=this.path.slice(t.length);this.altPath=`${t}[type=${e}]${n}`}}getPrefix(){const{altPath:e=this.path,key:t}=this;return!e&&!t?"Value":`Option \`${t?Ut(e,t):e}\``}toString(){const{description:e="unknown",type:t,value:n}=this;return t==="required"&&n==null?`${this.getPrefix()} is required and has not been provided; expecting ${e}, ignoring.`:t==="enterprise"?`${this.getPrefix()} is an AG Charts Enterprise feature; ignoring.`:`${this.getPrefix()} cannot be set to \`${jt(n,50)}\`; expecting ${e}, ignoring.`}},Tr=class extends Ce{constructor(e,t,n,r){super("unknown",void 0,t,n,r),this.suggestions=e,this.key=r}getPrefix(){return`Unknown option \`${Ut(this.altPath??this.path,this.key)}\``}getPostfix(){const e=dt(Cc(this.key,this.suggestions),"or",t=>`\`${t}\``);return e?`; Did you mean ${e}? Ignoring.`:", ignoring."}toString(){return`${this.getPrefix()}${this.getPostfix()}`}};function ze(e,t,n="",r={}){if(!Y(e))return{cleared:null,invalid:[new Ce("required","an object",e,n)]};const i={},o=[],s=new Set(Object.keys(e)),a=[];if(vn in t){const l=Object.keys(t),c=t[vn];if(e.type!=null&&l.includes(e.type)||e.type==null&&c!=null){const{type:u=c,...f}=e,h=ze(f,t[u],n,r);Object.assign(i,{type:u},h.cleared);for(const d of h.invalid)d.setUnionType(u,n);o.push(...h.invalid)}else{const u=dt(l,"or",f=>`'${f}'`);o.push(new Ce("required",`a keyword such as ${u}`,e.type,n,"type"))}return{cleared:i,invalid:o}}for(const l of Object.keys(t)){const c=t[l],u=c[Or],f=e[l];if(s.delete(l),f===void 0&&(c[bn]||a.push(l),!u))continue;const h=Ut(n,l);if(we(c)){const d={options:e,path:h,silentAdvisories:r.silentAdvisories},g=c(f,d);if(typeof g=="object"){if(o.push(...g.invalid),g.valid){i[l]=g.cleared;continue}else if(Sn(g.invalid,h))continue}else if(g){i[l]=f;continue}o.push(new Ce(u?"required":"invalid",c[Z],f,n,l))}else{const d=ze(f,c,h,r);d.cleared!=null&&(i[l]=d.cleared),o.push(...d.invalid)}}for(const l of s){const c=e[l];c!==void 0&&o.push(new Tr(a,c,n,l))}return{cleared:i,invalid:o}}function Cc(e,t,n=2){const r=e.toLowerCase(),i=kc.get(r);return t.filter(o=>{const s=o.toLowerCase();return i?.has(o)===!0||s.includes(r)||Mo(r,s)<=n})}function k(e,t){if(we(e)){let r=function(i,o){return e(i,o)};var n=r;return r[Z]=t,r}else return{...e,[Z]:t}}function A(e){if(e[Do])throw new Error("`required()` cannot wrap an `enterprise()` validator; enterprise options must remain optional.");return Object.assign(we(e)?(t,n)=>e(t,n):U(e),{[Or]:!0,[Z]:e[Z]})}function F(e){return Object.assign(we(e)?(t,n)=>e(t,n):U(e),{[bn]:!0,[Z]:e[Z]})}function Lc(e){if(e[Or])throw new Error("`enterprise()` cannot wrap a `required()` validator; enterprise options must remain optional.");const t=we(e)?e:U(e),n=e[Z];return Object.assign((i,o)=>i!==void 0&&!lo()?(te(new Ce("enterprise",n,i,o.path).toString()),{valid:!0,cleared:null,invalid:[]}):t(i,o),{[Do]:!0,[Z]:n})}function Ic(e,t){const n=we(e)?e:U(e),r=e[Z];return Object.assign((o,s)=>(o!==void 0&&!s.silentAdvisories&&te(`Option \`${s.path}\` is deprecated. ${t}`),n(o,s)),{[$c]:t,[Z]:r})}var U=(e,t="an object",n=!1)=>k((r,i)=>{const o=ze(r,e,i.path,{silentAdvisories:i.silentAdvisories}),s=!Sn(o.invalid,i.path);return{valid:s,cleared:s||!n?o.cleared:null,invalid:o.invalid}},t),Mr=(e,t,n)=>({...e,[Z]:t,[vn]:n}),ce=(...e)=>k((t,n)=>{const r=[];for(const i of e){const o=i(t,n);if(typeof o=="object"){if(r.push(...o.invalid),!o.valid)return{valid:!1,cleared:t,invalid:r};t=o.cleared}else if(!o)return!1}return{valid:!0,cleared:t,invalid:r}},dt(e.filter(t=>!t[bn]).map(t=>t[Z]).filter(pn),"and")),_=(...e)=>k((t,n)=>{for(const r of e){const i=r(t,n);if(typeof i=="object"?i.valid:i)return i}return!1},dt(e.filter(t=>!t[bn]).map(t=>t[Z]).filter(pn),"or")),gt=e=>xe(e)||yn(e),Nc=e=>Ve(e)||(xe(e)||De(e))&&yn(new Date(e)),Dr=k(R,"an array"),v=k(vo,"a boolean"),I=k(we,"a function"),D=k(xo,"a color string"),Le=k(Nc,"a date"),se=k(pn,"a defined value"),m=k(xe,"a number"),$o=k(Y,"an object"),O=k(De,"a string"),ko=k(xr,"an html element"),qe=(e,t=1/0)=>{let n;return t===1/0?n=`an array of at least ${e} items`:e===t?n=`an array of exactly ${e} items`:e===0?n=`an array of no more than ${t} items`:n=`an array of at least ${e} and no more than ${t} items`,k(r=>R(r)&&r.length>=e&&r.length<=t,n)},Fr=(e,t=1/0)=>{let n;return t===1/0?n=`a string of at least ${e} characters`:e===t?n=`an string of exactly ${e} characters`:e===0?n=`an string of no more than ${t} characters`:n=`an string of at least ${e} and no more than ${t} characters`,k(r=>De(r)&&r.length>=e&&r.length<=t,n)},$r=(e,t=!0)=>k(n=>xe(n)&&(n>e||t&&n===e),`a number greater than ${t?"or equal to ":""}${e}`),Co=(e,t)=>k(n=>xe(n)&&n>=e&&n<=t,`a number between ${e} and ${t} inclusive`),y=$r(0),Lo=$r(0,!1),L=Co(0,1),wn=e=>k((t,{options:n})=>!gt(t)||!gt(n[e])||t<n[e],`the value to be less than \`${e}\``),Rc=e=>k((t,{options:n})=>!gt(t)||!gt(n[e])||t<=n[e],`the value to be less than or equal to \`${e}\``),xn=e=>k((t,{options:n})=>!gt(t)||!gt(n[e])||t>n[e],`the value to be greater than \`${e}\``);function x(...e){Y(e[0])&&(e=Object.values(e[0]));const t=dt(e,"or",n=>`'${n}'`);return k(n=>e.includes(n),`a keyword such as ${t}`)}function kr(){return x}var Ye=e=>k(t=>e===t,`the value ${JSON.stringify(e)}`),_c=(e,t)=>k(n=>n instanceof e,t??`an instance of ${e.name}`),q=(e,t,n=!0)=>k((r,i)=>{if(!R(r))return!1;let o=n;const s=[],a=[],l=c=>{o=n?o&&c:o||c};if(r.length===0)return{valid:!0,cleared:s,invalid:a};for(let c=0;c<r.length;c++){const u=r[c],f=e(u,{options:u,path:`${i.path}[${c}]`});typeof f=="object"?(l(f.valid),a.push(...f.invalid),f.cleared!=null&&s.push(f.cleared)):(l(f),f&&s.push(u))}return{valid:o,cleared:o||!n?s:null,invalid:a}},t??`${e[Z]} array`),Ie=(e,t="an object array")=>k((n,r)=>{if(!R(n))return!1;const i=[],o=[];for(let s=0;s<n.length;s++){const a=`${r.path}[${s}]`,l=ze(n[s],e,a);Sn(l.invalid,a)||i.push(l.cleared),o.push(...l.invalid)}return{valid:!0,cleared:i,invalid:o}},t),Ne=(e,t)=>k((n,r)=>{if(!we(n))return!1;if(mn in n)return!0;const i=t??e[Z];return{valid:!0,cleared:Object.assign((...s)=>{const a=Ar(n,s);if(a==null)return;const l=e(a,{options:a,path:""});if(typeof l=="object"){if(Io(l,r,i,a),l.valid)return l.cleared}else{if(l)return a;te(`Callback \`${r.path}\` returned an invalid value \`${jt(a,50)}\`; expecting ${i}, ignoring.`)}},{[mn]:!0}),invalid:[]}},"a function"),En=(e,t="an object")=>k((n,r)=>{if(!we(n))return!1;if(mn in n)return!0;const i=t;return{valid:!0,cleared:Object.assign((...s)=>{const a=Ar(n,s,r.path);if(a==null)return;const l=ze(a,e);return Io(l,r,i,a),l.cleared},{[mn]:!0}),invalid:[]}},"a function");function Sn(e,t){return e.some(n=>n.type==="required"&&n.path===t)}function Io(e,t,n,r){if(e.invalid.length!==0){if(R(r)){const i=n??e.invalid[0]?.description??"a valid value";return te(`Callback \`${t.path}\` returned an invalid value \`${jt(r,50)}\`; expecting ${i}, ignoring.`)}for(const i of e.invalid){if(i instanceof Tr)return te(`Callback \`${t.path}\` returned an unknown property \`${Ut(i.path,i.key)}\`${i.getPostfix()}`);const o=jt(i.value,50);te(i.key?`Callback \`${t.path}\` returned an invalid property \`${Ut(i.path,i.key)}\`: \`${o}\`; expecting ${i.description}, ignoring.`:`Callback \`${t.path}\` returned an invalid value \`${o}\`; expecting ${n??i.description}, ignoring.`)}}}var No=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,Ro=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/;function _o(e){if(!De(e))return!1;const t=Ro.exec(e);return No.test(t?t[2]:e)}function Cr(e){let t,n;const r=Ro.exec(e);r&&([,t,e,n]=r);const i=No.exec(e);if(!i){te(`The number formatter is invalid: ${e}`);return}const[,o,s,a,l,c,u,f,h,d,g]=i;return{fill:o,align:s,sign:a,symbol:l,zero:c,width:Number.parseInt(u),comma:f,precision:Number.parseInt(h),trim:!!d,type:g,prefix:t,suffix:n}}function Po(e){const t=typeof e=="string"?Cr(e):e;if(t==null)return;const{fill:n,align:r,sign:i="-",symbol:o,zero:s,width:a,comma:l,type:c,prefix:u="",suffix:f="",precision:h}=t;let{trim:d}=t;const g=h==null||Number.isNaN(h);let p;if(!c)p=ye.g,d=!0;else if(c in ye&&c in pt)p=g?pt[c]:ye[c];else if(c in ye)p=ye[c];else if(c in pt)p=pt[c];else throw new Error(`The number formatter type is invalid: ${c}`);const b=c?6:12;let w;g||(w=h);let E=r,S=n;return s&&(S??(S="0"),E??(E="=")),(M,H)=>{let N;w!=null?N=w:c==="f"||c==="%"?N=H??b:c?N=b:N=H??b;let T=p(M,N);d&&(T=jc(T)),l&&(T=Uc(T,l));const V=Vc(o,c),$e=V?.length??0;V&&(T=`${V}${T}`),c==="s"&&(T=`${T}${Bc(M)}`),(c==="%"||c==="p")&&(T=`${T}%`);const{value:He,prefixLength:ke}=Hc(M,T,i),We=ke+$e;let ge=He;return a!=null&&!Number.isNaN(a)&&(ge=Wc(ge,a,S??" ",E,We)),ge=`${u}${ge}${f}`,ge}}var pt={b:e=>An(e).toString(2),c:e=>String.fromCodePoint(e),d:e=>Math.round(Math.abs(e)).toFixed(0),o:e=>An(e).toString(8),x:e=>An(e).toString(16),X:e=>pt.x(e).toUpperCase(),n:e=>pt.d(e),"%":e=>`${An(e*100).toFixed(0)}`},ye={e:(e,t)=>Math.abs(e).toExponential(t),E:(e,t)=>ye.e(e,t).toUpperCase(),f:(e,t)=>Math.abs(e).toFixed(t),F:(e,t)=>ye.f(e,t).toUpperCase(),g:(e,t)=>{if(e===0)return"0";const n=Math.abs(e),r=Math.floor(Math.log10(n));return r>=-4&&r<t?n.toFixed(t-1-r):n.toExponential(t-1)},G:(e,t)=>ye.g(e,t).toUpperCase(),n:(e,t)=>ye.g(e,t),p:(e,t)=>ye.r(e*100,t),r:(e,t)=>{if(e===0)return"0";const n=Math.abs(e),i=Math.floor(Math.log10(n))-(t-1);if(i<=0)return n.toFixed(-i);const o=10**i;return(Math.round(n/o)*o).toFixed()},s:(e,t)=>{const n=Uo(e);return ye.r(e/10**n,t)},"%":(e,t)=>ye.f(e*100,t)},Go=-24,jo=24,Pc={[Go]:"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",[jo]:"Y"},Gc="\u2212";function An(e){return Math.floor(Math.abs(e))}function jc(e){if(!e.endsWith("0")||!e.includes("."))return e;let t=e.length-1;for(;t>0;)if(e[t]=="0")t-=1;else if(e[t]=="."){t-=1;break}else break;return e.substring(0,t+1)}function Uc(e,t){let n=e.indexOf(".");n<0&&(n=e.length);const r=e.substring(0,n).split(""),i=e.substring(n);for(let o=r.length-3;o>0;o-=3)r.splice(o,0,t);return`${r.join("")}${i}`}function Bc(e){return Pc[Uo(e)]}function Uo(e){return K(Go,e?Math.floor(Math.log10(Math.abs(e))/3)*3:0,jo)}function Hc(e,t,n=""){if(n==="(")return e>=0?{value:t,prefixLength:0}:{value:`(${t})`,prefixLength:1};let r="";return e<0?r=Gc:n==="+"?r="+":n===" "&&(r=" "),{value:`${r}${t}`,prefixLength:r.length}}function Wc(e,t,n=" ",r=">",i=0){const o=t-e.length;if(o<=0)return e;const s=n.repeat(o);if(r==="="){const a=Math.min(Math.max(i,0),e.length),l=e.slice(0,a),c=e.slice(a);return`${l}${s}${c}`}if(r===">"||!r)return s+e;if(r==="<")return`${e}${s}`;if(r==="^"){const a=Math.ceil(o/2),l=Math.floor(o/2);return`${n.repeat(a)}${e}${n.repeat(l)}`}return s+e}function Vc(e,t){if(e==="#")switch(t){case"b":return"0b";case"o":return"0o";case"x":return"0x";case"X":return"0X";default:return""}return e??""}var Bo=e=>{if(!Y(e))return!1;const t=Object.keys(e);return t.length===1&&t[0].startsWith("$")},Kc=U({color:D,stop:L},""),On=k(e=>{let t=-1/0;for(const n of e)if(n?.stop!=null){if(n.stop<t)return!1;t=n.stop}return!0},"colour stops to be defined in ascending order"),Tn=ce(qe(2),q(Kc),On),zc=U({color:A(D),stop:m,name:O},"a color scale color stop"),qc=U({fills:ce(qe(2),q(zc),On),domain:ce(qe(2),q(m),k(e=>e[0]<=e[1],"domain to be in ascending order")),mode:x("continuous","discrete"),missingDataFill:D},"a colour scale configuration"),Lr=x("axis","item","series"),Yc={type:A(Ye("gradient")),colorStops:A(Tn),rotation:m,gradient:F(x("linear","radial","conic")),bounds:F(Lr),reverse:F(v),colorSpace:F(x("rgb","oklch"))},Xc=U(Yc,"a gradient object with colour stops"),$={stroke:D,strokeWidth:y,strokeOpacity:L},Ho=U({type:A(Ye("gradient")),gradient:A(x("linear","radial","conic")),bounds:A(Lr),colorStops:A(_(Tn,ce(qe(2),q(D)))),rotation:A(m),reverse:A(v),colorSpace:A(x("rgb","oklch"))}),Wo=U({type:A(Ye("pattern")),pattern:A(x("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),path:Fr(2),width:A(y),height:A(y),fill:A(D),fillOpacity:A(L),backgroundFill:A(D),backgroundFillOpacity:A(L),padding:A(y),rotation:A(m),scale:A(y),stroke:A(D),strokeWidth:A(y),strokeOpacity:A(L)}),Vo=U({type:A(Ye("image")),url:O,width:y,height:y,rotation:A(m),backgroundFill:A(D),backgroundFillOpacity:L,fit:A(x("stretch","contain","cover")),repeat:A(x("repeat","repeat-x","repeat-y","no-repeat"))}),Jc={gradient:{colorStops:Tn,rotation:m,gradient:F(x("linear","radial","conic")),bounds:F(Lr),reverse:F(v),colorSpace:F(x("rgb","oklch"))},pattern:{pattern:x("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),path:Fr(2),width:y,height:y,rotation:m,scale:y,fill:D,fillOpacity:L,backgroundFill:D,backgroundFillOpacity:L,...$,padding:F(y)},image:{url:A(O),backgroundFill:D,backgroundFillOpacity:L,width:y,height:y,fit:x("stretch","contain","cover","none"),repeat:x("repeat","repeat-x","repeat-y","no-repeat"),rotation:m}},Qc=Mr(Jc,"a color object"),Mn=_(D,U(Qc,"a color object")),B={fill:Mn,fillOpacity:L};B.fillGradientDefaults=F(Ho),B.fillPatternDefaults=F(Wo),B.fillImageDefaults=F(Vo);var ue={fill:D,fillOpacity:L},W={lineDash:q(y),lineDashOffset:m},Zc={...B,...$,...W,opacity:L,cornerRadius:y},eu={...$,...W,opacity:L},Ir={...B,...$,...W,opacity:L},Ko=Ir,zo=kr()("any","all");function qo(e){return{enabled:v,range:x("tooltip","node"),highlightedItem:e,unhighlightedItem:e}}function Yo(e){return{enabled:v,containment:zo,selectedItem:e,unselectedItem:e,unselectedSeries:e}}function tu(e,t){return{enabled:v,range:x("tooltip","node"),highlightedItem:e,unhighlightedItem:e,highlightedSeries:t,unhighlightedSeries:t,bringToFront:v}}var Xo={start:se,stop:se,...$,...B,...W},Jo={start:se,stop:se,...$,...W},nu=U({enabled:v,key:A(x("x","y")),segments:Ie(Xo,"path segments array")},"a segmentation object",!0),ru=U({enabled:v,key:A(x("x","y")),segments:Ie(Jo,"path segments array")},"a segmentation object",!0),Nr=U({googleFont:O},"google font"),Qo=_(O,Bo,Nr,q(_(O,Nr))),Zo=_(y,x("normal","bold","bolder","lighter")),fe={color:D,fontFamily:Qo,fontSize:y,fontStyle:x("normal","italic","oblique"),fontWeight:Zo},Dn=x("never","always","hyphenate","on-space"),iu=x("left","center","right"),es=x("ellipsis","hide"),ts=U({top:m,right:m,bottom:m,left:m},"padding object"),Re=_(m,ts),Bt={enabled:v,stroke:D,strokeWidth:y,strokeOpacity:L},Rr={border:Bt,cornerRadius:m,padding:Re,...B},_r=["top","top-right","top-left","bottom","bottom-right","bottom-left","right","right-top","right-bottom","left","left-top","left-bottom"],ou={floating:v,placement:x(..._r),xOffset:m,yOffset:m},Pr=k((e,t)=>{let n;if(typeof e=="string")_r.includes(e)?n=!0:(n={valid:!1,invalid:[],cleared:null},n.invalid.push(new Ce("invalid",`a legend placement string: ["${_r.join('", "')}"]`,e,t.path)));else{const{cleared:r,invalid:i}=ze(e,ou);n={valid:i.length===0,cleared:r,invalid:i}}return n},"a legend position object or placement string"),yt=_(x("circle","cross","diamond","heart","plus","pin","square","star","triangle"),I),Fn=x("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),$n=_(y,x("exact","nearest","area")),ns=_(y,x("exact","nearest")),mt=_(O,m,Le,Ie({text:A(O),...fe},"text segments array")),Ht={enabled:v,text:mt,textAlign:x("left","center","right"),wrapping:Dn,spacing:y,maxWidth:y,maxHeight:y,...fe,tooltip:{visible:x("auto","always","never"),text:O,renderer:Ne(_(O,m,Le))}};Ht.padding=F(y),Ht.truncate=F(v);var kn={enabled:v,text:mt,renderer:Ne(_(O,m,Le,ko))},Gr=["defaults","download","zoom-to-cursor","pan-to-cursor","reset-zoom","toggle-series-visibility","toggle-other-series","separator"],rs={type:x("action","separator"),showOn:x("always","series-area","series-node","legend-item"),label:A(O),enabled:v,action:I,items:(e,t)=>is(e,t)};rs.iconUrl=F(O);var su=U(rs),au=k((e,t)=>{let n;return typeof e=="string"?Gr.includes(e)?n=!0:(n={valid:!1,invalid:[],cleared:null},n.invalid.push(new Ce("invalid",`a context menu item string alias: ["${Gr.join('", "')}"]`,e,t.path))):n=su(e,t),n},`a context menu item object or string alias: [${Gr.join(", ")}]`),is=q(au,"a menu items array",!1),os={label:O,ariaLabel:O,tooltip:O,iconPosition:x("before","after"),icon:x("align-center","align-left","align-right","arrow-drawing","arrow-down-drawing","arrow-up-drawing","callout-annotation","candlestick-series","chevron-filled-down","chevron-right","close","comment-annotation","date-range-drawing","date-price-range-drawing","delete","disjoint-channel-drawing","drag-handle","fill-color","line-style-solid","line-style-dashed","line-style-dotted","high-low-series","hlc-series","hollow-candlestick-series","horizontal-line-drawing","line-color","line-series","line-with-markers-series","locked","measurer-drawing","note-annotation","ohlc-series","pan-end","pan-left","pan-right","pan-start","parallel-channel-drawing","position-bottom","position-center","position-top","price-label-annotation","price-range-drawing","reset","settings","step-line-series","text-annotation","trend-line-drawing","fibonacci-retracement-drawing","fibonacci-retracement-trend-based-drawing","unlocked","vertical-line-drawing","zoom-in","zoom-out")},Ee=_(O,Ne(mt)),ss=U({x:Ee,y:Ee,angle:Ee,radius:Ee,size:Ee,color:Ee,label:Ee,secondaryLabel:Ee,sectorLabel:Ee,calloutLabel:Ee,legendItem:Ee}),Wt=k(_o,"a valid number format string"),jr=x("millisecond","second","minute","hour","day","month","year"),as={unit:A(jr),step:Lo,epoch:Le,utc:v};as.every=I;var ls=U(as,"a time interval object"),Se={width:y,height:y,minWidth:y,minHeight:y,suppressFieldDotNotation:v,title:Ht,subtitle:Ht,footnote:Ht,padding:{top:y,right:y,bottom:y,left:y},seriesArea:{border:Bt,clip:v,cornerRadius:m,padding:Re},legend:{enabled:v,position:Pr,orientation:x("horizontal","vertical"),maxWidth:y,maxHeight:y,spacing:y,border:Bt,cornerRadius:m,padding:Re,fill:Mn,fillOpacity:L,preventHidingAll:v,reverseOrder:v,toggleSeries:v,item:{marker:{size:y,shape:yt,padding:y,strokeWidth:y},line:{length:y,strokeWidth:y},label:{maxLength:y,formatter:I,...fe},tooltip:{visible:x("auto","always","never"),text:O,renderer:I},maxWidth:y,paddingX:y,paddingY:y,showSeriesStroke:v},pagination:{marker:{size:y,shape:yt,padding:y},activeStyle:{...B,...$},inactiveStyle:{...B,...$},highlightStyle:{...B,...$},label:fe},listeners:{legendItemClick:I,legendItemDoubleClick:I}},gradientLegend:{enabled:v,position:Pr,spacing:y,reverseOrder:v,border:Bt,cornerRadius:m,padding:Re,fill:Mn,fillOpacity:L,gradient:{preferredLength:y,thickness:y},scale:{label:{...fe,minSpacing:y,format:Wt,formatter:I},padding:y,interval:{step:m,values:Dr,minSpacing:ce(y,wn("maxSpacing")),maxSpacing:ce(y,xn("minSpacing"))}}},listeners:{seriesNodeClick:I,seriesNodeDoubleClick:I,seriesVisibilityChange:I,activeChange:I,selectionChange:I,click:I,doubleClick:I,annotations:I,zoom:I},loadGoogleFonts:v,highlight:{drawingMode:x("overlay","cutout"),range:x("tooltip","node")},overlays:{loading:kn,noData:kn,noVisibleSeries:kn,unsupportedBrowser:kn},tooltip:{enabled:v,showArrow:v,pagination:v,delay:y,range:$n,wrapping:Dn,mode:x("single","shared","compact"),position:{anchorTo:x("pointer","node","chart"),placement:_(Fn,q(Fn)),xOffset:m,yOffset:m,offset:y}},animation:se,flashOnUpdate:se,contextMenu:se,context:()=>!0,dataSource:{getData:I},keyboard:{enabled:v,tabIndex:m,initialFocus:kr()("data-start","data-end","viewport-start","viewport-end")},touch:{dragAction:x("none","drag","hover")},selection:se,ranges:{enabled:v,enableOutOfRange:v,position:x("top-left","top","top-right","bottom-left","bottom","bottom-right"),spacing:y,button:{...ue,...$,textColor:D,...fe,cornerRadius:y,padding:Re,active:{...ue,stroke:$.stroke,textColor:D},disabled:{...ue,stroke:$.stroke,textColor:D},hover:{...ue,stroke:$.stroke,textColor:D}},dropdown:{visible:x("auto","always","never"),...ue,...$,textColor:D,...fe,cornerRadius:y,padding:Re,active:{...ue,stroke:$.stroke,textColor:D},disabled:{...ue,stroke:$.stroke,textColor:D},hover:{...ue,stroke:$.stroke,textColor:D}},gap:y,...ue,...$,textColor:D,...fe,cornerRadius:y,padding:Re,active:{...ue,stroke:$.stroke,textColor:D},disabled:{...ue,stroke:$.stroke,textColor:D},hover:{...ue,stroke:$.stroke,textColor:D},buttons:Ie({...os,enabled:v,value:_(m,ce(q(_(m,Le)),qe(2,2)),ls,jr,I)},"range button options array")},locale:{localeText:$o,getLocaleText:Ne(O)},background:{visible:v,fill:D,image:{url:A(O),top:m,right:m,bottom:m,left:m,width:y,height:y,opacity:L}},styleNonce:O,sync:se,zoom:se,scrollbar:se,formatter:_(Ne(mt),ss),enableRtl:v};Se.highlight.enabled=F(v),Se.dataSource.requestThrottle=F(y),Se.dataSource.updateThrottle=F(y),Se.dataSource.updateDuringInteraction=F(v),Se.statusBar=F(se),Se.ranges.minSize=F(y),Se.foreground=F({visible:v,text:O,image:{url:O,top:m,right:m,bottom:m,left:m,width:y,height:y,opacity:L},...B}),Se.overrideDevicePixelRatio=F(m),Se.sync.domainMode=F(x("direction","position","key")),Se.displayNullData=F(v);var Vt={cursor:O,context:()=>!0,showInLegend:v,nodeClickRange:$n,listeners:{seriesNodeClick:I,seriesNodeDoubleClick:I},highlight:qo(Ir),selection:Yo(Ko)};Vt.allowNullKeys=F(v);var Cn={...Vt,id:O,visible:v,context:()=>!0,data:Dr};Cn.seriesGrouping=F(se);var cs={shape:yt,size:y,...B,...$,...W},lu={enabled:v,itemStyler:En({...B,...$,...W,shape:yt,size:y}),...cs},Kt={enabled:v,formatter:Ne(mt),format:Wt,itemStyler:En({enabled:v,...Rr,...fe}),...Rr,...fe},Ln={...Kt,lineHeight:y,minimumFontSize:y,wrapping:Dn,overflowStrategy:es},us={visible:v,cap:{visible:v,length:y,lengthRatio:L,...$,...W},...$,...W},cu={...us,xLowerKey:O,xUpperKey:O,yLowerKey:O,yUpperKey:O,xLowerName:O,xUpperName:O,yLowerName:O,yUpperName:O,itemStyler:En({visible:v,...$,...W,cap:{visible:v,length:y,lengthRatio:L,...$,...W}})},In={enabled:v,showArrow:v,range:ns,renderer:Ne(_(O,m,Le,U({heading:O,title:O,symbol:{marker:{enabled:v,shape:yt,...B,stroke:D,strokeOpacity:L,strokeWidth:y,...W},line:{enabled:v,stroke:D,strokeWidth:y,strokeOpacity:L,...W}},data:Ie({label:A(O),value:A(_(O,m,Le))})},"tooltip renderer result object"))),position:{anchorTo:x("node","pointer","chart"),placement:_(Fn,q(Fn)),xOffset:m,yOffset:m,offset:y},interaction:{enabled:v}},uu={...In,range:$n},fu={enabled:v,xOffset:m,yOffset:m,blur:y,color:D},hu=Mr({linear:{},smooth:{tension:L},step:{position:x("start","middle","end")}},"interpolation line options"),Nn=Symbol("BREAK"),zt="__decorator_config",Rn="__decorator_accessors";function he(e,t){Ur(e,t).optional=!0}function Ur(e,t){if(Object.getOwnPropertyDescriptor(e,zt)==null&&Object.defineProperty(e,zt,{value:{}}),Object.getOwnPropertyDescriptor(e,Rn)==null){const f=Object.getPrototypeOf(e)?.[Rn]?.slice()??[];Object.defineProperty(e,Rn,{value:f})}const n=e[zt],r=t.toString();if(n[r]!=null)return n[r];n[r]={setters:[],getters:[],observers:[]};const i=Object.getOwnPropertyDescriptor(e,t);let o=i?.get,s=i?.set;if(o==null||s==null){const u=e[Rn];let f=u.indexOf(t);f===-1&&(f=u.push(t)-1),o??(o=function(){let h=this.__accessors;return h==null&&(h=u.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:h})),h[f]}),s??(s=function(h){let d=this.__accessors;d==null&&(d=u.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:d})),d[f]=h})}const a=n[r];return Object.defineProperty(e,t,{set:function(u){const f=a.setters,h=a.observers;let d;for(let g=0,p=f.length;g<p;g++)if(f[g].length>2){d=o.call(this);break}for(let g=0,p=f.length;g<p;g++)if(u=f[g](this,t,u,d),u===Nn)return;s.call(this,u);for(let g=0,p=h.length;g<p;g++)h[g](this,u,d)},get:function(){const u=o.call(this),f=a.getters;if(f.length===0)return u;let h=u;for(let d=0,g=f.length;d<g;d++)if(h=f[d](this,t,h),h===Nn)return;return h},enumerable:!0,configurable:!1}),n[r]}function _e(e,t,n){return(r,i)=>{const o=Ur(r,i);o.setters.push(e),t&&o.getters.unshift(t),n&&Object.assign(o,n)}}function Br(e){return(t,n)=>{Ur(t,n).observers.push(e)}}function _n(e){return e!==void 0&&zt in e}function Pe(e){const t=new Set;for(;_n(e);)t.add(e?.[zt]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(n=>Object.keys(n))}function fs(e){return Pe(e).reduce((t,n)=>(t[String(n)]=e[n]??null,t),{})}function*du(...e){for(const t of e)t!=null&&(t[Symbol.iterator]?yield*t:yield t)}function gu(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e?e:[e]}function pu(e){for(const t of e)return t;throw new Error("AG Charts - no first() value found")}function*qt(e){const t=[void 0,void 0];for(const n of Object.keys(e))t[0]=n,t[1]=e[n],yield t}function yu(e){return Object.keys(e)}function Hr(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every((n,r)=>Hr(n,t[r])):z(e)?z(t)?hs(e,t,Hr):!1:e===t}function hs(e,t,n){if(Object.is(e,t))return!0;for(const r of Object.keys(t))if(!(r in e))return!1;for(const r of Object.keys(e))if(!(r in t)||!n(e[r],t[r]))return!1;return!0}function Wr(...e){const t={};for(const n of e){if(!Y(n))continue;const r=_n(n)?Pe(n):Object.keys(n);for(const i of r)z(t[i])&&z(n[i])?t[i]=Wr(t[i],n[i]):t[i]??(t[i]=n[i])}return t}function Vr(...e){const t={};for(const n of e){if(!Y(n))continue;const r=_n(n)?Pe(n):Object.keys(n);for(const i of r)z(t[i])&&z(n[i])?t[i]=Vr(t[i],n[i]):i in t||(t[i]??(t[i]=n[i]))}return t}function mu(e,...t){return t&&R(e)?e.map(n=>Wr(n,...t)):e}function ds(e,t){const n={};for(const[r,i]of qt(e))n[r]=t(i,r,e);return n}function Yt(e,t){const n={...e};for(const r of t)delete n[r];return n}function bu(e,t){if(e==null)return;const n={};for(const r of t)Object.hasOwn(e,r)&&(n[r]=e[r]);return n}function vu(e,t){if(e==null)return!0;for(const[n,r]of qt(e))if(!t(n,r))return!1;return!0}function wu(e){const t={};if(e==null)return t;for(const[n,r]of e)t[n]=r;return t}function Kr(e,t){return(R(t)?t:t.split(".")).reduce((r,i)=>r[i],e)}var zr=new Set(["__proto__","constructor","prototype"]);function qr(e,t,n){const r=R(t)?t.slice():t.split("."),i=r.pop();if(r.some(s=>zr.has(s)))return;const o=r.reduce((s,a)=>s[a],e);return o[i]=n,o[i]}function xu(e,t,n){if(n===void 0)return t;for(const r of e){const i=n[r];i!==void 0&&(t[r]=i)}return t}function Eu(e,t,n){const r=n??Object.keys(t);for(let i=0,o=r.length;i<o;i++){const s=r[i],a=t[s];e[s]!==a&&(e[s]=a)}return e}function gs(e){if(e==null||typeof e!="object"||!z(e))return e;Object.freeze(e);for(const t of Object.getOwnPropertyNames(e)){const n=e[t];n!==null&&(typeof n=="object"||typeof n=="function")&&!Object.isFrozen(n)&&gs(n)}return e}function ps(e,t){return z(e)&&t in e}function Su(e,t){return ps(e,t)&&typeof e[t]=="string"}var Pn={fills:ce(qe(2),q(U({color:D,stop:m},"")),On),fillMode:x("continuous","discrete")},Yr={value:A(m),text:O,shape:_(x("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),I),placement:x("before","after","middle"),spacing:y,size:y,rotation:m,...B,...$,...W},Xr={value:A(m),text:O,shape:_(x("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),I),placement:x("inside","outside","middle"),spacing:y,size:y,rotation:m,label:{...Kt,spacing:y},...B,...$,...W},ys={...Yt(Vt,["listeners"]),direction:x("horizontal","vertical"),cornerMode:x("container","item"),cornerRadius:y,thickness:y,segmentation:{enabled:v,spacing:y,interval:{values:q(m),step:m,count:m}},bar:{enabled:v,thickness:y,thicknessRatio:L,...Pn,...B,...$,...W},label:{...Ln,text:O,spacing:y,avoidCollisions:v,placement:x("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:In},Xe={...Yt(Cn,["listeners"]),...ys,type:A(Ye("linear-gauge")),value:A(m),scale:{min:ce(m,wn("max")),max:ce(m,xn("min")),label:{enabled:v,formatter:I,rotation:m,spacing:y,minSpacing:y,placement:x("before","after"),avoidCollisions:v,format:Wt,...fe},interval:{values:q(m),step:m},...Pn,...B,...$,...W},targets:Ie(Yr,"target options array")};Xe.margin=F(m),Xe.defaultColorRange=F(q(D)),Xe.defaultTarget=F({...Yr,value:m,label:{...Kt,spacing:m}}),Xe.defaultScale=F(Xe.scale),Xe.scale.defaultFill=F(D);var ms={...Yt(Vt,["listeners"]),outerRadius:y,innerRadius:y,outerRadiusRatio:L,innerRadiusRatio:L,startAngle:m,endAngle:m,spacing:y,cornerMode:x("container","item"),cornerRadius:y,scale:{min:ce(m,wn("max")),max:ce(m,xn("min")),label:{enabled:v,formatter:I,rotation:m,spacing:y,minSpacing:y,avoidCollisions:v,format:Wt,...fe},interval:{values:q(m),step:m},...Pn,...B,...$,...W},segmentation:{enabled:v,spacing:y,interval:{values:q(m),step:m,count:m}},bar:{enabled:v,...Pn,...B,...$,...W},needle:{enabled:v,spacing:y,radiusRatio:L,...B,...$,...W},label:{text:O,spacing:y,...Ln},secondaryLabel:{text:O,...Ln},tooltip:In},Gn={...Yt(Cn,["listeners"]),...ms,type:A(Ye("radial-gauge")),value:A(m),targets:Ie(Xr,"target options array")};Gn.defaultColorRange=F(q(D)),Gn.defaultTarget=F({...Xr,value:m,label:{...Kt,spacing:m}}),Gn.scale.defaultFill=F(D);var bs=(e=>(e[e.SMALLEST=8]="SMALLEST",e[e.SMALLER=10]="SMALLER",e[e.SMALL=12]="SMALL",e[e.MEDIUM=13]="MEDIUM",e[e.LARGE=14]="LARGE",e[e.LARGEST=17]="LARGEST",e))(bs||{}),Je=12,Au={SMALLEST:8/Je,SMALLER:10/Je,SMALL:12/Je,MEDIUM:13/Je,LARGE:14/Je,LARGEST:17/Je},vs=(e=>(e.TOP="top",e.TOP_RIGHT="top-right",e.TOP_LEFT="top-left",e.RIGHT="right",e.RIGHT_TOP="right-top",e.RIGHT_BOTTOM="right-bottom",e.BOTTOM="bottom",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.LEFT="left",e.LEFT_TOP="left-top",e.LEFT_BOTTOM="left-bottom",e))(vs||{}),ws=(e=>(e.CATEGORY="category",e.GROUPED_CATEGORY="grouped-category",e.ORDINAL_TIME="ordinal-time",e.UNIT_TIME="unit-time",e.TIME="time",e.NUMBER="number",e.LOG="log",e))(ws||{}),xs=(e=>(e.ANGLE_CATEGORY="angle-category",e.ANGLE_NUMBER="angle-number",e.RADIUS_CATEGORY="radius-category",e.RADIUS_NUMBER="radius-number",e))(xs||{}),Es=(e=>(e.CIRCLE="circle",e.POLYGON="polygon",e))(Es||{}),Qe=(e,t,n)=>e*(1-n)+t*n,Jr=e=>{const t=e<0?-1:1,n=Math.abs(e);return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4},Qr=e=>{const t=e<0?-1:1,n=Math.abs(e);return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e},Ou=(()=>{var e=class C{constructor(n,r,i,o=1){this.r=K(0,n||0,1),this.g=K(0,r||0,1),this.b=K(0,i||0,1),this.a=K(0,o||0,1)}static validColorString(n){return n.includes("#")?!!C.parseHex(n):n.includes("rgb")?!!C.stringToRgba(n):C.nameToHex.has(n.toLowerCase())}static fromString(n){if(n.includes("#"))return C.fromHexString(n);const r=C.nameToHex.get(n.toLowerCase());if(r)return C.fromHexString(r);if(n.includes("rgb"))return C.fromRgbaString(n);throw new Error(`Invalid color string: '${n}'`)}static parseHex(n){n=n.replaceAll(" ","").slice(1);let r;switch(n.length){case 6:case 8:r=[];for(let i=0;i<n.length;i+=2)r.push(Number.parseInt(`${n[i]}${n[i+1]}`,16));break;case 3:case 4:r=n.split("").map(i=>Number.parseInt(i,16)).map(i=>i+i*16);break}if(r?.length>=3&&r.every(i=>i>=0))return r.length===3&&r.push(255),r}static fromHexString(n){const r=C.parseHex(n);if(r){const[i,o,s,a]=r;return new C(i/255,o/255,s/255,a/255)}throw new Error(`Malformed hexadecimal color string: '${n}'`)}static stringToRgba(n){let r=-1,i=-1;for(let l=0;l<n.length;l++){const c=n[l];if(r===-1&&c==="(")r=l;else if(c===")"){i=l;break}}if(r===-1||i===-1)return;const s=n.substring(r+1,i).split(","),a=[];for(let l=0;l<s.length;l++){const c=s[l];let u=Number.parseFloat(c);if(!Number.isFinite(u))return;c.includes("%")?(u=K(0,u,100),u/=100):l===3?u=K(0,u,1):(u=K(0,u,255),u/=255),a.push(u)}return a}static fromRgbaString(n){const r=C.stringToRgba(n);if(r){if(r.length===3)return new C(r[0],r[1],r[2]);if(r.length===4)return new C(r[0],r[1],r[2],r[3])}throw new Error(`Malformed rgb/rgba color string: '${n}'`)}static fromArray(n){if(n.length===4)return new C(n[0],n[1],n[2],n[3]);if(n.length===3)return new C(n[0],n[1],n[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(n,r,i,o=1){const s=C.HSBtoRGB(n,r,i);return new C(s[0],s[1],s[2],o)}static fromHSL(n,r,i,o=1){const s=C.HSLtoRGB(n,r,i);return new C(s[0],s