UNPKG

ag-charts-community

Version:

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

1 lines 730 kB
var kb=Object.defineProperty,Lb=Object.getOwnPropertyDescriptor,m=(e,t,i,s)=>{for(var n=s>1?void 0:s?Lb(t,i):t,a=e.length-1,r;a>=0;a--)(r=e[a])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&kb(t,i,n),n};import{and as Vs,array as Tb,boolean as Fe,color as Nb,date as Bu,defined as rt,greaterThan as dl,lessThan as pl,lineDashOptionsDef as Ob,number as Gs,or as Vu,positiveNumber as Gu,ratio as Hu,string as ui,strokeOptionsDef as Eb,typeUnion as gl,undocumented as Pb,union as Rb}from"ag-charts-core";import{ErrorType as _u,ValidationError as Wu,and as fl,array as Zu,arrayLength as Fb,arrayOf as qa,arrayOfDefs as Qa,attachDescription as ml,boolean as _,borderOptionsDef as yl,callback as Wt,callbackDefs as bl,callbackOf as Vn,color as Yu,colorUnion as Uu,date as zb,defined as Ku,fillOptionsDef as ts,fontOptionsDef as es,greaterThan as jb,highlightOptionsDef as Bb,htmlElement as Vb,isValidNumberFormat as Gb,labelBoxOptionsDef as $u,lessThan as Hb,lineDashOptionsDef as Hs,number as Ct,object as _b,optionsDefs as xl,or as Ie,padding as vl,positiveNumber as U,ratio as ze,required as Gn,shapeHighlightOptionsDef as Wb,string as ct,strokeOptionsDef as Xe,typeUnion as Zb,undocumented as De,union as xt,validate as Yb}from"ag-charts-core";var Ub=void 0,Kb=void 0;Kb=Ub;var $b=void 0,Xb=void 0;Xb=$b;var qb=void 0,Qb=void 0;Qb=qb;var Jb=void 0,tx=void 0;tx=Jb;var Ml=["top","top-right","top-left","bottom","bottom-right","bottom-left","right","right-top","right-bottom","left","left-top","left-bottom"],ex={floating:_,placement:xt(...Ml),xOffset:Ct,yOffset:Ct},Xu=ml((e,t)=>{let i;if(typeof e=="string")Ml.includes(e)?i=!0:(i={valid:!1,invalid:[],cleared:null},i.invalid.push(new Wu(_u.Invalid,`a legend placement string: ["${Ml.join('", "')}"]`,e,t.path)));else{const{cleared:s,invalid:n}=Yb(e,ex);i={valid:n.length===0,cleared:s,invalid:n}}return i},"a legend position object or placement string"),Ja=Ie(xt("circle","cross","diamond","heart","plus","pin","square","star","triangle"),Wt),qu=xt("never","always","hyphenate","on-space"),tr=xt("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),Sl=Ie(U,xt("exact","nearest")),Qu=Ie(ct,Qa({text:Gn(ct),...es},"text segments array")),Ju=xt("pointer","start","middle","end"),er={enabled:_,text:Qu,textAlign:xt("left","center","right"),wrapping:xt("never","always","hyphenate","on-space"),spacing:U,maxWidth:U,maxHeight:U,...es};er.padding=De(U);var ir={enabled:_,text:Qu,renderer:Vn(Ie(ct,Vb))},Il=["defaults","download","zoom-to-cursor","pan-to-cursor","reset-zoom","toggle-series-visibility","toggle-other-series","separator"],td={type:xt("action","separator"),showOn:xt("always","series-area","series-node","legend-item"),label:Gn(ct),enabled:_,action:Wt,items:(e,t)=>ed(e,t)};td.iconUrl=De(ct);var ix=xl(td),sx=ml((e,t)=>{let i;return typeof e=="string"?Il.includes(e)?i=!0:(i={valid:!1,invalid:[],cleared:null},i.invalid.push(new Wu(_u.Invalid,`a context menu item string alias: ["${Il.join('", "')}"]`,e,t.path))):i=ix(e,t),i},`a context menu item object or string alias: [${Il.join(", ")}]`),ed=qa(sx,"a menu items array",!1),id={label:ct,ariaLabel:ct,tooltip:ct,icon:xt("align-center","align-left","align-right","arrow-drawing","arrow-down-drawing","arrow-up-drawing","callout-annotation","candlestick-series","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")},je=Ie(ct,Vn(ct)),nx=xl({x:je,y:je,angle:je,radius:je,size:je,color:je,label:je,secondaryLabel:je,sectorLabel:je,calloutLabel:je,legendItem:je}),Hn=ml(Gb,"a valid number format string"),xe={width:U,height:U,minWidth:U,minHeight:U,suppressFieldDotNotation:_,title:er,subtitle:er,footnote:er,padding:{top:U,right:U,bottom:U,left:U},seriesArea:{border:yl,clip:_,cornerRadius:Ct,padding:vl},legend:{enabled:_,position:Xu,orientation:xt("horizontal","vertical"),maxWidth:U,maxHeight:U,spacing:U,border:yl,cornerRadius:Ct,padding:vl,fill:Uu,fillOpacity:ze,preventHidingAll:_,reverseOrder:_,toggleSeries:_,item:{marker:{size:U,shape:Ja,padding:U,strokeWidth:U},line:{length:U,strokeWidth:U},label:{maxLength:U,formatter:Wt,...es},maxWidth:U,paddingX:U,paddingY:U,showSeriesStroke:_},pagination:{marker:{size:U,shape:Ja,padding:U},activeStyle:{...ts,...Xe},inactiveStyle:{...ts,...Xe},highlightStyle:{...ts,...Xe},label:es},listeners:{legendItemClick:Wt,legendItemDoubleClick:Wt}},gradientLegend:{enabled:_,position:Xu,spacing:U,reverseOrder:_,border:yl,cornerRadius:Ct,padding:vl,fill:Uu,fillOpacity:ze,gradient:{preferredLength:U,thickness:U},scale:{label:{...es,minSpacing:U,format:Hn,formatter:Wt},padding:U,interval:{step:Ct,values:Zu,minSpacing:fl(U,Hb("maxSpacing")),maxSpacing:fl(U,jb("minSpacing"))}}},listeners:{seriesNodeClick:Wt,seriesNodeDoubleClick:Wt,seriesVisibilityChange:Wt,click:Wt,doubleClick:Wt,annotations:Wt,zoom:Wt},loadGoogleFonts:_,highlight:{range:xt("tooltip","node")},overlays:{loading:ir,noData:ir,noVisibleSeries:ir,unsupportedBrowser:ir},tooltip:{enabled:_,showArrow:_,pagination:_,delay:U,range:Sl,wrapping:qu,mode:xt("single","shared","compact"),position:{anchorTo:xt("pointer","node","chart"),placement:Ie(tr,qa(tr)),xOffset:Ct,yOffset:Ct}},animation:{enabled:_,duration:U},contextMenu:{enabled:_,items:ed},context:()=>!0,dataSource:{getData:Wt},keyboard:{enabled:_,tabIndex:Ct},touch:{dragAction:xt("none","drag","hover")},ranges:{enabled:_,buttons:Qa({...id,value:Ie(Ct,fl(qa(Ie(Ct,zb)),Fb(2,2)),Wt)},"range button options array")},locale:{localeText:_b,getLocaleText:Vn(ct)},background:{visible:_,fill:Yu,image:{url:Gn(ct),top:Ct,right:Ct,bottom:Ct,left:Ct,width:U,height:U,opacity:ze}},styleNonce:ct,sync:{enabled:_,groupId:ct,axes:xt("x","y","xy"),nodeInteraction:_,zoom:_},zoom:{enabled:_,enableAxisDragging:_,enableAxisScrolling:_,enableDoubleClickToReset:_,enablePanning:_,enableScrolling:_,enableSelecting:_,enableTwoFingerZoom:_,keepAspectRatio:_,anchorPointX:Ju,anchorPointY:Ju,axisDraggingMode:xt("pan","zoom"),axes:xt("x","y","xy"),deceleration:Ie(xt("off","short","long"),ze),minVisibleItems:U,panKey:xt("alt","ctrl","meta","shift"),scrollingStep:ze,autoScaling:{enabled:_,padding:ze},buttons:{enabled:_,buttons:Qa({...id,value:xt("reset","zoom-in","zoom-out","pan-left","pan-right","pan-start","pan-end"),section:ct},"zoom button options array"),visible:xt("always","zoomed","hover")}},formatter:Ie(Vn(ct),nx)};xe.dataSource.requestThrottle=De(U),xe.dataSource.updateThrottle=De(U),xe.dataSource.updateDuringInteraction=De(_),xe.zoom.enableIndependentAxes=De(_),xe.statusBar=De(Ku),xe.foreground=De({visible:_,text:ct,image:{url:ct,top:Ct,right:Ct,bottom:Ct,left:Ct,width:U,height:U,opacity:ze},...ts}),xe.overrideDevicePixelRatio=De(Ct),xe.sync.domainMode=De(xt("direction","position","key"));var qe={cursor:ct,context:()=>!0,showInLegend:_,nodeClickRange:Sl,listeners:{seriesNodeClick:Wt,seriesNodeDoubleClick:Wt},highlightStyle:{item:{...ts,...Xe},series:{enabled:_,dimOpacity:ze,strokeWidth:U}},highlight:Bb(Wb)},Qe={...qe,id:ct,visible:_,context:()=>!0,data:Zu};Qe.seriesGrouping=De(Ku);var sr={enabled:_,shape:Ja,size:U,itemStyler:bl({...ts,...Xe,...Hs,shape:Ja,size:U}),...ts,...Xe,...Hs},Je={enabled:_,formatter:Wt,format:Hn,itemStyler:De(bl({enabled:_,...$u,...es})),...$u,...es},Dl={...Je,lineHeight:U,minimumFontSize:U,wrapping:qu,overflowStrategy:xt("ellipsis","hide")},nr={visible:_,cap:{visible:_,length:U,lengthRatio:ze,...Xe,...Hs},...Xe,...Hs},wl={...nr,xLowerKey:ct,xUpperKey:ct,yLowerKey:ct,yUpperKey:ct,xLowerName:ct,xUpperName:ct,yLowerName:ct,yUpperName:ct,itemStyler:bl({visible:_,...Xe,...Hs,cap:{visible:_,length:U,lengthRatio:ze,...Xe,...Hs}})},ti={enabled:_,showArrow:_,range:Sl,renderer:Vn(Ie(ct,xl({heading:ct,title:ct,data:Qa({label:Gn(ct),value:Gn(ct)})},"tooltip renderer result object"))),position:{anchorTo:xt("node","pointer","chart"),placement:Ie(tr,qa(tr)),xOffset:Ct,yOffset:Ct},interaction:{enabled:_}},ar={enabled:_,xOffset:Ct,yOffset:Ct,blur:U,color:Yu},sd=Zb({linear:{},smooth:{tension:ze},step:{position:xt("start","middle","end")}},"interpolation line options");import{boolean as Al,constant as ax,fillOptionsDef as rx,lineDashOptionsDef as ox,multiSeriesHighlightOptionsDef as lx,number as cx,required as Cl,shapeHighlightOptionsDef as nd,string as _n,strokeOptionsDef as hx}from"ag-charts-core";var ad=lx(nd,nd),ux={showInMiniChart:Al,connectMissingData:Al,interpolation:sd,label:Je,marker:sr,tooltip:ti,shadow:ar,...qe,...rx,...hx,...ox,highlight:ad},rd={...ux,...Qe,highlight:ad,type:Cl(ax("area")),xKey:Cl(_n),yKey:Cl(_n),xName:_n,yName:_n,stacked:Al,stackGroup:_n,normalizedTo:cx};import{barHighlightOptionsDef as od,boolean as _s,callbackDefs as dx,constant as px,fillOptionsDef as ld,lineDashOptionsDef as cd,multiSeriesHighlightOptionsDef as gx,number as hd,positiveNumber as kl,required as Ll,string as Ws,strokeOptionsDef as ud,undocumented as Tl,union as Nl}from"ag-charts-core";var dd=gx(od,od),pd={direction:Nl("horizontal","vertical"),showInMiniChart:_s,cornerRadius:kl,itemStyler:dx({...ld,...ud,...cd,cornerRadius:kl}),crisp:_s,label:{...Je,placement:Nl("inside-center","inside-start","inside-end","outside-start","outside-end"),spacing:kl},errorBar:nr,shadow:ar,tooltip:ti,...qe,highlight:dd,...ld,...ud,...cd};pd.sparklineMode=Tl(_s);var rr={...pd,...Qe,highlight:dd,type:Ll(px("bar")),xKey:Ll(Ws),yKey:Ll(Ws),xName:Ws,yName:Ws,direction:Nl("horizontal","vertical"),grouped:_s,stacked:_s,stackGroup:Ws,normalizedTo:hd,legendItemName:Ws,errorBar:wl};rr.pickOutsideVisibleMinorAxis=Tl(_s),rr.focusPriority=Tl(hd);import{boolean as Wn,constant as fx,lineDashOptionsDef as mx,lineHighlightOptionsDef as yx,multiSeriesHighlightOptionsDef as bx,number as gd,required as Ol,shapeHighlightOptionsDef as xx,string as is,strokeOptionsDef as vx,undocumented as El}from"ag-charts-core";var fd=bx(xx,yx),md={title:is,showInMiniChart:Wn,connectMissingData:Wn,interpolation:sd,label:Je,marker:sr,tooltip:ti,errorBar:nr,...qe,...vx,...mx,highlight:fd};md.sparklineMode=El(Wn);var or={...md,...Qe,highlight:fd,type:Ol(fx("line")),xKey:Ol(is),yKey:Ol(is),xName:is,yName:is,stacked:Wn,stackGroup:is,normalizedTo:gd,legendItemName:is,errorBar:wl};or.pickOutsideVisibleMinorAxis=El(Wn),or.focusPriority=El(gd);import{isArray as Pl,isObject as yd,isPlainObject as ss}from"ag-charts-core";var bd=Symbol("BREAK"),Zn="__decorator_config",lr="__decorator_accessors";function Mx(e,t){Rl(e,t).optional=!0}function Rl(e,t){if(Object.getOwnPropertyDescriptor(e,Zn)==null&&Object.defineProperty(e,Zn,{value:{}}),Object.getOwnPropertyDescriptor(e,lr)==null){const h=Object.getPrototypeOf(e)?.[lr]?.slice()??[];Object.defineProperty(e,lr,{value:h})}const i=e[Zn],s=t.toString();if(i[s]!=null)return i[s];i[s]={setters:[],getters:[],observers:[]};const n=Object.getOwnPropertyDescriptor(e,t);let a=n?.get,r=n?.set;if(a==null||r==null){const c=e[lr];let h=c.indexOf(t);h===-1&&(h=c.push(t)-1),a??(a=function(){let u=this.__accessors;return u==null&&(u=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:u})),u[h]}),r??(r=function(u){let d=this.__accessors;d==null&&(d=c.slice().fill(void 0),Object.defineProperty(this,"__accessors",{value:d})),d[h]=u})}return Object.defineProperty(e,t,{set:function(c){const{setters:h,observers:u}=i[s];let d;h.some(p=>p.length>2)&&(d=a.call(this));for(const p of h)if(c=p(this,t,c,d),c===bd)return;r.call(this,c);for(const p of u)p(this,c,d)},get:function(){let c=a.call(this);for(const h of i[s].getters)if(c=h(this,t,c),c===bd)return;return c},enumerable:!0,configurable:!1}),i[s]}function cr(e,t,i){return(s,n)=>{const a=Rl(s,n);a.setters.push(e),t&&a.getters.unshift(t),i&&Object.assign(a,i)}}function Sx(e){return(t,i)=>{Rl(t,i).observers.push(e)}}function Fl(e){return typeof e<"u"&&Zn in e}function ns(e){const t=new Set;for(;Fl(e);)t.add(e?.[Zn]),e=Object.getPrototypeOf(e);return Array.from(t).flatMap(i=>Object.keys(i))}function Ix(e){return ns(e).reduce((t,i)=>(t[String(i)]=e[i]??null,t),{})}function Zt(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every((i,s)=>Zt(i,t[s])):ss(e)?ss(t)?xd(e,t,Zt):!1:e===t}function xd(e,t,i){if(Object.is(e,t))return!0;for(const s of Object.keys(t))if(!(s in e))return!1;for(const s of Object.keys(e))if(!(s in t)||!i(e[s],t[s]))return!1;return!0}function zt(...e){const t={};for(const i of e){if(!yd(i))continue;const s=Fl(i)?ns(i):Object.keys(i);for(const n of s)ss(t[n])&&ss(i[n])?t[n]=zt(t[n],i[n]):t[n]??(t[n]=i[n])}return t}function vd(...e){const t={};for(const i of e){if(!yd(i))continue;const s=Fl(i)?ns(i):Object.keys(i);for(const n of s)ss(t[n])&&ss(i[n])?t[n]=vd(t[n],i[n]):n in t||(t[n]??(t[n]=i[n]))}return t}function Dx(e,...t){return t&&Pl(e)?e.map(i=>zt(i,...t)):e}function ue(e,t){const i={...e};for(const s of t)delete i[s];return i}function wx(e,t){return(Pl(t)?t:t.split(".")).reduce((s,n)=>s[n],e)}var Md=new Set(["__proto__","constructor","prototype"]);function Ax(e,t,i){const s=Pl(t)?t.slice():t.split("."),n=s.pop();if(s.some(r=>Md.has(r)))return;const a=s.reduce((r,o)=>r[o],e);return a[n]=i,a[n]}function Sd(e,t,i){if(i===void 0)return t;for(const s of e){const n=i[s];n!==void 0&&(t[s]=n)}return t}function Id(e){return e==null||typeof e!="object"||!ss(e)||(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const i=e[t];i!==null&&(typeof i=="object"||typeof i=="function")&&!Object.isFrozen(i)&&Id(i)})),e}var de=Symbol("IGNORED_PROP");function we(e,t){const i={};for(const s of Object.keys(t)){const n=t[s];n!==de&&Object.hasOwn(e,s)&&(i[s]=n)}return i}function Dd(e){const{enabled:t,mode:i,showArrow:s,range:n,position:a,pagination:r,delay:o,wrapping:l,interaction:c,renderer:h,...u}=e,d=we(e,{enabled:t,showArrow:s,range:n,position:a,interaction:c,renderer:h,...u});return{chartTooltipOptions:we(e,{enabled:de,showArrow:de,range:de,position:de,mode:i,pagination:r,delay:o,wrapping:l,...u}),seriesTooltipOptions:d}}function Cx(e){const{animation:t,background:i,container:s,contextMenu:n,context:a,footnote:r,height:o,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:b,width:y,type:x,cursor:M,nodeClickRange:I,tooltip:S={},value:w,scale:D={},startAngle:C,endAngle:A,highlightStyle:L,highlight:k,segmentation:N,bar:T,needle:O,targets:E,outerRadius:W,innerRadius:q,outerRadiusRatio:lt,innerRadiusRatio:at,cornerRadius:J,cornerMode:F,label:Y,secondaryLabel:z,spacing:Q,...et}=e,{chartTooltipOptions:H,seriesTooltipOptions:K}=Dd(S),j=we(e,{animation:t,background:i,container:s,contextMenu:n,context:a,footnote:r,height:o,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:b,tooltip:H,width:y}),B=we(e,{needle:O!=null?{enabled:!0,...O}:de,startAngle:C,endAngle:A,scale:D,type:x,cursor:M,context:a,nodeClickRange:I,tooltip:K,value:w,highlightStyle:L,highlight:k,segmentation:N,bar:T,targets:E,outerRadius:W,innerRadius:q,outerRadiusRatio:lt,innerRadiusRatio:at,cornerRadius:J,cornerMode:F,label:Y,secondaryLabel:z,spacing:Q,...et});return{...j,series:[B]}}function kx(e){const{animation:t,background:i,container:s,contextMenu:n,context:a,footnote:r,height:o,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:b,width:y,type:x,cursor:M,nodeClickRange:I,tooltip:S={},value:w,scale:D={},direction:C="vertical",thickness:A,highlightStyle:L,highlight:k,segmentation:N,bar:T,targets:O,cornerRadius:E,cornerMode:W,label:q,...lt}=e,{chartTooltipOptions:at,seriesTooltipOptions:J}=Dd(S),F=we(e,{animation:t,background:i,container:s,contextMenu:n,context:a,footnote:r,height:o,listeners:l,locale:c,minHeight:h,minWidth:u,overrideDevicePixelRatio:d,padding:p,subtitle:g,theme:f,title:b,tooltip:at,width:y}),Y=we(e,{scale:D,type:x,cursor:M,context:a,nodeClickRange:I,tooltip:J,value:w,direction:C,thickness:A,highlightStyle:L,highlight:k,segmentation:N,bar:T,targets:O,cornerRadius:E,cornerMode:W,label:q,...lt});return{...F,series:[Y]}}function wd(e,t){if(t==null)return e;const{targets:i,...s}=t;return e=zt(e,s),e.targets!=null&&i!=null&&(e.targets=Dx(e.targets,i)),e}function Lx(e,t){switch(e.type){case"radial-gauge":return Cx(wd(e,t));case"linear-gauge":return kx(wd(e,t));default:return{}}}import{and as Yn,arrayLength as Tx,arrayOf as as,arrayOfDefs as Ad,boolean as ei,callback as hr,color as Un,colorStopsOrderValidator as Nx,constant as Cd,fillOptionsDef as rs,fontOptionsDef as kd,greaterThan as Ld,lessThan as Td,lineDashOptionsDef as os,number as pt,optionsDefs as Ox,or as Nd,positiveNumber as Rt,ratio as ur,required as Zs,string as Kn,strokeOptionsDef as ls,undocumented as Ni,union as ii}from"ag-charts-core";var dr={fills:Yn(Tx(2),as(Ox({color:Un,stop:pt},"")),Nx),fillMode:ii("continuous","discrete")},Od={value:Zs(pt),text:Kn,shape:Nd(ii("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),hr),placement:ii("before","after","middle"),spacing:Rt,size:Rt,rotation:pt,...rs,...ls,...os},Ed={value:Zs(pt),text:Kn,shape:Nd(ii("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),hr),placement:ii("inside","outside","middle"),spacing:Rt,size:Rt,rotation:pt,label:{...Je,spacing:Rt},...rs,...ls,...os},Ex={direction:ii("horizontal","vertical"),cornerMode:ii("container","item"),cornerRadius:Rt,thickness:Rt,segmentation:{enabled:ei,spacing:Rt,interval:{values:as(pt),step:pt,count:pt}},bar:{enabled:ei,thickness:Rt,thicknessRatio:ur,...dr,...rs,...ls,...os},label:{...Dl,text:Kn,spacing:Rt,avoidCollisions:ei,placement:ii("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:ti,...ue(qe,["listeners"])},cs={...Ex,...ue(Qe,["listeners"]),type:Zs(Cd("linear-gauge")),value:Zs(pt),scale:{min:Yn(pt,Td("max")),max:Yn(pt,Ld("min")),label:{enabled:ei,formatter:hr,rotation:pt,spacing:Rt,minSpacing:Rt,placement:ii("before","after"),avoidCollisions:ei,format:Hn,...kd},interval:{values:as(pt),step:pt},...dr,...rs,...ls,...os},targets:Ad(Od,"target options array")};cs.margin=Ni(pt),cs.defaultColorRange=Ni(as(Un)),cs.defaultTarget=Ni({...Od,value:pt,label:{...Je,spacing:pt}}),cs.defaultScale=Ni(cs.scale),cs.scale.defaultFill=Ni(Un);var Px={outerRadius:Rt,innerRadius:Rt,outerRadiusRatio:ur,innerRadiusRatio:ur,startAngle:pt,endAngle:pt,spacing:Rt,cornerMode:ii("container","item"),cornerRadius:Rt,scale:{min:Yn(pt,Td("max")),max:Yn(pt,Ld("min")),label:{enabled:ei,formatter:hr,rotation:pt,spacing:Rt,minSpacing:Rt,avoidCollisions:ei,format:Hn,...kd},interval:{values:as(pt),step:pt},...dr,...rs,...ls,...os},segmentation:{enabled:ei,spacing:Rt,interval:{values:as(pt),step:pt,count:pt}},bar:{enabled:ei,...dr,...rs,...ls,...os},needle:{enabled:ei,spacing:Rt,radiusRatio:ur,...rs,...ls,...os},label:{text:Kn,spacing:Rt,...Dl},secondaryLabel:{text:Kn,...Dl},tooltip:ti,...qe},pr={...Px,...Qe,type:Zs(Cd("radial-gauge")),value:Zs(pt),targets:Ad(Ed,"target options array")};pr.defaultColorRange=Ni(as(Un)),pr.defaultTarget=Ni({...Ed,value:pt,label:{...Je,spacing:pt}}),pr.scale.defaultFill=Ni(Un);import{Logger as Rx}from"ag-charts-core";var JT=Symbol("is-dark-theme"),tN=Symbol("default-separation-lines-colour"),zl=Symbol("default-shadow-colour"),eN=Symbol("default-caption-layout-style"),iN=Symbol("default-caption-alignment"),Fx=Symbol("palette-up-stroke"),zx=Symbol("palette-down-stroke"),jx=Symbol("palette-up-fill"),Bx=Symbol("palette-down-fill"),Vx=Symbol("palette-neutral-stroke"),Gx=Symbol("palette-neutral-fill"),sN=Symbol("palette-alt-up-stroke"),nN=Symbol("palette-alt-down-stroke"),aN=Symbol("palette-alt-up-fill"),rN=Symbol("palette-alt-down-fill"),oN=Symbol("palette-gray-fill"),lN=Symbol("palette-gray-stroke"),cN=Symbol("default-polar-series-stroke"),Hx=Symbol("default-sparkline-crosshair-stroke"),di=Symbol("default-financial-charts-annotation-stroke"),Pd=Symbol("default-hierarchy-strokes"),_x=Symbol("default-text-annotation-color"),Ys=Symbol("default-financial-charts-annotation-background-fill"),Wx=Symbol("default-annotation-handle-fill"),Zx=Symbol("default-annotation-statistics-fill"),Yx=Symbol("default-annotation-statistics-stroke"),Ux=Symbol("default-annotation-statistics-color"),Kx=Symbol("default-annotation-statistics-divider-stroke"),Rd=Symbol("default-annotation-statistics-fill"),Fd=Symbol("default-annotation-statistics-stroke"),$x=Symbol("default-textbox-fill"),Xx=Symbol("default-textbox-stroke"),qx=Symbol("default-textbox-color"),hN=Symbol("default-toolbar-position"),uN=Symbol("default-gridline-enabled");import{clamp as pi}from"ag-charts-core";var hs=(e,t,i)=>e*(1-i)+t*i,jl=e=>{const t=e<0?-1:1,i=Math.abs(e);return i<=.04045?e/12.92:t*((i+.055)/1.055)**2.4},Bl=e=>{const t=e<0?-1:1,i=Math.abs(e);return i>.0031308?t*(1.055*i**(1/2.4)-.055):12.92*e},zd=class ht{constructor(t,i,s,n=1){this.r=pi(0,t||0,1),this.g=pi(0,i||0,1),this.b=pi(0,s||0,1),this.a=pi(0,n||0,1)}static validColorString(t){return t.indexOf("#")>=0?!!ht.parseHex(t):t.indexOf("rgb")>=0?!!ht.stringToRgba(t):ht.nameToHex.has(t.toLowerCase())}static fromString(t){if(t.indexOf("#")>=0)return ht.fromHexString(t);const i=ht.nameToHex.get(t.toLowerCase());if(i)return ht.fromHexString(i);if(t.indexOf("rgb")>=0)return ht.fromRgbaString(t);throw new Error(`Invalid color string: '${t}'`)}static parseHex(t){t=t.replace(/ /g,"").slice(1);let i;switch(t.length){case 6:case 8:i=[];for(let s=0;s<t.length;s+=2)i.push(parseInt(`${t[s]}${t[s+1]}`,16));break;case 3:case 4:i=t.split("").map(s=>parseInt(s,16)).map(s=>s+s*16);break}if(i?.length>=3&&i.every(s=>s>=0))return i.length===3&&i.push(255),i}static fromHexString(t){const i=ht.parseHex(t);if(i){const[s,n,a,r]=i;return new ht(s/255,n/255,a/255,r/255)}throw new Error(`Malformed hexadecimal color string: '${t}'`)}static stringToRgba(t){let i=-1,s=-1;for(let o=0;o<t.length;o++){const l=t[o];if(i===-1&&l==="(")i=o;else if(l===")"){s=o;break}}if(i===-1||s===-1)return;const a=t.substring(i+1,s).split(","),r=[];for(let o=0;o<a.length;o++){const l=a[o];let c=parseFloat(l);if(!Number.isFinite(c))return;l.indexOf("%")>=0?(c=pi(0,c,100),c/=100):o===3?c=pi(0,c,1):(c=pi(0,c,255),c/=255),r.push(c)}return r}static fromRgbaString(t){const i=ht.stringToRgba(t);if(i){if(i.length===3)return new ht(i[0],i[1],i[2]);if(i.length===4)return new ht(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${t}'`)}static fromArray(t){if(t.length===4)return new ht(t[0],t[1],t[2],t[3]);if(t.length===3)return new ht(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(t,i,s,n=1){const a=ht.HSBtoRGB(t,i,s);return new ht(a[0],a[1],a[2],n)}static fromHSL(t,i,s,n=1){const a=ht.HSLtoRGB(t,i,s);return new ht(a[0],a[1],a[2],n)}static fromOKLCH(t,i,s,n=1){const a=ht.OKLCHtoRGB(t,i,s);return new ht(a[0],a[1],a[2],n)}static padHex(t){return t.length===1?"0"+t:t}toHexString(){let t="#"+ht.padHex(Math.round(this.r*255).toString(16))+ht.padHex(Math.round(this.g*255).toString(16))+ht.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(t+=ht.padHex(Math.round(this.a*255).toString(16))),t}toRgbaString(t=3){const i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],s=Math.pow(10,t);return this.a!==1?(i.push(Math.round(this.a*s)/s),`rgba(${i.join(", ")})`):`rgb(${i.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return ht.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(t,i,s){const n=jl(t),a=jl(i),r=jl(s),o=Math.cbrt(.4122214708*n+.5363325363*a+.0514459929*r),l=Math.cbrt(.2119034982*n+.6806995451*a+.1073969566*r),c=Math.cbrt(.0883024619*n+.2817188376*a+.6299787005*r),h=.2104542553*o+.793617785*l-.0040720468*c,u=1.9779984951*o-2.428592205*l+.4505937099*c,d=.0259040371*o+.7827717662*l-.808675766*c,p=Math.atan2(d,u)*180/Math.PI,g=h,f=Math.hypot(u,d),b=p>=0?p:p+360;return[g,f,b]}static OKLCHtoRGB(t,i,s){const n=t,a=i*Math.cos(s*Math.PI/180),r=i*Math.sin(s*Math.PI/180),o=(n+.3963377774*a+.2158037573*r)**3,l=(n-.1055613458*a-.0638541728*r)**3,c=(n-.0894841775*a-1.291485548*r)**3,h=4.0767416621*o-3.3077115913*l+.2309699292*c,u=-1.2684380046*o+2.6097574011*l-.3413193965*c,d=-.0041960863*o-.7034186147*l+1.707614701*c,p=Bl(h),g=Bl(u),f=Bl(d);return[p,g,f]}static RGBtoHSL(t,i,s){const n=Math.min(t,i,s),a=Math.max(t,i,s),r=(a+n)/2;let o,l;if(a===n)o=0,l=0;else{const c=a-n;l=r>.5?c/(2-a-n):c/(a+n),a===t?o=(i-s)/c+(i<s?6:0):a===i?o=(s-t)/c+2:o=(t-i)/c+4,o*=360/6}return[o,l,r]}static HSLtoRGB(t,i,s){if(t=(t%360+360)%360,i===0)return[s,s,s];const n=s<.5?s*(1+i):s+i-s*i,a=2*s-n;function r(h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?a+(n-a)*6*h:h<1/2?n:h<2/3?a+(n-a)*(2/3-h)*6:a}const o=r(t/360+1/3),l=r(t/360),c=r(t/360-1/3);return[o,l,c]}static RGBtoHSB(t,i,s){const n=Math.min(t,i,s),a=Math.max(t,i,s),r=a===0?0:(a-n)/a;let o=0;if(n!==a){const l=a-n,c=(a-t)/l,h=(a-i)/l,u=(a-s)/l;t===a?o=u-h:i===a?o=2+c-u:o=4+h-c,o/=6,o<0&&(o=o+1)}return[o*360,r,a]}static HSBtoRGB(t,i,s){t=(t%360+360)%360/360;let n=0,a=0,r=0;if(i===0)n=a=r=s;else{const o=(t-Math.floor(t))*6,l=o-Math.floor(o),c=s*(1-i),h=s*(1-i*l),u=s*(1-i*(1-l));switch(o>>0){case 0:n=s,a=u,r=c;break;case 1:n=h,a=s,r=c;break;case 2:n=c,a=s,r=u;break;case 3:n=c,a=h,r=s;break;case 4:n=u,a=c,r=s;break;case 5:n=s,a=c,r=h;break}}return[n,a,r]}static mix(t,i,s){return new ht(hs(t.r,i.r,s),hs(t.g,i.g,s),hs(t.b,i.b,s),hs(t.a,i.a,s))}static lighten(t,i){const s=ht.RGBtoOKLCH(t.r,t.g,t.b);return ht.fromOKLCH(pi(0,s[0]+i,1),s[1],s[2])}static darken(t,i){const s=ht.RGBtoOKLCH(t.r,t.g,t.b);return ht.fromOKLCH(pi(0,s[0]-i,1),s[1],s[2])}static interpolate(t,i){const s=1/(t.length-1),n=t.map(a=>ht.RGBtoOKLCH(a.r,a.g,a.b));return Array.from({length:i},(a,r)=>{const o=r/(i-1),l=t.length<=2?0:Math.min(Math.floor(o*(t.length-1)),t.length-2),c=(o-l*s)/s,h=n[l],u=n[l+1];return ht.fromOKLCH(hs(h[0],u[0],c),hs(h[1],u[1],c),hs(h[2],u[2],c))})}};zd.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 Oi=zd,Us=12,gr=(e=>(e[e.SMALLEST=8/Us]="SMALLEST",e[e.SMALLER=10/Us]="SMALLER",e[e.SMALL=12/Us]="SMALL",e[e.MEDIUM=13/Us]="MEDIUM",e[e.LARGE=14/Us]="LARGE",e[e.LARGEST=17/Us]="LARGEST",e))(gr||{}),Qx=[{type:"number",position:{$if:[{$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},"bottom","left"]}},{type:"category",position:{$if:[{$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},"left","bottom"]}}],Vl={$if:[{$isGradient:{$palette:"fill"}},{$palette:"fillFallback"},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/stroke",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},fr={type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},pN={...fr,colorStops:[{$mix:[{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"black",.15]},{$mix:[{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"white",.15]}]},Gl={type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},mr={...Gl,reverse:!0},gN={...Gl,bounds:"series"},fN={...Gl,bounds:"series",reverse:!0},Ei={type:"pattern",pattern:"forward-slanted-lines",width:10,height:10,padding:2,fill:{$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isImage:{$palette:"fill"}}]},{$palette:"fillFallback"},{$if:[{$isPattern:{$palette:"fill"}},{$path:["/fill",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},fillOpacity:1,stroke:Vl,strokeOpacity:1,strokeWidth:4,backgroundFill:"none",backgroundFillOpacity:1,rotation:0,scale:1},mN={...Ei,fill:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]}},Ks={type:"image",backgroundFill:{$palette:"fillFallback"},backgroundFillOpacity:1,repeat:"no-repeat",fit:"contain",rotation:0},jd={stroke:{$path:["../../highlightStyle/item/stroke","rgba(0, 0, 0, 0.4)"]},strokeWidth:{$path:["../../highlightStyle/item/strokeWidth",2]},strokeOpacity:{$path:["../../highlightStyle/item/strokeOpacity",void 0]},opacity:{$path:["../../highlightStyle/item/opacity",1]}},Jx={...jd,fill:{$path:["../../highlightStyle/item/fill","rgba(255,255,255, 0.33)"]},fillOpacity:{$path:["../../highlightStyle/item/fillOpacity",void 0]}},$s={padding:8,cornerRadius:4,fill:{$if:[{$and:[{$eq:[{$path:"./fill/type"},"image"]},{$isUserOption:["./fill/backgroundFill",!1,!0]}]},{backgroundFill:"transparent"},void 0]},border:{enabled:{$isUserOption:["../border",!0,!1]},strokeWidth:1,stroke:{$foregroundOpacity:.08}}};function Xs(e=!0){return{enabled:!0,highlightedItem:e?Jx:jd,unhighlightedItem:{strokeWidth:{$path:["../../highlightStyle/series/strokeWidth",void 0]}},highlightedSeries:{strokeWidth:{$path:["../../highlightStyle/series/strokeWidth",void 0]}},unhighlightedSeries:{opacity:{$path:["../../highlightStyle/series/dimOpacity",void 0]}}}}var Ae={stroke:di},$t={fill:Wx},Bd={color:"white",fill:di},gi={color:di},us={color:_x,fontSize:{$rem:gr.LARGE},fontFamily:{$ref:"fontFamily"}},Hl={...us,fontSize:{$ref:"fontSize"},color:Ux,fill:Zx,stroke:Yx,strokeWidth:1,divider:{stroke:Kx,strokeWidth:1,strokeOpacity:.5}},_l={...Ae,background:{fill:Ys,fillOpacity:.2},handle:{...$t},text:{...gi},statistics:{...Hl}},t0={line:{...Ae,handle:{...$t},text:{...gi}},"horizontal-line":{...Ae,handle:{...$t},axisLabel:{...Bd},text:{...gi}},"vertical-line":{...Ae,handle:{...$t},axisLabel:{...Bd},text:{...gi}},"disjoint-channel":{...Ae,background:{fill:Ys,fillOpacity:.2},handle:{...$t},text:{...gi}},"parallel-channel":{...Ae,background:{fill:Ys,fillOpacity:.2},handle:{...$t},text:{...gi}},"fibonacci-retracement":{...Ae,strokes:Pd,rangeStroke:di,handle:{...$t},text:{...gi,position:"center"},label:{...us,color:void 0,fontSize:{$rem:gr.SMALLER}}},"fibonacci-retracement-trend-based":{...Ae,strokes:Pd,rangeStroke:di,handle:{...$t},text:{...gi,position:"center"},label:{...us,color:void 0,fontSize:{$rem:gr.SMALLER}}},callout:{...Ae,...us,color:{$ref:"textColor"},handle:{...$t},fill:Ys,fillOpacity:.2},comment:{...us,color:"white",fontWeight:700,handle:{...$t},fill:di},note:{...us,color:qx,fill:di,stroke:{$ref:"chartBackgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...$t},background:{fill:$x,stroke:Xx,strokeWidth:1}},text:{...us,handle:{...$t}},arrow:{...Ae,handle:{...$t},text:{...gi}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...$t,stroke:di}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...$t,stroke:di}},"date-range":{..._l},"price-range":{..._l},"date-price-range":{..._l},"quick-date-price-range":{up:{...Ae,fill:Ys,fillOpacity:.2,handle:{...$t},statistics:{...Hl,color:"#fff",fill:Ys,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...Ae,stroke:Fd,fill:Rd,fillOpacity:.2,handle:{...$t,stroke:Fd},statistics:{...Hl,color:"#fff",fill:Rd,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{enabled:!0}},e0=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],i0=[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"fibonacci-retracement-drawing",tooltip:"toolbarAnnotationsFibonacciAnnotations",value:"fibonacci-menu"},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"measurer-drawing",tooltip:"toolbarAnnotationsMeasurerAnnotations",value:"measurer-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}];function s0(e,t,i){const{dateKey:s="date",highKey:n="high",openKey:a="open",lowKey:r="low",closeKey:o="close",volumeKey:l="volume",chartType:c="candlestick",navigator:h=!1,volume:u=!0,rangeButtons:d=!0,statusBar:p=!0,toolbar:g=!0,zoom:f=!0,sync:b=!1,theme:y,data:x,formatter:M,...I}=e,S=a0(c,s,n,r,a,o),w=n0(i,a,o,u,l),C={navigator:{enabled:h,...u?{miniChart:{enabled:h,series:[{type:"line",xKey:s,yKey:l,stroke:Vl,marker:{enabled:!1}}]},height:40,minHandle:{height:46},maxHandle:{height:46}}:null}},A={annotations:{enabled:g,optionsToolbar:{enabled:g},snap:!0,toolbar:{enabled:g,buttons:i0,padding:0},data:x,xKey:s,volumeKey:u?l:void 0}},L=p?{statusBar:{enabled:!0,data:x,highKey:n,openKey:a,lowKey:r,closeKey:o,volumeKey:u?l:void 0}}:null,k={zoom:{enabled:f,autoScaling:{enabled:!0},enableIndependentAxes:!0}},N={ranges:{enabled:d}},T=b?{sync:{enabled:b,nodeInteraction:!0,zoom:!0}}:null,O=u?[{type:"number",position:"left",keys:[l],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percent",align:"end"}}]:[];return{theme:{baseTheme:typeof y=="string"?y:"ag-financial",...zt(typeof y=="object"?y:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:6},chartToolbar:{enabled:g},annotations:{...t0},axes:{number:{interval:{maxSpacing:45},label:{format:".2f"}}}},bar:{series:{fillOpacity:.5}},line:{series:{marker:{enabled:!1},...Hd(c,{hlc:{stroke:{$palette:"altNeutral.stroke"},strokeWidth:2},line:{stroke:{$palette:"neutral.stroke"}},"step-line":{stroke:{$palette:"neutral.stroke"},interpolation:{type:"step"}}})}},candlestick:{series:{...Hd(c,{"hollow-candlestick":{item:{up:{fill:"transparent"}}}})}},"range-area":{series:{fillOpacity:.3,strokeWidth:2}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...w,...S],axes:[{type:"number",position:"right",keys:[a,o,n,r],crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percent",align:"start"}},...O,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],tooltip:{enabled:!1},data:x,formatter:M,...A,...C,...L,...k,...N,...T,...I}}function n0(e,t,i,s,n){return s?[{type:"bar",xKey:"date",yKey:n,tooltip:{enabled:!1},itemStyler({datum:a}){const{up:r,down:o}=e().palette;return{fill:a[t]<a[i]?r?.fill:o?.fill}},focusPriority:1,highlight:{enabled:!1}}]:[]}var Vd="range-area";function a0(e,t,i,s,n,a){const r={xKey:t,openKey:n,closeKey:a,highKey:i,lowKey:s},o={xKey:t,yKey:a},l={pickOutsideVisibleMinorAxis:!0};switch(e??"candlestick"){case"ohlc":return r0(l,r);case"line":case"step-line":return o0(l,o);case"hlc":return l0(l,o,r);case"high-low":return c0(l,r);case"candlestick":case"hollow-candlestick":return Gd(l,r);default:return Rx.warnOnce(`unknown chart type: ${e}; expected one of: ${e0.join(", ")}`),Gd(l,r)}}function r0(e,t){return[{type:"ohlc",focusPriority:0,...e,...t}]}function o0(e,t){return[{type:"line",focusPriority:0,...e,...t}]}function l0(e,t,{xKey:i,highKey:s,closeKey:n,lowKey:a}){return[{type:Vd,focusPriority:0,...e,xKey:i,yHighKey:s,yLowKey:n,fill:jx,stroke:Fx},{type:Vd,focusPriority:0,...e,xKey:i,yHighKey:n,yLowKey:a,fill:Bx,stroke:zx},{type:"line",...e,...t}]}function c0(e,{xKey:t,highKey:i,lowKey:s}){return[{type:"range-bar",...e,xKey:t,yHighKey:i,yLowKey:s,fill:Gx,stroke:Vx,tooltip:{range:"nearest"},focusPriority:0}]}function Gd(e,t){return[{type:"candlestick",focusPriority:0,...e,...t}]}function Hd(e,t){return t[e]??t.default}var $n=new WeakMap;function yr(e,t){const i=JSON.stringify(e,null,0);return $n.has(t)||$n.set(t,new Map),$n.get(t)?.has(i)||$n.get(t)?.set(i,t(e)),$n.get(t)?.get(i)}var Wl=class{constructor(){this.weak=new WeakMap,this.strong=new Map,this.set=!1,this.value=void 0}};function br(e,t){let i=new Wl;const s=(...n)=>{let a=i;for(const r of n){const o=typeof r=="object"||typeof r=="symbol"?a.weak:a.strong;let l=o.get(r);l==null&&(l=new Wl,o.set(r,l)),a=l}if(a.set)return t?.("hit",e,n),a.value;{const r=e(...n);return a.set=!0,a.value=r,t?.("miss",e,n),r}};return s.reset=()=>{i=new Wl},s}function _d(e,t){const i=new Map,s=(...r)=>r.map(o=>typeof o=="object"||typeof o=="symbol"?o:(i.has(o)||i.set(o,{v:o}),i.get(o))),n={},a=new WeakMap;return(...r)=>{const o=r.length===0?[n]:s(...r);let l=a;for(const u of o.slice(0,-1))l.has(u)||l.set(u,new WeakMap),l=l.get(u);const c=o.at(-1);let h=l.get(c);return h?t?.("hit",e,r):(h=e(...r),l.set(c,h),t?.("miss",e,r)),h}}var Wd={title:{enabled:!1},label:{enabled:!1},line:{enabled:!1},gridLine:{enabled:!1},crosshair:{enabled:!1,stroke:Hx,lineDash:[0],label:{enabled:!1}}},Zl={...Wd,nice:!1},xr={mode:"compact",position:{anchorTo:"node",placement:["right","left"]},showArrow:!1},Yl={style:[{stroke:{$ref:"gridLineColor"}}],width:2},h0={number:{gridLine:Yl},time:{gridLine:Yl},category:{gridLine:Yl}},u0={overrides:{common:{animation:{enabled:!1},contextMenu:{enabled:!1},keyboard:{enabled:!1},background:{visible:!1},navigator:{enabled:!1},padding:{top:0,right:0,bottom:0,left:0},axes:{number:{...Zl,interval:{values:[0]}},log:{...Zl},time:{...Zl},category:{...Wd}}},bar:{series:{crisp:!1,label:{placement:"inside-end",padding:4},sparklineMode:!0},tooltip:{...xr,position:{...xr.position,anchorTo:"pointer"},range:"nearest"},axes:h0},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},series:{sparklineMode:!0,strokeWidth:1,marker:{enabled:!1,size:3}},tooltip:xr},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},series:{strokeWidth:1,fillOpacity:.4},tooltip:xr}}},Zd=_d(d0);function d0(e,t){return typeof e=="string"?{...t,baseTheme:e}:e!=null?{...e,baseTheme:Zd(e.baseTheme,t)}:t}function Yd(e){if(Array.isArray(e)&&e.length!==0){const t=e.find(i=>i!=null);if(typeof t=="number")return{data:e.map((s,n)=>({x:n,y:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"y"};if(Array.isArray(t))return{data:e.map(s=>({x:s?.[0],y:s?.[1],datum:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"datum"}}else if(e?.length===0)return{data:e,series:[{xKey:"x",yKey:"y"}],datumKey:"y"};return{data:e}}function p0(e){switch(e?.type){case"number":{const{type:t,min:i,max:s,reverse:n}=e;return we(e,{type:t,reverse:n,min:i,max:s})}case"time":{const{type:t,min:i,max:s,reverse:n}=e;return we(e,{type:t,reverse:n,min:i,max:s})}case"category":default:{const{paddingInner:t,paddingOuter:i,reverse:s}=e??{};return we({...e,type:"category"},{type:"category",reverse:s,paddingInner:t,paddingOuter:i})}}}function g0(e,t,i){const s={};return e?.stroke!=null&&(s.style=[{stroke:e?.stroke}],s.enabled??(s.enabled=!0)),e?.strokeWidth!=null&&(s.width=e?.strokeWidth,s.enabled??(s.enabled=!0)),i.type==="bar"&&i.direction!=="horizontal"&&(s.enabled??(s.enabled=!0)),e?.visible!=null&&(s.enabled=e.visible),s.enabled??(s.enabled=t),s}var f0=_d((e,t,i)=>s=>{const n=s.datum[s.xKey],a=s.datum[s.yKey],r=i!=null?s.datum[i]:s.datum,o=t?.renderer?.({context:e,datum:r,xValue:n,yValue:a});if(typeof o=="string")return o;const l=o?.content??a.toFixed(2);return o?.title?{heading:void 0,title:void 0,data:[{label:o.title,value:l}]}:{heading:void 0,title:l,data:[]}});function m0(e){const{background:t,container:i,height:s,listeners:n,locale:a,minHeight:r,minWidth:o,overrideDevicePixelRatio:l,padding:c,width:h,theme:u,data:d,crosshair:p,axis:g,min:f,max:b,tooltip:y,context:x,styleNonce:M,...I}=e,S=we(e,{background:t,container:i,height:s,listeners:n,locale:a,minHeight:r,minWidth:o,overrideDevicePixelRatio:l,padding:c,width:h,styleNonce:M,tooltip:de,context:de,data:de,crosshair:de,axis:de,min:de,max:de,theme:de}),{data:w,series:[D]=[],datumKey:C}=Yd(d),A=I;D!=null&&Object.assign(A,D),A.tooltip={...y,renderer:f0(x,y,C)},S.theme=Zd(u,u0),S.data=w,S.series=[A];const L=A.type!=="bar"||A.direction!=="horizontal",[k,N]=L?["bottom","left"]:["left","bottom"],T={...p0(g),position:k,...we(e,{crosshair:p})},O={type:"number",gridLine:g0(g,!1,e),position:N,...we(e,{min:f,max:b})};return S.axes=L?[O,T]:[T,O],S}var y0={chartType:Rb("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),dateKey:ui,openKey:ui,highKey:ui,lowKey:ui,closeKey:ui,volumeKey:ui,navigator:Fe,volume:Fe,rangeButtons:Fe,statusBar:Fe,toolbar:Fe,zoom:Fe,sync:Fe,theme:rt,container:rt,width:rt,height:rt,minWidth:rt,minHeight:rt,listeners:rt,initialState:rt,title:rt,data:Tb,formatter:rt},Ul={theme:rt,container:rt,animation:rt,background:rt,contextMenu:rt,context:()=>!0,listeners:rt,locale:rt,width:rt,height:rt,minWidth:rt,minHeight:rt,title:rt,subtitle:rt,footnote:rt,padding:rt,tooltip:{...ti,...xe.tooltip}};Ul.overrideDevicePixelRatio=Pb(Gu);var Kl=["showInLegend","showInMiniChart","grouped","stacked","stackGroup","tooltip","listeners","errorBar","xKey","yKey","type"],$l={visible:Fe,reverse:Fe,stroke:Nb,strokeWidth:Gu},Xl={context:()=>!0,tooltip:rt,theme:rt,background:rt,container:rt,width:rt,height:rt,minWidth:rt,minHeight:rt,padding:rt,listeners:rt,locale:rt,data:rt,styleNonce:ui,axis:gl({number:{...$l,min:Vs(Gs,pl("max")),max:Vs(Gs,dl("min"))},category:{...$l,paddingInner:Hu,paddingOuter:Hu},time:{...$l,min:Vs(Vu(Gs,Bu),pl("max")),max:Vs(Vu(Gs,Bu),dl("min"))}},"axis options","category"),min:Vs(Gs,pl("max")),max:Vs(Gs,dl("min")),crosshair:{enabled:Fe,snap:Fe,...Eb,...Ob},xKey:ui,yKey:ui},b0={type:"preset",name:"price-volume",enterprise:!0,options:y0,create:s0},x0={type:"preset",name:"gauge-preset",enterprise:!0,options:gl({"linear-gauge":{...ue(cs,["type"]),...Ul},"radial-gauge":{...ue(pr,["type"]),...Ul}},"gauge options"),create:Lx},v0={type:"preset",name:"sparkline",options:gl({area:{...Xl,...ue(rd,Kl)},bar:{...Xl,...ue(rr,Kl)},line:{...Xl,...ue(or,Kl)}},"sparkline options"),create:m0,processData:Yd};import{ValidationError as M0,isObject as S0,validate as I0}from"ag-charts-core";import{Logger as D0,entries as ql,groupBy as w0}from"ag-charts-core";import{clamp as A0,isPlainObject as Ud}from"ag-charts-core";import{Logger as C0,createId as k0,createSvgElement as Kd}from"ag-charts-core";import{boxContains as L0,boxesEqual as T0,clamp as qs}from"ag-charts-core";var vr=Symbol("interpolate"),Mr=e=>e[vr]!=null;function Ql(e,t,i,s=1/0){const n={nearest:void 0,distanceSquared:s};for(const a of i){const r=a.distanceSquared(e,t);if(r===0)return{nearest:a,distanceSquared:0};r<n.distanceSquared&&(n.nearest=a,n.distanceSquared=r)}return n}var Xn=class Rn{constructor(t,i,s,n){this.x=t,this.y=i,this.width=s,this.height=n}static fromDOMRect({x:t,y:i,width:s,height:n}){return new Rn(t,i,s,n)}static merge(t){let i=1/0,s=1/0,n=-1/0,a=-1/0;for(const r of t)r.x<i&&(i=r.x),r.y<s&&(s=r.y),r.x+r.width>n&&(n=r.x+r.width),r.y+r.height>a&&(a=r.y+r.height);return new Rn(i,s,n-i,a-s)}static nearestBox(t,i,s){return Ql(t,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON(){return{}}}}clone(){const{x:t,y:i,width:s,height:n}=this;return new Rn(t,i,s,n)}equals(t){return T0(this,t)}containsPoint(t,i){return L0(this,t,i)}intersection(t){if(!this.collidesBBox(t))return;const i=qs(t.x,this.x,t.x+t.width),s=qs(t.y,this.y,t.y+t.height),n=qs(t.x,this.x+this.width,t.x+t.width),a=qs(t.y,this.y+this.height,t.y+t.height);return new Rn(i,s,n-i,a-s)}collidesBBox(t){return this.x<t.x+t.width&&this.x+this.width>t.x&&this.y<t.y+t.height&&this.y+this.height>t.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(t,i){if(this.containsPoint(t,i))return 0;const s=t-qs(this.x,t,this.x+this.width),n=i-qs(this.y,i,this.y+this.height);return s*s+n*n}shrink(t,i){if(typeof t=="number")this.applyMargin(t,i);else for(const s of Object.keys(t)){const n=t[s];typeof n=="number"&&this.applyMargin(n,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(t,i){if(typeof t=="number")this.applyMargin(-t,i);else for(const s of Object.keys(t)){const n=t[s];typeof n=="number"&&this.applyMargin(-n,s)}return this}applyMargin(t,i){switch(i){case"top":this.y+=t;case"bottom":this.height-=t;break;case"left":this.x+=t;case"right":this.width-=t;break;case"vertical":this.y+=t,this.height-=t*2;break;case"horizontal":this.x+=t,this.width-=t*2;break;case void 0:this.x+=t,this.y+=t,this.width-=t*2,this.height-=t*2;break}}translate(t,i){return this.x+=t,this.y+=i,this}[vr](t,i){return new Rn(this.x*(1-i)+t.x*i,this.y*(1-i)+t.y*i,this.width*(1-i)+t.width*i,this.height*(1-i)+t.height*i)}};Xn.zero=Object.freeze(new Xn(0,0,0,0)),Xn.NaN=Object.freeze(new Xn(NaN,NaN,NaN,NaN));var R=Xn;import{arraysEqual as N0}from"ag-charts-core";var qn=(e,t)=>e===t;function P(e){return function(t,i){const s=`__${i}`;t[i]||E0(t,i,s,e)}}function O0(e){return P(e)}function Ce(e){return P(e)}function $d(e){const t=e??{};return t.equals=N0,P(e)}function E0(e,t,i,s){const{changeCb:n,convertor:a,checkDirtyOnAssignment:r=!1}=s??{},o={changeCb:n,checkDirtyOnAssignment:r,convertor:a},l=F0(i,R0(P0(z0(i,o),o),o),o);Object.defineProperty(e,t,{set:l,get:function(){return this[i]},enumerable:!0,configurable:!0})}function P0(e,t){const{convertor:i}=t;return i?function(s){e.call(this,i(s))}:e}var Xd=Symbol("no-change");function R0(e,t){const{changeCb:i}=t;return i?function(s){const n=e.call(this,s);return n!==Xd&&i.call(this,this),n}:e}function F0(e,t,i){const{checkDirtyOnAssignment:s}=i;return s?function(n){const a=t.call(this,n);return n?._dirty===!0&&this.markDirty(e),a}:t}function z0(e,t){const{equals:i=qn}=t;return function(s){const n=this[e];return i(s,n)?Xd:(this[e]=s,this.onChangeDetection(e),s)}}var Jl=(e,t)=>Math.sign(e-t);function qd(e,t){if(typeof e=="number"&&typeof t=="number")return Jl(e,t);const i=typeof e=="number"?[e]:e,s=typeof t=="number"?[t]:t,n=Math.min(i.length,s.length);for(let a=0;a<n;a+=1){const r=Jl(i[a],s[a]);if(r!==0)return r}return Jl(i.length,s.length)}var j0=5,Qn=class Eu{constructor(t){this.serialNumber=Eu._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=k0(this),this.name=void 0,this.transitionOut=void 0,this.pointerEvents=0,this._datum=void 0,this._previousDatum=void 0,this.scene=void 0,this._debugDirtyProperties=void 0,this.parentNode=void 0,this.cachedBBox=void 0,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.batchLevel=0,this.batchDirty=!1,this.name=t?.name,this.tag=t?.tag??NaN,this.zIndex=t?.zIndex??0,this.scene=t?.scene,(t?.debu