ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
23 lines • 1.68 MB
JavaScript
(function(If,Dn){typeof exports=="object"&&typeof module=="object"?module.exports=Dn():typeof define=="function"&&define.amd?define("agCharts",[],Dn):typeof exports=="object"?exports.agCharts=Dn():If.agCharts=Dn()})(this,()=>{var If={},Dn={exports:If};if(typeof GLt>"u")var GLt=function(e){throw new Error("Unknown module: "+e)};var lb=Object.defineProperty,RE=Object.getOwnPropertyDescriptor,PE=Object.getOwnPropertyNames,g6=Object.prototype.hasOwnProperty,k=(t,e)=>function(){return t&&(e=(0,t[PE(t)[0]])(t=0)),e},mo=(t,e)=>{for(var i in e)lb(t,i,{get:e[i],enumerable:!0})},f6=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of PE(e))!g6.call(t,o)&&o!==i&&lb(t,o,{get:()=>e[o],enumerable:!(s=RE(e,o))||s.enumerable});return t},C=t=>f6(lb({},"__esModule",{value:!0}),t),v=(t,e,i,s)=>{for(var o=s>1?void 0:s?RE(e,i):e,a=t.length-1,n;a>=0;a--)(n=t[a])&&(o=(s?n(e,i,o):n(o))||o);return s&&o&&lb(e,i,o),o},tt={};mo(tt,{error:()=>zE,errorOnce:()=>b6,log:()=>m6,logGroup:()=>v6,reset:()=>S6,table:()=>y6,warn:()=>BE,warnOnce:()=>x6});function m6(...t){console.log(...t)}function BE(t,...e){console.warn(`AG Charts - ${t}`,...e)}function zE(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)}function y6(...t){console.table(...t)}function x6(t,...e){const i=`Logger.warn: ${t}`;ip.has(i)||(BE(t,...e),ip.add(i))}function b6(t,...e){const i=`Logger.error: ${t}`;ip.has(i)||(zE(t,...e),ip.add(i))}function S6(){ip.clear()}function v6(t,e){console.groupCollapsed(t);try{return e()}finally{console.groupEnd()}}var ip,M6=k({"packages/ag-charts-core/src/globals/logger.ts"(){"use strict";ip=new Set}}),Kk,D6=k({"packages/ag-charts-core/src/interfaces/moduleDefinition.ts"(){"use strict";Kk=(t=>(t.Axis="axis",t.Chart="chart",t.Preset="preset",t.Plugin="plugin",t.Series="series",t))(Kk||{})}}),Ro={};mo(Ro,{detectChartDefinition:()=>C6,getAxisModule:()=>N6,getSeriesModule:()=>L6,hasModule:()=>I6,listModulesByType:()=>T6,register:()=>FE,registerMany:()=>k6,reset:()=>A6});function FE(t){const e=al.get(t.name);if(e&&(e.enterprise||!t.enterprise))throw new Error(`AG Charts - Module '${t.name}' already registered`);al.set(t.name,t)}function k6(t){for(const e of t)FE(e)}function A6(){al.clear()}function I6(t){return al.has(t)}function*T6(t){for(const e of al.values())e.type===t&&(yield e)}function C6(t){for(const e of al.values())if(O6(e)&&e.detect(t))return e;throw new Error("AG Charts - Unknown chart type; Check options are correctly structured and series types are specified")}function L6(t){const e=al.get(t);if(E6(e))return e}function N6(t){const e=al.get(t);if(w6(e))return e}function O6(t){return t?.type==="chart"}function w6(t){return t?.type==="axis"}function E6(t){return t?.type==="series"}var al,_6=k({"packages/ag-charts-core/src/globals/moduleRegistry.ts"(){"use strict";al=new Map}}),R6=k({"packages/ag-charts-core/src/globals/index.ts"(){"use strict";M6(),_6()}}),P6=k({"packages/ag-charts-core/src/interfaces/globalTypes.ts"(){"use strict"}}),Tf,B6=k({"packages/ag-charts-core/src/classes/eventEmitter.ts"(){"use strict";Tf=class{constructor(){this.events=new Map}on(t,e){return this.events.has(t)||this.events.set(t,new Set),this.events.get(t)?.add(e),()=>this.off(t,e)}off(t,e){const i=this.events.get(t);i&&(i.delete(e),i.size===0&&this.events.delete(t))}emit(t,e){this.events.get(t)?.forEach(i=>i(e))}clear(t){t?this.events.delete(t):this.events.clear()}}}});function cb(t,e="and",i=String,s=1/0){if(t.length===1)return i(t[0]);t=t.map(i);const o=t.pop();if(t.length>=s){const a=t.length-(s-1);return`${t.slice(0,s-1).join(", ")}, and ${a} more ${e} ${o}`}return`${t.join(", ")} ${e} ${o}`}function hb(t,e=1/0){if(typeof t=="number"){if(isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}const i=JSON.stringify(t)??typeof t;return i.length>e?`${i.slice(0,e)}... (+${i.length-e} characters)`:i}function GE(t){let e=1;for(let i=0;i<t.length;i++)t.charCodeAt(i)===10&&e++;return e}function jE(t,e){if(t===e)return 0;const[i,s]=t.length<e.length?[t,e]:[e,t],o=i.length,a=s.length;let n=new Array(o+1).fill(0).map((l,c)=>c),r=new Array(o+1);for(let l=1;l<=a;l++){r[0]=l;for(let c=1;c<=o;c++){const h=s[l-1]===i[c-1]?0:1;r[c]=Math.min(n[c]+1,r[c-1]+1,n[c-1]+h)}[n,r]=[r,n]}return n[o]}var VE=k({"packages/ag-charts-core/src/utils/strings.ts"(){"use strict"}});function cr(t){return t?kn.document?.[t]:kn.document}function xe(t){return t?kn.window?.[t]:kn.window}function WE(t){kn.document=t}function UE(t){kn.window=t}var kn,ub=k({"packages/ag-charts-core/src/utils/dom/globalsProxy.ts"(){"use strict";kn={},typeof window<"u"?kn.window=window:typeof global<"u"&&(kn.window=global.window),typeof document<"u"?kn.document=document:typeof global<"u"&&(kn.document=global.document)}});function Bt(t,e,i){const s=cr().createElement(t);if(typeof e=="object"&&(i=e,e=void 0),e)for(const o of e.split(" "))s.classList.add(o);return i&&Object.assign(s.style,i),s}function os(t){return cr().createElementNS("http://www.w3.org/2000/svg",t)}var HE=k({"packages/ag-charts-core/src/utils/dom/domElements.ts"(){"use strict";ub()}});function YE(t,e){const i=cr("body"),s=Bt("a",{display:"none"});s.href=t,s.download=e,i.appendChild(s),s.click(),setTimeout(()=>i.removeChild(s))}var z6=k({"packages/ag-charts-core/src/utils/dom/domDownload.ts"(){"use strict";HE(),ub()}});function KE(t){const e=xe("Option"),{style:i}=new e;return i.color=t,i.color||null}var F6=k({"packages/ag-charts-core/src/utils/dom/domUtils.ts"(){"use strict";ub()}}),$E=k({"packages/ag-charts-core/src/utils/dom/index.ts"(){"use strict";z6(),HE(),F6(),ub()}});function sp(t){return t!=null}function Et(t){return Array.isArray(t)}function $k(t){return typeof t=="boolean"}function Fh(t){return t instanceof Date}function op(t){return Fh(t)&&!isNaN(Number(t))}function XE(t){return t instanceof RegExp}function nl(t){return typeof t=="function"}function li(t){return typeof t=="object"&&t!==null&&!Et(t)}function G6(t){return Et(t)||Ye(t)}function Ye(t){return typeof t=="object"&&t!==null&&t.constructor?.name==="Object"}function Wi(t){return typeof t=="string"}function na(t){return typeof t=="number"}function Zt(t){return Number.isFinite(t)}function ZE(t){return typeof window<"u"&&t instanceof HTMLElement}function j6(t,e){return Wi(e)&&Object.keys(t).includes(e)}function db(t,e){return Object.values(t).includes(e)}function qE(t){return typeof t=="symbol"}function Xk(t){return Wi(t)&&KE(t)!=null}var Zk=k({"packages/ag-charts-core/src/utils/typeGuards.ts"(){"use strict";$E()}});function za(t,e,i=""){if(!li(t)){const l=QE(i,t,"an object",!0);return{valid:null,errors:[new Cf(l,i,!0)]}}const s=[],o=new Set(Object.keys(t)),a=[],n={};function r(l){return Et(e)?`${i}[${l}]`:i?`${i}.${l}`:l}for(const l of Object.keys(e)){const c=e[l],h=t[l],u=c[qk];if(o.delete(l),typeof h>"u"&&(s.push(l),!u))continue;const d=r(l);if(nl(c)){const p={options:t,path:d};if(c(h,p))n[l]=p.result?.valid??h;else if(!p.result){const g=QE(d,h,c,u);a.push(new Cf(g,i,u))}p.result&&a.push(...p.result.errors)}else{const p=za(h,c,d);p.valid!=null&&(n[l]=p.valid),a.push(...p.errors)}}for(const l of o){if(typeof t[l]>"u")continue;const h=V6(l,r(l),s);a.push(new Cf(h,i,void 0,!0))}return{valid:n,errors:a}}function QE(t,e,i,s){const o=Wi(i)?i:i[dc],a=o?`; expecting ${o}`:"",n=t?`Option \`${t}\``:"Value";return s&&e==null?`${n} is required and has not been provided${a}, ignoring.`:`${n} cannot be set to \`${hb(e,50)}\`${a}, ignoring.`}function V6(t,e,i){const s=W6(t,i),o=s?`; Did you mean \`${s}\`? Ignoring.`:", ignoring.";return`Unknown option \`${e}\`${o}`}function W6(t,e,i=2){let s=1/0;const o=t.toLowerCase();return e.reduce((a,n)=>{const r=jE(o,n.toLowerCase());return s>r&&r<=i?(s=r,n):a},null)}function ae(t,e){return Object.assign(nl(t)?(i,s)=>t(i,s):{...t},{[dc]:e})}function Mt(t){return Object.assign(nl(t)?(e,i)=>t(e,i):Gh(t),{[qk]:!0,[dc]:t[dc]})}function _t(...t){li(t[0])&&(t=Object.values(t[0]));const e=cb(t,"or",i=>`'${i}'`);return ae(i=>t.includes(i),`a keyword such as ${e}`)}var dc,qk,Cf,Gh,Qk,as,Ge,Lf,JE,Fa,at,ne,Pt,pc,yo,vt,jh,rt,ap,pb,Jk,ot,np,Ce,Vh,Nf,gs,tA,Oe,rl,Of,t_=k({"packages/ag-charts-core/src/utils/validation.ts"(){"use strict";VE(),Zk(),dc=Symbol("description"),qk=Symbol("required"),Cf=class{constructor(t,e,i,s){this.message=t,this.path=e,this.required=i,this.unknown=s}toString(){return this.message}},Gh=(t,e="an object")=>ae((i,s)=>(s.result=za(i,t,s.path),!s.result.errors.some(o=>o.required&&o.path===s.path)),e),Qk=(t,e="an object")=>ae((i,s)=>(s.result=za(i,t,s.path),s.result.errors=s.result.errors.filter(o=>!o.unknown),!s.result.errors.some(o=>o.required&&o.path===s.path)),e),as=(...t)=>ae((e,i)=>t.every(s=>{const o=s(e,i);return i.result&&!o&&delete i.result,o}),t.map(e=>e[dc]).filter(Boolean).join(" and ")),Ge=(...t)=>ae((e,i)=>t.some(s=>{const o=s(e,i);return i.result&&!o&&delete i.result,o}),t.map(e=>e[dc]).filter(Boolean).join(" or ")),Lf=t=>Zt(t)||op(t),JE=t=>Fh(t)||(Zt(t)||Wi(t))&&op(new Date(t)),Fa=ae(Et,"an array"),at=ae($k,"a boolean"),ne=ae(nl,"a function"),Pt=ae(Xk,"a color string"),pc=ae(JE,"a date"),yo=ae(sp,"a defined value"),vt=ae(Zt,"a number"),jh=ae(li,"an object"),rt=ae(Wi,"a string"),ap=(t,e=1/0)=>{let i;return e===1/0?i=`an array of at least ${t} items`:t===e?i=`an array of exactly ${t} items`:t===0?i=`an array of no more than ${e} items`:i=`an array of at least ${t} and no more than ${e} items`,ae(s=>Et(s)&&s.length>=t&&s.length<=e,i)},pb=(t,e=!0)=>ae(i=>Zt(i)&&(i>t||e&&i===t),`a number greater than ${e?"or equal to ":""}${t}`),Jk=(t,e)=>ae(i=>Zt(i)&&i>=t&&i<=e,`a number between ${t} and ${e} inclusive`),ot=pb(0),np=pb(0,!1),Ce=Jk(0,1),Vh=t=>ae((e,{options:i})=>!Lf(e)||!Lf(i[t])||e<i[t],`the value to be less than \`${t}\``),Nf=t=>ae((e,{options:i})=>!Lf(e)||!Lf(i[t])||e>i[t],`the value to be greater than \`${t}\``),gs=t=>ae(e=>t===e,`the value ${JSON.stringify(t)}`),tA=(t,e)=>ae(i=>i instanceof t,e??`an instance of ${t.name}`),Oe=(t,e)=>ae((i,s)=>Et(i)&&i.every(o=>{const a=t(o,s);return delete s.result,a}),e??`${t[dc]} array`),rl=(t,e="an object array")=>ae((i,s)=>{if(!Et(i))return!1;const o=[],a=[];for(let n=0;n<i.length;n++){const r=`${s.path}[${n}]`,l=za(i[n],t,r);a.push(...l.errors),l.errors.some(c=>c.required&&c.path===r)||o.push(l.valid)}return s.result={valid:o,errors:a},!0},e),Of=(t,e="an object")=>{const i=Qk({type:Mt(_t(...Object.keys(t)))});return ae((s,o)=>{if(i(s,o)){const a=s.type,n={type:Mt(gs(a)),...t[a]},r=Gh(n)(s,o);if(o.result)for(const l of o.result.errors)l.message+=` (type="${a}")`;return r}return!1},e)}}}),e_,i_,wf,gb,Ef,Es,eA,iA,s_,o_,a_,_f,Po,Ga,xo,U6=k({"packages/ag-charts-core/src/options/commonOptionsDefs.ts"(){"use strict";t_(),e_=Gh({color:Pt,stop:Ce},""),i_=ae(t=>{let e=-1/0;for(const i of t)if(i?.stop!=null){if(i.stop<e)return!1;e=i.stop}return!0},"color stops to be defined in ascending order"),wf=as(ap(2),as(Oe(e_),i_)),gb=_t("axis","item","series"),Ef=Of({gradient:{gradient:_t("linear","radial","conic"),bounds:gb,colorStops:Mt(wf),rotation:vt,reverse:at}},"a gradient object with color stops"),Es={stroke:Pt,strokeWidth:ot,strokeOpacity:Ce},eA=Gh({type:Mt(gs("gradient")),gradient:Mt(_t("linear","radial","conic")),bounds:Mt(gb),colorStops:Mt(Ge(wf,as(ap(2),Oe(Pt)))),rotation:Mt(vt),reverse:Mt(at)}),iA=Gh({type:Mt(gs("pattern")),pattern:Mt(_t("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses")),width:Mt(ot),height:Mt(ot),fill:Mt(Pt),fillOpacity:Mt(Ce),backgroundFill:Mt(Pt),backgroundFillOpacity:Mt(Ce),padding:Mt(ot),rotation:Mt(vt),stroke:Mt(Pt),strokeWidth:Mt(ot),strokeOpacity:Mt(Ce)}),s_={gradient:_t("linear","radial","conic"),bounds:gb,reverse:at},o_={rotation:vt,padding:ot},a_=Of({gradient:{...s_,colorStops:wf,rotation:vt},pattern:{...o_,pattern:_t("vertical-lines","horizontal-lines","forward-slanted-lines","backward-slanted-lines","circles","squares","triangles","diamonds","stars","hearts","crosses"),width:ot,height:ot,fill:Pt,fillOpacity:Ce,backgroundFill:Pt,backgroundFillOpacity:Ce,...Es}},"a color object"),_f=Ge(Pt,a_),Po={fill:_f,fillOpacity:Ce},Po.fillGradientDefaults=eA,Po.fillPatternDefaults=iA,Ga={lineDash:Oe(ot),lineDashOffset:vt},xo={color:Pt,fontFamily:rt,fontSize:ot,fontStyle:_t("normal","italic","oblique"),fontWeight:Ge(ot,_t("normal","bold","bolder","lighter"))}}});function Rf(t){return typeof t>"u"?[]:Array.isArray(t)?t:[t]}function n_(t){return Array.from(new Set(t))}function fb(t,e){return t.reduce((i,s)=>{const o=e(s);return i[o]??(i[o]=[]),i[o].push(s),i},{})}function An(t,e){if(t==null||e==null||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(Array.isArray(t[i])&&Array.isArray(e[i])){if(!An(t[i],e[i]))return!1}else if(t[i]!==e[i])return!1;return!0}function rp(t,e,i=0){if(t.length===0)return[];const s=[];for(let o=0;o<e;o++)s.push(t.at((o+i)%t.length));return s}function r_(t,e){const i=new Map;return e.forEach((s,o)=>{i.set(s,o)}),t.sort((s,o)=>{const a=i.get(s)??1/0,n=i.get(o)??1/0;return a-n})}var H6=k({"packages/ag-charts-core/src/utils/arrays.ts"(){"use strict"}});function sA(t,e,i){if(t>e)return;let s;for(;e>=t;){const o=Math.floor((e+t)/2);i(o)?(s=o,t=o+1):e=o-1}return s}function oA(t,e,i){if(t>e)return;let s;for(;e>=t;){const o=Math.floor((e+t)/2);i(o)?(s=o,e=o-1):t=o+1}return s}function Y6(t,e,i){if(t>e)return;let s;for(;e>=t;){const o=Math.floor((e+t)/2),a=i(o);a==null?e=o-1:(s=a,t=o+1)}return s}function l_(t,e,i){if(t>e)return;let s;for(;e>=t;){const o=Math.floor((e+t)/2),a=i(o);a==null?t=o+1:(s=a,e=o-1)}return s}var K6=k({"packages/ag-charts-core/src/utils/binarySearch.ts"(){"use strict"}});function c_(t,e){const i=Math.max(t.length,e.length),s=new Set,o=new Set;for(let a=0;a<i;a++){const n=t[a],r=e[a];n!==r&&(o.has(r)?o.delete(r):r&&s.add(r),s.has(n)?s.delete(n):n&&o.add(n))}return{changed:s.size>0||o.size>0,added:s,removed:o}}var $6=k({"packages/ag-charts-core/src/utils/diff.ts"(){"use strict"}});function X6(t,e=0,i){const{leading:s=!1,trailing:o=!0,maxWait:a=1/0}=i??{};let n,r;if(a<e)throw new Error("Value of maxWait cannot be lower than waitMs.");function l(...c){if(s&&!r){r=Date.now(),n=setTimeout(()=>r=null,e),t(...c);return}let h=e;if(a!==1/0&&r){const u=Date.now()-r;e>a-u&&(h=a-u)}clearTimeout(n),r??(r=Date.now()),n=setTimeout(()=>{r=null,o&&t(...c)},h)}return Object.assign(l,{cancel(){clearTimeout(n),r=null}})}function aA(t,e,i){const{leading:s=!0,trailing:o=!0}=i??{};let a,n,r=!1;function l(){o&&n?(a=setTimeout(l,e),t(...n)):r=!1,n=null}function c(...h){r?n=h:(r=!0,a=setTimeout(l,e),s?t(...h):n=h)}return Object.assign(c,{cancel(){clearTimeout(a),r=!1,n=null}})}var Z6=k({"packages/ag-charts-core/src/utils/functions.ts"(){"use strict"}});function*gc(...t){for(const e of t)yield*e}function h_(t){return t!=null&&typeof t=="object"&&Symbol.iterator in t?t:[t]}function lp(t){for(const e of t)return e;throw new Error("AG Charts - no first() value found")}function*ja(t){const e=[void 0,void 0];for(const i of Object.keys(t))e[0]=i,e[1]=t[i],yield e}var q6=k({"packages/ag-charts-core/src/utils/iterators.ts"(){"use strict"}});function Tt(t,e,i){return Math.min(i,Math.max(t,e))}function u_(t,e,i=1e-10){return t>=e[0]-i&&t<=e[1]+i}function In(t,e,i=1e-10){return t===e||Math.abs(t-e)<i}function mb(t){return Math.sign(t)===-1||Object.is(t,-0)}function d_(t){return t%1===0}function nA(t,e=2){const i=10**e;return Math.round(t*i)/i}function rA(t,e){return Math.floor(t%e+(t<0?Math.abs(e):0))}function yb(t){if(Math.floor(t)===t)return 0;let e=String(t),i=0;if(t<1e-6||t>=1e21){let o;[e,o]=e.split("e"),o!=null&&(i=Number(o))}const s=e.split(".")[1]?.length??0;return Math.max(s-i,0)}var p_=k({"packages/ag-charts-core/src/utils/numbers.ts"(){"use strict"}});function g_(t){if(!Wi(t))return!1;const e=uA.exec(t);return hA.test(e?e[2]:t)}function lA(t){let e,i;const s=uA.exec(t);s&&([,e,t,i]=s);const o=hA.exec(t);if(!o)throw new Error(`The number formatter is invalid: ${t}`);const[,a,n,r,l,c,h,u,d,p,g]=o;return{fill:a,align:n,sign:r,symbol:l,zero:c,width:parseInt(h),comma:u,precision:parseInt(d),trim:!!p,type:g,prefix:e,suffix:i}}function cA(t){const e=typeof t=="string"?lA(t):t,{fill:i,align:s,sign:o="-",symbol:a,zero:n,width:r,comma:l,type:c,prefix:h="",suffix:u="",precision:d}=e;let{trim:p}=e;const g=d==null||isNaN(d);let f;if(!c)f=ra.g,p=!0;else if(c in ra&&c in Wh)f=g?Wh[c]:ra[c];else if(c in ra)f=ra[c];else if(c in Wh)f=Wh[c];else throw new Error(`The number formatter type is invalid: ${c}`);let x;return g?x=c?6:12:x=d,y=>{let b=f(y,x);return p&&(b=Q6(b)),l&&(b=J6(b,l)),b=eX(y,b,o),a&&a!=="#"&&(b=`${a}${b}`),a==="#"&&c==="x"&&(b=`0x${b}`),c==="s"&&(b=`${b}${tX(y)}`),(c==="%"||c==="p")&&(b=`${b}%`),r!=null&&!isNaN(r)&&(b=iX(b,r,i??n,s)),b=`${h}${b}${u}`,b}}function xb(t){return Math.floor(Math.abs(t))}function Q6(t){return t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function J6(t,e){let i=t.indexOf(".");i<0&&(i=t.length);const s=t.substring(0,i).split(""),o=t.substring(i);for(let a=s.length-3;a>0;a-=3)s.splice(a,0,e);return`${s.join("")}${o}`}function tX(t){return m_[f_(t)]}function f_(t){return Tt(dA,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,pA)}function eX(t,e,i=""){if(i==="(")return t>=0?e:`(${e})`;const s=i==="+"?"+":"";return`${t>=0?s:y_}${e}`}function iX(t,e,i=" ",s=">"){let o=t;if(s===">"||!s)o=o.padStart(e,i);else if(s==="<")o=o.padEnd(e,i);else if(s==="^"){const a=Math.max(0,e-o.length),n=Math.ceil(a/2),r=Math.floor(a/2);o=o.padStart(n+o.length,i),o=o.padEnd(r+o.length,i)}return o}var hA,uA,Wh,ra,dA,pA,m_,y_,sX=k({"packages/ag-charts-core/src/utils/numberFormat.ts"(){"use strict";p_(),Zk(),hA=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,uA=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/,Wh={b:t=>xb(t).toString(2),c:t=>String.fromCharCode(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>xb(t).toString(8),x:t=>xb(t).toString(16),X:t=>Wh.x(t).toUpperCase(),n:t=>Wh.d(t),"%":t=>`${xb(t*100).toFixed(0)}`},ra={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>ra.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>ra.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),s=Math.floor(Math.log10(i));return s>=-4&&s<e?i.toFixed(e-1-s):i.toExponential(e-1)},G:(t,e)=>ra.g(t,e).toUpperCase(),n:(t,e)=>ra.g(t,e),p:(t,e)=>ra.r(t*100,e),r:(t,e)=>{if(t===0)return"0";const i=Math.abs(t),o=Math.floor(Math.log10(i))-(e-1);if(o<=0)return i.toFixed(-o);const a=10**o;return(Math.round(i/a)*a).toFixed()},s:(t,e)=>{const i=f_(t);return ra.r(t/10**i,e)},"%":(t,e)=>ra.f(t*100,e)},dA=-24,pA=24,m_={[dA]:"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",[pA]:"Y"},y_="\u2212"}}),et={};mo(et,{EventEmitter:()=>Tf,Logger:()=>tt,ModuleRegistry:()=>Ro,ModuleType:()=>Kk,ValidationError:()=>Cf,and:()=>as,array:()=>Fa,arrayLength:()=>ap,arrayOf:()=>Oe,arrayOfDefs:()=>rl,arraysEqual:()=>An,attachDescription:()=>ae,boolean:()=>at,callback:()=>ne,circularSliceArray:()=>rp,clamp:()=>Tt,color:()=>Pt,colorUnion:()=>_f,constant:()=>gs,countFractionDigits:()=>yb,countLines:()=>GE,createElement:()=>Bt,createNumberFormatter:()=>cA,createSvgElement:()=>os,date:()=>pc,debounce:()=>X6,defined:()=>yo,diffArrays:()=>c_,downloadUrl:()=>YE,entries:()=>ja,fillGradientDefaults:()=>eA,fillOptionsDef:()=>Po,fillPatternDefaults:()=>iA,findMaxIndex:()=>sA,findMaxValue:()=>Y6,findMinIndex:()=>oA,findMinValue:()=>l_,first:()=>lp,fontOptionsDef:()=>xo,getDocument:()=>cr,getWindow:()=>xe,gradientColorStops:()=>wf,gradientStrict:()=>Ef,greaterThan:()=>Nf,groupBy:()=>fb,inRange:()=>u_,instanceOf:()=>tA,isArray:()=>Et,isBoolean:()=>$k,isColor:()=>Xk,isDate:()=>Fh,isDefined:()=>sp,isEnumKey:()=>j6,isEnumValue:()=>db,isFiniteNumber:()=>Zt,isFunction:()=>nl,isHtmlElement:()=>ZE,isInteger:()=>d_,isNegative:()=>mb,isNumber:()=>na,isNumberEqual:()=>In,isObject:()=>li,isObjectLike:()=>G6,isPlainObject:()=>Ye,isRegExp:()=>XE,isString:()=>Wi,isSymbol:()=>qE,isValidDate:()=>op,isValidNumberFormat:()=>g_,iterate:()=>gc,joinFormatted:()=>cb,lessThan:()=>Vh,levenshteinDistance:()=>jE,lineDashOptionsDef:()=>Ga,modulus:()=>rA,number:()=>vt,numberMin:()=>pb,numberRange:()=>Jk,object:()=>jh,optionsDefs:()=>Gh,or:()=>Ge,parseColor:()=>KE,parseNumberFormat:()=>lA,partialDefs:()=>Qk,positiveNumber:()=>ot,positiveNumberNonZero:()=>np,ratio:()=>Ce,required:()=>Mt,roundTo:()=>nA,setDocument:()=>WE,setWindow:()=>UE,sortBasedOnArray:()=>r_,string:()=>rt,stringifyValue:()=>hb,strokeOptionsDef:()=>Es,throttle:()=>aA,toArray:()=>Rf,toIterable:()=>h_,typeUnion:()=>Of,union:()=>_t,unique:()=>n_,validate:()=>za});var P=k({"packages/ag-charts-core/src/main.ts"(){"use strict";R6(),P6(),D6(),B6(),U6(),$E(),H6(),K6(),$6(),Z6(),q6(),sX(),p_(),VE(),Zk(),t_()}}),Pf,x_,Tn,hr=k({"packages/ag-charts-community/src/module/module.ts"(){"use strict";Pf=class{constructor(){this.destroyFns=[]}destroy(){for(const t of this.destroyFns)t()}},x_=class{constructor(){this.modules=[],this.dependencies=new Map,this.modulesByOptionKey=new Map}register(...t){for(const e of t){this.registerDependencies(e);const i=this.modules.find(s=>e.type===s.type&&("optionsKey"in e&&"optionsKey"in s?e.optionsKey===s.optionsKey:!0)&&e.identifier===s.identifier);if(i){if(e.packageType==="enterprise"&&i.packageType==="community"){const s=this.modules.indexOf(i);this.modules.splice(s,1,e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}else this.modules.push(e),"optionsKey"in e&&this.modulesByOptionKey.set(e.optionsKey,e)}}hasEnterpriseModules(){return this.modules.some(t=>t.packageType==="enterprise")}*byType(...t){const e=new Set,i=this.modules.filter(a=>t.includes(a.type)),s=a=>{const n=this.dependencies.get(a);return n?.flatMap(s).concat(n)??[]},o=[];for(const a of i){const n="optionsKey"in a?a.optionsKey:a.contextKey;if(!e.has(n)){for(const r of s(n)){if(e.has(r))continue;const l=this.modulesByOptionKey.get(r);if(!l){o.push(r);continue}t.includes(l.type)&&(yield l,e.add(r))}yield a,e.add(n)}}if(o.length>0)throw new Error(`Could not resolve module dependencies: ${o}`)}registerDependencies(t){if(t.dependencies==null||t.dependencies.length===0)return;const e="optionsKey"in t?t.optionsKey:t.contextKey;this.dependencies.set(e,t.dependencies)}},Tn=new x_}});function oX(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height}function aX(t){return t==null||t.height===0||t.width===0||isNaN(t.height)||isNaN(t.width)}function nX(t){let{x:e,y:i,width:s,height:o}=t;return(s==null||s>0)&&(o==null||o>0)?t:(e!=null&&s!=null&&s<0&&(s=-s,e=e-s),i!=null&&o!=null&&o<0&&(o=-o,i=i-o),{x:e,y:i,width:s,height:o})}var Bf,bb=k({"packages/ag-charts-community/src/util/bboxinterface.ts"(){"use strict";Bf={containsPoint:oX,isEmpty:aX,normalize:nX}}}),zf,Ff,gA=k({"packages/ag-charts-community/src/util/interpolating.ts"(){"use strict";zf=Symbol("interpolate"),Ff=t=>t[zf]!=null}});function Sb(t,e,i,s=1/0){const o={nearest:void 0,distanceSquared:s};for(const a of i){const n=a.distanceSquared(t,e);if(n===0)return{nearest:a,distanceSquared:0};n<o.distanceSquared&&(o.nearest=a,o.distanceSquared=n)}return o}function rX(t,e,i,s=1/0){const{x:o=t,y:a=e}=i.transformPoint?.(t,e)??{},n={nearest:void 0,distanceSquared:s};for(const r of i.children){const{nearest:l,distanceSquared:c}=r.nearestSquared(o,a,n.distanceSquared);if(c===0)return{nearest:l,distanceSquared:c};c<n.distanceSquared&&(n.nearest=l,n.distanceSquared=c)}return n}var vb=k({"packages/ag-charts-community/src/util/nearest.ts"(){"use strict"}}),cp,pt,Xt=k({"packages/ag-charts-community/src/scene/bbox.ts"(){"use strict";P(),bb(),gA(),vb(),cp=class Af{constructor(e,i,s,o){this.x=e,this.y=i,this.width=s,this.height=o}static fromDOMRect({x:e,y:i,width:s,height:o}){return new Af(e,i,s,o)}static merge(e){let i=1/0,s=1/0,o=-1/0,a=-1/0;for(const n of e)n.x<i&&(i=n.x),n.y<s&&(s=n.y),n.x+n.width>o&&(o=n.x+n.width),n.y+n.height>a&&(a=n.y+n.height);return new Af(i,s,o-i,a-s)}static nearestBox(e,i,s){return Sb(e,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON(){return{}}}}clone(){const{x:e,y:i,width:s,height:o}=this;return new Af(e,i,s,o)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,i){return Bf.containsPoint(this,e,i)}intersection(e){if(!this.collidesBBox(e))return;const i=Tt(e.x,this.x,e.x+e.width),s=Tt(e.y,this.y,e.y+e.height),o=Tt(e.x,this.x+this.width,e.x+e.width),a=Tt(e.y,this.y+this.height,e.y+e.height);return new Af(i,s,o-i,a-s)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,i){if(this.containsPoint(e,i))return 0;const s=e-Tt(this.x,e,this.x+this.width),o=i-Tt(this.y,i,this.y+this.height);return s*s+o*o}shrink(e,i){if(typeof e=="number")this.applyMargin(e,i);else for(const s of Object.keys(e)){const o=e[s];typeof o=="number"&&this.applyMargin(o,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(e,i){if(typeof e=="number")this.applyMargin(-e,i);else for(const s of Object.keys(e)){const o=e[s];typeof o=="number"&&this.applyMargin(-o,s)}return this}applyMargin(e,i){switch(i){case"top":this.y+=e;case"bottom":this.height-=e;break;case"left":this.x+=e;case"right":this.width-=e;break;case"vertical":this.y+=e,this.height-=e*2;break;case"horizontal":this.x+=e,this.width-=e*2;break;case void 0:this.x+=e,this.y+=e,this.width-=e*2,this.height-=e*2;break}}translate(e,i){return this.x+=e,this.y+=i,this}[zf](e,i){return new Af(this.x*(1-i)+e.x*i,this.y*(1-i)+e.y*i,this.width*(1-i)+e.width*i,this.height*(1-i)+e.height*i)}},cp.zero=Object.freeze(new cp(0,0,0,0)),cp.NaN=Object.freeze(new cp(NaN,NaN,NaN,NaN)),pt=cp}}),b_,fA,S_,ee,Ui=k({"packages/ag-charts-community/src/util/debug.ts"(){"use strict";P(),b_=2e3,fA=Date.now(),S_=()=>{const t=Date.now()-fA;if(t>b_){const e=(Math.floor(t/100)/10).toFixed(1);tt.log(`**** ${e}s since last log message ****`)}fA=Date.now()},ee={create(...t){return Object.assign((...i)=>{ee.check(...t)&&(typeof i[0]=="function"&&(i=Rf(i[0]())),S_(),tt.log(...i))},{check:()=>ee.check(...t),group:(i,s)=>ee.check(...t)?tt.logGroup(i,s):s()})},check(...t){return t.length===0&&t.push(!0),Rf(xe("agChartsDebug")).some(i=>t.includes(i))},inDevelopmentMode(t){if(ee.check("dev"))return t()}}}});function v_({context:t,pixelRatio:e,width:i,height:s}){t.save(),t.resetTransform(),t.clearRect(0,0,Math.ceil(i*e),Math.ceil(s*e)),t.restore()}function M_(t){if(ee.check("canvas")){const e=t.save.bind(t),i=t.restore.bind(t);let s=0;Object.assign(t,{save(){e(),s++},restore(){if(s===0)throw new Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(s!==0)throw new Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}var D_=k({"packages/ag-charts-community/src/scene/canvas/canvasUtil.ts"(){"use strict";Ui()}});function k_(t,e,i){return[Math.floor(t*i),Math.floor(e*i)]}var Mb,mA=k({"packages/ag-charts-community/src/scene/canvas/hdpiOffscreenCanvas.ts"(){"use strict";D_(),Mb=class{constructor(t){const{width:e,height:i,pixelRatio:s,willReadFrequently:o=!1}=t;this.width=e,this.height=i,this.pixelRatio=s;const[a,n]=k_(e,i,s);this.canvas=new OffscreenCanvas(a,n),this.context=this.canvas.getContext("2d",{willReadFrequently:o}),this.context.setTransform(s,0,0,s,0,0),M_(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.canvas,e,i)}transferToImageBitmap(){return this.canvas.transferToImageBitmap()}resize(t,e,i){if(!(t>0&&e>0))return;const{canvas:s,context:o}=this;if(t!==this.width||e!==this.height||i!==this.pixelRatio){const[a,n]=k_(t,e,i);s.width=a,s.height=n}o.setTransform(i,0,0,i,0,0),this.width=t,this.height=e,this.pixelRatio=i}clear(){v_(this)}destroy(){this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0),this.canvas=null,this.context=null,Object.freeze(this)}}}});function lX(){Db.clear()}function la(t){const e=t.constructor,i=Object.hasOwn(e,"className")?e.className:e.name;if(!i)throw new Error(`The ${e} is missing the 'className' property.`);const s=(Db.get(i)??0)+1;return Db.set(i,s),`${i}-${s}`}function yA(){return crypto.randomUUID?.()??cX()}function cX(){const t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let e="";for(let i=0;i<t.length;i++)(i===4||i===6||i===8||i===10)&&(e+="-"),e+=t[i].toString(16).padStart(2,"0");return e}var Db,Bo=k({"packages/ag-charts-community/src/util/id.ts"(){"use strict";Db=new Map}});function gt(t){return function(e,i){const s=`__${i}`;e[i]||hX(e,i,s,t)}}function hX(t,e,i,s){const{type:o="normal",changeCb:a,convertor:n,checkDirtyOnAssignment:r=!1}=s??{},l={type:o,changeCb:a,checkDirtyOnAssignment:r,convertor:n};let c;switch(o){case"normal":c=gX(i,l);break;case"transform":c=fX(i);break;case"path":c=mX(i);break}c=pX(i,dX(uX(c,l),l),l),Object.defineProperty(t,e,{set:c,get:function(){return this[i]},enumerable:!0,configurable:!0})}function uX(t,e){const{convertor:i}=e;return i?function(s){t.call(this,i(s))}:t}function dX(t,e){const{changeCb:i}=e;return i?function(s){const o=t.call(this,s);return o!==Gf&&i.call(this,this),o}:t}function pX(t,e,i){const{checkDirtyOnAssignment:s}=i;return s?function(o){const a=e.call(this,o);return o?._dirty===!0&&this.markDirty(t),a}:e}function gX(t,e){const{changeCb:i}=e;return function(s){const o=this[t];return s!==o?(this[t]=s,this.markDirty(t),i?.(this),s):Gf}}function fX(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this.markDirtyTransform(),e):Gf}}function mX(t){return function(e){const i=this[t];return e!==i?(this[t]=e,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(t)),e):Gf}}var Gf,kb=k({"packages/ag-charts-community/src/scene/changeDetectable.ts"(){"use strict";Gf=Symbol("no-change")}}),xA,hp,ur,ca=k({"packages/ag-charts-community/src/scene/node.ts"(){"use strict";P(),Bo(),kb(),xA=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(xA||{}),hp=class CE{constructor(e){this.serialNumber=CE._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=la(this),this.pointerEvents=0,this._dirty=!0,this.dirtyZIndex=!1,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.name=e?.name,this.tag=e?.tag??NaN,this.zIndex=e?.zIndex??0,(e?.debugDirty??CE._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(e,i,s){const o=e?.toSVG();if(o==null||!o.elements.length&&!o.defs?.length)return;const a=os("svg");if(a.setAttribute("width",String(i)),a.setAttribute("height",String(s)),a.setAttribute("viewBox",`0 0 ${i} ${s}`),o.defs?.length){const n=os("defs");n.append(...o.defs),a.append(n)}return a.append(...o.elements),a.outerHTML}static*extractBBoxes(e,i){for(const s of e)if(!i||s.visible&&!s.transitionOut){const o=s.getBBox();o&&(yield o)}}get datum(){return this._datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get layerManager(){return this._layerManager}get dirty(){return this._dirty}closestDatum(){for(const{datum:e}of this.traverseUp(!0))if(e!=null)return e}preRender(e,i=1){this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.childNodeCounts.complexity=i,this.childNodeCounts.thisComplexity=i;for(const s of this.children()){const o=s.preRender(e);this.childNodeCounts.groups+=o.groups,this.childNodeCounts.nonGroups+=o.nonGroups,this.childNodeCounts.complexity+=o.complexity}return this.childNodeCounts}render(e){const{stats:i}=e;if(this._dirty=!1,this.debugDirtyProperties(),e.debugNodeSearch){const s=this.name??this.id;e.debugNodeSearch.some(o=>typeof o=="string"?o===s:o.test(s))&&(e.debugNodes[this.name??this.id]=this)}i&&(i.nodesRendered++,i.opsPerformed+=this.childNodeCounts.thisComplexity)}_setLayerManager(e){this._layerManager=e,this._debug=e?.debug;for(const i of this.children())i._setLayerManager(e)}sortChildren(e){if(this.dirtyZIndex=!1,!this.childNodes)return;const i=[...this.childNodes].sort(e);this.childNodes.clear();for(const s of i)this.childNodes.add(s)}*traverseUp(e){let i=this;for(e&&(yield i);i=i.parentNode;)yield i}*children(){if(this.childNodes)for(const e of this.childNodes)yield e}*descendants(){for(const e of this.children())yield e,yield*e.descendants()}isLeaf(){return!this.childNodes?.size}isRoot(){return!this.parentNode}append(e){this.childNodes??(this.childNodes=new Set);for(const i of h_(e))i.parentNode?.removeChild(i),this.childNodes.add(i),i.parentNode=this,i._setLayerManager(this.layerManager);this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}appendChild(e){return this.append(e),e}removeChild(e){if(!this.childNodes?.delete(e))throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`);delete e.parentNode,e._setLayerManager(),this.invalidateCachedBBox(),this.dirtyZIndex=!0,this.markDirty()}remove(){this.parentNode?.removeChild(this)}clear(){for(const e of this.children())delete e.parentNode,e._setLayerManager();this.childNodes?.clear(),this.invalidateCachedBBox()}destroy(){this.parentNode?.removeChild(this)}setProperties(e,i){if(i)for(const s of i)this[s]=e[s];else Object.assign(this,e);return this}containsPoint(e,i){return!1}pickNode(e,i){if(!(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))){if(this.childNodes!=null&&this.childNodes.size!==0){const s=[...this.children()];for(let o=s.length-1;o>=0;o--){const a=s[o].pickNode(e,i);if(a)return a}}else if(!this.isContainerNode)return this}}pickNodes(e,i,s=[]){if(!this.visible||this.pointerEvents===1||!this.containsPoint(e,i))return s;this.isContainerNode||s.push(this);for(const o of this.children())o.pickNodes(e,i,s);return s}invalidateCachedBBox(){this.cachedBBox!=null&&(this.cachedBBox=void 0,this.parentNode?.invalidateCachedBBox())}getBBox(){return this.cachedBBox==null&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}markDirty(e){const{_dirty:i}=this;e!=null&&this._debugDirtyProperties&&this.markDebugProperties(e),!(this.cachedBBox==null&&i)&&(this.invalidateCachedBBox(),this._dirty=!0,this.parentNode&&this.parentNode.markDirty())}markClean(){if(this._dirty){this._dirty=!1,this.debugDirtyProperties();for(const e of this.children())e.markClean()}}markDebugProperties(e){const i=this._debugDirtyProperties?.get(e)??[],s=new Error().stack?.split(`
`).filter(o=>o!=="Error"&&!o.includes(".markDebugProperties")&&!o.includes(".markDirty")&&!o.includes("Object.assign ")&&!o.includes(`${this.constructor.name}.`))??"unknown";i.push(s[0].replace(" at ","").trim()),this._debugDirtyProperties?.set(e,i)}debugDirtyProperties(){this._debugDirtyProperties!=null&&(this._debugDirtyProperties.has("__first__")||this._debugDirtyProperties.forEach((e,i)=>{e.length>1&&(console.groupCollapsed(`Property changed multiple times before render: ${this.constructor.name}.${i} (${e.length}x)`),e.forEach(s=>console.log(s)),console.groupEnd())}),this._debugDirtyProperties.clear())}onZIndexChange(){const{parentNode:e}=this;e&&(e.dirtyZIndex=!0)}toSVG(){}},hp._nextSerialNumber=0,hp._debugEnabled=!1,v([gt()],hp.prototype,"visible",2),v([gt({changeCb:t=>t.onZIndexChange()})],hp.prototype,"zIndex",2),ur=hp}});function yX(t,e){bA(t,e).optional=!0}function bA(t,e){Object.getOwnPropertyDescriptor(t,Uh)==null&&Object.defineProperty(t,Uh,{value:{}});const i=t[Uh],s=e.toString();if(typeof i[s]<"u")return i[s];const o=new WeakMap;i[s]={setters:[],getters:[],observers:[],valuesMap:o};const a=Object.getOwnPropertyDescriptor(t,e),n=a?.set,r=a?.get;return Object.defineProperty(t,e,{set:function(h){const{setters:u,observers:d}=i[s];let p;u.some(g=>g.length>2)&&(p=r?r.call(this):o.get(this));for(const g of u)if(h=g(this,e,h,p),h===Vf)return;n?n.call(this,h):o.set(this,h);for(const g of d)g(this,h,p)},get:function(){let h=r?r.call(this):o.get(this);for(const u of i[s].getters)if(h=u(this,e,h),h===Vf)return;return h},enumerable:!0,configurable:!1}),i[s]}function ll(t,e,i){return(s,o)=>{const a=bA(s,o);a.setters.push(t),e&&a.getters.unshift(e),i&&Object.assign(a,i)}}function A_(t){return(e,i)=>{bA(e,i).observers.push(t)}}function jf(t){return typeof t<"u"&&Uh in t}function fc(t){const e=new Set;for(;jf(t);)e.add(t?.[Uh]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(i=>Object.keys(i))}function I_(t){return fc(t).reduce((e,i)=>(e[i]=t[i]??null,e),{})}function xX(t,e){const i=e.toString();for(;jf(t);){const s=t[Uh];if(Object.hasOwn(s,i))return s[i];t=Object.getPrototypeOf(t)}}var Vf,Uh,Hh=k({"packages/ag-charts-community/src/util/decorator.ts"(){"use strict";Vf=Symbol("BREAK"),Uh="__decorator_config"}});function dr(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every((i,s)=>dr(i,e[s])):Ye(t)?Ye(e)?SA(t,e,dr):!1:t===e}function SA(t,e,i){for(const s of Object.keys(e))if(!(s in t))return!1;for(const s of Object.keys(t))if(!(s in e)||!i(t[s],e[s]))return!1;return!0}function Vt(...t){const e={};for(const i of t){if(!li(i))continue;const s=jf(i)?fc(i):Object.keys(i);for(const o of s)Ye(e[o])&&Ye(i[o])?e[o]=Vt(e[o],i[o]):e[o]??(e[o]=i[o])}return e}function Wf(...t){const e={};for(const i of t){if(!li(i))continue;const s=jf(i)?fc(i):Object.keys(i);for(const o of s)Ye(e[o])&&Ye(i[o])?e[o]=Wf(e[o],i[o]):o in e||(e[o]??(e[o]=i[o]))}return e}function Ab(t,...e){return e&&Et(t)?t.map(i=>Vt(i,...e)):t}function T_(t,e){const i={};for(const[s,o]of ja(t))i[s]=e(o,s,t);return i}function mc(t,e){const i={...t};for(const s of e)delete i[s];return i}function up(t,e){return(Et(e)?e:e.split(".")).reduce((s,o)=>s[o],t)}function vA(t,e,i){const s=Et(e)?e.slice():e.split("."),o=s.pop();if(s.some(n=>Ib.has(n)))return;const a=s.reduce((n,r)=>n[r],t);return a[o]=i,a[o]}function MA(t,e,i){if(i===void 0)return e;for(const s of t){const o=i[s];o!==void 0&&(e[s]=o)}return e}function Yh(t){return t==null||typeof t!="object"||!Ye(t)||(Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{const i=t[e];i!==null&&(typeof i=="object"||typeof i=="function")&&!Object.isFrozen(i)&&Yh(i)})),t}var Ib,qt=k({"packages/ag-charts-community/src/util/object.ts"(){"use strict";P(),Hh(),Ib=new Set(["__proto__","constructor","prototype"])}});function ke(t){return t%=ha,t+=ha,t%=ha,t}function bX(t){return t%=ha,t+=ha,t!==ha&&(t%=ha),t}function Uf(t){return t%=ha,t<-Math.PI?t+=ha:t>=Math.PI&&(t-=ha),t}function yc(t,e,i){const s=ke(t),o=ke(e),a=ke(i);return o<a?o<=s&&s<=a:o>a?o<=s||s<=a:!0}function je(t){return t/180*Math.PI}function SX(t){return t/Math.PI*180}function Tb(t,e){return t=ke(t),e=ke(e),e-t+(t>e?ha:0)}function C_(t){const e=ke(t);return e<=dp?e/dp:e<=Math.PI?(Math.PI-e)/dp:e<=1.5*Math.PI?(e-Math.PI)/dp:(ha-e)/dp}var ha,dp,Ci=k({"packages/ag-charts-community/src/util/angle.ts"(){"use strict";ha=Math.PI*2,dp=Math.PI/2}}),xc,Cb,Lb,DA,re,Kh=k({"packages/ag-charts-community/src/util/color.ts"(){"use strict";P(),xc=(t,e,i)=>t*(1-i)+e*i,Cb=t=>{const e=t<0?-1:1,i=Math.abs(t);return i<=.04045?t/12.92:e*((i+.055)/1.055)**2.4},Lb=t=>{const e=t<0?-1:1,i=Math.abs(t);return i>.0031308?e*(1.055*i**(1/2.4)-.055):12.92*t},DA=class de{constructor(e,i,s,o=1){this.r=Tt(0,e||0,1),this.g=Tt(0,i||0,1),this.b=Tt(0,s||0,1),this.a=Tt(0,o||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!de.parseHex(e):e.indexOf("rgb")>=0?!!de.stringToRgba(e):de.nameToHex.has(e.toLowerCase())}static fromString(e){if(e.indexOf("#")>=0)return de.fromHexString(e);const i=de.nameToHex.get(e.toLowerCase());if(i)return de.fromHexString(i);if(e.indexOf("rgb")>=0)return de.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static parseHex(e){e=e.replace(/ /g,"").slice(1);let i;switch(e.length){case 6:case 8:i=[];for(let s=0;s<e.length;s+=2)i.push(parseInt(`${e[s]}${e[s+1]}`,16));break;case 3:case 4:i=e.split("").map(s=>parseInt(s,16)).map(s=>s+s*16);break}if(i?.length>=3&&i.every(s=>s>=0))return i.length===3&&i.push(255),i}static fromHexString(e){const i=de.parseHex(e);if(i){const[s,o,a,n]=i;return new de(s/255,o/255,a/255,n/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let i=-1,s=-1;for(let r=0;r<e.length;r++){const l=e[r];if(i===-1&&l==="(")i=r;else if(l===")"){s=r;break}}if(i===-1||s===-1)return;const a=e.substring(i+1,s).split(","),n=[];for(let r=0;r<a.length;r++){const l=a[r];let c=parseFloat(l);if(!Number.isFinite(c))return;l.indexOf("%")>=0?(c=Tt(0,c,100),c/=100):r===3?c=Tt(0,c,1):(c=Tt(0,c,255),c/=255),n.push(c)}return n}static fromRgbaString(e){const i=de.stringToRgba(e);if(i){if(i.length===3)return new de(i[0],i[1],i[2]);if(i.length===4)return new de(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(e.length===4)return new de(e[0],e[1],e[2],e[3]);if(e.length===3)return new de(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,i,s,o=1){const a=de.HSBtoRGB(e,i,s);return new de(a[0],a[1],a[2],o)}static fromHSL(e,i,s,o=1){const a=de.HSLtoRGB(e,i,s);return new de(a[0],a[1],a[2],o)}static fromOKLCH(e,i,s,o=1){const a=de.OKLCHtoRGB(e,i,s);return new de(a[0],a[1],a[2],o)}static padHex(e){return e.length===1?"0"+e:e}toHexString(){let e="#"+de.padHex(Math.round(this.r*255).toString(16))+de.padHex(Math.round(this.g*255).toString(16))+de.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(e+=de.padHex(Math.round(this.a*255).toString(16))),e}toRgbaString(e=3){const i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],s=Math.pow(10,e);return this.a!==1?(i.push(Math.round(this.a*s)/s),`rgba(${i.join(", ")})`):`rgb(${i.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return de.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,i,s){const o=Cb(e),a=Cb(i),n=Cb(s),r=Math.cbrt(.4122214708*o+.5363325363*a+.0514459929*n),l=Math.cbrt(.2119034982*o+.6806995451*a+.1073969566*n),c=Math.cbrt(.0883024619*o+.2817188376*a+.6299787005*n),h=.2104542553*r+.793617785*l-.0040720468*c,u=1.9779984951*r-2.428592205*l+.4505937099*c,d=.0259040371*r+.7827717662*l-.808675766*c,p=Math.atan2(d,u)*180/Math.PI,g=h,f=Math.hypot(u,d),x=p>=0?p:p+360;return[g,f,x]}static OKLCHtoRGB(e,i,s){const o=e,a=i*Math.cos(s*Math.PI/180),n=i*Math.sin(s*Math.PI/180),r=(o+.3963377774*a+.2158037573*n)**3,l=(o-.1055613458*a-.0638541728*n)**3,c=(o-.0894841775*a-1.291485548*n)**3,h=4.0767416621*r-3.3077115913*l+.2309699292*c,u=-1.2684380046*r+2.6097574011*l-.3413193965*c,d=-.0041960863*r-.7034186147*l+1.707614701*c,p=Lb(h),g=Lb(u),f=Lb(d);return[p,g,f]}static RGBtoHSL(e,i,s){const o=Math.min(e,i,s),a=Math.max(e,i,s),n=(a+o)/2;let r,l;if(a===o)r=0,l=0;else{const c=a-o;l=n>.5?c/(2-a-o):c/(a+o),a===e?r=(i-s)/c+(i<s?6:0):a===i?r=(s-e)/c+2:r=(e-i)/c+4,r*=360/6}return[r,l,n]}static HSLtoRGB(e,i,s){if(e=(e%360+360)%360,i===0)return[s,s,s];const o=s<.5?s*(1+i):s+i-s*i,a=2*s-o;function n(h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?a+(o-a)*6*h:h<1/2?o:h<2/3?a+(o-a)*(2/3-h)*6:a}const r=n(e/360+1/3),l=n(e/360),c=n(e/360-1/3);return[r,l,c]}static RGBtoHSB(e,i,s){const o=Math.min(e,i,s),a=Math.max(e,i,s),n=a===0?0:(a-o)/a;let r=0;if(o!==a){const l=a-o,c=(a-e)/l,h=(a-i)/l,u=(a-s)/l;e===a?r=u-h:i===a?r=2+c-u:r=4+h-c,r/=6,r<0&&(r=r+1)}return[r*360,n,a]}static HSBtoRGB(e,i,s){e=(e%360+360)%360/360;let o=0,a=0,n=0;if(i===0)o=a=n=s;else{const r=(e-Math.floor(e))*6,l=r-Math.floor(r),c=s*(1-i),h=s*(1-i*l),u=s*(1-i*(1-l));switch(r>>0){case 0:o=s,a=u,n=c;break;case 1:o=h,a=s,n=c;break;case 2:o=c,a=s,n=u;break;case 3:o=c,a=h,n=s;break;case 4:o=u,a=c,n=s;break;case 5:o=s,a=c,n=h;break}}return[o,a,n]}static mix(e,i,s){return new de(xc(e.r,i.r,s),xc(e.g,i.g,s),xc(e.b,i.b,s),xc(e.a,i.a,s))}static lighten(e,i){const s=de.RGBtoOKLCH(e.r,e.g,e.b);return de.fromOKLCH(Tt(0,s[0]+i,1),s[1],s[2])}static darken(e,i){const s=de.RGBtoOKLCH(e.r,e.g,e.b);return de.fromOKLCH(Tt(0,s[0]-i,1),s[1],s[2])}static interpolate(e,i){const s=1/(e.length-1),o=e.map(a=>de.RGBtoOKLCH(a.r,a.g,a.b));return Array.from({length:i},(a,n)=>{const r=n/(i-1),l=e.length<=2?0:Math.min(Math.floor(r*(e.length-1)),e.length-2),c=(r-l*s)/s,h=o[l],u=o[l+1];return de.fromOKLCH(xc(h[0],u[0],c),xc(h[1],u[1],c),xc(h[2],u[2],c))})}},DA.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"]]),re=DA}}),Hf,Nb=k({"packages/ag-charts-community/src/scale/abstractScale.ts"(){"use strict";Hf=class{ticks(t,e,i){}niceDomain(t,e=this.domain){return e}tickFormatter(t){}datumFormatter(t){}get bandwidth(){}get step(){}get inset(){}}}}),$h,kA=k({"packages/ag-charts-community/src/scale/invalidating.ts"(){"use strict";$h=(t,e)=>{const i=Symbol(String(e));t[i]=void 0,Object.defineProperty(t,e,{get(){return this[i]},set(s){this[i]!==s&&(this[i]=s,this.invalid=!0)},enumerable:!0,configurable:!1})}}}),AA,Ob,IA,L_,Xh,wb=k({"packages/ag-charts-community/src/scale/colorScale.ts"(){"use strict";P(),Kh(),Nb(),kA(),AA=t=>{const e=re.fromString(t),[i,s,o]=re.RGBtoOKLCH(e.r,e.g,e.b);return{l:i,c:s,h:o,a:e.a}},Ob=1e-6,IA=t=>t.c<Ob||t.l<Ob||t.l>1-Ob,L_=(t,e,i)=>{i=Tt(0,i,1);let s;if(IA(t))s=e.h;else if(IA(e))s=t.h;else{const r=t.h;let l=e.h;const c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),s=r*(1-i)+l*i}const o=t.c*(1-i)+e.c*i,a=t.l*(1-i)+e.l*i,n=t.a*(1-i)+e.a*i;return re.fromOKLCH(a,o,s,n)},Xh=class extends Hf{constructor(){super(...arguments),this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(AA)}update(){const{domain:t,range:e}=this;t.length<2&&(tt.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let i=1;i<t.length;i++){const s=t[i-1],o=t[i];if(s>=o){tt.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((a,n)=>a-n);break}}if(e.length<t.length)for(let i=e.length;i<t.length;i++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(AA)}normalizeDomains(...t){return{domain:t.flat(),animatable:!0}}toDomain(){}convert(t){this.refresh();const{domain:e,range:i,parsedRange:s}=this,o=e[0],a=e.at(-1),n=i[0],r=i[i.length-1];if(t<=o)return n;if(t>=a)return r;let l,c;if(e.length===2){const d=(t-o)/(a-o),p=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(d*(i.length-1)),i.length-2),c=(d-l*p)/p}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);const d=e[l],p=e[l+1];c=(t-d)/(p-d)}const h=s[l],u=s[l+1];return L_(h,u,c).toRgbaString()}invert(){}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&tt.warnOnce("Expected update to not invalidate scale"))}},v([$h],Xh.prototype,"domain",2),v([$h],Xh.prototype,"range",2)}}),Yf,Eb=k({"packages/ag-charts-community/src/scene/gradient/gradient.ts"(){"use strict";P(),wb(),Yf=class{constructor(t,e=[],i){this.colorSpace=t,this.stops=e,this.bbox=i,this._cache=void 0}createGradient(t,e,i){const s=this.bbox??e;if(isNaN(s.x)||isNaN(s.y))return;if(this._cache!=null&&this._cache.ctx===t&&this._cache.bbox.equals(s))return this._cache.gradient;const{stops:o,colorSpace:a}=this;if(o.length===0)return;if(o.length===1)return o[0].color;let n=this.createCanvasGradient(t,s,i);if(n==null)return;const r=a==="oklch",l=.05;let c=o[0];n.addColorStop(c.stop,c.color);for(let h=1;h<o.length;h+=1){const u=o[h];if(r){const d=new Xh;d.domain=[c.stop,u.stop],d.range=[c.color,u.color];for(let p=c.stop+l;p<u.stop;p+=l)n.addColorStop(p,d.convert(p))}n.addColorStop(u.stop,u.color),c=u}return"createPattern"in n&&(n=n.createPattern()),this._cache={ctx:t,bbox:s,gradient:n},n}toSvg(t){const e=this.bbox??t,i=this.createSvgGradient(e);return this.stops.forEach(({stop:s,color:o})=>{const a=os("stop");a.setAttribute("offset",`${s}`),a.setAttribute("stop-color",`${o}`),i.appendChild(a)}),i}}}}),TA,N_=k({"packages/ag-charts-community/src/scene/gradient/conicGradient.ts"(){"use strict";P(),Ci(),Eb(),TA=class extends Yf{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}createCanvasGradient(t,e,i){const{angle:o}=this,a=ke(je(o+-90)),n=i?.centerX??e.x+e.width*.5,r=i?.centerY??e.y+e.height*.5;return t.createConicGradient(a,n,r)}createSvgGradient(t){return os("linearGradient")}}}}),CA,O_=k({"packages/ag-charts-community/src/scene/gradient/linearGradient.ts"(){"use strict";P(),Ci(),Eb(),CA=class extends Yf{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}getGradientPoints(t){const{angle:i}=this,s=ke(je(i+90)),o=Math.cos(s),a=Math.sin(s),n=t.width,r=t.height,l=t.x+n*.5,c=t.y+r*.5,h=Math.sqrt(r*r+n*n)/2,u=Math.atan2(r,n);let d;s<Math.PI/2?d=s:s<Math.PI?d=Math.PI-s:s<1.5*Math.PI?d=s-Math.PI:d=2*Math.PI-s;const p=h*Math.abs(Math.cos(d-u));return{x0:l+o*p,y0:c+a*p,x1:l-o*p,y1:c-a*p}}createCanvasGradient(t,e){const{x0:i,y0:s,x1:o,y1:a}=this.getGradientPoints(e);return t.createLinearGradient(i,s,o,a)}createSvgGradient(t){const{x0:e,y0:i,x1:s,y1:o}=this.getGradientPoints(t),a=os("linearGradient");return a.setAttribute("x1",String(e)),a.setAttribute("y1",String(i)),a.setAttribute("x2",String(s)),a.setAttribute("y2",String(o)),a.setAttribute("gradientUnits","userSpaceOnUse"),a}}}}),w_,vX=k({"packages/ag-charts-community/src/scene/gradient/radialGradient.ts"(){"use strict";P(),Eb(),w_=class extends Yf{constructor(t,e,i){super(t,e,i)}createCanvasGradient(t,e,i){const s=i?.centerX??e.x+e.width*.5,o=i?.centerY??e.y+e.height*.5,a=i?.innerRadius??0,n=i?.outerRadius??Math.hypot(e.width*.5,e.height*.5)/Math.SQRT2;return t.createRadialGradient(s,o,a,s,o,n)}createSvgGradient(t){const e=t.x+t.width*.5,i=t.y+t.height*.5,s=os("radialGradient");return s.setAttribute("cx",String(e)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(t.width*.5,t.height*.5)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}}}});function Va(t){return t instanceof Ct||t instanceof pp}var Ct,pp,ge=k({"packages/ag-charts-community/src/util/properties.ts"(){"use strict";P(),Hh(),qt(),Ct=class{handleUnknownProperties(t,e){}set(t){const{className:e=this.constructor.name}=this.constructor;if(typeof t!="object")return tt.warn(`unable to set ${e} - expecting a properties object`),this;const i=new Set(Object.keys(t));for(const s of fc(this))if(i.has(s)){const o=t[s],a=this;if(Va(a[s]))if(a[s]instanceof pp){const n=a[s].reset(o);n!=null?a[s]=n:tt.warn(`unable to set [${s}] - expecting a properties array`)}else a[s].set(o);else Ye(o)?a[s]=Wf(o,a[s]??{}):a[s]=o;i.delete(s)}this.handleUnknownProperties(i,t);for(const s of i)tt.warn(`unable to set [${s}] in ${e} - property is unknown`);return this}isValid(t){return fc(this).every(e=>{const i=xX(this,e);if(i==null)return!0;const s=i.optional===!0||typeof this[e]<"u";return s||tt.warnOnce(`${t??""}[${e}] is required.`),s})}toJson(){return fc(this).reduce((t,e)=>{const i=this[e];return t[e]=Va(i)?i.toJson():i,t},{})}},pp=class Z$ extends Array{constructor(e,...i){super(i.length);const o=(a=>!!a?.prototype?.constructor?.name)(e)?a=>new e().set(a):e;Object.defineProperty(this,"itemFactory",{value:o,enumerable:!1,configurable:!1}),this.set(i)}set(e){if(Et(e)){this.length=e.length;for(let i=0;i<e.length;i++)this[i]=this.itemFactory(e[i])}return this}reset(e){if(Array.isArray(e))return new Z$(this.itemFactory,...e)}toJson(){return this.map(e=>e?.toJson?.()??e)}}}});function MX(t,e={}){const{optional:i=!1}=e;return ll((s,o,a)=>{const n={...e,target:s,property:o};if(i&&typeof a>"u"||t(a,n))return Va(s[o])&&!Va(a)?(s[o].set(a),s[o]):a;const r=hb(a,50),l=String(o).replace(/^_*/,""),c=s.constructor.className??s.constructor.name.replace(/Properties$/,""),h=t.message?`; expecting ${gp(t,n)}`:"";return tt.warn(`Property [${l}] of [${c}] cannot be set to [${r}]${h}, ignoring.`),Vf},void 0,{optional:i})}function fe(t,e="a"){return me((i,s)=>{const o=t.find(a=>{const n=typeof a=="string"?a:a.value;return i===n});if(o==null)return!1;if(typeof o!="string"&&(o.deprecated===!0||o.deprecatedTo!=null)){const a=[`Property [%s] with value '${o.value}' is deprecated.`];o.deprecatedTo&&a.push(`Use ${o.deprecatedTo} instead.`),tt.warnOnce(a.join(" "),s.property)}return!0},`${e} keyword such as ${DX(t)}`)}function me(t,e){return t.message=e,t}function DX(t){const e=t.filter(s=>typeof s=="string"||s.undocumented!==!0).map(s=>`'${typeof s=="string"?s:s.value}'`);if(e.length===1)return e[0];const i=e.pop();return`${e.join(", ")} or ${i}`}function gp(t,e){return nl(t.message)?t.message(e):t.message}function kX(t){return e=>gp(e,t)}function AX(t){return Object.assign(t,{restrict({length:e,minLength:i}={}){let s="an array";return na(i)&&i>0?s="a non-empty array":na(e)&&(s=`an array of length ${e}`),me(o=>Et(o)&&(na(e)?o.length===e:!0)&&(na(i)?o.length>=i:!0),s)}})}function IX(t){return Object.assign(t,{restrict({min:e,max:i}={}){const s=["a number"],o=na(e),a=na(i);return o&&a?s.push(`between ${e} and ${i} inclusive`):o?s.push(`greater than or equal to ${e}`):a&&s.push(`less than or equal to ${i}`),me(n=>Zt(n)&&(o?n>=e:!0)&&(a?n<=i:!0),s.join(" "))}})}function _b(t){return Object.assign(t,{restrict(e){return me(i=>i instanceof e,i=>gp(t,i)??`an instance of ${e.name}`)}})}var E_,A,cl,fs,ct,LA,bt,Zs,it,Rt,NA,Kf,lt,le,$f,bc,Hi,Xf,Zf,qf,Rb,Pb,OA,zt,Cn,Ln,hl,__,wA,EA,R_,Bb,P_,B_,z_,Nn,zb,pr,gr,Qf,_A,F_,G_,RA,j_,Jf,Fb,PA,BA,Nt=k({"packages/ag-charts-community/src/util/validation.ts"(){"use strict";P(),Hh(),ge(),E_=!1,A=E_?(t,e={})=>{const{optional:i=!1}=e;return ll((s,o,a)=>{const n={...e,target:s,property:o};if(i&&typeof a>"u"||t(a,n)){if(Va(s[o])&&!Va(a))return s[o].set(a),s[o]}else{const r=hb(a,50),l=String(o).replace(/^_*/,""),c=s.constructor.className??s.constructor.name.replace(/Properties$/,""),h=t.message?`; expecting ${gp(t,n)}`:"";tt.warn(`TempValidation!!! Property [${l}] of [${c}] cannot be set to [${r}]${h}, ignoring.`)}return a},void 0,{optional:i})}:()=>yX,cl=(...t)=>{const e=[];return me((i,s)=>(e.length=0,t.every(o=>{const a=o(i,s);return a||e.push(gp(o,s)),a})),()=>e.filter(Boolean).join(" AND "))},fs=(...t)=>me((e,i)=>t.some(s=>s(e,i)),e=>t.map(kX(e)).filter(Boolean).join(" OR ")),ct=_b(me((t,e)=>Va(t)||li(t)&&Va(e.target[e.property]),"a properties object")),LA=_b(me(t=>li(t),"an object")),bt=me($k,"a boolean"),Zs=me(nl,"a function"),it=me(Wi,"a string"),Rt=IX(me(Zt,"a number")),NA=me(t=>na(t)&&!isNaN(t),"a real number"),Kf=me(t=>na(t)&&isNaN(t),"NaN"),lt=Rt.restrict({min:0}),le=Rt.restrict({min:0,max:1}),$f=fs(Rt,Kf),bc=AX(me(Et,"an array")),Hi=(t,e)=>me((i,s)=>Et(i)&&i.every(o=>t(o,s)),i=>{const s=gp(bc,i)??"";return typeof e=="function"?`${s} of ${e(i)}`:e?`${s} of ${e}`:s}),Xf=t=>Zt(t)||op(t),Zf=t=>me((e,i)=>!Xf(e)||!Xf(i.target[t])||e<i.target[t],`to be less than ${t}`),qf=t=>me((e,i)=>!Xf(e)||!Xf(i.target[t])||e>i.target[t],`to be greater than ${t}`),Rb=me(op,"Date object"),Pb=fs(Rb,lt),OA="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",zt=me(Xk,`color string. ${OA}`),Cn=_b(me(t=>li(t)&&t.type==="gradient","a color gradient object")),Ln=_b(me(t=>li(t)&&t.type==="pattern","a color pattern object")),hl=me(Hi(zt),`color strings. ${OA}`),__=Hi(bt,"boolean values"),wA=Hi(Rt,"numbers"),EA=Hi(it,"strings"),R_=me(Hi(Rb),"Date objects"),Bb=me(Hi(ct),"objects"),P_=fe(["butt","round","square"],"a line cap"),B_=fe(["round","bevel","miter"],"a line join"),z_=fe(["solid","dashed","dotted"],"a line style"),Nn=me(Hi(lt),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),zb=fe(["top","right","bottom","left"],"a position"),pr=fe(["normal","italic","oblique"],"a font style"),gr=fs(fe(["normal","bold","bolder","lighter"],"a font weight"),Rt.restrict({min:1,max:1e3})),Qf=fe(["never","always","hyphenate","on-space"],"a text wrap strategy"),_A=fe(["left","center","right"],"a text align"),F_=fe(["top","middle","bottom"],"a vertical align"),G_=fe(["ellipsis","hide"],"an overflow strategy"),RA=fe(["horizontal","vertical"],"a direction"),j_=fe(["inside","outside"],"a placement"),Jf=fs(fe(["exact","nearest"],"interaction range"),Rt),Fb=fe(["top","bottom","left","right"]),PA=fs(cl(Rt.restrict({min:1}),Zf("maxSpacing")),Kf),BA=fs(cl(Rt.restrict({min:1}),qf("minSpacing")),Kf)}});function TX(t){let e;for(const i of t)if(i?.stop!=null){if(e!=null&&i.stop<e)return!1;e=i.stop}return!0}function V_(t){return t.flatMap((e,i)=>{const{stop:s}=e,o=t.at(i+1)?.color;return o!=null?[e,{stop:s,color:o}]:[e]})}function CX(t,e){const i=e==="discrete"?1:0,s=t.map((o,a,{length:n})=>({stop:(a+i)/(n-1+i),color:o}));return e==="discrete"?V_(s):s}function W_(t,e,i,s="continuous"){const o=t.map(g=>typeof g=="string"?{color:g}:g);if(o.length===0)return CX(e,s);if(!TX(o))return tt.warnOnce("[fills] must have the stops defined in ascending order"),[];const a=Math.min(...i),n=Math.max(...i),r=s==="discrete",l=new Float64Array(o.length);let c=0,h=-1;for(let g=0;g<o.length;g+=1){const f=o[g];if(g>=h){h=o.length-1;for(let y=g+1;y<o.length;y+=1)if(o[y]?.stop!=null){h=y;break}}let x=f?.stop;if(x==null){const y=o[c]?.stop,b=o[h]?.stop,S=y??a,M=b??n,D=r&&y==null?1:0;x=S+(M-S)*(g-c+D)/(h-c+D)}else c=g;l[g]=Math.max(0,Math.min(1,(x-a)/(n-a)))}let u=o.find(g=>g.color!=null)?.color,d;const p=o.map((g,f)=>{let x=g?.color;const y=l[f];return x!=null?u=x:u!=null?x=u:(d==null&&(d=new Xh,d.domain=[0,1],d.range=e),x=d.convert(y)),{stop:y,color:x}});return s==="discrete"?V_(p):p}var Gb,U_=k({"packages/ag-charts-community/src/scene/gradient/stops.ts"(){"use strict";P(),wb(),ge(),Nt(),Gb=class extends Ct{constructor(){super(...arguments),this.color="black"}},v([A(Rt,{optional:!0})],Gb.prototype,"stop",2),v([A(zt,{optional:!0})],Gb.prototype,"color",2)}});function tm(t,e,i,s){const o=t-i,a=e-s;return o*o+a*a}function em(t,e,i,s,o,a,n){if(i===o&&s===a)return Math.min(n,tm(t,e,i,s));const r=o-i,l=a-s,c=Math.max(0,Math.min(1,((t-i)*r+(e-s)*l)/(r*r+l*l))),h=i+c*r,u=s+c*l;return Math.min(n,tm(t,e,h,u))}function LX(t,e,i,s,o,a,n,r,l){r&&([n,a]=[a,n]);const c=Math.atan2(e-s,t-i);if(!yc(c,a,n)){const u=i+Math.cos(a)*o,d=s+Math.sin(a)*o,p=i+Math.cos(a)*o,g=s+Math.sin(a)*o;return Math.min(l,tm(t,e,u,d),tm(t,e,p,g))}const h=o-Math.sqrt(tm(t,e,i,s));return Math.min(l,h*h)}var zA=k({"packages/ag-charts-community/src/util/distance.ts"(){"use strict";Ci()}});function NX(t,e){const i=-e/t;return t!==0&&i>=0&&i<=1?[i]:[]}function OX(t,e,i){if(t===0)return NX(e,i);const s=e*e-4*t*i,o=[];if(s===0){const a=-e/(2*t);a>=0&&a<=1&&o.push(a)}else if(s>0){const a=Math.sqrt(s),n=(-e-a)/(2*t),r=(-e+a)/(2*t);n>=0&&n<=1&&o.push(n),r>=0&&r<=1&&o.push(r)}return o}function wX(t,e,i,s){if(t===0)return OX(e,i,s);const o=e/t,a=i/t,n=s/t,r=(3*a-o*o)/9,l=(9*o*a-27*n-2*o*o*o)/54,c=r*r*r+l*l,h=1/3,u=[];if(c>=0){const d=Math.sqrt(c),p=Math.sign(l+d)*Math.pow(Math.abs(l+d),h),g=Math.sign(l-d)*Math.pow(Math.abs(l-d),h),f=Math.abs(Math.sqrt(3)*(p-g)/2),x=-h*o+(p+g);if(x>=0&&x<=1&&u.push(x),f===0){const y=-h*o-(p+g)/2;y>=0&&y<=1&&u.push(y)}}else{const d=Math.acos(l/Math.sqrt(-r*r*r)),p=h*o,g=2*Math.sqrt(-r),f=g*Math.cos(h*d)-p,x=g*Math.cos(h*(d+2*Math.PI))-p,y=g*Math.cos(h*(d+4*Math.PI))-p;f>=0&&f<=1&&u.push(f),x>=0&&x<=1&&u.push(x),y>=0&&y<=1&&u.push(y)}return u}var EX=k({"packages/ag-charts-community/src/scene/polyRoots.ts"(){"use strict"}});function fp(t,e,i,s,o,a,n,r){const l=(i-t)*(r-a)-(s-e)*(n-o);if(l===0)return 0;const c=((n-o)*(e-a)-(t-o)*(r-a))/l,h=((i-t)*(e-a)-(s-e)*(t-o))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function _X(t,e,i,s,o,a,n,r,l,c,h,u){let d=0;const p=c-u,g=h-l,f=l*(u-c)-c*(h-l),x=H_(t,i,o,n),y=H_(e,s,a,r),b=p*x[0]+g*y[0],S=p*x[1]+g*y[1],M=p*x[2]+g*y[2],D=p*x[3]+g*y[3]+f,L=wX(b,S,M,D);for(const T of L){const I=T*T,N=T*I,O=x[0]*N+x[1]*I+x[2]*T+x[3],R=y[0]*N+y[1]*I+y[2]*T+y[3];let _;l===h?_=(R-c)/(u-c):_=(O-l)/(h-l),_>=0&&_<=1&&d++}return d}function H_(t,e,i,s){return[-t+3*e-3*i+s,3*t-6*e+3*i,-3*t+3*e,t]}function Y_(t,e,i,s,o,a,n,r,l,c){if(isNaN(t)||isNaN(e))return 0;a&&([o,s]=[s,o]);const h=(c-r)/(l-n),u=r-h*n,d=Math.pow(h,2)+1,p=2*(h*(u-e)-t),g=Math.pow(t,2)+Math.pow(u-e,2)-Math.pow(i,2),f=Math.pow(p,2)-4*d*g;if(f<0)return 0;const x=(-p+Math.sqrt(f))/2/d,y=(-p-Math.sqrt(f))/2/d;let b=0;return[x,y].forEach(S=>{if(!(S>=Math.min(n,l)&&S<=Math.max(n,l)))return;const D=h*S+u,L=S-t,T=D-e,I=Math.atan2(T,L);yc(I,s,o)&&b++}),b}var K_=k({"packages/ag-charts-community/src/scene/intersection.ts"(){"use strict";Ci(),EX()}});function jb(t,e,i,s,o){return(1-o)**3*t+3*(1-o)**2*o*e+3*(1-o)*o**2*i+o**3*s}function Vb(t,e,i,s,o){if(o<=Math.min(t,s))return t<s?0:1;if(o>=Math.max(t,s))return t<s?1:0;let a=0,n=1,r=NaN;for(let l=0;l<12;l+=1)r=(a+n)/2,jb(t,e,i,s,r)<o?a=r:n=r;return r}function Wb(t,e,i,s,o,a,n,r,l){const c=(1-l)*t+l*i,h=(1-l)*e+l*s,u=(1-l)*i+l*o,d=(1-l)*s+l*a,p=(1-l)*o+l*n,g=(1-l)*a+l*r,f=(1-l)*c+l*u,x=(1-l)*h+l*d,y=(1-l)*u+l*p,b=(1-l)*d+l*g,S=(1-l)*f+l*y,M=(1-l)*x+l*b;return[[{x:t,y:e},{x:c,y:h},{x:f,y:x},{x:S,y:M}],[{x:S,y:M},{x:y,y:b},{x:p,y:g},{x:n,y:r}]]}function FA(t,e,i,s){const o=-t+3*e-3*i+s,a=3*t-6*e+3*i,n=-3*t+3*e;if(o===0){if(a!==0){const l=-n/a;if(l>0&&l<1)return[l]}return[]}const r=a*a-4*o*n;if(r>=0){const l=Math.sqrt(r),c=(-a+l)/(2*o),h=(-a-l)/(2*o);return[c,h].filter(u=>u>0&&u<1)}return[]}function $_(t,e,i,s,o,a,n,r){const l=FA(t,i,o,n),c=FA(e,s,a,r);return[...l,...c]}var Ub=k({"packages/ag-charts-community/src/scene/util/bezier.ts"(){"use strict"}}),Zh,Hb=k({"packages/ag-charts-community/src/scene/extendedPath2D.ts"(){"use strict";P(),Ci(),zA(),Xt(),K_(),Ub(),Zh=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isEmpty(){return this.commands.length===0}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(t,e){this.openedPath=!0,this.path2d.moveTo(t,e),this.commands.push(0),this.params.push(t,e)}lineTo(t,e){this.openedPath?(this.path2d.lineTo(t,e),this.commands.push(1),this.params.push(t,e)):this.moveTo(t,e)}rect(t,e,i,s){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.closePath()}roundRect(t,e,i,s,o){o=Math.min(o,i/2,s/2),this.moveTo(t,e+o),this.arc(t+o,e+o,o,Math.PI,1.5*Math.PI),this.lineTo(t+o,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,1.5*Math.PI,2*Math.PI),this.lineTo(t+i,e+o),this.lineTo(t+i,e+s-o),this.arc(t+i-o,e+s-o,o,0,Math.PI/2),this.lineTo(t+i-o,e+s),this.lineTo(t+o,e+s),this.arc(t+ +o,e+s-o,o,Math.PI/2,Math.PI),this.lineTo(t,e+s-o),this.closePath()}arc(t,e,i,s,o,a){this.openedPath=!0,this.path2d.arc(t,e,i,s,o,a),this.commands.push(2),this.params.push(t,e,i,s,o,a?1:0)}cubicCurveTo(t,e,i,s,o,a){this.openedPath||this.moveTo(t,e),this.path2d.bezierCurveTo(t,e,i,s,o,a),this.commands.push(3),this.params.push(t,e,i,s,o,a)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(t){t&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(t,e){const i=this.commands,s=this.params,o=i.length,a=-1e4,n=-1e4;let r=NaN,l=NaN,c=0,h=0,u=0;for(let d=0,p=0;d<o;d++)switch(i[d]){case 0:u+=fp(r,l,c,h,a,n,t,e),c=s[p++],r=c,h=s[p++],l=h;break;case 1:u+=fp(c,h,s[p++],s[p++],a,n,t,e),c=s[p-2],h=s[p-1];break;case 3:u+=_X(c,h,s[p++],s[p++],s[p++],s[p++],s[p++],s[p++],a,n,t,e),c=s[p-2],h=s[p-1];break;case 2:{const g=s[p++],f=s[p++],x=s[p++],y=s[p++],b=s[p++],S=!!s[p++];if(u+=Y_(g,f,x,y,b,S,a,n,t,e),!isNaN(r)){const M=g+Math.cos(y)*x,D=f+Math.sin(y)*x;u+=fp(c,h,M,D,a,n,t,e)}c=g+Math.cos(b)*x,h=f+Math.sin(b)*x;break}case 4:u+=fp(r,l,c,h,a,n,t,e);break}return u%2===1}distanceSquared(t,e){let i=1/0;const s=this.commands,o=this.params,a=s.length;let n=NaN,r=NaN,l=0,c=0;for(let h=0,u=0;h<a;h++)switch(s[h]){case 0:l=n=o[u++],c=r=o[u++];break;case 1:{const d=o[u++],p=o[u++];i=em(t,e,l,c,d,p,i);break}case 3:tt.error("Command.Curve distanceSquare not implemented");break;case 2:{const d=o[u++],p=o[u++],g=o[u++],f=o[u++],x=o[u++],y=d+Math.cos(f)*g,b=p+Math.sin(f)*g,S=!!o[u++];i=em(t,e,l,c,y,b,i),i=LX(t,e,d,p,g,f,x,S,i),l=d+Math.cos(x)*g,c=p+Math.sin(x)*g;break}case 4:i=em(t,e,l,c,n,r,i);break}return i}toSVG(t=(e,i)=>({x:e,y:i})){const e=[],{commands:i,params:s}=this,o=(n,...r)=>{e.push(n);for(let l=0;l<r.length;l+=2){const{x:c,y:h}=t(r[l],r[l+1]);e.push(c,h)}};let a=0;for(const n of i)switch(n){case 0:o("M",s[a++],s[a++]);break;case 1:o("L",s[a++],s[a++]);break;case 3:o("C",s[a++],s[a++],s[a++],s[a++],s[a++],s[a++]);break;case 2:{const r=s[a++],l=s[a++],c=s[a++],h=s[a++],u=s[a++],d=s[a++];let p=d?h-u:u-h;p<0&&(p+=Math.ceil(-p/(2*Math.PI))*2*Math.PI),d&&(p=-p);const g=Math.max(Math.ceil(Math.abs(p)/(Math.PI/2)),1),f=p/g,x=4/3*Math.tan(f/4),y=e.length===0?"M":"L";o(y,r+Math.cos(h)*c,l+Math.sin(h)*c);for(let b=0;b<g;b+=1){const S=h+f*(b+0),M=h+f*(b+1),D=c*Math.sin(S),L=c*Math.cos(S),T=c*Math.sin(M),I=c*Math.cos(M);o("C",r+L-x*D,l+D+x*L,r+I+x*T,l+T-x*I,r+I,l+T)}break}case 4:e.push("Z");break}return e.join(" ")}computeBBox(){const{commands:t,params:e}=this;let[i,s,o,a]=[1/0,1/0,-1/0,-1/0],[n,r]=[NaN,NaN],[l,c]=[NaN,NaN];const h=(d,p,g)=>{i=Math.min(p,i),s=Math.min(d,s),o=Math.max(d,o),a=Math.max(p,a),g&&([n,r]=[d,p])};let u=0;for(const d of t)switch(d){case 0:h(e[u++],e[u++],!0),[l,c]=[n,r];break;case 1:h(e[u++],e[u++],!0);break;case 3:{const p=e[u++],g=e[u++],f=e[u++],x=e[u++],y=e[u++],b=e[u++];h(y,b,!0),$_(n,r,p,g,f,x,y,b).forEach(M=>{const D=jb(n,p,f,y,M),L=jb(r,g,x,b,M);h(D,L)});break}case 2:{const p=e[u++],g=e[u++],f=e[u++];let x=ke(e[u++]),y=ke(e[u++]);e[u++]&&([x,y]=[y,x]);const S=(D,L)=>{const T=p+f*Math.cos(D),I=g+f*Math.sin(D);h(T,I,L)};S(x),S(y,!0);const M=[0,Math.PI/2,Math.PI,3*Math.PI/2];for(const D of M)(x<y&&x<=D&&D<=y||x>y&&(x<=D||D<=y))&&S(D);break}case 4:[n,r]=[l,c];break}return new pt(s,i,o-s,a-i)}}}});function ns(t,e,i){const s=Math.round(e*t)/t;return i==null?s:i===0?0:i<1?Math.ceil(i*t)/t:Math.round((i+e)*t)/t-s}function X_(t,e){return Math.floor(e*t)/t}var Yb=k({"packages/ag-charts-community/src/scene/util/pixel.ts"(){"use strict"}});function GA(t,e,i){const{width:s,height:o,padding:a,strokeWidth:n}=e,r=s/2,l=o/2,c=Math.max(1,s-a-n/2),h=Math.max(1,o-a-n/2);let u=!1;for(const[d,p]of i){const g=r+(d-.5)*c,f=l+(p-.5)*h;u?t.lineTo(g,f):t.moveTo(g,f),u=!0}t.closePath()}var Z_,RX=k({"packages/ag-charts-community/src/scene/pattern/patterns.ts"(){"use strict";Ci(),Yb(),Z_={circles(t,{width:e,strokeWidth:i,padding:s}){const o=e/2,a=Math.max(1,o-s-i/2);t.arc(o,o,a,0,Math.PI*2)},squares(t,{width:e,height:i,pixelRatio:s,padding:o,strokeWidth:a}){const n=o+a/2;t.moveTo(ns(s,n),ns(s,n)),t.lineTo(ns(s,e-n),ns(s,n)),t.lineTo(ns(s,e-n),ns(s,i-n)),t.lineTo(ns(s,n),ns(s,i-n)),t.closePath()},triangles(t,e){GA(t,e,[[.5,0],[1,1],[0,1]])},diamonds(t,e){GA(t,e,[[.5,0],[1,.5],[.5,1],[0,.5]])},stars(t,{width:e,height:i,padding:s}){const a=Math.max(1,(e-s)/2),n=a/2,r=Math.PI/2;for(let l=0;l<5*2;l++){const c=l%2===0?a:n,h=l*Math.PI/5-r,u=e/2+Math.cos(h)*c,d=i/2+Math.sin(h)*c;t.lineTo(u,d)}t.closePath()},hearts(t,{width:e,height:i,padding:s}){const o=Math.max(1,e/4-s/2),a=e/2,n=i/2+o/2;t.arc(a-o,n-o,o,je(130),je(330)),t.arc(a+o,n-o,o,je(220),je(50)),t.lineTo(a,n+o),t.closePath()},crosses(t,e){GA(t,e,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},"vertical-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:o}){const a=ns(s,e/2)-o%2/2;t.moveTo(a,0),t.lineTo(a,i)},"horizontal-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:o}){const a=ns(s,i/2)-o%2/2;t.moveTo(0,a),t.lineTo(e,a)},"forward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const o=Math.atan2(i,e),a=s*Math.cos(o),n=s*Math.sin(o);t.moveTo(-a,n),t.lineTo(a,-n),t.moveTo(-a,i+n),t.lineTo(e+a,-n),t.moveTo(e-a,i+n),t.lineTo(e+a,i-n)},"backward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const o=Math.atan2(i,e),a=s*Math.cos(o),n=s*Math.sin(o);t.moveTo(e-a,-n),t.lineTo(e+a,n),t.moveTo(-a,-n),t.lineTo(e+a,i+n),t.moveTo(-a,i-n),t.lineTo(a,i+n)}}}}),q_,PX=k({"packages/ag-charts-community/src/scene/pattern/pattern.ts"(){"use strict";P(),Ci(),mA(),Hb(),RX(),q_=class{constructor(t,e=1){this.pixelRatio=e,this._cache=void 0,this.width=Math.max(t?.width??10,1),this.height=Math.max(t?.height??10,1),this.fill=t.fill??"transparent",this.fillOpacity=t.fillOpacity??1,this.backgroundFill=t.backgroundFill??"transparent",this.backgroundFillOpacity=t.backgroundFillOpacity??1,this.stroke=t.stroke??"black",this.strokeOpacity=t.strokeOpacity??1,this.strokeWidth=t.strokeWidth??1,this.padding=t.padding??1,this.pattern=t.pattern??"forward-slanted-lines",this.rotation=t.rotation??0}getPath(){const{pattern:t,width:e,height:i,padding:s,strokeWidth:o,pixelRatio:a}=this,n=new Zh;return Z_[t](n,{width:e,height:i,pixelRatio:a,strokeWidth:o,padding:s}),n}renderStroke(t,e){const{stroke:i,strokeWidth:s,strokeOpacity:o}=this;s&&(e.strokeStyle=i,e.lineWidth=s,e.globalAlpha=o,e.stroke(t))}renderFill(t,e){const{fill:i,fillOpacity:s}=this;e.fillStyle=i,e.globalAlpha=s,e.fill(t)}createCanvasPattern(t){const{width:e,height:i,backgroundFill:s,backgroundFillOpacity:o,pixelRatio:a,rotation:n}=this,r=new Mb({width:e,height:i,pixelRatio:a}),l=r.context;l.fillStyle=s,l.globalAlpha=o,l.fillRect(0,0,e,i);const c=this.getPath().getPath2D();this.renderFill(c,l),this.renderStroke(c,l);const h=t.createPattern(r.canvas,"repeat"),u=ke(je(n)),d=1/a,p=Math.cos(u)*d,g=Math.sin(u)*d;return h?.setTransform(new DOMMatrix([p,g,-g,p,0,0])),r.destroy(),h}createPattern(t){if(this._cache!=null&&this._cache.ctx===t)return this._cache.pattern;const e=this.createCanvasPattern(t);if(e!=null)return this._cache={ctx:t,pattern:e},e}toSvg(){const{width:t,height:e,fill:i,fillOpacity:s,backgroundFill:o,backgroundFillOpacity:a,stroke:n,strokeWidth:r,strokeOpacity:l,rotation:c}=this,h=os("pattern");h.setAttribute("viewBox",`0 0 ${t} ${e}`),h.setAttribute("width",String(t)),h.setAttribute("height",String(e)),h.setAttribute("patternUnits","userSpaceOnUse");const u=os("rect");u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("width",String(t)),u.setAttribute("height",String(e)),u.setAttribute("fill",o),u.setAttribute("fill-opacity",String(a)),h.appendChild(u);const d=os("path");return d.setAttribute("fill",i),d.setAttribute("fill-opacity",String(s)),d.setAttribute("stroke-opacity",String(l)),d.setAttribute("stroke",n),d.setAttribute("stroke-width",String(r)),d.setAttribute("transform",`rotate(${c})`),d.setAttribute("d",this.getPath().toSVG()),h.appendChild(d),h}}}});function On(t){return li(t)&&t.type=="gradient"}function Q_(t){return Et(t)&&t.every(e=>typeof e=="string")}function qh(t){return t!==null&&li(t)&&t.type=="pattern"}function BX(t){return On(t)||qh(t)}var mp=k({"packages/ag-charts-community/src/scene/util/fill.ts"(){"use strict";P()}}),_s,ua,Sc=k({"packages/ag-charts-community/src/scene/shape/shape.ts"(){"use strict";P(),Bo(),qt(),N_(),O_(),vX(),U_(),ca(),PX(),mp(),Yb(),_s=class ol extends ur{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=ol.defaultStyles.fill,this.stroke=ol.defaultStyles.stroke,this.strokeWidth=ol.defaultStyles.strokeWidth,this.lineDash=ol.defaultStyles.lineDash,this.lineDashOffset=ol.defaultStyles.lineDashOffset,this.lineCap=ol.defaultStyles.lineCap,this.lineJoin=ol.defaultStyles.lineJoin,this.miterLimit=void 0,this.opacity=ol.defaultStyles.opacity,this.fillShadow=ol.defaultStyles.fillShadow}restoreOwnStyles(){const{defaultStyles:e}=this.constructor;Object.assign(this,e)}getGradient(e){if(On(e))return this.createGradient(e)}createGradient(e){const{colorSpace:i="rgb",gradient:s="linear",colorStops:o,rotation:a=0,reverse:n=!1}=e;if(o==null)return;let r=W_(o,["black"],[0,1]);switch(n&&(r=r.map(l=>({color:l.color,stop:1-l.stop})).reverse()),s){case"linear":return new CA(i,r,a);case"radial":return new w_(i,r);case"conic":return new TA(i,r,a)}}getPattern(e){if(qh(e))return this.createPattern(e)}createPattern(e){const i=this.layerManager?.canvas?.pixelRatio??1;return new q_(e,i)}onFillChange(){typeof this.fill=="object"&&dr(this._cachedFill??{},this.fill)||(this.fillGradient=this.getGradient(this.fill),this.fillPattern=this.getPattern(this.fill),this._cachedFill=this.fill)}onStrokeChange(){this.strokeGradient=this.getGradient(this.stroke)}align(e,i){return ns(this.layerManager?.canvas?.pixelRatio??1,e,i)}preRender(e,i){return this.dirty&&(this.cachedDefaultGradientFillBBox=void 0),super.preRender(e,i)}fillStroke(e,i){this.renderFill(e,i),this.renderStroke(e,i)}renderFill(e,i){if(this.fill){const{globalAlpha:s}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),this.executeFill(e,i),e.globalAlpha=s}e.shadowColor="rgba(0, 0, 0, 0)"}executeFill(e,i){i?e.fill(i):e.fill()}applyFill(e){const{fill:i,fillGradient:s,fillBBox:o=this.getDefaultGradientFillBBox()??this.getBBox(),fillParams:a}=this,n=o?s?.createGradient(e,o,a):void 0,r=this.fillPattern?.createPattern(e);e.fillStyle=r??n??(typeof i=="string"?i:void 0)??"black"}applyStroke(e){e.strokeStyle=this.strokeGradient?.createGradient(e,this.getBBox())??(typeof this.stroke=="string"?this.stroke:void 0)??"black"}applyFillAlpha(e){e.globalAlpha*=this.opacity*this.fillOpacity}applyShadow(e){const i=this.layerManager?.canvas.pixelRatio??1,s=this.fillShadow;s?.enabled&&(e.shadowColor=s.color,e.shadowOffsetX=s.xOffset*i,e.shadowOffsetY=s.yOffset*i,e.shadowBlur=s.blur*i)}renderStroke(e,i){if(this.stroke&&this.strokeWidth){const{globalAlpha:s}=e;this.applyStroke(e),e.globalAlpha*=this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),this.miterLimit!=null&&(e.miterLimit=this.miterLimit),this.executeStroke(e,i),e.globalAlpha=s}}executeStroke(e,i){i?e.stroke(i):e.stroke()}getDefaultGradientFillBBox(){return this.cachedDefaultGradientFillBBox==null&&(this.cachedDefaultGradientFillBBox=Object.freeze(this.computeDefaultGradientFillBBox())),this.cachedDefaultGradientFillBBox}computeDefaultGradientFillBBox(){}containsPoint(e,i){return this.isPointInPath(e,i)}applySvgFillAttributes(e,i){const{fill:s,fillOpacity:o}=this;if(typeof s=="string")e.setAttribute("fill",s);else if(On(s)&&this.fillGradient){i??(i=[]);const a=this.fillGradient.toSvg(this.fillBBox??this.getBBox()),n=yA();a.setAttribute("id",n),i.push(a),e.setAttribute("fill",`url(#${n})`)}else if(qh(s)&&this.fillPattern){i??(i=[]);const a=this.fillPattern.toSvg(),n=yA();a.setAttribute("id",n),i.push(a),e.setAttribute("fill",`url(#${n})`)}else e.setAttribute("fill","none");return e.setAttribute("fill-opacity",String(o)),i}applySvgStrokeAttributes(e){const{stroke:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n}=this;if(i!=null&&(e.setAttribute("stroke",typeof i=="string"?i:"none"),e.setAttribute("stroke-opacity",String(s)),e.setAttribute("stroke-width",String(o))),a?.some(r=>r!==0)===!0){const r=a.length%2===1?[...a,...a]:a;e.setAttribute("stroke-dasharray",r.join(" ")),e.setAttribute("stroke-dashoffset",String(n))}}},_s.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},v([gt()],_s.prototype,"fillOpacity",2),v([gt()],_s.prototype,"strokeOpacity",2),v([gt({changeCb:t=>t.onFillChange()})],_s.prototype,"fill",2),v([gt({changeCb:t=>t.onStrokeChange()})],_s.prototype,"stroke",2),v([gt()],_s.prototype,"strokeWidth",2),v([gt()],_s.prototype,"lineDash",2),v([gt()],_s.prototype,"lineDashOffset",2),v([gt()],_s.prototype,"lineCap",2),v([gt()],_s.prototype,"lineJoin",2),v([gt()],_s.prototype,"miterLimit",2),v([gt({convertor:t=>Tt(0,t,1)})],_s.prototype,"opacity",2),v([gt({checkDirtyOnAssignment:!0})],_s.prototype,"fillShadow",2),v([gt({changeCb:t=>t.onFillChange()})],_s.prototype,"fillBBox",2),v([gt({changeCb:t=>t.onFillChange()})],_s.prototype,"fillParams",2),ua=_s}}),jA,Wa,VA=k({"packages/ag-charts-community/src/scene/matrix.ts"(){"use strict";P(),Xt(),jA=[1,0,0,1,0,0],Wa=class Wk{get e(){return[...this.elements]}constructor(e=jA){this.elements=[...e]}setElements(e){const i=this.elements;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],this}get identity(){const e=this.elements;return In(e[0],1)&&In(e[1],0)&&In(e[2],0)&&In(e[3],1)&&In(e[4],0)&&In(e[5],0)}AxB(e,i,s){const o=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],n=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],l=e[0]*i[4]+e[2]*i[5]+e[4],c=e[1]*i[4]+e[3]*i[5]+e[5];s=s??e,s[0]=o,s[1]=a,s[2]=n,s[3]=r,s[4]=l,s[5]=c}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(e){const i=new Array(6);return e instanceof Wk?this.AxB(this.elements,e.elements,i):this.AxB(this.elements,[e.a,e.b,e.c,e.d,e.e,e.f],i),new Wk(i)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){const e=this.elements;let i=e[0],s=e[1],o=e[2],a=e[3];const n=e[4],r=e[5],l=1/(i*a-s*o);return i*=l,s*=l,o*=l,a*=l,new Wk([a,-s,-o,i,o*r-a*n,s*n-i*r])}invertSelf(){const e=this.elements;let i=e[0],s=e[1],o=e[2],a=e[3];const n=e[4],r=e[5],l=1/(i*a-s*o);return i*=l,s*=l,o*=l,a*=l,e[0]=a,e[1]=-s,e[2]=-o,e[3]=i,e[4]=o*r-a*n,e[5]=s*n-i*r,this}transformPoint(e,i){const s=this.elements;return{x:e*s[0]+i*s[2]+s[4],y:e*s[1]+i*s[3]+s[5]}}transformBBox(e,i){const s=this.elements,o=s[0],a=s[1],n=s[2],r=s[3],l=e.width*.5,c=e.height*.5,h=e.x+l,u=e.y+c,d=Math.abs(l*o)+Math.abs(c*n),p=Math.abs(l*a)+Math.abs(c*r);return i??(i=new pt(0,0,0,0)),i.x=h*o+u*n+s[4]-d,i.y=h*a+u*r+s[5]-p,i.width=d+d,i.height=p+p,i}toContext(e){if(this.identity)return;const i=this.elements;e.transform(i[0],i[1],i[2],i[3],i[4],i[5])}static updateTransformMatrix(e,i,s,o,a,n,r){const l=i,c=s;let h,u;l===1&&c===1?(h=0,u=0):(h=r?.scalingCenterX??0,u=r?.scalingCenterY??0);const d=o,p=Math.cos(d),g=Math.sin(d);let f,x;d===0?(f=0,x=0):(f=r?.rotationCenterX??0,x=r?.rotationCenterY??0);const y=a,b=n,S=h*(1-l)-f,M=u*(1-c)-x;return e.setElements([p*l,g*l,-g*c,p*c,p*S-g*M+f+y,g*S+p*M+x+b]),e}}}});function vc(t){return J_(t.constructor)}function J_(t){return t[HA]===!0}function WA(t){var e,i;const s=t;if(J_(t))return t;const o=Symbol("matrix_combined_transform");class a extends s{constructor(){super(...arguments),this[i]=new Wa,this._dirtyTransform=!0}markDirtyTransform(){this._dirtyTransform=!0,super.markDirty()}updateMatrix(r){}computeTransformMatrix(){this._dirtyTransform&&(this[o].setElements(jA),this.updateMatrix(this[o]),this._dirtyTransform=!1)}toParent(r){return this.computeTransformMatrix(),this[o].identity?r.clone():this[o].transformBBox(r)}toParentPoint(r,l){return this.computeTransformMatrix(),this[o].identity?{x:r,y:l}:this[o].transformPoint(r,l)}fromParent(r){return this.computeTransformMatrix(),this[o].identity?r.clone():this[o].inverse().transformBBox(r)}fromParentPoint(r,l){return this.computeTransformMatrix(),this[o].identity?{x:r,y:l}:this[o].inverse().transformPoint(r,l)}computeBBox(){const r=super.computeBBox();return r&&this.toParent(r)}computeBBoxWithoutTransforms(){return super.computeBBox()}pickNode(r,l){return{x:r,y:l}=this.fromParentPoint(r,l),super.pickNode(r,l)}pickNodes(r,l,c){return{x:r,y:l}=this.fromParentPoint(r,l),super.pickNodes(r,l,c)}render(r){this.computeTransformMatrix();const{ctx:l}=r,c=this[o];let h=!1;c.identity||(l.save(),h=!0,c.toContext(l)),super.render(r),h&&l.restore()}toSVG(){this.computeTransformMatrix();const r=super.toSVG(),l=this[o];if(l.identity||r==null)return r;const c=os("g");c.append(...r.elements);const[h,u,d,p,g,f]=l.e;return c.setAttribute("transform",`matrix(${h} ${u} ${d} ${p} ${g} ${f})`),{elements:[c],defs:r.defs}}}return e=HA,i=o,a[e]=!0,a}function yp(t){var e;const i=t,s=Symbol("matrix_rotation");class o extends WA(i){constructor(){super(...arguments),this[e]=new Wa,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0}updateMatrix(n){super.updateMatrix(n);const{rotation:r,rotationCenterX:l,rotationCenterY:c}=this;r!==0&&(Wa.updateTransformMatrix(this[s],1,1,r,0,0,{rotationCenterX:l,rotationCenterY:c}),n.multiplySelf(this[s]))}}return e=s,v([gt({type:"transform"})],o.prototype,"rotationCenterX",2),v([gt({type:"transform"})],o.prototype,"rotationCenterY",2),v([gt({type:"transform"})],o.prototype,"rotation",2),o}function UA(t){var e;const i=t,s=Symbol("matrix_scale");class o extends WA(i){constructor(){super(...arguments),this[e]=new Wa,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null}updateMatrix(n){super.updateMatrix(n);const{scalingX:r,scalingY:l,scalingCenterX:c,scalingCenterY:h}=this;r===1&&l===1||(Wa.updateTransformMatrix(this[s],r,l,0,0,0,{scalingCenterX:c,scalingCenterY:h}),n.multiplySelf(this[s]))}}return e=s,v([gt({type:"transform"})],o.prototype,"scalingX",2),v([gt({type:"transform"})],o.prototype,"scalingY",2),v([gt({type:"transform"})],o.prototype,"scalingCenterX",2),v([gt({type:"transform"})],o.prototype,"scalingCenterY",2),o}function Qh(t){var e;const i=t,s=Symbol("matrix_translation");class o extends WA(i){constructor(){super(...arguments),this[e]=new Wa,this.translationX=0,this.translationY=0}updateMatrix(n){super.updateMatrix(n);const{translationX:r,translationY:l}=this;r===0&&l===0||(Wa.updateTransformMatrix(this[s],1,1,0,r,l),n.multiplySelf(this[s]))}}return e=s,v([gt({type:"transform"})],o.prototype,"translationX",2),v([gt({type:"transform"})],o.prototype,"translationY",2),o}var HA,Ke,ms=k({"packages/ag-charts-community/src/scene/transformable.ts"(){"use strict";P(),VA(),ca(),HA=Symbol("isMatrixTransform"),Ke=class{static fromCanvas(t,e){const i=[];for(const s of t.traverseUp())vc(s)&&i.unshift(s);for(const s of i)e=s.fromParent(e);return vc(t)&&(e=t.fromParent(e)),e}static toCanvas(t,e){e==null?e=t.getBBox():vc(t)&&(e=t.toParent(e));for(const i of t.traverseUp())vc(i)&&(e=i.toParent(e));return e}static fromCanvasPoint(t,e,i){const s=[];for(const o of t.traverseUp())vc(o)&&s.unshift(o);for(const o of s)({x:e,y:i}=o.fromParentPoint(e,i));return vc(t)&&({x:e,y:i}=t.fromParentPoint(e,i)),{x:e,y:i}}static toCanvasPoint(t,e,i){vc(t)&&({x:e,y:i}=t.toParentPoint(e,i));for(const s of t.traverseUp())vc(s)&&({x:e,y:i}=s.toParentPoint(e,i));return{x:e,y:i}}}}});function tR(t,e){if(typeof t=="number"&&typeof e=="number")return Kb(t,e);const i=typeof t=="number"?[t]:t,s=typeof e=="number"?[e]:e,o=Math.min(i.length,s.length);for(let a=0;a<o;a+=1){const n=Kb(i[a],s[a]);if(n!==0)return n}return Kb(i.length,s.length)}var Kb,eR=k({"packages/ag-charts-community/src/scene/zIndex.ts"(){"use strict";Kb=(t,e)=>Math.sign(t-e)}}),im,$b,It,iR,sR,qs,xp,Ve=k({"packages/ag-charts-community/src/scene/group.ts"(){"use strict";P(),Xt(),mA(),ca(),Sc(),ms(),Yb(),eR(),$b=class ib extends ur{constructor(e){super(e),this.opacity=1,this.renderToOffscreenCanvas=!1,this.optimizeForInfrequentRedraws=!1,this.layer=void 0,this.image=void 0,this._lastWidth=NaN,this._lastHeight=NaN,this._lastDevicePixelRatio=NaN,this.isContainerNode=!0,this.renderToOffscreenCanvas=e?.renderToOffscreenCanvas===!0}static is(e){return e instanceof ib}static computeChildrenBBox(e,i=!0){return pt.merge(ur.extractBBoxes(e,i))}static compareChildren(e,i){return tR(e.zIndex,i.zIndex)||e.serialNumber-i.serialNumber}containsPoint(e,i){return!0}computeBBox(){return ib.computeChildrenBBox(this.children())}computeSafeClippingBBox(e){const i=this.computeBBox();if(!i.isFinite())return;let s=0;const o=4;for(const d of this.descendants())d instanceof ua&&(s=Math.max(s,d.strokeWidth));const a=Math.max(1,s/2*o),{x:n,y:r}=Ke.toCanvasPoint(this,0,0),l=X_(e,n+i.x-a)-n,c=X_(e,r+i.y-a)-r,h=Math.ceil(i.x+i.width-l+a),u=Math.ceil(i.y+i.height-c+a);return new pt(l,c,h,u)}prepareSharedCanvas(e,i,s){return im==null||im.pixelRatio!==s?im=new Mb({width:e,height:i,pixelRatio:s}):im.resize(e,i,s),im}isDirty(e){const{width:i,height:s,devicePixelRatio:o}=e,{dirty:a,dirtyZIndex:n,layer:r}=this,l=r!=null&&(this._lastWidth!==i||this._lastHeight!==s),c=this._lastDevicePixelRatio!==o;if(this._lastWidth=i,this._lastHeight=s,this._lastDevicePixelRatio=o,a||n||l||c)return!0;for(const h of this.children())if(h.dirty)return!0;return!1}preRender(e){const i=super.preRender(e,0);return i.groups+=1,i.nonGroups-=1,this.renderToOffscreenCanvas&&!this.optimizeForInfrequentRedraws&&i.nonGroups>0&&this.getVisibility()?this.layer??(this.layer=this._layerManager?.addLayer({name:this.name})):this.layer!=null&&(this._layerManager?.removeLayer(this.layer),this.layer=void 0),i}render(e){const{layer:i,renderToOffscreenCanvas:s}=this,o={...e};if(!s){this.renderInContext(o),super.render(o);return}const{ctx:a,stats:n,devicePixelRatio:r}=e;let{image:l}=this;if(this.isDirty(e)){l?.bitmap.close(),l=void 0;const h=i?void 0:this.computeSafeClippingBBox(r),u=(d,...p)=>{const g=d.context;o.ctx=g,d.clear(),g.save(),g.setTransform(...p),g.globalAlpha=1,this.renderInContext(o),g.restore(),g.verifyDepthZero?.()};if(i)u(i,a.getTransform());else if(h){const{x:d,y:p,width:g,height:f}=h,x=this.prepareSharedCanvas(g,f,r);u(x,r,0,0,r,-d*r,-p*r),l={bitmap:x.transferToImageBitmap(),x:d,y:p,width:g,height:f}}else this.dirtyZIndex&&this.sortChildren(ib.compareChildren);this.image=l,n&&n.layersRendered++}else this.skipRender(o),n&&n.layersSkipped++;const{globalAlpha:c}=a;if(a.globalAlpha=c*this.opacity,i)a.save(),a.resetTransform(),i.drawImage(a),a.restore();else if(l){const{bitmap:h,x:u,y:d,width:p,height:g}=l;a.drawImage(h,0,0,p*r,g*r,u,d,p,g)}a.globalAlpha=c,super.render(o)}skipRender(e){const{stats:i}=e;for(const s of this.children())s.markClean(),i&&(i.nodesSkipped+=this.childNodeCounts.groups+this.childNodeCounts.nonGroups,i.opsSkipped+=this.childNodeCounts.complexity)}applyClip(e,i){const{x:s,y:o,width:a,height:n}=i;e.beginPath(),e.rect(s,o,a,n),e.clip()}renderInContext(e){const{ctx:i,stats:s}=e;this.dirtyZIndex&&this.sortChildren(ib.compareChildren),i.save(),i.globalAlpha*=this.opacity,this.clipRect!=null&&(this.applyClip(i,this.clipRect),e.clipBBox=Ke.toCanvas(this,this.clipRect));for(const o of this.children()){if(!o.visible){o.markClean(),s&&(s.nodesSkipped+=o.childNodeCounts.nonGroups+o.childNodeCounts.groups,s.opsSkipped+=o.childNodeCounts.complexity);continue}i.save(),o.render(e),i.restore()}i.restore()}setClipRect(e){this.clipRect=e?Ke.fromCanvas(this,e):void 0}setClipRectCanvasSpace(e){this.clipRect=e}_setLayerManager(e){this.layer&&(this._layerManager?.removeLayer(this.layer),this.layer=void 0),super._setLayerManager(e)}getVisibility(){for(const e of this.traverseUp(!0))if(!e.visible)return!1;return!0}toSVG(){if(!this.visible)return;const e=[],i=[];for(const s of this.children()){const o=s.toSVG();o!=null&&(i.push(...o.elements),o.defs!=null&&e.push(...o.defs))}return{elements:i,defs:e}}},$b.className="Group",v([gt({convertor:t=>Tt(0,t,1)})],$b.prototype,"opacity",2),It=$b,iR=class extends UA(It){},sR=class extends yp(It){},qs=class extends Qh(It){},xp=class extends yp(Qh(It)){}}});function zX(){return new Promise(t=>{setTimeout(t,0)})}var YA,FX=k({"packages/ag-charts-community/src/util/async.ts"(){"use strict";YA=class{constructor(){this.queue=[]}await(t=50){return new Promise(e=>{const i=()=>{clearTimeout(o),e(!0)},o=setTimeout(()=>{const a=this.queue.indexOf(i);a<0||(this.queue.splice(a,1),e(!1))},t);this.queue.push(i)})}notify(){this.queue.splice(0).forEach(t=>t())}}}});function Xb(t,e){t&&(e=Bf.normalize(e),e.width==null?t.style.removeProperty("width"):t.style.width=`${e.width}px`,e.height==null?t.style.removeProperty("height"):t.style.height=`${e.height}px`,e.x==null?t.style.removeProperty("left"):t.style.left=`${e.x}px`,e.y==null?t.style.removeProperty("top"):t.style.top=`${e.y}px`)}function oR(t){const e=parseFloat(t.style.width)||t.offsetWidth,i=parseFloat(t.style.height)||t.offsetHeight,s=parseFloat(t.style.left)||t.offsetLeft,o=parseFloat(t.style.top)||t.offsetTop;return{x:s,y:o,width:e,height:i}}function GX(t){if(t.focus({preventScroll:!0}),t.lastChild?.textContent==null)return;const e=cr().createRange();e.setStart(t.lastChild,t.lastChild.textContent.length),e.setEnd(t.lastChild,t.lastChild.textContent.length);const i=xe().getSelection();i?.removeAllRanges(),i?.addRange(e)}function jX(t){return`${t??"ag-charts-element"}-${nR++}`}function aR(){const t=xe("navigator");if("scheduling"in t){const e=t.scheduling;if("isInputPending"in e)return e.isInputPending({includeContinuous:!0})}return!1}function Zb(t){return`ag-charts-icon ag-charts-icon-${t}`}var nR,Jh=k({"packages/ag-charts-community/src/util/dom.ts"(){"use strict";P(),bb(),nR=0}});function fr(t,e,i){if(Et(e)){if(!Et(t)||t.length!==e.length||e.some((s,o)=>fr(t[o],s,i)!=null))return e}else if(Ye(e)){if(!Ye(t))return e;const s={},o=new Set([...Object.keys(t),...Object.keys(e)]);for(const a of o)if(t[a]!==e[a])if(i?.has(a))s[a]=e[a];else if(typeof t[a]==typeof e[a]){const n=fr(t[a],e[a],i);n!==null&&(s[a]=n)}else s[a]=e[a];return Object.keys(s).length?s:null}else if(t!==e)return e;return null}function rR(t,e){for(const i of Object.keys(t))if(t[i]!==e?.[i])return!1;return!0}function we(t,e){return Et(t)?t.map(i=>we(i,e)):Ye(t)?VX(t,e):t instanceof Map?new Map(we(Array.from(t))):KA(t)}function VX(t,e){const i={};for(const s of Object.keys(t))e?.assign?.has(s)?i[s]=t[s]:e?.shallow?.has(s)?i[s]=KA(t[s]):i[s]=we(t[s],e);return i}function KA(t){return Et(t)?t.slice(0):Ye(t)?{...t}:Fh(t)?new Date(t):XE(t)?new RegExp(t.source,t.flags):t}function ul(t,e,i,s,o,a){if(Et(t)){a=e(t,s,o,a);let n=0;for(const r of t)a=ul(r,e,i,s?.[n],o,a),n++}else if(Ye(t)){a=e(t,s,o,a);for(const n of Object.keys(t)){if(i?.has(n))continue;const r=t[n];a=ul(r,e,i,s?.[n],o,a)}}return a}function sm(t,e,i={}){const{path:s,matcherPath:o=s?.replace(/(\[[0-9+]+])/i,"[]"),skip:a=[]}=i;if(t==null)throw new Error(`AG Charts - target is uninitialised: ${s??"<root>"}`);if(e==null)return t;if(Va(t))return t.set(e);const n=t,r=$A(t);for(const l of Object.keys(e)){if(Ib.has(l))continue;const c=`${o?o+".":""}${l}`;if(a.includes(c))continue;const h=e[l],u=`${s?s+".":""}${l}`,d=n.constructor,p=n[l];try{const g=$A(p),f=$A(h);if(r===Jb&&!(l in t||l==="context")){if(h===void 0)continue;tt.warn(`unable to set [${u}] in ${d?.name} - property is unknown`);continue}if(g!=null&&f!=null&&f!==g&&(g!==Jb||f!=="object")){tt.warn(`unable to set [${u}] in ${d?.name} - can't apply type of [${f}], allowed types are: [${g}]`);continue}if(Va(p))n[l].set(h);else if(f==="object"&&l!=="context"){if(p==null){tt.warn(`unable to set [${u}] in ${d?.name} - property is unknown`);continue}sm(p,h,{...i,path:u,matcherPath:c})}else n[l]=h}catch(g){tt.warn(`unable to set [${u}] in [${d?.name}]; nested error is: ${g.message}`)}}return t}function $A(t){return t==null?null:ZE(t)||Fh(t)?"primitive":Et(t)?"array":li(t)?Ye(t)?"object":Jb:nl(t)?"function":"primitive"}function qb(t,e,i,s){return XA(t,e,s??t,{matches:new Map},i)}function XA(t,e,i,s,o,a=[],n={}){if(Et(t)){lR(t,e,i,s,a,n);let r=0;for(const l of t)XA(l,e,i,s,o,[...a,`${r}`],n),r++}else if(Ye(t)){lR(t,e,i,s,a,n);for(const r of Object.keys(t)){if(o?.has(r))continue;const l=t[r];XA(l,e,i,s,o,[...a,r],n)}}return n}function lR(t,e,i,s,o,a){if(Et(t))for(let n=0;n<t.length;n++)t[n]=cR(t[n],e,i,s,[...o,`${n}`],a),t[n]===tS&&(t[n]=void 0);else{let n=!1;for(const r of Object.keys(t))t[r]=cR(t[r],e,i,s,[...o,r],a),n||(n=wn(r,am)),t[r]===tS&&delete t[r];if(n&&Object.keys(t).length>1)for(const r of Object.keys(t))wn(r,am)&&delete t[r]}}function cR(t,e,i,s,o,a){const n=Mc(t);if(!n)return t;a[o.join(".")]=t;const r=om(n.operation,n.values,e,i,o,s);return r===void 0?tS:r}function Mc(t){if(!Ye(t))return;const[e]=Object.keys(t);if(wn(e,am))return{operation:e,values:t[e]}}function om(t,e,i,s,o,a){a.referencedParams??(a.referencedParams=new Set);const n=["$find","$map"];Et(e)&&!n.includes(t)&&(e=e.map(l=>{const c=Mc(l);return c?om(c.operation,c.values,i,s,o,a):l}));const r=am[t];return r(e,o,i,s,a)}function wn(t,e){return Wi(t)&&(li(e)||Et(e))&&t in e}function Qb(t){return na(t)&&t>=0&&t<=1}function hR(t){return li(t)&&t.type=="gradient"}function WX(t){return t!==null&&li(t)&&t.type=="pattern"}function uR(t,e){const i=e.split("/");let s=[...t];e.startsWith("/")&&(s=[],i.shift());let o=!1;for(const a of i){if(a==="..")s.pop(),o||s.pop();else if(a===".")s.pop();else if(a==="$index"){const n=t.findLast(r=>!isNaN(Number(r)));n!=null&&s.push(n)}else if(a==="$prevIndex"){const n=t.findLast(r=>!isNaN(Number(r)));n!=null&&s.push(`${Number(n)-1}`)}else a.length!==0&&s.push(a);o=a===".."}return s}function dR(t,e,i,s,o){if(!wn(t,i)){tt.warnOnce(`\`$ref\` json operation failed on [${String(t)}] at [${e.join(".")}], expecting one of [${Object.keys(i).join(", ")}].`);return}const a=Mc(i[t]);if(a?.operation!=="$ref")return i[t];if(o.referencedParams?.has(a.values)){tt.warnOnce(`\`$ref\` json operation failed on [${String(t)}] at [${e.join(".")}], circular reference detected with [${[...o.referencedParams].join(", ")}].`);return}return o.referencedParams?.add(a.values),dR(a.values,e,i,s,o)}function UX(t,e,i,s){if(!Wi(t))return;const o=i.__palette;if(["fill","fillFallback","stroke","gradient","range2"].includes(t)){const n=e.findLastIndex(u=>!isNaN(Number(u)));let r=Number(e[n]);if(isNaN(r))return;const l=e.slice(0,n),c=["map-shape-background","map-line-background"],h=up(s,l).slice(0,r).filter(u=>c.includes(u.type)).length;switch(r-=h,t){case"fill":return rp(o.fills,1,r)[0];case"fillFallback":return rp(o.fillsFallback,1,r)[0];case"stroke":return rp(o.strokes,1,r)[0];case"gradient":return rp(o.sequentialColors,1,r)[0];case"range2":return rp(o.fills,2,r)}return}return t==="gradients"?o.sequentialColors:up(o,t)}function HX(t,e,i,s){let o=!1,a,n=!1,r=s;if(Et(t))o=!0,a=t[1],n=t.length===3,r=n?t[2]:r,t=t[0];else if(!Wi(t)){tt.warnOnce(`\`$path\` json operation failed on [${String(t)}] at [${e.join(".")}], expecting a string.`);return}const l=uR(n?[]:e,t);let c=r;for(const h of l){if(!wn(h,c)){if(o)return a;tt.warnOnce(`\`$path\` json operation failed on [${String(t)}] at [${e.join(".")}] resolved to [${l.join(".")}], could not find path in object.`);return}c=c[h]}return Object.isFrozen(c)?we(c):c}function YX(t,e,i,s){const o=Wi(t)?uR(e,t):e,a=o.length===0?s:up(s,o);return Mc(a)!=null}function KX([t],e){if(typeof t=="number")return t%2===0;tt.warnOnce(`\`$isEven\` json operation failed on [${String(t)}] at [${e.join(".")}], expecting a number.`)}function $X([t,e],i){if(typeof t=="number"&&typeof e=="number")return t*e;tt.warnOnce(`\`$mul\` json operation failed on [${String(t)}] and [${String(e)}] at [${i.join(".")}], expecting two numbers.`)}function XX([t],e){if(typeof t=="number")return Math.round(t);tt.warnOnce(`\`$round\` json operation failed on [${String(t)}] at [${e.join(".")}], expecting a number.`)}function ZX([t,e],i,s,o,a){const n=Mc(e);if(n&&(e=om(n.operation,n.values,s,o,i,a)),!Et(e))return[];const r=Mc(t);return r?(a.matches.set(i.join("."),e),e.map(()=>({[r.operation]:r.values}))):[]}function qX([t,e],i,s,o,a){const n=Mc(e);if(n&&(e=om(n.operation,n.values,s,o,i,a)),!Et(e))return;const r=Mc(t);return r?e.find(l=>om(r.operation,r.values,s,l,[],a)):t?e[0]:void 0}function QX(t){if(Et(t)){for(const e of t)if(!Ye(e))return;return Vt(...t)}}function JX([t,e]){if(!(!Et(t)||!Ye(e)))return mc(e,t)}function tZ(t,e,i,s,o){if(t!=="$1"&&t!=="$index")return t;const a=e.findLastIndex(l=>!isNaN(Number(l)));if(a===-1)return t;const n=Number(e[a]);if(t==="$index")return n;const r=e.slice(0,a).join(".");return o.matches.get(r)?.at(n)}function eZ([t],e,i){const s="fontSize";if(wn(s,i)&&typeof i[s]=="number"&&typeof t=="number")return Math.round(t*i[s]);tt.warnOnce(`\`$rem\` json operation failed on [${String(t)}] at [${e.join(".")}], expecting a number.`)}function iZ([t,e,i],s){const o=`\`$mix\` json operation failed on [${String(t)}, ${String(e)}, ${String(i)}] at [${s.join(".")}], expecting`,a=`${o} two colors and a number between 0 and 1.`;if(typeof e!="string"||!Qb(i)){tt.warnOnce(a);return}if(typeof t=="string")try{return re.mix(re.fromString(t),re.fromString(e),i).toString()}catch{tt.warnOnce(a);return}if(!hR(t)){tt.warnOnce(a);return}let n=t.colorStops;try{n=n?.map(r=>{let l;return typeof r.color=="string"&&(l=re.mix(re.fromString(r.color),re.fromString(e),i).toString()),{...r,color:l}})}catch{tt.warnOnce(`${o} a gradient, a color and a number between 0 and 1.`);return}return{...t,colorStops:n}}function sZ([t],e,i){const s="foregroundColor",o="backgroundColor";if(wn(s,i)&&wn(o,i)&&typeof i[s]=="string"&&typeof i[o]=="string"&&Qb(t))return re.mix(re.fromString(i[s]),re.fromString(i[o]),t).toString();tt.warnOnce(`\`$foregroundBackgroundMix\` json operation failed on [${String(t)}}}] at [${e.join(".")}], expecting a number between 0 and 1.`)}function oZ([t,e],i,s){const o="foregroundColor",a="backgroundColor",n="accentColor";if(wn(o,s)&&wn(a,s)&&wn(n,s)&&typeof s[o]=="string"&&typeof s[a]=="string"&&typeof s[n]=="string"&&Qb(t)&&Qb(e))return re.mix(re.mix(re.fromString(s[o]),re.fromString(s[a]),t),re.fromString(s[n]),e).toString();tt.warnOnce(`\`$foregroundBackgroundAccentMix\` json operation failed on [${String(t)}, ${String(e)}}] at [${i.join(".")}], expecting two numbers between 0 and 1.`)}function aZ([t,e]){if(!(!Et(t)||!na(e)))return re.interpolate(t.map(i=>re.fromString(i)),e).map(i=>i.toString())}var Jb,tS,pR,gR,fR,mR,yR,xR,am,zo=k({"packages/ag-charts-community/src/util/json.ts"(){"use strict";P(),Kh(),qt(),ge(),Jb="class-instance",tS=Symbol("operation-resolved-undefined"),pR={$ref:dR,$path:HX,$palette:UX},gR={$if:([t,e,i])=>t?e:i,$eq:([t,e])=>t===e,$not:([t])=>!t,$or:t=>Et(t)&&t.some(Boolean),$and:t=>Et(t)&&t.every(Boolean),$switch:()=>{},$isOperation:YX},fR={$isEven:KX,$mul:$X,$round:XX},mR={$map:ZX,$find:qX,$merge:QX,$omit:JX,$value:tZ},yR={$rem:eZ},xR={$mix:iZ,$foregroundBackgroundMix:sZ,$foregroundBackgroundAccentMix:oZ,$interpolate:aZ,$isGradient:([t])=>hR(t),$isPattern:([t])=>WX(t)},am={...pR,...gR,...fR,...mR,...yR,...xR}}}),bR,nZ=k({"packages/ag-charts-community/src/util/mutex.ts"(){"use strict";P(),bR=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(t){return new Promise(e=>{this.acquireQueue.push([t,e]),this.available&&this.dispatchNext().catch(i=>tt.errorOnce(i))})}async acquireImmediately(t){return this.available?(await this.acquire(t),!0):!1}async waitForClearAcquireQueue(){return this.acquire(()=>Promise.resolve(void 0))}async dispatchNext(){this.available=!1;let[t,e]=this.acquireQueue.shift()??[];for(;t;){try{await t(),e?.()}catch(i){tt.error("mutex callback error",i),e?.()}[t,e]=this.acquireQueue.shift()??[]}this.available=!0}}}}),ZA,SR=k({"packages/ag-charts-community/src/util/observable.ts"(){"use strict";ZA=class{constructor(){this.eventListeners=new Map}addEventListener(t,e){if(typeof e!="function")throw new Error("AG Charts - listener must be a Function");const i=this.eventListeners.get(t);i?i.add(e):this.eventListeners.set(t,new Set([e]))}removeEventListener(t,e){const i=this.eventListeners.get(t);i!=null&&(i.delete(e),i.size===0&&this.eventListeners.delete(t))}hasEventListener(t){return this.eventListeners.has(t)}clearEventListeners(){this.eventListeners.clear()}fireEvent(t){this.eventListeners.get(t.type)?.forEach(e=>e(t))}}}}),dl,qA=k({"packages/ag-charts-community/src/util/padding.ts"(){"use strict";ge(),Nt(),dl=class extends Ct{constructor(t=0,e=t,i=t,s=e){super(),this.top=t,this.right=e,this.bottom=i,this.left=s}},v([A(lt)],dl.prototype,"top",2),v([A(lt)],dl.prototype,"right",2),v([A(lt)],dl.prototype,"bottom",2),v([A(lt)],dl.prototype,"left",2)}});function be(t,e){const i=Et(t)?t:t.split(".");if(i.length===1){const[s]=i;return ll((o,a,n)=>o[s]=n,o=>o[s],e)}return ll((s,o,a)=>vA(s,i,a),s=>up(s,i),e)}function rZ(t){return ll((e,i,s)=>e[t]=s)}function ys(t,e){return ll((i,s,o)=>i[t][e??s]=o)}function Fo(t){const{newValue:e,oldValue:i,changeValue:s}=t;return ll((o,a,n,r)=>(n!==r&&(r!==void 0&&i?.call(o,r),n!==void 0&&e?.call(o,n),s?.call(o,n,r)),n))}function Dc(t){return A_(t)}var bo=k({"packages/ag-charts-community/src/util/proxy.ts"(){"use strict";P(),Hh(),qt()}});function lZ(t){return vR((e,i)=>xe().requestAnimationFrame(e),t)}function cZ(t){return vR((e,i=0)=>{i===0?queueMicrotask(e):setTimeout(e,i)},t)}function vR(t,e){let i=0,s=!1,o,a;const n=()=>s,r=()=>{s=!1,a?.(),a=void 0,o=void 0,i>0&&t(l)},l=()=>{const c=i;i=0,s=!0;const h=e({count:c});if(!h){r();return}h.then(r,r)};return{schedule(c){i===0&&!n()&&t(l,c),i++},async await(){if(n())for(o==null&&(o=new Promise(c=>{a=c}));n();)await o}}}var MR=k({"packages/ag-charts-community/src/util/render.ts"(){"use strict";P()}});function tu(t){return t==="true"}function hZ(t){return Number(t)}function En(t){return t}function ve(t,e,i){i==null||i===""||i===""?t?.removeAttribute(e):t?.setAttribute(e,i.toString())}function eu(t,e){if(e!=null)for(const[i,s]of ja(e))i!=="class"&&ve(t,i,s)}function eS(t,e,i){if(!(t instanceof HTMLElement))return;const s=t.getAttribute(e);return s===null?i:DR[e]?.(s)??void 0}function _n(t,e,i){t!=null&&(i==null?t.style.removeProperty(e):t.style.setProperty(e,i.toString()))}function uZ(t,e){for(const[i,s]of ja(e))_n(t,i,s)}var DR,Qs=k({"packages/ag-charts-community/src/util/attributeUtil.ts"(){"use strict";P(),DR={role:En,"aria-checked":tu,"aria-controls":En,"aria-describedby":En,"aria-disabled":tu,"aria-expanded":tu,"aria-haspopup":tu,"aria-hidden":tu,"aria-label":En,"aria-labelledby":En,"aria-live":En,"aria-orientation":En,"aria-selected":tu,"data-preventdefault":tu,class:En,id:En,tabindex:hZ,title:En,placeholder:En}}});function bp(t,e,i){const{offsetX:s,offsetY:o,clientX:a,clientY:n}=e,{currentX:r,currentY:l}=mr.calcCurrentXY(i,e);return{type:t,offsetX:s,offsetY:o,clientX:a,clientY:n,currentX:r,currentY:l,sourceEvent:e}}function iS(t,e,i){return{type:t,sourceEvent:e}}var sS,kR,mr,oS=k({"packages/ag-charts-community/src/widget/widgetEvents.ts"(){"use strict";sS=["blur","change","contextmenu","focus","keydown","keyup","click","dblclick","mouseenter","mousemove","mouseleave","wheel","touchstart","touchmove","touchend","touchcancel"],kR={blur:t=>({type:"blur",sourceEvent:t}),change:t=>({type:"change",sourceEvent:t}),contextmenu:(t,e)=>bp("contextmenu",t,e),focus:t=>({type:"focus",sourceEvent:t}),keydown:t=>({type:"keydown",sourceEvent:t}),keyup:t=>({type:"keyup",sourceEvent:t}),click:(t,e)=>bp("click",t,e),dblclick:(t,e)=>bp("dblclick",t,e),mouseenter:(t,e)=>bp("mouseenter",t,e),mousemove:(t,e)=>bp("mousemove",t,e),mouseleave:(t,e)=>bp("mouseleave",t,e),wheel:t=>{const{offsetX:e,offsetY:i,clientX:s,clientY:o}=t,a=t.deltaMode===0?.01:1,n=t.deltaX*a,r=t.deltaY*a;return{type:"wheel",offsetX:e,offsetY:i,clientX:s,clientY:o,deltaX:n,deltaY:r,sourceEvent:t}},touchstart:(t,e)=>iS("touchstart",t,e),touchmove:(t,e)=>iS("touchmove",t,e),touchend:(t,e)=>iS("touchend",t,e),touchcancel:(t,e)=>iS("touchcancel",t,e)},mr=class{static alloc(t,e,i){return kR[t](e,i)}static isHTMLEvent(t){return sS.includes(t)}static calcCurrentXY(t,e){const i=t.getBoundingClientRect();return{currentX:e.clientX-i.x,currentY:e.clientY-i.y}}}}}),AR,dZ=k({"packages/ag-charts-community/src/widget/widgetListenerHTML.ts"(){"use strict";P(),oS(),AR=class{constructor(){this.widgetListeners={},this.sourceListeners={}}initSourceHandler(t,e){this.sourceListeners??(this.sourceListeners={}),this.sourceListeners[t]=e}lazyGetWidgetListeners(t,e){var i;if(!(t in(this.sourceListeners??{}))){const s=a=>{const n=mr.alloc(t,a,e.getElement());for(const r of this.widgetListeners?.[t]??[])r(n,e)},o={};t.startsWith("touch")&&(o.passive=!1),this.initSourceHandler(t,s),e.getElement().addEventListener(t,s,o)}return this.widgetListeners??(this.widgetListeners={}),(i=this.widgetListeners)[t]??(i[t]=[]),this.widgetListeners[t]}add(t,e,i){this.lazyGetWidgetListeners(t,e).push(i)}remove(t,e,i){const s=this.lazyGetWidgetListeners(t,e),o=s.indexOf(i);o>-1&&s.splice(o,1)}destroy(t){for(const[e,i]of ja(this.sourceListeners??{}))t.getElement().removeEventListener(e,i);this.widgetListeners=void 0,this.sourceListeners=void 0}}}});function pZ(t,e,i,s){if(t.globalMouseDragCallbacks==null)return new IR(t,e,i,s)}var IR,gZ=k({"packages/ag-charts-community/src/widget/mouseDragger.ts"(){"use strict";P(),IR=class{constructor(t,e,i,s){this.glob=t,this.self=e,this.window=xe(),this.mousegeneral=l=>{l.stopPropagation(),l.stopImmediatePropagation()},this.mousemove=l=>{l.stopPropagation(),l.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mousemove(l)},this.mouseup=l=>{l.button===0&&(l.stopPropagation(),l.stopImmediatePropagation(),this.glob.globalMouseDragCallbacks?.mouseup(l),this.destroy())};const{window:o,mousegeneral:a,mousemove:n,mouseup:r}=this;o.addEventListener("mousedown",a,{capture:!0}),o.addEventListener("mouseenter",a,{capture:!0}),o.addEventListener("mouseleave",a,{capture:!0}),o.addEventListener("mouseout",a,{capture:!0}),o.addEventListener("mouseover",a,{capture:!0}),o.addEventListener("mousemove",n,{capture:!0}),o.addEventListener("mouseup",r,{capture:!0}),e.mouseDragger=this,t.globalMouseDragCallbacks=i,t.globalMouseDragCallbacks.mousedown(s)}destroy(){const{window:t,mousegeneral:e,mousemove:i,mouseup:s}=this;t.removeEventListener("mousedown",e,{capture:!0}),t.removeEventListener("mouseenter",e,{capture:!0}),t.removeEventListener("mouseleave",e,{capture:!0}),t.removeEventListener("mouseout",e,{capture:!0}),t.removeEventListener("mouseover",e,{capture:!0}),t.removeEventListener("mousemove",i,{capture:!0}),t.removeEventListener("mouseup",s,{capture:!0}),this.glob.globalMouseDragCallbacks=void 0,this.self.mouseDragger=void 0}}}});function fZ(t,e){const i=t.clientX-e.clientX,s=t.clientY-e.clientY;return i*i+s*s}function mZ(t,e,i,s,o){if(!(t.globalTouchDragCallbacks!=null||aS))return new LR(t,e,i,s,o)}var TR,CR,aS,LR,yZ=k({"packages/ag-charts-community/src/widget/touchDragger.ts"(){"use strict";P(),TR=500,CR=100,aS=!1,LR=class{constructor(t,e,i,s,o){this.glob=t,this.self=e,this.initialTouch=s,this.target=o,this.longTapInterrupted=!1,this.longtap=()=>{const{target:r,initialTouch:l}=this;if(!this.longTapInterrupted){r.dispatchEvent(new TouchEvent("touchcancel",{touches:[l],bubbles:!0})),aS=!0;const c=g=>{g.preventDefault()},h=g=>{aS=!1,g.preventDefault(),r.removeEventListener("touchmove",c),r.removeEventListener("touchend",h),r.removeEventListener("touchcancel",h)};r.addEventListener("touchmove",c,{passive:!1}),r.addEventListener("touchend",h,{passive:!1}),r.addEventListener("touchcancel",h,{passive:!1});const{clientX:u,clientY:d}=l,p=new PointerEvent("contextmenu",{bubbles:!0,cancelable:!0,view:xe(),clientX:u,clientY:d,pointerType:"touch"});r.dispatchEvent(p)}},this.touchmove=r=>{const{glob:l,self:c,initialTouch:h}=this,u=this.findInitialFinger(r.targetTouches);u!=null&&(this.longTapInterrupted=this.longTapInterrupted||fZ(h,u)>CR,c.dragTouchEnabled&&u!=null&&l.globalTouchDragCallbacks?.touchmove(r,u))},this.touchend=r=>{this.longTapInterrupted=!0;const l=this.findInitialFinger(r.changedTouches,r.touches);l!=null&&this.glob.globalTouchDragCallbacks?.touchend(r,l),this.destroy()},this.longtapTimer=setTimeout(this.longtap,TR);const{touchmove:a,touchend:n}=this;o.addEventListener("touchmove",a,{passive:!1}),o.addEventListener("touchstart",n,{passive:!1}),o.addEventListener("touchend",n,{passive:!1}),o.addEventListener("touchcancel",n,{passive:!1}),e.touchDragger=this,t.globalTouchDragCallbacks=i}destroy(){const{longtapTimer:t,touchmove:e,touchend:i}=this;clearTimeout(t),this.target.removeEventListener("touchstart",i),this.target.removeEventListener("touchmove",e),this.target.removeEventListener("touchend",i),this.target.removeEventListener("touchcancel",i),this.glob.globalTouchDragCallbacks=void 0,this.self.touchDragger=void 0}findInitialFinger(...t){const e=t.map(i=>Array.from(i)).flat();return Array.from(e).find(i=>i.identifier===this.initialTouch.identifier)}}}});function QA(t,e,i,s){const{currentX:o,currentY:a}=mr.calcCurrentXY(t.getElement(),s),n=s.pageX-i.pageX,r=s.pageY-i.pageY;return{type:e,device:"mouse",offsetX:i.offsetX+n,offsetY:i.offsetY+r,clientX:s.clientX,clientY:s.clientY,currentX:o,currentY:a,originDeltaX:n,originDeltaY:r,sourceEvent:s}}function xZ(t,{pageX:e,pageY:i}){const{x:s,y:o}=t.getElement().getBoundingClientRect();return{offsetX:e-s,offsetY:i-o}}function JA(t,e,i,s,o){const{currentX:a,currentY:n}=mr.calcCurrentXY(t.getElement(),o),r=o.pageX-i.pageX,l=o.pageY-i.pageY;return{type:e,device:"touch",offsetX:i.offsetX+r,offsetY:i.offsetY+l,clientX:o.clientX,clientY:o.clientY,currentX:a,currentY:n,originDeltaX:r,originDeltaY:l,sourceEvent:s}}var tI,eI,bZ=k({"packages/ag-charts-community/src/widget/widgetListenerInternal.ts"(){"use strict";bb(),qt(),gZ(),yZ(),oS(),tI={},eI=class{constructor(t){this.dispatchCallback=t,this.dragTouchEnabled=!0}destroy(){this.dragTriggerRemover?.(),this.dragTriggerRemover=void 0,this.dragStartListeners=void 0,this.dragMoveListeners=void 0,this.dragEndListeners=void 0,this.mouseDragger?.destroy(),this.touchDragger?.destroy()}add(t,e,i){switch(t){case"drag-start":{this.dragStartListeners??(this.dragStartListeners=[]),this.dragStartListeners.push(i),this.registerDragTrigger(e);break}case"drag-move":{this.dragMoveListeners??(this.dragMoveListeners=[]),this.dragMoveListeners.push(i),this.registerDragTrigger(e);break}case"drag-end":{this.dragEndListeners??(this.dragEndListeners=[]),this.dragEndListeners.push(i),this.registerDragTrigger(e);break}}}remove(t,e,i){switch(t){case"drag-start":return this.removeHandler(this.dragStartListeners,i);case"drag-move":return this.removeHandler(this.dragMoveListeners,i);case"drag-end":return this.removeHandler(this.dragEndListeners,i)}}removeHandler(t,e){const i=t?.indexOf(e);i!==void 0&&t?.splice(i,1)}registerDragTrigger(t){if(this.dragTriggerRemover==null){const e=s=>this.triggerMouseDrag(t,s),i=s=>this.triggerTouchDrag(t,s);t.getElement().addEventListener("mousedown",e),t.getElement().addEventListener("touchstart",i,{passive:!1}),this.dragTriggerRemover=()=>{t.getElement().removeEventListener("mousedown",e),t.getElement().removeEventListener("touchstart",i)}}}triggerMouseDrag(t,e){e.button===0&&this.startMouseDrag(t,e)}startMouseDrag(t,e){const i={pageX:NaN,pageY:NaN,offsetX:NaN,offsetY:NaN};MA(["pageX","pageY","offsetX","offsetY"],i,e);const s={mousedown:o=>{const a=QA(t,"drag-start",i,o);this.dispatch("drag-start",t,a)},mousemove:o=>{const a=QA(t,"drag-move",i,o);this.dispatch("drag-move",t,a)},mouseup:o=>{const a=QA(t,"drag-end",i,o);this.dispatch("drag-end",t,a),this.endDrag(t,a)}};this.mouseDragger=pZ(tI,this,s,e)}endDrag(t,{sourceEvent:e,clientX:i,clientY:s}){const o=t.getElement(),a=o.getBoundingClientRect();Bf.containsPoint(a,i,s)||(o.dispatchEvent(new MouseEvent("mouseleave",e)),e.target?.dispatchEvent(new MouseEvent("mouseenter",e)))}triggerTouchDrag(t,e){const i=e.targetTouches[0];e.targetTouches.length===1&&i!=null&&this.startOneFingerTouch(t,e,i)}startOneFingerTouch(t,e,i){const s={pageX:NaN,pageY:NaN,...xZ(t,i)};MA(["pageX","pageY"],s,i);const o={touchmove:(r,l)=>{const c=JA(t,"drag-move",s,r,l);this.dispatch("drag-move",t,c)},touchend:(r,l)=>{const c=JA(t,"drag-end",s,r,l);this.dispatch("drag-end",t,c)}},a=t.getElement();this.touchDragger=mZ(tI,this,o,i,a);const n=JA(t,"drag-start",s,e,i);this.dispatch("drag-start",t,n)}dispatch(t,e,i){switch(t){case"drag-start":this.dragStartListeners?.forEach(s=>s(i,e));break;case"drag-move":this.dragMoveListeners?.forEach(s=>s(i,e));break;case"drag-end":this.dragEndListeners?.forEach(s=>s(i,e));break}this.dispatchCallback(t,i)}}}}),NR,Rn,pl=k({"packages/ag-charts-community/src/widget/widget.ts"(){"use strict";P(),Qs(),Jh(),oS(),dZ(),bZ(),NR=class{constructor(t){this.elem=t}setBounds(t){Xb(this.elemContainer??this.elem,t)}getBounds(){return oR(this.elemContainer??this.elem)}static setElementContainer(t,e){const i=t.getBounds();Xb(e,i),uZ(t.elem,{width:"100%",height:"100%"}),t.elem.remove(),t.elemContainer=e,t.elemContainer.replaceChildren(t.elem)}},Rn=class extends NR{constructor(t){super(t),this.elem=t,this.index=NaN,this.children=[]}getElement(){return this.elem}getBoundingClientRect(){return this.elem.getBoundingClientRect()}get clientWidth(){return this.elem.clientWidth}get clientHeight(){return this.elem.clientHeight}destroy(){this.parent?.removeChild(this),this.children.forEach(t=>{t.parent=void 0,t.destroy()}),this.children.length=0,this.destructor(),this.elem.remove(),this.elemContainer?.remove(),this.internalListener?.destroy(),this.htmlListener?.destroy(this)}setHidden(t){_n(this.elem,"display",t?"none":void 0)}isHidden(){return xe()?.getComputedStyle?.(this.elem).display==="none"}setCursor(t){_n(this.elem,"cursor",t)}setTextContent(t){this.elem.textContent=t??null}setAriaDescribedBy(t){ve(this.elem,"aria-describedby",t)}setAriaHidden(t){ve(this.elem,"aria-hidden",t)}setAriaLabel(t){ve(this.elem,"aria-label",t)}setInnerHTML(t){this.elem.innerHTML=t}isDisabled(){return eS(this.elem,"aria-disabled",!1)}parseFloat(t){return t===""?0:parseFloat(t)}cssLeft(){return this.parseFloat(this.elem.style.left)}cssTop(){return this.parseFloat(this.elem.style.top)}cssWidth(){return this.parseFloat(this.elem.style.width)}cssHeight(){return this.parseFloat(this.elem.style.height)}focus(){this.elem.focus()}setPreventsDefault(t){ve(this.elem,"data-preventdefault",t)}setTabIndex(t){ve(this.elem,"tabindex",t)}addChild(t){this.addChildToDOM(t,this.getBefore(t)),this.children.push(t),t.index=this.children.length-1,t.parent=this,this.onChildAdded(t)}removeChild(t){const e=this.children.findIndex(i=>i===t);this.children.splice(e,1),this.removeChildFromDOM(t),this.onChildRemoved(t)}moveChild(t,e){t.domIndex!==e&&(t.domIndex=e,this.removeChildFromDOM(t),this.addChildToDOM(t,this.getBefore(t)))}addClass(...t){this.elem.classList.add(...t)}removeClass(...t){this.elem.classList.remove(...t)}toggleClass(t,e){this.elem.classList.toggle(t,e)}appendOrInsert(t,e){e?e.getElement().insertAdjacentElement("beforebegin",t):this.elem.appendChild(t)}addChildToDOM(t,e){this.appendOrInsert(t.getElement(),e)}removeChildFromDOM(t){this.elem.removeChild(t.getElement())}onChildAdded(t){}onChildRemoved(t){}getBefore({domIndex:t}){if(t!==void 0)return this.children.filter(e=>e.domIndex!==void 0&&e.domIndex>t).reduce((e,i)=>!e||i.domIndex<e.domIndex?i:e,void 0)}addListener(t,e){return mr.isHTMLEvent(t)?(this.htmlListener??(this.htmlListener=new AR),this.htmlListener.add(t,this,e)):(this.internalListener??(this.internalListener=new eI(this.onDispatch.bind(this))),this.internalListener.add(t,this,e)),()=>this.removeListener(t,e)}removeListener(t,e){mr.isHTMLEvent(t)?this.htmlListener?.remove(t,this,e):this.htmlListener!=null&&this.internalListener?.remove(t,this,e)}setDragTouchEnabled(t){this.internalListener??(this.internalListener=new eI(this.onDispatch.bind(this))),this.internalListener.dragTouchEnabled=t}onDispatch(t,e){if(!e.sourceEvent.bubbles)return;let{parent:i}=this;for(;i!=null;){const{internalListener:s}=i;if(s!=null){const o={...e,...mr.calcCurrentXY(i.getElement(),e)};s.dispatch(t,i,o)}i=i.parent}}static addWindowEvent(t,e){const i=s=>{s.persisted||e()};return xe().addEventListener("pagehide",i),()=>xe().removeEventListener("pagehide",i)}}}});function SZ(t=0,e=0){return new OffscreenCanvas(t,e).getContext("2d")}var vZ=k({"packages/ag-charts-community/src/util/canvas.util.ts"(){"use strict"}}),nS,OR=k({"packages/ag-charts-community/src/util/lruCache.ts"(){"use strict";nS=class{constructor(t=5){this.maxCacheSize=t,this.store=new Map}get(t){if(!this.store.has(t))return;const e=this.store.get(t);return this.store.delete(t),this.store.set(t,e),e}has(t){return this.store.has(t)}set(t,e){if(this.store.set(t,e),this.store.size>this.maxCacheSize){const i=this.store.keys();let s=this.store.size-this.maxCacheSize;for(;s>0;){const o=i.next();o.done||this.store.delete(o.value),s--}}return e}clear(){this.store.clear()}}}}),yr,iI,Ee,rS,Go=k({"packages/ag-charts-community/src/util/textMeasurer.ts"(){"use strict";vZ(),OR(),yr=class{static measureText(t,e){return this.getMeasurer(e).measureText(t)}static measureLines(t,e){return this.getMeasurer(e).measureLines(t)}static getMeasurer(t){const e=typeof t.font=="string"?t.font:Ee.toFontString(t.font),i=`${e}-${t.textAlign??"start"}-${t.textBaseline??"alphabetic"}`;return this.instanceMap.get(i)??this.createFontMeasurer(e,t,i)}static createFontMeasurer(t,e,i){const s=SZ();s.font=t,s.textAlign=e.textAlign??"start",s.textBaseline=e.textBaseline??"alphabetic";const o=new iI(s,e);return this.instanceMap.set(i,o),o}},yr.instanceMap=new nS(10),iI=class{constructor(t,e){this.ctx=t,this.measureMap=new nS(100),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline),t.font=typeof e.font=="string"?e.font:Ee.toFontString(e.font),this.textMeasurer=new rS(i=>this.cachedCtxMeasureText(i),e.textBaseline??"alphabetic")}textWidth(t,e){return this.textMeasurer.textWidth(t,e)}measureText(t){return this.textMeasurer.measureText(t)}measureLines(t){return this.textMeasurer.measureLines(t)}cachedCtxMeasureText(t){if(!this.measureMap.has(t)){const e=this.ctx.measureText(t);this.measureMap.set(t,{actualBoundingBoxAscent:e.actualBoundingBoxAscent,emHeightAscent:e.emHeightAscent,emHeightDescent:e.emHeightDescent,actualBoundingBoxDescent:e.actualBoundingBoxDescent,actualBoundingBoxLeft:e.actualBoundingBoxLeft,actualBoundingBoxRight:e.actualBoundingBoxRight,alphabeticBaseline:e.alphabeticBaseline,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent,hangingBaseline:e.hangingBaseline,ideographicBaseline:e.ideographicBaseline,width:e.width})}return this.measureMap.get(t)}},Ee=class{static toFontString({fontSize:t=10,fontStyle:e,fontWeight:i,fontFamily:s,lineHeight:o}){let a="";return e&&(a+=`${e} `),i&&(a+=`${i} `),a+=`${t}px`,o&&(a+=`/${o}px`),a+=` ${s}`,a.trim()}static getLineHeight(t){return Math.ceil(t*this.defaultLineHeight)}static getVerticalModifier(t){switch(t){case"hanging":case"top":return 0;case"middle":return .5;case"alphabetic":case"bottom":case"ideographic":default:return 1}}},Ee.EllipsisChar="\u2026",Ee.defaultLineHeight=1.15,Ee.lineSplitter=/\r?\n/g,rS=class{constructor(t,e="alphabetic"){this.measureTextFn=t,this.textBaseline=e,this.charMap=new Map}getMetrics(t){const e=this.measureTextFn(t);return e.fontBoundingBoxAscent??(e.fontBoundingBoxAscent=e.emHeightAscent),e.fontBoundingBoxDescent??(e.fontBoundingBoxDescent=e.emHeightDescent),{width:e.width,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,lineHeight:e.fontBoundingBoxAscent+e.fontBoundingBoxDescent,offsetTop:e.actualBoundingBoxAscent,offsetLeft:e.actualBoundingBoxLeft}}getMultilineMetrics(t){let e=0,i=0,s=0,o=0,a=0;const n=Ee.getVerticalModifier(this.textBaseline),r=[];let l=0;const c=t.length;for(const h of t){const u=this.measureTextFn(h);u.fontBoundingBoxAscent??(u.fontBoundingBoxAscent=u.emHeightAscent),u.fontBoundingBoxDescent??(u.fontBoundingBoxDescent=u.emHeightDescent),e<u.width&&(e=u.width),o<u.actualBoundingBoxLeft&&(o=u.actualBoundingBoxLeft),l===0?(i+=u.actualBoundingBoxAscent,s+=u.actualBoundingBoxAscent):a+=u.fontBoundingBoxAscent,l===c-1?i+=u.actualBoundingBoxDescent:a+=u.fontBoundingBoxDescent,r.push({text:h,width:u.width,height:u.actualBoundingBoxAscent+u.actualBoundingBoxDescent,lineHeight:u.fontBoundingBoxAscent+u.fontBoundingBoxDescent,offsetTop:u.actualBoundingBoxAscent,offsetLeft:u.actualBoundingBoxLeft}),l++}return i+=a,s+=a*n,{width:e,height:i,offsetTop:s,offsetLeft:o,lineMetrics:r}}textWidth(t,e){if(e){let i=0;for(let s=0;s<t.length;s++)i+=this.textWidth(t.charAt(s));return i}return t.length>1?this.measureTextFn(t).width:this.charMap.get(t)??this.charWidth(t)}measureText(t){return this.getMetrics(t)}measureLines(t){const e=typeof t=="string"?t.split(Ee.lineSplitter):t;return this.getMultilineMetrics(e)}charWidth(t){const{width:e}=this.measureTextFn(t);return this.charMap.set(t,e),e}}}}),jo,Yi,sI,iu,Vo=k({"packages/ag-charts-community/src/scene/shape/text.ts"(){"use strict";P(),Go(),Xt(),ca(),ms(),Sc(),jo=class Uk extends ua{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=Uk.defaultStyles.textAlign,this.textBaseline=Uk.defaultStyles.textBaseline}onTextChange(){this.lines=this.text?.split(`
`).map(e=>e.trim())??[]}static computeBBox(e,i,s,o){const{offsetTop:a,offsetLeft:n,width:r,height:l}=yr.measureLines(e,o);return new pt(i-n,s-a,r,l)}computeBBox(){const{x:e,y:i,lines:s,textBaseline:o,textAlign:a}=this;return Uk.computeBBox(s,e,i,{font:this,textBaseline:o,textAlign:a})}isPointInPath(e,i){const s=this.getBBox();return s?s.containsPoint(e,i):!1}render(e){const{ctx:i,stats:s}=e;if(!this.lines.length||!this.layerManager)return s&&(s.nodesSkipped+=1),super.render(e);const{fill:o,stroke:a,strokeWidth:n}=this,{pixelRatio:r}=this.layerManager.canvas;if(!o&&!(a!=null&&n>0))return super.render(e);const l=Ee.toFontString(this);if(i.font!==l&&(i.font=l),i.textAlign=this.textAlign,i.textBaseline=this.textBaseline,o){this.applyFill(i),i.globalAlpha*=this.opacity*this.fillOpacity;const{fillShadow:c}=this;c?.enabled&&(i.shadowColor=c.color,i.shadowOffsetX=c.xOffset*r,i.shadowOffsetY=c.yOffset*r,i.shadowBlur=c.blur*r),this.renderLines((h,u,d)=>i.fillText(h,u,d))}if(a&&n){this.applyStroke(i),i.lineWidth=n,i.globalAlpha*=this.opacity*this.strokeOpacity;const{lineDash:c,lineDashOffset:h,lineCap:u,lineJoin:d}=this;c&&i.setLineDash(c),h&&(i.lineDashOffset=h),u&&(i.lineCap=u),d&&(i.lineJoin=d),this.renderLines((p,g,f)=>i.strokeText(p,g,f))}super.render(e)}renderLines(e){const{lines:i,x:s,y:o}=this,a=this.lineHeight??Ee.getLineHeight(this.fontSize);let n=(a-a*i.length)*Ee.getVerticalModifier(this.textBaseline);for(const r of i)e(r,s,o+n),n+=a}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}toSVG(){if(!this.visible||!this.text)return;const e=os("text");return this.applySvgFillAttributes(e),e.setAttribute("font-family",this.fontFamily?.split(",")[0]??""),e.setAttribute("font-size",String(this.fontSize)),e.setAttribute("font-style",this.fontStyle??""),e.setAttribute("font-weight",String(this.fontWeight??"")),e.setAttribute("text-anchor",{center:"middle",left:"start",right:"end",start:"start",end:"end"}[this.textAlign??"start"]),e.setAttribute("alignment-baseline",{alphabetic:"alphabetic",top:"top",bottom:"bottom",hanging:"hanging",middle:"middle",ideographic:"ideographic"}[this.textBaseline??"alphabetic"]),e.setAttribute("x",String(this.x)),e.setAttribute("y",String(this.y)),e.textContent=this.text??"",{elements:[e]}}},jo.className="Text",jo.defaultStyles={...ua.defaultStyles,textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"},v([gt()],jo.prototype,"x",2),v([gt()],jo.prototype,"y",2),v([gt({changeCb:t=>t.onTextChange()})],jo.prototype,"text",2),v([gt()],jo.prototype,"fontStyle",2),v([gt()],jo.prototype,"fontWeight",2),v([gt()],jo.prototype,"fontSize",2),v([gt()],jo.prototype,"fontFamily",2),v([gt()],jo.prototype,"textAlign",2),v([gt()],jo.prototype,"textBaseline",2),v([gt()],jo.prototype,"lineHeight",2),Yi=jo,sI=class extends yp(Yi){},iu=class extends yp(Qh(Yi)){}}}),lS,oI=k({"packages/ag-charts-community/src/util/textWrapper.ts"(){"use strict";Go(),lS=class{static wrapText(t,e){return this.wrapLines(t,e).join(`
`)}static wrapLines(t,e){const i=this.textWrap(t,e);return e.overflow==="hide"&&i.some(s=>s.endsWith(Ee.EllipsisChar))?[]:i}static appendEllipsis(t){return t.replace(/[.,]{1,5}$/,"")+Ee.EllipsisChar}static truncateLine(t,e,i,s){const o=e.textWidth(Ee.EllipsisChar);let a=0,n=0;for(;n<t.length;n++){const r=e.textWidth(t.charAt(n));if(a+r>i)break;a+=r}if(t.length===n&&(!s||a+o<=i))return s?t+Ee.EllipsisChar:t;for(t=t.slice(0,n).trimEnd();t.length&&e.textWidth(t)+o>i;)t=t.slice(0,-1).trimEnd();return t+Ee.EllipsisChar}static textWrap(t,e){const i=t.split(Ee.lineSplitter),s=yr.getMeasurer(e);if(e.textWrap==="never")return i.map(r=>this.truncateLine(r.trimEnd(),s,e.maxWidth));const o=[],a=e.textWrap==="hyphenate",n=e.textWrap==null||e.textWrap==="on-space";for(const r of i){let l=r.trimEnd();if(l===""){o.push(l);continue}let c=0,h=0,u=0;for(;c<l.length;){const d=l.charAt(c);if(h+=s.textWidth(d),d===" "&&(u=c),h>e.maxWidth){if(c===0)break;const p=s.textWidth(l.slice(0,c+1));if(p<=e.maxWidth){h=p,c++;continue}if(u){const x=this.getWordAt(l,u+1),y=s.textWidth(x);if(y<=e.maxWidth){o.push(l.slice(0,u).trimEnd()),l=l.slice(u).trimStart(),c=0,h=0,u=0;continue}else n&&y>e.maxWidth&&o.push(l.slice(0,u).trimEnd(),this.truncateLine(l.slice(u).trimStart(),s,e.maxWidth,!0))}else n&&o.push(this.truncateLine(l,s,e.maxWidth,!0));if(n){l="";break}const g=a?"-":"";let f=l.slice(0,c).trim();for(;f.length&&s.textWidth(f+g)>e.maxWidth;)f=f.slice(0,-1).trimEnd();if(o.push(f+g),!f.length){l="";break}l=l.slice(f.length).trimStart(),c=-1,h=0,u=0}c++}l&&o.push(l)}return this.avoidOrphans(o,s,e),this.clipLines(o,s,e)}static getWordAt(t,e){const i=t.indexOf(" ",e);return i===-1?t.slice(e):t.slice(e,i)}static clipLines(t,e,i){if(!i.maxHeight)return t;const{height:s,lineMetrics:o}=e.measureLines(t);if(s<=i.maxHeight)return t;for(let a=0,n=0;a<o.length;a++){const{lineHeight:r}=o[a];if(n+=r,n>i.maxHeight){if(i.overflow==="hide")return[];const l=t.slice(0,a||1),c=l.pop();return l.concat(this.truncateLine(c,e,i.maxWidth,!0))}}return t}static avoidOrphans(t,e,i){if(i.avoidOrphans===!1||t.length<2)return;const{length:s}=t,o=t[s-1],a=t[s-2];if(a.length<o.length)return;const n=a.lastIndexOf(" ");if(n===-1||n===a.indexOf(" ")||o.includes(" "))return;const r=a.slice(n+1);e.textWidth(o+r)<=i.maxWidth&&(t[s-2]=a.slice(0,n),t[s-1]=r+" "+o)}}}}),_e,su=k({"packages/ag-charts-community/src/chart/caption.ts"(){"use strict";Vo(),ms(),Bo(),ge(),bo(),Go(),oI(),Nt(),_e=class extends Ct{constructor(){super(...arguments),this.id=la(this),this.node=new sI({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.padding=0,this.layoutStyle="block",this.truncated=!1}registerInteraction(t,e){return t.layoutManager.addListener("layout:complete",()=>this.updateA11yText(t,e))}computeTextWrap(t,e){const{text:i,padding:s,wrapping:o}=this,a=Math.min(this.maxWidth??1/0,t)-s*2,n=this.maxHeight??e-s*2;if(!isFinite(a)&&!isFinite(n)){this.node.text=i;return}const r=lS.wrapText(i??"",{maxWidth:a,maxHeight:n,font:this,textWrap:o});this.node.text=r,this.truncated=r.includes(Ee.EllipsisChar)}updateA11yText(t,e){const{proxyInteractionService:i}=t;if(this.enabled&&this.text){const s=Ke.toCanvas(this.node);if(s){const{id:o}=this;this.proxyText??(this.proxyText=i.createProxyElement({type:"text",domManagerId:o,where:e})),this.proxyText.textContent=this.text,this.proxyText.setBounds(s),this.proxyText.addListener("mousemove",a=>this.handleMouseMove(t,a)),this.proxyText.addListener("mouseleave",a=>this.handleMouseLeave(t,a))}}else this.proxyText?.destroy(),this.proxyText=void 0}handleMouseMove(t,e){if(e!=null&&this.enabled&&this.node.visible&&this.truncated){const{x:i,y:s}=Ke.toCanvas(this.node),o=e.sourceEvent.offsetX+i,a=e.sourceEvent.offsetY+s;t.tooltipManager.updateTooltip(this.id,{canvasX:o,canvasY:a,showArrow:!1},[{type:"structured",title:this.text}])}}handleMouseLeave(t,e){t.tooltipManager.removeTooltip(this.id)}},_e.SMALL_PADDING=10,v([A(bt),ys("node","visible")],_e.prototype,"enabled",2),v([A(it,{optional:!0}),ys("node")],_e.prototype,"text",2),v([A(_A,{optional:!0}),ys("node")],_e.prototype,"textAlign",2),v([A(pr,{optional:!0}),ys("node")],_e.prototype,"fontStyle",2),v([A(gr,{optional:!0}),ys("node")],_e.prototype,"fontWeight",2),v([A(lt),ys("node")],_e.prototype,"fontSize",2),v([A(it),ys("node")],_e.prototype,"fontFamily",2),v([A(zt,{optional:!0}),ys("node","fill")],_e.prototype,"color",2),v([A(lt,{optional:!0})],_e.prototype,"spacing",2),v([A(lt,{optional:!0})],_e.prototype,"maxWidth",2),v([A(lt,{optional:!0})],_e.prototype,"maxHeight",2),v([A(Qf)],_e.prototype,"wrapping",2),v([A(lt)],_e.prototype,"padding",2),v([A(it)],_e.prototype,"layoutStyle",2)}}),cS,wR=k({"packages/ag-charts-community/src/chart/chartAxisDirection.ts"(){"use strict";cS=(t=>(t.X="x",t.Y="y",t))(cS||{})}}),hS,aI,ER,_R=k({"packages/ag-charts-community/src/chart/layout/layoutManager.ts"(){"use strict";P(),Xt(),hS=(t=>(t[t.Caption=0]="Caption",t[t.Legend=1]="Legend",t[t.ToolbarLeft=2]="ToolbarLeft",t[t.ToolbarBottom=3]="ToolbarBottom",t[t.Navigator=4]="Navigator",t[t.Overlay=5]="Overlay",t))(hS||{}),aI=class{constructor(){this.events=new Tf,this.elements=new Map}addListener(t,e){return this.events.on(t,e)}registerElement(t,e){return this.elements.has(t)?this.elements.get(t).add(e):this.elements.set(t,new Set([e])),()=>this.elements.get(t)?.delete(e)}createContext(t,e){const i=new ER(t,e);for(const s of Object.values(hS))typeof s=="number"&&this.elements.get(s)?.forEach(o=>o(i));return i}emitLayoutComplete(t,e){const i="layout:complete",{width:s,height:o}=t;this.events.emit(i,{type:i,axes:e.axes??[],chart:{width:s,height:o},clipSeries:e.clipSeries??!1,series:e.series})}},ER=class{constructor(t,e){this.width=t,this.height=e,this.layoutBox=new pt(0,0,t,e)}}}}),nm,MZ=k({"packages/ag-charts-community/src/chart/chartCaptions.ts"(){"use strict";Go(),Nt(),su(),nm=class{constructor(){this.title=new _e,this.subtitle=new _e,this.footnote=new _e}positionCaptions(t){const{title:e,subtitle:i,footnote:s}=this,o=t.layoutBox.height/10;if(e.enabled){const{spacing:a}=e;this.positionCaption("top",e,t.layoutBox,o),this.shrinkLayoutByCaption("top",e,t.layoutBox,a)}i.enabled&&(this.positionCaption("top",i,t.layoutBox,o),this.shrinkLayoutByCaption("top",i,t.layoutBox,i.spacing)),s.enabled&&(this.positionCaption("bottom",s,t.layoutBox,o),this.shrinkLayoutByCaption("bottom",s,t.layoutBox,s.spacing))}positionAbsoluteCaptions(t){const{title:e,subtitle:i,footnote:s}=this,{rect:o}=t.series;for(const a of[e,i,s])if(a.layoutStyle==="overlay"){if(a.textAlign==="left")a.node.x=o.x+a.padding;else if(a.textAlign==="right"){const n=a.node.getBBox();a.node.x=o.x+o.width-n.width-a.padding}}}computeX(t,e){return t==="left"?e.x:t==="right"?e.x+e.width:e.x+e.width/2}positionCaption(t,e,i,s){const o=Math.max(Ee.getLineHeight(e.fontSize),s);e.node.x=this.computeX(e.textAlign,i)+e.padding,e.node.y=i.y+(t==="top"?0:i.height)+e.padding,e.node.textBaseline=t,e.computeTextWrap(i.width,o)}shrinkLayoutByCaption(t,e,i,s=0){if(e.layoutStyle==="block"){const o=e.node.getBBox();i.shrink(Math.ceil(t==="top"?o.y-i.y+o.height+s:i.y+i.height-o.y+s),t)}}},v([A(ct)],nm.prototype,"title",2),v([A(ct)],nm.prototype,"subtitle",2),v([A(ct)],nm.prototype,"footnote",2)}}),RR,PR,DZ=k({"packages/ag-charts-community/src/api/preset/chartTypeOriginator.ts"(){"use strict";P(),RR=["candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"],PR=class{constructor(t){this.chartService=t,this.mementoOriginatorKey="chartType"}createMemento(){let t=this.chartService.publicApi?.getOptions()?.chartType;return t==null&&(t="candlestick"),t}guardMemento(t){return t==null||RR.includes(t)}restoreMemento(t,e,i){if(i==null)return;const s={chartType:i};this.chartService.publicApi?.updateDelta(s).catch(o=>tt.error("error restoring state",o))}}}}),nI,BR=k({"packages/ag-charts-community/src/util/destroy.ts"(){"use strict";nI=class{constructor(){this.destroyFns=[]}destroy(){this.destroyFns.forEach(t=>t()),this.destroyFns.length=0}setFns(t){this.destroy(),this.destroyFns=t}push(...t){this.destroyFns.push(...t)}}}}),ou,uS=k({"packages/ag-charts-community/src/version.ts"(){"use strict";ou="11.2.1"}}),rI,zR,kZ=k({"packages/ag-charts-community/src/api/state/historyManager.ts"(){"use strict";Ui(),BR(),uS(),rI=Symbol("previous-memento-not-found"),zR=class{constructor(t){this.history=[],this.historyIndex=-1,this.originators=new Map,this.clearState=new Map,this.maxHistoryLength=100,this.debug=ee.create(!0,"history"),this.destroyFns=new nI,this.destroyFns.setFns([t.addListener("series-undo",this.undo.bind(this)),t.addListener("series-redo",this.redo.bind(this))])}destroy(){this.destroyFns.destroy()}addMementoOriginator(t){this.originators.set(t.mementoOriginatorKey,t),this.clearState.set(t.mementoOriginatorKey,t.createMemento()),this.debugEvent("History add originator:",t.mementoOriginatorKey)}clear(){this.debug("History clear:",Object.keys(this.originators)),this.history=[],this.historyIndex=-1;for(const[t,e]of this.originators.entries())this.clearState.set(t,e.createMemento())}record(t,...e){this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.length>this.maxHistoryLength&&(this.history=this.history.slice(-this.maxHistoryLength));const i=new Map;for(const s of e){if(!this.originators.has(s.mementoOriginatorKey))throw new Error(`Originator [${s.mementoOriginatorKey}] has not been added to the HistoryManager.`);i.set(s.mementoOriginatorKey,s.createMemento())}this.history.push({label:t,mementos:i}),this.historyIndex=this.history.length-1,this.debugEvent(`History record: [${t}]`)}undo(){const t=this.history[this.historyIndex];if(t){for(const e of t.mementos.keys()){const i=this.findPreviousMemento(e);if(i===rI)throw new Error(`Could not find previous memento for [${e}].`);this.restoreMemento(e,i)}this.historyIndex-=1,this.debugEvent(`History undo: [${t.label}]`)}}redo(){const t=this.history[this.historyIndex+1];if(t){for(const[e,i]of t.mementos.entries())this.restoreMemento(e,i);this.historyIndex+=1,this.debugEvent(`History redo: [${t.label}]`)}}findPreviousMemento(t){for(let e=this.historyIndex-1;e>=0;e--)if(this.history[e].mementos.has(t))return this.history[e].mementos.get(t);return this.clearState.has(t)?this.clearState.get(t):rI}restoreMemento(t,e){this.originators.get(t)?.restoreMemento(ou,ou,e)}debugEvent(...t){this.debug(...t,this.history.map((e,i)=>i===this.historyIndex?`** ${e.label} **`:e.label))}}}}),lI,FR=k({"packages/ag-charts-community/src/api/state/memento.ts"(){"use strict";P(),lI=class LE{constructor(e){this.version=e.split("-")[0]}save(...e){const i={version:this.version};for(const s of Object.values(e))i[s.mementoOriginatorKey]=this.encode(s,s.createMemento());return i}restore(e,...i){if(typeof e!="object"){tt.warnOnce(`Could not restore data of type [${typeof e}], expecting an object, ignoring.`);return}if(e==null){tt.warnOnce("Could not restore data of type [null], expecting an object, ignoring.");return}if(!("version"in e)||typeof e.version!="string"){tt.warnOnce("Could not restore data, missing [version] string in object, ignoring.");return}for(const s of i){const o=this.decode(s,e[s.mementoOriginatorKey]),a=[];if(!s.guardMemento(o,a)){const n=a.length>0?`
${a.join(`
`)}
`:"";tt.warnOnce(`Could not restore [${s.mementoOriginatorKey}] data, value was invalid, ignoring.${n}`,o);return}s.restoreMemento(this.version,e.version,o)}}encode(e,i){try{return JSON.parse(JSON.stringify(i,LE.encodeTypes))}catch(s){throw new Error(`Failed to encode [${e.mementoOriginatorKey}] value [${s}].`,{cause:s})}}decode(e,i){if(i==null)return i;try{return JSON.parse(JSON.stringify(i),LE.decodeTypes)}catch(s){throw new Error(`Failed to decode [${e.mementoOriginatorKey}] value [${s}].`,{cause:s})}}static encodeTypes(e,i){return Fh(this[e])?{__type:"date",value:this[e].toISOString()}:i}static decodeTypes(e,i){return li(this[e])&&"__type"in this[e]&&this[e].__type==="date"?new Date(this[e].value):i}}}}),GR,AZ=k({"packages/ag-charts-community/src/api/state/stateManager.ts"(){"use strict";qt(),uS(),FR(),GR=class{constructor(){this.caretaker=new lI(ou),this.state=new Map}setState(t,e){dr(this.state.get(t.mementoOriginatorKey),e)||this.setStateAndRestore(t,e)}setStateAndRestore(t,e){this.state.set(t.mementoOriginatorKey,e),this.restoreState(t)}restoreState(t){const{caretaker:e,state:i}=this;if(!i.has(t.mementoOriginatorKey))return;const s=i.get(t.mementoOriginatorKey);e.restore({version:e.version,[t.mementoOriginatorKey]:s},t)}}}}),jR,IZ=k({"packages/ag-charts-community/src/styles.css"(){jR=`.ag-charts-wrapper,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box}.ag-charts-wrapper{--align-items: center;--justify-content: center;position:relative;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ag-charts-wrapper--safe-horizontal{--justify-content: flex-start}.ag-charts-wrapper--safe-vertical{--align-items: flex-start}.ag-charts-tab-guard{width:0%;height:0%;position:absolute;pointer-events:none}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;pointer-events:auto;display:flex;align-items:var(--align-items);justify-content:var(--justify-content)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative;user-select:none;-webkit-user-select:none}.ag-charts-canvas-container>*,.ag-charts-canvas>*{pointer-events:none}.ag-charts-canvas canvas{display:block}.ag-charts-series-area{outline:none;pointer-events:auto;position:absolute}.ag-charts-swapchain{top:0;left:0;outline:none;opacity:0;pointer-events:none;position:absolute;width:100%;height:100%}.ag-charts-swapchain:focus-visible{opacity:1}.ag-charts-canvas-proxy,.ag-charts-canvas-overlay{inset:0;pointer-events:none;position:absolute;user-select:none;-webkit-user-select:none}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-accent-color: #2196f3;--ag-charts-background-color: #fff;--ag-charts-border-color: #dddddd;--ag-charts-foreground-color: #464646;--ag-charts-font-family: Verdana, sans-serif;--ag-charts-font-size: 12px;--ag-charts-font-weight: 400;--ag-charts-padding: 20px;--ag-charts-shadow-color: #00000080;--ag-charts-subtle-text-color: #8c8c8c;--ag-charts-text-color: #464646;--ag-charts-chrome-background-color: #fafafa;--ag-charts-chrome-font-family: Verdana, sans-serif;--ag-charts-chrome-font-size: 12px;--ag-charts-chrome-font-weight: 400;--ag-charts-chrome-subtle-text-color: #8c8c8c;--ag-charts-chrome-text-color: #181d1f;--ag-charts-input-background-color: #fff;--ag-charts-input-text-color: #464646;--ag-charts-crosshair-label-background-color: #fff;--ag-charts-crosshair-label-text-color: #464646;--ag-charts-spacing: 4px;--ag-charts-border-radius: 4px;--ag-charts-shadow: 0 2px 8px 0 color-mix(in srgb, black 8%, transparent);--ag-charts-focus-shadow: 0 0 0 3px var(--ag-charts-accent-color);--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 12%);--ag-charts-input-border-color: var(--ag-charts-border-color);--ag-charts-input-border-radius: var(--ag-charts-border-radius);--ag-charts-input-focus-border-color: var(--ag-charts-accent-color);--ag-charts-input-focus-text-color: var(--ag-charts-accent-color);--ag-charts-input-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-input-disabled-border-color: var(--ag-charts-border-color);--ag-charts-input-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-input-text-color) 50% );--ag-charts-input-placeholder-text-color: color-mix( in srgb, var(--ag-charts-input-background-color), var(--ag-charts-input-text-color) 60% );--ag-charts-button-background-color: var(--ag-charts-background-color);--ag-charts-button-border-color: var(--ag-charts-border-color);--ag-charts-button-border-radius: var(--ag-charts-border-radius);--ag-charts-button-text-color: var(--ag-charts-text-color);--ag-charts-button-focus-background-color: color-mix( in srgb, var(--ag-charts-button-background-color), var(--ag-charts-accent-color) 12% );--ag-charts-button-focus-border-color: var(--ag-charts-accent-color);--ag-charts-button-focus-text-color: var(--ag-charts-accent-color);--ag-charts-button-disabled-background-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-foreground-color) 6% );--ag-charts-button-disabled-border-color: var(--ag-charts-border-color);--ag-charts-button-disabled-text-color: color-mix( in srgb, var(--ag-charts-chrome-background-color), var(--ag-charts-chrome-text-color) 50% );--ag-charts-checkbox-background-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 35% );--ag-charts-checkbox-checked-background-color: var(--ag-charts-accent-color);--ag-charts-chrome-font-size-small: var(--ag-charts-chrome-font-size);--ag-charts-chrome-font-size-medium: calc(var(--ag-charts-chrome-font-size) * (13 / 12));--ag-charts-chrome-font-size-large: calc(var(--ag-charts-chrome-font-size) * (14 / 12));--ag-charts-border: solid 1px var(--ag-charts-border-color);--ag-charts-focus-border: solid 1px var(--ag-charts-accent-color);--ag-charts-focus-border-shadow: 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%);--ag-charts-layer-menu: 6;--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1}.ag-charts-theme-default-dark{--ag-charts-shadow: 0 2px 12px 0 color-mix(in srgb, black 33.3%, transparent);--ag-charts-focus-color: color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-accent-color) 22%)}.ag-chart-canvas-wrapper .ag-charts-theme-default{--ag-charts-border-radius: var(--ag-border-radius, 4px);--ag-charts-border: var(--ag-borders-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-focus-shadow: var(--ag-focus-shadow, 0 0 0 3px var(--ag-charts-accent-color));--ag-charts-focus-border-shadow: var( --ag-focus-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-charts-accent-color) 20%) )}.ag-charts-icon{display:block;width:20px;height:20px;speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-align-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNyAxMGg2djFIN3pNNCA3aDEydjFINHptMSA2aDEwdjFINXoiLz48L3N2Zz4=)}.ag-charts-icon-align-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNNCAxMGg2djFINHptMC0zaDEydjFINHptMCA2aDEwdjFINHoiLz48L3N2Zz4=)}.ag-charts-icon-align-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTAgMTBoNnYxaC02ek00IDdoMTJ2MUg0em0yIDZoMTB2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-arrow-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1LjI5MyA0LjVIMTIuNXYtMUgxN3Y0aC0xVjUuMjA3bC05LjY0NiA5LjY0Ny0uNzA4LS43MDh6IiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDE2YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwbS0yLjUgMS41YTEuNSAxLjUgMCAxIDAgMC0zIDEuNSAxLjUgMCAwIDAgMCAzIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-arrow-down-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDhMMS41IDhMMTAgMThMMTguNSA4TDE0IDhMMTQgM0w2IDNMNiA4Wk03IDRMNyA5SDMuNjYyNDRMMTAgMTYuNDU2TDE2LjMzNzYgOUwxMyA5TDEzIDRMNyA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-arrow-up-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNCAxMkgxOC41TDEwIDJMMS41IDEySDZMNi4wMDAwMiAxN0gxNFYxMlpNMTMgMTZWMTFIMTYuMzM3NkwxMCAzLjU0NDA1TDMuNjYyNDQgMTFIN0w3LjAwMDAyIDE2SDEzWiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-close{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNSA1IDEwIDEwTTUgMTUgMTUgNSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-date-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAyaDF2MTZIMnptMTUgMGgxdjE2aC0xeiIgZmlsbD0iIzE4MUQxRiIvPjxwYXRoIGQ9Ik0xMy4xNTcgMTFINXYtMWg3Ljc5M0wxMSA4LjIwN2wuNzA3LS43MDcgMy4xODIgMy4xODItMy4xODIgMy4xODItLjcwNy0uNzA3eiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-date-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAySDJ2MTZoMXptMy41MDcgNC44OUw4LjUgNC44OTVWMTBINXYxaDMuNXY3aDF2LTdoNS4wODhsLTEuOTU3IDEuOTU3LjcwNy43MDcgMy4xODItMy4xODJMMTMuMzM4IDcuM2wtLjcwNy43MDdMMTQuNjI0IDEwSDkuNVY0LjkzMmwxLjk1NyAxLjk1Ny43MDctLjcwN0w4Ljk4MiAzIDUuOCA2LjE4MnoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-drag-handle{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjcuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjxjaXJjbGUgY3g9IjEzLjc1IiBjeT0iNy43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iMTMuNzUiIGN5PSIxMS43NSIgcj0iLjc1IiBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjExLjc1IiByPSIuNzUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjUiLz48Y2lyY2xlIGN4PSI1Ljc1IiBjeT0iMTEuNzUiIHI9Ii43NSIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuNSIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA1aDEydjFIMnoiLz48Y2lyY2xlIGN4PSIxNS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4yNSIgY3k9IjE0LjUiIHI9IjEuNzUiIHN0cm9rZT0iIzAwMCIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik0xOCAxNUg2di0xaDEyem0wLTQuNUgydi0xaDE2eiIvPjwvc3ZnPg==)}.ag-charts-icon-fibonacci-retracement-trend-based-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJtNC45OTYgMTIuNjc0IDMuMjkxLTUuNzQzLjg2OC40OTctMy4yOTEgNS43NDN6Ii8+PGNpcmNsZSBjeD0iOS43NSIgY3k9IjUuNSIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC4zNTEiIGN5PSIxNC41IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiLz48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTggNmgtN1Y1aDd6bTAgNC41aC03di0xaDd6bTAgNC41SDZ2LTFoMTJ6Ii8+PC9zdmc+)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-style-dashed{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDR2MUgyem0xMiAwaDR2MWgtNHpNOCA5aDR2MUg4eiIvPjwvc3ZnPg==)}.ag-charts-icon-line-style-dotted{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyLjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iNC41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTAuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48Y2lyY2xlIGN4PSIxMi41IiBjeT0iOS41IiByPSIuNSIgZmlsbD0iIzAwMCIvPjxjaXJjbGUgY3g9IjE0LjUiIGN5PSI5LjUiIHI9Ii41IiBmaWxsPSIjMDAwIi8+PGNpcmNsZSBjeD0iMTYuNSIgY3k9IjkuNSIgcj0iLjUiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-line-style-solid{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMiA5aDE2djFIMnoiLz48L3N2Zz4=)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-measurer-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibTQuNDYxIDEyLjcxIDEuNTMyLTEuNTMxIDEuNDE0IDEuNDE0LjcwNy0uNzA3TDYuNyAxMC40NzJsMS41MzItMS41MzMgMiAyIC43MDctLjcwNy0yLTIgNi4wMS02LjAxIDIuODMgMi44MjhMNS4wNSAxNy43NzggMi4yMjIgMTQuOTVsMS41MzItMS41MzIgMS40MTQgMS40MTQuNzA3LS43MDd6TS44MDggMTQuOTVsLjcwNy0uNzA3TDE0LjI0MyAxLjUxNWwuNzA3LS43MDcuNzA3LjcwNyAyLjgyOCAyLjgyOC43MDcuNzA3LS43MDcuNzA3TDUuNzU3IDE4LjQ4NWwtLjcwNy43MDctLjcwNy0uNzA3LTIuODI4LTIuODI4em0xMS4wNzgtNi44MzVMMTAuNDcgNi43bC43MDctLjcwNyAxLjQxNSAxLjQxNHptLjgyNC0zLjY1NCAxIDEgLjcwOC0uNzA3LTEtMXoiIGZpbGw9IiMxODFEMUYiLz48L3N2Zz4=)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-position-bottom{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzem0zLTNoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgMTNoOHYxSDZ6Ii8+PC9zdmc+)}.ag-charts-icon-position-center{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMyAxMGgxNHYxSDN6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDdoOHYxSDZ6bTAgNmg4djFINnoiLz48L3N2Zz4=)}.ag-charts-icon-position-top{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii4yNSIgZD0iTTMgMTBoMTR2MUgzeiIvPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik02IDdoOHYxSDZ6Ii8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIuMjUiIGQ9Ik02IDEzaDh2MUg2eiIvPjwvc3ZnPg==)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-price-range-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS4wNDYgMTVWNS44NzdoLjk0MlYxNXoiIGZpbGw9IiMxODFEMUYiLz48cGF0aCBkPSJNOS41IDYuMjI4IDcuMTY3IDguMzc2IDYuNSA3Ljc2MiA5LjUgNWwzIDIuNzYyLS42NjcuNjE0eiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik0yIDE4di0xaDE2djF6TTIgM1YyaDE2djF6IiBmaWxsPSIjMTgxRDFGIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-settings{--icon: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkIj48cGF0aCBkPSJNMTAgMTNhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2bTAtMWEyIDIgMCAxIDEtLjAwMS0zLjk5OUEyIDIgMCAwIDEgMTAgMTIiLz48cGF0aCBkPSJNMi4zMSAxNC4zNDVjLS44MTctMS40OTEuMDI3LTIuNDk5LjQ3NC0yLjg2NS41MzEtLjQzNC45NjktLjM2NS45NzItMS40OC0uMDAzLTEuMTE1LS40NDEtMS4wNDYtLjk3Mi0xLjQ4MS0uNDU0LS4zNzEtMS4zMTctMS40MDUtLjQzNC0yLjkzNmwuMDA1LS4wMDljLjg4NC0xLjUyIDIuMjA3LTEuMjkgMi43NTUtMS4wODMuNjQxLjI0My44MDEuNjU2IDEuNzY4LjEwMS45NjQtLjU2LjY4Ni0uOTA0Ljc5Ni0xLjU4Mi4wOTQtLjU3OC41NTktMS44NDMgMi4zMjYtMS44NDNoLjAxYzEuNzU5LjAwNSAyLjIyMiAxLjI2NiAyLjMxNiAxLjg0My4xMS42NzgtLjE2OCAxLjAyMi43OTYgMS41ODIuOTY3LjU1NSAxLjEyNy4xNDIgMS43NjgtLjEwMS41NDktLjIwOCAxLjg3Ni0uNDM4IDIuNzYgMS4wOTJzLjAyIDIuNTY1LS40MzQgMi45MzZjLS41MzEuNDM1LS45NjkuMzY2LS45NzIgMS40ODEuMDAzIDEuMTE1LjQ0MSAxLjA0Ni45NzIgMS40OC40NTQuMzcyIDEuMzE3IDEuNDA2LjQzNCAyLjkzN2wtLjAwNS4wMDljLS44ODQgMS41Mi0yLjIwNyAxLjI5LTIuNzU1IDEuMDgzLS42NDEtLjI0My0uODAxLS42NTYtMS43NjgtLjEwMS0uOTY0LjU2LS42ODYuOTA0LS43OTYgMS41ODEtLjA5NC41NzktLjU1OSAxLjg0NC0yLjMyNiAxLjg0NGgtLjAxYy0xLjc1OS0uMDA1LTIuMjIyLTEuMjY2LTIuMzE2LTEuODQ0LS4xMS0uNjc3LjE2OC0xLjAyMS0uNzk2LTEuNTgxLS45NjctLjU1NS0xLjEyNy0uMTQyLTEuNzY4LjEwMS0uNTQ5LjIwOC0xLjg3Ni40MzgtMi43Ni0xLjA5MmwtLjAyLS4wMzZ6TTkuOTg0IDIuMTYySDEwYzEuMzU1IDAgMS4zNDIgMS4wMzkgMS4zNTMgMS40MjUuMDA4LjMxMi4wNCAxLjE2IDEuMjU5IDEuODcybC4wMTUuMDA4YzEuMjI1LjcgMS45NzYuMzA0IDIuMjUxLjE1NS4zMzctLjE4MyAxLjIyNi0uNzExIDEuOTAyLjQ0NWwuMDA4LjAxNGMuNjc4IDEuMTczLS4yMjkgMS42ODItLjU1OCAxLjg4NC0uMjY2LjE2My0uOTg0LjYxNS0uOTkxIDIuMDI3di4wMTZjLjAwNyAxLjQxMi43MjUgMS44NjQuOTkxIDIuMDI3LjMyOC4yMDEgMS4yMjkuNzA3LjU2NiAxLjg3bC0uMDA4LjAxNGMtLjY3NyAxLjE3NC0xLjU3MS42NDMtMS45MS40NTktLjI3NS0uMTQ5LTEuMDI2LS41NDUtMi4yNTEuMTU0bC0uMDE1LjAwOWMtMS4yMTkuNzEyLTEuMjUxIDEuNTYtMS4yNTkgMS44NzItLjAxMS4zODYuMDAyIDEuNDI1LTEuMzUzIDEuNDI1cy0xLjM0Mi0xLjAzOS0xLjM1My0xLjQyNWMtLjAwOC0uMzEyLS4wNC0xLjE2LTEuMjU5LTEuODcybC0uMDE1LS4wMDljLTEuMjI1LS42OTktMS45NzYtLjMwMy0yLjI1MS0uMTU0LS4zMzYuMTgzLTEuMjE5LjcwNi0xLjg5NC0uNDMybC0uMDE2LS4wMjdjLS42NzgtMS4xNzQuMjI5LTEuNjgyLjU1OC0xLjg4NC4yNjYtLjE2My45ODQtLjYxNS45OTEtMi4wMjd2LS4wMTZjLS4wMDctMS40MTItLjcyNS0xLjg2NC0uOTkxLTIuMDI3LS4zMjgtLjIwMS0xLjIyOS0uNzA3LS41NjYtMS44N2wuMDA4LS4wMTRjLjY3Ny0xLjE3NCAxLjU3MS0uNjQzIDEuOTEtLjQ1OS4yNzUuMTQ5IDEuMDI2LjU0NSAyLjI1MS0uMTU1bC4wMTUtLjAwOGMxLjIxOS0uNzEyIDEuMjUxLTEuNTYgMS4yNTktMS44NzIuMDEtLjM4NC0uMDAyLTEuNDE3IDEuMzM3LTEuNDI1Ii8+PC9zdmc+)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-input{--input-layer-active: 1;--input-layer-focus: 2;--input-padding: calc(var(--ag-charts-spacing) * 2);--input-padding-large: calc(var(--ag-charts-spacing) * 2.5);color:var(--ag-charts-input-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);transition-duration:.25s;transition-property:none;transition-timing-function:ease-out}.ag-charts-input:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--input-layer-focus)}.ag-charts-button{background:var(--ag-charts-button-background-color);border:1px solid var(--ag-charts-border-color);border-radius:var(--ag-charts-button-border-radius);color:var(--ag-charts-button-text-color);cursor:pointer;padding:var(--input-padding);transition-property:background,border-color}.ag-charts-button:hover{background:var(--ag-charts-focus-color)}.ag-charts-button:has(.ag-charts-icon){padding:2px}.ag-charts-checkbox{--checkbox-transition-duration: .1s;appearance:none;background:var(--ag-charts-checkbox-background-color);border-radius:calc(var(--ag-charts-border-radius) * 9);cursor:pointer;height:18px;margin:0;transition-duration:var(--checkbox-transition-duration);transition-property:margin;width:29px}.ag-charts-checkbox:before{display:block;background:var(--ag-charts-input-background-color);border-radius:calc(var(--ag-charts-border-radius) * 7);content:" ";height:14px;margin:2px;transition-duration:var(--checkbox-transition-duration);transition-property:margin;transition-timing-function:var(--ag-charts-input-transition-easing);width:14px}.ag-charts-checkbox:checked{background:var(--ag-charts-checkbox-checked-background-color)}.ag-charts-checkbox:checked:before{margin-left:13px}.ag-charts-select{background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-input-border-color);border-radius:var(--ag-charts-input-border-radius);padding:3px 2px 4px;font-size:inherit}.ag-charts-textarea{--textarea-line-height: 1.38;background:var(--ag-charts-input-background-color);border:1px solid var(--ag-charts-border-color);border-radius:var(--ag-charts-input-border-radius);line-height:var(--textarea-line-height);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-large);padding:var(--input-padding-large) var(--input-padding)}.ag-charts-textarea::placeholder{color:var(--ag-charts-input-placeholder-text-color)}.ag-charts-proxy-container{pointer-events:none;position:absolute}.ag-charts-proxy-elem{-webkit-appearance:none;appearance:none;background:none;border:none;color:#0000;overflow:hidden;pointer-events:auto;position:absolute}.ag-charts-proxy-elem::-moz-range-thumb,.ag-charts-proxy-elem::-moz-range-track{opacity:0}.ag-charts-proxy-elem::-webkit-slider-runnable-track,.ag-charts-proxy-elem::-webkit-slider-thumb{opacity:0}.ag-charts-proxy-elem:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus-indicator{position:absolute;display:block;pointer-events:none;user-select:none;-webkit-user-select:none;width:100%;height:100%}.ag-charts-focus-indicator>div{position:absolute;outline:solid 1px var(--ag-charts-chrome-background-color);box-shadow:var(--ag-charts-focus-shadow)}.ag-charts-focus-indicator>svg{width:100%;height:100%;fill:none;overflow:visible}.ag-charts-focus-svg-outer-path{stroke:var(--ag-charts-chrome-background-color);stroke-width:4px}.ag-charts-focus-svg-inner-path{stroke:var(--ag-charts-accent-color);stroke-width:2px}.ag-charts-overlay{color:#181d1f;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay{color:#fff}.ag-charts-overlay--loading{color:#8c8c8c}.ag-charts-overlay__loading-background{background:#fff;pointer-events:none}.ag-charts-overlay.ag-charts-dark-overlay .ag-charts-overlay__loading-background{background:#192232}.ag-charts-tooltip{--tooltip-arrow-size: 8px;--tooltip-row-spacing: 8px;--tooltip-column-spacing: 16px;position:fixed;inset:unset;margin:0;padding:0;overflow:visible;top:var(--top, 0px);left:var(--left, 0px);width:max-content;max-width:100%;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);color:var(--ag-charts-chrome-text-color);background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);box-shadow:var(--ag-charts-shadow)}.ag-charts-tooltip--compact .ag-charts-tooltip-content{--tooltip-row-spacing: 2px;--tooltip-column-spacing: 8px;padding:3px 6px}.ag-charts-tooltip--arrow-top:before,.ag-charts-tooltip--arrow-right:before,.ag-charts-tooltip--arrow-bottom:before,.ag-charts-tooltip--arrow-left:before{content:"";position:absolute;display:block;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);border:inherit;border-bottom-color:transparent;border-right-color:transparent;background:inherit;clip-path:polygon(0 0,100% 0,100% 1px,1px 100%,0 100%)}.ag-charts-tooltip--arrow-top:before{bottom:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * .5)) rotate(45deg)}.ag-charts-tooltip--arrow-bottom:before{top:100%;left:50%;transform:translate(-50%) translateY(calc(var(--tooltip-arrow-size) * -.5)) rotate(225deg)}.ag-charts-tooltip--arrow-left:before{right:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * .5)) rotate(315deg)}.ag-charts-tooltip--arrow-right:before{left:100%;top:50%;transform:translateY(-50%) translate(calc(var(--tooltip-arrow-size) * -.5)) rotate(135deg)}.ag-charts-tooltip--no-interaction{pointer-events:none;user-select:none;-webkit-user-select:none}.ag-charts-tooltip--wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-charts-tooltip--wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-charts-tooltip--wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-charts-tooltip--wrap-never{white-space:nowrap}.ag-charts-tooltip-heading,.ag-charts-tooltip-title,.ag-charts-tooltip-label,.ag-charts-tooltip-value{overflow:hidden;text-overflow:ellipsis}.ag-charts-tooltip-content{display:grid;grid:auto-flow minmax(1em,auto) / 1fr;padding:8px 12px;gap:var(--tooltip-row-spacing)}.ag-charts-tooltip-content:has(.ag-charts-tooltip-symbol){grid:auto-flow minmax(1em,auto) / auto 1fr}.ag-charts-tooltip-heading{grid-column:1 / -1}.ag-charts-tooltip-symbol{grid-column:1 / 2;place-self:center}.ag-charts-tooltip-symbol svg{display:block}.ag-charts-tooltip-title{grid-column:-2 / -1}.ag-charts-tooltip-row{grid-column:1 / -1;display:flex;gap:var(--tooltip-column-spacing);align-items:baseline;justify-content:space-between;overflow:hidden}.ag-charts-tooltip-row--inline{grid-column:-2 / -1}.ag-charts-tooltip-label{flex:1;min-width:0}.ag-charts-tooltip-value{min-width:0}.ag-charts-tooltip-footer{grid-column:1 / -1;color:var(--ag-charts-chrome-subtle-text-color);text-align:center}.ag-charts-popover{position:absolute;border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);background:var(--ag-charts-chrome-background-color);color:var(--ag-charts-chrome-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);box-shadow:var(--ag-charts-shadow);z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-menu{--item-padding: 6px 12px;--icon-color: var(--ag-charts-chrome-text-color);display:grid;grid:auto-flow auto / 1fr;column-gap:12px;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-menu:has(.ag-charts-menu__icon,.ag-charts-menu__row--stroke-width-visible){grid:auto-flow auto / auto 1fr}.ag-charts-menu__row--stroke-width-visible:before{content:"";height:var(--strokeWidth);width:12px;background:var(--icon-color)}.ag-charts-menu__row--stroke-width-visible[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-menu__row{display:grid;grid-column:1 / -1;grid-template-columns:subgrid;align-items:center;padding:var(--item-padding)}.ag-charts-menu__row:not(.ag-charts-menu__row--active){cursor:pointer}.ag-charts-menu__row:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.ag-charts-menu__row:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.ag-charts-menu__row:focus{background:var(--ag-charts-focus-color)}.ag-charts-menu__row:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:var(--ag-charts-layer-menu)}.ag-charts-menu__row--active{--icon-color: var(--ag-charts-accent-color);background:var(--ag-charts-focus-color);color:var(--ag-charts-accent-color)}.ag-charts-menu__label{grid-column:-1 / span 1}.ag-charts-toolbar{--toolbar-gap: calc(var(--ag-charts-spacing) * 2);--toolbar-size: 34px;--toolbar-button-padding: 6px;align-items:center;display:flex;flex-wrap:nowrap;position:absolute}.ag-charts-toolbar__button{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);color:var(--ag-charts-chrome-text-color);cursor:pointer;display:flex;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size-medium);font-weight:var(--ag-charts-chrome-font-weight);justify-content:center;min-height:var(--toolbar-size);min-width:var(--toolbar-size);padding:var(--toolbar-button-padding);position:relative;transition:background-color .25s ease-in-out,border-color .25s ease-in-out,color .25s ease-in-out;white-space:nowrap}.ag-charts-toolbar__button:hover{background:var(--ag-charts-focus-color);z-index:1}.ag-charts-toolbar__button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-toolbar__button--active{background:var(--ag-charts-focus-color);border-color:var(--ag-charts-accent-color);color:var(--ag-charts-accent-color);z-index:2}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-button-disabled-background-color);color:var(--ag-charts-button-disabled-text-color);cursor:default}.ag-charts-toolbar--horizontal{flex-direction:row;.ag-charts-toolbar__button{margin:0 0 0 -1px}.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius)}}.ag-charts-toolbar--vertical{flex-direction:column;.ag-charts-toolbar__button{margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button--first{border-top-left-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--last{border-bottom-left-radius:var(--ag-charts-border-radius);border-bottom-right-radius:var(--ag-charts-border-radius)}}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-charts-floating-toolbar{border:none;display:flex;.ag-charts-toolbar{align-items:unset;position:unset}}.ag-charts-floating-toolbar__drag-handle{align-items:center;background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius);cursor:grab;display:flex;justify-content:center;min-width:24px;padding-left:0;padding-right:0}.ag-charts-floating-toolbar__drag-handle--dragging{cursor:grabbing}
`}}),xr,gl=k({"packages/ag-charts-community/src/util/listeners.ts"(){"use strict";P(),xr=class{constructor(){this.registeredListeners=new Map}addListener(t,e){const i={symbol:Symbol(t),handler:e};return this.registeredListeners.has(t)?this.registeredListeners.get(t).push(i):this.registeredListeners.set(t,[i]),()=>this.removeListener(i.symbol)}removeListener(t){for(const[e,i]of this.registeredListeners.entries()){const s=i.findIndex(o=>o.symbol===t);if(s>=0){i.splice(s,1),i.length===0&&this.registeredListeners.delete(e);break}}}dispatch(t,...e){for(const i of this.getListenersByType(t))try{i.handler(...e)}catch(s){tt.errorOnce(String(s))}}getListenersByType(t){return this.registeredListeners.get(t)??[]}destroy(){this.registeredListeners.clear()}}}}),fl,kc=k({"packages/ag-charts-community/src/util/baseManager.ts"(){"use strict";gl(),fl=class{constructor(){this.listeners=new xr,this.destroyFns=[],this.destroyed=!1}addListener(t,e){return this.listeners.addListener(t,e)}destroy(){this.listeners.destroy(),this.destroyFns.forEach(t=>t()),this.destroyed=!0}}}}),VR,TZ=k({"packages/ag-charts-community/src/util/guardedElement.ts"(){"use strict";P(),Qs(),VR=class Hk{constructor(e,i,s){this.element=e,this.topTabGuard=i,this.bottomTabGuard=s,this.destroyFns=[],this.guardTabIndex=0,this.hasFocus=!1,this.initTabGuard(this.topTabGuard,o=>this.onTab(o,!1)),this.initTabGuard(this.bottomTabGuard,o=>this.onTab(o,!0)),this.element.addEventListener("focus",()=>this.onFocus(),{capture:!0}),this.element.addEventListener("blur",o=>this.onBlur(o),{capture:!0})}set tabIndex(e){this.guardTabIndex=e,this.guardTabIndex===0?this.setGuardIndices(void 0):this.hasFocus||this.setGuardIndices(this.guardTabIndex)}destroy(){for(const e of this.destroyFns)e();this.destroyFns.length=0}initTabGuard(e,i){const s=()=>i(e);e.addEventListener("focus",s),this.destroyFns.push(()=>e.removeEventListener("focus",s))}setGuardIndices(e){const i=e;ve(this.topTabGuard,"tabindex",i),ve(this.bottomTabGuard,"tabindex",i)}onFocus(){this.hasFocus=!0,this.guardTabIndex!==0&&this.setGuardIndices(0)}onBlur({relatedTarget:e}){const{topTabGuard:i,bottomTabGuard:s}=this;this.hasFocus=!1,this.guardTabIndex!==0&&e!==i&&e!==s&&this.setGuardIndices(this.guardTabIndex)}onTab(e,i){if(this.guardTabIndex!==0){let s;e.tabIndex===0?(s=this.findExitTarget(!i),this.setGuardIndices(this.guardTabIndex)):s=this.findEnterTarget(i),s?.focus()}}static queryFocusable(e,i){const s=xe();return Array.from(e.querySelectorAll(i)).filter(o=>{if(o instanceof HTMLElement){const a=s.getComputedStyle(o);return a.display!=="none"&&a.visibility!=="none"}return!1})}findEnterTarget(e){const i=Hk.queryFocusable(this.element,'[tabindex="0"]'),s=e?i.length-1:0;return i[s]}findExitTarget(e){const i=Hk.queryFocusable(cr(),"[tabindex]").filter(a=>a.tabIndex>0).sort((a,n)=>a.tabIndex-n.tabIndex),{before:s,after:o}=Hk.findBeforeAndAfter(i,this.guardTabIndex);return e?s:o}static findBeforeAndAfter(e,i){let s=0,o=e.length-1,a,n;for(;s<=o;){const r=Math.floor((s+o)/2),l=e[r].tabIndex;if(l===i){a=e[r-1]||void 0,n=e[r+1]||void 0;break}else l<i?(a=e[r],s=r+1):(n=e[r],o=r-1)}return{before:a,after:n}}}}});function Pn(t,e,i,s,o){e.addEventListener(i,s);const a=()=>e.removeEventListener(i,s,o);return t.push(a),a}function WR(t,e,i){Pn(t,e,"keydown",s=>{s.key==="Escape"&&i(s)})}function CZ(t,e,i){const s=Pn(t,window,"mousedown",o=>{[0,2].includes(o.button)&&!UR(e,o)&&(i(),s())});return s}function LZ(t,e,i){const s=Pn(t,window,"touchstart",o=>{Array.from(o.targetTouches).some(n=>!UR(e,n))&&(i(),s())});return s}function UR(t,e){if(e.target instanceof Element){const{x:i,y:s,width:o,height:a}=t.getBoundingClientRect(),{clientX:n,clientY:r}=e;return n>=i&&r>=s&&n<=i+o&&r<=s+a}return!1}function dS(t){return!(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)}function cI(t,e,...i){return dS(t)&&(t.key===e||i.some(s=>t.key===s))}function HR(t,e,i,s){i&&Pn(t,e,"keydown",o=>{cI(o,s)&&i.focus()})}function NZ(t,e,i,s,o,a){HR(t,e,o,a),HR(t,e,i,s),Pn(t,e,"keydown",n=>{cI(n,s,a)&&n.preventDefault()})}function YR(t){const{orientation:e,buttons:i,wrapAround:s=!1,onEscape:o,onFocus:a,onBlur:n}=t,{nextKey:r,prevKey:l}=au[e],c=p=>{p.target&&"tabIndex"in p.target&&(i.forEach(g=>g.tabIndex=-1),p.target.tabIndex=0)},[h,u]=s?[i.length,i.length]:[0,1/0],d=[];for(let p=0;p<i.length;p++){const g=i[(h+p-1)%u],f=i[p],x=i[(h+p+1)%u];Pn(d,f,"focus",c),a&&Pn(d,f,"focus",a),n&&Pn(d,f,"blur",n),o&&WR(d,f,o),NZ(d,f,x,r,g,l),f.tabIndex=p===0?0:-1}return d}function KR(t){const{sourceEvent:e,orientation:i,menu:s,buttons:o,closeCallback:a,overrideFocusVisible:n,autoCloseOnBlur:r=!1}=t,{nextKey:l,prevKey:c}=au[i],h=uI(e);ve(h,"aria-expanded",!0);const u=new XR(s,h,a),d=()=>u.close(),{destroyFns:p}=u;if(s.role="menu",s.ariaOrientation=i,p.push(...YR({orientation:i,buttons:o,onEscape:d,wrapAround:!0})),s.tabIndex=-1,WR(p,s,d),Pn(p,s,"keydown",g=>{g.target===s&&(g.key===l||g.key===c)&&(g.preventDefault(),o[0]?.focus())}),r){const g=f=>{!o.includes(f.relatedTarget)&&d()};for(const f of o)Pn(p,f,"blur",g)}return o[0]?.focus({preventScroll:!0}),n!==void 0&&(o.forEach(f=>f.setAttribute("data-focus-visible-override",n.toString())),Pn(p,s,"keydown",()=>{o.forEach(f=>f.setAttribute("data-focus-visible-override","true"))},{once:!0})),u}function OZ(t,e){return i=>{if(t.ariaDisabled==="true")return i.preventDefault();e(i)}}function hI(t){return"button"in t?t.button===0:dS(t)&&(t.code==="Space"||t.key==="Enter")}function uI(t){if(t?.target instanceof HTMLElement&&"tabindex"in t.target.attributes)return t.target}function $R(t){const e=i=>{if(i.defaultPrevented)return;eS(i.target,"data-preventdefault",!0)&&cI(i,"ArrowRight","ArrowLeft","ArrowDown","ArrowUp")&&i.preventDefault()};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}var au,XR,Sp=k({"packages/ag-charts-community/src/util/keynavUtil.ts"(){"use strict";Qs(),au={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}},XR=class{constructor(t,e,i){this.lastFocus=e,this.closeCallback=i,this.destroyFns=[],this.destroyFns.push(CZ(this.destroyFns,t,()=>this.close(!0))),this.destroyFns.push(LZ(this.destroyFns,t,()=>this.close(!0)))}close(t){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,this.closeCallback(),this.finishClosing(t)}finishClosing(t){this.destroyFns.forEach(e=>e()),this.destroyFns.length=0,ve(this.lastFocus,"aria-expanded",!1),t||this.lastFocus?.focus({preventScroll:!0}),this.lastFocus=void 0}}}}),ZR,wZ=k({"packages/ag-charts-community/src/util/pixelRatioObserver.ts"(){"use strict";P(),ZR=class{constructor(t){this.callback=t,this.devicePixelRatio=xe("devicePixelRatio")??1,this.devicePixelRatioMediaQuery=void 0,this.devicePixelRatioListener=e=>{e.matches||(this.devicePixelRatio=xe("devicePixelRatio")??1,this.unregisterDevicePixelRatioListener(),this.registerDevicePixelRatioListener(),this.callback(this.pixelRatio))}}get pixelRatio(){return this.devicePixelRatio}observe(){this.registerDevicePixelRatioListener()}disconnect(){this.unregisterDevicePixelRatioListener()}unregisterDevicePixelRatioListener(){this.devicePixelRatioMediaQuery?.removeEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=void 0}registerDevicePixelRatioListener(){const t=xe("matchMedia")?.(`(resolution: ${this.pixelRatio}dppx)`);t?.addEventListener("change",this.devicePixelRatioListener),this.devicePixelRatioMediaQuery=t}}}}),dI,qR=k({"packages/ag-charts-community/src/util/sizeMonitor.ts"(){"use strict";P(),wZ(),dI=class{constructor(){this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([e,i])=>this.observe(e,i)),this.queuedObserveRequests=[],this.observeWindow()},typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(e=>{for(const{target:i,contentRect:{width:s,height:o}}of e){const a=this.elements.get(i);this.checkSize(a,i,s,o)}}));let t;this.pixelRatioObserver=new ZR(()=>{clearTimeout(t),t=setTimeout(()=>this.checkPixelRatio(),0)}),this.documentReady=cr("readyState")==="complete",this.documentReady?this.observeWindow():xe()?.addEventListener("load",this.onLoad)}destroy(){xe()?.removeEventListener("load",this.onLoad),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.pixelRatioObserver?.disconnect(),this.pixelRatioObserver=void 0}observeWindow(){this.pixelRatioObserver?.observe()}checkPixelRatio(){const t=this.pixelRatioObserver?.pixelRatio??1;for(const[e,i]of this.elements)if(i.size!=null&&i.size.pixelRatio!==t){const{width:s,height:o}=i.size;i.size={width:s,height:o,pixelRatio:t},i.cb(i.size,e)}}checkSize(t,e,i,s){if(t&&(i!==t.size?.width||s!==t.size?.height)){const o=this.pixelRatioObserver?.pixelRatio??1;t.size={width:i,height:s,pixelRatio:o},t.cb(t.size,e)}}observe(t,e){if(!this.documentReady){this.queuedObserveRequests.push([t,e]);return}this.elements.has(t)?this.removeFromQueue(t):this.resizeObserver?.observe(t);const i={cb:e};this.elements.set(t,i)}unobserve(t){this.resizeObserver?.unobserve(t),this.elements.delete(t),this.removeFromQueue(t),this.elements.size||this.destroy()}removeFromQueue(t){this.queuedObserveRequests=this.queuedObserveRequests.filter(([e])=>e!==t)}}}}),nu,pS=k({"packages/ag-charts-community/src/util/stateTracker.ts"(){"use strict";nu=class extends Map{constructor(t,e){super(),this.defaultValue=t,this.defaultState=e}set(t,e){return this.delete(t),typeof e<"u"&&super.set(t,e),this}stateId(){return Array.from(this.keys()).pop()??this.defaultState}stateValue(){return Array.from(this.values()).pop()??this.defaultValue}}}}),QR,EZ=k({"packages/ag-charts-community/src/dom/domLayout.html"(){QR='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="presentation" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-canvas" aria-hidden="true"></div><div role="figure" class="ag-charts-canvas-proxy"><div role="presentation" class="ag-charts-series-area"></div></div><div role="presentation" class="ag-charts-canvas-overlay ag-charts-tooltip-container"></div></div></div></div>'}});function _Z(t,e){if(typeof IntersectionObserver>"u")return;const i=new IntersectionObserver(s=>{for(const o of s)o.target===t&&e(o.intersectionRatio)},{root:t});return i.observe(t),i}function JR(t,e){const i=Bt("div");return i.className="ag-charts-tab-guard",t.insertAdjacentElement(e,i),i}var t1,pI,e1,gI,gS,fI,i1=k({"packages/ag-charts-community/src/dom/domManager.ts"(){"use strict";P(),Xt(),IZ(),Qs(),kc(),TZ(),Bo(),Sp(),qR(),pS(),EZ(),t1=["styles","canvas","canvas-center","canvas-container","canvas-overlay","canvas-proxy","series-area","tooltip-container"],pI={safeHorizontal:"ag-charts-wrapper--safe-horizontal",safeVertical:"ag-charts-wrapper--safe-vertical"},e1=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas"}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],["canvas-center",{childElementType:"div"}],["series-area",{childElementType:"div"}],["tooltip-container",{childElementType:"div"}]]),gI={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON(){return gI}},gS=class Jd extends fl{constructor(e,i,s="normal"){super(),this.styleContainer=i,this.mode=s,this.anchorName=`--${la(this)}`,this.styles=new Map,this.pendingContainer=void 0,this.container=void 0,this.documentRoot=void 0,this.initiallyConnected=void 0,this.containerSize=void 0,this.sizeMonitor=new dI,this.cursorState=new nu("default"),this.minWidth=0,this.minHeight=0,this.element=this.initDOM(),this.rootElements=this.initRootElements(),this.rootElements.canvas.element.style.setProperty("anchor-name",this.anchorName);let o=!1;if(this.observer=_Z(this.element,a=>{a===0&&!o&&this.listeners.dispatch("hidden",{type:"hidden"}),o=a===0}),this.setSizeOptions(),this.updateContainerSize(),this.addStyles("ag-charts-community",jR),this.setContainer(e),this.destroyFns.push($R(this.element)),this.mode==="normal"){const a=this.rootElements["canvas-center"].element;if(a==null)throw new Error("Error initializing tab guards");const n=JR(a,"beforebegin"),r=JR(a,"afterend");this.tabGuards=new VR(a,n,r)}}initDOM(){if(this.mode==="normal"){const s=Bt("div");return s.innerHTML=QR,s.firstChild}const e=Bt("div");e.role="presentation",e.classList.add("ag-charts-canvas-container","ag-charts-canvas","ag-charts-tooltip-container");const i=Bt("div");return e.appendChild(i),i.role="presentation",i.classList.add("ag-charts-series-area"),e}initRootElements(){return t1.reduce((e,i)=>{const s=`ag-charts-${i}`;let o=this.element.classList.contains(s)?this.element:this.element.querySelector(`.${s}`);if(!o&&this.mode==="normal")throw new Error(`AG Charts - unable to find DOM element ${s}`);return o??(o=Bt("div")),e[i]={element:o,children:new Map,listeners:[]},e},{})}destroy(){super.destroy(),this.observer?.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),this.pendingContainer=void 0,Object.values(this.rootElements).forEach(e=>{e.children.forEach(i=>i.remove()),e.element.remove()}),this.element.remove()}postRenderUpdate(){this.mode!=="minimal"&&(this.pendingContainer==null||this.pendingContainer===this.container||(Jd.batchedUpdateContainer.length===0&&xe().setTimeout(this.applyBatchedUpdateContainer.bind(this),0),Jd.batchedUpdateContainer.push(this)))}applyBatchedUpdateContainer(){for(const e of Jd.batchedUpdateContainer)e.destroyed||e.updateContainer();Jd.batchedUpdateContainer.splice(0)}setSizeOptions(e=300,i=300,s,o){const{style:a}=this.element;a.width=`${s??e}px`,a.height=`${o??i}px`,this.minWidth=s??e,this.minHeight=o??i,this.updateContainerClassName()}updateContainerSize(){const{style:e}=this.rootElements["canvas-center"].element;e.visibility=this.containerSize==null?"hidden":"",this.containerSize?(e.width=`${this.containerSize.width??0}px`,e.height=`${this.containerSize.height??0}px`):(e.width="",e.height=""),this.updateContainerClassName()}setTabGuardIndex(e){this.tabGuards&&(this.tabGuards.tabIndex=e)}setContainer(e){e!==this.container&&(this.pendingContainer=e,(this.mode==="minimal"||this.container==null)&&this.updateContainer())}updateContainer(){const{pendingContainer:e}=this;if(!(e==null||e===this.container)){if(this.container&&(this.container.removeChild(this.element),this.sizeMonitor.unobserve(this.container)),this.documentRoot!=null)for(const i of this.rootElements.styles.children.keys())this.removeChild("styles",i);this.container=e,this.pendingContainer=void 0,this.documentRoot=this.getShadowDocumentRoot(e),this.initiallyConnected=this.mode==="minimal"||e.isConnected;for(const[i,s]of this.styles)this.addStyles(i,s);e.appendChild(this.element),this.sizeMonitor.observe(e,i=>{this.containerSize=i,this.updateContainerSize(),this.listeners.dispatch("resize",{type:"resize"})}),this.listeners.dispatch("container-changed",{type:"container-changed"})}}setThemeClass(e){const i="ag-charts-theme-";this.element.classList.forEach(s=>{s.startsWith(i)&&s!==e&&this.element.classList.remove(s)}),this.element.classList.add(e)}setThemeParameters(e){const i={accentColor:"accent-color",axisColor:"axis-color",backgroundColor:"background-color",borderColor:"border-color",foregroundColor:"foreground-color",fontFamily:"font-family",fontSize:"font-size",fontWeight:"font-weight",gridLineColor:"grid-line-color",padding:"padding",subtleTextColor:"subtle-text-color",textColor:"text-color",chromeBackgroundColor:"chrome-background-color",chromeFontFamily:"chrome-font-family",chromeFontSize:"chrome-font-size",chromeFontWeight:"chrome-font-weight",chromeSubtleTextColor:"chrome-subtle-text-color",chromeTextColor:"chrome-text-color",inputBackgroundColor:"input-background-color",inputTextColor:"input-text-color",crosshairLabelBackgroundColor:"crosshair-label-background-color",crosshairLabelTextColor:"crosshair-label-text-color"},s=["fontSize","chromeFontSize"];for(const[o,a]of ja(e)){let n=`${a}`;s.includes(o)&&(n=`${a}px`),this.element.style.setProperty(`--ag-charts-${i[o]}`,n)}}updateCanvasLabel(e){ve(this.rootElements["canvas-proxy"].element,"aria-label",e)}getEventElement(e,i){return["focus","blur","keydown","keyup"].includes(i)?this.rootElements["series-area"].element:e}addEventListener(e,i,s){this.getEventElement(this.element,e).addEventListener(e,i,s)}removeEventListener(e,i,s){this.getEventElement(this.element,e).removeEventListener(e,i,s)}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){const e=xe(),i=new pt(0,0,e.innerWidth,e.innerHeight),s=this.getRawOverlayClientRect();return i.intersection(s)?.toDOMRect()??gI}getRawOverlayClientRect(){let e=this.element;const i=this.element.getRootNode()?.fullscreenElement;for(;e!=null;){let a;if(i!=null&&e===i)a=!0;else{const r=e.computedStyleMap?.()?.get("overflow-y")?.toString();a=r==="auto"||r==="scroll"}if(a)return pt.fromDOMRect(e.getBoundingClientRect());e=e.parentElement}if(this.documentRoot!=null)return pt.fromDOMRect(this.documentRoot.getBoundingClientRect());const{innerWidth:s,innerHeight:o}=xe();return new pt(0,0,s,o)}getShadowDocumentRoot(e=this.container){const i=e?.ownerDocument?.body??cr("body");for(;e!=null;){if(e===i)return;if(e.parentNode instanceof DocumentFragment)return e;e=e.parentNode}}getParent(e){return this.rootElements[e].element}getChildBoundingClientRect(e){const{children:i}=this.rootElements[e],s=[];for(const o of i.values())s.push(pt.fromDOMRect(o.getBoundingClientRect()));return pt.merge(s)}isManagedChildDOMElement(e,i,s){const{children:o}=this.rootElements[i],a=o?.get(s);return a!=null&&e.contains(a)}contains(e,i){return i==null?this.element.contains(e):this.rootElements[i].element.contains(e)}addStyles(e,i){const s="data-ag-charts";if(this.styles.set(e,i),this.container==null)return;const o=r=>r.getAttribute(s)===e,a=r=>{const l=new Set(["TITLE","META"]);let c=!0,h;for(const d of r.children){if(c&&l.has(d.tagName)){h=d;continue}if(c=!1,o(d))return;d.hasAttribute(s)&&(h=d)}const u=Bt("style");return h==null?r.prepend(u):r.insertBefore(u,h.nextSibling),u};let n;this.styleContainer?n=a(this.styleContainer):this.initiallyConnected===!1?n=this.addChild("styles",e):this.documentRoot==null&&!Jd.headStyles.has(e)?(n=a(cr("head")),Jd.headStyles.add(e)):this.documentRoot!=null&&(n=this.addChild("styles",e)),!(n==null||o(n))&&(n.setAttribute(s,e),n.innerHTML=i)}removeStyles(e){this.removeChild("styles",e)}updateCursor(e,i){this.cursorState.set(e,i),this.element.style.cursor=this.cursorState.stateValue()}getCursor(){return this.element.style.cursor}addChild(e,i,s,o){const{element:a,children:n,listeners:r}=this.rootElements[e];if(!n)throw new Error("AG Charts - unable to create DOM elements after destroy()");if(n.has(i))return n.get(i);const{childElementType:l="div"}=e1.get(e)??{};if(s&&s.tagName.toLowerCase()!==l.toLowerCase())throw new Error("AG Charts - mismatching DOM element type");const c=s??Bt(l);for(const[h,u,d]of r)c.addEventListener(h,u,d);if(n.set(i,c),o){const h=a.querySelector(o.query);if(h==null)throw new Error(`AG Charts - addChild query failed ${o.query}`);h.insertAdjacentElement(o.where,c)}else a?.appendChild(c);return c}removeChild(e,i){const{children:s}=this.rootElements[e];s&&(s.get(i)?.remove(),s.delete(i))}incrementDataCounter(e){const{dataset:i}=this.element;i[e]??(i[e]="0"),i[e]=String(Number(i[e])+1)}setDataBoolean(e,i){this.element.dataset[e]=String(i)}updateContainerClassName(){const{element:e,containerSize:i,minWidth:s,minHeight:o}=this;e.classList.toggle(pI.safeHorizontal,s>=(i?.width??1/0)),e.classList.toggle(pI.safeVertical,o>=(i?.height??1/0))}},gS.batchedUpdateContainer=[],gS.headStyles=new Set,fI=gS}}),s1,RZ=k({"packages/ag-charts-community/src/widget/boundedTextWidget.ts"(){"use strict";P(),pl(),s1=class extends Rn{constructor(){super(Bt("div")),this.textElement=os("text"),this.textElement.role="presentation",this.svgElement=os("svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.elem.appendChild(this.svgElement),this.elem.role="presentation"}set textContent(t){this.textElement.textContent=t;const i=this.textElement.getBBox?.();i&&this.svgElement.setAttribute("viewBox",`${i.x} ${i.y} ${i.width} ${i.height}`)}get textContent(){return this.textElement.textContent}destructor(){}}}}),vp,fS=k({"packages/ag-charts-community/src/widget/buttonWidget.ts"(){"use strict";P(),Qs(),pl(),vp=class extends Rn{constructor(){super(Bt("button")),this.setEnabled(!0)}destructor(){}setEnabled(t){ve(this.elem,"aria-disabled",!t),_n(this.elem,"pointer-events",t?void 0:"none")}addListener(t,e){return super.addListener(t,(i,s)=>{(t==="click"||t==="dblclick")&&this.isDisabled()||e(i,s)})}}}}),o1,PZ=k({"packages/ag-charts-community/src/widget/groupWidget.ts"(){"use strict";P(),Qs(),pl(),o1=class extends Rn{constructor(){super(Bt("div")),ve(this.elem,"role","group")}destructor(){}}}}),mI,a1=k({"packages/ag-charts-community/src/widget/rovingTabContainerWidget.ts"(){"use strict";P(),Qs(),Sp(),pl(),mI=class extends Rn{constructor(t,e){super(Bt("div")),this.focusedChildIndex=0,this.onChildFocus=(i,s)=>{const o=this.children[this.focusedChildIndex];this.focusedChildIndex=s.index,o?.setTabIndex(-1),s.setTabIndex(0)},this.onChildKeyDown=(i,s)=>{const o=this.orientation,[a,n]=o==="both"?[au.horizontal,au.vertical]:[au[o],void 0];let r=-1;if(dS(i.sourceEvent)){const l=i.sourceEvent.key;l===a.nextKey||l===n?.nextKey?r=s.index+1:(l===a.prevKey||l===n?.prevKey)&&(r=s.index-1)}this.children[r]?.focus()},this.orientation=t,ve(this.elem,"role",e)}get orientation(){return eS(this.elem,"aria-orientation")??"both"}set orientation(t){ve(this.elem,"aria-orientation",t!=="both"?t:void 0)}focus(){this.children[this.focusedChildIndex]?.focus()}onChildAdded(t){t.addListener("focus",this.onChildFocus),t.addListener("keydown",this.onChildKeyDown),t.setTabIndex(this.children.length===1?0:-1)}onChildRemoved(t){t.removeListener("focus",this.onChildFocus),t.removeListener("keydown",this.onChildKeyDown);const{focusedChildIndex:e,children:i}=this,s=e===t.index;for(let o=0;o<i.length;o++){const a=i[o];a.index===e&&(this.focusedChildIndex=o),a.index=o}if(s){const o=i[e]??i[e-1];o?(this.focusedChildIndex=o.index,o.setTabIndex(0)):this.focusedChildIndex=0}}}}}),n1,BZ=k({"packages/ag-charts-community/src/widget/listWidget.ts"(){"use strict";P(),Qs(),a1(),pl(),n1=class extends mI{constructor(){super("both","list"),this.setHidden(!0)}destructor(){this.children.forEach(t=>t.getElement().parentElement.remove())}addChildToDOM(t,e){const i=Bt("div");ve(i,"role","listitem"),_n(i,"position","absolute"),Rn.setElementContainer(t,i),this.appendOrInsert(i,e),this.setHidden(!1)}removeChildFromDOM(t){t.getElement().parentElement.remove(),this.setHidden(this.children.length===0)}setHidden(t){this.children.length===0&&(t=!0),super.setHidden(t)}}}}),ru,mS=k({"packages/ag-charts-community/src/widget/nativeWidget.ts"(){"use strict";pl(),ru=class extends Rn{constructor(t){super(t)}destructor(){}}}});function ml(t,e=2){return typeof t=="number"?l1(t,e):typeof t=="string"?t:String(t??"")}function r1(t){return c1.format(t)}function l1(t,e){let i=yI.get(e);return i||(i=new Intl.NumberFormat("en-US",{maximumFractionDigits:e,useGrouping:!1}),yI.set(e,i)),i.format(t)}var c1,yI,Ac=k({"packages/ag-charts-community/src/util/format.util.ts"(){"use strict";c1=new Intl.NumberFormat("en-US",{style:"percent"}),yI=new Map().set(2,new Intl.NumberFormat("en-US",{maximumFractionDigits:2,useGrouping:!1}))}}),yS,xS,h1=k({"packages/ag-charts-community/src/widget/sliderWidget.ts"(){"use strict";P(),Qs(),Ac(),pl(),yS=class sb extends Rn{constructor(){super(Bt("input")),this._step=sb.STEP_ONE,this.orientation="both"}get step(){return this._step}set step(e){this._step=e,this.getElement().step=e.attributeValue}get keyboardStep(){return this._keyboardStep?.step??this._step}set keyboardStep(e){if(e!==this._keyboardStep?.step&&(this._keyboardStep!==void 0&&(this.removeListener("keydown",this._keyboardStep.onKeyDown),this.removeListener("keyup",this._keyboardStep.onKeyUp),this.removeListener("blur",this._keyboardStep.onBlur),this._keyboardStep=void 0),e!==void 0)){const i=()=>this.getElement().step=e.attributeValue,s=()=>this.getElement().step=this._step.attributeValue;this._keyboardStep={step:e,onKeyDown:i,onKeyUp:s,onBlur:s},this.addListener("keydown",this._keyboardStep.onKeyDown),this.addListener("keyup",this._keyboardStep.onKeyUp),this.addListener("blur",this._keyboardStep.onBlur)}}get orientation(){return eS(this.elem,"aria-orientation")??"both"}set orientation(e){ve(this.elem,"aria-orientation",e!=="both"?e:void 0),sb.registerDefaultPreventers(this,e)}destructor(){}clampValueRatio(e,i){const s=this.getValueRatio(),o=Tt(e,s,i);return o!==s&&this.setValueRatio(o),o}setValueRatio(e,i){const{divider:s}=this.step,o=Math.round(e*1e4)/s,{ariaValueText:a=r1(o/s)}=i??{},n=this.getElement();n.value=`${o}`,n.ariaValueText=a}getValueRatio(){return parseFloat(this.getElement().value)/this.step.divider}static registerDefaultPreventers(e,i){i==="both"?e.removeListener("keydown",sb.onKeyDown):e.addListener("keydown",sb.onKeyDown)}static onKeyDown(e,i){let s=[];const{orientation:o}=i;o==="horizontal"?s=["ArrowUp","ArrowDown"]:o==="vertical"&&(s=["ArrowLeft","ArrowRight"]),s.includes(e.sourceEvent.code)&&e.sourceEvent.preventDefault()}},yS.STEP_ONE={attributeValue:"1",divider:1},yS.STEP_HUNDRETH={attributeValue:"0.01",divider:100},xS=yS}}),u1,zZ=k({"packages/ag-charts-community/src/widget/switchWidget.ts"(){"use strict";Qs(),fS(),u1=class extends vp{constructor(){super(),ve(this.elem,"role","switch"),this.setChecked(!1)}setChecked(t){ve(this.elem,"aria-checked",t)}}}}),rm,xI=k({"packages/ag-charts-community/src/widget/toolbarWidget.ts"(){"use strict";a1(),rm=class extends mI{constructor(t="horizontal"){super(t,"toolbar")}destructor(){}}}});function Mp(t,e){return e.params?.type===t}function FZ(t){if(t==="button")return new vp;if(t==="slider")return new xS;if(t==="toolbar")return new rm;if(t==="group")return new o1;if(t==="list")return new n1;if(t==="region")return new ru(Bt("div"));if(t==="text")return new s1;if(t==="listswitch")return new u1;throw Error("AG Charts - error allocating meta")}function d1(t){const e={params:t,result:void 0};return e.result=FZ(e.params.type),e}var bI,p1=k({"packages/ag-charts-community/src/dom/proxyInteractionService.ts"(){"use strict";P(),Qs(),RZ(),fS(),PZ(),BZ(),mS(),h1(),zZ(),xI(),bI=class{constructor(t,e){this.localeManager=t,this.domManager=e,this.destroyFns=[]}destroy(){this.destroyFns.forEach(t=>t())}addLocalisation(t){t(),this.destroyFns.push(this.localeManager.addListener("locale-changed",t))}createProxyContainer(t){const e=d1(t),{params:i,result:s}=e,o=s.getElement();return this.domManager.addChild("canvas-proxy",i.domManagerId,o),o.classList.add(...i.classList,"ag-charts-proxy-container"),o.role=i.type,"ariaOrientation"in i&&(o.ariaOrientation=i.ariaOrientation),Mp("toolbar",e)&&(e.result.orientation=e.params.orientation),this.addLocalisation(()=>{o.ariaLabel=this.localeManager.t(i.ariaLabel.id,i.ariaLabel.params)}),s}createProxyElement(t){const e=d1(t);if(Mp("button",e)){const{params:i,result:s}=e,o=s.getElement();if(this.initInteract(i,s),typeof i.textContent=="string")o.textContent=i.textContent;else{const{textContent:a}=i;this.addLocalisation(()=>{o.textContent=this.localeManager.t(a.id,a.params)})}this.setParent(e.params,e.result)}if(Mp("slider",e)){const{params:i,result:s}=e,o=s.getElement();this.initInteract(i,s),o.type="range",o.role="presentation",o.style.margin="0px",this.addLocalisation(()=>{o.ariaLabel=this.localeManager.t(i.ariaLabel.id,i.ariaLabel.params)}),this.setParent(e.params,e.result)}if(Mp("text",e)){const{params:i,result:s}=e;this.initElement(i,s),this.setParent(e.params,e.result)}if(Mp("listswitch",e)){const{params:i,result:s}=e;this.initInteract(i,s),s.setTextContent(i.textContent),s.setChecked(i.ariaChecked),s.setAriaDescribedBy(i.ariaDescribedBy),this.setParent(e.params,e.result)}if(Mp("region",e)){const{params:i,result:s}=e,o=s.getElement();this.initInteract(i,s),o.role="region",this.setParent(e.params,e.result)}return e.result}initElement(t,e){const i=e.getElement();return ve(i,"id",t.id),_n(i,"cursor",t.cursor),i.classList.toggle("ag-charts-proxy-elem",!0),i}initInteract(t,e){const{tabIndex:i,domIndex:s}=t,o=this.initElement(t,e);i!==void 0&&(o.tabIndex=i),s!==void 0&&(e.domIndex=s)}setParent(t,e){if("parent"in t)t.parent?.addChild(e);else{const i={where:t.where,query:".ag-charts-series-area"};this.domManager.addChild("canvas-proxy",t.domManagerId,e.getElement(),i)}}}}}),GZ=k({"packages/ag-charts-locale/src/ar-EG.ts"(){"use strict"}}),jZ=k({"packages/ag-charts-locale/src/bg-BG.ts"(){"use strict"}}),VZ=k({"packages/ag-charts-locale/src/cs-CZ.ts"(){"use strict"}}),WZ=k({"packages/ag-charts-locale/src/da-DK.ts"(){"use strict"}}),UZ=k({"packages/ag-charts-locale/src/de-DE.ts"(){"use strict"}}),HZ=k({"packages/ag-charts-locale/src/el-GR.ts"(){"use strict"}}),SI,YZ=k({"packages/ag-charts-locale/src/en-US.ts"(){"use strict";SI={ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAddHorizontalLine:"Add Horizontal Line",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColorPicker:"Color picker",ariaLabelFinancialCharts:"Financial Charts",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaValuePanRange:"${min}[percent0to2dp] to ${max}[percent0to2dp]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",overlayUnsupportedBrowser:"Incompatible browser version. Please upgrade your browser.",seriesHistogramTooltipFrequency:"Frequency",seriesHistogramTooltipSum:"${yName} (sum)",seriesHistogramTooltipCount:"${yName} (count)",seriesHistogramTooltipMean:"${yName} (mean)",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsFibonacciRetracement:"Fib Retracement",toolbarAnnotationsFibonacciRetracementTrendBased:"Fib Trend Based",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsFibonacciAnnotations:"Fibonacci",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Arrows",toolbarAnnotationsMeasurerAnnotations:"Measurers",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarAnnotationsDateRange:"Date Range",toolbarAnnotationsPriceRange:"Price Range",toolbarAnnotationsDatePriceRange:"Date and Price",toolbarAnnotationsQuickDatePriceRange:"Measure",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderFibonacciRange:"Fib Retracement",dialogHeaderDateRange:"Date Range",dialogHeaderPriceRange:"Price Range",dialogHeaderDatePriceRange:"Date and Price",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputFillColorPicker:"Fill",dialogInputFillColorPickerAltText:"Fill Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputExtendAbove:"Extend above",dialogInputExtendBelow:"Extend below",dialogInputExtendLeft:"Extend left",dialogInputExtendRight:"Extend right",dialogInputReverse:"Reverse",dialogInputShowFill:"Show Fill",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",dialogInputFibonacciBands:"Bands",dialogInputFibonacciBandsAltText:"Fibonacci Bands",inputTextareaPlaceholder:"Add Text",measurerDateRangeBars:"${value}[number] bars",measurerPriceRangeValue:"${value}[number]",measurerPriceRangePercent:"${value}[percent]",measurerVolume:"Vol ${value}",tooltipPaginationStatus:"${index}[number] of ${count}[number]"}}}),KZ=k({"packages/ag-charts-locale/src/es-ES.ts"(){"use strict"}}),$Z=k({"packages/ag-charts-locale/src/fa-IR.ts"(){"use strict"}}),XZ=k({"packages/ag-charts-locale/src/fi-FI.ts"(){"use strict"}}),ZZ=k({"packages/ag-charts-locale/src/fr-FR.ts"(){"use strict"}}),qZ=k({"packages/ag-charts-locale/src/he-IL.ts"(){"use strict"}}),QZ=k({"packages/ag-charts-locale/src/hr-HR.ts"(){"use strict"}}),JZ=k({"packages/ag-charts-locale/src/hu-HU.ts"(){"use strict"}}),t9=k({"packages/ag-charts-locale/src/it-IT.ts"(){"use strict"}}),e9=k({"packages/ag-charts-locale/src/ja-JP.ts"(){"use strict"}}),i9=k({"packages/ag-charts-locale/src/ko-KR.ts"(){"use strict"}}),s9=k({"packages/ag-charts-locale/src/nb-NO.ts"(){"use strict"}}),o9=k({"packages/ag-charts-locale/src/nl-NL.ts"(){"use strict"}}),a9=k({"packages/ag-charts-locale/src/pl-PL.ts"(){"use strict"}}),n9=k({"packages/ag-charts-locale/src/pt-BR.ts"(){"use strict"}}),r9=k({"packages/ag-charts-locale/src/pt-PT.ts"(){"use strict"}}),l9=k({"packages/ag-charts-locale/src/ro-RO.ts"(){"use strict"}}),c9=k({"packages/ag-charts-locale/src/sk-SK.ts"(){"use strict"}}),h9=k({"packages/ag-charts-locale/src/sv-SE.ts"(){"use strict"}}),u9=k({"packages/ag-charts-locale/src/tr-TR.ts"(){"use strict"}}),d9=k({"packages/ag-charts-locale/src/uk-UA.ts"(){"use strict"}}),p9=k({"packages/ag-charts-locale/src/ur-PK.ts"(){"use strict"}}),g9=k({"packages/ag-charts-locale/src/vi-VN.ts"(){"use strict"}}),f9=k({"packages/ag-charts-locale/src/zh-CN.ts"(){"use strict"}}),m9=k({"packages/ag-charts-locale/src/zh-HK.ts"(){"use strict"}}),y9=k({"packages/ag-charts-locale/src/zh-TW.ts"(){"use strict"}}),g1=k({"packages/ag-charts-locale/src/main.ts"(){"use strict";GZ(),jZ(),VZ(),WZ(),UZ(),HZ(),YZ(),KZ(),$Z(),XZ(),ZZ(),qZ(),QZ(),JZ(),t9(),e9(),i9(),s9(),o9(),a9(),n9(),r9(),l9(),c9(),h9(),u9(),d9(),p9(),g9(),f9(),m9(),y9()}}),f1,bS,m1,x9=k({"packages/ag-charts-community/src/locale/defaultMessageFormatter.ts"(){"use strict";P(),f1=/\$\{(\w+)}(?:\[(\w+)])?/gi,bS={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}),percent0to2dp:new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},m1=({defaultValue:t,variables:e})=>t?.replaceAll(f1,(i,s,o)=>{const a=e[s],n=o!=null?bS[o]:null;return o!=null&&n==null&&tt.warnOnce(`Format style [${o}] is not supported`),n!=null?n.format(a):typeof a=="number"?bS.number.format(a):a instanceof Date?bS.datetime.format(a):String(a)})}}),y1,b9=k({"packages/ag-charts-community/src/locale/localeManager.ts"(){"use strict";g1(),gl(),x9(),y1=class extends xr{constructor(){super(...arguments),this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(t){this.localeText!==t&&(this.localeText=t,this.dispatch("locale-changed"))}setLocaleTextFormatter(t){this.getLocaleText=t,this.getLocaleText!==t&&(this.getLocaleText=t,this.dispatch("locale-changed"))}t(t,e={}){const{localeText:i=SI,getLocaleText:s}=this,o=i[t];return s?.({key:t,defaultValue:o,variables:e})??m1({key:t,defaultValue:o,variables:e})??t}}}}),SS,x1=k({"packages/ag-charts-community/src/scene/canvas/hdpiCanvas.ts"(){"use strict";P(),bo(),D_(),SS=class{constructor(t){this.enabled=!0,this.width=600,this.height=300;const{width:e,height:i,canvasElement:s,willReadFrequently:o=!1}=t;this.pixelRatio=t.pixelRatio??xe("devicePixelRatio")??1,this.element=s??Bt("canvas"),this.element.style.display="block",this.element.style.width=(e??this.width)+"px",this.element.style.height=(i??this.height)+"px",this.element.width=Math.round((e??this.width)*this.pixelRatio),this.element.height=Math.round((i??this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:o}),this.onEnabledChange(),this.resize(e??0,i??0,this.pixelRatio),M_(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.context.canvas,e,i)}toDataURL(t){return this.element.toDataURL(t)}resize(t,e,i){if(!(t>0&&e>0))return;const{element:s,context:o}=this;s.width=Math.round(t*i),s.height=Math.round(e*i),o.setTransform(i,0,0,i,0,0),s.style.width=t+"px",s.style.height=e+"px",this.width=t,this.height=e,this.pixelRatio=i}clear(){v_(this)}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}},v([Dc(t=>t.onEnabledChange())],SS.prototype,"enabled",2)}}),b1,S9=k({"packages/ag-charts-community/src/scene/layersManager.ts"(){"use strict";Ui(),mA(),b1=class{constructor(t){this.canvas=t,this.debug=ee.create(!0,"scene"),this.layersMap=new Map,this.nextLayerId=0}get size(){return this.layersMap.size}resize(t,e,i){this.canvas.resize(t,e,i),this.layersMap.forEach(({canvas:s})=>s.resize(t,e,i))}addLayer(t){const{width:e,height:i,pixelRatio:s}=this.canvas,{name:o}=t,a=new Mb({width:e,height:i,pixelRatio:s});return this.layersMap.set(a,{id:this.nextLayerId++,name:o,canvas:a}),this.debug("Scene.addLayer() - layers",this.layersMap),a}removeLayer(t){this.layersMap.has(t)&&(this.layersMap.delete(t),t.destroy(),this.debug("Scene.removeLayer() - layers",this.layersMap))}clear(){for(const t of this.layersMap.values())t.canvas.destroy();this.layersMap.clear()}}}});function v9(t){for(const e of["B","KB","MB","GB"]){if(t<1536)return`${t.toFixed(1)}${e}`;t/=1024}return`${t.toFixed(1)}TB}`}function M9(){if(!("memory"in performance))return;const{totalJSHeapSize:t,usedJSHeapSize:e,jsHeapSizeLimit:i}=performance.memory,s=[];for(const o of[e,t,i])typeof o=="number"&&s.push(v9(o));return`Heap ${s.join(" / ")}`}function S1(t,e,i,s,o={},a=pt.zero){if(!ee.check("scene:stats","scene:stats:verbose"))return;const{layersRendered:n=0,layersSkipped:r=0,nodesRendered:l=0,nodesSkipped:c=0,opsPerformed:h=0,opsSkipped:u=0}=s??{},d=performance.now(),{start:p,...g}=e,f=Object.entries(g).map(([O,R])=>M1(O,R)).filter(O=>O!=null).join(" + "),x=Object.entries(o).map(([O,R])=>`${O}: ${JSON.stringify(R)}`).join(" ; "),y=ee.check("scene:stats:verbose"),b=M9(),S=[`${M1("\u23F1\uFE0F",p,d)} (${f})`,`${x}`,`Layers: ${y?vI(n,r):t.size}`,y?`Nodes: ${vI(l,c)}`:null,y?`Ops: ${vI(h,u)}`:null,y&&b?b:null].filter(Wi),M=new rS(O=>i.measureText(O)),D=new Map(S.map(O=>[O,M.measureLines(O)])),L=Math.max(...Array.from(D.values(),O=>O.width)),T=I9(D.values(),O=>O.height),I=2+a.x;i.save(),i.fillStyle="white",i.fillRect(I,0,L,T),i.fillStyle="black";let N=0;for(const[O,R]of D.entries())N+=R.height,i.fillText(O,I,N);i.restore()}function D9(t){const e=Rf(xe("agChartsSceneDebug")),i=[];for(const s of e)s==="layout"?i.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):i.push(s);t.debugNodeSearch=i}function k9(t,e){t.save();for(const[i,s]of Object.entries(e)){const o=Ke.toCanvas(s);if(!o){tt.log(`Scene.render() - no bbox for debugged node [${i}].`);continue}t.globalAlpha=.8,t.strokeStyle="red",t.lineWidth=1,t.strokeRect(o.x,o.y,o.width,o.height),t.fillStyle="red",t.strokeStyle="white",t.font="16px sans-serif",t.textBaseline="top",t.textAlign="left",t.lineWidth=2,t.strokeText(i,o.x,o.y,o.width),t.fillText(i,o.x,o.y,o.width)}t.restore()}function A9(t){const{...e}=t;for(const i of Object.keys(e))k1.has(i)||typeof e[i]!="number"&&typeof e[i]!="string"&&typeof e[i]!="boolean"&&(D1.add(i),delete e[i]);return e}function vS(t,e){if(!ee.check(!0,"scene"))return{};let i=0;return{node:e==="json"?A9(t):t,name:t.name??t.id,dirty:t.dirty,...Array.from(t.children(),s=>vS(s,e)).reduce((s,o)=>{let{name:a}=o;const{node:{visible:n,opacity:r,zIndex:l,translationX:c,translationY:h,rotation:u,scalingX:d,scalingY:p},node:g}=o;(!n||r<=0)&&(a=`(${a})`),It.is(g)&&g.renderToOffscreenCanvas&&(a=`*${a}*`);const f=Array.isArray(l)?`(${l.join(", ")})`:l,x=[`${(i++).toString().padStart(3,"0")}|`,`${a??"<unknown>"}`,`z: ${f}`,c&&`x: ${c}`,h&&`y: ${h}`,u&&`r: ${u}`,d!=null&&d!==1&&`sx: ${d}`,p!=null&&p!==1&&`sy: ${p}`].filter(S=>!!S).join(" ");let y=x,b=1;for(;s[y]!=null&&b<100;)y=`${x} (${b++})`;return s[y]=o,s},{})}}function v1(t){if(!t.dirty)return{dirtyTree:{},paths:[]};const e=Array.from(t.children(),o=>v1(o)).filter(o=>o.paths.length>0),i=It.is(t)?t.name??t.id:t.id,s=e.length?e.flatMap(o=>o.paths).map(o=>`${i}.${o}`):[i];return{dirtyTree:{name:i,node:t,dirty:t.dirty,...e.map(o=>o.dirtyTree).filter(o=>o.dirty!=null).reduce((o,a)=>(o[a.name??"<unknown>"]=a,o),{})},paths:s}}function vI(t,e){const i=t+e;return`${t} / ${i} (${Math.round(100*t/i)}%)`}function M1(t,e,i){const s=i!=null?i-e:e;return`${t}: ${Math.round(s*100)/100}ms`}function I9(t,e){let i=0;for(const s of t)i+=e(s);return i}var D1,k1,T9=k({"packages/ag-charts-community/src/scene/sceneDebug.ts"(){"use strict";P(),Ui(),Go(),Xt(),Ve(),ms(),D1=new Set,k1=new Set(["gradient","zIndex","clipRect","cachedBBox","childNodeCounts","path","__zIndex","name","__scalingCenterX","__scalingCenterY","__rotationCenterX","__rotationCenterY","_previousDatum","__fill","__lineDash","borderPath","borderClipPath","_clipPath"])}}),lm,MI=k({"packages/ag-charts-community/src/scene/scene.ts"(){"use strict";P(),Ui(),Bo(),x1(),S9(),ca(),T9(),lm=class{constructor(t){this.debug=ee.create(!0,"scene"),this.id=la(this),this.root=null,this.pendingSize=null,this.isDirty=!1,this.updateDebugFlags(),this.canvas=new SS(t),this.layersManager=new b1(this.canvas)}get width(){return this.pendingSize?.[0]??this.canvas.width}get height(){return this.pendingSize?.[1]??this.canvas.height}get pixelRatio(){return this.pendingSize?.[2]??this.canvas.pixelRatio}setContainer(t){const{element:e}=this.canvas;return e.parentElement?.removeChild(e),t.appendChild(e),this}setRoot(t){return this.root===t?this:(this.isDirty=!0,this.root?._setLayerManager(),this.root=t,t&&(t.visible=!0,t._setLayerManager(this.layersManager)),this)}updateDebugFlags(){ee.inDevelopmentMode(()=>ur._debugEnabled=!0)}clear(){this.canvas.clear()}attachNode(t){return this.appendChild(t),()=>this.removeChild(t)}appendChild(t){return this.root?.appendChild(t),this}removeChild(t){return this.root?.removeChild(t),this}download(t,e){YE(this.canvas.toDataURL(e),t?.trim()??"image")}getDataURL(t){return this.canvas.toDataURL(t)}resize(t,e,i){return t=Math.round(t),e=Math.round(e),i??(i=this.pixelRatio),t>0&&e>0&&(t!==this.width||e!==this.height||i!==this.pixelRatio)?(this.pendingSize=[t,e,i],this.isDirty=!0,!0):!1}render(t){const{debugSplitTimes:e={start:performance.now()},extraDebugStats:i,seriesRect:s}=t??{},{canvas:o,canvas:{context:a}={},root:n,pendingSize:r,width:l,height:c,pixelRatio:h}=this;if(!a)return;const u=performance.now();let d=!1;if(r&&(d=!0,this.layersManager.resize(...r),this.pendingSize=null),n&&!n.visible){this.isDirty=!1;return}if(n?.dirty===!1&&!this.isDirty){this.debug.check()&&this.debug("Scene.render() - no-op",{tree:vS(n,"console")}),S1(this.layersManager,e,a,void 0,i,s);return}const p={ctx:a,width:l,height:c,devicePixelRatio:h,debugNodes:{}};ee.check("scene:stats:verbose")&&(p.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0,opsPerformed:0,opsSkipped:0}),D9(p);let g=!1;if((n?.dirty!==!1||d)&&(g=!0,o.clear()),n&&ee.check("scene:dirtyTree")){const{dirtyTree:f,paths:x}=v1(n);ee.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:f,paths:x})}if(n&&g){if(n.visible&&n.preRender(p),this.debug.check()){const f=vS(n,"console");this.debug("Scene.render() - before",{canvasCleared:g,tree:f})}n.visible&&(a.save(),n.render(p),a.restore())}e["\u270D\uFE0F"]=performance.now()-u,a.verifyDepthZero?.(),this.isDirty=!1,S1(this.layersManager,e,a,p.stats,i,s),k9(a,p.debugNodes),n&&this.debug.check()&&this.debug("Scene.render() - after",{tree:vS(n,"console"),canvasCleared:g})}toSVG(){const{root:t,width:e,height:i}=this;if(t!=null)return ur.toSVG(t,e,i)}strip(){const{context:t,pixelRatio:e}=this.canvas;t.setTransform(e,0,0,e,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1}destroy(){this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0})}},lm.className="Scene"}});function C9(t,e){return"context"in t}function DI(t,e,i){return C9(t,i)&&i[0]!=null&&typeof i[0]=="object"&&(i[0].context=t.context),e(...i)}var A1,kI=k({"packages/ag-charts-community/src/util/callbackCache.ts"(){"use strict";P(),A1=class{constructor(){this.cache=new WeakMap}call(t,e,...i){let s,o=this.cache.get(e);try{s=JSON.stringify(i)}catch{return this.invoke(t,e,i,o)}return o==null&&(o=new Map,this.cache.set(e,o)),o.has(s)?o.get(s):this.invoke(t,e,i,o,s)}invoke(t,e,i,s,o){try{const a=DI(t,e,i);return s&&o!=null&&s.set(o,a),a}catch(a){tt.warnOnce("User callback errored, ignoring",a);return}}invalidateCache(){this.cache=new WeakMap}}}}),I1,L9=k({"packages/ag-charts-community/src/chart/annotation/annotationManager.ts"(){"use strict";P(),kc(),zo(),qt(),I1=class extends fl{constructor(t,e){super(),this.annotationRoot=t,this.fireChartEvent=e,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(t){return t==null||Et(t)}restoreMemento(t,e,i){this.annotations=this.cleanData(i??[]).map(s=>{const o=this.getAnnotationTypeStyles(s.type);return Vt(s,o)}),this.listeners.dispatch("restore-annotations",{type:"restore-annotations",annotations:this.annotations})}updateData(t){this.annotations=this.cleanData(t??[])}fireChangedEvent(){this.fireChartEvent({type:"annotations",annotations:we([...this.annotations])})}attachNode(t){return this.annotationRoot.append(t),()=>(this.annotationRoot?.removeChild(t),this)}setAnnotationStyles(t){this.styles=t}getAnnotationTypeStyles(t){return this.styles?.[t]}cleanData(t){for(const e of t)"textAlign"in e&&delete e.textAlign;return t}}}}),AI,N9=k({"packages/ag-charts-community/src/chart/zIndexMap.ts"(){"use strict";AI=(t=>(t[t.CHART_BACKGROUND=0]="CHART_BACKGROUND",t[t.AXIS_GRID=1]="AXIS_GRID",t[t.AXIS=2]="AXIS",t[t.ZOOM_SELECTION=3]="ZOOM_SELECTION",t[t.SERIES_CROSSLINE_RANGE=4]="SERIES_CROSSLINE_RANGE",t[t.SERIES_LAYER=5]="SERIES_LAYER",t[t.AXIS_FOREGROUND=6]="AXIS_FOREGROUND",t[t.SERIES_CROSSHAIR=7]="SERIES_CROSSHAIR",t[t.SERIES_CROSSLINE_LINE=8]="SERIES_CROSSLINE_LINE",t[t.SERIES_ANNOTATION=9]="SERIES_ANNOTATION",t[t.CHART_ANNOTATION=10]="CHART_ANNOTATION",t[t.CHART_ANNOTATION_FOCUSED=11]="CHART_ANNOTATION_FOCUSED",t[t.STATUS_BAR=12]="STATUS_BAR",t[t.SERIES_LABEL=13]="SERIES_LABEL",t[t.LEGEND=14]="LEGEND",t[t.NAVIGATOR=15]="NAVIGATOR",t[t.FOREGROUND=16]="FOREGROUND",t))(AI||{})}}),T1,O9=k({"packages/ag-charts-community/src/chart/axis/axisManager.ts"(){"use strict";Ve(),T1=class{constructor(t){this.sceneRoot=t,this.axes=new Map,this.axisGridGroup=new It({name:"Axes-Grids",zIndex:1}),this.axisGroup=new It({name:"Axes",zIndex:2}),this.axisLabelGroup=new It({name:"Axes-Labels",zIndex:13}),this.axisCrosslineRangeGroup=new It({name:"Axes-Crosslines-Range",zIndex:4}),this.axisCrosslineLineGroup=new It({name:"Axes-Crosslines-Line",zIndex:8}),this.axisCrosslineLabelGroup=new It({name:"Axes-Crosslines-Label",zIndex:13}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup),this.sceneRoot.appendChild(this.axisLabelGroup),this.sceneRoot.appendChild(this.axisCrosslineRangeGroup),this.sceneRoot.appendChild(this.axisCrosslineLineGroup),this.sceneRoot.appendChild(this.axisCrosslineLabelGroup)}updateAxes(t,e){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const s of t)e.includes(s)||(s.detachAxis(i),s.destroy());for(const s of e)t?.includes(s)||s.attachAxis(i);this.axes.clear();for(const s of e){const o=s.createAxisContext();this.axes.has(o.direction)?this.axes.get(o.direction)?.push(o):this.axes.set(o.direction,[o])}}getAxisContext(t){return this.axes.get(t)??[]}destroy(){this.axes.clear(),this.sceneRoot.removeChild(this.axisGroup),this.sceneRoot.removeChild(this.axisGridGroup)}}}}),cm,C1=k({"packages/ag-charts-community/src/chart/data/dataService.ts"(){"use strict";P(),Ui(),gl(),bo(),cm=class extends xr{constructor(t){super(),this.animationManager=t,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=ee.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(t){typeof t=="function"&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=t,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(t){this.isLoadingData=!0,this.throttledFetch(t)}isLazy(){return this.dataSourceCallback!=null}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(t){return aA(e=>this.fetch(e).catch(i=>tt.error("callback failed",i)),t,{leading:!1,trailing:!0})}createThrottledDispatch(t){return aA((e,i)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:i})},t,{leading:!0,trailing:!0})}async fetch(t){if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");const e=performance.now(),i=this.requestCounter++;this.debug(`DataService - requesting | ${i}`),this.freshRequests.push(i);let s;try{s=await this.dataSourceCallback(t),this.debug(`DataService - response | ${performance.now()-e}ms | ${i}`)}catch(a){this.debug(`DataService - request failed | ${i}`),tt.errorOnce(`DataService - request failed | [${a}]`)}this.isLoadingInitialData=!1;const o=this.freshRequests.findIndex(a=>a===i);if(o===-1||this.dispatchOnlyLatest&&o!==this.freshRequests.length-1){this.debug(`DataService - discarding stale request | ${i}`);return}this.freshRequests=this.freshRequests.slice(o+1),this.freshRequests.length===0&&(this.isLoadingData=!1),Array.isArray(s)?this.throttledDispatch(i,s):this.dispatch("data-error")}},v([Fo({newValue(t){this.throttledDispatch=this.createThrottledDispatch(t)}})],cm.prototype,"dispatchThrottle",2),v([Fo({newValue(t){this.throttledFetch=this.createThrottledFetch(t)}})],cm.prototype,"requestThrottle",2)}});function w9(t,e){return i=>Number(t)*(1-i)+Number(e)*i}function L1(t,e){if(typeof t=="string")try{t=re.fromString(t)}catch{t=re.fromArray([0,0,0])}if(typeof e=="string")try{e=re.fromString(e)}catch{e=re.fromArray([0,0,0])}return i=>re.mix(t,e,i).toRgbaString()}var N1=k({"packages/ag-charts-community/src/util/interpolate.ts"(){"use strict";Kh()}}),II={};mo(II,{easeIn:()=>O1,easeInOut:()=>w1,easeInOutQuad:()=>R1,easeInQuad:()=>E1,easeOut:()=>Dp,easeOutQuad:()=>_1,inverseEaseOut:()=>CI,linear:()=>TI});var TI,O1,Dp,w1,E1,_1,R1,CI,kp=k({"packages/ag-charts-community/src/motion/easing.ts"(){"use strict";TI=t=>t,O1=t=>1-Math.cos(t*Math.PI/2),Dp=t=>Math.sin(t*Math.PI/2),w1=t=>-(Math.cos(t*Math.PI)-1)/2,E1=t=>t*t,_1=t=>1-(1-t)**2,R1=t=>t<.5?2*t*t:1-(-2*t+2)**2/2,CI=t=>2*Math.asin(t)/Math.PI}});function E9(t){return t.every(e=>e instanceof ur)}function MS(t){return E9(t)?{nodes:t,selections:[]}:{nodes:[],selections:t}}function LI(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((i,s)=>LI(i,e[s])):Ff(t)&&Ff(e)?t.equals(e):Ye(t)&&Ye(e)?SA(t,e,LI):!1}var hm,lu,Ap,NI,OI,cu=k({"packages/ag-charts-community/src/motion/animation.ts"(){"use strict";P(),ca(),N1(),gA(),qt(),kp(),hm=.2,lu=["initial","remove","update","add","trailing","end","none"],Ap={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:hm,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1+hm,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},NI=(t=>(t.Loop="loop",t.Reverse="reverse",t))(NI||{}),OI=class{constructor(t){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=t.id,this.groupId=t.groupId,this.autoplay=t.autoplay??!0,this.ease=t.ease??TI,this.phase=t.phase;const e=t.duration??Ap[this.phase].animationDuration;this.duration=e*t.defaultDuration,this.delay=(t.delay??0)*t.defaultDuration,this.onComplete=t.onComplete,this.onPlay=t.onPlay,this.onStop=t.onStop,this.onUpdate=t.onUpdate,this.interpolate=this.createInterpolator(t.from,t.to),this.from=t.from,t.skip===!0&&(this.onUpdate?.(t.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),t.collapsable!==!1&&(this.duration=this.checkCollapse(t,this.duration))}checkCollapse(t,e){return LI(t.from,t.to)?0:e}play(t=!1){this.isPlaying||this.isComplete||(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,t&&this.onUpdate?.(this.from,!0,this)))}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(t){if(this.isComplete)return t;!this.isPlaying&&this.autoplay&&this.play(!0);const e=this.elapsed;if(this.elapsed+=t,this.delay>this.elapsed)return 0;const i=this.interpolate(this.isReverse?1-this.delta:this.delta);this.onUpdate?.(i,!1,this);const s=this.delay+this.duration;return this.elapsed>=s?(this.stop(),this.isComplete=!0,this.onComplete?.(this),t-(s-e)):0}get delta(){return this.ease(Tt(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(t,e){if(typeof e!="object"||Ff(e))return this.interpolateValue(t,e);const i=[];for(const s of Object.keys(e)){const o=this.interpolateValue(t[s],e[s]);o!=null&&i.push([s,o])}return s=>{const o={};for(const[a,n]of i)o[a]=n(s);return o}}interpolateValue(t,e){if(!(t==null||e==null)){if(Ff(t))return i=>t[zf](e,i);try{switch(typeof t){case"number":return w9(t,e);case"string":return L1(t,e);case"boolean":if(t===e)return()=>t;break;case"object":return()=>t}}catch{}throw new Error(`Unable to interpolate values: ${t}, ${e}`)}}}}}),wI,_9=k({"packages/ag-charts-community/src/chart/interaction/animationBatch.ts"(){"use strict";P(),cu(),Ui(),wI=class{constructor(t){this.maxAnimationTime=t,this.debug=ee.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(lu.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){return this.phases.get(lu[this.currentPhase])??[]}checkOverlappingId(t){t!=null&&this.controllers.has(t)&&(this.controllers.get(t).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${t}`),this.skip())}addAnimation(t){if(t.isComplete)return;if(lu.indexOf(t.phase)<this.currentPhase){this.debug("Skipping animation due to being for an earlier phase",t.id),t.stop();return}this.controllers.set(t.id,t),this.phases.get(t.phase)?.push(t)}removeAnimation(t){this.controllers.delete(t.id);const e=this.phases.get(t.phase),i=e?.indexOf(t);i!=null&&i>=0&&e?.splice(i,1)}progress(t){if(!this.isReady)return;let e=t===0?.01:t;const i=()=>{const c=lu[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:c,phaseMeta:Ap[c]}};let{phase:s,phaseControllers:o,phaseMeta:a}=i();const n=()=>lu[this.currentPhase]==null,r=()=>{for({phase:s,phaseControllers:o,phaseMeta:a}=i();!n()&&o.length===0;)this.currentPhase++,{phase:s,phaseControllers:o,phaseMeta:a}=i(),this.debug(`AnimationBatch - phase changing to ${s}`,{unusedTime:e},o)},l=this.controllers.size;this.debug(`AnimationBatch - ${t}ms; phase ${s} with ${o?.length} of ${l}`);do{const c=e,h=a.skipIfNoEarlierAnimations&&this.animationTimeConsumed===0;let u=0;for(const d of o)h?d.stop():e=Math.min(d.update(c),e),d.isComplete&&(u++,this.removeAnimation(d));this.animationTimeConsumed+=c-e,this.debug(`AnimationBatch - updated ${o.length} controllers; ${u} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),r()}while(e>0&&!n());this.animationTimeConsumed>this.maxAnimationTime&&(this.debug("Animation batch exceeded max animation time, skipping",[...this.controllers]),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let t=!0;for(const[,e]of this.controllers)if(e.duration>0&&Ap[e.phase].skipIfNoEarlierAnimations!==!0){t=!1;break}if(!t)for(const[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(t=!0){if(this.skipAnimations===!1&&t===!0){for(const e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=t}play(){for(const t of this.controllers.values())t.play()}stop(){for(const t of this.controllers.values())try{t.stop(),this.removeAnimation(t)}catch(e){tt.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(t){if(t!=null&&this.controllers.has(t)){const e=this.controllers.get(t);e&&(e.stop(),this.removeAnimation(e))}}stopByAnimationGroupId(t){for(const e of this.controllers.values())e.groupId===t&&this.stopByAnimationId(e.id)}dispatchStopped(){this.stoppedCbs.forEach(t=>t()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}destroy(){this.stop(),this.controllers.clear()}}}}),EI,_I,P1=k({"packages/ag-charts-community/src/chart/interaction/interactionManager.ts"(){"use strict";EI=(t=>(t[t.Default=32]="Default",t[t.ZoomDrag=16]="ZoomDrag",t[t.Annotations=8]="Annotations",t[t.ContextMenu=4]="ContextMenu",t[t.Animation=2]="Animation",t[t.AnnotationsSelected=1]="AnnotationsSelected",t[t.Clickable=41]="Clickable",t[t.Focusable=34]="Focusable",t[t.Keyable=43]="Keyable",t[t.ContextMenuable=36]="ContextMenuable",t[t.AnnotationsMoveable=9]="AnnotationsMoveable",t[t.AnnotationsDraggable=57]="AnnotationsDraggable",t[t.ZoomDraggable=50]="ZoomDraggable",t[t.ZoomClickable=34]="ZoomClickable",t[t.ZoomWheelable=59]="ZoomWheelable",t[t.All=63]="All",t))(EI||{}),_I=class{constructor(){this.stateQueue=34}pushState(t){this.stateQueue|=t}popState(t){this.stateQueue&=~t}isState(t){return!!(this.stateQueue&-this.stateQueue&t)}}}});function B1(t){return t==null?!0:!isNaN(t)&&t>=0&&t<=2}var RI,z1=k({"packages/ag-charts-community/src/chart/interaction/animationManager.ts"(){"use strict";P(),cu(),Ui(),_9(),RI=class{constructor(t,e){this.interactionManager=t,this.chartUpdateMutex=e,this.defaultDuration=1e3,this.batch=new wI(this.defaultDuration*1.5),this.debug=ee.create(!0,"animation"),this.events=new Tf,this.rafAvailable=typeof requestAnimationFrame<"u",this.isPlaying=!0,this.requestId=null,this.skipAnimations=!0,this.currentAnonymousAnimationId=0}addListener(t,e){return this.events.on(t,e)}animate(t){const e=this.batch;try{e.checkOverlappingId(t.id)}catch(r){this.failsafeOnError(r);return}let{id:i}=t;i==null&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);const s=this.isSkipped()||t.phase==="none";s&&this.debug("AnimationManager - skipping animation");const{delay:o,duration:a}=t;if(!B1(o))throw new Error(`Animation delay of ${o} is unsupported (${i})`);if(!B1(a))throw new Error(`Animation duration of ${a} is unsupported (${i})`);const n=new OI({...t,id:i,skip:s,autoplay:this.isPlaying?t.autoplay:!1,phase:t.phase,defaultDuration:this.defaultDuration});if(!this.forceTimeJump(n,this.defaultDuration))return this.batch.addAnimation(n),n}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(t){this.failsafeOnError(t)}this.requestAnimation()}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(t){try{this.batch.stopByAnimationId(t)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(t){try{this.batch.stopByAnimationGroupId(t)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(t=!0){this.skipAnimations=t}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:new Error().stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(t){this.requestId=xe().requestAnimationFrame(e=>{t(e).catch(i=>tt.error(i))})}forceTimeJump(t,e){return!1}requestAnimation(){if(!this.rafAvailable||!this.batch.isActive()||this.requestId!==null)return;let t;const e=async i=>{const s=()=>{const o=i-(t??i);t=i,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:o}),this.interactionManager.pushState(2);try{this.batch.progress(o)}catch(a){this.failsafeOnError(a)}this.events.emit("animation-frame",{type:"animation-frame",deltaMs:o})};this.isSkippingFrames()?await this.chartUpdateMutex.acquireImmediately(s):await this.chartUpdateMutex.acquire(s),this.batch.isActive()?this.scheduleAnimationFrame(e):(this.batch.stop(),this.events.emit("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))};this.events.emit("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(e)}cancelAnimation(){this.requestId!==null&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(t,e=!0){tt.error("Error during animation, skipping animations",t),e&&this.cancelAnimation()}startBatch(t){this.debug(`AnimationManager - startBatch() with skipAnimations=${t}.`),this.reset(),this.batch.destroy(),this.batch=new wI(this.defaultDuration*1.5),t===!0&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(2),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(t){this.batch.stoppedCbs.add(t)}destroy(){this.stop(),this.events.clear()}}}}),PI,F1=k({"packages/ag-charts-community/src/chart/interaction/chartEventManager.ts"(){"use strict";kc(),PI=class extends fl{seriesEvent(t){this.listeners.dispatch(t,{type:t})}seriesKeyNavZoom(t,e){const i={type:"series-keynav-zoom",delta:t,widgetEvent:e};this.listeners.dispatch("series-keynav-zoom",i)}legendItemClick(t,e,i,s,o){const a={type:"legend-item-click",legendType:t,series:e,itemId:i,enabled:s,legendItemName:o};this.listeners.dispatch("legend-item-click",a)}legendItemDoubleClick(t,e,i,s,o,a){const n={type:"legend-item-double-click",legendType:t,series:e,itemId:i,enabled:s,legendItemName:a,numVisibleItems:o};this.listeners.dispatch("legend-item-double-click",n)}}}}),BI,G1=k({"packages/ag-charts-community/src/chart/interaction/contextMenuRegistry.ts"(){"use strict";gl(),BI=class{constructor(){this.defaultActions=[],this.disabledActions=new Set,this.hiddenActions=new Set,this.listeners=new xr}static check(t,e){return e.type===t}static checkCallback(t,e,i){return t===e}dispatchContext(t,e,i,s){const{sourceEvent:o}=e;if(o.defaultPrevented)return;const a=s?.x??e.canvasX,n=s?.y??e.canvasY,r={type:t,x:a,y:n,context:i,sourceEvent:o};this.listeners.dispatch("",r)}addListener(t){return this.listeners.addListener("",t)}filterActions(t){return this.defaultActions.filter(e=>e.id!=null&&!this.hiddenActions.has(e.id)&&["all",t].includes(e.type))}registerDefaultAction(t){const e=t.id!=null&&!this.defaultActions.some(({id:i})=>i===t.id);return e&&this.defaultActions.push(t),()=>{const i=e?this.defaultActions.findIndex(({id:s})=>s===t.id):-1;i!==-1&&this.defaultActions.splice(i,1)}}enableAction(t){this.disabledActions.delete(t)}disableAction(t){this.disabledActions.add(t)}showAction(t){this.hiddenActions.add(t)}hideAction(t){this.hiddenActions.delete(t)}isDisabled(t){return this.disabledActions.has(t)}}}}),zI,j1=k({"packages/ag-charts-community/src/chart/interaction/highlightManager.ts"(){"use strict";kc(),pS(),zI=class extends fl{constructor(){super(...arguments),this.highlightStates=new nu}updateHighlight(t,e){const{activeHighlight:i}=this;this.highlightStates.set(t,e),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,i)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:i,callerId:t})}getActiveHighlight(){return this.activeHighlight}isEqual(t,e){return t===e||t!=null&&e!=null&&t?.series===e?.series&&t?.itemId===e?.itemId&&t?.datum===e?.datum}}}});function V1(t,e){if(t==null||e.length===0)return[!1,!1];const i=t.valueOf(),s=e[0],o=e[e.length-1];if(typeof s=="string")return[i===s,i===o];let a=s.valueOf(),n=o.valueOf();return a>n&&([a,n]=[n,a]),[i===a,i===n]}function Ic(t,e,i,s,o){const{xValue:a,yValue:n}=t,[r,l]=V1(n,o),[c,h]=V1(a,s);return{xKey:e,yKey:i,xValue:a,yValue:n,first:c,last:h,min:r,max:l}}function W1(t,[e,i],s){const o=oA(0,t-1,n=>{const r=s(n)?.[1]??NaN;return!Number.isFinite(r)||r>e})??0;let a=sA(0,t-1,n=>{const r=s(n)?.[0]??NaN;return!Number.isFinite(r)||r<i})??t-1;return a=Math.min(a+1,t),[o,a]}function FI(t,e,i){if(i){const{x:o,y:a,width:n,height:r}=i;return{canvasX:o+n/2,canvasY:a+r/2}}const s=e.yBar?.upperPoint??e.midPoint??t.datumMidPoint?.(e);if(s){const{x:o,y:a}=Ke.toCanvasPoint(t.contentGroup,s.x,s.y);return{canvasX:Math.round(o),canvasY:Math.round(a)}}}function U1(t,e,i,s,o){let a=-1,n=0,r=0,l=!1;for(;n<s&&a<=e-t;){a+=1;const c=i+r;if(l||(r*=-1),r>=0&&(r+=1),l&&r<0&&(r-=1),c<t||c>e){l=!0;continue}o(c)&&(n+=1)}return n}var hu=k({"packages/ag-charts-community/src/chart/series/util.ts"(){"use strict";P(),ms()}}),um,GI=k({"packages/ag-charts-community/src/chart/interaction/tooltipManager.ts"(){"use strict";pS(),hu(),um=class{constructor(t,e,i){this.domManager=e,this.tooltip=i,this.stateTracker=new nu,this.suppressState=new nu(!1),this.appliedState=null,this.destroyFns=[],this.destroyFns.push(i.setup(t,e),e.addListener("hidden",()=>this.tooltip.hide()))}destroy(){this.destroyFns.forEach(t=>t())}updateTooltip(t,e,i,s){i??(i=this.stateTracker.get(t)?.content),this.stateTracker.set(t,{meta:e,content:i,pagination:s}),this.applyStates()}removeTooltip(t){this.stateTracker.delete(t),this.applyStates()}suppressTooltip(t){this.suppressState.set(t,!0)}unsuppressTooltip(t){this.suppressState.delete(t)}applyStates(){const t=this.stateTracker.stateId(),e=t?this.stateTracker.get(t):void 0;if(this.suppressState.stateValue()||e?.meta==null||e?.content==null){this.appliedState=null,this.tooltip.hide();return}const i=this.domManager.getBoundingClientRect(),s=this.tooltip.bounds==="extended"?this.domManager.getOverlayClientRect():i;if(this.appliedState?.content===e?.content){const o=this.tooltip.isVisible();this.tooltip.show(s,i,e?.meta,null,void 0,o)}else this.tooltip.show(s,i,e?.meta,e?.content,e?.pagination);this.appliedState=e}static makeTooltipMeta(t,e,i,s){const{canvasX:o,canvasY:a}=t,n=e.properties.tooltip,{placement:r,defaultPlacement:l,anchorTo:c,defaultAnchorTo:h,xOffset:u,yOffset:d}=n.position,p=FI(e,i,s);return{canvasX:o,canvasY:a,nodeCanvasX:p?.canvasX??o,nodeCanvasY:p?.canvasY??a,enableInteraction:n.interaction?.enabled??!1,showArrow:n.showArrow,position:{placement:r,defaultPlacement:l,anchorTo:c,defaultAnchorTo:h,xOffset:u,yOffset:d}}}isEnteringInteractiveTooltip(t){const{tooltip:e}=this,i=t.relatedTarget;return e.interactive&&e.enabled&&e.isVisible()&&e.contains(i)}}}});function jI(t,e,i){const{offsetX:s,offsetY:o,clientX:a,clientY:n,currentX:r,currentY:l,sourceEvent:c}=i;return{type:e,device:t,offsetX:s,offsetY:o,clientX:a,clientY:n,currentX:r,currentY:l,sourceEvent:c}}function H1(t,e){const i=t*t+e*e,s=VI*VI;return i>=s}function R9(t,e){const i=t.clientX-e.clientX,s=t.clientY-e.clientY,o=i*i+s*s,a=WI*WI;return o<a}var VI,Y1,WI,UI,K1=k({"packages/ag-charts-community/src/chart/interaction/dragInterpreter.ts"(){"use strict";gl(),VI=3,Y1=505,WI=30,UI=class{constructor(t){this.destroyFns=[],this.listeners=new xr,this.isDragging=!1,this.touch={distanceTravelledX:0,distanceTravelledY:0,clientX:0,clientY:0},this.destroyFns.push(t.addListener("touchstart",this.onTouchStart.bind(this)),t.addListener("touchmove",this.onTouchMove.bind(this)),t.addListener("touchend",this.onTouchEnd.bind(this)),t.addListener("mousemove",this.onMouseMove.bind(this)),t.addListener("dblclick",this.onDblClick.bind(this)),t.addListener("drag-start",this.onDragStart.bind(this)),t.addListener("drag-move",this.onDragMove.bind(this)),t.addListener("drag-end",this.onDragEnd.bind(this)))}destroy(){this.destroyFns.forEach(t=>t()),this.listeners.destroy()}addListener(t,e){return this.listeners.addListener(t,e)}dispatch(t){this.listeners.dispatch(t.type,t)}onTouchStart(t){const{clientX:e,clientY:i}=t.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX=0,this.touch.distanceTravelledY=0,this.touch.clientX=e,this.touch.clientY=i}onTouchMove(t){const{clientX:e,clientY:i}=t.sourceEvent.targetTouches[0]??{clientX:1/0,clientY:1/0};this.touch.distanceTravelledX+=Math.abs(this.touch.clientX-e),this.touch.distanceTravelledY+=Math.abs(this.touch.clientY-i),this.touch.clientX=e,this.touch.clientY=i}onTouchEnd(t){t.sourceEvent.preventDefault()}onMouseMove(t){this.dispatch(t)}onDblClick(t){this.dispatch({device:"mouse",...t})}onDragStart(t){this.dragStartEvent=t}onDragMove(t){this.dragStartEvent!=null&&H1(t.originDeltaX,t.originDeltaY)&&(this.dispatch(this.dragStartEvent),this.dispatch({...this.dragStartEvent,type:"drag-move"}),this.dragStartEvent=void 0,this.isDragging=!0),this.isDragging&&this.dispatch(t)}onDragEnd(t){if(this.isDragging){this.dispatch(t),this.isDragging=!1;return}if(t.device==="mouse"){const e=jI("mouse","click",t);this.dispatch(e)}else if(t.sourceEvent.type==="touchend"){if(H1(this.touch.distanceTravelledX,this.touch.distanceTravelledY))return;const e=jI("touch","click",t);this.dispatch(e);const i=Date.now();if(this.lastClick!==void 0&&i-this.lastClick.time<=Y1&&R9(this.lastClick,t)){const s=jI(t.device,"dblclick",t);this.dispatch(s),this.lastClick=void 0}else this.lastClick={time:i,clientX:t.clientX,clientY:t.clientY}}}}}}),DS,$1,P9=k({"packages/ag-charts-community/src/chart/interaction/widgetSet.ts"(){"use strict";mS(),K1(),DS=class extends ru{constructor(t){super(t)}addChildToDOM(){}removeChildFromDOM(){}},$1=class{constructor(t){this.seriesWidget=new DS(t.getParent("series-area")),this.chartWidget=new DS(t.getParent("canvas-proxy")),this.containerWidget=new DS(t.getParent("canvas-container")),this.containerWidget.addChild(this.chartWidget),this.chartWidget.addChild(this.seriesWidget),this.seriesDragInterpreter=new UI(this.seriesWidget)}destroy(){this.seriesDragInterpreter.destroy(),this.seriesWidget.destroy(),this.chartWidget.destroy(),this.containerWidget.destroy()}}}});function HI(t,e){const[i,s]=Li(e);return Tt(i,t,s)}function Li(t){if(t.length===0)return[];const e=[1/0,-1/0];for(const i of t)i<e[0]&&(e[0]=i),i>e[1]&&(e[1]=i);return e}function Ip(t){const[e,i]=Li(t);return i-e}var da=k({"packages/ag-charts-community/src/util/number.ts"(){"use strict";P()}}),YI,pe,So=k({"packages/ag-charts-community/src/scale/continuousScale.ts"(){"use strict";da(),Nb(),YI=class q$ extends Hf{constructor(e=[],i=[]){super(),this.domain=e,this.range=i,this.defaultClamp=!1}static is(e){return e instanceof q$}normalizeDomains(...e){let i,s=1/0,o,a=-1/0;for(const n of e)for(const r of n){const l=r.valueOf();l<s&&(s=l,i=r),l>a&&(a=l,o=r)}return i!=null&&o!=null?{domain:[i,o],animatable:!0}:{domain:[],animatable:!1}}transform(e){return e}transformInvert(e){return e}calcBandwidth(e=1){const{domain:i}=this,s=this.getPixelRange();if(i.length===0)return s;const o=Math.abs(i[1].valueOf()-i[0].valueOf())/e+1,a=Math.floor(s),n=Math.min(o,a);return s/Math.max(1,n)}convert(e,i=this.defaultClamp){const{domain:s}=this;if(!s||s.length<2)return NaN;const o=Number(this.transform(s[0])),a=Number(this.transform(s[1])),n=Number(this.transform(e)),{range:r}=this,[l,c]=r;if(i){const[h,u]=Li([o,a]);if(n<h)return l;if(n>u)return c}return o===a?(l+c)/2:n===o?l:n===a?c:l+(n-o)/(a-o)*(c-l)}invert(e,i){const s=this.domain.map(h=>this.transform(h)),[o,a]=s,{range:n}=this,[r,l]=n;let c;return r===l?c=this.toDomain((Number(o)+Number(a))/2):c=this.toDomain(Number(o)+(e-r)/(l-r)*(Number(a)-Number(o))),this.transformInvert(c)}getPixelRange(){const[e,i]=this.range;return Math.abs(i-e)}},YI.defaultTickCount=5,pe=YI}});function X1(t,e){return t.valueOf()-e.valueOf()}function B9(t){let e=NaN;const i=[];for(const s of t){const o=s.valueOf();e!==o&&i.push(s),e=o}return i}function KI(t){const e=t.slice().sort(X1);return $I(e)==null?B9(e):e}function $I(t){if(t.length===0)return 1;const e=Number(t[t.length-1])>Number(t[0])?1:-1;let i=-1/0*e;for(const s of t){const o=s.valueOf();if(Math.sign(o-i)!==e)return;i=o}return e}var Z1=k({"packages/ag-charts-community/src/util/date.ts"(){"use strict"}});function XI(t,e=new Date(t.getFullYear(),0,1)){const i=t.getTimezoneOffset()-e.getTimezoneOffset(),s=t.getTime()-e.getTime()+i*6e4,o=36e5*24;return Math.floor(s/o)}function q1(t,e){const s=new Date(t.getFullYear(),0,1).getDay(),o=(e-s+7)%7,a=new Date(t.getFullYear(),0,o+1);return a<=t?Math.floor(XI(t,a)/7)+1:0}function Q1(t,e=t.getFullYear()){const s=new Date(e,0,1).getDay(),o=(qI-s+7)%7,a=new Date(e,0,o-(qI-ZI)+1);return a<=t?Math.floor(XI(t,a)/7)+1:Q1(t,e-1)}function z9(t){const e=t.getTimezoneOffset(),i=Math.abs(e);return`${e>0?"-":"+"}${Rs(Math.floor(i/60),2,"0")}${Rs(Math.floor(i%60),2,"0")}`}function Rs(t,e,i){const s=String(Math.floor(t));return s.length>=e?s:`${i.repeat(e-s.length)}${s}`}function dm(t){const e=[];for(;t.length>0;){let i=t.indexOf("%");if(i!==0){const r=i>0?t.substring(0,i):t;e.push(r)}if(i<0)break;const s=t[i+1],o=eP[s];o!=null&&i++;const a=t[i+1],n=tP[a];if(typeof n=="function")e.push([n,o]);else if(typeof n=="string"){const r=dm(n);e.push([r,o])}else e.push(`${o??""}${a}`);t=t.substring(i+2)}return i=>{const s=typeof i=="number"?new Date(i):i;return e.map(o=>typeof o=="string"?o:o[0](s,o[1])).join("")}}var pm,J1,ZI,qI,tP,eP,kS=k({"packages/ag-charts-community/src/util/timeFormat.ts"(){"use strict";pm={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},J1=0,ZI=1,qI=4,tP={a:t=>pm.shortDays[t.getDay()],A:t=>pm.days[t.getDay()],b:t=>pm.shortMonths[t.getMonth()],B:t=>pm.months[t.getMonth()],c:"%x, %X",d:(t,e)=>Rs(t.getDate(),2,e??"0"),e:"%_d",f:(t,e)=>Rs(t.getMilliseconds()*1e3,6,e??"0"),H:(t,e)=>Rs(t.getHours(),2,e??"0"),I:(t,e)=>{const i=t.getHours()%12;return i===0?"12":Rs(i,2,e??"0")},j:(t,e)=>Rs(XI(t)+1,3,e??"0"),m:(t,e)=>Rs(t.getMonth()+1,2,e??"0"),M:(t,e)=>Rs(t.getMinutes(),2,e??"0"),L:(t,e)=>Rs(t.getMilliseconds(),3,e??"0"),p:t=>t.getHours()<12?"AM":"PM",Q:t=>String(t.getTime()),s:t=>String(Math.floor(t.getTime()/1e3)),S:(t,e)=>Rs(t.getSeconds(),2,e??"0"),u:t=>{let e=t.getDay();return e<1&&(e+=7),String(e%7)},U:(t,e)=>Rs(q1(t,J1),2,e??"0"),V:(t,e)=>Rs(Q1(t),2,e??"0"),w:(t,e)=>Rs(t.getDay(),2,e??"0"),W:(t,e)=>Rs(q1(t,ZI),2,e??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(t,e)=>Rs(t.getFullYear()%100,2,e??"0"),Y:(t,e)=>Rs(t.getFullYear(),4,e??"0"),Z:t=>z9(t),"%":()=>"%"},eP={_:" ",0:"0","-":""}}}),Tc,Wo,Uo=k({"packages/ag-charts-community/src/util/time/interval.ts"(){"use strict";P(),Tc=class{constructor(t,e,i){this._encode=t,this._decode=e,this._rangeCallback=i}floor(t){const e=new Date(t),i=this._encode(e);return this._decode(i)}ceil(t){const e=new Date(Number(t)-1),i=this._encode(e);return this._decode(i+1)}range(t,e,{extend:i=!1,visibleRange:s=[0,1]}={}){let o=!1;t.getTime()>e.getTime()&&([t,e]=[e,t],o=!0);const a=this._rangeCallback?.(t,e),n=this._encode(i?this.floor(t):this.ceil(t)),r=this._encode(i?this.ceil(e):this.floor(e));if(r<n)return[];const l=r-n;let c,h;o?(c=Math.ceil(n+(1-s[1])*l),h=Math.floor(n+(1-s[0])*l)):(c=Math.floor(n+s[0]*l),h=Math.ceil(n+s[1]*l));const u=[];for(let d=c;d<=h;d+=1){const p=this._decode(d);u.push(p)}return a?.(),u}},Wo=class extends Tc{getOffset(t,e){return Math.floor(this._encode(new Date(t)))%e}every(t,e){let i=0,s;const o=t;t=Math.max(1,Math.round(t)),o!==t&&tt.warnOnce(`interval step of [${o}] rounded to [${t}].`);const{snapTo:a="start"}=e??{};if(typeof a=="string"){const l=i;s=(c,h)=>{const u=a==="start"?c:h;return i=this.getOffset(u,t),()=>i=l}}else typeof a=="number"?i=this.getOffset(new Date(a),t):a instanceof Date&&(i=this.getOffset(a,t));const n=l=>Math.floor((this._encode(l)-i)/t),r=l=>this._decode(l*t+i);return new Tc(n,r,s)}}}});function F9(t){return t.getTime()}function G9(t){return new Date(t)}var QI,j9=k({"packages/ag-charts-community/src/util/time/millisecond.ts"(){"use strict";Uo(),QI=new Wo(F9,G9)}}),yl,xs,Js,pa,br,Tp,uu,Sr=k({"packages/ag-charts-community/src/util/time/duration.ts"(){"use strict";yl=1e3,xs=yl*60,Js=xs*60,pa=Js*24,br=pa*7,Tp=pa*30,uu=pa*365}});function V9(t){return Math.floor((t.getTime()-JI)/yl)}function W9(t){return new Date(JI+t*yl)}var JI,du,U9=k({"packages/ag-charts-community/src/util/time/second.ts"(){"use strict";Sr(),Uo(),JI=new Date().getTimezoneOffset()*xs,du=new Wo(V9,W9)}});function H9(t){return Math.floor((t.getTime()-tT)/xs)}function Y9(t){return new Date(tT+t*xs)}var tT,pu,K9=k({"packages/ag-charts-community/src/util/time/minute.ts"(){"use strict";Sr(),Uo(),tT=new Date().getTimezoneOffset()*xs,pu=new Wo(H9,Y9)}});function $9(t){return Math.floor((t.getTime()-eT)/Js)}function X9(t){return new Date(eT+t*Js)}var eT,gu,Z9=k({"packages/ag-charts-community/src/util/time/hour.ts"(){"use strict";Sr(),Uo(),eT=new Date().getTimezoneOffset()*xs,gu=new Wo($9,X9)}});function q9(t){const e=t.getTimezoneOffset()*xs;return Math.floor((t.getTime()-e)/pa)}function Q9(t){const e=new Date(1970,0,1);return e.setDate(e.getDate()+t),e}var gm,J9=k({"packages/ag-charts-community/src/util/time/day.ts"(){"use strict";Sr(),Uo(),gm=new Wo(q9,Q9)}});function fu(t){const i=(7+t-4)%7;function s(a){const n=a.getTimezoneOffset()*xs;return Math.floor((a.getTime()-n)/br-i/7)}function o(a){const n=new Date(1970,0,1);return n.setDate(n.getDate()+a*7+i),n}return new Wo(s,o)}var Cp,iP,sP,oP,aP,nP,rP,t8=k({"packages/ag-charts-community/src/util/time/week.ts"(){"use strict";Sr(),Uo(),Cp=fu(0),iP=fu(1),sP=fu(2),oP=fu(3),aP=fu(4),nP=fu(5),rP=fu(6)}});function e8(t){return t.getFullYear()*12+t.getMonth()}function i8(t){const e=Math.floor(t/12),i=t-e*12;return new Date(e,i,1)}var Cc,s8=k({"packages/ag-charts-community/src/util/time/month.ts"(){"use strict";Uo(),Cc=new Wo(e8,i8)}});function o8(t){return t.getFullYear()}function a8(t){const e=new Date;return e.setFullYear(t),e.setMonth(0,1),e.setHours(0,0,0,0),e}var fm,n8=k({"packages/ag-charts-community/src/util/time/year.ts"(){"use strict";Uo(),fm=new Wo(o8,a8)}});function r8(t){return Math.floor(t.getTime()/xs)}function l8(t){return new Date(t*xs)}var lP,c8=k({"packages/ag-charts-community/src/util/time/utcMinute.ts"(){"use strict";Sr(),Uo(),lP=new Wo(r8,l8)}});function h8(t){return Math.floor(t.getTime()/Js)}function u8(t){return new Date(t*Js)}var cP,d8=k({"packages/ag-charts-community/src/util/time/utcHour.ts"(){"use strict";Sr(),Uo(),cP=new Wo(h8,u8)}});function p8(t){return Math.floor(t.getTime()/pa)}function g8(t){const e=new Date(0);return e.setUTCDate(e.getUTCDate()+t),e.setUTCHours(0,0,0,0),e}var hP,f8=k({"packages/ag-charts-community/src/util/time/utcDay.ts"(){"use strict";Sr(),Uo(),hP=new Wo(p8,g8)}});function m8(t){return t.getUTCFullYear()*12+t.getUTCMonth()}function y8(t){const e=Math.floor(t/12),i=t-e*12;return new Date(Date.UTC(e,i,1))}var uP,x8=k({"packages/ag-charts-community/src/util/time/utcMonth.ts"(){"use strict";Uo(),uP=new Wo(m8,y8)}});function b8(t){return t.getUTCFullYear()}function S8(t){const e=new Date;return e.setUTCFullYear(t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0),e}var dP,v8=k({"packages/ag-charts-community/src/util/time/utcYear.ts"(){"use strict";Uo(),dP=new Wo(b8,S8)}}),pP={};mo(pP,{TimeInterval:()=>Tc,day:()=>gm,friday:()=>nP,hour:()=>gu,millisecond:()=>QI,minute:()=>pu,monday:()=>iP,month:()=>Cc,saturday:()=>rP,second:()=>du,sunday:()=>Cp,thursday:()=>aP,tuesday:()=>sP,utcDay:()=>hP,utcHour:()=>cP,utcMinute:()=>lP,utcMonth:()=>uP,utcYear:()=>dP,wednesday:()=>oP,year:()=>fm});var Lp=k({"packages/ag-charts-community/src/util/time/index.ts"(){"use strict";j9(),U9(),K9(),Z9(),J9(),t8(),s8(),n8(),c8(),d8(),f8(),x8(),v8(),Uo()}});function to(t){return t instanceof Date?t.getTime():t}function iT(t,e,i){const s=gP(t,e,i),o=dm(s);return a=>o(a)}function gP(t,e,i=0){let s=1/0;for(let h=1;h<t.length;h++)s=Math.min(s,Math.abs(t[h].valueOf()-t[h-1].valueOf()));const[o,a]=e.length===0?[0,0]:Li([e[0].valueOf(),e[e.length-1].valueOf()]),n=new Date(o).getFullYear(),l=new Date(a).getFullYear()-n>0,c=isFinite(s)?M8(s,t):D8(t[0]);return A8(Math.max(c-i,0),l,t)}function M8(t,e){return t<yl?0:t<xs?1:t<Js?2:t<pa?3:t<br?4:t<pa*28||t<pa*31&&k8(e)?5:t<uu?6:7}function D8(t){return du.floor(t)<t?0:pu.floor(t)<t?1:gu.floor(t)<t?2:gm.floor(t)<t?3:Cc.floor(t)<t?Cp.floor(t)<t?4:5:fm.floor(t)<t?6:7}function k8(t){let e=new Date(t[0]).getMonth();for(let i=1;i<t.length;i++){const s=new Date(t[i]).getMonth();if(e===s)return!0;e=s}return!1}function A8(t,e,i){const s=to(i[0]),o=to(i.at(-1)),a=Math.abs(o-s),n=e||t===7,r=a===0,c=[["hour",6*Js,14*pa,3,"%I %p"],["hour",xs,6*Js,3,"%I:%M"],["second",1e3,6*Js,1,":%S"],["ms",0,6*Js,0,".%L"],["am/pm",xs,6*Js,3,"%p"]," ",["day",pa,br,4,"%a"],["month",r?0:br,52*br,5,"%b %d"],["month",5*br,10*uu,6,"%B"]," ",["year",n?0:uu,1/0,7,"%Y"]].filter(d=>{if(typeof d=="string")return!0;const[p,g,f,x]=d;return x>=t&&g<=a&&a<f}).reduce((d,p)=>(typeof p=="string"?d.result.push(p):d.used.has(p[0])||(d.result.push(p),d.used.add(p[0])),d),{result:[],used:new Set}).result,h=c.findIndex(d=>typeof d!="string"),u=c.findLastIndex(d=>typeof d!="string");return c.slice(h,u+1).map(d=>typeof d=="string"?d:d[4]).join("").replaceAll(/\s+/g," ").trim()}var AS=k({"packages/ag-charts-community/src/util/timeFormatDefaults.ts"(){"use strict";da(),Lp(),Sr(),kS()}});function fP(t,e,i){if(i==null||i[0]===0&&i[1]===1)return t;const s=Tt(0,Math.floor(i[0]*t.length),t.length),o=Tt(0,Math.ceil(i[1]*t.length),t.length),a=e?t.length-o:s,n=e?t.length-s:o;return t.slice(a,n)}var mP=k({"packages/ag-charts-community/src/scale/scaleUtil.ts"(){"use strict";P()}}),mm,Np,ym=k({"packages/ag-charts-community/src/scale/bandScale.ts"(){"use strict";P(),Nb(),kA(),mP(),mm=class Q$ extends Hf{constructor(){super(...arguments),this.invalid=!0,this.range=[0,1],this.round=!1,this.interval=void 0,this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(e){return e instanceof Q$}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=Tt(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this.invalid=!0,this._paddingInner=Tt(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this.invalid=!0,this._paddingOuter=Tt(0,e,1)}get paddingOuter(){return this._paddingOuter}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&tt.warnOnce("Expected update to not invalidate scale"))}ticks(e,i=this.domain,s){return fP(i,!1,s)}convert(e,i){this.refresh();const s=this.getIndex(e);return s==null||s<0||s>=this.domain.length?NaN:this.ordinalRange(s)}invertNearestIndex(e){this.refresh();const{domain:i}=this;if(i.length===0)return-1;let s=0,o=i.length-1,a=1/0,n=0;for(;s<=o;){const r=(o+s)/2|0,l=this.ordinalRange(r),c=Math.abs(l-e);if(c===0)return r;c<a&&(a=c,n=r),l<e?s=r+1:o=r-1}return n}update(){const e=this.domain.length;if(e===0)return;const[i,s]=this.range;let{_paddingInner:o}=this;const{_paddingOuter:a,round:n}=this,r=s-i;let l;e===1?(o=0,l=r*(1-a*2)):l=r/Math.max(1,e-o+a*2);const c=n?Math.floor(l):l;let h=i+(r-c*(e-o))/2,u=c*(1-o);n&&(h=Math.round(h),u=Math.round(u)),this._step=c,this._inset=h,this._bandwidth=u,this._rawBandwidth=l*(1-o)}ordinalRange(e){const{_inset:i,_step:s,range:o}=this,a=Math.min(o[0],o[1]),n=Math.max(o[0],o[1]);return Tt(a,i+s*e,n)}},v([$h],mm.prototype,"range",2),v([$h],mm.prototype,"round",2),v([$h],mm.prototype,"interval",2),Np=mm}});function yP(t,e){return Math.abs(Math.round(t)-t)<e}function sT(t,e,i,s,o,a){if(i<2)return[t,e];const n=xm(t,e,i,s,o);if(!Number.isFinite(n))return[];if(yP(t/n,1e-12)||(t=Math.ceil(t/n)*n),yP(e/n,1e-12)||(e=Math.floor(e/n)*n),a!=null&&a[0]!==0&&a[1]!==1){const r=e-t,l=t+r*a[0],c=e-r*(1-a[1]);return bm(l-l%n,c+c%n,n)}return bm(t,e,n)}function xP(t,e,i,s,o,a){const n=a??Math.abs(e-t)/Math.max(i,1);let r=0;for(const d of wp){if(n<=d.duration)break;r++}if(r===0){const d=Math.max(xm(t,e,i,s,o),1);return QI.every(d)}else if(r===wp.length){const d=a==null?xm(t/uu,e/uu,i,s,o):1;return fm.every(d)}const l=wp[r-1],c=wp[r],{timeInterval:h,step:u}=n-l.duration<c.duration-n?l:c;return h.every(u)}function xm(t,e,i,s=0,o=1/0){if(t===e)return Tt(1,s,o);if(i<1)return NaN;const a=Math.abs(e-t),n=10**Math.floor(Math.log10(a/i));let r=NaN,l=1/0,c=!1;for(const h of oT){const u=Math.ceil(a/(h*n)),d=u>=s&&u<=o;if(c&&!d)continue;const p=Math.abs(u-i);(l>p||c!==d)&&(c||(c=d),l=p,r=h)}return r*n}function bP(t){for(let e=t.length-1;e>=0;e-=1)if(t[e]!=="0")return e+1;return 0}function SP(t,e){const i=lA(e??",f");(i.precision==null||isNaN(i.precision))&&(!i.type||"eEFgGnprs".includes(i.type)?i.precision=Math.max(...t.map(o=>{if(!Number.isFinite(o))return 0;const[a,n]=o.toExponential((i.type?6:12)-1).split(/[.e]/g);return(a!=="1"&&a!=="-1"?1:0)+bP(n)+1})):"f%".includes(i.type)&&(i.precision=Math.max(...t.map(o=>{if(!Number.isFinite(o)||o===0)return 0;const a=Math.floor(Math.log10(Math.abs(o))),n=i.type?6:12,r=o.toExponential(n-1).split(/[.e]/g)[1],l=bP(r);return Math.max(0,l-a)}))));const s=cA(i);return o=>s(Number(o))}function bm(t,e,i){if(!Number.isFinite(i)||i<=0)return[];const s=10**yb(i),o=Math.min(t,e),a=Math.max(t,e),n=[];for(let r=0;;r+=1){const l=Math.round((o+i*r)*s)/s;if(l>a)break;n.push(l)}return n}function Op(t,e){return t>=e?(tt.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0):!1}function I8(t,e){const i=Math.abs(e-t),s=10**Math.floor(Math.log10(i));let o=1/0,a=[t,e];for(const n of oT){const r=n*s,l=Math.floor(t/r)*r,c=Math.ceil(e/r)*r,h=1-i/Math.abs(c-l);o>h&&(o=h,a=[l,c])}return a}function vP(t,e,i,s,o,a){if(t<=0)return{minTickCount:0,maxTickCount:0,tickCount:0};a=Math.max(a,t/(o+1)),i??(i=a),s??(s=t),i>s&&(i===a?i=s:s=i);const n=Math.max(1,Math.floor(t/(e*i))),r=Math.min(n,Math.ceil(t/(e*s))),l=Tt(r,Math.floor(o/e),n);return{minTickCount:r,maxTickCount:n,tickCount:l}}var $e,wp,oT,mu=k({"packages/ag-charts-community/src/util/ticks.ts"(){"use strict";P(),Lp(),Sr(),$e=(t,e,i)=>({duration:e*i,timeInterval:t,step:i}),wp=[$e(du,yl,1),$e(du,yl,5),$e(du,yl,15),$e(du,yl,30),$e(pu,xs,1),$e(pu,xs,5),$e(pu,xs,15),$e(pu,xs,30),$e(gu,Js,1),$e(gu,Js,3),$e(gu,Js,6),$e(gu,Js,12),$e(gm,pa,1),$e(gm,pa,2),$e(Cp,br,1),$e(Cp,br,2),$e(Cp,br,3),$e(Cc,Tp,1),$e(Cc,Tp,2),$e(Cc,Tp,3),$e(Cc,Tp,4),$e(Cc,Tp,6),$e(fm,uu,1)],oT=[1,2,5,10]}});function MP({start:t,stop:e,tickCount:i,minTickCount:s,maxTickCount:o,visibleRange:a}){const n=xP(t,e,i,s,o);return n?n.range(new Date(t),new Date(e),{visibleRange:a}):[]}function aT({start:t,stop:e,interval:i,availableRange:s,visibleRange:o}){if(!i)return[];if(i instanceof Tc){const h=i.range(new Date(t),new Date(e),{visibleRange:o});return Op(h.length,s)?void 0:h}const a=Math.abs(i);if(Op(Math.abs(e-t)/a,s))return;const n=wp.findLast(h=>a%h.duration===0);if(n)return n.timeInterval.every(a/(n.duration/n.step)).range(new Date(t),new Date(e),{visibleRange:o});let r=new Date(Math.min(t,e));const l=new Date(Math.max(t,e)),c=[];for(;r<=l;)c.push(r),r=new Date(r),r.setMilliseconds(r.getMilliseconds()+a);return c}function T8(t,e,i,s){const{interval:o}=i,a=Math.min(to(t),to(e)),n=Math.max(to(t),to(e));let r;if(o instanceof Tc)r=o;else{let l;typeof o=="number"&&(l=(n-a)/Math.max(o,1),Op(l,s)&&(l=null)),l??(l=i.tickCount??pe.defaultTickCount),r=xP(a,n,l,i.minTickCount,i.maxTickCount)}if(r){const l=r.range(new Date(a),new Date(n),{extend:!0});return t>e&&l.reverse(),[l[0],l.at(-1)]}else return[t,e]}var nT,rT=k({"packages/ag-charts-community/src/scale/timeScale.ts"(){"use strict";mu(),Lp(),kS(),AS(),So(),nT=class extends pe{constructor(){super([],[0,1]),this.type="time"}toDomain(t){return new Date(t)}convert(t,e){return t instanceof Date||(t=new Date(t)),super.convert(t,e)}invert(t){return new Date(super.invert(t))}niceDomain(t,e=this.domain){if(e.length<2)return[];let[i,s]=e;const o=4,a=this.getPixelRange();for(let n=0;n<o;n++){const[r,l]=T8(i,s,t,a);if(to(i)===to(r)&&to(s)===to(l))break;i=r,s=l}return[i,s]}ticks(t,e=this.domain,i=[0,1]){const{nice:s,interval:o,tickCount:a=pe.defaultTickCount,minTickCount:n,maxTickCount:r}=t;if(e.length<2)return[];const l=e.map(to),c=l[0],h=l[l.length-1];if(o!=null){const u=this.getPixelRange();return aT({start:c,stop:h,interval:o,availableRange:u,visibleRange:i})??MP({start:c,stop:h,tickCount:a,minTickCount:n,maxTickCount:r,visibleRange:i})}else{if(s&&a===2)return e;if(s&&a===1)return e.slice(0,1)}return MP({start:c,stop:h,tickCount:a,minTickCount:n,maxTickCount:r,visibleRange:i})}_tickFormatter({domain:t,ticks:e,specifier:i},s){return i!=null?dm(i):iT(e,t,s)}tickFormatter(t){return this._tickFormatter(t)}datumFormatter(t){return this._tickFormatter(t,1)}}}});function DP(t,e,i,s){const o=[],a=Math.ceil(t.length/e),n=Math.floor(a/2),r=Math.floor(s[0]*t.length),l=Math.ceil(s[1]*t.length);for(let c=r;c<l;c+=1){const h=i?t.length-1-c:c;(a<=0||(h+n)%a===0)&&o.push(t[c])}return i&&o.reverse(),o}var vr,yu=k({"packages/ag-charts-community/src/scale/ordinalTimeScale.ts"(){"use strict";P(),Z1(),kS(),AS(),ym(),rT(),vr=class J$ extends Np{constructor(){super(...arguments),this.type="ordinal-time",this._domain=[],this.isReversed=!1}static is(e){return e instanceof J$}set domain(e){e!==this._domain&&(this.invalid=!0,this._domain=e,this.isReversed=e.length>0&&e[0]>e[e.length-1],this.sortedTimestamps=void 0,this.precomputedSteps=void 0)}get domain(){return this._domain}toDomain(e){return new Date(e)}normalizeDomains(...e){const i=e.filter(s=>s.length>0);if(i.length===0)return{domain:[],animatable:!1};if(i.length===1){let s=i[0];const o=$I(s);return o===-1?s=s.slice().reverse():o==null&&(s=KI(s.slice())),{domain:s,animatable:!0}}return{domain:KI(i.flat()),animatable:!0}}ticks({interval:e,maxTickCount:i},s=this.domain,o=[0,1]){if(!s.length)return[];this.refresh();const{isReversed:a}=this;if(e==null)return DP(s,i,a,o);const[n,r]=[s[0].valueOf(),s.at(-1).valueOf()],l=Math.min(n,r),c=Math.max(n,r),[h,u]=this.range,d=Math.abs(u-h),p=aT({start:l,stop:c,interval:e,availableRange:d,visibleRange:o})??DP(s,i,a,o);let g=-1;return p.filter(f=>{const x=this.findInterval(f.valueOf()),y=x===g;return g=x,!y})}getSortedTimestamps(){let{sortedTimestamps:e}=this;return e==null&&(e=this.domain.map(to),this.isReversed&&e.reverse(),this.sortedTimestamps=e),e}getPrecomputedSteps(){const{domain:e}=this;let{precomputedSteps:i}=this;const s=e.length<1e4?e.length:Math.ceil(e.length/16);if(i!=null||s<=1)return i;const o=this.getSortedTimestamps();i=new Int32Array(s);const a=o[0],r=o[o.length-1]-a,l=0,c=o.length-1;for(let h=0;h<i.length;h+=1)i[h]=this.findIntervalInRange(a+h/s*r,l,c);this.precomputedSteps=i}findIntervalInRange(e,i,s){const o=this.getSortedTimestamps();for(;i<=s;){const a=(i+s)/2|0;if(o[a]===e)return a;o[a]<e?i=a+1:s=a-1}return i}findInterval(e){const i=this.getPrecomputedSteps();let s,o;if(i==null)s=0,o=this.domain.length-1;else{const a=this.getSortedTimestamps(),n=a[0],r=a[a.length-1],l=Math.min((e-n)/(r-n)*i.length|0,i.length-1|0);s=i[l],o=l<i.length-2?i[l+1]:a.length-1}return this.findIntervalInRange(e,s,o)}tickFormatter({domain:e,ticks:i,specifier:s}){return s!=null?dm(s):iT(i,e)}datumFormatter(e){return this.tickFormatter(e)}invert(e,i=!1){this.refresh();const{domain:s}=this;if(i){const a=this.invertNearestIndex(e-this.bandwidth/2);return a!=null?s[a]:void 0}return l_(0,s.length-1,a=>this.ordinalRange(a)>=e?s[a]:void 0)??s[0]}getIndex(e){const i=this.getSortedTimestamps(),s=Number(e);if(s<i[0])return;let o=this.findInterval(s);return this.isReversed&&(o=this.domain.length-o-1),o}}}});function C8(t){return{x:t.x1,y:t.y1}}function L8(t){return{x:t.x2,y:t.y2}}function N8(t){return{x:(t.x1+t.x2)/2,y:Math.min(t.y1,t.y2)}}function O8(t){return{x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2}}function w8(t){return{x:(t.x1+t.x2)/2,y:Math.max(t.y1,t.y2)}}function E8(t){return Math.abs(t.x2-t.x1)}function _8(t){return Math.abs(t.y2-t.y1)}function R8(t){return{x1:Math.round(t.x1),y1:Math.round(t.y1),x2:Math.round(t.x2),y2:Math.round(t.y2)}}function P8(t){return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}function B8(t,e){const i=lT(t),s=lT(e);return i.x1<=s.x2&&i.x2>=s.x1&&i.y1<=s.y2&&i.y2>=s.y1}function lT(t){return{x1:Math.min(t.x1,t.x2),x2:Math.max(t.x1,t.x2),y1:Math.min(t.y1,t.y2),y2:Math.max(t.y1,t.y2)}}function z8(t,e,i,s){if(typeof t=="number")return{x1:t,y1:e,x2:i,y2:s};if("width"in t)return lT({x1:t.x,y1:t.y,x2:t.x+t.width,y2:t.y+t.height});throw new Error(`Values can not be converted into a vector4: [${JSON.stringify(t)}] [${e}] [${i}] [${s}]`)}function F8(){return{x1:0,y1:0,x2:0,y2:0}}var Ep,cT=k({"packages/ag-charts-community/src/util/vector4.ts"(){"use strict";Ep={bottomCenter:w8,center:O8,clone:P8,collides:B8,end:L8,from:z8,height:_8,round:R8,start:C8,topCenter:N8,origin:F8,width:E8}}});function IS(t,e,i,s,o){return e+(s-e)*((o-t)/(i-t))}function kP(t,e,i,s,o){return t+(o-e)*((i-t)/(s-e))}function AP(t,e,i){return[kP(t,i.min,e,i.max,0),kP(t,i.min,e,i.max,1)]}function G8(t,e,i){const[s,o]=AP(t.x1,t.x2,e),[a,n]=AP(t.y1,t.y2,i);return{x1:s,x2:o,y1:a,y2:n}}function IP(t,e,i,s,o,a){if(i<=o&&a<=s)return i;const n=o-i,r=a-s,l=Math.abs(n)<Math.abs(r)?n:r;return Tt(t,i+l,e)}function j8(t,e,i){const{x:s={min:0,max:1},y:o={min:0,max:1}}=e,a=Ep.from(i),n=Ep.from(t),r=G8(n,s,o),l=IP(r.x1,r.x2,n.x1,n.x2,a.x1,a.x2),c=IP(r.y1,r.y2,n.y1,n.y2,a.y1,a.y2),h={x:{min:IS(n.x1,s.min,n.x2,s.max,l),max:IS(n.x1,s.min,n.x2,s.max,l+t.width)},y:{min:IS(n.y1,o.min,n.y2,o.max,c),max:IS(n.y1,o.min,n.y2,o.max,c+t.height)}},u=h.x.max-h.x.min,d=h.y.max-h.y.min;return h.x.min=Tt(0,h.x.min,1-u),h.x.max=h.x.min+u,h.y.min=Tt(0,h.y.min,1-d),h.y.max=h.y.min+d,h}var V8=k({"packages/ag-charts-community/src/util/panToBBox.ts"(){"use strict";P(),cT()}}),TP,CP,hT,uT,LP,NP=k({"packages/ag-charts-community/src/chart/interaction/zoomManager.ts"(){"use strict";P(),So(),yu(),kc(),zo(),V8(),pS(),TP=["rangeX","rangeY","ratioX","ratioY","autoScaledAxes"],CP=class{constructor(){this.enabled=!1,this.padding=0,this.manuallyAdjusted=!1}},hT=t=>ae((e,{options:i})=>!pe.is(t?.scale)&&!vr.is(t?.scale)||e==null||i.end==null?!0:e<=i.end,"to be less than end"),uT=class extends fl{constructor(t,e){super(),this.fireChartEvent=t,this.mementoOriginatorKey="zoom",this.axisZoomManagers=new Map,this.state=new nu(void 0,"initial"),this.axes=[],this.didLayoutAxes=!1,this.autoScaleYAxis=new CP,this.lastRestoredState=void 0,this.independentAxes=!1,this.navigatorModule=!1,this.zoomModule=!1,this.pendingMemento=void 0,this.destroyFns.push(e.addListener("layout:complete",()=>{const{pendingMemento:i}=this,s=!this.didLayoutAxes;this.didLayoutAxes=!0,i?this.restoreMemento(i.version,i.mementoVersion,i.memento):s&&this.autoScaleYZoom("zoom-manager")}))}createMemento(){return this.getMementoRanges()}guardMemento(t,e){if(t==null)return!0;if(!li(t))return!1;for(const n of Object.keys(t))if(!TP.includes(n))return!1;const i=this.getPrimaryAxis("x"),s=this.getPrimaryAxis("y"),o={rangeX:{start:as(Ge(vt,pc),hT(i)),end:Ge(vt,pc)},rangeY:{start:as(Ge(vt,pc),hT(s)),end:Ge(vt,pc)},ratioX:{start:as(Ce,Vh("end")),end:Ce},ratioY:{start:as(Ce,Vh("end")),end:Ce},autoScaledAxes:Oe(_t("y"))},a=za(t,o);return a.errors.length>0?(e.push(...a.errors.map(n=>n.message)),!1):!0}restoreMemento(t,e,i){const{independentAxes:s}=this;if(!this.axes||!this.didLayoutAxes){this.pendingMemento={version:t,mementoVersion:e,memento:i};return}this.pendingMemento=void 0;const o=this.getDefinedZoom();if(i?.rangeX?o.x=this.rangeToRatio(i.rangeX,"x")??{min:0,max:1}:i?.ratioX?o.x={min:i.ratioX.start??0,max:i.ratioX.end??1}:o.x={min:0,max:1},!this.navigatorModule||this.zoomModule){let r=i?.autoScaledAxes?.includes("y");i?.rangeY?(o.y=this.rangeToRatio(i.rangeY,"y")??{min:0,max:1},r??(r=!1)):i?.ratioY?(o.y={min:i.ratioY.start??0,max:i.ratioY.end??1},r??(r=!1)):(o.y={min:0,max:1},r??(r=!0)),o.autoScaleYAxis=r}if(this.lastRestoredState=o,s!==!0){this.updateZoom("zoom-manager",o);return}const a=this.getPrimaryAxis("x"),n=this.getPrimaryAxis("y");for(const r of[a,n])r&&this.updateAxisZoom("zoom-manager",r.id,o[r.direction])}updateAxes(t){this.axes=t;const e=new Map(t.map(i=>[i.id,this.axisZoomManagers.get(i.id)]));this.axisZoomManagers.clear();for(const i of t)this.axisZoomManagers.set(i.id,e.get(i.id)??new LP(i));this.state.size>0&&t.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}setIndependentAxes(t=!0){this.independentAxes=t}setAutoScaleYAxis(t,e){this.autoScaleYAxis.enabled=t,this.autoScaleYAxis.padding=e}setNavigatorEnabled(t=!0){this.navigatorModule=t}setZoomModuleEnabled(t=!0){this.zoomModule=t}isNavigatorEnabled(){return this.navigatorModule}isZoomEnabled(){return this.zoomModule}updateZoom(t,e){if(e?.x&&(e.x.min<0||e.x.max>1)&&(tt.warnOnce(`Attempted to update x-axis zoom to an invalid ratio of [{ min: ${e.x.min}, max: ${e.x.max} }], expecting a ratio of 0 to 1, ignoring.`),e.x=void 0),e?.y&&(e.y.min<0||e.y.max>1)&&(tt.warnOnce(`Attempted to update y-axis zoom to an invalid ratio of [{ min: ${e.y.min}, max: ${e.y.max} }], expecting a ratio of 0 to 1, ignoring.`),e.y=void 0),this.axisZoomManagers.size===0){const s=this.state.stateId();(s==="initial"||s===t)&&this.state.set(t,e);return}this.state.set(t,e);const i=e?.autoScaleYAxis;i!=null&&(this.autoScaleYAxis.manuallyAdjusted=!i),this.axisZoomManagers.forEach(s=>{s.updateZoom(t,e?.[s.getDirection()])}),this.applyChanges(t)}updateAxisZoom(t,e,i){this.axisZoomManagers.get(e)?.updateZoom(t,i),this.applyChanges(t)}resetZoom(t){this.autoScaleYAxis.manuallyAdjusted=!1;const e=this.getRestoredZoom();this.updateZoom(t,{x:{min:e?.x?.min??0,max:e?.x?.max??1},y:{min:e?.y?.min??0,max:e?.y?.max??1},autoScaleYAxis:e?.autoScaleYAxis??!0})}resetAxisZoom(t,e){const s=this.axisZoomManagers.get(e)?.getDirection();if(s==null)return;const o=this.getRestoredZoom();if(s==="y"){const a=o?.autoScaleYAxis??!0;this.autoScaleYAxis.manuallyAdjusted=!a}this.updateAxisZoom(t,e,o?.[s]??{min:0,max:1})}setAxisManuallyAdjusted(t,e){this.axisZoomManagers.get(e)?.getDirection()==="y"&&(this.autoScaleYAxis.manuallyAdjusted=!0)}updatePrimaryAxisZoom(t,e,i){const s=this.getPrimaryAxis(e);s&&this.updateAxisZoom(t,s.id,i)}panToBBox(t,e,i){if(!this.isZoomEnabled()&&!this.isNavigatorEnabled())return!1;const s=this.getZoom();if(s===void 0||!s.x&&!s.y)return!1;if(!(e.width>0&&e.height>0&&Math.abs(i.width)<=Math.abs(e.width)&&Math.abs(i.height)<=Math.abs(e.height)))return tt.warnOnce("cannot pan to target BBox - chart too small?"),!1;const a=j8(e,s,i);return this.independentAxes?(this.updatePrimaryAxisZoom(t,"x",a.x),this.updatePrimaryAxisZoom(t,"y",a.y)):this.updateZoom(t,a),!0}fireZoomPanStartEvent(t){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:t})}extendToEnd(t,e,i){return this.extendWith(t,e,s=>Number(s)-i)}extendWith(t,e,i){const s=this.getPrimaryAxis(e);if(!s)return;const o=this.getDomainExtents(s);if(!o)return;const[,a]=o,n=i(a),r=this.rangeToRatio({start:n,end:a},e);r&&this.updateZoom(t,{[e]:r})}updateWith(t,e,i){const s=this.getPrimaryAxis(e);if(!s)return;const o=this.getDomainExtents(s);if(!o)return;let[a,n]=o;[a,n]=i(a,n);const r=this.rangeToRatio({start:a,end:n},e);r&&this.updateZoom(t,{[e]:r})}getZoom(){let t,e;if(this.axisZoomManagers.forEach(i=>{i.getDirection()==="x"?t??(t=i.getZoom()):i.getDirection()==="y"&&(e??(e=i.getZoom()))}),t||e)return{x:t,y:e}}getAxisZoom(t){return this.axisZoomManagers.get(t)?.getZoom()??{min:0,max:1}}getAxisZooms(){const t={};for(const[e,i]of this.axisZoomManagers.entries())t[e]={direction:i.getDirection(),zoom:i.getZoom()};return t}getRestoredZoom(){return this.lastRestoredState}getPrimaryAxisId(t){return this.getPrimaryAxis(t)?.id}isVisibleItemsCountAtLeast(t,e){const i=this.getPrimaryAxis("x"),s=this.getPrimaryAxis("y"),o=new Set;let a=0;const n=[t.x.min,t.x.max],r=[t.y.min,t.y.max];for(const l of i?.boundSeries??[]){o.add(l.id);const c=e-(a??0),h=l.getVisibleItems(n,r,c);if(a+=h,a>=e)return!0}for(const l of s?.boundSeries??[]){if(o.has(l.id))continue;const c=e-(a??0),h=l.getVisibleItems(n,r,c);if(a+=h,a>=e)return!0}return o.size===0}getMementoRanges(){const t=this.getDefinedZoom();let e;return this.autoScaleYAxis.enabled&&(e=this.autoScaleYAxis.manuallyAdjusted?[]:["y"]),{rangeX:this.getRangeDirection(t.x,"x"),rangeY:this.getRangeDirection(t.y,"y"),ratioX:{start:t.x.min,end:t.x.max},ratioY:{start:t.y.min,end:t.y.max},autoScaledAxes:e}}autoScaleYZoom(t,e=!0){if(!this.isZoomEnabled())return;const{independentAxes:i,autoScaleYAxis:s}=this,o=this.getZoom();if(o?.x==null||!s.enabled||s.manuallyAdjusted)return;const{padding:a}=s;let n;if(o.x?.min===0&&o.x?.max===1?n={min:0,max:1}:i?n=this.primaryAxisZoom("y",o.x,{padding:a}):n=this.combinedAxisZoom("y",o.x,{padding:a}),n!=null){if(i){const r=this.getPrimaryAxis("y");(r==null?void 0:this.axisZoomManagers.get(r.id))?.updateZoom("zoom-manager",n)}else for(const r of this.axisZoomManagers.values())r.getDirection()==="y"&&r.updateZoom("zoom-manager",n);e&&this.applyChanges(t)}}applyChanges(t){if(this.autoScaleYZoom(t,!1),!Array.from(this.axisZoomManagers.values(),s=>s.applyChanges()).includes(!0))return;const i={};for(const[s,o]of this.axisZoomManagers.entries())i[s]=o.getZoom();this.listeners.dispatch("zoom-change",{type:"zoom-change",...this.getZoom(),axes:i,callerId:t}),this.fireChartEvent({type:"zoom",...this.getMementoRanges()})}getRangeDirection(t,e){const i=this.getPrimaryAxis(e);if(!i||!pe.is(i.scale)&&!vr.is(i.scale))return;const s=this.getDomainPixelExtents(i);if(!s)return;const[o,a]=s;let n,r;return o<=a?(n=i.scale.invert(0),r=i.scale.invert(o+(a-o)*t.max)):(n=i.scale.invert(o-(o-a)*t.min),r=i.scale.invert(0)),{start:n,end:r}}rangeToRatio(t,e){const i=this.getPrimaryAxis(e);if(!i)return;const s=this.getDomainPixelExtents(i);if(!s)return;const[o,a]=s;let n=t.start==null?o:i.scale.convert?.(t.start),r=t.end==null?a:i.scale.convert?.(t.end);if(!Zt(n)||!Zt(r))return;const[l,c]=[Math.min(o,a),Math.max(o,a)];if(n<l||n>c){tt.warnOnce(`Invalid range start [${t.start}], expecting a value between [${i.scale.invert?.(o)}] and [${i.scale.invert?.(a)}], ignoring.`);return}if(r<l||r>c){tt.warnOnce(`Invalid range end [${t.end}], expecting a value between [${i.scale.invert?.(o)}] and [${i.scale.invert?.(a)}], ignoring.`);return}n=Math.min(c,Math.max(l,n)),r=Math.min(c,Math.max(l,r));const h=a-o,u=Math.abs((n-o)/h),d=Math.abs((r-o)/h);return{min:u,max:d}}getPrimaryAxis(t){return this.axes?.find(e=>e.direction===t)}getDomainExtents(t){const{domain:e}=t.scale,i=e.at(0),s=e.at(-1);if(!(i==null||s==null))return[i,s]}getDomainPixelExtents(t){const{domain:e}=t.scale,i=t.scale.convert?.(e.at(0)),s=t.scale.convert?.(e.at(-1));if(!(!Zt(i)||!Zt(s)))return[i,s]}getDefinedZoom(){const t=this.getZoom();return{x:{min:t?.x?.min??0,max:t?.x?.max??1},y:{min:t?.y?.min??0,max:t?.y?.max??1}}}zoomBounds(t,e,i,s){const o=t.scale,a=o.range;o.range=[0,1];const n=e.scale,r=n.range;n.range=[0,1];let l=1,c=!1,h=0,u=!1;for(const g of e.boundSeries){const{connectsToYAxis:f}=g,x=g.getRange("y",[i.min,i.max]);for(const y of x){const b=n.convert(y);Number.isFinite(b)&&(b<l&&(l=b,c=!f||y<0),b>h&&(h=b,u=!f||y>0))}}if(Zt(e.min)&&(l=0),Zt(e.max)&&(h=1),o.range=a,n.range=r,l>=h)return;const d=(c?s:0)+(u?s:0),p=Math.min((h-l)*(1+d),1);if(!(p<=0)){if(c&&u){const g=(h+l)/2;l=g-p/2,h=g+p/2}else!c&&u?h=l+p:c&&!u&&(l=h-p);return l<0?(h+=-l,l=0):h>1&&(l-=h-1,h=1),{min:l,max:h}}}primaryAxisZoom(t,e,{padding:i=0}={}){const s=t==="x"?"y":"x",o=this.getPrimaryAxis(s),a=this.getPrimaryAxis(t);if(!(o==null||a==null))return this.zoomBounds(o,a,e,i)}combinedAxisZoom(t,e,{padding:i=0}={}){const s=t==="x"?"y":"x",o=new Map;for(const l of this.axes)if(l.direction===s)for(const c of l.boundSeries)o.set(c,l);let a=1,n=0;for(const l of this.axes)if(l.direction===t)for(const c of l.boundSeries){const h=o.get(c);if(h==null)continue;const u=this.zoomBounds(h,l,e,i);if(u==null)return;a=Math.min(a,u.min),n=Math.max(n,u.max)}const r=1e-6;if(a<r&&(a=0),n>1-r&&(n=1),!(a>n))return{min:a,max:n}}},LP=class{constructor(t){this.axis=t;const[e=0,i=1]=t.visibleRange;this.state=new nu({min:e,max:i}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(t,e){this.state.set(t,e)}getZoom(){return we(this.state.stateValue())}hasChanges(){const t=this.currentZoom,e=this.state.stateValue();return t.min!==e.min||t.max!==e.max}applyChanges(){const t=this.hasChanges();return this.currentZoom=this.state.stateValue(),t}}}});function W8(t,e,i,s,o,a){if(t.size===0)return!1;let n=t.x,r=t.y;e!=null&&(n-=(e.x-.5)*t.size,r-=(e.y-.5)*t.size);let l=n;n<i?l=i:n>i+o&&(l=i+o);let c=r;r<s?c=s:r>s+a&&(c=s+a);const h=n-l,u=r-c;return Math.sqrt(h*h+u*u)<=t.size*.5}function OP(t,e,i,s,o){const a=t.x+t.width>e&&t.x<e+s,n=t.y+t.height>i&&t.y<i+o;return a&&n}function U8(t,e,i,s,o){return e+s<t.x+t.width&&e>t.x&&i>t.y&&i+o<t.y+t.height}function H8(t){return t!=null&&typeof t.point=="object"&&typeof t.label=="object"}function Y8(t,e,i=5){const s=new Map,o=[],a=new Map([...t.entries()].map(([r,l])=>[r,l.toSorted((c,h)=>h.point.size-c.point.size)])),n=[...a.values()].flat();for(const[r,l]of a.entries()){const c=[];if(l[0]?.label){for(let h=0,u=l.length;h<u;h++){const d=l[h],{point:p,label:g,anchor:f}=d,{text:x,width:y,height:b}=g,S=p.size*.5;let M=0,D=0;if(S>0&&d.placement!=null){const _=wP[d.placement];M=(y*.5+S+i)*_.x,D=(b*.5+S+i)*_.y}const L=p.x-y*.5+M-((f?.x??.5)-.5)*p.size,T=p.y-b*.5+D-((f?.y??.5)-.5)*p.size;if(!(!e||U8(e,L,T,y,b))||n.some(_=>W8(_.point,_.anchor,L,T,y,b))||o.some(_=>OP(_,L,T,y,b)))continue;const R={index:h,text:x,x:L,y:T,width:y,height:b,datum:d};c.push(R),o.push(R)}s.set(r,c)}}return s}function K8(t,e=0){const i=[];for(let s=0;s<t.length;s++){const o=t[s],{point:{x:a,y:n},label:{text:r}}=o;let{width:l,height:c}=o.label;if(l+=e,c+=e,i.some(h=>OP(h,a,n,l,c)))return!0;i.push({index:s,text:r,x:a,y:n,width:l,height:c,datum:o})}return!1}var wP,EP=k({"packages/ag-charts-community/src/scene/util/labelPlacement.ts"(){"use strict";wP={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},"top-left":{x:-1,y:-1},"top-right":{x:1,y:-1},"bottom-left":{x:-1,y:1},"bottom-right":{x:1,y:1}}}}),_P,$8=k({"packages/ag-charts-community/src/chart/layout/seriesLabelLayoutManager.ts"(){"use strict";Xt(),EP(),_P=class{constructor(){this.labelData=new Map}updateLabels(t,e,i=pt.zero){const s={x:-e.left,y:-e.top,width:i.width+e.left+e.right,height:i.height+e.top+e.bottom},o=new Set(t.map(n=>n.id));for(const n of this.labelData.keys())o.has(n)||this.labelData.delete(n);for(const n of t){const r=n.getLabelData();r.every(H8)&&this.labelData.set(n.id,r)}const a=Y8(this.labelData,s,5);for(const n of t)n.updatePlacedLabelData?.(a.get(n.id)??[])}}}}),RP,X8=k({"packages/ag-charts-community/src/chart/legend/legendManager.ts"(){"use strict";P(),kc(),RP=class extends fl{constructor(){super(...arguments),this.mementoOriginatorKey="legend",this.legendDataMap=new Map}createMemento(){return this.getData().filter(({hideInLegend:t,isFixed:e})=>!t&&!e).map(({enabled:t,seriesId:e,itemId:i,legendItemName:s})=>({visible:t,seriesId:e,itemId:i,legendItemName:s}))}guardMemento(t){return t==null||Et(t)}restoreMemento(t,e,i){i?.forEach(s=>{const{seriesId:o,data:a}=this.getRestoredData(s)??{};!o||!a||this.updateData(o,a)}),this.update()}getRestoredData(t){const{seriesId:e,itemId:i,legendItemName:s,visible:o}=t;if(e){const n=(this.legendDataMap.get(e)??[]).map(r=>{const l=r.seriesId===e&&(!i||r.itemId===i);return l&&r.isFixed&&this.warnFixed(r.seriesId,r.itemId),!r.isFixed&&l?{...r,enabled:o}:r});return{seriesId:e,data:n}}if(!(i==null&&s==null))for(const a of this.getData()){if(i!=null&&a.itemId!==i||s!=null&&a.legendItemName!==s)continue;if(a.isFixed){this.warnFixed(a.seriesId,i);return}const n=(this.legendDataMap.get(a.seriesId)??[]).map(r=>r.itemId===i||r.legendItemName===s?{...r,enabled:o}:r);return{seriesId:a.seriesId,data:n}}}warnFixed(t,e){tt.warnOnce(`The legend item with seriesId [${t}] and itemId [${e}] is not configurable, this series item cannot be toggled through the legend.`)}update(t){this.listeners.dispatch("legend-change",{type:"legend-change",legendData:t??this.getData()})}updateData(t,e=[]){this.legendDataMap.set(t,e)}clearData(){this.legendDataMap.clear()}toggleItem(t,e,i,s){if(s){this.getData().forEach(r=>{const l=(this.legendDataMap.get(r.seriesId)??[]).map(c=>c.legendItemName===s?{...c,enabled:t}:c);this.updateData(r.seriesId,l)});return}const o=this.getData(e),a=o.length===1,n=o.map(r=>i==null&&a||r.itemId===i?{...r,enabled:t}:r);this.updateData(e,n)}getData(t){return t?this.legendDataMap.get(t)??[]:[...this.legendDataMap].reduce((e,[i,s])=>e.concat(s),[])}getDatum({seriesId:t,itemId:e}={}){return this.getData(t).find(i=>i.itemId===e)}getSeriesEnabled(t){const e=this.getData(t);if(e.length>0)return e.some(i=>i.enabled)}getItemEnabled({seriesId:t,itemId:e}={}){return this.getDatum({seriesId:t,itemId:e})?.enabled??!0}}}}),PP,Z8=k({"packages/ag-charts-community/src/chart/series/seriesStateManager.ts"(){"use strict";PP=class{constructor(){this.groups={}}registerSeries({internalId:t,seriesGrouping:e,visible:i,type:s}){var o;e&&((o=this.groups)[s]??(o[s]={}),this.groups[s][t]={grouping:e,visible:i})}updateSeries({internalId:t,seriesGrouping:e,visible:i,type:s}){if(!e)return;const o=this.groups[s]?.[t];o&&(o.grouping=e,o.visible=i)}deregisterSeries({internalId:t,type:e}){this.groups[e]&&delete this.groups[e][t],this.groups[e]&&Object.keys(this.groups[e]).length===0&&delete this.groups[e]}getVisiblePeerGroupIndex({type:t,seriesGrouping:e,visible:i}){if(!e)return{visibleGroupCount:i?1:0,visibleSameStackCount:i?1:0,index:0};const s=new Set,o=new Set;for(const n of Object.values(this.groups[t]??{}))n.visible&&(s.add(n.grouping.groupIndex),n.grouping.groupIndex===e.groupIndex&&o.add(n.grouping.stackIndex));const a=Array.from(s);return a.sort((n,r)=>n-r),{visibleGroupCount:a.length,visibleSameStackCount:o.size,index:a.indexOf(e.groupIndex)}}}}}),_p,BP=k({"packages/ag-charts-community/src/chart/chartUpdateType.ts"(){"use strict";_p=(t=>(t[t.FULL=0]="FULL",t[t.UPDATE_DATA=1]="UPDATE_DATA",t[t.PROCESS_DATA=2]="PROCESS_DATA",t[t.PERFORM_LAYOUT=3]="PERFORM_LAYOUT",t[t.SERIES_UPDATE=4]="SERIES_UPDATE",t[t.PRE_SCENE_RENDER=5]="PRE_SCENE_RENDER",t[t.SCENE_RENDER=6]="SCENE_RENDER",t[t.NONE=7]="NONE",t))(_p||{})}}),dT,zP=k({"packages/ag-charts-community/src/chart/updateService.ts"(){"use strict";P(),dT=class{constructor(t){this.updateCallback=t,this.events=new Tf}addListener(t,e){return this.events.on(t,e)}removeListener(t,e){return this.events.on(t,e)}destroy(){this.events.clear()}update(t=0,e){this.updateCallback(t,e)}dispatchUpdateComplete(){this.events.emit("update-complete",{type:"update-complete"})}dispatchPreDomUpdate(){this.events.emit("pre-dom-update",{type:"pre-dom-update"})}dispatchPreSceneRender(){this.events.emit("pre-scene-render",{type:"pre-scene-render"})}dispatchProcessData({series:t}){this.events.emit("process-data",{type:"process-data",series:t})}}}}),FP,q8=k({"packages/ag-charts-community/src/chart/chartContext.ts"(){"use strict";DZ(),kZ(),AZ(),i1(),p1(),b9(),hr(),MI(),kI(),L9(),O9(),C1(),z1(),F1(),G1(),j1(),P1(),GI(),P9(),NP(),_R(),$8(),X8(),Z8(),zP(),FP=class{constructor(t,e){this.callbackCache=new A1,this.chartEventManager=new PI,this.highlightManager=new zI,this.layoutManager=new aI,this.localeManager=new y1,this.seriesStateManager=new PP,this.stateManager=new GR,this.seriesLabelLayoutManager=new _P,this.contextModules=[];const{scene:i,root:s,syncManager:o,container:a,fireEvent:n,updateCallback:r,updateMutex:l,styleContainer:c,chartType:h,domMode:u}=e;this.chartService=t,this.syncManager=o,this.domManager=new fI(a,c,u),this.widgets=new $1(this.domManager);const d=this.domManager.addChild("canvas","scene-canvas",i?.canvas.element);this.scene=i??new lm({canvasElement:d}),this.scene.setRoot(s),this.axisManager=new T1(s),this.legendManager=new RP,this.annotationManager=new I1(t.annotationRoot,n),this.chartTypeOriginator=new PR(t),this.interactionManager=new _I,this.contextMenuRegistry=new BI,this.updateService=new dT(r),this.proxyInteractionService=new bI(this.localeManager,this.domManager),this.historyManager=new zR(this.chartEventManager),this.animationManager=new RI(this.interactionManager,l),this.dataService=new cm(this.animationManager),this.tooltipManager=new um(this.localeManager,this.domManager,t.tooltip),this.zoomManager=new uT(n,this.layoutManager);for(const p of Tn.byType("context")){if(!p.chartTypes.includes(h))continue;const g=p.moduleFactory(this);this.contextModules.push(g),this[p.contextKey]=g}}destroy(){this.animationManager.destroy(),this.highlightManager.destroy(),this.axisManager.destroy(),this.callbackCache.invalidateCache(),this.chartEventManager.destroy(),this.domManager.destroy(),this.highlightManager.destroy(),this.proxyInteractionService.destroy(),this.syncManager.destroy(),this.tooltipManager.destroy(),this.zoomManager.destroy(),this.widgets.destroy(),this.contextModules.forEach(t=>t.destroy())}}}}),pT,Q8=k({"packages/ag-charts-community/src/chart/chartHighlight.ts"(){"use strict";ge(),Nt(),pT=class extends Ct{constructor(){super(...arguments),this.range="tooltip"}},v([A(fe(["tooltip","node"],"a range"))],pT.prototype,"range",2)}});function J8(t,e){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}function tq(t,e){if(t==null||e==null)return t===e;if(t.size!==e.size)return!1;for(const[i,s]of t){const o=e.get(i);if(o==null||!J8(s,o))return!1}return!0}function eq(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i+=1){const{type:s,idsMap:o,scopes:a,data:n,...r}=t[i],{type:l,idsMap:c,scopes:h,data:u,...d}=e[i];if(s!==l||a&&h&&!An(a,h)||n&&u&&n!==u||!dr(r,d)||!tq(o,c))return!1}return!0}function iq(t,e){const{props:i,...s}=t,{props:o,...a}=e;return dr(s,a)&&eq(i,o)}function sq(t,e,i,s){return e===t.data&&An(i,t.ids)&&iq(s,t.opts)}var oq=k({"packages/ag-charts-community/src/chart/data/caching.ts"(){"use strict";P(),qt()}}),gT,xl,GP=k({"packages/ag-charts-community/src/chart/data/dataDomain.ts"(){"use strict";gT=class t6{constructor(){this.domain=new Set}static is(e){return e instanceof t6}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},xl=class e6{constructor(){this.domain=[1/0,-1/0]}static is(e){return e instanceof e6}static extendDomain(e,i=[1/0,-1/0]){for(const s of e)typeof s=="number"&&(i[0]>s&&(i[0]=s),i[1]<s&&(i[1]=s));return i}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}}}}),xu,bu,Bn,jP,aq=k({"packages/ag-charts-community/src/chart/data/rangeLookup.ts"(){"use strict";xu=0,bu=1,Bn=2,jP=class{constructor(t){const e=t.reduce((a,n)=>Math.max(a,n.length),0);let s=1<<32-Math.clz32(e);e===s/2&&(s=s>>>1),this.maxLevelSize=s;const o=new Float64Array((s*2-1)*2).fill(NaN);for(const a of t)for(let n=0;n<a.length;n+=1){const r=Number(a[n]),l=s+n-1,c=(l*Bn|0)+xu,h=(l*Bn|0)+bu,u=o[c],d=o[h];(!Number.isFinite(u)||r<u)&&(o[c]=r),(!Number.isFinite(d)||r>d)&&(o[h]=r)}for(let a=s/2|0;a>=1;a=a/2|0){const n=a-1|0,r=n+a|0;for(let l=0;l<a;l+=1){const c=n+l,h=r+l*2,u=h+1,d=o[(h*Bn|0)+xu],p=o[(u*Bn|0)+xu];o[(c*Bn|0)+xu]=!Number.isFinite(p)||d<p?d:p;const g=o[(h*Bn|0)+bu],f=o[(u*Bn|0)+bu];o[(c*Bn|0)+bu]=!Number.isFinite(f)||g>f?g:f}}this.buffer=o}computeRangeInto(t,e,i,s,o,a,n){const r=o+a-1;if(r<e||o>=i)return n;if(o>=e&&r<i){const l=t[(s*Bn|0)+xu],c=t[(s*Bn|0)+bu];Number.isFinite(l)&&(n[0]=Math.min(n[0],l)),Number.isFinite(c)&&(n[1]=Math.max(n[1],c))}else a>1&&(s=s*2|0,a=a/2|0,this.computeRangeInto(t,e,i,s+1|0,o,a,n),this.computeRangeInto(t,e,i,s+2|0,o+a,a,n));return n}rangeBetween(t,e){if(t>e)return[NaN,NaN];const{maxLevelSize:i,buffer:s}=this,o=[1/0,-1/0];return this.computeRangeInto(s,t,e,0,0,i,o),o}get range(){const{buffer:t}=this;return[t[xu],t[bu]]}}}});function nq(t){return t.map(e=>li(e)?JSON.stringify(e):e).join("-")}function Ho(t){const e=t?.map(Number);return e?.every(Number.isFinite)?e:[]}function fT(t,e){return e?.get(t.id)??0}function rq(t){return"scopes"in t&&Array.isArray(t.scopes)}function mT(t,e){const i=[];for(let s=0;s<t;s+=1)i[s]=e;return i}function TS(t,e,i){const s=[];for(const o of t){const a=o.get(e)?.[i];if(a==null)return;s.push(a)}return s}function VP(t){const e=[];let i=0,s;const o=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"|-?\d+)\s*\])\s*)/g;for(;s=o.exec(t);){if(s.index!==i)return;i=s.index+s[0].length;const a=s[1].trim();if(a.startsWith("."))e.push(a.slice(1).trim());else if(a.startsWith("[")){const n=a.slice(1,-1).trim();n.startsWith("'")?e.push(n.slice(1,-1).replace(/(?<!\\)\\'/g,"'")):n.startsWith('"')?e.push(n.slice(1,-1).replace(/(?<!\\)\\"/g,'"')):e.push(n)}else e.push(a)}if(i===t.length)return e}function lq(t){return e=>{let i=e;for(const s of t)i=i[s];return i}}function cq(t){const e=(i,s)=>{s.length>0&&(tt.log(`DataModel.processData() - ${i}`),tt.table(s))};tt.log("DataModel.processData() - processedData",t),e("Key Domains",t.domain.keys),e("Group Domains",t.domain.groups??[]),e("Value Domains",t.domain.values),e("Aggregate Domains",t.domain.aggValues??[])}var yT,xT,Ua=k({"packages/ag-charts-community/src/chart/data/dataModel.ts"(){"use strict";P(),Ui(),GP(),aq(),yT=Symbol("domain-ranges"),xT=class{constructor(t,e="standalone",i=!1){this.opts=t,this.mode=e,this.suppressFieldDotNotation=i,this.debug=ee.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[],this.markScopeDatumInvalid=function(r,l,c,h){for(const u of r)h.has(u)||h.set(u,mT(l.length,!1)),h.get(u)[c]=!0};let s=!0;for(const r of t.props){if(r.type==="key"&&!s)throw new Error("AG Charts - internal config error: keys must come before values.");r.type==="value"&&s&&(s=!1)}const o=({matchGroupIds:r=[]})=>{for(const l of r)if(this.values.every(c=>c.groupId!==l))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${l}).`)},a=new Set,n=new Set;for(const r of t.props){const l=r.type==="key"?a:n;switch(rq(r)&&r.scopes?.forEach(c=>l.add(c)),r.type){case"key":this.keys.push({...r,index:this.keys.length,missing:new Map});break;case"value":if(r.property==null)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(r)}`);this.values.push({...r,index:this.values.length,missing:new Map});break;case"aggregate":o(r),this.aggregates.push({...r,index:this.aggregates.length});break;case"group-value-processor":o(r),this.groupProcessors.push({...r,index:this.groupProcessors.length});break;case"property-value-processor":this.propertyProcessors.push({...r,index:this.propertyProcessors.length});break;case"reducer":this.reducers.push({...r,index:this.reducers.length});break;case"processor":this.processors.push({...r,index:this.processors.length});break}}if(this.opts.groupByKeys||this.opts.groupByFn!=null){const r=new Set(n.values());if(a.forEach(l=>r.delete(l)),r.size>0)throw new Error(`AG Charts - scopes missing key for grouping, illegal configuration: ${[...r.values()]}`)}}resolveProcessedDataDefById(t,e){const i=this.scopeCache.get(t.id)?.get(e);if(!i)throw new Error(`AG Charts - didn't find property definition for [${e}, ${t.id}]`);return{index:i.index,def:i}}resolveProcessedDataIndexById(t,e){return this.resolveProcessedDataDefById(t,e).index}resolveKeysById(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),o=i.keys[s];if(o==null)throw new Error(`AG Charts - didn't find keys for [${e}, ${t.id}]`);return o.get(t.id)}hasColumnById(t,e){return this.scopeCache.get(t.id)?.get(e)!=null}resolveColumnById(t,e,i){const s=this.resolveProcessedDataIndexById(t,e),o=i.columns?.[s];if(o==null)throw new Error(`AG Charts - didn't find column for [${e}, ${t.id}]`);return o}*forEachDatum(t,e,i){const s=e.columnScopes.findIndex(o=>o.has(t.id));for(const o of i.datumIndices[s]??[])yield e.columns[s][o]}*forEachGroupDatum(t,e){const i=e.columnScopes.findIndex(a=>a.has(t.id)),s={groupIndex:0,columnIndex:i},o=[];for(const a of e.groups){s.group=a;let n=0;for(const r of a.datumIndices[i]??o)s.datumIndex=r,s.valueIndex=n++,yield s;s.groupIndex++}}*forEachGroupDatumTuple(t,e){const s={columnIndex:e.columnScopes.findIndex(o=>o.has(t.id)),datumIndexes:[void 0,void 0,void 0]};for(const o of this.forEachGroupDatum(t,e))s.group=s.nextGroup,s.groupIndex=s.nextGroupIndex,s.nextGroup=o.group,s.nextGroupIndex=o.groupIndex,s.datumIndexes[0]=s.datumIndexes[1],s.datumIndexes[1]=s.datumIndexes[2],s.datumIndexes[2]=o.datumIndex,s.group!=null&&s.datumIndexes[1]!=null&&(yield s);s.group=s.nextGroup,s.groupIndex=s.nextGroupIndex,s.nextGroup=void 0,s.nextGroupIndex=void 0,s.datumIndexes[0]=s.datumIndexes[1],s.datumIndexes[1]=s.datumIndexes[2],s.datumIndexes[2]=void 0,s.group!=null&&s.datumIndexes[1]!=null&&(yield s)}getDomain(t,e,i,s){return this.getDomainsByType(i??"value",s)?.[this.resolveProcessedDataIndexById(t,e)]??[]}getDomainBetweenRange(t,e,[i,s],o){const a=e.map(c=>this.resolveProcessedDataIndexById(t,c)),n=a.join(":"),r=o[yT];let l=r.get(n);if(l==null){const c=a.map(h=>o.columns[h]);l=new jP(c),r.set(n,l)}return l.rangeBetween(i,s)}getDomainsByType(t,e){switch(t){case"key":return e.domain.keys;case"value":return e.domain.values;case"aggregate":return e.domain.aggValues;case"group-value-processor":return e.domain.groups;default:return null}}processData(t){const{opts:{groupByKeys:e,groupByFn:i},aggregates:s,groupProcessors:o,reducers:a,processors:n,propertyProcessors:r}=this,l=performance.now();if(e&&this.keys.length===0)return;let c=this.extractData(t);e?c=this.groupData(c):i&&(c=this.groupData(c,i(c))),o.length>0&&c.type==="grouped"&&this.postProcessGroups(c),s.length>0&&c.type==="ungrouped"?this.aggregateUngroupedData(c):s.length>0&&c.type==="grouped"&&this.aggregateGroupedData(c),r.length>0&&this.postProcessProperties(c),a.length>0&&this.reduceData(c),n.length>0&&this.postProcessData(c),this.warnDataMissingProperties(t);const h=performance.now();return c.time=h-l,this.debug.check()&&cq(c),this.processScopeCache(),c}warnDataMissingProperties(t){if(t.size!==0)for(const e of gc(this.keys,this.values))for(const[i,s]of e.missing){if(s<(t.get(i)?.length??1/0))continue;const o=i==null?"":` for ${i}`;tt.warnOnce(`the key '${e.property}' was not found in any data element${o}.`)}}processScopeCache(){this.scopeCache.clear();for(const t of gc(this.keys,this.values,this.aggregates))if(t.idsMap)for(const[e,i]of t.idsMap)for(const s of i)if(!this.scopeCache.has(e))this.scopeCache.set(e,new Map([[s,t]]));else{if(this.scopeCache.get(e)?.has(s))throw new Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(e).set(s,t)}}valueGroupIdxLookup({matchGroupIds:t}){const e=[];for(const[i,s]of this.values.entries())(!t||s.groupId&&t.includes(s.groupId))&&e.push(i);return e}valueIdxLookup(t,e){const i=t==null||t.length===0,s=typeof e=="string"?e:e.id,o=n=>{if(n.idsMap){for(const[r,l]of n.idsMap)if(t?.includes(r)&&l.has(s))return!0}return!1},a=this.values.reduce((n,r,l)=>((r.scopes==null||i&&!r.scopes.length||r.scopes.some(h=>t?.includes(h)))&&(r.property===s||r.id===s||o(r))&&n.push(l),n),[]);if(a.length===0)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(e)} in scope(s) ${JSON.stringify(t)}`);return a}extractData(t){const{dataDomain:e,processValue:i,allScopesHaveSameDefs:s}=this.initDataDomainProcessor(),{keys:o,values:a}=this,{invalidData:n,invalidKeys:r,allKeyMappings:l}=this.extractKeys(o,t,i),{columns:c,columnScopes:h,partialValidDataCount:u,maxDataLength:d}=this.extractValues(n,a,t,r,i),p=g=>{const f=e.get(g),x=f.getDomain();return xl.is(f)&&x[0]>x[1]?[]:x};return{type:"ungrouped",input:{count:d},scopes:new Set(t.keys()),dataSources:t,aggregation:void 0,keys:[...l.values()],columns:c,columnScopes:h,invalidKeys:r,invalidData:n,domain:{keys:o.map(p),values:a.map(p)},defs:{allScopesHaveSameDefs:s,keys:o,values:a},partialValidDataCount:u,time:0,[yT]:new Map}}extractKeys(t,e,i){const s=new Map,o=new Map,a=new Map;let n,r;const l=(c,h)=>{const u=r.get(c);n.set(h,n.get(u)),s.has(u)&&(s.set(h,s.get(u)),o.set(h,o.get(u)))};for(const c of t){const{invalidValue:h,scopes:u}=c;n=new Map,r=new Map,a.set(c,n);for(const d of u??[]){const p=e.get(d)??[];if(r.has(p)){l(p,d);continue}const g=[];n.set(d,g),r.set(p,d);let f,x;for(let y=0;y<p.length;y++){if(p[y]==null||typeof p[y]!="object")continue;const b=i(c,p[y],y,d);if(b.valid){g.push(b.value);continue}g.push(h),f??(f=mT(p.length,!1)),x??(x=mT(p.length,!1)),f[y]=!0,x[y]=!0}f&&x&&(s.set(d,f),o.set(d,x))}}return{invalidData:o,invalidKeys:s,allKeyMappings:a}}extractValues(t,e,i,s,o){let a=0;const n=[],r=[];let l=0;for(const c of e){const{invalidValue:h}=c;if(new Set(c.scopes.map(x=>i.get(x))).size>1)throw new Error(`AG Charts - more than one data source for: ${JSON.stringify(c)}`);const d=new Set(c.scopes),p=lp(c.scopes),g=i.get(p),f=new Array;for(let x=0;x<g.length;x++){if(g[x]==null||typeof g[x]!="object")continue;const y=g[x],b=s.get(p)?.[x],S=o(c,y,x,c.scopes);let M=S.value;(b||!S.valid)&&this.markScopeDatumInvalid(c.scopes,g,x,t),b?M=h:S.valid||(a+=1,M=h),f[x]=M}n.push(f),r.push(d),l=Math.max(l,f.length)}return{columns:n,columnScopes:r,partialValidDataCount:a,maxDataLength:l}}groupData(t,e){var i;const s=new Map,{keys:o,columns:a,columnScopes:n,invalidKeys:r,invalidData:l}=t,c=t.scopes,h=new Set;for(const p of c){const g=a.map((M,D)=>D).filter(M=>!h.has(M)&&n[M].has(p));if(g.length===0)continue;for(const M of g)h.add(M);const f=new Set;for(const M of g)for(const D of n[M])f.add(D);const x=o.map(M=>M.get(p)).filter(M=>M!=null),y=a[lp(g)],b=l?.get(p),S=r?.get(p);for(let M=0;M<y.length;M++){if(S?.[M]===!0)continue;const D=x.map(N=>N[M]);if(D==null||D.length===0)throw new Error("AG Charts - no keys found for scope: "+p);const L=e?.(D)??D,T=nq(L),I=s.get(T)??{keys:L,datumIndices:[],validScopes:c};if(s.has(T)||s.set(T,I),b?.[M]===!0){I.validScopes===c&&(I.validScopes=new Set(c.values()));for(const N of f)I.validScopes.delete(N)}for(const N of g)(i=I.datumIndices)[N]??(i[N]=[]),I.datumIndices[N].push(M)}}const u=[],d=[];for(const{keys:p,datumIndices:g,validScopes:f}of s.values())u.push(p),d.push({datumIndices:g,keys:p,aggregation:[],validScopes:f});return{...t,type:"grouped",domain:{...t.domain,groups:u},groups:d}}aggregateUngroupedData(t){const e=this.aggregates.map(()=>[1/0,-1/0]);t.domain.aggValues=e;const{keys:i,columns:s,dataSources:o}=t,a=lp(o.keys()),n=o.get(a);t.aggregation=n?.map((r,l)=>{const c=[];for(const[h,u]of this.aggregates.entries()){const d=this.valueGroupIdxLookup(u);let p=u.groupAggregateFunction?.()??[1/0,-1/0];const g=d.map(b=>s[b][l]),f=TS(i,a,l),x=f!=null?u.aggregateFunction(g,f):void 0;x&&(p=u.groupAggregateFunction?.(x,p)??xl.extendDomain(x,p));const y=u.finalFunction?.(p)??p;c[h]=y,xl.extendDomain(y,e[h])}return c})}aggregateGroupedData(t){const e=this.aggregates.map(()=>[1/0,-1/0]);t.domain.aggValues=e;const{columns:i}=t;for(const[s,o]of this.aggregates.entries()){const a=this.valueGroupIdxLookup(o);for(const n of t.groups){n.aggregation??(n.aggregation=[]);const r=n.keys;let l=o.groupAggregateFunction?.()??[1/0,-1/0];const c=Math.max(...a.map(u=>n.datumIndices[u]?.length??0));for(let u=0;u<c;u++){const d=a.map(g=>i[g][n.datumIndices[g]?.[u]]),p=o.aggregateFunction(d,r);p&&(l=o.groupAggregateFunction?.(p,l)??xl.extendDomain(p,l))}const h=o.finalFunction?.(l)??l;n.aggregation[s]=h,xl.extendDomain(h,e[s])}}}postProcessGroups(t){const{groupProcessors:e}=this,{columnScopes:i,columns:s,invalidData:o}=t;for(const a of e){const n=this.valueGroupIdxLookup(a),r=a.adjust()();for(const l of t.groups)r(s,n,l);for(const l of n){const h=this.values[l].valueType==="category",u=s[l],d=lp(i[l]),p=o?.get(d),g=h?new gT:new xl;for(let f=0;f<u.length;f+=1)p?.[f]!==!0&&g.extend(u[f]);t.domain.values[l]=g.getDomain()}}}postProcessProperties(t){for(const{adjust:e,property:i,scopes:s}of this.propertyProcessors)for(const o of this.valueIdxLookup(s,i))e()(t,o)}reduceData(t){t.reduced??(t.reduced={});const{dataSources:e,keys:i}=t;for(const s of this.reducers){const o=s.reducer();let a=s.initialValue;if(t.type==="grouped")for(const n of t.groups)a=o(a,n.keys);else{const n=lp(e.keys()),r=i.map(h=>h.get(n)).filter(h=>h!=null),l=r.map(()=>{}),c=e.get(n);for(let h=0;h<c.length;h+=1){for(let u=0;u<l.length;u++)l[u]=r[u]?.[h];a=o(a,l)}}t.reduced[s.property]=a}}postProcessData(t){t.reduced??(t.reduced={});for(const e of this.processors)t.reduced[e.property]=e.calculate(t,t.reduced[e.property])}initDataDomainProcessor(){const{keys:t,values:e}=this,i=new Set;for(const h of e)if(h.scopes)for(const u of h.scopes)i.add(u);const s=new Map,o=new Map;let a=!0;const n=()=>{for(const h of gc(t,e))h.valueType==="category"?s.set(h,new gT):(s.set(h,new xl),a&&(a=(h.scopes??[]).length===i.size))};n();const r=this.buildAccessors(gc(t,e)),l={value:void 0,missing:!1,valid:!1};return{dataDomain:s,processValue:(h,u,d,p)=>{let g,f;if(r.has(h.property)){try{f=r.get(h.property)(u)}catch{}g=f!=null}else g=h.property in u,f=g?u[h.property]:h.missingValue;h.forceValue!=null&&(f=g&&mb(f)?-1*h.forceValue:h.forceValue,g=!0),l.missing=!g;const x="missingValue"in h;if(!g&&!x)if(typeof p=="string"){const y=h.missing.get(p)??0;h.missing.set(p,y+1)}else for(const y of p){const b=h.missing.get(y)??0;h.missing.set(y,b+1)}if(s.has(h)||n(),g&&h.validation?.(f,u,d)===!1)if(l.valid=!1,"invalidValue"in h)f=h.invalidValue;else return this.mode!=="integrated"&&tt.warnOnce(`invalid value of type [${typeof f}] for [${h.scopes} / ${h.id}] ignored:`,`[${f}]`),l.value=void 0,l;else l.valid=!0;if(h.processor){let y=o.get(h);y==null&&(y=h.processor(),o.set(h,y)),f=y(f,d)}return s.get(h)?.extend(f),l.value=f,l},initDataDomain:n,scopes:i,allScopesHaveSameDefs:a}}buildAccessors(t){const e=new Map;if(this.suppressFieldDotNotation)return e;for(const i of t){if(!(i.property.includes(".")||i.property.includes("[")))continue;const o=VP(i.property);if(o==null){tt.warnOnce("Invalid property path [%s]",i.property);continue}const a=lq(o);e.set(i.property,a)}return e}}}}),bT,ST,WP=k({"packages/ag-charts-community/src/chart/data/dataController.ts"(){"use strict";P(),Ui(),oq(),Ua(),bT=class uc{constructor(e,i){this.mode=e,this.suppressFieldDotNotation=i,this.debug=ee.create(!0,"data-model"),this.requested=[],this.status="setup"}async request(e,i,s){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");return new Promise((o,a)=>{this.requested.push({id:e,opts:s,data:i,resolve:o,reject:a})})}execute(e){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);const i=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",i);const s=this.mergeRequested(i);this.debug("DataController.execute() - merged",s),this.debug.check()&&(xe().processedData=[]);const o=[];for(const{data:a,ids:n,opts:r,resolves:l,rejects:c}of s){const h=e?.find(p=>sq(p,a,n,r));let u,d;if(h==null)try{u=new xT(r,this.mode,this.suppressFieldDotNotation);const p=new Map(i.map(g=>[g.id,g.data]));d=u.processData(p)}catch(p){c.forEach(g=>g(p));continue}else({dataModel:u,processedData:d}=h);o.push({opts:r,data:a,ids:n,dataModel:u,processedData:d}),this.debug.check()&&xe("processedData").push(d),d?.partialValidDataCount===0?l.forEach(p=>p({dataModel:u,processedData:d})):d?this.splitResult(u,d,n,l):c.forEach(p=>p(new Error("AG Charts - no processed data generated")))}return o}validateRequests(e){const i=[];for(const[s,o]of e.entries())s>0&&o.data.length!==e[0].data.length&&o.opts.groupByData===!1&&o.opts.groupByKeys===!1?o.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):i.push(o);return i}mergeRequested(e){const i=[];for(const s of e){const o=i.find(uc.groupMatch(s));o?o.push(s):i.push([s])}return i.map(uc.mergeRequests)}splitResult(e,i,s,o){for(let a=0;a<s.length;a++){const n=o[a];n({dataModel:e,processedData:i})}}static groupMatch({data:e,opts:i}){function s(c){return c.filter(h=>h.type==="key").map(h=>h.property).join(";")}const{groupByData:o,groupByKeys:a=!1,groupByFn:n,props:r}=i,l=s(r);return([c])=>(o===!1||c.data===e)&&(c.opts.groupByKeys??!1)===a&&c.opts.groupByFn===n&&s(c.opts.props)===l}static mergeRequests(e){const i=new Set(["key","group-value-processor"]);return e.reduce((s,{id:o,data:a,resolve:n,reject:r,opts:{props:l,...c}})=>{s.ids.push(o),s.rejects.push(r),s.resolves.push(n),s.data??(s.data=a),s.opts??(s.opts={...c,props:[]});for(const h of l){const u={...h,scopes:[o],data:a};uc.createIdsMap(o,u);const d=s.opts.props.find(p=>p.type===u.type&&(i.has(p.type)||p.data===u.data)&&uc.deepEqual(p,u));if(!d){s.opts.props.push(u);continue}d.scopes??(d.scopes=[]),d.scopes.push(...u.scopes??[]),(d.type==="key"||d.type==="value")&&u.idsMap?.size&&uc.mergeIdsMap(u.idsMap,d.idsMap)}return s},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(e,i){for(const[s,o]of e){const a=i.get(s);if(a==null)i.set(s,new Set(o));else for(const n of o)a.add(n)}}static createIdsMap(e,i){i.id!=null&&(i.idsMap??(i.idsMap=new Map),i.idsMap.has(e)?i.idsMap.get(e).add(i.id):i.idsMap.set(e,new Set([i.id])))}static deepEqual(e,i){if(e===i)return!0;if(e&&i&&typeof e=="object"&&typeof i=="object"){if(e.constructor!==i.constructor)return!1;let s,o;if(Array.isArray(e)){if(o=e.length,o!==i.length)return!1;for(s=o-1;s>=0;s--)if(!uc.deepEqual(e[s],i[s]))return!1;return!0}const a=Object.keys(e);if(o=a.length,o!==Object.keys(i).length)return!1;for(s=o-1;s>=0;s--){const n=a[s];if(!uc.skipKeys.has(n)&&(!Object.hasOwn(i,n)||!uc.deepEqual(e[n],i[n])))return!1}return!0}return!1}},bT.skipKeys=new Set(["id","idsMap","type","scopes","data"]),ST=bT}}),UP,Lc,CS=k({"packages/ag-charts-community/src/chart/factory/axisRegistry.ts"(){"use strict";UP=class{constructor(){this.axesMap=new Map,this.themeTemplates=new Map}register(t,e){this.axesMap.set(t,e.moduleFactory),e.themeTemplate&&this.setThemeTemplate(t,e.themeTemplate)}create(t,e){const i=this.axesMap.get(t);if(i)return i(e);throw new Error(`AG Charts - unknown axis type: ${t}`)}has(t){return this.axesMap.has(t)}keys(){return this.axesMap.keys()}setThemeTemplate(t,e){return this.themeTemplates.set(t,e),this}getThemeTemplate(t){return this.themeTemplates.get(t)}},Lc=new UP}});function Su(t){return Rp.find(e=>e.type==="series"&&e.identifier===t)?.chartTypes}function hq(t){return Su(t)?.find(i=>i==="cartesian")==="cartesian"}function uq(t){return Su(t)?.find(i=>i==="polar")==="polar"}function dq(t){return Su(t)?.find(i=>i==="hierarchy")==="hierarchy"}function pq(t){return Su(t)?.find(i=>i==="topology")==="topology"}function gq(t){return Su(t)?.find(i=>i==="flow-proportion")==="flow-proportion"}function fq(t){return Su(t)?.find(i=>i==="standalone")==="standalone"}function mq(t){return Su(t)?.find(i=>i==="gauge")==="gauge"}function yq(t){return t.packageType==="enterprise"}function xq(t){if(!yq(t))throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");const e=Rp.find(i=>i.type===t.type&&("optionsKey"in i&&"optionsKey"in t?i.optionsKey===t.optionsKey:!0)&&("contextKey"in i&&"contextKey"in t?i.contextKey===t.contextKey:!0)&&i.identifier===t.identifier&&t.chartTypes.every(s=>i.chartTypes.includes(s)));return e&&(e.useCount??(e.useCount=0),e.useCount++),e!=null}function bq(){return Rp.filter(({useCount:t})=>t==null||t===0)}var Rp,LS=k({"packages/ag-charts-community/src/chart/factory/expectedEnterpriseModules.ts"(){"use strict";Rp=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"foreground",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsInnerKey:"image"},{type:"root",optionsKey:"chartToolbar",chartTypes:["cartesian"]},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"statusBar",chartTypes:["cartesian"],identifier:"status-bar"},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"root",optionsKey:"ranges",chartTypes:["cartesian"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"]},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bar",community:!0},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"line",community:!0},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"cone-funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"funnel"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"chord"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"sankey"},{type:"series",optionsKey:"series[]",chartTypes:["standalone"],identifier:"pyramid"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"linear-gauge"},{type:"series",optionsKey:"series[]",chartTypes:["gauge"],identifier:"radial-gauge"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"},{type:"context",contextKey:"sharedToolbar",chartTypes:["cartesian"]}]}}),HP,NS,vT=k({"packages/ag-charts-community/src/chart/factory/legendRegistry.ts"(){"use strict";HP=class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(t,{optionsKey:e,moduleFactory:i,themeTemplate:s}){this.legendMap.set(t,{optionsKey:e,moduleFactory:i}),this.themeTemplates.set(e,s)}create(t,e){const i=this.legendMap.get(t)?.moduleFactory;if(i)return i(e);throw new Error(`AG Charts - unknown legend type: ${t}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((t,[e,i])=>(t[e]=i.optionsKey,t),{})}},NS=new HP}}),MT,YP,We,KP,OS,Sm=k({"packages/ag-charts-community/src/chart/factory/chartTypes.ts"(){"use strict";qt(),MT=class extends Map{get(t){return super.get(t)??"unknown"}isCartesian(t){return this.get(t)==="cartesian"}isPolar(t){return this.get(t)==="polar"}isHierarchy(t){return this.get(t)==="hierarchy"}isTopology(t){return this.get(t)==="topology"}isFlowProportion(t){return this.get(t)==="flow-proportion"}isStandalone(t){return this.get(t)==="standalone"}isGauge(t){return this.get(t)==="gauge"}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(t=>this.isCartesian(t))}get polarTypes(){return this.seriesTypes.filter(t=>this.isPolar(t))}get hierarchyTypes(){return this.seriesTypes.filter(t=>this.isHierarchy(t))}get topologyTypes(){return this.seriesTypes.filter(t=>this.isTopology(t))}get flowProportionTypes(){return this.seriesTypes.filter(t=>this.isFlowProportion(t))}get standaloneTypes(){return this.seriesTypes.filter(t=>this.isStandalone(t))}get gaugeTypes(){return this.seriesTypes.filter(t=>this.isGauge(t))}},YP=class extends Map{set(t,e){return super.set(t,Vt(e,this.get(t)))}},We=new MT,KP=new MT,OS=new YP}}),$P,ga,wS=k({"packages/ag-charts-community/src/chart/factory/seriesRegistry.ts"(){"use strict";zo(),qt(),Sm(),$P=class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(t,{chartTypes:[e],moduleFactory:i,tooltipDefaults:s,defaultAxes:o,themeTemplate:a,solo:n,stackable:r,groupable:l,stackedByDefault:c,hidden:h}){this.setThemeTemplate(t,a),this.seriesMap.set(t,{moduleFactory:i,tooltipDefaults:s,defaultAxes:o,solo:n,stackable:r,groupable:l,stackedByDefault:c}),We.set(t,e),h||KP.set(t,e)}create(t,e){const i=this.seriesMap.get(t)?.moduleFactory;if(i)return i(e);throw new Error(`AG Charts - unknown series type: ${t}`)}cloneDefaultAxes(t){const e=this.seriesMap.get(t)?.defaultAxes;return e==null?null:{axes:we(e)}}setThemeTemplate(t,e){const i=this.themeTemplates.get(t);this.themeTemplates.set(t,Vt(e,i))}getThemeTemplate(t){return this.themeTemplates.get(t)}getTooltipDefauls(t){return this.seriesMap.get(t)?.tooltipDefaults}isSolo(t){return this.seriesMap.get(t)?.solo??!1}isGroupable(t){return this.seriesMap.get(t)?.groupable??!1}isStackable(t){return this.seriesMap.get(t)?.stackable??!1}isStackedByDefault(t){return this.seriesMap.get(t)?.stackedByDefault??!1}},ga=new $P}}),ES,XP,Sq=k({"packages/ag-charts-community/src/chart/interaction/syncManager.ts"(){"use strict";kc(),ES=class tp extends fl{constructor(e){super(),this.chart=e}subscribe(e=tp.DEFAULT_GROUP){let i=this.get(e);return i||(i=new Set,tp.chartsGroups.set(e,i)),i.add(this.chart),this}unsubscribe(e=tp.DEFAULT_GROUP){return this.get(e)?.delete(this.chart),this}getChart(){return this.chart}getGroup(e=tp.DEFAULT_GROUP){const i=this.get(e);return i?Array.from(i):[]}getGroupSiblings(e=tp.DEFAULT_GROUP){return this.getGroup(e).filter(i=>i!==this.chart)}get(e){return tp.chartsGroups.get(e)}},ES.chartsGroups=new Map,ES.DEFAULT_GROUP=Symbol("sync-group-default"),XP=ES}}),_S,vq=k({"packages/ag-charts-community/src/chart/keyboard.ts"(){"use strict";ge(),Nt(),_S=class extends Ct{constructor(){super(...arguments),this.enabled=!1}},v([A(bt)],_S.prototype,"enabled",2),v([A(Rt)],_S.prototype,"tabIndex",2)}}),ZP={};mo(ZP,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Ha,fromToMotion:()=>ci,staticFromToMotion:()=>bl});function ci(t,e,i,s,o,a,n){const{fromFn:r,toFn:l,applyFn:c=(g,f)=>g.setProperties(f)}=o,{nodes:h,selections:u}=MS(s),d=(g,f)=>{let x,y=0,b=0;for(const S of f){const M=g[y]===S,D={last:b>=f.length-1,lastLive:y>=g.length-1,prev:f[b-1],prevFromProps:x,prevLive:g[y-1],next:f[b+1],nextLive:g[y+(M?1:0)]},L=`${t}_${e}_${S.id}`;i.stopByAnimationId(L);let T="unknown";M?a&&n&&(T=Mq(S,S.datum,a,n)):T="removed",S.transitionOut=T==="removed";const{phase:I,start:N,finish:O,delay:R,duration:_,...B}=r(S,S.datum,T,D),{phase:W,start:F,finish:z,delay:U,duration:H,...j}=l(S,S.datum,T,D),V=O==null;i.animate({id:L,groupId:t,phase:I??W??"update",duration:_??H,delay:R??U,from:B,to:j,ease:Dp,collapsable:V,onPlay:()=>{const G={...N,...F,...B};c(S,G,"start")},onUpdate(G){c(S,G,"update")},onStop:()=>{const G={...N,...F,...B,...j,...O,...z};c(S,G,"end")}}),M&&y++,b++,x=B}};let p=0;for(const g of u){const f=g.nodes(),x=f.filter(y=>!g.isGarbage(y));d(x,f),i.animate({id:`${t}_${e}_selection_${p}`,groupId:t,phase:"end",from:0,to:1,ease:Dp,onStop(){g.cleanup()}}),p++}d(h,h)}function bl(t,e,i,s,o,a,n){const{nodes:r,selections:l}=MS(s),{start:c,finish:h,phase:u}=n;i.animate({id:`${t}_${e}`,groupId:t,phase:u??"update",from:o,to:a,ease:Dp,onPlay:()=>{if(c){for(const d of r)d.setProperties(c);for(const d of l)for(const p of d.nodes())p.setProperties(c)}},onUpdate(d){for(const p of r)p.setProperties(d);for(const p of l)for(const g of p.nodes())g.setProperties(d)},onStop:()=>{for(const d of r)d.setProperties({...a,...h});for(const d of l){for(const p of d.nodes())p.setProperties({...a,...h});d.cleanup()}}})}function Mq(t,e,i,s){const o=i(t,e);return s.added.has(o)?"added":s.removed.has(o)?"removed":"updated"}var Ha,Ps=k({"packages/ag-charts-community/src/motion/fromToMotion.ts"(){"use strict";cu(),kp(),Ha={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"}}}),qP={};mo(qP,{resetMotion:()=>bs});function bs(t,e){const{nodes:i,selections:s}=MS(t);for(const o of s){for(const a of o.nodes()){const n=e(a,a.datum);a.setProperties(n)}o.cleanup()}for(const o of i){const a=e(o,o.datum);o.setProperties(a)}}var vu=k({"packages/ag-charts-community/src/motion/resetMotion.ts"(){"use strict";cu()}});function Dq(){return A_(()=>{})}function DT(t,e){const i=fc(e);if(i.length===0)return;const s=I_(t);for(const o of i)o in s&&(e[o]=s[o])}var RS,PS,kT,BS,Pp,QP,vm=k({"packages/ag-charts-community/src/util/stateMachine.ts"(){"use strict";Ui(),Hh(),RS="color: green",PS="color: grey",kT=class{transitionRoot(t,e){this.parent?this.parent.transitionRoot(t,e):this.transition(t,e)}},BS=class oa extends kT{constructor(e,i,s){super(),this.defaultState=e,this.states=i,this.enterEach=s,this.debug=ee.create(!0,"animation"),this.state=e,this.debug(`%c${this.constructor.name} | init -> ${e}`,RS)}transition(e,i){if(!this.transitionChild(e,i)||this.state===oa.child||this.state===oa.parent)return;const o=this.state,a=this.states[this.state];let n=a[e];const r=`%c${this.constructor.name} | ${this.state} -> ${e} ->`;if(Array.isArray(n))n=n.find(h=>{if(!h.guard)return!0;const u=h.guard(i);return u||this.debug(`${r} (guarded)`,h.target,PS),u});else if(typeof n=="object"&&!(n instanceof oa)&&n.guard&&!n.guard(i)){this.debug(`${r} (guarded)`,n.target,PS);return}if(!n){this.debug(`${r} ${this.state}`,PS);return}const l=this.getDestinationState(n),c=l===this.state?void 0:a.onExit;this.debug(`${r} ${l}`,RS),this.state=l,typeof n=="function"?n(i):typeof n=="object"&&!(n instanceof oa)&&n.action?.(i),c?.(),this.enterEach?.(o,l),l!==o&&l!==oa.child&&l!==oa.parent&&this.states[l].onEnter?.(o,i)}transitionAsync(e,i){setTimeout(()=>{this.transition(e,i)},0)}is(e){return this.state===oa.child&&this.childState?this.childState.is(e):this.state===e}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(e,i){return this.state!==oa.child||!this.childState||(DT(this,this.childState),this.childState.transition(e,i),!this.childState.is(oa.parent))?!0:(this.debug(`%c${this.constructor.name} | ${this.state} -> ${e} -> ${this.defaultState}`,RS),this.state=this.defaultState,this.states[this.state].onEnter?.(),this.childState.resetHierarchy(),!1)}getDestinationState(e){let i=this.state;return typeof e=="string"?i=e:e instanceof oa?(this.childState=e,this.childState.parent=this,i=oa.child):typeof e=="object"&&(e.target instanceof oa?(this.childState=e.target,this.childState.parent=this,i=oa.child):e.target!=null&&(i=e.target)),i}},BS.child="__child",BS.parent="__parent",Pp=BS,QP=class extends kT{constructor(...t){super(),this.stateMachines=t;for(const e of t)e.parent=this}transition(t,e){for(const i of this.stateMachines)DT(this,i),i.transition(t,e)}transitionAsync(t,e){for(const i of this.stateMachines)DT(this,i),i.transitionAsync(t,e)}}}}),zS,AT=k({"packages/ag-charts-community/src/module/moduleMap.ts"(){"use strict";P(),zS=class{constructor(){this.moduleMap=new Map}*modules(){for(const t of this.moduleMap.values())yield t.moduleInstance}addModule(t,e){if(this.moduleMap.has(t.optionsKey))throw new Error(`AG Charts - module already initialised: ${t.optionsKey}`);this.moduleMap.set(t.optionsKey,{module:t,moduleInstance:e(t)})}removeModule(t){const e=Wi(t)?t:t.optionsKey;this.moduleMap.get(e)?.moduleInstance.destroy(),this.moduleMap.delete(e)}getModule(t){return this.moduleMap.get(Wi(t)?t:t.optionsKey)?.moduleInstance}isEnabled(t){return this.moduleMap.has(Wi(t)?t:t.optionsKey)}mapModules(t){return Array.from(this.moduleMap.values(),(e,i)=>t(e.moduleInstance,i))}destroy(){for(const t of this.moduleMap.keys())this.moduleMap.get(t)?.moduleInstance.destroy();this.moduleMap.clear()}}}}),bi,Nc=k({"packages/ag-charts-community/src/scene/selection.ts"(){"use strict";Ui(),ca(),bi=class ep{constructor(e,i,s=!0){this.parentNode=e,this.autoCleanup=s,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=ee.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(ur,i)?()=>new i:i}static select(e,i,s=!0){return new ep(e,i,s)}static selectAll(e,i){const s=[],o=a=>{i(a)&&s.push(a);for(const n of a.children())o(n)};return o(e),s}static selectByClass(e,...i){return ep.selectAll(e,s=>i.some(o=>s instanceof o))}static selectByTag(e,i){return ep.selectAll(e,s=>s.tag===i)}createNode(e,i,s){const o=this.nodeFactory(e);return o.datum=e,i?.(o),s==null?this._nodes.push(o):this._nodes.splice(s,0,o),this.parentNode.appendChild(o),o}update(e,i,s){if(this.garbageBin.size>0&&this.debug("Selection - update() called with pending garbage",e),s){const o=new Map(e.map((a,n)=>[s(a),[a,n]]));for(const[a,n]of this._nodesMap.entries())if(o.has(n)){const[r]=o.get(n);a.datum=r,this.garbageBin.delete(a),o.delete(n)}else this.garbageBin.add(a);for(const[a,[n,r]]of o.entries())this._nodesMap.set(this.createNode(n,i,r),a)}else{const o=Math.max(e.length,this.data.length);for(let a=0;a<o;a++)a>=e.length?this.garbageBin.add(this._nodes[a]):a>=this._nodes.length?this.createNode(e[a],i):(this._nodes[a].datum=e[a],this.garbageBin.delete(this._nodes[a]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return this.garbageBin.size===0?this:(this._nodes=this._nodes.filter(e=>this.garbageBin.has(e)?(this._nodesMap.delete(e),this.garbageBin.delete(e),e.destroy(),!1):!0),this)}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}each(e){for(const i of this._nodes.entries())e(i[1],i[1].datum,i[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){const i=this._nodes[e];yield{node:i,datum:i.datum,index:e}}}select(e){return ep.selectAll(this.parentNode,e)}selectByClass(e){return ep.selectByClass(this.parentNode,e)}selectByTag(e){return ep.selectByTag(this.parentNode,e)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}get length(){return this._nodes.length}}}}),Yo,Mu=k({"packages/ag-charts-community/src/scene/shape/line.ts"(){"use strict";P(),zA(),Xt(),ca(),Sc(),Yo=class extends ua{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(t){this.x1=t,this.x2=t}set y(t){this.y1=t,this.y2=t}get midPoint(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}}computeBBox(){return new pt(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(t,e){return this.x1===this.x2||this.y1===this.y2?this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(t,e):!1}distanceSquared(t,e){const{x1:i,y1:s,x2:o,y2:a}=this;return em(t,e,i,s,o,a,1/0)}render(t){const{ctx:e,devicePixelRatio:i}=t;let{x1:s,y1:o,x2:a,y2:n}=this;if(s===a){const{strokeWidth:r}=this,l=Math.round(s*i)/i+Math.trunc(r*i)%2/(i*2);s=l,a=l}else if(o===n){const{strokeWidth:r}=this,l=Math.round(o*i)/i+Math.trunc(r*i)%2/(i*2);o=l,n=l}e.beginPath(),e.moveTo(s,o),e.lineTo(a,n),this.fillStroke(e),this.fillShadow?.markClean(),super.render(t)}toSVG(){if(!this.visible)return;const t=os("line");return t.setAttribute("x1",String(this.x1)),t.setAttribute("y1",String(this.y1)),t.setAttribute("x2",String(this.x2)),t.setAttribute("y2",String(this.y2)),this.applySvgStrokeAttributes(t),{elements:[t]}}},Yo.className="Line",Yo.defaultStyles={...ua.defaultStyles,fill:void 0,strokeWidth:1},v([gt()],Yo.prototype,"x1",2),v([gt()],Yo.prototype,"y1",2),v([gt()],Yo.prototype,"x2",2),v([gt()],Yo.prototype,"y2",2)}}),Ya,JP=k({"packages/ag-charts-community/src/scene/shape/range.ts"(){"use strict";Xt(),ca(),Sc(),Ya=class extends ua{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new pt(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(t,e){return!1}render(t){const{ctx:e}=t;let{x1:i,y1:s,x2:o,y2:a}=this;i=this.align(i),s=this.align(s),o=this.align(o),a=this.align(a);const{fill:n,opacity:r,isRange:l}=this;if(!!(l&&n)){const{fillOpacity:f}=this;this.applyFill(e),e.globalAlpha=r*f,e.beginPath(),e.moveTo(i,s),e.lineTo(o,s),e.lineTo(o,a),e.lineTo(i,a),e.closePath(),e.fill()}const{stroke:h,strokeWidth:u,startLine:d,endLine:p}=this;if(!!((d||p)&&h&&u)){const{strokeOpacity:f,lineDash:x,lineDashOffset:y,lineCap:b,lineJoin:S}=this;this.applyStroke(e),e.globalAlpha=r*f,e.lineWidth=u,x&&e.setLineDash(x),y&&(e.lineDashOffset=y),b&&(e.lineCap=b),S&&(e.lineJoin=S),e.beginPath(),d&&(e.moveTo(i,s),e.lineTo(o,s)),p&&(e.moveTo(o,a),e.lineTo(i,a)),e.stroke()}this.fillShadow?.markClean(),super.render(t)}},Ya.className="Range",Ya.defaultStyles={...ua.defaultStyles,strokeWidth:1},v([gt()],Ya.prototype,"x1",2),v([gt()],Ya.prototype,"y1",2),v([gt()],Ya.prototype,"x2",2),v([gt()],Ya.prototype,"y2",2),v([gt()],Ya.prototype,"startLine",2),v([gt()],Ya.prototype,"endLine",2),v([gt()],Ya.prototype,"isRange",2)}});function FS(t){const{parallelFlipRotation:e=0,regularFlipRotation:i=0}=t,s=t.rotation?ke(je(t.rotation)):0,o=!s&&e>=0&&e<=Math.PI?-1:1,a=!s&&i>=0&&i<=Math.PI?-1:1;let n=0;return t.parallel?n=o*Math.PI/2:a===-1&&(n=Math.PI),{configuredRotation:s,defaultRotation:n,parallelFlipFlag:o,regularFlipFlag:a}}function kq(t,e){return t??(e?0:10)}function Aq(t,e,i,s){return t&&!e?i*s===-1?"hanging":"bottom":"middle"}function tB(t,e,i,s,o){const a=e>0&&e<=Math.PI,n=i>0&&i<=Math.PI,r=a||n?-1:1;if(t)if(e||i){if(s*r===-1)return"end"}else return"center";else if(s*o===-1)return"end";return"start"}function Iq(t,e,i,s){const o=[];for(const{tickLabel:a,translationY:n}of t){if(!a)continue;const{width:r,height:l}=s.measureLines(a),c=new pt(e,n,r,l),h=new pt(e,n,0,0);i.transformBBox(h,c);const{x:u,y:d}=c;o.push({point:{x:u,y:d},label:{text:a,width:r,height:l}})}return o}var Ki,Ka=k({"packages/ag-charts-community/src/chart/label.ts"(){"use strict";Xt(),Ci(),ge(),Go(),Nt(),Ki=class extends Ct{constructor(){super(...arguments),this.enabled=!0}getFont(){return Ee.toFontString(this)}},v([A(bt)],Ki.prototype,"enabled",2),v([A(zt,{optional:!0})],Ki.prototype,"color",2),v([A(pr,{optional:!0})],Ki.prototype,"fontStyle",2),v([A(gr,{optional:!0})],Ki.prototype,"fontWeight",2),v([A(lt)],Ki.prototype,"fontSize",2),v([A(it)],Ki.prototype,"fontFamily",2),v([A(Zs,{optional:!0})],Ki.prototype,"formatter",2)}});function Tq(t){return t!=null&&Object.hasOwn(t,"toString")&&Wi(t.toString())}function Cq(t){return t!=null&&Object.hasOwn(t,"valueOf")&&Zt(t.valueOf())}function GS(t){return Zt(t)||op(t)||Cq(t)}function Lq(t,e){return t!=null&&(!e||GS(t))}function IT(t){return Tq(t)&&Object.hasOwn(t,"id")?t.id:t}var Mm=k({"packages/ag-charts-community/src/util/value.ts"(){"use strict";P()}});function eB(t){switch(t.type){case"line":return t.value;case"range":return t.range}}function iB(t,e){if(t==null)return!1;const i=pe.is(e)||vr.is(e),s=o=>Lq(o,i)&&!isNaN(e.convert(o));if(Et(t)){const[o,a]=t;return s(o)&&s(a)}else return s(t)}var jS,sB=k({"packages/ag-charts-community/src/chart/crossline/crossLine.ts"(){"use strict";P(),So(),yu(),Nt(),Mm(),jS=t=>t==="value"?me((e,i)=>i.target.type==="line",e=>e.target.type==="range"?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'"):me((e,i)=>i.target.type==="range",e=>e.target.type==="line"?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'")}});function TT({yDirection:t,padding:e=0,position:i="top",bbox:s}){const o=t?aB:nB,{xTranslationDirection:a,yTranslationDirection:n}=o[i],r=a*(e+s.width/2),l=n*(e+s.height/2);return{xTranslation:r,yTranslation:l}}function oB({yDirection:t,bbox:e,padding:i=0,position:s="top"}){const o={};return s.startsWith("inside")||(s==="top"&&!t?o.top=i+e.height:s==="bottom"&&!t?o.bottom=i+e.height:s==="left"&&t?o.left=i+e.width:s==="right"&&t&&(o.right=i+e.width)),o}var aB,nB,Dm,CT,LT,NT,rB,OT,wT,ET,_T,RT,lB=k({"packages/ag-charts-community/src/chart/crossline/crossLineLabelPosition.ts"(){"use strict";aB={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},"top-left":{xTranslationDirection:1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"bottom-right":{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:1,yTranslationDirection:0},"inside-right":{xTranslationDirection:-1,yTranslationDirection:0},"inside-top":{xTranslationDirection:0,yTranslationDirection:1},"inside-bottom":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-right":{xTranslationDirection:-1,yTranslationDirection:-1}},nB={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},"top-left":{xTranslationDirection:-1,yTranslationDirection:-1},"top-right":{xTranslationDirection:-1,yTranslationDirection:1},"bottom-left":{xTranslationDirection:1,yTranslationDirection:-1},"bottom-right":{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},"inside-left":{xTranslationDirection:0,yTranslationDirection:1},"inside-right":{xTranslationDirection:0,yTranslationDirection:-1},"inside-top":{xTranslationDirection:-1,yTranslationDirection:0},"inside-bottom":{xTranslationDirection:1,yTranslationDirection:0},"inside-top-left":{xTranslationDirection:-1,yTranslationDirection:1},"inside-bottom-left":{xTranslationDirection:1,yTranslationDirection:1},"inside-top-right":{xTranslationDirection:-1,yTranslationDirection:-1},"inside-bottom-right":{xTranslationDirection:1,yTranslationDirection:-1}},Dm=({direction:t,xEnd:e,yStart:i,yEnd:s})=>t==="y"?{x:e/2,y:i}:{x:e,y:isNaN(s)?i:(i+s)/2},CT=({direction:t,xStart:e,xEnd:i,yStart:s,yEnd:o})=>t==="y"?{x:e,y:isNaN(o)?s:(s+o)/2}:{x:i/2,y:s},LT=({direction:t,xEnd:e,yStart:i,yEnd:s})=>t==="y"?{x:e,y:isNaN(s)?i:(i+s)/2}:{x:e/2,y:isNaN(s)?i:s},NT=({direction:t,xStart:e,xEnd:i,yStart:s,yEnd:o})=>t==="y"?{x:i/2,y:isNaN(o)?s:o}:{x:e,y:isNaN(o)?s:(s+o)/2},rB=({xEnd:t,yStart:e,yEnd:i})=>({x:t/2,y:isNaN(i)?e:(e+i)/2}),OT=({direction:t,xStart:e,xEnd:i,yStart:s})=>t==="y"?{x:e/2,y:s}:{x:i,y:s},wT=({direction:t,xStart:e,yStart:i,yEnd:s})=>t==="y"?{x:e,y:isNaN(s)?i:s}:{x:e,y:i},ET=({direction:t,xEnd:e,yStart:i,yEnd:s})=>t==="y"?{x:e,y:i}:{x:e,y:isNaN(s)?i:s},_T=({direction:t,xStart:e,xEnd:i,yStart:s,yEnd:o})=>t==="y"?{x:i,y:isNaN(o)?s:o}:{x:e,y:isNaN(o)?s:o},RT={top:{c:Dm},bottom:{c:NT},left:{c:CT},right:{c:LT},"top-left":{c:OT},"top-right":{c:ET},"bottom-left":{c:wT},"bottom-right":{c:_T},inside:{c:rB},"inside-left":{c:CT},"inside-right":{c:LT},"inside-top":{c:Dm},"inside-bottom":{c:NT},"inside-top-left":{c:OT},"inside-bottom-left":{c:wT},"inside-top-right":{c:ET},"inside-bottom-right":{c:_T}}}}),cB,fa,eo,Nq=k({"packages/ag-charts-community/src/chart/crossline/cartesianCrossLine.ts"(){"use strict";ym(),yu(),Ve(),JP(),Vo(),Bo(),da(),ge(),Nt(),Ka(),sB(),lB(),cB=fe(["top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","inside","inside-left","inside-right","inside-top","inside-bottom","inside-top-left","inside-bottom-left","inside-top-right","inside-bottom-right"],"crossLine label position"),fa=class extends Ct{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}},v([A(bt,{optional:!0})],fa.prototype,"enabled",2),v([A(it,{optional:!0})],fa.prototype,"text",2),v([A(pr,{optional:!0})],fa.prototype,"fontStyle",2),v([A(gr,{optional:!0})],fa.prototype,"fontWeight",2),v([A(lt)],fa.prototype,"fontSize",2),v([A(it)],fa.prototype,"fontFamily",2),v([A(Rt)],fa.prototype,"padding",2),v([A(zt,{optional:!0})],fa.prototype,"color",2),v([A(cB,{optional:!0})],fa.prototype,"position",2),v([A(Rt,{optional:!0})],fa.prototype,"rotation",2),v([A(bt,{optional:!0})],fa.prototype,"parallel",2),eo=class extends Ct{constructor(){super(),this.id=la(this),this.defaultColorRange=[],this.fill="#c16068",this.label=new fa,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.rangeGroup=new It({name:this.id}),this.lineGroup=new It({name:this.id}),this.labelGroup=new It({name:this.id}),this.crossLineRange=new Ya,this.crossLineLabel=new iu,this.labelPoint=void 0,this.data=void 0,this.startLine=!1,this.endLine=!1,this._isRange=void 0,this.lineGroup.append(this.crossLineRange),this.labelGroup.append(this.crossLineLabel),this.crossLineRange.pointerEvents=1}update(t){const{enabled:e,type:i,data:s,scale:o}=this;if(!o||!e||!t||!this.isValid()||!iB(eB(this),o)||s==null){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updateNodes();const a=i==="range";a!==this._isRange&&(a?this.rangeGroup.appendChild(this.crossLineRange):this.lineGroup.appendChild(this.crossLineRange)),this._isRange=a}calculateLayout(t,e){if(!t)return;const{type:i,range:s,value:o,scale:a,gridLength:n,sideFlag:r,direction:l,label:{position:c="top"},clippedRange:h,strokeWidth:u=0}=this;if(this.data=void 0,!a)return;const d=a.bandwidth??0,p=a.step??0,g=(e?-1:1)*(a instanceof Np?(p-d)/2:0),[f,x]=[0,r*n];let y,b,S,M;if(i==="line"){const N=d/2;y=a.convert(o)+N,b=NaN,S=a.convert(o,!0)+N,M=NaN}else if(s){const[N,O]=s,R=N?.valueOf()===O?.valueOf()&&vr.is(a)?d/2+g:0;y=a.convert(N)+R,b=a.convert(O)+d,S=a.convert(N,!0)+R-g,M=a.convert(O,!0)+d+g}else return;S=HI(S,h),M=HI(M,h);const D=(y===S||b===M||S!==M)&&Math.abs(M-S)>0;if(D&&S>M&&([S,M]=[M,S],[y,b]=[b,y]),y-g>=S&&(y-=g),b+g<=M&&(b+=g),this.startLine=u>0&&y>=S&&y<=S+g,this.endLine=u>0&&b>=M-d-g&&b<=M,i==="range"&&!D&&!this.startLine&&!this.endLine||(this.data=[S,M],this.label.enabled===!1||!this.label.text))return;const{c:L=Dm}=RT[c]??{},{x:T,y:I}=L({direction:l,xStart:f,xEnd:x,yStart:S,yEnd:M});this.labelPoint={x:T,y:I}}updateNodes(){this.updateRangeNode();const{label:t}=this;t.enabled!==!1&&t.text&&(this.updateLabel(),this.positionLabel())}updateRangeNode(){const{type:t,crossLineRange:e,sideFlag:i,gridLength:s,data:o,startLine:a,endLine:n,fill:r,fillOpacity:l,stroke:c,strokeWidth:h,lineDash:u}=this;e.x1=0,e.x2=i*s,e.y1=o?.[0]??0,e.y2=o?.[1]??0,e.startLine=a,e.endLine=n,e.isRange=t==="range",e.fill=r,e.fillOpacity=l??1,e.stroke=c,e.strokeWidth=h??1,e.strokeOpacity=this.strokeOpacity??1,e.lineDash=u}updateLabel(){const{crossLineLabel:t,label:e}=this;e.text&&(t.fontStyle=e.fontStyle,t.fontWeight=e.fontWeight,t.fontSize=e.fontSize,t.fontFamily=e.fontFamily,t.fill=e.color,t.text=e.text)}positionLabel(){const{crossLineLabel:t,labelPoint:{x:e=void 0,y:i=void 0}={},label:{parallel:s,rotation:o,position:a="top",padding:n=0},direction:r,parallelFlipRotation:l,regularFlipRotation:c}=this;if(e===void 0||i===void 0)return;const{defaultRotation:h,configuredRotation:u}=FS({rotation:o,parallel:s,regularFlipRotation:c,parallelFlipRotation:l});t.rotation=h+u,t.textBaseline="middle",t.textAlign="center";const d=t.getBBox();if(!d)return;const p=r==="y",{xTranslation:g,yTranslation:f}=TT({yDirection:p,padding:n,position:a,bbox:d});t.translationX=e+g,t.translationY=i+f}computeLabelBBox(){const{label:t}=this;if(t.enabled===!1||!t.text)return;const e=new iu;e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=t.text;const{labelPoint:{x:i=void 0,y:s=void 0}={},label:{parallel:o,rotation:a,position:n="top",padding:r=0},direction:l,parallelFlipRotation:c,regularFlipRotation:h}=this;if(i===void 0||s===void 0)return;const{configuredRotation:u}=FS({rotation:a,parallel:o,regularFlipRotation:h,parallelFlipRotation:c});e.rotation=u,e.textBaseline="middle",e.textAlign="center";const d=e.getBBox();if(!d)return;const p=l==="y",{xTranslation:g,yTranslation:f}=TT({yDirection:p,padding:r,position:n,bbox:d});return e.x=i+g,e.y=s+f,e.getBBox()}calculatePadding(t){const{data:e,direction:i,label:{padding:s=0,position:o="top"}}=this;if(e==null)return;const a=this.computeLabelBBox();if(a?.x==null||a?.y==null)return;const n=oB({yDirection:i==="y",padding:s,position:o,bbox:a});t.left=Math.max(t.left??0,n.left??0),t.right=Math.max(t.right??0,n.right??0),t.top=Math.max(t.top??0,n.top??0),t.bottom=Math.max(t.bottom??0,n.bottom??0)}},eo.className="CrossLine",v([A(bt,{optional:!0})],eo.prototype,"enabled",2),v([A(fe(["range","line"],"a crossLine type"))],eo.prototype,"type",2),v([A(cl(jS("range"),bc.restrict({length:2})),{optional:!0})],eo.prototype,"range",2),v([A(jS("value"),{optional:!0})],eo.prototype,"value",2),v([A(hl)],eo.prototype,"defaultColorRange",2),v([A(zt)],eo.prototype,"fill",2),v([A(le,{optional:!0})],eo.prototype,"fillOpacity",2),v([A(zt,{optional:!0})],eo.prototype,"stroke",2),v([A(Rt,{optional:!0})],eo.prototype,"strokeWidth",2),v([A(le,{optional:!0})],eo.prototype,"strokeOpacity",2),v([A(Nn,{optional:!0})],eo.prototype,"lineDash",2),v([A(ct)],eo.prototype,"label",2)}}),hB,uB,km,Oq=k({"packages/ag-charts-community/src/chart/axis/axisGridLine.ts"(){"use strict";P(),Nt(),hB=["stroke","lineDash"],uB=Hi(t=>li(t)&&Object.keys(t).every(e=>hB.includes(e)),"objects with gridline style properties such as 'stroke' or 'lineDash'"),km=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}},v([A(bt)],km.prototype,"enabled",2),v([A(lt)],km.prototype,"width",2),v([A(uB)],km.prototype,"style",2)}}),PT,Oc,BT=k({"packages/ag-charts-community/src/chart/axis/axisInterval.ts"(){"use strict";P(),ge(),Lp(),Nt(),PT=me(t=>Zt(t)&&t>0||t instanceof Tc,"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),Oc=class extends Ct{},v([A(PT,{optional:!0})],Oc.prototype,"step",2),v([A(bc,{optional:!0})],Oc.prototype,"values",2),v([A(PA,{optional:!0})],Oc.prototype,"minSpacing",2),v([A(BA,{optional:!0})],Oc.prototype,"maxSpacing",2)}}),$i,VS=k({"packages/ag-charts-community/src/chart/axis/axisLabel.ts"(){"use strict";ge(),Go(),Nt(),$i=class extends Ct{constructor(){super(...arguments),this.enabled=!0,this.spacing=5,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}getFont(){return Ee.toFontString(this)}},v([A(bt)],$i.prototype,"enabled",2),v([A(pr,{optional:!0})],$i.prototype,"fontStyle",2),v([A(gr,{optional:!0})],$i.prototype,"fontWeight",2),v([A(Rt.restrict({min:1}))],$i.prototype,"fontSize",2),v([A(it)],$i.prototype,"fontFamily",2),v([A(lt)],$i.prototype,"spacing",2),v([A($f,{optional:!0})],$i.prototype,"minSpacing",2),v([A(zt,{optional:!0})],$i.prototype,"color",2),v([A(Rt,{optional:!0})],$i.prototype,"rotation",2),v([A(bt)],$i.prototype,"avoidCollisions",2),v([A(bt)],$i.prototype,"mirrored",2),v([A(bt)],$i.prototype,"parallel",2),v([A(Zs,{optional:!0})],$i.prototype,"itemStyler",2),v([A(Zs,{optional:!0})],$i.prototype,"formatter",2),v([A(it,{optional:!0})],$i.prototype,"format",2)}}),Am,wq=k({"packages/ag-charts-community/src/chart/axis/axisLine.ts"(){"use strict";Nt(),Am=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}},v([A(bt)],Am.prototype,"enabled",2),v([A(lt)],Am.prototype,"width",2),v([A(zt,{optional:!0})],Am.prototype,"stroke",2)}}),Du,dB=k({"packages/ag-charts-community/src/chart/axis/axisTick.ts"(){"use strict";ge(),Nt(),Du=class extends Ct{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}},v([A(bt)],Du.prototype,"enabled",2),v([A(lt)],Du.prototype,"width",2),v([A(lt)],Du.prototype,"size",2),v([A(zt,{optional:!0})],Du.prototype,"stroke",2)}}),$a,Eq=k({"packages/ag-charts-community/src/chart/axis/axisTitle.ts"(){"use strict";ge(),Nt(),su(),$a=class extends Ct{constructor(){super(...arguments),this.caption=new _e,this.enabled=!1,this.spacing=_e.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}},v([A(bt)],$a.prototype,"enabled",2),v([A(it,{optional:!0})],$a.prototype,"text",2),v([A(lt,{optional:!0})],$a.prototype,"spacing",2),v([A(pr,{optional:!0})],$a.prototype,"fontStyle",2),v([A(gr,{optional:!0})],$a.prototype,"fontWeight",2),v([A(lt)],$a.prototype,"fontSize",2),v([A(it)],$a.prototype,"fontFamily",2),v([A(zt,{optional:!0})],$a.prototype,"color",2),v([A(Qf)],$a.prototype,"wrapping",2),v([A(Zs,{optional:!0})],$a.prototype,"formatter",2)}});function WS(t){const[e,i]=Li(t.range),s=Math.floor(e),o=Math.ceil(i);return{min:s,max:o,visible:s!==o}}function _q(t,e){return Math.abs(e-t)<mB?e:t>e?e+US:e-US}function pB(t){const e=(n,r)=>{const[l=t.min,c=t.max]=Li(r??[]);return n<l||n>c};return{tick:{fromFn(n,r,l){let c=n.y1+n.translationY,h=n.opacity;return(l==="added"||e(n.datum.translationY,n.datum.range))&&(c=r.translationY,h=0),{y:0,translationY:c,opacity:h,phase:Ha[l]}},toFn(n,r,l){const c=r.translationY;let h=1;return l==="removed"&&(h=0),{y:0,translationY:c,opacity:h,finish:{y:c,translationY:0}}},applyFn(n,r){n.setProperties(r),n.visible=!e(n.y)}},line:{fromFn(n,r){return{...n.previousDatum??r,phase:Ha.updated}},toFn(n,r){return{...r}}},label:{fromFn(n,r,l){const c=n.previousDatum??r,h=c.x,u=c.y,d=c.rotationCenterX;let p=Math.round(n.translationY),g=c.rotation,f=n.opacity;return l==="removed"||e(c.y,c.range)?g=r.rotation:(l==="added"||e(n.datum.y,n.datum.range))&&(p=Math.round(c.translationY),f=0,g=r.rotation),{x:h,y:u,rotationCenterX:d,translationY:p,rotation:g,opacity:f,phase:Ha[l]}},toFn(n,r,l){const c=r.x,h=r.y,u=r.rotationCenterX,d=Math.round(r.translationY);let p=0,g=1;return l==="added"?p=r.rotation:l==="removed"?(g=0,p=r.rotation):p=_q(n.previousDatum?.rotation??r.rotation,r.rotation),{x:c,y:h,rotationCenterX:u,translationY:d,rotation:p,opacity:g,finish:{rotation:r.rotation}}}},group:{fromFn(n,r){const{rotation:l,translationX:c,translationY:h}=n;return{rotation:l,translationX:c,translationY:h,phase:Ha.updated}},toFn(n,r){const{rotation:l,translationX:c,translationY:h}=r;return{rotation:l,translationX:c,translationY:h}}}}}function gB(){return(t,e)=>({rotation:e.rotation,rotationCenterX:e.rotationCenterX,rotationCenterY:e.rotationCenterY,translationX:e.translationX,translationY:e.translationY})}function zT(t){const{visible:e,min:i,max:s}=t;return(o,a)=>{const n=a.translationY,r=e&&n>=i&&n<=s;return{y:n,translationY:0,opacity:1,visible:r}}}function FT(){return(t,e)=>({x:e.x,y:e.y,translationY:e.translationY,rotation:e.rotation,rotationCenterX:e.rotationCenterX})}function fB(){return(t,e)=>({...e})}var GT,US,mB,jT=k({"packages/ag-charts-community/src/chart/axis/axisUtil.ts"(){"use strict";Ps(),da(),GT=(t=>(t[t.TickAndDomain=0]="TickAndDomain",t[t.TicksOnly=1]="TicksOnly",t[t.Off=2]="Off",t))(GT||{}),US=Math.PI*2,mB=US/2}}),Im,VT,Mr,HS,WT=k({"packages/ag-charts-community/src/chart/axis/axis.ts"(){"use strict";P(),AT(),So(),yu(),Xt(),Ve(),VA(),Nc(),Mu(),Vo(),ms(),Ci(),Ac(),Bo(),da(),qt(),bo(),Nt(),Nq(),Oq(),BT(),VS(),wq(),dB(),Eq(),Im=class extends Qh(Yo){},VT=(t=>(t[t.TickLines=0]="TickLines",t[t.AxisLine=1]="AxisLine",t[t.TickLabels=2]="TickLabels",t))(VT||{}),Mr=class i6{constructor(e,i){this.moduleCtx=e,this.scale=i,this.id=la(this),this.nice=!0,this.reverse=!1,this.keys=[],this.interval=new Oc,this.dataDomain={domain:[],clipped:!1},this.layoutConstraints={stacked:!0,align:"start",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new xp({name:`${this.id}-axis`}),this.tickLineGroup=this.axisGroup.appendChild(new It({name:`${this.id}-Axis-tick-lines`,zIndex:0})),this.tickLabelGroup=this.axisGroup.appendChild(new It({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.labelGroup=new It({name:`${this.id}-Labels`,zIndex:9}),this.gridGroup=new xp({name:`${this.id}-Axis-grid`,zIndex:1}),this.gridLineGroup=this.gridGroup.appendChild(new It({name:`${this.id}-gridLines`})),this.crossLineRangeGroup=new xp({name:`${this.id}-CrossLines-Range`,zIndex:4}),this.crossLineLineGroup=new xp({name:`${this.id}-CrossLines-Line`,zIndex:8}),this.crossLineLabelGroup=new xp({name:`${this.id}-CrossLines-Label`,zIndex:13}),this.tickLineGroupSelection=bi.select(this.tickLineGroup,Im,!1),this.tickLabelGroupSelection=bi.select(this.tickLabelGroup,iu,!1),this.gridLineGroupSelection=bi.select(this.gridLineGroup,Im,!1),this._crossLines=[],this.line=new Am,this.tick=new Du,this.gridLine=new km,this.label=this.createLabel(),this.defaultTickMinSpacing=i6.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,spacing:this.label.spacing,format:this.label.format}},this.axisContext=void 0,this.labelFormatter=void 0,this.datumFormatter=void 0,this.scaleFormatterParams=void 0,this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new $a,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.animatable=!0,this._scaleNiceDomainInputDomain=void 0,this._scaleNiceDomainRangeExtent=NaN,this.moduleMap=new zS,this.range=this.scale.range.slice(),this.crossLines.forEach(s=>this.initCrossLine(s))}get type(){return this.constructor.type??""}get labelNodes(){return this.tickLabelGroupSelection.nodes()}set crossLines(e){const{CrossLineConstructor:i}=this.constructor;this._crossLines.forEach(s=>this.detachCrossLine(s)),this._crossLines=e.map(s=>{const o=new i;return o.set(s),o}),this._crossLines.forEach(s=>{this.attachCrossLine(s),this.initCrossLine(s)})}get crossLines(){return this._crossLines}resetAnimation(e){}attachCrossLine(e){this.crossLineRangeGroup.appendChild(e.rangeGroup),this.crossLineLineGroup.appendChild(e.lineGroup),this.crossLineLabelGroup.appendChild(e.labelGroup)}detachCrossLine(e){this.crossLineRangeGroup.removeChild(e.rangeGroup),this.crossLineLineGroup.removeChild(e.lineGroup),this.crossLineLabelGroup.removeChild(e.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(e=>e())}updateScale(){const{range:e,visibleRange:i,scale:s}=this,o=(e[1]-e[0])/(i[1]-i[0]),a=o*i[0],n=e[0]-a;s.range=[n,n+o],this.crossLines.forEach(r=>{r.clippedRange=[e[0],e[1]]})}setCrossLinesVisible(e){this.crossLineRangeGroup.visible=e,this.crossLineLineGroup.visible=e,this.crossLineLabelGroup.visible=e}attachAxis(e){e.gridNode.appendChild(this.gridGroup),e.axisNode.appendChild(this.axisGroup),e.labelNode.appendChild(this.labelGroup),e.crossLineRangeNode.appendChild(this.crossLineRangeGroup),e.crossLineLineNode.appendChild(this.crossLineLineGroup),e.crossLineLabelNode.appendChild(this.crossLineLabelGroup)}detachAxis(e){e.gridNode.removeChild(this.gridGroup),e.axisNode.removeChild(this.axisGroup),e.labelNode.removeChild(this.labelGroup),e.crossLineRangeNode.removeChild(this.crossLineRangeGroup),e.crossLineLineNode.removeChild(this.crossLineLineGroup),e.crossLineLabelNode.removeChild(this.crossLineLabelGroup)}attachLabel(e){this.labelGroup.append(e)}inRange(e,i=0){const[s,o]=Li(this.range);return e>=s-i&&e<=o+i}getRangeOverflow(e){const{range:i,visibleRange:s}=this,o=(i[1]-i[0])/(s[1]-s[0]),[a,n]=Li([i[0]-o*s[0],i[0]-o*s[0]+o]);return e<a?e-a:e>n?e-n:0}defaultDatumFormatter(e,i){return ml(e,i+1)}defaultLabelFormatter(e,i){return ml(e,i)}onGridLengthChange(e,i){i^e&&this.onGridVisibilityChange(),this.crossLines.forEach(s=>this.initCrossLine(s))}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}createLabel(){return new $i}update(){this.updatePosition(),this.updateSelections(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled,this.updateLabels(),this.updateGridLines(),this.updateTickLines(),this.updateCrossLines()}getAxisLineCoordinates(){const[e,i]=Li(this.range);return{x:0,y1:e,y2:i}}getLabelStyles(e,i){const{label:s}=this,o={color:s.color,spacing:s.spacing,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight};let a;s.itemStyler&&(a=this.moduleCtx.callbackCache.call(this,s.itemStyler,{...e,...o}));const{color:n,fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,spacing:u}=Vt(a,i,o);return{fill:n,fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,spacing:u}}getTickSize(){return this.tick.enabled?this.tick.size:0}processData(){const{includeInvisibleDomains:e,boundSeries:i,direction:s}=this,a=(e?i:i.filter(n=>n.isEnabled())).map(n=>n.getDomain(s));this.setDomains(...a)}setDomains(...e){let i,s;e.length>0?{domain:i,animatable:s}=this.scale.normalizeDomains(...e):(i=[],s=!0),this.dataDomain=this.normaliseDataDomain(i),this.reverse&&this.dataDomain.domain.reverse(),this.animatable=s}calculateLayout(e){const{scale:i,label:s,visibleRange:o,nice:a}=this;this.updateScale();const n=Ip(this.range),r=this.dataDomain.domain;let l;o[0]===0&&o[1]===1?l=void 0:a?this._scaleNiceDomainInputDomain===r&&this._scaleNiceDomainRangeExtent===n?l=this.scale.domain:l=this.calculateTickLayout(r,0,[0,1]).niceDomain:l=r;let c;a?l==null?c=0:c=1:c=2;const{niceDomain:h,primaryTickCount:u,ticks:d,tickDomain:p,fractionDigits:g,bbox:f}=this.calculateTickLayout(l??r,c,o,e);this.scale.domain=h,this._scaleNiceDomainInputDomain=a?r:void 0,this._scaleNiceDomainRangeExtent=a?n:NaN;const x=s.format;this.labelFormatter=i.tickFormatter({domain:p,specifier:x,ticks:d,fractionDigits:g})??(L=>this.defaultLabelFormatter(L,g)),this.datumFormatter=i.datumFormatter({domain:p,specifier:x,ticks:d,fractionDigits:g})??(L=>this.defaultDatumFormatter(L,g)),this.scaleFormatterParams={domain:p,ticks:d,fractionDigits:g},this.layout.label={fractionDigits:g,spacing:this.label.spacing,format:this.label.format};const y=s.getSideFlag(),b=this.isAnySeriesActive(),{rotation:S,parallelFlipRotation:M,regularFlipRotation:D}=this.calculateRotations();return this.crossLines.forEach(L=>{var T;L.sideFlag=-y,L.direction=S===-Math.PI/2?"x":"y",L instanceof eo&&((T=L.label).parallel??(T.parallel=s.parallel)),L.parallelFlipRotation=M,L.regularFlipRotation=D,L.calculateLayout?.(b,this.reverse)}),{primaryTickCount:u,bbox:f}}getTransformBox(e){const i=new Wa,{rotation:s,translationX:o,translationY:a}=this.getAxisTransform();return Wa.updateTransformMatrix(i,1,1,s,o,a),i.transformBBox(e)}calculateRotations(){const e=je(this.rotation),i=ke(e),s=ke(e-Math.PI/2);return{rotation:e,parallelFlipRotation:i,regularFlipRotation:s}}updateCrossLines(){const e=this.isAnySeriesActive();this.crossLines.forEach(i=>{i.update(e)})}updateTickLines(){const{tick:e,label:i}=this,s=i.getSideFlag();this.tickLineGroupSelection.each((o,a)=>{o.strokeWidth=a.tickWidth??e.width,o.stroke=a.tickStroke??e.stroke,o.x1=s*(a.tickSize??this.getTickSize()),o.x2=0})}getAxisTransform(){return{rotation:je(this.rotation),translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){const{crossLineRangeGroup:e,crossLineLineGroup:i,crossLineLabelGroup:s,gridGroup:o,translation:a}=this,{rotation:n}=this.calculateRotations(),r=Math.floor(a.x),l=Math.floor(a.y);e.setProperties({rotation:n,translationX:r,translationY:l}),i.setProperties({rotation:n,translationX:r,translationY:l}),s.setProperties({rotation:n,translationX:r,translationY:l}),o.setProperties({rotation:n,translationX:r,translationY:l})}updateGridLines(){const e=this.label.getSideFlag(),{gridLine:{style:i,width:s},gridPadding:o,gridLength:a}=this;a===0||i.length===0||this.gridLineGroupSelection.each((n,r,l)=>{const{stroke:c,lineDash:h}=i[l%i.length];n.setProperties({x1:o,x2:-e*a+o,stroke:c,strokeWidth:s,lineDash:h})})}formatTick(e,i,s,o,a){const{labelFormatter:n,label:{formatter:r},moduleCtx:{callbackCache:l}}=this;let c;if(r){const h=this.getFormatterBoundSeries();c=l.call(this,r,{value:e,index:i,domain:s,fractionDigits:o,boundSeries:h})}else a?c=a(e):n&&(c=n(e));return String(c??e)}formatDatum(e){const{label:{formatter:i},moduleCtx:{callbackCache:s},datumFormatter:o=this.labelFormatter}=this;let a;if(i){const{domain:n}=this.scale,r=this.getFormatterBoundSeries();a=s.call(this,i,{value:e,index:NaN,domain:n,boundSeries:r})}else o?a=s.call(this,o,e):Et(e)&&(a=e.filter(Boolean).join(" - "));return String(a??e)}getScaleValueFormatter(e){const{scaleFormatterParams:i}=this;let s;try{e!=null&&i!=null&&(s=this.scale.tickFormatter({...i,specifier:e}))}catch{tt.warnOnce(`the format string ${e} is invalid, ignoring.`)}return s??(s=o=>this.formatDatum(o)),s}getBBox(){return this.axisGroup.getBBox()}initCrossLine(e){e.scale=this.scale,e.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(e=>this.includeInvisibleDomains||e.isEnabled())}clipTickLines(e,i,s,o){this.tickLineGroup.setClipRect(new pt(e,i,s,o))}clipGrid(e,i,s,o){this.gridGroup.setClipRect(new pt(e,i,s,o))}getFormatterBoundSeries(){const{direction:e}=this,i=[];for(const s of this.boundSeries){const o=s.getKeys(e),a=s.getNames(e);for(let n=0;n<o.length;n++)i.push({key:o[n],name:a[n]})}return i}getTitleFormatterParams(e){const{direction:i}=this,s=this.getFormatterBoundSeries();return{domain:e,direction:i,boundSeries:s,defaultValue:this.title?.text}}normaliseDataDomain(e){return{domain:[...e],clipped:!1}}getLayoutState(){return{id:this.id,rect:this.getBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale,...this.layout}}getModuleMap(){return this.moduleMap}createModuleContext(){return this.axisContext??(this.axisContext=this.createAxisContext()),{...this.moduleCtx,parent:this.axisContext}}createAxisContext(){const{scale:e}=this;return{axisId:this.id,scale:this.scale,direction:this.direction,continuous:pe.is(e)||vr.is(e),getCanvasBounds:()=>Ke.toCanvas(this.axisGroup),seriesKeyProperties:()=>this.boundSeries.reduce((i,s)=>(s.getKeyProperties(this.direction).forEach(a=>i.add(a)),i),new Set),seriesIds:()=>this.boundSeries.map(i=>i.id),scaleValueFormatter:i=>this.getScaleValueFormatter(i),scaleInvert:i=>e.invert(i,!0),scaleInvertNearest:i=>e.invert(i,!0),attachLabel:i=>this.attachLabel(i),inRange:(i,s)=>this.inRange(i,s),getRangeOverflow:i=>this.getRangeOverflow(i)}}isReversed(){return this.reverse}},Mr.defaultTickMinSpacing=50,Mr.CrossLineConstructor=eo,v([A(bt)],Mr.prototype,"nice",2),v([A(bt)],Mr.prototype,"reverse",2),v([A(EA)],Mr.prototype,"keys",2),v([A(ct)],Mr.prototype,"interval",2),v([A(ct)],Mr.prototype,"title",2),v([Dc((t,e,i)=>t.onGridLengthChange(e,i))],Mr.prototype,"gridLength",2),HS=Mr}});function Rq(t,e,i){let[s,o]=Li(t);s=Pq(Math.floor(s),o,e);const a=zq(s,o,e),n=e-1;o=s+n*a;const r=i?[o,s]:[s,o],l=Bq(s,a,e);return{domain:r,ticks:l}}function Pq(t,e,i){const s=Math.abs(e-t)/(i-1),o=Math.floor(Math.log10(s)),a=Math.pow(10,o);return Math.floor(t/a)*a}function Bq(t,e,i){const s=Math.floor(Math.log10(e)),o=e>0&&e<1?Math.abs(s):0,a=Math.pow(10,o),n=[];for(let r=0;r<i;r++){const l=t+e*r;n[r]=Math.round(l*a)/a}return n}function zq(t,e,i){const s=i-1,o=(e-t)/s;return Fq(o)}function Fq(t){const e=Math.floor(Math.log10(t)),i=Math.pow(10,e),s=t/i*10;return s>0&&s<=1?i/10:s>1&&s<=2?2*i/10:s>1&&s<=5?5*i/10:s>5&&s<=10?10*i/10:s>10&&s<=20?20*i/10:s>20&&s<=40?40*i/10:s>40&&s<=50?50*i/10:s>50&&s<=100?100*i/10:s}var Gq=k({"packages/ag-charts-community/src/util/secondaryAxisTicks.ts"(){"use strict";da()}});function UT(){const t=new Map;return e=>{const i=t.get(e);return i?(t.set(e,i+1),`${e}_${i}`):(t.set(e,1),e)}}var HT=k({"packages/ag-charts-community/src/util/tempUtils.ts"(){"use strict"}}),YT,yB=k({"packages/ag-charts-community/src/chart/axis/axisTickGenerator.ts"(){"use strict";P(),So(),yu(),VA(),EP(),Ci(),da(),Gq(),HT(),Go(),mu(),Ka(),YT=class{constructor(t){this.axis=t}estimateTickCount(t,e,i){return vP(Ip(this.axis.range),Ip(t),e,i,pe.defaultTickCount,this.axis.defaultTickMinSpacing)}filterTicks(t,e){const{minSpacing:i,maxSpacing:s}=this.axis.interval,a=i!=null||s!=null?Math.ceil(t.length/e):2,n=t.length%a?-1:0;return t.filter((r,l)=>(l+n)%a===0)}generateTicks({domain:t,primaryTickCount:e,visibleRange:i,niceMode:s,parallelFlipRotation:o,regularFlipRotation:a,labelX:n,sideFlag:r}){const{scale:l,label:c,interval:{minSpacing:h,maxSpacing:u}}=this.axis,{parallel:d,rotation:p,fontFamily:g,fontSize:f,fontStyle:x,fontWeight:y}=c,b=e!==void 0,{defaultRotation:S,configuredRotation:M,parallelFlipFlag:D,regularFlipFlag:L}=FS({rotation:p,parallel:d,regularFlipRotation:a,parallelFlipRotation:o}),T=M+S,I=new Wa,{maxTickCount:N}=this.estimateTickCount(i,h,u),R=!(pe.is(l)||vr.is(l))||isNaN(N)?10:N;let _=tB(d,M,0,r,L);const B=Aq(d,M,r,D),W=Ee.toFontString({fontFamily:g,fontSize:f,fontStyle:x,fontWeight:y}),F=yr.getMeasurer({font:W}),z={fontFamily:g,fontSize:f,fontStyle:x,fontWeight:y,textBaseline:B,textAlign:_},U=c.enabled&&c.avoidCollisions,H=({ticks:Q},q)=>{if(!U)return!1;const J=M!==0||q!==0,X=T+q,st=kq(c.minSpacing,J);Wa.updateTransformMatrix(I,1,1,X,0,0);const nt=Iq(Q,n,I,F);return K8(nt,st)};let j={tickDomain:[],ticks:[],rawTicks:[],fractionDigits:0,niceDomain:void 0},V=0,G=0,K=!0,$=!1;for(;!$&&K&&V<=R;){G=0;for(const Q of this.getTickStrategies({domain:t,niceMode:s,secondaryAxis:b,index:V}))({tickData:j,index:V,autoRotation:G,terminate:$}=Q({index:V,tickData:j,textProps:z,terminate:$,primaryTickCount:e,visibleRange:i,get labelOverlap(){return H(j,G)}}));K=H(j,G)}_=tB(d,M,G,r,L);const Z=S+M+G;return!b&&j.rawTicks.length>0&&(e=j.rawTicks.length),{tickData:j,primaryTickCount:e,combinedRotation:Z,textBaseline:B,textAlign:_}}getTickStrategies({domain:t,niceMode:e,index:i,secondaryAxis:s}){const{scale:o,label:a,interval:n}=this.axis,{minSpacing:r}=n,l=pe.is(o)||vr.is(o),c=a.enabled&&a.avoidCollisions,h=!l&&i!==0&&c,u=a.autoRotate===!0&&a.rotation===void 0,d=[];let p;n.values?p=3:s?p=1:h?p=2:p=0;const g=({index:f,tickData:x,primaryTickCount:y,visibleRange:b,terminate:S})=>this.createTickData(t,e,b,y,p,f,x,S);if(d.push(g),!l&&r!=null){const f=({index:x,tickData:y,primaryTickCount:b,visibleRange:S,terminate:M})=>this.createTickData(t,e,S,b,2,x,y,M);d.push(f)}if(c&&u){const f=({index:x,tickData:y,labelOverlap:b,terminate:S})=>({index:x,tickData:y,autoRotation:b?ke(je(a.autoRotateAngle??0)):0,terminate:S});d.push(f)}return d}createTickData(t,e,i,s,o,a,n,r){const{scale:l,interval:c}=this.axis,{step:h,values:u,minSpacing:d,maxSpacing:p}=c,{maxTickCount:g,minTickCount:f,tickCount:x}=this.estimateTickCount(i,d,p),y=pe.is(l)||vr.is(l),b=!y||isNaN(g)?10:g,S=D=>y?Math.max(x-D,f):g,M=h==null&&u==null&&S(a)>f&&(y||o===2);for(;a<=b;){const D=n.rawTicks;if(n=this.getTicks({domain:t,niceMode:e,visibleRange:i,tickGenerationType:o,previousTicks:D,minTickCount:f,maxTickCount:g,primaryTickCount:s,tickCount:S(a)}),a++,!M||!An(n.rawTicks,D))break}return r||(r=h!=null||u!=null),{tickData:n,index:a,autoRotation:0,terminate:r}}getTicks({domain:t,niceMode:e,visibleRange:i,tickGenerationType:s,previousTicks:o,tickCount:a,minTickCount:n,maxTickCount:r,primaryTickCount:l}){const{axis:c}=this,{label:h,range:u,scale:d,interval:p}=c,g=UT(),f={nice:e===0,interval:p.step,tickCount:a,minTickCount:n,maxTickCount:r},x={...f,nice:e===0||e===1};let y=e===0?d.niceDomain(f,t):t,b=y,S;switch(s){case 3:if(b=p.values,S=p.values,pe.is(d)){const[O,R]=Li(y.map(Number));S=S.filter(_=>Number(_)>=O&&Number(_)<=R).sort((_,B)=>Number(_)-Number(B))}break;case 1:if(pe.is(d)){const O=Rq(t.map(Number),l??0,c.reverse);S=O.ticks,y=O.domain.map(R=>d.toDomain(R))}else S=d.ticks(x,y,i)??[];break;case 2:S=this.filterTicks(o,a);break;default:S=d.ticks(x,y,i)??[]}const M=S.reduce((O,R)=>Math.max(O,typeof R=="number"?yb(R):0),0),D={domain:b,ticks:S,fractionDigits:M,specifier:h.format},L=d.tickFormatter(D),T=d.domain;d.domain=y;const I=(d.bandwidth??0)/2,N=[];for(let O=0;O<S.length;O++){const R=S[O],_=d.convert(R)+I;if(u.length>0&&!c.inRange(_,.001))continue;const B=h.enabled?c.formatTick(R,O,y,M,L):"";N.push({tick:R,tickId:g(B),tickLabel:B,translationY:Math.floor(_)})}return d.domain=T,{tickDomain:b,rawTicks:S,fractionDigits:M,ticks:N,niceDomain:y}}}}}),YS,jq=k({"packages/ag-charts-community/src/chart/axis/cartesianAxisLabel.ts"(){"use strict";Nt(),VS(),YS=class extends $i{constructor(){super(...arguments),this.autoRotateAngle=335}},v([A(bt,{optional:!0})],YS.prototype,"autoRotate",2),v([A(Rt)],YS.prototype,"autoRotateAngle",2)}}),KS,Bp,Tm=k({"packages/ag-charts-community/src/chart/axis/cartesianAxis.ts"(){"use strict";P(),Ps(),vu(),Xt(),Ve(),Vo(),Ci(),vm(),Nt(),su(),WT(),yB(),jT(),jq(),KS=class s6 extends HS{constructor(e,i){super(e,i),this.lineNode=this.axisGroup.appendChild(new Im({name:`${this.id}-Axis-line`,zIndex:1})),this.tempText=new iu({debugDirty:!1}),this.tempCaption=new _e,this.tickGenerator=new YT(this),this.generatedTicks=void 0,this.animationManager=e.animationManager,this.animationState=new Pp("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:o=>this.animateReadyUpdate(o),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this.axisGroup.appendChild(this.title.caption.node);let s;this.destroyFns.push(e.layoutManager.addListener("layout:complete",o=>{const a=[o.chart.width,o.chart.height];s!=null&&!An(a,s)&&this.animationState.transition("resize"),s=a}),this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}static is(e){return e instanceof s6}resetAnimation(e){e==="initial"&&this.animationState.transition("reset")}get direction(){return this.position==="top"||this.position==="bottom"?"x":"y"}createAxisContext(){return{...super.createAxisContext(),position:this.position}}createLabel(){return new YS}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1;break}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}calculateLayout(e){return this.updateDirection(),super.calculateLayout(e)}calculateTickLayout(e,i,s,o){const a=this.label.getSideFlag(),{parallelFlipRotation:n,regularFlipRotation:r}=this.calculateRotations(),l=a*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding);if(i===2&&this.label.enabled===!1&&this.tick.enabled===!1&&this.gridLine.enabled===!1)return this.generatedTicks={ticks:[],labels:[]},{ticks:[],tickDomain:e,niceDomain:e,primaryTickCount:o,fractionDigits:0,bbox:this.tickBBox(e,[],[])};const c=this.tickGenerator.generateTicks({domain:e,niceMode:i,visibleRange:s,primaryTickCount:o,parallelFlipRotation:n,regularFlipRotation:r,labelX:l,sideFlag:a}),{tickData:h,primaryTickCount:u=o}=c,{ticks:d,tickDomain:p,rawTicks:g,fractionDigits:f,niceDomain:x=e}=h,y=d.map(S=>this.getTickLabelProps(S,c)),b=this.tickBBox(p,d,y);return this.generatedTicks={ticks:d,labels:y},{ticks:g,tickDomain:p,niceDomain:x,primaryTickCount:u,fractionDigits:f,bbox:b}}update(){this.updateDirection();const e=Array.from(this.tickLabelGroupSelection.nodes(),a=>a.datum.tickId);if(super.update(),this.animatable||this.moduleCtx.animationManager.skipCurrentBatch(),this.generatedTicks){const{ticks:a}=this.generatedTicks;if(this.animationManager.isSkipped())this.resetSelectionNodes();else{const n=a.map(l=>l.tickId),r=c_(e,n);this.animationState.transition("update",r)}}const{enabled:i,stroke:s,width:o}=this.line;this.lineNode.setProperties({stroke:s,strokeWidth:i?o:0}),this.updateTitle(this.scale.domain,!this.generatedTicks?.ticks.length)}updatePosition(){super.updatePosition(),this.axisGroup.datum=this.getAxisTransform()}tickBBox(e,i,s){const o=this.label.getSideFlag(),a=[],{x:n,y1:r,y2:l}=this.getAxisLineCoordinates(),c=new pt(n+Math.min(o*this.seriesAreaPadding,0),r,this.seriesAreaPadding,l-r);if(a.push(c),this.tick.enabled)for(const d of i){const{x1:p,x2:g,y:f}=this.getTickLineCoordinates(d),x=new pt(p,f,g-p,0);a.push(x)}const{tempText:h}=this;if(this.label.enabled)for(const d of s){if(!d.visible)continue;h.setProperties({...d,translationY:Math.round(d.translationY)});const p=h.getBBox();p&&a.push(p)}if(this.title?.enabled){const d=pt.merge(a).width;this.setTitleProps(this.tempCaption,{domain:e,spacing:d});const p=this.tempCaption.node.getBBox();p&&a.push(p)}const u=pt.merge(a);return this.getTransformBox(u)}setTitleProps(e,i){const{title:s}=this;if(!s.enabled){e.enabled=!1,e.node.visible=!1;return}e.enabled=!0,e.color=s.color,e.fontFamily=s.fontFamily,e.fontSize=s.fontSize,e.fontStyle=s.fontStyle,e.fontWeight=s.fontWeight,e.wrapping=s.wrapping;const o=e.node,a=(s.spacing??0)+i.spacing,n=this.label.getSideFlag(),r=ke(this.rotation),l=n===-1&&r>Math.PI&&r<Math.PI*2?-1:1,c=l*n*Math.PI/2,h=l===1?"bottom":"top",{range:u}=this,d=Math.floor(l*n*(u[0]+u[1])/2),p=Math.floor(n===-1?l*-a:-a),{callbackCache:g}=this.moduleCtx,{formatter:f=y=>y.defaultValue}=s,x=g.call(this,f,this.getTitleFormatterParams(i.domain));e.text=x,o.setProperties({visible:!0,text:x,textBaseline:h,x:d,y:p,rotation:c})}getTickLabelProps(e,i){const{combinedRotation:s,textBaseline:o,textAlign:a}=i,{range:n}=this.scale,r=e.tickLabel,c=this.label.getSideFlag()*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),h=r!==""&&r!=null;return{...this.getLabelStyles({value:e.tickLabel}),tickId:e.tickId,rotation:s,rotationCenterX:c,translationY:e.translationY,text:r,textAlign:a,textBaseline:o,visible:h,x:c,y:0,range:n}}getTickLineCoordinates(e){const s=this.label.getSideFlag()*this.getTickSize(),o=Math.min(0,s),a=o+Math.abs(s),n=e.translationY;return{x1:o,x2:a,y:n}}updateSelections(){if(!this.generatedTicks)return;const e=this.getAxisLineCoordinates(),{ticks:i,labels:s}=this.generatedTicks,o=a=>a.tickId;this.lineNode.datum=e,this.gridLineGroupSelection.update(this.gridLength?i:[],void 0,o),this.tickLineGroupSelection.update(i,void 0,o),this.tickLabelGroupSelection.update(s,void 0,o)}updateTitle(e,i,s){const{title:o,tickLineGroup:a,tickLabelGroup:n,lineNode:r}=this;o.enabled&&!i&&s==null&&(s=It.computeChildrenBBox([a,n,r]).width+(n.visible?0:this.seriesAreaPadding)),s??(s=0),this.setTitleProps(o.caption,{domain:e,spacing:s})}updateLabels(){this.label.enabled&&this.tickLabelGroupSelection.each((e,i)=>{e.fill=i.fill,e.fontFamily=i.fontFamily,e.fontSize=i.fontSize,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.text=i.text,e.textBaseline=i.textBaseline,e.textAlign=i.textAlign??"center"})}animateReadyUpdate(e){const{animationManager:i}=this.moduleCtx,s=WS(this),o=pB(s);ci(this.id,"axis-group",i,[this.axisGroup],o.group),ci(this.id,"line",i,[this.lineNode],o.line),ci(this.id,"line-paths",i,[this.gridLineGroupSelection,this.tickLineGroupSelection],o.tick,(a,n)=>n.tickId,e),ci(this.id,"tick-labels",i,[this.tickLabelGroupSelection],o.label,(a,n)=>n.tickId,e)}resetSelectionNodes(){const e=WS(this);bs([this.axisGroup],gB()),bs([this.gridLineGroupSelection,this.tickLineGroupSelection],zT(e)),bs([this.tickLabelGroupSelection],FT()),bs([this.lineNode],fB())}},v([A(lt,{optional:!0})],KS.prototype,"thickness",2),v([A(zb)],KS.prototype,"position",2),Bp=KS}});function Vq(t){return typeof t=="string"&&KT.includes(t)}function Wq(t){const e=[],i=[],s=[...KT];for(const o of t)o instanceof Bp&&(Vq(o.position)?i.push(o.position):e.push(o));for(const o of e){let a;do a=s.pop();while(a&&i.includes(a));if(a==null)break;o.position=a}}var KT,Uq=k({"packages/ag-charts-community/src/chart/mapping/prepareAxis.ts"(){"use strict";Tm(),KT=["top","right","bottom","left"]}});function Hq(t,e,i){const s=(c,h,u)=>{const d=[c];for(const p of xB)p in h&&h[p]!=null&&d.push(`${p}=${h[p]}`);return u?.seriesGrouping&&d.push(`seriesGrouping.groupId=${u?.seriesGrouping.groupId}`),d.join(";")},o=new Map;let a=0;for(const c of t){const h=s(c.type,c.properties,i?.[a]);o.has(h)||o.set(h,[]),o.get(h)?.push([c,a++])}const n=new Map;a=0;for(const c of e){const h=s(c.type,c,c);n.has(h)||n.set(h,[]),n.get(h)?.push([c,a++])}if(![...o.keys()].some(c=>n.has(c)))return{status:"no-overlap",oldKeys:o.keys(),newKeys:n.keys()};const l=[];for(const[c,h]of n.entries())for(const[u,d]of h){const p=o.get(c);if(p==null||p.length<1){l.push({opts:u,targetIdx:d,idx:d,status:"add"}),o.delete(c);continue}const[g,f]=p.shift(),x=i?.[f]??{},y=fr(x,u??{}),{groupIndex:b,stackIndex:S}=y?.seriesGrouping??{};b!=null||S!=null?l.push({opts:u,series:g,diff:y,targetIdx:d,idx:f,status:"series-grouping"}):y?l.push({opts:u,series:g,diff:y,targetIdx:d,idx:f,status:"update"}):l.push({opts:u,series:g,targetIdx:d,idx:f,status:"no-op"}),p.length===0&&o.delete(c)}for(const c of o.values())for(const[h,u]of c)l.push({series:h,idx:u,targetIdx:-1,status:"remove"});return{status:"overlap",changes:l}}var xB,Yq=k({"packages/ag-charts-community/src/chart/mapping/prepareSeries.ts"(){"use strict";zo(),xB=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"]}});function Sl(t){const{series:e}=t;return e?.[0]?.type??"line"}function $T(t){const e=Sl(t);return We.isCartesian(e)||hq(e)}function bB(t){const e=Sl(t);return We.isPolar(e)||uq(e)}function SB(t){const e=Sl(t);return We.isHierarchy(e)||dq(e)}function vB(t){const e=Sl(t);return We.isTopology(e)||pq(e)}function MB(t){const e=Sl(t);return We.isFlowProportion(e)||gq(e)}function XT(t){const e=Sl(t);return We.isStandalone(e)||fq(e)}function ZT(t){const e=Sl(t);return We.isGauge(e)||mq(e)}function Kq(t){const e=Sl(t);return bB(t)&&e!=="pie"&&e!=="donut"}var ku=k({"packages/ag-charts-community/src/chart/mapping/types.ts"(){"use strict";Sm(),LS()}}),DB,$q=k({"packages/ag-charts-community/src/chart/modulesManager.ts"(){"use strict";AT(),ge(),DB=class extends zS{applyOptions(t){for(const e of this.moduleMap.values())e.module.optionsKey in t&&Va(e.moduleInstance)&&e.moduleInstance.set(t[e.module.optionsKey])}*legends(){for(const{module:t,moduleInstance:e}of this.moduleMap.values())t.type==="legend"&&(yield{legendType:t.identifier,legend:e})}}}}),$S,qT,wc,QT=k({"packages/ag-charts-community/src/chart/overlay/overlay.ts"(){"use strict";P(),ge(),Nt(),$S="ag-charts-overlay",qT="ag-charts-dark-overlay",wc=class extends Ct{constructor(t,e){super(),this.className=t,this.defaultMessageId=e,this.enabled=!0}getText(t){return t.t(this.text??this.defaultMessageId)}getElement(t,e,i){if(this.content?.remove(),this.focusBox=i,this.renderer){const s=this.renderer();if(s instanceof HTMLElement)this.content=s;else{const o=Bt("div");o.innerHTML=s,this.content=o.firstElementChild}}else{const s=Bt("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",fontFamily:"var(--ag-charts-font-family)",fontSize:"var(--ag-charts-font-size)",fontWeight:"var(--ag-charts-font-weight)"});s.innerText=this.getText(e),this.content=s,t?.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(o){s.style.opacity=String(o)},onStop(){s.style.opacity="1"}})}return this.content}removeElement(t=()=>this.content?.remove(),e){if(this.content){if(e){const{content:i}=this;e.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(s){i.style.opacity=String(s)},onStop(){t?.()}})}else t?.();this.content=void 0,this.focusBox=void 0}}},v([A(bt)],wc.prototype,"enabled",2),v([A(it,{optional:!0})],wc.prototype,"text",2),v([A(Zs,{optional:!0})],wc.prototype,"renderer",2)}}),Au,Xq=k({"packages/ag-charts-community/src/chart/overlay/chartOverlays.ts"(){"use strict";ge(),Nt(),QT(),Au=class extends Ct{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new wc("ag-charts-loading-overlay","overlayLoadingData"),this.noData=new wc("ag-charts-no-data-overlay","overlayNoData"),this.noVisibleSeries=new wc("ag-charts-no-visible-series","overlayNoVisibleSeries"),this.unsupportedBrowser=new wc("ag-charts-unsupported-browser","overlayUnsupportedBrowser")}getFocusInfo(t){for(const e of[this.loading,this.noData,this.noVisibleSeries,this.unsupportedBrowser])if(e.focusBox!==void 0)return{text:e.getText(t),rect:e.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement(),this.unsupportedBrowser.removeElement()}},v([A(bt)],Au.prototype,"darkTheme",2),v([A(ct)],Au.prototype,"loading",2),v([A(ct)],Au.prototype,"noData",2),v([A(ct)],Au.prototype,"noVisibleSeries",2),v([A(ct)],Au.prototype,"unsupportedBrowser",2)}});function Zq(t,e){const{animationDuration:i}=Ap.add,s=i*e,o=Bt("div",`${$S}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${s}ms linear 50ms both`}),a=Bt("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),n=Bt("p",{marginTop:"1em"});n.innerText=t;const r=Bt("div",`${$S}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),l=Bt("style");return l.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),o.replaceChildren(l,a,n,r),o}var qq=k({"packages/ag-charts-community/src/chart/overlay/loadingSpinner.ts"(){"use strict";P(),cu(),QT()}}),JT,tC,Qq=k({"packages/ag-charts-community/src/chart/series/seriesZIndexMap.ts"(){"use strict";JT=(t=>(t[t.BACKGROUND=0]="BACKGROUND",t[t.ANY_CONTENT=1]="ANY_CONTENT",t))(JT||{}),tC=(t=>(t[t.FOREGROUND=0]="FOREGROUND",t[t.HIGHLIGHT=1]="HIGHLIGHT",t[t.LABEL=2]="LABEL",t))(tC||{})}});function Iu(t,e,i){if(On(t))return{type:"gradient",gradient:t.gradient??e.gradient,colorStops:t.colorStops??e.colorStops,bounds:t.bounds??e.bounds,rotation:t.rotation??e.rotation,reverse:t.reverse??e.reverse};if(qh(t)&&i){const s=t.pattern??i.pattern;let o=t.strokeWidth;s==="backward-slanted-lines"||s==="forward-slanted-lines"||s==="horizontal-lines"||s==="vertical-lines"?o??(o=i.strokeWidth):o??(o=0);const a=t.width??t.height??i.width,n=t.height??t.width??i.height;return{type:"pattern",pattern:s,width:a,height:n,padding:t.padding??i.padding,fill:t.fill??i.fill,fillOpacity:t.fillOpacity??i.fillOpacity,backgroundFill:t.backgroundFill??i.backgroundFill,backgroundFillOpacity:t.backgroundFillOpacity??i.backgroundFillOpacity,stroke:t.stroke??i.stroke,strokeOpacity:t.strokeOpacity??i.strokeOpacity,strokeWidth:o,rotation:t.rotation??i.rotation}}return t}function Dr(t,e,i){return!On(t?.fill)&&!qh(t?.fill)?t:{...t,fill:Iu(t.fill,e,i)}}function XS(t,e,i,s){i==null||!On(e)||e.bounds==null||e.bounds==="item"?t.fillBBox=void 0:t.fillBBox=i[e.bounds],t.fillParams=s}function Tu(t,e,i,s,o){const a=i?.fill??e.fill;t.fill=a,XS(t,i?.fill??e.fill,s,o),t.fillOpacity=i?.fillOpacity??e.fillOpacity??1,t.stroke=i?.stroke??e.stroke,t.strokeOpacity=i?.strokeOpacity??e.strokeOpacity??1,t.strokeWidth=i?.strokeWidth??e.strokeWidth??0,t.lineDash=i?.lineDash??e.lineDash,t.lineDashOffset=i?.lineDashOffset??e.lineDashOffset??0}var vl=k({"packages/ag-charts-community/src/chart/series/shapeUtil.ts"(){"use strict";mp()}}),eC,kB,AB,zp,ZS,Cm,Cu=k({"packages/ag-charts-community/src/chart/series/series.ts"(){"use strict";P(),AT(),Ve(),kI(),Ac(),Bo(),zo(),gl(),OR(),vb(),qt(),SR(),bo(),vl(),eC=(t=>(t[t.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",t[t.NEAREST_NODE=1]="NEAREST_NODE",t[t.AXIS_ALIGNED=2]="AXIS_ALIGNED",t))(eC||{}),kB=.25,AB=.125,zp=class{constructor(t,e,i,s){this.type=t,this.event=e,this.defaultPrevented=!1,this.datum=i.datum,this.seriesId=s.id}preventDefault(){this.defaultPrevented=!0}},ZS=class{constructor(t,e,i){this.series=t,this.seriesGrouping=e,this.oldGrouping=i,this.type="groupingChanged"}},Cm=class extends ZA{constructor(t){super(),this.destroyFns=[],this.usesPlacedLabels=!1,this.seriesGrouping=void 0,this.NodeEvent=zp,this.internalId=la(this),this.contentGroup=new qs({name:`${this.internalId}-content`,zIndex:1}),this.highlightGroup=new qs({name:`${this.internalId}-highlight`,zIndex:1}),this.annotationGroup=new qs({name:`${this.internalId}-annotation`}),this.labelGroup=new qs({name:`${this.internalId}-series-labels`}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new zS,this.datumCallbackCache=new Map,this.connectsToYAxis=!1,this._declarationOrder=-1,this.seriesListeners=new xr,this._pickNodeCache=new nS;const{moduleCtx:e,pickModes:i,directionKeys:s={},directionNames:o={},canHaveAxes:a=!1,usesPlacedLabels:n=!1}=t;this.ctx=e,this.directionKeys=s,this.directionNames=o,this.canHaveAxes=a,this.usesPlacedLabels=n,this.highlightGroup=new qs({name:`${this.internalId}-highlight`}),this.highlightNode=this.highlightGroup.appendChild(new It({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new It({name:"highlightLabel",zIndex:10})),this.pickModes=i}get pickModeAxis(){return"main"}get id(){return this.properties?.id??this.internalId}get type(){return this.constructor.type??""}get focusable(){return!0}get data(){return this._data??this._chartData}set visible(t){this.properties.visible=t,this.ctx.legendManager.toggleItem(t,this.id),this.ctx.legendManager.update(),this.visibleMaybeChanged()}get visible(){return this.ctx.legendManager.getSeriesEnabled(this.id)??this.properties.visible}get hasData(){return this.data!=null&&this.data.length>0}get tooltipEnabled(){return this.properties.tooltip?.enabled}onDataChange(){this.nodeDataRefresh=!0,this._pickNodeCache.clear()}setOptionsData(t){this._data=t,this.onDataChange()}setChartData(t){this._chartData=t,this.data===t&&this.onDataChange()}onSeriesGroupingChange(t,e){const{internalId:i,type:s,visible:o}=this;t&&this.ctx.seriesStateManager.deregisterSeries(this),e&&this.ctx.seriesStateManager.registerSeries({internalId:i,type:s,visible:o,seriesGrouping:e}),this.fireEvent(new ZS(this,e,t))}getBandScalePadding(){return{inner:1,outer:0}}attachSeries(t,e,i){t.appendChild(this.contentGroup),e.appendChild(this.highlightGroup),e.appendChild(this.labelGroup),i?.appendChild(this.annotationGroup)}detachSeries(t,e,i){t?.removeChild(this.contentGroup),e.removeChild(this.highlightGroup),e.removeChild(this.labelGroup),i?.removeChild(this.annotationGroup)}setSeriesIndex(t){return t===this._declarationOrder?!1:(this._declarationOrder=t,this.contentGroup.zIndex=[1,t,0],this.highlightGroup.zIndex=[1,t,1],this.labelGroup.zIndex=[1,t,2],this.annotationGroup.zIndex=t,!0)}renderToOffscreenCanvas(){return!1}addEventListener(t,e){return super.addEventListener(t,e)}removeEventListener(t,e){return super.removeEventListener(t,e)}hasEventListener(t){return super.hasEventListener(t)}addListener(t,e){return this.seriesListeners.addListener(t,e)}dispatch(t,e){this.seriesListeners.dispatch(t,e)}addChartEventListeners(){}destroy(){this.destroyFns.forEach(t=>t()),this.destroyFns=[],this.resetDatumCallbackCache(),this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(t,e){const i=this.resolveKeyDirection(t),s=e?.[i],o=[];if(!s)return o;const a=(...n)=>{for(const r of n)Array.isArray(r)?a(...r):typeof r=="object"?a(...Object.values(r)):o.push(r)};return a(...s.map(n=>this.properties[n])),o}getKeys(t){return this.getDirectionValues(t,this.directionKeys)}getKeyProperties(t){return this.directionKeys[this.resolveKeyDirection(t)]??[]}getNames(t){return this.getDirectionValues(t,this.directionNames)}resolveKeyDirection(t){return t}getDomain(t){const e=this.getSeriesDomain(t),i=this.moduleMap.mapModules(s=>s.getDomain(t)).flat();return i.length!==0?e.concat(i):e}getRange(t,e){return this.getSeriesRange(t,e)}getVisibleItems(t,e,i){return 1/0}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){this.ctx.seriesStateManager.updateSeries(this)}getOpacity(){const{dimOpacity:e=1,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||e===1)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;case 2:default:return e}}getStrokeWidth(t){const{strokeWidth:e,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||e===void 0)return t;switch(this.isItemIdHighlighted()){case 1:return e;case 0:case 2:return t}}isItemIdHighlighted(){const t=this.ctx.highlightManager?.getActiveHighlight()?.series;return t==null?0:t!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules(t=>t.getTooltipParams()).reduce((t,e)=>Object.assign(t,e),{})}pickNodes(t,e,i=!1){const{pickModes:s,pickModeAxis:o,visible:a,contentGroup:n}=this;if(!a||!n.visible||e==="highlight"&&!this.properties.highlight.enabled||e==="highlight-tooltip"&&!this.properties.highlight.enabled)return;let r=1/0;if(e==="tooltip"||e==="highlight-tooltip"){const{tooltip:d}=this.properties;r=typeof d.range=="number"?d.range:1/0,i||(i=d.range==="exact")}else if(e==="event"||e==="context-menu"){const{nodeClickRange:d}=this.properties;r=typeof d=="number"?d:1/0,i||(i=d==="exact")}const l=s.filter(d=>!i||d===0),{x:c,y:h}=t,u=JSON.stringify({x:c,y:h,maxDistance:r,selectedPickModes:l});if(this._pickNodeCache.has(u))return this._pickNodeCache.get(u);for(const d of l){let p;switch(d){case 0:{const g=this.pickNodesExactShape(t);p=g.length===0?void 0:{datums:g,distance:0};break}case 1:{const g=this.pickNodeClosestDatum(t),f=g?.distance===0?this.pickNodesExactShape(t):void 0;f!=null&&f.length!==0?p={datums:f,distance:0}:g?p={datums:[g.datum],distance:g.distance}:p=void 0;break}case 2:{const g=o!=null?this.pickNodeMainAxisFirst(t,o==="main-category"):void 0;p=g!=null?{datums:[g.datum],distance:g.distance}:void 0;break}}if(p&&p.distance<=r)return this._pickNodeCache.set(u,{pickMode:d,datums:p.datums,distance:p.distance})}return this._pickNodeCache.set(u,void 0)}pickNodesExactShape(t){const e=[];for(const i of this.contentGroup.pickNodes(t.x,t.y)){const s=i.closestDatum();s!=null&&s.missing!==!0&&e.push(s)}return e}pickNodeClosestDatum(t){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(t,e){const i=Sb(t.x,t.y,e),s=i.nearest?.closestDatum();if(s!=null&&s.missing!==!0)return{datum:s,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(t,e){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}getLabelData(){return[]}updatePlacedLabelData(t){}fireNodeClickEvent(t,e){const i=new this.NodeEvent("seriesNodeClick",t,e,this);return this.fireEvent(i),!i.defaultPrevented}fireNodeDoubleClickEvent(t,e){const i=new this.NodeEvent("seriesNodeDoubleClick",t,e,this);return this.fireEvent(i),!i.defaultPrevented}createNodeContextMenuActionEvent(t,e){return new this.NodeEvent("nodeContextMenuAction",t,e,this)}onLegendInitialState(t,e){const{visible:i=!0,itemId:s,legendItemName:o}=e??{};this.toggleSeriesItem(i,t,s,o)}onLegendItemClick(t){const{enabled:e,itemId:i,series:s,legendType:o}=t,a="legendItemName"in this.properties?this.properties.legendItemName:void 0,n="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,r=a!=null&&a===t.legendItemName;(s.id===this.id||r||n!=null)&&this.toggleSeriesItem(e,o,i,a,t)}onLegendItemDoubleClick(t){const{enabled:e,itemId:i,series:s,numVisibleItems:o,legendType:a}=t,n="legendItemName"in this.properties?this.properties.legendItemName:void 0,r="legendItemKey"in this.properties?this.properties.legendItemKey:void 0,l=n!=null&&n===t.legendItemName;s.id===this.id||l||r!=null?this.toggleSeriesItem(!0,a,i,n,t):e&&o===1?this.toggleSeriesItem(!0,a,void 0,n):this.toggleSeriesItem(!1,a,void 0,n)}toggleSeriesItem(t,e,i,s,o){const a=this.id;(t||e!=="category")&&(this.visible=t),this.nodeDataRefresh=!0,this._pickNodeCache.clear();const n={type:"seriesVisibilityChange",seriesId:a,itemId:i,legendItemName:o?.legendItemName??s,visible:t};this.fireEvent(n),this.ctx.legendManager.toggleItem(t,a,i,s)}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return{...this.ctx,series:this}}getLabelText(t,e,i=ml){return t.formatter?this.ctx.callbackCache.call(this.properties,t.formatter,{seriesId:this.id,...e})??this.callWithContext(i,e.value):this.callWithContext(i,e.value)}getMarkerStyle(t,e,i,s=!1,o=t.size??0,a){const{itemStyler:n,fillGradientDefaults:r,fillPatternDefaults:l}=t;let h=Dr(Vt({size:o},a,t.getStyle()),r,l);if(n&&i){const u=this.ctx.callbackCache.call(this.properties,n,{seriesId:this.id,...h,...i,highlighted:s,datum:e});h=Dr(Vt(u,h),r,l)}return h}updateMarkerStyle(t,e,i,s,o,a,n,r,{applyTranslation:l=!0,selected:c=!0}={}){const h=this.getMarkerStyle(t,i,o,a,s?.size,n),{shape:u,size:d}=h,p=this.visible&&d>0&&s&&!isNaN(s.x)&&!isNaN(s.y);if(Tu(e,h,void 0,r),l?e.setProperties({visible:p,shape:u,size:d,x:s?.x,y:s?.y,scalingCenterX:s?.x,scalingCenterY:s?.y}):e.setProperties({visible:p,shape:u,size:d}),c||(e.fillOpacity*=kB,e.strokeOpacity*=AB),typeof t.shape=="function"&&!e.dirtyPath){e.path.clear(!0),e.updatePath(),e.checkPathDirty();const g=e.getBBox();if(s!==void 0&&g.isFinite()){const f=g.computeCenter(),[x,y]=["x","y"].map(b=>(h.strokeWidth??0)+Math.abs(f[b]-s[b]));s.focusSize=Math.max(g.width+x,g.height+y)}}}get nodeDataDependencies(){return this._nodeDataDependencies??{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(t){const{width:e,height:i}=t??{width:NaN,height:NaN},s=t?{seriesRectWidth:e,seriesRectHeight:i}:void 0,o=fr(this.nodeDataDependencies,s)!=null;return o&&(this._nodeDataDependencies=s,this.markNodeDataDirty()),o}pickFocus(t){}resetDatumCallbackCache(){this.datumCallbackCache.clear()}cachedDatumCallback(t,e){const{datumCallbackCache:i}=this,s=i.get(t);if(s!=null)return s;try{const o=e();return i.set(t,o),o}catch(o){tt.error(String(o))}}callWithContext(t,...e){return DI(this.properties,t,e)}},v([Fo({changeValue:function(t,e){this.onSeriesGroupingChange(e,t)}})],Cm.prototype,"seriesGrouping",2)}});function Ot(t){const{changeCb:e,convertor:i}=t??{};return gt({type:"path",convertor:i,changeCb:e})}var io,Xa=k({"packages/ag-charts-community/src/scene/shape/path.ts"(){"use strict";P(),Hb(),ca(),Sc(),io=class extends ua{constructor(){super(...arguments),this.path=new Zh,this._clipX=NaN,this._clipY=NaN,this.clip=!1,this._dirtyPath=!0,this.lastPixelRatio=NaN}set clipX(t){this._clipX=t,this.dirtyPath=!0}set clipY(t){this._clipY=t,this.dirtyPath=!0}set dirtyPath(t){this._dirtyPath!==t&&(this._dirtyPath=t,t&&this.markDirty("path"))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){this._dirtyPath||(this.dirtyPath=this.path.isDirty()||(this.fillShadow?.isDirty()??!1)||(this._clipPath?.isDirty()??!1))}computeBBox(){return this.updatePathIfDirty(),this.path.computeBBox()}isPointInPath(t,e){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(t,e)}distanceSquared(t,e){return this.distanceSquaredTransformedPoint(t,e)}svgPathData(t){return this.updatePathIfDirty(),this.path.toSVG(t)}distanceSquaredTransformedPoint(t,e){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(t,e)?0:this.path.distanceSquared(t,e)}isDirtyPath(){return!1}updatePath(){}updatePathIfDirty(){(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1)}preRender(t){return t.devicePixelRatio!==this.lastPixelRatio&&(this.dirtyPath=!0),this.lastPixelRatio=t.devicePixelRatio,this.updatePathIfDirty(),super.preRender(t,this.path.commands.length)}render(t){const{ctx:e}=t;if(this.clip&&!isNaN(this._clipX)&&!isNaN(this._clipY)){e.save();const i=this.strokeWidth/2;this._clipPath??(this._clipPath=new Zh),this._clipPath.clear(),this._clipPath.rect(-i,-i,this._clipX+i,this._clipY+i+i),e.clip(this._clipPath?.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(e),e.restore()}else this._clipPath=void 0,this.drawPath(e);this.fillShadow?.markClean(),super.render(t)}drawPath(t){this.fillStroke(t,this.path.getPath2D())}toSVG(){if(!this.visible)return;const t=os("path");t.setAttribute("d",this.svgPathData());const e=this.applySvgFillAttributes(t,[]);return this.applySvgStrokeAttributes(t),{elements:[t],defs:e}}},io.className="Path",v([Ot()],io.prototype,"clip",2),v([Ot()],io.prototype,"clipX",1),v([Ot()],io.prototype,"clipY",1)}}),IB,Jq=k({"packages/ag-charts-community/src/dom/focusIndicator.ts"(){"use strict";P(),Xt(),Xa(),ms(),Jh(),IB=class{constructor(t){this.swapChain=t,this.hasBeenActivated=!1,this.div=Bt("div"),this.svg=os("svg"),this.outerPath=os("path"),this.innerPath=os("path"),this.svg.append(this.outerPath),this.svg.append(this.innerPath),this.outerPath.classList.add("ag-charts-focus-svg-outer-path"),this.innerPath.classList.add("ag-charts-focus-svg-inner-path"),this.element=Bt("div","ag-charts-focus-indicator"),this.element.ariaHidden="true",this.element.append(this.svg),this.swapChain.addListener("swap",e=>this.onSwap(e))}clear(){}update(t,e,i){if(e!=null)if(t instanceof io){const s=(a,n)=>{let{x:r,y:l}=Ke.toCanvasPoint(t,a,n);return r-=e.x??0,l-=e.y??0,{x:r,y:l}},o=t.svgPathData(s);this.outerPath.setAttribute("d",o),this.innerPath.setAttribute("d",o),this.show(this.svg)}else{let s;if(i){const o=Math.max(t.x-e.x,0),a=Math.max(t.y-e.y,0),n=Math.min(t.x+t.width-e.x,e.width),r=Math.min(t.y+t.height-e.y,e.height);s=new pt(o,a,n-o,r-a)}else s=new pt(t.x-e.x,t.y-e.y,t.width,t.height);Xb(this.div,s),this.show(this.div)}}onSwap(t){t!==this.element.parentElement&&(this.element.remove(),t.appendChild(this.element),this.overrideFocusVisible(this.focusVisible))}show(t){this.hasBeenActivated=!0,this.element.innerHTML="",this.element.append(t)}overrideFocusVisible(t){this.focusVisible=t;const e={true:"1",false:"0",undefined:""};this.element.parentElement?.style.setProperty("opacity",e[`${t}`])}isFocusVisible(t=!1){if(!t&&!this.hasBeenActivated)return!1;const e=this.element.parentElement;return e!=null&&xe().getComputedStyle(e).opacity==="1"}}}}),TB,t7=k({"packages/ag-charts-community/src/dom/focusSwapChain.ts"(){"use strict";P(),Qs(),TB=class{constructor(t,e,i,s){this.label1=t,this.label2=e,this.hasFocus=!1,this.skipDispatch=!1,this.listeners={blur:[],focus:[],swap:[]},this.onBlur=o=>(_n(o.target,"pointer-events",void 0),!this.skipDispatch&&this.dispatch("blur",o)),this.onFocus=o=>(_n(o.target,"pointer-events","auto"),!this.skipDispatch&&this.dispatch("focus",o)),ve(this.label1,"id",`${i}-label1`),ve(this.label2,"id",`${i}-label2`),_n(this.label1,"display","none"),_n(this.label2,"display","none"),this.activeAnnouncer=this.createAnnouncer(s),this.inactiveAnnouncer=this.createAnnouncer(s),ve(this.activeAnnouncer,"tabindex",0),this.label2.insertAdjacentElement("afterend",this.activeAnnouncer),this.label2.insertAdjacentElement("afterend",this.inactiveAnnouncer),this.swap("")}createAnnouncer(t){const e=Bt("div");return e.role=t,e.className="ag-charts-swapchain",e.addEventListener("blur",this.onBlur),e.addEventListener("focus",this.onFocus),e}destroy(){for(const t of[this.activeAnnouncer,this.inactiveAnnouncer])t.removeEventListener("blur",this.onBlur),t.removeEventListener("focus",this.onFocus),t.remove()}focus(t){this.focusOptions=t,this.activeAnnouncer.focus(t),this.focusOptions=void 0}update(t){this.skipDispatch=!0,this.swap(t),this.hasFocus&&this.activeAnnouncer.focus(this.focusOptions),this.skipDispatch=!1}addListener(t,e){this.listeners[t].push(e),t==="swap"&&e(this.activeAnnouncer)}dispatch(t,e){t==="focus"?this.hasFocus=!0:t==="blur"&&(this.hasFocus=!1),this.listeners[t].forEach(i=>i(e))}swap(t){const e=this.activeAnnouncer.tabIndex;this.label2.textContent=t,[this.inactiveAnnouncer,this.activeAnnouncer]=[this.activeAnnouncer,this.inactiveAnnouncer],[this.label1,this.label2]=[this.label2,this.label1],eu(this.inactiveAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!0,tabindex:void 0}),eu(this.activeAnnouncer,{"aria-labelledby":this.label1.id,"aria-hidden":!1,tabindex:e}),this.dispatch("swap",this.activeAnnouncer)}}}});function e7(t,e){for(const i of e)if("code"in i){if(i.code===t.code)return!0}else if(i.key===t.key&&(i.shift===void 0||i.shift===t.shiftKey)&&(i.ctrlOrMeta===void 0||i.ctrlOrMeta===t.ctrlKey||i.ctrlOrMeta===t.metaKey))return!0;return!1}function i7(t){for(const[e,{activatesFocusIndicator:i=!0,bindings:s}]of ja(CB))if(e7(t,s))return{name:e,activatesFocusIndicator:i}}var CB,s7=k({"packages/ag-charts-community/src/chart/interaction/keyBindings.ts"(){"use strict";P(),CB={arrowdown:{bindings:[{code:"ArrowDown"}]},arrowleft:{bindings:[{code:"ArrowLeft"}]},arrowright:{bindings:[{code:"ArrowRight"}]},arrowup:{bindings:[{code:"ArrowUp"}]},delete:{bindings:[{key:"Backspace"},{key:"Delete"}],activatesFocusIndicator:!1},redo:{bindings:[{key:"y",ctrlOrMeta:!0},{key:"z",ctrlOrMeta:!0,shift:!0}],activatesFocusIndicator:!1},undo:{bindings:[{key:"z",ctrlOrMeta:!0}],activatesFocusIndicator:!1},submit:{bindings:[{key:"Enter"},{code:"Enter"},{code:"Space"}]},zoomin:{bindings:[{key:"+"},{code:"ZoomIn"},{code:"Add"}],activatesFocusIndicator:!1},zoomout:{bindings:[{key:"-"},{code:"ZoomOut"},{code:"Substract"}],activatesFocusIndicator:!1}}}});function o7(t,e,i){const s=FI(t,i.datum,i.movedBounds);if(s!=null)return{x:s.canvasX,y:s.canvasY};const o=i.bounds;if(o!=null){if(o instanceof pt){const{x:a,y:n}=o.computeCenter();return{x:e.x+a,y:e.y+n}}return Ke.toCanvas(o).computeCenter()}}function a7({bounds:t}){return t instanceof pt?t:t!=null?Ke.toCanvas(t):pt.NaN}function n7(t,e,i){const{x:s,y:o}=o7(t,e,i)??{};if(s!==void 0&&o!==void 0)return{type:"keyboard",canvasX:s,canvasY:o}}var r7=k({"packages/ag-charts-community/src/chart/keyboardUtil.ts"(){"use strict";Xt(),ms(),hu()}});function iC(){return(t,e)=>{const i=[`Property [${t}] is deprecated.`,e].filter(Boolean).join(" ");tt.warnOnce(i)}}function LB(t,e){const i=iC(),s=e?.default;return ll((o,a,n)=>(n!==s&&i(a.toString(),t),n))}function l7(t,e){const i=iC();return ll((s,o,a)=>(a!==s[t]&&(i(o.toString(),`Use [${t}] instead.`),vA(s,t,e?e(a):a)),Vf),(s,o)=>(i(o.toString(),`Use [${t}] instead.`),up(s,t)))}var NB=k({"packages/ag-charts-community/src/util/deprecation.ts"(){"use strict";P(),Hh(),qt()}});function OB(t,e,i,s){let{top:o,right:a,bottom:n,left:r,width:l,height:c}=s;return r!=null?l!=null?a=i.width-r+l:a!=null&&(l=i.width-r-a):a!=null&&l!=null&&(r=i.width-a-l),o!=null?c!=null?n=i.height-o-c:n!=null&&(c=i.height-n-o):n!=null&&c!=null&&(o=i.height-n-c),l==null?c==null?(l=t,c=e):l=Math.ceil(t*c/e):c==null&&(c=Math.ceil(e*l/t)),r==null&&(a==null?r=Math.floor((i.width-l)/2):r=i.width-a-l),o==null&&(n==null?o=Math.floor((i.height-c)/2):o=i.height-c-n),{x:r,y:o,width:l,height:c}}var wB=k({"packages/ag-charts-community/src/util/placement.ts"(){"use strict"}}),sC,oC,aC,EB,_B,c7=k({"packages/ag-charts-community/src/chart/tooltip/springAnimation.ts"(){"use strict";gl(),sC=.1,oC=200,aC=12,EB=.5,_B=class extends xr{constructor(){super(...arguments),this.x1=NaN,this.y1=NaN,this.x=NaN,this.y=NaN,this.vx=0,this.vy=0,this.t0=NaN,this.animationFrameHandle=void 0}reset(){this.x=NaN,this.y=NaN,this.animationFrameHandle!=null&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0)}update(t,e){if(Number.isNaN(this.x)||Number.isNaN(this.y)){this.x=t,this.y=e,this.vx=0,this.vy=0,this.emitUpdate(),this.animationFrameHandle!=null&&(cancelAnimationFrame(this.animationFrameHandle),this.animationFrameHandle=void 0);return}this.x1=t,this.y1=e,this.t0=Date.now(),this.animationFrameHandle==null&&(this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this)))}onFrame(){this.animationFrameHandle=void 0;const{x1:t,y1:e,t0:i}=this,s=Date.now(),o=s-i;this.t0=s;const a=.001,n=Math.ceil(o/(a*1e3))|0;let{x:r,y:l,vx:c,vy:h}=this;for(let u=0;u<n;u+=1){const d=r-t,p=l-e,g=-(oC*d+aC*c)/sC,f=-(oC*p+aC*h)/sC;c+=g*a,h+=f*a,r+=c*a,l+=h*a}Math.hypot(r-t,l-e)<EB?(this.x=this.x1,this.y=this.y1,this.vx=0,this.vy=0):(this.x=r,this.y=l,this.vx=c,this.vy=h,this.animationFrameHandle=requestAnimationFrame(this.onFrame.bind(this))),this.emitUpdate()}emitUpdate(){this.dispatch("update",{type:"update",x:this.x,y:this.y})}}}});function Lm(t){return t===""?"":(Nm??(Nm=Bt("div")),Nm.textContent=String(t),Nm.innerHTML.replace(/\n/g,"<br>"))}var Nm,h7=k({"packages/ag-charts-community/src/util/sanitize.ts"(){"use strict";P(),Nm=null}});function Om(t,e){const{path:i,size:s}=t,{x:o,y:a}=t;i.clear();let n=!1;for(const[r,l]of e){const c=o+(r-.5)*s,h=a+(l-.5)*s;n?i.lineTo(c,h):i.moveTo(c,h),n=!0}i.closePath()}var RB,PB=k({"packages/ag-charts-community/src/chart/marker/shapes.ts"(){"use strict";Yb(),Ci(),RB={circle({path:t,x:e,y:i,size:s}){const o=s/2;t.clear(),t.arc(e,i,o,0,Math.PI*2),t.closePath()},cross(t){Om(t,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},diamond(t){Om(t,[[.5,0],[1,.5],[.5,1],[0,.5]])},heart({path:t,x:e,y:i,size:s}){const o=s/4;i=i+o/2,t.clear(),t.arc(e-o,i-o,o,je(130),je(330)),t.arc(e+o,i-o,o,je(220),je(50)),t.lineTo(e,i+o),t.closePath()},pin({path:t,x:e,y:i,size:s}){t.moveTo(e+(.15625-.5)*s,i+(.34375-.5)*s),t.cubicCurveTo(e+(.15625-.5)*s,i+(.151491-.5)*s,e+(.307741-.5)*s,i+(0-.5)*s,e+(.5-.5)*s,i+(0-.5)*s),t.cubicCurveTo(e+(.692259-.5)*s,i+(0-.5)*s,e+(.84375-.5)*s,i+(.151491-.5)*s,e+(.84375-.5)*s,i+(.34375-.5)*s),t.cubicCurveTo(e+(.84375-.5)*s,i+(.493824-.5)*s,e+(.784625-.5)*s,i+(.600181-.5)*s,e+(.716461-.5)*s,i+(.695393-.5)*s),t.cubicCurveTo(e+(.699009-.5)*s,i+(.719769-.5)*s,e+(.681271-.5)*s,i+(.743104-.5)*s,e+(.663785-.5)*s,i+(.766105-.5)*s),t.cubicCurveTo(e+(.611893-.5)*s,i+(.834367-.5)*s,e+(.562228-.5)*s,i+(.899699-.5)*s,e+(.528896-.5)*s,i+(.980648-.5)*s),t.cubicCurveTo(e+(.524075-.5)*s,i+(.992358-.5)*s,e+(.512663-.5)*s,i+(1-.5)*s,e+(.5-.5)*s,i+(1-.5)*s),t.cubicCurveTo(e+(.487337-.5)*s,i+(1-.5)*s,e+(.475925-.5)*s,i+(.992358-.5)*s,e+(.471104-.5)*s,i+(.980648-.5)*s),t.cubicCurveTo(e+(.487337-.5)*s,i+(1-.5)*s,e+(.475925-.5)*s,i+(.992358-.5)*s,e+(.471104-.5)*s,i+(.980648-.5)*s),t.cubicCurveTo(e+(.437772-.5)*s,i+(.899699-.5)*s,e+(.388107-.5)*s,i+(.834367-.5)*s,e+(.336215-.5)*s,i+(.766105-.5)*s),t.cubicCurveTo(e+(.318729-.5)*s,i+(.743104-.5)*s,e+(.300991-.5)*s,i+(.719769-.5)*s,e+(.283539-.5)*s,i+(.695393-.5)*s),t.cubicCurveTo(e+(.215375-.5)*s,i+(.600181-.5)*s,e+(.15625-.5)*s,i+(.493824-.5)*s,e+(.15625-.5)*s,i+(.34375-.5)*s),t.closePath()},plus(t){Om(t,[[1/3,0],[2/3,0],[2/3,1/3],[1,1/3],[1,2/3],[2/3,2/3],[2/3,1],[1/3,1],[1/3,2/3],[0,2/3],[0,1/3],[1/3,1/3]])},square({path:t,x:e,y:i,size:s,pixelRatio:o}){const a=s/2;t.clear(),t.moveTo(ns(o,e-a),ns(o,i-a)),t.lineTo(ns(o,e+a),ns(o,i-a)),t.lineTo(ns(o,e+a),ns(o,i+a)),t.lineTo(ns(o,e-a),ns(o,i+a)),t.closePath()},star({path:t,x:e,y:i,size:s}){const a=s/2,n=a/2,r=Math.PI/2;for(let l=0;l<5*2;l++){const c=l%2===0?a:n,h=l*Math.PI/5-r,u=e+Math.cos(h)*c,d=i+Math.sin(h)*c;t.lineTo(u,d)}t.closePath()},triangle(t){Om(t,[[.5,0],[1,.87],[0,.87]])}}}}),Fp,Xi,zn=k({"packages/ag-charts-community/src/chart/marker/marker.ts"(){"use strict";Xt(),Xa(),ms(),PB(),Fp=class extends io{constructor(){super(...arguments),this.shape="square",this.x=0,this.y=0,this.size=12}updatePath(){const{path:t,shape:e,x:i,y:s,size:o}=this,a=this.layerManager?.canvas?.pixelRatio??1,n=Xi.anchor(e),r={path:t,x:i-(n.x-.5)*o,y:s-(n.y-.5)*o,size:o,pixelRatio:a};t.clear(),typeof e=="string"?RB[e](r):typeof e=="function"&&e(r)}computeBBox(){const{x:t,y:e,size:i}=this,s=Xi.anchor(this.shape);return new pt(t-i*s.x,e-i*s.y,i,i)}executeFill(t,e){if(e)return super.executeFill(t,e)}executeStroke(t,e){if(e)return super.executeStroke(t,e)}},v([Ot()],Fp.prototype,"shape",2),v([Ot()],Fp.prototype,"x",2),v([Ot()],Fp.prototype,"y",2),v([Ot({convertor:Math.abs})],Fp.prototype,"size",2),Xi=class extends yp(UA(Qh(Fp))){static anchor(t){return t==="pin"?{x:.5,y:1}:typeof t=="function"&&"anchor"in t?t.anchor:{x:.5,y:.5}}constructor(t){super(t),t?.shape!=null&&(this.shape=t.shape)}}}});function BB(t,e,i=e*(5/3)){const s=new It,o=Math.min(t.marker.strokeWidth??1,2),a=Math.min(t.line?.strokeWidth??0,2),n=Math.max(t.marker.enabled===!1?0:e,t.line==null?0:i),r=Math.max(t.marker.enabled===!1?0:e,a);if(t.line!=null){const{stroke:l,strokeOpacity:c,lineDash:h}=t.line,u=new Yo;u.x1=0,u.y1=r/2,u.x2=n,u.y2=r/2,u.stroke=l,u.strokeOpacity=c,u.strokeWidth=a,u.lineDash=h,s.append(u)}if(t.marker.enabled!==!1){const{shape:l,fill:c,fillOpacity:h,stroke:u,strokeOpacity:d,lineDash:p,lineDashOffset:g}=t.marker,f=new Xi;f.shape=l??"square",f.size=e,f.fill=c,f.fillOpacity=h??1,f.stroke=u,f.strokeOpacity=d??1,f.strokeWidth=o,f.lineDash=p,f.lineDashOffset=g??0;const x=Xi.anchor(l),y=n/2+(x.x-.5)*e,b=r/2+(x.y-.5)*e,S=e/(e+o);f.x=y,f.y=b,f.scalingCenterX=y,f.scalingCenterY=b,f.scalingX=S,f.scalingY=S,s.append(f)}return It.toSVG(s,n,r)}var zB=k({"packages/ag-charts-community/src/chart/legend/legendSymbol.ts"(){"use strict";Ve(),Mu(),zn()}});function FB(t){const e=[],i=new Map;for(const s of t)if(s.type==="structured"){const{heading:o}=s,a=o!=null?i.get(o):void 0,n={type:"structured",heading:o,items:[s]};a==null?(i.set(o,n),e.push(n)):a.items.push(s)}else e.push(s);return e}function GB(t){const e=FB(t),i=[];return e.forEach(s=>{if(s.type==="raw")return"";s.heading!=null&&i.push(s.heading),s.items.forEach(o=>{o.title!=null&&i.push(o.title),o.data?.forEach(a=>{i.push(a.label??a.fallbackLabel,a.value)})})}),i.join("; ")}function nC(t,e,i){let s="";t==null?s+=`<span class="${rs}-label">${Lm(e)}</span>`:(s+=`<span class="${rs}-label">${Lm(t)}</span>`,s+=" ",s+=`<span class="${rs}-value">${Lm(e)}</span>`);const o=[`${rs}-row`];return i&&o.push(`${rs}-row--inline`),s=`<div class="${o.join(" ")}">${s}</div>`,s}function u7(t){let e="";const i=t.title==null&&t.data?.length===1,s=t.symbol==null?void 0:BB(t.symbol,12);return s!=null&&(t.title!=null||t.data?.length)&&(e+=`<span class="${rs}-symbol">${s}</span>`),t.title!=null&&(e+=`<span class="${rs}-title">${Lm(t.title)}</span>`,e+=" "),t.data?.forEach(o=>{e+=nC(o.label??o.fallbackLabel,o.value,i),e+=" "}),e}function jB(t,e){if(t==null||e.length===1)return;const i=t?.t("tooltipPaginationStatus",{index:e.index+1,count:e.length});return`<div class="${rs}-footer">${i}</div>`}function VB(t,e,i,s){const o=e.items.length===1?e.items[0]:void 0;let a,n,r;switch(i){case"compact":a=!0,n=o?.title;break;case"single":a=o!=null&&(e.heading==null||o.title==null)&&o.data?.length===1&&o.data[0].label==null&&o.data[0].value!=null,r=e.heading??o?.title;break;case"shared":a=!1}let l="";if(a&&o!=null?(n!=null&&(l+=nC(void 0,n,!1)),o.data?.forEach(h=>{l+=nC(h.label??r,h.value,!1),l+=" "})):(e.heading!=null&&(l+=`<span class="${rs}-heading">${Lm(e.heading)}</span>`,l+=" "),e.items.forEach(h=>{l+=u7(h)})),l.length===0)return;const c=i!=="compact"&&s!=null?jB(t,s):void 0;return c+null&&(l+=c),l=`<div class="${rs}-content">${l.trimEnd()}</div>`,l}function d7(t,e){const i=e==null?void 0:jB(t,e);return i==null?"":`<div class="${rs}-content">${i}</div>`}function WB(t,e,i,s){const o=FB(e);if(o.length!==0){if(o.length===1&&o[0].type==="structured")return VB(t,o[0],i,s);{const a=o.map(n=>n.type==="structured"?VB(t,n,i):n.rawHtmlString);return s!=null&&a.push(d7(t,s)??""),a.join("")}}}var rs,rC,UB=k({"packages/ag-charts-community/src/chart/tooltip/tooltipContent.ts"(){"use strict";h7(),zB(),rs="ag-charts-tooltip",rC="ag-charts-tooltip--dark"}}),HB,YB,KB,lC,$B,cC,XB,hC,ZB,kr,ma,wm=k({"packages/ag-charts-community/src/chart/tooltip/tooltip.ts"(){"use strict";P(),NB(),wB(),ge(),qR(),Nt(),c7(),UB(),UB(),HB={left:-1,"top-left":-1,"bottom-left":-1,top:0,center:0,bottom:0,right:1,"top-right":1,"bottom-right":1},YB={"top-left":-1,top:-1,"top-right":-1,left:0,center:0,right:0,"bottom-left":1,bottom:1,"bottom-right":1},KB={left:3,"top-left":void 0,"bottom-left":void 0,top:2,center:void 0,bottom:1,right:0,"top-right":void 0,"bottom-right":void 0},lC={top:2,bottom:2,left:1,right:1,"top-right":3,"top-left":3,"bottom-right":3,"bottom-left":3,center:0},$B=fe(["single","shared","compact"]),cC=fe(["pointer","node","top","right","bottom","left","top-left","top-right","bottom-right","bottom-left"],"a position type"),XB=fe(["pointer","node","chart"],"an anchorTo"),hC=fe(["top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"],"a placement"),ZB=fs(hC,Hi(hC)),kr=class extends Ct{constructor(){super(...arguments),this.xOffset=0,this.yOffset=0}get defaultAnchorTo(){const{type:t,_seriesOverrideType:e}=this,i=t??e??"pointer";return i==="node"||i==="pointer"?i:"chart"}get defaultPlacement(){const{type:t,_seriesOverrideType:e}=this,i=t??e??"pointer";return i==="node"||i==="pointer"?"top":i}},v([A(cC,{optional:!0}),LB("Use `anchorTo` and/or `placement` options instead.")],kr.prototype,"type",2),v([A(cC,{optional:!0})],kr.prototype,"_seriesOverrideType",2),v([A(Rt)],kr.prototype,"xOffset",2),v([A(Rt)],kr.prototype,"yOffset",2),v([A(XB,{optional:!0})],kr.prototype,"anchorTo",2),v([A(ZB,{optional:!0})],kr.prototype,"placement",2),ma=class extends Ct{constructor(){super(),this.enabled=!0,this.mode="single",this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new kr,this.pagination=!1,this.darkTheme=!1,this.bounds="extended",this.destroyFns=[],this.springAnimation=new _B,this.enableInteraction=!1,this.wrapTypes=["always","hyphenate","on-space","never"],this.sizeMonitor=new dI,this._elementSize=void 0,this._showTimeout=void 0,this.arrowPosition=void 0,this._visible=!1,this.positionParams=void 0,this.localeManager=void 0,this.destroyFns.push(this.springAnimation.addListener("update",this.updateTooltipPosition.bind(this)))}get interactive(){return this.enableInteraction}setup(t,e){return"togglePopover"in xe().HTMLElement.prototype&&(this.element=e.addChild("tooltip-container",rs),this.element.setAttribute("popover","manual"),this.element.className=rs,this.element.style.positionAnchor=e.anchorName,this.sizeMonitor.observe(this.element,i=>{this._elementSize=i,this.updateTooltipPosition()})),this.localeManager=t,()=>{e.removeChild("tooltip-container",rs),this.destroyFns.forEach(i=>i()),this.element&&this.sizeMonitor.unobserve(this.element)}}isVisible(){return this._visible}contains(t){return this.element?.contains(t)??!1}updateTooltipPosition(){const{element:t,_elementSize:e,positionParams:i}=this;if(t==null||e==null||i==null)return;const{canvasRect:s,relativeRect:o,meta:a}=i,{x:n,y:r}=this.springAnimation;let l=a.position?.placement??this.position.placement??a.position?.defaultPlacement??this.position.defaultPlacement;Array.isArray(l)||(l=[l]);const c=a.position?.anchorTo??this.position.anchorTo??a.position?.defaultAnchorTo??this.position.defaultAnchorTo,h=a.position?.xOffset??0,u=a.position?.yOffset??0,d=o.x,p=o.y,g=o.width-e.width-1+d,f=o.height-e.height+p;let x=0,y,b,S=!1;do{y=l[x],x+=1;const I=this.getTooltipBounds({elementSize:e,placement:y,anchorTo:c,canvasX:n,canvasY:r,yOffset:u,xOffset:h,canvasRect:s});b=OB(e.width,e.height,o,I),S=!1,lC[y]&1&&(S||(S=b.x<d||b.x>g)),lC[y]&2&&(S||(S=b.y<p||b.y>f))}while(x<l.length&&S);const M=Tt(d,b.x,g),D=Tt(p,b.y,f);S||(S=M!==b.x||D!==b.y);const L=c!=="chart"&&!S&&!h&&!u,T=a.showArrow??this.showArrow??L;this.arrowPosition=T?KB[y]:void 0,this.updateClassModifiers(),t.style.translate=`${M}px ${D}px`}show(t,e,i,s,o,a=!1){const{element:n}=this;if(n!=null&&s!=null&&s.length!==0){const c=WB(this.localeManager,s,this.mode,this.pagination?o:void 0);if(c==null){this.toggle(!1);return}n.innerHTML=c}else if(n==null||n.innerHTML===""){this.toggle(!1);return}const r={x:t.x-e.x,y:t.y-e.y,width:t.width,height:t.height};switch(this.positionParams={canvasRect:e,relativeRect:r,meta:i},i.position?.anchorTo??this.position.anchorTo??i.position?.defaultAnchorTo??this.position.defaultAnchorTo){case"node":this.springAnimation.update(i.nodeCanvasX??i.canvasX,i.nodeCanvasY??i.canvasY);break;case"pointer":this.springAnimation.update(i.canvasX,i.canvasY);break;case"chart":this.springAnimation.reset()}i.enableInteraction?(this.enableInteraction=!0,n.style.pointerEvents="auto",n.removeAttribute("aria-hidden"),n.tabIndex=-1):(this.enableInteraction=!1,n.style.pointerEvents="none",n.setAttribute("aria-hidden","true"),n.removeAttribute("tabindex")),n.style.setProperty("--top",`${e.top}px`),n.style.setProperty("--left",`${e.left}px`),this.updateClassModifiers(),this.toggle(!0,a)}hide(){this.toggle(!1)}toggle(t,e=!1){const{delay:i}=this;t&&i>0&&!e?this._showTimeout??(this._showTimeout=setTimeout(()=>{this._showTimeout=void 0,this.toggleCallback(!0)},i)):(clearTimeout(this._showTimeout),this._showTimeout=void 0,this.toggleCallback(t))}toggleCallback(t){this.element?.isConnected&&this._visible!==t&&(this._visible=t,this.element.togglePopover(t),t?this.updateTooltipPosition():this.springAnimation.reset())}updateClassModifiers(){if(!this.element?.isConnected)return;const{classList:t}=this.element,e=(i,s)=>t.toggle(`${rs}--${i}`,s);e("no-interaction",!this.enableInteraction),e("arrow-top",this.arrowPosition===1),e("arrow-right",this.arrowPosition===3),e("arrow-bottom",this.arrowPosition===2),e("arrow-left",this.arrowPosition===0),e("compact",this.mode==="compact"),t.toggle(rC,this.darkTheme);for(const i of this.wrapTypes)t.toggle(`${rs}--wrap-${i}`,i===this.wrapping)}getTooltipBounds(t){const{elementSize:e,anchorTo:i,placement:s,canvasX:o,canvasY:a,yOffset:n,xOffset:r,canvasRect:l}=t,{width:c,height:h}=e,u={width:c,height:h};if(i==="node"||i==="pointer"){const d=HB[s],p=YB[s];return u.top=a+n+h*(p-1)/2+8*p,u.left=o+r+c*(d-1)/2+8*d,u}switch(s){case"top":return u.top=n,u.left=l.width/2-c/2+r,u;case"right":return u.top=l.height/2-h/2+n,u.left=l.width-c/2+r,u;case"left":return u.top=l.height/2-h/2+n,u.left=r,u;case"bottom":return u.top=l.height-h+n,u.left=l.width/2-c/2+r,u;case"top-left":return u.top=n,u.left=r,u;case"top-right":return u.top=n,u.left=l.width-c+r,u;case"bottom-right":return u.top=l.height-h+n,u.left=l.width-c+r,u;case"bottom-left":return u.top=l.height-h+n,u.left=r,u}return u}},v([A(bt)],ma.prototype,"enabled",2),v([A($B)],ma.prototype,"mode",2),v([A(bt,{optional:!0})],ma.prototype,"showArrow",2),v([A(lt)],ma.prototype,"delay",2),v([A(Jf,{optional:!0})],ma.prototype,"range",2),v([A(Qf)],ma.prototype,"wrapping",2),v([A(ct)],ma.prototype,"position",2),v([A(bt)],ma.prototype,"pagination",2),v([A(bt)],ma.prototype,"darkTheme",2),v([A(fe(["extended","canvas"]))],ma.prototype,"bounds",2)}});function uC(t,e){return t.series===e.series&&dr(t.datumIndex,e.datumIndex)}function p7(t,e){return t.type!==e}var qB,QB,g7=k({"packages/ag-charts-community/src/chart/series/seriesAreaManager.ts"(){"use strict";P(),Jq(),t7(),ms(),kc(),Bo(),qt(),MR(),cT(),s7(),GI(),r7(),wm(),qB=class{constructor(){this.candidates=[]}get current(){return this.active}reset(){this.candidates.length=0,this.active=void 0}update(t,e){this.candidates=t;let i=e!=null?t.findIndex(s=>uC(s,e)):-1;return i===-1&&(i=0),this.active=t[i],{current:this.active,index:i,length:t.length}}next(){const{candidates:t,active:e}=this,i=e==null?-1:t.findIndex(o=>uC(o,e));if(i===-1)return;let s=i+1;return s>=t.length&&(s=0),this.active=t[s],{current:this.active,index:s,length:this.candidates.length}}},QB=class extends fl{constructor(t){super(),this.chart=t,this.id=la(this),this.series=[],this.highlight={pendingHoverEvent:void 0,appliedHoverEvent:void 0,stashedHoverEvent:void 0},this.tooltip={lastHover:void 0},this.hoverDevice="pointer",this.previousInputDevice="keyboard",this.focus={sortedSeries:[],series:void 0,seriesIndex:0,datumIndex:0,datum:void 0},this.hoverScheduler=lZ(()=>{if(!(!this.tooltip.lastHover&&!this.highlight.pendingHoverEvent)){if(this.chart.getUpdateType()<=4){this.hoverScheduler.schedule();return}this.highlight.pendingHoverEvent&&this.handleHoverHighlight(!1),this.tooltip.lastHover&&this.handleHoverTooltip(this.tooltip.lastHover,!1)}}),this.tooltipCandidates=new qB;const e=t.ctx.domManager.addChild("series-area","series-area-aria-label1"),i=t.ctx.domManager.addChild("series-area","series-area-aria-label2");this.swapChain=new TB(e,i,this.id,"img"),this.swapChain.addListener("blur",n=>this.onBlur(n)),this.swapChain.addListener("focus",()=>this.onFocus()),t.ctx.domManager.mode==="normal"&&(this.focusIndicator=new IB(this.swapChain),this.focusIndicator.overrideFocusVisible(t.mode==="integrated"?!1:void 0));const{seriesDragInterpreter:s,seriesWidget:o,containerWidget:a}=t.ctx.widgets;o.setTabIndex(-1),this.destroyFns.push(()=>t.ctx.domManager.removeChild("series-area","series-area-aria-label1"),()=>t.ctx.domManager.removeChild("series-area","series-area-aria-label2"),o.addListener("focus",()=>this.swapChain.focus()),o.addListener("mousemove",n=>this.onHover(n)),o.addListener("wheel",n=>this.onWheel(n)),o.addListener("mouseleave",n=>this.onLeave(n)),o.addListener("keydown",n=>this.onKeyDown(n)),o.addListener("contextmenu",(n,r)=>this.onContextMenu(n,r)),s.addListener("drag-move",n=>this.onDragMove(n)),s.addListener("click",n=>this.onClick(n,o)),s.addListener("dblclick",n=>this.onClick(n,o)),a.addListener("contextmenu",(n,r)=>this.onContextMenu(n,r)),a.addListener("click",(n,r)=>this.onClick(n,r)),a.addListener("dblclick",(n,r)=>this.onClick(n,r)),t.ctx.animationManager.addListener("animation-start",()=>this.clearAll()),t.ctx.domManager.addListener("resize",()=>this.clearAll()),t.ctx.highlightManager.addListener("highlight-change",n=>this.changeHighlightDatum(n)),t.ctx.layoutManager.addListener("layout:complete",n=>this.layoutComplete(n)),t.ctx.updateService.addListener("pre-scene-render",()=>this.preSceneRender()),t.ctx.updateService.addListener("update-complete",()=>this.updateComplete()),t.ctx.zoomManager.addListener("zoom-change",()=>this.clearAll()),t.ctx.zoomManager.addListener("zoom-pan-start",()=>this.clearAll()))}isState(t){return this.chart.ctx.interactionManager.isState(t)}isIgnoredTouch(t){return!(t.device!=="touch"||t.type==="click"||this.chart.ctx.chartService.touch.dragAction==="hover"||this.chart.ctx.chartService.touch.dragAction==="drag"&&this.isState(9))}dataChanged(){var t;(t=this.highlight).stashedHoverEvent??(t.stashedHoverEvent=this.highlight.appliedHoverEvent),this.chart.ctx.tooltipManager.removeTooltip(this.id),this.focusIndicator?.clear(),this.clearHighlight()}preSceneRender(){this.highlight.stashedHoverEvent!=null&&(this.highlight.pendingHoverEvent=this.highlight.stashedHoverEvent,this.highlight.stashedHoverEvent=void 0,this.handleHoverHighlight(!0)),this.tooltip.lastHover!=null&&this.handleHoverTooltip(this.tooltip.lastHover,!0)}updateComplete(){this.isState(34)&&this.focusIndicator?.isFocusVisible()&&this.handleSeriesFocus(0,0,!0)}update(t,e){this.chart.ctx.updateService.update(t,e)}seriesChanged(t){this.focus.sortedSeries=[...t].sort((e,i)=>{let s=e.properties.focusPriority??1/0,o=i.properties.focusPriority??1/0;return s===o&&([s,o]=[e._declarationOrder,i._declarationOrder]),s<o?-1:s>o?1:0}),this.series=t}layoutComplete(t){this.seriesRect=t.series.rect,this.hoverRect=t.series.paddedRect,this.chart.ctx.widgets.seriesWidget.setBounds(t.series.paddedRect),this.chart.ctx.domManager.mode==="normal"&&this.chart.ctx.widgets.chartWidget.setBounds(t.chart)}onContextMenu(t,e){const{sourceEvent:i}=t;if(i.currentTarget!=e.getElement())return;if(i.target==this.chart.ctx.widgets.containerWidget.getElement()){if(this.isState(36)){const{currentX:l,currentY:c}=t;this.chart.ctx.contextMenuRegistry.dispatchContext("all",{sourceEvent:i,canvasX:l,canvasY:c},{})}return}let s,o;if(this.focusIndicator?.isFocusVisible())s=this.chart.ctx.highlightManager.getActiveHighlight(),s&&this.seriesRect&&s.midPoint&&(o=Ke.toCanvasPoint(s.series.contentGroup,s.midPoint.x,s.midPoint.y));else if(this.isState(36)){const l=this.pickNodes({x:t.currentX,y:t.currentY},"context-menu");l&&(this.chart.ctx.highlightManager.updateHighlight(this.id),s=l.matches[0].datum)}const a=s?.series;this.clearAll();const n=t.currentX+e.cssLeft(),r=t.currentY+e.cssTop();this.chart.ctx.contextMenuRegistry.dispatchContext("series-area",{sourceEvent:i,canvasX:n,canvasY:r},{pickedSeries:a,pickedNode:s},o)}onLeave(t){!this.isState(41)||t.sourceEvent.relatedTarget?.className==="ag-charts-text-input__textarea"||this.chart.ctx.tooltipManager.isEnteringInteractiveTooltip(t.sourceEvent)||(this.chart.ctx.domManager.updateCursor(this.id),this.hoverDevice!=="keyboard"&&this.clearAll())}onWheel(t){this.isState(41)&&(this.focusIndicator?.overrideFocusVisible(!1),this.previousInputDevice="pointer")}onDragMove(t){this.isState(41)&&(this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(t))}onHover(t){this.isState(41)&&this.onHoverLikeEvent(t)}onHoverLikeEvent(t){if(!this.isIgnoredTouch(t)&&((t.device==="touch"||p7(t,"drag-move"))&&(this.tooltip.lastHover=t),t.device==="touch"&&this.chart.ctx.chartService.touch.dragAction==="hover"&&t.sourceEvent.preventDefault(),this.hoverDevice="pointer",this.previousInputDevice="pointer",this.highlight.pendingHoverEvent=t,this.hoverScheduler.schedule(),this.isState(32))){const{currentX:e,currentY:i}=t,s=this.pickNodes({x:e,y:i},"event")?.matches,o=s?.[0];o?.series.hasEventListener("seriesNodeClick")||o?.series.hasEventListener("seriesNodeDoubleClick")||s!=null&&s.length>1&&this.chart.tooltip.pagination?this.chart.ctx.domManager.updateCursor(this.id,"pointer"):this.chart.ctx.domManager.updateCursor(this.id)}}onClick(t,e){if(t.device==="touch"&&e===this.chart.ctx.widgets.seriesWidget&&this.swapChain.focus({preventScroll:!0}),!this.isState(41))return;if(e===this.chart.ctx.widgets.seriesWidget){if(!e.getElement().contains(t.sourceEvent.target))return}else if(t.sourceEvent.target!=e.getElement())return;if(this.focusIndicator?.overrideFocusVisible(!1),this.onHoverLikeEvent(t),!this.isState(32))return;if(e==this.chart.ctx.widgets.seriesWidget&&this.checkSeriesNodeClick(t)){this.update(4),t.sourceEvent.preventDefault();return}const i={type:t.type==="click"?"click":"doubleClick",event:t.sourceEvent};this.chart.fireEvent(i)}onFocus(){this.isState(34)&&(this.hoverDevice=this.focusIndicator?.isFocusVisible(!0)?"keyboard":"pointer",this.handleFocus(0,0))}onBlur(t){this.isState(34)&&(this.hoverDevice="pointer",this.chart.ctx.tooltipManager.isEnteringInteractiveTooltip(t)||this.clearAll(),this.focusIndicator?.overrideFocusVisible(void 0))}onKeyDown(t){if(!this.isState(43))return;const e=i7(t.sourceEvent);switch(e?.activatesFocusIndicator===!1&&this.focusIndicator?.overrideFocusVisible(this.previousInputDevice==="keyboard"),e?.name){case"redo":return this.chart.ctx.chartEventManager.seriesEvent("series-redo");case"undo":return this.chart.ctx.chartEventManager.seriesEvent("series-undo");case"zoomin":return this.chart.ctx.chartEventManager.seriesKeyNavZoom(1,t);case"zoomout":return this.chart.ctx.chartEventManager.seriesKeyNavZoom(-1,t);case"arrowup":return this.onArrow(-1,0,t);case"arrowdown":return this.onArrow(1,0,t);case"arrowleft":return this.onArrow(0,-1,t);case"arrowright":return this.onArrow(0,1,t);case"submit":return this.onSubmit(t)}}onArrow(t,e,i){this.isState(34)&&(this.hoverDevice="keyboard",this.previousInputDevice="keyboard",this.focusIndicator?.overrideFocusVisible(!0),this.focus.seriesIndex+=t,this.focus.datumIndex+=e,this.handleFocus(t,e),i.sourceEvent.preventDefault(),this.chart.ctx.chartEventManager.seriesEvent("series-focus-change"))}onSubmit(t){if(!this.isState(34))return;const{series:e,datum:i}=this.focus,s=t.sourceEvent;e!==void 0&&i!==void 0?e.fireNodeClickEvent(s,i):this.chart.fireEvent({type:"click",event:s}),s.preventDefault()}checkSeriesNodeClick(t){var e;const i=this.pickNodes({x:t.currentX,y:t.currentY},"event");if(i==null||i.matches.length===0)return;const s=this.chart.tooltip.pagination?this.tooltipCandidates.update(i.matches,this.tooltipCandidates.current)?.current:void 0,{series:o,datum:a}=s??i.matches[0],n=s==null?i.distance:0;if(t.type==="click"){const l=o.fireNodeClickEvent(t.sourceEvent,a)&&this.chart.tooltip.pagination?this.tooltipCandidates.next():void 0;if(l!=null){t.sourceEvent.preventDefault();const{currentX:c,currentY:h}=t,u=c+(this.hoverRect?.x??0),d=h+(this.hoverRect?.y??0);(e=this.highlight).pendingHoverEvent??(e.pendingHoverEvent=this.highlight.appliedHoverEvent),this.handleHoverHighlight(!1),this.showTooltip(l.current,u,d,{index:l.index,length:l.length})}return!0}return t.type==="dblclick"?(t.preventZoomDblClick=n===0,o.fireNodeDoubleClickEvent(t.sourceEvent,a),!0):!1}handleFocus(t,e){const i=this.chart.overlays.getFocusInfo(this.chart.ctx.localeManager);i==null?this.handleSeriesFocus(t,e):this.focusIndicator?.update(i.rect,this.seriesRect,!1)}handleSeriesFocus(t,e,i=!1){if(this.chart.chartType==="hierarchy"||this.chart.chartType==="gauge"){this.handleSoloSeriesFocus(t,e,i);return}const{focus:s}=this,o=s.sortedSeries.filter(c=>c.visible&&c.focusable);if(o.length===0)return;const a=s.datumIndex-e,n=s.seriesIndex-t;s.seriesIndex=Tt(0,s.seriesIndex,o.length-1),s.series=o[s.seriesIndex];const r=this.focus.datumIndex,l=this.focus.seriesIndex;this.updatePickedFocus(r,e,a,l,t,n,i)}handleSoloSeriesFocus(t,e,i){this.focus.series=this.focus.sortedSeries[0];const s=this.focus.datumIndex,o=this.focus.seriesIndex,a=this.focus.datumIndex-e,n=this.focus.seriesIndex-t;this.updatePickedFocus(s,e,a,o,t,n,i)}updatePickedFocus(t,e,i,s,o,a,n){const{focus:r,hoverRect:l,seriesRect:c}=this;if(r.series===void 0||l===void 0)return;const h=r?.series?.pickFocus({datumIndex:t,datumIndexDelta:e,otherIndex:s,otherIndexDelta:o,seriesRect:c});if(!h)return;const{datum:u}=h;if(h.otherIndex!==void 0&&(r.seriesIndex=h.otherIndex),r.datumIndex=h.datumIndex,r.datum=u,this.focusIndicator?.isFocusVisible()&&this.chart.ctx.animationManager.reset(),this.focusIndicator?.isFocusVisible()){const p=a7(h),{x:g,y:f}=p.computeCenter();if(!l.containsPoint(g,f)&&this.chart.ctx.zoomManager.panToBBox(this.id,l,p))return;const{x1:x,x2:y,y1:b,y2:S}=Ep.from(p),M=l.containsPoint(x,b),D=l.containsPoint(y,b),L=l.containsPoint(x,S),T=l.containsPoint(y,S);if(!(M||D||L||T)){const I=Ep.from(l);h.movedBounds=p.clone(),x<I.x1&&y<I.x1?(h.movedBounds.x=I.x1-2,h.movedBounds.width=4):x>I.x2&&y>I.x2&&(h.movedBounds.x=I.x2-2,h.movedBounds.width=4),b<I.y1&&S<I.y1?(h.movedBounds.y=I.y1-2,h.movedBounds.height=4):b>I.y2&&S>I.y2&&(h.movedBounds.y=I.y2-2,h.movedBounds.height=4)}}this.focusIndicator?.update(h.movedBounds??h.bounds,this.seriesRect,h.clipFocusBox);const d=n7(r.series,l,h);if(d!==void 0&&this.hoverDevice==="keyboard"){this.tooltip.lastHover=void 0,this.highlight.appliedHoverEvent=void 0,this.highlight.pendingHoverEvent=void 0,this.highlight.stashedHoverEvent=void 0;const p=this.chart.getTooltipContent(r.series,u.datumIndex,u),g=um.makeTooltipMeta(d,r.series,u,h.movedBounds);this.chart.ctx.highlightManager.updateHighlight(this.id,u),r.series.tooltipEnabled??this.chart.tooltip.enabled?this.chart.ctx.tooltipManager.updateTooltip(this.id,g,p):this.chart.ctx.tooltipManager.removeTooltip(this.id),n||(e===0&&o===0||i!==h.datumIndex||a!==(h.otherIndex??r.seriesIndex))&&this.swapChain.update(this.getDatumAriaText(u,p))}}getDatumAriaText(t,e){const i=e==null?"":GB(e);return this.chart.ctx.localeManager.t("ariaAnnounceHoverDatum",{datum:t.series.getDatumAriaText?.(t,i)??i})}clearHighlight(){this.highlight.pendingHoverEvent=void 0,this.highlight.appliedHoverEvent=void 0,this.chart.ctx.highlightManager.updateHighlight(this.id)}clearTooltip(){this.chart.ctx.tooltipManager.removeTooltip(this.id),this.tooltip.lastHover=void 0}clearAll(){this.clearHighlight(),this.clearTooltip(),this.focusIndicator?.clear()}handleHoverHighlight(t){this.highlight.appliedHoverEvent=this.highlight.pendingHoverEvent,this.highlight.pendingHoverEvent=void 0;const e=this.highlight.appliedHoverEvent;if(!e||!this.isState(41))return;const{currentX:i,currentY:s}=e,o=e.currentX+(this.hoverRect?.x??0),a=e.currentY+(this.hoverRect?.y??0);if(t?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(o,a)){this.clearHighlight();return}const{range:n}=this.chart.highlight,r=n==="tooltip"?"highlight-tooltip":"highlight",l=this.pickNodes({x:i,y:s},r);if(!l||l.matches.length===0){this.chart.ctx.highlightManager.updateHighlight(this.id);return}const{current:c}=this.tooltipCandidates,u=(c==null?void 0:l.matches.find(d=>uC(d,c)))?.datum??l.matches[0].datum;this.chart.ctx.highlightManager.updateHighlight(this.id,u),this.hoverDevice="pointer"}handleHoverTooltip(t,e){const{current:i}=this.tooltipCandidates;if(this.tooltipCandidates.reset(),!this.isState(41))return;const{currentX:s,currentY:o}=t,a=s+(this.hoverRect?.x??0),n=o+(this.hoverRect?.y??0),r=t.sourceEvent.target;if(e?this.chart.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(a,n)){this.hoverDevice=="pointer"&&this.clearTooltip();return}if(r&&this.chart.tooltip.interactive&&this.chart.ctx.domManager.isManagedChildDOMElement(r,"canvas-overlay",rs))return;const l=this.pickNodes({x:t.currentX,y:t.currentY},"tooltip");if(!l||l.matches.length===0){this.hoverDevice=="pointer"&&this.clearTooltip();return}if(this.hoverDevice="pointer",l.distance===0){const{current:c,index:h,length:u}=this.tooltipCandidates.update(l.matches,this.chart.tooltip.pagination?i:void 0);this.showTooltip(c,a,n,{index:h,length:u})}else this.showTooltip(l.matches[0],a,n)}showTooltip({series:t,datum:e,datumIndex:i},s,o,a){const n=this.chart.getTooltipContent(t,i,e);if((t.tooltipEnabled??this.chart.tooltip.enabled)&&n!=null){const c=um.makeTooltipMeta({type:"pointermove",canvasX:s,canvasY:o},t,e,void 0);this.chart.ctx.tooltipManager.updateTooltip(this.id,c,n,a)}else this.chart.ctx.tooltipManager.removeTooltip(this.id)}changeHighlightDatum(t){const e=new Set,{series:i=void 0,datum:s}=t.currentHighlight??{},{series:o=void 0,datum:a}=t.previousHighlight??{};o&&e.add(o),i&&e.add(i),o?.properties.cursor&&a&&this.chart.ctx.domManager.updateCursor(o.id),i?.properties.cursor&&i?.properties.cursor!=="default"&&s&&this.chart.ctx.domManager.updateCursor(i.id,i.properties.cursor),i==null||o==null?this.update(4):this.update(4,{seriesToUpdate:e})}pickNodes(t,e,i){const s=[...this.series].reverse();let o;for(const a of s){if(!a.visible||!a.contentGroup.visible)continue;const n=a.pickNodes(t,e,i);if(n==null||n.datums.length===0)continue;const{datums:r,distance:l}=n;if(n.datums.length!==0){if(l===0){o?.distance!==0&&(o={matches:[],distance:0});for(const c of r){const{datumIndex:h}=c;o.matches.push({series:a,datum:c,datumIndex:h})}}else if(o==null||o.distance>l){const[c]=r,{datumIndex:h}=c;o={matches:[{series:a,datum:c,datumIndex:h}],distance:l}}}}return o}}}}),dC,JB,f7=k({"packages/ag-charts-community/src/chart/series/seriesLayerManager.ts"(){"use strict";P(),Ve(),eR(),dC=30,JB=class{constructor(t){this.seriesRoot=t,this.groups=new Map,this.series=new Map,this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(t){this.expectedSeriesCount=t}requestGroup(t){const{internalId:e,type:i,contentGroup:s,seriesGrouping:o}=t,{groupIndex:a=e}=o??{},n=this.series.get(e);if(n!=null)throw new Error(`AG Charts - series already has an allocated layer: ${JSON.stringify(n)}`);this.series.size===0&&(this.mode=this.expectedSeriesCount>=dC?"aggressive-grouping":"normal");let r=this.groups.get(i);r==null&&(r=new Map,this.groups.set(i,r));const l=this.lookupIdx(a);let c=r.get(l);return c==null&&(c={type:i,id:l,seriesIds:[],group:this.seriesRoot.appendChild(new It({name:`${t.contentGroup.name??i}-managed-layer`,zIndex:t.contentGroup.zIndex,renderToOffscreenCanvas:!1}))},r.set(l,c)),this.series.set(e,{layerState:c,seriesConfig:t}),c.seriesIds.push(e),c.group.appendChild(s),c.group}changeGroup(t){const{internalId:e,seriesGrouping:i,type:s,contentGroup:o,oldGrouping:a}=t,{groupIndex:n=e}=i??{};this.groups.get(s)?.get(n)?.seriesIds.includes(e)||(this.series.has(e)&&this.releaseGroup({internalId:e,seriesGrouping:a,type:s,contentGroup:o}),this.requestGroup(t))}releaseGroup(t){const{internalId:e,contentGroup:i,type:s}=t;if(!this.series.has(e))throw new Error(`AG Charts - series doesn't have an allocated layer: ${e}`);const o=this.series.get(e)?.layerState;o&&(o.seriesIds=o.seriesIds.filter(a=>a!==e),o.group.removeChild(i)),o?.seriesIds.length===0?(this.seriesRoot.removeChild(o.group),this.groups.get(o.type)?.delete(o.id),this.groups.get(s)?.delete(e)):o!=null&&o.seriesIds.length>0&&(o.group.zIndex=this.getLowestSeriesZIndex(o.seriesIds)),this.series.delete(e)}updateLayerCompositing(){this.groups.forEach(t=>{t.forEach(e=>{const{group:i,seriesIds:s}=e;let o;s.length===0?o=!1:s.length>1?o=!0:o=this.series.get(s[0])?.seriesConfig.renderToOffscreenCanvas()===!0,i.renderToOffscreenCanvas=o,i.zIndex=this.getLowestSeriesZIndex(s)})})}lookupIdx(t){return this.mode==="normal"?t:typeof t=="string"&&(t=Number(t.split("-").at(-1)),!t)?0:Math.floor(Tt(0,t/this.expectedSeriesCount,1)*dC)}destroy(){this.groups.forEach(t=>{t.forEach(e=>{this.seriesRoot.removeChild(e.group)})}),this.groups.clear(),this.series.clear()}getLowestSeriesZIndex(t){return t.reduce((i,s)=>{const a=this.series.get(s)?.seriesConfig.contentGroup.zIndex;return i==null||a==null?a:tR(i,a)<=0?i:a},void 0)??1}}}}),pC,m7=k({"packages/ag-charts-community/src/chart/touch.ts"(){"use strict";ge(),Nt(),pC=class extends Ct{constructor(){super(...arguments),this.dragAction="drag"}},v([A(fe(["none","drag","hover"]))],pC.prototype,"dragAction",2)}}),tz,y7=k({"packages/ag-charts-community/src/chart/update/dataWindowProcessor.ts"(){"use strict";tz=class{constructor(t,e,i,s,o){this.chart=t,this.dataService=e,this.updateService=i,this.zoomManager=s,this.animationManager=o,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",()=>this.onDataSourceChange()),this.dataService.addListener("data-load",()=>this.onDataLoad()),this.dataService.addListener("data-error",()=>this.onDataError()),this.updateService.addListener("update-complete",()=>this.onUpdateComplete()),this.zoomManager.addListener("zoom-change",()=>this.onZoomChange()))}destroy(){this.destroyFns.forEach(t=>t())}onDataLoad(){this.animationManager.skip(),this.updateService.update(1)}onDataError(){this.updateService.update(3)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(){!this.dirtyZoom&&!this.dirtyDataSource||this.updateWindow()}onZoomChange(){this.dirtyZoom=!0}updateWindow(){if(!this.dataService.isLazy())return;const t=this.getValidAxis();let e,i=!0;if(t){const s=this.zoomManager.getAxisZoom(t.id);e=this.getAxisWindow(t,s),i=this.shouldRefresh(t,s)}this.dirtyZoom=!1,this.dirtyDataSource=!1,i&&this.dataService.load({windowStart:e?.min,windowEnd:e?.max})}getValidAxis(){return this.chart.axes.find(t=>t.type==="time")}shouldRefresh(t,e){if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;const i=this.lastAxisZooms.get(t.id);return i&&e.min===i.min&&e.max===i.max?!1:(this.lastAxisZooms.set(t.id,e),!0)}getAxisWindow(t,e){const{domain:i}=t.scale;if(!e||i.length===0||isNaN(Number(i[0])))return;const s=Number(i[1])-Number(i[0]),o=new Date(Number(i[0])+s*e.min),a=new Date(Number(i[0])+s*e.max);return{min:o,max:a}}}}});function x7(){const{userAgent:t}=xe("navigator");if(ez.test(t)){const e=iz.exec(t);if(e==null)return!1;const i=parseFloat(e[1]),s=Math.floor(i)>16;return s||tt.warnOnce(`Unsupported Safari version: ${i}; ${t}`),!s}else if(sz.test(t)&&!az.test(t)&&!nz.test(t)){const e=oz.exec(t);if(e==null)return!1;const i=parseInt(e[1],10),s=i>126;return s||tt.warnOnce(`Unsupported Chrome version: ${i}; ${t}`),!s}return!1}var ez,iz,sz,oz,az,nz,b7=k({"packages/ag-charts-community/src/util/browser.ts"(){"use strict";P(),ez=/^((?!chrome|android).)*safari/i,iz=/Version\/(\d+(\.\d+)?)/,sz=/Chrome/,oz=/Chrome\/(\d+)/,az=/Edg/,nz=/OPR/}}),rz,lz,S7=k({"packages/ag-charts-community/src/chart/update/overlaysProcessor.ts"(){"use strict";Qs(),b7(),QT(),rz=new Set(["map-shape-background","map-line-background"]),lz=class{constructor(t,e,i,s,o,a,n){this.chartLike=t,this.overlays=e,this.dataService=i,this.layoutManager=s,this.localeManager=o,this.animationManager=a,this.domManager=n,this.destroyFns=[],this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle($S),this.destroyFns.push(this.layoutManager.addListener("layout:complete",r=>this.onLayoutComplete(r)))}destroy(){this.destroyFns.forEach(t=>t()),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete({series:{rect:t}}){const e=this.dataService.isLoading(),i=this.chartLike.series.some(c=>c.hasData),s=this.chartLike.series.some(c=>c.visible&&!rz.has(c.type));this.overlays.darkTheme?this.overlayElem.classList.add(qT):this.overlayElem.classList.remove(qT),this.overlayElem.style.left=`${t.x}px`,this.overlayElem.style.top=`${t.y}px`,this.overlayElem.style.width=`${t.width}px`,this.overlayElem.style.height=`${t.height}px`;const o=e,a=!e&&!i,n=i&&!s,r=this.overlays.unsupportedBrowser.enabled&&x7();o?this.showOverlay(this.overlays.loading,t):this.hideOverlay(this.overlays.loading),a?this.showOverlay(this.overlays.noData,t):this.hideOverlay(this.overlays.noData),n?this.showOverlay(this.overlays.noVisibleSeries,t):this.hideOverlay(this.overlays.noVisibleSeries),r?this.showOverlay(this.overlays.unsupportedBrowser,t):this.hideOverlay(this.overlays.unsupportedBrowser);const l=o||a||n||r;ve(this.overlayElem,"aria-hidden",!l)}showOverlay(t,e){if(!t.enabled)return;const i=t.getElement(this.animationManager,this.localeManager,e);this.overlayElem.appendChild(i)}hideOverlay(t){t.removeElement(()=>{this.overlayElem.innerText="\xA0"},this.animationManager)}}}}),Za,qS,Si,Em,QS=k({"packages/ag-charts-community/src/chart/chart.ts"(){"use strict";P(),hr(),Ve(),FX(),Ui(),Jh(),Bo(),zo(),nZ(),qt(),SR(),qA(),ge(),bo(),MR(),Nt(),pl(),MZ(),q8(),Q8(),BP(),WP(),CS(),LS(),vT(),wS(),Sq(),vq(),Uq(),Yq(),ku(),$q(),Xq(),qq(),Cu(),g7(),f7(),wm(),m7(),y7(),S7(),Za=ee.create(!0,"opts"),qS=class extends Ct{constructor(){super(...arguments),this.padding=new dl(0)}},v([A(bt,{optional:!0})],qS.prototype,"clip",2),v([A(ct)],qS.prototype,"padding",2),Si=class o6 extends ZA{constructor(e,i){var s;super(),this.id=la(this),this.seriesRoot=new qs({name:`${this.id}-series-root`,zIndex:5}),this.annotationRoot=new qs({name:`${this.id}-annotation-root`,zIndex:9}),this.titleGroup=new It({name:"titles",zIndex:13}),this.debug=ee.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this._autoSizeNotify=new YA,this.padding=new dl(20),this.seriesArea=new qS,this.keyboard=new _S,this.touch=new pC,this.mode="standalone",this.chartCaptions=new nm,this.suppressFieldDotNotation=!1,this.destroyed=!1,this._destroyFns=[],this.skipSync=!1,this.chartAnimationPhase="initial",this.modulesManager=new DB,this.processors=[],this.queuedUserOptions=[],this.queuedChartOptions=[],this.firstApply=!0,this._pendingFactoryUpdatesCount=0,this._performUpdateSkipAnimations=!1,this._performUpdateNotify=new YA,this.performUpdateType=7,this.runningUpdateType=7,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new bR,this.updateRequestors={},this.performUpdateTrigger=cZ(({count:h})=>{this.destroyed||this.updateMutex.acquire(async()=>{try{await this.performUpdate(h)}catch(u){tt.error("update error",u)}}).catch(u=>tt.errorOnce(u))}),this._performUpdateSplits={},this.axes=[],this.series=[],this._cachedData=void 0,this.onSeriesNodeClick=h=>{this.fireEvent(h)},this.onSeriesNodeDoubleClick=h=>{this.fireEvent(h)},this.onSeriesVisibilityChange=h=>{this.fireEvent(h)},this.seriesGroupingChanged=h=>{if(!(h instanceof ZS))return;const{series:u,seriesGrouping:d,oldGrouping:p}=h;u.contentGroup.isRoot()||this.seriesLayerManager.changeGroup({internalId:u.internalId,type:u.type,contentGroup:u.contentGroup,renderToOffscreenCanvas:()=>u.renderToOffscreenCanvas(),seriesGrouping:d,oldGrouping:p})},this.chartOptions=e;const o=i?.scene,a=i?.container??e.processedOptions.container??void 0,n=i?.styleContainer??e.specialOverrides.styleContainer;o&&(this._firstAutoSize=!1,this._lastAutoSize=[o.width,o.height,o.pixelRatio]);const r=new It({name:"root"});r.visible=!1,r.append(this.seriesRoot),r.append(this.annotationRoot),r.append(this.titleGroup),this.titleGroup.append(this.title.node),this.titleGroup.append(this.subtitle.node),this.titleGroup.append(this.footnote.node),this.tooltip=new ma,this.seriesLayerManager=new JB(this.seriesRoot),this.mode=e.userOptions.mode??this.mode;const l=this.ctx=new FP(this,{chartType:this.getChartType(),scene:o,root:r,container:a,styleContainer:n,domMode:e.optionMetadata.domMode,syncManager:new XP(this),fireEvent:h=>this.fireEvent(h),updateCallback:(h,u)=>this.update(h,u),updateMutex:this.updateMutex});this._destroyFns.push(l.domManager.addListener("resize",()=>this.parentResize(l.domManager.containerSize))),this.overlays=new Au,(s=this.overlays.loading).renderer??(s.renderer=()=>Zq(this.overlays.loading.getText(l.localeManager),l.animationManager.defaultDuration)),this.processors=[new tz(this,l.dataService,l.updateService,l.zoomManager,l.animationManager),new lz(this,this.overlays,l.dataService,l.layoutManager,l.localeManager,l.animationManager,l.domManager)],this.highlight=new pT,this.container=a;const c=this.getModuleContext();l.domManager.setDataBoolean("animating",!1),this.seriesAreaManager=new QB(this.initSeriesAreaDependencies()),this._destroyFns.push(l.layoutManager.registerElement(0,h=>{h.layoutBox.shrink(this.padding.toJson()),this.chartCaptions.positionCaptions(h)}),l.layoutManager.addListener("layout:complete",h=>this.chartCaptions.positionAbsoluteCaptions(h)),l.dataService.addListener("data-load",h=>{this.data=h.data}),this.title.registerInteraction(c,"beforebegin"),this.subtitle.registerInteraction(c,"beforebegin"),this.footnote.registerInteraction(c,"afterend"),Rn.addWindowEvent("page-left",()=>this.destroy()),l.animationManager.addListener("animation-frame",()=>{this.update(6)}),l.animationManager.addListener("animation-start",()=>l.domManager.setDataBoolean("animating",!0)),l.animationManager.addListener("animation-stop",()=>l.domManager.setDataBoolean("animating",!1)),l.zoomManager.addListener("zoom-change",()=>{this.series.forEach(u=>u.animationState?.transition("updateData"));const h=this.chartAnimationPhase!=="initial";this.update(3,{forceNodeDataRefresh:!0,skipAnimations:h})})),this.parentResize(l.domManager.containerSize)}static getInstance(e){return o6.chartsInstances.get(e)}get canvasElement(){return this.ctx.scene.canvas.element}download(e,i){this.ctx.scene.download(e,i)}getCanvasDataURL(e){return this.ctx.scene.getDataURL(e)}toSVG(){return this.ctx.scene.toSVG()}getOptions(){return this.queuedUserOptions.at(-1)??this.chartOptions.userOptions}getChartOptions(){return this.queuedChartOptions.at(-1)??this.chartOptions}overrideFocusVisible(e){this.seriesAreaManager.focusIndicator?.overrideFocusVisible(e)}initSeriesAreaDependencies(){const{ctx:e,tooltip:i,highlight:s,overlays:o,seriesRoot:a,mode:n}=this,r=this.getChartType();return{fireEvent:this.fireEvent.bind(this),getUpdateType:()=>this.performUpdateType,getTooltipContent:(u,d,p)=>this.getTooltipContent(u,d,p),chartType:r,ctx:e,tooltip:i,highlight:s,overlays:o,seriesRoot:a,mode:n}}getModuleContext(){return this.ctx}getTooltipContent(e,i,s){const o=e.properties.tooltip.enabled!==!1?e.getTooltipContent(i,s):void 0,a=o==null?[]:[o];if(this.tooltip.mode!=="shared"||this.series.length===1)return a;const n=e.getCategoryValue(i);return n==null?a:this.series.flatMap(r=>{if(r===e)return a;if(!r.isEnabled()||r.properties.tooltip.enabled===!1)return[];const l=r.datumIndexForCategoryValue(n),c=l==null?void 0:r.getTooltipContent(l,void 0);return c==null?[]:[c]})}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter(e=>e.enabled&&e.text).map(e=>e.text).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}resetAnimations(){this.chartAnimationPhase="initial";for(const e of this.series)e.resetAnimation(this.chartAnimationPhase);for(const e of this.axes)e.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}detachAndClear(){this.container=void 0,this.ctx.scene.clear()}destroy(e){if(this.destroyed)return;const i=e?.keepTransferableResources;let s;return this.performUpdateType=7,this._destroyFns.forEach(o=>o()),this.processors.forEach(o=>o.destroy()),this.overlays.destroy(),this.modulesManager.destroy(),i?(this.ctx.scene.strip(),s={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(o=>o.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.destroyed=!0,Object.freeze(this),s}requestFactoryUpdate(e){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(async()=>{if(!this.destroyed)try{await e(this)}finally{this.destroyed||this._pendingFactoryUpdatesCount--}}).catch(i=>tt.errorOnce(i)))}clearCallbackCache(){this.ctx.callbackCache.invalidateCache();for(const e of this.series)e.resetDatumCallbackCache()}update(e=0,i){if(this.destroyed)return;const{forceNodeDataRefresh:s=!1,skipAnimations:o,seriesToUpdate:a=this.series,newAnimationBatch:n}=i??{};this.ctx.widgets.seriesWidget.setDragTouchEnabled(this.touch.dragAction!=="none"),s&&this.series.forEach(r=>r.markNodeDataDirty());for(const r of a)this.seriesToUpdate.add(r);if(o&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),n&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this.skipSync=i?.skipSync??!1,this.debug.check()){let r=new Error().stack??"<unknown>";r=r.replace(/\([^)]*/g,""),this.updateRequestors[r]=e}e<this.performUpdateType&&(this.performUpdateType=e,this.ctx.domManager.setDataBoolean("updatePending",!0),this.performUpdateTrigger.schedule(i?.backOffMs))}async performUpdate(e){const{performUpdateType:i,extraDebugStats:s,_performUpdateSplits:o,ctx:a}=this,n=[...this.seriesToUpdate];this.clearCallbackCache(),this.performUpdateType=7,this.seriesToUpdate.clear(),this.runningUpdateType=i,this.updateShortcutCount===0&&i<6&&(a.animationManager.startBatch(this._performUpdateSkipAnimations),a.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.ctx.scene.updateDebugFlags(),this.debug("Chart.performUpdate() - start",_p[i]);let r=performance.now();o.start??(o.start=r);const l=h=>{o[h]??(o[h]=0),o[h]+=performance.now()-r,r=performance.now()};switch(i){case 0:if(this.checkUpdateShortcut(0))break;this.ctx.updateService.dispatchPreDomUpdate(),this.updateDOM();case 1:if(this.checkUpdateShortcut(1))break;await this.updateData(),l("\u2B07\uFE0F");case 2:if(this.checkUpdateShortcut(2))break;await this.processData(),this.seriesAreaManager.dataChanged(),l("\u{1F3ED}");case 3:if(await this.checkFirstAutoSize(),this.checkUpdateShortcut(3))break;await this.processLayout(),l("\u2316");case 4:{if(this.checkUpdateShortcut(4))break;await this.updateSeries(n),l("\u{1F914}"),this.updateAriaLabels(),this.seriesLayerManager.updateLayerCompositing()}case 5:if(this.checkUpdateShortcut(5))break;a.updateService.dispatchPreSceneRender(),l("\u2196");case 6:if(this.checkUpdateShortcut(6))break;a.animationManager.endBatch(),s.updateShortcutCount=this.updateShortcutCount,a.scene.render({debugSplitTimes:o,extraDebugStats:s,seriesRect:this.seriesRect}),this.extraDebugStats={};for(const h of Object.keys(o))delete o[h];this.ctx.domManager.incrementDataCounter("sceneRenders"),this.ctx.domManager.postRenderUpdate();case 7:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,a.animationManager.endBatch()}this.destroyed||(a.updateService.dispatchUpdateComplete(),this.ctx.domManager.setDataBoolean("updatePending",!1),this.runningUpdateType=7),this._performUpdateNotify.notify();const c=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round((c-o.start)*100)/100,count:e,performUpdateType:_p[i]})}updateThemeClassName(){const e="ag-charts-theme-",i=[`${e}default`,`${e}default-dark`];let s=i[0],o=!1,{theme:a}=this.chartOptions.processedOptions;for(;typeof a!="string"&&a!=null;)a=a.baseTheme;typeof a=="string"&&(s=a.replace("ag-",e),o=a.includes("-dark")),i.includes(s)||(s=o?i[1]:i[0]),this.ctx.domManager.setThemeClass(s)}updateDOM(){this.updateThemeClassName();const{enabled:e,tabIndex:i}=this.keyboard;this.ctx.domManager.setTabGuardIndex(e?i??0:-1),this.ctx.domManager.setThemeParameters(this.chartOptions.themeParameters)}updateAriaLabels(){this.ctx.domManager.updateCanvasLabel(this.getAriaLabel())}checkUpdateShortcut(e){return this.destroyed?!0:this.updateShortcutCount>3?(tt.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=e?(this.updateShortcutCount++,!0):!1}async checkFirstAutoSize(){this.width!=null&&this.height!=null||this._lastAutoSize||await this._autoSizeNotify.await(500)||this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}onAxisChange(e,i){i==null&&e.length===0||this.ctx.axisManager.updateAxes(i??[],e)}onSeriesChange(e,i){const s=i?.filter(o=>!e.includes(o))??[];this.destroySeries(s),this.seriesLayerManager?.setSeriesCount(e.length);for(const o of e){if(i?.includes(o))continue;const a=this.seriesLayerManager.requestGroup(o);o.attachSeries(a,this.seriesRoot,this.annotationRoot);const n=this;o.chart={get mode(){return n.mode},get isMiniChart(){return!1},get seriesRect(){return n.seriesRect}},o.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(o),o.addChartEventListeners()}this.seriesAreaManager?.seriesChanged(e)}destroySeries(e){e?.forEach(i=>{i.removeEventListener("seriesNodeClick",this.onSeriesNodeClick),i.removeEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),i.removeEventListener("groupingChanged",this.seriesGroupingChanged),i.destroy(),this.seriesLayerManager.releaseGroup(i),i.detachSeries(void 0,this.seriesRoot,this.annotationRoot),i.chart=void 0})}addSeriesListeners(e){this.hasEventListener("seriesNodeClick")&&e.addEventListener("seriesNodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("seriesNodeDoubleClick",this.onSeriesNodeDoubleClick),this.hasEventListener("seriesVisibilityChange")&&e.addEventListener("seriesVisibilityChange",this.onSeriesVisibilityChange),e.addEventListener("groupingChanged",this.seriesGroupingChanged)}assignSeriesToAxes(){for(const e of this.axes)e.boundSeries=this.series.filter(i=>i.axes[e.direction]===e)}assignAxesToSeries(){const e=fb(this.axes,i=>i.direction);for(const i of this.series)for(const s of i.directions){const o=e[s];if(!o){tt.warnOnce(`no available axis for direction [${s}]; check series and axes configuration.`);return}const a=i.getKeys(s),n=o.find(r=>!r.keys.length||a.some(l=>r.keys.includes(l)));if(!n){tt.warnOnce(`no matching axis for direction [${s}] and keys [${a}]; check series and axes configuration.`);return}i.axes[s]=n}}parentResize(e){if(e==null||this.width!=null&&this.height!=null)return;let{width:i,height:s}=e;const{pixelRatio:o}=e;if(i=Math.floor(i),s=Math.floor(s),i===0&&s===0)return;const[a=0,n=0,r=1]=this._lastAutoSize??[];a===i&&n===s&&r===o||(this._lastAutoSize=[i,s,o],this.resize("SizeMonitor",{}))}resize(e,i){const{scene:s,animationManager:o}=this.ctx,{inWidth:a,inHeight:n,inMinWidth:r,inMinHeight:l,inOverrideDevicePixelRatio:c}=i;this.ctx.domManager.setSizeOptions(r??this.minWidth,l??this.minHeight,a??this.width,n??this.height);const h=a??this.width??this._lastAutoSize?.[0],u=n??this.height??this._lastAutoSize?.[1],d=c??this.overrideDevicePixelRatio??this._lastAutoSize?.[2];if(this.debug(`Chart.resize() from ${e}`,{width:h,height:u,pixelRatio:d,stack:new Error().stack}),!(h==null||u==null||!Zt(h)||!Zt(u))&&s.resize(h,u,d)){o.reset();let p=!0;(this.width==null||this.height==null)&&this._firstAutoSize&&(p=!1,this._firstAutoSize=!1),this.update(3,{forceNodeDataRefresh:!0,skipAnimations:p}),this._autoSizeNotify.notify()}}async updateData(){this.series.forEach(i=>i.setChartData(this.data));const e=this.modulesManager.mapModules(i=>i.updateData?.(this.data));await Promise.all(e)}async processData(){this.series.some(o=>o.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes());const e=new ST(this.mode,this.suppressFieldDotNotation),i=this.series.map(o=>o.processData(e)),s=this.modulesManager.mapModules(o=>o.processData?.(e));this._cachedData=e.execute(this._cachedData),await Promise.all([...i,...s]);for(const o of this.axes)o.processData();this.updateLegends()}updateLegends(e){for(const{legend:i,legendType:s}of this.modulesManager.legends())s==="category"?this.setCategoryLegendData(e):this.setLegendData(s,i)}setCategoryLegendData(e){var i;const{ctx:{legendManager:s,stateManager:o}}=this;e&&this.series.forEach(n=>{const r=e.find(l=>l.seriesId===n.id);n.onLegendInitialState("category",r)});const a=this.series.flatMap(n=>{const r=n.getLegendData("category");return s.updateData(n.id,r),r});if(e){o.setStateAndRestore(s,e);return}if(this.mode!=="integrated"){const n={},r=new Map(this.series.map(l=>[l.id,l.type]));for(const{seriesId:l,symbol:{marker:c},label:h}of a.filter(u=>!u.hideInLegend)){if(c.fill==null)continue;const u=r.get(l),d=n[u]??(n[u]={});d[i=h.text]??(d[i]=c.fill),d[h.text]!==c.fill&&tt.warnOnce(`legend item '${h.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}s.update()}setLegendData(e,i){i.data=this.series.filter(s=>s.properties.showInLegend).flatMap(s=>s.getLegendData(e))}async processLayout(){const e=this.animationRect,{width:i,height:s}=this.ctx.scene,o=this.ctx.layoutManager.createContext(i,s);await this.performLayout(o),e&&!this.animationRect?.equals(e)&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)}async updateSeries(e){const{seriesRect:i}=this;await Promise.all(e.map(s=>s.update({seriesRect:i}))),this.ctx.seriesLabelLayoutManager.updateLabels(this.series.filter(s=>s.visible&&s.usesPlacedLabels),this.padding,this.seriesRect)}async waitForUpdate(e=1e4,i=!1){const s=performance.now();for(;(this._pendingFactoryUpdatesCount>0||this.performUpdateType!==7||this.runningUpdateType!==7)&&!this.destroyed;){if(this._pendingFactoryUpdatesCount>0&&await this.updateMutex.waitForClearAcquireQueue(),(this.performUpdateType!==7||this.runningUpdateType!==7)&&await this._performUpdateNotify.await(),performance.now()-s>e){const o=`Chart.waitForUpdate() timeout of ${e} reached - first chart update taking too long.`;if(i)throw new Error(o);tt.warnOnce(o)}aR()&&await zX()}}filterMiniChartSeries(e){return e?.filter(i=>i.showInMiniChart!==!1)}applyOptions(e){const i=this.firstApply?e.processedOptions:e.diffOptions(this.chartOptions);if(i==null||Object.keys(i).length===0)return;const s=this.firstApply?{}:this.chartOptions.processedOptions,o=e.processedOptions;Za("Chart.applyOptions() - applying delta",i);const a=this.applyModules(o),n=["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState","styleContainer"];i.listeners&&this.registerListeners(this,i.listeners),sm(this,i,{skip:n});let r=!1,l="no-op";i.series!=null&&(l=this.applySeries(this,i.series,s?.series),r=!0),l==="replaced"&&this.resetAnimations(),this.applyAxes(this,o,s,l,[])&&(r=!0),i.data&&(this.data=i.data),i.legend?.listeners&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,i.legend.listeners),i.locale?.localeText&&(this.modulesManager.getModule("locale").localeText=i.locale?.localeText),this.chartOptions=e;const c=this.modulesManager.getModule("navigator"),h=this.modulesManager.getModule("zoom");!c?.enabled&&!h?.enabled&&this.ctx.zoomManager.updateZoom("chart");const u=c?.miniChart,d=o.navigator?.miniChart?.series??o.series;u?.enabled===!0&&d!=null?this.applyMiniChartOptions(u,d,o,s):u?.enabled===!1&&(u.series=[],u.axes=[]),this.ctx.annotationManager.setAnnotationStyles(e.annotationThemes),r||(r=this.shouldForceNodeDataRefresh(i,l));const g=r||a?0:3;this.maybeResetAnimations(l),this.shouldClearLegendData(o,s,l)&&this.ctx.legendManager.clearData(),this.applyInitialState(o),Za("Chart.applyOptions() - update type",_p[g],{seriesStatus:l,forceNodeDataRefresh:r}),this.update(g,{forceNodeDataRefresh:r,newAnimationBatch:!0}),this.firstApply=!1}applyInitialState(e){const{annotationManager:i,chartTypeOriginator:s,historyManager:o,stateManager:a,zoomManager:n}=this.ctx,{initialState:r}=e;if("annotations"in e&&e.annotations?.enabled&&r?.annotations!=null){const l=r.annotations.map(c=>{const h=i.getAnnotationTypeStyles(c.type);return Vt(c,h)});a.setState(i,l)}r?.chartType!=null&&a.setState(s,r.chartType),(e.navigator?.enabled||e.zoom?.enabled)&&r?.zoom!=null&&a.setState(n,r.zoom),r?.legend!=null&&this.updateLegends(r.legend),r!=null&&o.clear()}maybeResetAnimations(e){if(this.mode==="standalone")switch(e){case"series-grouping-change":case"replaced":this.resetAnimations();break;default:}}shouldForceNodeDataRefresh(e,i){const s=!!e.data||i==="data-change"||i==="replaced",o=NS.getKeys(),a=Object.values(o).some(r=>e[r]!=null),n=e.title!=null&&e.subtitle!=null;return s||a||n}shouldClearLegendData(e,i,s){const o=s==="replaced"||s==="series-grouping-change"||s==="updated",a=i.legend!=null&&e.legend==null;return o||a}applyMiniChartOptions(e,i,s,o){const a=o?.navigator?.miniChart?.series??o?.series,n=this.applySeries(e,this.filterMiniChartSeries(i),this.filterMiniChartSeries(a));this.applyAxes(e,s,o,n,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]);const r=e.series;for(const h of r)h.properties.id=void 0;const l=e.axes,c=l.find(h=>h.direction==="x");for(const h of l)h.nice=!1,h.gridLine.enabled=!1,h.label.enabled=h===c,h.tick.enabled=!1,h.interactionEnabled=!1;if(c!=null){const h=s.navigator?.miniChart,u=h?.label,d=h?.label?.interval;if(c.line.enabled=!1,c.label.set(mc(u,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),c.tick.set(mc(d,["enabled","width","size","color","interval","step"])),c.type==="grouped-category"){c.label.enabled=!1,c.label.rotation=0;const{depthOptions:g}=c;if(g.length===0)g.set([{label:{enabled:!0}}]);else for(let f=1;f<g.length;f++)g[f].label.enabled=!1}const p=d?.step;p!=null&&(c.interval.step=p)}}applyModules(e){const{type:i}=this.constructor;let s=!1;for(const o of Tn.byType("root","legend")){const n=e[o.optionsKey]!=null&&o.chartTypes.includes(i);n!==this.modulesManager.isEnabled(o)&&(n?(this.modulesManager.addModule(o,r=>r.moduleFactory(this.getModuleContext())),o.type==="legend"&&this.modulesManager.getModule(o)?.attachLegend(this.ctx.scene),this[o.optionsKey]=this.modulesManager.getModule(o)):(this.modulesManager.removeModule(o),delete this[o.optionsKey]),s=!0)}return s}initSeriesDeclarationOrder(e){for(let i=0;i<e.length;i++)e[i].setSeriesIndex(i)}applySeries(e,i,s){if(!i)return"no-change";const o=Hq(e.series,i,s);if(o.status==="no-overlap"){Za(`Chart.applySeries() - creating new series instances, status: ${o.status}`,o);const h=i.map(u=>this.createSeries(u));return this.initSeriesDeclarationOrder(h),e.series=h,"replaced"}Za("Chart.applySeries() - matchResult",o);const a=[];let n=!1,r=!1,l=!1;const c=o.changes.toSorted((h,u)=>h.targetIdx-u.targetIdx);for(const h of c)switch(r||(r=h.status==="series-grouping"),n||(n=h.diff?.data!=null),l||(l=h.status!=="no-op"),h.status){case"add":{const u=this.createSeries(h.opts);a.push(u),Za("Chart.applySeries() - created new series",u);break}case"remove":Za(`Chart.applySeries() - removing series at previous idx ${h.idx}`,h.series);break;case"no-op":a.push(h.series),Za(`Chart.applySeries() - no change to series at previous idx ${h.idx}`,h.series);break;case"series-grouping":case"update":default:{const{series:u,diff:d,idx:p}=h;Za(`Chart.applySeries() - applying series diff previous idx ${p}`,d,u),this.applySeriesValues(u,d),u.markNodeDataDirty(),a.push(u)}}return this.initSeriesDeclarationOrder(a),Za("Chart.applySeries() - final series instances",a),e.series=a,r?"series-grouping-change":n?"data-change":l?"updated":"no-op"}applyAxes(e,i,s,o,a=[]){if(!("axes"in i)||!i.axes)return!1;a=["axes[].type",...a];const{axes:n}=i;return!(o==="replaced")&&e.axes.length===n.length&&e.axes.every((c,h)=>c.type===n[h].type)&&$T(s)?(e.axes.forEach((c,h)=>{const u=s.axes?.[h]??{},d=fr(u,n[h]);Za(`Chart.applyAxes() - applying axis diff idx ${h}`,d);const p=`axes[${h}]`;sm(c,d,{path:p,skip:a})}),!0):(Za(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${o}`),e.axes=this.createAxis(n,a),!0)}createSeries(e){const i=ga.create(e.type,this.getModuleContext());return this.applySeriesOptionModules(i,e),this.applySeriesValues(i,e),i}applySeriesOptionModules(e,i){const s=e.createModuleContext(),o=e.getModuleMap();for(const a of Tn.byType("series-option"))a.optionsKey in i&&a.seriesTypes.includes(e.type)&&o.addModule(a,n=>n.moduleFactory(s))}applySeriesValues(e,i){const s=e.getModuleMap(),{type:o,data:a,listeners:n,seriesGrouping:r,showInMiniChart:l,...c}=i;for(const h of Rp)if(h.type==="series-option"&&h.optionsKey in c){const u=s.getModule(h.optionsKey);if(u){const d=c[h.optionsKey];delete c[h.optionsKey],u.properties.set(d)}}e.properties.set(c),"data"in i&&e.setOptionsData(a),n&&this.registerListeners(e,n,{nodeClick:"seriesNodeClick",nodeDoubleClick:"seriesNodeDoubleClick"}),"seriesGrouping"in i&&(r==null?e.seriesGrouping=void 0:e.seriesGrouping={...e.seriesGrouping,...r})}createAxis(e,i){const s=[],o=this.getModuleContext();for(let a=0;a<e.length;a++){const n=e[a],r=Lc.create(n.type,o);this.applyAxisModules(r,n),sm(r,n,{path:`axes[${a}]`,skip:i}),s.push(r)}return Wq(s),s}applyAxisModules(e,i){const s=e.createModuleContext(),o=e.getModuleMap();for(const a of Tn.byType("axis-option")){const n=i[a.optionsKey]!=null;n!==o.isEnabled(a)&&(n?(o.addModule(a,r=>r.moduleFactory(s)),e[a.optionsKey]=o.getModule(a)):(o.removeModule(a),delete e[a.optionsKey]))}}registerListeners(e,i,s){e.clearEventListeners();for(const[o,a]of ja(i))if(nl(a)){const n=s?.[o];n==null?e.addEventListener(o,a):e.addEventListener(n,r=>{if(r?.type===n){const l=new Proxy(r,{get(c,h,u){return h==="type"?o:Reflect.get(c,h,u)}});a(l)}else a(r)})}}},Si.chartsInstances=new WeakMap,v([Fo({newValue(t){this.destroyed||(this.ctx.domManager.setContainer(t),Si.chartsInstances.set(t,this))},oldValue(t){Si.chartsInstances.delete(t)}})],Si.prototype,"container",2),v([Fo({newValue(t){this.resize("width option",{inWidth:t})}})],Si.prototype,"width",2),v([Fo({newValue(t){this.resize("height option",{inHeight:t})}})],Si.prototype,"height",2),v([Fo({newValue(t){this.resize("minWidth option",{inMinWidth:t})}})],Si.prototype,"minWidth",2),v([Fo({newValue(t){this.resize("minHeight option",{inMinHeight:t})}})],Si.prototype,"minHeight",2),v([Fo({newValue(t){this.resize("overrideDevicePixelRatio option",{inOverrideDevicePixelRatio:t})}})],Si.prototype,"overrideDevicePixelRatio",2),v([A(ct)],Si.prototype,"padding",2),v([A(ct)],Si.prototype,"seriesArea",2),v([A(ct)],Si.prototype,"keyboard",2),v([A(ct)],Si.prototype,"touch",2),v([A(fe(["standalone","integrated"],"a chart mode"))],Si.prototype,"mode",2),v([be("chartCaptions.title")],Si.prototype,"title",2),v([be("chartCaptions.subtitle")],Si.prototype,"subtitle",2),v([be("chartCaptions.footnote")],Si.prototype,"footnote",2),v([A(bt)],Si.prototype,"suppressFieldDotNotation",2),v([Fo({changeValue(t,e){this.onAxisChange(t,e)}})],Si.prototype,"axes",2),v([Fo({changeValue(t,e){this.onSeriesChange(t,e)}})],Si.prototype,"series",2),Em=Si}}),gC,Ec,Gp,fC,v7=k({"packages/ag-charts-community/src/chart/chartProxy.ts"(){"use strict";hr(),Ui(),zo(),bo(),gC=ee.create(!0,"opts"),Ec="AG Charts - Chart was destroyed, cannot perform request.",Gp=class{constructor(e,i,s){this.factoryApi=i,this.licenseManager=s,this.chart=e}async update(e){if(!this.chart)throw new Error(Ec);return gC.group("AgChartInstance.update()",async()=>{this.factoryApi.update(e,this),await this.chart?.waitForUpdate()})}async updateDelta(e){if(!this.chart)throw new Error(Ec);return gC.group("AgChartInstance.updateDelta()",async()=>{this.factoryApi.updateUserDelta(this,e),await this.chart?.waitForUpdate()})}getOptions(){if(!this.chart)throw new Error(Ec);const e=we(this.chart.getOptions());for(const i of Object.keys(e))i.startsWith("_")&&delete e[i];return e}waitForUpdate(){if(!this.chart)throw new Error(Ec);return this.chart.waitForUpdate()}async download(e){if(!this.chart)throw new Error(Ec);const i=await this.prepareResizedChart(this,this.chart,e);try{i.chart?.download(e?.fileName,e?.fileFormat)}finally{i.destroy()}}async __toSVG(e){if(!this.chart)throw new Error(Ec);const i=await this.prepareResizedChart(this,this.chart,{width:600,height:300,...e});try{return i?.chart?.toSVG()}finally{i?.destroy()}}async getImageDataURL(e){if(!this.chart)throw new Error(Ec);const i=await this.prepareResizedChart(this,this.chart,e);try{return i.chart.getCanvasDataURL(e?.fileFormat)}finally{i.destroy()}}getState(){return this.factoryApi.caretaker.save(...this.getEnabledOriginators())}async setState(e){const{chart:i}=this;if(!i)return;const s=this.getEnabledOriginators();if(!s.includes(i.ctx.legendManager)){await this.setStateOriginators(e,s);return}await this.setStateOriginators(e,s.filter(o=>o!==i.ctx.zoomManager)),await this.setStateOriginators(e,[i.ctx.zoomManager])}resetAnimations(){this.chart?.resetAnimations()}skipAnimations(){this.chart?.skipAnimations()}destroy(){this.releaseChart?(this.releaseChart(),this.releaseChart=void 0):this.chart&&(this.chart.publicApi=void 0,this.chart.destroy()),this.chart=void 0}async prepareResizedChart(e,i,s={}){const o=s.width??i.width??i.ctx.scene.canvas.width,a=s.height??i.height??i.ctx.scene.canvas.height,n=e.getState(),r=Tn.hasEnterpriseModules(),l={...i.chartOptions.processedOverrides,container:document.createElement("div"),width:o,height:a};s.width!=null&&s.height!=null&&(l.overrideDevicePixelRatio=1);const c=i.getOptions();r&&(l.animation={enabled:!1},this.licenseManager?.isDisplayWatermark()&&(l.foreground={text:this.licenseManager.getWatermarkMessage(),image:{url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",width:170,height:25,right:25,bottom:50,opacity:.7}}));const h={...i.chartOptions.specialOverrides},u={...i.chartOptions.optionMetadata},d=this.factoryApi.create(c,l,h,u);await d.setState(n),d.chart?.ctx.zoomManager.updateZoom("chartProxy",i.ctx.zoomManager.getZoom()),d.chart?.ctx.legendManager.clearData(),d.chart?.ctx.legendManager.update(i.ctx.legendManager.getData()),i.series.forEach((g,f)=>{g.visible||(d.chart.series[f].visible=!1)});const p=[];for(const g of i.modulesManager.legends())p.push(g.legend.pagination?.currentPage??0);for(const g of d.chart.modulesManager.legends()){const f=p.shift()??0;g.legend.pagination&&g.legend.pagination.setPage(f)}return d.chart?.update(0,{forceNodeDataRefresh:!0}),await d.waitForUpdate(),d}getEnabledOriginators(){if(!this.chart)return[];const{chartOptions:{processedOptions:e,optionMetadata:i},ctx:{annotationManager:s,chartTypeOriginator:o,zoomManager:a,legendManager:n}}=this.chart,r=[];return"annotations"in e&&e.annotations?.enabled&&r.push(s),i.presetType==="price-volume"&&r.push(o),(e.navigator?.enabled||e.zoom?.enabled)&&r.push(a),"legend"in this.chart&&r.push(n),r}async setStateOriginators(e,i){this.factoryApi.caretaker.restore(e,...i),this.chart?.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),await this.chart?.waitForUpdate()}},Gp.chartInstances=new WeakMap,v([Fo({oldValue(t){t.destroyed||(t.publicApi=void 0),Gp.chartInstances.delete(t)},newValue(t){t&&(t.publicApi=this,Gp.chartInstances.set(t,this))}})],Gp.prototype,"chart",2),fC=Gp}}),JS,M7=k({"packages/ag-charts-community/src/locale/locale.ts"(){"use strict";hr(),bo(),Nt(),JS=class extends Pf{constructor(t){super(),this.ctx=t,this.localeText=void 0}},v([Dc(t=>{t.ctx.localeManager.setLocaleText(t.localeText)}),A(LA,{optional:!0})],JS.prototype,"localeText",2),v([Dc(t=>{t.ctx.localeManager.setLocaleTextFormatter(t.getLocaleText)}),A(Zs,{optional:!0})],JS.prototype,"getLocaleText",2)}}),cz,D7=k({"packages/ag-charts-community/src/locale/localeModule.ts"(){"use strict";M7(),cz={type:"root",optionsKey:"locale",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new JS(t)}}});function hz(t){let e;const i=new Set;for(const s of t){const o=to(s),a=i.size;i.add(o),i.size!==a?e?.push(s):e??(e=t.slice(0,i.size))}return e??t}function k7(t,e){let i=-1;for(const s of t){const o=e.indexOf(s);if(o===-1)i=1/0;else{if(o<=i)return!1;i=o}}return!0}var jp,_m=k({"packages/ag-charts-community/src/scale/categoryScale.ts"(){"use strict";AS(),ym(),jp=class extends Np{constructor(){super(...arguments),this.type="band",this.index=void 0,this._domain=[]}set domain(t){this._domain!==t&&(this.invalid=!0,this._domain=t,this.index=void 0)}get domain(){return this._domain}normalizeDomains(...t){let e;const i=new Set;let s=!0;for(const o of t)i.has(o)||(i.add(o),e==null?e=hz(o):(s&&(s=k7(o,e)),e=hz([...e,...o])));return e??(e=[]),{domain:e,animatable:s}}toDomain(t){}invert(t,e=!1){this.refresh();const i=e?this.bandwidth/2:0,s=this.invertNearestIndex(Math.max(0,t-i));return e||t===this.ordinalRange(s)?this.domain[s]:void 0}getIndex(t){let{index:e}=this;if(e==null){const{domain:i}=this;e=new Map;for(let s=0;s<i.length;s++)e.set(to(i[s]),s);this.index=e}return e.get(to(t))}}}}),Lu,_c,Nu=k({"packages/ag-charts-community/src/chart/axis/categoryAxis.ts"(){"use strict";P(),_m(),Nt(),Tm(),Lu=class a6 extends Bp{constructor(e,i=new jp){super(e,i),this.groupPaddingInner=.1,this.includeInvisibleDomains=!0,this.nice=!1}static is(e){return e instanceof a6}normaliseDataDomain(e){return{domain:e,clipped:!1}}updateScale(){super.updateScale();let{paddingInner:e,paddingOuter:i}=this;if(!Zt(e)||!Zt(i)){const s=this.reduceBandScalePadding();e??(e=s.inner),i??(i=s.outer)}this.scale.paddingInner=e??0,this.scale.paddingOuter=i??0}reduceBandScalePadding(){return this.boundSeries.reduce((e,i)=>{const s=i.getBandScalePadding?.();return s&&(e.inner>s.inner&&(e.inner=s.inner),e.outer<s.outer&&(e.outer=s.outer)),e},{inner:1/0,outer:-1/0})}},Lu.className="CategoryAxis",Lu.type="category",v([A(le)],Lu.prototype,"groupPaddingInner",2),v([A(le,{optional:!0})],Lu.prototype,"paddingInner",2),v([A(le,{optional:!0})],Lu.prototype,"paddingOuter",2),_c=Lu}}),mC,A7=k({"packages/ag-charts-community/src/scale/groupedCategoryScale.ts"(){"use strict";_m(),mC=class extends jp{normalizeDomains(...t){const{domain:e}=super.normalizeDomains(...t);return{domain:e,animatable:!1}}getIndex(t){return super.getIndex(t)??this.getMatchIndex(t)}getMatchIndex(t){const e=JSON.stringify(t),i=this._domain.find(s=>JSON.stringify(s)===e);if(i!=null)return super.getIndex(i)}}}});function Ml(t){if(t.length===0)return null;let e=1/0,i=-1/0;for(const o of t){const a=o instanceof Date?o.getTime():o;typeof a=="number"&&(a<e&&(e=a),a>i&&(i=a))}const s=[e,i];return s.every(isFinite)?s:null}function yC(t,e,i){let s=!1;return t.length>2&&(t=Ml(t)??[NaN,NaN]),e!=null&&(s||(s=e>t[0]),t=[e,t[1]]),i!=null&&(s||(s=i<t[1]),t=[t[0],i]),t[0]>t[1]&&(t=[]),{extent:t,clipped:s}}var Ar=k({"packages/ag-charts-community/src/util/extent.ts"(){"use strict"}});function tv(t,e){const i=JSON.stringify(t,null,0);return Vp.has(e)||Vp.set(e,new Map),Vp.get(e)?.has(i)||Vp.get(e)?.set(i,e(t)),Vp.get(e)?.get(i)}function vo(t,e){const i=new Map,s=(...n)=>n.map(r=>typeof r=="object"||typeof r=="symbol"?r:(i.has(r)||i.set(r,{v:r}),i.get(r))),o={},a=new WeakMap;return(...n)=>{const r=n.length===0?[o]:s(...n);let l=a;for(const u of r.slice(0,-1))l.has(u)||l.set(u,new WeakMap),l=l.get(u);const c=r.at(-1);let h=l.get(c);return h?e?.("hit",t,n):(h=t(...n),l.set(c,h),e?.("miss",t,n)),h}}var Vp,xC=k({"packages/ag-charts-community/src/util/memo.ts"(){"use strict";Vp=new WeakMap}});function ev(t,e=[0,0]){for(const i of t)typeof i=="number"&&(i<0&&(e[0]+=i),i>0&&(e[1]+=i));return e}function I7(t,e){return{id:t,matchGroupIds:[e],type:"aggregate",aggregateFunction:s=>ev(s)}}function uz(t,e){return{id:t,type:"aggregate",matchGroupIds:e?[e]:void 0,aggregateFunction:i=>ev(i),groupAggregateFunction:(i,s=[0,0])=>(s[0]+=i?.[0]??0,s[1]+=i?.[1]??0,s)}}function T7(t,e){return{id:t,matchGroupIds:[e],type:"aggregate",aggregateFunction:s=>xl.extendDomain(s)}}function bC(t){return{id:t,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,i=[0,0])=>(i[0]+=e?.[0]??0,i[1]+=e?.[1]??0,i)}}function dz(t,e){return{id:t,matchGroupIds:e?[e]:void 0,type:"aggregate",aggregateFunction:s=>ev(s),groupAggregateFunction:(s,o=[0,0,-1])=>(o[0]+=s?.[0]??0,o[1]+=s?.[1]??0,o[2]++,o),finalFunction:(s=[0,0,0])=>{const o=s[0]+s[1];return o>=0?[0,o/s[2]]:[o/s[2],0]}}}function SC(t,e,i){const s={id:t,matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(o,a=[])=>{const n=a[1]-a[0];return e.aggregateFunction(o).map(r=>r/n)}};return e.groupAggregateFunction&&(s.groupAggregateFunction=e.groupAggregateFunction),s}function pz(t){return()=>{let e=0;return i=>Zt(i)?(e+=t?Math.max(0,i):i,e):i}}function gz(){return()=>{let t=0;return e=>{if(!Zt(e))return e;const i=t;return t+=e,i}}}var vC=k({"packages/ag-charts-community/src/chart/data/aggregateFunctions.ts"(){"use strict";P(),GP()}});function fz(t){return t!=null&&GS(t)}function C7(t){return t!=null}function mz(t){switch(t){case"number":case"log":case"ordinal-time":case"time":case"color":return fz;default:return C7}}function yz(t){switch(t){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function Fn(t,e,i={}){return{property:t,type:"key",valueType:yz(e),validation:mz(e),...i}}function Wt(t,e,i={}){return{property:t,type:"value",valueType:yz(e),validation:mz(e),...i}}function xz(t,e={}){return{property:t,type:"value",valueType:"range",missingValue:1,processor:()=>()=>1,...e}}function bz(...t){const e=t.filter(i=>i!=null);return e.length===0?()=>kz:e.length===1?e[0]:()=>{const i=e.map(s=>s());return(s,o)=>i.reduce((a,n)=>n(a,o),s)}}function MC(t,e={}){const{min:i=-1/0,max:s=1/0,processor:o,...a}=e;return{type:"value",property:t,valueType:"range",validation:fz,processor:bz(o,()=>n=>Zt(n)?Tt(i,n,s):n),...a}}function Rm(t,e,i={}){const{onlyPositive:s,processor:o,...a}=i;return{...Wt(t,e,a),processor:bz(o,pz(s))}}function L7(t,e,i={}){return{...Wt(t,e,i),processor:gz()}}function Rc(t,e,i,s,o){return[Wt(t,o,s),vz(s.groupId,e,i,s.separateNegative),...s.rangeId!=null?[T7(s.rangeId,s.groupId)]:[]]}function Sz(t,e,i){return[Wt(t,e,i),Mz(i.groupId)]}function N7({normaliseTo:t}){const e=(i,s)=>{if(s===0)return null;const o=(i??0)*t/s;return o>=0?Math.min(t,o):Math.max(-t,o)};return()=>()=>(i,s,o)=>{const a=O7(i,s,o);for(const n of s)for(const r of o.datumIndices[n]??[]){const l=i[n],c=l[r];if(c==null){l[r]=void 0;continue}l[r]=typeof c=="number"?e(c,a):c.map(h=>e(h,a))}}}function O7(t,e,i){const s=[0,0];for(const o of e){const a=t[o];for(const n of i.datumIndices[o]??[]){const r=a[n];if(r==null)continue;const l=typeof r=="number"?r:Math.max(...r.map(h=>h??0)),c=l<0?0:1;c===0?s[c]=Math.min(s[c],l):s[c]=Math.max(s[c],l)}}return Math.max(Math.abs(s[0]),s[1])}function iv(t,e){return{type:"group-value-processor",matchGroupIds:t,adjust:tv({normaliseTo:e},N7)}}function w7({normaliseTo:t,zeroDomain:e,rangeMin:i,rangeMax:s}){const o=t[1]-t[0],a=(n,r,l)=>{const c=t[0]+(n-r)/l*o;return l===0?e:c>=t[1]?t[1]:c<t[0]?t[0]:c};return()=>(n,r)=>{let[l,c]=n.domain.values[r];i!=null&&(l=i),s!=null&&(c=s);const h=c-l;n.domain.values[r]=[t[0],t[1]];const u=n.columns[r];for(let d=0;d<u.length;d+=1)u[d]=a(u[d],l,h)}}function Ou(t,e,i,s,o){return{type:"property-value-processor",property:t,adjust:tv({normaliseTo:e,rangeMin:s,rangeMax:o,zeroDomain:i},w7)}}function Wp(t){return{type:"processor",property:"animationValidation",calculate(e){const{keys:i,values:s}=e.defs,{input:{count:o},domain:{keys:a,values:n},keys:r,columns:l}=e;let c=Hp|Pm;if(o!==0){for(let h=0;c!==0&&h<i.length;h++)for(const u of i[h].scopes)c&=TC(o,i[h],a[h],r[h].get(u));for(let h=0;c!==0&&h<s.length;h++){const u=s[h];t?.includes(u.id)&&(c&=TC(o,u,n[h],l[h]))}}return{uniqueKeys:(c&Hp)!==0,orderedKeys:(c&Pm)!==0}}}}function E7({mode:t,separateNegative:e}){return()=>()=>(i,s,o)=>{const a=[0,0];for(const n of s)for(const r of o.datumIndices[n]??[]){const l=i[n],c=l[r],h=mb(c)&&e?0:1;Zt(c)&&(t==="normal"&&(a[h]+=c),l[r]=a[h],t==="trailing"&&(a[h]+=c))}}}function _7({mode:t,sum:e}){return()=>{const i=[];let s=!0;return()=>(o,a,n)=>{let r=0;for(const l of a){const c=o[l];for(const h of n.datumIndices[l]??[]){const u=c[h],d=s&&e==="current"?0:i[l];i[l]=u;const p=e==="current"?u:d;if(!Zt(u)||!Zt(d)){c[h]=r;continue}t==="normal"&&(r+=p),c[h]=r,t==="trailing"&&(r+=p)}}s=!1}}}function vz(t,e,i,s=!1){let o;if(e.startsWith("window")){const a=e.endsWith("-trailing")?"trailing":"normal";o=tv({mode:a,sum:i},_7)}else o=tv({mode:e,separateNegative:s},E7);return{type:"group-value-processor",matchGroupIds:[t],adjust:o}}function R7(){return()=>(t,e,i)=>{const s=new Float64Array(e.length);let o=0;for(const a of e){const n=t[a];for(const r of i.datumIndices[a]??[]){const l=n[r];s[o]=Number.isFinite(l)?l:NaN,o+=1,n[r]=s.subarray(0,o)}}}}function Mz(t){return{type:"group-value-processor",matchGroupIds:[t],adjust:R7}}function Dz(t){return t.id??t.property}function P7(t,e,i){const s=new Map,o=e.defs.values;for(let r=0;r<o.length;r+=1){const l=o[r];if(l.scopes?.includes(t)===!1)continue;const c=Dz(l);if(s.has(c))return;s.set(c,r)}const a=[],n=i.defs.values;for(let r=0;r<n.length;r+=1){const l=n[r];if(l.scopes?.includes(t)===!1)continue;const c=Dz(l),h=s.get(c);if(h==null)return;s.delete(c),a.push({previousIndex:h,nextIndex:r})}if(s.size===0)return a}function DC(t,e,i,s,o){for(const{previousIndex:a,nextIndex:n}of i){const r=t[a],l=e[n],c=r[s],h=l[o];if(c!==h)return!1}return!0}function Up(t,e,i=!0){return{type:"processor",property:"diff",calculate(s,o){const a=new Map,n=new Map,r=new Map,l=new Map,c=e.keys,h=s.keys,u=e.columns,d=s.columns,p=P7(t,e,s);if(p==null)return o;const g=Math.max(e.input.count,s.input.count);for(let y=0;y<g;y++){const b=y<e.input.count,S=y<s.input.count,M=b?TS(c,t,y):void 0,D=M!=null?Ss(M):"",L=S?TS(h,t,y):void 0,T=L!=null?Ss(L):"";if(S&&b&&D===T){DC(u,d,p,y,y)||r.set(T,y);continue}const I=l.get(T);I!=null?((i||!DC(u,d,p,I,y))&&(r.set(T,y),a.set(T,y)),l.delete(T)):S&&n.set(T,y);const N=n.get(D);N!=null?((i||!DC(u,d,p,N,y))&&(r.set(D,y),a.set(D,y)),n.delete(D)):b&&(r.delete(D),l.set(D,y))}const x={changed:n.size>0||r.size>0||l.size>0,added:new Set(n.keys()),updated:new Set(r.keys()),removed:new Set(l.keys()),moved:new Set(a.keys())};return{...o,[t]:x}}}}function Ss(t,...e){let i;return Et(t)?i=t.map(o=>IT(o)).join("___"):i=IT(t),(typeof i=="string"||typeof i=="number"||typeof i=="boolean"||i instanceof Date)&&e.length>0&&(i+=`___${e.join("___")}`),i}var kz,kC,AC,IC,Hp,Pm,TC,Ir=k({"packages/ag-charts-community/src/chart/data/processors.ts"(){"use strict";P(),xC(),Mm(),vC(),Ua(),kz=function(t){return t},kC={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let t=NaN;return(e=1/0,i)=>{const s=typeof i[0]=="number"?i[0]:Number(i[0]),o=Math.abs(s-t);return t=s,!isNaN(o)&&o>0&&o<e?o:e}}},AC={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer:()=>{let t=NaN;return(e=-1/0,i)=>{const s=typeof i[0]=="number"?i[0]:Number(i[0]),o=Math.abs(s-t);return t=s,!isNaN(o)&&o>0&&o>e?o:e}}},IC={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:t}})=>t?.slice().sort((e,i)=>{for(let s=0;s<e.length;s++){const o=e[s]-i[s];if(o!==0)return o}return 0})},Hp=1,Pm=2,TC=(t,e,i,s)=>{let o=Hp|Pm;if(e.valueType==="category")return i.length!==t&&(o&=~Hp),o;let a=s[0]?.valueOf();for(let n=1;o!==0&&n<s.length;n++){const r=s[n]?.valueOf();(!Number.isFinite(r)||a>r)&&(o&=~Pm),Number.isFinite(r)&&a===r&&(o&=~Hp),a=r}return o}}});function B7(t){const e=t.reduce((s,o)=>s<o.length?o.length:s,0),i=new Lz;for(let s=0;s<t.length;s++){const o=t[s];for(;o.length<e;)o.push("");i.insertTick(o,s)}return i}function z7(t,e,i){const s=e.index-t.index,o=i/s;e.change-=o,e.shift+=i,t.change+=o,e.prelim+=i,e.mod+=i}function F7(t,e,i){return e.getSiblings().indexOf(t.ancestor)>=0?t.ancestor:i}function G7({children:t}){let e=0,i=0;for(let s=t.length-1;s>=0;s--){const o=t[s];o.prelim+=e,o.mod+=e,i+=o.change,e+=o.shift+i}}function j7(t,e){const i=t.getLeftSibling();if(i){let s=t,o=t,a=i,n=o.getLeftmostSibling(),r=o.mod,l=s.mod,c=a.mod,h=n.mod;for(;a.nextRight()&&o.nextLeft();){a=a.nextRight(),o=o.nextLeft(),n=n.nextLeft(),s=s.nextRight(),s.ancestor=t;const u=a.prelim+c-(o.prelim+r)+1;u>0&&(z7(F7(a,t,e),t,u),r+=u,l+=u),c+=a.mod,r+=o.mod,h+=n.mod,l+=s.mod}a.nextRight()&&!s.nextRight()?s.mod+=c-l:(o.nextLeft()&&!n.nextLeft()&&(n.mod+=r-h),e=t)}return e}function Az(t){const{children:e}=t;if(e.length){let[i]=e;for(const a of e)Az(a),i=j7(a,i);G7(t);const s=(e[0].prelim+e.at(-1).prelim)/2,o=t.getLeftSibling();o?(t.prelim=o.prelim+1,t.mod=t.prelim-s):t.prelim=s}else{const i=t.getLeftSibling();t.prelim=i?i.prelim+1:0}}function Iz(t,e,i){t.x=t.prelim+e,t.y=t.depth,i.insertNode(t);for(const s of t.children)Iz(s,e+t.mod,i)}function Tz(t){const{children:e}=t;let i=0;for(const s of e)Tz(s),s.children.length?i+=s.leafCount:i++;t.leafCount=i,e.length?(t.subtreeLeft=e[0].subtreeLeft,t.subtreeRight=e[e.length-1].subtreeRight,t.x=(t.subtreeLeft+t.subtreeRight)/2):(t.subtreeLeft=t.x,t.subtreeRight=t.x)}function V7(t){const e=new Nz,i=B7(t);return Az(i),Iz(i,-i.prelim,e),Tz(i),e}var Cz,Lz,Nz,W7=k({"packages/ag-charts-community/src/chart/axis/tree.ts"(){"use strict";Cz=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(t,e){t>this.right&&(this.right=t),t<this.left&&(this.left=t),e>this.bottom&&(this.bottom=e),e<this.top&&(this.top=e)}},Lz=class n6{constructor(e="",i,s){this.label=e,this.parent=i,this.refId=s,this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.index=0,this.screenX=0,this.depth=i?i.depth+1:0}insertTick(e,i){let s=this;for(let o=0;o<e.length;o++){const a=e[o],n=o!==e.length-1,{children:r}=s,l=r.find(c=>c.label===a);if(l&&n)s=l;else{const c=new n6(a,s,i);c.index=r.length,r.push(c),n&&(s=c)}}}getLeftSibling(){return this.index>0?this.parent?.children[this.index-1]:void 0}getLeftmostSibling(){return this.index>0?this.parent?.children[0]:void 0}nextLeft(){return this.children[0]}nextRight(){return this.children.at(-1)}getSiblings(){return this.parent?.children.filter((e,i)=>i!==this.index)??[]}},Nz=class{constructor(){this.dimensions=new Cz,this.nodes=[],this.depth=0}insertNode(t){this.depth<t.depth&&(this.depth=t.depth),this.dimensions.update(t.x,t.y),this.nodes.push(t)}scalingX(t,e){let i=1;if(t>0){const{left:s,right:o}=this.dimensions;i=t/(o-s)}return e&&(i*=-1),i}}}}),Tr,Bm,sv,Pc,ov=k({"packages/ag-charts-community/src/chart/axis/groupedCategoryAxis.ts"(){"use strict";P(),A7(),Xt(),Vo(),ms(),Ci(),Ar(),ge(),HT(),Go(),Nt(),Ir(),Ka(),Nu(),W7(),Tr=class extends Ct{constructor(){super(...arguments),this.enabled=!0}},v([A(bt)],Tr.prototype,"enabled",2),v([A(bt,{optional:!0})],Tr.prototype,"avoidCollisions",2),v([A(zt,{optional:!0})],Tr.prototype,"color",2),v([A(lt,{optional:!0})],Tr.prototype,"spacing",2),v([A(pr,{optional:!0})],Tr.prototype,"fontStyle",2),v([A(gr,{optional:!0})],Tr.prototype,"fontWeight",2),v([A(Rt.restrict({min:1}),{optional:!0})],Tr.prototype,"fontSize",2),v([A(it,{optional:!0})],Tr.prototype,"fontFamily",2),Bm=class extends Ct{constructor(){super(...arguments),this.enabled=!0}},v([A(bt)],Bm.prototype,"enabled",2),v([A(lt,{optional:!0})],Bm.prototype,"width",2),v([A(zt,{optional:!0})],Bm.prototype,"stroke",2),sv=class extends Ct{constructor(){super(...arguments),this.label=new Tr,this.tick=new Bm}},v([A(ct)],sv.prototype,"label",2),v([A(ct)],sv.prototype,"tick",2),Pc=class extends _c{constructor(t){super(t,new mC),this.tickScale=new mC,this.depthOptions=new pp(sv),this.includeInvisibleDomains=!0,this.tickScale.paddingInner=1,this.tickScale.paddingOuter=0}resizeTickTree(){if(!this.tickTreeLayout)return;const{nodes:t}=this.tickTreeLayout,{range:e,step:i,inset:s,bandwidth:o}=this.scale,a=Math.abs(e[1]-e[0])-i,n=this.tickTreeLayout.scalingX(a,e[0]>e[1]),r=s+o/2;let l=0;for(const c of t){const h=c.x*n;l>h&&(l=h),c.screenX=h+r}for(const c of t)c.screenX-=l}getDepthOptionsMap(t){const e=[],{depthOptions:i,label:s}=this;for(let o=0;o<t;o++)e.push(i[o]?.label.enabled??s.enabled?{enabled:!0,spacing:i[o]?.label.spacing??s.spacing,lineHeight:Ee.getLineHeight(i[o]?.label.fontSize??s.fontSize??10),avoidCollisions:i[o]?.label.avoidCollisions??s.avoidCollisions}:{enabled:!1,spacing:0,lineHeight:0,avoidCollisions:!1});return e}updateCategoryLabels(){this.computedLayout&&this.tickLabelGroupSelection.update(this.computedLayout.tickLabelLayout).each((t,e)=>t.setProperties(e))}updateAxisLine(){this.computedLayout&&(this.lineNode.visible=this.line.enabled,this.lineNode.stroke=this.line.stroke,this.lineNode.strokeWidth=this.line.width)}computeLayout(){if(this.updateDirection(),this.updateScale(),this.resizeTickTree(),!this.tickTreeLayout?.depth)return{bbox:pt.zero,separatorLayout:[],tickLabelLayout:[]};const{step:t}=this.scale,{title:e,label:i,range:s,depthOptions:o}=this,{depth:a,nodes:n}=this.tickTreeLayout,r=Math.ceil(i.fontSize/t),l=je(this.rotation),c=this.position==="top"||this.position==="bottom",h=i.getSideFlag(),u=[],d=new Map,p=new iu,{defaultRotation:g,configuredRotation:f}=FS({rotation:i.rotation,parallel:i.parallel,regularFlipRotation:ke(l-Math.PI/2),parallelFlipRotation:ke(l)}),x=g+f,y=this.getDepthOptionsMap(a),b=(F,z)=>{const U=a-F.depth;if(!y[U]?.enabled||z%r!==0||!u_(F.screenX,s))return!1;const H=this.formatTick(F.label,z-1,this.scale.domain),j=this.getLabelStyles({value:H,depth:U},o[U]?.label);return p.setProperties({...j,text:H,textAlign:"center",textBaseline:i.parallel?"hanging":"bottom",rotation:0,translationX:0,translationY:F.screenX}),!0};let S=0;const M={};n.forEach((F,z)=>{const U=a-F.depth,H=GE(F.label);if(M[U]??(M[U]=1),M[U]<H&&(M[U]=H),!(!b(F,z)||!p.getBBox())&&(d.set(z,p.getBBox()),!F.leafCount)){p.rotation=x;const{width:V}=p.getBBox();S<V&&(S=V)}});const D=UT(),L=h*y[0].spacing,T=new Map,I=F=>{let z=S;for(let U=1;U<=F;U++)z+=y[U].spacing,(i.mirrored||U!==F)&&(z+=M[U]*y[U].lineHeight);return z};n.forEach((F,z)=>{if(z===0)return;const U=b(F,z),H=!F.children.length,j=a-F.depth;if(F.parent){const G=H?F.x:F.x-(F.leafCount-1)/2;if(!T.has(G)){const K=this.depthOptions[j]?.tick;let $=S;for(let Z=0;Z<=j;Z++)$+=y[Z].spacing,Z!==0&&($+=M[Z]*y[Z].lineHeight);T.set(G,{tickSize:$,tickStroke:K?.stroke,tickWidth:K?.enabled!==!1?K?.width:0})}}if(!U)return;if(p.x=L,p.y=0,H){const{width:G}=d.get(z),K=C_(x);p.rotation=x,p.textAlign="end",p.textBaseline="middle",p.rotationCenterX=L-G/2,p.translationX=(y[j].spacing-G)/2*K*h,i.mirrored&&(p.translationX+=G)}else p.rotation=c?g:-Math.PI/2,p.rotationCenterX=L,p.translationX=h*I(j);if(y[j].avoidCollisions){const G=H?t:F.leafCount*t;if(p.getBBox().height>G){d.delete(z);return}}const{text:V=""}=p;u.push({text:V,visible:!0,range:this.scale.range,tickId:D(V),fill:p.fill,fontFamily:p.fontFamily,fontSize:p.fontSize,fontStyle:p.fontStyle,fontWeight:p.fontWeight,rotation:p.rotation,rotationCenterX:p.rotationCenterX,textAlign:p.textAlign,textBaseline:p.textBaseline,translationX:p.translationX,translationY:p.translationY,x:p.x,y:p.y}),d.set(z,Ke.toCanvas(p))});const{enabled:N,stroke:O,width:R}=this.line;this.lineNode.datum={x:0,y1:s[0],y2:s[1]},this.lineNode.setProperties({stroke:O,strokeWidth:N?R:0});const _=[...T.values()];_.push(_[0]);const B=[this.lineNode.getBBox(),new pt(0,0,_[0].tickSize*h,0)];e.enabled&&(this.updateTitle(this.scale.domain,!1,_[0].tickSize),B.push(e.caption.node.getBBox()));const W=pt.merge(gc(d.values(),B));return{bbox:this.getTransformBox(W),separatorLayout:_,tickLabelLayout:u}}update(){if(!this.computedLayout)return;this.moduleCtx.animationManager.skipCurrentBatch();const{tickScale:t,gridLine:e,gridLength:i}=this,{separatorLayout:s}=this.computedLayout,o=t.ticks({nice:!1,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0}).map((a,n)=>({...s[n],tick:a,tickId:Ss(a,n),tickLabel:a.filter(Boolean).join(" - "),translationY:Math.round(t.convert(a))}));this.gridLineGroupSelection.update(e.enabled&&i?o:[]),this.tickLineGroupSelection.update(this.tick.enabled?o:[]),this.updatePosition(),this.updateCategoryLabels(),this.updateAxisLine(),this.updateGridLines(),this.updateTickLines(),this.updateTitle(this.scale.domain),this.resetSelectionNodes()}calculateLayout(){const{separatorLayout:t,tickLabelLayout:e,bbox:i}=this.computeLayout();return this.computedLayout={separatorLayout:t,tickLabelLayout:e},{bbox:i,niceDomain:this.scale.domain}}onGridVisibilityChange(){this.gridLineGroupSelection.clear(),this.tickLabelGroupSelection.clear()}updateScale(){super.updateScale(),this.tickScale.range=this.scale.range,this.scale.paddingOuter=this.scale.paddingInner/2}processData(){const{direction:t}=this,e=this.boundSeries.filter(o=>o.visible).flatMap(o=>o.getDomain(t));this.dataDomain={domain:Ml(e)??this.filterDuplicateArrays(e),clipped:!1},this.isReversed()&&this.dataDomain.domain.reverse();const i=this.dataDomain.domain.map(o=>Rf(li(o)&&"value"in o?o.value:o));this.tickTreeLayout=V7(i);const s=[];for(const o of this.tickTreeLayout.nodes)o.leafCount||o.refId==null||s.push(this.dataDomain.domain[o.refId]);this.scale.domain=r_(this.dataDomain.domain,s),this.tickScale.domain=i.concat([[""]])}updateGridLines(){if(!this.gridLength)return;const{width:t,style:e}=this.gridLine,i=this.gridLength*-this.label.getSideFlag();this.gridLineGroupSelection.each((s,o,a)=>{const{stroke:n,lineDash:r}=e[a%e.length],l=o.translationY;s.visible=this.inRange(l),s.x1=0,s.x2=i,s.y=l,s.stroke=n,s.strokeWidth=t,s.lineDash=r})}filterDuplicateArrays(t){const e=new Set;return t.filter(i=>{const s=Et(i)?JSON.stringify(i):i;return e.has(s)?!1:(e.add(s),!0)})}},Pc.className="GroupedCategoryAxis",Pc.type="grouped-category",v([A(Bb)],Pc.prototype,"depthOptions",2)}});function CC(t,e,i){const s=Math.min(...e),o=Oz[t]??wz;return s>=0?o(t,i):-o(t,-i)}function LC(t,e,i){const s=Math.min(...e),o=Ez[t]??_z;return s>=0?o(t,i):-o(t,-i)}var Oz,wz,Ez,_z,av,NC=k({"packages/ag-charts-community/src/scale/logScale.ts"(){"use strict";P(),da(),mu(),So(),mP(),Oz={2:(t,e)=>Math.log2(e),[Math.E]:(t,e)=>Math.log(e),10:(t,e)=>Math.log10(e)},wz=(t,e)=>Math.log(e)/Math.log(t),Ez={[Math.E]:(t,e)=>Math.exp(e),10:(t,e)=>e>=0?10**e:1/10**-e},_z=(t,e)=>t**e,av=class extends pe{constructor(t=[1,10],e=[0,1]){super(t,e),this.type="log",this.defaultClamp=!0,this.base=10,this.log=i=>CC(this.base,this.domain,i),this.pow=i=>LC(this.base,this.domain,i)}toDomain(t){return t}transform(t){const[e,i]=Li(this.domain);return e>=0!=i>=0?NaN:e>=0?Math.log(t):-Math.log(-t)}transformInvert(t){const[e,i]=Li(this.domain);return e>=0!=i>=0?NaN:e>=0?Math.exp(t):-Math.exp(-t)}niceDomain(t,e=this.domain){if(e.length<2)return[];const{base:i}=this,[s,o]=e,a=s>o?Math.ceil:Math.floor,n=s>o?Math.floor:Math.ceil,r=LC(i,e,a(CC(i,e,s))),l=LC(i,e,n(CC(i,e,o)));return[r,l]}ticks({interval:t,tickCount:e=pe.defaultTickCount},i=this.domain,s){if(!i||i.length<2||e<1)return[];const o=this.base,[a,n]=i,r=Math.min(a,n),l=Math.max(a,n);let c=this.log(r),h=this.log(l);if(t){const f=b=>b>=r&&b<=l,x=Math.min(Math.abs(t),Math.abs(h-c)),y=bm(c,h,x).map(this.pow).filter(f);if(!Op(y.length,this.getPixelRange()))return y}if(!d_(o)||h-c>=e)return sT(c,h,Math.min(h-c,e)).map(this.pow);let u=[];const d=r>0;c=Math.floor(c)-1,h=Math.round(h)+1;const p=Ip(this.range)/e;let g=1/0;for(let f=c;f<=h;f++){const x=this.convert(this.pow(f+1));for(let y=1;y<o;y++){const b=d?y:o-y+1,S=this.pow(f)*b,M=this.convert(S),D=Math.abs(g-M),L=Math.abs(M-x),T=D>=p&&L>=p;S>=r&&S<=l&&(y===1||T||u.length===0)&&(u.push(S),g=M)}}return u=fP(u,d,s),u}tickFormatter({specifier:t}){return t!=null?cA(t):String}datumFormatter(t){return this.tickFormatter(t)}}}}),qa,wu=k({"packages/ag-charts-community/src/scale/linearScale.ts"(){"use strict";Ac(),mu(),So(),qa=class r6 extends pe{constructor(){super([0,1],[0,1]),this.type="number"}static getTickStep(e,i,s){const{interval:o,tickCount:a=pe.defaultTickCount,minTickCount:n,maxTickCount:r}=s;return o??xm(e,i,a,n,r)}toDomain(e){return e}ticks({interval:e,tickCount:i=pe.defaultTickCount,minTickCount:s,maxTickCount:o},a=this.domain,n){if(!a||a.length<2||i<1||!a.every(isFinite))return[];const[r,l]=a;if(e){const c=Math.abs(e);if(!Op((l-r)/c,this.getPixelRange()))return bm(r,l,c)}return sT(r,l,i,s,o,n)}niceDomain(e,i=this.domain){if(i.length<2)return[];const{tickCount:s=pe.defaultTickCount}=e;let[o,a]=i;if(s===1)[o,a]=I8(o,a);else if(s>1){const n=o>a?Math.ceil:Math.floor,r=o>a?Math.floor:Math.ceil,l=4;for(let c=0;c<l;c++){const h=o,u=a,d=r6.getTickStep(o,a,e),[p,g]=i;if(o=n(p/d)*d,a=r(g/d)*d,o===h&&a===u)break}}return[o,a]}tickFormatter({ticks:e,fractionDigits:i,specifier:s}){return s!=null?SP(e,s):o=>ml(o,i)}datumFormatter({ticks:e,fractionDigits:i,specifier:s}){return s!=null?SP(e,s):o=>ml(o,i+1)}}}}),Cr,zm=k({"packages/ag-charts-community/src/chart/axis/numberAxis.ts"(){"use strict";wu(),Ar(),Nt(),Tm(),Cr=class extends Bp{constructor(t,e=new qa){super(t,e)}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:o}=yC(t,e,i);return{domain:s,clipped:o}}},Cr.className="NumberAxis",Cr.type="number",v([A(cl($f,Zf("max")),{optional:!0})],Cr.prototype,"min",2),v([A(cl($f,qf("min")),{optional:!0})],Cr.prototype,"max",2)}}),Eu,nv=k({"packages/ag-charts-community/src/chart/axis/logAxis.ts"(){"use strict";P(),NC(),Ar(),zm(),Eu=class extends Cr{normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:o}=yC(t,e,i);return s[0]<0&&s[1]>0||t[0]<0&&t[1]>0?(tt.warn("The log axis domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:o}):s[0]===0||s[1]===0||t[0]===0||t[1]===0?(tt.warn("The log axis domain contains a value of 0, the chart data cannot be rendered. See log axis documentation for more information."),{domain:[],clipped:o}):{domain:s,clipped:o}}set base(t){this.scale.base=t}get base(){return this.scale.base}constructor(t){super(t,new av)}defaultDatumFormatter(t,e){return String(t)}defaultLabelFormatter(t,e){return String(t)}},Eu.className="LogAxis",Eu.type="log"}}),Dl,rv=k({"packages/ag-charts-community/src/chart/axis/timeAxis.ts"(){"use strict";rT(),Ar(),Nt(),Tm(),Dl=class extends Bp{constructor(t){super(t,new nT),this.min=void 0,this.max=void 0}normaliseDataDomain(t){let{min:e,max:i}=this,s=!1;return typeof e=="number"&&(e=new Date(e)),typeof i=="number"&&(i=new Date(i)),t.length>2&&(t=Ml(t)?.map(o=>new Date(o))??[]),e instanceof Date&&(s||(s=e>t[0]),t=[e,t[1]]),i instanceof Date&&(s||(s=i<t[1]),t=[t[0],i]),t[0]>t[1]&&(t=[]),{domain:t,clipped:s}}},Dl.className="TimeAxis",Dl.type="time",v([A(cl(Pb,Zf("max")),{optional:!0})],Dl.prototype,"min",2),v([A(cl(Pb,qf("min")),{optional:!0})],Dl.prototype,"max",2)}}),Yp,Rz=k({"packages/ag-charts-community/src/scene/util/corner.ts"(){"use strict";Yp=(t,{x0:e,y0:i,x1:s,y1:o,cx:a,cy:n},r,l)=>{if(l&&t.moveTo(e,i),e!==s||i!==o){const c=Math.atan2(i-n,e-a),h=Math.atan2(o-n,s-a);t.arc(a,n,r,c,h)}else t.lineTo(e,i)}}}),OC,Fm,Gm,Bs,jm=k({"packages/ag-charts-community/src/scene/shape/rect.ts"(){"use strict";Xt(),Hb(),Rz(),Xa(),Sc(),OC=1e-6,Fm=(t,e,i,s,o)=>{let a=!1,n=!1,r=s-Math.sqrt(Math.max(o**2-i**2,0)),l=0,c=0,h=i-Math.sqrt(Math.max(o**2-s**2,0));return r>t?(a=!0,r=t,l=i-Math.sqrt(Math.max(o**2-(s-t)**2))):r<OC&&(r=0),h>e?(n=!0,c=s-Math.sqrt(Math.max(o**2-(i-e)**2)),h=e):h<OC&&(h=0),{leading0:r,leading1:l,trailing0:c,trailing1:h,leadingClipped:a,trailingClipped:n}},Gm=(t,e,i,s,o,a,n)=>{let{topLeft:r,topRight:l,bottomRight:c,bottomLeft:h}=a;const u=Math.max(r+h,l+c),d=Math.max(r+l,h+c);if(u<=0&&d<=0){n==null?t.rect(e,i,s,o):t.rect(n.x,n.y,n.width,n.height);return}else if(n==null&&r===l&&r===c&&r===h){t.roundRect(e,i,s,o,r);return}if(s<0&&(e+=s,s=Math.abs(s)),o<0&&(i+=o,o=Math.abs(o)),s<=0||o<=0)return;if(n==null)n=new pt(e,i,s,o);else{const T=Math.max(e,n.x),I=Math.min(e+s,n.x+n.width),N=Math.max(i,n.y),O=Math.min(i+o,n.y+n.height);n=new pt(T,N,I-T,O-N)}const p=Math.max(u/o,d/s,1);p>1&&(r/=p,l/=p,c/=p,h/=p);let g=!0,f=!0,x=!0,y=!0,b,S,M,D;if(g){const T=Fm(n.height,n.width,Math.max(e+r-n.x,0),Math.max(i+r-n.y,0),r);T.leadingClipped&&(y=!1),T.trailingClipped&&(f=!1);const I=Math.max(n.x+T.leading1,n.x),N=Math.max(n.y+T.leading0,n.y),O=Math.max(n.x+T.trailing1,n.x),R=Math.max(n.y+T.trailing0,n.y),_=e+r,B=i+r;b={x0:I,y0:N,x1:O,y1:R,cx:_,cy:B}}if(f){const T=Fm(n.width,n.height,Math.max(i+l-n.y,0),Math.max(n.x+n.width-(e+s-l),0),l);T.leadingClipped&&(g=!1),T.trailingClipped&&(x=!1);const I=Math.min(n.x+n.width-T.leading0,n.x+n.width),N=Math.max(n.y+T.leading1,n.y),O=Math.min(n.x+n.width-T.trailing0,n.x+n.width),R=Math.max(n.y+T.trailing1,n.y),_=e+s-l,B=i+l;S={x0:I,y0:N,x1:O,y1:R,cx:_,cy:B}}if(x){const T=Fm(n.height,n.width,Math.max(n.x+n.width-(e+s-c),0),Math.max(n.y+n.height-(i+o-c),0),c);T.leadingClipped&&(f=!1),T.trailingClipped&&(y=!1);const I=Math.min(n.x+n.width-T.leading1,n.x+n.width),N=Math.min(n.y+n.height-T.leading0,n.y+n.height),O=Math.min(n.x+n.width-T.trailing1,n.x+n.width),R=Math.min(n.y+n.height-T.trailing0,n.y+n.height),_=e+s-c,B=i+o-c;M={x0:I,y0:N,x1:O,y1:R,cx:_,cy:B}}if(y){const T=Fm(n.width,n.height,Math.max(n.y+n.height-(i+o-h),0),Math.max(e+h-n.x,0),h);T.leadingClipped&&(x=!1),T.trailingClipped&&(g=!1);const I=Math.max(n.x+T.leading0,n.x),N=Math.min(n.y+n.height-T.leading1,n.y+n.height),O=Math.max(n.x+T.trailing0,n.x),R=Math.min(n.y+n.height-T.trailing1,n.y+n.height),_=e+h,B=i+o-h;D={x0:I,y0:N,x1:O,y1:R,cx:_,cy:B}}let L=!1;g&&b!=null&&(Yp(t,b,r,!L),L||(L=!0)),f&&S!=null&&(Yp(t,S,l,!L),L||(L=!0)),x&&M!=null&&(Yp(t,M,c,!L),L||(L=!0)),y&&D!=null&&Yp(t,D,h,!L),t.closePath()},Bs=class extends io{constructor(){super(...arguments),this.borderPath=new Zh,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=ua.defaultStyles.strokeWidth,this.effectiveStrokeWidth=ua.defaultStyles.strokeWidth,this.hittester=super.isPointInPath.bind(this),this.distanceCalculator=super.distanceSquaredTransformedPoint.bind(this),this.microPixelEffectOpacity=1}set cornerRadius(t){this.topLeftCornerRadius=t,this.topRightCornerRadius=t,this.bottomRightCornerRadius=t,this.bottomLeftCornerRadius=t}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){const{path:t,borderPath:e,crisp:i,topLeftCornerRadius:s,topRightCornerRadius:o,bottomRightCornerRadius:a,bottomLeftCornerRadius:n}=this;let{x:r,y:l,width:c,height:h,strokeWidth:u,clipBBox:d}=this;const g=1/(this.layerManager?.canvas.pixelRatio??1);let f=1;if(t.clear(!0),e.clear(!0),i&&(c<=g&&(f*=c/g),h<=g&&(f*=h/g),c=this.align(r,c),h=this.align(l,h),r=this.align(r),l=this.align(l),d=d!=null?new pt(this.align(d.x),this.align(d.y),this.align(d.x,d.width),this.align(d.y,d.height)):void 0),u)if(c<g){const x=r+g/2;e.moveTo(x,l),e.lineTo(x,l+h),u=g,this.borderClipPath=void 0}else if(h<g){const x=l+g/2;e.moveTo(r,x),e.lineTo(r+c,x),u=g,this.borderClipPath=void 0}else if(u<c&&u<h){const x=u/2;r+=x,l+=x,c-=u,h-=u;const y=d?.clone().shrink(x),b={topLeft:s>0?s-u:0,topRight:o>0?o-u:0,bottomRight:a>0?a-u:0,bottomLeft:n>0?n-u:0};this.borderClipPath=void 0,c>0&&h>0&&(y==null||y?.width>0&&y?.height>0)&&(Gm(t,r,l,c,h,b,y),Gm(e,r,l,c,h,b,y))}else this.borderClipPath=this.borderClipPath??new Zh,this.borderClipPath.clear(!0),this.borderClipPath.rect(r,l,c,h),e.rect(r,l,c,h);else{const x={topLeft:s,topRight:o,bottomRight:a,bottomLeft:n};this.borderClipPath=void 0,Gm(t,r,l,c,h,x,d)}if([s,o,a,n].every(x=>x===0)){const x=this.getBBox();this.hittester=x.containsPoint.bind(x),this.distanceSquared=(y,b)=>this.getBBox().distanceSquared(y,b)}else this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint;this.effectiveStrokeWidth=u,this.lastUpdatePathStrokeWidth=u,this.microPixelEffectOpacity=f}computeBBox(){const{x:t,y:e,width:i,height:s,clipBBox:o}=this;return o?.clone()??new pt(t,e,i,s)}isPointInPath(t,e){return this.hittester(t,e)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(t,e){return this.distanceCalculator(t,e)}applyFillAlpha(t){const{fillOpacity:e,microPixelEffectOpacity:i,opacity:s}=this;t.globalAlpha*=s*e*i}renderStroke(t){const{stroke:e,effectiveStrokeWidth:i}=this;if(e&&i){const{globalAlpha:s}=t,{strokeOpacity:o,lineDash:a,lineDashOffset:n,lineCap:r,lineJoin:l,borderPath:c,borderClipPath:h,opacity:u,microPixelEffectOpacity:d}=this;h&&t.clip(h.getPath2D()),this.applyStroke(t),t.globalAlpha*=u*o*d,t.lineWidth=i,a&&t.setLineDash(a),n&&(t.lineDashOffset=n),r&&(t.lineCap=r),l&&(t.lineJoin=l),t.stroke(c.getPath2D()),t.globalAlpha=s}}},Bs.className="Rect",v([Ot()],Bs.prototype,"x",2),v([Ot()],Bs.prototype,"y",2),v([Ot()],Bs.prototype,"width",2),v([Ot()],Bs.prototype,"height",2),v([Ot()],Bs.prototype,"topLeftCornerRadius",2),v([Ot()],Bs.prototype,"topRightCornerRadius",2),v([Ot()],Bs.prototype,"bottomRightCornerRadius",2),v([Ot()],Bs.prototype,"bottomLeftCornerRadius",2),v([Ot()],Bs.prototype,"clipBBox",2),v([Ot()],Bs.prototype,"crisp",2)}}),_u,Pz=k({"packages/ag-charts-community/src/chart/background/background.ts"(){"use strict";hr(),Ve(),jm(),Vo(),bo(),Nt(),_u=class extends Pf{constructor(t){super(),this.ctx=t,this.rectNode=new Bs,this.textNode=new Yi,this.fill="white",this.node=this.createNode(),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.destroyFns.push(t.scene.attachNode(this.node),t.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)))}createNode(){return new It({name:"background",zIndex:0})}onLayoutComplete(t){const{width:e,height:i}=t.chart;this.rectNode.width=e,this.rectNode.height=i}},v([A(bt),ys("node","visible")],_u.prototype,"visible",2),v([A(zt,{optional:!0}),ys("rectNode","fill")],_u.prototype,"fill",2),v([A(ct,{optional:!0})],_u.prototype,"image",2),v([A(it,{optional:!0}),ys("textNode")],_u.prototype,"text",2)}}),wC,Bz=k({"packages/ag-charts-community/src/chart/background/backgroundModule.ts"(){"use strict";Pz(),wC={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new _u(t)}}});function U7({orientation:t,bboxes:e,maxHeight:i,maxWidth:s,itemPaddingY:o=0,itemPaddingX:a=0,forceResult:n=!1}){const r=t==="horizontal",l={max:r?s:i,fn:r?d=>d.width:d=>d.height,padding:r?a:o},c={max:r?i:s,fn:r?d=>d.height:d=>d.width,padding:r?o:a};let h=0;const u=[];for(;h<e.length;){const d=e.slice(h),p=H7(d,h,l,c,n);if(!p)return;h+=p.processedBBoxCount,u.push(p.pageIndices)}return K7(u,t,e,o,a)}function H7(t,e,i,s,o){let n=X7(t,i);if(n<1){if(!o)return;n=1}let r=n;for(;r>=1;){const l=Y7(t,e,r,i,s,o);if(l==null&&r<=1)return;if(l==null){r--;continue}if(typeof l=="number"){if(l<=1)return;r=l<r&&l>1?l:r,r--;continue}return{processedBBoxCount:l.length*l[0].length,pageIndices:l}}}function Y7(t,e,i,s,o,a){const n=[];let r=0,l=0,c=[];const h=[];for(let u=0;u<t.length;u++){const d=(u+i)%i;d===0&&(r+=l,l=0,c.length>0&&n.push(c),c=[]);const p=s.fn(t[u])+s.padding;h[d]=Math.max(h[d]??0,p),l=Math.max(l,o.fn(t[u])+o.padding);const g=r+l,f=!a||n.length>0;if(g>o.max&&f){c=[];break}if(h.reduce((y,b)=>y+b,0)>s.max&&!a)return h.length<i?h.length:void 0;c.push(u+e)}return c.length>0&&n.push(c),n.length>0?n:void 0}function K7(t,e,i,s,o){let a=0,n=0;return{pages:t.map(l=>{e==="horizontal"&&(l=$7(l));let c=0;const h=l.map(p=>{const g=p.map(y=>(c=Math.max(y,c),i[y]));let f=0,x=0;return g.forEach(y=>{f+=y.height+s,x=Math.max(x,y.width+o)}),{indices:p,bboxes:g,columnHeight:Math.ceil(f),columnWidth:Math.ceil(x)}});let u=0,d=0;return h.forEach(p=>{u+=p.columnWidth,d=Math.max(d,p.columnHeight)}),a=Math.max(u,a),n=Math.max(d,n),{columns:h,startIndex:l[0][0],endIndex:c,pageWidth:u,pageHeight:d}}),maxPageWidth:a,maxPageHeight:n}}function $7(t){const e=[];for(const i of t[0])e.push([]);return t.forEach((i,s)=>{i.forEach((o,a)=>{e[a][s]=o})}),e}function X7(t,e){const i=t.length;let s=0;for(let o=0;o<i;o++)if(s+=e.fn(t[o])+e.padding,s>e.max)return i/o<2?Math.ceil(i/2):o;return i}var Z7=k({"packages/ag-charts-community/src/chart/gridLayout.ts"(){"use strict"}}),Ru,Lr,Vm,Bc,q7=k({"packages/ag-charts-community/src/chart/pagination/pagination.ts"(){"use strict";P(),Ve(),Vo(),ms(),Bo(),ge(),bo(),Nt(),zn(),Ru=class extends Ct{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}},v([A(zt)],Ru.prototype,"color",2),v([A(pr,{optional:!0})],Ru.prototype,"fontStyle",2),v([A(gr,{optional:!0})],Ru.prototype,"fontWeight",2),v([A(lt)],Ru.prototype,"fontSize",2),v([A(it)],Ru.prototype,"fontFamily",2),Lr=class extends Ct{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}},v([A(lt)],Lr.prototype,"size",2),v([A(zt,{optional:!0})],Lr.prototype,"fill",2),v([A(le,{optional:!0})],Lr.prototype,"fillOpacity",2),v([A(zt,{optional:!0})],Lr.prototype,"stroke",2),v([A(lt)],Lr.prototype,"strokeWidth",2),v([A(le)],Lr.prototype,"strokeOpacity",2),Vm=class extends Ct{constructor(t){super(),this.parent=t,this.shape="triangle",this.size=15,this.padding=8}},v([Fo({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],Vm.prototype,"shape",2),v([A(lt)],Vm.prototype,"size",2),v([A(lt)],Vm.prototype,"padding",2),Bc=class extends Ct{constructor(t,e){super(),this.chartUpdateCallback=t,this.pageUpdateCallback=e,this.id=la(this),this.marker=new Vm(this),this.activeStyle=new Lr,this.inactiveStyle=new Lr,this.highlightStyle=new Lr,this.label=new Ru,this.group=new qs({name:"pagination"}),this.labelNode=new Yi,this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this.nextButton=new Xi,this.previousButton=new Xi,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]),this.update(),this.updateMarkers()}set visible(t){this._visible=t,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(t){this._enabled=t,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(t){switch(this._orientation=t,t){case"horizontal":{this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;break}case"vertical":default:this.previousButton.rotation=0,this.nextButton.rotation=Math.PI}}get orientation(){return this._orientation}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){const{size:t,padding:e}=this.marker;this.nextButton.size=t,this.previousButton.size=t,this.labelNode.x=t/2+e}updateNextButtonPosition(){const t=this.labelNode.getBBox();this.nextButton.translationX=t.width+(this.marker.size/2+this.marker.padding)*2}updateLabel(){const{currentPage:t,totalPages:e,labelNode:i,label:{color:s,fontStyle:o,fontWeight:a,fontSize:n,fontFamily:r}}=this;i.text=`${t+1} / ${e}`,i.fill=s,i.fontStyle=o,i.fontWeight=a,i.fontSize=n,i.fontFamily=r}updateMarkers(){const{nextButton:t,previousButton:e,nextButtonDisabled:i,previousButtonDisabled:s,activeStyle:o,inactiveStyle:a,highlightStyle:n,highlightActive:r}=this,l=(c,h)=>h?a:c===r?n:o;this.updateMarker(t,l("next",i)),this.updateMarker(e,l("previous",s))}updateMarker(t,e){const{shape:i,size:s}=this.marker;t.shape=i,t.size=s,t.fill=e.fill,t.fillOpacity=e.fillOpacity??1,t.stroke=e.stroke,t.strokeWidth=e.strokeWidth,t.strokeOpacity=e.strokeOpacity}enableOrDisableButtons(){const{currentPage:t,totalPages:e}=this,i=e===0,s=t===e-1,o=t===0;this.nextButtonDisabled=s||i,this.previousButtonDisabled=o||i}setPage(t){t=Tt(0,t,Math.max(0,this.totalPages-1)),this.currentPage!==t&&(this.currentPage=t,this.onPaginationChanged())}getCursor(t){return{previous:this.previousButtonDisabled,next:this.nextButtonDisabled}[t]?void 0:"pointer"}onClick(t,e){t.preventDefault(),e==="next"&&!this.nextButtonDisabled?(this.incrementPage(),this.onPaginationChanged()):e==="previous"&&!this.previousButtonDisabled&&(this.decrementPage(),this.onPaginationChanged())}onMouseHover(t){this.highlightActive=t,this.updateMarkers(),this.chartUpdateCallback(6)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(6)}attachPagination(t){t.append(this.group)}getBBox(){return this.group.getBBox()}computeCSSBounds(){const t=Ke.toCanvas(this.previousButton),e=Ke.toCanvas(this.nextButton);return{prev:t,next:e}}},Bc.className="Pagination",v([A(ct)],Bc.prototype,"marker",2),v([A(ct)],Bc.prototype,"activeStyle",2),v([A(ct)],Bc.prototype,"inactiveStyle",2),v([A(ct)],Bc.prototype,"highlightStyle",2),v([A(ct)],Bc.prototype,"label",2)}}),lv,EC=k({"packages/ag-charts-community/src/scene/util/changeDetectableProperties.ts"(){"use strict";ge(),lv=class extends Ct{constructor(){super(...arguments),this._dirty=!0}markDirty(){this._dirty=!0}markClean(t){this._dirty=!1}isDirty(){return this._dirty}}}});function Q7(t){return typeof t=="string"&&zz.has(t)}var zz,J7=k({"packages/ag-charts-community/src/chart/marker/util.ts"(){"use strict";zz=new Set(["circle","cross","diamond","heart","pin","plus","square","star","triangle"])}}),Nr,Wm,_C,cv,ya,Xe,Kp,Ko,kl=k({"packages/ag-charts-community/src/chart/series/seriesProperties.ts"(){"use strict";ge(),Nt(),Nr=class extends Ct{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}},v([A(zt,{optional:!0})],Nr.prototype,"fill",2),v([A(le,{optional:!0})],Nr.prototype,"fillOpacity",2),v([A(zt,{optional:!0})],Nr.prototype,"stroke",2),v([A(lt,{optional:!0})],Nr.prototype,"strokeWidth",2),v([A(le,{optional:!0})],Nr.prototype,"strokeOpacity",2),v([A(Nn,{optional:!0})],Nr.prototype,"lineDash",2),v([A(lt,{optional:!0})],Nr.prototype,"lineDashOffset",2),Wm=class extends Ct{},v([A(lt,{optional:!0})],Wm.prototype,"strokeWidth",2),v([A(le,{optional:!0})],Wm.prototype,"dimOpacity",2),v([A(bt,{optional:!0})],Wm.prototype,"enabled",2),_C=class extends Ct{constructor(){super(...arguments),this.color="black"}},v([A(zt,{optional:!0})],_C.prototype,"color",2),cv=class extends Ct{constructor(){super(...arguments),this.enabled=!0}},v([A(bt,{optional:!0})],cv.prototype,"enabled",2),ya=class extends Ct{constructor(){super(...arguments),this.type="gradient",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.reverse=!1}},v([A(it)],ya.prototype,"type",2),v([A(bc)],ya.prototype,"colorStops",2),v([A(it)],ya.prototype,"bounds",2),v([A(it)],ya.prototype,"gradient",2),v([A(Rt)],ya.prototype,"rotation",2),v([A(bt)],ya.prototype,"reverse",2),Xe=class extends Ct{constructor(){super(...arguments),this.type="pattern",this.colorStops=[],this.bounds="item",this.gradient="linear",this.rotation=0,this.reverse=!1,this.pattern="forward-slanted-lines",this.width=26,this.height=26,this.padding=6,this.fill="black",this.fillOpacity=1,this.backgroundFill="white",this.backgroundFillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0}},v([A(it)],Xe.prototype,"type",2),v([A(bc)],Xe.prototype,"colorStops",2),v([A(it)],Xe.prototype,"bounds",2),v([A(it)],Xe.prototype,"gradient",2),v([A(Rt)],Xe.prototype,"rotation",2),v([A(bt)],Xe.prototype,"reverse",2),v([A(it)],Xe.prototype,"pattern",2),v([A(Rt)],Xe.prototype,"width",2),v([A(Rt)],Xe.prototype,"height",2),v([A(Rt)],Xe.prototype,"padding",2),v([A(it)],Xe.prototype,"fill",2),v([A(Rt)],Xe.prototype,"fillOpacity",2),v([A(it)],Xe.prototype,"backgroundFill",2),v([A(Rt)],Xe.prototype,"backgroundFillOpacity",2),v([A(it)],Xe.prototype,"stroke",2),v([A(Rt)],Xe.prototype,"strokeOpacity",2),v([A(Rt)],Xe.prototype,"strokeWidth",2),Kp=class extends Ct{constructor(){super(...arguments),this.item=new Nr,this.series=new Wm,this.text=new _C}},v([A(ct)],Kp.prototype,"item",2),v([A(ct)],Kp.prototype,"series",2),v([A(ct)],Kp.prototype,"text",2),Ko=class extends Ct{constructor(){super(...arguments),this.visible=!0,this.focusPriority=1/0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new cv,this.highlightStyle=new Kp}handleUnknownProperties(t,e){"context"in e&&(this.context=e.context,t.delete("context"))}},v([A(it,{optional:!0})],Ko.prototype,"id",2),v([A(bt)],Ko.prototype,"visible",2),v([A(NA,{optional:!0})],Ko.prototype,"focusPriority",2),v([A(bt)],Ko.prototype,"showInLegend",2),v([A(it)],Ko.prototype,"cursor",2),v([A(Jf)],Ko.prototype,"nodeClickRange",2),v([A(ct)],Ko.prototype,"highlight",2),v([A(ct)],Ko.prototype,"highlightStyle",2)}}),hv,ls,$p=k({"packages/ag-charts-community/src/chart/series/seriesMarker.ts"(){"use strict";kb(),EC(),Nt(),J7(),kl(),hv=me(t=>Q7(t)||typeof t=="function","a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),ls=class extends lv{constructor(){super(...arguments),this.enabled=!0,this.shape="circle",this.size=6,this.fillGradientDefaults=new ya,this.fillPatternDefaults=new Xe,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(){const{size:t,shape:e,fill:i,fillOpacity:s,stroke:o,strokeWidth:a,strokeOpacity:n,lineDash:r,lineDashOffset:l}=this;return{size:t,shape:e,fill:i,fillOpacity:s,stroke:o,strokeWidth:a,strokeOpacity:n,lineDash:r,lineDashOffset:l}}getDiameter(){return this.size+this.strokeWidth}},v([A(bt),gt()],ls.prototype,"enabled",2),v([A(hv),gt()],ls.prototype,"shape",2),v([A(lt),gt()],ls.prototype,"size",2),v([A(fs(zt,Ln,Cn),{optional:!0}),gt()],ls.prototype,"fill",2),v([A(ct)],ls.prototype,"fillGradientDefaults",2),v([A(ct)],ls.prototype,"fillPatternDefaults",2),v([A(le),gt()],ls.prototype,"fillOpacity",2),v([A(zt,{optional:!0}),gt()],ls.prototype,"stroke",2),v([A(lt),gt()],ls.prototype,"strokeWidth",2),v([A(le),gt()],ls.prototype,"strokeOpacity",2),v([A(Nn)],ls.prototype,"lineDash",2),v([A(lt)],ls.prototype,"lineDashOffset",2),v([A(Zs,{optional:!0}),gt()],ls.prototype,"itemStyler",2)}}),Fz,tQ=k({"packages/ag-charts-community/src/chart/legend/legendDOMProxy.ts"(){"use strict";P(),ms(),BR(),Fz=class{constructor(t,e){this.idPrefix=e,this.dirty=!0,this.destroyFns=new nI,this.itemList=t.proxyInteractionService.createProxyContainer({type:"list",domManagerId:`${e}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"}}),this.paginationGroup=t.proxyInteractionService.createProxyContainer({type:"group",domManagerId:`${e}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"},ariaOrientation:"horizontal"}),this.itemDescription=Bt("p"),this.itemDescription.style.display="none",this.itemDescription.id=`${e}-ariaDescription`,this.itemDescription.textContent=this.getItemAriaDescription(t.localeManager),this.itemList.getElement().append(this.itemDescription)}destroy(){this.destroyFns.destroy()}initLegendList(t){if(!this.dirty)return;const{ctx:e,itemSelection:i,datumReader:s,itemListener:o}=t,a=e.localeManager,n=i.length;i.each((r,l,c)=>{r.proxyButton?.destroy(),r.proxyButton=e.proxyInteractionService.createProxyElement({type:"listswitch",textContent:this.getItemAriaText(a,s.getItemLabel(l),c,n),ariaChecked:!!r.datum.enabled,ariaDescribedBy:this.itemDescription.id,parent:this.itemList});const h=r.proxyButton;h.addListener("click",u=>o.onClick(u.sourceEvent,r.datum,h)),h.addListener("dblclick",u=>o.onDoubleClick(u.sourceEvent,r.datum)),h.addListener("mouseenter",u=>o.onHover(u.sourceEvent,r)),h.addListener("mouseleave",()=>o.onLeave()),h.addListener("contextmenu",u=>o.onContextClick(u.sourceEvent,r)),h.addListener("blur",()=>o.onLeave()),h.addListener("focus",u=>o.onHover(u.sourceEvent,r)),h.addListener("drag-start",()=>{})}),this.dirty=!1}update(t){t.visible&&(this.initLegendList(t),this.updateItemProxyButtons(t),this.updatePaginationProxyButtons(t,!0)),this.updateVisibility(t.visible)}updateVisibility(t){this.itemList.setHidden(!t),this.paginationGroup.setHidden(!t)}updateItemProxyButtons({itemSelection:t,group:e,pagination:i,interactive:s}){const o=Ke.toCanvas(e);this.itemList.setBounds(o);const a=Math.max(...t.nodes().map(n=>n.getBBox().height));t.each((n,r)=>{if(n.proxyButton){const l=n.pageIndex===i.currentPage,{x:c,y:h,height:u,width:d}=Ke.toCanvas(n),p=(a-u)/2,g={x:c-o.x,y:h-p-o.y,height:a,width:d};n.proxyButton.setCursor("pointer"),n.proxyButton.setEnabled(s&&l),n.proxyButton.setBounds(g)}})}updatePaginationProxyButtons(t,e){const{pagination:i}=t;if(this.paginationGroup.setHidden(!i.visible),e&&"ctx"in t){const{ctx:a,oldPages:n,newPages:r}=t,l=(n?.length??r.length)>1,c=r.length>1;l!==c&&(c?(this.prevButton=a.proxyInteractionService.createProxyElement({type:"button",id:`${this.idPrefix}-prev-page`,textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.paginationGroup}),this.prevButton.addListener("click",h=>this.onPageButton(t,h,"previous")),this.prevButton.addListener("mouseenter",()=>i.onMouseHover("previous")),this.prevButton.addListener("mouseleave",()=>i.onMouseHover(void 0)),this.nextButton??(this.nextButton=a.proxyInteractionService.createProxyElement({type:"button",id:`${this.idPrefix}-next-page`,textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.paginationGroup})),this.nextButton.addListener("click",h=>this.onPageButton(t,h,"next")),this.nextButton.addListener("mouseenter",()=>i.onMouseHover("next")),this.nextButton.addListener("mouseleave",()=>i.onMouseHover(void 0))):(this.nextButton?.destroy(),this.prevButton?.destroy(),this.nextButton=void 0,this.prevButton=void 0))}const{prev:s,next:o}=i.computeCSSBounds();this.prevButton?.setBounds(s),this.nextButton?.setBounds(o),this.prevButton?.setEnabled(i.currentPage!==0),this.nextButton?.setEnabled(i.currentPage!==i.totalPages-1),this.nextButton?.setCursor(i.getCursor("next")),this.prevButton?.setCursor(i.getCursor("previous"))}onPageButton(t,e,i){t.pagination.onClick(e.sourceEvent,i),this.updatePaginationProxyButtons(t,!1)}onDataUpdate(t,e){this.dirty=t.length!==e.length||t.some((i,s,o)=>{const[a,n]=[e[s],t[s]];return a.id!==n.id})}onLocaleChanged(t,e,i){const s=e.length;e.each(({proxyButton:o},a,n)=>{const r=o?.getElement();if(r!=null){const l=i.getItemLabel(a);r.textContent=this.getItemAriaText(t,l,n,s)}}),this.itemDescription.textContent=this.getItemAriaDescription(t)}onPageChange(t){this.updateItemProxyButtons(t),this.updatePaginationProxyButtons(t,!1)}getItemAriaText(t,e,i,s){return i>=0&&e?(i++,t.t("ariaLabelLegendItem",{label:e,index:i,count:s})):t.t("ariaLabelLegendItemUnknown")}getItemAriaDescription(t){return t.t("ariaDescriptionLegendItem")}}}});function Gz(t,e,i,s){const o={defaultPrevented:!1,apiEvent:{type:t,itemId:e,seriesId:i,event:s,preventDefault:()=>o.defaultPrevented=!0}};return o}var eQ=k({"packages/ag-charts-community/src/chart/legend/legendEvent.ts"(){"use strict"}}),xa,jz=k({"packages/ag-charts-community/src/chart/legend/legendMarkerLabel.ts"(){"use strict";kb(),Ve(),Mu(),Vo(),ms(),bo(),zn(),xa=class extends Qh(It){constructor(){super({name:"markerLabelGroup"}),this.symbolsGroup=this.appendChild(new It({name:"legend-markerLabel-symbols"})),this.label=this.appendChild(new Yi),this.enabled=!0,this.pageIndex=NaN,this.spacing=0,this.length=0,this.isCustomMarker=!1,this.marker=this.symbolsGroup.appendChild(new Xi({zIndex:1})),this.line=this.symbolsGroup.appendChild(new Yo({zIndex:0}));const{label:t,line:e,symbolsGroup:i}=this;e.visible=!1,i.renderToOffscreenCanvas=!0,i.optimizeForInfrequentRedraws=!0,t.textBaseline="middle",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.y=1}destroy(){super.destroy(),this.proxyButton?.destroy()}setEnabled(t){this.enabled=t,this.refreshVisibilities()}refreshVisibilities(){const t=this.enabled?1:.5;this.label.opacity=t,this.opacity=t}layout(){const{marker:t,line:e,length:i,isCustomMarker:s}=this;let o=0,a=0;if(t.visible){const{size:n}=t,r=Xi.anchor(t.shape);o=(r.x-.5)*n+i/2,a=(r.y-.5)*n,s?(t.x=0,t.y=0,t.translationX=o,t.translationY=a):(t.x=o,t.y=a,t.translationX=0,t.translationY=0)}e.visible&&(e.x1=0,e.x2=i,e.y1=0,e.y2=0)}preRender(t){const e=super.preRender(t);return this.layout(),e}layoutLabel(){const{length:t,spacing:e}=this;this.label.x=t+e}computeBBox(){return this.layout(),super.computeBBox()}},xa.className="MarkerLabel",v([ys("label")],xa.prototype,"text",2),v([ys("label")],xa.prototype,"fontStyle",2),v([ys("label")],xa.prototype,"fontWeight",2),v([ys("label")],xa.prototype,"fontSize",2),v([ys("label")],xa.prototype,"fontFamily",2),v([ys("label","fill")],xa.prototype,"color",2),v([Dc(t=>t.layoutLabel())],xa.prototype,"spacing",2),v([Dc(t=>t.layoutLabel())],xa.prototype,"length",2),v([gt()],xa.prototype,"isCustomMarker",2)}}),Al,Pu,uv,Il,dv,Xp,pv,Vz,Wz,Mo,iQ=k({"packages/ag-charts-community/src/chart/legend/legend.ts"(){"use strict";P(),Xt(),Ve(),Nc(),ms(),mp(),Bo(),qt(),ge(),bo(),Go(),oI(),Nt(),Z7(),zn(),q7(),$p(),vl(),tQ(),eQ(),jz(),Al=class extends Ct{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}},v([A(lt,{optional:!0})],Al.prototype,"maxLength",2),v([A(zt)],Al.prototype,"color",2),v([A(pr,{optional:!0})],Al.prototype,"fontStyle",2),v([A(gr,{optional:!0})],Al.prototype,"fontWeight",2),v([A(lt)],Al.prototype,"fontSize",2),v([A(it)],Al.prototype,"fontFamily",2),v([A(Zs,{optional:!0})],Al.prototype,"formatter",2),Pu=class extends Ct{constructor(){super(...arguments),this.shape=void 0,this.size=15,this.padding=8}},v([A(hv,{optional:!0})],Pu.prototype,"shape",2),v([A(lt)],Pu.prototype,"size",2),v([A(lt)],Pu.prototype,"padding",2),v([A(lt,{optional:!0})],Pu.prototype,"strokeWidth",2),v([A(bt)],Pu.prototype,"enabled",2),uv=class extends Ct{},v([A(lt,{optional:!0})],uv.prototype,"strokeWidth",2),v([A(lt,{optional:!0})],uv.prototype,"length",2),Il=class extends Ct{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new Pu,this.label=new Al,this.line=new uv}},v([A(lt,{optional:!0})],Il.prototype,"maxWidth",2),v([A(lt)],Il.prototype,"paddingX",2),v([A(lt)],Il.prototype,"paddingY",2),v([A(bt)],Il.prototype,"showSeriesStroke",2),v([A(ct)],Il.prototype,"marker",2),v([A(ct)],Il.prototype,"label",2),v([A(ct)],Il.prototype,"line",2),dv=class extends Ct{},v([A(Zs,{optional:!0})],dv.prototype,"legendItemClick",2),v([A(Zs,{optional:!0})],dv.prototype,"legendItemDoubleClick",2),Xp="legend-visibility",pv="legend-other-series",Vz={type:"gradient",bounds:"item",gradient:"linear",colorStops:[{color:"black"}],rotation:0,reverse:!1},Wz={type:"pattern",pattern:"forward-slanted-lines",width:8,height:8,padding:1,fill:"black",fillOpacity:1,backgroundFill:"white",backgroundFillOpacity:1,stroke:"black",strokeOpacity:1,strokeWidth:0,rotation:0},Mo=class extends Ct{constructor(t){super(),this.ctx=t,this.id=la(this),this.group=new qs({name:"legend",zIndex:14}),this.itemSelection=bi.select(this.group,xa),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this.toggleSeries=!0,this.item=new Il,this.listeners=new dv,this.enabled=!0,this.position="bottom",this.spacing=20,this.destroyFns=[],this.size=[0,0],this._visible=!0,this.pagination=new Bc(e=>t.updateService.update(e),e=>this.updatePageNumber(e)),this.pagination.attachPagination(this.group),this.destroyFns.push(t.contextMenuRegistry.registerDefaultAction({id:Xp,type:"legend",label:"contextMenuToggleSeriesVisibility",action:e=>this.contextToggleVisibility(e)}),t.contextMenuRegistry.registerDefaultAction({id:pv,type:"legend",label:"contextMenuToggleOtherSeries",action:e=>this.contextToggleOtherSeries(e)}),t.legendManager.addListener("legend-change",this.onLegendDataChange.bind(this))),this.destroyFns.push(t.layoutManager.registerElement(1,e=>this.positionLegend(e)),t.localeManager.addListener("locale-changed",()=>this.onLocaleChanged()),()=>this.group.remove()),this.domProxy=new Fz(this.ctx,this.id),this.ctx.historyManager.addMementoOriginator(t.legendManager)}set data(t){dr(t,this._data)||(this.domProxy.onDataUpdate(this._data,t),this._data=t,this.updateGroupVisibility())}get data(){return this._data}onLegendDataChange({legendData:t=[]}){this.enabled&&(this.data=t.filter(e=>!e.hideInLegend))}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-pagination`),this.destroyFns.forEach(t=>t()),this.itemSelection.clear(),this.domProxy.destroy()}getOrientation(){return this.orientation??"horizontal"}set visible(t){this._visible=t,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(t){t.appendChild(this.group)}getItemLabel(t){const{ctx:{callbackCache:e}}=this,{formatter:i}=this.item.label;if(i){const s=t.datum;return e.call(this,i,{itemId:t.itemId,value:t.label.text,seriesId:t.seriesId,...s&&{datum:s}})}return t.label.text}calcLayout(t,e){const{paddingX:i,paddingY:s,label:o,maxWidth:a,label:{maxLength:n=1/0,fontStyle:r,fontWeight:l,fontSize:c,fontFamily:h}}=this.item,u=[...this.data];this.reverseOrder&&u.reverse(),this.itemSelection.update(u);const d=[],p=Ee.toFontString(o),f=a??t*.8,{markerWidth:x,anyLineEnabled:y}=this.calculateMarkerWidth();if(this.itemSelection.each((O,R)=>{O.fontStyle=r,O.fontWeight=l,O.fontSize=c,O.fontFamily=h;const _=this.updateMarkerLabel(O,R,x,y),B=R.itemId??R.id,F=(this.getItemLabel(R)??"<unknown>").replace(/\r?\n/g," ");O.text=this.truncate(F,n,f,_,p,B),d.push(O.getBBox())}),t=Math.max(1,t),e=Math.max(1,e),!isFinite(t))return{};const b=this.size,S=this.oldSize;b[0]=t,b[1]=e,(b[0]!==S[0]||b[1]!==S[1])&&(S[0]=b[0],S[1]=b[1]);const{pages:M,maxPageHeight:D,maxPageWidth:L}=this.updatePagination(d,t,e),T=this.pages;this.pages=M,this.maxPageSize=[L-i,D-s];const I=this.pagination.currentPage,N=this.pages[I];return this.pages.length<1||!N?(this.visible=!1,{oldPages:T}):(this.visible=!0,this.updatePositions(I),this.update(),{oldPages:T})}isCustomMarker(t,e){return t&&e!==void 0&&typeof e!="string"}calcSymbolsEnabled(t){const{showSeriesStroke:e,marker:i}=this.item,s=!!i.enabled||!e||(t.marker.enabled??!0),o=!!(t.line&&e),a=this.isCustomMarker(s,t.marker.shape);return{markerEnabled:s,lineEnabled:o,isCustomMarker:a}}calcSymbolsLengths(t,e,i){const{marker:s,line:o}=this.item;let a;const{shape:n}=t.marker;if(this.isCustomMarker(e,n)){const c=new Xi;c.shape=n,c.updatePath();const h=c.getBBox();a=Math.max(h.width,h.height)}const r=e?s.size:0,l=i?o.length??25:0;return{markerLength:r,lineLength:l,customMarkerSize:a}}calculateMarkerWidth(){let t=0,e=!1;return this.itemSelection.each((i,s)=>{const{symbol:o}=s,{lineEnabled:a,markerEnabled:n}=this.calcSymbolsEnabled(o),{markerLength:r,lineLength:l,customMarkerSize:c=-1/0}=this.calcSymbolsLengths(o,n,a);t=Math.max(t,l,c,r),e||(e=a)}),{markerWidth:t,anyLineEnabled:e}}updateMarkerLabel(t,e,i,s){const{marker:o,paddingX:a}=this.item,{symbol:n}=e;let r=a;const{markerEnabled:l,isCustomMarker:c}=this.calcSymbolsEnabled(n),h=o.padding;(l||s)&&(r+=h+i);const{marker:u,line:d}=t;return u.visible=l,u.visible&&(u.shape=o.shape??n.marker.shape??"square",u.size=o.size,Tu(u,this.getMarkerStyles(n))),d.visible=s,d.visible&&Tu(d,this.getLineStyles(n)),t.length=i,t.spacing=h,t.isCustomMarker=c,r}truncate(t,e,i,s,o,a){let n=!1;t.length>e&&(t=t.substring(0,e),n=!0);const r=yr.getMeasurer({font:o}),l=lS.truncateLine(t,r,i-s,n);return l.endsWith(Ee.EllipsisChar)?this.truncatedItems.add(a):this.truncatedItems.delete(a),l}updatePagination(t,e,i){const s=this.getOrientation(),o=Math.min(this.paginationTrackingIndex,t.length);this.pagination.orientation=s,this.pagination.translationX=0,this.pagination.translationY=0;const{pages:a,maxPageHeight:n,maxPageWidth:r,paginationBBox:l,paginationVertical:c}=this.calculatePagination(t,e,i),h=a.findIndex(S=>S.endIndex>=o);this.pagination.currentPage=Tt(0,h,a.length-1);const{paddingX:u,paddingY:d}=this.item,p=8,g=r-u,f=n-d;let x=0,y=-l.y-this.item.marker.size/2;c?y+=f+p:(x+=-l.x+g+p,y+=(f-l.height)/2),this.pagination.translationX=x,this.pagination.translationY=y,this.pagination.update(),this.pagination.updateMarkers();let b=0;return this.itemSelection.each((S,M,D)=>{D>(a[b]?.endIndex??1/0)&&b++,S.pageIndex=b}),{maxPageHeight:n,maxPageWidth:r,pages:a}}calculatePagination(t,e,i){const{paddingX:s,paddingY:o}=this.item,a=this.getOrientation(),n=["left","right"].includes(this.position);let r=this.pagination.getBBox(),l=new pt(0,0,0,0),c=[],h=0,u=0,d=0;const p=f=>f.width===r.width&&f.height===r.height,g=this.maxWidth!==void 0&&this.maxHeight!==void 0;do{if(d++>10){tt.warn("unable to find stable legend layout.");break}r=l;const f=e-(n?0:r.width),x=i-(n?r.height:0),y=U7({orientation:a,bboxes:t,maxHeight:x,maxWidth:f,itemPaddingY:o,itemPaddingX:s,forceResult:g});c=y?.pages??[],h=y?.maxPageWidth??0,u=y?.maxPageHeight??0;const b=c.length;if(this.pagination.visible=b>1,this.pagination.totalPages=b,this.pagination.update(),this.pagination.updateMarkers(),l=this.pagination.getBBox(),!this.pagination.visible)break}while(!p(l));return{maxPageWidth:h,maxPageHeight:u,pages:c,paginationBBox:l,paginationVertical:n}}updatePositions(t=0){const{item:{paddingY:e},itemSelection:i,pages:s}=this;if(s.length<1||!s[t])return;const{columns:o,startIndex:a,endIndex:n}=s[t];let r=0,l=0;const c=o.length,h=o[0].indices.length,u=this.getOrientation()==="horizontal",d=o[0].bboxes[0].height+e,p=[];i.each((g,f,x)=>{if(x<a||x>n){g.visible=!1;return}const y=x-a;let b,S;u?(b=y%c,S=Math.floor(y/c)):(b=Math.floor(y/h),S=y%h),g.visible=!0;const M=o[b];M&&(l=Math.floor(d*S),r=Math.floor(p[S]??0),p[S]=(p[S]??0)+M.columnWidth,g.translationX=r,g.translationY=l)})}updatePageNumber(t){const{itemSelection:e,group:i,pagination:s,pages:o,toggleSeries:a}=this,{startIndex:n,endIndex:r}=o[t];n===0?this.paginationTrackingIndex=0:t===o.length-1?this.paginationTrackingIndex=r:this.paginationTrackingIndex=Math.floor((n+r)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(t),this.domProxy.onPageChange({itemSelection:e,group:i,pagination:s,interactive:a}),this.ctx.updateService.update(6)}update(){const{label:{color:t}}=this.item;this.itemSelection.each((e,i)=>{e.setEnabled(i.enabled),e.color=t}),this.updateContextMenu()}updateContextMenu(){const{toggleSeries:t,ctx:{contextMenuRegistry:e}}=this;t?(e.hideAction(Xp),e.hideAction(pv)):(e.showAction(Xp),e.showAction(pv))}getLineStyles(t){const{stroke:e,strokeOpacity:i=1,strokeWidth:s,lineDash:o}=t.line??{},a=Math.min(2,s??1);return{stroke:e,strokeOpacity:i,strokeWidth:this.item.line.strokeWidth??a,lineDash:o}}getMarkerStyles({marker:t}){const{fill:e,stroke:i,strokeOpacity:s=1,fillOpacity:o=1,strokeWidth:a,lineDash:n,lineDashOffset:r}=t,l=Math.min(2,a??1);return qh(e)&&(e.width=8,e.height=8,e.padding=1,e.strokeWidth=Math.min(2,e.strokeWidth??2)),Dr({fill:e,stroke:i,strokeOpacity:s,fillOpacity:o,strokeWidth:this.item.marker.strokeWidth??l,lineDash:n,lineDashOffset:r},Vz,Wz)}computePagedBBox(){const t=It.computeChildrenBBox(this.group.children());if(this.pages.length>1){const[e,i]=this.maxPageSize;t.height=Math.max(i,t.height),t.width=Math.max(e,t.width)}return t}findNode(t){const{datum:e,proxyButton:i}=this.itemSelection.select(s=>s.datum?.itemId===t.itemId)[0]??{};if(e===void 0||i===void 0)throw new Error(`AG Charts - Missing required properties { datum: ${e}, proxyButton: ${JSON.stringify(i)} }`);return{datum:e,proxyButton:i}}contextToggleVisibility(t){const{datum:e,proxyButton:i}=this.findNode(t);this.doClick(t.event,e,i)}contextToggleOtherSeries(t){this.doDoubleClick(t.event,this.findNode(t).datum)}onContextClick(t,e){const i=e.datum;this.preventHidingAll&&this.contextMenuDatum?.enabled&&this.getVisibleItemCount()<=1?this.ctx.contextMenuRegistry.disableAction(Xp):this.ctx.contextMenuRegistry.enableAction(Xp);const{offsetX:s,offsetY:o}=t,{x:a,y:n}=Ke.toCanvasPoint(e,s,o);this.ctx.contextMenuRegistry.dispatchContext("legend",{sourceEvent:t,canvasX:a,canvasY:n},{legendItem:i})}onClick(t,e,i){this.doClick(t,e,i)&&t.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap(t=>t.getLegendData("category")).filter(t=>t.enabled).length}doClick(t,e,i){const{listeners:{legendItemClick:s},ctx:{chartService:o,highlightManager:a},preventHidingAll:n,toggleSeries:r}=this;if(!e)return!1;const{legendType:l,seriesId:c,itemId:h,enabled:u}=e,d=o.series.find(f=>f.id===c);if(!d)return!1;let p=u;const g=Gz("click",h,d.id,t);return s?.(g.apiEvent),g.defaultPrevented||(r&&(p=!u,n&&!p&&this.getVisibleItemCount()<2&&(p=!0),i.setChecked(p),this.ctx.chartEventManager.legendItemClick(l,d,h,p,e.legendItemName)),p?a.updateHighlight(this.id,{series:d,itemId:h,datum:void 0,datumIndex:void 0}):a.updateHighlight(this.id),this.ctx.legendManager.update(),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0,skipAnimations:e.skipAnimations??!1})),!0}onDoubleClick(t,e){this.doDoubleClick(t,e)&&t.preventDefault()}doDoubleClick(t,e){const{listeners:{legendItemDoubleClick:i},ctx:{chartService:s},toggleSeries:o}=this;if(s.mode==="integrated"||!e)return!1;const{legendType:a,id:n,itemId:r,seriesId:l}=e,c=s.series.find(u=>u.id===n);if(!c)return!1;const h=Gz("dblclick",r,c.id,t);if(i?.(h.apiEvent),h.defaultPrevented)return!0;if(o){const u=s.series.flatMap(f=>f.getLegendData("category"));let d=0;const p=new Set;for(const f of u)f.enabled&&(d+=1,f.legendItemName!=null&&p.add(f.legendItemName));p.size>0&&(d=p.size);const g=u.find(f=>f.itemId===r&&f.seriesId===l);this.ctx.chartEventManager.legendItemDoubleClick(a,c,r,g?.enabled??!1,d,g?.legendItemName)}return this.ctx.legendManager.update(),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),!0}toTooltipMeta(t,e){let i;return t instanceof FocusEvent?i=Ke.toCanvas(e).computeCenter():(t.preventDefault(),i=Ke.toCanvasPoint(e,t.offsetX,t.offsetY)),{canvasX:i.x,canvasY:i.y,showArrow:!1}}onHover(t,e){if(!this.enabled)throw new Error("AG Charts - onHover handler called on disabled legend");this.pagination.setPage(e.pageIndex);const i=e.datum,s=i?this.ctx.chartService.series.find(o=>o.id===i?.id):void 0;if(i&&this.truncatedItems.has(i.itemId??i.id)){const o=this.toTooltipMeta(t,e);this.ctx.tooltipManager.updateTooltip(this.id,o,[{type:"structured",title:this.getItemLabel(i)}])}else this.ctx.tooltipManager.removeTooltip(this.id);i?.enabled&&s?this.updateHighlight({series:s,itemId:i?.itemId,datum:void 0,datumIndex:void 0}):this.updateHighlight()}onLeave(){this.ctx.tooltipManager.removeTooltip(this.id),this.updateHighlight()}updateHighlight(t){this.ctx.interactionManager.isState(32)?this.ctx.highlightManager.updateHighlight(this.id,t):this.ctx.interactionManager.isState(2)&&(this.pendingHighlightDatum=t,this.ctx.animationManager.onBatchStop(()=>{this.ctx.highlightManager.updateHighlight(this.id,this.pendingHighlightDatum)}))}onLocaleChanged(){this.domProxy.onLocaleChanged(this.ctx.localeManager,this.itemSelection,this)}positionLegend(t){const e=this.positionLegendScene(t);this.positionLegendDOM(e)}positionLegendScene(t){if(!this.enabled||!this.data.length)return;const{layoutBox:e}=t,{x:i,y:s,width:o,height:a}=e,[n,r]=this.calculateLegendDimensions(e),{oldPages:l}=this.calcLayout(n,r),c=this.computePagedBBox(),h=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return a-c.height;case"right":default:return o-c.width}};if(this.visible){const u=this.spacing;let d,p;switch(this.position){case"top":case"bottom":d=(o-c.width)/2,p=h(),e.shrink(c.height+u,this.position);break;case"left":case"right":default:d=h(),p=(a-c.height)/2,e.shrink(c.width+u,this.position)}this.group.translationX=Math.floor(i+d-c.x),this.group.translationY=Math.floor(s+p-c.y)}return l}positionLegendDOM(t){const{ctx:e,itemSelection:i,pagination:s,pages:o,toggleSeries:a,group:n,listeners:{legendItemClick:r,legendItemDoubleClick:l}}=this,c=this.visible&&this.enabled,h=a||l!=null||r!=null;this.domProxy.update({visible:c,interactive:h,ctx:e,itemSelection:i,group:n,pagination:s,oldPages:t,newPages:o,datumReader:this,itemListener:this})}calculateLegendDimensions(t){const{width:e,height:i}=t,s=e/i,o=.5,a=.2,n=.25;let r,l;switch(this.position){case"top":case"bottom":{const c=s<1?Math.min(o,a*(1/s)):a;r=this.maxWidth?Math.min(this.maxWidth,e):e,l=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*c);break}case"left":case"right":default:{const c=s>1?Math.min(o,n*s):n;r=this.maxWidth?Math.min(this.maxWidth,e):Math.round(e*c),l=this.maxHeight?Math.min(this.maxHeight,i):i}}return[r,l]}},Mo.className="Legend",v([A(bt)],Mo.prototype,"toggleSeries",2),v([A(ct)],Mo.prototype,"pagination",2),v([A(ct)],Mo.prototype,"item",2),v([A(ct)],Mo.prototype,"listeners",2),v([Dc((t,e,i)=>{if(t.updateGroupVisibility(),e===i)return;const{ctx:{legendManager:s,stateManager:o}}=t;i===!1&&e===!0&&o.restoreState(s)}),A(bt)],Mo.prototype,"enabled",2),v([A(zb)],Mo.prototype,"position",2),v([A(lt,{optional:!0})],Mo.prototype,"maxWidth",2),v([A(lt,{optional:!0})],Mo.prototype,"maxHeight",2),v([A(bt,{optional:!0})],Mo.prototype,"reverseOrder",2),v([A(fe(["horizontal","vertical"],"an orientation"),{optional:!0})],Mo.prototype,"orientation",2),v([A(bt,{optional:!0})],Mo.prototype,"preventHidingAll",2),v([A(lt)],Mo.prototype,"spacing",2)}}),Uz,sQ=k({"packages/ag-charts-community/src/chart/legend/legendModule.ts"(){"use strict";iQ(),Uz={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new Mo(t),packageType:"community",removable:"standalone-only"}}}),Hz={};mo(Hz,{CARTESIAN_AXIS_TYPE:()=>BC,CARTESIAN_POSITION:()=>PC,FONT_SIZE:()=>RC,FONT_SIZE_RATIO:()=>gv,POLAR_AXIS_SHAPE:()=>FC,POLAR_AXIS_TYPE:()=>zC});var RC,gv,PC,BC,zC,FC,Yz=k({"packages/ag-charts-community/src/chart/themes/constants.ts"(){"use strict";RC=(t=>(t[t.SMALLEST=8]="SMALLEST",t[t.SMALLER=10]="SMALLER",t[t.SMALL=12]="SMALL",t[t.MEDIUM=13]="MEDIUM",t[t.LARGE=14]="LARGE",t[t.LARGEST=17]="LARGEST",t))(RC||{}),gv=(t=>(t[t.SMALLEST=.6666666666666666]="SMALLEST",t[t.SMALLER=.8333333333333334]="SMALLER",t[t.SMALL=1]="SMALL",t[t.MEDIUM=1.0833333333333333]="MEDIUM",t[t.LARGE=1.1666666666666667]="LARGE",t[t.LARGEST=1.4166666666666667]="LARGEST",t))(gv||{}),PC=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t))(PC||{}),BC=(t=>(t.CATEGORY="category",t.GROUPED_CATEGORY="grouped-category",t.ORDINAL_TIME="ordinal-time",t.NUMBER="number",t.TIME="time",t.LOG="log",t))(BC||{}),zC=(t=>(t.ANGLE_CATEGORY="angle-category",t.ANGLE_NUMBER="angle-number",t.RADIUS_CATEGORY="radius-category",t.RADIUS_NUMBER="radius-number",t))(zC||{}),FC=(t=>(t.CIRCLE="circle",t.POLYGON="polygon",t))(FC||{})}}),GC={};mo(GC,{DEFAULT_ANNOTATION_HANDLE_FILL:()=>eg,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>og,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>ag,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>ng,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>rg,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>ig,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>sg,DEFAULT_CAPTION_ALIGNMENT:()=>Ll,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Cl,DEFAULT_FIBONACCI_STROKES:()=>Jp,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:()=>Ni,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:()=>Ze,DEFAULT_GRIDLINE_ENABLED:()=>Gn,DEFAULT_POLAR_SERIES_STROKE:()=>$m,DEFAULT_SEPARATION_LINES_COLOUR:()=>Zp,DEFAULT_SHADOW_COLOUR:()=>Tl,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:()=>Xm,DEFAULT_TEXTBOX_COLOR:()=>hg,DEFAULT_TEXTBOX_FILL:()=>lg,DEFAULT_TEXTBOX_STROKE:()=>cg,DEFAULT_TEXT_ANNOTATION_COLOR:()=>tg,DEFAULT_TOOLBAR_POSITION:()=>ug,IS_COMMUNITY:()=>fv,IS_DARK_THEME:()=>Bu,IS_ENTERPRISE:()=>mv,PALETTE_ALT_DOWN_FILL:()=>Sv,PALETTE_ALT_DOWN_STROKE:()=>xv,PALETTE_ALT_NEUTRAL_FILL:()=>vv,PALETTE_ALT_NEUTRAL_STROKE:()=>Km,PALETTE_ALT_UP_FILL:()=>bv,PALETTE_ALT_UP_STROKE:()=>yv,PALETTE_DOWN_FILL:()=>Qp,PALETTE_DOWN_STROKE:()=>Hm,PALETTE_NEUTRAL_FILL:()=>Ym,PALETTE_NEUTRAL_STROKE:()=>zu,PALETTE_UP_FILL:()=>qp,PALETTE_UP_STROKE:()=>Um});var Bu,fv,mv,Zp,Tl,Cl,Ll,Um,Hm,qp,Qp,zu,Ym,yv,xv,bv,Sv,vv,Km,$m,Xm,Ze,Jp,tg,Ni,eg,ig,sg,og,ag,ng,rg,lg,cg,hg,ug,Gn,hi=k({"packages/ag-charts-community/src/chart/themes/symbols.ts"(){"use strict";Bu=Symbol("is-dark-theme"),fv=Symbol("is-community"),mv=Symbol("is-enterprise"),Zp=Symbol("default-separation-lines-colour"),Tl=Symbol("default-shadow-colour"),Cl=Symbol("default-caption-layout-style"),Ll=Symbol("default-caption-alignment"),Um=Symbol("palette-up-stroke"),Hm=Symbol("palette-down-stroke"),qp=Symbol("palette-up-fill"),Qp=Symbol("palette-down-fill"),zu=Symbol("palette-neutral-stroke"),Ym=Symbol("palette-neutral-fill"),yv=Symbol("palette-alt-up-stroke"),xv=Symbol("palette-alt-down-stroke"),bv=Symbol("palette-alt-up-fill"),Sv=Symbol("palette-alt-down-fill"),vv=Symbol("palette-gray-fill"),Km=Symbol("palette-gray-stroke"),$m=Symbol("default-polar-series-stroke"),Xm=Symbol("default-sparkline-crosshair-stroke"),Ze=Symbol("default-financial-charts-annotation-stroke"),Jp=Symbol("default-hierarchy-strokes"),tg=Symbol("default-text-annotation-color"),Ni=Symbol("default-financial-charts-annotation-background-fill"),eg=Symbol("default-annotation-handle-fill"),ig=Symbol("default-annotation-statistics-fill"),sg=Symbol("default-annotation-statistics-stroke"),og=Symbol("default-annotation-statistics-color"),ag=Symbol("default-annotation-statistics-divider-stroke"),ng=Symbol("default-annotation-statistics-fill"),rg=Symbol("default-annotation-statistics-stroke"),lg=Symbol("default-textbox-fill"),cg=Symbol("default-textbox-stroke"),hg=Symbol("default-textbox-color"),ug=Symbol("default-toolbar-position"),Gn=Symbol("default-gridline-enabled")}});function ba(t){return T_(t,e=>{const i=re.fromString(e);return[re.darken(i,.15).toString(),e,re.lighten(i,.15).toString()]})}var jC,Kz,Mv,Zm,$z,Nl,vi=k({"packages/ag-charts-community/src/chart/themes/util.ts"(){"use strict";Kh(),qt(),jC=[{type:"number",position:{$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},"bottom","left"]}},{type:"category",position:{$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},"left","bottom"]}}],Kz={$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]}]},{$palette:"fillFallback"},{$palette:"fill"}]},Mv={$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]}]},{$palette:"fillsFallback"},{$palette:"fills"}]},Zm={$if:[{$isGradient:[{$palette:"fill"}]},{$palette:"fillFallback"},{$if:[{$isPattern:[{$palette:"fill"}]},{$path:["./stroke",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},$z={$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]}]},[{$palette:"fillFallback"},{$palette:"fillFallback"}],{$palette:"range2"}]},Nl={type:"pattern",pattern:"forward-slanted-lines",width:10,height:10,padding:2,fill:{$if:[{$isGradient:[{$palette:"fill"}]},{$palette:"fillFallback"},{$if:[{$isPattern:[{$palette:"fill"}]},{$path:["./fill",{$palette:"fillFallback"},{$palette:"fill"}]},{$palette:"fill"}]}]},fillOpacity:1,stroke:Zm,strokeOpacity:1,strokeWidth:4,backgroundFill:"transparent",backgroundFillOpacity:1,rotation:0}}});function Dv(t,e,i,s,o){const{addPhaseFn:a,updatePhaseFn:n,removePhaseFn:r}=o,l=(c,h,u)=>{i.animate({id:`${t}_${e}_${h.id}_${c}`,groupId:t,from:0,to:1,ease:Dp,collapsable:!1,onUpdate(d,p){p&&c!=="removed"||(h.path.clear(!0),u(d,h),h.checkPathDirty())},onStop(){c==="added"&&(h.path.clear(!0),u(1,h),h.checkPathDirty())},phase:Ha[c]})};for(const c of s)i.isSkipped()||(l("removed",c,r),l("updated",c,n)),l("added",c,a)}var VC=k({"packages/ag-charts-community/src/motion/pathMotion.ts"(){"use strict";kp(),Ps()}});function ce({id:t},e,i,...s){bl(t,e,i,s,{opacity:0},{opacity:1},{phase:"trailing"})}function zc({id:t},e,i,...s){bl(t,e,i,s,{opacity:1},{opacity:0},{phase:"remove"})}function Ol(t){return{opacity:1}}var wl=k({"packages/ag-charts-community/src/chart/series/seriesLabelUtil.ts"(){"use strict";Ps()}}),Qa,dg=k({"packages/ag-charts-community/src/scene/dropShadow.ts"(){"use strict";Nt(),ca(),EC(),Qa=class extends lv{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}},v([A(bt),gt()],Qa.prototype,"enabled",2),v([A(zt),gt()],Qa.prototype,"color",2),v([A(Rt),gt()],Qa.prototype,"xOffset",2),v([A(Rt),gt()],Qa.prototype,"yOffset",2),v([A(lt),gt()],Qa.prototype,"blur",2)}}),WC,zs,El=k({"packages/ag-charts-community/src/chart/series/seriesTooltip.ts"(){"use strict";kI(),ge(),Nt(),wm(),WC=class extends Ct{constructor(){super(...arguments),this.enabled=!1}},v([A(bt)],WC.prototype,"enabled",2),zs=class extends Ct{constructor(){super(...arguments),this.interaction=new WC,this.position=new kr,this.range=void 0,this.class=void 0}formatTooltip(t,e,i){const s=this.renderer==null?void 0:DI(t,this.renderer,[i]);return typeof s=="string"?{type:"raw",rawHtmlString:s}:s!=null?{type:"structured",...e,...s}:{type:"structured",...e}}},v([A(bt,{optional:!0})],zs.prototype,"enabled",2),v([A(bt,{optional:!0})],zs.prototype,"showArrow",2),v([A(Zs,{optional:!0})],zs.prototype,"renderer",2),v([A(ct)],zs.prototype,"interaction",2),v([A(ct)],zs.prototype,"position",2),v([A(Jf,{optional:!0})],zs.prototype,"range",2),v([A(it,{optional:!0})],zs.prototype,"class",2)}}),Xz,Zz,qz,Qz,oQ=k({"packages/ag-charts-community/src/scene/util/quadtree.ts"(){"use strict";vb(),Xt(),Xz=class{constructor(t,e,i){this.root=new Qz(t,e,i)}clear(t){this.root.clear(t)}addValue(t,e){const i={hitTester:t,value:e,distanceSquared:(s,o)=>t.distanceSquared(s,o)};this.root.addElem(i)}find(t,e){const i={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(t,e,i),i.best}},Zz=class{constructor(t,e,i,s){this.nw=t,this.ne=e,this.sw=i,this.se=s}addElem(t){this.nw.addElem(t),this.ne.addElem(t),this.sw.addElem(t),this.se.addElem(t)}find(t,e,i){this.nw.find(t,e,i),this.ne.find(t,e,i),this.sw.find(t,e,i),this.se.find(t,e,i)}},qz=class{constructor(t,e,i){this.capacity=t,this.maxdepth=e,this.boundary=i??pt.NaN,this.elems=[],this.subdivisions=void 0}clear(t){this.elems.length=0,this.boundary=t,this.subdivisions=void 0}addElem(t){this.addCondition(t)&&(this.subdivisions===void 0?this.maxdepth===0||this.elems.length<this.capacity?this.elems.push(t):this.subdivide(t):this.subdivisions.addElem(t))}find(t,e,i){this.findCondition(t,e,i)&&(this.subdivisions===void 0?this.findAction(t,e,i):this.subdivisions.find(t,e,i))}subdivide(t){this.subdivisions=this.makeSubdivisions();for(const e of this.elems)this.subdivisions.addElem(e);this.subdivisions.addElem(t),this.elems.length=0}makeSubdivisions(){const{x:t,y:e,width:i,height:s}=this.boundary,{capacity:o}=this,a=this.maxdepth-1,n=i/2,r=s/2,l=new pt(t,e,n,r),c=new pt(t+n,e,n,r),h=new pt(t,e+r,n,r),u=new pt(t+n,e+r,n,r);return new Zz(this.child(o,a,l),this.child(o,a,c),this.child(o,a,h),this.child(o,a,u))}},Qz=class l6 extends qz{addCondition(e){const{x:i,y:s}=e.hitTester.midPoint;return this.boundary.containsPoint(i,s)}findCondition(e,i,s){const{best:o}=s;return o.distanceSquared!==0&&this.boundary.distanceSquared(e,i)<o.distanceSquared}findAction(e,i,s){const o=Sb(e,i,this.elems,s.best.distanceSquared);o.nearest!==void 0&&o.distanceSquared<s.best.distanceSquared&&(s.best=o)}child(e,i,s){return new l6(e,i,s)}}}}),kv,UC=k({"packages/ag-charts-community/src/chart/series/dataModelSeries.ts"(){"use strict";P(),So(),qt(),Cu(),kv=class extends Cm{constructor({clipFocusBox:t,categoryKey:e,...i}){super(i),this.categoryKey=e,this.clipFocusBox=t??!0}getScaleInformation({xScale:t,yScale:e}){const i=pe.is(t),s=pe.is(e);return{isContinuousX:i,isContinuousY:s,xScaleType:t?.type,yScaleType:e?.type}}getModulePropertyDefinitions(){const t=this.axes.x?.scale,e=this.axes.y?.scale;return this.moduleMap.mapModules(i=>i.getPropertyDefinitions(this.getScaleInformation({xScale:t,yScale:e}))).flat()}async requestDataModel(t,e,i){i.props.push(...this.getModulePropertyDefinitions());const{dataModel:s,processedData:o}=await t.request(this.id,e??[],i);return this.dataModel=s,this.processedData=o,this.dispatch("data-processed",{dataModel:s,processedData:o}),{dataModel:s,processedData:o}}isProcessedDataAnimatable(){const t=this.processedData?.reduced?.animationValidation;if(!t)return!0;const{orderedKeys:e,uniqueKeys:i}=t;return e&&i}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(t){const e=this.getNodeData();if(e===void 0||e.length===0)return;const i=this.computeFocusDatumIndex(t,e);if(i===void 0)return;const{clipFocusBox:s}=this,o=e[i],a={...t,datumIndex:i},n=this.computeFocusBounds(a);if(n!==void 0)return{bounds:n,clipFocusBox:s,datum:o,datumIndex:i}}isDatumEnabled(t,e){const{missing:i=!1,enabled:s=!0,focusable:o=!0}=t[e];return!i&&s&&o}computeFocusDatumIndex(t,e){const i=(n,r)=>{for(;n>=0&&!this.isDatumEnabled(e,n);)n+=r;return n===-1?void 0:n},s=(n,r)=>{for(;n<e.length&&!this.isDatumEnabled(e,n);)n+=r;return n===e.length?void 0:n};let o;const a=Tt(0,t.datumIndex,e.length-1);return t.datumIndexDelta<0?o=i(a,t.datumIndexDelta):t.datumIndexDelta>0?o=s(a,t.datumIndexDelta):o=s(a,1)??i(a,-1),o===void 0?t.datumIndexDelta===0?void 0:t.datumIndex-t.datumIndexDelta:o}keysOrValues(t){const e=this.dataModel.resolveProcessedDataIndexById(this,t);return this.processedData?.keys[e]?.get(this.id)??this.processedData?.columns[e]??[]}getCategoryKey(){return this.categoryKey}getCategoryValue(t){const{processedData:e,dataModel:i}=this,s=this.getCategoryKey();return!e||!i||!s||(e.invalidData?.get(this.id)?.[t]??!1)?void 0:this.keysOrValues(s)[t]}datumIndexForCategoryValue(t){const{processedData:e,dataModel:i}=this,s=this.getCategoryKey();if(!e||!i||!s)return;t=t.valueOf();const o=e.invalidData?.get(this.id),a=this.keysOrValues(s);for(let n=0;n<a.length;n+=1){if(o?.[n]===!0)continue;const r=a[n]?.valueOf();if(dr(t,r))return n}}}}});function aQ(t){let e,i;if((t instanceof Cr||t instanceof Dl)&&({min:e,max:i}=t),!(e==null&&i==null))return e??(e=-1/0),i??(i=1/0),[e,i]}function nQ(t,e,i){const s=e[0].valueOf(),o=e[1].valueOf(),a=oA(0,t-1,r=>{const l=i(r)?.valueOf();return!Number.isFinite(l)||l>=s});let n=sA(0,t-1,r=>{const l=i(r)?.valueOf();return!Number.isFinite(l)||l<=o});return a==null||n==null?[0,0]:(n=Math.min(n+1,t),[a,n])}var Fc,Gc,Av,Or,qm,_l,$o=k({"packages/ag-charts-community/src/chart/series/cartesian/cartesianSeries.ts"(){"use strict";P(),vu(),ym(),So(),NC(),Xt(),Ve(),Nc(),Xa(),Vo(),oQ(),Ui(),da(),vm(),Nt(),Nu(),zm(),rv(),wR(),zn(),UC(),Cu(),kl(),hu(),Fc={x:["xKey"],y:["yKey"]},Gc={x:["xName"],y:["yName"]},Av=class extends zp{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.yKey=s.properties.yKey}},Or=class extends Ko{constructor(){super(...arguments),this.pickOutsideVisibleMinorAxis=!1}},v([A(it,{optional:!0})],Or.prototype,"legendItemName",2),v([A(bt,{optional:!0})],Or.prototype,"pickOutsideVisibleMinorAxis",2),qm=100,_l=class extends kv{constructor({pathsPerSeries:t=["path"],hasMarkers:e=!1,hasHighlightedLabels:i=!1,pathsZIndexSubOrderOffset:s=[],datumSelectionGarbageCollection:o=!0,markerSelectionGarbageCollection:a=!0,animationAlwaysUpdateSelections:n=!1,animationResetFns:r,directionKeys:l,directionNames:c,...h}){if(super({directionKeys:l,directionNames:c,canHaveAxes:!0,...h}),this.NodeEvent=Av,this.dataNodeGroup=this.contentGroup.appendChild(new It({name:`${this.id}-series-dataNodes`,zIndex:0})),this.markerGroup=this.contentGroup.appendChild(new It({name:`${this.id}-series-markers`,zIndex:1})),this.labelGroup=this.contentGroup.appendChild(new qs({name:`${this.id}-series-labels`})),this.labelSelection=bi.select(this.labelGroup,Yi),this.highlightSelection=bi.select(this.highlightNode,()=>this.opts.hasMarkers?new Xi:this.nodeFactory()),this.highlightLabelSelection=bi.select(this.highlightLabel,Yi),this.annotationSelections=new Set,this.debug=ee.create(),!l||!c)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:t,hasMarkers:e,hasHighlightedLabels:i,pathsZIndexSubOrderOffset:s,directionKeys:l,directionNames:c,animationResetFns:r,animationAlwaysUpdateSelections:n,datumSelectionGarbageCollection:o,markerSelectionGarbageCollection:a},this.paths=t.map(u=>new io({name:`${this.id}-${u}`})),this.datumSelection=bi.select(this.dataNodeGroup,()=>this.nodeFactory(),o),this.markerSelection=bi.select(this.markerGroup,Xi,a),this.animationState=new Pp("empty",{empty:{update:{target:"ready",action:u=>this.animateEmptyUpdateReady(u)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:u=>this.animateReadyHighlight(u),highlightMarkers:u=>this.animateReadyHighlightMarkers(u),resize:u=>this.animateReadyResize(u),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:u=>{this.ctx.animationManager.isSkipped()?this.resetAllAnimation(u):this.animateWaitingUpdateReady(u)}},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:u=>this.resetAllAnimation(u),reset:"empty"},clearing:{update:{target:"empty",action:u=>this.animateClearingUpdateEmpty(u)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){return this.contextNodeData?.nodeData}attachSeries(t,e,i){super.attachSeries(t,e,i),this.attachPaths(this.paths,e,i)}detachSeries(t,e,i){super.detachSeries(t,e,i),this.detachPaths(this.paths,e,i)}attachPaths(t,e,i){for(const s of t)this.contentGroup.appendChild(s)}detachPaths(t,e,i){for(const s of t)this.contentGroup.removeChild(s)}renderToOffscreenCanvas(){const t=this.getNodeData();return t!=null&&t.length>qm}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"?this.animationState.transition("skip"):t==="disabled"&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",t=>this.onLegendItemClick(t)),this.ctx.chartEventManager.addListener("legend-item-double-click",t=>this.onLegendItemDoubleClick(t)))}destroy(){super.destroy(),this._contextNodeData=void 0}update({seriesRect:t}){const{visible:e,_contextNodeData:i}=this,o=this.ctx.highlightManager?.getActiveHighlight()?.series===this,a=this.checkResize(t),n=this.updateHighlightSelection(o);this.updateSelections(e),this.updateNodes(n,o,e);const r=this.getAnimationData(t,i);r&&(a&&this.animationState.transition("resize",r),this.animationState.transition("update",r))}updateSelections(t){var e;const i=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if(!(!t&&i)&&!(!this.nodeDataRefresh&&!this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=this.createNodeData();const s=this.isProcessedDataAnimatable();this._contextNodeData&&((e=this._contextNodeData).animationValid??(e.animationValid=s));const{dataModel:o,processedData:a}=this;o!==void 0&&a!==void 0&&this.dispatch("data-update",{dataModel:o,processedData:a})}this.updateSeriesSelections()}}updateSeriesSelections(t){const{datumSelection:e,labelSelection:i,markerSelection:s,paths:o}=this,a=this._contextNodeData;if(!a)return;const{nodeData:n,labelData:r,itemId:l}=a;this.updatePaths({seriesHighlighted:t,itemId:l,contextData:a,paths:o}),this.datumSelection=this.updateDatumSelection({nodeData:n,datumSelection:e}),this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:i})??i,this.opts.hasMarkers&&(this.markerSelection=this.updateMarkerSelection({nodeData:n,markerSelection:s}))}getShapeFillBBox(){const{axes:t}=this,e=t.x,i=t.y,[s,o]=Li(e?.range??[0,1]),[a,n]=Li(i?.range??[0,1]),r=this.getSeriesDomain("x"),l=[e?.scale.convert(r.at(0)),e?.scale.convert(r.at(-1))],c=this.getSeriesDomain("y"),h=[i?.scale.convert(c.at(0)),i?.scale.convert(c.at(-1))],[u,d]=Li(l),[p,g]=Li(h);return{axis:new pt(s,a,o-s,n-a),series:new pt(u,p,d-u,g-p)}}updateNodes(t,e,i){const{highlightSelection:s,highlightLabelSelection:o,opts:{hasMarkers:a,hasHighlightedLabels:n}}=this,r=!this.ctx.animationManager.isSkipped(),l=this.visible&&this._contextNodeData!=null&&i;this.contentGroup.visible=r||l,this.highlightGroup.visible=(r||l)&&e;const c=this.getOpacity();a?(this.updateMarkerNodes({markerSelection:s,isHighlight:!0}),this.animationState.transition("highlightMarkers",s)):(this.updateDatumNodes({datumSelection:s,isHighlight:!0}),this.animationState.transition("highlight",s)),n&&this.updateLabelNodes({labelSelection:o});const{dataNodeGroup:h,markerGroup:u,datumSelection:d,labelSelection:p,markerSelection:g,paths:f,labelGroup:x}=this,{itemId:y}=this.contextNodeData??{};h.opacity=c,h.visible=r||l,x.visible=l,a&&(u.opacity=c,u.visible=l),x&&(x.opacity=c),this.updatePathNodes({seriesHighlighted:e,itemId:y,paths:f,opacity:c,visible:l,animationEnabled:r}),h.visible&&(this.updateDatumNodes({datumSelection:d,highlightedItems:t,isHighlight:!1}),this.usesPlacedLabels||this.updateLabelNodes({labelSelection:p}),a&&this.updateMarkerNodes({markerSelection:g,isHighlight:!1}))}getHighlightLabelData(t,e){const i=t.filter(s=>s.datum===e.datum&&s.itemId===e.itemId);return i.length===0?void 0:i}getHighlightData(t,e){return e?[e]:void 0}updateHighlightSelection(t){const{highlightSelection:e,highlightLabelSelection:i,_contextNodeData:s}=this;if(!s)return;const o=this.ctx.highlightManager?.getActiveHighlight(),a=t&&o?.datum?o:void 0;let n,r;if(a!=null){const l=this.isLabelEnabled(),{labelData:c,nodeData:h}=s;r=this.getHighlightData(h,a),n=l?this.getHighlightLabelData(c,a):void 0}return this.highlightSelection=this.updateHighlightSelectionItem({items:r,highlightSelection:e}),this.highlightLabelSelection=this.updateHighlightSelectionLabel({items:n,highlightLabelSelection:i}),r}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(const{node:t}of this.datumSelection)t.datum.missing!==!0&&(yield t)}getQuadTree(){if(this.quadtree===void 0){const{width:t,height:e}=this.ctx.scene.canvas,i=new pt(0,0,t,e);this.quadtree=new Xz(100,10,i),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(t){}pickNodesExactShape(t){const e=super.pickNodesExactShape(t);if(e.length!==0)return e;const{x:i,y:s}=t,{opts:{hasMarkers:o}}=this,{dataNodeGroup:a,markerGroup:n}=this;let r=a.pickNodes(i,s).filter(l=>l.datum.missing!==!0);if(r.length===0&&o&&(r=n?.pickNodes(i,s).filter(l=>l.datum.missing!==!0)),r.length!==0)return r.map(c=>c.datum);for(const l of this.moduleMap.modules()){const{datum:c}=l.pickNodeExact(t)??{};if(c!=null&&c?.missing!==!0)return[c]}return[]}pickNodeClosestDatum(t){const{x:e,y:i}=t,{axes:s,_contextNodeData:o}=this;if(!o)return;const a=s.x,n=s.y,r={x:e,y:i};let l=1/0,c;for(const h of o.nodeData){const{point:{x:u=NaN,y:d=NaN}={}}=h;if(isNaN(u)||isNaN(d)||!(a?.inRange(u)&&n?.inRange(d)))continue;const g=Math.max((r.x-u)**2+(r.y-d)**2,0);g<l&&(l=g,c=h)}for(const h of this.moduleMap.modules()){const u=h.pickNodeNearest(t);if(u!==void 0&&u.distanceSquared<l){l=u.distanceSquared,c=u.datum;break}}if(c){const h=Math.max(Math.sqrt(l)-(c.point?.size??0)/2,0);return{datum:c,distance:h}}}pickNodeMainAxisFirst(t,e){const{x:i,y:s}=t,{axes:o,_contextNodeData:a}=this,{pickOutsideVisibleMinorAxis:n}=this.properties;if(!a)return;const r=o.x,l=o.y,c=[r,l].filter(_c.is).map(g=>g.direction);if(e&&c.length===0)return;const[h="x"]=c,u=[i,s];h!=="x"&&u.reverse();const d=[1/0,1/0];let p;for(const g of a.nodeData){const{x:f=NaN,y:x=NaN}=g.point??g.midPoint??{};if(isNaN(f)||isNaN(x)||g.missing===!0)continue;const y=[r?.inRange(f),l?.inRange(x)];if(h!=="x"&&y.reverse(),!y[0]||!n&&!y[1])continue;const b=[f,x];h!=="x"&&b.reverse();let S=!0;for(let M=0;M<b.length;M++){const D=Math.abs(b[M]-u[M]);if(D>d[M]){S=!1;break}else D<d[M]&&(d[M]=D,d.fill(1/0,M+1,d.length))}S&&(p=g)}if(p){let g=Math.max(d[0]**2+d[1]**2-(p.point?.size??0),0);for(const f of this.moduleMap.modules()){const x=f.pickNodeMainAxisFirst(t);if(x!==void 0&&x.distanceSquared<g){p=x.datum,g=x.distanceSquared;break}}return{datum:p,distance:Math.sqrt(g)}}}isPathOrSelectionDirty(){return!1}shouldFlipXY(){return!1}visibleRange(t,e,i){const s=this.keysOrValues(t),o=0;return W1(i?.length??s.length,e,a=>{const n=i?.[a]??a;return this.xCoordinateRange(s[n],o,n)})}domainForVisibleRange(t,e,i,s,o,a){const{processedData:n,dataModel:r}=this,[l,c]=s,h=this.keysOrValues(i);if(o){const g=this.visibleRange(i,s,a);return r.getDomainBetweenRange(this,e,g,n)}const u=e.map(g=>this.keysOrValues(g));let d=1/0,p=-1/0;return h.forEach((g,f)=>{const[x,y]=this.xCoordinateRange(g,0,f);if(!(y<l||x>c))for(let b=0;b<e.length;b++){const S=u[b][f];d=Math.min(d,S),p=Math.max(p,S)}}),d>p?[NaN,NaN]:[d,p]}domainForClippedRange(t,e,i,s){const{processedData:o,dataModel:a,axes:n}=this,l=aQ(n[t==="x"?"y":"x"]);if(!l)return e.flatMap(g=>a.getDomain(this,g,"value",o));const c=this.keysOrValues(i);if(s){const g=nQ(c.length,l,f=>c[f]);return a.getDomainBetweenRange(this,e,g,o)}const h=e.map(g=>this.keysOrValues(g)),u=l[0].valueOf(),d=l[1].valueOf(),p=[];return c.forEach((g,f)=>{const x=g.valueOf();if(x<u||x>d)return;const y=h.map(b=>b[f]);x>=u&&p.push(...y),x<=d&&p.push(...y)}),p}countVisibleItems(t,e,i,s,o){const{dataModel:a,processedData:n}=this;if(!a||!n)return 1/0;const r=this.keysOrValues(t),l=e.map(D=>a.resolveColumnById(this,D,n)),c=this.axes.x,h=this.axes.y,u=this.shouldFlipXY(),d=c.range,p=h.range,g=(D,L,T)=>D[0]+(T-L[0])/(L[1]-L[0])*(D[1]-D[0]),f=g(d,c.visibleRange,i[0]),x=g(d,c.visibleRange,i[1]),y=g(p,h.visibleRange,u?s[0]:s[1]),b=g(p,h.visibleRange,u?s[1]:s[0]),S=Math.round((i[0]+(i[1]-i[0])/2)*r.length),M=0;return U1(0,r.length-1,S,o,D=>{let[L,T]=this.xCoordinateRange(r[D],M,D),[I,N]=this.yCoordinateRange(l.map(O=>O[D]),M,D);return!Zt(L)||!Zt(T)||!Zt(I)||!Zt(N)?!1:(u&&([L,T,I,N]=[I,N,L,T]),L>=f&&T<=x&&I>=y&&N<=b)})}updateHighlightSelectionItem(t){const{opts:{hasMarkers:e}}=this,{items:i,highlightSelection:s}=t,o=i??[];if(e){const a=s;return this.updateMarkerSelection({nodeData:o,markerSelection:a})}else return this.updateDatumSelection({nodeData:o,datumSelection:s})}updateHighlightSelectionLabel(t){return this.updateLabelSelection({labelData:t.items??[],labelSelection:t.highlightLabelSelection})}updateDatumSelection(t){return t.datumSelection}updateDatumNodes(t){}updateMarkerSelection(t){return t.markerSelection}updateMarkerNodes(t){}updatePaths(t){t.paths.forEach(e=>e.visible=!1)}updatePathNodes(t){const{paths:e,opacity:i,visible:s}=t;for(const o of e)o.opacity=i,o.visible=s}resetPathAnimation(t){const{path:e}=this.opts?.animationResetFns??{};e&&t.paths.forEach(i=>{bs([i],e)})}resetDatumAnimation(t){const{datum:e}=this.opts?.animationResetFns??{};e&&bs([t.datumSelection],e)}resetLabelAnimation(t){const{label:e}=this.opts?.animationResetFns??{};e&&bs([t.labelSelection],e)}resetMarkerAnimation(t){const{marker:e}=this.opts?.animationResetFns??{};e&&this.opts.hasMarkers&&bs([t.markerSelection],e)}resetAllAnimation(t){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(t),this.resetDatumAnimation(t),this.resetLabelAnimation(t),this.resetMarkerAnimation(t),t.contextData?.animationValid===!1&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){const{datum:e}=this.opts?.animationResetFns??{};e&&bs([t],e)}animateReadyHighlightMarkers(t){const{marker:e}=this.opts?.animationResetFns??{};e&&bs([t],e)}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}getAnimationData(t,e){const{_contextNodeData:i}=this;return i?{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:i,previousContextData:e,paths:this.paths,seriesRect:t}:void 0}updateLabelSelection(t){return t.labelSelection}getScaling(t){if(t instanceof av){const{range:e,domain:i}=t;return{type:"log",convert:s=>t.convert(s),domain:[i[0],i[1]],range:[e[0],e[1]]}}else if(t instanceof pe){const{range:e,domain:i}=t;return{type:"continuous",domain:[i[0],i[1]],range:[e[0],e[1]]}}else if(t instanceof Np){const{domain:e}=t;return{type:"category",domain:e,inset:t.inset,step:t.step}}}calculateScaling(){const t={};for(const e of Object.values(cS)){const i=this.axes[e];if(!i)continue;const s=this.getScaling(i.scale);s!=null&&(t[e]=s)}return t}}}}),HC,YC,Fu,KC=k({"packages/ag-charts-community/src/chart/series/cartesian/interpolationProperties.ts"(){"use strict";ge(),Nt(),HC=fe(["linear","smooth","step"],"a line style"),YC=fe(["start","middle","end"]),Fu=class extends Ct{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}},v([A(HC)],Fu.prototype,"type",2),v([A(le)],Fu.prototype,"tension",2),v([A(YC)],Fu.prototype,"position",2)}}),ui,rQ=k({"packages/ag-charts-community/src/chart/series/cartesian/areaSeriesProperties.ts"(){"use strict";dg(),Nt(),Ka(),$p(),kl(),El(),$o(),KC(),ui=class extends Or{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillGradientDefaults=new ya,this.fillPatternDefaults=new Xe,this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Fu,this.shadow=new Qa,this.marker=new ls,this.label=new Ki,this.tooltip=new zs,this.connectMissingData=!1}},v([A(it)],ui.prototype,"xKey",2),v([A(it,{optional:!0})],ui.prototype,"xName",2),v([A(it)],ui.prototype,"yKey",2),v([A(it,{optional:!0})],ui.prototype,"yName",2),v([A(it,{optional:!0})],ui.prototype,"yFilterKey",2),v([A(lt,{optional:!0})],ui.prototype,"normalizedTo",2),v([A(fs(Cn,Ln,zt))],ui.prototype,"fill",2),v([A(ct)],ui.prototype,"fillGradientDefaults",2),v([A(ct)],ui.prototype,"fillPatternDefaults",2),v([A(le)],ui.prototype,"fillOpacity",2),v([A(zt)],ui.prototype,"stroke",2),v([A(lt)],ui.prototype,"strokeWidth",2),v([A(le)],ui.prototype,"strokeOpacity",2),v([A(Nn)],ui.prototype,"lineDash",2),v([A(lt)],ui.prototype,"lineDashOffset",2),v([A(ct)],ui.prototype,"interpolation",2),v([A(ct)],ui.prototype,"shadow",2),v([A(ct)],ui.prototype,"marker",2),v([A(ct)],ui.prototype,"label",2),v([A(ct)],ui.prototype,"tooltip",2),v([A(bt)],ui.prototype,"connectMissingData",2)}});function wr(t){switch(t.type){case"linear":case"step":return[{x:t.x0,y:t.y0},{x:t.x1,y:t.y1}];case"cubic":return[{x:t.cp0x,y:t.cp0y},{x:t.cp3x,y:t.cp3y}]}}function lQ(t){const e=wr(t);return e[0].x>e[1].x&&e.reverse(),e}function cQ(t,e){const{x:i,y:s}=e;switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:i,y0:s,x1:i,y1:s};case"step":return{type:"step",moveTo:t.moveTo,x0:i,y0:s,x1:i,y1:s,stepX:i};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:i,cp0y:s,cp1x:i,cp1y:s,cp2x:i,cp2y:s,cp3x:i,cp3y:s}}}function Qm(t,e,i){const[s,o]=wr(t),a=o.x!==s.x?(i.x-e.x)/(o.x-s.x):0,n=o.y!==s.y?(i.y-e.y)/(o.y-s.y):0;switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:i.x,y1:i.y};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:e.x,cp0y:e.y,cp1x:i.x-(t.cp2x-s.x)*a,cp1y:i.y-(t.cp2y-s.y)*n,cp2x:i.x-(t.cp1x-s.x)*a,cp2y:i.y-(t.cp1y-s.y)*n,cp3x:i.x,cp3y:i.y};case"step":return{type:"step",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:i.x,y1:i.y,stepX:i.x-(t.stepX-s.x)*a}}}function Jz(t,e,i){const{moveTo:s}=t,[o,a]=lQ(t),{x:n,y:r}=o,{x:l,y:c}=a;if(i<n)return Qm(t,o,o);if(e>l)return Qm(t,a,a);switch(t.type){case"linear":{const h=r===c?void 0:(c-r)/(l-n),u=h==null?r:h*(e-n)+r,d=h==null?r:h*(i-n)+r;return{type:"linear",moveTo:s,x0:e,y0:u,x1:i,y1:d}}case"step":if(i<=t.stepX){const h=t.y0;return{type:"step",moveTo:s,x0:e,y0:h,x1:i,y1:h,stepX:i}}else if(e>=t.stepX){const h=t.y1;return{type:"step",moveTo:s,x0:e,y0:h,x1:i,y1:h,stepX:e}}else{const{y0:h,y1:u,stepX:d}=t;return{type:"step",moveTo:s,x0:e,y0:h,x1:i,y1:u,stepX:d}}case"cubic":{const h=Vb(t.cp0x,t.cp1x,t.cp2x,t.cp3x,e);let[u,d]=Wb(t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,h);const p=Vb(d[0].x,d[1].x,d[2].x,d[3].x,i);return[d,u]=Wb(d[0].x,d[0].y,d[1].x,d[1].y,d[2].x,d[2].y,d[3].x,d[3].y,p),{type:"cubic",moveTo:s,cp0x:d[0].x,cp0y:d[0].y,cp1x:d[1].x,cp1y:d[1].y,cp2x:d[2].x,cp2y:d[2].y,cp3x:d[3].x,cp3y:d[3].y}}}}function hQ(t){const e=[];let i=0,s=NaN,o=NaN;for(const{x:a,y:n}of t){if(i>0){const r=i===1;e.push({type:"linear",moveTo:r,x0:s,y0:o,x1:a,y1:n})}i+=1,s=a,o=n}return e}function uQ(t,e){const i=[];let s=0,o=NaN,a=NaN;const n=typeof e=="number"?e:tF[e];for(const{x:r,y:l}of t){if(s>0){const c=s===1,h=o+(r-o)*n;i.push({type:"step",moveTo:c,x0:o,y0:a,x1:r,y1:l,stepX:h})}s+=1,o=r,a=l}return i}function dQ(t,e){const i=Array.isArray(t)?t:Array.from(t);if(i.length<=1)return[];const s=i.map((a,n)=>{const r=n===0?a:i[n-1],l=n===i.length-1?a:i[n+1],c=n===0||n===i.length-1;if(Math.sign(r.y-a.y)===Math.sign(l.y-a.y))return 0;if(!c){const h=Math.abs(r.y-l.y),u=Math.abs(a.y-r.y)/h,d=Math.abs(a.y-l.y)/h;if(u<=Jm||1-u<=Jm||d<=Jm||1-d<=Jm)return 0}return(l.y-r.y)/(l.x-r.x)});s[1]===0&&(s[0]*=2),s[s.length-2]===0&&(s[s.length-1]*=2);const o=[];for(let a=1;a<i.length;a+=1){const n=i[a-1],r=s[a-1],l=i[a],c=s[a],h=l.x-n.x,u=l.y-n.y;let d=h*e/3,p=h*r*e/3,g=h*e/3,f=h*c*e/3;c===0&&Math.abs(p)>Math.abs(u)&&(d*=Math.abs(u/p),p=Math.sign(p)*Math.abs(u)),r===0&&Math.abs(f)>Math.abs(u)&&(g*=Math.abs(u/f),f=Math.sign(f)*Math.abs(u)),o.push({type:"cubic",moveTo:a===1,cp0x:n.x,cp0y:n.y,cp1x:n.x+d,cp1y:n.y+p,cp2x:l.x-g,cp2y:l.y-f,cp3x:l.x,cp3y:l.y})}return o}var tF,Jm,$C=k({"packages/ag-charts-community/src/chart/series/cartesian/lineInterpolation.ts"(){"use strict";Ub(),tF={start:0,middle:.5,end:1},Jm=.05}});function Zi(t,e,i){return(e-t)*i+t}function pQ(t,e){const{x0:i,y0:s,x1:o,y1:a}=t,r=(a-s)/(o-i)*(e-i)+s;return{leftCp1x:i,leftCp1y:s,leftCp2x:e,leftCp2y:r,stepX:e,stepY0:r,stepY1:r,rightCp1x:e,rightCp1y:r,rightCp2x:o,rightCp2y:a}}function gQ(t,e){const{cp0x:i,cp0y:s,cp1x:o,cp1y:a,cp2x:n,cp2y:r,cp3x:l,cp3y:c}=t,h=Vb(i,o,n,l,e),[u,d]=Wb(i,s,o,a,n,r,l,c,h),p=u[3].y;return{leftCp1x:u[1].x,leftCp1y:u[1].y,leftCp2x:u[2].x,leftCp2y:u[2].y,stepX:e,stepY0:p,stepY1:p,rightCp1x:d[1].x,rightCp1y:d[1].y,rightCp2x:d[2].x,rightCp2y:d[2].y}}function fQ(t){const{x0:e,y0:i,x1:s,y1:o,stepX:a}=t;return{leftCp1x:(e+a)/2,leftCp1y:i,leftCp2x:(e+a)/2,leftCp2y:i,stepX:a,stepY0:i,stepY1:o,rightCp1x:(a+s)/2,rightCp1y:o,rightCp2x:(a+s)/2,rightCp2y:o}}function eF(t,e){return t.type==="linear"?pQ(t,e):t.type==="cubic"?gQ(t,e):fQ(t)}function iF(t,e,i,s,o,a,n){switch(e){case 0:n?t.moveTo(o,a):t.moveTo(i,s);break;case 1:n?t.lineTo(o,a):t.lineTo(i,s);break}}function sF(t,e,i,s,o,a){a?t.lineTo(e,i):t.lineTo(s,o)}function oF(t,e,i,s,o,a,n,r,l,c){c?t.cubicCurveTo(a,n,s,o,e,i):t.cubicCurveTo(s,o,a,n,r,l)}function aF(t,e,i,s,o,a,n){n?(t.lineTo(a,o),t.lineTo(a,i),t.lineTo(e,i)):(t.lineTo(a,i),t.lineTo(a,o),t.lineTo(s,o))}function XC(t,e,i,s){const[o,a]=wr(e);switch(iF(t,i,o.x,o.y,a.x,a.y,s),e.type){case"linear":sF(t,e.x0,e.y0,e.x1,e.y1,s);break;case"cubic":oF(t,e.cp0x,e.cp0y,e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y,s);break;case"step":aF(t,e.x0,e.y0,e.x1,e.y1,e.stepX,s);break}}function nF(t,e,i){const[s,o]=wr(t),[a,n]=wr(e),r=Zi(s.x,a.x,i),l=Zi(s.y,a.y,i),c=Zi(o.x,n.x,i),h=Zi(o.y,n.y,i);return[{x:r,y:l},{x:c,y:h}]}function ZC(t,e,i,s,o,a){const[{x:n,y:r},{x:l,y:c}]=nF(e,i,s);if(iF(t,o,n,r,l,c,a),e.type==="cubic"&&i.type==="cubic"){const h=Zi(e.cp1x,i.cp1x,s),u=Zi(e.cp1y,i.cp1y,s),d=Zi(e.cp2x,i.cp2x,s),p=Zi(e.cp2y,i.cp2y,s);oF(t,n,r,h,u,d,p,l,c,a)}else if(e.type==="step"&&i.type==="step"){const h=Zi(e.stepX,i.stepX,s);aF(t,n,r,l,c,h,a)}else if(e.type==="linear"&&i.type==="linear")sF(t,n,r,l,c,a);else{let h;e.type==="step"?h=e.stepX:i.type==="step"?h=i.stepX:h=(n+l)/2;const u=eF(e,h),d=eF(i,h),p=Zi(u.leftCp1x,d.leftCp1x,s),g=Zi(u.leftCp1y,d.leftCp1y,s),f=Zi(u.leftCp2x,d.leftCp2x,s),x=Zi(u.leftCp2y,d.leftCp2y,s),y=Zi(u.stepX,d.stepX,s),b=Zi(u.stepY0,d.stepY0,s),S=Zi(u.stepY1,d.stepY1,s),M=Zi(u.rightCp1x,d.rightCp1x,s),D=Zi(u.rightCp1y,d.rightCp1y,s),L=Zi(u.rightCp2x,d.rightCp2x,s),T=Zi(u.rightCp2y,d.rightCp2y,s);a?(t.cubicCurveTo(L,T,M,D,y,S),t.lineTo(y,b),t.cubicCurveTo(f,x,p,g,n,r)):(t.cubicCurveTo(p,g,f,x,y,b),t.lineTo(y,S),t.cubicCurveTo(M,D,L,T,l,c))}}var rF=k({"packages/ag-charts-community/src/chart/series/cartesian/lineInterpolationPlotting.ts"(){"use strict";Ub(),$C()}});function mQ(t,e){return t==null||e==null||typeof t!="object"||typeof e!="object"?!1:"id"in t&&"id"in e?t.id===e.id:t.toString()===e.toString()}function so(t,e){if(!e)return NaN;if(t instanceof Date&&(t=t.getTime()),e.type==="continuous"&&typeof t=="number")return(t-e.domain[0])/(e.domain[1]-e.domain[0])*(e.range[1]-e.range[0])+e.range[0];if(e.type==="log"&&typeof t=="number")return e.convert(t);if(e.type!=="category")return NaN;const i=e.domain.findIndex(o=>o===t);return i>=0||e.domain.findIndex(o=>mQ(t,o))>=0?e.inset+e.step*i:NaN}function Ja(t){return IT(t).valueOf()}function lF({data:t},e){return t.map((i,s)=>({xValue0Index:e.indexOf(Ja(i.xValue0)),xValue1Index:e.indexOf(Ja(i.xValue1)),datumIndex:s}))}function yQ(t,e){const i=e.scales.x,s=t.scales.x;if(i?.type!=="category"||s?.type!=="category")return!0;let o=-1/0;for(const a of i.domain){const n=so(a,s);if(Number.isFinite(n)){if(n<o)return!1;o=n}}return!0}function xQ(t,e){let i=-1/0;for(const s of t){const o=so(s.value,e.scales.x);if(Number.isFinite(o)){if(o<i)return!1;i=o}}return!0}function bQ(t,e){const i=new Map;for(const{xValue0:h,xValue1:u}of t.data){const d=Ja(h),p=Ja(u);i.set(d,h).set(p,u)}const s=Array.from(i,([h,u])=>({axisValue:h,value:u}));s.sort((h,u)=>so(h.value,t.scales.x)-so(u.value,t.scales.x));const o=[];for(const{xValue0:h,xValue1:u}of e.data){const d=Ja(h),p=Ja(u);i.has(d)||(i.set(d,h),o.push({axisValue:d,value:h})),i.has(p)||(i.set(p,u),o.push({axisValue:p,value:u}))}o.sort((h,u)=>so(h.value,e.scales.x)-so(u.value,e.scales.x));const a=s;let n=0;for(const h of o){for(let u=a.length-1;u>n;u-=1){const d=so(h.value,e.scales.x),p=so(a[u].value,e.scales.x);if(d>p){n=u+1;break}}a.splice(n,0,h),n+=1}if(!xQ(a,e))return;const r=a.map(h=>h.axisValue),l=lF(e,r),c=lF(t,r);return{axisValues:r,oldDataAxisIndices:l,newDataAxisIndices:c}}function cF(t,e,i){if(i.xValue1Index===i.xValue0Index+1)return t;const s=wr(t),o=(s[1].x-s[0].x)/(i.xValue1Index-i.xValue0Index),a=s[0].x+(e-i.xValue0Index)*o,n=a+o;return Jz(t,a,n)}function hF(t,e){const[i,s]=wr(t),o=so(0,e.scales.y);return Qm(t,{x:i.x,y:o},{x:s.x,y:o})}function uF(t){const[e,i]=wr(t);return cQ(t,{x:(e.x+i.x)/2,y:(e.y+i.y)/2})}function dF(t,e,i,s,o,a){let n,r;if(o.xValue0Index>=a.xValue1Index){const u=s.findLast(p=>p.xValue1Index<=a.xValue1Index)?.datumIndex,d=u!=null?i.data[u]:void 0;n=d?.xValue1,r=d?.yValue1}else if(o.xValue0Index<=a.xValue0Index){const u=s.find(p=>p.xValue0Index>=a.xValue0Index)?.datumIndex,d=u!=null?i.data[u]:void 0;n=d?.xValue0,r=d?.yValue0}if(n==null||r==null)switch(e){case 0:return hF(t,i);case 1:return uF(t)}const l=so(n,i.scales.x),c=so(r,i.scales.y),h={x:l,y:c};return Qm(t,h,h)}function qC(t,e){if(e==null)return;const i=Ja(t.xValue0),s=Ja(t.xValue1);return e.find(o=>Ja(o.xValue0)===i&&Ja(o.xValue1)===s)?.span}function pF(t,e,i,s,o,a,n){const r=t.data[s.datumIndex],l=r.span,c=qC(r,o);if(c!=null)n.removed.push({from:c,to:c}),n.moved.push({from:c,to:l}),n.added.push({from:l,to:l});else{const h=dF(l,e,t,i,s,a);n.added.push({from:h,to:l})}}function gF(t,e,i,s,o,a,n){const r=t.data[s.datumIndex],l=r.span,c=qC(r,o);if(c!=null)n.removed.push({from:l,to:l}),n.moved.push({from:l,to:c}),n.added.push({from:c,to:c});else{const h=dF(l,e,t,i,s,a);n.removed.push({from:l,to:h})}}function fF(t,e,i,s,o){const a=e[o.xValue0Index],n=i.data.find(x=>Ja(x.xValue0)===a),r=e[o.xValue1Index],l=i.data.find(x=>Ja(x.xValue1)===r);if(n==null||l==null)return;const[{x:c},{x:h}]=wr(t),u=so(n.xValue0,i.scales.x),d=so(n.yValue0,i.scales.y),p=so(l.xValue1,i.scales.x),g=so(l.yValue1,i.scales.y);let f=s.data[o.datumIndex].span;return f=Qm(f,{x:u,y:d},{x:p,y:g}),f=Jz(f,c,h),f}function SQ(t,e,i,s,o,a,n,r,l){const c=o+1,h=n.find(S=>S.xValue0Index<=o&&S.xValue1Index>=c),u=a.find(S=>S.xValue0Index<=o&&S.xValue1Index>=c),d=e.zeroData,p=t.zeroData;if(h==null&&u!=null){pF(t,i,a,u,d,r,l);return}else if(h!=null&&u==null){gF(e,i,n,h,p,r,l);return}else if(h==null||u==null)return;let g;h.xValue0Index===u.xValue0Index&&h.xValue1Index===u.xValue1Index?g=0:h.xValue0Index<=u.xValue0Index&&h.xValue1Index>=u.xValue1Index?g=-1:h.xValue0Index>=u.xValue0Index&&h.xValue1Index<=u.xValue1Index?g=1:g=0;const f=e.data[h.datumIndex],x=cF(f.span,o,h),y=t.data[u.datumIndex],b=cF(y.span,o,u);if(g===1){const S=fF(x,s,e,t,u);S!=null?(l.removed.push({from:x,to:S}),l.moved.push({from:S,to:b}),l.added.push({from:b,to:b})):gF(e,i,n,h,p,r,l)}else if(g===-1){const S=fF(b,s,t,e,h);S!=null?(l.removed.push({from:x,to:x}),l.moved.push({from:x,to:S}),l.added.push({from:S,to:b})):pF(t,i,a,u,d,r,l)}else l.removed.push({from:x,to:x}),l.moved.push({from:x,to:b}),l.added.push({from:b,to:b})}function vQ(t,e,i,s){const o={removed:[],moved:[],added:[]},{axisValues:a,oldDataAxisIndices:n,newDataAxisIndices:r}=t,l={xValue0Index:Math.max(n.at(0)?.xValue0Index??-1/0,r.at(0)?.xValue0Index??-1/0),xValue1Index:Math.min(n.at(-1)?.xValue1Index??1/0,r.at(-1)?.xValue1Index??1/0)};for(let c=0;c<a.length-1;c+=1)SQ(e,i,s,a,c,r,n,l,o);return o}function mF(t,e,i){const{span:s}=e;switch(i){case 0:return qC(e,t.zeroData)??hF(s,t);case 1:return uF(s)}}function MQ(t,e,i){const s=[],o=[];for(const a of e.data){const n=a.span,r=mF(e,a,i);o.push({from:n,to:r})}for(const a of t.data){const n=a.span,r=mF(t,a,i);s.push({from:r,to:n})}return{removed:o,moved:[],added:s}}function ty(t,e,i){if(!yQ(t,e))return;const s=bQ(t,e);return s==null?MQ(t,e,i):vQ(s,t,e,i)}var QC,JC=k({"packages/ag-charts-community/src/chart/series/cartesian/lineInterpolationUtil.ts"(){"use strict";Mm(),$C(),QC=(t=>(t[t.Zero=0]="Zero",t[t.Split=1]="Split",t))(QC||{})}});function yF(t){return t.type==="continuous"||t.type==="log"}function xF(t){return t.type==="category"}function pg(t,e){return t===void 0||e===void 0?t!==void 0||e!==void 0:yF(t)&&yF(e)?t.type===e.type&&An(t.domain,e.domain)&&An(t.range,e.range):xF(t)&&xF(e)?t.inset===e.inset&&t.step===e.step&&An(t.domain,e.domain):!1}function ey(t){return t==null?!1:t.type==="category"?t.domain.every(e=>e!=null):t.domain.every(e=>Number.isFinite(e)||e instanceof Date)&&t.range.every(e=>Number.isFinite(e))}var Iv=k({"packages/ag-charts-community/src/chart/series/cartesian/scaling.ts"(){"use strict";P()}});function Tv(t,e){let i;const s=t.map(o=>o.point);switch(e.type){case"linear":i=hQ(s);break;case"smooth":i=dQ(s,e.tension);break;case"step":i=uQ(s,e.position);break}return i.map((o,a)=>({span:o,xValue0:t[a].xDatum,yValue0:t[a].yDatum,xValue1:t[a+1].xDatum,yValue1:t[a+1].yDatum}))}function bF(t,e,i=.001){return Math.abs(t.x-e.x)<i&&Math.abs(t.y-e.y)<i}function tL({path:t},e){let i;for(const{span:s}of e){const[o,a]=wr(s),n=i!=null&&bF(i,o)?1:0;XC(t,s,n,!1),i=a}}function Cv(t,e,i){let s;for(const o of i){const[a,n]=nF(o.from,o.to,t),r=s!=null&&bF(s,a)?1:0;ZC(e.path,o.from,o.to,t,r,!1),s=n}}function eL(t,e,i){const s=(r,l)=>Cv(r,l,e.removed),o=(r,l)=>Cv(r,l,e.moved),a=(r,l)=>Cv(r,l,e.added),n=iL(t,i);return{status:t,path:{addPhaseFn:a,updatePhaseFn:o,removePhaseFn:s},pathProperties:n}}function iL(t,e){const i=e==="none"?"updated":t,s={fromFn:o=>{let a;return t==="removed"?a={finish:{visible:!1}}:t==="added"?a={start:{visible:!0}}:a={},{phase:Ha[i],...a}},toFn:o=>({phase:Ha[i]})};return e==="fade"?{fromFn:o=>({opacity:t==="added"?0:o.opacity,...s.fromFn(o)}),toFn:o=>({opacity:t==="removed"?0:1,...s.toFn(o)})}:s}function SF(t,e,i){const s=t.scales.x?.type==="category",o=e.scales.x?.type==="category";if(s!==o||!ey(t.scales.x)||!ey(e.scales.x)||t.strokeData==null||e.strokeData==null)return;let a="updated";e.visible&&!t.visible?a="removed":!e.visible&&t.visible&&(a="added");const n=ty({scales:t.scales,data:t.strokeData.spans},{scales:e.scales,data:e.strokeData.spans},1);if(n==null)return;const r=eL(a,n,"fade"),l=(i?.changed??!0)||!pg(t.scales.x,e.scales.x)||!pg(t.scales.y,e.scales.y)||a!=="updated";return{status:a,stroke:r,hasMotion:l}}var Lv=k({"packages/ag-charts-community/src/chart/series/cartesian/lineUtil.ts"(){"use strict";Ps(),$C(),rF(),JC(),Iv()}});function vF({path:t},{spans:e,phantomSpans:i}){for(let s=0;s<e.length;s+=1){const{span:o}=e[s],a=i[s].span;XC(t,o,0,!1),XC(t,a,1,!0),t.closePath()}}function Nv(t,{path:e},i,s){for(let o=0;o<i.length;o+=1){const a=i[o],n=s[o];ZC(e,a.from,a.to,t,0,!1),ZC(e,n.from,n.to,t,1,!0),e.closePath()}}function MF(t,e,i,s){const o=(l,c)=>Nv(l,c,e.removed,i.removed),a=(l,c)=>Nv(l,c,e.moved,i.moved),n=(l,c)=>Nv(l,c,e.added,i.added),r=iL(t,s);return{status:t,path:{addPhaseFn:n,updatePhaseFn:a,removePhaseFn:o},pathProperties:r}}function DF(t,e){const i=t.scales.x?.type==="category",s=e.scales.x?.type==="category";if(i!==s||!ey(t.scales.x)||!ey(e.scales.x))return;let o="updated";e.visible&&!t.visible?o="removed":!e.visible&&t.visible&&(o="added");const a=ty({scales:t.scales,data:t.fillData.spans},{scales:e.scales,data:e.fillData.spans},0);if(a==null)return;const n=ty({scales:t.scales,data:t.fillData.phantomSpans},{scales:e.scales,data:e.fillData.phantomSpans},0);if(n==null)return;const r=ty({scales:t.scales,data:t.strokeData.spans,zeroData:t.fillData.phantomSpans},{scales:e.scales,data:e.strokeData.spans,zeroData:e.fillData.phantomSpans},0);if(r==null)return;const l="none",c=MF(o,a,n,l),h=eL(o,r,l);return{status:o,fill:c,stroke:h}}var kF=k({"packages/ag-charts-community/src/chart/series/cartesian/areaUtil.ts"(){"use strict";rF(),JC(),Lv(),Iv()}});function iy({id:t},e,i,...s){const o={phase:i?Ha[i]:"trailing"};bl(t,"markers",e,s,{opacity:0},{opacity:1},o),s.forEach(a=>a.cleanup())}function sL({id:t},e,...i){bl(t,"markers",e,i,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),i.forEach(s=>s.cleanup())}function oL({id:t,nodeDataDependencies:e},i,...s){const o=e.seriesRectWidth;ci(t,"markers",i,s,{fromFn:(r,l)=>{const c=l.midPoint?.x??o;let h=Tt(0,CI(c/o),1);return isNaN(h)&&(h=0),{scalingX:0,scalingY:0,delay:h,duration:hm,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function sy(t){return{opacity:1,scalingX:1,scalingY:1}}function oy(t,e){return{x:e.point?.x??NaN,y:e.point?.y??NaN,scalingCenterX:e.point?.x??NaN,scalingCenterY:e.point?.y??NaN}}function ay(t,{datumIndex:e}){const i=t.getNodeData();if(i===void 0)return;const s=i[e],{point:o}=s??{};if(s==null||o==null)return;const a=4+(o.focusSize??t.getFormattedMarkerStyle(s).size),n=a/2,r=s.point.x-n,l=s.point.y-n;return Ke.toCanvas(t.contentGroup,new pt(r,l,a,a))}var ny=k({"packages/ag-charts-community/src/chart/series/cartesian/markerUtil.ts"(){"use strict";P(),cu(),Ps(),Xt(),ms(),kp()}});function aL({id:t,visible:e,nodeDataDependencies:i},s,...o){const{seriesRectWidth:a,seriesRectHeight:n}=i;bl(t,"path_properties",s,o,{clipX:0},{clipX:a},{phase:"initial",start:{clip:!0,clipY:n,visible:e},finish:{clip:!1,visible:e}})}function Ov({id:t},e,i,s="add",...o){bl(t,e,i,o,{opacity:0},{opacity:1},{phase:s})}function nL(t){return e=>({visible:t.getVisible(),opacity:t.getOpacity(),clipScalingX:1,clip:!1})}function wv({nodeDataDependencies:t},e){const i=s=>isFinite(s)?s:0;e.clipX=i(t.seriesRectWidth),e.clipY=i(t.seriesRectHeight)}var rL=k({"packages/ag-charts-community/src/chart/series/cartesian/pathUtil.ts"(){"use strict";Ps()}}),AF,IF,ry,DQ=k({"packages/ag-charts-community/src/chart/series/cartesian/areaSeries.ts"(){"use strict";P(),Ps(),VC(),vu(),Ve(),Ar(),qt(),Mm(),nv(),rv(),Ua(),Ir(),wl(),vl(),hu(),rQ(),kF(),$o(),Lv(),ny(),rL(),AF=.125,IF=.25,ry=class extends _l{constructor(t){super({moduleCtx:t,directionKeys:Fc,directionNames:Gc,categoryKey:"xValue",pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[2,0],animationResetFns:{path:nL({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:Ol,marker:(e,i)=>({...sy(e),...oy(e,i)})},clipFocusBox:!1}),this.properties=new ui,this.connectsToYAxis=!0,this.backgroundGroup=new It({name:`${this.id}-background`,zIndex:0}),this._isStacked=void 0}get pickModeAxis(){return"main"}renderToOffscreenCanvas(){return super.renderToOffscreenCanvas()||this.contextNodeData!=null&&(this.contextNodeData.fillData.spans.length>qm||this.contextNodeData.strokeData.spans.length>qm)}attachSeries(t,e,i){super.attachSeries(t,e,i),t.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),t?.removeChild(this.backgroundGroup)}attachPaths([t,e]){this.backgroundGroup.appendChild(t),this.contentGroup.appendChild(e),e.zIndex=-1}detachPaths([t,e]){this.backgroundGroup.removeChild(t),this.contentGroup.removeChild(e)}isStacked(){return(this.seriesGrouping?.stackCount??1)>1}setSeriesIndex(t){const e=this.isStacked();return!super.setSeriesIndex(t)&&this._isStacked===e?!1:(this._isStacked=e,e?(this.backgroundGroup.zIndex=[0,t],this.contentGroup.zIndex=[1,t,0]):(this.backgroundGroup.zIndex=[1,t,0,0],this.contentGroup.zIndex=[1,t,0,1]),!0)}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:o=1}={}}=this,{xKey:a,yKey:n,yFilterKey:r,connectMissingData:l,normalizedTo:c}=this.properties,h=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,d=this.axes.y?.scale,{xScaleType:p,yScaleType:g}=this.getScaleInformation({xScale:u,yScale:d}),f={value:`area-stack-${s}-yValue`,values:`area-stack-${s}-yValues`,stack:`area-stack-${s}-yValue-stack`,marker:`area-stack-${s}-yValues-marker`},x=[];sp(c)&&x.push(iv(Object.values(f),c)),h&&x.push(Wp());const y={invalidValue:null};(sp(c)||l)&&o>1&&(y.invalidValue=0),i||(y.forceValue=0),await this.requestDataModel(t,e,{props:[Fn(a,p,{id:"xValue"}),Wt(n,g,{id:"yValueRaw",...y}),...r!=null?[Wt(r,g,{id:"yFilterRaw"})]:[],...Sz(n,g,{id:"yValueStack",...y,groupId:f.stack}),Wt(n,g,{id:"yValue",...y,groupId:f.value}),...Rc(n,"window","current",{id:"yValueEnd",...y,groupId:f.values},g),...Rc(n,"normal","current",{id:"yValueCumulative",...y,groupId:f.marker},g),...x],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}xCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.x.scale.convert(t),o=i.enabled?.5*i.size*e:0;return[s-o,s+o]}yCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.y.scale.convert(t[0]),o=i.enabled?.5*i.size*e:0;return[s-o,s+o]}getSeriesDomain(t){const{processedData:e,dataModel:i,axes:s}=this;if(!e||!i)return[];const o=s.y;if(t==="x"){const n=i.resolveProcessedDataDefById(this,"xValue"),r=i.getDomain(this,"xValue","key",e);return n?.def.type==="key"&&n.def.valueType==="category"?r:Ho(Ml(r))}const a=this.domainForClippedRange("y",["yValueCumulative"],"xValue",!0);if(o instanceof Eu||o instanceof Dl)return Ho(a);{const n=Number.isFinite(a[1]-a[0])?[a[0]>0?0:a[0],a[1]<0?0:a[1]]:[];return Ho(n)}}getSeriesRange(t,e){const[i,s]=this.domainForVisibleRange("y",["yValueCumulative"],"xValue",e,!0);return[Math.min(i,0),Math.max(s,0)]}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["yValueCumulative"],t,e,i)}createNodeData(){const{axes:t,data:e,processedData:i,dataModel:s}=this,o=t.x,a=t.y;if(!o||!a||!e||!s||i?.type!=="grouped"||!this.properties.isValid())return;const{yKey:n,xKey:r,yFilterKey:l,marker:c,label:h,fill:u,stroke:d,connectMissingData:p,interpolation:g}=this.properties,{scale:f}=o,{scale:x}=a,{isContinuousY:y}=this.getScaleInformation({xScale:f,yScale:x}),b=(f.bandwidth??0)/2,S=s.resolveKeysById(this,"xValue",i),M=s.resolveColumnById(this,"yValueEnd",i),D=s.resolveColumnById(this,"yValueRaw",i),L=s.resolveColumnById(this,"yValueCumulative",i),T=l!=null?s.resolveColumnById(this,"yFilterRaw",i):void 0,I=s.resolveColumnById(this,"yValueStack",i),N=(q,J,X)=>{let st;return(sp(this.properties.normalizedTo)?y&&GS(X):!isNaN(X))&&(st=J),{x:f.convert(q)+b,y:x.convert(st),size:c.size}},O=[],R=[],{visibleSameStackCount:_}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);let B=!1;const{dataSources:W}=i,F=W.get(this.id)??[];for(const{datumIndex:q}of s.forEachGroupDatum(this,i)){const J=S[q];if(J==null)return;const X=F[q],st=D[q],nt=L[q],dt=M[q],ut=Number.isFinite(st),St=N(J,+nt,st),Lt=T!=null?T[q]===st:void 0;if(Lt===!1&&(B=!0),ut&&c&&R.push({series:this,itemId:n,datum:X,datumIndex:q,midPoint:{x:St.x,y:St.y},cumulativeValue:dt,yValue:st,xValue:J,yKey:n,xKey:r,point:St,fill:c.fill??u,stroke:c.stroke??d,strokeWidth:c.strokeWidth??this.getStrokeWidth(this.properties.strokeWidth),selected:Lt}),ut&&h){const mt=this.getLabelText(h,{value:st,datum:X,xKey:r,yKey:n,xName:this.properties.xName,yName:this.properties.yName});O.push({series:this,itemId:n,datum:X,datumIndex:q,x:St.x,y:St.y,labelText:mt})}}const z=q=>q.flatMap(J=>Array.isArray(J)?Tv(J,g):new Array(J.skip).fill(null)),U=(q,J)=>({point:{x:f.convert(q)+b,y:x.convert(J)},xDatum:q,yDatum:J}),H=q=>{const J=[];for(const{datumIndexes:[X,st,nt]}of s.forEachGroupDatumTuple(this,i)){const dt=S[st],ut=I[st],St=ut[q],Lt=Number.isFinite(St);if(p&&!Lt)continue;const mt=X!=null?I[X]:void 0,Jt=nt!=null?I[nt]:void 0;let ie=0,Kt=0;for(let Dt=0;Dt<=q;Dt+=1){const Gt=ut[Dt];if(Number.isFinite(Gt)){const te=mt==null||Number.isFinite(mt[Dt]),Xs=Jt==null||Number.isFinite(Jt[Dt]);te&&(ie+=Gt),Xs&&(Kt+=Gt)}}const $t=J[J.length-1];if(!p&&(ie!==Kt||!Lt))if(!Lt&&Array.isArray($t)&&$t.length===1)J[J.length-1]={skip:1};else{const Dt=U(dt,ie),Gt=U(dt,Kt);Array.isArray($t)?$t.push(Dt):$t!=null&&($t.skip+=1),J.push(Lt?[Gt]:{skip:0})}else{const Dt=p?St:Math.max(ie,Kt),Gt=U(dt,Dt);Array.isArray($t)?$t.push(Gt):$t!=null?($t.skip+=1,J.push([Gt])):J.push([Gt])}}return z(J)},j=this.seriesGrouping?.stackIndex??0,V=()=>{const q=Array.from(s.forEachGroupDatum(this,i),({datumIndex:J})=>{const X=S[J],nt=I[J][j];if(!(p&&!Number.isFinite(nt)))return U(X,0)}).filter(J=>J!=null);return Tv(q,g)},G=H(j),K=G.map(()=>null);for(let q=j-1;q>=-1;q-=1){let J;for(let X=0;X<K.length;X+=1)K[X]==null&&(J??(J=q!==-1?H(q):V()),K[X]=J[X])}const $=G.map((q,J)=>q??K[J]),Z=G.filter(q=>q!=null);return{itemId:n,fillData:{itemId:n,spans:$,phantomSpans:K},strokeData:{itemId:n,spans:Z},labelData:O,nodeData:R,scales:this.calculateScaling(),visible:this.visible,stackVisible:_>0,crossFiltering:B}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{opacity:e,visible:i,animationEnabled:s}=t,[o,a]=t.paths,n=this.contextNodeData?.crossFiltering===!0,r=this.getStrokeWidth(this.properties.strokeWidth);a.setProperties({fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:r,strokeOpacity:this.properties.strokeOpacity*(n?IF:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:e,visible:i||s});const l=Iu(this.properties.fill,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults);Tu(o,{fill:l,stroke:void 0,fillOpacity:this.properties.fillOpacity*(n?AF:1)},void 0,this.getShapeFillBBox()),o.setProperties({lineJoin:"round",pointerEvents:1,fillShadow:this.properties.shadow,opacity:e,visible:i||s}),wv(this,a),wv(this,o)}updatePaths(t){this.updateAreaPaths(t.paths,t.contextData)}updateAreaPaths(t,e){for(const i of t)i.visible=e.visible;if(e.visible)this.updateFillPath(t,e),this.updateStrokePath(t,e);else for(const i of t)i.path.clear(),i.markDirty("AreaSeries")}updateFillPath(t,e){const[i]=t;i.path.clear(),vF(i,e.fillData),i.markDirty("AreaSeries")}updateStrokePath(t,e){const{spans:i}=e.strokeData,[,s]=t;s.path.clear(),tL(s,i),s.markDirty("AreaSeries")}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t,s=this.properties.marker.enabled||this.contextNodeData?.crossFiltering===!0;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(s?e:[])}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:o,marker:a,fill:n,stroke:r,strokeWidth:l,fillOpacity:c,strokeOpacity:h,highlightStyle:u}=this.properties,d=this.getSeriesDomain("x"),p=this.getSeriesDomain("y"),g=Vt(i&&u.item,a.getStyle(),{fill:n,stroke:r,strokeWidth:l,fillOpacity:c,strokeOpacity:h}),f=this.getShapeFillBBox();e.each((x,y)=>{this.updateMarkerStyle(a,x,y.datum,y.point,Ic(y,s,o,d,p),i,g,f,{selected:y.selected})}),i||this.properties.marker.markClean()}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{enabled:i,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:n,color:r}=this.properties.label;e.each((l,c)=>{const{x:h,y:u,labelText:d}=c;d&&i&&this.visible?(l.fontStyle=s,l.fontWeight=o,l.fontSize=a,l.fontFamily=n,l.textAlign="center",l.textBaseline="bottom",l.text=d,l.x=h,l.y=u-10,l.fill=r,l.visible=!0):l.visible=!1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a}=this,{xKey:n,xName:r,yKey:l,yName:c,tooltip:h,marker:u}=a,d=o.x,p=o.y;if(!i||!s||!d||!p)return;const g=s.dataSources.get(this.id)?.[t],f=i.resolveKeysById(this,"xValue",s)[t],x=i.resolveColumnById(this,"yValueRaw",s)[t],{xDomain:y,yDomain:b}=this.cachedDatumCallback("domain",()=>({xDomain:this.getSeriesDomain("x"),yDomain:this.getSeriesDomain("y")}));if(f==null)return;const S=u.getStyle(),M={datum:g,xValue:f,yValue:x},D=this.getMarkerStyle(u,g,Ic(M,n,l,y,b),!1,void 0,S);return h.formatTooltip(this.properties,{heading:d.formatDatum(f),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:p.formatDatum(x)}]},{seriesId:e,datum:g,title:c,xKey:n,xName:r,yKey:l,yName:c,...D,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:s,strokeWidth:o,lineDash:a,marker:n,fillGradientDefaults:r,fillPatternDefaults:l}=this.properties,c=!n.enabled||n.fill===void 0,h=c?Iu(t,r,l):Iu(n.fill,n.fillGradientDefaults,n.fillPatternDefaults);return{marker:{...this.getMarkerStyle(n,void 0,void 0,!1,void 0,{fill:h,fillOpacity:c?i:n.fillOpacity}),enabled:n.enabled||o<=0},line:{stroke:e,strokeOpacity:s,strokeWidth:o,lineDash:a}}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{yKey:o,yName:a,legendItemName:n,showInLegend:r}=this.properties;return[{legendType:t,id:e,itemId:o,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:o}),label:{text:n??a??o},symbol:this.legendItemSymbol(),legendItemName:n,hideInLegend:!r}]}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,contextData:s,paths:o}=t,{animationManager:a}=this.ctx;this.updateAreaPaths(o,s),aL(this,a,...o),bs([e],oy),oL(this,a,e),ce(this,"labels",a,i)}animateReadyResize(t){const{contextData:e,paths:i}=t;this.updateAreaPaths(i,e),super.animateReadyResize(t)}animateWaitingUpdateReady(t){const{animationManager:e}=this.ctx,{markerSelection:i,labelSelection:s,contextData:o,paths:a,previousContextData:n}=t,[r,l]=a;if(r==null&&l==null)return;this.resetMarkerAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateAreaPaths(a,o)},h=()=>{e.skipCurrentBatch(),c()};if(o==null||n==null){c(),iy(this,e,"added",i),Ov(this,"fill_path_properties",e,"add",r),Ov(this,"stroke_path_properties",e,"add",l),ce(this,"labels",e,s);return}if(o.crossFiltering!==n.crossFiltering){h();return}const u=DF(o,n);if(u===void 0){h();return}else if(u.status==="no-op")return;iy(this,e,void 0,i),ci(this.id,"fill_path_properties",e,[r],u.fill.pathProperties),Dv(this.id,"fill_path_update",e,[r],u.fill.path),ci(this.id,"stroke_path_properties",e,[l],u.stroke.pathProperties),Dv(this.id,"stroke_path_update",e,[l],u.stroke.path),ce(this,"labels",e,s),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(a,o)})}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new It}getFormattedMarkerStyle(t){const{xKey:e,yKey:i}=t,s=this.getSeriesDomain("x"),o=this.getSeriesDomain("y");return this.getMarkerStyle(this.properties.marker,t.datum,Ic(t,e,i,s,o),!0)}computeFocusBounds(t){return ay(this,t)}},ry.className="AreaSeries",ry.type="area"}});function gg(t){const e={enabled:at,xOffset:vt,yOffset:vt,renderer:ne};return t&&(e.format=rt),{enabled:at,snap:at,label:e,...Es,...Ga}}function Ev(t,e){return{min:as(t,Vh("max")),max:as(t,Nf("min")),nice:at,interval:{step:e?Ge(np,Ge(np,tA(Tc))):np,values:Oe(t),minSpacing:as(ot,Vh("maxSpacing")),maxSpacing:as(ot,Nf("minSpacing"))}}}var ly,_v,lL,cL,Rv,Gu,cy,ju,hL=k({"packages/ag-charts-community/src/chart/axesOptionsDefs.ts"(){"use strict";P(),Lp(),ly=ae(g_,"a valid number format string"),_v={enabled:at,text:rt,padding:vt,...xo},lL=ae({enabled:at,type:Mt(_t("line","range")),range:as(ae((t,{options:e})=>e.type==="range","crossLine type to be 'range'"),Oe(yo),ap(2,2)),value:as(ae((t,{options:e})=>e.type==="line","crossLine type to be 'line'"),yo),label:_v,fill:rt,fillOpacity:Ce,...Es,...Ga},"cross-line options"),cL={...lL,label:{..._v,position:_t("top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","inside","inside-left","inside-right","inside-top","inside-bottom","inside-top-left","inside-bottom-left","inside-top-right","inside-bottom-right"),rotation:vt}},Rv={enabled:at,rotation:vt,avoidCollisions:at,minSpacing:ot,spacing:ot,formatter:ne,itemStyler:ne,...xo},Gu={autoRotate:at,autoRotateAngle:vt,...Rv},cy={reverse:at,gridLine:{enabled:at,width:ot,style:rl({stroke:Pt,lineDash:Oe(ot)},"a grid-line style object array")},interval:{values:Oe(yo),minSpacing:ot},label:Rv,line:{enabled:at,width:ot,stroke:Pt},tick:{enabled:at,width:ot,size:ot,stroke:Pt}},cy.context=yo,cy.layoutConstraints={stacked:Mt(at),align:Mt(_t("start","end")),unit:Mt(_t("percent","px")),width:Mt(ot)},ju={...cy,keys:Oe(rt),crossLines:rl(cL,"a cross-line options array"),position:_t("top","right","bottom","left"),thickness:ot,title:{enabled:at,text:rt,spacing:ot,formatter:ne,...xo}}}}),Pv,uL,hy,Bv,zv,dL,Fv,uy,dy,Gv,oo,tn,fg,Rl,TF,py,Er,mg,jv,Pl=k({"packages/ag-charts-community/src/chart/commonOptionsDefs.ts"(){"use strict";P(),hL(),Pv=Ge(_t("circle","cross","diamond","heart","plus","pin","square","star","triangle"),ne),uL=_t("never","always","hyphenate","on-space"),hy=_t("top","right","bottom","left","top-right","bottom-right","bottom-left","top-left","center"),Bv=_t("pointer","node","top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"),zv=Ge(ot,_t("exact","nearest")),dL=_t("pointer","start","middle","end"),Fv={enabled:at,text:rt,textAlign:_t("left","center","right"),wrapping:_t("never","always","hyphenate","on-space"),spacing:ot,maxWidth:ot,maxHeight:ot,...xo},uy={enabled:at,text:rt,renderer:ne},dy=rl({label:rt,action:ne},"a context menu actions array"),Gv={label:rt,ariaLabel:rt,tooltip:rt,icon:_t("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")},oo={width:ot,height:ot,minWidth:ot,minHeight:ot,suppressFieldDotNotation:at,title:Fv,subtitle:Fv,footnote:Fv,padding:{top:ot,right:ot,bottom:ot,left:ot},seriesArea:{clip:at,padding:{top:ot,right:ot,bottom:ot,left:ot}},legend:{enabled:at,position:_t("top","right","bottom","left"),orientation:_t("horizontal","vertical"),maxWidth:ot,maxHeight:ot,spacing:ot,preventHidingAll:at,reverseOrder:at,toggleSeries:at,item:{marker:{size:ot,shape:Pv,padding:ot,strokeWidth:ot},line:{length:ot,strokeWidth:ot},label:{maxLength:ot,formatter:ne,...xo},maxWidth:ot,paddingX:ot,paddingY:ot,showSeriesStroke:at},pagination:{marker:{size:ot,shape:Pv,padding:ot},activeStyle:{...Po,...Es},inactiveStyle:{...Po,...Es},highlightStyle:{...Po,...Es},label:xo},listeners:{legendItemClick:ne,legendItemDoubleClick:ne}},gradientLegend:{enabled:at,position:_t("top","right","bottom","left"),spacing:ot,reverseOrder:at,gradient:{preferredLength:ot,thickness:ot},scale:{label:{...xo,format:ly,formatter:ne},padding:ot,interval:{step:vt,values:Fa,minSpacing:as(ot,Vh("maxSpacing")),maxSpacing:as(ot,Nf("minSpacing"))}}},listeners:{seriesNodeClick:ne,seriesNodeDoubleClick:ne,seriesVisibilityChange:ne,click:ne,doubleClick:ne,annotations:ne,zoom:ne},highlight:{range:_t("tooltip","node")},overlays:{loading:uy,noData:uy,noVisibleSeries:uy,unsupportedBrowser:uy},tooltip:{enabled:at,showArrow:at,pagination:at,delay:ot,range:zv,wrapping:uL,mode:_t("single","shared","compact"),position:{type:Bv,anchorTo:_t("pointer","node","chart"),placement:Ge(hy,Oe(hy)),xOffset:vt,yOffset:vt}},animation:{enabled:at,duration:ot},contextMenu:{enabled:at,extraActions:dy,extraSeriesAreaActions:dy,extraNodeActions:dy,extraLegendItemActions:dy},dataSource:{getData:ne},keyboard:{enabled:at,tabIndex:vt},touch:{dragAction:_t("none","drag","hover")},ranges:{enabled:at,buttons:rl({...Gv,value:Ge(vt,as(Oe(Ge(vt,pc)),ap(2,2)),ne)},"range button options array")},locale:{localeText:jh,getLocaleText:ne},background:{visible:at,fill:Pt,image:{url:rt,top:vt,right:vt,bottom:vt,left:vt,width:ot,height:ot,opacity:Ce}},sync:{enabled:at,groupId:rt,axes:_t("x","y","xy"),nodeInteraction:at,zoom:at},zoom:{enabled:at,enableAxisDragging:at,enableDoubleClickToReset:at,enablePanning:at,enableScrolling:at,enableSelecting:at,enableTwoFingerZoom:at,keepAspectRatio:at,anchorPointX:dL,anchorPointY:dL,axes:_t("x","y","xy"),deceleration:Ge(_t("off","short","long"),Ce),minVisibleItems:ot,minVisibleItemsX:ot,minVisibleItemsY:ot,panKey:_t("alt","ctrl","meta","shift"),scrollingStep:Ce,autoScaling:{enabled:at,padding:Ce},buttons:{enabled:at,buttons:rl({...Gv,value:_t("reset","zoom-in","zoom-out","pan-left","pan-right","pan-start","pan-end"),section:rt},"zoom button options array"),visible:_t("always","zoomed","hover")}}},oo.dataSource.requestThrottle=ot,oo.dataSource.updateThrottle=ot,oo.dataSource.updateDuringInteraction=at,oo.zoom.enableIndependentAxes=at,oo.statusBar=yo,oo.foreground={visible:at,text:rt,image:{url:rt,top:vt,right:vt,bottom:vt,left:vt,width:ot,height:ot,opacity:Ce},...Po},oo.overrideDevicePixelRatio=vt,tn={id:rt,cursor:rt,visible:at,data:Oe(jh),showInLegend:at,nodeClickRange:zv,listeners:{nodeClick:ne,nodeDoubleClick:ne},highlightStyle:{item:{...Po,...Es},series:{enabled:at,dimOpacity:Ce,strokeWidth:ot}}},tn.context=yo,tn.seriesGrouping=yo,tn.highlight={enabled:at},fg={enabled:at,shape:Pv,size:ot,itemStyler:ne,...Po,...Es,...Ga},Rl={enabled:at,formatter:ne,...xo},TF={...Rl,lineHeight:ot,minimumFontSize:ot,wrapping:uL,overflowStrategy:_t("ellipsis","hide")},py={visible:at,xLowerKey:rt,xUpperKey:rt,yLowerKey:rt,yUpperKey:rt,xLowerName:rt,xUpperName:rt,yLowerName:rt,yUpperName:rt,itemStyler:ne,cap:{visible:at,length:ot,lengthRatio:Ce,...Es,...Ga},...Es,...Ga},Er={enabled:at,showArrow:at,range:zv,renderer:ne,position:{type:Bv,anchorTo:_t("node","pointer","chart"),placement:Ge(hy,Oe(hy)),xOffset:vt,yOffset:vt},interaction:{enabled:at}},Er.position._seriesOverrideType=Bv,mg={enabled:at,xOffset:vt,yOffset:vt,blur:ot,color:Pt},jv=Of({linear:{},smooth:{tension:Ce},step:{position:_t("start","middle","end")}},"interpolation line options")}}),CF,kQ=k({"packages/ag-charts-community/src/chart/series/cartesian/areaSeriesOptionsDef.ts"(){"use strict";P(),Pl(),CF={type:Mt(gs("area")),xKey:Mt(rt),yKey:Mt(rt),xName:rt,yName:rt,stacked:at,stackGroup:rt,normalizedTo:vt,showInMiniChart:at,connectMissingData:at,interpolation:jv,label:Rl,marker:fg,tooltip:Er,shadow:mg,...tn,...Po,...Es,...Ga}}}),LF,pL,gL=k({"packages/ag-charts-community/src/chart/series/cartesian/areaSeriesModule.ts"(){"use strict";hi(),vi(),DQ(),kQ(),LF={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",moduleFactory:t=>new ry(t),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{nodeClickRange:"nearest",tooltip:{position:{_seriesOverrideType:"node"}},fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Nl,stroke:{$palette:"stroke"},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:Tl,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:0,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Nl},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}}}},pL={type:"series",name:"area",chartType:"cartesian",options:CF,create:t=>new ry(t)}}});function fL(t,e){for(const i of e){const s=i.datum;s===void 0?tt.error("undefined datum"):t.addValue(i,s)}}function mL(t,e){const{x:i,y:s}=e,{nearest:o,distanceSquared:a}=t.getQuadTree().find(i,s);if(o!==void 0)return{datum:o.value,distance:Math.sqrt(a)}}var yL=k({"packages/ag-charts-community/src/chart/series/cartesian/quadtreeUtil.ts"(){"use strict";P()}}),Vv,xL,bL=k({"packages/ag-charts-community/src/chart/series/cartesian/abstractBarSeries.ts"(){"use strict";P(),_m(),So(),Ar(),Nt(),Nu(),ov(),Ua(),$o(),yL(),Vv=class extends Or{constructor(){super(...arguments),this.direction="vertical"}},v([A(RA)],Vv.prototype,"direction",2),xL=class extends _l{constructor(){super(...arguments),this.groupScale=new jp,this.smallestDataInterval=void 0,this.largestDataInterval=void 0}padBandExtent(t,e){const i=typeof e=="boolean"?1:.5,s=Zt(this.smallestDataInterval)?this.smallestDataInterval*i:0,o=Ml(t)??[NaN,NaN];return typeof e=="boolean"?o[e?0:1]-=(e?1:-1)*s:(o[0]-=s,o[1]+=s),Ho(o)}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return this.properties.direction==="vertical"}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){const t=this.getBarDirection();return this.axes[t]}getCategoryAxis(){const t=this.getCategoryDirection();return this.axes[t]}getBandwidth(t){return pe.is(t.scale)?t.scale.calcBandwidth(this.smallestDataInterval):t.scale.bandwidth}xCoordinateRange(t){const e=this.axes[this.getCategoryDirection()],i=e.scale,s=this.getBandwidth(e)??0,o=pe.is(i)?s*-.5:0,a=i.convert(t)+o;return[a,a+s]}yCoordinateRange(t){const i=this.axes[this.getBarDirection()].scale,s=t.map(o=>i.convert(o));if(s.length===1){const o=i.convert(0);return[Math.min(s[0],o),Math.max(s[0],o)]}return[Math.min(...s),Math.max(...s)]}updateGroupScale(t){const e=[],{groupScale:i}=this,s=this.getBandwidth(t),{index:o,visibleGroupCount:a}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);for(let r=0;r<a;r++)e.push(String(r));return i.domain=e,i.range=[0,s??0],t instanceof Pc?i.paddingInner=t.groupPaddingInner:t instanceof _c?(i.paddingInner=t.groupPaddingInner,i.round=i.padding!==0):i.padding=0,{barWidth:i.bandwidth>=1?i.bandwidth:i.rawBandwidth,groupIndex:o}}resolveKeyDirection(t){return this.getBarDirection()==="x"?t==="x"?"y":"x":t}initQuadTree(t){fL(t,this.datumNodesIter())}pickNodeClosestDatum(t){return mL(this,t)}}}}),Wv,Re,AQ=k({"packages/ag-charts-community/src/chart/series/cartesian/barSeriesProperties.ts"(){"use strict";dg(),Nt(),Ka(),kl(),El(),bL(),Wv=class extends Ki{constructor(){super(...arguments),this.placement="inside-center",this.padding=0}},v([A(fe(["inside-center","inside-start","inside-end","outside-start","outside-end"],"a placement"))],Wv.prototype,"placement",2),v([A(Rt)],Wv.prototype,"padding",2),Re=class extends Vv{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new ya,this.fillPatternDefaults=new Xe,this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new Qa,this.label=new Wv,this.tooltip=new zs,this.sparklineMode=!1,this.fastDataProcessing=!1}},v([A(it)],Re.prototype,"xKey",2),v([A(it,{optional:!0})],Re.prototype,"xName",2),v([A(it)],Re.prototype,"yKey",2),v([A(it,{optional:!0})],Re.prototype,"yName",2),v([A(it,{optional:!0})],Re.prototype,"yFilterKey",2),v([A(it,{optional:!0})],Re.prototype,"stackGroup",2),v([A(Rt,{optional:!0})],Re.prototype,"normalizedTo",2),v([A(fs(Cn,Ln,zt))],Re.prototype,"fill",2),v([A(ct)],Re.prototype,"fillGradientDefaults",2),v([A(ct)],Re.prototype,"fillPatternDefaults",2),v([A(le)],Re.prototype,"fillOpacity",2),v([A(zt)],Re.prototype,"stroke",2),v([A(lt)],Re.prototype,"strokeWidth",2),v([A(le)],Re.prototype,"strokeOpacity",2),v([A(Nn)],Re.prototype,"lineDash",2),v([A(lt)],Re.prototype,"lineDashOffset",2),v([A(lt)],Re.prototype,"cornerRadius",2),v([A(bt,{optional:!0})],Re.prototype,"crisp",2),v([A(Zs,{optional:!0})],Re.prototype,"itemStyler",2),v([A(ct,{optional:!0})],Re.prototype,"shadow",2),v([A(ct)],Re.prototype,"label",2),v([A(ct)],Re.prototype,"tooltip",2),v([A(bt)],Re.prototype,"sparklineMode",2),v([A(bt)],Re.prototype,"fastDataProcessing",2)}});function NF(t,e,i,s){if(e!=null){const[o,a]=e;if(o!==0||a!==1)return!1}if(pe.is(t)){const o=t.calcBandwidth(s)-t.calcBandwidth(i);if(o>0&&o<1)return!1}return!0}function gy(t,e,i){const{startingX:s,startingY:o}=TQ(t,e);return{isVertical:t,calculate:(n,r)=>{let l=t?n.x:s,c=t?o:n.y,h=t?n.width:0,u=t?0:n.height;const{opacity:d=1}=n;r&&(isNaN(l)||isNaN(c))&&({x:l,y:c}=r,h=t?r.width:0,u=t?0:r.height,t&&!Uv(r)?c+=r.height:!t&&Uv(r)&&(l+=r.width));let p;return n.clipBBox==null?p=void 0:Uv(n)?p=t?new pt(l,c-u,h,u):new pt(l-h,c,h,u):p=new pt(l,c,h,u),{x:l,y:c,width:h,height:u,clipBBox:p,opacity:d}},mode:i}}function IQ(t,e){return{isVertical:t,calculate:i=>({x:t?i.x:i.x+i.width/2,y:t?i.y+i.height/2:i.y,width:t?i.width:0,height:t?0:i.height,clipBBox:i.clipBBox,opacity:i.opacity??1}),mode:e}}function fy(t){const e=a=>a==null||isNaN(a.x)||isNaN(a.y);return{toFn:(a,n,r)=>r==="removed"&&a.datum==null&&t.mode==="fade"?{...my(a,n),opacity:0}:r==="removed"||e(n)?t.calculate(n,a.previousDatum):{x:n.x,y:n.y,width:n.width,height:n.height,clipBBox:n.clipBBox,opacity:n.opacity??1},fromFn:(a,n,r)=>{r==="updated"&&e(n)?r="removed":r==="updated"&&e(a.previousDatum)&&(r="added");let l;r==="added"&&a.previousDatum==null&&t.mode==="fade"?l={...my(a,n),opacity:0}:r==="unknown"||r==="added"?l=t.calculate(n,a.previousDatum):l={x:a.x,y:a.y,width:a.width,height:a.height,clipBBox:a.clipBBox,opacity:a.opacity??1};const c=Ha[r];return{...l,phase:c}},applyFn:(a,n,r)=>{a.setProperties(n),a.crisp=r==="end"&&(a.datum?.crisp??!1)}}}function TQ(t,e){const i=e[t?"y":"x"];let s=1/0,o=0;return i?(t?o=i.scale.convert(pe.is(i.scale)?0:Math.max(...i.range)):s=i.scale.convert(pe.is(i.scale)?0:Math.min(...i.range)),{startingX:s,startingY:o}):{startingX:s,startingY:o}}function my(t,{x:e,y:i,width:s,height:o,clipBBox:a,opacity:n=1}){return{x:e,y:i,width:s,height:o,clipBBox:a,opacity:n,crisp:t.datum?.crisp??!1}}function SL(t,e){if(e===void 0)return;const{x:i,y:s,width:o,height:a}=e;return Ke.toCanvas(t.contentGroup,new pt(i,s,o,a))}var Uv,vL=k({"packages/ag-charts-community/src/chart/series/cartesian/barUtil.ts"(){"use strict";P(),Ps(),So(),Xt(),ms(),Uv=t=>mb(t.yValue??0)}});function OF(t,e,i){if(e.enabled&&i){const{x:s,y:o,text:a,textAlign:n,textBaseline:r}=i,{color:l,fontStyle:c,fontWeight:h,fontSize:u,fontFamily:d}=e;t.setProperties({visible:!0,x:s,y:o,text:a,fill:l,fontStyle:c,fontWeight:h,fontSize:u,fontFamily:d,textAlign:n,textBaseline:r})}else t.visible=!1}function wF({isUpward:t,isVertical:e,placement:i,padding:s=0,rect:o}){let a=o.x+o.width/2,n=o.y+o.height/2,r="center",l="middle";if(i!=="inside-center"){const c=(t?1:-1)*(e?-1:1),{direction:h,textAlignment:u}=EF[i],d=(h+1)*.5;if(e){const p=t?o.y+o.height:o.y,g=o.height*c;n=p+g*d+s*u*c,l=u===c?"top":"bottom"}else{const p=t?o.x:o.x+o.width,g=o.width*c;a=p+g*d+s*u*c,r=u===c?"left":"right"}}return{x:a,y:n,textAlign:r,textBaseline:l}}var EF,_F=k({"packages/ag-charts-community/src/chart/series/cartesian/labelUtil.ts"(){"use strict";EF={"inside-start":{inside:!0,direction:-1,textAlignment:1},"inside-end":{inside:!0,direction:1,textAlignment:-1},"outside-start":{inside:!1,direction:-1,textAlignment:-1},"outside-end":{inside:!1,direction:1,textAlignment:1}}}}),RF,PF,BF,zF,FF,yg,GF=k({"packages/ag-charts-community/src/chart/series/cartesian/barSeries.ts"(){"use strict";P(),Ps(),So(),Xt(),jm(),nv(),Ua(),Ir(),wl(),vl(),hu(),bL(),AQ(),vL(),$o(),_F(),Iv(),RF=0,PF=1,BF=2,zF=3,FF=4,yg=class extends xL{constructor(t){super({moduleCtx:t,directionKeys:Fc,directionNames:Gc,categoryKey:"xValue",pickModes:[2,1,0],pathsPerSeries:[],hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:my,label:Ol}}),this.properties=new Re,this.connectsToYAxis=!0,this.dataAggregationFilters=void 0}get pickModeAxis(){return this.properties.sparklineMode?"main":void 0}crossFilteringEnabled(){return this.properties.yFilterKey!=null&&(this.seriesGrouping==null||this.seriesGrouping.stackIndex===0)}async processData(t){if(!this.properties.isValid()||!this.data)return;const{xKey:e,yKey:i,yFilterKey:s,normalizedTo:o,fastDataProcessing:a}=this.properties,{seriesGrouping:{groupIndex:n=this.id}={},data:r}=this,l=this.seriesGrouping?.groupCount??0,h=(this.seriesGrouping?.stackCount??0)>=1||o!=null,u=!a||l>1||h,d=!this.ctx.animationManager.isSkipped(),p=this.getCategoryAxis()?.scale,g=this.getValueAxis()?.scale,{isContinuousX:f,xScaleType:x,yScaleType:y}=this.getScaleInformation({xScale:p,yScale:g}),b=`bar-stack-${n}-yValues`,S=`${b}-trailing`,M=this.visible?{}:{forceValue:0},D=[Fn(e,x,{id:"xValue"}),Wt(i,y,{id:"yValue-raw",invalidValue:null,...M})];this.crossFilteringEnabled()&&D.push(Wt(s,y,{id:"yFilterValue",invalidValue:null,...M})),h&&D.push(...Rc(i,"normal","current",{id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:b,separateNegative:!0,...M},y),...Rc(i,"trailing","current",{id:"yValue-start",invalidValue:null,missingValue:0,groupId:S,separateNegative:!0,...M},y)),f&&D.push(kC,AC),Zt(o)&&D.push(iv([b,S],Math.abs(o))),d&&this.processedData&&D.push(Up(this.id,this.processedData)),(d||!u)&&D.push(Wp());const{dataModel:L,processedData:T}=await this.requestDataModel(t,r,{props:D,groupByKeys:u,groupByData:!u});this.dataAggregationFilters=this.aggregateData(L,T),this.smallestDataInterval=T.reduced?.smallestKeyInterval,this.largestDataInterval=T.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(i==null||e==null)return[];if(t===this.getCategoryDirection()){const n=i.resolveProcessedDataDefById(this,"xValue"),r=i.getDomain(this,"xValue","key",e);return n?.def.type==="key"&&n.def.valueType==="category"?r:this.padBandExtent(r)}const s=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw";let o=this.domainForClippedRange("y",[s],"xValue",!0);const a=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",e):void 0;if(a!=null&&(o=[Math.min(o[0],a[0]),Math.max(o[1],a[1])]),this.getValueAxis()instanceof Eu)return Ho(o);{const n=Number.isFinite(o[1]-o[0])?[Math.min(0,o[0]),Math.max(0,o[1])]:[];return Ho(n)}}getSeriesRange(t,e){const i=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw",[s,o]=this.domainForVisibleRange("y",[i],"xValue",e,!0);return[Math.min(s,0),Math.max(o,0)]}getVisibleItems(t,e,i){const s=this.dataModel?.hasColumnById(this,"yValue-end")?"yValue-end":"yValue-raw";return this.countVisibleItems("xValue",[s],t,e,i)}aggregateData(t,e){}createNodeData(){const{dataModel:t,processedData:e,groupScale:i,dataAggregationFilters:s}=this,o=this.getCategoryAxis(),a=this.getValueAxis();if(!t||!e||!o||!a||!this.properties.isValid())return;const n=e.dataSources?.get(this.id);if(n==null)return;const r=o.scale,l=a.scale,{xKey:c,yKey:h,xName:u,yName:d,legendItemName:p,label:g}=this.properties,f=a.isReversed(),{barWidth:x,groupIndex:y}=this.updateGroupScale(o),b=i.convert(String(y)),S=pe.is(r)?x*-.5:0,M=t.resolveKeysById(this,"xValue",e),D=t.resolveColumnById(this,"yValue-raw",e),L=this.crossFilteringEnabled()?t.resolveColumnById(this,"yFilterValue",e):void 0,T=!this.ctx.animationManager.isSkipped(),I=V=>r.convert(M[V])+b+S,N=this.properties.crisp??NF(o?.scale,o?.visibleRange,this.smallestDataInterval,this.largestDataInterval),O=l.convert(0),R=({datum:V,datumIndex:G,valueIndex:K,xValue:$,yValue:Z,cumulativeValue:Q,phantom:q,currY:J,prevY:X,x:st,width:nt,isPositive:dt,yRange:ut,labelText:St,opacity:Lt,crossScale:mt=1})=>{const Jt=dt!==f,ie=l.convert(J),Kt=l.convert(X),$t=l.convert(ut),Dt=this.getBarDirection()==="x",Gt=nt*.5*(1-mt),te={x:Dt?Math.min(ie,Kt):st+Gt,y:Dt?st+Gt:Math.min(ie,Kt),width:Dt?Math.abs(Kt-ie):nt*mt,height:Dt?nt*mt:Math.abs(Kt-ie)},Xs=new pt(te.x,te.y,te.width,te.height),fo={x:Dt?Math.min(O,$t):st+Gt,y:Dt?st+Gt:Math.min(O,$t),width:Dt?Math.abs(O-$t):nt*mt,height:Dt?nt*mt:Math.abs(O-$t)},Mn=this.shouldFlipXY()?te.height:te.width;return{series:this,itemId:q?Ss(h,q):h,datum:V,datumIndex:G,valueIndex:K,cumulativeValue:Q,phantom:q,xValue:$,yValue:Z,yKey:h,xKey:c,capDefaults:{lengthRatioMultiplier:Mn,lengthMax:Mn},x:fo.x,y:fo.y,width:fo.width,height:fo.height,midPoint:{x:te.x+te.width/2,y:te.y+te.height/2},opacity:Lt,topLeftCornerRadius:Dt!==Jt,topRightCornerRadius:Jt,bottomRightCornerRadius:Dt===Jt,bottomLeftCornerRadius:!Jt,clipBBox:Xs,crisp:N,label:St!=null?{text:St,...wF({isUpward:Jt,isVertical:!Dt,placement:g.placement,padding:g.padding,rect:te})}:void 0,missing:Z==null,focusable:!q}},_=[],B=[],W=[],F=(V,G,K,$,Z,Q,q,J)=>{const X=M[V];if(X==null)return;const st=D[V],nt=L!=null?Number(L[V]):void 0,dt=st>=0&&!Object.is(st,-0);if(!Number.isFinite(Q)||nt!=null&&!Number.isFinite(nt))return;const ut=st!=null?this.getLabelText(this.properties.label,{datum:n[V],value:nt??st,xKey:c,yKey:h,xName:u,yName:d,legendItemName:p}):void 0,St=nt!=null&&nt>st,Lt=R({datum:n[V],datumIndex:V,valueIndex:G,xValue:X,yValue:nt??st,cumulativeValue:nt??Q,phantom:!1,currY:nt!=null?Z+nt:Q,prevY:Z,x:K,width:$,isPositive:dt,yRange:Math.max(Z+(nt??-1/0),q),labelText:ut,opacity:J,crossScale:St?.6:void 0});if(B.push(Lt),W.push(Lt),nt!=null){const mt=R({datum:n[V],datumIndex:V,valueIndex:G,xValue:X,yValue:nt,cumulativeValue:nt,phantom:!0,currY:Q,prevY:Z,x:K,width:$,isPositive:dt,yRange:q,labelText:void 0,opacity:J,crossScale:void 0});_.push(mt)}},[z,U]=r.range,H=U-z,j=s?.find(V=>V.maxRange>H);if(e.type==="grouped"){const V=x,G=t.hasColumnById(this,"yValue-start"),K=G?t.resolveColumnById(this,"yValue-start",e):void 0,$=G?t.resolveColumnById(this,"yValue-end",e):void 0,Z=G?t.resolveProcessedDataIndexById(this,"yValue-range"):-1;for(const{datumIndex:Q,valueIndex:q,group:{aggregation:J}}of t.forEachGroupDatum(this,e)){const X=I(Q),st=D[Q],nt=st>=0&&!Object.is(st,-0),dt=G?Number(K?.[Q]):0,ut=G?Number($?.[Q]):st;let St=ut;G&&(St=J[Z][nt?1:0]),F(Q,q,X,V,dt,ut,St,1)}}else if(j==null){const V=x;let[G,K]=this.visibleRange("xValue",o.range);e.input.count<1e3&&(G=0,K=e.input.count);for(let $=G;$<K;$+=1){const Z=I($),Q=Number(D[$]);F($,0,Z,V,0,Q,Q,1)}}else{const{indexData:V,indices:G}=j,[K,$]=this.visibleRange("xValue",o.range,G);for(let Z=K;Z<$;Z+=1){const Q=Z*FF,q=V[Q+RF],J=V[Q+PF],X=V[Q+BF],st=V[Q+zF];if(q===-1)continue;const nt=I((q+J)/2|0),dt=Math.abs(I(J)-I(q))+x,ut=M[st]!=null?Number(D[st]):NaN,St=M[X]!=null?Number(D[X]):NaN;if(ut>0){const Lt=St>=0?St/ut:1;F(st,0,nt,dt,0,ut,ut,Lt)}if(St<0){const Lt=ut<=0?ut/St:1;F(X,1,nt,dt,0,St,St,Lt)}}}return{itemId:h,nodeData:_.length>0?[..._,...B]:B,labelData:W,scales:this.calculateScaling(),visible:this.visible||T,groupScale:this.getScaling(this.groupScale)}}nodeFactory(){return new Bs}getHighlightData(t,e){const i=t.find(s=>s.datum===e.datum&&!s.phantom);return i!=null?[i]:void 0}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>this.getDatumId(e))}getItemBaseStyle(t){const{properties:e}=this,{cornerRadius:i,fillGradientDefaults:s,fillPatternDefaults:o}=e,a=t?e.highlightStyle.item:void 0;return Dr({fill:a?.fill??e.fill,fillOpacity:a?.fillOpacity??e.fillOpacity,stroke:a?.stroke??e.stroke,strokeWidth:a?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:a?.strokeOpacity??e.strokeOpacity,lineDash:a?.lineDash??e.lineDash??[],lineDashOffset:a?.lineDashOffset??e.lineDashOffset,cornerRadius:i},s,o)}getItemStyleOverrides(t,e,i,s,o,a){const{id:n,properties:r}=this,{xKey:l,yKey:c,itemStyler:h,fillGradientDefaults:u,fillPatternDefaults:d}=r;if(h==null)return;const{xDomain:p,yDomain:g}=this.cachedDatumCallback("domain",()=>({xDomain:this.getSeriesDomain("x"),yDomain:this.getSeriesDomain("y")})),f=this.cachedDatumCallback(Ss(t,a?"highlight":"node"),()=>this.callWithContext(h,{seriesId:n,...Ic(e,l,c,p,g),datum:e,xValue:i,yValue:s,highlighted:a,...o}));return Dr(f,u,d)}updateDatumNodes(t){if(!this.properties.isValid())return;const{shadow:e}=this.properties,i=this.getCategoryDirection()==="x",s=this.getItemBaseStyle(t.isHighlight),o=this.getShapeFillBBox();t.datumSelection.each((a,n)=>{const r=this.getItemStyleOverrides(String(n.datumIndex),n.datum,n.xValue,n.yValue,s,t.isHighlight);a.opacity=n.opacity??0,Tu(a,s,r,o);const l=r?.cornerRadius??s.cornerRadius;a.topLeftCornerRadius=n.topLeftCornerRadius?l:0,a.topRightCornerRadius=n.topRightCornerRadius?l:0,a.bottomRightCornerRadius=n.bottomRightCornerRadius?l:0,a.bottomLeftCornerRadius=n.bottomLeftCornerRadius?l:0,a.visible=i?(n.clipBBox?.width??n.width)>0:(n.clipBBox?.height??n.height)>0,a.crisp=n.crisp,a.fillShadow=e})}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e,i=>{i.pointerEvents=1})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{OF(e,this.properties.label,i.label)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{xKey:a,xName:n,yKey:r,yName:l,legendItemName:c,stackGroup:h,tooltip:u}=o,d=this.getCategoryAxis(),p=this.getValueAxis();if(!i||!s||!d||!p)return;const g=s.dataSources.get(this.id)?.[t],f=i.resolveKeysById(this,"xValue",s)[t],x=i.resolveColumnById(this,"yValue-raw",s)[t];if(f==null)return;const y=this.getItemBaseStyle(!1);return Object.assign(y,this.getItemStyleOverrides(String(t),g,f,x,y,!1)),u.formatTooltip(this.properties,{heading:d.formatDatum(f),symbol:this.legendItemSymbol(),data:[{label:l,fallbackLabel:r,value:p.formatDatum(x)}]},{seriesId:e,datum:g,title:l,xKey:a,xName:n,yKey:r,yName:l,legendItemName:c,stackGroup:h,...y,...this.getModuleTooltipParams()})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,fillOpacity:s,strokeOpacity:o,lineDash:a,lineDashOffset:n,fillGradientDefaults:r,fillPatternDefaults:l}=this.properties;return{marker:Dr({fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:s,strokeOpacity:o,strokeWidth:i,lineDash:a,lineDashOffset:n},r,l)}}getLegendData(t){const{showInLegend:e}=this.properties;if(t!=="category"||!this.properties.isValid())return[];const{id:i,ctx:{legendManager:s},visible:o}=this,{yKey:a,yName:n,legendItemName:r}=this.properties;return[{legendType:"category",id:i,itemId:a,seriesId:i,enabled:o&&s.getItemEnabled({seriesId:i,itemId:a}),label:{text:r??n??a},symbol:this.legendItemSymbol(),legendItemName:r,hideInLegend:!e}]}animateEmptyUpdateReady({datumSelection:t,labelSelection:e,annotationSelections:i}){const s=fy(gy(this.isVertical(),this.axes,"normal"));ci(this.id,"nodes",this.ctx.animationManager,[t],s),ce(this,"labels",this.ctx.animationManager,e),ce(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(t){const{datumSelection:e,labelSelection:i,annotationSelections:s,previousContextData:o}=t;this.ctx.animationManager.stopByAnimationGroupId(this.id);let a=this.processedData?.reduced?.diff?.[this.id];a==null&&this.processedData?.reduced?.diff!=null&&(a={changed:!0,added:new Set(Array.from(e,({datum:h})=>this.getDatumId(h))),updated:new Set,removed:new Set,moved:new Set});const n=o==null?"fade":"normal",r=fy(gy(this.isVertical(),this.axes,n));ci(this.id,"nodes",this.ctx.animationManager,[e],r,(h,u)=>this.getDatumId(u),a);const l=o!=null&&(!pg(t.contextData.scales.x,o.scales.x)||!pg(t.contextData.scales.y,o.scales.y)||!pg(t.contextData.groupScale,t.previousContextData.groupScale));((a?.changed??!1)||l)&&(ce(this,"labels",this.ctx.animationManager,i),ce(this,"annotations",this.ctx.animationManager,...s))}getDatumId(t){return Ss(t.xValue,t.valueIndex,t.phantom)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){const e=this.contextNodeData?.nodeData[t].clipBBox;return SL(this,e)}},yg.className="BarSeries",yg.type="bar"}}),xg,CQ=k({"packages/ag-charts-community/src/chart/series/cartesian/barSeriesOptionsDef.ts"(){"use strict";P(),Pl(),xg={type:Mt(gs("bar")),xKey:Mt(rt),yKey:Mt(rt),xName:rt,yName:rt,direction:_t("horizontal","vertical"),grouped:at,stacked:at,stackGroup:rt,normalizedTo:vt,legendItemName:rt,showInMiniChart:at,cornerRadius:ot,itemStyler:ne,crisp:at,label:{...Rl,placement:_t("inside-center","inside-start","inside-end","outside-start","outside-end"),padding:ot},errorBar:py,shadow:mg,tooltip:Er,...tn,...Po,...Es,...Ga},xg.pickOutsideVisibleMinorAxis=at,xg.fastDataProcessing=at,xg.focusPriority=vt,xg.sparklineMode=at}}),ML,DL,kL=k({"packages/ag-charts-community/src/chart/series/cartesian/barSeriesModule.ts"(){"use strict";hi(),vi(),GF(),CQ(),ML={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",moduleFactory:t=>new yg(t),stackable:!0,groupable:!0,tooltipDefaults:{range:"exact"},defaultAxes:jC,themeTemplate:{series:{direction:"vertical",fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Nl,fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$if:[{$or:[{$eq:[{$path:"./placement"},"outside-start"]},{$eq:[{$path:"./placement"},"outside-end"]}]},{$ref:"textColor"},{$ref:"backgroundColor"}]},placement:"inside-center"},shadow:{enabled:!1,color:Tl,xOffset:3,yOffset:3,blur:5},errorBar:{cap:{lengthRatio:.3}}}}},DL={type:"series",name:"bar",chartType:"cartesian",options:xg,create:t=>new yg(t)}}}),Hv,AL,Se,LQ=k({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesProperties.ts"(){"use strict";kb(),bo(),Nt(),Ka(),$p(),El(),$o(),Hv=class extends ls{constructor(){super(...arguments),this.maxSize=30}},v([A(lt),gt()],Hv.prototype,"maxSize",2),v([A(wA,{optional:!0}),gt()],Hv.prototype,"domain",2),AL=class extends Ki{constructor(){super(...arguments),this.placement="top"}},v([A(Fb)],AL.prototype,"placement",2),Se=class extends Or{constructor(){super(...arguments),this.label=new AL,this.tooltip=new zs,this.marker=new Hv}},v([A(it)],Se.prototype,"xKey",2),v([A(it)],Se.prototype,"yKey",2),v([A(it)],Se.prototype,"sizeKey",2),v([A(it,{optional:!0})],Se.prototype,"labelKey",2),v([A(it,{optional:!0})],Se.prototype,"xFilterKey",2),v([A(it,{optional:!0})],Se.prototype,"yFilterKey",2),v([A(it,{optional:!0})],Se.prototype,"sizeFilterKey",2),v([A(it,{optional:!0})],Se.prototype,"xName",2),v([A(it,{optional:!0})],Se.prototype,"yName",2),v([A(it,{optional:!0})],Se.prototype,"sizeName",2),v([A(it,{optional:!0})],Se.prototype,"labelName",2),v([A(it,{optional:!0})],Se.prototype,"title",2),v([be("marker.shape")],Se.prototype,"shape",2),v([be("marker.size")],Se.prototype,"size",2),v([be("marker.maxSize")],Se.prototype,"maxSize",2),v([be("marker.domain",{optional:!0})],Se.prototype,"domain",2),v([be("marker.fillGradientDefaults")],Se.prototype,"fillGradientDefaults",2),v([be("marker.fillPatternDefaults")],Se.prototype,"fillPatternDefaults",2),v([be("marker.fill",{optional:!0})],Se.prototype,"fill",2),v([be("marker.fillOpacity")],Se.prototype,"fillOpacity",2),v([be("marker.stroke",{optional:!0})],Se.prototype,"stroke",2),v([be("marker.strokeWidth")],Se.prototype,"strokeWidth",2),v([be("marker.strokeOpacity")],Se.prototype,"strokeOpacity",2),v([be("marker.lineDash")],Se.prototype,"lineDash",2),v([be("marker.lineDashOffset")],Se.prototype,"lineDashOffset",2),v([be("marker.itemStyler",{optional:!0})],Se.prototype,"itemStyler",2),v([A(ct)],Se.prototype,"label",2),v([A(ct)],Se.prototype,"tooltip",2)}}),jF,yy,NQ=k({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeries.ts"(){"use strict";wu(),Ve(),Ar(),qt(),Go(),Ua(),Ir(),zn(),wl(),LQ(),$o(),ny(),jF=class extends Av{constructor(t,e,i,s){super(t,e,i,s),this.sizeKey=s.properties.sizeKey}},yy=class extends _l{constructor(t){super({moduleCtx:t,directionKeys:Fc,directionNames:Gc,categoryKey:void 0,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:Ol,marker:sy},usesPlacedLabels:!0,clipFocusBox:!1}),this.NodeEvent=jF,this.properties=new Se,this.sizeScale=new qa}get pickModeAxis(){return"main-category"}async processData(t){if(!this.properties.isValid()||this.data==null||!this.visible)return;const e=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:s,yScaleType:o}=this.getScaleInformation({xScale:e,yScale:i}),a=this.sizeScale.type,{xKey:n,yKey:r,sizeKey:l,xFilterKey:c,yFilterKey:h,sizeFilterKey:u,labelKey:d,marker:p}=this.properties,{dataModel:g,processedData:f}=await this.requestDataModel(t,this.data,{props:[Wt(n,s,{id:"xValue"}),Wt(r,o,{id:"yValue"}),...c!=null?[Wt(c,s,{id:"xFilterValue"})]:[],...h!=null?[Wt(h,o,{id:"yFilterValue"})]:[],...u!=null?[Wt(u,a,{id:"sizeFilterValue"})]:[],Wt(l,a,{id:"sizeValue"}),...d?[Wt(d,"band",{id:"labelValue"})]:[]]}),x=g.resolveProcessedDataIndexById(this,"sizeValue");this.sizeScale.domain=p.domain??f.domain.values[x]??[],this.animationState.transition("updateData")}xCoordinateRange(t,e,i){const{properties:s,sizeScale:o}=this,{size:a,sizeKey:n}=s,r=this.axes.x.scale.convert(t),l=n!=null?this.dataModel.resolveColumnById(this,"sizeValue",this.processedData):void 0,h=.5*(l!=null?o.convert(l[i]):a)*e;return[r-h,r+h]}yCoordinateRange(t,e,i){const{properties:s,sizeScale:o}=this,{size:a,sizeKey:n}=s,r=this.axes.y.scale.convert(t[0]),l=n!=null?this.dataModel.resolveColumnById(this,"sizeValue",this.processedData):void 0,h=.5*(l!=null?o.convert(l[i]):a)*e;return[r-h,r+h]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];const s={x:"xValue",y:"yValue"},o=s[t],a=e.resolveProcessedDataDefById(this,o),n=e.getDomain(this,o,"value",i);if(a?.def.type==="value"&&a?.def.valueType==="category")return n;const l=s[t==="x"?"y":"x"],c=this.domainForClippedRange(t,[o],l,!1);return Ho(Ml(c))}getSeriesRange(t,e){return this.domainForVisibleRange("y",["yValue"],"xValue",e,!1)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["yValue"],t,e,i)}createNodeData(){const{axes:t,dataModel:e,processedData:i,sizeScale:s,visible:o}=this,{xKey:a,yKey:n,sizeKey:r,xFilterKey:l,yFilterKey:c,sizeFilterKey:h,labelKey:u,xName:d,yName:p,sizeName:g,labelName:f,label:x,marker:y}=this.properties,{placement:b}=x,S=Xi.anchor(y.shape),M=t.x,D=t.y;if(!(e&&i&&o&&M&&D))return;const L=e.resolveColumnById(this,"xValue",i),T=e.resolveColumnById(this,"yValue",i),I=r!=null?e.resolveColumnById(this,"sizeValue",i):void 0,N=u!=null?e.resolveColumnById(this,"labelValue",i):void 0,O=l!=null?e.resolveColumnById(this,"xFilterValue",i):void 0,R=c!=null?e.resolveColumnById(this,"yFilterValue",i):void 0,_=h!=null?e.resolveColumnById(this,"sizeFilterValue",i):void 0,B=M.scale,W=D.scale,F=(B.bandwidth??0)/2,z=(W.bandwidth??0)/2,U=[];s.range=[y.size,y.maxSize];const H=x.getFont(),j=yr.getMeasurer({font:H});return i.dataSources.get(this.id)?.forEach((V,G)=>{const K=L[G],$=T[G],Z=I?.[G],Q=B.convert(K)+F,q=W.convert($)+z;let J;O!=null&&R!=null&&(J=O[G]===K&&R[G]===$,_!=null&&J&&(J=_[G]===Z));const X=this.getLabelText(x,{value:N!=null?N[G]:$,datum:V,xKey:a,yKey:n,sizeKey:r,labelKey:u,xName:d,yName:p,sizeName:g,labelName:f}),st=j.measureText(String(X)),nt=Z!=null?s.convert(Z):y.size;U.push({series:this,itemId:n,yKey:n,xKey:a,datum:V,datumIndex:G,xValue:K,yValue:$,sizeValue:Z,point:{x:Q,y:q,size:nt},midPoint:{x:Q,y:q},label:{text:X,...st},anchor:S,placement:b,selected:J})}),{itemId:n,nodeData:U,labelData:U,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());const s=this.properties.marker.enabled?e:[];return i.update(s,void 0,o=>Ss([o.xValue,o.yValue,o.sizeValue,o.label.text]))}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:o,sizeKey:a,labelKey:n,marker:r}=this.properties,l=Vt(i&&this.properties.highlightStyle.item,r.getStyle());this.sizeScale.range=[r.size,r.maxSize];const c=this.getShapeFillBBox();e.each((h,u)=>{this.updateMarkerStyle(r,h,u.datum,u.point,{xKey:s,yKey:o,sizeKey:a,labelKey:n},i,l,c,{selected:u.selected})}),i||this.properties.marker.markClean()}updatePlacedLabelData(t){this.labelSelection.update(t.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})),e=>{e.pointerEvents=1}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{label:e}=this.properties;t.labelSelection.each((i,s)=>{i.text=s.label.text,i.fill=e.color,i.x=s.point?.x??0,i.y=s.point?.y??0,i.fontStyle=e.fontStyle,i.fontWeight=e.fontWeight,i.fontSize=e.fontSize,i.fontFamily=e.fontFamily,i.textAlign="left",i.textBaseline="top"})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a}=this,{xKey:n,xName:r,yKey:l,yName:c,sizeKey:h,sizeName:u,labelKey:d,labelName:p,title:g,tooltip:f,marker:x}=a,y=o.x,b=o.y;if(!i||!s||!y||!b)return;const S=s.dataSources.get(this.id)?.[t],M=i.resolveColumnById(this,"xValue",s)[t],D=i.resolveColumnById(this,"yValue",s)[t],L=this.contextNodeData?.nodeData[t];if(M==null||L==null)return;const T=[{label:r,fallbackLabel:n,value:y.formatDatum(M)},{label:c,fallbackLabel:l,value:b.formatDatum(D)}];if(h!=null){const O=i.resolveColumnById(this,"sizeValue",s)[t];T.push({label:u,fallbackLabel:h,value:String(O)})}const I=x.getStyle(),N=this.getMarkerStyle(x,S,{xKey:n,yKey:l,sizeKey:h,labelKey:d,highlighted:!0},!1,void 0,I);return f.formatTooltip(this.properties,{title:g,symbol:this.legendItemSymbol(),data:T},{seriesId:e,datum:S,title:l,xKey:n,xName:r,yKey:l,yName:c,sizeKey:h,sizeName:u,labelKey:d,labelName:p,...N,...this.getModuleTooltipParams()})}legendItemSymbol(){return{marker:this.getMarkerStyle(this.properties.marker)}}getLegendData(){if(!this.properties.isValid())return[];const{id:t,ctx:{legendManager:e},visible:i}=this,{yKey:s,yName:o,title:a}=this.properties;return[{legendType:"category",id:t,itemId:s,seriesId:t,enabled:i&&e.getItemEnabled({seriesId:t,itemId:s}),label:{text:a??o??s},symbol:this.legendItemSymbol()}]}animateEmptyUpdateReady({markerSelection:t,labelSelection:e}){sL(this,this.ctx.animationManager,t),ce(this,"labels",this.ctx.animationManager,e)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new It}getFormattedMarkerStyle(t){const{xKey:e,yKey:i,sizeKey:s,labelKey:o,marker:a}=this.properties;return this.getMarkerStyle(a,t,{xKey:e,yKey:i,sizeKey:s,labelKey:o},!1,t.point.size)}computeFocusBounds(t){return ay(this,t)}},yy.className="BubbleSeries",yy.type="bubble"}}),VF,OQ=k({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesOptionsDef.ts"(){"use strict";P(),qt(),Pl(),VF={type:Mt(gs("bubble")),xKey:Mt(rt),yKey:Mt(rt),sizeKey:Mt(rt),labelKey:rt,xName:rt,yName:rt,sizeName:rt,labelName:rt,title:rt,domain:Oe(vt),maxSize:ot,showInMiniChart:at,label:{placement:_t("top","right","bottom","left"),...Rl},tooltip:Er,...tn,...mc(fg,["enabled"])}}}),WF,IL,TL=k({"packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesModule.ts"(){"use strict";vi(),NQ(),OQ(),WF={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",moduleFactory:t=>new yy(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,maxSize:30,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Nl,fillOpacity:.8,tooltip:{position:{_seriesOverrideType:"node"}},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}}}},IL={type:"series",name:"bubble",chartType:"cartesian",options:VF,create:t=>new yy(t)}}}),di,wQ=k({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeriesProperties.ts"(){"use strict";dg(),Nt(),Ka(),kl(),El(),$o(),di=class extends Or{constructor(){super(...arguments),this.fillGradientDefaults=new ya,this.fillPatternDefaults=new Xe,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new Qa,this.label=new Ki,this.tooltip=new zs}},v([A(it)],di.prototype,"xKey",2),v([A(it,{optional:!0})],di.prototype,"yKey",2),v([A(it,{optional:!0})],di.prototype,"xName",2),v([A(it,{optional:!0})],di.prototype,"yName",2),v([A(fs(Cn,Ln,zt))],di.prototype,"fill",2),v([A(ct)],di.prototype,"fillGradientDefaults",2),v([A(ct)],di.prototype,"fillPatternDefaults",2),v([A(le)],di.prototype,"fillOpacity",2),v([A(zt,{optional:!0})],di.prototype,"stroke",2),v([A(lt)],di.prototype,"strokeWidth",2),v([A(le)],di.prototype,"strokeOpacity",2),v([A(Nn)],di.prototype,"lineDash",2),v([A(lt)],di.prototype,"lineDashOffset",2),v([A(lt)],di.prototype,"cornerRadius",2),v([A(bt)],di.prototype,"areaPlot",2),v([A(bc,{optional:!0})],di.prototype,"bins",2),v([A(fe(["count","sum","mean"],"a histogram aggregation"))],di.prototype,"aggregation",2),v([A(lt,{optional:!0})],di.prototype,"binCount",2),v([A(ct)],di.prototype,"shadow",2),v([A(ct)],di.prototype,"label",2),v([A(ct)],di.prototype,"tooltip",2)}}),CL,xy,EQ=k({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeries.ts"(){"use strict";P(),Ps(),jm(),da(),mu(),vC(),Ua(),Ir(),wl(),vl(),vL(),$o(),wQ(),yL(),CL=10,xy=class extends _l{constructor(t){super({moduleCtx:t,directionKeys:Fc,directionNames:Gc,categoryKey:void 0,pickModes:[1,0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:my,label:Ol}}),this.properties=new di,this.calculatedBins=[]}deriveBins(t){const e=sT(t[0],t[1],CL),i=xm(t[0],t[1],CL),[s]=e,o=a=>[a,a+i];return[[s-i,s],...e.map(o)]}calculateNiceBins(t,e){const i=Math.floor(t[0]),s=t[1],o=e||1,{start:a,binSize:n}=this.calculateNiceStart(i,s,o);return this.getBins(a,s,n,o)}getBins(t,e,i,s){const o=[],a=this.calculatePrecision(i);for(let n=0;n<s;n++){const r=Math.round((t+n*i)*a)/a;let l=Math.round((t+(n+1)*i)*a)/a;n===s-1&&(l=Math.max(l,e)),o[n]=[r,l]}return o}calculatePrecision(t){let e=10;if(isFinite(t)&&t>0)for(;t<1;)e*=10,t*=10;return e}calculateNiceStart(t,e,i){const s=Math.abs(e-t)/i,o=Math.floor(Math.log10(s)),a=Math.pow(10,o);return{start:Math.floor(t/a)*a,binSize:s}}async processData(t){this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));const{xKey:e,yKey:i,areaPlot:s,aggregation:o}=this.properties,a=this.axes.x?.scale,n=this.axes.y?.scale,{xScaleType:r,yScaleType:l}=this.getScaleInformation({yScale:n,xScale:a}),c=[Fn(e,r),IC];if(i){let u=bC("groupAgg");o==="count"||(o==="sum"?u=uz("groupAgg"):o==="mean"&&(u=dz("groupAgg"))),s&&(u=SC("groupAgg",u)),c.push(Wt(i,l,{invalidValue:void 0}),u)}else{c.push(xz("count"));let u=bC("groupAgg");s&&(u=SC("groupAgg",u)),c.push(u)}const h=u=>{const d=Ho(u.domain.keys[0]);if(d.length===0)return u.domain.groups=[],()=>[];const p=na(this.properties.binCount)?this.calculateNiceBins(d,this.properties.binCount):this.properties.bins??this.deriveBins(d),g=p.length;return this.calculatedBins=[...p],f=>{let x=f[0];if(Fh(x)&&(x=x.getTime()),!na(x))return[];for(let y=0;y<g;y++){const b=p[y];if(x>=b[0]&&x<b[1]||y===g-1&&x<=b[1])return b}return[]}};!this.ctx.animationManager.isSkipped()&&this.processedData&&c.push(Up(this.id,this.processedData,!1)),await this.requestDataModel(t,this.data,{props:c,groupByFn:h}),this.animationState.transition("updateData")}xCoordinateRange(){return[NaN,NaN]}yCoordinateRange(){return[NaN,NaN]}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i||!this.calculatedBins.length)return[];const s=i.getDomain(this,"groupAgg","aggregate",e),o=this.calculatedBins?.[0][0],a=this.calculatedBins?.[(this.calculatedBins?.length??0)-1][1];return Ho(t==="x"?[o,a]:s)}getSeriesRange(t,[e,i]){const{dataModel:s,processedData:o}=this;if(!s||o?.type!=="grouped")return[NaN,NaN];const a=this.axes.x.scale,n=0;let r=-1/0;return o.groups.forEach(({keys:l,aggregation:c})=>{const[[h,u]=[0,0]]=c,[d,p]=l,[g,f]=Li([a.convert(d),a.convert(p)]);if(f>=e&&g<=i){const x=h+u;r=Math.max(r,x)}}),n>r?[NaN,NaN]:[n,r]}createNodeData(){const{id:t,axes:e,processedData:i,dataModel:s}=this,o=e.x,a=e.y;if(!o||!a||!s)return;const{scale:n}=o,{scale:r}=a,{xKey:l,yKey:c,xName:h,yName:u}=this.properties,d=this.properties.label.formatter,p=[],g={itemId:this.properties.yKey??this.id,nodeData:p,labelData:p,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return!this.visible||i==null||i.type!=="grouped"||(i.groups.forEach((f,x)=>{const{keys:y,datumIndices:b,aggregation:S}=f,[[M,D]=[0,0]]=S,L=b.length,T=y,[I,N]=T,O=[...s.forEachDatum(this,i,f)],R=n.convert(I),_=n.convert(N),B=M+D,W=r.convert(0),F=r.convert(B),z=Math.abs(_-R),U=Math.abs(F-W),H=Math.min(R,_),j=Math.min(W,F);let V;B!==0&&(V={x:H+z/2,y:j+U/2,text:this.cachedDatumCallback(Ss(x,"label"),()=>d?.({value:B,datum:O,seriesId:t,xKey:l,yKey:c,xName:h,yName:u}))??a.formatDatum(B)});const G={x:H+z/2,y:j+U/2},K=a.isReversed();p.push({series:this,datumIndex:x,datum:O,aggregatedValue:B,frequency:L,domain:T,yKey:c,xKey:l,x:H,y:j,xValue:R,yValue:F,width:z,height:U,midPoint:G,topLeftCornerRadius:!K,topRightCornerRadius:!K,bottomRightCornerRadius:K,bottomLeftCornerRadius:K,label:V,crisp:!0})}),p.sort((f,x)=>f.x-x.x)),g}nodeFactory(){return new Bs}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t;return i.update(e,void 0,s=>s.domain.join("_"))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return Dr({fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset,cornerRadius:e.cornerRadius},e.fillGradientDefaults,e.fillPatternDefaults)}updateDatumNodes(t){const{isHighlight:e}=t,{shadow:i}=this.properties,s=this.getItemBaseStyle(e),o=this.getShapeFillBBox();t.datumSelection.each((a,n)=>{const{cornerRadius:r}=s,{topLeftCornerRadius:l,topRightCornerRadius:c,bottomRightCornerRadius:h,bottomLeftCornerRadius:u}=n;Tu(a,s,void 0,o),a.topLeftCornerRadius=l?r:0,a.topRightCornerRadius=c?r:0,a.bottomRightCornerRadius=h?r:0,a.bottomLeftCornerRadius=u?r:0,a.crisp=n.crisp,a.fillShadow=i,a.visible=n.height>0})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e,s=>{s.pointerEvents=1,s.textAlign="center",s.textBaseline="middle"})}updateLabelNodes(t){const{fontStyle:e,fontWeight:i,fontFamily:s,fontSize:o,color:a}=this.properties.label,n=this.isLabelEnabled();t.labelSelection.each((r,l)=>{n&&l?.label?(r.text=l.label.text,r.x=l.label.x,r.y=l.label.y,r.fontStyle=e,r.fontWeight=i,r.fontFamily=s,r.fontSize=o,r.fill=a,r.visible=!0):r.visible=!1})}initQuadTree(t){const{value:e}=this.contentGroup.children().next();e&&fL(t,e.children())}pickNodeClosestDatum(t){return mL(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a,ctx:{localeManager:n}}=this,{xKey:r,xName:l,yKey:c,yName:h,tooltip:u}=a,d=o.x,p=o.y;if(!i||s?.type!=="grouped"||!d||!p)return;const g=s.groups[t],{aggregation:f,datumIndices:x,keys:y}=g,[[b,S]=[0,0]]=f,M=x.length,D=y,[L,T]=D,I=b+S,N={data:[...i.forEachDatum(this,s,g)],aggregatedValue:I,frequency:M,domain:D},O=[{label:l,fallbackLabel:r,value:`${d.formatDatum(L)} - ${d.formatDatum(T)}`},{label:n.t("seriesHistogramTooltipFrequency"),value:p.formatDatum(M)}];if(c!=null){let R;switch(a.aggregation){case"sum":R=n.t("seriesHistogramTooltipSum",{yName:h??c});break;case"mean":R=n.t("seriesHistogramTooltipMean",{yName:h??c});break;case"count":R=n.t("seriesHistogramTooltipCount",{yName:h??c});break}O.push({label:R,value:p.formatDatum(I)})}return u.formatTooltip(this.properties,{symbol:this.legendItemSymbol(),data:O},{seriesId:e,datum:N,title:h,xKey:r,xName:l,yKey:c,yName:h,xRange:[L,T],frequency:M,...this.getItemBaseStyle(!1)})}legendItemSymbol(){const{fill:t,fillOpacity:e,stroke:i,strokeWidth:s,strokeOpacity:o,lineDash:a,lineDashOffset:n,fillGradientDefaults:r,fillPatternDefaults:l}=this.properties;return{marker:Dr({fill:t??"rgba(0, 0, 0, 0)",stroke:i??"rgba(0, 0, 0, 0)",fillOpacity:e,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n},r,l)}}getLegendData(t){if(t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{xKey:o,yName:a,showInLegend:n}=this.properties;return[{legendType:"category",id:e,itemId:o,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:o}),label:{text:a??o??"Frequency"},symbol:this.legendItemSymbol(),hideInLegend:!n}]}animateEmptyUpdateReady({datumSelection:t,labelSelection:e}){const i=fy(gy(!0,this.axes,"normal"));ci(this.id,"datums",this.ctx.animationManager,[t],i),ce(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(t){const e=this.processedData?.reduced?.diff?.[this.id],i=fy(gy(!0,this.axes,"normal"));ci(this.id,"datums",this.ctx.animationManager,[t.datumSelection],i,(s,o)=>Ss(o.domain),e),ce(this,"labels",this.ctx.animationManager,t.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){return SL(this,this.contextNodeData?.nodeData[t])}},xy.className="HistogramSeries",xy.type="histogram"}}),UF,_Q=k({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeriesOptionsDef.ts"(){"use strict";P(),Pl(),UF={type:Mt(gs("histogram")),xKey:Mt(rt),yKey:rt,xName:rt,yName:rt,areaPlot:at,aggregation:_t("count","sum","mean"),bins:Oe(Oe(vt)),binCount:ot,showInMiniChart:at,cornerRadius:ot,label:Rl,tooltip:Er,shadow:mg,...tn,...Po,...Es,...Ga}}}),HF,LL,NL=k({"packages/ag-charts-community/src/chart/series/cartesian/histogramSeriesModule.ts"(){"use strict";hi(),vi(),EQ(),_Q(),HF={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",moduleFactory:t=>new xy(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Nl,strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},shadow:{enabled:!1,color:Tl,xOffset:3,yOffset:3,blur:5}}}},LL={type:"series",name:"histogram",chartType:"cartesian",enterprise:!0,options:UF,create:t=>new xy(t)}}}),Oi,RQ=k({"packages/ag-charts-community/src/chart/series/cartesian/lineSeriesProperties.ts"(){"use strict";Nt(),Ka(),$p(),El(),$o(),KC(),Oi=class extends Or{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Fu,this.marker=new ls,this.label=new Ki,this.tooltip=new zs,this.connectMissingData=!1,this.sparklineMode=!1}},v([A(it)],Oi.prototype,"xKey",2),v([A(it)],Oi.prototype,"yKey",2),v([A(it,{optional:!0})],Oi.prototype,"xName",2),v([A(it,{optional:!0})],Oi.prototype,"yName",2),v([A(it,{optional:!0})],Oi.prototype,"yFilterKey",2),v([A(it,{optional:!0})],Oi.prototype,"stackGroup",2),v([A(lt,{optional:!0})],Oi.prototype,"normalizedTo",2),v([A(it,{optional:!0})],Oi.prototype,"title",2),v([A(zt)],Oi.prototype,"stroke",2),v([A(lt)],Oi.prototype,"strokeWidth",2),v([A(le)],Oi.prototype,"strokeOpacity",2),v([A(Nn)],Oi.prototype,"lineDash",2),v([A(lt)],Oi.prototype,"lineDashOffset",2),v([A(ct)],Oi.prototype,"interpolation",2),v([A(ct)],Oi.prototype,"marker",2),v([A(ct)],Oi.prototype,"label",2),v([A(ct)],Oi.prototype,"tooltip",2),v([A(bt)],Oi.prototype,"connectMissingData",2),v([A(bt)],Oi.prototype,"sparklineMode",2)}}),YF,bg,KF=k({"packages/ag-charts-community/src/chart/series/cartesian/lineSeries.ts"(){"use strict";P(),Ps(),VC(),vu(),Ve(),Ar(),qt(),Ua(),Ir(),wl(),vl(),hu(),$o(),RQ(),Lv(),ny(),rL(),YF=.25,bg=class extends _l{constructor(t){super({moduleCtx:t,directionKeys:Fc,directionNames:Gc,categoryKey:"xValue",hasMarkers:!0,pickModes:[2,1,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:nL({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:Ol,marker:(e,i)=>({...sy(e),...oy(e,i)})},clipFocusBox:!1}),this.properties=new Oi,this.dataAggregationFilters=void 0}get pickModeAxis(){return this.properties.sparklineMode?"main":"main-category"}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,visible:i,seriesGrouping:{groupIndex:s=this.id,stackCount:o=0}={}}=this,{xKey:a,yKey:n,yFilterKey:r,connectMissingData:l,normalizedTo:c}=this.properties,h=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,d=this.axes.y?.scale,{isContinuousX:p,xScaleType:g,yScaleType:f}=this.getScaleInformation({xScale:u,yScale:d}),x=o>=1||c!=null,y={invalidValue:null};l&&x&&(y.invalidValue=0),x&&!i&&(y.forceValue=0);const b=[];if((!p||x)&&b.push(Fn(a,g,{id:"xKey"})),b.push(Wt(a,g,{id:"xValue"}),Wt(n,f,{id:"yValueRaw",...y,invalidValue:void 0})),r!=null&&b.push(Wt(r,f,{id:"yFilterRaw"})),x){const D=[`line-stack-${s}-yValues`,`line-stack-${s}-yValues-trailing`,`line-stack-${s}-yValues-marker`];b.push(...Rc(n,"window","current",{id:"yValueEnd",...y,groupId:D[0]},f),...Rc(n,"window-trailing","current",{id:"yValueStart",...y,groupId:D[1]},f),...Rc(n,"normal","current",{id:"yValueCumulative",...y,groupId:D[2]},f)),sp(c)&&b.push(iv([D[0],D[1],D[2]],c))}h&&(b.push(Wp(p?["xValue"]:void 0)),this.processedData&&b.push(Up(this.id,this.processedData)));const{dataModel:S,processedData:M}=await this.requestDataModel(t,e,{props:b,groupByKeys:x,groupByData:!x});this.dataAggregationFilters=this.aggregateData(S,M),this.animationState.transition("updateData")}xCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.x.scale.convert(t),o=i.enabled?.5*i.size*e:0;return[s-o,s+o]}yCoordinateRange(t,e){const{marker:i}=this.properties,s=this.axes.y.scale.convert(t[0]),o=i.enabled?.5*i.size*e:0;return[s-o,s+o]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!e||!i)return[];if(t==="x"){const a=e.resolveProcessedDataDefById(this,"xValue"),n=e.getDomain(this,"xValue","value",i);return a?.def.type==="value"&&a.def.valueType==="category"?n:Ho(Ml(n))}const s=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw",o=this.domainForClippedRange("y",[s],"xValue",!0);return Ho(o)}getSeriesRange(t,e){const i=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw";return this.domainForVisibleRange("y",[i],"xValue",e,!0)}getVisibleItems(t,e,i){const s=this.dataModel?.hasColumnById(this,"yValueEnd")?"yValueEnd":"yValueRaw";return this.countVisibleItems("xValue",[s],t,e,i)}aggregateData(t,e){}createNodeData(){const{dataModel:t,processedData:e,axes:i,dataAggregationFilters:s}=this,o=i.x,a=i.y;if(!t||!e||!o||!a)return;const{xKey:n,yKey:r,yFilterKey:l,xName:c,yName:h,marker:u,label:d,connectMissingData:p,interpolation:g,legendItemName:f}=this.properties,x=this.dataModel?.hasColumnById(this,"yValueEnd"),y=o.scale,b=a.scale,S=(y.bandwidth??0)/2,M=(b.bandwidth??0)/2,D=u.enabled?u.size:0,L=e.dataSources.get(this.id)??[],T=t.resolveColumnById(this,"xValue",e),I=t.resolveColumnById(this,"yValueRaw",e),N=x?t.resolveColumnById(this,"yValueEnd",e):void 0,O=x?t.resolveColumnById(this,"yValueCumulative",e):I,R=l!=null?t.resolveColumnById(this,"yFilterRaw",e):void 0,_=X=>y.convert(T[X])+S,B=X=>b.convert(O[X])+M,W={lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},F=[];let z;const U=X=>{const st=L[X],nt=T[X],dt=I[X],ut=N?.[X],St=R?.[X],Lt=_(X),mt=B(X);if(!Number.isFinite(Lt))return;if(dt!=null){const ie=d.enabled?this.getLabelText(d,{value:dt,datum:st,xKey:n,yKey:r,xName:c,yName:h,legendItemName:f}):void 0;F.push({series:this,datum:st,datumIndex:X,yKey:r,xKey:n,point:{x:Lt,y:mt,size:D},midPoint:{x:Lt,y:mt},cumulativeValue:ut,yValue:dt,xValue:nt,capDefaults:W,labelText:ie,selected:St})}if(z==null)return;const Jt=z[z.length-1];if(dt!=null){const ie={point:{x:Lt,y:mt},xDatum:nt,yDatum:dt};Array.isArray(Jt)?Jt.push(ie):Jt!=null?(Jt.skip+=1,z.push([ie])):z.push([ie])}else p||(Array.isArray(Jt)||Jt==null?z.push({skip:0}):Jt.skip+=1)},[H,j]=y.range,V=j-H,K=s?.find(X=>X.maxRange>V)?.indices;let[$,Z]=this.visibleRange("xValue",o.range,K);$=Math.max($-1,0),Z=Math.min(Z+1,K?.length??T.length),e.input.count<1e3&&($=0,Z=e.input.count),K==null&&(z=[]);for(let X=$;X<Z;X+=1)U(K?.[X]??X);const Q=z?.flatMap(X=>Array.isArray(X)?Tv(X,g):[]),q=Q!=null?{itemId:r,spans:Q}:void 0,J=R?.some((X,st)=>X===I[st])??!1;return{itemId:r,nodeData:F,labelData:F,strokeData:q,scales:this.calculateScaling(),visible:this.visible,crossFiltering:J}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{paths:[e],opacity:i,visible:s,animationEnabled:o}=t,a=this.contextNodeData?.crossFiltering===!0;e.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:i,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity*(a?YF:1),lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),o||(e.visible=s),wv(this,e)}getMarkerItemBaseStyle(t){const{properties:e}=this,{marker:i}=e,s=t?e.highlightStyle.item:void 0;return Dr({size:i.size,shape:i.shape,fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??i.strokeWidth,strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset},i.fillGradientDefaults,i.fillPatternDefaults)}getMarkerItemStyleOverrides(t,e,i,s){const{id:o,properties:a}=this,{xKey:n,yKey:r,marker:l}=a,{itemStyler:c}=l;if(c!=null)return this.cachedDatumCallback(Ss(t,s?"highlight":"node"),()=>{const h=this.getSeriesDomain("x"),u=this.getSeriesDomain("y");return this.callWithContext(c,{seriesId:o,...Ic(e,n,r,h,u),datum:e,highlighted:s,...i})})}updateMarkerSelection(t){let{nodeData:e}=t;const{markerSelection:i}=t;return e=this.properties.marker.enabled||this.contextNodeData?.crossFiltering===!0?e:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(e,void 0,o=>Ss(o.xValue))}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:o,stroke:a,strokeWidth:n,strokeOpacity:r,marker:l,highlightStyle:c}=this.properties,h=this.getSeriesDomain("x"),u=this.getSeriesDomain("y"),d=Vt(i&&c.item,l.getStyle(),{stroke:a,strokeWidth:n,strokeOpacity:r}),p=this.ctx.animationManager.isSkipped(),g=this.getShapeFillBBox();e.each((f,x)=>{this.updateMarkerStyle(l,f,x.datum,x.point,Ic(x,s,o,h,u),i,d,g,{applyTranslation:p,selected:x.selected})}),i||l.markClean()}updateLabelSelection(t){return t.labelSelection.update(this.isLabelEnabled()?t.labelData:[])}updateLabelNodes(t){const{enabled:e,fontStyle:i,fontWeight:s,fontSize:o,fontFamily:a,color:n}=this.properties.label;t.labelSelection.each((r,l)=>{e&&l?.labelText?(r.fontStyle=i,r.fontWeight=s,r.fontSize=o,r.fontFamily=a,r.textAlign="center",r.textBaseline="bottom",r.text=l.labelText,r.x=l.point.x,r.y=l.point.y-10,r.fill=n,r.visible=!0):r.visible=!1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a}=this,{xKey:n,xName:r,yKey:l,yName:c,tooltip:h}=a,u=o.x,d=o.y;if(!i||!s||!u||!d)return;const p=s.dataSources.get(this.id)?.[t],g=i.resolveColumnById(this,"xValue",s)[t],f=i.resolveColumnById(this,"yValueRaw",s)[t];if(g==null)return;const x=this.getMarkerItemBaseStyle(!1);return Object.assign(x,this.getMarkerItemStyleOverrides(String(t),p,x,!1)),h.formatTooltip(this.properties,{heading:u.formatDatum(g),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:d.formatDatum(f)}]},{seriesId:e,datum:p,title:c,xKey:n,xName:r,yKey:l,yName:c,...x,...this.getModuleTooltipParams()})}legendItemSymbol(){const t="rgba(0, 0, 0, 0)",{stroke:e,strokeOpacity:i,strokeWidth:s,lineDash:o,marker:a}=this.properties;return{marker:{...this.getMarkerStyle(a,void 0,void 0,!1,void 0,{fill:a.fill??t,stroke:a.stroke??e??t}),enabled:a.enabled},line:{stroke:e??t,strokeOpacity:i,strokeWidth:s,lineDash:o}}}getLegendData(t){if(!(this.properties.isValid()&&t==="category"))return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{yKey:o,yName:a,title:n,legendItemName:r,showInLegend:l}=this.properties;return[{legendType:"category",id:e,itemId:o,legendItemName:r,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:o}),label:{text:r??n??a??o},symbol:this.legendItemSymbol(),hideInLegend:!l}]}updatePaths(t){this.updateLinePaths(t.paths,t.contextData)}plotNodeDataPoints(t,e){if(e.length===0)return;const i=e[0].point;t.moveTo(i.x,i.y);for(let s=1;s<e.length;s+=1){const{x:o,y:a}=e[s].point;t.lineTo(o,a)}}updateLinePaths(t,e){const i=e.strokeData?.spans,[s]=t;s.path.clear(),i!=null?tL(s,i):this.plotNodeDataPoints(s.path,e.nodeData),s.markDirty("LineSeries")}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,annotationSelections:s,contextData:o,paths:a}=t,{animationManager:n}=this.ctx;this.updateLinePaths(a,o),aL(this,n,...a),bs([e],oy),oL(this,n,e),ce(this,"labels",n,i),ce(this,"annotations",n,...s)}animateReadyResize(t){const{contextData:e,paths:i}=t;this.updateLinePaths(i,e),super.animateReadyResize(t)}animateWaitingUpdateReady(t){const{animationManager:e}=this.ctx,{markerSelection:i,labelSelection:s,annotationSelections:o,contextData:a,paths:n,previousContextData:r}=t,[l]=n;this.resetMarkerAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateLinePaths(n,a)},h=()=>{e.skipCurrentBatch(),c()};if(a==null||r==null){c(),iy(this,e,"added",i),Ov(this,"path_properties",e,"add",l),ce(this,"labels",e,s),ce(this,"annotations",e,...o);return}if(a.crossFiltering!==r.crossFiltering){h();return}const u=SF(a,r,this.processedData?.reduced?.diff?.[this.id]);if(u===void 0){h();return}else if(u.status==="no-op")return;ci(this.id,"path_properties",e,[l],u.stroke.pathProperties),u.status==="added"?this.updateLinePaths(n,a):u.status==="removed"?this.updateLinePaths(n,r):Dv(this.id,"path_update",e,[l],u.stroke.path),u.hasMotion&&(iy(this,e,void 0,i),ce(this,"labels",e,s),ce(this,"annotations",e,...o))}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new It}getFormattedMarkerStyle(t){const{xKey:e,yKey:i}=this.properties,s=this.getSeriesDomain("x"),o=this.getSeriesDomain("y");return this.getMarkerStyle(this.properties.marker,t.datum,Ic(t,e,i,s,o),!0)}computeFocusBounds(t){return ay(this,t)}},bg.className="LineSeries",bg.type="line"}}),by,PQ=k({"packages/ag-charts-community/src/chart/series/cartesian/lineSeriesOptionsDef.ts"(){"use strict";P(),Pl(),by={type:gs("line"),xKey:Mt(rt),yKey:Mt(rt),xName:rt,yName:rt,title:rt,stacked:at,stackGroup:rt,normalizedTo:vt,legendItemName:rt,showInMiniChart:at,connectMissingData:at,interpolation:jv,label:Rl,marker:fg,tooltip:Er,errorBar:py,...tn,...Es,...Ga},by.pickOutsideVisibleMinorAxis=at,by.focusPriority=vt,by.sparklineMode=at}}),OL,wL,EL=k({"packages/ag-charts-community/src/chart/series/cartesian/lineSeriesModule.ts"(){"use strict";vi(),KF(),PQ(),OL={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",moduleFactory:t=>new bg(t),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{tooltip:{position:{_seriesOverrideType:"node"}},stroke:Zm,strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear"},marker:{shape:"circle",size:7,strokeWidth:0,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Nl},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},errorBar:{cap:{lengthRatio:1}}}}},wL={type:"series",name:"line",chartType:"cartesian",options:by,create:t=>new bg(t)}}}),_L,Ue,BQ=k({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeriesProperties.ts"(){"use strict";bo(),Nt(),Ka(),$p(),El(),$o(),_L=class extends Ki{constructor(){super(...arguments),this.placement="top"}},v([A(Fb)],_L.prototype,"placement",2),Ue=class extends Or{constructor(){super(...arguments),this.label=new _L,this.tooltip=new zs,this.marker=new ls}},v([A(it)],Ue.prototype,"xKey",2),v([A(it)],Ue.prototype,"yKey",2),v([A(it,{optional:!0})],Ue.prototype,"labelKey",2),v([A(it,{optional:!0})],Ue.prototype,"xFilterKey",2),v([A(it,{optional:!0})],Ue.prototype,"yFilterKey",2),v([A(it,{optional:!0})],Ue.prototype,"xName",2),v([A(it,{optional:!0})],Ue.prototype,"yName",2),v([A(it,{optional:!0})],Ue.prototype,"labelName",2),v([A(it,{optional:!0})],Ue.prototype,"title",2),v([be("marker.shape")],Ue.prototype,"shape",2),v([be("marker.size")],Ue.prototype,"size",2),v([be("marker.fill",{optional:!0})],Ue.prototype,"fill",2),v([be("marker.fillGradientDefaults")],Ue.prototype,"fillGradientDefaults",2),v([be("marker.fillPatternDefaults")],Ue.prototype,"fillPatternDefaults",2),v([be("marker.fillOpacity")],Ue.prototype,"fillOpacity",2),v([be("marker.stroke")],Ue.prototype,"stroke",2),v([be("marker.strokeWidth")],Ue.prototype,"strokeWidth",2),v([be("marker.strokeOpacity")],Ue.prototype,"strokeOpacity",2),v([be("marker.lineDash")],Ue.prototype,"lineDash",2),v([be("marker.lineDashOffset")],Ue.prototype,"lineDashOffset",2),v([be("marker.itemStyler",{optional:!0})],Ue.prototype,"itemStyler",2),v([A(ct)],Ue.prototype,"label",2),v([A(ct)],Ue.prototype,"tooltip",2)}}),Sy,zQ=k({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeries.ts"(){"use strict";Ve(),Ar(),qt(),Go(),Ua(),Ir(),zn(),wl(),$o(),ny(),BQ(),Sy=class extends _l{constructor(t){super({moduleCtx:t,directionKeys:Fc,directionNames:Gc,categoryKey:void 0,pickModes:[2,1,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:sy,label:Ol},usesPlacedLabels:!0,clipFocusBox:!1}),this.properties=new Ue}get pickModeAxis(){return"main-category"}async processData(t){if(!this.properties.isValid()||this.data==null||!this.visible)return;const e=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:s,yScaleType:o}=this.getScaleInformation({xScale:e,yScale:i}),{xKey:a,yKey:n,xFilterKey:r,yFilterKey:l,labelKey:c}=this.properties;await this.requestDataModel(t,this.data,{props:[Wt(a,s,{id:"xValue"}),Wt(n,o,{id:"yValue"}),...r!=null?[Wt(r,s,{id:"xFilterValue"})]:[],...l!=null?[Wt(l,o,{id:"yFilterValue"})]:[],...c?[Wt(c,"band",{id:"labelValue"})]:[]]}),this.animationState.transition("updateData")}xCoordinateRange(t,e){const i=this.axes.x.scale.convert(t),s=.5*this.properties.size*e;return[i-s,i+s]}yCoordinateRange(t,e){const i=this.axes.y.scale.convert(t[0]),s=.5*this.properties.size*e;return[i-s,i+s]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];const s={x:"xValue",y:"yValue"},o=s[t],a=e.resolveProcessedDataDefById(this,o),n=e.getDomain(this,o,"value",i);if(a?.def.type==="value"&&a?.def.valueType==="category")return n;const l=s[t==="x"?"y":"x"],c=this.domainForClippedRange(t,[o],l,!1);return Ho(Ml(c))}getSeriesRange(t,e){return this.domainForVisibleRange("y",["yValue"],"xValue",e,!1)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["yValue"],t,e,i)}createNodeData(){const{axes:t,dataModel:e,processedData:i,visible:s}=this,{xKey:o,yKey:a,xFilterKey:n,yFilterKey:r,labelKey:l,xName:c,yName:h,labelName:u,marker:d,label:p}=this.properties,{placement:g}=p,f=Xi.anchor(d.shape),x=t.x,y=t.y;if(!(e&&i&&s&&x&&y))return;const b=e.resolveColumnById(this,"xValue",i),S=e.resolveColumnById(this,"yValue",i),M=l!=null?e.resolveColumnById(this,"labelValue",i):void 0,D=n!=null?e.resolveColumnById(this,"xFilterValue",i):void 0,L=r!=null?e.resolveColumnById(this,"yFilterValue",i):void 0,T=x.scale,I=y.scale,N=(T.bandwidth??0)/2,O=(I.bandwidth??0)/2,R=[],_=p.getFont(),B=yr.getMeasurer({font:_});return(i.dataSources.get(this.id)??[]).forEach((F,z)=>{const U=b[z],H=S[z],j=T.convert(U)+N,V=I.convert(H)+O,G=D!=null&&L!=null?D[z]===U&&L[z]===H:void 0,K=this.getLabelText(p,{value:M!=null?M?.[z]:H,datum:F,xKey:o,yKey:a,labelKey:l,xName:c,yName:h,labelName:u}),$=B.measureText(K);R.push({series:this,itemId:a,yKey:a,xKey:o,datum:F,datumIndex:z,xValue:U,yValue:H,capDefaults:{lengthRatioMultiplier:d.getDiameter(),lengthMax:1/0},point:{x:j,y:V,size:d.size},midPoint:{x:j,y:V},label:{text:K,...$},anchor:f,placement:g,selected:G})}),{itemId:a,nodeData:R,labelData:R,scales:this.calculateScaling(),visible:this.visible}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?e:[])}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yKey:o,labelKey:a,marker:n,highlightStyle:r}=this.properties,l=Vt(i&&r.item,n.getStyle()),c=this.getShapeFillBBox();e.each((h,u)=>{this.updateMarkerStyle(n,h,u.datum,u.point,{xKey:s,yKey:o,labelKey:a},i,l,c,{selected:u.selected})}),i||n.markClean()}updatePlacedLabelData(t){this.labelSelection.update(t.map(e=>({...e.datum,point:{x:e.x,y:e.y,size:e.datum.point.size}})),e=>{e.pointerEvents=1}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{label:e}=this.properties;t.labelSelection.each((i,s)=>{i.text=s.label.text,i.fill=e.color,i.x=s.point?.x??0,i.y=s.point?.y??0,i.fontStyle=e.fontStyle,i.fontWeight=e.fontWeight,i.fontSize=e.fontSize,i.fontFamily=e.fontFamily,i.textAlign="left",i.textBaseline="top"})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a}=this,{xKey:n,xName:r,yKey:l,yName:c,labelKey:h,labelName:u,title:d,tooltip:p,marker:g}=a,f=o.x,x=o.y;if(!i||!s||!f||!x)return;const y=s.dataSources.get(this.id)?.[t],b=i.resolveColumnById(this,"xValue",s)[t],S=i.resolveColumnById(this,"yValue",s)[t],M=this.contextNodeData?.nodeData[t];if(b==null||M==null)return;const D=this.getMarkerStyle(g,M.datum,{xKey:n,yKey:l,labelKey:h,highlighted:!0});return p.formatTooltip(this.properties,{symbol:this.legendItemSymbol(),title:d,data:[{label:r,fallbackLabel:n,value:f.formatDatum(b)},{label:c,fallbackLabel:l,value:x.formatDatum(S)}]},{seriesId:e,datum:y,title:c,xKey:n,xName:r,yKey:l,yName:c,labelKey:h,labelName:u,...D,...this.getModuleTooltipParams()})}legendItemSymbol(){return{marker:this.getMarkerStyle(this.properties.marker)}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{yKey:e,yName:i,title:s,showInLegend:o}=this.properties,{id:a,ctx:{legendManager:n},visible:r}=this;return[{legendType:"category",id:a,itemId:e,seriesId:a,enabled:r&&n.getItemEnabled({seriesId:a,itemId:e}),label:{text:s??i??e},symbol:this.legendItemSymbol(),hideInLegend:!o}]}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,annotationSelections:s}=t;sL(this,this.ctx.animationManager,e),ce(this,"labels",this.ctx.animationManager,i),ce(this,"annotations",this.ctx.animationManager,...s)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new It}getFormattedMarkerStyle(t){const{xKey:e,yKey:i,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,t.datum,{xKey:e,yKey:i,labelKey:s},!0)}computeFocusBounds(t){return ay(this,t)}},Sy.className="ScatterSeries",Sy.type="scatter"}}),$F,FQ=k({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeriesOptionsDef.ts"(){"use strict";P(),qt(),Pl(),$F={type:Mt(gs("scatter")),xKey:Mt(rt),yKey:Mt(rt),labelKey:rt,xName:rt,yName:rt,labelName:rt,title:rt,showInMiniChart:at,label:{placement:_t("top","right","bottom","left"),...Rl},tooltip:Er,errorBar:py,...tn,...mc(fg,["enabled"])}}}),XF,RL,PL=k({"packages/ag-charts-community/src/chart/series/cartesian/scatterSeriesModule.ts"(){"use strict";vi(),zQ(),FQ(),XF={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",moduleFactory:t=>new Sy(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Nl,fillOpacity:.8,tooltip:{position:{_seriesOverrideType:"node"}},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},errorBar:{cap:{lengthRatio:1}}}}},RL={type:"series",name:"scatter",chartType:"cartesian",options:$F,create:t=>new Sy(t)}}}),BL,ZF=k({"packages/ag-charts-community/src/scene/sectorBox.ts"(){"use strict";gA(),BL=class NE{constructor(e,i,s,o){this.startAngle=e,this.endAngle=i,this.innerRadius=s,this.outerRadius=o}clone(){const{startAngle:e,endAngle:i,innerRadius:s,outerRadius:o}=this;return new NE(e,i,s,o)}equals(e){return this.startAngle===e.startAngle&&this.endAngle===e.endAngle&&this.innerRadius===e.innerRadius&&this.outerRadius===e.outerRadius}[zf](e,i){return new NE(this.startAngle*(1-i)+e.startAngle*i,this.endAngle*(1-i)+e.endAngle*i,this.innerRadius*(1-i)+e.innerRadius*i,this.outerRadius*(1-i)+e.outerRadius*i)}}}});function qF({startAngle:t,endAngle:e,innerRadius:i,outerRadius:s}){let o=1/0,a=1/0,n=-1/0,r=-1/0;const l=(c,h)=>{o=Math.min(c,o),a=Math.min(h,a),n=Math.max(c,n),r=Math.max(h,r)};return l(i*Math.cos(t),i*Math.sin(t)),l(i*Math.cos(e),i*Math.sin(e)),l(s*Math.cos(t),s*Math.sin(t)),l(s*Math.cos(e),s*Math.sin(e)),yc(0,t,e)&&l(s,0),yc(Math.PI*.5,t,e)&&l(0,s),yc(Math.PI,t,e)&&l(-s,0),yc(Math.PI*1.5,t,e)&&l(0,-s),new pt(o,a,n-o,r-a)}function Yv(t,e,i){const s=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),{innerRadius:o,outerRadius:a}=i;if(i.startAngle===i.endAngle||s<Math.min(o,a)||s>Math.max(o,a))return!1;const n=Uf(i.startAngle),r=Uf(i.endAngle),l=Math.atan2(e,t);return n<r?l<=r&&l>=n:l<=r&&l>=-Math.PI||l>=n&&l<=Math.PI}function QF(t,e){const{startAngle:i,endAngle:s,innerRadius:o,outerRadius:a}=e,n={x:a*Math.cos(i),y:a*Math.sin(i)},r={x:a*Math.cos(s),y:a*Math.sin(s)},l=o===0?{x:0,y:0}:{x:o*Math.cos(i),y:o*Math.sin(i)},c=o===0?{x:0,y:0}:{x:o*Math.cos(s),y:o*Math.sin(s)};return fp(t.start.x,t.start.y,t.end.x,t.end.y,n.x,n.y,l.x,l.y)||fp(t.start.x,t.start.y,t.end.x,t.end.y,r.x,r.y,c.x,c.y)||Y_(0,0,a,i,s,!0,t.start.x,t.start.y,t.end.x,t.end.y)}function JF(t,e){const i={x:t.x,y:t.y},s={x:t.x+t.width,y:t.y},o={x:t.x,y:t.y+t.height},a={x:t.x+t.width,y:t.y+t.height};return QF({start:i,end:s},e)||QF({start:o,end:a},e)}function t4(t,e,i,s){if(i===0&&s===0)return 0;if(Math.asin(Math.abs(1*i)/(t+1*i))+Math.asin(Math.abs(1*s)/(t+1*s))-e<0)return 1;let a=0,n=1;for(let r=0;r<8;r+=1){const l=(a+n)/2;Math.asin(Math.abs(l*i)/(t+l*i))+Math.asin(Math.abs(l*s)/(t+l*s))-e<0?a=l:n=l}return a}function jc(t,e){return Tb(t,e)<e4?e:ke(t-e)+e}function Kv(t,e,i=0){const o=Math.abs(e-t)>=2*Math.PI?2*Math.PI:ke(e-t);return t=jc(t,i),e=t+o,{startAngle:t,endAngle:e}}function $v(t,e,i,s,o,a){const n=Math.sin(a),r=Math.cos(a),l=t**2+e**2-i**2;let c,h,u,d;if(r>.5){const S=n/r,M=1+S**2,D=-2*(t+e*S),L=D**2-4*M*l;if(L<0)return;const T=(-D+Math.sqrt(L))/(2*M),I=(-D-Math.sqrt(L))/(2*M);c=T,h=T*S,u=I,d=I*S}else{const S=r/n,M=1+S**2,D=-2*(e+t*S),L=D**2-4*M*l;if(L<0)return;const T=(-D+Math.sqrt(L))/(2*M),I=(-D-Math.sqrt(L))/(2*M);c=T*S,h=T,u=I*S,d=I}const p=r,g=n,f=c*p+h*g,x=u*p+d*g,y=f>0?jc(Math.atan2(h-e,c-t),s):NaN,b=x>0?jc(Math.atan2(d-e,u-t),s):NaN;if(y>=s&&y<=o)return y;if(b>=s&&b<=o)return b}function Xv(t,e,i,s,o,a){const n=Math.hypot(t,e),r=(n**2-i**2+a**2)/(2*n),l=n-r,c=Math.atan2(e,t),h=Math.acos(-l/i),u=jc(c+h,s),d=jc(c-h,s);if(u>=s&&u<=o)return u;if(d>=s&&d<=o)return d}var e4,Zv=k({"packages/ag-charts-community/src/scene/util/sector.ts"(){"use strict";Ci(),Xt(),K_(),e4=1e-6}}),qv,cs,Qv=k({"packages/ag-charts-community/src/scene/shape/sector.ts"(){"use strict";ZF(),Zv(),Xa(),qv=class{constructor(t,e,i,s,o){this.cx=t,this.cy=e,this.r=i,this.a0=s,this.a1=o,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(t){return{x:this.cx+this.r*Math.cos(t),y:this.cy+this.r*Math.sin(t)}}clipStart(t){t==null||!this.isValid()||t<this.a0||(this.a0=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(t){t==null||!this.isValid()||t>this.a1||(this.a1=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},cs=class extends io{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=Math.PI*2,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(t){this.concentricEdgeInset=t,this.radialEdgeInset=t}set cornerRadius(t){this.startOuterCornerRadius=t,this.endOuterCornerRadius=t,this.startInnerCornerRadius=t,this.endInnerCornerRadius=t}computeBBox(){return qF(this).translate(this.centerX,this.centerY)}normalizedRadii(){const{concentricEdgeInset:t}=this;let{innerRadius:e,outerRadius:i}=this;return e=e>0?e+t:0,i=Math.max(i-t,0),{innerRadius:e,outerRadius:i}}normalizedClipSector(){const{clipSector:t}=this;if(t==null)return;const{startAngle:e,endAngle:i}=Kv(this.startAngle,this.endAngle),{innerRadius:s,outerRadius:o}=this.normalizedRadii(),a=Kv(t.startAngle,t.endAngle,e);return new BL(Math.max(e,a.startAngle),Math.min(i,a.endAngle),Math.max(s,t.innerRadius),Math.min(o,t.outerRadius))}getAngleOffset(t){return t>0?this.radialEdgeInset/t:0}arc(t,e,i,s,o,a,n,r){if(t<=0)return;const{startAngle:l,endAngle:c}=Kv(this.startAngle,this.endAngle),{innerRadius:h,outerRadius:u}=this.normalizedRadii(),d=this.normalizedClipSector();if(r&&h<=0)return;const p=r?this.getAngleOffset(h+t):this.getAngleOffset(u-t),g=n?l+p+e:c-p-e,f=r?h+t:u-t,x=f*Math.cos(g),y=f*Math.sin(g);if(d!=null&&(!n&&!(g>=l-1e-6&&g<=d.endAngle-1e-6)||n&&!(g>=d.startAngle+1e-6&&g<=c-1e-6)||r&&f<d.innerRadius-1e-6||!r&&f>d.outerRadius+1e-6))return;const b=new qv(x,y,t,i,s);if(d!=null){r?(b.clipStart($v(x,y,t,i,s,d.endAngle)),b.clipEnd($v(x,y,t,i,s,d.startAngle))):(b.clipStart($v(x,y,t,i,s,d.startAngle)),b.clipEnd($v(x,y,t,i,s,d.endAngle)));let T,I;if(n?(T=Xv(x,y,t,i,s,d.innerRadius),I=Xv(x,y,t,i,s,d.outerRadius)):(T=Xv(x,y,t,i,s,d.outerRadius),I=Xv(x,y,t,i,s,d.innerRadius)),b.clipStart(T),b.clipEnd(I),T!=null){const{x:N,y:O}=b.pointAt(T),R=jc(Math.atan2(O,N),l);n?a?.clipStart(R):o.clipEnd(R)}if(I!=null){const{x:N,y:O}=b.pointAt(I),R=jc(Math.atan2(O,N),l);n?o.clipStart(R):a?.clipEnd(R)}}if(d!=null){const{x:T,y:I}=b.pointAt((b.a0+b.a1)/2);if(!Yv(T,I,d))return}const{x:S,y:M}=b.pointAt(n===r?b.a0:b.a1),D=jc(Math.atan2(M,S),l),L=r?a:o;return n?L?.clipStart(D):L?.clipEnd(D),b}updatePath(){const{path:e,centerX:i,centerY:s,concentricEdgeInset:o,radialEdgeInset:a}=this;let{startOuterCornerRadius:n,endOuterCornerRadius:r,startInnerCornerRadius:l,endInnerCornerRadius:c}=this;const{startAngle:h,endAngle:u}=Kv(this.startAngle,this.endAngle),{innerRadius:d,outerRadius:p}=this.normalizedRadii(),g=this.normalizedClipSector(),f=u-h,x=f>=2*Math.PI-1e-6;if(e.clear(),d===0&&p===0||d>p)return;if((g?.startAngle??h)===(g?.endAngle??u))return;if(x&&this.clipSector==null&&n===0&&r===0&&l===0&&c===0){e.moveTo(i+p*Math.cos(h),s+p*Math.sin(h)),e.arc(i,s,p,h,u),d>o&&(e.moveTo(i+d*Math.cos(u),s+d*Math.sin(u)),e.arc(i,s,d,u,h,!0)),e.closePath();return}else if(this.clipSector==null&&Math.abs(d-p)<1e-6){e.arc(i,s,p,h,u,!1),e.arc(i,s,p,u,h,!0),e.closePath();return}const y=this.getAngleOffset(d),b=this.getAngleOffset(p);if(f<2*b)return;const M=(g?.innerRadius??d)>o,D=d<o||f<2*y,L=p-d,T=Math.max(n,l,r,c),I=T>0?Math.min(L/T,1):1;n*=I,r*=I,l*=I,c*=I;const N=t4(p,f-2*b,-n,-r);if(n*=N,r*=N,!D&&M){const X=t4(d,f-2*y,l,c);l*=X,c*=X}else l=0,c=0;const O=Math.max(n+l,r+c),R=O>0?Math.min(L/O,1):1;n*=R,r*=R,l*=R,c*=R;let _=0,B=0;const W=n/(p-n),F=r/(p-r);if(W>=0&&W<1-1e-6)_=Math.asin(W);else{_=f/2;const X=p/(1/Math.sin(_)+1);n=Math.min(X,n)}if(F>=0&&F<1-1e-6)B=Math.asin(F);else{B=f/2;const X=p/(1/Math.sin(B)+1);r=Math.min(X,r)}const z=Math.asin(l/(d+l)),U=Math.asin(c/(d+c)),H=g?.outerRadius??p,j=this.getAngleOffset(H),V=new qv(0,0,H,h+j,u-j),G=g?.innerRadius??d,K=this.getAngleOffset(G),$=M?new qv(0,0,G,h+K,u-K):void 0;g!=null&&(V.clipStart(g.startAngle),V.clipEnd(g.endAngle),$?.clipStart(g.startAngle),$?.clipEnd(g.endAngle));const Z=this.arc(n,_,h-Math.PI*.5,h+_,V,$,!0,!1),Q=this.arc(r,B,u-B,u+Math.PI*.5,V,$,!1,!1),q=this.arc(c,U,u+Math.PI*.5,u+Math.PI-U,V,$,!1,!0),J=this.arc(l,z,h+Math.PI+z,h+Math.PI*1.5,V,$,!0,!0);if(D){const X=f<Math.PI*.5?a*(1+Math.cos(f))/Math.sin(f):NaN;let st;X>0&&X<p?st=Math.max(Math.hypot(a,X),d):st=a,st=Math.max(st,d);const nt=h+f*.5;e.moveTo(i+st*Math.cos(nt),s+st*Math.sin(nt))}else if(!(J?.isValid()===!0||$?.isValid()===!0)){const X=h+f/2,st=d*Math.cos(X),nt=d*Math.sin(X);e.moveTo(i+st,s+nt)}if(Z?.isValid()===!0){const{cx:X,cy:st,r:nt,a0:dt,a1:ut}=Z;e.arc(i+X,s+st,nt,dt,ut)}if(V.isValid()){const{r:X,a0:st,a1:nt}=V;e.arc(i,s,X,st,nt)}if(Q?.isValid()===!0){const{cx:X,cy:st,r:nt,a0:dt,a1:ut}=Q;e.arc(i+X,s+st,nt,dt,ut)}if(!D){if(q?.isValid()===!0){const{cx:X,cy:st,r:nt,a0:dt,a1:ut}=q;e.arc(i+X,s+st,nt,dt,ut)}if($?.isValid()===!0){const{r:X,a0:st,a1:nt}=$;e.arc(i,s,X,nt,st,!0)}if(J?.isValid()===!0){const{cx:X,cy:st,r:nt,a0:dt,a1:ut}=J;e.arc(i+X,s+st,nt,dt,ut)}}e.closePath()}isPointInPath(t,e){const{startAngle:i,endAngle:s,innerRadius:o,outerRadius:a}=this.clipSector??this;return Yv(t-this.centerX,e-this.centerY,{startAngle:i,endAngle:s,innerRadius:Math.min(o,a),outerRadius:Math.max(o,a)})}},cs.className="Sector",v([Ot()],cs.prototype,"centerX",2),v([Ot()],cs.prototype,"centerY",2),v([Ot()],cs.prototype,"innerRadius",2),v([Ot()],cs.prototype,"outerRadius",2),v([Ot()],cs.prototype,"startAngle",2),v([Ot()],cs.prototype,"endAngle",2),v([Ot()],cs.prototype,"clipSector",2),v([Ot()],cs.prototype,"concentricEdgeInset",2),v([Ot()],cs.prototype,"radialEdgeInset",2),v([Ot()],cs.prototype,"startOuterCornerRadius",2),v([Ot()],cs.prototype,"endOuterCornerRadius",2),v([Ot()],cs.prototype,"startInnerCornerRadius",2),v([Ot()],cs.prototype,"endInnerCornerRadius",2)}}),pi,jn,Jv=k({"packages/ag-charts-community/src/chart/themes/defaultColors.ts"(){"use strict";pi={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},jn={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"}}}),zL,tM,eM,Vu,iM,vy,Ft,GQ=k({"packages/ag-charts-community/src/chart/series/polar/donutSeriesProperties.ts"(){"use strict";dg(),ge(),Nt(),su(),Ka(),Jv(),kl(),El(),zL=class extends _e{constructor(){super(...arguments),this.showInLegend=!1}},v([A(bt)],zL.prototype,"showInLegend",2),tM=class extends Ki{constructor(){super(...arguments),this.spacing=2}set(t,e){return super.set(t)}},v([A(it)],tM.prototype,"text",2),v([A(Rt)],tM.prototype,"spacing",2),eM=class extends Ct{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}},v([A(zt)],eM.prototype,"fill",2),v([A(le)],eM.prototype,"fillOpacity",2),Vu=class extends Ki{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}},v([A(lt)],Vu.prototype,"offset",2),v([A(Rt.restrict({min:0,max:360}))],Vu.prototype,"minAngle",2),v([A(lt)],Vu.prototype,"minSpacing",2),v([A(lt)],Vu.prototype,"maxCollisionOffset",2),v([A(bt)],Vu.prototype,"avoidCollisions",2),iM=class extends Ki{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}},v([A(Rt)],iM.prototype,"positionOffset",2),v([A(le)],iM.prototype,"positionRatio",2),vy=class extends Ct{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}},v([A(Hi(fs(Cn,zt,Ln)),{optional:!0})],vy.prototype,"colors",2),v([A(lt)],vy.prototype,"length",2),v([A(lt)],vy.prototype,"strokeWidth",2),Ft=class extends Ko{constructor(){super(...arguments),this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=Object.values(pi),this.strokes=Object.values(jn),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.hideZeroValueSectorsInLegend=!1,this.innerLabels=new pp(tM),this.title=new zL,this.innerCircle=new eM,this.shadow=new Qa,this.calloutLabel=new Vu,this.sectorLabel=new iM,this.calloutLine=new vy,this.tooltip=new zs}},v([A(it)],Ft.prototype,"angleKey",2),v([A(it,{optional:!0})],Ft.prototype,"angleName",2),v([A(it,{optional:!0})],Ft.prototype,"angleFilterKey",2),v([A(it,{optional:!0})],Ft.prototype,"radiusKey",2),v([A(it,{optional:!0})],Ft.prototype,"radiusName",2),v([A(lt,{optional:!0})],Ft.prototype,"radiusMin",2),v([A(lt,{optional:!0})],Ft.prototype,"radiusMax",2),v([A(it,{optional:!0})],Ft.prototype,"calloutLabelKey",2),v([A(it,{optional:!0})],Ft.prototype,"calloutLabelName",2),v([A(it,{optional:!0})],Ft.prototype,"sectorLabelKey",2),v([A(it,{optional:!0})],Ft.prototype,"sectorLabelName",2),v([A(it,{optional:!0})],Ft.prototype,"legendItemKey",2),v([A(Hi(hl))],Ft.prototype,"defaultColorRange",2),v([A(Hi(zt))],Ft.prototype,"defaultPatternFills",2),v([A(Hi(fs(Cn,zt,Ln)))],Ft.prototype,"fills",2),v([A(hl)],Ft.prototype,"strokes",2),v([A(le)],Ft.prototype,"fillOpacity",2),v([A(le)],Ft.prototype,"strokeOpacity",2),v([A(Nn)],Ft.prototype,"lineDash",2),v([A(lt)],Ft.prototype,"lineDashOffset",2),v([A(lt)],Ft.prototype,"cornerRadius",2),v([A(Zs,{optional:!0})],Ft.prototype,"itemStyler",2),v([A(Rt)],Ft.prototype,"rotation",2),v([A(Rt)],Ft.prototype,"outerRadiusOffset",2),v([A(le)],Ft.prototype,"outerRadiusRatio",2),v([A(Rt,{optional:!0})],Ft.prototype,"innerRadiusOffset",2),v([A(le,{optional:!0})],Ft.prototype,"innerRadiusRatio",2),v([A(lt)],Ft.prototype,"strokeWidth",2),v([A(Rt)],Ft.prototype,"sectorSpacing",2),v([A(bt)],Ft.prototype,"hideZeroValueSectorsInLegend",2),v([A(Bb)],Ft.prototype,"innerLabels",2),v([A(ct)],Ft.prototype,"title",2),v([A(ct)],Ft.prototype,"innerCircle",2),v([A(ct)],Ft.prototype,"shadow",2),v([A(ct)],Ft.prototype,"calloutLabel",2),v([A(ct)],Ft.prototype,"sectorLabel",2),v([A(ct)],Ft.prototype,"calloutLine",2),v([A(ct)],Ft.prototype,"tooltip",2)}});function Wu(t,e,i,s){const o=[i.convert(0),i.convert(1)],a=[s.convert(0),s.convert(1)],n=Math.PI/-2+je(e),r=t?"initial":"update",l=({radius:g})=>({innerRadius:o[0],outerRadius:o[0]+(o[1]-o[0])*g}),c=({radius:g})=>({innerRadius:a[0],outerRadius:a[0]+(a[1]-a[0])*g});return{nodes:{toFn:(g,f,x,{prevLive:y})=>{let{startAngle:b,endAngle:S,innerRadius:M,outerRadius:D}=f;const{stroke:L,fill:T}=f.sectorFormat;if(x==="removed"&&y?(b=y.datum?.endAngle,S=y.datum?.endAngle):x==="removed"&&!y&&(b=n,S=n),x==="removed"){const I=l(f);M=I.innerRadius,D=I.outerRadius}return{startAngle:b,endAngle:S,outerRadius:D,innerRadius:M,stroke:L,fill:T}},fromFn:(g,f,x,{prevFromProps:y})=>{let{startAngle:b,endAngle:S,innerRadius:M,outerRadius:D}=g,{fill:L,stroke:T}=f.sectorFormat;if(x==="updated"&&g.previousDatum==null&&(x="added"),x==="unknown"||x==="added"&&!y?(b=n,S=n,M=f.innerRadius,D=f.outerRadius):x==="added"&&y&&(b=y.endAngle??n,S=y.endAngle??n,M=y.innerRadius??f.innerRadius,D=y.outerRadius??f.outerRadius),x==="added"&&!t){const I=c(f);M=I.innerRadius,D=I.outerRadius}return x==="updated"&&(L=g.fill??L,T=(typeof g.stroke=="string"?g.stroke:void 0)??T),{startAngle:b,endAngle:S,innerRadius:M,outerRadius:D,fill:L,stroke:T,phase:r}}},innerCircle:{fromFn:(g,f)=>({size:g.previousDatum?.radius??g.size??0,phase:r}),toFn:(g,f)=>({size:f.radius??0})}}}function FL(t,e){return{startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,stroke:e.sectorFormat.stroke}}function GL(t,e){const i=e.y-t.centerY,s=e.x-t.centerX,o=Math.atan2(i,s),a=t.getItemNodes();for(const n of a)if(n.datum.missing!==!0&&yc(o,n.startAngle,n.endAngle)){const r=Math.sqrt(s*s+i*i);let l=0;return r<n.innerRadius?l=n.innerRadius-r:r>n.outerRadius&&(l=r-n.outerRadius),{datum:n.datum,distance:l}}}var jL=k({"packages/ag-charts-community/src/chart/series/polar/pieUtil.ts"(){"use strict";Ci()}}),VL,jQ=k({"packages/ag-charts-community/src/chart/series/polar/polarZIndexMap.ts"(){"use strict";VL=(t=>(t[t.BACKGROUND=0]="BACKGROUND",t[t.FOREGROUND=1]="FOREGROUND",t[t.HIGHLIGHT=2]="HIGHLIGHT",t[t.LABEL=3]="LABEL",t))(VL||{})}}),My,sM=k({"packages/ag-charts-community/src/chart/series/polar/polarSeries.ts"(){"use strict";vu(),Xt(),Ve(),Nc(),Xa(),Vo(),vm(),UC(),My=class extends kv{constructor({categoryKey:t,useLabelLayer:e=!1,pickModes:i=[1,0],canHaveAxes:s=!1,animationResetFns:o,...a}){super({...a,categoryKey:t,useLabelLayer:e,pickModes:i,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:s}),this.itemGroup=this.contentGroup.appendChild(new It),this.nodeData=[],this.itemSelection=bi.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=bi.select(this.labelGroup,()=>this.labelFactory(),!1),this.highlightSelection=bi.select(this.highlightGroup,()=>this.nodeFactory()),this.highlightLabelSelection=bi.select(this.highlightLabel,()=>this.labelFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.animationResetFns=o,this.animationState=new Pp("empty",{empty:{update:{target:"ready",action:n=>this.animateEmptyUpdateReady(n)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:n=>this.animateReadyHighlight(n),highlightMarkers:n=>this.animateReadyHighlightMarkers(n),resize:n=>this.animateReadyResize(n),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:n=>this.animateWaitingUpdateReady(n)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:n=>this.animateClearingUpdateEmpty(n)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return[...this.itemGroup.children()]}getNodeData(){return this.nodeData}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[t,1],this.highlightGroup.zIndex=[t,2],this.labelGroup.zIndex=[t,3],!0):!1}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}labelFactory(){const t=new Yi;return t.pointerEvents=1,t}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",t=>this.onLegendItemClick(t)),this.ctx.chartEventManager?.addListener("legend-item-double-click",t=>this.onLegendItemDoubleClick(t)))}getInnerRadius(){return 0}computeLabelsBBox(t,e){return null}getShapeFillBBox(){const t=this.radius;return{series:new pt(-t,-t,t*2,t*2),axis:new pt(-t,-t,t*2,t*2)}}resetAllAnimation(){const{item:t,label:e}=this.animationResetFns??{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&bs([this.itemSelection,this.highlightSelection],t),e&&bs([this.labelSelection,this.highlightLabelSelection],e),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(t){const{item:e,label:i}=this.animationResetFns??{};e&&bs([this.highlightSelection],e),i&&bs([this.highlightLabelSelection],i)}animateReadyHighlightMarkers(t){}animateReadyResize(t){this.resetAllAnimation()}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}computeFocusBounds(t){const e=this.getNodeData()?.[t.datumIndex];if(e!==void 0)return this.itemSelection.select(i=>i instanceof io&&i.datum===e)[0]}getSeriesRange(t,e){return[NaN,NaN]}}}}),i4,Dy,VQ=k({"packages/ag-charts-community/src/chart/series/polar/donutSeries.ts"(){"use strict";P(),Ps(),wu(),Xt(),Ve(),Nc(),Mu(),Qv(),Vo(),mp(),Zv(),Ci(),Ac(),zo(),qt(),Ua(),Ir(),zn(),Cu(),wl(),vl(),GQ(),jL(),sM(),i4=class extends zp{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},Dy=class extends My{constructor(t){super({moduleCtx:t,categoryKey:void 0,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:FL,label:Ol}}),this.properties=new Ft,this.phantomNodeData=void 0,this.backgroundGroup=new qs({name:`${this.id}-background`,zIndex:0}),this.noVisibleData=!1,this.previousRadiusScale=new qa,this.radiusScale=new qa,this.phantomGroup=this.backgroundGroup.appendChild(new It({name:"phantom"})),this.phantomSelection=bi.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new It({name:"pieCalloutLabels"})),this.calloutLabelSelection=new bi(this.calloutLabelGroup,It),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new It({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new Xi({shape:"circle"})),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new Xi({shape:"circle"})),this.innerLabelsGroup=this.contentGroup.appendChild(new It({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new It({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=bi.select(this.innerLabelsGroup,Yi),this.innerCircleSelection=bi.select(this.innerCircleGroup,()=>new Xi({shape:"circle"})),this.surroundingRadius=void 0,this.NodeEvent=i4,this.angleScale=new qa,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2}get calloutNodeData(){return this.phantomNodeData??this.nodeData}attachSeries(t,e,i){super.attachSeries(t,e,i),t?.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),t?.removeChild(this.backgroundGroup)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.backgroundGroup.zIndex=[0,t],!0):!1}nodeFactory(){return new cs}getSeriesDomain(t){return t==="x"?this.angleScale.domain:this.radiusScale.domain}async processData(t){if(this.data==null||!this.properties.isValid())return;const{visible:e,id:i,ctx:{legendManager:s}}=this,{angleKey:o,angleFilterKey:a,radiusKey:n,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c}=this.properties,h=()=>(x,y)=>e&&s.getItemEnabled({seriesId:i,itemId:y})?x:0,u=!this.ctx.animationManager.isSkipped(),d=[],p=[];c?d.push(Fn(c,"band",{id:"legendItemKey"})):r?d.push(Fn(r,"band",{id:"calloutLabelKey"})):l&&d.push(Fn(l,"band",{id:"sectorLabelKey"}));const g=this.radiusScale.type,f=this.angleScale.type;n&&p.push(MC(n,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax,processor:h}),Wt(n,g,{id:"radiusRaw",processor:h}),Ou("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),r&&p.push(Wt(r,"band",{id:"calloutLabelValue"})),l&&p.push(Wt(l,"band",{id:"sectorLabelValue"})),c&&p.push(Wt(c,"band",{id:"legendItemValue"})),a&&p.push(Rm(a,f,{id:"angleFilterValue",onlyPositive:!0,invalidValue:0,processor:h}),Wt(a,f,{id:"angleFilterRaw"}),Ou("angleFilterValue",[0,1],0,0)),u&&this.processedData&&d.length>0&&p.push(Up(this.id,this.processedData)),p.push(Wp()),await this.requestDataModel(t,this.data,{props:[...d,Rm(o,f,{id:"angleValue",onlyPositive:!0,invalidValue:0,processor:h}),Wt(o,f,{id:"angleRaw"}),Ou("angleValue",[0,1],0,0),...p]});for(const x of this.processedData?.defs?.values??[]){const{id:y,missing:b,property:S}=x,M=fT(this,b);y!=="angleRaw"&&M>0&&tt.warnOnce(`no value was found for the key '${String(S)}' on ${M} data element${M>1?"s":""}`)}this.animationState.transition("updateData")}maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:t=[],phantomNodeData:e}=this.createNodeData()??{};this.nodeData=t,this.phantomNodeData=e,this.nodeDataRefresh=!1}getProcessedDataValues(t,e){const i=t.resolveColumnById(this,"angleValue",e),s=t.resolveColumnById(this,"angleRaw",e),o=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterValue",e):void 0,a=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterRaw",e):void 0,n=this.properties.radiusKey?t.resolveColumnById(this,"radiusValue",e):void 0,r=this.properties.radiusKey?t.resolveColumnById(this,"radiusRaw",e):void 0,l=this.properties.calloutLabelKey?t.resolveColumnById(this,"calloutLabelValue",e):void 0,c=this.properties.sectorLabelKey?t.resolveColumnById(this,"sectorLabelValue",e):void 0,h=this.properties.legendItemKey?t.resolveColumnById(this,"legendItemValue",e):void 0;return{angleValues:i,angleRawValues:s,angleFilterValues:o,angleFilterRawValues:a,radiusValues:n,radiusRawValues:r,calloutLabelValues:l,sectorLabelValues:c,legendItemValues:h}}createNodeData(){const{id:t,processedData:e,dataModel:i,angleScale:s,ctx:{legendManager:o},visible:a}=this,{rotation:n,innerRadiusRatio:r}=this.properties;if(!this.properties.isValid())return this.zerosumOuterRing.visible=!0,this.zerosumInnerRing.visible=!0,{itemId:t,nodeData:[],labelData:[]};if(!i||e?.type!=="ungrouped")return;const{angleValues:l,angleRawValues:c,angleFilterValues:h,angleFilterRawValues:u,radiusValues:d,radiusRawValues:p,calloutLabelValues:g,sectorLabelValues:f,legendItemValues:x}=this.getProcessedDataValues(i,e),y=u?.some((I,N)=>I>c[N])??!1;let b=0,S=0;const M=[],D=u!=null?[]:void 0,L=e.dataSources.get(this.id)??[],T=e.invalidData?.get(this.id);return L.forEach((I,N)=>{if(T?.[N]===!0)return;const O=y?h[N]:l[N],R=u!=null&&!y?Math.sqrt(u[N]/c[N]):1,_=s.convert(b)+je(n);b=O,S+=O;const B=s.convert(b)+je(n),W=Math.abs(B-_),F=_+W/2,z=c[N],H=(d?.[N]??1)*R,j=p?.[N],V=x?.[N],G=this.getLabels(I,F,W,!0,g?.[N],f?.[N],V),K=this.getSectorFormat(I,N,!1),$={itemId:N,series:this,datum:I,datumIndex:N,angleValue:z,midAngle:F,midCos:Math.cos(F),midSin:Math.sin(F),startAngle:_,endAngle:B,radius:H,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(H),0),sectorFormat:K,radiusValue:j,legendItemValue:V,enabled:a&&o.getItemEnabled({seriesId:t,itemId:N}),focusable:!0,...G};M.push($),D?.push({...$,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1})}),this.zerosumOuterRing.visible=S===0,this.zerosumInnerRing.visible=S===0&&r!=null&&r!==1&&r>0,{itemId:t,nodeData:M,labelData:M,phantomNodeData:D}}getLabels(t,e,i,s,o,a,n){const{calloutLabel:r,sectorLabel:l,legendItemKey:c}=this.properties,h=!s||r.enabled?this.properties.calloutLabelKey:void 0,u=!s||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!u&&!c)return{};const d={datum:t,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>=je(r.minAngle)&&(p.calloutLabel={...this.getTextAlignment(e),text:this.getLabelText(r,{...d,value:o}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),u&&(p.sectorLabel={text:this.getLabelText(l,{...d,value:a})}),c!=null&&n!=null&&(p.legendItem={key:c,text:n}),p}getTextAlignment(t){const e=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=Uf(t),s=-.75*Math.PI,o=i-s,a=Math.floor(o/(Math.PI/2)),n=rA(a,e.length);return e[n]}getNodeFill(t,e,i){return Iu(t,{type:"gradient",bounds:"series",colorStops:e.map(s=>({color:s})),gradient:"radial",rotation:0,reverse:!0},{type:"pattern",pattern:"forward-slanted-lines",fill:i,fillOpacity:1,backgroundFill:"transparent",backgroundFillOpacity:1,stroke:i,strokeOpacity:1,strokeWidth:4,rotation:0})}getFillParams(t,e,i){if(!(!On(t)||t.bounds==="item"))return{centerX:0,centerY:0,innerRadius:e,outerRadius:i}}getSectorFormat(t,e,i){const{angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:n,legendItemKey:r,fills:l,strokes:c,defaultColorRange:h,defaultPatternFills:u,itemStyler:d}=this.properties,p=c[e%c.length],{fill:g,fillOpacity:f,stroke:x,strokeWidth:y,strokeOpacity:b,lineDash:S,lineDashOffset:M,cornerRadius:D}=Vt(i&&this.properties.highlightStyle.item,{fill:l.length>0?l[e%l.length]:void 0,stroke:p,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties),L=h[e%h.length],T=u[e%u.length],I=g??"black";let N;return d&&(N=this.cachedDatumCallback(this.getDatumId(t,e)+(i?"-highlight":"-hide"),()=>this.callWithContext(d,{datum:t,angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:n,legendItemKey:r,fill:this.getNodeFill(I,L,T),fillOpacity:f,stroke:x,strokeWidth:y,strokeOpacity:b,lineDash:S,lineDashOffset:M,cornerRadius:D,highlighted:i,seriesId:this.id}))),{fill:this.getNodeFill(N?.fill??I,L,T),fillOpacity:N?.fillOpacity??f,stroke:N?.stroke??x,strokeWidth:N?.strokeWidth??y,strokeOpacity:N?.strokeOpacity??b,lineDash:N?.lineDash??S,lineDashOffset:N?.lineDashOffset??M,cornerRadius:N?.cornerRadius??D}}getInnerRadius(){const{radius:t}=this,{innerRadiusRatio:e=1,innerRadiusOffset:i=0}=this.properties,s=t*e+i;return s===t||s<0?0:s}getOuterRadius(){const{outerRadiusRatio:t,outerRadiusOffset:e}=this.properties;return Math.max(this.radius*t+e,0)}updateRadiusScale(t){const e=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=e,t&&(this.previousRadiusScale.range=e);const i=s=>({...s,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(s.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const t=Math.max(0,this.radiusScale.range[1]);if(t===0)return NaN;const i=2+(this.properties.title?.spacing??0),s=Math.max(0,-t);return-t-i-s}update({seriesRect:t}){const{title:e}=this.properties,i={seriesRectWidth:t?.width,seriesRectHeight:t?.height},s=fr(this.nodeDataDependencies,i)!=null;if(s&&(this._nodeDataDependencies=i),this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),e){const o=this.getTitleTranslationY();e.node.y=isFinite(o)?o:0;const a=e.node.getBBox();e.node.visible=e.enabled&&isFinite(o)&&!this.bboxIntersectsSurroundingSeries(a)}for(const o of[this.zerosumInnerRing,this.zerosumOuterRing])o.fillOpacity=0,o.stroke=this.properties.calloutLabel.color,o.strokeWidth=1,o.strokeOpacity=1;this.updateNodeMidPoint(),this.updateSelections(),this.updateNodes(t)}updateTitleNodes(){const{oldTitle:t}=this,{title:e}=this.properties;t!==e&&(t&&this.labelGroup?.removeChild(t.node),e&&(e.node.textBaseline="bottom",this.labelGroup?.appendChild(e.node)),this.oldTitle=e)}updateNodeMidPoint(){const t=e=>{const i=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,i),y:e.midSin*Math.max(0,i)}};this.nodeData.forEach(t),this.phantomNodeData?.forEach(t)}updateSelections(){this.updateGroupSelection(),this.updateInnerCircleSelection()}updateGroupSelection(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,highlightLabelSelection:s,calloutLabelSelection:o,labelSelection:a,innerLabelsSelection:n}=this,r=this.nodeData.map(c=>({...c,sectorFormat:{...c.sectorFormat}})),l=(c,h)=>{c.update(h,void 0,u=>this.getDatumId(u.datum,u.datumIndex)),this.ctx.animationManager.isSkipped()&&c.cleanup()};l(t,this.nodeData),l(e,r),l(i,this.phantomNodeData??[]),o.update(this.calloutNodeData,c=>{const h=new Yo;h.tag=0,h.pointerEvents=1,c.appendChild(h);const u=new Yi;u.tag=1,u.pointerEvents=1,c.appendChild(u)}),a.update(this.nodeData),s.update(r),n.update(this.properties.innerLabels,c=>{c.pointerEvents=1})}updateInnerCircleSelection(){const{innerCircle:t}=this.properties;let e=0;const i=this.getInnerRadius();if(i>0){const o=Math.min(i,this.getOuterRadius()),a=1;e=Math.ceil(o*2+a)}const s=t?[{radius:e}]:[];this.innerCircleSelection.update(s)}updateNodes(t){const e=this.ctx.highlightManager.getActiveHighlight(),{visible:i}=this;this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&e?.series===this,this.highlightLabel.visible=i&&e?.series===this,this.labelGroup.visible=i,this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((l,{radius:c})=>{l.setProperties({fill:this.getNodeFill(this.properties.innerCircle?.fill,["black"],"black"),opacity:this.properties.innerCircle?.fillOpacity,size:c})});const s=this.radiusScale.range[0],o=this.radiusScale.range[1],a=this.getShapeFillBBox(),n=this.ctx.animationManager.isSkipped(),r=(l,c,h,u)=>{const d=this.getSectorFormat(c.datum,c.itemId,u);c.sectorFormat.fill=d.fill,c.sectorFormat.stroke=d.stroke,n&&(l.startAngle=c.startAngle,l.endAngle=c.endAngle,l.innerRadius=c.innerRadius,l.outerRadius=c.outerRadius),(u||n)&&(l.fill=d.fill,l.stroke=d.stroke);const p=this.getFillParams(d.fill,s,o);XS(l,d.fill,a,p),l.strokeWidth=d.strokeWidth,l.fillOpacity=d.fillOpacity,l.strokeOpacity=d.strokeOpacity,l.lineDash=d.lineDash,l.lineDashOffset=d.lineDashOffset,l.cornerRadius=d.cornerRadius,l.fillShadow=this.properties.shadow;const g=Math.max((this.properties.sectorSpacing+(d.stroke!=null?d.strokeWidth:0))/2,0);l.inset=g,l.lineJoin=this.properties.sectorSpacing>=0||g>0?"miter":"round"};this.itemSelection.each((l,c,h)=>r(l,c,h,!1)),this.highlightSelection.each((l,c,h)=>{r(l,c,h,!0),l.visible=c.itemId===e?.itemId}),this.phantomSelection.each((l,c,h)=>r(l,c,h,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(t),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:{length:t,strokeWidth:e,colors:i},strokes:s}=this.properties,o=e,a=Q_(i)?i??this.properties.strokes:s,{offset:n}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((r,l)=>{const c=r.closestDatum(),{calloutLabel:h,outerRadius:u}=c;if(h?.text&&!h.hidden&&u!==0){r.visible=!0,r.strokeWidth=o,r.stroke=a[l%a.length],r.fill=void 0;const d=c.midCos*u,p=c.midSin*u;let g=c.midCos*(u+t),f=c.midSin*(u+t);if((h.collisionTextAlign??h.collisionOffsetY!==0)&&h.box!=null){const y=h.box;let b=g,S=f;g<y.x?b=y.x:g>y.x+y.width&&(b=y.x+y.width),f<y.y?S=y.y:f>y.y+y.height&&(S=y.y+y.height);const M=b-g,D=S-f,L=Math.sqrt(Math.pow(M,2)+Math.pow(D,2)),T=L-n;T>0&&(g=g+M*T/L,f=f+D*T/L)}r.x1=d,r.y1=p,r.x2=g,r.y2=f}else r.visible=!1})}getLabelOverflow(t,e,i){const s=-this.centerX,o=s+i.width,a=-this.centerY,n=a+i.height,r=1;let l=1;e.x+r<s?l=(e.x+e.width-s)/e.width:e.x+e.width-r>o&&(l=(o-e.x)/e.width);const c=e.y+r<a||e.y+e.height-r>n,h=l===1?t.length:Math.floor(t.length*l)-1,u=this.bboxIntersectsSurroundingSeries(e);return{textLength:h,hasVerticalOverflow:c,hasSurroundingSeriesOverflow:u}}bboxIntersectsSurroundingSeries(t){const{surroundingRadius:e}=this;if(e==null)return!1;const i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=e**2;return i.some(o=>o.x**2+o.y**2>s)}computeCalloutLabelCollisionOffsets(){const{radiusScale:t}=this,{calloutLabel:e,calloutLine:i}=this.properties,{offset:s,minSpacing:o}=e,a=t.convert(0),n=y=>!y.calloutLabel||y.outerRadius===0,r=this.calloutNodeData,l=r.filter(y=>!n(y));if(l.forEach(y=>{const b=y.calloutLabel;b!=null&&(b.hidden=!1,b.collisionTextAlign=void 0,b.collisionOffsetY=0)}),l.length<=1)return;const c=l.filter(y=>y.midCos<0).sort((y,b)=>y.midSin-b.midSin),h=l.filter(y=>y.midCos>=0).sort((y,b)=>y.midSin-b.midSin),u=l.filter(y=>y.midSin<0&&y.calloutLabel?.textAlign==="center").sort((y,b)=>y.midCos-b.midCos),d=l.filter(y=>y.midSin>=0&&y.calloutLabel?.textAlign==="center").sort((y,b)=>y.midCos-b.midCos),p=y=>{const b=y.calloutLabel;if(b==null)return pt.zero.clone();const S=y.outerRadius+i.length+s,M=y.midCos*S,D=y.midSin*S+b.collisionOffsetY,L=b.collisionTextAlign??b.textAlign,T=b.textBaseline;return Yi.computeBBox(b.text,M,D,{font:this.properties.calloutLabel,textAlign:L,textBaseline:T})},g=(y,b,S)=>{const M=p(y).grow(o/2),D=p(b).grow(o/2);M.x<D.x+D.width&&M.x+M.width>D.x&&(S==="to-top"?M.y<D.y+D.height:M.y+M.height>D.y)&&(b.calloutLabel.collisionOffsetY=S==="to-top"?M.y-D.y-D.height:M.y+M.height-D.y)},f=y=>{const b=y.slice().sort((M,D)=>Math.abs(M.midSin)-Math.abs(D.midSin))[0],S=y.indexOf(b);for(let M=S-1;M>=0;M--){const D=y[M+1],L=y[M];g(D,L,"to-top")}for(let M=S+1;M<y.length;M++){const D=y[M-1],L=y[M];g(D,L,"to-bottom")}},x=y=>{const b=l.some(I=>I.calloutLabel.collisionOffsetY!==0),S=y.map(I=>p(I)),M=S.map(I=>I.clone().grow(o/2));let D=!1;for(let I=0;I<M.length&&!D;I++){const N=M[I];for(let O=I+1;O<y.length;O++){const R=M[O];if(N.collidesBBox(R)){D=!0;break}}}const L=r.map(I=>{const{startAngle:N,endAngle:O,outerRadius:R}=I;return{startAngle:N,endAngle:O,innerRadius:a,outerRadius:R}}),T=S.some(I=>L.some(N=>JF(I,N)));!D&&!b&&!T||y.filter(I=>I.calloutLabel.textAlign==="center").forEach(I=>{const N=I.calloutLabel;I.midCos<0?N.collisionTextAlign="right":I.midCos>0?N.collisionTextAlign="left":N.collisionTextAlign="center"})};f(c),f(h),x(u),x(d)}updateCalloutLabelNodes(t){const{radiusScale:e}=this,{calloutLabel:i,calloutLine:s}=this.properties,o=s.length,{offset:a,color:n}=i,r=new Yi;this.calloutLabelSelection.selectByTag(1).forEach(l=>{const c=l.closestDatum(),h=c.calloutLabel,u=e.convert(c.radius),d=Math.max(0,u);if(!h?.text||d===0||h.hidden){l.visible=!1;return}const p=d+o+a,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,x={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};r.text=h.text,r.x=g,r.y=f,r.setFont(this.properties.calloutLabel),r.setAlign(x);const y=r.getBBox();let b=h.text,S=!0;if(i.avoidCollisions){const{textLength:M,hasVerticalOverflow:D}=this.getLabelOverflow(h.text,y,t);b=h.text.length===M?h.text:`${h.text.substring(0,M)}\u2026`,S=!D}l.text=b,l.x=g,l.y=f,l.setFont(this.properties.calloutLabel),l.setAlign(x),l.fill=n,l.visible=S})}computeLabelsBBox(t,e){const{calloutLabel:i,calloutLine:s}=this.properties,o=s.length,{offset:a,maxCollisionOffset:n,minSpacing:r}=i;if(!i.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Yi;let h;const{title:u}=this.properties;if(u?.text&&u.enabled){const d=this.getTitleTranslationY();isFinite(d)&&(c.text=u.text,c.x=0,c.y=d,c.setFont(u),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.getBBox(),l.push(h))}return this.calloutNodeData.forEach(d=>{const p=d.calloutLabel;if(!p||d.outerRadius===0)return null;const g=d.outerRadius+o+a,f=d.midCos*g,x=d.midSin*g+p.collisionOffsetY;c.text=p.text,c.x=f,c.y=x,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:p.collisionTextAlign??p.textAlign,textBaseline:p.textBaseline});const y=c.getBBox();if(p.box=y,Math.abs(p.collisionOffsetY)>n){p.hidden=!0;return}if(h){const b=-this.centerY,S=new pt(h.x-r,b,h.width+2*r,h.y+h.height+r-b);if(y.collidesBBox(S)){p.hidden=!0;return}}if(t.hideWhenNecessary){const{textLength:b,hasVerticalOverflow:S,hasSurroundingSeriesOverflow:M}=this.getLabelOverflow(p.text,y,e),D=p.text.length>2&&b<2;if(S||D||M){p.hidden=!0;return}}p.hidden=!1,l.push(y)}),l.length===0?null:pt.merge(l)}updateSectorLabelNodes(){const{radiusScale:t}=this,e=t.convert(0),{fontSize:i,fontStyle:s,fontWeight:o,fontFamily:a,positionOffset:n,positionRatio:r,color:l}=this.properties.sectorLabel,c=(h,u)=>{const{sectorLabel:d,outerRadius:p}=u;let g=!1;if(d&&p!==0){const f=e*(1-r)+p*r+n;h.fill=l,h.fontStyle=s,h.fontWeight=o,h.fontSize=i,h.fontFamily=a,h.text=d.text,h.x=u.midCos*f,h.y=u.midSin*f,h.textAlign="center",h.textBaseline="middle";const x=h.getBBox(),y=[[x.x,x.y],[x.x+x.width,x.y],[x.x+x.width,x.y+x.height],[x.x,x.y+x.height]],{startAngle:b,endAngle:S}=u,M={startAngle:b,endAngle:S,innerRadius:e,outerRadius:p};y.every(([D,L])=>Yv(D,L,M))&&(g=!0)}h.visible=g};this.labelSelection.each(c),this.highlightLabelSelection.each(c)}updateInnerLabelNodes(){const t=[],e=[];this.innerLabelsSelection.each((h,u)=>{const{fontStyle:d,fontWeight:p,fontSize:g,fontFamily:f,color:x}=u;h.fontStyle=d,h.fontWeight=p,h.fontSize=g,h.fontFamily=f,h.text=u.text,h.x=0,h.y=0,h.fill=x,h.textAlign="center",h.textBaseline="alphabetic",t.push(h.getBBox()),e.push(u.spacing)});const i=h=>h===0?0:e[h],s=h=>h===e.length-1?0:e[h],o=t.reduce((h,u,d)=>h+u.height+i(d)+s(d),0),a=Math.max(...t.map(h=>h.width)),n=this.getInnerRadius(),l=Math.sqrt(Math.pow(a/2,2)+Math.pow(o/2,2))<=(n>0?n:this.getOuterRadius()),c=[];for(let h=0,u=-o/2;h<t.length;h++){const p=t[h].height+u+i(h);c.push(p),u=p+s(h)}this.innerLabelsSelection.each((h,u,d)=>{h.y=c[d],h.visible=l})}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2,this.zerosumInnerRing.size=this.getInnerRadius()*2}pickNodeClosestDatum(t){return GL(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{legendItemKey:a,calloutLabelKey:n,calloutLabelName:r,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:u,radiusKey:d,radiusName:p,tooltip:g}=o,f=this.properties.title.text;if(!i||!s)return;const x=s.dataSources.get(this.id)?.[t],{angleRawValues:y,legendItemValues:b,calloutLabelValues:S,sectorLabelValues:M}=this.getProcessedDataValues(i,s),D=y[t],L=b?.[t]??(n===h?void 0:S?.[t])??(l===h?void 0:M?.[t])??u;return g.formatTooltip(this.properties,{title:f,symbol:this.legendItemSymbol(t),data:[{label:L,fallbackLabel:h,value:ml(D,3)}]},{seriesId:e,datum:x,title:u,legendItemKey:a,calloutLabelKey:n,calloutLabelName:r,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:u,radiusKey:d,radiusName:p,...this.getSectorFormat(x,t,!1)})}legendItemSymbol(t){const e=this.processedData?.dataSources.get(this.id)?.[t],i=this.getSectorFormat(e,t,!1),{fillOpacity:s,strokeOpacity:o,strokeWidth:a,lineDash:n,lineDashOffset:r}=this.properties;let{fill:l}=i;const{stroke:c}=i;return On(l)&&(l={...l,gradient:"linear",rotation:0,reverse:!1}),{marker:{fill:l,stroke:c,fillOpacity:s,strokeOpacity:o,strokeWidth:a,lineDash:n,lineDashOffset:r}}}getLegendData(t){const{visible:e,processedData:i,dataModel:s,id:o,ctx:{legendManager:a}}=this;if(!s||!i||!this.properties.isValid()||t!=="category")return[];const{angleKey:n,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,showInLegend:h}=this.properties;if(!c&&(!r||r===n)&&(!l||l===n))return[];const{angleRawValues:u,calloutLabelValues:d,sectorLabelValues:p,legendItemValues:g}=this.getProcessedDataValues(s,i),f=this.properties.title?.showInLegend&&this.properties.title.text,x=[],y=this.properties.hideZeroValueSectorsInLegend,b=i.dataSources.get(this.id),S=i.invalidData?.get(this.id);for(let M=0;M<i.input.count;M++){const D=b?.[M],L=u[M];if(S?.[M]===!0||y&&L===0)continue;const T=[];f&&T.push(f);const I=this.getLabels(D,2*Math.PI,2*Math.PI,!1,d?.[M],p?.[M],g?.[M]);c&&I.legendItem!==void 0?T.push(I.legendItem.text):r&&r!==n&&I.calloutLabel?.text!==void 0?T.push(I.calloutLabel?.text):l&&l!==n&&I.sectorLabel?.text!==void 0&&T.push(I.sectorLabel?.text),T.length!==0&&x.push({legendType:"category",id:o,datum:D,itemId:M,seriesId:o,enabled:e&&a.getItemEnabled({seriesId:o,itemId:M}),label:{text:T.join(" - ")},symbol:this.legendItemSymbol(M),legendItemName:c!=null?D[c]:void 0,hideInLegend:!h})}return x}setLegendState(t){const{id:e,ctx:{legendManager:i,updateService:s}}=this;t.forEach((o,a)=>i.toggleItem(o,e,a)),i.update(),s.update(4)}animateEmptyUpdateReady(t){const{animationManager:e}=this.ctx,i=Wu(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);ci(this.id,"nodes",e,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(s,o)=>this.getDatumId(o.datum,o.datumIndex)),ci(this.id,"innerCircle",e,[this.innerCircleSelection],i.innerCircle),ce(this,"callout",e,this.calloutLabelSelection),ce(this,"sector",e,this.labelSelection),ce(this,"highlight",e,this.highlightLabelSelection),ce(this,"inner",e,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,processedData:s,radiusScale:o,previousRadiusScale:a}=this,{animationManager:n}=this.ctx,r=s?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=(r?.moved.size??0)===0,c=(s?.defs.keys.length??0)>0,h=s?.reduced?.animationValidation?.uniqueKeys??!0;(!l||!c||!h)&&this.ctx.animationManager.skipCurrentBatch();const u=!this.nodeData.some(p=>p.enabled),d=Wu(!1,this.properties.rotation,o,a);ci(this.id,"nodes",n,[t,e,i],d.nodes,(p,g)=>this.getDatumId(g.datum,g.datumIndex),r),ci(this.id,"innerCircle",n,[this.innerCircleSelection],d.innerCircle),ce(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),ce(this,"sector",this.ctx.animationManager,this.labelSelection),ce(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.noVisibleData!==u&&(this.noVisibleData=u,ce(this,"inner",this.ctx.animationManager,this.innerLabelsSelection)),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,radiusScale:s,previousRadiusScale:o}=this,{animationManager:a}=this.ctx,n=Wu(!1,this.properties.rotation,s,o);ci(this.id,"nodes",a,[t,e,i],n.nodes,(r,l)=>this.getDatumId(l.datum,l.datumIndex)),ci(this.id,"innerCircle",a,[this.innerCircleSelection],n.innerCircle),zc(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),zc(this,"sector",this.ctx.animationManager,this.labelSelection),zc(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),zc(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumId(t,e){const{calloutLabelKey:i,sectorLabelKey:s,legendItemKey:o}=this.properties;return this.processedData?.reduced?.animationValidation?.uniqueKeys?o?Ss(t[o]):i?Ss(t[i]):s?Ss(t[s]):`${e}`:`${e}`}},Dy.className="DonutSeries",Dy.type="donut"}}),ky,s4=k({"packages/ag-charts-community/src/chart/series/polar/pieSeriesOptionsDef.ts"(){"use strict";P(),qt(),Pl(),ky={type:Mt(gs("pie")),angleKey:Mt(rt),radiusKey:rt,calloutLabelKey:rt,sectorLabelKey:rt,legendItemKey:rt,angleName:rt,radiusName:rt,calloutLabelName:rt,sectorLabelName:rt,radiusMin:ot,radiusMax:ot,rotation:vt,outerRadiusOffset:vt,outerRadiusRatio:Ce,hideZeroValueSectorsInLegend:at,sectorSpacing:ot,cornerRadius:ot,itemStyler:ne,title:{enabled:at,text:rt,showInLegend:at,spacing:ot,...xo},calloutLabel:{enabled:at,offset:vt,minAngle:ot,avoidCollisions:at,formatter:ne,...xo},sectorLabel:{enabled:at,positionOffset:vt,positionRatio:Ce,formatter:ne,...xo},calloutLine:{colors:Oe(Pt),length:ot,strokeWidth:ot},fills:Oe(_f),strokes:Oe(Pt),tooltip:Er,shadow:mg,...tn,...Ga,...mc(Po,["fill"]),...mc(Es,["stroke"])},ky.defaultColorRange=Oe(Oe(Pt)),ky.defaultPatternFills=Oe(Pt)}}),o4,WQ=k({"packages/ag-charts-community/src/chart/series/polar/donutSeriesOptionsDef.ts"(){"use strict";P(),s4(),o4={...ky,type:Mt(gs("donut")),innerRadiusOffset:vt,innerRadiusRatio:Ce,innerCircle:{fill:rt,fillOpacity:Ce},innerLabels:rl({text:Mt(rt),spacing:ot,...xo},"inner label options array")}}}),a4,UQ=k({"packages/ag-charts-community/src/chart/series/polar/donutTheme.ts"(){"use strict";hi(),vi(),a4={series:{title:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.1666666666666667]},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},spacing:5},calloutLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},offset:3,minAngle:.001},sectorLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"backgroundColor"},positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2,colors:{$map:[{$if:[{$or:[{$isGradient:[{$value:"$1"}]},{$isPattern:[{$value:"$1"}]}]},{$path:["../../strokes/$index",{$ref:"foregroundColor"}]},{$value:"$1"}]},{$if:[{$eq:[{$path:"../strokeWidth"},0]},{$path:"../fills"},{$path:"../strokes"}]}]}},fills:{$palette:"fills"},strokes:{$palette:"strokes"},defaultColorRange:{$palette:"gradients"},defaultPatternFills:Mv,fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,innerRadiusRatio:{$if:[{$eq:[{$path:["./innerRadiusOffset",void 0]},void 0]},.7,void 0]},shadow:{enabled:!1,color:Tl,xOffset:3,yOffset:3,blur:5},innerLabels:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:2}},legend:{enabled:!0}}}}),n4,r4,l4=k({"packages/ag-charts-community/src/chart/series/polar/donutSeriesModule.ts"(){"use strict";VQ(),WQ(),UQ(),n4={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",moduleFactory:t=>new Dy(t),tooltipDefaults:{range:"exact"},themeTemplate:a4},r4={type:"series",name:"donut",chartType:"polar",options:o4,create:t=>new Dy(t)}}}),WL,Uu,oM,Ay,Qt,HQ=k({"packages/ag-charts-community/src/chart/series/polar/pieSeriesProperties.ts"(){"use strict";dg(),ge(),Nt(),su(),Ka(),Jv(),kl(),El(),WL=class extends _e{constructor(){super(...arguments),this.showInLegend=!1}},v([A(bt)],WL.prototype,"showInLegend",2),Uu=class extends Ki{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}},v([A(lt)],Uu.prototype,"offset",2),v([A(Rt.restrict({min:0,max:360}))],Uu.prototype,"minAngle",2),v([A(lt)],Uu.prototype,"minSpacing",2),v([A(lt)],Uu.prototype,"maxCollisionOffset",2),v([A(bt)],Uu.prototype,"avoidCollisions",2),oM=class extends Ki{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}},v([A(Rt)],oM.prototype,"positionOffset",2),v([A(le)],oM.prototype,"positionRatio",2),Ay=class extends Ct{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}},v([A(Hi(fs(Cn,zt,Ln)),{optional:!0})],Ay.prototype,"colors",2),v([A(lt)],Ay.prototype,"length",2),v([A(lt)],Ay.prototype,"strokeWidth",2),Qt=class extends Ko{constructor(){super(...arguments),this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=Object.values(pi),this.strokes=Object.values(jn),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.hideZeroValueSectorsInLegend=!1,this.title=new WL,this.shadow=new Qa,this.calloutLabel=new Uu,this.sectorLabel=new oM,this.calloutLine=new Ay,this.tooltip=new zs}},v([A(it)],Qt.prototype,"angleKey",2),v([A(it,{optional:!0})],Qt.prototype,"angleName",2),v([A(it,{optional:!0})],Qt.prototype,"angleFilterKey",2),v([A(it,{optional:!0})],Qt.prototype,"radiusKey",2),v([A(it,{optional:!0})],Qt.prototype,"radiusName",2),v([A(lt,{optional:!0})],Qt.prototype,"radiusMin",2),v([A(lt,{optional:!0})],Qt.prototype,"radiusMax",2),v([A(it,{optional:!0})],Qt.prototype,"calloutLabelKey",2),v([A(it,{optional:!0})],Qt.prototype,"calloutLabelName",2),v([A(it,{optional:!0})],Qt.prototype,"sectorLabelKey",2),v([A(it,{optional:!0})],Qt.prototype,"sectorLabelName",2),v([A(it,{optional:!0})],Qt.prototype,"legendItemKey",2),v([A(Hi(hl))],Qt.prototype,"defaultColorRange",2),v([A(Hi(zt))],Qt.prototype,"defaultPatternFills",2),v([A(Hi(fs(Cn,zt,Ln)))],Qt.prototype,"fills",2),v([A(hl)],Qt.prototype,"strokes",2),v([A(le)],Qt.prototype,"fillOpacity",2),v([A(le)],Qt.prototype,"strokeOpacity",2),v([A(Nn)],Qt.prototype,"lineDash",2),v([A(lt)],Qt.prototype,"lineDashOffset",2),v([A(lt)],Qt.prototype,"cornerRadius",2),v([A(Zs,{optional:!0})],Qt.prototype,"itemStyler",2),v([A(Rt)],Qt.prototype,"rotation",2),v([A(Rt)],Qt.prototype,"outerRadiusOffset",2),v([A(le)],Qt.prototype,"outerRadiusRatio",2),v([A(lt)],Qt.prototype,"strokeWidth",2),v([A(Rt)],Qt.prototype,"sectorSpacing",2),v([A(bt)],Qt.prototype,"hideZeroValueSectorsInLegend",2),v([A(ct)],Qt.prototype,"title",2),v([A(ct)],Qt.prototype,"shadow",2),v([A(ct)],Qt.prototype,"calloutLabel",2),v([A(ct)],Qt.prototype,"sectorLabel",2),v([A(ct)],Qt.prototype,"calloutLine",2),v([A(ct)],Qt.prototype,"tooltip",2)}}),c4,Iy,YQ=k({"packages/ag-charts-community/src/chart/series/polar/pieSeries.ts"(){"use strict";P(),Ps(),wu(),Xt(),Ve(),Nc(),Mu(),Qv(),Vo(),mp(),Zv(),Ci(),Ac(),zo(),qt(),Ua(),Ir(),zn(),Cu(),wl(),vl(),HQ(),jL(),sM(),c4=class extends zp{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey,this.calloutLabelKey=s.properties.calloutLabelKey,this.sectorLabelKey=s.properties.sectorLabelKey}},Iy=class extends My{constructor(t){super({moduleCtx:t,categoryKey:void 0,pickModes:[1,0],useLabelLayer:!0,animationResetFns:{item:FL,label:Ol}}),this.properties=new Qt,this.phantomNodeData=void 0,this.backgroundGroup=new qs({name:`${this.id}-background`,zIndex:0}),this.previousRadiusScale=new qa,this.radiusScale=new qa,this.phantomGroup=this.backgroundGroup.appendChild(new It({name:"phantom"})),this.phantomSelection=bi.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new It({name:"pieCalloutLabels"})),this.calloutLabelSelection=new bi(this.calloutLabelGroup,It),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new It({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new Xi({shape:"circle"})),this.surroundingRadius=void 0,this.NodeEvent=c4,this.angleScale=new qa,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(e=>e+Math.PI/2),this.phantomGroup.opacity=.2}get calloutNodeData(){return this.phantomNodeData??this.nodeData}attachSeries(t,e,i){super.attachSeries(t,e,i),t.appendChild(this.backgroundGroup)}detachSeries(t,e,i){super.detachSeries(t,e,i),t?.removeChild(this.backgroundGroup)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.backgroundGroup.zIndex=[0,t],!0):!1}nodeFactory(){const t=new cs;return t.miterLimit=1e9,t}getSeriesDomain(t){return t==="x"?this.angleScale.domain:this.radiusScale.domain}async processData(t){if(this.data==null||!this.properties.isValid())return;const{visible:e,id:i,ctx:{legendManager:s}}=this,{angleKey:o,angleFilterKey:a,radiusKey:n,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c}=this.properties,h=()=>(x,y)=>e&&s.getItemEnabled({seriesId:i,itemId:y})?x:0,u=!this.ctx.animationManager.isSkipped(),d=[],p=[];c?d.push(Fn(c,"band",{id:"legendItemKey"})):r?d.push(Fn(r,"band",{id:"calloutLabelKey"})):l&&d.push(Fn(l,"band",{id:"sectorLabelKey"}));const g=this.radiusScale.type,f=this.angleScale.type;n&&p.push(MC(n,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax,processor:h}),Wt(n,g,{id:"radiusRaw",processor:h}),Ou("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),r&&p.push(Wt(r,"band",{id:"calloutLabelValue"})),l&&p.push(Wt(l,"band",{id:"sectorLabelValue"})),c&&p.push(Wt(c,"band",{id:"legendItemValue"})),a&&p.push(Rm(a,f,{id:"angleFilterValue",onlyPositive:!0,invalidValue:0,processor:h}),Wt(a,f,{id:"angleFilterRaw"}),Ou("angleFilterValue",[0,1],0,0)),u&&this.processedData?.reduced?.animationValidation?.uniqueKeys&&d.length>0&&p.push(Up(this.id,this.processedData)),p.push(Wp()),await this.requestDataModel(t,this.data,{props:[...d,Rm(o,f,{id:"angleValue",onlyPositive:!0,invalidValue:0,processor:h}),Wt(o,f,{id:"angleRaw"}),Ou("angleValue",[0,1],0,0),...p]});for(const x of this.processedData?.defs?.values??[]){const{id:y,missing:b,property:S}=x,M=fT(this,b);y!=="angleRaw"&&M>0&&tt.warnOnce(`no value was found for the key '${String(S)}' on ${M} data element${M>1?"s":""}`)}this.animationState.transition("updateData")}maybeRefreshNodeData(){if(!this.nodeDataRefresh)return;const{nodeData:t=[],phantomNodeData:e}=this.createNodeData()??{};this.nodeData=t,this.phantomNodeData=e,this.nodeDataRefresh=!1}getProcessedDataValues(t,e){const i=t.resolveColumnById(this,"angleValue",e),s=t.resolveColumnById(this,"angleRaw",e),o=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterValue",e):void 0,a=this.properties.angleFilterKey!=null?t.resolveColumnById(this,"angleFilterRaw",e):void 0,n=this.properties.radiusKey?t.resolveColumnById(this,"radiusValue",e):void 0,r=this.properties.radiusKey?t.resolveColumnById(this,"radiusRaw",e):void 0,l=this.properties.calloutLabelKey?t.resolveColumnById(this,"calloutLabelValue",e):void 0,c=this.properties.sectorLabelKey?t.resolveColumnById(this,"sectorLabelValue",e):void 0,h=this.properties.legendItemKey?t.resolveColumnById(this,"legendItemValue",e):void 0;return{angleValues:i,angleRawValues:s,angleFilterValues:o,angleFilterRawValues:a,radiusValues:n,radiusRawValues:r,calloutLabelValues:l,sectorLabelValues:c,legendItemValues:h}}createNodeData(){const{id:t,processedData:e,dataModel:i,angleScale:s,ctx:{legendManager:o},visible:a}=this,{rotation:n}=this.properties;if(!i||e?.type!=="ungrouped")return;const{angleValues:r,angleRawValues:l,angleFilterValues:c,angleFilterRawValues:h,radiusValues:u,radiusRawValues:d,calloutLabelValues:p,sectorLabelValues:g,legendItemValues:f}=this.getProcessedDataValues(i,e),x=h?.some((T,I)=>T>l[I])??!1;let y=0,b=0;const S=[],M=h!=null?[]:void 0,D=e.dataSources.get(this.id)??[],L=e.invalidData?.get(this.id);return D.forEach((T,I)=>{if(L?.[I]===!0)return;const N=x?c[I]:r[I],O=h!=null&&!x?Math.sqrt(h[I]/l[I]):1,R=s.convert(y)+je(n);y=N,b+=N;const _=s.convert(y)+je(n),B=Math.abs(_-R),W=R+B/2,F=l[I],U=(u?.[I]??1)*O,H=d?.[I],j=f?.[I],V=this.getLabels(T,W,B,!0,p?.[I],g?.[I],j),G=this.getSectorFormat(T,I,!1),K={itemId:I,series:this,datum:T,datumIndex:I,angleValue:F,midAngle:W,midCos:Math.cos(W),midSin:Math.sin(W),startAngle:R,endAngle:_,radius:U,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(U),0),sectorFormat:G,radiusValue:H,legendItemValue:j,enabled:a&&o.getItemEnabled({seriesId:t,itemId:I}),...V};S.push(K),M?.push({...K,radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0)})}),this.zerosumOuterRing.visible=b===0,{itemId:t,nodeData:S,labelData:S,phantomNodeData:M}}getLabels(t,e,i,s,o,a,n){const{calloutLabel:r,sectorLabel:l,legendItemKey:c}=this.properties,h=!s||r.enabled?this.properties.calloutLabelKey:void 0,u=!s||l.enabled?this.properties.sectorLabelKey:void 0;if(!h&&!u&&!c)return{};const d={datum:t,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},p={};return h&&i>=je(r.minAngle)&&(p.calloutLabel={...this.getTextAlignment(e),text:this.getLabelText(r,{...d,value:o}),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0}),u&&(p.sectorLabel={text:this.getLabelText(l,{...d,value:a})}),c!=null&&n!=null&&(p.legendItem={key:c,text:n}),p}getTextAlignment(t){const e=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=Uf(t),s=-.75*Math.PI,o=i-s,a=Math.floor(o/(Math.PI/2)),n=rA(a,e.length);return e[n]}getNodeFill(t,e,i){return Iu(t,{type:"gradient",bounds:"series",colorStops:e.map(s=>({color:s})),gradient:"radial",rotation:0,reverse:!0},{type:"pattern",pattern:"forward-slanted-lines",fill:i,fillOpacity:1,backgroundFill:"transparent",backgroundFillOpacity:1,stroke:i,strokeOpacity:1,strokeWidth:4,rotation:0})}getFillParams(t,e,i){if(!(!On(t)||t.bounds==="item"))return{centerX:0,centerY:0,innerRadius:e,outerRadius:i}}getSectorFormat(t,e,i){const{angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:n,legendItemKey:r,fills:l,strokes:c,defaultColorRange:h,defaultPatternFills:u,itemStyler:d}=this.properties,p=c[e%c.length],{fill:g,fillOpacity:f,stroke:x,strokeWidth:y,strokeOpacity:b,lineDash:S,lineDashOffset:M,cornerRadius:D}=Vt(i&&this.properties.highlightStyle.item,{fill:l.length>0?l[e%l.length]:void 0,stroke:p,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties),L=h[e%h.length],T=u[e%u.length],I=g??"black";let N;return d&&(N=this.cachedDatumCallback(this.getDatumId(t,e)+(i?"-highlight":"-hide"),()=>this.callWithContext(d,{datum:t,angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:n,legendItemKey:r,fill:this.getNodeFill(I,L,T),strokeOpacity:b,stroke:x,strokeWidth:y,fillOpacity:f,lineDash:S,lineDashOffset:M,cornerRadius:D,highlighted:i,seriesId:this.id}))),{fill:this.getNodeFill(N?.fill??I,L,T),fillOpacity:N?.fillOpacity??f,stroke:N?.stroke??x,strokeWidth:N?.strokeWidth??y,strokeOpacity:N?.strokeOpacity??b,lineDash:N?.lineDash??S,lineDashOffset:N?.lineDashOffset??M,cornerRadius:N?.cornerRadius??D}}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(t){const e=[0,this.getOuterRadius()];this.radiusScale.range=e,t&&(this.previousRadiusScale.range=e);const i=s=>({...s,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(s.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){const t=Math.max(0,this.radiusScale.range[1]);if(t===0)return NaN;const i=2+(this.properties.title?.spacing??0),s=Math.max(0,-t);return-t-i-s}update({seriesRect:t}){const{title:e}=this.properties,i={seriesRectWidth:t?.width,seriesRectHeight:t?.height},s=fr(this.nodeDataDependencies,i)!=null;if(s&&(this._nodeDataDependencies=i),this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),e){const o=this.getTitleTranslationY();e.node.y=isFinite(o)?o:0;const a=e.node.getBBox();e.node.visible=e.enabled&&isFinite(o)&&!this.bboxIntersectsSurroundingSeries(a)}this.zerosumOuterRing.fillOpacity=0,this.zerosumOuterRing.stroke=this.properties.calloutLabel.color,this.zerosumOuterRing.strokeWidth=1,this.zerosumOuterRing.strokeOpacity=1,this.updateNodeMidPoint(),this.updateSelections(),this.updateNodes(t)}updateTitleNodes(){const{oldTitle:t}=this,{title:e}=this.properties;t!==e&&(t&&this.labelGroup?.removeChild(t.node),e&&(e.node.textBaseline="bottom",this.labelGroup?.appendChild(e.node)),this.oldTitle=e)}updateNodeMidPoint(){const t=e=>{const i=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,i),y:e.midSin*Math.max(0,i)}};this.nodeData.forEach(t),this.phantomNodeData?.forEach(t)}updateSelections(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,highlightLabelSelection:s,calloutLabelSelection:o,labelSelection:a}=this,n=this.nodeData.map(l=>({...l,sectorFormat:{...l.sectorFormat}})),r=(l,c)=>{l.update(c,void 0,h=>this.getDatumId(h.datum,h.datumIndex)),this.ctx.animationManager.isSkipped()&&l.cleanup()};r(t,this.nodeData),r(e,n),r(i,this.phantomNodeData??[]),o.update(this.calloutNodeData,l=>{const c=new Yo;c.tag=0,c.pointerEvents=1,l.appendChild(c);const h=new Yi;h.tag=1,h.pointerEvents=1,l.appendChild(h)}),a.update(this.nodeData),s.update(n)}updateNodes(t){const e=this.ctx.highlightManager.getActiveHighlight(),{visible:i}=this;this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&e?.series===this,this.highlightLabel.visible=i&&e?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity();const s=this.radiusScale.range[0],o=this.radiusScale.range[1],a=this.getShapeFillBBox(),n=this.ctx.animationManager.isSkipped(),r=(l,c,h,u)=>{const d=this.getSectorFormat(c.datum,c.itemId,u);c.sectorFormat.fill=d.fill,c.sectorFormat.stroke=d.stroke,n&&(l.startAngle=c.startAngle,l.endAngle=c.endAngle,l.innerRadius=c.innerRadius,l.outerRadius=c.outerRadius),(u||n)&&(l.fill=d.fill,l.stroke=d.stroke);const p=this.getFillParams(d.fill,s,o);XS(l,d.fill,a,p),l.strokeWidth=d.strokeWidth,l.fillOpacity=d.fillOpacity,l.strokeOpacity=d.strokeOpacity,l.lineDash=d.lineDash,l.lineDashOffset=d.lineDashOffset,l.cornerRadius=d.cornerRadius,l.fillShadow=this.properties.shadow;const g=Math.max((this.properties.sectorSpacing+(d.stroke!=null?d.strokeWidth:0))/2,0);l.inset=g,l.lineJoin=this.properties.sectorSpacing>=0||g>0?"miter":"round"};this.itemSelection.each((l,c,h)=>r(l,c,h,!1)),this.highlightSelection.each((l,c,h)=>{r(l,c,h,!0),l.visible=c.itemId===e?.itemId}),this.phantomSelection.each((l,c,h)=>r(l,c,h,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(t),this.updateSectorLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")}updateCalloutLineNodes(){const{calloutLine:{length:t,strokeWidth:e,colors:i},strokes:s}=this.properties,o=e,a=Q_(i)?i:s,{offset:n}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((r,l)=>{const c=r.closestDatum(),{calloutLabel:h,outerRadius:u}=c;if(h?.text&&!h.hidden&&u!==0){r.visible=!0,r.strokeWidth=o,r.stroke=a[l%a.length],r.fill=void 0;const d=c.midCos*u,p=c.midSin*u;let g=c.midCos*(u+t),f=c.midSin*(u+t);if((h.collisionTextAlign??h.collisionOffsetY!==0)&&h.box!=null){const y=h.box;let b=g,S=f;g<y.x?b=y.x:g>y.x+y.width&&(b=y.x+y.width),f<y.y?S=y.y:f>y.y+y.height&&(S=y.y+y.height);const M=b-g,D=S-f,L=Math.sqrt(Math.pow(M,2)+Math.pow(D,2)),T=L-n;T>0&&(g=g+M*T/L,f=f+D*T/L)}r.x1=d,r.y1=p,r.x2=g,r.y2=f}else r.visible=!1})}getLabelOverflow(t,e,i){const s=-this.centerX,o=s+i.width,a=-this.centerY,n=a+i.height,r=1;let l=1;e.x+r<s?l=(e.x+e.width-s)/e.width:e.x+e.width-r>o&&(l=(o-e.x)/e.width);const c=e.y+r<a||e.y+e.height-r>n,h=l===1?t.length:Math.floor(t.length*l)-1,u=this.bboxIntersectsSurroundingSeries(e);return{textLength:h,hasVerticalOverflow:c,hasSurroundingSeriesOverflow:u}}bboxIntersectsSurroundingSeries(t){const{surroundingRadius:e}=this;if(e==null)return!1;const i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=e**2;return i.some(o=>o.x**2+o.y**2>s)}computeCalloutLabelCollisionOffsets(){const{radiusScale:t}=this,{calloutLabel:e,calloutLine:i}=this.properties,{offset:s,minSpacing:o}=e,a=t.convert(0),n=y=>!y.calloutLabel||y.outerRadius===0,r=this.calloutNodeData,l=r.filter(y=>!n(y));if(l.forEach(y=>{const b=y.calloutLabel;b!=null&&(b.hidden=!1,b.collisionTextAlign=void 0,b.collisionOffsetY=0)}),l.length<=1)return;const c=l.filter(y=>y.midCos<0).sort((y,b)=>y.midSin-b.midSin),h=l.filter(y=>y.midCos>=0).sort((y,b)=>y.midSin-b.midSin),u=l.filter(y=>y.midSin<0&&y.calloutLabel?.textAlign==="center").sort((y,b)=>y.midCos-b.midCos),d=l.filter(y=>y.midSin>=0&&y.calloutLabel?.textAlign==="center").sort((y,b)=>y.midCos-b.midCos),p=y=>{const b=y.calloutLabel;if(b==null)return pt.zero.clone();const S=y.outerRadius+i.length+s,M=y.midCos*S,D=y.midSin*S+b.collisionOffsetY,L=b.collisionTextAlign??b.textAlign,T=b.textBaseline;return Yi.computeBBox(b.text,M,D,{font:this.properties.calloutLabel,textAlign:L,textBaseline:T})},g=(y,b,S)=>{const M=p(y).grow(o/2),D=p(b).grow(o/2);M.x<D.x+D.width&&M.x+M.width>D.x&&(S==="to-top"?M.y<D.y+D.height:M.y+M.height>D.y)&&(b.calloutLabel.collisionOffsetY=S==="to-top"?M.y-D.y-D.height:M.y+M.height-D.y)},f=y=>{const b=y.slice().sort((M,D)=>Math.abs(M.midSin)-Math.abs(D.midSin))[0],S=y.indexOf(b);for(let M=S-1;M>=0;M--){const D=y[M+1],L=y[M];g(D,L,"to-top")}for(let M=S+1;M<y.length;M++){const D=y[M-1],L=y[M];g(D,L,"to-bottom")}},x=y=>{const b=l.some(I=>I.calloutLabel.collisionOffsetY!==0),S=y.map(I=>p(I)),M=S.map(I=>I.clone().grow(o/2));let D=!1;for(let I=0;I<M.length&&!D;I++){const N=M[I];for(let O=I+1;O<y.length;O++){const R=M[O];if(N.collidesBBox(R)){D=!0;break}}}const L=r.map(I=>{const{startAngle:N,endAngle:O,outerRadius:R}=I;return{startAngle:N,endAngle:O,innerRadius:a,outerRadius:R}}),T=S.some(I=>L.some(N=>JF(I,N)));!D&&!b&&!T||y.filter(I=>I.calloutLabel.textAlign==="center").forEach(I=>{const N=I.calloutLabel;I.midCos<0?N.collisionTextAlign="right":I.midCos>0?N.collisionTextAlign="left":N.collisionTextAlign="center"})};f(c),f(h),x(u),x(d)}updateCalloutLabelNodes(t){const{radiusScale:e}=this,{calloutLabel:i,calloutLine:s}=this.properties,o=s.length,{offset:a,color:n}=i,r=new Yi;this.calloutLabelSelection.selectByTag(1).forEach(l=>{const c=l.closestDatum(),h=c.calloutLabel,u=e.convert(c.radius),d=Math.max(0,u);if(!h?.text||d===0||h.hidden){l.visible=!1;return}const p=d+o+a,g=c.midCos*p,f=c.midSin*p+h.collisionOffsetY,x={textAlign:h.collisionTextAlign??h.textAlign,textBaseline:h.textBaseline};r.text=h.text,r.x=g,r.y=f,r.setFont(this.properties.calloutLabel),r.setAlign(x);const y=r.getBBox();let b=h.text,S=!0;if(i.avoidCollisions){const{textLength:M,hasVerticalOverflow:D}=this.getLabelOverflow(h.text,y,t);b=h.text.length===M?h.text:`${h.text.substring(0,M)}\u2026`,S=!D}l.text=b,l.x=g,l.y=f,l.setFont(this.properties.calloutLabel),l.setAlign(x),l.fill=n,l.visible=S})}computeLabelsBBox(t,e){const{calloutLabel:i,calloutLine:s}=this.properties,o=s.length,{offset:a,maxCollisionOffset:n,minSpacing:r}=i;if(!i.avoidCollisions)return null;this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();const l=[],c=new Yi;let h;const{title:u}=this.properties;if(u?.text&&u.enabled){const d=this.getTitleTranslationY();isFinite(d)&&(c.text=u.text,c.x=0,c.y=d,c.setFont(u),c.setAlign({textBaseline:"bottom",textAlign:"center"}),h=c.getBBox(),l.push(h))}return this.calloutNodeData.forEach(d=>{const p=d.calloutLabel;if(!p||d.outerRadius===0)return null;const g=d.outerRadius+o+a,f=d.midCos*g,x=d.midSin*g+p.collisionOffsetY;c.text=p.text,c.x=f,c.y=x,c.setFont(this.properties.calloutLabel),c.setAlign({textAlign:p.collisionTextAlign??p.textAlign,textBaseline:p.textBaseline});const y=c.getBBox();if(p.box=y,Math.abs(p.collisionOffsetY)>n){p.hidden=!0;return}if(h){const b=-this.centerY,S=new pt(h.x-r,b,h.width+2*r,h.y+h.height+r-b);if(y.collidesBBox(S)){p.hidden=!0;return}}if(t.hideWhenNecessary){const{textLength:b,hasVerticalOverflow:S,hasSurroundingSeriesOverflow:M}=this.getLabelOverflow(p.text,y,e),D=p.text.length>2&&b<2;if(S||D||M){p.hidden=!0;return}}p.hidden=!1,l.push(y)}),l.length===0?null:pt.merge(l)}updateSectorLabelNodes(){const{radiusScale:t}=this,e=t.convert(0),{fontSize:i,fontStyle:s,fontWeight:o,fontFamily:a,positionOffset:n,positionRatio:r,color:l}=this.properties.sectorLabel,c=e>0,h=this.ctx.legendManager.getData(this.id)?.filter(d=>d.enabled).length===1,u=(d,p)=>{const{sectorLabel:g,outerRadius:f,startAngle:x,endAngle:y}=p;let b=!1;if(g&&f!==0){const S=e*(1-r)+f*r+n;d.fill=l,d.fontStyle=s,d.fontWeight=o,d.fontSize=i,d.fontFamily=a,d.text=g.text,!c&&h?(d.x=0,d.y=0):(d.x=p.midCos*S,d.y=p.midSin*S),d.textAlign="center",d.textBaseline="middle";const D=d.getBBox(),L=[[D.x,D.y],[D.x+D.width,D.y],[D.x+D.width,D.y+D.height],[D.x,D.y+D.height]],T={startAngle:x,endAngle:y,innerRadius:e,outerRadius:f};L.every(([I,N])=>Yv(I,N,T))&&(b=!0)}d.visible=b};this.labelSelection.each(u),this.highlightLabelSelection.each(u)}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2}pickNodeClosestDatum(t){return GL(this,t)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{legendItemKey:a,calloutLabelKey:n,calloutLabelName:r,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:u,radiusKey:d,radiusName:p,tooltip:g}=o,f=this.properties.title.text;if(!i||!s)return;const x=s.dataSources.get(this.id)?.[t],{angleRawValues:y,legendItemValues:b,calloutLabelValues:S,sectorLabelValues:M}=this.getProcessedDataValues(i,s),D=y[t],L=b?.[t]??(n===h?void 0:S?.[t])??(l===h?void 0:M?.[t])??u;return g.formatTooltip(this.properties,{title:f,symbol:this.legendItemSymbol(t),data:[{label:L,fallbackLabel:h,value:ml(D,3)}]},{seriesId:e,datum:x,title:u,legendItemKey:a,calloutLabelKey:n,calloutLabelName:r,sectorLabelKey:l,sectorLabelName:c,angleKey:h,angleName:u,radiusKey:d,radiusName:p,...this.getSectorFormat(x,t,!1)})}legendItemSymbol(t){const e=this.processedData?.dataSources.get(this.id)?.[t],i=this.getSectorFormat(e,t,!1),{fillOpacity:s,strokeOpacity:o,strokeWidth:a,lineDash:n,lineDashOffset:r}=this.properties;let{fill:l}=i;const{stroke:c}=i;return On(l)&&(l={...l,gradient:"linear",rotation:0,reverse:!1}),{marker:{fill:l,stroke:c,fillOpacity:s,strokeOpacity:o,strokeWidth:a,lineDash:n,lineDashOffset:r}}}getLegendData(t){const{id:e,visible:i,processedData:s,dataModel:o,ctx:{legendManager:a}}=this;if(!o||!s||t!=="category")return[];const{angleKey:n,calloutLabelKey:r,sectorLabelKey:l,legendItemKey:c,showInLegend:h}=this.properties;if(!c&&(!r||r===n)&&(!l||l===n))return[];const{calloutLabelValues:u,sectorLabelValues:d,legendItemValues:p,angleRawValues:g}=this.getProcessedDataValues(o,s),f=this.properties.title?.showInLegend&&this.properties.title.text,x=[],y=this.properties.hideZeroValueSectorsInLegend,b=s.dataSources.get(this.id),S=s.invalidData?.get(this.id);for(let M=0;M<s.input.count;M++){const D=b?.[M],L=g[M];if(S?.[M]===!0||y&&L===0)continue;const T=[];f&&T.push(f);const I=this.getLabels(D,2*Math.PI,2*Math.PI,!1,u?.[M],d?.[M],p?.[M]);c&&I.legendItem!==void 0?T.push(I.legendItem.text):r&&r!==n&&I.calloutLabel?.text!==void 0?T.push(I.calloutLabel?.text):l&&l!==n&&I.sectorLabel?.text!==void 0&&T.push(I.sectorLabel?.text),T.length!==0&&x.push({legendType:"category",id:e,datum:D,itemId:M,seriesId:e,enabled:i&&a.getItemEnabled({seriesId:e,itemId:M}),label:{text:T.join(" - ")},symbol:this.legendItemSymbol(M),legendItemName:c!=null?D[c]:void 0,hideInLegend:!h})}return x}setLegendState(t){const{id:e,ctx:{legendManager:i,updateService:s}}=this;t.forEach((o,a)=>i.toggleItem(o,e,a)),i.update(),s.update(4)}animateEmptyUpdateReady(t){const{animationManager:e}=this.ctx,i=Wu(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);ci(this.id,"nodes",e,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(s,o)=>this.getDatumId(o.datum,o.datumIndex)),ce(this,"callout",e,this.calloutLabelSelection),ce(this,"sector",e,this.labelSelection),ce(this,"highlight",e,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,processedData:s,radiusScale:o,previousRadiusScale:a}=this,{animationManager:n}=this.ctx,r=s?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const l=(r?.moved.size??0)===0,c=(s?.defs.keys.length??0)>0,h=s?.reduced?.animationValidation?.uniqueKeys??!0;(!l||!c||!h)&&this.ctx.animationManager.skipCurrentBatch();const u=Wu(!1,this.properties.rotation,o,a);ci(this.id,"nodes",n,[t,e,i],u.nodes,(d,p)=>this.getDatumId(p.datum,p.datumIndex),r),ce(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),ce(this,"sector",this.ctx.animationManager,this.labelSelection),ce(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){const{itemSelection:t,highlightSelection:e,phantomSelection:i,radiusScale:s,previousRadiusScale:o}=this,{animationManager:a}=this.ctx,n=Wu(!1,this.properties.rotation,s,o);ci(this.id,"nodes",a,[t,e,i],n.nodes,(r,l)=>this.getDatumId(l.datum,l.datumIndex)),zc(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),zc(this,"sector",this.ctx.animationManager,this.labelSelection),zc(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumId(t,e){const{calloutLabelKey:i,sectorLabelKey:s,legendItemKey:o}=this.properties;return this.processedData?.reduced?.animationValidation?.uniqueKeys?o?Ss(t[o]):i?Ss(t[i]):s?Ss(t[s]):`${e}`:`${e}`}},Iy.className="PieSeries",Iy.type="pie"}}),h4,KQ=k({"packages/ag-charts-community/src/chart/series/polar/pieTheme.ts"(){"use strict";hi(),vi(),h4={series:{title:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.1666666666666667]},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},spacing:5},calloutLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},offset:3,minAngle:.001},sectorLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"backgroundColor"},positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2,colors:{$map:[{$if:[{$or:[{$isGradient:[{$value:"$1"}]},{$isPattern:[{$value:"$1"}]}]},{$path:["../../strokes/$index",{$ref:"foregroundColor"}]},{$value:"$1"}]},{$if:[{$eq:[{$path:"../strokeWidth"},0]},{$path:"../fills"},{$path:"../strokes"}]}]}},fills:{$palette:"fills"},strokes:{$palette:"strokes"},defaultColorRange:{$palette:"gradients"},defaultPatternFills:Mv,fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:Tl,xOffset:3,yOffset:3,blur:5}},legend:{enabled:!0}}}}),u4,d4,p4=k({"packages/ag-charts-community/src/chart/series/polar/pieSeriesModule.ts"(){"use strict";YQ(),s4(),KQ(),u4={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",moduleFactory:t=>new Iy(t),tooltipDefaults:{range:"exact"},themeTemplate:h4},d4={type:"series",name:"pie",chartType:"polar",options:ky,create:t=>new Iy(t)}}});function UL(){Tn.register(wC,Uz,cz,LF,ML,WF,OL,XF,n4,u4,HF);for(const t of[Cr,_c,Dl,Pc,Eu])Lc.register(t.type,{moduleFactory:e=>new t(e)})}var g4=k({"packages/ag-charts-community/src/chart/factory/registerInbuiltModules.ts"(){"use strict";D7(),hr(),Nu(),ov(),nv(),zm(),rv(),Bz(),sQ(),gL(),kL(),TL(),NL(),EL(),PL(),l4(),p4(),CS()}});function $Q(){for(const t of Tn.modules){if(t.packageType==="enterprise"&&!xq(t)&&tt.errorOnce("Unexpected enterprise module registered: "+t.identifier),t.type==="root"&&t.themeTemplate)for(const e of t.chartTypes)OS.set(e,t.themeTemplate);if(t.type==="series"){if(t.chartTypes.length>1)throw new Error(`AG Charts - Module definition error: ${t.identifier}`);ga.register(t.identifier,t)}if(t.type==="series-option"&&t.themeTemplate)for(const e of t.seriesTypes)ga.setThemeTemplate(e,t.themeTemplate);if(t.type==="axis-option"&&t.themeTemplate)for(const e of t.axisTypes){const i=Lc.getThemeTemplate(e),s=Vt(t.themeTemplate,i);Lc.setThemeTemplate(e,s)}t.type==="axis"&&Lc.register(t.identifier,t),t.type==="legend"&&NS.register(t.identifier,t)}if(Tn.hasEnterpriseModules()){const t=bq();t.length>0&&tt.errorOnce("Enterprise modules expected but not registered: ",t)}}var XQ=k({"packages/ag-charts-community/src/chart/factory/setupModules.ts"(){"use strict";P(),hr(),qt(),CS(),Sm(),LS(),vT(),wS()}}),f4,Ty,m4,ZQ=k({"packages/ag-charts-community/src/chart/cartesianChart.ts"(){"use strict";P(),Ps(),So(),da(),Nu(),QS(),$o(),f4=["top","right","bottom","left"],Ty=class c6 extends Em{constructor(e,i){super(e,i),this.paired=!0,this.lastUpdateClipRect=void 0,this.lastLayoutWidth=NaN,this.lastLayoutHeight=NaN}onAxisChange(e,i){super.onAxisChange(e,i),this.ctx!=null&&this.ctx.zoomManager.updateAxes(e)}destroySeries(e){super.destroySeries(e),this.lastLayoutWidth=NaN,this.lastLayoutHeight=NaN}getChartType(){return"cartesian"}setRootClipRects(e){const{seriesRoot:i,annotationRoot:s}=this;i.setClipRect(e),s.setClipRect(e)}async processData(){await super.processData();for(const e of this.axes){const i=this.getSyncedDomain(e);i!=null&&e.setDomains(i)}this.ctx.updateService.dispatchProcessData({series:{shouldFlipXY:this.shouldFlipXY()}})}performLayout(e){const{seriesRoot:i,annotationRoot:s}=this,{clipSeries:o,seriesRect:a,visible:n}=this.updateAxes(e.layoutBox);this.seriesRoot.visible=n,this.seriesRect=a,this.animationRect=e.layoutBox;const{x:r,y:l}=a;if(e.width!==this.lastLayoutWidth||e.height!==this.lastLayoutHeight)for(const d of[i,s])d.translationX=Math.floor(r),d.translationY=Math.floor(l);else{const{translationX:d,translationY:p}=i;bl(this.id,"seriesRect",this.ctx.animationManager,[i,s],{translationX:d,translationY:p},{translationX:Math.floor(r),translationY:Math.floor(l)},{phase:"update"})}this.lastLayoutWidth=e.width,this.lastLayoutHeight=e.height;const c=a.clone().grow(this.seriesArea.padding),h=this.seriesArea.clip||o?c:void 0,{lastUpdateClipRect:u}=this;this.lastUpdateClipRect=h,this.ctx.animationManager.isActive()&&u!=null?this.ctx.animationManager.animate({id:this.id,groupId:"clip-rect",phase:"update",from:u,to:c,onUpdate:d=>this.setRootClipRects(d),onComplete:()=>this.setRootClipRects(h)}):this.setRootClipRects(h),this.ctx.layoutManager.emitLayoutComplete(e,{axes:this.axes.map(d=>d.getLayoutState()),series:{visible:n,rect:a,paddedRect:c},clipSeries:o})}updateAxes(e){const{clipSeries:i,seriesRect:s,overflows:o}=this.resolveAxesLayout(e);for(const a of this.axes)a.update(),a.setCrossLinesVisible(!o),this.clipAxis(a,s,e);return{clipSeries:i,seriesRect:s,visible:!o}}resolveAxesLayout(e){let i,s,o=0;const a=10;do if(s=i??this.getDefaultState(),i=this.updateAxesPass(new Map(s.axisAreaWidths),e.clone()),o++>a){tt.warn("Max iterations reached. Unable to stabilize axes layout.");break}while(!this.isLayoutStable(i,s));return this.lastAreaWidths=i.axisAreaWidths,i}updateAxesPass(e,i){const s=new Map,o={};let a=!1,n=!1;for(const y of f4){const b=this.seriesArea.padding[y],S=this.axes.findLast(M=>M.position===y);S?S.seriesAreaPadding=b:i.shrink(b,y)}const r=(e.get("left")??0)+(e.get("right")??0),l=(e.get("top")??0)+(e.get("bottom")??0),c=this.buildCrossLinePadding(e);i.width<=r+c.hPadding||i.height<=l+c.vPadding?a=!0:i.shrink(c);const h=i.clone().shrink(Object.fromEntries(e));for(const y of this.axes){const{position:b="left",direction:S}=y;this.sizeAxis(y,h,b);const M=S==="y",{primaryTickCount:D,bbox:L}=y.calculateLayout(y.nice?o[S]:void 0);o[S]??(o[S]=D),n||(n=y.dataDomain.clipped||y.visibleRange[0]>0||y.visibleRange[1]<1),s.set(y.id,Math.ceil(y.thickness??(M?L?.width:L?.height)??0))}const u=fb(this.axes,y=>y.position??"left"),{width:d,height:p,pixelRatio:g}=this.ctx.scene,f=new Map,x=new Map;for(const[y,b]of ja(u)){let M=y==="left"||y==="right"?p%g:d%g,D=0;for(const L of b??[]){x.set(L.id,M);const T=s.get(L.id)??0;D=Math.max(D,M+T),L.layoutConstraints.stacked&&(M+=T+c6.AxesPadding)}f.set(y,Math.ceil(D))}for(const[y,b]of ja(u))this.positionAxes({axes:b??[],position:y,axisWidths:s,axisOffsets:x,axisAreaWidths:f,axisBound:i,seriesRect:h});return{clipSeries:n,seriesRect:h,axisAreaWidths:f,overflows:a}}buildCrossLinePadding(e){const i={top:0,right:0,bottom:0,left:0,hPadding:0,vPadding:0};this.axes.forEach(s=>{s.crossLines?.forEach(o=>{o.calculatePadding?.(i)})});for(const[s,o=0]of ja(i))i[s]=Math.max(o-(e.get(s)??0),0);return i.hPadding=i.left+i.right,i.vPadding=i.top+i.bottom,i}clampToOutsideSeriesRect(e,i,s,o){const a=s==="x"?e.x:e.y,n=s==="x"?e.width:e.height;return o===1?Math.min(i,a+n):Math.max(i,a)}getSyncedDomain(e){const i=this.modulesManager.getModule("sync");if(!i?.enabled)return;const s=i.getSyncedDomain(e);if(s&&e.dataDomain.domain.length){let o;const{domain:a}=e.scale;if(pe.is(e.scale)){const[n,r]=Li(s);o=n!==a[0]||r!==a[1]}else o=!An(s,a);o&&!this.skipSync&&i.updateSiblings()}return s}sizeAxis(e,i,s){const o=e instanceof _c,a=s==="left"||s==="right",{width:n,height:r}=i,l=a?r:n;let c=0,h=l,{min:u,max:d}=this.ctx.zoomManager.getAxisZoom(e.id);const{width:p,unit:g,align:f}=e.layoutConstraints;g==="px"?h=c+p:h=h*p/100,f==="end"&&(c=l-(h-c),h=l),a&&(o?[u,d]=[1-d,1-u]:[c,h]=[h,c]),e.range=[c,h],e.visibleRange=[u,d],e.gridLength=a?n:r}positionAxes(e){const{axes:i,axisBound:s,axisWidths:o,axisOffsets:a,axisAreaWidths:n,seriesRect:r,position:l}=e,c=n.get(l)??0;let h="x",u="y",d=1;(l==="top"||l==="bottom")&&(h="y",u="x");let p=s[h];(l==="right"||l==="bottom")&&(d=-1,p+=h==="x"?s.width:s.height);for(const g of i){const f=n.get(u==="x"?"left":"top")??0,x=o.get(g.id)??0,y=a.get(g.id)??0;g.gridPadding=c-y-x,g.translation[u]=s[u]+f,g.translation[h]=this.clampToOutsideSeriesRect(r,p+d*(y+x),h,d)}}shouldFlipXY(){return this.series.every(e=>e instanceof _l&&e.shouldFlipXY())}getDefaultState(){const e=new Map;if(this.lastAreaWidths)for(const{position:i="left"}of this.axes){const s=this.lastAreaWidths.get(i);s!=null&&e.set(i,s)}return{axisAreaWidths:e,clipSeries:!1,overflows:!1}}isLayoutStable(e,i){if(i.overflows!==e.overflows||i.clipSeries!==e.clipSeries)return!1;for(const s of e.axisAreaWidths.keys())if(!i.axisAreaWidths.has(s))return!1;for(const[s,o]of i.axisAreaWidths.entries()){const a=e.axisAreaWidths.get(s);if((o!=null||a!=null)&&o!==a)return!1}return!0}clipAxis(e,i,s){const o=Math.ceil(e.gridLine?.width??0),a=Math.ceil(e.line?.width??0);let{width:n,height:r}=i;switch(n+=e.direction==="x"?o:a,r+=e.direction==="y"?o:a,e.clipGrid(i.x,i.y,n,r),e.position){case"left":case"right":e.clipTickLines(s.x,i.y-o,s.width+o,i.height+o*2);break;case"top":case"bottom":e.clipTickLines(i.x-o,s.y,i.width+o*2,s.height+o);const{label:l,labelNodes:c,scale:h}=e;if(pe.is(h)&&l.enabled&&l.avoidCollisions&&c.length>1){const u=c.toSorted((f,x)=>f.translationY-x.translationY),d=u.at(-1),p=d.getBBox(),g=i.x+p.y+p.height<=s.x+s.width+this.padding.right;if(d.visible=g,g||e.visibleRange[0]>0||e.visibleRange[1]<1)u[0].visible=!0;else{const f=u[0].getBBox();u[0].visible=f.y>=0}}break}}},Ty.className="CartesianChart",Ty.type="cartesian",Ty.AxesPadding=15,m4=Ty}}),y4,Vc,HL,YL,x4,b4,S4,v4,M4,KL=k({"packages/ag-charts-community/src/chart/chartOptionsDefs.ts"(){"use strict";P(),Pl(),y4=ae(t=>typeof HTMLElement>"u"||t instanceof HTMLElement,"an html element"),Vc={mode:_t("integrated","standalone"),container:y4,theme:yo,series:Fa,annotations:yo,navigator:yo,initialState:yo},HL={...oo,...Vc,axes:yo,data:Fa},YL={...oo,...Vc,axes:yo,data:Fa},x4={...oo,...Vc,data:Fa,topology:jh},b4={...oo,...Vc,data:Fa},S4={...oo,...Vc,data:Fa},v4={...oo,...Vc,data:Fa,nodes:Fa},M4={...oo,...Vc,data:Fa}}}),D4,qQ=k({"packages/ag-charts-community/src/chart/cartesianChartModule.ts"(){"use strict";ZQ(),KL(),ku(),D4={type:"chart",name:"cartesian",options:HL,detect:$T,create(t,e){return new m4(t,e)}}}}),Sg,k4,A4,I4,T4,C4,QQ=k({"packages/ag-charts-community/src/chart/enterpriseChartModules.ts"(){"use strict";ku(),Sg=()=>{throw new Error("Enterprise module placeholder cannot be initialised")},k4={type:"chart",name:"flow-proportion",placeholder:!0,options:{},detect:MB,create:Sg},A4={type:"chart",name:"gauge",placeholder:!0,options:{},detect:ZT,create:Sg},I4={type:"chart",name:"hierarchy",placeholder:!0,options:{},detect:SB,create:Sg},T4={type:"chart",name:"standalone",placeholder:!0,options:{},detect:XT,create:Sg},C4={type:"chart",name:"topology",placeholder:!0,options:{},detect:vB,create:Sg}}}),Hu,L4=k({"packages/ag-charts-community/src/chart/axis/polarAxis.ts"(){"use strict";Nt(),WT(),jT(),Hu=class extends HS{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}updatePosition(){super.updatePosition();const t=WS(this),e=zT(t);this.axisGroup.setProperties(this.getAxisTransform()),this.gridLineGroupSelection.each(e),this.tickLineGroupSelection.each(e),this.tickLabelGroupSelection.each(FT())}computeLabelsBBox(t,e){return null}computeRange(){}getAxisLinePoints(){}},v([A(fe(["polygon","circle"],"a polar axis shape"))],Hu.prototype,"shape",2),v([A(le)],Hu.prototype,"innerRadiusRatio",2)}});function JQ(t){return t instanceof My}function tJ(t){return t instanceof Hu}var aM,eJ=k({"packages/ag-charts-community/src/chart/polarChart.ts"(){"use strict";P(),Xt(),qA(),L4(),QS(),sM(),aM=class extends Em{constructor(t,e){super(t,e),this.padding=new dl(40),this.ctx.axisManager.axisGroup.zIndex=6}getChartType(){return"polar"}async performLayout(t){const{layoutBox:e}=t;e.shrink(this.seriesArea.padding.toJson());const i=e.clone();this.seriesRect=i,this.animationRect=i,this.seriesRoot.translationX=i.x,this.seriesRoot.translationY=i.y,await this.computeCircle(i),this.axes.forEach(s=>s.update()),this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:i,paddedRect:i}})}updateAxes(t,e,i,s){const o=this.axes.find(l=>l.direction==="x"),a=this.axes.find(l=>l.direction==="y");if(!(o instanceof Hu)||!(a instanceof Hu))return;const n=o.scale,r=a.innerRadiusRatio;o.innerRadiusRatio=r,o.computeRange(),o.gridLength=s,a.gridAngles=n.ticks({nice:o.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.map(l=>n.convert(l)),a.gridRange=o.range,a.range=[s,s*r],[o,a].forEach(l=>{l.translation.x=t.x+e,l.translation.y=t.y+i,l.calculateLayout()})}async computeCircle(t){const e=this.series.filter(JQ),i=this.axes.filter(tJ),s=(c,h,u)=>{this.updateAxes(t,c,h,u),e.forEach(p=>{p.centerX=c,p.centerY=h,p.radius=u});const d=e.filter(p=>p.type==="donut"||p.type==="pie");if(d.length>1){const p=d.map(g=>{const f=g.getInnerRadius();return{series:g,innerRadius:f}}).sort((g,f)=>g.innerRadius-f.innerRadius);p.at(-1).series.surroundingRadius=void 0;for(let g=0;g<p.length-1;g++)p[g].series.surroundingRadius=p[g+1].innerRadius}},o=t.width/2,a=t.height/2,n=Math.max(0,Math.min(t.width,t.height)/2);let r=n;s(o,a,r);const l=async({hideWhenNecessary:c=!1}={})=>{const h=[];for(const p of gc(i,e)){const g=await p.computeLabelsBBox({hideWhenNecessary:c},t);g&&h.push(g)}if(h.length===0){s(o,a,n);return}const u=pt.merge(h),d=this.refineCircle(u,r,t);s(d.centerX,d.centerY,d.radius),r=d.radius};await l(),await l(),await l(),await l({hideWhenNecessary:!0}),await l({hideWhenNecessary:!0});for(const c of gc(i,e))await c.computeLabelsBBox({hideWhenNecessary:!0},t);return{radius:r,centerX:o,centerY:a}}refineCircle(t,e,i){const o=-e,a=-e,n=e,r=e;let l=Math.max(0,o-t.x),c=Math.max(0,a-t.y),h=Math.max(0,t.x+t.width-n),u=Math.max(0,t.y+t.height-r);l=h=Math.max(l,h),c=u=Math.max(c,u);const d=i.width-l-h,p=i.height-c-u;let g=Math.min(d,p)/2;const f=.5*i.width/2,x=.5*i.height/2,y=Math.min(f,x);if(g<y){g=y;const M=l+h,D=c+u;if(2*g+D>i.height){const L=i.height-2*g;Math.min(c,u)*2>L?(c=L/2,u=L/2):c>u?c=L-u:u=L-c}if(2*g+M>i.width){const L=i.width-2*g;Math.min(l,h)*2>L?(l=L/2,h=L/2):l>h?l=L-h:h=L-l}}const b=l+2*g+h,S=c+2*g+u;return{centerX:(i.width-b)/2+l+g,centerY:(i.height-S)/2+c+g,radius:g}}},aM.className="PolarChart",aM.type="polar"}}),N4,iJ=k({"packages/ag-charts-community/src/chart/polarChartModule.ts"(){"use strict";KL(),ku(),eJ(),N4={type:"chart",name:"polar",options:YL,detect:bB,create(t,e){return new aM(t,e)}}}}),O4,w4,E4,_4,R4,P4,B4,z4,F4,G4,sJ=k({"packages/ag-charts-community/src/module/axisModules.ts"(){"use strict";P(),hL(),Nu(),ov(),nv(),zm(),rv(),O4={...ju,...Ev(vt),type:Mt(gs("number")),label:{format:ly,...Gu},crosshair:gg(!0)},w4={...ju,...Ev(vt),type:Mt(gs("log")),base:as(np,ae(t=>t!==1,"not equal to 1")),label:{format:ly,...Gu},crosshair:gg(!0)},E4={...ju,...Ev(Ge(vt,pc),!0),type:Mt(gs("time")),label:{...Gu,format:rt},crosshair:gg(!0)},_4={...ju,type:Mt(gs("category")),label:Gu,paddingInner:ot,paddingOuter:ot,groupPaddingInner:ot,crosshair:gg()},R4={...ju,type:Mt(gs("grouped-category")),label:Gu,crosshair:gg(),paddingInner:ot,groupPaddingInner:ot,depthOptions:rl({label:{enabled:at,avoidCollisions:at,...xo},tick:{enabled:at,stroke:Pt,width:ot}},"depth options objects array")},P4={type:"axis",name:"number",chartType:"cartesian",options:O4,create:t=>new Cr(t)},B4={type:"axis",name:"log",chartType:"cartesian",options:w4,create:t=>new Eu(t)},z4={type:"axis",name:"time",chartType:"cartesian",options:E4,create:t=>new Dl(t)},F4={type:"axis",name:"category",chartType:"cartesian",options:_4,create:t=>new _c(t)},G4={type:"axis",name:"grouped-category",chartType:"cartesian",options:R4,create:t=>new Pc(t)}}}),j4,V4,W4,oJ=k({"packages/ag-charts-community/src/main-modules.ts"(){"use strict";qQ(),QQ(),iJ(),gL(),kL(),TL(),NL(),EL(),PL(),l4(),p4(),sJ(),j4=[D4,P4,B4,z4,F4,G4,pL,DL,IL,LL,wL,RL],V4=[N4,r4,d4],W4=[...j4,...V4,k4,A4,I4,T4,C4]}}),_r,nM=k({"packages/ag-charts-community/src/module/enterpriseModule.ts"(){"use strict";_r={isEnterprise:!1}}}),aJ=k({"packages/ag-charts-types/src/api/initialStateOptions.ts"(){"use strict"}}),nJ=k({"packages/ag-charts-types/src/api/stateTypes.ts"(){"use strict"}}),rJ=k({"packages/ag-charts-types/src/api/agCharts.ts"(){"use strict"}}),lJ=k({"packages/ag-charts-types/src/chart/annotationsOptions.ts"(){"use strict"}}),cJ=k({"packages/ag-charts-types/src/chart/axisOptions.ts"(){"use strict"}}),hJ=k({"packages/ag-charts-types/src/chart/buttonOptions.ts"(){"use strict"}}),uJ=k({"packages/ag-charts-types/src/chart/callbackOptions.ts"(){"use strict"}}),dJ=k({"packages/ag-charts-types/src/chart/chartOptions.ts"(){"use strict"}}),pJ=k({"packages/ag-charts-types/src/chart/chartToolbarOptions.ts"(){"use strict"}}),gJ=k({"packages/ag-charts-types/src/chart/contextMenuOptions.ts"(){"use strict"}}),fJ=k({"packages/ag-charts-types/src/chart/crossLineOptions.ts"(){"use strict"}}),mJ=k({"packages/ag-charts-types/src/chart/crosshairOptions.ts"(){"use strict"}}),yJ=k({"packages/ag-charts-types/src/chart/dropShadowOptions.ts"(){"use strict"}}),U4,xJ=k({"packages/ag-charts-types/src/chart/errorBarOptions.ts"(){"use strict";U4=["bar","line","scatter"]}}),bJ=k({"packages/ag-charts-types/src/chart/eventOptions.ts"(){"use strict"}}),SJ=k({"packages/ag-charts-types/src/chart/gradientLegendOptions.ts"(){"use strict"}}),vJ=k({"packages/ag-charts-types/src/chart/icons.ts"(){"use strict"}}),MJ=k({"packages/ag-charts-types/src/chart/labelOptions.ts"(){"use strict"}}),DJ=k({"packages/ag-charts-types/src/chart/legendOptions.ts"(){"use strict"}}),kJ=k({"packages/ag-charts-types/src/chart/localeOptions.ts"(){"use strict"}}),H4,Y4,AJ=k({"packages/ag-charts-types/src/chart/navigatorOptions.ts"(){"use strict";H4=void 0,Y4=void 0,Y4=H4}}),IJ=k({"packages/ag-charts-types/src/chart/operationOptions.ts"(){"use strict"}}),TJ=k({"packages/ag-charts-types/src/chart/polarAxisOptions.ts"(){"use strict"}}),CJ=k({"packages/ag-charts-types/src/chart/radiusAxisOptions.ts"(){"use strict"}}),LJ=k({"packages/ag-charts-types/src/chart/rangesOptions.ts"(){"use strict"}}),K4,$4,NJ=k({"packages/ag-charts-types/src/chart/themeOptions.ts"(){"use strict";K4=void 0,$4=void 0,$4=K4}}),OJ=k({"packages/ag-charts-types/src/chart/themeParamsOptions.ts"(){"use strict"}}),rM,lM,cM,wJ=k({"packages/ag-charts-types/src/chart/tooltipOptions.ts"(){"use strict";rM=(t=>(t.POINTER="pointer",t.NODE="node",t.CHART="chart",t))(rM||{}),lM=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t.TOP_RIGHT="top-right",t.BOTTOM_RIGHT="bottom-right",t.BOTTOM_LEFT="bottom-left",t.TOP_LEFT="top-left",t.CENTER="center",t))(lM||{}),cM=(t=>(t.POINTER="pointer",t.NODE="node",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM_RIGHT="bottom-right",t.BOTTOM_LEFT="bottom-left",t))(cM||{})}}),EJ=k({"packages/ag-charts-types/src/chart/types.ts"(){"use strict"}}),_J=k({"packages/ag-charts-types/src/chart/zoomOptions.ts"(){"use strict"}}),RJ=k({"packages/ag-charts-types/src/chartBuilderOptions.ts"(){"use strict"}}),PJ=k({"packages/ag-charts-types/src/integratedCharts.ts"(){"use strict"}}),BJ=k({"packages/ag-charts-types/src/presets/financial/financialOptions.ts"(){"use strict"}}),zJ=k({"packages/ag-charts-types/src/presets/financial/priceVolumeOptions.ts"(){"use strict"}}),X4,Z4,q4,Q4,FJ=k({"packages/ag-charts-types/src/presets/gauge/commonOptions.ts"(){"use strict";X4=void 0,Z4=void 0,Z4=X4,q4=void 0,Q4=void 0,Q4=q4}}),GJ=k({"packages/ag-charts-types/src/presets/gauge/gaugeOptions.ts"(){"use strict"}}),jJ=k({"packages/ag-charts-types/src/presets/gauge/linearGaugeOptions.ts"(){"use strict"}}),VJ=k({"packages/ag-charts-types/src/presets/gauge/radialGaugeOptions.ts"(){"use strict"}}),WJ=k({"packages/ag-charts-types/src/presets/sparkline/sparklineAxisOptions.ts"(){"use strict"}}),UJ=k({"packages/ag-charts-types/src/presets/sparkline/sparklineOptions.ts"(){"use strict"}}),HJ=k({"packages/ag-charts-types/src/presets/presetOptions.ts"(){"use strict"}}),YJ=k({"packages/ag-charts-types/src/series/cartesian/areaOptions.ts"(){"use strict"}}),KJ=k({"packages/ag-charts-types/src/series/cartesian/barOptions.ts"(){"use strict"}}),$J=k({"packages/ag-charts-types/src/series/cartesian/boxPlotOptions.ts"(){"use strict"}}),XJ=k({"packages/ag-charts-types/src/series/cartesian/bubbleOptions.ts"(){"use strict"}}),ZJ=k({"packages/ag-charts-types/src/series/cartesian/candlestickOptions.ts"(){"use strict"}}),qJ=k({"packages/ag-charts-types/src/series/cartesian/cartesianOptions.ts"(){"use strict"}}),QJ=k({"packages/ag-charts-types/src/series/cartesian/cartesianSeriesTooltipOptions.ts"(){"use strict"}}),JJ=k({"packages/ag-charts-types/src/series/cartesian/cartesianSeriesTypes.ts"(){"use strict"}}),ttt=k({"packages/ag-charts-types/src/series/cartesian/commonOptions.ts"(){"use strict"}}),ett=k({"packages/ag-charts-types/src/series/cartesian/coneFunnelOptions.ts"(){"use strict"}}),itt=k({"packages/ag-charts-types/src/series/cartesian/funnelOptions.ts"(){"use strict"}}),stt=k({"packages/ag-charts-types/src/series/cartesian/heatmapOptions.ts"(){"use strict"}}),ott=k({"packages/ag-charts-types/src/series/cartesian/histogramOptions.ts"(){"use strict"}}),att=k({"packages/ag-charts-types/src/series/cartesian/lineOptions.ts"(){"use strict"}}),ntt=k({"packages/ag-charts-types/src/series/cartesian/ohlcBaseOptions.ts"(){"use strict"}}),rtt=k({"packages/ag-charts-types/src/series/cartesian/ohlcOptions.ts"(){"use strict"}}),ltt=k({"packages/ag-charts-types/src/series/cartesian/rangeAreaOptions.ts"(){"use strict"}}),ctt=k({"packages/ag-charts-types/src/series/cartesian/rangeBarOptions.ts"(){"use strict"}}),htt=k({"packages/ag-charts-types/src/series/cartesian/scatterOptions.ts"(){"use strict"}}),utt=k({"packages/ag-charts-types/src/series/cartesian/waterfallOptions.ts"(){"use strict"}}),dtt=k({"packages/ag-charts-types/src/series/flow-proportion/chordOptions.ts"(){"use strict"}}),ptt=k({"packages/ag-charts-types/src/series/flow-proportion/flowProportionOptions.ts"(){"use strict"}}),gtt=k({"packages/ag-charts-types/src/series/flow-proportion/sankeyOptions.ts"(){"use strict"}}),ftt=k({"packages/ag-charts-types/src/series/standalone/pyramidOptions.ts"(){"use strict"}}),mtt=k({"packages/ag-charts-types/src/series/standalone/standaloneOptions.ts"(){"use strict"}}),ytt=k({"packages/ag-charts-types/src/series/hierarchy/hierarchyOptions.ts"(){"use strict"}}),xtt=k({"packages/ag-charts-types/src/series/hierarchy/sunburstOptions.ts"(){"use strict"}}),btt=k({"packages/ag-charts-types/src/series/hierarchy/treemapOptions.ts"(){"use strict"}}),Stt=k({"packages/ag-charts-types/src/series/interpolationOptions.ts"(){"use strict"}}),vtt=k({"packages/ag-charts-types/src/series/markerOptions.ts"(){"use strict"}}),Mtt=k({"packages/ag-charts-types/src/series/polar/donutOptions.ts"(){"use strict"}}),Dtt=k({"packages/ag-charts-types/src/series/polar/nightingaleOptions.ts"(){"use strict"}}),ktt=k({"packages/ag-charts-types/src/series/polar/pieOptions.ts"(){"use strict"}}),Att=k({"packages/ag-charts-types/src/series/polar/polarOptions.ts"(){"use strict"}}),Itt=k({"packages/ag-charts-types/src/series/polar/radarAreaOptions.ts"(){"use strict"}}),Ttt=k({"packages/ag-charts-types/src/series/polar/radarLineOptions.ts"(){"use strict"}}),Ctt=k({"packages/ag-charts-types/src/series/polar/radarOptions.ts"(){"use strict"}}),Ltt=k({"packages/ag-charts-types/src/series/polar/radialBarOptions.ts"(){"use strict"}}),Ntt=k({"packages/ag-charts-types/src/series/polar/radialColumnOptions.ts"(){"use strict"}}),Ott=k({"packages/ag-charts-types/src/series/polar/radialOptions.ts"(){"use strict"}}),wtt=k({"packages/ag-charts-types/src/series/seriesOptions.ts"(){"use strict"}}),Ett=k({"packages/ag-charts-types/src/series/topology/mapLineBackgroundOptions.ts"(){"use strict"}}),_tt=k({"packages/ag-charts-types/src/series/topology/mapLineOptions.ts"(){"use strict"}}),Rtt=k({"packages/ag-charts-types/src/series/topology/mapMarkerOptions.ts"(){"use strict"}}),Ptt=k({"packages/ag-charts-types/src/series/topology/mapShapeBackgroundOptions.ts"(){"use strict"}}),Btt=k({"packages/ag-charts-types/src/series/topology/mapShapeOptions.ts"(){"use strict"}}),ztt=k({"packages/ag-charts-types/src/series/topology/topologyOptions.ts"(){"use strict"}}),$L=k({"packages/ag-charts-types/src/main.ts"(){"use strict";aJ(),nJ(),rJ(),lJ(),cJ(),hJ(),uJ(),dJ(),pJ(),gJ(),fJ(),mJ(),yJ(),xJ(),bJ(),SJ(),vJ(),MJ(),DJ(),kJ(),AJ(),IJ(),TJ(),CJ(),LJ(),NJ(),OJ(),wJ(),EJ(),_J(),RJ(),PJ(),BJ(),zJ(),FJ(),GJ(),jJ(),VJ(),WJ(),UJ(),HJ(),YJ(),KJ(),$J(),XJ(),ZJ(),qJ(),QJ(),JJ(),ttt(),ett(),itt(),stt(),ott(),att(),ntt(),rtt(),ltt(),ctt(),htt(),utt(),dtt(),ptt(),gtt(),ftt(),mtt(),ytt(),xtt(),btt(),Stt(),vtt(),Mtt(),Dtt(),ktt(),Att(),Itt(),Ttt(),Ctt(),Ltt(),Ntt(),Ott(),wtt(),Ett(),_tt(),Rtt(),Ptt(),Btt(),ztt()}});function Sa(t,e){const i={};for(const s of Object.keys(e)){const o=e[s];o!==Do&&Object.hasOwn(t,s)&&(i[s]=o)}return i}var Do,J4=k({"packages/ag-charts-community/src/api/preset/presetUtils.ts"(){"use strict";Do=Symbol("IGNORED_PROP")}});function Ftt(t){return t.type==="radial-gauge"}function Gtt(t){return t.type==="linear-gauge"}function tG(t){const{enabled:e,mode:i,showArrow:s,range:o,position:a,pagination:n,delay:r,wrapping:l,interaction:c,renderer:h,...u}=t,d=Sa(t,{enabled:e,showArrow:s,range:o,position:a,interaction:c,renderer:h,...u});return{chartTooltipOptions:Sa(t,{enabled:Do,showArrow:Do,range:Do,position:Do,mode:i,pagination:n,delay:r,wrapping:l,...u}),seriesTooltipOptions:d}}function jtt(t){const{animation:e,background:i,container:s,contextMenu:o,footnote:a,height:n,listeners:r,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:f,width:x,type:y,cursor:b,nodeClickRange:S,tooltip:M={},value:D,scale:L={},startAngle:T,endAngle:I,highlightStyle:N,segmentation:O,bar:R,needle:_,targets:B,outerRadius:W,innerRadius:F,outerRadiusRatio:z,innerRadiusRatio:U,cornerRadius:H,cornerMode:j,label:V,secondaryLabel:G,spacing:K,...$}=t,{chartTooltipOptions:Z,seriesTooltipOptions:Q}=tG(M),q=Sa(t,{animation:e,background:i,container:s,contextMenu:o,footnote:a,height:n,listeners:r,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:f,tooltip:Z,width:x}),J=Sa(t,{needle:_!=null?{enabled:!0,..._}:Do,startAngle:T,endAngle:I,scale:L,type:y,cursor:b,nodeClickRange:S,listeners:r,tooltip:Q,value:D,highlightStyle:N,segmentation:O,bar:R,targets:B,outerRadius:W,innerRadius:F,outerRadiusRatio:z,innerRadiusRatio:U,cornerRadius:H,cornerMode:j,label:V,secondaryLabel:G,spacing:K,...$});return{...q,series:[J]}}function Vtt(t){const{animation:e,background:i,container:s,contextMenu:o,footnote:a,height:n,listeners:r,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:f,width:x,type:y,cursor:b,nodeClickRange:S,tooltip:M={},value:D,scale:L={},direction:T="vertical",thickness:I,highlightStyle:N,segmentation:O,bar:R,targets:_,cornerRadius:B,cornerMode:W,label:F,...z}=t,{chartTooltipOptions:U,seriesTooltipOptions:H}=tG(M),j=Sa(t,{animation:e,background:i,container:s,contextMenu:o,footnote:a,height:n,listeners:r,locale:l,minHeight:c,minWidth:h,overrideDevicePixelRatio:u,padding:d,subtitle:p,theme:g,title:f,tooltip:U,width:x}),V=Sa(t,{scale:L,type:y,cursor:b,nodeClickRange:S,listeners:r,tooltip:H,value:D,direction:T,thickness:I,highlightStyle:N,segmentation:O,bar:R,targets:_,cornerRadius:B,cornerMode:W,label:F,...z});return{...j,series:[V]}}function eG(t,e){if(e==null)return t;const{targets:i,...s}=e;return t=Vt(t,s),t.targets!=null&&i!=null&&(t.targets=Ab(t.targets,i)),t}function Wtt(t,e){if(Ftt(t)){const b=eG(t,e);return jtt(b)}else if(Gtt(t)){const b=eG(t,e);return Vtt(b)}const{animation:i,background:s,container:o,contextMenu:a,footnote:n,height:r,listeners:l,locale:c,minHeight:h,minWidth:u,padding:d,subtitle:p,theme:g,title:f,tooltip:x,width:y}=t;return Sa(t,{animation:i,background:s,container:o,contextMenu:a,footnote:n,height:r,listeners:l,locale:c,minHeight:h,minWidth:u,padding:d,subtitle:p,theme:g,title:f,tooltip:x,width:y})}var Utt=k({"packages/ag-charts-community/src/api/preset/gauge.ts"(){"use strict";$L(),qt(),J4()}}),va,vs,XL,Rr,Cy,Ly,hM,uM,iG,Htt=k({"packages/ag-charts-community/src/api/preset/priceVolumePresetTheme.ts"(){"use strict";hi(),va={stroke:Ze},vs={fill:eg},XL={color:"white",fill:Ze},Rr={color:Ze},Cy={color:tg,fontSize:{$rem:[1.1666666666666667]},fontFamily:{$ref:"fontFamily"}},Ly={...Cy,textAlign:"left"},hM={...Cy,fontSize:{$ref:"fontSize"},color:og,fill:ig,stroke:sg,strokeWidth:1,divider:{stroke:ag,strokeWidth:1,strokeOpacity:.5}},uM={...va,background:{fill:Ni,fillOpacity:.2},handle:{...vs},text:{...Rr},statistics:{...hM}},iG={line:{...va,handle:{...vs},text:{...Rr}},"horizontal-line":{...va,handle:{...vs},axisLabel:{...XL},text:{...Rr}},"vertical-line":{...va,handle:{...vs},axisLabel:{...XL},text:{...Rr}},"disjoint-channel":{...va,background:{fill:Ni,fillOpacity:.2},handle:{...vs},text:{...Rr}},"parallel-channel":{...va,background:{fill:Ni,fillOpacity:.2},handle:{...vs},text:{...Rr}},"fibonacci-retracement":{...va,strokes:Jp,rangeStroke:Ze,handle:{...vs},text:{...Rr,position:"center"},label:{...Cy,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},"fibonacci-retracement-trend-based":{...va,strokes:Jp,rangeStroke:Ze,handle:{...vs},text:{...Rr,position:"center"},label:{...Cy,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},callout:{...va,...Ly,color:{$ref:"textColor"},handle:{...vs},fill:Ni,fillOpacity:.2},comment:{...Ly,color:"white",fontWeight:700,handle:{...vs},fill:Ze},note:{...Ly,color:hg,fill:Ze,stroke:{$ref:"backgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...vs},background:{fill:lg,stroke:cg,strokeWidth:1}},text:{...Ly,handle:{...vs}},arrow:{...va,handle:{...vs},text:{...Rr}},"arrow-up":{fill:qp,handle:{...vs,stroke:Ze}},"arrow-down":{fill:Qp,handle:{...vs,stroke:Ze}},"date-range":{...uM},"price-range":{...uM},"date-price-range":{...uM},"quick-date-price-range":{up:{...va,fill:Ni,fillOpacity:.2,handle:{...vs},statistics:{...hM,color:"#fff",fill:Ni,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...va,stroke:rg,fill:ng,fillOpacity:.2,handle:{...vs,stroke:rg},statistics:{...hM,color:"#fff",fill:ng,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{enabled:!0}}}});function Ytt(t,e,i){const{dateKey:s="date",highKey:o="high",openKey:a="open",lowKey:n="low",closeKey:r="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,theme:x,data:y,...b}=t,S=$tt(c,s,o,n,a,r),M=Ktt(i,a,r,u,l),L={navigator:{enabled:h,...u?{miniChart:{enabled:h,series:[{type:"line",xKey:s,yKey:l,stroke:Zm,marker:{enabled:!1}}]},height:40,minHandle:{height:46},maxHandle:{height:46}}:null}},T={annotations:{enabled:g,optionsToolbar:{enabled:g},snap:!0,toolbar:{enabled:g,buttons:nG,padding:0},data:y,xKey:s,volumeKey:u?l:void 0}},I=p?{statusBar:{enabled:!0,data:y,highKey:o,openKey:a,lowKey:n,closeKey:r,volumeKey:u?l:void 0}}:null,N={zoom:{enabled:f,autoScaling:{enabled:!0},enableIndependentAxes:!0}},O={ranges:{enabled:d}},R=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 x=="string"?x:"ag-financial",...Vt(typeof x=="object"?x:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:5},chartToolbar:{enabled:g},annotations:{...iG},axes:{number:{interval:{maxSpacing:45},label:{format:".2f"}}}},bar:{series:{fillOpacity:.5}},line:{series:{marker:{enabled:!1},...oG(c,{hlc:{stroke:Km,strokeWidth:2},line:{stroke:zu},"step-line":{stroke:zu,interpolation:{type:"step"}}})}},candlestick:{series:{...oG(c,{"hollow-candlestick":{item:{up:{fill:"transparent"}}}})}},"range-area":{series:{fillOpacity:.3,strokeWidth:2}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...M,...S],axes:[{type:"number",position:"right",keys:[a,r,o,n],crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percent",align:"start"}},...R,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],tooltip:{enabled:!1},data:y,...T,...L,...I,...N,...O,...b}}function Ktt(t,e,i,s,o){return s?[{type:"bar",xKey:"date",yKey:o,tooltip:{enabled:!1},itemStyler({datum:a}){const{up:n,down:r}=t().palette;return{fill:a[e]<a[i]?n?.fill:r?.fill}},focusPriority:1,fastDataProcessing:!0,highlight:{enabled:!1}}]:[]}function $tt(t,e,i,s,o,a){const n={xKey:e,openKey:o,closeKey:a,highKey:i,lowKey:s},r={xKey:e,yKey:a},l={pickOutsideVisibleMinorAxis:!0};switch(t??"candlestick"){case"ohlc":return Xtt(l,n);case"line":case"step-line":return Ztt(l,r);case"hlc":return qtt(l,r,n);case"high-low":return Qtt(l,n);case"candlestick":case"hollow-candlestick":return sG(l,n);default:return tt.warnOnce(`unknown chart type: ${t}; expected one of: ${aG.join(", ")}`),sG(l,n)}}function Xtt(t,e){return[{type:"ohlc",focusPriority:0,...t,...e}]}function Ztt(t,e){return[{type:"line",focusPriority:0,...t,...e}]}function qtt(t,e,{xKey:i,highKey:s,closeKey:o,lowKey:a}){return[{type:ZL,focusPriority:0,...t,xKey:i,yHighKey:s,yLowKey:o,fill:qp,stroke:Um},{type:ZL,focusPriority:0,...t,xKey:i,yHighKey:o,yLowKey:a,fill:Qp,stroke:Hm},{type:"line",...t,...e}]}function Qtt(t,{xKey:e,highKey:i,lowKey:s}){return[{type:"range-bar",...t,xKey:e,yHighKey:i,yLowKey:s,fill:Ym,stroke:zu,tooltip:{range:"nearest"},focusPriority:0,fastDataProcessing:!0}]}function sG(t,e){return[{type:"candlestick",focusPriority:0,...t,...e}]}function oG(t,e){return e[t]??e.default}var aG,nG,ZL,Jtt=k({"packages/ag-charts-community/src/api/preset/priceVolumePreset.ts"(){"use strict";P(),hi(),vi(),qt(),Htt(),aG=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],nG=[{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"}],ZL="range-area"}});function tet(t,e){return typeof t=="string"?{...e,baseTheme:t}:t!=null?{...t,baseTheme:QL(t.baseTheme,e)}:e}function rG(t){if(Array.isArray(t)&&t.length!==0){const e=t[0];if(typeof e=="number")return{data:t.map((s,o)=>({x:o,y:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"y"};if(Array.isArray(e))return{data:t.map(s=>({x:s[0],y:s[1],datum:s})),series:[{xKey:"x",yKey:"y"}],datumKey:"datum"}}return{data:t}}function eet(t,e){switch(t?.type){case"number":{const{type:i,min:s,max:o,reverse:a}=t;return Sa(t,{type:i,reverse:a,min:s,max:o})}case"time":{const{type:i,min:s,max:o,reverse:a}=t;return Sa(t,{type:i,reverse:a,min:s,max:o})}case"category":{const{type:i,paddingInner:s,paddingOuter:o,reverse:a}=t;return Sa(t,{type:i,reverse:a,paddingInner:s,paddingOuter:o})}}return{type:e}}function iet(t,e,i){const s={};return t?.stroke!=null&&(s.style=[{stroke:t?.stroke}],s.enabled??(s.enabled=!0)),t?.strokeWidth!=null&&(s.width=t?.strokeWidth,s.enabled??(s.enabled=!0)),i.type==="bar"&&i.direction!=="horizontal"&&(s.enabled??(s.enabled=!0)),t?.visible!=null&&(s.enabled=t.visible),s.enabled??(s.enabled=e),s}function set(t){const{background:e,container:i,height:s,listeners:o,locale:a,minHeight:n,minWidth:r,overrideDevicePixelRatio:l,padding:c,width:h,theme:u,data:d,crosshair:p,axis:g,min:f,max:x,tooltip:y,context:b,...S}=t,M=Sa(t,{background:e,container:i,height:s,listeners:o,locale:a,minHeight:n,minWidth:r,overrideDevicePixelRatio:l,padding:c,width:h,tooltip:Do,context:Do,data:Do,crosshair:Do,axis:Do,min:Do,max:Do,theme:Do}),{data:D,series:[L]=[],datumKey:T}=rG(d),I=S;L!=null&&Object.assign(I,L),I.tooltip={...y,renderer:hG(b,y,T)},M.theme=QL(u,cG),M.data=D,M.series=[I];const N=I.type!=="bar"||I.direction!=="horizontal",[O,R]=N?["bottom","left"]:["left","bottom"],_={...eet(g,"category"),position:O,...Sa(t,{crosshair:p})},B={type:"number",gridLine:iet(g,!1,t),position:R,...Sa(t,{min:f,max:x})};return M.axes=N?[B,_]:[_,B],M}var qL,dM,Ny,pM,lG,cG,QL,hG,oet=k({"packages/ag-charts-community/src/api/preset/sparkline.ts"(){"use strict";hi(),xC(),J4(),qL={title:{enabled:!1},label:{enabled:!1},line:{enabled:!1},gridLine:{enabled:!1},crosshair:{enabled:!1,stroke:Xm,lineDash:[0],label:{enabled:!1}}},dM={...qL,nice:!1},Ny={mode:"compact",position:{anchorTo:"node",placement:["right","left"]},showArrow:!1},pM={style:[{stroke:{$ref:"gridLineColor"}}],width:2},lG={number:{gridLine:pM},time:{gridLine:pM},category:{gridLine:pM}},cG={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:{...dM,interval:{values:[0]}},log:{...dM},time:{...dM},category:{...qL}}},bar:{series:{crisp:!1,label:{placement:"inside-end",padding:4},sparklineMode:!0},tooltip:{...Ny,position:{...Ny.position,anchorTo:"pointer"},range:"nearest"},axes:lG},line:{seriesArea:{padding:{top:2,right:2,bottom:2,left:2}},series:{sparklineMode:!0,strokeWidth:1,marker:{enabled:!1,size:3}},tooltip:Ny},area:{seriesArea:{padding:{top:1,right:0,bottom:1,left:0}},series:{strokeWidth:1,fillOpacity:.4},tooltip:Ny}}},QL=vo(tet),hG=vo((t,e,i)=>s=>{const o=s.datum[s.xKey],a=s.datum[s.yKey],n=i!=null?s.datum[i]:s.datum,r=e?.renderer?.({context:t,datum:n,xValue:o,yValue:a});return typeof r=="string"?r:{heading:void 0,title:void 0,data:[{label:r?.title,value:r?.content??a.toFixed(2)}]}})}}),uG,dG,aet=k({"packages/ag-charts-community/src/api/preset/presets.ts"(){"use strict";Utt(),Jtt(),oet(),uG={"price-volume":Ytt,gauge:Wtt,sparkline:set},dG={sparkline:rG}}});function pG(t,e){let i=[];const s=ZT(t),o=Sl(t),a=o?We.get(o):"unknown";for(const n of Rp)if(!(a!=="unknown"&&!n.chartTypes.includes(a))){if(n.type==="root"||n.type==="legend"){const r=t[n.optionsKey];if(r==null)continue;n.optionsInnerKey?r[n.optionsInnerKey]&&(i.push(`${n.optionsKey}.${n.optionsInnerKey}`),delete r[n.optionsInnerKey]):(i.push(n.optionsKey),delete t[n.optionsKey])}else if(n.type==="axis"){if(!("axes"in t)||!Et(t.axes)||!t.axes?.some(r=>r.type===n.identifier))continue;i.push(`axis[type=${n.identifier}]`),t.axes=t.axes.filter(r=>r.type!==n.identifier)}else if(n.type==="axis-option"){if(!("axes"in t)||!Et(t.axes)||!t.axes?.some(r=>r[n.optionsKey]))continue;i.push(`axis.${n.optionsKey}`),t.axes.forEach(r=>{r[n.optionsKey]&&delete r[n.optionsKey]})}else if(n.type==="series"){if(n.community||!Et(t.series)||!t.series?.some(r=>r.type===n.identifier))continue;i.push(`series[type=${n.identifier}]`),t.series=t.series.filter(r=>r.type!==n.identifier)}else if(n.type==="series-option"){if(!Et(t.series)||!t.series?.some(r=>r[n.optionsKey]))continue;i.push(`series.${n.optionsKey}`),t.series.forEach(r=>{r[n.optionsKey]&&delete r[n.optionsKey]})}}if(i.length&&!e){s&&(i=["AgCharts.createGauge"]);let n="ag-charts-enterprise",r="https://www.ag-grid.com/charts/javascript/installation/";t.mode==="integrated"&&(n="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",r="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),tt.warnOnce([`unable to use these enterprise features as '${n}' has not been loaded:`,"",...i,"",`See: ${r}`].join(`
`))}}function net(t){const e="mode"in t&&t.mode==="integrated";for(const i of Tn.byType("root","legend")){const s=t[i.optionsKey],o=s!=null&&s.enabled===!1,a=!("removable"in i)||i.removable===!0||i.removable==="standalone-only"&&!e;o&&a&&delete t[i.optionsKey]}}var ret=k({"packages/ag-charts-community/src/chart/factory/processEnterpriseOptions.ts"(){"use strict";P(),hr(),ku(),Sm(),LS()}});function gG(t){return t?.up||t?.down||t?.neutral?"user-full":t?.fills||t?.strokes?"user-indexed":"inbuilt"}var fG=k({"packages/ag-charts-community/src/module/coreModulesTypes.ts"(){"use strict"}});function mG(t){return yG[t]===!0}var gM,fM,yG,xG,Ma,en,Bl=k({"packages/ag-charts-community/src/chart/themes/chartTheme.ts"(){"use strict";P(),fG(),nM(),Kh(),zo(),qt(),CS(),Sm(),vT(),wS(),Jv(),hi(),vi(),gM="white",fM={get cartesian(){return{seriesTypes:We.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:We.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:We.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:We.topologyTypes,commonOptions:[]}},get"flow-proportion"(){return{seriesTypes:We.flowProportionTypes,commonOptions:[]}},get standalone(){return{seriesTypes:We.standaloneTypes,commonOptions:[]}},get gauge(){return{seriesTypes:We.gaugeTypes,commonOptions:[]}}},yG={"radial-gauge":!0,"linear-gauge":!0},xG=Object.values(fM).reduce((t,{commonOptions:e})=>t.concat(e),[]),Ma=class ob{static getDefaultColors(){return{fills:pi,fillsFallback:Object.values(pi),strokes:jn,sequentialColors:ba(pi),divergingColors:[pi.ORANGE,pi.YELLOW,pi.GREEN],hierarchyColors:["#fff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"],secondSequentialColors:re.interpolate([re.fromHexString(pi.BLUE),re.fromHexString("#cbdef5")],8).map(e=>e.toString()),secondDivergingColors:[pi.GREEN,pi.YELLOW,pi.RED],secondHierarchyColors:["#fff","#c5cbd1","#a4b1bd","#8498a9","#648096"],up:{fill:pi.GREEN,stroke:jn.GREEN},down:{fill:pi.RED,stroke:jn.RED},neutral:{fill:pi.GRAY,stroke:jn.GRAY},altUp:{fill:pi.BLUE,stroke:jn.BLUE},altDown:{fill:pi.ORANGE,stroke:jn.ORANGE},altNeutral:{fill:pi.GRAY,stroke:jn.GRAY}}}static getDefaultPublicParameters(){return{accentColor:"#2196f3",axisColor:{$foregroundBackgroundMix:[.675]},backgroundColor:gM,borderColor:{$foregroundBackgroundMix:[.818]},foregroundColor:"#464646",fontFamily:"Verdana, sans-serif",fontSize:12,fontWeight:400,gridLineColor:{$foregroundBackgroundAccentMix:[.93,.085]},padding:20,subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"backgroundColor"},.38]},textColor:{$ref:"foregroundColor"},chromeBackgroundColor:{$foregroundBackgroundMix:[.975]},chromeFontFamily:{$ref:"fontFamily"},chromeFontSize:{$ref:"fontSize"},chromeFontWeight:{$ref:"fontWeight"},chromeTextColor:"#181d1f",chromeSubtleTextColor:{$mix:[{$ref:"chromeTextColor"},{$ref:"backgroundColor"},.38]},inputBackgroundColor:{$ref:"backgroundColor"},inputTextColor:{$ref:"textColor"},crosshairLabelBackgroundColor:{$ref:"foregroundColor"},crosshairLabelTextColor:{$ref:"backgroundColor"}}}static getAxisDefaults(e,i=!0){return Vt(e,i&&{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.0833333333333333]},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},{label:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:11,color:{$ref:"textColor"},avoidCollisions:!0},line:{enabled:!0,width:1,stroke:{$ref:"axisColor"}},tick:{enabled:!1,width:1,stroke:{$ref:"axisColor"}},gridLine:{enabled:!0,style:[{stroke:{$ref:"gridLineColor"},lineDash:[]}]},crossLines:{enabled:!0,fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},fillOpacity:.1,strokeWidth:1,label:{fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},padding:5,color:{$ref:"textColor"}}}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:{$ref:"backgroundColor"}},padding:{top:{$ref:"padding"},right:{$ref:"padding"},bottom:{$ref:"padding"},left:{$ref:"padding"}},seriesArea:{padding:{top:0,right:0,bottom:0,left:0}},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",spacing:{$if:[{$path:"../subtitle/enabled"},10,20]},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.4166666666666667]},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},wrapping:"hyphenate",layoutStyle:Cl,textAlign:Ll},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.0833333333333333]},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:Cl,textAlign:Ll},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:{$rem:[1.0833333333333333]},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"subtleTextColor"},wrapping:"hyphenate",layoutStyle:Cl,textAlign:Ll},legend:{position:"bottom",orientation:{$if:[{$or:[{$eq:[{$path:"./position"},"left"]},{$eq:[{$path:"./position"},"right"]}]},"vertical","horizontal"]},spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"}}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:{$ref:"foregroundColor"}},inactiveStyle:{fill:{$ref:"subtleTextColor"}},highlightStyle:{fill:{$ref:"foregroundColor"}},label:{color:{$ref:"textColor"}}}},tooltip:{enabled:!0,darkTheme:Bu,delay:0,pagination:!1},overlays:{darkTheme:Bu},listeners:{}}}constructor(e={}){const{overrides:i,palette:s}=we(e),o=this.createChartConfigPerChartType(this.getDefaults()),a={};i&&this.mergeOverrides(o,a,i);const{fills:n,strokes:r,sequentialColors:l,...c}=this.getDefaultColors();this.palette=Yh(Vt(s,{fills:Object.values(n),strokes:Object.values(r),sequentialColors:Object.values(l),...c})),this.paletteType=gG(s),this.config=Yh(this.templateTheme(o)),this.presets=Yh(a)}mergeOverrides(e,i,s){for(const{seriesTypes:o,commonOptions:a}of Object.values(fM)){const n={...s.common};for(const r of xG)a.includes(r)||delete n[r];if(n)for(const r of o){const l=r;mG(l)||(e[l]=Vt(n,e[l]))}}We.seriesTypes.forEach(o=>{const a=o,n=s[a];mG(a)?i[a]=n:e[a]=Vt(n,e[a])})}createChartConfigPerChartType(e){for(const[i,{seriesTypes:s}]of ja(fM)){const o=OS.get(i);for(const a of s)e[a]??(e[a]=we(o))}return e}getDefaults(){const e=(i,s)=>{const o={},a={axes:{},...NS.getThemeTemplates(),...this.getChartDefaults(),...OS.get(i)};for(const n of s){o[n]=Vt(ga.getThemeTemplate(n),o[n]??we(a));const{axes:r}=o[n];for(const l of Lc.keys())r[l]=Vt(r[l],Lc.getThemeTemplate(l),ob.axisDefault[l])}return o};return Vt(e("cartesian",We.cartesianTypes),e("polar",We.polarTypes),e("hierarchy",We.hierarchyTypes),e("topology",We.topologyTypes),e("flow-proportion",We.flowProportionTypes),e("standalone",We.standaloneTypes),e("gauge",We.gaugeTypes))}static applyTemplateTheme(e,i,s){if(Et(e))for(let o=0;o<e.length;o++){const a=e[o];typeof a=="symbol"&&s?.has(a)&&(e[o]=s.get(a))}else for(const o of Object.keys(e)){const a=e[o];typeof a=="symbol"&&s?.has(a)&&(e[o]=s.get(a))}}templateTheme(e,i=!0){const s=i?we(e):e,o=this.getTemplateParameters();return ul(s,ob.applyTemplateTheme,void 0,void 0,o),s}getDefaultColors(){return ob.getDefaultColors()}getPublicParameters(){return ob.getDefaultPublicParameters()}getTemplateParameters(){const{isEnterprise:e}=_r,i=new Map;i.set(Bu,!1),i.set(mv,e),i.set(fv,!e),i.set(Zp,"#d9d9d9"),i.set(Tl,"#00000080"),i.set(Xm,"#aaa"),i.set(Cl,"block"),i.set(Ll,"center"),i.set(Jp,["#797b86","#e24c4a","#f49d2d","#65ab58","#409682","#4db9d2","#5090dc","#3068f9","#e24c4a","#913aac","#d93e64"]),i.set($m,gM),i.set(Ze,pi.BLUE),i.set(Ni,pi.BLUE),i.set(tg,pi.BLUE),i.set(eg,gM),i.set(ig,"#fafafa"),i.set(sg,"#ddd"),i.set(og,"#000"),i.set(ag,"#181d1f"),i.set(ng,"#e35c5c"),i.set(rg,"#e35c5c"),i.set(lg,"#fafafa"),i.set(cg,"#ddd"),i.set(hg,"#000"),i.set(ug,"top"),i.set(Gn,!1);const s=this.getDefaultColors();return i.set(Um,this.palette.up?.stroke??s.up.stroke),i.set(qp,this.palette.up?.fill??s.up.fill),i.set(Hm,this.palette.down?.stroke??s.down.stroke),i.set(Qp,this.palette.down?.fill??s.down.fill),i.set(zu,this.palette.neutral?.stroke??s.neutral.stroke),i.set(Ym,this.palette.neutral?.fill??s.neutral.fill),i.set(yv,this.palette.altUp?.stroke??s.up.stroke),i.set(bv,this.palette.altUp?.fill??s.up.fill),i.set(xv,this.palette.altDown?.stroke??s.down.stroke),i.set(Sv,this.palette.altDown?.fill??s.down.fill),i.set(vv,this.palette.altNeutral?.fill??s.altNeutral.fill),i.set(Km,this.palette.altNeutral?.stroke??s.altNeutral.stroke),i}},Ma.axisDefault={number:Ma.getAxisDefaults({keys:[],line:{enabled:!1},crosshair:{enabled:!0}}),log:Ma.getAxisDefaults({keys:[],base:10,line:{enabled:!1},crosshair:{enabled:!0}}),category:Ma.getAxisDefaults({keys:[],groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:Gn},crosshair:{enabled:!1}}),"grouped-category":Ma.getAxisDefaults({keys:[],tick:{enabled:!0,stroke:Zp},label:{spacing:10,rotation:270},paddingInner:.4,groupPaddingInner:.2,crosshair:{enabled:!1}}),time:Ma.getAxisDefaults({keys:[],gridLine:{enabled:Gn},crosshair:{enabled:!0}}),"ordinal-time":Ma.getAxisDefaults({keys:[],groupPaddingInner:0,label:{autoRotate:!1},gridLine:{enabled:Gn},crosshair:{enabled:!0}}),"angle-category":Ma.getAxisDefaults({label:{spacing:5},gridLine:{enabled:Gn},shape:{$path:["./shape",void 0,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]}},!1),"angle-number":Ma.getAxisDefaults({label:{spacing:5},gridLine:{enabled:Gn}},!1),"radius-category":Ma.getAxisDefaults({positionAngle:0,line:{enabled:!1}}),"radius-number":Ma.getAxisDefaults({positionAngle:0,line:{enabled:!1},shape:{$path:["./shape",void 0,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]}})},en=Ma}}),mM,Ms,Wc,Yu,vg=k({"packages/ag-charts-community/src/chart/themes/darkTheme.ts"(){"use strict";Bl(),hi(),vi(),mM="#192232",Ms={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},Wc={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},Yu=class extends en{getDefaultColors(){return{fills:Ms,fillsFallback:Object.values(Ms),strokes:Wc,sequentialColors:ba(Ms),divergingColors:[Ms.ORANGE,Ms.YELLOW,Ms.GREEN],hierarchyColors:["#192834","#253746","#324859","#3f596c","#4d6a80"],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[Ms.GREEN,Ms.YELLOW,Ms.RED],secondHierarchyColors:["#192834","#3b5164","#496275","#577287","#668399"],up:{fill:Ms.GREEN,stroke:Wc.GREEN},down:{fill:Ms.RED,stroke:Wc.RED},neutral:{fill:Ms.GRAY,stroke:Wc.GRAY},altUp:{fill:Ms.BLUE,stroke:Wc.BLUE},altDown:{fill:Ms.ORANGE,stroke:Wc.ORANGE},altNeutral:{fill:Ms.GRAY,stroke:Wc.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),axisColor:{$foregroundBackgroundMix:[.263]},backgroundColor:mM,borderColor:{$foregroundBackgroundMix:[.784]},chromeBackgroundColor:{$foregroundBackgroundMix:[.93]},foregroundColor:"#fff",gridLineColor:{$foregroundBackgroundAccentMix:[.743,.01]},subtleTextColor:{$mix:[{$ref:"textColor"},{$ref:"backgroundColor"},.57]},chromeTextColor:{$ref:"textColor"},crosshairLabelBackgroundColor:{$foregroundBackgroundAccentMix:[.35,.1]}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Bu,!0),t.set($m,mM),t.set(Zp,"#7f8389"),t.set(Ze,Ms.BLUE),t.set(tg,"#fff"),t.set(Ni,Ms.BLUE),t.set(eg,mM),t.set(ig,"#28313e"),t.set(sg,"#4b525d"),t.set(og,"#fff"),t.set(ag,"#fff"),t.set(lg,"#28313e"),t.set(cg,"#4b525d"),t.set(hg,"#fff"),t}constructor(t){super(t)}}}}),ko,Uc,bG,cet=k({"packages/ag-charts-community/src/chart/themes/financialDark.ts"(){"use strict";vg(),hi(),vi(),ko={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},Uc={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},bG=class extends Yu{getDefaultColors(){return{...super.getDefaultColors(),fills:{...ko},fillsFallback:Object.values({...ko}),strokes:{...Uc},sequentialColors:ba(ko),divergingColors:[ko.GREEN,ko.BLUE,ko.RED],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],up:{fill:ko.GREEN,stroke:Uc.GREEN},down:{fill:ko.RED,stroke:Uc.RED},neutral:{fill:ko.BLUE,stroke:Uc.BLUE},altUp:{fill:ko.GREEN,stroke:Uc.GREEN},altDown:{fill:ko.RED,stroke:Uc.RED},altNeutral:{fill:ko.GRAY,stroke:Uc.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),gridLineColor:{$foregroundBackgroundAccentMix:[.88,.01]},padding:0}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,ko.BLUE),t.set(Ni,ko.BLUE),t.set(Cl,"overlay"),t.set(Ll,"left"),t.set(ug,"bottom"),t.set(Gn,!0),t}}}}),Ao,Hc,SG,het=k({"packages/ag-charts-community/src/chart/themes/financialLight.ts"(){"use strict";Bl(),hi(),vi(),Ao={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},Hc={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},SG=class extends en{getDefaultColors(){return{...super.getDefaultColors(),fills:{...Ao},fillsFallback:Object.values({...Ao}),strokes:{...Hc},sequentialColors:ba(Ao),divergingColors:[Ao.GREEN,Ao.BLUE,Ao.RED],up:{fill:Ao.GREEN,stroke:Hc.GREEN},down:{fill:Ao.RED,stroke:Hc.RED},neutral:{fill:Ao.BLUE,stroke:Hc.BLUE},altUp:{fill:Ao.GREEN,stroke:Hc.GREEN},altDown:{fill:Ao.RED,stroke:Hc.RED},altNeutral:{fill:Ao.GRAY,stroke:Hc.GRAY}}}getPublicParameters(){return{...super.getPublicParameters(),gridLineColor:{$foregroundBackgroundAccentMix:[.94,.01]},padding:0}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,Ao.BLUE),t.set(Ni,Ao.BLUE),t.set(Cl,"overlay"),t.set(Ll,"left"),t.set(ug,"bottom"),t.set(Gn,!0),t}}}}),Ds,Yc,vG,uet=k({"packages/ag-charts-community/src/chart/themes/materialDark.ts"(){"use strict";vg(),hi(),vi(),Ds={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Yc={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},vG=class extends Yu{getDefaultColors(){return{...super.getDefaultColors(),fills:Ds,fillsFallback:Object.values(Ds),strokes:Yc,sequentialColors:ba(Ds),divergingColors:[Ds.ORANGE,Ds.YELLOW,Ds.GREEN],secondSequentialColors:["#2196f3","#208FEC","#1E88E5","#1C7FDC","#1976d2","#176EC9","#1565c0"],secondDivergingColors:[Ds.GREEN,Ds.YELLOW,Ds.RED],up:{fill:Ds.GREEN,stroke:Yc.GREEN},down:{fill:Ds.RED,stroke:Yc.RED},neutral:{fill:Ds.GRAY,stroke:Yc.GRAY},altUp:{fill:Ds.BLUE,stroke:Yc.BLUE},altDown:{fill:Ds.RED,stroke:Yc.RED},altNeutral:{fill:Ds.GRAY,stroke:Yc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,Ds.BLUE),t.set(Ni,Ds.BLUE),t}}}}),ks,Kc,MG,det=k({"packages/ag-charts-community/src/chart/themes/materialLight.ts"(){"use strict";Bl(),hi(),vi(),ks={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},Kc={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},MG=class extends en{getDefaultColors(){return{...super.getDefaultColors(),fills:ks,fillsFallback:Object.values(ks),strokes:Kc,sequentialColors:ba(ks),divergingColors:[ks.ORANGE,ks.YELLOW,ks.GREEN],secondSequentialColors:["#2196f3","#329EF4","#42a5f5","#53ADF6","#64b5f6","#7AC0F8","#90caf9"],secondDivergingColors:[ks.GREEN,ks.YELLOW,ks.RED],up:{fill:ks.GREEN,stroke:Kc.GREEN},down:{fill:ks.RED,stroke:Kc.RED},neutral:{fill:ks.GRAY,stroke:Kc.GRAY},altUp:{fill:ks.BLUE,stroke:Kc.BLUE},altDown:{fill:ks.RED,stroke:Kc.RED},altNeutral:{fill:ks.GRAY,stroke:Kc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,ks.BLUE),t.set(Ni,ks.BLUE),t}}}}),qe,$c,DG,pet=k({"packages/ag-charts-community/src/chart/themes/polychromaDark.ts"(){"use strict";vg(),hi(),vi(),qe={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},$c={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"},DG=class extends Yu{getDefaultColors(){return{fills:qe,fillsFallback:Object.values(qe),strokes:$c,sequentialColors:ba(qe),divergingColors:[qe.BLUE,qe.RED],hierarchyColors:[],secondSequentialColors:[qe.BLUE,qe.PURPLE,qe.MAGENTA,qe.PINK,qe.RED,qe.ORANGE,qe.YELLOW,qe.GREEN],secondDivergingColors:[qe.BLUE,qe.RED],secondHierarchyColors:[],up:{fill:qe.GREEN,stroke:$c.GREEN},down:{fill:qe.RED,stroke:$c.RED},neutral:{fill:qe.GRAY,stroke:$c.GRAY},altUp:{fill:qe.BLUE,stroke:$c.BLUE},altDown:{fill:qe.RED,stroke:$c.RED},altNeutral:{fill:qe.GRAY,stroke:$c.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,qe.BLUE),t.set(Ni,qe.BLUE),t}}}}),Qe,Xc,kG,get=k({"packages/ag-charts-community/src/chart/themes/polychromaLight.ts"(){"use strict";Bl(),hi(),vi(),Qe={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},Xc={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},kG=class extends en{getDefaultColors(){return{...super.getDefaultColors(),fills:Qe,fillsFallback:Object.values(Qe),strokes:Xc,sequentialColors:ba(Qe),divergingColors:[Qe.BLUE,Qe.RED],hierarchyColors:[],secondSequentialColors:[Qe.BLUE,Qe.PURPLE,Qe.MAGENTA,Qe.PINK,Qe.RED,Qe.ORANGE,Qe.YELLOW,Qe.GREEN],secondDivergingColors:[Qe.BLUE,Qe.RED],secondHierarchyColors:[],up:{fill:Qe.GREEN,stroke:Xc.GREEN},down:{fill:Qe.RED,stroke:Xc.RED},neutral:{fill:Qe.GRAY,stroke:Xc.GRAY},altUp:{fill:Qe.BLUE,stroke:Xc.BLUE},altDown:{fill:Qe.RED,stroke:Xc.RED},altNeutral:{fill:Qe.GRAY,stroke:Xc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,Qe.BLUE),t.set(Ni,Qe.BLUE),t}}}}),wi,zl,AG,fet=k({"packages/ag-charts-community/src/chart/themes/sheetsDark.ts"(){"use strict";vg(),hi(),vi(),wi={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},zl={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},AG=class extends Yu{getDefaultColors(){return{...super.getDefaultColors(),fills:{...wi,RED:wi.ORANGE},fillsFallback:Object.values({...wi,RED:wi.ORANGE}),strokes:{...zl,RED:zl.ORANGE},sequentialColors:ba({...wi,RED:wi.ORANGE}),divergingColors:[wi.ORANGE,wi.YELLOW,wi.GREEN],secondSequentialColors:["#5090dc","#4882c6","#4073b0","#38659a","#305684","#28486e","#203a58","#182b42"],secondDivergingColors:[wi.GREEN,wi.YELLOW,wi.ORANGE],up:{fill:wi.GREEN,stroke:zl.GREEN},down:{fill:wi.ORANGE,stroke:zl.ORANGE},neutral:{fill:wi.GRAY,stroke:zl.GRAY},altUp:{fill:wi.BLUE,stroke:zl.BLUE},altDown:{fill:wi.ORANGE,stroke:zl.ORANGE},altNeutral:{fill:wi.GRAY,stroke:zl.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,wi.BLUE),t.set(Ni,wi.BLUE),t}}}}),qi,Pr,IG,met=k({"packages/ag-charts-community/src/chart/themes/sheetsLight.ts"(){"use strict";Bl(),hi(),vi(),qi={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},Pr={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},IG=class extends en{getDefaultColors(){return{...super.getDefaultColors(),fills:{...qi,RED:qi.ORANGE},fillsFallback:Object.values({...qi,RED:qi.ORANGE}),strokes:{...Pr,RED:Pr.ORANGE},sequentialColors:ba({...qi,RED:qi.ORANGE}),divergingColors:[qi.ORANGE,qi.YELLOW,qi.GREEN],secondSequentialColors:["#5090dc","#629be0","#73a6e3","#85b1e7","#96bcea","#a8c8ee","#b9d3f1","#cbdef5"],secondDivergingColors:[qi.GREEN,qi.YELLOW,qi.ORANGE],secondHierarchyColors:[],up:{fill:qi.GREEN,stroke:Pr.GREEN},down:{fill:qi.ORANGE,stroke:Pr.ORANGE},neutral:{fill:Pr.GRAY,stroke:Pr.GRAY},altUp:{fill:qi.BLUE,stroke:Pr.BLUE},altDown:{fill:qi.ORANGE,stroke:Pr.ORANGE},altNeutral:{fill:qi.GRAY,stroke:Pr.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,qi.BLUE),t.set(Ni,qi.BLUE),t}}}}),As,Zc,TG,yet=k({"packages/ag-charts-community/src/chart/themes/vividDark.ts"(){"use strict";vg(),hi(),vi(),As={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},Zc={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},TG=class extends Yu{getDefaultColors(){return{fills:As,fillsFallback:Object.values(As),strokes:Zc,sequentialColors:ba(As),divergingColors:[As.ORANGE,As.YELLOW,As.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#0076e6","#0069cc","#005cb3","#004f99","#004280","#003466","#00274c"],secondDivergingColors:[As.GREEN,As.YELLOW,As.RED],secondHierarchyColors:[],up:{fill:As.GREEN,stroke:Zc.GREEN},down:{fill:As.RED,stroke:Zc.RED},neutral:{fill:As.GRAY,stroke:Zc.GRAY},altUp:{fill:As.BLUE,stroke:Zc.BLUE},altDown:{fill:As.ORANGE,stroke:Zc.ORANGE},altNeutral:{fill:As.GRAY,stroke:Zc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,As.BLUE),t.set(Ni,As.BLUE),t}}}}),Is,qc,CG,xet=k({"packages/ag-charts-community/src/chart/themes/vividLight.ts"(){"use strict";Bl(),hi(),vi(),Is={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},qc={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},CG=class extends en{getDefaultColors(){return{...super.getDefaultColors(),fills:Is,fillsFallback:Object.values(Is),strokes:qc,sequentialColors:ba(Is),divergingColors:[Is.ORANGE,Is.YELLOW,Is.GREEN],hierarchyColors:[],secondSequentialColors:["#0083ff","#1a8fff","#339cff","#4da8ff","#66b5ff","#80c1ff","#99cdff","#b3daff"],secondDivergingColors:[Is.GREEN,Is.YELLOW,Is.RED],secondHierarchyColors:[],up:{fill:Is.GREEN,stroke:qc.GREEN},down:{fill:Is.RED,stroke:qc.RED},neutral:{fill:Is.GRAY,stroke:qc.GRAY},altUp:{fill:Is.BLUE,stroke:qc.BLUE},altDown:{fill:Is.ORANGE,stroke:qc.ORANGE},altNeutral:{fill:Is.GRAY,stroke:qc.GRAY}}}getTemplateParameters(){const t=super.getTemplateParameters();return t.set(Ze,Is.BLUE),t.set(Ni,Is.BLUE),t}}}});function bet(t){if(t instanceof en)return t;if(t==null||typeof t=="string"){const i=yM[t];return i?i():(tt.warnOnce(`the theme [${t}] is invalid, using [ag-default] instead.`),Ku())}const{errors:e}=za(t,JL,"theme");if(!e.length){const i=vet(t),s=i.baseTheme?Oy(i.baseTheme):Ku();return new s.constructor(i)}for(const{message:i}of e)tt.warnOnce(i);return Ku()}function vet(t){let e=t,i,s;const o=[];for(;typeof e=="object";)i??(i=e.palette),s??(s=e.params),e.overrides&&o.push(e.overrides),e=e.baseTheme;return{baseTheme:e,overrides:Vt(...o),params:s,palette:i}}var Ku,LG,NG,sn,yM,Oy,JL,xM=k({"packages/ag-charts-community/src/chart/mapping/themes.ts"(){"use strict";P(),Ui(),xC(),qt(),Bl(),vg(),cet(),het(),uet(),det(),pet(),get(),fet(),met(),yet(),xet(),Ku=vo(()=>new en),LG=vo(()=>new Yu),NG=ee.create(!0,"perf"),sn=(t,e,i)=>{NG("[CACHE] ChartTheme",t,e.name,i)},yM={"ag-default-dark":LG,"ag-sheets-dark":vo(()=>new AG,sn),"ag-polychroma-dark":vo(()=>new DG,sn),"ag-vivid-dark":vo(()=>new TG,sn),"ag-material-dark":vo(()=>new vG,sn),"ag-financial-dark":vo(()=>new bG,sn),null:Ku,undefined:Ku,"ag-default":Ku,"ag-sheets":vo(()=>new IG,sn),"ag-polychroma":vo(()=>new kG,sn),"ag-vivid":vo(()=>new CG,sn),"ag-material":vo(()=>new MG,sn),"ag-financial":vo(()=>new SG,sn)},Oy=vo(bet,sn),JL={baseTheme:Ge(rt,jh),overrides:jh,params:{accentColor:Pt,axisColor:Pt,backgroundColor:Pt,borderColor:Pt,foregroundColor:Pt,fontFamily:rt,fontSize:vt,fontWeight:Ge(rt,vt),gridLineColor:Pt,padding:vt,subtleTextColor:Pt,textColor:Pt,chromeBackgroundColor:Pt,chromeFontFamily:rt,chromeFontSize:vt,chromeFontWeight:Ge(rt,vt),chromeSubtleTextColor:Pt,chromeTextColor:Pt,inputBackgroundColor:Pt,inputTextColor:Pt,crosshairLabelBackgroundColor:Pt,crosshairLabelTextColor:Pt},palette:{fills:Oe(_f),strokes:Oe(Pt),up:{fill:Ge(Pt,Ef),stroke:Pt},down:{fill:Ge(Pt,Ef),stroke:Pt},neutral:{fill:Ge(Pt,Ef),stroke:Pt}}}}}),tN,$u,bM,OG=k({"packages/ag-charts-community/src/module/optionsModule.ts"(){"use strict";P(),$L(),aet(),ret(),wS(),xM(),ku(),Ui(),zo(),qt(),fG(),nM(),tN=t=>`'${t}'`,$u=class Vi{constructor(e,i,s,o,a,n,r=!1){this.themeParameters={},this.optionMetadata=a??{},this.processedOverrides=s??{};let l=null;e instanceof Vi?(l=e,this.specialOverrides=l.specialOverrides,n===void 0&&(n=fr(l.userOptions,i,Vi.JSON_DIFF_OPTS)),this.userOptions=we(Wf(n,l.userOptions),Vi.OPTIONS_CLONE_OPTS)):(this.userOptions=we(e??i,Vi.OPTIONS_CLONE_OPTS),this.specialOverrides=this.specialOverridesDefaults({...o})),r&&this.removeLeftoverSymbols(this.userOptions);let c,h,u,d,p,g;!r&&n!==void 0&&Vi.isFastPathDelta(n)&&l!=null?({activeTheme:c,processedOptions:h,defaultAxes:u,fastDelta:d}=this.fastSetup(n,l),p=l.themeParameters,g=l.annotationThemes):(Vi.perfDebug("ChartOptions.slowSetup()"),{activeTheme:c,processedOptions:h,defaultAxes:u,themeParameters:p,annotationThemes:g}=this.slowSetup(s,n,r)),this.activeTheme=c,this.processedOptions=h,this.defaultAxes=u,this.fastDelta=d??void 0,this.themeParameters=p,this.annotationThemes=g,ee.inDevelopmentMode(()=>Yh(this))}static isFastPathDelta(e){for(const i of Object.keys(e??{}))if(!this.FAST_PATH_OPTIONS.has(i))return Vi.perfDebug("ChartOptions.isFastPathDelta() - slow path required due to presence of: ",i),!1;return Vi.perfDebug("ChartOptions.isFastPathDelta() - fast path possible."),!0}fastSetup(e,i){const{activeTheme:s,defaultAxes:o,processedOptions:a}=i,{presetType:n}=this.optionMetadata,r=n?dG[n]:void 0;if(n!=null&&e?.data!=null&&r!=null){const{series:c,data:h}=r(e.data);e=Vt({series:c,data:h},e)}this.fastSeriesSetup(e,a);const l=Vt(e,a);return Vi.debug("ChartOptions.fastSetup() - processed options",l),{activeTheme:s,defaultAxes:o,processedOptions:l,fastDelta:e}}fastSeriesSetup(e,i){e?.series&&(e.series?.every((s,o)=>rR(s,i.series?.[o]??{}))?delete e.series:e.series=e.series.map((s,o)=>Wf(s,i.series?.[o]??{})))}slowSetup(e,i,s=!1){let o=we(this.userOptions,Vi.OPTIONS_CLONE_OPTS);i&&(o=Vt(i,o),s&&this.removeLeftoverSymbols(o));const{presetType:a}=this.optionMetadata;if(a!=null){const b=uG[a],S=o,M=o.type,D=M!=null?Oy(o.theme).presets[M]:void 0;Vi.debug(">>> AgCharts.createOrUpdate() - applying preset",S),o=b?.(S,D,()=>this.activeTheme)??o}this.soloSeriesIntegrity(o),_r.isEnterprise||pG(o);const n=Oy(o.theme);if(a!=null&&n.templateTheme(o,!1),this.validateSeriesOptions(o),this.chartDef=Ro.detectChartDefinition(o),!this.chartDef.placeholder){const{valid:b,errors:S}=za(o,this.chartDef.options);S.forEach(M=>tt.warn(M)),o=b}this.validatePluginOptions(o),this.validateAxesOptions(o),this.removeDisabledOptions(o);const r=this.optionsType(o),{annotations:l={},axes:c={},series:h,...u}=this.getSeriesThemeConfig(r,n),[d,p]=this.splitAnnotationsOptions(l),g=we(p),f=this.getDefaultAxes(o,h);let x=Vt(e,o,d,u,f);this.processAxesOptions(x,c),this.processSeriesOptions(x,n),x=we(x,Vi.OPTIONS_CLONE_OPTS),($T(x)||XT(x)||Kq(x))&&x.legend?.enabled==null&&(x.legend??(x.legend={}),x.legend.enabled=x.series.length>1),this.enableConfiguredOptions(x,o);const y=this.getThemeParameters(n,x);return y.__palette=we(n.palette),y.__palette.type=li(o.theme)?gG(o.theme?.palette):"inbuilt",this.resolveThemeOperations(y,y),this.resolveThemeOperations(y,x),this.resolveThemeOperations(y,g),this.processMiniChartSeriesOptions(x),n.templateTheme(x,!1),net(x),_r.isEnterprise||pG(x,!0),this.validateSeriesOptions(x),this.validateAxesOptions(x),Vi.debug(()=>["ChartOptions.slowSetup() - processed options",we(x)]),{activeTheme:n,processedOptions:x,defaultAxes:f,themeParameters:y,annotationThemes:g}}validatePluginOptions(e){for(const i of Ro.listModulesByType("plugin")){const s=i.name;if(s in e&&(!i.chartType||i.chartType===this.chartDef?.name)){const{valid:o,errors:a}=za(e[s],i.options,i.name);a.forEach(n=>tt.warn(n)),e[s]=o}}}validateSeriesOptions(e){const i=this.chartDef?.name,s=[],o=e.series?.length??0;let a;for(let n=0;n<o;n++){const r=`series[${n}]`,l=e.series[n],c=Ro.getSeriesModule(l.type??"line");if(c==null){a??(a=cb(Array.from(Ro.listModulesByType("series")).filter(p=>!i||p.chartType===i).map(p=>p.name),"or",tN)),tt.warn(`Unknown type \`${l.type}\` at \`${r}.type\`; expecting ${a}, ignoring.`);continue}else if(i&&c.chartType!==i){tt.warn(`Series type \`${c.name}\` at \`${r}.type\` is not supported by chart type \`${i}\`, ignoring.`);continue}const{validate:h=za}=c,{valid:u,errors:d}=h(l,c.options,r);d.forEach(p=>tt.warn(p)),d.some(p=>p.required&&p.path===r)||s.push(u)}e.series=s}validateAxesOptions(e){if(!("axes"in e)||!e.axes)return;const i=this.chartDef?.name,s=[],o=e.axes.length??0;let a;for(let n=0;n<o;n++){const r=`axes[${n}]`,l=e.axes[n],c=Ro.getAxisModule(l.type);if(c==null){a??(a=cb(Array.from(Ro.listModulesByType("axis")).filter(p=>p.chartType===i).map(p=>p.name),"or",tN)),tt.warn(`Unknown type \`${l.type}\` at \`${r}.type\`; expecting one of ${a}, ignoring all axes options.`),delete e.axes;break}else if(c.chartType!==i){tt.warn(`Axis type \`${c.name}\` at \`${r}.type\` is not supported by chart type \`${i}\`, ignoring.`);break}const{validate:h=za}=c,{valid:u,errors:d}=h(l,c.options,r);d.forEach(p=>tt.warn(p)),d.some(p=>p.required&&p.path===r)||s.push(u)}e.axes=s}diffOptions(e){return this===e?{}:e==null?this.processedOptions:this.fastDelta??fr(e.processedOptions,this.processedOptions,Vi.JSON_DIFF_OPTS)}getSeriesThemeConfig(e,i){return i?.config[e]??{}}getDefaultAxes(e,i){const s=this.optionsType(e),o=e.series?.find(n=>(n.type??"line")===s)??{},a=ga.cloneDefaultAxes(s);return qb(a,{},void 0,Vt(o,i)),a}optionsType(e){return e.series?.[0]?.type??"line"}splitAnnotationsOptions(e){const{axesButtons:i=null,enabled:s=null,optionsToolbar:o=null,toolbar:a=null,...n}=e;return i==null&&s==null&&o==null&&a==null?[{},n]:[{annotations:{axesButtons:i,enabled:s,optionsToolbar:o,toolbar:a}},n]}processAxesOptions(e,i){"axes"in e&&(e.axes=e.axes?.map(s=>{const{crossLines:o,...a}=Vt(i[s.type]?.[s.position],i[s.type]);s.crossLines&&(s.crossLines=Ab(s.crossLines,o));const n=a.gridLine?.style;s.gridLine?.style&&n?.length&&(s.gridLine.style=s.gridLine.style.map((d,p)=>d.stroke!=null||d.lineDash!=null?Vt(d,n.at(p%n.length)):d));const{top:r,right:l,bottom:c,left:h,...u}=Vt(s,a);return u}))}processSeriesOptions(e,i){const s=this.getTooltipPositionDefaults(e),o=e.series?.map(a=>{a.type??(a.type="line");const{innerLabels:n,...r}=this.getSeriesThemeConfig(a.type,i).series??{},l=Ro.getSeriesModule(a.type),c=!!l?.options.tooltip,h=!!l?.options.visible,u=c&&this.getTooltipRangeDefaults(e,a.type),d=Vt(this.getSeriesGroupingOptions(a),a,c&&s,u,r,h&&{visible:!0});return d.innerLabels&&(d.innerLabels=Ab(d.innerLabels,n)),d});e.series=this.setSeriesGroupingOptions(o??[])}processMiniChartSeriesOptions(e){let i=e.navigator?.miniChart?.series;i!=null&&(i=i.map(s=>(s.type??(s.type="line"),s)),e.navigator.miniChart.series=this.setSeriesGroupingOptions(i))}getThemeParameters(e,i){const s=e.getPublicParameters();if(!Ye(i.theme)||!i.theme.params)return s;const{valid:o,errors:a}=za(i.theme.params,JL.params);for(const{message:n}of a)tt.warnOnce(n);return Vt(o,s)}resolveThemeOperations(e,i){const s=qb(i,e,new Set(["palette","data","theme"]));Vi.debug("ChartOptions.resolveTheme()",s)}getSeriesGroupingOptions(e){const i=ga.isGroupable(e.type),s=ga.isStackable(e.type),o=ga.isStackedByDefault(e.type);e.grouped&&!i&&tt.warnOnce(`unsupported grouping of series type "${e.type}".`),(e.stacked||e.stackGroup)&&!s&&tt.warnOnce(`unsupported stacking of series type "${e.type}".`);let{grouped:a,stacked:n}=e;return n??(n=(o||e.stackGroup!=null)&&!(i&&a)),a??(a=!0),{stacked:s&&n,grouped:i&&a&&!(s&&n)}}setSeriesGroupingOptions(e){const i=this.getSeriesGrouping(e);Vi.debug("ChartOptions.setSeriesGroupingOptions() - series grouping: ",i);const s={},o=i.reduce((a,n)=>{var r;return n.groupType==="default"||(a[r=n.seriesType]??(a[r]=0),a[n.seriesType]+=n.groupType==="stack"?1:n.series.length),a},{});return i.flatMap(a=>{var n;switch(s[n=a.seriesType]??(s[n]=0),a.groupType){case"stack":{const r=s[a.seriesType]++;return a.series.map((l,c)=>Object.assign(l,{seriesGrouping:{groupId:a.groupId,groupIndex:r,groupCount:o[a.seriesType],stackIndex:c,stackCount:a.series.length}}))}case"group":return a.series.map(r=>Object.assign(r,{seriesGrouping:{groupId:a.groupId,groupIndex:s[a.seriesType]++,groupCount:o[a.seriesType],stackIndex:0,stackCount:0}}))}return a.series}).map(({stacked:a,grouped:n,...r})=>r)}getSeriesGroupId(e){return[e.type,e.xKey,e.stacked?e.stackGroup??"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(e){const i=new Map;return e.reduce((s,o)=>{const a=o.type;if(!o.stacked&&!o.grouped)s.push({groupType:"default",seriesType:a,series:[o],groupId:"__default__"});else{const n=this.getSeriesGroupId(o);if(!i.has(n)){const l={groupType:o.stacked?"stack":"group",seriesType:a,series:[],groupId:n};i.set(n,l),s.push(l)}i.get(n).series.push(o)}return s},[])}getTooltipPositionDefaults(e){const i=e.tooltip?.position;if(!Ye(i))return;const{type:s,anchorTo:o,placement:a,xOffset:n,yOffset:r}=i,l={};return Wi(s)&&db(cM,s)&&(l.type=s),Wi(o)&&db(rM,o)&&(l.anchorTo=o),Wi(a)&&db(lM,a)&&(l.placement=a),Zt(n)&&(l.xOffset=n),Zt(r)&&(l.yOffset=r),{tooltip:{position:l}}}getTooltipRangeDefaults(e,i){return{tooltip:{range:e.tooltip?.range??ga.getTooltipDefauls(i)?.range}}}soloSeriesIntegrity(e){if(!Et(e.series))return;const i=e.series;if(i&&i.length>1&&i.some(s=>ga.isSolo(s.type))){const s=this.optionsType(e);if(ga.isSolo(s))tt.warn(`series[0] of type '${s}' is incompatible with other series types. Only processing series[0]`),e.series=i.slice(0,1);else{const{solo:o,nonSolo:a}=fb(i,r=>ga.isSolo(r.type)?"solo":"nonSolo"),n=n_(o.map(r=>r.type)).join(", ");tt.warn(`Unable to mix these series types with the lead series type: ${n}`),e.series=a}}}static enableConfiguredJsonOptions(e,i){typeof i=="object"&&"enabled"in i&&!i._enabledFromTheme&&e.enabled==null&&(i.enabled=!0)}static cleanupEnabledFromThemeJsonOptions(e){e._enabledFromTheme!=null&&delete e._enabledFromTheme}enableConfiguredOptions(e,i){ul(i,Vi.enableConfiguredJsonOptions,new Set(["data","theme"]),e),ul(e,Vi.cleanupEnabledFromThemeJsonOptions,new Set(["data","theme"]))}static removeDisabledOptionJson(e){"enabled"in e&&e.enabled===!1&&Object.keys(e).forEach(i=>{i!=="enabled"&&delete e[i]})}removeDisabledOptions(e){ul(e,Vi.removeDisabledOptionJson,new Set(["data","theme"]))}static removeLeftoverSymbolsJson(e){if(!(!e||!li(e)))for(const i of Object.keys(e)){const s=e[i];qE(s)&&delete e[i]}}removeLeftoverSymbols(e){ul(e,Vi.removeLeftoverSymbolsJson,new Set(["data"]))}specialOverridesDefaults(e){if(e.window==null?e.window=xe():UE(e.window),e.document==null?e.document=cr():WE(e.document),e.window==null)throw new Error("AG Charts - unable to resolve global window");if(e.document==null)throw new Error("AG Charts - unable to resolve global document");return e}},$u.OPTIONS_CLONE_OPTS={shallow:new Set(["data","container"]),assign:new Set(["context","theme"])},$u.JSON_DIFF_OPTS=new Set(["data"]),$u.perfDebug=ee.create(!0,"perf"),$u.FAST_PATH_OPTIONS=new Set(["data","width","height","container"]),$u.debug=ee.create(!0,"opts"),bM=$u}}),wG,SM,EG,Met=k({"packages/ag-charts-community/src/util/pool.ts"(){"use strict";Ui(),wG=1e3,SM=class Bh{constructor(e,i,s,o,a,n=wG){this.name=e,this.buildItem=i,this.releaseItem=s,this.destroyItem=o,this.maxPoolSize=a,this.cleanupTimeMs=n,this.freePool=[],this.busyPool=new Set}static getPool(e,i,s,o,a){return this.pools.has(e)||this.pools.set(e,new Bh(e,i,s,o,a)),this.pools.get(e)}isFull(){return this.freePool.length+this.busyPool.size>=this.maxPoolSize}hasFree(){return this.freePool.length>0}obtain(e){if(!this.hasFree()&&this.isFull())throw new Error("AG Charts - pool exhausted");let i=this.freePool.pop();return i==null?(i=this.buildItem(e),Bh.debug(()=>[`Pool[name=${this.name}]: Created instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i])):Bh.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,i]),this.busyPool.add(i),{item:i,release:()=>this.release(i)}}obtainFree(){const e=this.freePool.pop();if(e==null)throw new Error("AG Charts - pool has no free instances");return Bh.debug(()=>[`Pool[name=${this.name}]: Re-used instance (${this.freePool.length} / ${this.busyPool.size+1} / ${this.maxPoolSize})`,e]),this.busyPool.add(e),{item:e,release:()=>this.release(e)}}release(e){if(!this.busyPool.has(e))throw new Error("AG Charts - cannot free item from pool which is not tracked as busy.");Bh.debug(()=>[`Pool[name=${this.name}]: Releasing instance (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,e]),this.releaseItem(e),this.busyPool.delete(e),this.freePool.push(e),Bh.debug(()=>[`Pool[name=${this.name}]: Returned instance to free pool (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`,e]);const i=Date.now(),s=i+this.cleanupTimeMs*.5;this.cleanPoolTimer&&(this.cleanPoolDue??1/0)<s&&(clearTimeout(this.cleanPoolTimer),this.cleanPoolTimer=void 0),this.cleanPoolTimer||(this.cleanPoolDue=i+this.cleanupTimeMs,this.cleanPoolTimer=setTimeout(this.cleanPool.bind(this),this.cleanupTimeMs))}cleanPool(){const e=this.freePool.splice(0);for(const i of e)this.destroyItem(i);Bh.debug(()=>[`Pool[name=${this.name}]: Cleaned pool of ${e.length} items (${this.freePool.length} / ${this.busyPool.size} / ${this.maxPoolSize})`])}destroy(){this.cleanPool();for(const e of this.busyPool.values())this.destroyItem(e);this.busyPool.clear()}},SM.pools=new Map,SM.debug=ee.create(!0,"pool"),EG=SM}}),Br,Fl,Vn,eN,Det=k({"packages/ag-charts-community/src/api/agCharts.ts"(){"use strict";P(),QS(),v7(),g4(),XQ(),oJ(),nM(),OG(),Ui(),zo(),qt(),Met(),uS(),FR(),Ro.registerMany(W4),Br=ee.create(!0,"opts"),Fl=class{static licenseCheck(t){this.licenseChecked||(this.licenseManager=_r.licenseManager?.(t),this.licenseManager?.validateLicense(),this.licenseChecked=!0)}static getLicenseDetails(t){return _r.licenseManager?.({}).getLicenseDetails(t)}static getInstance(t){return eN.getInstance(t)}static create(t,e){return Br.group("AgCharts.create()",()=>{t=ee.inDevelopmentMode(()=>Yh(we(t)))??t,this.licenseCheck(t);const i=eN.createOrUpdate({userOptions:t,licenseManager:this.licenseManager,optionsMetadata:e});return this.licenseManager?.isDisplayWatermark()&&this.licenseManager&&_r.injectWatermark?.(i.chart.ctx.domManager,this.licenseManager.getWatermarkMessage()),i})}static createFinancialChart(t){return Br.group("AgCharts.createFinancialChart()",()=>this.create(t,{presetType:"price-volume"}))}static createGauge(t){return Br.group("AgCharts.createGauge()",()=>this.create(t,{presetType:"gauge"}))}static __createSparkline(t){return Br.group("AgCharts.__createSparkline()",()=>{const{pool:e,...i}=t;return this.create(i,{presetType:"sparkline",pool:e??!0,domMode:"minimal"})})}},Fl.licenseChecked=!1,Vn=class zh{static getInstance(e){const i=Em.getInstance(e);return i?fC.chartInstances.get(i):void 0}static initialiseModules(){zh.initialised||(UL(),$Q(),zh.initialised=!0)}static createOrUpdate(e){let{proxy:i}=e;const{userOptions:s,licenseManager:o,processedOverrides:a=i?.chart?.chartOptions.processedOverrides??{},specialOverrides:n=i?.chart?.chartOptions.specialOverrides??{},optionsMetadata:r=i?.chart?.chartOptions.optionMetadata??{},deltaOptions:l,stripSymbols:c=!1}=e,h=_r.styles!=null?[["ag-charts-enterprise",_r.styles]]:[],{presetType:u}=r;zh.initialiseModules(),Br(()=>[">>> AgCharts.createOrUpdate() user options",we(s)]);let d=s;Fl.optionsMutationFn&&d&&(d=Fl.optionsMutationFn(we(d),u),Br(()=>[">>> AgCharts.createOrUpdate() MUTATED user options",we(d)]));const p=this.getPool(r);let g=!1,f,x=i?.chart;x==null&&p?.hasFree()&&(f=p.obtainFree(),x=f.item);const{document:y,window:b,styleContainer:S,...M}=d??{},D=x?.getChartOptions(),L=new bM(D,M,a,{...n,document:y,window:b,styleContainer:S},r,l,c);return(x==null||Ro.detectChartDefinition(L.processedOptions)!==Ro.detectChartDefinition(x.chartOptions.processedOptions))&&(f?.release(),f=this.getPool(L.optionMetadata)?.obtain(L),f?x=f.item:(g=!0,x=zh.createChartInstance(L,x))),h.forEach(([T,I])=>{x.ctx.domManager.addStyles(T,I)}),i==null?(i=new fC(x,zh.callbackApi,o),i.releaseChart=f?.release):(f||g)&&(i.releaseChart?.(),i.chart=x,i.releaseChart=f?.release),Br.check()&&typeof window<"u"&&(window.agChartInstances??(window.agChartInstances={}),window.agChartInstances[x.id]=x),x.queuedUserOptions.push(L.userOptions),x.queuedChartOptions.push(L),x.requestFactoryUpdate(T=>{Br.group(">>>> Chart.applyOptions()",()=>{T.applyOptions(L);const I=T.queuedUserOptions.indexOf(L.userOptions)+1;T.queuedUserOptions.splice(0,I),T.queuedChartOptions.splice(0,I)})}),i}static markRemovedProperties(e,i,s=!1){if(typeof e!="object")return s;for(const o of Object.keys(e))typeof e[o]>"u"&&(Object.assign(e,{[o]:Symbol("UNSET")}),s||(s=!0));return s}static updateUserDelta(e,i){i=we(i,bM.OPTIONS_CLONE_OPTS);const s=ul(i,zh.markRemovedProperties,new Set(["data"]),void 0,void 0,!1);Br(()=>[">>> AgCharts.updateUserDelta() user delta",we(i)]),zh.createOrUpdate({proxy:e,deltaOptions:i,stripSymbols:s})}static createChartInstance(e,i){const s=i?.destroy({keepTransferableResources:!0});return Ro.detectChartDefinition(e.processedOptions).create(e,s)}static getPool(e){if(e.pool===!0)return EG.getPool(e.presetType??"default",this.createChartInstance,this.detachAndClear,this.destroy,1/0)}},Vn.caretaker=new lI(ou),Vn.initialised=!1,Vn.callbackApi={caretaker:Vn.caretaker,create(t,e,i,s){return Vn.createOrUpdate({userOptions:t,processedOverrides:e,specialOverrides:i,optionsMetadata:s})},update(t,e){return Vn.createOrUpdate({userOptions:t,proxy:e})},updateUserDelta(t,e){return Vn.updateUserDelta(t,e)}},Vn.detachAndClear=t=>t.detachAndClear(),Vn.destroy=t=>t.destroy(),eN=Vn}}),Wn,_G=k({"packages/ag-charts-community/src/scene/shape/arc.ts"(){"use strict";P(),Ci(),Xt(),Xa(),Wn=class extends io{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=Math.PI*2,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return In(ke(this.startAngle),ke(this.endAngle))}updatePath(){const t=this.path;t.clear(),t.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===1?t.closePath():this.type===2&&!this.fullPie&&(t.lineTo(this.centerX,this.centerY),t.closePath())}computeBBox(){return new pt(this.centerX-this.radius,this.centerY-this.radius,this.radius*2,this.radius*2)}isPointInPath(t,e){const i=this.getBBox();return this.type!==0&&i.containsPoint(t,e)&&this.path.isPointInPath(t,e)}},Wn.className="Arc",v([Ot()],Wn.prototype,"centerX",2),v([Ot()],Wn.prototype,"centerY",2),v([Ot()],Wn.prototype,"radius",2),v([Ot()],Wn.prototype,"startAngle",2),v([Ot()],Wn.prototype,"endAngle",2),v([Ot()],Wn.prototype,"counterClockwise",2),v([Ot()],Wn.prototype,"type",2)}});function iN(t,e,i){const s=Math.sqrt(t**2+e**2),a=Math.atan2(e,t)+i;return{x:Math.cos(a)*s,y:Math.sin(a)*s}}function RG(t,e,i,s,o){const a=Tb(t,e),n=a*(1-s)/2;if(t+=n,e-=n,a<.001)return 2*i*o;if(a>=2*Math.PI){const p=t+a/2;t=p-Math.PI,e=p+Math.PI}const r=i*Math.cos(t),l=i*Math.sin(t),c=i*Math.cos(e),h=i*Math.sin(e),u=Math.floor(Math.sqrt((r-c)**2+(l-h)**2)),d=2*i*o;return Math.max(1,Math.min(d,u))}var Da,PG=k({"packages/ag-charts-community/src/scene/shape/radialColumnShape.ts"(){"use strict";P(),Ci(),Xt(),Xa(),Da=class extends io{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}set cornerRadius(t){}computeBBox(){const{innerRadius:t,outerRadius:e,columnWidth:i}=this,s=this.getRotation(),o=-i/2,a=i/2,n=-e,r=-t;let l=1/0,c=1/0,h=-1/0,u=-1/0;for(let d=0;d<4;d+=1){const{x:p,y:g}=iN(d%2===0?o:a,d<2?n:r,s);l=Math.min(p,l),c=Math.min(g,c),h=Math.max(p,h),u=Math.max(g,u)}return new pt(l,c,h-l,u-c)}getRotation(){const{startAngle:t,endAngle:e}=this,i=Tb(t,e);return ke(t+i/2+Math.PI/2)}updatePath(){const{isBeveled:t}=this;t?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){const{columnWidth:t,innerRadius:e,outerRadius:i,path:s}=this,o=-t/2,a=t/2,n=-i,r=-e,l=this.getRotation(),c=[[o,r],[o,n],[a,n],[a,r]].map(([h,u])=>iN(h,u,l));s.clear(!0),s.moveTo(c[0].x,c[0].y),s.lineTo(c[1].x,c[1].y),s.lineTo(c[2].x,c[2].y),s.lineTo(c[3].x,c[3].y),s.closePath()}updateBeveledPath(){const{columnWidth:t,path:e,outerRadius:i,innerRadius:s,axisInnerRadius:o,axisOuterRadius:a,isRadiusAxisReversed:n}=this,r=In(s,o),l=Math.asin(t/2/s),c=this.getRotation(),h=(I,N)=>iN(I,N,c),u=(I,N)=>Math.sqrt(I**2+N**2),d=(I,N)=>N>I?0:Math.sqrt(I**2-N**2),p=(I,N,O)=>O?I<N:I>N,g=r&&!isNaN(l)&&l<Math.PI/6;let f=-t/2,x=t/2;const y=-i,b=-s*(g?Math.cos(l):1),S=p(a,u(s,t/2),!n);if(S){const I=d(a,s);f=-I,x=I}e.clear(!0);const M=h(f,b);e.moveTo(M.x,M.y);const D=In(s,i),L=p(a,u(i,t/2),!n);if(D&&g)e.arc(0,0,s,ke(-l-Math.PI/2)+c,ke(l-Math.PI/2)+c,!1);else if(L){const I=-d(a,t/2),N=d(a,i);if(!S){const O=h(f,I);e.lineTo(O.x,O.y)}if(e.arc(0,0,a,Math.atan2(I,f)+c,Math.atan2(y,-N)+c,!1),!In(N,0)){const O=h(N,y);e.lineTo(O.x,O.y)}e.arc(0,0,a,Math.atan2(y,N)+c,Math.atan2(I,x)+c,!1)}else{const I=h(f,y),N=h(x,y);e.lineTo(I.x,I.y),e.lineTo(N.x,N.y)}const T=h(x,b);if(e.lineTo(T.x,T.y),g)e.arc(0,0,s,ke(l-Math.PI/2)+c,ke(-l-Math.PI/2)+c,!0);else{const I=h(f,b);e.lineTo(I.x,I.y)}e.closePath()}},Da.className="RadialColumnShape",v([Ot()],Da.prototype,"isBeveled",2),v([Ot()],Da.prototype,"columnWidth",2),v([Ot()],Da.prototype,"startAngle",2),v([Ot()],Da.prototype,"endAngle",2),v([Ot()],Da.prototype,"outerRadius",2),v([Ot()],Da.prototype,"innerRadius",2),v([Ot()],Da.prototype,"axisInnerRadius",2),v([Ot()],Da.prototype,"axisOuterRadius",2),v([Ot()],Da.prototype,"isRadiusAxisReversed",2)}}),sN={};mo(sN,{Arc:()=>Wn,BBox:()=>pt,Caption:()=>_e,CategoryScale:()=>jp,Group:()=>It,Line:()=>Yo,LinearScale:()=>qa,Marker:()=>Xi,Path:()=>io,RadialColumnShape:()=>Da,Rect:()=>Bs,Scene:()=>lm,Sector:()=>cs,Shape:()=>ua,TranslatableGroup:()=>qs,getRadialColumnWidth:()=>RG,toRadians:()=>je});var ket=k({"packages/ag-charts-community/src/integrated-charts-scene.ts"(){"use strict";su(),zn(),_m(),wu(),Xt(),Ve(),MI(),_G(),Mu(),Xa(),PG(),jm(),Qv(),Sc(),Ci()}}),oN={};mo(oN,{ChartTheme:()=>en,DEFAULT_ANNOTATION_HANDLE_FILL:()=>eg,DEFAULT_ANNOTATION_STATISTICS_COLOR:()=>og,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:()=>ag,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:()=>ng,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:()=>rg,DEFAULT_ANNOTATION_STATISTICS_FILL:()=>ig,DEFAULT_ANNOTATION_STATISTICS_STROKE:()=>sg,DEFAULT_CAPTION_ALIGNMENT:()=>Ll,DEFAULT_CAPTION_LAYOUT_STYLE:()=>Cl,DEFAULT_FIBONACCI_STROKES:()=>Jp,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:()=>Ni,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:()=>Ze,DEFAULT_GRIDLINE_ENABLED:()=>Gn,DEFAULT_POLAR_SERIES_STROKE:()=>$m,DEFAULT_SEPARATION_LINES_COLOUR:()=>Zp,DEFAULT_SHADOW_COLOUR:()=>Tl,DEFAULT_SPARKLINE_CROSSHAIR_STROKE:()=>Xm,DEFAULT_TEXTBOX_COLOR:()=>hg,DEFAULT_TEXTBOX_FILL:()=>lg,DEFAULT_TEXTBOX_STROKE:()=>cg,DEFAULT_TEXT_ANNOTATION_COLOR:()=>tg,DEFAULT_TOOLBAR_POSITION:()=>ug,IS_COMMUNITY:()=>fv,IS_DARK_THEME:()=>Bu,IS_ENTERPRISE:()=>mv,PALETTE_ALT_DOWN_FILL:()=>Sv,PALETTE_ALT_DOWN_STROKE:()=>xv,PALETTE_ALT_NEUTRAL_FILL:()=>vv,PALETTE_ALT_NEUTRAL_STROKE:()=>Km,PALETTE_ALT_UP_FILL:()=>bv,PALETTE_ALT_UP_STROKE:()=>yv,PALETTE_DOWN_FILL:()=>Qp,PALETTE_DOWN_STROKE:()=>Hm,PALETTE_NEUTRAL_FILL:()=>Ym,PALETTE_NEUTRAL_STROKE:()=>zu,PALETTE_UP_FILL:()=>qp,PALETTE_UP_STROKE:()=>Um,getChartTheme:()=>Oy,resolveOperation:()=>Aet,themeNames:()=>BG,themeSymbols:()=>GC,themes:()=>yM});function Aet(t){const e=en.getDefaultPublicParameters();e.__palette=en.getDefaultColors();const i={operation:t};return qb(i,e),i.operation}var BG,Iet=k({"packages/ag-charts-community/src/integrated-charts-theme.ts"(){"use strict";xM(),Bl(),zo(),xM(),hi(),Bl(),xM(),hi(),BG=Object.keys(yM)}}),aN={};mo(aN,{Color:()=>re,interpolateColor:()=>L1});var Tet=k({"packages/ag-charts-community/src/integrated-charts-util.ts"(){"use strict";Kh(),N1()}});function Cet(t,e){return typeof e=="number"?{x:t.x+e,y:t.y+e}:{x:t.x+e.x,y:t.y+e.y}}function nN(t,e){return typeof e=="number"?{x:t.x-e,y:t.y-e}:{x:t.x-e.x,y:t.y-e.y}}function Let(t,e){return typeof e=="number"?{x:t.x*e,y:t.y*e}:{x:t.x*e.x,y:t.y*e.y}}function rN(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function Net(t){return t.x*t.x+t.y*t.y}function Oet(t,e){const i=nN(t,e);return Math.sqrt(i.x*i.x+i.y*i.y)}function wet(t,e){const i=nN(t,e);return i.x*i.x+i.y*i.y}function Eet(t){const e=rN(t);return{x:t.x/e,y:t.y/e}}function _et(t,e){return e==null?Math.atan2(t.y,t.x):Math.atan2(t.y,t.x)-Math.atan2(e.y,e.x)}function Ret(t,e,i=zG()){const s=rN(t);return{x:i.x+s*Math.cos(e),y:i.y+s*Math.sin(e)}}function Pet(t,e,i){const s=e.x-t.x;return(i==null?e.y-t.y:i-e.y-(i-t.y))/s}function Bet(t,e,i){return(i==null?t.y:i-t.y)-e*t.x}function zet(t,e,i=0,s){return{x:t===1/0?1/0:(i-e)/t,y:s==null?i:s-i}}function Fet(t,e,i=0,s){const o=t===1/0?1/0:t*i+e;return{x:i,y:s==null?o:s-o}}function Get(t,e=2){return{x:nA(t.x,e),y:nA(t.y,e)}}function jet(t,e){return t.x===e.x&&t.y===e.y}function Vet(t,e){if(typeof t=="number")return{x:t,y:e};if("currentX"in t)return{x:t.currentX,y:t.currentY};if("offsetWidth"in t)return{x:t.offsetWidth,y:t.offsetHeight};if("width"in t)return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y+t.height}];if("x1"in t)return[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}];throw new Error(`Values can not be converted into a vector: [${JSON.stringify(t)}] [${e}]`)}function Wet(t,e){return t.x=e.x,t.y=e.y,t}function Uet(t){return{x:t?.x??0,y:t?.y??0}}function zG(){return{x:0,y:0}}var Xu,FG=k({"packages/ag-charts-community/src/util/vector.ts"(){"use strict";P(),Xu={add:Cet,angle:_et,apply:Wet,equal:jet,distance:Oet,distanceSquared:wet,from:Vet,gradient:Pet,intercept:Bet,intersectAtX:Fet,intersectAtY:zet,length:rN,lengthSquared:Net,multiply:Let,normalized:Eet,origin:zG,required:Uet,rotate:Ret,round:Get,sub:nN}}}),Het=k({"packages/ag-charts-community/src/module/axisModule.ts"(){"use strict"}}),Yet=k({"packages/ag-charts-community/src/module/axisOptionModule.ts"(){"use strict"}}),Ket=k({"packages/ag-charts-community/src/module/baseModule.ts"(){"use strict"}}),$et=k({"packages/ag-charts-community/src/module/coreModules.ts"(){"use strict"}}),Xet=k({"packages/ag-charts-community/src/module/optionsModuleTypes.ts"(){"use strict"}}),Zet=k({"packages/ag-charts-community/src/module/axisContext.ts"(){"use strict"}}),qet=k({"packages/ag-charts-community/src/module/moduleContext.ts"(){"use strict"}}),Qet=k({"packages/ag-charts-community/src/chart/chartAnimationPhase.ts"(){"use strict"}}),Jet=k({"packages/ag-charts-community/src/chart/series/seriesEvents.ts"(){"use strict"}}),tit=k({"packages/ag-charts-community/src/chart/series/seriesTypes.ts"(){"use strict"}}),lN,GG,jG,eit=k({"packages/ag-charts-community/src/chart/series/hierarchy/hierarchySeries.ts"(){"use strict";P(),wb(),vm(),Cu(),lN=class Yk{constructor(e,i,s,o,a,n,r,l,c){this.series=e,this.datumIndex=i,this.datum=s,this.sizeValue=o,this.colorValue=a,this.sumSize=n,this.depth=r,this.parent=l,this.children=c,this.midPoint={x:0,y:0}}get hasChildren(){return this.children.length>0}walk(e,i=Yk.Walk.PreOrder){i===Yk.Walk.PreOrder&&e(this),this.children.forEach(s=>{s.walk(e,i)}),i===Yk.Walk.PostOrder&&e(this)}*[Symbol.iterator](){yield this;for(const e of this.children)yield*e}},lN.Walk={PreOrder:0,PostOrder:1},GG=lN,jG=class extends Cm{constructor(t){super({moduleCtx:t,pickModes:[1,0]}),this.colorDomain=[0,0],this.maxDepth=0,this.colorScale=new Xh,this.animationState=new Pp("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}processData(){const{NodeClass:t}=this,{childrenKey:e,sizeKey:i,colorKey:s,colorRange:o}=this.properties;let a=0,n=1/0,r=-1/0;const l=(d,p,g)=>{const f=g.depth!=null?g.depth+1:0,x=e!=null?d[e]:void 0,y=x==null||x.length===0;let b=i!=null?d[i]:void 0;Number.isFinite(b)?b=Math.max(b,0):b=y?1:0;const S=b;a=Math.max(a,f);const M=s!=null?d[s]:void 0;return typeof M=="number"&&(n=Math.min(n,M),r=Math.max(r,M)),c(new t(this,p,d,b,M,S,f,g,[]),x)},c=(d,p)=>{const{datumIndex:g}=d;return p?.forEach((f,x)=>{const y=l(f,g.concat(x),d);d.children.push(y),d.sumSize+=y.sumSize}),d},h=c(new t(this,[],void 0,0,void 0,0,void 0,void 0,[]),this.data),u=[n,r];this.colorScale.domain=n<r?[n,r]:[0,1],this.colorScale.range=o??["black"],this.colorScale.update(),this.rootNode=h,this.maxDepth=a,this.colorDomain=u}update({seriesRect:t}){this.updateSelections(),this.updateNodes();const e=this.getAnimationData();this.checkResize(t)&&this.animationState.transition("resize",e),this.animationState.transition("update",e)}resetAllAnimation(t){this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}getAnimationData(){return{}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(t){const{colorKey:e,colorName:i,colorRange:s}=this.properties,{id:o,ctx:{legendManager:a},visible:n}=this;return t==="gradient"&&e!=null&&s!=null?[{legendType:"gradient",enabled:n&&a.getItemEnabled({seriesId:o}),seriesId:o,colorName:i,colorRange:s,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(t){return t.datumIndex.join(":")}getDatumId(t){return this.getDatumIdFromData(t)}removeMeIndexPathForIndex(t){return this.datumSelection.at(t+1)?.datum.datumIndex??[]}removeMeIndexForIndexPath(t){for(const{index:e,datum:i}of this.datumSelection)if(An(i.datumIndex,t))return e-1;return 0}pickFocus(t){if(!this.rootNode?.children.length)return;const e=Tt(0,t.datumIndex-t.datumIndexDelta,this.datumSelection.length-1),{datumIndexDelta:i,otherIndexDelta:s}=t;let o=this.removeMeIndexPathForIndex(e);const a=o.reduce((l,c)=>l.children[c],this.rootNode);if(s>0&&a.hasChildren)o=[...o,0];else if(s<0&&o.length>1)o=o.slice(0,-1);else if(s===0&&i!==0){const l=a.parent.children.length-1;o=o.slice(),o[o.length-1]=Tt(0,o[o.length-1]+i,l)}const n=o.reduce((l,c)=>l.children[c],this.rootNode),r=this.computeFocusBounds(this.datumSelection.at(e+1));if(r!=null)return{datum:n,datumIndex:this.removeMeIndexForIndexPath(o),otherIndex:n.depth,bounds:r,clipFocusBox:!0}}getDatumAriaText(t,e){if(!(t instanceof this.NodeClass)){tt.error(`datum is not HierarchyNode: ${JSON.stringify(t)}`);return}return this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(t.depth??-1)+1,count:t.children.length,description:e})}getCategoryValue(t){}datumIndexForCategoryValue(t){}}}}),Un,iit=k({"packages/ag-charts-community/src/chart/series/hierarchy/hierarchySeriesProperties.ts"(){"use strict";Nt(),Jv(),kl(),Un=class extends Ko{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(pi),this.fillGradientDefaults=new ya,this.fillPatternDefaults=new Xe,this.strokes=Object.values(jn)}},v([A(it)],Un.prototype,"childrenKey",2),v([A(it,{optional:!0})],Un.prototype,"sizeKey",2),v([A(it,{optional:!0})],Un.prototype,"colorKey",2),v([A(it,{optional:!0})],Un.prototype,"colorName",2),v([A(Hi(fs(Cn,Ln,zt)))],Un.prototype,"fills",2),v([A(ct)],Un.prototype,"fillGradientDefaults",2),v([A(ct)],Un.prototype,"fillPatternDefaults",2),v([A(hl)],Un.prototype,"strokes",2),v([A(hl,{optional:!0})],Un.prototype,"colorRange",2)}}),sit=k({"packages/ag-charts-community/src/chart/series/topologySeries.ts"(){"use strict"}}),oit=k({"packages/ag-charts-community/src/chart/series/flowProportionSeries.ts"(){"use strict"}}),ait=k({"packages/ag-charts-community/src/chart/series/topology/geojson.ts"(){"use strict"}}),VG,nit=k({"packages/ag-charts-community/src/chart/series/topology/lonLatBbox.ts"(){"use strict";VG=class{constructor(t,e,i,s){this.lon0=t,this.lat0=e,this.lon1=i,this.lat1=s}merge(t){this.lon0=Math.min(this.lon0,t.lon0),this.lat0=Math.min(this.lat0,t.lat0),this.lon1=Math.max(this.lon1,t.lon1),this.lat1=Math.max(this.lat1,t.lat1)}}}}),wy,vM,MM,DM,kM,WG,rit=k({"packages/ag-charts-community/src/chart/series/topology/mercatorScale.ts"(){"use strict";Nb(),Xt(),wy=Math.PI/180,vM=t=>t*wy,MM=t=>-Math.log(Math.tan(Math.PI*.25+t*wy*.5)),DM=t=>t/wy,kM=t=>(Math.atan(Math.exp(-t))-Math.PI*.25)/(wy*.5),WG=class OE extends Hf{constructor(e,i){super(),this.domain=e,this.range=i,this.type="mercator",this.bounds=OE.bounds(e)}static bounds(e){const[[i,s],[o,a]]=e,n=vM(i),r=MM(s),l=vM(o),c=MM(a);return new pt(Math.min(n,l),Math.min(r,c),Math.abs(l-n),Math.abs(c-r))}static fixedScale(){return new OE([[DM(0),kM(0)],[DM(1),kM(1)]],[[0,0],[1,1]])}toDomain(){}normalizeDomains(...e){let i=-1/0,s=1/0,o=-1/0,a=1/0;for(const n of e)for(const[r,l]of n)i=Math.min(r,i),s=Math.max(r,s),o=Math.min(l,o),a=Math.max(l,a);return{domain:[[i,o],[s,a]],animatable:!0}}convert([e,i]){const[[s,o],[a,n]]=this.range,r=(a-s)/this.bounds.width,l=(n-o)/this.bounds.height;return[(vM(e)-this.bounds.x)*r+s,(MM(i)-this.bounds.y)*l+o]}invert([e,i]){const[[s,o],[a,n]]=this.range,r=(a-s)/this.bounds.width,l=(n-o)/this.bounds.height;return[DM((e-s)/r+this.bounds.x),kM((i-o)/l+this.bounds.y)]}}}}),lit=k({"packages/ag-charts-community/src/chart/series/gaugeSeries.ts"(){"use strict"}}),AM,UG,cit=k({"packages/ag-charts-community/src/chart/axis/axisTicks.ts"(){"use strict";P(),wu(),Xt(),Ve(),Nc(),Vo(),Ac(),Bo(),da(),HT(),Go(),mu(),BT(),VS(),AM=class wE{constructor(){this.id=la(this),this.axisGroup=new qs({name:`${this.id}-AxisTicks`,zIndex:2}),this.labelSelection=bi.select(this.axisGroup,Yi),this.interval=new Oc,this.label=new $i,this.scale=new qa,this.position="bottom",this.translationX=0,this.translationY=0,this.padding=0}attachAxis(e){e.appendChild(this.axisGroup)}calculateLayout(){const e=[],i=this.generateTicks(),{translationX:s,translationY:o}=this;return this.labelSelection.update(i.ticks.map(a=>this.createLabelDatum(a)),void 0,a=>a.tickId),this.labelSelection.each((a,n)=>{a.setProperties(n),n.visible&&e.push(a.getBBox())}),this.axisGroup.setProperties({translationX:s,translationY:o}),e.length>0?pt.merge(e):void 0}getLabelParams(e){const{padding:i}=this,{translate:s}=e;switch(this.position){case"top":case"bottom":return{x:s,y:i,textAlign:"center",textBaseline:"top"};case"left":case"right":return{x:i,y:s,textAlign:"start",textBaseline:"middle"}}}inRange(e,i=.001){const[s,o]=Li(this.scale.range);return e>=s-i&&e<=o+i}createLabelDatum(e){const{x:i,y:s,textBaseline:o,textAlign:a}=this.getLabelParams(e);return{visible:!!e.tickLabel,tickId:e.tickId,fill:this.label.color,fontFamily:this.label.fontFamily,fontSize:this.label.fontSize,fontStyle:this.label.fontStyle,fontWeight:this.label.fontWeight,rotation:0,rotationCenterX:0,text:e.tickLabel,textAlign:a,textBaseline:o,x:i,y:s}}generateTicks(){const{minSpacing:e,maxSpacing:i}=this.interval,{maxTickCount:s,minTickCount:o,tickCount:a}=vP(Ip(this.scale.range),1,e,i,wE.DefaultTickCount,wE.DefaultMinSpacing),n=this.getTicksData({nice:!0,interval:this.interval.step,tickCount:a,minTickCount:o,maxTickCount:s});if(this.position==="bottom"||this.position==="top"){const r=yr.getMeasurer({font:this.label}),{domain:l}=this.scale,h=l[0]>l[1]?-1:1;let u=-1/0*h;n.ticks=n.ticks.filter(d=>Math.sign(d.translate-u)!==h?!1:(u=d.translate+r.textWidth(d.tickLabel,!0)*h,!0))}return n}getTicksData(e){const i=[],s=e.nice?this.scale.niceDomain(e):this.scale.domain,o=this.scale.ticks(e,s),a=o.reduce((c,h)=>Math.max(c,yb(h)),0),n=[],r=UT(),l=this.label.format?this.scale.tickFormatter({domain:s,ticks:o,fractionDigits:a,specifier:this.label.format}):c=>ml(c,a);for(let c=0;c<o.length;c++){const h=o[c],u=this.scale.convert(h);if(!this.inRange(u))continue;const d=this.label.formatter?.({value:h,index:c,domain:s,fractionDigits:a,boundSeries:n})??l(h),p=r(d);i.push({tick:h,tickId:p,tickLabel:d,translate:u})}return{rawTicks:o,fractionDigits:a,ticks:i}}},AM.DefaultTickCount=5,AM.DefaultMinSpacing=10,UG=AM}}),hit=k({"packages/ag-charts-community/src/chart/chartAxis.ts"(){"use strict"}}),uit=k({"packages/ag-charts-community/src/chart/legend/legendDatum.ts"(){"use strict"}});function dit(t,e){const i=Bt("button",IM("ag-charts-input ag-charts-button",e));return t.label!==void 0?i.append(t.label):(i.append(HG(t.icon)),i.ariaLabel=t.altText),i.addEventListener("click",t.onPress),eu(i,e),i}function pit(t,e){const i=Bt("input",IM("ag-charts-input ag-charts-checkbox",e));return i.type="checkbox",i.checked=t.checked,i.addEventListener("change",s=>t.onChange(i.checked,s)),i.addEventListener("keydown",s=>{hI(s)&&(s.preventDefault(),i.click())}),eu(i,e),i}function git(t,e){const i=Bt("select",IM("ag-charts-input ag-charts-select",e));return i.append(...t.options.map(s=>{const o=Bt("option");return o.value=s.value,o.textContent=s.label,o})),ve(i,"data-preventdefault",!1),i.value=t.value,i.addEventListener("change",s=>t.onChange(i.value,s)),eu(i,e),i}function fit(t,e){const i=Bt("textarea",IM("ag-charts-input ag-charts-textarea",e));return i.value=t.value,i.addEventListener("input",s=>t.onChange(i.value,s)),eu(i,e),ve(i,"data-preventdefault",!1),i}function HG(t){const e=Bt("span",`ag-charts-icon ag-charts-icon-${t}`);return ve(e,"aria-hidden",!0),e}function IM(t,e){return e==null?t:`${t} ${e.class}`}var mit=k({"packages/ag-charts-community/src/dom/elements.ts"(){"use strict";P(),Qs(),Sp()}}),yit=k({"packages/ag-charts-community/src/scale/scale.ts"(){"use strict"}}),TM,xit=k({"packages/ag-charts-community/src/scene/shape/svgPath.ts"(){"use strict";Xa(),TM=class extends io{constructor(t=""){super(),this.x=0,this.y=0,this.commands=[],this._d="",this.d=t}get d(){return this._d}set d(t){if(t!==this._d){this._d=t,this.commands.length=0;for(const[e,i,s]of t.matchAll(/([A-Z])([0-9. ]*)/g)){const o=s.split(/\s+/g).map(Number);this.commands.push([i,o])}this.checkPathDirty()}}updatePath(){const{path:t,x:e,y:i}=this;t.clear();let s=e,o=i;for(const[a,n]of this.commands)switch(a){case"M":t.moveTo(e+n[0],i+n[1]),s=e+n[0];break;case"C":t.cubicCurveTo(e+n[0],i+n[1],e+n[2],i+n[3],e+n[4],i+n[5]),s=e+n[4],o=i+n[5];break;case"H":t.lineTo(e+n[0],o),s=i+n[0];break;case"L":t.lineTo(e+n[0],i+n[1]),s=e+n[0],o=i+n[1];break;case"V":t.lineTo(s,i+n[0]),o=i+n[0];break;case"Z":t.closePath();break;default:throw new Error(`Could not translate command '${a}' with '${n.join(" ")}'`)}t.closePath()}},v([Ot()],TM.prototype,"x",2),v([Ot()],TM.prototype,"y",2)}}),Zu,bit=k({"packages/ag-charts-community/src/scene/image.ts"(){"use strict";ca(),Zu=class extends ur{constructor(t){super(),this.sourceImage=t,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}render(t){const{ctx:e}=t,i=this.sourceImage;i&&(e.globalAlpha=this.opacity,e.drawImage(i,0,0,i.width,i.height,this.x,this.y,this.width,this.height)),super.render(t)}},v([gt()],Zu.prototype,"x",2),v([gt()],Zu.prototype,"y",2),v([gt()],Zu.prototype,"width",2),v([gt()],Zu.prototype,"height",2),v([gt()],Zu.prototype,"opacity",2)}}),YG={};mo(YG,{ButtonWidget:()=>vp,NativeWidget:()=>ru,SliderWidget:()=>xS,ToolbarWidget:()=>rm,WIDGET_HTML_EVENTS:()=>sS,Widget:()=>Rn,WidgetEventUtil:()=>mr});var KG=k({"packages/ag-charts-community/src/widget/exports.ts"(){"use strict";pl(),oS(),mS(),xI(),fS(),h1()}}),cN,CM,hN=k({"packages/ag-charts-community/src/components/popover/popover.ts"(){"use strict";P(),hr(),Sp(),cN="canvas-overlay",CM=class extends Pf{constructor(t,e,i){super(),this.ctx=t,this.hideFns=[],this.moduleId=`popover-${e}`,i?.detached?this.element=Bt("div"):this.element=t.domManager.addChild(cN,this.moduleId),this.element.setAttribute("role","presentation"),this.destroyFns.push(()=>t.domManager.removeChild(cN,this.moduleId))}attachTo(t){this.element.parentElement||t.element.append(this.element)}hide(t){const{lastFocus:e=this.lastFocus}=t??{};this.element.children.length!==0&&(this.hideFns.forEach(i=>i()),e?.focus(),this.lastFocus=void 0)}removeChildren(){this.element.replaceChildren()}showWithChildren(t,e){if(!this.element.parentElement)throw new Error("Can not show popover that has not been attached to a parent.");const i=Bt("div","ag-charts-popover");if(e.ariaLabel!=null&&i.setAttribute("aria-label",e.ariaLabel),e.class!=null&&i.classList.add(e.class),i.replaceChildren(...t),this.element.replaceChildren(i),this.hideFns.push(()=>this.removeChildren()),e.onHide&&this.hideFns.push(e.onHide),e.initialFocus&&e.sourceEvent){const s=uI(e.sourceEvent);s!==void 0&&(this.lastFocus=s,this.initialFocus=e.initialFocus)}return i}getPopoverElement(){return this.element.firstElementChild}updatePosition(t){const e=this.getPopoverElement();e&&(e.style.setProperty("right","unset"),e.style.setProperty("bottom","unset"),t.x!=null&&e.style.setProperty("left",`${Math.floor(t.x)}px`),t.y!=null&&e.style.setProperty("top",`${Math.floor(t.y)}px`),this.initialFocus?.focus(),this.initialFocus=void 0)}}}}),uN,$G=k({"packages/ag-charts-community/src/components/popover/anchoredPopover.ts"(){"use strict";P(),hN(),uN=class extends CM{setAnchor(t,e){this.anchor=t,this.fallbackAnchor=e,this.updatePosition(t),this.repositionWithinBounds()}showWithChildren(t,e){const i=e.anchor??this.anchor,s=e.fallbackAnchor??this.fallbackAnchor,o=super.showWithChildren(t,e);return i&&this.setAnchor(i,s),xe().requestAnimationFrame(()=>{this.repositionWithinBounds()}),o}repositionWithinBounds(){const{anchor:t,ctx:e,fallbackAnchor:i}=this,s=this.getPopoverElement();if(!t||!s)return;const o=e.domManager.getBoundingClientRect(),{offsetWidth:a,offsetHeight:n}=s;let r=Tt(0,t.x,o.width-a),l=Tt(0,t.y,o.height-n);r!==t.x&&i?.x!=null&&(r=Tt(0,i.x-a,o.width-a)),l!==t.y&&i?.y!=null&&(l=Tt(0,i.y-n,o.height-n)),this.updatePosition({x:r,y:l})}}}}),XG,Sit=k({"packages/ag-charts-community/src/components/menu/menu.ts"(){"use strict";P(),Jh(),Sp(),$G(),XG=class extends uN{show(t){const e=t.items.map(s=>this.createRow(t,s)),i=this.showWithChildren(e,t);i.classList.add("ag-charts-menu"),i.setAttribute("role","menu"),this.menuCloser=KR({orientation:"vertical",menu:i,buttons:e,sourceEvent:t.sourceEvent,closeCallback:()=>this.hide()}),this.hideFns.push(()=>{this.menuCloser?.finishClosing(),this.menuCloser=void 0})}createRow(t,e){const{menuItemRole:i="menuitem"}=t,s=e.value===t.value,o=Bt("div","ag-charts-menu__row");if(o.setAttribute("role",i),i==="menuitemradio"&&o.setAttribute("aria-checked",(t.value===e.value).toString()),typeof e.value=="string"&&(o.dataset.popoverId=e.value),o.classList.toggle("ag-charts-menu__row--active",s),e.icon!=null){const l=Bt("span",`ag-charts-menu__icon ${Zb(e.icon)}`);o.appendChild(l)}const a=e.strokeWidth!=null;if(a&&(o.classList.toggle("ag-charts-menu__row--stroke-width-visible",a),o.style.setProperty("--strokeWidth",a?`${e.strokeWidth}px`:null)),e.label!=null){const l=Bt("span","ag-charts-menu__label");l.textContent=this.ctx.localeManager.t(e.label),o.appendChild(l)}"altText"in e&&(o.ariaLabel=this.ctx.localeManager.t(e.altText));const n=()=>{t.onPress?.(e)},r=l=>{hI(l)&&(n(),l.preventDefault(),l.stopPropagation())};return o.addEventListener("keydown",r),o.addEventListener("click",r),o.addEventListener("mousemove",()=>{o.focus({preventScroll:!0})}),o}}}}),dN,ZG=k({"packages/ag-charts-community/src/components/popover/draggablePopover.ts"(){"use strict";FG(),hN(),dN=class extends CM{constructor(){super(...arguments),this.dragged=!1}setDragHandle(t){t.addListener("drag-start",e=>{t.addClass(this.dragHandleDraggingClass),this.onDragStart(e)}),t.addListener("drag-move",this.onDragMove.bind(this)),t.addListener("drag-end",()=>{t.removeClass(this.dragHandleDraggingClass),this.onDragEnd.bind(this)})}onDragStart(t){const e=this.getPopoverElement();e&&(t.sourceEvent.preventDefault(),this.dragged=!0,this.dragStartState={client:Xu.from(t.clientX,t.clientY),position:Xu.from(Number(e.style.getPropertyValue("left").replace("px","")),Number(e.style.getPropertyValue("top").replace("px","")))})}onDragMove(t){const{dragStartState:e}=this,i=this.getPopoverElement();if(!e||!i)return;const s=Xu.sub(Xu.from(t.clientX,t.clientY),e.client),o=Xu.add(e.position,s),a=this.ctx.domManager.getBoundingClientRect(),n={};o.x>=0&&o.x+i.offsetWidth<=a.width&&(n.x=o.x),o.y>=0&&o.y+i.offsetHeight<=a.height&&(n.y=o.y),this.updatePosition(n)}onDragEnd(){this.dragStartState=void 0}}}}),Mg,vit=k({"packages/ag-charts-community/src/components/toolbar/toolbarButtonProperties.ts"(){"use strict";ge(),Nt(),Mg=class extends Ct{},v([A(it,{optional:!0})],Mg.prototype,"icon",2),v([A(it,{optional:!0})],Mg.prototype,"label",2),v([A(it,{optional:!0})],Mg.prototype,"ariaLabel",2),v([A(it,{optional:!0})],Mg.prototype,"tooltip",2)}}),pN,qG=k({"packages/ag-charts-community/src/components/toolbar/toolbarButtonWidget.ts"(){"use strict";Qs(),Jh(),fS(),pN=class extends vp{constructor(t){super(),this.localeManager=t}update(t){const{localeManager:e}=this;t.tooltip&&(this.elem.title=e.t(t.tooltip));let i="";if(t.icon!=null&&(i=`<span class="${Zb(t.icon)} ag-charts-toolbar__icon"></span>`),t.label!=null){const s=e.t(t.label);i=`${i}<span class="ag-charts-toolbar__label">${s}</span>`}this.elem.innerHTML=i}setChecked(t){ve(this.elem,"aria-checked",t)}}}}),gN,LM,QG,JG=k({"packages/ag-charts-community/src/components/toolbar/toolbar.ts"(){"use strict";Xt(),gl(),ge(),xI(),qG(),gN="ag-charts-toolbar__button--active",LM=class extends rm{constructor(t,e="horizontal"){super(e),this.localeManager=t,this.horizontalSpacing=10,this.verticalSpacing=10,this.events=new xr,this.hasPrefix=!1,this.buttonWidgets=[],this.addClass("ag-charts-toolbar"),this.toggleClass("ag-charts-toolbar--horizontal",e==="horizontal"),this.toggleClass("ag-charts-toolbar--vertical",e==="vertical")}addToolbarListener(t,e){return this.events.addListener(t,e)}clearButtons(){for(const t of this.buttonWidgets)t.destroy();this.buttonWidgets.splice(0)}updateButtons(t){const{buttonWidgets:e}=this;for(const[i,s]of t.entries())(this.buttonWidgets.at(i)??this.createButton(i,s)).update(s);for(let i=t.length;i<e.length;i++)this.buttonWidgets.at(i)?.destroy();this.buttonWidgets.splice(t.length),this.refreshButtonClasses()}updateButtonByIndex(t,e){this.buttonWidgets.at(t)?.update(e)}clearActiveButton(){for(const t of this.buttonWidgets)t.toggleClass(gN,!1)}toggleActiveButtonByIndex(t){if(t!==-1)for(const[e,i]of this.buttonWidgets.entries())i.toggleClass(gN,t!=null&&t===e)}toggleButtonEnabledByIndex(t,e){t!==-1&&this.buttonWidgets.at(t)?.setEnabled(e)}toggleSwitchCheckedByIndex(t,e){t!==-1&&this.buttonWidgets.at(t)?.setChecked(e)}getButtonBounds(){return this.buttonWidgets.map(t=>this.getButtonWidgetBounds(t))}setButtonHiddenByIndex(t,e){this.buttonWidgets.at(t)?.setHidden(e)}getButtonWidgetBounds(t){const e=this.getBounds(),i=t.getBounds();return new pt(i.x+e.x,i.y+e.y,i.width,i.height)}refreshButtonClasses(){const{buttonWidgets:t,hasPrefix:e}=this;let i,s,o;for(const[a,n]of t.entries())i=!e&&a===0||o!=n.section,s=a===t.length-1||n.section!=t.at(a+1)?.section,n.toggleClass("ag-charts-toolbar__button--first",i),n.toggleClass("ag-charts-toolbar__button--last",s),n.toggleClass("ag-charts-toolbar__button--gap",a>0&&i),o=n.section}createButton(t,e){const i=this.createButtonWidget();return i.addClass("ag-charts-toolbar__button"),i.addListener("click",s=>{const o={index:t,...e instanceof Ct?e.toJson():e},a=this.getButtonWidgetBounds(i);this.events.dispatch("button-pressed",{event:s,button:o,buttonBounds:a})}),i.addListener("focus",()=>{this.events.dispatch("button-focused",{button:{index:t}})}),e.section&&(i.section=e.section),this.buttonWidgets.push(i),this.addChild(i),i}},QG=class extends LM{createButtonWidget(){return new pN(this.localeManager)}}}}),tj,ej,ij,Mit=k({"packages/ag-charts-community/src/components/toolbar/floatingToolbar.ts"(){"use strict";P(),Xt(),Jh(),mS(),ZG(),JG(),tj=class extends dN{constructor(t,e,i){super(t,e),this.onPopoverMoved=i,this.dragHandleDraggingClass="ag-charts-floating-toolbar__drag-handle--dragging"}show(t,e={}){this.showWithChildren(t,{...e,class:"ag-charts-floating-toolbar"})}hide(){this.dragged=!1,super.hide()}getBounds(){const t=this.getPopoverElement();return new pt(t?.offsetLeft??0,t?.offsetTop??0,t?.offsetWidth??0,t?.offsetHeight??0)}hasBeenDragged(){return this.dragged}setAnchor(t,e,i){const s=this.getPopoverElement();if(!s)return;const o=t.position??"above",{offsetWidth:a,offsetHeight:n}=s;let r=t.y-n-i,l=t.x-a/2;o==="below"?r=t.y+i:o==="right"?(r=t.y-n/2,l=t.x+e):o==="above-left"&&(l=t.x),this.updatePosition({x:l,y:r})}ignorePointerEvents(){const t=this.getPopoverElement();t&&(t.style.pointerEvents="none")}capturePointerEvents(){const t=this.getPopoverElement();t&&(t.style.pointerEvents="unset")}updatePosition(t){const e=this.getBounds(),i=this.ctx.domManager.getBoundingClientRect();t.x=Math.floor(Tt(0,t.x,i.width-e.width)),t.y=Math.floor(Tt(0,t.y,i.height-e.height)),super.updatePosition(t),this.onPopoverMoved()}},ej=class extends LM{constructor(t,e){super(t.localeManager),this.hasPrefix=!0,this.popover=new tj(t,e,this.onPopoverMoved.bind(this)),this.dragHandle=new ij(t.localeManager.t("toolbarAnnotationsDragHandle")),this.popover.setDragHandle(this.dragHandle)}show(t={}){this.popover.show([this.dragHandle.getElement(),this.getElement()],t)}hide(){this.popover.hide()}setAnchor(t){this.popover.setAnchor(t,this.horizontalSpacing,this.verticalSpacing)}hasBeenDragged(){return this.popover.hasBeenDragged()}ignorePointerEvents(){this.popover.ignorePointerEvents()}capturePointerEvents(){this.popover.capturePointerEvents()}onPopoverMoved(){const t=this.popover.getBounds();if(this.popoverBounds?.equals(t))return;this.popoverBounds=t.clone();const e=this.getButtonBounds();this.events.dispatch("toolbar-moved",{popoverBounds:t,buttonBounds:e})}getButtonWidgetBounds(t){const e=this.popover.getBounds(),i=super.getButtonWidgetBounds(t),s=this.dragHandle.getBounds();return new pt(i.x+e.x-s.width,i.y+e.y,i.width,i.height)}},ij=class extends ru{constructor(t){super(Bt("div","ag-charts-floating-toolbar__drag-handle"));const e=new ru(Bt("span",`${Zb("drag-handle")} ag-charts-toolbar__icon`));e.setAriaHidden(!0),this.addChild(e),this.elem.title=t}}}}),sj={};mo(sj,{AND:()=>cl,ARRAY:()=>bc,ARRAY_OF:()=>Hi,AbstractBarSeries:()=>xL,AbstractBarSeriesProperties:()=>Vv,ActionOnSet:()=>Fo,AnchoredPopover:()=>uN,Animation:()=>OI,AnimationManager:()=>RI,Arc:()=>Wn,Axis:()=>HS,AxisGroupZIndexMap:()=>VT,AxisInterval:()=>Oc,AxisLabel:()=>$i,AxisTick:()=>Du,AxisTickGenerator:()=>YT,AxisTicks:()=>UG,BBox:()=>pt,BBoxValues:()=>Bf,BOOLEAN:()=>bt,BOOLEAN_ARRAY:()=>__,Background:()=>_u,BackgroundModule:()=>wC,BandScale:()=>Np,BarSeries:()=>yg,BarSeriesModule:()=>ML,BaseModuleInstance:()=>Pf,BaseProperties:()=>Ct,BaseToolbar:()=>LM,ButtonWidget:()=>vp,COLOR_GRADIENT:()=>Cn,COLOR_PATTERN:()=>Ln,COLOR_STRING:()=>zt,COLOR_STRING_ARRAY:()=>hl,CachedTextMeasurer:()=>iI,CachedTextMeasurerPool:()=>yr,Caption:()=>_e,CartesianAxis:()=>Bp,CartesianSeries:()=>_l,CartesianSeriesNodeEvent:()=>Av,CartesianSeriesProperties:()=>Or,CategoryAxis:()=>_c,CategoryScale:()=>jp,ChangeDetectableProperties:()=>lv,Chart:()=>Em,ChartAxisDirection:()=>cS,ChartEventManager:()=>PI,ChartOptions:()=>bM,ChartUpdateType:()=>_p,CollapseMode:()=>QC,Color:()=>re,ColorScale:()=>Xh,ConicGradient:()=>TA,ContextMenuRegistry:()=>BI,ContinuousScale:()=>pe,DATE:()=>Rb,DATE_ARRAY:()=>R_,DATE_OR_DATETIME_MS:()=>Pb,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>Fc,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>Gc,DEFAULT_TOOLTIP_CLASS:()=>rs,DEFAULT_TOOLTIP_DARK_CLASS:()=>rC,DIRECTION:()=>RA,DIRECTION_SWAP_AXES:()=>jC,DOMManager:()=>fI,DataController:()=>ST,DataModel:()=>xT,DataModelSeries:()=>kv,DataService:()=>cm,Debug:()=>ee,Deprecated:()=>LB,DeprecatedAndRenamedTo:()=>l7,DragInterpreter:()=>UI,DraggablePopover:()=>dN,DropShadow:()=>Qa,ExtendedPath2D:()=>Zh,FILL_PATTERN_DEFAULTS:()=>Nl,FONT_SIZE_RATIO:()=>gv,FONT_STYLE:()=>pr,FONT_WEIGHT:()=>gr,FUNCTION:()=>Zs,FillGradientDefaults:()=>ya,FillPatternDefaults:()=>Xe,FloatingToolbar:()=>ej,GREATER_THAN:()=>qf,Gradient:()=>Yf,Group:()=>It,GroupedCategoryAxis:()=>Pc,HdpiCanvas:()=>SS,HierarchyNode:()=>GG,HierarchySeries:()=>jG,HierarchySeriesProperties:()=>Un,HighlightManager:()=>zI,HighlightProperties:()=>cv,HighlightStyle:()=>Kp,INTERACTION_RANGE:()=>Jf,INTERPOLATION_STEP_POSITION:()=>YC,INTERPOLATION_TYPE:()=>HC,Image:()=>Zu,InteractionManager:()=>_I,InteractionState:()=>EI,InterpolationProperties:()=>Fu,Invalidating:()=>$h,LABEL_PLACEMENT:()=>Fb,LARGEST_KEY_INTERVAL:()=>AC,LESS_THAN:()=>Zf,LINE_CAP:()=>P_,LINE_DASH:()=>Nn,LINE_JOIN:()=>B_,LINE_STYLE:()=>z_,Label:()=>Ki,LayoutElement:()=>hS,LayoutManager:()=>aI,LegendMarkerLabel:()=>xa,Line:()=>Yo,LineSeries:()=>bg,LineSeriesModule:()=>OL,LinearGradient:()=>CA,LinearScale:()=>qa,Listeners:()=>xr,LogScale:()=>av,LonLatBBox:()=>VG,MARKER_SHAPE:()=>hv,MATCHING_CROSSLINE_TYPE:()=>jS,MAX_SPACING:()=>BA,MIN_SPACING:()=>PA,Marker:()=>Xi,Menu:()=>XG,MercatorScale:()=>WG,ModuleRegistry:()=>Ro,Motion:()=>II,NAN:()=>Kf,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Ha,NUMBER:()=>Rt,NUMBER_ARRAY:()=>wA,NUMBER_OR_NAN:()=>$f,NativeWidget:()=>ru,NewAreaSeriesModule:()=>pL,NewBarSeriesModule:()=>DL,NewBubbleSeriesModule:()=>IL,NewHistogramSeriesModule:()=>LL,NewLineSeriesModule:()=>wL,NewScatterSeriesModule:()=>RL,NiceMode:()=>GT,Node:()=>ur,NumberAxis:()=>Cr,OBJECT:()=>ct,OBJECT_ARRAY:()=>Bb,OR:()=>fs,OVERFLOW_STRATEGY:()=>G_,ObserveChanges:()=>Dc,OrdinalTimeScale:()=>vr,PHASE_METADATA:()=>Ap,PHASE_ORDER:()=>lu,PLACEMENT:()=>j_,PLAIN_OBJECT:()=>LA,POSITION:()=>zb,POSITION_TOP_COORDINATES:()=>Dm,POSITIVE_NUMBER:()=>lt,PREV_NEXT_KEYS:()=>au,Padding:()=>dl,ParallelStateMachine:()=>QP,Path:()=>io,PointerEvents:()=>xA,PolarAxis:()=>Hu,PolarSeries:()=>My,PolarZIndexMap:()=>VL,Popover:()=>CM,PropertiesArray:()=>pp,ProxyInteractionService:()=>bI,ProxyOnWrite:()=>rZ,ProxyProperty:()=>be,ProxyPropertyOnWrite:()=>ys,QUICK_TRANSITION:()=>hm,RATIO:()=>le,REAL_NUMBER:()=>NA,RENDER_TO_OFFSCREEN_CANVAS_THRESHOLD:()=>qm,RadialColumnShape:()=>Da,Range:()=>Ya,Rect:()=>Bs,RepeatType:()=>NI,Rotatable:()=>yp,RotatableGroup:()=>sR,RotatableText:()=>sI,SAFE_FILLS_OPERATION:()=>Mv,SAFE_FILL_OPERATION:()=>Kz,SAFE_RANGE2_OPERATION:()=>$z,SAFE_STROKE_FILL_OPERATION:()=>Zm,SKIP_JS_BUILTINS:()=>Ib,SMALLEST_KEY_INTERVAL:()=>kC,SORT_DOMAIN_GROUPS:()=>IC,STRING:()=>it,STRING_ARRAY:()=>EA,Scalable:()=>UA,ScalableGroup:()=>iR,Scene:()=>lm,SceneChangeDetection:()=>gt,ScenePathChangeDetection:()=>Ot,Sector:()=>cs,SectorBox:()=>BL,Selection:()=>bi,Series:()=>Cm,SeriesContentZIndexMap:()=>tC,SeriesGroupingChangedEvent:()=>ZS,SeriesItemHighlightStyle:()=>Nr,SeriesMarker:()=>ls,SeriesNodeEvent:()=>zp,SeriesNodePickMode:()=>eC,SeriesProperties:()=>Ko,SeriesTooltip:()=>zs,SeriesZIndexMap:()=>JT,Shape:()=>ua,SimpleTextMeasurer:()=>rS,SliderWidget:()=>xS,StateMachine:()=>Pp,StateMachineProperty:()=>Dq,StopProperties:()=>Gb,SvgPath:()=>TM,TEXT_ALIGN:()=>_A,TEXT_WRAP:()=>Qf,TICK_INTERVAL:()=>PT,TempValidate:()=>A,Text:()=>Yi,TextUtils:()=>Ee,TextWrapper:()=>lS,ThemeConstants:()=>Hz,ThemeSymbols:()=>GC,TimeScale:()=>nT,Toolbar:()=>QG,ToolbarButtonProperties:()=>Mg,ToolbarButtonWidget:()=>pN,ToolbarWidget:()=>rm,Tooltip:()=>ma,TooltipManager:()=>um,TooltipPosition:()=>kr,Transformable:()=>Ke,TransformableText:()=>iu,Translatable:()=>Qh,TranslatableGroup:()=>qs,TranslatableLine:()=>Im,UNION:()=>fe,UpdateService:()=>dT,VERTICAL_ALIGN:()=>F_,Validate:()=>MX,Vec2:()=>Xu,Vec4:()=>Ep,WIDGET_HTML_EVENTS:()=>sS,Widget:()=>Rn,WidgetEventUtil:()=>mr,ZIndexMap:()=>AI,ZoomManager:()=>uT,accumulateGroup:()=>vz,accumulateStack:()=>Mz,accumulatedValue:()=>pz,accumulativeValueProperty:()=>Rm,addHitTestersToQuadtree:()=>fL,adjustLabelPlacement:()=>wF,angleBetween:()=>Tb,animationValidation:()=>Wp,applyShapeFillBBox:()=>XS,applyShapeStyle:()=>Tu,areScalingEqual:()=>pg,area:()=>SC,autoSizedLabelOptionsDefs:()=>TF,buildFormatter:()=>dm,buildResetPathFn:()=>nL,calculateDefaultTimeTickFormat:()=>gP,calculateDerivativeExtrema:()=>FA,calculateDerivativeExtremaXY:()=>$_,calculateLabelChartPadding:()=>oB,calculateLabelTranslation:()=>TT,calculatePlacement:()=>OB,cartesianAxisCrosshairOptions:()=>gg,cartesianAxisLabelOptionsDefs:()=>Gu,cartesianAxisOptionsDefs:()=>ju,cartesianChartOptionsDefs:()=>HL,cartesianCrossLineOptionsDefs:()=>cL,checkCrisp:()=>NF,clampArray:()=>HI,clippedRoundRect:()=>Gm,collapsedStartingBarPosition:()=>gy,commonAxisLabelOptionsDefs:()=>Rv,commonAxisOptionsDefs:()=>cy,commonChartOptionsDefs:()=>oo,commonCrossLineLabelOptionsDefs:()=>_v,commonCrossLineOptionsDefs:()=>lL,commonSeriesOptionsDefs:()=>tn,compareDates:()=>X1,computeBarFocusBounds:()=>SL,computeMarkerFocusBounds:()=>ay,continuousAxisOptions:()=>Ev,countExpandingSearch:()=>U1,createButton:()=>dit,createCheckbox:()=>pit,createDatumId:()=>Ss,createDeprecationWarning:()=>iC,createElementId:()=>jX,createIcon:()=>HG,createId:()=>la,createSelect:()=>git,createTextArea:()=>fit,dateToNumber:()=>to,datesSortOrder:()=>$I,datumKeys:()=>TS,datumStylerProperties:()=>Ic,deconstructSelectionsOrNodes:()=>MS,deepClone:()=>we,deepFreeze:()=>Yh,defaultTimeTickFormat:()=>iT,diff:()=>Up,drawCorner:()=>Yp,drawMarkerUnitPolygon:()=>Om,easing:()=>II,enterpriseModule:()=>_r,errorBarOptionsDefs:()=>py,evaluateBezier:()=>jb,extent:()=>Ml,extractDecoratedProperties:()=>I_,findMinMax:()=>Li,findQuadtreeMatch:()=>mL,findRangeExtent:()=>Ip,fixNumericExtent:()=>Ho,flowProportionChartOptionsDefs:()=>v4,focusCursorAtEnd:()=>GX,formatNumber:()=>l1,formatPercent:()=>r1,formatValue:()=>ml,fromToMotion:()=>ci,gaugeChartOptionsDefs:()=>M4,generateUUID:()=>yA,getAngleRatioRadians:()=>C_,getColorStops:()=>W_,getCrossLineValue:()=>eB,getDateTicksForInterval:()=>aT,getDatumRefPoint:()=>FI,getElementBBox:()=>oR,getIconClassNames:()=>Zb,getLastFocus:()=>uI,getMissCount:()=>fT,getPath:()=>up,getPathComponents:()=>VP,getRadialColumnWidth:()=>RG,getSequentialColors:()=>ba,getShapeFill:()=>Iu,getShapeStyle:()=>Dr,groupAccumulativeValueProperty:()=>Rc,groupAverage:()=>dz,groupCount:()=>bC,groupStackValueProperty:()=>Sz,groupSum:()=>uz,hasNoModifiers:()=>dS,hierarchyChartOptionsDefs:()=>S4,initMenuKeyNav:()=>KR,initRovingTabIndex:()=>YR,interpolatePoints:()=>Tv,interpolationValidator:()=>jv,isAgFlowProportionChartOptions:()=>MB,isAgGaugeChartOptions:()=>ZT,isAgHierarchyChartOptions:()=>SB,isAgStandaloneChartOptions:()=>XT,isAgTopologyChartOptions:()=>vB,isBetweenAngles:()=>yc,isButtonClickEvent:()=>hI,isContinuous:()=>GS,isDecoratedObject:()=>jf,isDenseInterval:()=>Op,isGradientFill:()=>On,isGradientOrPatternFill:()=>BX,isInputPending:()=>aR,isPatternFill:()=>qh,isProperties:()=>Va,isScaleValid:()=>ey,jsonApply:()=>sm,jsonDiff:()=>fr,jsonPropertyCompare:()=>rR,jsonResolveOperations:()=>qb,jsonWalk:()=>ul,keyProperty:()=>Fn,labelDirectionHandling:()=>RT,legendSymbolSvg:()=>BB,lineDistanceSquared:()=>em,listDecoratedProperties:()=>fc,makeAccessibleClickListener:()=>OZ,mapValues:()=>T_,markerFadeInAnimation:()=>iy,markerOptionsDefs:()=>fg,markerScaleInAnimation:()=>sL,markerSwipeScaleInAnimation:()=>oL,merge:()=>Wf,mergeArrayDefaults:()=>Ab,mergeDefaults:()=>Vt,midpointStartingBarPosition:()=>IQ,moduleRegistry:()=>Tn,motion:()=>oj,nearestSquared:()=>Sb,nearestSquaredInContainer:()=>rX,normaliseGroupTo:()=>iv,normalisePropertyTo:()=>Ou,normalisedExtentWithMetadata:()=>yC,normalizeAngle180:()=>Uf,normalizeAngle360:()=>ke,normalizeAngle360Inclusive:()=>bX,numberFormatValidator:()=>ly,objectsEqual:()=>dr,objectsEqualWith:()=>SA,pairUpSpans:()=>ty,partialAssign:()=>MA,pathFadeInAnimation:()=>Ov,pathMotion:()=>Dv,pathSwipeInAnimation:()=>aL,pickByMatchingAngle:()=>GL,plotAreaPathFill:()=>vF,plotInterpolatedAreaSeriesFillSpans:()=>Nv,plotInterpolatedLinePathStroke:()=>Cv,plotLinePathStroke:()=>tL,polarChartOptionsDefs:()=>YL,predicateWithMessage:()=>me,prepareAreaFillAnimationFns:()=>MF,prepareAreaPathAnimation:()=>DF,prepareAxisAnimationContext:()=>WS,prepareAxisAnimationFunctions:()=>pB,prepareBarAnimationFunctions:()=>fy,prepareLinePathAnimation:()=>SF,prepareLinePathPropertyAnimation:()=>iL,prepareLinePathStrokeAnimationFns:()=>eL,preparePieSeriesAnimationFunctions:()=>Wu,range:()=>bm,rangedValueProperty:()=>MC,resetAxisGroupFn:()=>gB,resetAxisLabelSelectionFn:()=>FT,resetAxisLineSelectionFn:()=>fB,resetAxisSelectionFn:()=>zT,resetBarSelectionsFn:()=>my,resetIds:()=>lX,resetLabelFn:()=>Ol,resetMarkerFn:()=>sy,resetMarkerPositionFn:()=>oy,resetMotion:()=>bs,resetPieSelectionsFn:()=>FL,rowCountProperty:()=>xz,scale:()=>so,sectorBox:()=>qF,seriesLabelFadeInAnimation:()=>ce,seriesLabelFadeOutAnimation:()=>zc,seriesLabelOptionsDefs:()=>Rl,setAttribute:()=>ve,setAttributes:()=>eu,setElementBBox:()=>Xb,setElementStyle:()=>_n,setPath:()=>vA,shadowOptionsDefs:()=>mg,shallowClone:()=>KA,solveBezier:()=>Vb,sortAndUniqueDates:()=>KI,splitBezier:()=>Wb,standaloneChartOptionsDefs:()=>b4,staticFromToMotion:()=>bl,stopPageScrolling:()=>$R,sum:()=>I7,sumValues:()=>ev,toDegrees:()=>SX,toRadians:()=>je,toolbarButtonOptionsDefs:()=>Gv,tooltipContentAriaLabel:()=>GB,tooltipHtml:()=>WB,tooltipOptionsDefs:()=>Er,topologyChartOptionsDefs:()=>x4,trailingAccumulatedValue:()=>gz,trailingAccumulatedValueProperty:()=>L7,updateClipPath:()=>wv,updateLabelNode:()=>OF,validateCrossLineValue:()=>iB,valueProperty:()=>Wt,visibleRangeIndices:()=>W1,without:()=>mc});var oj,Dit=k({"packages/ag-charts-community/src/module-support.ts"(){"use strict";Ps(),vu(),QS(),zm(),ku(),P(),Pl(),hL(),KL(),gL(),TL(),NL(),PL(),Ci(),Z1(),Hh(),Jh(),NB(),Ar(),Ac(),zo(),Sp(),gl(),vb(),da(),qt(),wB(),ge(),bo(),vm(),AS(),Go(),oI(),kS(),Nt(),FG(),cT(),Het(),Yet(),Ket(),$et(),OG(),Xet(),hr(),Zet(),qet(),nM(),Pz(),Bz(),Qet(),wR(),jT(),yB(),Ua(),WP(),C1(),Ir(),vC(),zP(),_R(),z1(),F1(),G1(),K1(),j1(),P1(),GI(),NP(),N9(),Cu(),Jet(),wl(),kl(),$p(),El(),tit(),Qq(),hu(),GF(),kL(),Iv(),bL(),$o(),KF(),EL(),Lv(),JC(),vL(),kF(),ny(),_F(),rL(),yL(),KC(),UC(),sM(),jL(),jQ(),eit(),iit(),sit(),oit(),ait(),nit(),rit(),lit(),vl(),WT(),BT(),VS(),dB(),L4(),Nu(),ov(),Tm(),cit(),hit(),sB(),lB(),uit(),zB(),wm(),cu(),kp(),vu(),Ps(),VC(),i1(),mit(),p1(),Bo(),Yz(),BP(),mu(),Kh(),Qs(),Ui(),Mm(),mp(),bb(),qA(),zA(),rT(),NC(),ym(),_m(),So(),yu(),wb(),wu(),yit(),kA(),dg(),EC(),Ve(),ca(),ms(),Nc(),Eb(),U_(),O_(),N_(),Xa(),Zv(),Rz(),xit(),Vo(),So(),yu(),Ka(),zn(),PB(),jz(),wm(),ZF(),x1(),bit(),Hb(),Ub(),kp(),su(),Xt(),Ve(),MI(),_G(),Mu(),JP(),Xa(),PG(),jm(),Qv(),Sc(),vi(),hi(),Yz(),KG(),Sit(),$G(),ZG(),hN(),vit(),qG(),JG(),Mit(),oj={...ZP,...qP}}}),w={};mo(w,{AG_CHARTS_LOCALE_EN_US:()=>SI,AgCharts:()=>Fl,AgChartsCommunityModule:()=>aj,AgErrorBarSupportedSeriesTypes:()=>U4,AgTooltipAnchorToType:()=>rM,AgTooltipPlacementType:()=>lM,AgTooltipPositionType:()=>cM,VERSION:()=>ou,_ModuleSupport:()=>sj,_Scene:()=>sN,_Theme:()=>oN,_Util:()=>aN,_Widget:()=>YG,setupCommunityModules:()=>UL,time:()=>pP});var aj,E=k({"packages/ag-charts-community/src/main.ts"(){"use strict";Det(),g4(),ket(),Iet(),Tet(),uS(),g1(),$L(),Lp(),Dit(),KG(),aj={VERSION:ou,_Scene:sN,_Theme:oN,_Util:aN,create:Fl.create.bind(Fl),createSparkline:Fl.__createSparkline.bind(Fl),setup:UL,isEnterprise:!1}}}),NM=Object.defineProperty,nj=Object.getOwnPropertyDescriptor,kit=Object.getOwnPropertyNames,Ait=Object.prototype.hasOwnProperty,Iit=(t,e)=>{for(var i in e)NM(t,i,{get:e[i],enumerable:!0})},fN=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of kit(e))!Ait.call(t,o)&&o!==i&&NM(t,o,{get:()=>e[o],enumerable:!(s=nj(e,o))||s.enumerable});return t},Tit=(t,e,i)=>(fN(t,e,"default"),i&&fN(i,e,"default")),Cit=t=>fN(NM({},"__esModule",{value:!0}),t),m=(t,e,i,s)=>{for(var o=s>1?void 0:s?nj(e,i):e,a=t.length-1,n;a>=0;a--)(n=t[a])&&(o=(s?n(e,i,o):n(o))||o);return s&&o&&NM(e,i,o),o},mN={};Iit(mN,{AgChartsEnterpriseModule:()=>zLt,LicenseManager:()=>BLt,setupEnterpriseModules:()=>X$}),Dn.exports=Cit(mN);var Gl=(E(),C(w)),Lit=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(t,e){let i=t[0],s=t[1],o=t[2],a=t[3];i=this.ff(i,s,o,a,e[0],7,-680876936),a=this.ff(a,i,s,o,e[1],12,-389564586),o=this.ff(o,a,i,s,e[2],17,606105819),s=this.ff(s,o,a,i,e[3],22,-1044525330),i=this.ff(i,s,o,a,e[4],7,-176418897),a=this.ff(a,i,s,o,e[5],12,1200080426),o=this.ff(o,a,i,s,e[6],17,-1473231341),s=this.ff(s,o,a,i,e[7],22,-45705983),i=this.ff(i,s,o,a,e[8],7,1770035416),a=this.ff(a,i,s,o,e[9],12,-1958414417),o=this.ff(o,a,i,s,e[10],17,-42063),s=this.ff(s,o,a,i,e[11],22,-1990404162),i=this.ff(i,s,o,a,e[12],7,1804603682),a=this.ff(a,i,s,o,e[13],12,-40341101),o=this.ff(o,a,i,s,e[14],17,-1502002290),s=this.ff(s,o,a,i,e[15],22,1236535329),i=this.gg(i,s,o,a,e[1],5,-165796510),a=this.gg(a,i,s,o,e[6],9,-1069501632),o=this.gg(o,a,i,s,e[11],14,643717713),s=this.gg(s,o,a,i,e[0],20,-373897302),i=this.gg(i,s,o,a,e[5],5,-701558691),a=this.gg(a,i,s,o,e[10],9,38016083),o=this.gg(o,a,i,s,e[15],14,-660478335),s=this.gg(s,o,a,i,e[4],20,-405537848),i=this.gg(i,s,o,a,e[9],5,568446438),a=this.gg(a,i,s,o,e[14],9,-1019803690),o=this.gg(o,a,i,s,e[3],14,-187363961),s=this.gg(s,o,a,i,e[8],20,1163531501),i=this.gg(i,s,o,a,e[13],5,-1444681467),a=this.gg(a,i,s,o,e[2],9,-51403784),o=this.gg(o,a,i,s,e[7],14,1735328473),s=this.gg(s,o,a,i,e[12],20,-1926607734),i=this.hh(i,s,o,a,e[5],4,-378558),a=this.hh(a,i,s,o,e[8],11,-2022574463),o=this.hh(o,a,i,s,e[11],16,1839030562),s=this.hh(s,o,a,i,e[14],23,-35309556),i=this.hh(i,s,o,a,e[1],4,-1530992060),a=this.hh(a,i,s,o,e[4],11,1272893353),o=this.hh(o,a,i,s,e[7],16,-155497632),s=this.hh(s,o,a,i,e[10],23,-1094730640),i=this.hh(i,s,o,a,e[13],4,681279174),a=this.hh(a,i,s,o,e[0],11,-358537222),o=this.hh(o,a,i,s,e[3],16,-722521979),s=this.hh(s,o,a,i,e[6],23,76029189),i=this.hh(i,s,o,a,e[9],4,-640364487),a=this.hh(a,i,s,o,e[12],11,-421815835),o=this.hh(o,a,i,s,e[15],16,530742520),s=this.hh(s,o,a,i,e[2],23,-995338651),i=this.ii(i,s,o,a,e[0],6,-198630844),a=this.ii(a,i,s,o,e[7],10,1126891415),o=this.ii(o,a,i,s,e[14],15,-1416354905),s=this.ii(s,o,a,i,e[5],21,-57434055),i=this.ii(i,s,o,a,e[12],6,1700485571),a=this.ii(a,i,s,o,e[3],10,-1894986606),o=this.ii(o,a,i,s,e[10],15,-1051523),s=this.ii(s,o,a,i,e[1],21,-2054922799),i=this.ii(i,s,o,a,e[8],6,1873313359),a=this.ii(a,i,s,o,e[15],10,-30611744),o=this.ii(o,a,i,s,e[6],15,-1560198380),s=this.ii(s,o,a,i,e[13],21,1309151649),i=this.ii(i,s,o,a,e[4],6,-145523070),a=this.ii(a,i,s,o,e[11],10,-1120210379),o=this.ii(o,a,i,s,e[2],15,718787259),s=this.ii(s,o,a,i,e[9],21,-343485551),t[0]=this.add32(i,t[0]),t[1]=this.add32(s,t[1]),t[2]=this.add32(o,t[2]),t[3]=this.add32(a,t[3])}cmn(t,e,i,s,o,a){return e=this.add32(this.add32(e,t),this.add32(s,a)),this.add32(e<<o|e>>>32-o,i)}ff(t,e,i,s,o,a,n){return this.cmn(e&i|~e&s,t,e,o,a,n)}gg(t,e,i,s,o,a,n){return this.cmn(e&s|i&~s,t,e,o,a,n)}hh(t,e,i,s,o,a,n){return this.cmn(e^i^s,t,e,o,a,n)}ii(t,e,i,s,o,a,n){return this.cmn(i^(e|~s),t,e,o,a,n)}md51(t){const e=t.length,i=[1732584193,-271733879,-1732584194,271733878];let s;for(s=64;s<=t.length;s+=64)this.md5cycle(i,this.md5blk(t.substring(s-64,s)));t=t.substring(s-64);const o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=0;s<t.length;s++)o[s>>2]|=t.charCodeAt(s)<<(s%4<<3);if(o[s>>2]|=128<<(s%4<<3),s>55)for(this.md5cycle(i,o),s=0;s<16;s++)o[s]=0;return o[14]=e*8,this.md5cycle(i,o),i}md5blk(t){const e=[];for(let i=0;i<64;i+=4)e[i>>2]=t.charCodeAt(i)+(t.charCodeAt(i+1)<<8)+(t.charCodeAt(i+2)<<16)+(t.charCodeAt(i+3)<<24);return e}rhex(t){const e="0123456789abcdef".split("");let i="",s=0;for(;s<4;s++)i+=e[t>>s*8+4&15]+e[t>>s*8&15];return i}hex(t){for(let e=0;e<t.length;e++)t[e]=this.rhex(t[e]);return t.join("")}md5(t){return this.hex(this.md51(t))}add32(t,e){return this.ieCompatibility?this.add32Compat(t,e):this.add32Std(t,e)}add32Std(t,e){return t+e&4294967295}add32Compat(t,e){const i=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(i>>16)<<16|i&65535}};function yN(t){return t==null||t.length===0}var OM={"01":"GRID","02":"CHARTS","0102":"BOTH"},rj="https://www.ag-grid.com/charts/licensing/",xN=class ss{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new Lit,this.md5.init()}validateLicense(){const e=this.getLicenseDetails(ss.licenseKey,ss.gridContext),i=`AG ${e.currentLicenseType==="BOTH"?"Grid and ":""}Charts Enterprise`;let s="";if(e.suppliedLicenseType==="BOTH"?s="AG Grid and AG Charts Enterprise":e.suppliedLicenseType==="GRID"?s="AG Grid Enterprise":e.suppliedLicenseType!==void 0&&(s="AG Charts Enterprise"),e.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(e.expired){const o=ss.getChartsReleaseDate(),a=ss.formatDate(o);this.outputExpiredKey(e.expiry,a,s)}else e.valid?e.isTrial&&e.trialExpired&&this.outputExpiredTrialKey(e.expiry,i,s):this.outputInvalidLicenseKey(!!e.incorrectLicenseType,i,s)}static extractExpiry(e){const i=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(ss.decode(i),10))}static extractLicenseComponents(e){let i=e.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),e.length<=32)return{md5:null,license:e,version:null,isTrial:null};const s=i.length-32,o=i.substring(s),a=i.substring(0,s),[n,r,l]=ss.extractBracketedInformation(i);return{md5:o,license:a,version:n,isTrial:r,type:l}}getLicenseDetails(e,i=!1){const s="CHARTS";if(yN(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:s};const o=ss.getChartsReleaseDate(),{md5:a,license:n,version:r,isTrial:l,type:c}=ss.extractLicenseComponents(e);let h=a===this.md5.md5(n)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,u,d,p=null,g=!1,f;function x(){u=p<new Date,d=void 0}if(h&&(p=ss.extractExpiry(n),h=!isNaN(p.getTime()),h))switch(d=o>p,r){case"legacy":case"2":{h=!1;break}case"3":yN(c)?h=!1:(f=c,c!==OM["02"]&&c!==OM["0102"]?(h=!1,g=!0):l&&x())}return h?{licenseKey:e,valid:h,expiry:ss.formatDate(p),expired:d,version:r,isTrial:l,trialExpired:u,invalidLicenseTypeForCombo:i?f!=="BOTH":void 0,incorrectLicenseType:g,currentLicenseType:s,suppliedLicenseType:f}:{licenseKey:e,valid:h,incorrectLicenseType:g,currentLicenseType:s,suppliedLicenseType:f}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!yN(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage??""}getHostname(){if(!this.document)return"localhost";const e=this.document.defaultView??window;if(!e)return"localhost";const i=e.location,{hostname:s=""}=i;return s}isForceWatermark(){if(!this.document)return!1;const e=this.document?.defaultView??typeof window<"u"?window:void 0;if(!e)return!1;const{pathname:i}=e.location;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){const e=this.getHostname();return/^((?:[\w-]+\.)?ag-grid\.com)$/.exec(e)!==null}isLocalhost(){const e=this.getHostname();return/^(?:127\.0\.0\.1|localhost)$/.exec(e)!==null}static formatDate(e){const i=["January","February","March","April","May","June","July","August","September","October","November","December"],s=e.getDate(),o=e.getMonth(),a=e.getFullYear();return s+" "+i[o]+" "+a}static getChartsReleaseDate(){return new Date(parseInt(ss.decode(ss.RELEASE_INFORMATION),10))}static decode(e){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let s="",o,a,n,r,l,c,h,u=0;const d=e.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<d.length;)r=i.indexOf(d.charAt(u++)),l=i.indexOf(d.charAt(u++)),c=i.indexOf(d.charAt(u++)),h=i.indexOf(d.charAt(u++)),o=r<<2|l>>4,a=(l&15)<<4|c>>2,n=(c&3)<<6|h,s=s+String.fromCharCode(o),c!=64&&(s=s+String.fromCharCode(a)),h!=64&&(s=s+String.fromCharCode(n));return s=ss.utf8_decode(s),s}static utf8_decode(e){e=e.replace(/rn/g,"n");let i="";for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);o<128?i+=String.fromCharCode(o):o>127&&o<2048?(i+=String.fromCharCode(o>>6|192),i+=String.fromCharCode(o&63|128)):(i+=String.fromCharCode(o>>12|224),i+=String.fromCharCode(o>>6&63|128),i+=String.fromCharCode(o&63|128))}return i}static setGridContext(e=!1){ss.gridContext=e}static setLicenseKey(e){ss.licenseKey=e}static extractBracketedInformation(e){if(!e.includes("["))return["legacy",!1,void 0];const i=e.match(/\[(.*?)\]/g).map(r=>r.replace("[","").replace("]",""));if(!i||i.length===0)return["legacy",!1,void 0];const s=i.filter(r=>r==="TRIAL").length===1,o=i.filter(r=>r.startsWith("v"))[0],a=o?o.replace("v",""):"legacy",n=OM[i.filter(r=>OM[r])[0]];return[a,s,n]}centerPadAndOutput(e){const i=this.totalMessageLength-e.length;console.error(e.padStart(i/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,i="*",s=""){console.error(e.padEnd(this.totalMessageLength-s.length,i)+s)}outputInvalidLicenseKey(e,i,s){ss.gridContext||(e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${s} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${rj}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${rj}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,i,s){ss.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${s} expired on ${e}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(e){ss.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${e} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${e} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(e,i,s){ss.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${s} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${e}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${i}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="License Expired"}};xN.RELEASE_INFORMATION="MTc0MjgzMzc1OTQxMA==",xN.gridContext=!1;var Dg=xN,kg=(E(),C(w)),Nit=(E(),C(w)),lj=(P(),C(et));function bN(t,e,i){const s=(a,n,r,l)=>{let c=t[0];for(let h=a;r>0?h<=n:h>n;h+=r){const u=t[h];if(l(c,u))return!0;c=u}return!1},o=Math.floor(t.length/2);return s(e,o,e,i)?!0:s(t.length-e,o,-e,i)}var Oit=(E(),C(w)),{OR:wit,POSITIVE_NUMBER:Eit,NAN:_it,AxisInterval:Rit,TempValidate:Pit}=Oit._ModuleSupport,SN=class extends Rit{};m([Pit(wit(Eit,_it))],SN.prototype,"minSpacing",2);var vN=(E(),C(w)),qu=(P(),C(et)),cj=(E(),C(w)),MN=(P(),C(et)),Bit=(E(),C(w)),{BaseProperties:hj,ChartAxisDirection:zit,ARRAY:Fit,BOOLEAN:DN,COLOR_STRING:kN,FONT_STYLE:Git,FONT_WEIGHT:jit,LINE_DASH:Vit,NUMBER:uj,OBJECT:Wit,POSITIVE_NUMBER:Uit,RATIO:dj,STRING:pj,UNION:gj,AND:Hit,COLOR_STRING_ARRAY:Yit,TempValidate:Mi,MATCHING_CROSSLINE_TYPE:fj,createId:Kit,Group:AN}=Bit._ModuleSupport,Hn=class extends hj{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};m([Mi(DN,{optional:!0})],Hn.prototype,"enabled",2),m([Mi(pj,{optional:!0})],Hn.prototype,"text",2),m([Mi(Git,{optional:!0})],Hn.prototype,"fontStyle",2),m([Mi(jit,{optional:!0})],Hn.prototype,"fontWeight",2),m([Mi(Uit)],Hn.prototype,"fontSize",2),m([Mi(pj)],Hn.prototype,"fontFamily",2),m([Mi(uj)],Hn.prototype,"padding",2),m([Mi(kN,{optional:!0})],Hn.prototype,"color",2),m([Mi(DN,{optional:!0})],Hn.prototype,"parallel",2);var Io=class extends hj{constructor(){super(...arguments),this.id=Kit(this),this.defaultColorRange=[],this.shape="polygon",this.label=new Hn,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=zit.X,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new AN({name:this.id}),this.rangeGroup=new AN({name:this.id}),this.labelGroup=new AN({name:this.id}),this._isRange=void 0}assignCrossLineGroup(t,e){t!==this._isRange&&(t?this.rangeGroup.appendChild(e):this.lineGroup.appendChild(e)),this._isRange=t}setSectorNodeProps(t){t.fill=this.fill,t.fillOpacity=this.fillOpacity??1,t.stroke=this.stroke,t.strokeOpacity=this.strokeOpacity??1,t.strokeWidth=this.strokeWidth??1,t.lineDash=this.lineDash}setLabelNodeProps(t,e,i,s,o){const{label:a}=this;t.x=e,t.y=i,t.text=a.text,t.textAlign="center",t.textBaseline=s,t.rotation=o,t.rotationCenterX=e,t.rotationCenterY=i,t.fill=a.color,t.fontFamily=a.fontFamily,t.fontSize=a.fontSize,t.fontStyle=a.fontStyle,t.visible=!0}};m([Mi(DN,{optional:!0})],Io.prototype,"enabled",2),m([Mi(gj(["range","line"],"a crossLine type"))],Io.prototype,"type",2),m([Mi(Hit(fj("range"),Fit.restrict({length:2})),{optional:!0})],Io.prototype,"range",2),m([Mi(fj("value"),{optional:!0})],Io.prototype,"value",2),m([Mi(Yit)],Io.prototype,"defaultColorRange",2),m([Mi(kN,{optional:!0})],Io.prototype,"fill",2),m([Mi(dj,{optional:!0})],Io.prototype,"fillOpacity",2),m([Mi(kN,{optional:!0})],Io.prototype,"stroke",2),m([Mi(uj,{optional:!0})],Io.prototype,"strokeWidth",2),m([Mi(dj,{optional:!0})],Io.prototype,"strokeOpacity",2),m([Mi(Vit,{optional:!0})],Io.prototype,"lineDash",2),m([Mi(gj(["polygon","circle"],"a shape"))],Io.prototype,"shape",2),m([Mi(Wit)],Io.prototype,"label",2);var{ChartAxisDirection:$it,getCrossLineValue:mj,validateCrossLineValue:Xit,normalizeAngle360:IN,Group:Zit,Path:yj,Sector:qit,RotatableText:Qit,ContinuousScale:Jit}=cj._ModuleSupport,TN=class extends Io{constructor(){super(),this.direction=$it.X,this.polygonNode=new yj,this.sectorNode=new qit,this.lineNode=new yj,this.crossLineRange=new Zit,this.labelNode=new Qit,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}visibilityCheck(){if(!Jit.is(this.scale))return!0;const[t,e]=this.scale.domain,i=mj(this);if((0,MN.isArray)(i)){const[s,o]=i;return s>=t&&s<=e&&o>=s&&o<=e}else return i>=t&&i<=e}update(t){const{scale:e}=this;if(!e||!this.isValid()||!Xit(mj(this),e)||!this.visibilityCheck()){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updateLineNode(t),this.updatePolygonNode(t),this.updateSectorNode(t),this.updateLabelNode(t)}updateLineNode(t){const{scale:e,type:i,value:s,lineNode:o}=this;if(!t||i!=="line"||!e){o.visible=!1;return}const a=e.convert(s);if(isNaN(a)){o.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this;o.visible=!0,o.stroke=this.stroke,o.strokeOpacity=this.strokeOpacity??1,o.strokeWidth=this.strokeWidth??1,o.fill=void 0,o.lineDash=this.lineDash;const l=r*Math.cos(a),c=r*Math.sin(a),h=n*Math.cos(a),u=n*Math.sin(a);o.path.clear(!0),o.path.moveTo(h,u),o.path.lineTo(l,c),this.assignCrossLineGroup(!1,this.crossLineRange)}updatePolygonNode(t){const{polygonNode:e,range:i,scale:s,shape:o,type:a,ticks:n}=this;if(!t||a!=="range"||o!=="polygon"||!s||!i){e.visible=!1;return}const{axisInnerRadius:r,axisOuterRadius:l}=this,c=n.indexOf(i[0]),h=n.indexOf(i[1]),d=(c<=h?n.slice(c,h+1):n.slice(c).concat(n.slice(0,h+1))).map(g=>s.convert(g));e.visible=!0,this.setSectorNodeProps(e);const{path:p}=e;p.clear(!0),d.forEach((g,f)=>{const x=l*Math.cos(g),y=l*Math.sin(g);f===0?p.moveTo(x,y):p.lineTo(x,y)}),r===0?p.lineTo(0,0):d.slice().reverse().forEach(g=>{const f=r*Math.cos(g),x=r*Math.sin(g);p.lineTo(f,x)}),e.path.closePath(),this.assignCrossLineGroup(!0,this.crossLineRange)}updateSectorNode(t){const{sectorNode:e,range:i,scale:s,shape:o,type:a}=this;if(!t||a!=="range"||o!=="circle"||!s||!i){e.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this,l=i.map(u=>s.convert(u)),c=s.step??0,h=s instanceof cj._ModuleSupport.BandScale?c/2:0;e.visible=!0,this.setSectorNodeProps(e),e.centerX=0,e.centerY=0,e.innerRadius=n,e.outerRadius=r,e.startAngle=l[0]-h,e.endAngle=l[1]+h,this.assignCrossLineGroup(!0,this.crossLineRange)}updateLabelNode(t){const{label:e,labelNode:i,range:s,scale:o,type:a,ticks:n}=this;if(!t||e.enabled===!1||!e.text||!o||a==="range"&&!s){i.visible=!1;return}i.visible=!0;const{axisInnerRadius:r,axisOuterRadius:l}=this;let c,h,u,d;if(a==="line"){const p=IN(o.convert(this.value)),g=1.5*Math.PI,f=(0,MN.isNumberEqual)(p,g)||p>g||p<Math.PI/2,x=(r+l)/2*Math.cos(p),y=(r+l)/2*Math.sin(p);c=x+e.padding*Math.cos(p+Math.PI/2),h=y+e.padding*Math.sin(p+Math.PI/2),d=f?"top":"bottom",u=f?p:p-Math.PI}else{const[p,g]=s.map(b=>IN(o.convert(b)));let f=(p+g)/2;p>g&&(f-=Math.PI),f=IN(f);const x=((0,MN.isNumberEqual)(f,0)||f>0)&&f<Math.PI;let y;this.shape==="circle"||n.length<3?y=l-e.padding:y=l*Math.cos(Math.PI/n.length)-e.padding,c=y*Math.cos(f),h=y*Math.sin(f),d=x?"bottom":"top",u=x?f-Math.PI/2:f+Math.PI/2}this.setLabelNodeProps(i,c,h,d,u)}};TN.className="AngleCrossLine";var{ChartAxisDirection:tst,NUMBER:xj,UNION:est,ProxyOnWrite:ist,TextWrapper:sst,TextUtils:ost,TempValidate:CN,toRadians:wM,normalizeAngle360:Ag,normalizeAngle360Inclusive:ast,Path:nst,RotatableText:rst,Transformable:lst,BBox:cst}=vN._ModuleSupport,LN=class extends vN._ModuleSupport.AxisLabel{constructor(){super(...arguments),this.orientation="fixed"}};m([CN(est(["fixed","parallel","perpendicular"],"a label orientation"))],LN.prototype,"orientation",2);var Ey=class extends vN._ModuleSupport.PolarAxis{constructor(t,e){super(t,e),this.startAngle=0,this.endAngle=void 0,this.labelData=[],this.tickData=[],this.radiusLine=this.axisGroup.appendChild(new nst),this.includeInvisibleDomains=!0}get direction(){return tst.X}createLabel(){return new LN}calculateTickLayout(t){const{nice:e,scale:i}=this,s={nice:e,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},o=e?i.niceDomain(s,t):t,a=this.generateAngleTicks(o);this.tickData=a;const n=a.map(l=>l.value),r=n.reduce((l,c)=>Math.max(typeof c=="number"?(0,qu.countFractionDigits)(c):0,l),0);return{niceDomain:o,primaryTickCount:void 0,tickDomain:o,ticks:n,fractionDigits:r,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine()}normalizedAngles(){const t=Ag(-Math.PI/2+wM(this.startAngle)),e=this.endAngle!=null?ast(wM(this.endAngle)-wM(this.startAngle)):2*Math.PI,i=t+e;return[t,i]}computeRange(){this.range=this.normalizedAngles()}updateSelections(){const t=this.tickData;this.gridLineGroupSelection.update(this.gridLength&&this.gridLine.enabled?t:[]),this.tickLineGroupSelection.update(this.tick.enabled?t:[]),this.tickLabelGroupSelection.update(this.label.enabled?t:[]),this.gridLineGroupSelection.cleanup(),this.tickLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup()}updatePosition(){const{translation:t,axisGroup:e,gridGroup:i,crossLineRangeGroup:s,crossLineLineGroup:o,crossLineLabelGroup:a}=this,n=Math.floor(t.x),r=Math.floor(t.y);e.translationX=n,e.translationY=r,i.translationX=n,i.translationY=r,s.translationX=n,s.translationY=r,o.translationX=n,o.translationY=r,a.translationX=n,a.translationY=r}updateRadiusLine(){const t=this.radiusLine,{path:e}=t;e.clear(!0);const{points:i,closePath:s}=this.getAxisLinePoints();i.forEach(({x:o,y:a,moveTo:n,arc:r,radius:l=0,startAngle:c=0,endAngle:h=0})=>{r?e.arc(o,a,l,c,h):n?e.moveTo(o,a):e.lineTo(o,a)}),s&&e.closePath(),t.visible=this.line.enabled,t.stroke=this.line.stroke,t.strokeWidth=this.line.width,t.fill=void 0}getAxisLinePoints(){const{scale:t,shape:e,gridLength:i}=this,[s,o]=this.range,a=(0,qu.isNumberEqual)(o-s,2*Math.PI),n=[];if(e==="circle")a?n.push({x:i,y:0,moveTo:!0},{x:0,y:0,radius:i,startAngle:0,endAngle:2*Math.PI,arc:!0,moveTo:!1}):n.push({x:i*Math.cos(s),y:i*Math.sin(s),moveTo:!0},{x:0,y:0,radius:i,startAngle:Ag(s),endAngle:Ag(o),arc:!0,moveTo:!1});else if(e==="polygon"){const r=t.ticks({nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.map(l=>t.convert(l));r&&r.length>2&&r.forEach((l,c)=>{const h=i*Math.cos(l),u=i*Math.sin(l),d=c===0;n.push({x:h,y:u,moveTo:d})})}return{points:n,closePath:a}}updateGridLines(){const{scale:t,gridLength:e,gridLine:{style:i,width:s},innerRadiusRatio:o}=this;if(!(i&&e>0))return;const a=e*o,n=i.length;this.gridLineGroupSelection.each((r,l,c)=>{const{value:h}=l,{stroke:u,lineDash:d}=i[c%n],p=t.convert(h);r.x1=a*Math.cos(p),r.y1=a*Math.sin(p),r.x2=e*Math.cos(p),r.y2=e*Math.sin(p),r.stroke=u,r.strokeWidth=s,r.lineDash=d,r.fill=void 0}),this.gridLineGroupSelection.cleanup()}updateLabels(){const{label:t,tickLabelGroupSelection:e}=this;e.each((i,s,o)=>{const a=this.labelData[o];if(!a||a.hidden){i.visible=!1;return}i.text=a.text,i.setFont(t),i.fill=t.color,i.x=a.x,i.y=a.y,i.textAlign=a.textAlign,i.textBaseline=a.textBaseline,i.visible=!0,a.rotation?(i.rotation=a.rotation,i.rotationCenterX=a.x,i.rotationCenterY=a.y):i.rotation=0})}updateTickLines(){const{scale:t,gridLength:e,tick:i,tickLineGroupSelection:s}=this;s.each((o,a)=>{const{value:n}=a,r=t.convert(n),l=Math.cos(r),c=Math.sin(r);o.x1=e*l,o.y1=e*c,o.x2=(e+i.size)*l,o.y2=(e+i.size)*c,o.stroke=i.stroke,o.strokeWidth=i.width})}createLabelNodeData(t,e,i){const{label:s,gridLength:o,scale:a,tick:n}=this;if(!s.enabled)return[];const r=new rst,l=i.x-this.translation.x,c=i.x+i.width-this.translation.x,h=t.map((u,d)=>{const{value:p}=u,g=o+s.spacing+n.size,f=a.convert(p),x=Math.cos(f),y=Math.sin(f),b=g*x,S=g*y,{textAlign:M,textBaseline:D}=this.getLabelAlign(f),L=d===t.length-1&&p!==t[0]&&(0,qu.isNumberEqual)(Ag(f),Ag(a.convert(t[0]))),T=this.getLabelRotation(f);let I=this.formatTick(p,d,a.domain);r.text=I,r.x=b,r.y=S,r.setFont(s),r.textAlign=M,r.textBaseline=D,r.rotation=T,T&&(r.rotationCenterX=b,r.rotationCenterY=S);let N=T?lst.toCanvas(r):r.getBBox();if(N&&e.hideWhenNecessary&&!T){const O=l-N.x,R=N.x+N.width-c,_=1;if(O>_||R>_){const B=N.width-Math.max(O,R);I=sst.wrapText(I,{maxWidth:B,font:s,textWrap:"never"}),I===ost.EllipsisChar&&(I=""),r.text=I,N=r.getBBox()}}return{text:I,x:b,y:S,textAlign:M,textBaseline:D,hidden:I===""||u.hidden||L,rotation:T,box:N}});return s.avoidCollisions&&this.avoidLabelCollisions(h),h}computeLabelsBBox(t,e){this.labelData=this.createLabelNodeData(this.tickData,t,e);const i=this.labelData.map(({box:s})=>s).filter(s=>s!=null);return!this.label.enabled||i.length===0?null:cst.merge(i)}getLabelOrientation(){const{label:t}=this;return t instanceof LN?t.orientation:"fixed"}getLabelRotation(t){let e=wM(this.label.rotation??0);t=Ag(t);const i=this.getLabelOrientation();return i==="parallel"?(e+=t,t>=0&&t<Math.PI?e-=Math.PI/2:e+=Math.PI/2):i==="perpendicular"&&(e+=t,t>=Math.PI/2&&t<1.5*Math.PI&&(e+=Math.PI)),e}getLabelAlign(t){const e=Math.cos(t),i=Math.sin(t);let s,o;const a=this.getLabelOrientation(),n=(0,qu.isNumberEqual)(e,0),r=(0,qu.isNumberEqual)(i,0),l=(0,qu.isNumberEqual)(e,1),c=(0,qu.isNumberEqual)(i,-1),h=e>0&&!n,u=i>0&&!r;return a==="parallel"?(s="center",o=l&&r||u?"top":"bottom"):a==="perpendicular"?(s=c||h?"left":"right",o="middle"):(s="right",n?s="center":h&&(s="left"),o="bottom",r?o="middle":u&&(o="top")),{textAlign:s,textBaseline:o}}updateCrossLines(){const{shape:t,gridLength:e,innerRadiusRatio:i}=this;this.crossLines.forEach(s=>{s instanceof TN&&(s.ticks=this.tickData.map(o=>o.value),s.shape=t,s.axisOuterRadius=e,s.axisInnerRadius=e*i)}),super.updateCrossLines()}};Ey.CrossLineConstructor=TN,m([ist("rotation"),CN(xj)],Ey.prototype,"startAngle",2),m([CN(xj,{optional:!0})],Ey.prototype,"endAngle",2);var{RATIO:bj,OBJECT:hst,TempValidate:NN,CategoryScale:ust}=Nit._ModuleSupport,Qc=class extends Ey{constructor(t){super(t,new ust),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new SN}generateAngleTicks(){const{scale:t,gridLength:e}=this,{values:i,minSpacing:s}=this.interval,o=i??t.ticks({nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})??[];if(o.length<2||s==null)return o.map(c=>({value:c,visible:!0}));const a=o[0],n=t.convert(a),r=e*Math.cos(n),l=e*Math.sin(n);for(let c=1;c<o.length-1;c++){const h=o[c],u=t.convert(h);if(u-n>Math.PI)break;const d=e*Math.cos(u),p=e*Math.sin(u);if(Math.sqrt((d-r)**2+(p-l)**2)>s){const f=new Set([a]);return bN(o,c,(x,y)=>{f.add(y)}),o.map(x=>{const y=f.has(x);return{value:x,visible:y}})}}return[{value:a,visible:!0}]}avoidLabelCollisions(t){const{minSpacing:e}=this.label;if(t.length<3)return;const i=(l,c)=>{if(l.hidden||c.hidden)return!1;if(e==null)return l.box.collidesBBox(c.box);const h=l.box.clone().grow(e/2),u=c.box.clone().grow(e/2);return h.collidesBBox(u)},s=t[0],o=t.at(-1),a=new Set([s]),n=(0,lj.isNumberEqual)(s.x,o.x)&&(0,lj.isNumberEqual)(s.y,o.y),r=Math.floor(t.length/2);for(let l=1;l<=r;l++){const c=n?t.slice(0,-1):t;if(!bN(c,l,i)){bN(c,l,(u,d)=>{a.add(d)});break}}t.forEach(l=>{a.has(l)||(l.hidden=!0,l.box=void 0)})}};Qc.className="AngleCategoryAxis",Qc.type="angle-category",m([NN(bj)],Qc.prototype,"groupPaddingInner",2),m([NN(bj)],Qc.prototype,"paddingInner",2),m([NN(hst)],Qc.prototype,"interval",2);var dst={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-category",moduleFactory:t=>new Qc(t)},pst=(E(),C(w)),Sj=(P(),C(et)),gst=(E(),C(w)),fst=(P(),C(et)),{range:vj,isDenseInterval:mst,LinearScale:ON}=gst._ModuleSupport,Mj=class EE extends ON{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(e,i){const[s,o]=i;let a=ON.getTickStep(s,o,e);const n=isNaN(e.maxTickCount)?1/0:e.maxTickCount,r=Math.abs(o-s)/a;let l=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2)));return l>n&&(l/=2,a*=2),{count:l,step:a}}ticks(e,i=this.domain){const{arcLength:s}=this;if(!i||i.length<2||i.some(c=>!isFinite(c))||s<=0)return[];const{nice:o,interval:a}=e,[n,r]=i;if(a){const c=Math.abs(a),h=this.getPixelRange();if(!mst((r-n)/c,h))return vj(n,r,c)}let l;if(o&&this.hasNiceRange()){const c=super.niceDomain(e,i);l=EE.getNiceStepAndTickCount(e,c).step}else l=ON.getTickStep(n,r,e);return vj(n,r,l)}hasNiceRange(){const e=this.range.slice().sort((s,o)=>s-o);return[Math.PI,2*Math.PI].some(s=>(0,fst.isNumberEqual)(s,e[1]-e[0]))}niceDomain(e,i=this.domain){const s=super.niceDomain(e,i);if(!this.hasNiceRange())return s;const o=s[0]>s[1],a=o?s[1]:s[0],{step:n,count:r}=EE.getNiceStepAndTickCount(e,s),l=1/n,c=n>=1?Math.ceil(a/n+r)*n:Math.ceil((a+r*n)*l)/l;return o?[c,a]:[a,c]}getPixelRange(){return this.arcLength}},{AND:Dj,GREATER_THAN:yst,LESS_THAN:xst,NUMBER_OR_NAN:kj,OBJECT:bst,TempValidate:wN,angleBetween:Sst,normalisedExtentWithMetadata:vst,findMinMax:Mst}=pst._ModuleSupport,Qu=class extends Ey{constructor(t){super(t,new Mj),this.shape="circle",this.interval=new SN}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:o}=vst(t,e,i);return{domain:s,clipped:o}}updateScale(){super.updateScale(),this.scale.arcLength=this.getRangeArcLength()}getRangeArcLength(){const{range:t}=this,e=Math.min(...t),i=Math.max(...t),s=Sst(e,i)||2*Math.PI,o=this.gridLength;return s*o}generateAngleTicks(t){const{scale:e,range:i,nice:s}=this,{values:o,step:a,minSpacing:n,maxSpacing:r}=this.interval;let l;if(o==null){const{arcLength:c}=e,h=r?Math.floor(c/r):1,u=n?Math.floor(c/n):1/0,d=Math.floor(4/Math.PI*Math.abs(i[0]-i[1])),p=Math.max(h,Math.min(u,d)),g={nice:s,interval:a,tickCount:p,minTickCount:h,maxTickCount:u};l=e.ticks(g,t)}else{const[c,h]=Mst(t.map(Number));l=o.filter(u=>u>=c&&u<=h).sort((u,d)=>u-d)}return l.map(c=>({value:c,visible:!0}))}avoidLabelCollisions(t){const{minSpacing:e}=this.label,i=(a,n)=>{if(a.hidden||n.hidden)return!1;if(e==null)return a.box.collidesBBox(n.box);const r=a.box.clone().grow(e/2),l=n.box.clone().grow(e/2);return r.collidesBBox(l)},s=t[0],o=t.at(-1);s!==o&&(0,Sj.isNumberEqual)(s.x,o.x)&&(0,Sj.isNumberEqual)(s.y,o.y)&&(o.hidden=!0);for(let a=1;a<t.length;a*=2){let n=!1;for(let r=a;r<t.length;r+=a){const l=t[r],c=t[r-a];if(i(c,l)){n=!0;break}}if(!n){t.forEach((r,l)=>{l%a>0&&(r.hidden=!0,r.box=void 0)});return}}t.forEach((a,n)=>{n>0&&(a.hidden=!0,a.box=void 0)})}};Qu.className="AngleNumberAxis",Qu.type="angle-number",m([wN(Dj(kj,xst("max")),{optional:!0})],Qu.prototype,"min",2),m([wN(Dj(kj,yst("min")),{optional:!0})],Qu.prototype,"max",2),m([wN(bst)],Qu.prototype,"interval",2);var Dst={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-number",moduleFactory:t=>new Qu(t)},Aj=(E(),C(w)),{OrdinalTimeScale:kst}=Aj._ModuleSupport,EM=class extends Aj._ModuleSupport.CategoryAxis{constructor(t){super(t,new kst)}};EM.className="OrdinalTimeAxis",EM.type="ordinal-time";var Ast={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ordinal-time",moduleFactory:t=>new EM(t)},Ist=(E(),C(w)),_M=(E(),C(w)),Tst=(P(),C(et)),Ij=(E(),C(w)),EN=(P(),C(et)),{ChartAxisDirection:Cst,TempValidate:Lst,NUMBER:Nst,getCrossLineValue:Ost,validateCrossLineValue:wst,normalizeAngle360:Est,toRadians:_st,Group:Rst,Path:Pst,Sector:Bst,RotatableText:zst}=Ij._ModuleSupport,Tj=class extends Hn{constructor(){super(...arguments),this.positionAngle=void 0}};m([Lst(Nst,{optional:!0})],Tj.prototype,"positionAngle",2);var _N=class extends Io{constructor(){super(),this.direction=Cst.Y,this.label=new Tj,this.polygonNode=new Pst,this.sectorNode=new Bst,this.crossLineRange=new Rst,this.labelNode=new zst,this.outerRadius=0,this.innerRadius=0,this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.labelGroup.append(this.labelNode)}update(t){const{scale:e}=this;if(!e||!this.isValid()||!wst(Ost(this),e)){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.updateRadii();const{innerRadius:i,outerRadius:s}=this;t&&(t=i>=this.axisInnerRadius&&s<=this.axisOuterRadius),this.rangeGroup.visible=t,this.lineGroup.visible=t,this.labelGroup.visible=t,this.updatePolygonNode(t),this.updateSectorNode(t),this.updateLabelNode(t),this.assignCrossLineGroup(this.type==="range",this.crossLineRange)}updateRadii(){const{range:t,scale:e,type:i,axisInnerRadius:s,axisOuterRadius:o}=this;if(!e)return{innerRadius:0,outerRadius:0};const a=l=>o+s-l;let n,r;if(i==="line")n=a(e.convert(this.value)),r=n;else{const l=Math.abs(e?.bandwidth??0),c=t.map(h=>e.convert(h));n=a(Math.max(...c)),r=a(Math.min(...c))+l}this.outerRadius=n,this.innerRadius=r}drawPolygon(t,e,i){e.forEach((s,o)=>{const a=t*Math.cos(s),n=t*Math.sin(s);o===0?i.path.moveTo(a,n):i.path.lineTo(a,n)}),i.path.closePath()}updatePolygonNode(t){const{gridAngles:e,polygonNode:i,scale:s,shape:o,type:a,innerRadius:n,outerRadius:r}=this;if(!t||o!=="polygon"||!s||!e){i.visible=!1;return}i.visible=!0;const l=this.getPadding();i.path.clear(!0),this.drawPolygon(r-l,e,i);const c=e.slice().reverse(),h=a==="line"?r-l:n+l;this.drawPolygon(h,c,i),this.setSectorNodeProps(i)}updateSectorNode(t){const{axisInnerRadius:e,axisOuterRadius:i,scale:s,sectorNode:o,shape:a,innerRadius:n,outerRadius:r}=this;if(!t||a!=="circle"||!s){o.visible=!1;return}o.visible=!0,o.startAngle=0,o.endAngle=2*Math.PI;const l=this.getPadding(),c=(0,EN.clamp)(e,n+l,i),h=(0,EN.clamp)(e,r-l,i);o.innerRadius=Math.min(c,h),o.outerRadius=Math.max(c,h),this.setSectorNodeProps(o)}updateLabelNode(t){const{innerRadius:e,label:i,labelNode:s,scale:o,shape:a,type:n}=this;if(!t||i.enabled===!1||!i.text||!o){s.visible=!1;return}const r=Est(_st((i.positionAngle??0)-90)),l=((0,EN.isNumberEqual)(r,0)||r>0)&&r<Math.PI,c=l?r-Math.PI/2:r+Math.PI/2;let h;const u=this.gridAngles??[];n==="line"?h=e+i.padding:a==="circle"||u.length<3?h=e-i.padding:h=e*Math.cos(Math.PI/u.length)-i.padding;const d=h*Math.cos(r),p=h*Math.sin(r);let g;n==="line"?g=l?"top":"bottom":g=l?"bottom":"top",this.setLabelNodeProps(s,d,p,g,c)}getPadding(){const{scale:t}=this;if(!t)return 0;const e=Math.abs(t.bandwidth??0),i=Math.abs(t.step??0);return t instanceof Ij._ModuleSupport.BandScale?(i-e)/2:0}};_N.className="RadiusCrossLine";var{ChartAxisDirection:Fst,ZIndexMap:Gst,NUMBER:Cj,BOOLEAN:jst,TempValidate:RN,normalizeAngle360:Lj,toRadians:Vst,Caption:Wst,Group:Ust,Path:Hst,Line:Yst,Selection:Kst,AxisTickGenerator:$st,AxisGroupZIndexMap:Xst}=_M._ModuleSupport,PN=class extends _M._ModuleSupport.AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};m([RN(jst,{optional:!0})],PN.prototype,"autoRotate",2),m([RN(Cj)],PN.prototype,"autoRotateAngle",2);var RM=class extends _M._ModuleSupport.PolarAxis{constructor(t,e){super(t,e),this.positionAngle=0,this.tickGenerator=new $st(this),this.generatedTicks=void 0,this.lineNode=this.axisGroup.appendChild(new Yst({name:`${this.id}-Axis-line`,zIndex:Xst.AxisLine})),this.gridPathGroup=this.gridGroup.appendChild(new Ust({name:`${this.id}-gridPaths`,zIndex:Gst.AXIS_GRID})),this.gridPathSelection=Kst.select(this.gridPathGroup,Hst),this.axisGroup.appendChild(this.title.caption.node),this.destroyFns.push(this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}get direction(){return Fst.Y}getAxisTransform(){const t=this.scale.range[0],{translation:e,positionAngle:i,innerRadiusRatio:s}=this,o=t*s,a=Vst(i);return{translationX:e.x,translationY:e.y-t-o,rotation:a,rotationCenterX:0,rotationCenterY:t+o}}update(){super.update(),this.updateTitle();const{enabled:t,stroke:e,width:i}=this.line;this.lineNode.setProperties({stroke:e,strokeWidth:t?i:0,x1:0,y1:this.range[0],x2:0,y2:this.range[1]})}calculateTickLayout(t,e,i,s){const{parallelFlipRotation:o,regularFlipRotation:a}=this.calculateRotations(),n=[0,1],r=this.label.getSideFlag(),l=r*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),c=this.tickGenerator.generateTicks({domain:t,niceMode:e,visibleRange:n,primaryTickCount:s,parallelFlipRotation:o,regularFlipRotation:a,labelX:l,sideFlag:r}),{tickData:h,primaryTickCount:u=s}=c,{ticks:d,rawTicks:p,tickDomain:g,fractionDigits:f,niceDomain:x=t}=h,y=d.map(b=>this.getTickLabelProps(b,c));return this.generatedTicks={ticks:d,labels:y},{ticks:p,tickDomain:g,niceDomain:x,primaryTickCount:u,fractionDigits:f}}updateSelections(){const{generatedTicks:t}=this;if(!t)return;const{ticks:e,labels:i}=t;this.gridLineGroupSelection.update(this.gridLength?e:[]),this.tickLineGroupSelection.update(e),this.tickLabelGroupSelection.update(i),this.gridPathSelection.update(this.gridLine.enabled?this.prepareGridPathTickData(e):[]),this.gridLineGroupSelection.cleanup(),this.tickLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup(),this.gridPathSelection.cleanup()}updateLabels(){if(!this.label.enabled)return;const t=_M._ModuleSupport.resetAxisLabelSelectionFn();this.tickLabelGroupSelection.each((e,i)=>{e.fill=i.fill,e.fontFamily=i.fontFamily,e.fontSize=i.fontSize,e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.text=i.text,e.textBaseline=i.textBaseline,e.textAlign=i.textAlign??"center",e.setProperties(t(e,i))})}updateGridLines(){super.updateGridLines();const{gridLine:{style:t,width:e},shape:i,generatedTicks:s}=this;if(!t||!s)return;const o=t.length,a=(d,p)=>{const{stroke:g,lineDash:f}=t[p%o];d.stroke=g,d.strokeWidth=e,d.lineDash=f,d.fill=void 0},[n,r]=this.gridRange??[0,2*Math.PI],l=(0,Tst.isNumberEqual)(r-n,2*Math.PI),u=i==="circle"?(d,p)=>{const{path:g}=d;g.clear(!0);const f=this.getTickRadius(p);l?(g.moveTo(f,0),g.arc(0,0,f,0,2*Math.PI)):(g.moveTo(f*Math.cos(n),f*Math.sin(n)),g.arc(0,0,f,Lj(n),Lj(r))),l&&g.closePath()}:(d,p)=>{const{path:g}=d,f=this.gridAngles;if(g.clear(!0),!f||f.length<3)return;const x=this.getTickRadius(p);f.forEach((y,b)=>{const S=x*Math.cos(y),M=x*Math.sin(y);b===0?g.moveTo(S,M):g.lineTo(S,M),f.forEach((D,L)=>{const T=x*Math.cos(D),I=x*Math.sin(D);L===0?g.moveTo(T,I):g.lineTo(T,I)}),g.closePath()}),g.closePath()};this.gridPathSelection.each((d,p,g)=>{a(d,g),u(d,p)})}updateTitle(){const t=r=>r.defaultValue,{title:e,range:i,moduleCtx:{callbackCache:s}}=this,{formatter:o=t}=this.title;e.caption.enabled=e.enabled,e.caption.fontFamily=e.fontFamily,e.caption.fontSize=e.fontSize,e.caption.fontStyle=e.fontStyle,e.caption.fontWeight=e.fontWeight,e.caption.color=e.color,e.caption.wrapping=e.wrapping;let a=!1;const n=e.caption.node;e.enabled&&(a=!0,n.rotation=Math.PI/2,n.x=Math.floor((i[0]+i[1])/2),n.y=-Wst.SMALL_PADDING,n.textAlign="center",n.textBaseline="bottom",n.text=s.call(this,o,this.getTitleFormatterParams(this.scale.domain))),n.visible=a}updateCrossLines(){this.crossLines.forEach(t=>{if(t instanceof _N){const{shape:e,gridAngles:i,range:s,innerRadiusRatio:o}=this,a=s[0];t.shape=e,t.gridAngles=i,t.axisOuterRadius=a,t.axisInnerRadius=a*o}}),super.updateCrossLines()}createLabel(){return new PN}getTickLabelProps(t,e){const{label:i}=this,{combinedRotation:s,textBaseline:o,textAlign:a}=e,n=this.scale.range,r=t.tickLabel,c=i.getSideFlag()*(this.getTickSize()+i.spacing+this.seriesAreaPadding),h=r!==""&&r!=null;return{...this.getLabelStyles({value:t.tickLabel}),tickId:t.tickId,rotation:s,rotationCenterX:c,translationY:t.translationY,text:r,textAlign:a,textBaseline:o,visible:h,x:c,y:0,range:n}}};RM.CrossLineConstructor=_N,m([RN(Cj)],RM.prototype,"positionAngle",2);var{RATIO:BN,ProxyPropertyOnWrite:Nj,TempValidate:zN,CategoryScale:Oj}=Ist._ModuleSupport,Jc=class extends RM{constructor(t){super(t,new Oj),this.shape="circle",this.groupPaddingInner=0,this.paddingInner=0,this.paddingOuter=0}normaliseDataDomain(t){return{domain:t,clipped:!1}}prepareGridPathTickData(t){return t.slice().reverse()}getTickRadius(t){const{scale:e,innerRadiusRatio:i}=this,s=e.range[0],o=s*i;if(Oj.is(e)){const a=e.domain,n=a.length-1-a.indexOf(t.tick);return n===0?o:e.inset+e.step*(n-.5)+e.bandwidth/2}else{const a=(s-o)/e.domain.length;return s-t.translationY+o-a/2}}};Jc.className="RadiusCategoryAxis",Jc.type="radius-category",m([zN(BN)],Jc.prototype,"groupPaddingInner",2),m([Nj("scale","paddingInner"),zN(BN)],Jc.prototype,"paddingInner",2),m([Nj("scale","paddingOuter"),zN(BN)],Jc.prototype,"paddingOuter",2);var Zst={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-category",moduleFactory:t=>new Jc(t)},qst=(E(),C(w)),{AND:wj,GREATER_THAN:Qst,LESS_THAN:Jst,NUMBER_OR_NAN:Ej,TempValidate:_j,normalisedExtentWithMetadata:tot,LinearScale:eot}=qst._ModuleSupport,Ig=class extends RM{constructor(t){super(t,new eot),this.shape="polygon"}prepareGridPathTickData(t){const{scale:e}=this,i=e.domain[1];return t.filter(({tick:s})=>s!==i).sort((s,o)=>o.tick-s.tick)}getTickRadius(t){const{scale:e}=this,i=e.range[0],s=i*this.innerRadiusRatio;return i-t.translationY+s}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:s,clipped:o}=tot(t,e,i);return{domain:s,clipped:o}}};Ig.className="RadiusNumberAxis",Ig.type="radius-number",m([_j(wj(Ej,Jst("max")),{optional:!0})],Ig.prototype,"min",2),m([_j(wj(Ej,Qst("min")),{optional:!0})],Ig.prototype,"max",2);var iot={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-number",moduleFactory:t=>new Ig(t)},Rj=(E(),C(w)),{BOOLEAN:sot,POSITIVE_NUMBER:oot,ObserveChanges:Pj,TempValidate:Bj}=Rj._ModuleSupport,FN=class extends Rj._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!0,t.animationManager.skip(!1),this.destroyFns.push(()=>{t.animationManager.skip(!0)})}};m([Pj((t,e)=>{t.ctx.animationManager.skip(!e)}),Bj(sot)],FN.prototype,"enabled",2),m([Pj((t,e)=>{t.ctx.animationManager.defaultDuration=e}),Bj(oot,{optional:!0})],FN.prototype,"duration",2);var aot={type:"root",optionsKey:"animation",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new FN(t),themeTemplate:{animation:{enabled:!0}}},PM=(E(),C(w)),GN=(P(),C(et)),BM=(E(),C(w)),not='<div contenteditable="plaintext-only" class="ag-charts-text-input__textarea" tabindex="0"></div>',{focusCursorAtEnd:rot}=BM._ModuleSupport,zj="text-input",Fj="canvas-overlay",lot=class extends BM._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1,this.element=t.domManager.addChild(Fj,zj),this.element.classList.add("ag-charts-text-input"),this.destroyFns.push(()=>t.domManager.removeChild(Fj,zj))}setKeyDownHandler(t){this.element.addEventListener("keydown",t),this.destroyFns.push(()=>this.element.removeEventListener("keydown",t))}show(t){this.element.innerHTML=not;const e=this.element.firstElementChild;BM._ModuleSupport.setAttribute(e,"data-preventdefault",!1),e.isContentEditable||(e.contentEditable="true"),e.setAttribute("placeholder",this.ctx.localeManager.t(t.placeholderText??"inputTextareaPlaceholder")),t.styles?.placeholderColor&&e.style.setProperty("--placeholder-text-color",t.styles?.placeholderColor),e.innerText=t.text??"",e.style.color=t.styles?.color??"inherit",e.style.fontFamily=t.styles?.fontFamily??"inherit",e.style.fontSize=t.styles?.fontSize?`${t.styles.fontSize}px`:"inherit",e.style.fontStyle=t.styles?.fontStyle??"inherit",e.style.fontWeight=typeof t.styles?.fontWeight=="number"?`${t.styles.fontWeight}`:t.styles?.fontWeight??"inherit",rot(e),e.addEventListener("input",()=>{this.updatePosition(),t.onChange?.(this.getValue(),this.getBBox())}),e.addEventListener("click",i=>{i.stopPropagation()}),t.layout&&(this.layout=t.layout,this.updatePosition()),t.onChange?.(this.getValue(),this.getBBox()),this.visible=!0}hide(){this.element.innerHTML="",this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1}isVisible(){return this.visible}updateColor(t){this.element.firstElementChild&&(this.element.firstElementChild.style.color=t)}updateFontSize(t){if(this.element.firstElementChild)return this.element.firstElementChild.style.fontSize=`${t}px`,this.updatePosition(),this.getBBox()}getValue(){if(this.element.firstElementChild)return this.element.firstElementChild.innerText.trim()}updatePosition(){const{element:t}=this,e=t.firstElementChild;if(!e)return;const i=this.ctx.domManager.getBoundingClientRect(),{width:s,getTextInputCoords:o,getTextPosition:a,alignment:n,textAlign:r}=this.layout;t.style.setProperty("width",s?`${s}px`:"unset");const l=e.getBoundingClientRect(),c=o(l.height);let h=c.x;n==="center"?h-=(s??l.width)/2:n==="right"&&(h-=s??l.width);const u=a();let d=c.y;u==="center"?d-=l.height/2:u==="bottom"&&(d-=l.height),t.style.setProperty("top",`${d}px`),t.style.setProperty("left",`${h}px`),t.style.setProperty("max-width",`${i.width-h}px`),t.style.setProperty("text-align",n),e.style.setProperty("text-align",r)}getBBox(){const{left:t,top:e,width:i,height:s}=this.element.getBoundingClientRect();return new BM._ModuleSupport.BBox(t,e,i,s)}},cot=(E(),C(w)),{BOOLEAN:hot,BaseProperties:uot,TempValidate:Gj,UNION:dot}=cot._ModuleSupport,pot=dot(["x","y","xy"],"an axis type"),jN=class extends uot{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};m([Gj(hot)],jN.prototype,"enabled",2),m([Gj(pot,{optional:!0})],jN.prototype,"axes",2);var got=(E(),C(w)),VN=(t=>(t.Line="line",t.HorizontalLine="horizontal-line",t.VerticalLine="vertical-line",t.DisjointChannel="disjoint-channel",t.ParallelChannel="parallel-channel",t.FibonacciRetracement="fibonacci-retracement",t.FibonacciRetracementTrendBased="fibonacci-retracement-trend-based",t.Callout="callout",t.Comment="comment",t.Note="note",t.Text="text",t.Arrow="arrow",t.ArrowUp="arrow-up",t.ArrowDown="arrow-down",t.DateRange="date-range",t.PriceRange="price-range",t.DatePriceRange="date-price-range",t.QuickDatePriceRange="quick-date-price-range",t))(VN||{}),fot=Object.values(VN);function mot(t){for(const e of fot)if(e===t)return e}var yot=(P(),C(et)),xot=(E(),C(w)),bot=(P(),C(et)),Sot=(E(),C(w)),vot=(P(),C(et)),{BOOLEAN:_y,COLOR_STRING:WN,DATE:Ry,FONT_STYLE:Mot,FONT_WEIGHT:Dot,FUNCTION:kot,LINE_DASH:Aot,LINE_STYLE:Iot,NUMBER:Ju,OBJECT:Py,OR:By,POSITIVE_NUMBER:UN,RATIO:jj,STRING:th,TEXT_ALIGN:Tot,UNION:zM,BaseProperties:eh,TempValidate:Ut,predicateWithMessage:Cot,generateUUID:Lot}=Sot._ModuleSupport,Not=["value","groupPercentage"],zy=Cot(t=>(0,vot.isObject)(t)&&Object.keys(t).every(e=>Not.includes(e)),"objects with grouping value properties such as 'value' or 'groupPercentage'"),Fy=class extends eh{};m([Ut(By(th,Ju,Ry,zy))],Fy.prototype,"x",2),m([Ut(By(th,Ju,Ry,zy))],Fy.prototype,"y",2);var Oot=class extends ao(jl(Hj(eh))){},HN=class extends ao(jl(zr($N(id(eh))))){constructor(){super(...arguments),this.cornerRadius=2}};m([Ut(_y)],HN.prototype,"enabled",2),m([Ut(UN)],HN.prototype,"cornerRadius",2);var wot=class extends zr(eh){},Eot=class extends ao(jl(zr(eh))){},td=class extends id(eh){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};m([Ut(th)],td.prototype,"label",2),m([Ut(zM(["top","center","bottom"]),{optional:!0})],td.prototype,"position",2),m([Ut(zM(["left","center","right"]),{optional:!0})],td.prototype,"alignment",2);var _ot=class extends id(eh){},Gy=class extends id(eh){constructor(){super(...arguments),this.label=""}};m([Ut(th)],Gy.prototype,"label",2),m([Ut(zM(["top","inside","bottom"]),{optional:!0})],Gy.prototype,"position",2),m([Ut(zM(["left","center","right"]),{optional:!0})],Gy.prototype,"alignment",2);function ed(t){class e extends Pot(Hj(t)){constructor(){super(...arguments),this.id=Lot()}isValidWithContext(s,o){return super.isValid(o)}}return e}function YN(t){class e extends t{constructor(){super(...arguments),this.start=new Fy,this.end=new Fy}}return m([Ut(Py)],e.prototype,"start",2),m([Ut(Py)],e.prototype,"end",2),e}function Vj(t){class e extends t{}return m([Ut(By(th,Ju,Ry,zy))],e.prototype,"x",2),m([Ut(By(th,Ju,Ry,zy))],e.prototype,"y",2),e}function Wj(t){class e extends t{}return m([Ut(By(th,Ju,Ry,zy))],e.prototype,"value",2),e}function KN(t){class e extends t{constructor(){super(...arguments),this.background=new wot}}return m([Ut(Py,{optional:!0})],e.prototype,"background",2),e}function ih(t){class e extends t{constructor(){super(...arguments),this.handle=new Eot}}return m([Ut(Py,{optional:!0})],e.prototype,"handle",2),e}function Uj(t){class e extends t{constructor(){super(...arguments),this.axisLabel=new HN}}return m([Ut(Py,{optional:!0})],e.prototype,"axisLabel",2),e}function $N(t){class e extends t{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return m([Ut(UN,{optional:!0})],e.prototype,"padding",2),m([Ut(Tot,{optional:!0})],e.prototype,"textAlign",2),m([Ut(kot,{optional:!0})],e.prototype,"formatter",2),e}function Rot(t){class e extends t{}return e}function XN(t){class e extends t{}return m([Ut(_y,{optional:!0})],e.prototype,"extendStart",2),m([Ut(_y,{optional:!0})],e.prototype,"extendEnd",2),e}function Pot(t){class e extends t{}return m([Ut(_y,{optional:!0})],e.prototype,"locked",2),e}function ZN(t){class e extends t{setLocaleManager(s){this.localeManager??(this.localeManager=s)}}return e}function Hj(t){class e extends t{}return m([Ut(_y,{optional:!0})],e.prototype,"visible",2),e}function zr(t){class e extends t{}return m([Ut(WN,{optional:!0})],e.prototype,"fill",2),m([Ut(jj,{optional:!0})],e.prototype,"fillOpacity",2),e}function ao(t){class e extends t{}return m([Ut(WN,{optional:!0})],e.prototype,"stroke",2),m([Ut(jj,{optional:!0})],e.prototype,"strokeOpacity",2),m([Ut(Ju,{optional:!0})],e.prototype,"strokeWidth",2),e}function jl(t){class e extends t{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return m([Ut(Aot,{optional:!0})],e.prototype,"lineDash",2),m([Ut(Ju,{optional:!0})],e.prototype,"lineDashOffset",2),m([Ut(Iot,{optional:!0})],e.prototype,"lineStyle",2),e}function id(t){class e extends t{constructor(){super(...arguments),this.fontSize=12,this.fontFamily="Verdana, sans-serif"}}return m([Ut(Mot,{optional:!0})],e.prototype,"fontStyle",2),m([Ut(Dot,{optional:!0})],e.prototype,"fontWeight",2),m([Ut(UN)],e.prototype,"fontSize",2),m([Ut(th)],e.prototype,"fontFamily",2),m([Ut(WN,{optional:!0})],e.prototype,"color",2),e}var Bot=(E(),C(w)),zot=(E(),C(w)),qN=(P(),C(et));function Yj(t){return(0,qN.isNumber)(t)||(0,qN.isString)(t)||(0,qN.isDate)(t)?{value:t,groupPercentage:0}:t??{value:void 0,groupPercentage:0}}function Ei(t){return Yj(t)?.value}var{clampArray:Fot}=zot._ModuleSupport;function To(t,e){if(t.start==null||t.end==null)return;const i=gi(t.start,e),s=gi(t.end,e);if(!(i==null||s==null))return{x1:i.x,y1:i.y,x2:s.x,y2:s.y}}function gi(t,e){const i=Vl(t.x,e.xAxis),s=Vl(t.y,e.yAxis);return{x:i,y:s}}function Vl(t,e){if(t==null)return 0;const{value:i,groupPercentage:s}=Yj(t),{scale:o,snapToGroup:a}=e,n=o.bandwidth===0?o.step??0:o.bandwidth??0,r=a?n/2:n*s;return o.convert(i)+r}function Co(t,e){const i=FM(t.x,e.xAxis),s=FM(t.y,e.yAxis);return{x:i,y:s}}function FM(t,e){const{scale:i}=e;if(e.continuous&&i.step==null)return e.scaleInvert(t);const s=e.scaleInvertNearest(t),o=i.bandwidth===0?i.step:i.bandwidth??0,a=i.convert(s),n=a+o,r=Fot(t,i.range),l=a===n?0:(r-a)/(n-a);return{value:s,groupPercentage:l}}var Got=(E(),C(w)),{BaseProperties:jot}=Got._ModuleSupport,QN=class extends ed(YN(ih(jot))){constructor(){super(...arguments),this.snapToAngle=45}isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){}getDefaultOpacity(t){}},{STRING:Vot,TempValidate:Wot}=Bot._ModuleSupport,Kj=class extends ZN($N(id(QN))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){return this.color}getDefaultOpacity(t){}getPlaceholderColor(){}getPadding(){const{padding:t=0}=this;return{top:t,right:t,bottom:t,left:t}}getText(){const t=this.text.length==0;let e=this.text;return t&&(e=this.placeholderText??"",this.localeManager&&(e=this.localeManager.t(e))),{text:e,isPlaceholder:t}}getTextInputCoords(t,e){return gi(this.end,t)}getTextPosition(){return this.position}};m([Wot(Vot)],Kj.prototype,"text",2);var{STRING:Uot,TempValidate:Hot,Color:$j}=xot._ModuleSupport,Yot={top:6,right:12,bottom:9,left:12},Yn=class extends zr(ao(Kj)){constructor(){super(...arguments),this.type="callout",this.position="bottom",this.alignment="left"}static is(t){return(0,bot.isObject)(t)&&t.type==="callout"}getDefaultColor(t){switch(t){case"fill-color":return this.fill;case"line-color":return this.stroke;case"text-color":default:return this.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;case"text-color":default:return}}getPlaceholderColor(){const{r:t,g:e,b:i}=$j.fromString(this.color??"#888888");return new $j(t,e,i,.66).toString()}getPadding(){const{padding:t}=this;return t==null?{...Yot}:{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const i=super.getTextInputCoords(t,e),s=this.getPadding(),o=s.left??0,a=s.bottom??0;return{x:i.x+o,y:i.y-a}}};m([Hot(Uot)],Yn.prototype,"type",2);var Kot=(E(),C(w)),$ot=(P(),C(et)),Xot=(E(),C(w)),{STRING:Zot,BaseProperties:qot,TempValidate:Qot}=Xot._ModuleSupport,GM=class extends ed(Vj(ih($N(id(qot))))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){return this.color}getDefaultOpacity(t){}getPlaceholderColor(){}getPadding(){const{padding:t=0}=this;return{top:t,right:t,bottom:t,left:t}}getText(){const t=this.text.length==0;return{text:t?this.placeholderText??"":this.text,isPlaceholder:t}}getTextInputCoords(t,e){return gi(this,t)}getTextPosition(){return this.position}};m([Qot(Zot)],GM.prototype,"text",2);var{STRING:Jot,TempValidate:tat,Color:Xj}=Kot._ModuleSupport,jM={top:8,right:14,bottom:8,left:14},Fr=class extends zr(ao(GM)){constructor(){super(...arguments),this.type="comment",this.position="bottom",this.alignment="left"}static is(t){return(0,$ot.isObject)(t)&&t.type==="comment"}getDefaultColor(t){switch(t){case"fill-color":return this.fill;case"line-color":return this.stroke;case"text-color":default:return this.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;case"text-color":default:return}}getPlaceholderColor(){const{r:t,g:e,b:i}=Xj.fromString(this.color??"#888888");return new Xj(t,e,i,.66).toString()}getPadding(){const{padding:t,fontSize:e}=this;return t==null?{top:Math.max(e*.4,jM.top),bottom:Math.max(e*.4,jM.bottom),left:Math.max(e*.8,jM.left),right:Math.max(e*.8,jM.right)}:{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const i=super.getTextInputCoords(t,e),s=this.getPadding();return{x:i.x+s.left,y:i.y-s.bottom}}};m([tat(Jot)],Fr.prototype,"type",2);var eat=(E(),C(w)),VM=(P(),C(et)),iat=(E(),C(w)),{Vec2:sd}=iat._ModuleSupport;function jy(t,e){return t?"dashed":e??"solid"}function Zj(t,e){switch(e){case"solid":return[];case"dashed":return[t*4,t*2];case"dotted":return[0,t*2]}}function Tg(t,e,i,s){const o=jy(t,i);return e??t??Zj(s??1,o)}function Cg(t,e,i){const s=jy(e,i);return t??s==="dotted"?"round":void 0}function sat(t,e){const[i,s]=sd.from(t),o=e.height,a=sd.gradient(s,i,o),n=sd.intercept(s,a,o),r=[{x:i.x,y:o??0},{x:i.x,y:o==null?e.height:o-e.height}];if(a===1/0)return r;let l=[sd.intersectAtY(a,n,0,o),sd.intersectAtY(a,n,e.height,o),sd.intersectAtX(a,n,0,o),sd.intersectAtX(a,n,e.width,o)];return l=l.filter(c=>c.x>=e.x&&c.x<=e.width&&c.y>=e.y&&c.y<=e.height).sort((c,h)=>c.x===h.x?0:c.x<h.x?-1:1),l.length!==2?r:l}var{BOOLEAN:WM,OBJECT:Lg,STRING:UM,BaseProperties:JN,TempValidate:Xo}=eat._ModuleSupport,oat=class extends ao(JN){},t2=class extends id(zr(ao(JN))){constructor(){super(...arguments),this.divider=new oat}};m([Xo(Lg,{optional:!0})],t2.prototype,"divider",2);var e2=class extends zr(ao(ih(JN))){constructor(){super(...arguments),this.statistics=new t2}};m([Xo(Lg,{optional:!0})],e2.prototype,"statistics",2);var Ng=class extends ZN(KN(ao(jl(QN)))){constructor(){super(...arguments),this.direction="both",this.hasDateRange=!1,this.hasPriceRange=!1,this.statistics=new t2,this.getVolume=()=>{},this.text=new td}getDefaultColor(t){switch(t){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return Tg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Cg(this.lineCap,this.lineDash,this.lineStyle)}};m([Xo(Lg,{optional:!0})],Ng.prototype,"statistics",2),m([Xo(Lg,{optional:!0})],Ng.prototype,"text",2);function i2(t){class e extends t{constructor(){super(...arguments),this.hasDateRange=!0}}return e}function s2(t){class e extends t{constructor(){super(...arguments),this.hasPriceRange=!0}}return e}var on=class extends i2(Ng){constructor(){super(...arguments),this.type="date-range",this.direction="horizontal"}static is(t){return(0,VM.isObject)(t)&&t.type==="date-range"}};m([Xo(UM)],on.prototype,"type",2),m([Xo(WM,{optional:!0})],on.prototype,"extendAbove",2),m([Xo(WM,{optional:!0})],on.prototype,"extendBelow",2);var an=class extends s2(Ng){constructor(){super(...arguments),this.type="price-range",this.direction="vertical"}static is(t){return(0,VM.isObject)(t)&&t.type==="price-range"}};m([Xo(UM)],an.prototype,"type",2),m([Xo(WM,{optional:!0})],an.prototype,"extendLeft",2),m([Xo(WM,{optional:!0})],an.prototype,"extendRight",2);var Wl=class extends i2(s2(Ng)){constructor(){super(...arguments),this.type="date-price-range",this.direction="both"}static is(t){return(0,VM.isObject)(t)&&t.type==="date-price-range"}};m([Xo(UM)],Wl.prototype,"type",2);var ka=class extends i2(s2(Ng)){constructor(){super(...arguments),this.type="quick-date-price-range",this.up=new e2,this.down=new e2,this.direction="both"}static is(t){return(0,VM.isObject)(t)&&t.type==="quick-date-price-range"}};m([Xo(UM)],ka.prototype,"type",2),m([Xo(Lg,{optional:!0})],ka.prototype,"up",2),m([Xo(Lg,{optional:!0})],ka.prototype,"down",2);var aat=(E(),C(w)),qj=(P(),C(et)),nat=(E(),C(w)),{TextWrapper:rat,CachedTextMeasurerPool:lat,BBox:cat}=nat._ModuleSupport,Vy=1.38;function Qj(t){return{font:{fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight},textAlign:t.textAlign,textBaseline:t.position=="center"?"middle":t.position,lineHeight:Vy,avoidOrphans:!1,textWrap:"always"}}function HM(t,e,i){return i?rat.wrapText(e,{...Qj(t),maxWidth:i}):e}function hat(t,e){const i=Qj(t),{lineMetrics:s,width:o}=lat.measureLines(e,i),a=s.length*(t.fontSize??14)*Vy;return{width:o,height:a}}function o2(t,e,i,s){let o=s?.width??0,a=s?.height??0;if(!s){const n=t.width!=null?HM(t,e,t.width):e;({width:o,height:a}=hat(t,n))}return new cat(i.x,i.y,o,a)}function Jj(t,e,i,s,{x:o,y:a},n){const{visible:r=!0,fontFamily:l,fontSize:c=14,fontStyle:h,fontWeight:u,textAlign:d}=s,p=c*Vy;n??(n=s.position=="center"?"middle":s.position);const g=i?s.getPlaceholderColor():s.color;t.setProperties({x:o,y:a,visible:r,text:e,fill:g,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:u,textAlign:d,lineHeight:p,textBaseline:n})}var{OBJECT:uat,STRING:dat,BaseProperties:pat,TempValidate:tV}=aat._ModuleSupport,gat=10,fat=11,eV=20,mat=22,yat=10,iV=eV+yat,sV=34,xat=class extends zr(ao(pat)){},Zo=class extends zr(ao(GM)){constructor(){super(...arguments),this.type="note",this.background=new xat,this.position="bottom",this.alignment="center",this.width=200}static is(t){return(0,qj.isObject)(t)&&t.type==="note"}getDefaultColor(t){switch(t){case"line-color":return this.fill;case"text-color":return this.color}}getDefaultOpacity(t){switch(t){case"line-color":return this.fillOpacity;case"text-color":return}}getPadding(){const t=this.padding??gat;return{top:t,right:t,bottom:t,left:t}}getTextInputCoords(t,e){const{width:i,text:s}=this,o=super.getTextInputCoords(t,e),a=this.getPadding().top,n=o2(this,s,o);n.x=(0,qj.clamp)(i/2,n.x,t.seriesRect.width-i/2);const r=n.y-iV-a*2,l=n.y+fat+a*2,c=Math.max(n.height,e);return r-c-sV<0?(n.y=l,this.position="top"):(n.y=r+a,this.position="bottom"),{x:n.x,y:n.y}}};m([tV(dat)],Zo.prototype,"type",2),m([tV(uat,{optional:!0})],Zo.prototype,"background",2);var bat=(E(),C(w)),{BaseProperties:Sat}=bat._ModuleSupport,vat=class extends ed(Vj(ih(Sat))){isValidWithContext(t,e){return super.isValid(e)}getDefaultColor(t){}getDefaultOpacity(t){}},a2=class h6 extends zr(vat){constructor(){super(...arguments),this.size=32}static is(e){return e instanceof h6}getDefaultColor(e){return e==="fill-color"?this.fill:void 0}getDefaultOpacity(e){return e==="fill-color"?this.fillOpacity:void 0}},Mat=(E(),C(w)),oV=(P(),C(et)),Dat=(E(),C(w)),n2=(P(),C(et)),{ContinuousScale:aV}=Dat._ModuleSupport;function od(t,e,i={overflowContinuous:!1},s){let o=!0;return o&&(o=Og(t,e.start,i,s&&`${s}[start] `)),o&&(o=Og(t,e.end,i,s&&`${s}[end] `)),o}function nV(t,e,i){const s=e.direction==="horizontal"?t.yAxis:t.xAxis,o=r2(e.value,s);if(!o&&i){const a=Ei(e.value);n2.Logger.warnOnce(`${i}is outside the axis domain, ignoring. - value: [${a}]]`)}return o}function Og(t,e,i={overflowContinuous:!1},s){if(e.x==null||e.y==null)return s&&n2.Logger.warnOnce(`${s}requires both an [x] and [y] property, ignoring.`),!1;const{xAxis:o,yAxis:a}=t,n=i.overflowContinuous&&aV.is(o.scale),r=i.overflowContinuous&&aV.is(a.scale),l=n||r2(e.x,o),c=r||r2(e.y,a);if(l&&c)return!0;if(s){let h="x & y domains";l&&(h="y domain"),c&&(h="x domain");const u=Ei(e.x),d=Ei(e.y);n2.Logger.warnOnce(`${s}is outside the ${h}, ignoring. - x: [${u}], y: ${d}]`)}return!1}function r2(t,e){const{domain:i}=e.scale,s=Ei(t);return i&&s!=null&&e.continuous?s>=i[0]&&s<=i.at(-1):!0}var{OBJECT:rV,STRING:lV,BaseProperties:cV,TempValidate:YM}=Mat._ModuleSupport,no=class extends ed(Wj(ih(Uj(ao(jl(cV)))))){constructor(){super(...arguments),this.direction="horizontal",this.type="horizontal-line",this.text=new td}static is(t){return(0,oV.isObject)(t)&&t.type==="horizontal-line"}isValidWithContext(t,e){return super.isValid(e)&&nV(t,this,e)}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return Tg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Cg(this.lineCap,this.lineDash,this.lineStyle)}};m([YM(lV)],no.prototype,"type",2),m([YM(rV,{optional:!0})],no.prototype,"text",2);var Gr=class extends ed(Wj(ih(Uj(ao(jl(cV)))))){constructor(){super(...arguments),this.direction="vertical",this.type="vertical-line",this.text=new td}static is(t){return(0,oV.isObject)(t)&&t.type==="vertical-line"}isValidWithContext(t,e){return super.isValid(e)&&nV(t,this,e)}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return Tg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Cg(this.lineCap,this.lineDash,this.lineStyle)}};m([YM(lV)],Gr.prototype,"type",2),m([YM(rV,{optional:!0})],Gr.prototype,"text",2);var kat=(E(),C(w)),hV=(P(),C(et)),{NUMBER:uV,OBJECT:Aat,STRING:Iat,BaseProperties:Tat,TempValidate:KM}=kat._ModuleSupport,nn=class extends ed(KN(YN(ih(XN(ao(jl(Tat))))))){constructor(){super(...arguments),this.type="disjoint-channel",this.text=new Gy,this.snapToAngle=45}static is(t){return(0,hV.isObject)(t)&&t.type==="disjoint-channel"}get bottom(){const t={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return typeof t.start.y=="number"&&typeof t.end.y=="number"?(t.start.y-=this.startHeight,t.end.y-=this.endHeight):hV.Logger.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),t}isValidWithContext(t,e){return super.isValid(e)&&od(t,this,{overflowContinuous:!0},e)&&od(t,this.bottom,{overflowContinuous:!0},e)}getDefaultColor(t){switch(t){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return Tg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Cg(this.lineCap,this.lineDash,this.lineStyle)}};m([KM(Iat)],nn.prototype,"type",2),m([KM(uV)],nn.prototype,"startHeight",2),m([KM(uV)],nn.prototype,"endHeight",2),m([KM(Aat,{optional:!0})],nn.prototype,"text",2);var Cat=(E(),C(w)),Lat=(P(),C(et)),Nat=(E(),C(w)),Oat=(P(),C(et)),wat=(E(),C(w)),dV=(P(),C(et)),{OBJECT:Eat,STRING:pV,TempValidate:l2}=wat._ModuleSupport,$M=class extends ZN(Rot(XN(ao(jl(QN))))){constructor(){super(...arguments),this.text=new td}isValidWithContext(t,e){return super.isValid(e)&&od(t,this,void 0,e)}getDefaultColor(t){switch(t){case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return Tg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Cg(this.lineCap,this.lineDash,this.lineStyle)}};m([l2(Eat,{optional:!0})],$M.prototype,"text",2);var Ul=class extends $M{constructor(){super(...arguments),this.type="arrow",this.endCap="arrow"}static is(t){return(0,dV.isObject)(t)&&t.type==="arrow"}};m([l2(pV)],Ul.prototype,"type",2);var Hl=class extends $M{constructor(){super(...arguments),this.type="line"}static is(t){return(0,dV.isObject)(t)&&t.type==="line"}};m([l2(pV)],Hl.prototype,"type",2);var{OBJECT:_at,BOOLEAN:c2,COLOR_STRING:Rat,COLOR_STRING_ARRAY:Pat,TempValidate:ad,predicateWithMessage:Bat}=Nat._ModuleSupport,zat=[10,6,4],Fat=Bat(t=>(0,Oat.isFiniteNumber)(t)&&zat.includes(t),"Number of fibonacci ranges, 10, 6 or 4"),Yl=class extends $M{constructor(){super(...arguments),this.label=new _ot,this.reverse=!1,this.showFill=!0,this.isMultiColor=!0,this.strokes=[],this.bands=10}getDefaultColor(t){switch(t){case"line-color":return this.rangeStroke??this.stroke;case"text-color":return this.text.color}}};m([ad(_at,{optional:!0})],Yl.prototype,"label",2),m([ad(c2,{optional:!0})],Yl.prototype,"reverse",2),m([ad(c2,{optional:!0})],Yl.prototype,"showFill",2),m([ad(c2,{optional:!0})],Yl.prototype,"isMultiColor",2),m([ad(Pat,{optional:!0})],Yl.prototype,"strokes",2),m([ad(Rat,{optional:!0})],Yl.prototype,"rangeStroke",2),m([ad(Fat,{optional:!0})],Yl.prototype,"bands",2);var{STRING:Gat,OBJECT:jat,TempValidate:gV}=Cat._ModuleSupport,jr=class extends Yl{constructor(){super(...arguments),this.type="fibonacci-retracement-trend-based",this.endRetracement=new Fy}static is(t){return(0,Lat.isObject)(t)&&t.type==="fibonacci-retracement-trend-based"}isValidWithContext(t,e){return od(t,this,{overflowContinuous:!0},e)}};m([gV(Gat)],jr.prototype,"type",2),m([gV(jat)],jr.prototype,"endRetracement",2);var Vat=(E(),C(w)),Wat=(P(),C(et)),{STRING:Uat,TempValidate:Hat}=Vat._ModuleSupport,Kl=class extends Yl{constructor(){super(...arguments),this.type="fibonacci-retracement"}static is(t){return(0,Wat.isObject)(t)&&t.type==="fibonacci-retracement"}isValidWithContext(t,e){return od(t,this,{overflowContinuous:!0},e)}};m([Hat(Uat)],Kl.prototype,"type",2);var Yat=(E(),C(w)),fV=(P(),C(et)),{NUMBER:Kat,STRING:$at,OBJECT:mV,BaseProperties:Xat,TempValidate:XM}=Yat._ModuleSupport,rn=class extends ed(KN(YN(ih(XN(ao(jl(Xat))))))){constructor(){super(...arguments),this.type="parallel-channel",this.middle=new Oot,this.text=new Gy,this.snapToAngle=45}static is(t){return(0,fV.isObject)(t)&&t.type==="parallel-channel"}get bottom(){const t={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return typeof t.start.y=="number"&&typeof t.end.y=="number"?(t.start.y-=this.height,t.end.y-=this.height):fV.Logger.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),t}isValidWithContext(t,e){return super.isValid(e)&&od(t,this,{overflowContinuous:!0},e)&&od(t,this.bottom,{overflowContinuous:!0},e)}getDefaultColor(t){switch(t){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(t){switch(t){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return Tg(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return Cg(this.lineCap,this.lineDash,this.lineStyle)}};m([XM($at)],rn.prototype,"type",2),m([XM(Kat)],rn.prototype,"height",2),m([XM(mV,{optional:!0})],rn.prototype,"middle",2),m([XM(mV,{optional:!0})],rn.prototype,"text",2);var Zat=(E(),C(w)),qat=(P(),C(et)),{STRING:Qat,TempValidate:Jat}=Zat._ModuleSupport,$l=class extends GM{constructor(){super(...arguments),this.type="text",this.position="bottom"}static is(t){return(0,qat.isObject)(t)&&t.type==="text"}};m([Jat(Qat)],$l.prototype,"type",2);function sh(t){return ka.is(t)}function ZM(t){return Hl.is(t)||no.is(t)||Gr.is(t)||Ul.is(t)||yV(t)}function Xl(t){return nn.is(t)||rn.is(t)}function yV(t){return Kl.is(t)||jr.is(t)}function Vr(t){return Yn.is(t)||Fr.is(t)||Zo.is(t)||$l.is(t)}function Wy(t){return on.is(t)||an.is(t)||Wl.is(t)||ka.is(t)}function h2(t){return Vr(t)&&!Zo.is(t)}function oh(t){return ZM(t)||Xl(t)||Wy(t)&&!ka.is(t)}function tnt(t){return ZM(t)||Xl(t)||Wy(t)||Yn.is(t)||Zo.is(t)}function ent(t){return Zo.is(t)}function int(t){return Xl(t)||Wy(t)||Yn.is(t)||Fr.is(t)||a2.is(t)}function snt(t){return Vr(t)&&!Zo.is(t)}function wg(t){return(ZM(t)||Xl(t)||Wy(t))&&!sh(t)&&(0,yot.isObject)(t.text)}function ont(t,e){"fontSize"in t&&(t.fontSize=e),wg(t)&&(t.text.fontSize=e)}function xV(t,e){const i=e?.strokeWidth??t.strokeWidth??1,s=e?.type??t.lineStyle,o=s??jy(t.lineDash,s),a=Zj(i,o);t.strokeWidth=i,t.computedLineDash=a,t.lineStyle=o,t.lineCap=o==="dotted"?"round":void 0}function qM(t,e,i,s,o,a){switch(e){case"fill-color":{"fill"in t&&(t.fill=s),"fillOpacity"in t&&(t.fillOpacity=o),"background"in t&&(t.background.fill=s,t.background.fillOpacity=o);break}case"line-color":{"axisLabel"in t&&(t.axisLabel.fill=s,t.axisLabel.fillOpacity=o,t.axisLabel.stroke=s,t.axisLabel.strokeOpacity=o),"fill"in t&&"fillOpacity"in t&&ent(t)?(t.fill=s,t.fillOpacity=o):("strokeOpacity"in t&&(t.strokeOpacity=o),"isMultiColor"in t&&"rangeStroke"in t?(t.isMultiColor=a,t.rangeStroke=s):"stroke"in t&&(t.stroke=s));break}case"text-color":{"color"in t&&(t.color=i),wg(t)&&(t.text.color=s);break}}}var{deepClone:ln}=got._ModuleSupport,ant=class{constructor(){this.mementoOriginatorKey="annotation-defaults",this.colors=new Map(Object.values(VN).map(t=>[t,new Map([["line-color",void 0],["fill-color",void 0],["text-color",void 0]])])),this.fontSizes=new Map([["callout",void 0],["comment",void 0],["text",void 0],["arrow",void 0],["line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineStyles=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextAlignments=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextPositions=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.fibonacciOptions=new Map([["fibonacci-retracement",{bands:void 0,reverse:void 0,showFill:void 0}],["fibonacci-retracement-trend-based",{bands:void 0,reverse:void 0,showFill:void 0}]])}createMemento(){return{colors:ln(this.colors),fontSizes:ln(this.fontSizes),lineStyles:ln(this.lineStyles),lineTextAlignments:ln(this.lineTextAlignments),lineTextPositions:ln(this.lineTextPositions),fibonacciOptions:ln(this.fibonacciOptions)}}guardMemento(t){return!0}restoreMemento(t,e,i){this.colors=ln(i.colors),this.fontSizes=ln(i.fontSizes),this.lineStyles=ln(i.lineStyles),this.lineTextAlignments=ln(i.lineTextAlignments),this.lineTextPositions=ln(i.lineTextPositions),this.fibonacciOptions=ln(i.fibonacciOptions)}setDefaultColor(t,e,i,s,o,a){this.colors.get(t)?.set(e,[i,s,o,a])}setDefaultFontSize(t,e){this.fontSizes.set(t,e)}setDefaultLineStyleType(t,e){const i=this.lineStyles.get(t);i?i.type=e:this.lineStyles.set(t,{type:e})}setDefaultLineStyleWidth(t,e){const i=this.lineStyles.get(t);i?i.strokeWidth=e:this.lineStyles.set(t,{strokeWidth:e})}setDefaultLineTextAlignment(t,e){this.lineTextAlignments.set(t,e)}setDefaultLineTextPosition(t,e){this.lineTextPositions.set(t,e)}setDefaultFibonacciOptions(t,e,i){if(t!="fibonacci-retracement"&&t!="fibonacci-retracement-trend-based")return;const s=this.fibonacciOptions.get(t);s[e]=i,this.fibonacciOptions.set(t,s)}applyDefaults(t){for(const[e,i]of this.colors)if(t.type===e)for(const[s,[o,a,n,r]=[]]of i)o&&a&&n!=null&&r!=null&&qM(t,s,o,a,n,r);for(const[e,i]of this.fontSizes)t.type!==e||i==null||ont(t,i);for(const[e,i]of this.lineStyles)t.type!==e||i==null||xV(t,i);for(const[e,i]of this.lineTextPositions)t.type!==e||i==null||(t.text.position=i);for(const[e,i]of this.lineTextAlignments)t.type!==e||i==null||(t.text.alignment=i);for(const[e,i]of this.fibonacciOptions)t.type!==e||i==null||Object.keys(i).forEach(s=>{const o=i[s];o!=null&&t.set({[s]:o})})}},bV=(E(),C(w)),SV=(E(),C(w)),Uy=(P(),C(et)),nnt='<div class="ag-charts-color-picker__palette" tabindex="0"></div><div class="ag-charts-color-picker__color-row"><button class="ag-charts-color-picker__multi-color-button" tabindex="0" type="button"></button> <input class="ag-charts-color-picker__hue-input" tabindex="0" type="range" min="0" max="360" value="0"></div><input class="ag-charts-color-picker__alpha-input" tabindex="0" type="range" min="0" max="1" value="1" step="0.01"> <label class="ag-charts-color-picker__color-field"><span class="ag-charts-color-picker__color-label">Color</span> <input class="ag-charts-color-picker__color-input" tabindex="0" value="#000"></label>',{Color:u2}=SV._ModuleSupport,vV=t=>{try{const e=u2.fromString(t),[i,s,o]=e.toHSB();return[i,s,o,e.a]}catch{return}},MV=class extends SV._ModuleSupport.AnchoredPopover{constructor(t,e){super(t,"color-picker",e),this.hasChanged=!1,this.hideFns.push(()=>{this.hasChanged&&this.onChangeHide?.()})}show(t){this.hasChanged=!1,this.onChangeHide=t.onChangeHide;const{element:e,initialFocus:i}=this.createColorPicker(t),s=this.showWithChildren([e],{initialFocus:i,...t});s.classList.add("ag-charts-color-picker"),s.setAttribute("role","dialog")}createColorPicker(t){let e=t.isMultiColor??!1,[i,s,o,a]=vV(t.color??"#f00")??[0,1,.5,1];a=t.opacity??a;const n=(0,Uy.createElement)("div","ag-charts-color-picker__content");n.innerHTML=nnt,n.ariaLabel=this.ctx.localeManager.t("ariaLabelColorPicker");const r=n.querySelector(".ag-charts-color-picker__palette"),l=n.querySelector(".ag-charts-color-picker__hue-input"),c=n.querySelector(".ag-charts-color-picker__multi-color-button"),h=n.querySelector(".ag-charts-color-picker__alpha-input"),u=n.querySelector(".ag-charts-color-picker__color-input"),d=n.querySelector(".ag-charts-color-picker__color-label");c.classList.toggle("ag-charts-color-picker__multi-color-button--hidden",!t.hasMultiColorOption);const p=(y=!0)=>{const S=u2.fromHSB(i,s,o,a).toHexString();if(n.style.setProperty("--h",`${i}`),n.style.setProperty("--s",`${s}`),n.style.setProperty("--v",`${o}`),n.style.setProperty("--a",`${a}`),n.style.setProperty("--color",S.slice(0,7)),n.style.setProperty("--color-a",S),l.value=`${i}`,h.value=`${a}`,h.classList.toggle("ag-charts-color-picker__alpha-input--opaque",a===1),c.classList.toggle("ag-charts-color-picker__multi-color-button--active",e),d.classList.toggle("ag-charts-color-picker__color-label--multi-color",e),document.activeElement!==u&&(u.value=e?"Multi Colour":S.toUpperCase()),y||t.color==null){const M=u2.fromHSB(i,s,o,1).toHexString();t.onChange?.(S,M,a,e)}y&&(this.hasChanged=!0)};p(!1);const g=y=>y.preventDefault(),f=y=>y.stopPropagation(),x=y=>{y.preventDefault();const b=y.currentTarget;b.focus();const S=b.getBoundingClientRect(),M=({clientX:L,clientY:T})=>{e=!1,s=Math.min(Math.max((L-S.left)/S.width,0),1),o=1-Math.min(Math.max((T-S.top)/S.height,0),1),p()},D=()=>{window.removeEventListener("pointermove",M)};M(y),window.addEventListener("pointermove",M),window.addEventListener("pointerup",D,{once:!0})};return n.addEventListener("mousedown",f),n.addEventListener("touchstart",f),n.addEventListener("touchmove",f),n.addEventListener("keydown",y=>{switch(y.stopPropagation(),y.key){case"Enter":case"Escape":this.hide();break;default:return}y.preventDefault()}),r.addEventListener("pointerdown",x),r.addEventListener("touchstart",g,{passive:!1}),r.addEventListener("touchmove",g,{passive:!1}),r.addEventListener("keydown",y=>{if(y.key==="ArrowLeft")s=(0,Uy.clamp)(0,s-.01,1);else if(y.key==="ArrowRight")s=(0,Uy.clamp)(0,s+.01,1);else if(y.key==="ArrowUp")o=(0,Uy.clamp)(0,o+.01,1);else if(y.key==="ArrowDown")o=(0,Uy.clamp)(0,o-.01,1);else return;y.preventDefault(),p()}),c.addEventListener("click",()=>{e=!e,p()}),l.addEventListener("input",y=>{e=!1,i=y.currentTarget.valueAsNumber??0,p()}),h.addEventListener("input",y=>{e=!1,a=y.currentTarget.valueAsNumber??0,p()}),u.addEventListener("input",y=>{e=!1;const b=vV(y.currentTarget.value);b!=null&&([i,s,o,a]=b,p())}),u.addEventListener("blur",()=>p()),u.addEventListener("keydown",y=>{y.key==="Enter"&&(y.currentTarget.blur(),p())}),{element:n,initialFocus:r}}},DV=(E(),C(w));function kV(t){return!(t instanceof DV._ModuleSupport.LogScale)&&!(t instanceof DV._ModuleSupport.BandScale)}var rnt=[{label:"toolbarAnnotationsTrendLine",icon:"trend-line-drawing",value:"line"},{label:"toolbarAnnotationsHorizontalLine",icon:"horizontal-line-drawing",value:"horizontal-line"},{label:"toolbarAnnotationsVerticalLine",icon:"vertical-line-drawing",value:"vertical-line"},{label:"toolbarAnnotationsParallelChannel",icon:"parallel-channel-drawing",value:"parallel-channel",visible:kV},{label:"toolbarAnnotationsDisjointChannel",icon:"disjoint-channel-drawing",value:"disjoint-channel",visible:kV}],lnt=[{label:"toolbarAnnotationsFibonacciRetracement",icon:"fibonacci-retracement-drawing",value:"fibonacci-retracement"},{label:"toolbarAnnotationsFibonacciRetracementTrendBased",icon:"fibonacci-retracement-trend-based-drawing",value:"fibonacci-retracement-trend-based"}],cnt=[{label:"Fibonacci - Extended",value:10},{label:"Fibonacci - 6 Band",value:6},{label:"Fibonacci - 4 Band",value:4}],hnt=[{label:"toolbarAnnotationsText",icon:"text-annotation",value:"text"},{label:"toolbarAnnotationsComment",icon:"comment-annotation",value:"comment"},{label:"toolbarAnnotationsCallout",icon:"callout-annotation",value:"callout"},{label:"toolbarAnnotationsNote",icon:"note-annotation",value:"note"}],unt=[{label:"toolbarAnnotationsArrow",icon:"arrow-drawing",value:"arrow"},{label:"toolbarAnnotationsArrowUp",icon:"arrow-up-drawing",value:"arrow-up"},{label:"toolbarAnnotationsArrowDown",icon:"arrow-down-drawing",value:"arrow-down"}],dnt=[{label:"toolbarAnnotationsQuickDatePriceRange",icon:"measurer-drawing",value:"quick-date-price-range"},{label:"toolbarAnnotationsDateRange",icon:"date-range-drawing",value:"date-range"},{label:"toolbarAnnotationsPriceRange",icon:"price-range-drawing",value:"price-range"},{label:"toolbarAnnotationsDatePriceRange",icon:"date-price-range-drawing",value:"date-price-range"}],AV=[{strokeWidth:1,label:"1",value:1},{strokeWidth:2,label:"2",value:2},{strokeWidth:3,label:"3",value:3},{strokeWidth:4,label:"4",value:4},{strokeWidth:8,label:"8",value:8}],Hy=[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],IV=[{label:"10",value:10},{label:"12",value:12},{label:"14",value:14},{label:"16",value:16},{label:"18",value:18},{label:"22",value:22},{label:"28",value:28},{label:"36",value:36},{label:"46",value:46}],{ARRAY:pnt,BOOLEAN:gnt,NUMBER:fnt,OBJECT:mnt,STRING:ynt,UNION:xnt,Color:TV,FloatingToolbar:bnt,Listeners:Snt,Menu:d2,PropertiesArray:vnt,ToolbarButtonProperties:CV,ToolbarButtonWidget:Mnt,TempValidate:nd}=bV._ModuleSupport,Eg=class extends CV{constructor(){super(...arguments),this.checkedOverrides=new CV}};m([nd(xnt(["line-stroke-width","line-style-type","line-color","fill-color","text-color","text-size","delete","settings","lock"]))],Eg.prototype,"value",2),m([nd(mnt,{optional:!0})],Eg.prototype,"checkedOverrides",2),m([nd(ynt,{optional:!0})],Eg.prototype,"color",2),m([nd(fnt,{optional:!0})],Eg.prototype,"strokeWidth",2),m([nd(Boolean,{optional:!0})],Eg.prototype,"isMultiColor",2);var Dnt=class extends Mnt{update(t){super.update(t),t.value==="line-stroke-width"&&this.updateLineStrokeWidth(t),(t.value==="fill-color"||t.value==="line-color"||t.value==="text-color")&&this.updateFillColor(t)}updateFillColor(t){const e=this.getElement();e.classList.add("ag-charts-annotations__color-picker-button"),e.classList.toggle("ag-charts-annotations__color-picker-button--multi-color",t.isMultiColor),e.style.setProperty("--color",t.color??null)}updateLineStrokeWidth(t){const e=this.getElement();e.classList.add("ag-charts-annotations__stroke-width-button"),e.style.setProperty("--stroke-width",`${t.strokeWidth}px`)}},knt=class extends bnt{createButtonWidget(){return new Dnt(this.localeManager)}},p2=class extends bV._ModuleSupport.BaseProperties{constructor(t,e){super(),this.ctx=t,this.getActiveDatum=e,this.enabled=!0,this.buttons=new vnt(Eg),this.destroyFns=[],this.events=new Snt,this.visibleButtons=[],this.toolbar=new knt(this.ctx,"annotation-options"),this.colorPicker=new MV(this.ctx),this.textSizeMenu=new d2(this.ctx,"text-size"),this.lineStyleTypeMenu=new d2(this.ctx,"annotations-line-style-type"),this.lineStrokeWidthMenu=new d2(this.ctx,"annotations-line-stroke-width"),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("toolbar-moved",this.onToolbarMoved.bind(this)),t.widgets.seriesWidget.addListener("drag-start",this.onDragStart.bind(this)),t.widgets.seriesWidget.addListener("drag-end",this.onDragEnd.bind(this)),()=>this.colorPicker.destroy())}onDragStart(){this.toolbar.ignorePointerEvents()}onDragEnd(){this.toolbar.capturePointerEvents()}destroy(){for(const t of this.destroyFns)t()}addListener(t,e){return this.events.addListener(t,e)}show(){this.enabled&&this.toolbar.show()}hide(){this.toolbar.hide()}updateButtons(t){if(!this.enabled)return;const e={"line-style-type":oh(t),"line-stroke-width":oh(t),"line-color":tnt(t),"text-color":snt(t),"fill-color":int(t),"text-size":h2(t),settings:wg(t),lock:!0,delete:!0};this.visibleButtons=this.buttons.filter(i=>e[i.value]),this.toolbar.clearButtons(),this.toolbar.updateButtons(this.visibleButtons),this.refreshButtons(t)}setAnchorScene(t){this.toolbar.hasBeenDragged()||this.toolbar.setAnchor(t.getAnchor())}hideOverlays(){this.toolbar.clearActiveButton(),this.colorPicker.hide({lastFocus:null}),this.textSizeMenu.hide(),this.lineStyleTypeMenu.hide(),this.lineStrokeWidthMenu.hide(),this.dispatch("hid-overlays")}clearActiveButton(){this.toolbar.clearActiveButton()}updateColors(t){this.updateColorPickerColor("line-color",t.getDefaultColor("line-color"),t.getDefaultOpacity("line-color"),"isMultiColor"in t&&t?.isMultiColor),this.updateColorPickerColor("fill-color",t.getDefaultColor("fill-color"),t.getDefaultOpacity("fill-color"),"isMultiColor"in t&&t?.isMultiColor),this.updateColorPickerColor("text-color",t.getDefaultColor("text-color"),t.getDefaultOpacity("text-color"),"isMultiColor"in t&&t?.isMultiColor)}updateColorPickerColor(t,e,i,s){if(e!=null&&i!=null){const{r:o,g:a,b:n}=TV.fromString(e);e=TV.fromArray([o,a,n,i]).toHexString()}this.updateButtonByValue(t,{color:e,isMultiColor:s})}updateFontSize(t){this.updateButtonByValue("text-size",{label:t!=null?String(t):void 0})}updateLineStyleType(t){this.updateButtonByValue("line-style-type",{icon:t.icon})}updateStrokeWidth(t){this.updateButtonByValue("line-stroke-width",{label:t.label,strokeWidth:t.value})}dispatch(t,e){this.events.dispatch(t,e)}onButtonPress({event:t,button:e}){const i=this.getActiveDatum();if(i)switch(this.hideOverlays(),e.value){case"line-style-type":{const s=oh(i)?jy(i.lineDash,i.lineStyle):void 0;this.lineStyleTypeMenu.show({items:Hy,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStyle"),value:s,sourceEvent:t.sourceEvent,onPress:o=>this.onLineStyleTypeMenuPress(o,i),class:"ag-charts-annotations__line-style-type-menu"});break}case"line-stroke-width":{const s=oh(i)?i.strokeWidth:void 0;this.lineStrokeWidthMenu.show({items:AV,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStrokeWidth"),value:s,sourceEvent:t.sourceEvent,onPress:o=>this.onLineStrokeWidthMenuPress(o,i),class:"ag-charts-annotations__line-stroke-width-menu"});break}case"line-color":case"fill-color":case"text-color":{this.toolbar.toggleActiveButtonByIndex(e.index),this.colorPicker.show({color:i?.getDefaultColor(e.value),opacity:i?.getDefaultOpacity(e.value),sourceEvent:t.sourceEvent,hasMultiColorOption:"isMultiColor"in i,isMultiColor:"isMultiColor"in i&&i?.isMultiColor,onChange:i!=null?this.onColorPickerChange.bind(this,e.value,i):void 0,onChangeHide:(s=>{this.dispatch("saved-color",{type:i.type,colorPickerType:e.value,color:i.getDefaultColor(s)})}).bind(this,e.value)});break}case"text-size":{const s=Vr(i)?i.fontSize:void 0;this.textSizeMenu.show({items:IV,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsTextSize"),value:s,sourceEvent:t.sourceEvent,onPress:o=>this.onTextSizeMenuPress(o,i),class:"ag-charts-annotations__text-size-menu"});break}case"delete":{this.dispatch("pressed-delete");break}case"lock":{i.locked=!i.locked,this.refreshButtons(i),this.dispatch("pressed-lock");break}case"settings":{this.toolbar.toggleActiveButtonByIndex(e.index),this.dispatch("pressed-settings",t);break}}}onToolbarMoved(t){const{buttonBounds:e,popoverBounds:i}=t,s={x:i.x,y:i.y+i.height+4},o={y:i.y-4};this.colorPicker.setAnchor(s,o);for(const[a,n]of e.entries()){const r=this.visibleButtons.at(a);if(!r)continue;const l={x:n.x,y:n.y+n.height-1},c={y:n.y};switch(r.value){case"line-stroke-width":this.lineStrokeWidthMenu.setAnchor(l,c);break;case"line-style-type":this.lineStyleTypeMenu.setAnchor(l,c);break;case"text-size":this.textSizeMenu.setAnchor(l,c);break}}}onColorPickerChange(t,e,i,s,o,a){this.dispatch("updated-color",{type:e.type,colorPickerType:t,colorOpacity:i,color:s,opacity:o,isMultiColor:a}),this.updateColorPickerColor(t,i,o,a)}onTextSizeMenuPress(t,e){if(!h2(e))return;const i=t.value;this.dispatch("updated-font-size",{type:e.type,fontSize:i}),this.textSizeMenu.hide(),this.updateFontSize(i)}onLineStyleTypeMenuPress(t,e){if(!oh(e))return;const i=t.value;this.dispatch("updated-line-style",{type:e.type,lineStyleType:i}),this.lineStyleTypeMenu.hide(),this.updateLineStyleType(t)}onLineStrokeWidthMenuPress(t,e){if(!oh(e))return;const i=t.value;this.dispatch("updated-line-width",{type:e.type,strokeWidth:i}),this.lineStrokeWidthMenu.hide(),this.updateStrokeWidth(t)}refreshButtons(t){const e=t.locked??!1;for(const[i,s]of this.visibleButtons.entries())s&&(s.value==="lock"?(this.toolbar.toggleSwitchCheckedByIndex(i,e),this.updateButtonByIndex(i,e?s.checkedOverrides.toJson():s.toJson())):this.toolbar.toggleButtonEnabledByIndex(i,!e));h2(t)&&this.updateFontSize(t.fontSize),this.updateColors(t),this.updateLineStyles(t)}updateLineStyles(t){if(!oh(t))return;const e=t.strokeWidth??1,i=jy(t.lineDash,t.lineStyle);this.updateStrokeWidth({strokeWidth:e,value:e,label:String(e)}),this.updateLineStyleType(Hy.find(s=>s.value===i)??Hy[0])}updateButtonByValue(t,e){const i=this.visibleButtons.findIndex(s=>s.value===t);i!==-1&&this.updateButtonByIndex(i,e)}updateButtonByIndex(t,e){const i=this.visibleButtons.at(t);i&&this.toolbar.updateButtonByIndex(t,{...i.toJson(),...e,value:e.value??i.value})}};m([nd(gnt)],p2.prototype,"enabled",2),m([nd(pnt)],p2.prototype,"buttons",2);var Ant=(E(),C(w)),{StateMachine:LV,StateMachineProperty:g2,Vec2:NV,Debug:Int}=Ant._ModuleSupport,_i=class extends LV{constructor(t){const e=({context:i})=>{this.node?.drag(this.datum,this.offset,i,this.snapping),t.update()};super("idle",{idle:{dragStart:{target:"dragging",action:({offset:i,context:s})=>{this.hasMoved=!1,this.dragStart=i,this.offset=i,this.node?.dragStart(this.datum,i,s)}}},dragging:{keyDown:e,keyUp:e,drag:({offset:i,context:s})=>{this.hasMoved=NV.lengthSquared(NV.sub(i,this.dragStart))>0,this.offset=i,this.node?.drag(this.datum,i,s,this.snapping),t.update()},dragEnd:{target:LV.parent,action:()=>{this.node?.stopDragging(),this.hasMoved&&t.recordAction("Move annotation"),t.update()}}}}),this.debug=Int.create(!0,"annotations"),this.hasMoved=!1,this.snapping=!1}};m([g2()],_i.prototype,"snapping",2),m([g2()],_i.prototype,"datum",2),m([g2()],_i.prototype,"node",2);var Tnt=(E(),C(w)),Cnt=(P(),C(et)),{STRING:Lnt,TempValidate:Nnt}=Tnt._ModuleSupport,ah=class extends a2{constructor(){super(...arguments),this.type="arrow-down"}static is(t){return(0,Cnt.isObject)(t)&&t.type==="arrow-down"}};m([Nnt(Lnt)],ah.prototype,"type",2);var OV=(E(),C(w)),wV=(E(),C(w)),QM=(E(),C(w)),Ont=(P(),C(et)),rd=(E(),C(w)),EV=class u6 extends rd._ModuleSupport.Group{constructor(){super(...arguments),this.active=!1,this.locked=!1,this.visible=!1,this.zIndex=1}drag(e){const{handle:i,locked:s}=this;return s?{point:{x:i.x,y:i.y},offset:{x:0,y:0}}:{point:e,offset:{x:e.x-i.x,y:e.y-i.y}}}toggleActive(e){this.active=e,e||(this.handle.strokeWidth=u6.INACTIVE_STROKE_WIDTH)}toggleHovered(e){this.glow.visible=!this.locked&&e,this.glow.dirtyPath=!0}toggleDragging(e){this.locked||(this.handle.visible=!e,this.glow.visible=this.glow.visible&&!e,this.handle.dirtyPath=!0,this.glow.dirtyPath=!0)}toggleLocked(e){this.locked=e}getCursor(){}containsPoint(e,i){return this.handle.containsPoint(e,i)}};EV.INACTIVE_STROKE_WIDTH=2;var nh=EV,f2=class d6 extends nh{constructor(){super(),this.handle=new rd._ModuleSupport.Marker({shape:"circle"}),this.glow=new rd._ModuleSupport.Marker({shape:"circle"}),this.append([this.handle]),this.handle.size=d6.HANDLE_SIZE,this.handle.strokeWidth=nh.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2}update(e){this.handle.setProperties({...e,strokeWidth:nh.INACTIVE_STROKE_WIDTH})}drag(e){return{point:e,offset:{x:0,y:0}}}};f2.HANDLE_SIZE=7,f2.GLOW_SIZE=9;var rh=f2,JM=class aa extends nh{constructor(){super(),this.handle=new rd._ModuleSupport.Rect,this.glow=new rd._ModuleSupport.Rect,this.gradient="horizontal",this.append([this.glow,this.handle]),this.handle.cornerRadius=aa.CORNER_RADIUS,this.handle.width=aa.HANDLE_SIZE,this.handle.height=aa.HANDLE_SIZE,this.handle.strokeWidth=nh.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.cornerRadius=aa.CORNER_RADIUS,this.glow.width=aa.GLOW_SIZE,this.glow.height=aa.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(e){if(super.toggleLocked(e),e){const i=(aa.HANDLE_SIZE-rh.HANDLE_SIZE)/2;this.handle.cornerRadius=1,this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.x+=i,this.handle.y+=i,this.handle.width=rh.HANDLE_SIZE,this.handle.height=rh.HANDLE_SIZE,this.glow.width=rh.GLOW_SIZE,this.glow.height=rh.GLOW_SIZE}else this.handle.cornerRadius=aa.CORNER_RADIUS,this.handle.width=aa.HANDLE_SIZE,this.handle.height=aa.HANDLE_SIZE,this.glow.width=aa.GLOW_SIZE,this.glow.height=aa.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles)}update(e){if(this.cachedStyles={...e},this.active||delete e.strokeWidth,this.locked){delete e.fill,delete e.strokeWidth;const i=(aa.HANDLE_SIZE-rh.HANDLE_SIZE)/2;e.x-=i,e.y-=i,this.cachedStyles.x-=i,this.cachedStyles.y-=i}this.handle.setProperties(e),this.glow.setProperties({...e,x:(e.x??this.glow.x)-2,y:(e.y??this.glow.y)-2,strokeWidth:0,fill:e.stroke})}drag(e){return this.locked?{point:e,offset:{x:0,y:0}}:this.gradient==="vertical"?{point:{x:e.x,y:this.handle.y},offset:{x:e.x-this.handle.x,y:0}}:{point:{x:this.handle.x,y:e.y},offset:{x:0,y:e.y-this.handle.y}}}getCursor(){if(!this.locked)return this.gradient==="vertical"?"col-resize":"row-resize"}};JM.HANDLE_SIZE=12,JM.GLOW_SIZE=16,JM.CORNER_RADIUS=4;var _g=JM,m2=class ab extends nh{constructor(){super(),this.handle=new rd._ModuleSupport.Marker({shape:"circle"}),this.glow=new rd._ModuleSupport.Marker({shape:"circle"}),this.append([this.glow,this.handle]),this.handle.size=ab.HANDLE_SIZE,this.handle.strokeWidth=nh.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.size=ab.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(e){super.toggleLocked(e),e?(this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.size=rh.HANDLE_SIZE,this.glow.size=rh.GLOW_SIZE):(this.handle.size=ab.HANDLE_SIZE,this.glow.size=ab.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles))}update(e){this.cachedStyles={...e},this.active||delete e.strokeWidth,this.locked&&(delete e.fill,delete e.strokeWidth),this.handle.setProperties(e),this.glow.setProperties({...e,strokeWidth:0,fill:e.stroke})}getCursor(){return"pointer"}};m2.HANDLE_SIZE=11,m2.GLOW_SIZE=17;var fi=m2,{ZIndexMap:wnt}=QM._ModuleSupport,Ts=class extends QM._ModuleSupport.Group{constructor(){super(...arguments),this.name="AnnotationScene",this.zIndex=wnt.CHART_ANNOTATION}static isCheck(t,e){return(0,Ont.isObject)(t)&&Object.hasOwn(t,"type")&&t.type===e}toggleHovered(t){this.toggleHandles(t)}*nonHandleChildren(){for(const t of this.children())t instanceof nh||(yield t)}computeBBoxWithoutHandles(){return QM._ModuleSupport.Transformable.toCanvas(this,QM._ModuleSupport.Group.computeChildrenBBox(this.nonHandleChildren()))}updateNode(t,e,i){if(!i&&e){this.removeChild(e);return}return i&&e==null&&(e=new t,this.appendChild(e)),e}},Ent=(E(),C(w)),_nt=(E(),C(w)),Rnt=(P(),C(et)),{ContinuousScale:Pnt,Vec2:cn,toRadians:Bnt}=_nt._ModuleSupport;function Yy(t,e,i=!1,s,o=1){if(!i)return Co(t,e);const a=s?gi(s,e):cn.origin();return Co(t0(t,a,o),e)}function t0(t,e,i){const s=cn.sub(t,e),o=Bnt(i),a=Math.round(cn.angle(s)/o)*o;return cn.rotate(s,a,e)}function e0(t,e){const i={};for(const[s,o]of(0,Rnt.entries)(t))i[s]=gi(o,e);return i}function Zl(t,e,i,s={overflowContinuous:0,translateVectors:void 0,invertYVectors:void 0,snap:void 0}){const{xAxis:o,yAxis:a}=i,n=Object.keys(t),r=[],l=[],c=new Set(s.translateVectors??n),h=new Set(s.invertYVectors??[]),u=new Set([...c,...h]),d=cn.multiply(e,cn.from(1,-1));for(const y of n)u.has(y)&&(t[y]=cn.add(t[y],h.has(y)?d:e),s.snap&&(t[y]=t0(t[y],s.snap.vectors[y],s.snap.angle))),r.push(o.getRangeOverflow(t[y].x)),l.push(a.getRangeOverflow(t[y].y));const p=(y,b)=>Math.abs(y)-Math.abs(b),g=(y,b,S)=>s.overflowContinuous===0||!Pnt.is(y)?S.toSorted(p).at(-1)??0:n.length===u.size?S.toSorted(p).at(-s.overflowContinuous-1)??0:S.filter(D=>D!==0).length<=s.overflowContinuous?0:S.filter((D,L)=>D!==0&&Math.abs(D)<=Math.abs(b)&&u.has(n[L])).toSorted(p).at(-1)??0,f=cn.from(g(o.scale,e.x,r),g(a.scale,e.y,l));if(!cn.equal(f,cn.origin()))for(const y of n)u.has(y)&&(t[y]=cn.round(cn.sub(t[y],f),4));const x={};for(const y of n)x[y]=Co(t[y],i);return x}var{Vec2:znt}=Ent._ModuleSupport,_V=class extends Ts{constructor(){super(...arguments),this.handle=new fi,this.anchor={x:0,y:0,position:"above"}}update(t,e){const i=gi(t,e);this.updateHandle(t,i),this.anchor=this.updateAnchor(t,i,e)}dragStart(t,e,i){this.dragState={offset:e,...e0({handle:t},i)}}drag(t,e,i){const{dragState:s}=this;if(t.locked||!s)return;const{point:o}=Zl({point:s.handle},znt.sub(e,s.offset),i);t.x=o.x,t.y=o.y}translate(t,e,i){if(t.locked)return;const{point:s}=Zl({point:gi(t,i)},e,i);t.x=s.x,t.y=s.y}toggleHandles(t){this.handle.visible=!!t,this.handle.toggleHovered(this.activeHandle==="handle")}toggleActive(t){this.toggleHandles(t),this.handle.toggleActive(t)}stopDragging(){this.handle.toggleDragging(!1)}copy(t,e,i){const s=gi(t,i),o=Co({x:s.x-30,y:s.y-30},i);return e.x=o.x,e.y=o.y,e}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(t,e){const{handle:i}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="handle",!0):!1}getNodeAtCoords(t,e){if(this.handle.containsPoint(t,e))return"handle"}updateHandle(t,e,i){const{x:s,y:o}=this.getHandleCoords(t,e,i),a=this.getHandleStyles(t);this.handle.update({...a,x:s,y:o}),this.handle.toggleLocked(t.locked??!1)}updateAnchor(t,e,i){const s=this.getHandleCoords(t,e);return{x:s.x+i.seriesRect.x,y:s.y+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(t,e,i){return{x:e.x,y:e.y}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}},RV=class extends _V{constructor(){super(),this.append([this.handle])}update(t,e){super.update(t,e);const i=gi(t,e);this.updateShape(t,i)}updateShape(t,e){this.updateShapeStyles(t),this.updateShapePath(t,e)}updateShapeStyles(t){const{shape:e}=this;e.fill=t.fill,e.fillOpacity=t.fillOpacity??1}updateShapePath(t,e){const{shape:i}=this;i.x=e.x,i.y=e.y,i.size=t.size}containsPoint(t,e){return super.containsPoint(t,e)||this.shape.containsPoint(t,e)}getNodeAtCoords(t,e){return this.shape.containsPoint(t,e)?"shape":super.getNodeAtCoords(t,e)}},PV=[[.5,0],[1,.5],[.75,.5],[.75,1],[.25,1],[.25,.5],[0,.5]];function BV(t){wV._ModuleSupport.drawMarkerUnitPolygon(t,PV)}BV.anchor={x:.5,y:0};var i0=class extends RV{constructor(){super(),this.type="arrow-up",this.shape=new wV._ModuleSupport.Marker({shape:BV}),this.append([this.shape])}static is(t){return Ts.isCheck(t,"arrow-up")}getHandleCoords(t,e){const i=fi.HANDLE_SIZE/2,s=super.getHandleCoords(t,e);return s.y-=i,s}},Fnt=PV.map(([t,e])=>[t,1-e]);function zV(t){OV._ModuleSupport.drawMarkerUnitPolygon(t,Fnt)}zV.anchor={x:.5,y:1};var s0=class extends RV{constructor(){super(),this.type="arrow-down",this.shape=new OV._ModuleSupport.Marker({shape:zV}),this.append([this.shape])}static is(t){return Ts.isCheck(t,"arrow-down")}updateAnchor(t,e,i){const s=super.updateAnchor(t,e,i);return s.y-=t.size,s}getHandleCoords(t,e){const i=fi.HANDLE_SIZE/2,s=super.getHandleCoords(t,e);return s.y+=i,s}},Gnt=(E(),C(w)),{StateMachine:o0,StateMachineProperty:jnt,Debug:Vnt}=Gnt._ModuleSupport,y2=class extends o0{constructor(t){const e=({point:s})=>{const o=this.createDatum();o.set({x:s.x,y:s.y}),t.create(o)},i=()=>{this.node?.toggleActive(!0),t.showAnnotationOptions(),t.update()};super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},cancel:o0.parent,reset:o0.parent},"waiting-first-render":{render:{target:o0.parent,action:i}}}),this.debug=Vnt.create(!0,"annotations")}};m([jnt()],y2.prototype,"node",2);var Wnt=class extends y2{createDatum(){return new ah}},FV={type:"arrow-down",datum:ah,scene:s0,isDatum:ah.is,translate:(t,e,i,s)=>{ah.is(e)&&s0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(ah.is(e)&&ah.is(i)&&s0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{ah.is(e)&&s0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Wnt({...t,create:e("arrow-down")}),dragState:t=>new _i(t)},Unt=(E(),C(w)),Hnt=(P(),C(et)),{STRING:Ynt,TempValidate:Knt}=Unt._ModuleSupport,lh=class extends a2{constructor(){super(...arguments),this.type="arrow-up"}static is(t){return(0,Hnt.isObject)(t)&&t.type==="arrow-up"}};m([Knt(Ynt)],lh.prototype,"type",2);var $nt=class extends y2{createDatum(){return new lh}},GV={type:"arrow-up",datum:lh,scene:i0,isDatum:lh.is,translate:(t,e,i,s)=>{lh.is(e)&&i0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(lh.is(e)&&lh.is(i)&&i0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{lh.is(e)&&i0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new $nt({...t,create:e("arrow-up")}),dragState:t=>new _i(t)},Xnt=(E(),C(w)),jV=(E(),C(w)),Znt=(E(),C(w)),qnt=(P(),C(et)),Qnt=(E(),C(w)),{Vec2:Jnt,Vec4:VV}=Qnt._ModuleSupport,WV=class extends Ts{constructor(){super(...arguments),this.overflowContinuous=0}extendLine({x1:t,y1:e,x2:i,y2:s},o,a){const n={x1:t,y1:e,x2:i,y2:s};if(!o.extendStart&&!o.extendEnd)return n;const[r,l]=sat(n,a.yAxis.bounds),c=n.x2<n.x1,h=n.y1>=n.y2,u=n.x2===n.x1;return o.extendEnd&&(u?n.y2=h?l.y:r.y:(n.x2=c?r.x:l.x,n.y2=c?r.y:l.y)),o.extendStart&&(u?n.y1=h?r.y:l.y:(n.x1=c?l.x:r.x,n.y1=c?l.y:r.y)),n}dragStart(t,e,i){this.dragState={offset:e,...e0({start:t.start,end:t.end},i)}}drag(t,e,i,s){t.locked||(this.activeHandle?this.dragHandle(t,e,i,s):this.dragAll(t,e,i))}dragAll(t,e,i){const{dragState:s}=this;s&&this.translatePoints(t,s.start,s.end,Jnt.sub(e,s.offset),i)}translate(t,e,i){t.locked||this.translatePoints(t,gi(t.start,i),gi(t.end,i),e,i)}copy(t,e,i){const s=To(t,i);if(!s)return;const o=this.computeBBoxWithoutHandles(),a={x:-o.width/2,y:-o.height/2};return this.translatePoints(e,VV.start(s),VV.end(s),a,i),e}translatePoints(t,e,i,s,o){const a=this.getTranslatePointsVectors(e,i),n=Zl(a,s,o,{overflowContinuous:this.overflowContinuous});t.start.x=n.start.x,t.end.x=n.end.x,t.start.y=n.start.y,t.end.y=n.end.y}getTranslatePointsVectors(t,e){return{start:t,end:e}}},{Vec2:trt,Vec4:UV}=Znt._ModuleSupport,x2=class extends WV{constructor(){super(...arguments),this.start=new fi,this.end=new fi,this.anchor={x:0,y:0,position:"above"}}update(t,e){const i=To(t,e);i!=null&&(this.updateHandles(t,i),this.updateAnchor(t,i,e))}toggleHandles(t){if(typeof t=="boolean")this.start.visible=t,this.end.visible=t;else for(const[e,i]of(0,qnt.entries)(t))this[e].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end")}toggleActive(t){this.toggleHandles(t),this.start.toggleActive(t),this.end.toggleActive(t)}dragHandle(t,e,i,s){const{activeHandle:o,dragState:a}=this;if(!o||!a)return;this[o].toggleDragging(!0);const n=o==="start"?"end":"start",r=s?{vectors:{[o]:gi(t[n],i)},angle:t.snapToAngle}:void 0,{[o]:l}=Zl({[o]:a[o]},trt.sub(e,a.offset),i,{overflowContinuous:0,snap:r});t[o].x=l.x,t[o].y=l.y}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(t,e){const{start:i,end:s}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):s.containsPoint(t,e)?(this.activeHandle="end",!0):!1}getNodeAtCoords(t,e){if(this.start.containsPoint(t,e)||this.end.containsPoint(t,e))return"handle"}updateHandles(t,e,i){this.start.update({...this.getHandleStyles(t,"start"),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t,"end"),...this.getHandleCoords(t,e,"end",i)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1)}updateAnchor(t,e,i,s){this.anchor={x:e.x1+i.seriesRect.x,y:e.y1+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(t,e,i,s){return i==="start"?UV.start(e):UV.end(e)}getHandleStyles(t,e){return{fill:t.handle.fill,stroke:t.handle.stroke,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}},{Vec4:HV}=jV._ModuleSupport,ert=class extends x2{constructor(){super(...arguments),this.label=new jV._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(t){this.textInputBBox=t,this.markDirty("TextualStartEndScene")}update(t,e){const i=To(t,e);if(i==null)return;const s=this.getTextBBox(t,i);this.updateLabel(t,s,i),this.updateHandles(t,i,s),this.updateShape(t,s,i),this.updateAnchor(t,i,e,s)}containsPoint(t,e){return super.containsPoint(t,e)||this.label.containsPoint(t,e)}getNodeAtCoords(t,e){return this.label.containsPoint(t,e)?"text":super.getNodeAtCoords(t,e)}getTextBBox(t,e){const{text:i}=t.getText();return o2(t,i,HV.end(e),this.textInputBBox)}updateLabel(t,e,i){const{text:s,isPlaceholder:o}=t.getText();Jj(this.label,s,o,t,this.getLabelCoords(t,e,i))}updateShape(t,e,i){}getLabelCoords(t,e,i){return HV.end(i)}getHandleStyles(t,e){return{...super.getHandleStyles(t,e),stroke:t.handle.stroke??t.color}}},{drawCorner:irt,Path:srt}=Xnt._ModuleSupport,a0=class extends ert{constructor(){super(),this.type="callout",this.shape=new srt,this.append([this.shape,this.label,this.start,this.end])}static is(t){return Ts.isCheck(t,"callout")}drag(t,e,i,s){t.locked||(this.activeHandle==="end"?this.dragHandle(t,e,i,s):this.dragAll(t,e,i))}getLabelCoords(t,e,i){const s=t.getPadding(),{bodyBounds:o={x:0,y:0,width:0,height:0}}=this.getDimensions(t,e,i)??{};return{x:o.x+s.left,y:o.y-s.bottom}}getHandleStyles(t,e){return e==="start"?{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}:{fill:void 0,strokeWidth:0}}updateAnchor(t,e,i,s){const{bodyBounds:o}=this.getDimensions(t,s,e)??{},a=o??s;this.anchor={x:a.x+i.seriesRect.x,y:a.y+i.seriesRect.y-a.height,position:this.anchor.position}}updateShape(t,e,i){const{shape:s}=this;s.fill=t.fill,s.fillOpacity=t.fillOpacity??1,s.stroke=t.stroke,s.strokeWidth=t.strokeWidth??1,s.strokeOpacity=t.strokeOpacity??1;const{tailPoint:o,bodyBounds:a}=this.getDimensions(t,e,i)??{};!o||!a||this.updatePath(o,a)}updatePath(t,e){const{x:i,y:s}=t,{x:o,y:a,width:n,height:r}=e,l=a-r,c=o+n,h=this.calculateCalloutPlacement({x:i,y:s},e),u=8,d=[{coordinates:{x0:o,x1:o+u,y0:l+u,y1:l,cx:h==="topLeft"?i:o+u,cy:h==="topLeft"?s:l+u},type:h==="topLeft"?"calloutCorner":"corner"},{coordinates:{x0:o+u,x1:c-u,y0:l,y1:l,cx:i,cy:s},type:h==="top"?"calloutSide":"side"},{coordinates:{x0:c-u,x1:c,y0:l,y1:l+u,cx:h==="topRight"?i:c-u,cy:h==="topRight"?s:l+u},type:h==="topRight"?"calloutCorner":"corner"},{coordinates:{x0:c,x1:c,y0:l+u,y1:a-u,cx:i,cy:s},type:h==="right"?"calloutSide":"side"},{coordinates:{x0:c,x1:c-u,y0:a-u,y1:a,cx:h==="bottomRight"?i:c-u,cy:h==="bottomRight"?s:a-u},type:h==="bottomRight"?"calloutCorner":"corner"},{coordinates:{x0:c-u,x1:o+u,y0:a,y1:a,cx:i,cy:s},type:h==="bottom"?"calloutSide":"side"},{coordinates:{x0:o+u,x1:o,y0:a,y1:a-u,cx:h==="bottomLeft"?i:o+u,cy:h==="bottomLeft"?s:a-u},type:h==="bottomLeft"?"calloutCorner":"corner"},{coordinates:{x0:o,x1:o,y0:a-u,y1:l+u,cx:i,cy:s},type:h==="left"?"calloutSide":"side"}],{path:p}=this.shape;p.clear(),p.moveTo(o,l+u),d.forEach(({coordinates:g,type:f})=>{this.drawPath(p,g,u,f)}),p.closePath()}drawPath(t,{x0:e,y0:i,x1:s,y1:o,cx:a,cy:n},r,l){switch(l){case"calloutCorner":{t.lineTo(a,n),t.lineTo(s,o);break}case"corner":{irt(t,{x0:e,x1:s,y0:i,y1:o,cx:a,cy:n},r,!1);break}case"calloutSide":{if(e!==s){const h=e>s?-1:1,u=Math.min(e,s)+Math.abs(s-e)/2;t.lineTo(u-6*h,i),t.lineTo(a,n),t.lineTo(u+6*h,i),t.lineTo(s,o)}else{const h=i>o?-1:1,u=Math.min(i,o)+Math.abs(i-o)/2;t.lineTo(e,u-6*h),t.lineTo(a,n),t.lineTo(e,u+6*h),t.lineTo(s,o)}break}case"side":default:{t.lineTo(s,o);break}}}calculateCalloutPlacement(t,e){const i=e.x+e.width,s=e.y-e.height;let o,a;return t.x>i?o="right":t.x<e.x&&(o="left"),t.y>e.y?a="bottom":t.y<s&&(a="top"),o&&a?`${a}${o[0].toUpperCase()}${o.substring(1)}`:a??o}getDimensions(t,e,i){const{fontSize:s}=t,o=t.getPadding(),a=o.left+o.right,n=o.top+o.bottom,r=e.width+a,l=Math.max(e.height+n,s+n);return{tailPoint:{x:i.x1,y:i.y1},bodyBounds:{x:e.x,y:e.y,width:r,height:l}}}containsPoint(t,e){const{start:i,end:s,shape:o}=this;if(this.activeHandle=void 0,i.containsPoint(t,e))return this.activeHandle="start",!0;const a=s.containsPoint(t,e)||o.containsPoint(t,e);return a&&(this.activeHandle="end"),a}},ort=(E(),C(w));function b2({key:t}){return t==="Escape"}function S2({key:t,shiftKey:e}){return!e&&t==="Enter"}var{StateMachine:Kn,StateMachineProperty:YV,Debug:art}=ort._ModuleSupport,v2=class extends Kn{constructor(t){const e=({point:d})=>{const p=this.createDatum();p.set({start:d,end:d,visible:!0}),t.create(p)},i=()=>{const{node:d}=this;d?.toggleActive(!0),d?.toggleHandles({start:!0})},s=()=>{t.showTextInput(),this.datum&&(this.datum.visible=!1)},o=()=>{t.hideTextInput(),this.datum&&(this.datum.visible=!0),t.deselect()},a=d=>{this.node?.setTextInputBBox(d),t.update()},n=({point:d})=>{const{datum:p,node:g}=this;p?.set({end:d}),g?.toggleActive(!0),g?.toggleHandles({end:!1}),t.update()},r=()=>{t.showAnnotationOptions(),this.node?.toggleHandles({end:!0})},l=({colorPickerType:d,colorOpacity:p,color:g,opacity:f,isMultiColor:x})=>{const{datum:y}=this;y&&(d==="text-color"&&t.updateTextInputColor(g),qM(y,d,p,g,f,x),t.update())},c=d=>{const{datum:p,node:g}=this;!p||!g||!Vr(p)||(p.fontSize=d,t.updateTextInputFontSize(d),t.update())},h=()=>{t.delete()},u=({textInputValue:d,bbox:p})=>{const{datum:g}=this;if(p!=null&&d!=null&&d.length>0){if(!Vr(g))return;const f=HM(g,d,p.width);g?.set({text:f}),t.update(),t.recordAction(`Create ${g?.type} annotation`)}else t.delete()};super("start",{start:{click:{target:"waiting-first-render",action:e},dragStart:{target:"waiting-first-render",action:e},cancel:Kn.parent,reset:Kn.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:n,drag:n,click:{target:"edit",action:r},dragEnd:{target:"edit",action:r},reset:{target:Kn.parent,action:h},cancel:{target:Kn.parent,action:h}},edit:{onEnter:s,updateTextInputBBox:a,color:l,fontSize:c,textInput:[{guard:b2,target:Kn.parent,action:h},{guard:S2,target:Kn.parent,action:u}],click:{target:Kn.parent,action:u},dragStart:{target:Kn.parent,action:u},resize:{target:Kn.parent,action:u},onExit:o,cancel:{target:Kn.parent,action:h}}}),this.debug=art.create(!0,"annotations")}};m([YV()],v2.prototype,"datum",2),m([YV()],v2.prototype,"node",2);var nrt=class extends v2{createDatum(){return new Yn}},KV={type:"callout",datum:Yn,scene:a0,isDatum:Yn.is,translate:(t,e,i,s)=>{if(Yn.is(e)&&a0.is(t))return t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Yn.is(e)&&Yn.is(i)&&a0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Yn.is(e)&&a0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new nrt({...t,create:e("callout")}),dragState:t=>new _i(t)},$V=(E(),C(w)),rrt=(E(),C(w)),M2=class extends _V{constructor(){super(...arguments),this.label=new rrt._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(t){this.textInputBBox=t,this.markDirty("TextualPointScene")}update(t,e){const i=gi(t,e),s=this.getTextBBox(t,i,e);this.updateLabel(t,s),this.updateHandle(t,i,s),this.updateShape(t,s),this.anchor=this.updateAnchor(t,s,e)}copy(t,e,i){const s=gi(t,i),o=this.getTextBBox(t,s,i),a=t.getPadding(),n=a.left+a.right,r=a.top+a.bottom,l=(o.width+n)/2,c=o.height+r,h=Co({x:s.x-l,y:s.y-c},i);return e.x=h.x,e.y=h.y,e}containsPoint(t,e){const{label:i}=this;return super.containsPoint(t,e)||i.visible&&i.containsPoint(t,e)}getNodeAtCoords(t,e){return this.label.visible&&this.label.containsPoint(t,e)?"text":super.getNodeAtCoords(t,e)}getTextBBox(t,e,i){const{text:s}=t.getText();return o2(t,s,{x:e.x,y:e.y},this.textInputBBox)}updateLabel(t,e){const{text:i,isPlaceholder:s}=t.getText();Jj(this.label,i,s,t,this.getLabelCoords(t,e),this.getTextBaseline(t))}updateShape(t,e){}updateAnchor(t,e,i){return{x:e.x+i.seriesRect.x,y:e.y+i.seriesRect.y-e.height,position:this.anchor.position}}getLabelCoords(t,e){return e}getTextBaseline(t){return t.position=="center"?"middle":t.position}getHandleCoords(t,e,i){return i}getHandleStyles(t){const e=super.getHandleStyles(t);return e.stroke=t.handle.stroke??t.color,e}},{drawCorner:D2}=$V._ModuleSupport,n0=class extends M2{constructor(){super(),this.type="comment",this.shape=new $V._ModuleSupport.Path,this.append([this.shape,this.label,this.handle])}static is(t){return Ts.isCheck(t,"comment")}updateShape(t,e){const{shape:i}=this;i.fill=t.fill,i.fillOpacity=t.fillOpacity??1,i.stroke=t.stroke??"transparent",i.strokeWidth=t.strokeWidth??1,i.strokeOpacity=t.strokeOpacity??1,this.updatePath(t,e)}getLabelCoords(t,e){const i=t.getPadding();return{x:e.x+i.left,y:e.y-i.bottom}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke??t.fill,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}updateAnchor(t,e,i){const s=super.updateAnchor(t,e,i),o=t.getPadding();return s.y-=o.bottom+o.top,s}updatePath(t,e){const i=t.getPadding(),{x:s,y:o}=e;let{width:a,height:n}=e;const{fontSize:r}=t,l=i.left+i.right,c=i.top+i.bottom;a=a+l,n=Math.max(n+c,r+c);const h=o-n,u=s+a,d=(r*Vy+c)/2,{path:p}=this.shape;p.clear(),p.moveTo(s,o),p.lineTo(s,h+d),D2(p,{x0:s,x1:s+d,y0:h+d,y1:h,cx:s+d,cy:h+d},d,!1),p.lineTo(u-d,h),D2(p,{x0:u-d,x1:u,y0:h,y1:h+d,cx:u-d,cy:h+d},d,!1),p.lineTo(u,o-d),D2(p,{x0:u,x1:u-d,y0:o-d,y1:o,cx:u-d,cy:o-d},d,!1),p.closePath()}containsPoint(t,e){return super.containsPoint(t,e)||this.shape.containsPoint(t,e)}},lrt=(E(),C(w)),{StateMachine:ql,StateMachineProperty:XV,Debug:crt}=lrt._ModuleSupport,Ky=class extends ql{constructor(t){const e=({point:h})=>{const u=this.createDatum();u.set({x:h.x,y:h.y}),t.create(u)},i=()=>{this.node?.toggleActive(!0),t.showAnnotationOptions(),t.update()},s=()=>{t.showTextInput(),this.datum&&(this.datum.visible=!1)},o=()=>{t.hideTextInput(),this.datum&&(this.datum.visible=!0),t.deselect()},a=h=>{this.node?.setTextInputBBox(h),t.update()},n=({colorPickerType:h,colorOpacity:u,color:d,opacity:p,isMultiColor:g})=>{this.datum&&(h==="text-color"&&t.updateTextInputColor(d),qM(this.datum,h,u,d,p,g),t.update())},r=h=>{const{datum:u,node:d}=this;!u||!d||!Vr(u)||(u.fontSize=h,t.updateTextInputFontSize(h),t.update())},l=()=>{t.delete()},c=({textInputValue:h,bbox:u})=>{if(u!=null&&h!=null&&h.length>0){const{datum:d}=this;if(!Vr(d))return;const p=HM(d,h,u.width);d?.set({text:p}),t.update(),t.recordAction(`Create ${d?.type} annotation`)}else t.delete()};super("start",{start:{click:{target:"waiting-first-render",action:e},dragStart:{target:"waiting-first-render",action:e},cancel:ql.parent,reset:ql.parent},"waiting-first-render":{render:{target:"edit",action:i}},edit:{onEnter:s,updateTextInputBBox:a,color:n,fontSize:r,textInput:[{guard:b2,target:ql.parent,action:l},{guard:S2,target:ql.parent,action:c}],click:{target:ql.parent,action:c},dragStart:{target:ql.parent,action:c},resize:{target:ql.parent,action:c},onExit:o,cancel:{target:ql.parent,action:l}}}),this.debug=crt.create(!0,"annotations")}};m([XV()],Ky.prototype,"datum",2),m([XV()],Ky.prototype,"node",2);var hrt=class extends Ky{createDatum(){return new Fr}},ZV={type:"comment",datum:Fr,scene:n0,isDatum:Fr.is,translate:(t,e,i,s)=>{Fr.is(e)&&n0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Fr.is(e)&&Fr.is(i)&&n0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Fr.is(e)&&n0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new hrt({...t,create:e("comment")}),dragState:t=>new _i(t)},urt=(E(),C(w)),r0=(E(),C(w)),{calculateLabelTranslation:drt,ChartAxisDirection:prt}=r0._ModuleSupport,qV=class extends r0._ModuleSupport.Group{constructor(){super({name:"AnnotationAxisLabelGroup"}),this.label=new r0._ModuleSupport.Text({zIndex:1}),this.rect=new r0._ModuleSupport.Rect;const{label:t}=this;t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.fill="black",t.textBaseline="middle",t.textAlign="center",this.append([this.rect,this.label])}update(t){this.updateLabel(t),this.updateRect(t),this.updatePosition(t)}updateLabel({value:t,styles:e,context:i}){const{fontWeight:s,fontSize:o,fontStyle:a,fontFamily:n,textAlign:r,color:l="white",formatter:c}=e,h=c?c({value:t}):i.scaleValueFormatter()(t);this.label.setProperties({fontWeight:s,fontSize:o,fontStyle:a,fontFamily:n,textAlign:r,fill:l,text:h})}updateRect({styles:t}){const{rect:e}=this,{cornerRadius:i,fill:s,fillOpacity:o,stroke:a,strokeOpacity:n}=t;e.setProperties({cornerRadius:i,fill:s,fillOpacity:o,stroke:a,strokeOpacity:n})}updatePosition({x:t,y:e,context:i,styles:{padding:s}}){const{label:o,rect:a}=this,n=o.getBBox()?.clone(),r=s??8,l=s??5;n.grow(r,"horizontal"),n.grow(l,"vertical");const c=i.direction===prt.X?Math.round(l/2):r,{xTranslation:h,yTranslation:u}=drt({yDirection:!0,padding:i.labelPadding-c,position:i.position??"left",bbox:n}),d=t+h,p=e+u;o.x=d,o.y=p,a.y=p-Math.round(n.height/2),a.x=d-Math.round(n.width/2),a.height=n.height,a.width=n.width}};qV.className="AxisLabel";var l0=(E(),C(w)),{Vec2:Wr}=l0._ModuleSupport,qo=class extends l0._ModuleSupport.Line{constructor(){super(...arguments),this.growCollisionBox=9,this.clipMask=new Map}setProperties(t,e){return super.setProperties(t,e),this.updateCollisionBBox(),this}updateCollisionBBox(){const{growCollisionBox:t,strokeWidth:e,x1:i,y1:s,x2:o,y2:a}=this;let n=e+t;n%2===0&&(n+=1);const r=Wr.from(i,s-Math.floor(n/2)),l=Wr.from(o,a),c=Wr.distance(r,l);this.collisionBBox=new l0._ModuleSupport.BBox(r.x,r.y,c,n)}isPointInPath(t,e){const{collisionBBox:i,x1:s,y1:o,x2:a,y2:n}=this;if(!i)return!1;const r=Wr.from(s,o),l=Wr.from(a,n),c=Wr.sub(Wr.from(t,e),r),h=Wr.sub(l,r),u=Wr.rotate(c,Wr.angle(c,h),r);return i.containsPoint(u.x,u.y)??!1}render(t){this.applyClipMask(t.ctx),super.render(t),this.closeClipMask(t.ctx)}setClipMask(t,e){const i=this.clipMask.get(t);l0._ModuleSupport.jsonDiff(i,e)!=null&&this.markDirty("CollidableLine"),e?this.clipMask.set(t,e):this.clipMask.delete(t)}applyClipMask(t){const{clipMask:e}=this;e.size!==0&&this.clipMask.forEach(i=>{const{x:s,y:o,radius:a}=i;t.save(),t.beginPath(),t.rect(0,0,t.canvas.width,t.canvas.height),t.ellipse(s,o,a,a,0,Math.PI*2,0,!0),t.clip()})}closeClipMask(t){this.clipMask.size!==0&&t.restore()}},grt=(E(),C(w)),ld=class extends grt._ModuleSupport.TransformableText{constructor(){super(...arguments),this.growCollisionBox={top:4,right:4,bottom:4,left:4}}isPointInPath(t,e){const i=this.fromParentPoint(t,e),s=this.computeBBoxWithoutTransforms();return s?s.grow(this.growCollisionBox).containsPoint(i.x,i.y):!1}},frt=(E(),C(w)),{Vec2:ro}=frt._ModuleSupport;function Rg(t,e,i,s,o,a,n){if(!a||!o||!s){e.setClipMask(t);return}const{alignment:r,position:l}=s,c=JV(i,s.fontSize,n),{point:h,textBaseline:u}=tW(c,l,r);eW(o,a,s,h,c.angle,u);const{x:d,y:p,width:g,height:f}=o.getBBox(),x=ro.length(ro.from(g,f)),y={x:d+g/2,y:p+f/2,radius:x/2+ro.length(c.offset)};return l==="center"?e.setClipMask(t,y):e.setClipMask(t),{clipMask:y,numbers:c}}function QV(t,e,i,s,o,a,n){if(!n||!a)return;const{alignment:r,position:l}=s,[c,h]=e.y1<=i.y1?[e,i]:[i,e];let u=c;l==="bottom"?u=h:l==="inside"&&(u={x1:(c.x1+h.x1)/2,y1:(c.y1+h.y1)/2,x2:(c.x2+h.x2)/2,y2:(c.y2+h.y2)/2});const d=JV(u,s.fontSize,o),{point:p,textBaseline:g}=tW(d,l==="inside"?"center":l,r,t);eW(a,n,s,p,d.angle,g)}function JV(t,e,i){let[s,o]=ro.from(t);s.x>o.x&&([s,o]=[o,s]);const a=ro.normalized(ro.sub(o,s)),n=ro.angle(a),r=ro.multiply(a,fi.HANDLE_SIZE/2+(e??14)/2),l=ro.multiply(a,(i??2)/2+(e??14)/3);return{left:s,right:o,normal:a,angle:n,inset:r,offset:l}}function tW({left:t,right:e,normal:i,angle:s,inset:o,offset:a},n,r,l){let c;r==="right"?c=ro.sub(e,o):r==="center"?c=ro.add(t,ro.multiply(i,ro.distance(t,e)/2)):c=ro.add(t,o);let h="bottom";return n==="bottom"?(c=ro.rotate(a,s+Math.PI/2,c),h="top"):n==="center"&&!l?h="middle":c=ro.rotate(a,s-Math.PI/2,c),{point:c,textBaseline:h}}function eW(t,e,i,s,o,a){t.setProperties({text:e,x:s.x,y:s.y,rotation:o,rotationCenterX:s.x,rotationCenterY:s.y,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textAlign:i.alignment,textBaseline:a})}var{ChartAxisDirection:mrt,Vec2:cd,Vec4:k2}=urt._ModuleSupport,ch=class extends Ts{constructor(){super(),this.type="cross-line",this.line=new qo,this.middle=new _g,this.isHorizontal=!1,this.append([this.line,this.middle])}static is(t){return Ts.isCheck(t,"cross-line")}update(t,e){const{seriesRect:i}=e;this.seriesRect=i,this.isHorizontal=no.is(t);const s=this.isHorizontal?e.yAxis:e.xAxis,o=this.convertCrossLine(t,s);if(o==null){this.visible=!1;return}this.visible=t.visible??!0,this.visible&&(this.updateLine(t,o),this.updateHandle(t,o),this.updateText(t,o),this.updateAxisLabel(t,s,o))}updateLine(t,e){const{line:i}=this,{lineDashOffset:s,stroke:o,strokeWidth:a,strokeOpacity:n}=t,{x1:r,y1:l,x2:c,y2:h}=e;i.setProperties({x1:r,y1:l,x2:c,y2:h,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:s,stroke:o,strokeWidth:a,strokeOpacity:n,fillOpacity:0})}updateHandle(t,e){const{middle:i}=this,{locked:s,stroke:o,strokeWidth:a,strokeOpacity:n}=t,r={fill:t.handle.fill,stroke:t.handle.stroke??o,strokeOpacity:t.handle.strokeOpacity??n,strokeWidth:t.handle.strokeWidth??a},l=cd.sub(k2.center(e),cd.from(i.handle.width/2,i.handle.height/2));i.gradient=this.isHorizontal?"horizontal":"vertical",i.update({...r,...l}),i.toggleLocked(s??!1)}updateText(t,e){this.text=this.updateNode(ld,this.text,!!t.text.label),Rg(this.line.id,this.line,e,t.text,this.text,t.text.label,t.strokeWidth)}createAxisLabel(t){const e=new qV;return t.attachLabel(e),e}updateAxisLabel(t,e,i){this.axisLabel||(this.axisLabel=this.createAxisLabel(e));const{axisLabel:s,seriesRect:o}=this,{direction:a,position:n}=e;if(t.axisLabel.enabled){s.visible=this.visible;const r=n==="left"||n==="top"?k2.start(i):k2.end(i),l=a===mrt.X?r.x:r.y;if(!e.inRange(l)){s.visible=!1;return}const c=Ei(t.value);s.update({...cd.add(r,cd.required(o)),value:c,styles:t.axisLabel,context:e})}else s.visible=!1}setAxisLabelOpacity(t){this.axisLabel&&(this.axisLabel.opacity=t)}setAxisLabelVisible(t){this.axisLabel&&(this.axisLabel.visible=t)}toggleHandles(t){this.middle.visible=t,this.middle.toggleHovered(this.activeHandle==="middle")}destroy(){super.destroy(),this.axisLabel?.destroy()}toggleActive(t){this.toggleHandles(t),this.middle.toggleActive(t)}dragStart(t,e,i){const s=no.is(t)?{x:e.x,y:Vl(t.value,i.yAxis)}:{x:Vl(t.value,i.xAxis),y:e.y};this.dragState={offset:e,middle:s}}drag(t,e,i){const{activeHandle:s,dragState:o}=this;t.locked||!o||(s&&this[s].toggleDragging(!0),this.translatePoint(t,o.middle,cd.sub(e,o.offset),i))}translate(t,e,i){if(t.locked)return;const s=no.is(t)?cd.from(0,Vl(t.value,i.yAxis)):cd.from(Vl(t.value,i.xAxis),0);this.translatePoint(t,s,e,i)}translatePoint(t,e,i,s){const o=no.is(t);o?i.x=0:i.y=0;const{point:a}=Zl({point:e},i,s);t.value=o?a.y:a.x}stopDragging(){this.middle.toggleDragging(!1)}copy(t,e,i){const s=no.is(t),o=this.isHorizontal?i.yAxis:i.xAxis,a=this.convertCrossLine(t,o);if(!a)return;const n=s?-30:0,r=s?0:-30,l=Co({x:a.x1+r,y:a.y1+n},i);return e.set({value:s?l.y:l.x}),e}getCursor(){return this.activeHandle==null?"pointer":this[this.activeHandle].getCursor()}containsPoint(t,e){const{middle:i,line:s,text:o}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="middle",!0):s.isPointInPath(t,e)||!!o?.containsPoint(t,e)}getNodeAtCoords(t,e){if(this.text?.containsPoint(t,e))return"text";if(this.line.isPointInPath(t,e))return"line";if(this.middle.containsPoint(t,e))return"handle"}getAnchor(){const t=this.computeBBoxWithoutHandles();return this.isHorizontal?{x:t.x+t.width/2,y:t.y}:{x:t.x+t.width,y:t.y+t.height/2,position:"right"}}convertCrossLine(t,e){if(t.value==null)return;let i=0,s=0,o,a;const{bounds:n}=e,r=Vl(t.value,e);return no.is(t)?(o=n.width,s=r,a=r):(i=r,o=r,a=n.height),{x1:i,y1:s,x2:o,y2:a}}},yrt=(E(),C(w)),{StateMachine:c0,StateMachineProperty:xrt,Debug:brt}=yrt._ModuleSupport,A2=class extends c0{constructor(t,e){const i=({point:o})=>{const a=t==="horizontal",n=a?new no:new Gr;n.set({value:a?o.y:o.x}),e.create(n),e.recordAction(`Create ${a?"horizontal-line":"vertical-line"} annotation`)},s=()=>{this.node?.toggleActive(!0),e.showAnnotationOptions(),e.update()};super("start",{start:{click:{target:"waiting-first-render",action:i},drag:{target:"waiting-first-render",action:i},reset:c0.parent,cancel:c0.parent},"waiting-first-render":{render:{target:c0.parent,action:s}}}),this.debug=brt.create(!0,"annotations")}};m([xrt()],A2.prototype,"node",2);var iW={type:"horizontal-line",datum:no,scene:ch,isDatum:no.is,translate:(t,e,i,s)=>{no.is(e)&&ch.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(no.is(e)&&no.is(i)&&ch.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{no.is(e)&&ch.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new A2("horizontal",{...t,create:e("horizontal-line")}),dragState:t=>new _i(t)},sW={type:"vertical-line",datum:Gr,scene:ch,isDatum:Gr.is,translate:(t,e,i,s)=>{Gr.is(e)&&ch.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Gr.is(e)&&Gr.is(i)&&ch.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Gr.is(e)&&ch.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new A2("vertical",{...t,create:e("vertical-line")}),dragState:t=>new _i(t)},Srt=(E(),C(w)),oW=(E(),C(w)),vrt=(E(),C(w)),{Vec4:Mrt}=vrt._ModuleSupport,aW=class{static updateBackground(t,e,i,s){const{background:o}=this,{seriesRect:a}=s;o.path.clear(!0);const n=Mrt.from(0,0,a.width,a.height),r=this.getBackgroundPoints(t,e,i,n);for(let c=0;c<r.length;c++){const h=r[c];c===0?o.path.moveTo(h.x,h.y):o.path.lineTo(h.x,h.y)}o.path.closePath(),o.checkPathDirty();const l=this.getBackgroundStyles?.(t)??t.background;o.setProperties({fill:l.fill,fillOpacity:l.fillOpacity})}},nW=class extends WV{constructor(){super(...arguments),this.handles={},this.overflowContinuous=2,this.topLine=new qo,this.bottomLine=new qo,this.background=new oW._ModuleSupport.Path({zIndex:-1}),this.anchor={x:0,y:0},this.updateBackground=aW.updateBackground.bind(this)}update(t,e){const{locked:i,visible:s}=t,o=To(t,e),a=To(t.bottom,e);if(o==null||a==null){this.visible=!1;return}else this.visible=s??!0;const n=this.extendLine(o,t,e),r=this.extendLine(a,t,e);this.updateLines(t,n,r,e,o,a),this.updateHandles(t,o,a),this.updateText(t,o,a),this.updateBackground(t,n,r,e),this.updateAnchor(o,a);for(const l of Object.values(this.handles))l.toggleLocked(i??!1)}toggleHandles(t){const{handles:e}=this;if(typeof t=="boolean"){for(const[i,s]of Object.entries(e))s.visible=t,s.toggleHovered(this.activeHandle===i);return}for(const[i,s]of Object.entries(t)){const o=e[i];o.visible=s??!0,o.toggleHovered(this.activeHandle===i)}}toggleActive(t){this.toggleHandles(t);for(const e of Object.values(this.handles))e.toggleActive(t)}stopDragging(){const{activeHandle:t,handles:e}=this;t!=null&&e[t].toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return this.activeHandle==null?"pointer":this.handles[this.activeHandle].getCursor()}containsPoint(t,e){const{handles:i,topLine:s,bottomLine:o,text:a}=this;this.activeHandle=void 0;for(const[n,r]of Object.entries(i))if(r.containsPoint(t,e))return this.activeHandle=n,!0;return s.containsPoint(t,e)||o.containsPoint(t,e)||!!a?.containsPoint(t,e)}getNodeAtCoords(t,e){if(this.text?.containsPoint(t,e))return"text";if(this.topLine.containsPoint(t,e)||this.bottomLine.containsPoint(t,e))return"line";for(const[i,s]of Object.entries(this.handles))if(s.containsPoint(t,e))return"handle"}updateAnchor(t,e){const{x:i,y:s}=oW._ModuleSupport.Transformable.toCanvasPoint(this.topLine,(t.x1+t.x2)/2,Math.min(t.y1,t.y2,e.y1,e.y2));this.anchor.x=i,this.anchor.y=s}},{Vec2:hn,Vec4:hh}=Srt._ModuleSupport,h0=class extends nW{constructor(){super(),this.type="disjoint-channel",this.handles={topLeft:new fi,topRight:new fi,bottomLeft:new fi,bottomRight:new _g},this.append([this.background,this.topLine,this.bottomLine,...Object.values(this.handles)])}static is(t){return Ts.isCheck(t,"disjoint-channel")}dragHandle(t,e,i,s){const{activeHandle:o,handles:a}=this;if(o==null)return;const{offset:n}=a[o].drag(e);a[o].toggleDragging(!0),o==="bottomRight"&&(n.x=0);let r=[],l=[],c=s;switch(o){case"topLeft":r=["topLeft"],l=["bottomLeft"];break;case"bottomLeft":r=["bottomLeft"],l=["topLeft"];break;case"topRight":r=["topRight"],l=["bottomRight"];break;case"bottomRight":r=["bottomLeft","bottomRight"],c=!1;break}const h=To(t,i),u=To(t.bottom,i);if(!h||!u)return;const d={topLeft:hh.start(h),topRight:hh.end(h),bottomLeft:hh.start(u),bottomRight:hh.end(u)},p={vectors:{topLeft:d.topRight,bottomLeft:d.bottomRight,topRight:d.topLeft,bottomRight:d.bottomLeft},angle:t.snapToAngle},g=Zl(d,n,i,{overflowContinuous:this.overflowContinuous,translateVectors:r,invertYVectors:l,snap:c?p:void 0});t.start.x=g.topLeft.x,t.start.y=g.topLeft.y,t.end.x=g.topRight.x,t.end.y=g.topRight.y,t.startHeight=g.topLeft.y-g.bottomLeft.y,t.endHeight=g.topRight.y-g.bottomRight.y}getTranslatePointsVectors(t,e){const{bottomLeft:i,bottomRight:s,topLeft:o,topRight:a}=this.handles,n=i.getBBox().y-o.getBBox().y,r=s.getBBox().y-a.getBBox().y,l=hn.add(t,hn.from(0,n)),c=hn.add(e,hn.from(0,r));return{start:t,end:e,bottomStart:l,bottomEnd:c}}updateLines(t,e,i){const{topLine:s,bottomLine:o}=this,{lineDashOffset:a,stroke:n,strokeOpacity:r,strokeWidth:l}=t,c={lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:a,stroke:n,strokeOpacity:r,strokeWidth:l};s.setProperties({...e,...c}),o.setProperties({...i,...c})}updateHandles(t,e,i){const{handles:{topLeft:s,topRight:o,bottomLeft:a,bottomRight:n}}=this,r={fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth};s.update({...r,...hh.start(e)}),o.update({...r,...hh.end(e)}),a.update({...r,...hh.start(i)}),n.update({...r,...hn.sub(hh.end(i),hn.from(n.handle.width/2,n.handle.height/2))})}updateText(t,e,i){this.text=this.updateNode(ld,this.text,!!t.text.label),QV(!1,e,i,t.text,t.strokeWidth,this.text,t.text.label)}getBackgroundPoints(t,e,i,s){const o=e.x1>e.x2,a=e.y1>e.y2,n=a?s.y2:s.y1,r=a?s.y1:s.y2,l=hn.from(e);return t.extendEnd&&e.y2===r&&l.push(hn.from(o?s.x1:s.x2,a?s.y1:s.y2)),t.extendEnd&&i.y2===n&&l.push(hn.from(o?s.x1:s.x2,a?s.y2:s.y1)),l.push(...hn.from(i).reverse()),t.extendStart&&i.y1===r&&l.push(hn.from(o?s.x2:s.x1,a?s.y1:s.y2)),t.extendStart&&e.y1===n&&l.push(hn.from(o?s.x2:s.x1,a?s.y2:s.y1)),l}},Drt=(E(),C(w)),Pg=(P(),C(et)),{StateMachine:uh,StateMachineProperty:I2,Debug:krt}=Drt._ModuleSupport,u0=class extends uh{constructor(t){const e=({point:l})=>{const c=new nn;c.set({start:l,end:l,startHeight:0,endHeight:0}),t.create(c)},i=()=>{const{node:l}=this;l?.toggleActive(!0),l?.toggleHandles({topLeft:!0,topRight:!1,bottomLeft:!1,bottomRight:!1})},s=({offset:l,context:c})=>{const{datum:h,snapping:u}=this;h&&(h.set({end:Yy(l,c,u,h.start,h.snapToAngle)}),t.update())},o=()=>{this.node?.toggleHandles({topRight:!0}),t.update()},a=({point:l})=>{const{datum:c,node:h}=this,u=Ei(c?.end.y),d=Ei(c?.start.y),{y:p}=l;if(c==null||!(0,Pg.isNumber)(d)||!(0,Pg.isNumber)(u)||!(0,Pg.isNumber)(p))return;const g=u-(p??0),f=(d-u)*2+g,x={x:c?.start.x,y:d-f},y={x:c?.end.x,y:l.y};h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!t.validatePoint(x,{overflowContinuous:!0})||!t.validatePoint(y,{overflowContinuous:!0}))&&(c.set({startHeight:f,endHeight:g}),t.update())},n=({point:l})=>{const{datum:c,node:h}=this,u=Ei(c?.end.y),d=Ei(c?.start.y),{y:p}=l;if(c==null||!(0,Pg.isNumber)(d)||!(0,Pg.isNumber)(u)||!(0,Pg.isNumber)(p))return;const g=u-(p??0),f=(d-u)*2+g,x={x:c.start.x,y:d-g},y={x:c.end.x,y:l.y};h?.toggleHandles(!0),!(!t.validatePoint(x,{overflowContinuous:!0})||!t.validatePoint(y,{overflowContinuous:!0}))&&(c.set({startHeight:f,endHeight:g}),t.recordAction("Create disjoint-channel annotation"),t.showAnnotationOptions(),t.update())},r=()=>t.delete();super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:uh.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,drag:s,click:{target:"height",action:o},dragEnd:{target:"height",action:o},reset:{target:uh.parent,action:r},cancel:{target:uh.parent,action:r}},height:{hover:a,click:{target:uh.parent,action:n},drag:{target:uh.parent,action:n},reset:{target:uh.parent,action:r},cancel:{target:uh.parent,action:r}}}),this.debug=krt.create(!0,"annotations"),this.snapping=!1}};m([I2()],u0.prototype,"datum",2),m([I2()],u0.prototype,"node",2),m([I2()],u0.prototype,"snapping",2);var rW={type:"disjoint-channel",datum:nn,scene:h0,isDatum:nn.is,translate:(t,e,i,s)=>{nn.is(e)&&h0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(nn.is(e)&&nn.is(i)&&h0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{nn.is(e)&&h0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new u0({...t,create:e("disjoint-channel")}),dragState:t=>new _i(t)},Art=(E(),C(w)),Irt=(P(),C(et)),Ql=(E(),C(w)),T2=[0,23.6,38.2,50,61.8,78.6,100],Trt=[161.8,261.8,361.8,423.6],Crt=[...T2,...Trt],Lrt={10:Crt,6:T2,4:T2.filter(t=>t!==78.6&&t!==23.6)},Nrt=10;function Ort(t,e){const{x2:i,y1:s,y2:o}=t,a=s-o;return e==null?{x1:i,x2:i,y1:o-a,y2:o}:{x1:e.x1,x2:e.x2,y1:e.y2-a,y2:e.y2}}function lW({x1:t,y1:e,x2:i,y2:s},o,a,n,r=10){const l=e-s,c=a?-1:1;let h=n;const u=[];return Lrt[r].forEach((d,p)=>{const g=n+l*(d/100)*c,f=o.yAxis.scaleInvert(g);u.push({id:p,x1:t,x2:i,y1:h,y2:g,tag:d==100?0:1,label:{x1:Math.min(t,i)-Nrt,x2:i,y1:g,y2:g,text:`${(d/100).toFixed(3)} (${f.toFixed(2)})`}}),h=g}),u}var{Vec2:wrt,Vec4:cW}=Ql._ModuleSupport,hW=class extends Ts{constructor(){super(),this.trendLine=new qo,this.rangeFillsGroup=new Ql._ModuleSupport.Group({name:`${this.id}-range-fills`}),this.rangeFillsGroupSelection=Ql._ModuleSupport.Selection.select(this.rangeFillsGroup,Ql._ModuleSupport.Range),this.rangeStrokesGroup=new Ql._ModuleSupport.Group({name:`${this.id}-range-strokes`}),this.rangeStrokesGroupSelection=Ql._ModuleSupport.Selection.select(this.rangeStrokesGroup,qo),this.labelsGroup=new Ql._ModuleSupport.Group({name:`${this.id}-ranges-labels`}),this.labelsGroupSelection=Ql._ModuleSupport.Selection.select(this.labelsGroup,ld),this.anchor={x:0,y:0,position:"above"},this.append([this.trendLine,this.rangeFillsGroup,this.rangeStrokesGroup,this.labelsGroup])}update(t,e){let i=To(t,e);if(i==null){this.visible=!1;return}if(i=cW.round(i),this.visible=t.visible??!0,!this.visible)return;this.updateLine(t,i,this.trendLine),this.updateHandles(t,i),this.updateAnchor(t,i,e);const{reverse:s}=t,o=this.extendLine(i,t,e),a=s?o.y1:o.y2,n=s?o.y2:o.y1,r=lW(o,e,t.reverse,a,t.bands);this.updateRanges(t,r,e);const l={...o,y1:n,y2:n};this.updateText(t,l)}extendLine({x1:t,y1:e,x2:i,y2:s},o,a){const n={x1:t,y1:e,x2:i,y2:s};if(!o.extendStart&&!o.extendEnd)return n;const{x:r,width:l}=a.xAxis.bounds;return o.extendEnd&&(n[t>i?"x1":"x2"]=r+l),o.extendStart&&(n[t>i?"x2":"x1"]=r),n}updateLine(t,e,i){if(!e||!i)return;const{lineDashOffset:s,strokeWidth:o,strokeOpacity:a,stroke:n}=t;i.setProperties({...e,lineCap:t.getLineCap(),lineDash:[3,4],lineDashOffset:s,strokeWidth:o,strokeOpacity:a,fillOpacity:0,stroke:n})}updateRangeStrokes(t){const{lineDashOffset:e,strokeWidth:i,strokeOpacity:s,strokes:o,rangeStroke:a,isMultiColor:n}=t;this.rangeStrokesGroupSelection.each((r,{x1:l,x2:c,y2:h,tag:u},d)=>{const p=h,g=n?o[d%o.length]:a;r.setProperties({x1:l,x2:c,y1:p,y2:p,stroke:g,strokeOpacity:s,strokeWidth:i,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,tag:u})})}updateRanges(t,e,i){const s=o=>o.id;this.rangeFillsGroupSelection.update(e,void 0,s),this.rangeStrokesGroupSelection.update(e,void 0,s),this.labelsGroupSelection.update(e,void 0,s),this.updateRangeFills(t),this.updateRangeStrokes(t),this.updateRangeLabels(t,i)}updateRangeFills(t){const{lineDashOffset:e,strokeWidth:i,strokeOpacity:s,strokes:o,rangeStroke:a,showFill:n,isMultiColor:r}=t;this.rangeFillsGroupSelection.each((l,{x1:c,x2:h,y1:u,y2:d},p)=>{const g=r?o[p%o.length]:a;if(!n){l.visible=!1;return}l.setProperties({x1:c,x2:h,y1:u,y2:d,startLine:!1,endLine:!1,isRange:!0,stroke:g,strokeOpacity:s,fill:g,fillOpacity:(s??1)*.15,strokeWidth:i,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,visible:!0})})}updateRangeLabels(t,{xAxis:e}){const{rangeStrokesGroupSelection:i}=this,{strokes:s,strokeWidth:o,rangeStroke:a,isMultiColor:n,label:{fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h,color:u}}=t,d={fontFamily:r,fontSize:l,fontStyle:c,fontWeight:h},p=this.checkWithinBounds(e,d,this.labelsGroupSelection.at(0));this.labelsGroupSelection.each((g,f,x)=>{const y=u??(n?s[x%s.length]:a),b=i.at(x);if(!b)return;const{text:S,...M}=f.label;if(p)g.setProperties({...d,text:S,x:M.x1,y:M.y1,textBaseline:"middle",textAlign:"end",fill:y}),Rg(g.id,b,M);else{const D={...d,label:S,position:"center",alignment:"left",color:y};Rg(g.id,b,M,D,g,S,o)}})}checkWithinBounds(t,e,i){if(!i)return!1;const{text:s,...o}=i.datum.label;i.setProperties({...e,text:s,x:o.x1,y:o.y1,textBaseline:"middle",textAlign:"end"});const{x:a}=i.getBBox();return a>=t.bounds.x&&a<=t.bounds.x+t.bounds.width}updateText(t,e){const i=this.rangeStrokesGroupSelection.selectByTag(0)[0];if(!i)return;const{text:s,strokeWidth:o}=t;this.text=this.updateNode(ld,this.text,!!s.label),Rg(i.id,i,e,s,this.text,s.label,o)}updateAnchor(t,e,i,s){const o=cW.topCenter(e);wrt.apply(this.anchor,Ql._ModuleSupport.Transformable.toCanvasPoint(this.trendLine,o.x,o.y))}containsPoint(t,e){const{trendLine:i,rangeStrokesGroupSelection:s,text:o}=this;let a=!1;return s.each(n=>a||(a=n.isPointInPath(t,e))),a||i.isPointInPath(t,e)||!!o?.containsPoint(t,e)}getNodeAtCoords(t,e){if(this.text?.containsPoint(t,e))return"text";if(this.trendLine.isPointInPath(t,e))return"line"}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}drag(t,e,i,s){t.locked||(this.activeHandle?this.dragHandle(t,e,i,s):this.dragAll(t,e,i))}getAnchor(){return this.anchor}getCursor(){return"pointer"}},{Vec2:Ert,Vec4:hd}=Art._ModuleSupport,d0=class extends hW{constructor(){super(),this.type="fibonacci-retracement-trend-based",this.endRetracementLine=new qo,this.start=new fi,this.end=new fi,this.endRetracement=new fi,this.append([this.endRetracementLine,this.start,this.end,this.endRetracement])}static is(t){return Ts.isCheck(t,"fibonacci-retracement-trend-based")}update(t,e){let{coords1:i,coords2:s}=this.getCoords(t,e);if(i==null||s==null){this.visible=!1;return}if(i=hd.round(i),s=hd.round(s),this.visible=t.visible??!0,!this.visible)return;(t.endRetracement.x==null||t.endRetracement.y==null)&&(s=void 0),this.updateLine(t,i,this.trendLine),this.updateLine(t,s,this.endRetracementLine),this.updateHandles(t,i,s),this.updateAnchor(t,s??i,e);const{reverse:o,bands:a}=t,n=Ort(i,s),r=this.extendLine(n,t,e),l=r.y2,c=r.y1,h=s?lW(r,e,o,l,a):[];this.updateRanges(t,h,e);const u={...r,y1:c,y2:c};this.updateText(t,u)}containsPoint(t,e){const{start:i,end:s,endRetracement:o,endRetracementLine:a}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):s.containsPoint(t,e)?(this.activeHandle="end",!0):o.containsPoint(t,e)?(this.activeHandle="endRetracement",!0):a.isPointInPath(t,e)||super.containsPoint(t,e)}getNodeAtCoords(t,e){return this.start.containsPoint(t,e)||this.end.containsPoint(t,e)||this.endRetracement.containsPoint(t,e)?"handle":this.endRetracementLine.isPointInPath(t,e)?"line":super.getNodeAtCoords(t,e)}dragStart(t,e,i){this.dragState={offset:e,...e0({start:t.start,end:t.end,endRetracement:t.endRetracement},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1),this.endRetracement.toggleDragging(!1)}dragAll(t,e,i){const{dragState:s}=this;s&&this.translatePoints({datum:t,start:s.start,end:s.end,endRetracement:s.endRetracement,translation:Ert.sub(e,s.offset),context:i})}dragHandle(t,e,i,s){const{activeHandle:o,dragState:a}=this;if(!o||!a)return;this[o].toggleDragging(!0);const n=s?this.snapToAngle(t,e,i):Co(this[o].drag(e).point,i);!n||!Og(i,n)||(t[o].x=n.x,t[o].y=n.y)}snapToAngle(t,e,i){const{activeHandle:s}=this,o=["start","end","endRetracement"];if(!s)return;const a=(o.indexOf(s)+1)%o.length,n=o[a];this[s].toggleDragging(!0);const r=gi(t[n],i);return Co(t0(e,r,t.snapToAngle),i)}translatePoints({datum:t,start:e,end:i,endRetracement:s,translation:o,context:a}){const n=Zl({start:e,end:i,endRetracement:s},o,a,{overflowContinuous:2});t.start.x=n.start.x,t.end.x=n.end.x,t.endRetracement.x=n.endRetracement.x,t.start.y=n.start.y,t.end.y=n.end.y,t.endRetracement.y=n.endRetracement.y}translate(t,e,i){this.translatePoints({datum:t,start:gi(t.start,i),end:gi(t.end,i),endRetracement:gi(t.endRetracement,i),translation:e,context:i})}copy(t,e,i){const{coords1:s,coords2:o}=this.getCoords(t,i);if(!s||!o)return;const a=this.computeBBoxWithoutHandles();return this.translatePoints({datum:e,start:hd.start(s),end:hd.end(s),endRetracement:hd.end(o),translation:{x:-a.width/2,y:-a.height/2},context:i}),e}getCoords(t,e){return{coords1:To(t,e),coords2:To({start:t.end,end:t.endRetracement},e)}}toggleHandles(t){if(typeof t=="boolean")this.start.visible=t,this.end.visible=t,this.endRetracement.visible=t;else for(const[e,i]of(0,Irt.entries)(t))this[e].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end"),this.endRetracement.toggleHovered(this.activeHandle==="endRetracement")}toggleActive(t){this.toggleHandles(t),this.start.toggleActive(t),this.end.toggleActive(t),this.endRetracement.toggleActive(t)}updateHandles(t,e,i,s){this.start.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"end",s)}),i&&this.endRetracement.update({...this.getHandleStyles(t),...this.getHandleCoords(t,i,"endRetracement",s)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1),this.endRetracement.toggleLocked(t.locked??!1)}getHandleCoords(t,e,i,s){return i==="start"?hd.start(e):hd.end(e)}},_rt=(E(),C(w)),{StateMachine:dh,StateMachineProperty:C2,Debug:Rrt}=_rt._ModuleSupport,p0=class extends dh{constructor(t){const e=({point:c})=>{const h=this.createDatum();h.set({start:c,end:c}),t.create(h)},i=()=>{const{node:c}=this;c?.toggleActive(!0),c?.toggleHandles({start:!0,end:!1,endRetracement:!1})},s=({offset:c,context:h})=>{const{datum:u,snapping:d}=this;u&&(u.set({end:Yy(c,h,d,u.start,u.snapToAngle)}),t.update())},o=()=>{const{datum:c}=this;c&&(c.endRetracement.x=c.end.x,c.endRetracement.y=c.end.y,this.node?.toggleHandles({end:!0}),t.update())},a=({offset:c,context:h})=>{const{datum:u,snapping:d}=this;u&&(u.set({endRetracement:Yy(c,h,d,u.end,u.snapToAngle)}),t.update())},n=()=>{this.node?.toggleHandles({endRetracement:!0}),t.update()},r=()=>t.delete(),l=()=>{t.showAnnotationOptions(),t.recordAction(`Create ${this.datum?.type} annotation`)};super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:dh.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,click:{target:"endRetracement",action:o},drag:s,dragEnd:{target:"endRetracement",action:o},reset:{target:dh.parent,action:r},cancel:{target:dh.parent,action:r},onExit:l},endRetracement:{hover:a,click:{target:dh.parent,action:n},drag:{target:dh.parent,action:n},reset:{target:dh.parent,action:r},cancel:{target:dh.parent,action:r}}}),this.debug=Rrt.create(!0,"annotations"),this.snapping=!1}createDatum(){return new jr}};m([C2()],p0.prototype,"datum",2),m([C2()],p0.prototype,"node",2),m([C2()],p0.prototype,"snapping",2);var uW={type:"fibonacci-retracement-trend-based",datum:jr,scene:d0,isDatum:jr.is,translate:(t,e,i,s)=>{jr.is(e)&&d0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(jr.is(e)&&jr.is(i)&&d0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{jr.is(e)&&d0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new p0({...t,create:e("fibonacci-retracement-trend-based")}),dragState:t=>new _i(t)},Prt=(E(),C(w)),Brt=(P(),C(et)),{Vec2:zrt,Vec4:dW}=Prt._ModuleSupport,g0=class extends hW{constructor(){super(),this.type="fibonacci-retracement",this.start=new fi,this.end=new fi,this.append([this.start,this.end])}static is(t){return Ts.isCheck(t,"fibonacci-retracement")}containsPoint(t,e){const{start:i,end:s}=this;return this.activeHandle=void 0,i.containsPoint(t,e)?(this.activeHandle="start",!0):s.containsPoint(t,e)?(this.activeHandle="end",!0):super.containsPoint(t,e)}getNodeAtCoords(t,e){return this.start.containsPoint(t,e)||this.end.containsPoint(t,e)?"handle":super.getNodeAtCoords(t,e)}dragStart(t,e,i){this.dragState={offset:e,...e0({start:t.start,end:t.end},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}dragAll(t,e,i){const{dragState:s}=this;s&&this.translatePoints({datum:t,start:s.start,end:s.end,translation:zrt.sub(e,s.offset),context:i})}dragHandle(t,e,i,s){const{activeHandle:o,dragState:a}=this;if(!o||!a)return;this[o].toggleDragging(!0);const n=s?this.snapToAngle(t,e,i):Co(this[o].drag(e).point,i);!n||!Og(i,n)||(t[o].x=n.x,t[o].y=n.y)}snapToAngle(t,e,i){const{activeHandle:s}=this,a=["start","end"].find(r=>r!==s);if(!s||!a)return;this[s].toggleDragging(!0);const n=gi(t[a],i);return Co(t0(e,n,t.snapToAngle),i)}translatePoints({datum:t,start:e,end:i,translation:s,context:o}){const a=Zl({start:e,end:i},s,o,{overflowContinuous:1});t.start.x=a.start.x,t.end.x=a.end.x,t.start.y=a.start.y,t.end.y=a.end.y}translate(t,e,i){this.translatePoints({datum:t,start:gi(t.start,i),end:gi(t.end,i),translation:e,context:i})}copy(t,e,i){const s=To(t,i);if(!s)return;const o=this.computeBBoxWithoutHandles();return this.translatePoints({datum:e,start:{x:s.x1,y:s.y1},end:{x:s.x2,y:s.y2},translation:{x:-o.width/2,y:-o.height/2},context:i}),e}toggleHandles(t){if(typeof t=="boolean")this.start.visible=t,this.end.visible=t;else for(const[e,i]of(0,Brt.entries)(t))this[e].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end")}toggleActive(t){this.toggleHandles(t),this.start.toggleActive(t),this.end.toggleActive(t)}updateHandles(t,e,i,s){this.start.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"start")}),this.end.update({...this.getHandleStyles(t),...this.getHandleCoords(t,e,"end",s)}),this.start.toggleLocked(t.locked??!1),this.end.toggleLocked(t.locked??!1)}getHandleCoords(t,e,i,s){return i==="start"?dW.start(e):dW.end(e)}},Frt=(E(),C(w)),{StateMachine:Bg,StateMachineProperty:L2,Debug:Grt}=Frt._ModuleSupport,zg=class extends Bg{constructor(t){const e=({point:r})=>{const l=this.createDatum();l.set({start:r,end:r}),t.create(l)},i=()=>{const{node:r}=this;r?.toggleActive(!0),r?.toggleHandles({start:!0,end:!1})},s=({offset:r,context:l})=>{const{datum:c,snapping:h}=this;c&&(c.set({end:Yy(r,l,h,c.start,c.snapToAngle)}),t.update())},o=()=>{this.node?.toggleHandles({end:!0}),t.update()},a=()=>t.delete(),n=()=>{t.showAnnotationOptions(),t.recordAction(`Create ${this.datum?.type} annotation`)};super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:Bg.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,click:{target:Bg.parent,action:o},drag:s,dragEnd:{target:Bg.parent,action:o},reset:{target:Bg.parent,action:a},cancel:{target:Bg.parent,action:a},onExit:n}}),this.debug=Grt.create(!0,"annotations"),this.snapping=!1}};m([L2()],zg.prototype,"datum",2),m([L2()],zg.prototype,"node",2),m([L2()],zg.prototype,"snapping",2);var jrt=class extends zg{createDatum(){return new Ul}},Vrt=class extends zg{createDatum(){return new Hl}},Wrt=class extends zg{createDatum(){return new Kl}},pW={type:"fibonacci-retracement",datum:Kl,scene:g0,isDatum:Kl.is,translate:(t,e,i,s)=>{Kl.is(e)&&g0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Kl.is(e)&&Kl.is(i)&&g0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Kl.is(e)&&g0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Wrt({...t,create:e("fibonacci-retracement")}),dragState:t=>new _i(t)},gW=(E(),C(w)),N2=(E(),C(w)),{Vec2:$y}=N2._ModuleSupport,Urt=class extends N2._ModuleSupport.Group{},f0=class extends Urt{constructor(){super(),this.type="arrow",this.path=new N2._ModuleSupport.Path,this.armLength=6,this.append([this.path])}update(t){const{path:e}=this,{x:i,y:s,angle:o,...a}=t,n=$y.from(i,s),r=3*Math.PI/4,l=this.armLength+(t.strokeWidth??0)*2,c=$y.rotate($y.from(0,l),o+r,n),h=$y.rotate($y.from(l,0),o-r,n);e.setProperties(a),e.fillOpacity=0,e.path.clear(),e.path.moveTo(c.x,c.y),e.path.lineTo(n.x,n.y),e.path.lineTo(h.x,h.y)}},{Vec2:$n,Vec4:fW}=gW._ModuleSupport,ph=class extends x2{constructor(){super(),this.type="line",this.line=new qo,this.append([this.line,this.start,this.end])}static is(t){return Ts.isCheck(t,"line")}update(t,e){let i=To(t,e);if(i==null){this.visible=!1;return}i=fW.round(i),this.visible=t.visible??!0,this.visible&&(this.updateLine(t,i,e),this.updateHandles(t,i),this.updateText(t,i),this.updateCaps(t,i),this.updateAnchor(t,i,e))}updateLine(t,e,i){const{line:s}=this,{lineDashOffset:o,stroke:a,strokeWidth:n,strokeOpacity:r}=t,l=this.extendLine(e,t,i);s.setProperties({...l,lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:o,stroke:a,strokeWidth:n,strokeOpacity:r,fillOpacity:0})}updateText(t,e){this.text=this.updateNode(ld,this.text,!!t.text.label),Rg(this.line.id,this.line,e,t.text,this.text,t.text.label,t.strokeWidth)}updateCaps(t,e){if(!t.startCap&&this.startCap&&(this.removeChild(this.startCap),this.startCap=void 0),!t.endCap&&this.endCap&&(this.removeChild(this.endCap),this.endCap=void 0),!t.startCap&&!t.endCap)return;const{stroke:i,strokeWidth:s,strokeOpacity:o}=t,[a,n]=$n.from(e),r=$n.angle($n.sub(n,a));t.startCap&&(this.startCap&&this.startCap.type!==t.startCap&&(this.removeChild(this.startCap),this.startCap=void 0),this.startCap==null&&(this.startCap=new f0,this.append([this.startCap])),this.startCap.update({x:a.x,y:a.y,angle:r-Math.PI,stroke:i,strokeWidth:s,strokeOpacity:o})),t.endCap&&(this.endCap&&this.endCap.type!==t.endCap&&(this.removeChild(this.endCap),this.endCap=void 0),this.endCap==null&&(this.endCap=new f0,this.append([this.endCap])),this.endCap.update({x:n.x,y:n.y,angle:r,stroke:i,strokeWidth:s,strokeOpacity:o}))}updateAnchor(t,e,i,s){const o=fW.topCenter(e);$n.apply(this.anchor,gW._ModuleSupport.Transformable.toCanvasPoint(this.line,o.x,o.y))}containsPoint(t,e){const{line:i,text:s}=this;return super.containsPoint(t,e)||i.isPointInPath(t,e)||!!s?.containsPoint(t,e)}getNodeAtCoords(t,e){return this.text?.containsPoint(t,e)?"text":this.line.isPointInPath(t,e)?"line":super.getNodeAtCoords(t,e)}getHandleCoords(t,e,i,s){const{startCap:o,endCap:a}=this;let[n,r]=$n.from(e);const l=$n.angle($n.sub(r,n));return o&&(n=$n.rotate($n.from(0,-fi.HANDLE_SIZE/2),l,n)),a&&(r=$n.rotate($n.from(0,fi.HANDLE_SIZE/2),l,r)),i==="start"?n:r}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}},mW={type:"line",datum:Hl,scene:ph,isDatum:Hl.is,translate:(t,e,i,s)=>{Hl.is(e)&&ph.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Hl.is(e)&&Hl.is(i)&&ph.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Hl.is(e)&&ph.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Vrt({...t,create:e("line")}),dragState:t=>new _i(t)},yW={type:"arrow",datum:Ul,scene:ph,isDatum:Ul.is,translate:(t,e,i,s)=>{Ul.is(e)&&ph.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Ul.is(e)&&Ul.is(i)&&ph.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Ul.is(e)&&ph.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new jrt({...t,create:e("arrow")}),dragState:t=>new _i(t)},O2=(E(),C(w)),Fg=(P(),C(et)),Aa=(E(),C(w)),xW=(E(),C(w));function bW(t,e=0,i=0){let s=e;for(const o of t)if(Array.isArray(o)){for(const a of o)SW(a,s);s+=xW._ModuleSupport.Group.computeChildrenBBox(o).width+i}else SW(o,s),s+=o.getBBox().width+i}function Hrt(t,e=0,i=0){let s=e;for(const o of t)if(Array.isArray(o)){for(const a of o)vW(a,s);s+=xW._ModuleSupport.Group.computeChildrenBBox(o).height+i}else vW(o,s),s+=o.getBBox().height+i}function SW(t,e){"x1"in t?(t.x2=e+(t.x2-t.x1),t.x1=e):t.x=e}function vW(t,e){"y1"in t?(t.y2=e+(t.y2-t.y1),t.y1=e):t.y=e}function MW(t,e){"x1"in t?(t.x1+=e,t.x2+=e):t.x+=e}function DW(t,e){"y1"in t?(t.y1+=e,t.y2+=e):t.y+=e}var{Vec4:w2}=Aa._ModuleSupport,kW=class extends Aa._ModuleSupport.Group{constructor(){super(),this.name="MeasurerStatisticsScene",this.background=new Aa._ModuleSupport.Rect,this.dateRangeBarsText=new Aa._ModuleSupport.Text,this.dateRangeDivider=new Aa._ModuleSupport.Line,this.dateRangeValueText=new Aa._ModuleSupport.Text,this.priceRangeValueText=new Aa._ModuleSupport.Text,this.priceRangeDivider=new Aa._ModuleSupport.Line,this.priceRangePercentageText=new Aa._ModuleSupport.Text,this.volumeText=new Aa._ModuleSupport.Text,this.volumeFormatter=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2}),this.append([this.background,this.dateRangeBarsText,this.dateRangeDivider,this.dateRangeValueText,this.priceRangeValueText,this.priceRangeDivider,this.priceRangePercentageText,this.volumeText])}update(t,e,i,s,o,a,n){this.verticalDirection=a;const r=this.updateStatistics(t,e,i,n),l=Aa._ModuleSupport.Group.computeChildrenBBox(r.flat()),c=10;l.grow(c),this.updateBackground(t,l,c),this.reposition(r,c,o),this.checkVisibility(t,o,s)}checkVisibility(t,e,i){const s=w2.from(new Aa._ModuleSupport.BBox(0,0,e.seriesRect.width,e.seriesRect.height));w2.collides(i,s)?this.visible=t.visible??!0:this.visible=!1}updateStatistics(t,e,i,s){const{dateRangeBarsText:o,dateRangeDivider:a,dateRangeValueText:n,priceRangeValueText:r,priceRangeDivider:l,priceRangePercentageText:c,volumeText:h}=this,u=8,d=6,p=t.statistics.fontSize+3,g=-2,f=this.getTextStyles(t),x={...this.getDividerStyles(t),x1:0,y1:0,x2:0,y2:p},y=[o,a,n],b=[r,l,c],S=[];return e.priceRange&&(r.setProperties({...f,text:this.formatPriceRangeValue(e.priceRange.value,s)}),l.setProperties(x),c.setProperties({...f,text:this.formatPriceRangePercentage(e.priceRange.percentage,s)}),bW(b,i.x,u),S.push(b)),e.dateRange&&(o.setProperties({...f,text:this.formatDateRangeBars(e.dateRange.bars,s)}),a.setProperties(x),n.setProperties({...f,text:this.formatDateRangeValue(e.dateRange.value)}),bW(y,i.x,u),S.push(y)),e.volume!=null?(h.setProperties({...f,x:i.x,text:this.formatVolume(e.volume,s),visible:!0}),S.push(h)):h.visible=!1,Hrt(S,i.y,d),l.y1+=g,l.y2+=g,a.y1+=g,a.y2+=g,S}updateBackground(t,e,i){const s=this.getBackgroundStyles(t);this.background.setProperties({...s,...e,x:e.x-e.width/2+i,y:e.y})}reposition(t,e,i){const{width:s,height:o}=i.seriesRect,a=w2.from(this.background.getBBox());let n=0;a.x1<0&&(n=-a.x1),a.x2>s&&(n=s-a.x2);const r=Math.min(e,o-a.y2);for(const l of t)if(Array.isArray(l)){const c=Aa._ModuleSupport.Group.computeChildrenBBox(l).width;for(const h of l)MW(h,n-c/2),DW(h,r)}else MW(l,n-l.getBBox().width/2),DW(l,r);this.background.x+=n,this.background.y+=r}getTextStyles(t){return{fill:t.statistics.color,fontFamily:t.statistics.fontFamily,fontSize:t.statistics.fontSize,fontStyle:t.statistics.fontStyle,fontWeight:t.statistics.fontWeight,textBaseline:"top"}}getDividerStyles(t){return{stroke:t.statistics.divider.stroke,strokeOpacity:t.statistics.divider.strokeOpacity,strokeWidth:t.statistics.divider.strokeWidth}}getBackgroundStyles(t){return{fill:t.statistics.fill,stroke:t.statistics.stroke,strokeOpacity:t.statistics.strokeOpacity,strokeWidth:t.statistics.strokeWidth,cornerRadius:4}}formatDateRangeBars(t,e){return e?.t("measurerDateRangeBars",{value:t})??`${t}`}formatDateRangeValue(t){const e=[],i=t>=0?"":"-";t=Math.abs(t);const s=1e3*60,o=s*60,a=o*24,n=Math.floor(t/s),r=Math.floor(t/o),l=Math.floor(t/a),c=r%(a/o),h=n%(o/s);return l>=1&&e.push(`${l}d`),r>=1&&(t<a||c!==0)&&e.push(`${c}h`),(t<o||h!==0)&&e.push(`${h}m`),e[0]=`${i}${e[0]}`,e.join(" ")}formatPriceRangeValue(t,e){return e?.t("measurerPriceRangeValue",{value:Number(t.toFixed(2))})??`${t}`}formatPriceRangePercentage(t,e){return e?.t("measurerPriceRangePercent",{value:t})??`${t}`}formatVolume(t,e){const i=isNaN(t)?"":this.volumeFormatter.format(t);return e?.t("measurerVolume",{value:i})??i}},Yrt=class extends kW{getDirectionStyles(t){return this.verticalDirection==="down"?t.down.statistics:t.up.statistics}getTextStyles(t){const e=this.getDirectionStyles(t);return{...super.getTextStyles(t),fill:e.color,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight}}getDividerStyles(t){const e=this.getDirectionStyles(t);return{stroke:e.divider.stroke,strokeOpacity:e.divider.strokeOpacity,strokeWidth:e.divider.strokeWidth}}getBackgroundStyles(t){const e=this.getDirectionStyles(t);return{...super.getBackgroundStyles(t),fill:e.fill,stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeWidth:e.strokeWidth}}},{Vec2:Ur,Vec4:ud}=O2._ModuleSupport,Ia=class extends x2{constructor(){super(),this.type="measurer",this.horizontalLine=new qo,this.verticalLine=new qo,this.horizontalStartLine=new qo,this.horizontalEndLine=new qo,this.verticalStartLine=new qo,this.verticalEndLine=new qo,this.horizontalEndCap=new f0,this.verticalEndCap=new f0,this.background=new O2._ModuleSupport.Path({zIndex:-1}),this.updateBackground=aW.updateBackground.bind(this),this.statistics=this.createStatisticsScene(),this.statistics.zIndex=1,this.append([this.background,this.verticalStartLine,this.verticalEndLine,this.horizontalStartLine,this.horizontalEndLine,this.horizontalLine,this.verticalLine,this.horizontalEndCap,this.verticalEndCap,this.start,this.end,this.statistics])}static is(t){return Ts.isCheck(t,"measurer")}createStatisticsScene(){return new kW}update(t,e){const i=To(t,e);if(i==null){this.visible=!1;return}if(this.visible=t.visible??!0,!this.visible)return;const s=this.extendPerpendicular(i,t,e),o={...s,y2:s.y1},a={...s,y1:s.y2};this.verticalDirection=i.y1<i.y2?"down":"up",this.updateVisibilities(t),this.updateLines(t,i),this.updateHandles(t,i),this.updateText(t,i),this.updateCaps(t,i),this.updateBoundingLines(t,s),this.updateBackground(t,o,a,e),this.updateStatistics(t,i,e),this.updateAnchor(t,i,e)}extendPerpendicular(t,e,i){const s={x1:Math.min(t.x1,t.x2),x2:Math.max(t.x1,t.x2),y1:Math.min(t.y1,t.y2),y2:Math.max(t.y1,t.y2)},[o,a]=Ur.from(i.yAxis.bounds);return on.is(e)?(e.extendAbove&&(s.y1=o.y),e.extendBelow&&(s.y2=a.y)):an.is(e)&&(e.extendLeft&&(s.x1=o.x),e.extendRight&&(s.x2=a.x)),s}updateVisibilities(t){const{horizontalStartLine:e,horizontalEndLine:i,horizontalEndCap:s,verticalStartLine:o,verticalEndLine:a,verticalEndCap:n}=this,{direction:r}=t;o.visible=r!=="vertical",a.visible=r!=="vertical",s.visible=r!=="vertical",e.visible=r!=="horizontal",i.visible=r!=="horizontal",n.visible=r!=="horizontal"}updateLines(t,e){const{horizontalLine:i,verticalLine:s}=this,{direction:o}=t,{x1:a,y1:n,x2:r,y2:l}=e,c=Ur.round(ud.center(e),0),h=this.getLineStyles(t);o!=="vertical"&&i.setProperties({...h,x1:a,x2:r,y1:c.y,y2:c.y}),o!=="horizontal"&&s.setProperties({...h,x1:c.x,x2:c.x,y1:n,y2:l})}updateText(t,e){const{direction:i}=t,s=Ur.round(ud.center(e),0);let o;const a={...e};i==="vertical"?(o=this.verticalLine,a.x1=s.x,a.x2=s.x):(o=this.horizontalLine,a.y1=s.y,a.y2=s.y),this.text=this.updateNode(ld,this.text,!!t.text.label);const{id:n}=o,r=Rg(n,o,a,t.text,this.text,t.text.label,t.strokeWidth);let l;if(i==="both"&&r&&this.text){const c=ud.from(this.text.getBBox()),{offset:h}=r.numbers;c.x1<=s.x+h.x&&c.x2>=s.x-h.x&&(l={x:s.x,y:r.clipMask.y,radius:this.text.getBBox().height/2+Ur.length(h)})}this.verticalLine.setClipMask(n,l)}updateCaps(t,e){const{horizontalEndCap:i,verticalEndCap:s}=this,{direction:o}=t,{x1:a,y1:n,x2:r,y2:l}=e,c=Ur.round(ud.center(e),0),{stroke:h,strokeWidth:u,strokeOpacity:d}=this.getLineStyles(t),p={stroke:h,strokeWidth:u,strokeOpacity:d};if(o!=="vertical"){const g=a<=r?0:Math.PI;let f=r;o==="horizontal"&&(f+=a<=r?-2:2),i.update({...p,x:f,y:c.y,angle:g})}if(o!=="horizontal"){const g=n<=l?Math.PI/2:Math.PI/-2;let f=l;o==="vertical"&&(f+=n<=l?-2:2),s.update({...p,x:c.x,y:f,angle:g})}}updateBoundingLines(t,e){const{verticalStartLine:i,verticalEndLine:s,horizontalStartLine:o,horizontalEndLine:a}=this,{direction:n}=t,{x1:r,y1:l,x2:c,y2:h}=e,u=this.getLineStyles(t);n==="horizontal"&&(i.setProperties({...u,x1:r,y1:l,x2:r,y2:h}),s.setProperties({...u,x1:c,y1:l,x2:c,y2:h})),n==="vertical"&&(o.setProperties({...u,x1:r,y1:l,x2:c,y2:l}),a.setProperties({...u,x1:r,y1:h,x2:c,y2:h}))}updateStatistics(t,e,i){const s=Ur.add(ud.bottomCenter(e),Ur.from(0,10)),o={volume:this.getVolume(t)};t.hasPriceRange&&(o.priceRange={percentage:this.getPriceRangePercentage(t),value:this.getPriceRangeValue(t)}),t.hasDateRange&&(o.dateRange={bars:this.getDateRangeBars(e,i),value:this.getDateRangeValue(t)}),this.statistics.update(t,o,s,e,i,this.verticalDirection,t.localeManager)}updateAnchor(t,e,i,s){const o=ud.topCenter(e);Ur.apply(this.anchor,O2._ModuleSupport.Transformable.toCanvasPoint(this.horizontalLine,o.x,o.y))}getBackgroundPoints(t,e,i,s){const[o,a]=Ur.from(e),[n,r]=Ur.from(i);return[o,a,r,n]}getLineStyles(t){const{lineDashOffset:e,stroke:i,strokeWidth:s,strokeOpacity:o}=t;return{lineCap:t.getLineCap(),lineDash:t.getLineDash(),lineDashOffset:e,stroke:i,strokeWidth:s,strokeOpacity:o,fillOpacity:0}}getBackgroundStyles(t){const{background:e}=t;return{fill:e.fill,fillOpacity:e.fillOpacity}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}containsPoint(t,e){const{horizontalLine:i,text:s,verticalLine:o,horizontalStartLine:a,horizontalEndLine:n,verticalStartLine:r,verticalEndLine:l}=this;return super.containsPoint(t,e)||i.isPointInPath(t,e)||o.isPointInPath(t,e)||a.visible&&a.isPointInPath(t,e)||n.visible&&n.isPointInPath(t,e)||r.visible&&r.isPointInPath(t,e)||l.visible&&l.isPointInPath(t,e)||!!s?.containsPoint(t,e)}getNodeAtCoords(t,e){return this.text?.containsPoint(t,e)?"text":this.start.containsPoint(t,e)||this.end.containsPoint(t,e)?"handle":"line"}getDateRangeBars(t,e){const{step:i}=e.xAxis.scale,s=t.x1<=t.x2?1:-1;return i?Math.round(ud.width(t)/i)*s:0}getDateRangeValue(t){const e=Ei(t.start.x),i=Ei(t.end.x);if(!(0,Fg.isDate)(e)||!(0,Fg.isDate)(i))throw new Error("Can not create a date range measurement of non-date x-axis.");return i.getTime()-e.getTime()}getPriceRangePercentage(t){if(t.start.y==null||t.end.y==null)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const e=Ei(t.end.y),i=Ei(t.start.y);if(!(0,Fg.isNumber)(e)||!(0,Fg.isNumber)(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return(e-i)/i}getPriceRangeValue(t){if(t.start.y==null||t.end.y==null)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const e=Ei(t.end.y),i=Ei(t.start.y);if(!(0,Fg.isNumber)(e)||!(0,Fg.isNumber)(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return e-i}getVolume(t){return t.getVolume(t.start.x,t.end.x)}},m0=class extends Ia{constructor(){super(...arguments),this.type="quick-measurer"}static is(t){return Ts.isCheck(t,"quick-measurer")}createStatisticsScene(){return new Yrt}getDirectionStyles(t){return this.verticalDirection==="down"?t.down:t.up}getLineStyles(t){const e=this.getDirectionStyles(t);return{...super.getLineStyles(t),stroke:e.stroke,strokeWidth:e.strokeWidth,strokeOpacity:e.strokeOpacity}}getBackgroundStyles(t){const e=this.getDirectionStyles(t);return{fill:e.fill,fillOpacity:e.fillOpacity}}getHandleStyles(t){const e=this.getDirectionStyles(t);return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}},Krt=(E(),C(w)),{StateMachine:Gg,StateMachineProperty:AW,Debug:$rt}=Krt._ModuleSupport,jg=class extends Gg{constructor(t){const e=({point:n})=>{const r=this.createDatum();r.set({start:n,end:n}),t.create(r)},i=({point:n})=>{const{datum:r,node:l}=this;r?.set({end:n}),l?.toggleActive(!0),l?.toggleHandles({end:!1}),t.update()},s=()=>{this.node?.toggleHandles({end:!0})},o=()=>t.delete(),a=()=>{t.showAnnotationOptions(),!sh(this.datum)&&t.recordAction(`Create ${this.node?.type} annotation`)};super("start",{start:{reset:Gg.parent,click:{target:"end",action:e},drag:{target:"end",action:e}},end:{hover:i,drag:i,click:{target:Gg.parent,action:s},dragEnd:{target:Gg.parent,action:s},reset:{target:Gg.parent,action:o},cancel:{target:Gg.parent,action:o},onExit:a}}),this.debug=$rt.create(!0,"annotations")}};m([AW()],jg.prototype,"datum",2),m([AW()],jg.prototype,"node",2);var Xrt=class extends jg{createDatum(){return new on}},Zrt=class extends jg{createDatum(){return new an}},qrt=class extends jg{createDatum(){return new Wl}},Qrt=class extends jg{createDatum(){return new ka}},IW={type:"date-range",datum:on,scene:Ia,isDatum:on.is,translate:(t,e,i,s)=>{on.is(e)&&Ia.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(on.is(e)&&on.is(i)&&Ia.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{on.is(e)&&Ia.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Xrt({...t,create:e("date-range")}),dragState:t=>new _i(t)},TW={type:"price-range",datum:an,scene:Ia,isDatum:an.is,translate:(t,e,i,s)=>{an.is(e)&&Ia.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(an.is(e)&&an.is(i)&&Ia.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{an.is(e)&&Ia.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Zrt({...t,create:e("date-range")}),dragState:t=>new _i(t)},CW={type:"date-price-range",datum:Wl,scene:Ia,isDatum:Wl.is,translate:(t,e,i,s)=>{Wl.is(e)&&Ia.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Wl.is(e)&&Wl.is(i)&&Ia.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Wl.is(e)&&Ia.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new qrt({...t,create:e("date-range")}),dragState:t=>new _i(t)},LW={type:"quick-date-price-range",datum:ka,scene:m0,isDatum:ka.is,translate:(t,e,i,s)=>{ka.is(e)&&m0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(ka.is(e)&&ka.is(i)&&m0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{ka.is(e)&&m0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new Qrt({...t,create:e("quick-date-price-range")}),dragState:t=>new _i(t)},Xy=(E(),C(w)),Jrt=(P(),C(et)),{ZIndexMap:NW,TextWrapper:tlt}=Xy._ModuleSupport,y0=class extends M2{constructor(){super(),this.type="note",this.shape=new Xy._ModuleSupport.Rect,this.iconBackground=new Xy._ModuleSupport.SvgPath("M22 1.83333C22 0.820811 21.1792 0 20.1667 0H1.83333C0.820811 0 0 0.82081 0 1.83333V13.9868C0 14.9994 0.820811 15.8202 1.83333 15.8202L5.88971 15.8202C6.44575 15.8202 6.97175 16.0725 7.31971 16.5062L9.57006 19.3112C10.304 20.2259 11.6962 20.2259 12.4301 19.3112L14.6804 16.5062C15.0284 16.0725 15.5544 15.8202 16.1104 15.8202L20.1667 15.8202C21.1792 15.8202 22 14.9994 22 13.9868V1.83333Z"),this.iconLines=new Xy._ModuleSupport.SvgPath("M17.1114 5.75C17.1114 6.16421 16.7756 6.5 16.3614 6.5H5.63916C5.22495 6.5 4.88916 6.16421 4.88916 5.75V5.75C4.88916 5.33579 5.22495 5 5.63916 5H16.3614C16.7756 5 17.1114 5.33579 17.1114 5.75V5.75ZM17.1114 9.25C17.1114 9.66421 16.7756 10 16.3614 10H5.63916C5.22495 10 4.88916 9.66421 4.88916 9.25V9.25C4.88916 8.83579 5.22495 8.5 5.63916 8.5H16.3614C16.7756 8.5 17.1114 8.83579 17.1114 9.25V9.25Z"),this.active=!1,this.shape.visible=!1,this.label.visible=!1,this.iconBackground.fillShadow=new Xy._ModuleSupport.DropShadow,this.append([this.shape,this.label,this.iconBackground,this.iconLines,this.handle])}static is(t){return Ts.isCheck(t,"note")}update(t,e){this.updateIcon(t,e),super.update(t,e)}getTextBBox(t,e,i){const s=super.getTextBBox(t,e,i);s.x-=t.width/2,s.x=(0,Jrt.clamp)(0,s.x,i.seriesRect.width-t.width);const o=t.getPadding().top,a=s.y-iV-o*2,n=s.y+fi.HANDLE_SIZE+o*2;return a-s.height-sV<0?(s.y=n,t.position="top"):(s.y=a+o,t.position="bottom"),s}updateLabel(t,e){const i=t.visible===!1?!1:this.label.visible;super.updateLabel(t,e),this.label.visible=i,this.label.text=tlt.wrapText(t.text,{font:{fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight},avoidOrphans:!1,textAlign:t.textAlign,textBaseline:"hanging",textWrap:"always",maxWidth:200})}updateShape(t,e){const{shape:i}=this;i.fill=t.background.fill,i.fillOpacity=t.background.fillOpacity??1,i.stroke=t.background.stroke,i.strokeOpacity=t.background.strokeOpacity??1,i.strokeWidth=t.background.strokeWidth??1,i.cornerRadius=4;const s=t.getPadding().top,o=t.position==="top";i.x=e.x-s,i.width=t.width+s*2,i.height=e.height+s*2,i.y=e.y+(o?0:-e.height)-s}updateIcon(t,e){const{active:i,iconBackground:s,iconLines:o}=this,{x:a,y:n}=gi(t,e);s.x=a-mat/2,s.y=n-eV,o.x=s.x,o.y=s.y,s.fill=t.fill,s.fillOpacity=t.fillOpacity??1,s.stroke=t.stroke,s.strokeOpacity=t.strokeOpacity??1,s.strokeWidth=t.strokeWidth??1,o.fill=t.stroke,i?s.fillShadow.color=t.fill??"rgba(0, 0, 0, 0.22)":s.fillShadow.color="rgba(0, 0, 0, 0.22)"}updateAnchor(t,e,i){const s=t.getPadding().top,o=t.position==="top",a=o?1:-1;return{x:e.x+i.seriesRect.x+t.width/2,y:e.y+i.seriesRect.y+a*(e.height+s),position:o?"below":"above"}}getLabelCoords(t,e){const i=t.position==="top",s=t.getPadding().top+t.fontSize*Vy/2;return{x:e.x,y:e.y+(i?s/2:0)}}getTextBaseline(t){return t.position==="top"?"middle":t.position}getHandleCoords(t,e,i){return{x:e.x,y:e.y+fi.HANDLE_SIZE/2+4}}getHandleStyles(t){return{fill:t.handle.fill,stroke:t.handle.stroke??t.fill,strokeOpacity:t.handle.strokeOpacity,strokeWidth:t.handle.strokeWidth}}toggleHovered(t){super.toggleHovered(t),this.label.visible=t,this.shape.visible=t,this.zIndex=t?NW.CHART_ANNOTATION_FOCUSED:NW.CHART_ANNOTATION}toggleActive(t){super.toggleActive(t),this.label.visible=t,this.shape.visible=t,this.active=t}containsPoint(t,e){return this.shape.visible&&this.shape.containsPoint(t,e)||this.iconBackground.containsPoint(t,e)?!0:super.containsPoint(t,e)}},elt=class extends Ky{createDatum(){return new Zo}},OW={type:"note",datum:Zo,scene:y0,isDatum:Zo.is,translate:(t,e,i,s)=>{Zo.is(e)&&y0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(Zo.is(e)&&Zo.is(i)&&y0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{Zo.is(e)&&y0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new elt({...t,create:e("note")}),dragState:t=>new _i(t)},ilt=(E(),C(w)),{Vec2:un,Vec4:Hr}=ilt._ModuleSupport,x0=class extends nW{constructor(){super(),this.type="parallel-channel",this.handles={topLeft:new fi,topMiddle:new _g,topRight:new fi,bottomLeft:new fi,bottomMiddle:new _g,bottomRight:new fi},this.middleLine=new qo,this.append([this.background,this.topLine,this.middleLine,this.bottomLine,...Object.values(this.handles)])}static is(t){return Ts.isCheck(t,"parallel-channel")}dragHandle(t,e,i,s){const{activeHandle:o,handles:a}=this;if(o==null)return;const{offset:n}=a[o].drag(e);a[o].toggleDragging(!0),(o==="topMiddle"||o==="bottomMiddle")&&(n.x=0);let r=[],l=s;switch(o){case"topLeft":case"bottomLeft":r=["topLeft","bottomLeft"];break;case"topMiddle":r=["topLeft","topRight"],n.y-=_g.HANDLE_SIZE/2,l=!1;break;case"topRight":case"bottomRight":r=["topRight","bottomRight"];break;case"bottomMiddle":r=["bottomLeft","bottomRight"],n.y-=_g.HANDLE_SIZE/2,l=!1;break}const c=To(t,i),h=To(t.bottom,i);if(!c||!h)return;const u={topLeft:Hr.start(c),topRight:Hr.end(c),bottomLeft:Hr.start(h),bottomRight:Hr.end(h)},d={vectors:{topLeft:u.topRight,bottomLeft:u.bottomRight,topRight:u.topLeft,bottomRight:u.bottomLeft},angle:t.snapToAngle},p=Zl(u,n,i,{overflowContinuous:this.overflowContinuous,translateVectors:r,snap:l?d:void 0});t.start.x=p.topLeft.x,t.start.y=p.topLeft.y,t.end.x=p.topRight.x,t.end.y=p.topRight.y,t.height=p.topLeft.y-p.bottomLeft.y}getTranslatePointsVectors(t,e){const{bottomLeft:i,topLeft:s}=this.handles,o=i.getBBox().y-s.getBBox().y,a=un.add(t,un.from(0,o)),n=un.add(e,un.from(0,o));return{start:t,end:e,bottomStart:a,bottomEnd:n}}containsPoint(t,e){return super.containsPoint(t,e)||this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(t,e)}getNodeAtCoords(t,e){return this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(t,e)?"line":super.getNodeAtCoords(t,e)}updateLines(t,e,i,s,o,a){const{topLine:n,middleLine:r,bottomLine:l}=this,{lineDashOffset:c,stroke:h,strokeOpacity:u,strokeWidth:d}=t,p=t.getLineDash(),g={lineCap:t.getLineCap(),lineDash:p,lineDashOffset:c,stroke:h,strokeOpacity:u,strokeWidth:d};n.setProperties({...e,...g}),l.setProperties({...i,...g});const f=this.extendLine({x1:o.x1,y1:a.y1+(o.y1-a.y1)/2,x2:o.x2,y2:a.y2+(o.y2-a.y2)/2},t,s);r.setProperties({...f,lineDash:t.middle.lineDash??p,lineDashOffset:t.middle.lineDashOffset??c,stroke:t.middle.stroke??h,strokeOpacity:t.middle.strokeOpacity??u,strokeWidth:t.middle.strokeWidth??d,visible:t.middle.visible??!0})}updateHandles(t,e,i){const{handles:{topLeft:s,topMiddle:o,topRight:a,bottomLeft:n,bottomMiddle:r,bottomRight:l}}=this,c={fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth};s.update({...c,...Hr.start(e)}),a.update({...c,...Hr.end(e)}),n.update({...c,...Hr.start(i)}),l.update({...c,...Hr.end(i)}),o.update({...c,...un.sub(Hr.center(e),un.from(o.handle.width/2,o.handle.height/2))}),r.update({...c,...un.sub(Hr.center(i),un.from(r.handle.width/2,r.handle.height/2))})}updateText(t,e,i){this.text=this.updateNode(ld,this.text,!!t.text.label),QV(!0,e,i,t.text,t.strokeWidth,this.text,t.text.label)}getBackgroundPoints(t,e,i,s){const o=e.x1>e.x2,a=e.y1>e.y2,n=e.x1!==i.x1&&e.y1!==i.y1,r=e.x2!==i.x2&&e.y2!==i.y2,l=un.from(e);return t.extendEnd&&r&&l.push(un.from(o?s.x1:s.x2,a?s.y1:s.y2)),l.push(...un.from(i).reverse()),t.extendStart&&n&&l.push(un.from(o?s.x2:s.x1,a?s.y2:s.y1)),l}},slt=(E(),C(w)),Vg=(P(),C(et)),{StateMachine:gh,StateMachineProperty:E2,Debug:olt}=slt._ModuleSupport,b0=class extends gh{constructor(t){const e=({point:l})=>{const c=new rn;c.set({start:l,end:l,height:0}),t.create(c)},i=()=>{const{node:l}=this;l?.toggleActive(!0),l?.toggleHandles({topLeft:!0,topMiddle:!1,topRight:!1,bottomLeft:!1,bottomMiddle:!1,bottomRight:!1})},s=({offset:l,context:c})=>{const{datum:h,snapping:u}=this;h&&(h.set({end:Yy(l,c,u,h.start,h.snapToAngle)}),t.update())},o=()=>{this.node?.toggleHandles({topRight:!0}),t.update()},a=({point:l})=>{const{datum:c,node:h}=this,u=Ei(c?.end.y),d=Ei(c?.start.y),{y:p}=l;if(c==null||!(0,Vg.isNumber)(d)||!(0,Vg.isNumber)(u)||!(0,Vg.isNumber)(p))return;const g=u-(p??0),f=d-g;h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!t.validatePoint({x:c.start.x,y:f},{overflowContinuous:!0})||!t.validatePoint({x:c.end.x,y:l.y},{overflowContinuous:!0}))&&(c.set({height:g}),t.update())},n=({point:l})=>{const{datum:c,node:h}=this,u=Ei(c?.end.y),d=Ei(c?.start.y),{y:p}=l;if(c==null||!(0,Vg.isNumber)(d)||!(0,Vg.isNumber)(u)||!(0,Vg.isNumber)(p))return;const g=u-(p??0),f=d-g;h?.toggleHandles(!0),!(!t.validatePoint({x:c.start.x,y:f},{overflowContinuous:!0})||!t.validatePoint({x:c.end.x,y:l.y},{overflowContinuous:!0}))&&(c.set({height:g}),t.recordAction("Create parallel-channel annotation"),t.showAnnotationOptions(),t.update())},r=()=>t.delete();super("start",{start:{click:{target:"waiting-first-render",action:e},drag:{target:"waiting-first-render",action:e},reset:gh.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:s,drag:s,click:{target:"height",action:o},dragEnd:{target:"height",action:o},reset:{target:gh.parent,action:r},cancel:{target:gh.parent,action:r}},height:{hover:a,click:{target:gh.parent,action:n},drag:{target:gh.parent,action:n},reset:{target:gh.parent,action:r},cancel:{target:gh.parent,action:r}}}),this.debug=olt.create(!0,"annotations"),this.snapping=!1}};m([E2()],b0.prototype,"datum",2),m([E2()],b0.prototype,"node",2),m([E2()],b0.prototype,"snapping",2);var wW={type:"parallel-channel",datum:rn,scene:x0,isDatum:rn.is,translate:(t,e,i,s)=>{rn.is(e)&&x0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if(rn.is(e)&&rn.is(i)&&x0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{rn.is(e)&&x0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new b0({...t,create:e("parallel-channel")}),dragState:t=>new _i(t)},S0=class extends M2{constructor(){super(),this.type="text",this.append([this.label,this.handle])}static is(t){return Ts.isCheck(t,"text")}getHandleCoords(t,e){const i=fi.HANDLE_SIZE/2;return{x:e.x+i,y:e.y+2+i}}},alt=class extends Ky{createDatum(){return new $l}},EW={type:"text",datum:$l,scene:S0,isDatum:$l.is,translate:(t,e,i,s)=>{$l.is(e)&&S0.is(t)&&t.translate(e,i,s)},copy:(t,e,i,s)=>{if($l.is(e)&&$l.is(i)&&S0.is(t))return t.copy(e,i,s)},update:(t,e,i)=>{$l.is(e)&&S0.is(t)&&t.update(e,i)},createState:(t,{createDatum:e})=>new alt({...t,create:e("text")}),dragState:t=>new _i(t)},Ta={[mW.type]:mW,[iW.type]:iW,[sW.type]:sW,[wW.type]:wW,[rW.type]:rW,[pW.type]:pW,[uW.type]:uW,[KV.type]:KV,[ZV.type]:ZV,[OW.type]:OW,[EW.type]:EW,[yW.type]:yW,[GV.type]:GV,[FV.type]:FV,[IW.type]:IW,[TW.type]:TW,[CW.type]:CW,[LW.type]:LW};function dd(t){for(const{isDatum:e}of Object.values(Ta))if(e(t))return t}var nlt=(E(),C(w)),{ActionOnSet:rlt,ParallelStateMachine:llt,StateMachine:_2,StateMachineProperty:Yr,Debug:clt}=nlt._ModuleSupport,v0=class extends llt{constructor(t){super(new hlt(e=>{this.snapping=e}),new ult(()=>{this.node=this.active==null?void 0:t.node(this.active)}),new fh(t,e=>{this.active=e,this.datum=this.active==null?void 0:t.datum(this.active),this.node=this.active==null?void 0:t.node(this.active)})),this.snapping=!1}getActive(){return this.active}isActive(t){return t===this.active}};m([Yr()],v0.prototype,"snapping",2),m([Yr()],v0.prototype,"datum",2),m([Yr()],v0.prototype,"node",2);var hlt=class extends _2{constructor(t){super("idle",{idle:{hover:({shiftKey:e})=>t(e),keyDown:({shiftKey:e})=>t(e),keyUp:({shiftKey:e})=>t(e),click:({shiftKey:e})=>t(e),drag:({shiftKey:e})=>t(e)},dragging:{},translating:{},"text-input":{}})}},ult=class extends _2{constructor(t){super("idle",{idle:{onEnter:t,render:t},dragging:{onEnter:t,render:t},translating:{onEnter:t,render:t},"text-input":{render:t}})}},fh=class extends _2{constructor(t,e){const i=S=>M=>{t.create(S,M),this.active=t.selectLast()},s=()=>{this.active!=null&&t.delete(this.active),this.active=void 0,t.select()},o={createDatum:i},a={...t,delete:s,showTextInput:()=>{this.active!=null&&t.showTextInput(this.active)},deselect:()=>{const S=this.active;this.active=void 0,this.hovered=void 0,t.select(this.active,S)},showAnnotationOptions:()=>{this.active!=null&&t.showAnnotationOptions(this.active)}},n=Object.fromEntries(Object.entries(Ta).map(([S,M])=>[S,M.createState(a,o)])),r=Object.fromEntries(Object.entries(Ta).map(([S,M])=>[S,M.dragState(t,o)])),l=({colorPickerType:S,colorOpacity:M,color:D,opacity:L,isMultiColor:T})=>{this.datum&&(S==="text-color"&&t.updateTextInputColor(D),qM(this.datum,S,M,D,L,T),t.update())},c=S=>{const{datum:M,node:D}=this;!M||!D||(Vr(M)?(M.fontSize=S,t.updateTextInputFontSize(S)):wg(M)&&(M.text.fontSize=S),t.update())},h=S=>{const{datum:M,node:D}=this;!M||!D||!oh(M)||(xV(M,S),t.update())},u=S=>{const{node:M}=this;!M||!("setTextInputBBox"in M)||(M.setTextInputBBox(S),t.update())},d=({textInputValue:S,bbox:M})=>{const{datum:D}=this;if(M!=null&&S!=null&&S.length>0){if(!Vr(D))return;const L=HM(D,S,M.width);D.set({text:L}),t.update(),t.recordAction(`Change ${D.type} annotation text`)}else t.delete(this.active),t.recordAction(`Delete ${D?.type} annotation`)},p=()=>{t.updateTextInputBBox(void 0)},g=()=>this.active!=null,f=()=>this.copied!=null,x=()=>{const{active:S,datum:M}=this;return S==null||!M?!1:wg(M)&&!M.locked},y=()=>this.active!=null&&!sh(this.datum),b=()=>this.hovered!=null;super("idle",{idle:{onEnter:()=>{t.select(this.active,this.active),this.hoverCoords&&(this.hovered=t.hoverAtCoords(this.hoverCoords,this.active,this.hovered))},hover:({offset:S})=>{this.hovered=t.hoverAtCoords(S,this.active,this.hovered),this.hoverCoords=S},translate:{guard:g,target:"translating",action:({translation:S})=>{t.startInteracting(),t.translate(this.active,S),t.update()}},copy:{guard:y,action:()=>{this.copied=t.copy(this.active)}},cut:{guard:y,action:()=>{this.copied=t.copy(this.active),s()}},paste:{guard:f,action:()=>{t.paste(this.copied)}},selectLast:()=>{const S=this.active;this.active=t.selectLast(),t.select(this.active,S)},click:[{guard:()=>{const{active:S,hovered:M,datum:D}=this;return S==null||M!==S||!D?!1:Vr(D)&&!D.locked},target:"text-input"},{action:()=>{const S=this.active;this.active=this.hovered,t.select(this.active,S)}}],dblclick:{guard:x,action:({offset:S})=>{const M=t.getNodeAtCoords(S,this.active)==="text"?"text":"line";t.showAnnotationSettings(this.active,void 0,M)}},dragStart:[{guard:b,target:"dragging",action:()=>{const S=this.active;this.active=this.hovered,t.select(this.active,S),t.startInteracting()}},{action:()=>{const S=this.active;this.active=this.hovered,t.select(this.active,S)}}],color:{guard:g,action:l},fontSize:{guard:g,action:c},lineProps:{guard:g,action:S=>{const M=dd(this.datum);M?.set(S),t.update(),t.recordAction(`Change ${M?.type} ${Object.entries(S).map(([D,L])=>`${D} to ${L}`).join(", ")}`)}},lineStyle:{guard:g,action:h},lineText:{guard:g,action:S=>{const M=dd(this.datum);wg(M)&&(Xl(M)&&S.position==="center"&&(S.position="inside"),M.text.set(S),t.update())}},updateTextInputBBox:{guard:g,action:u},toolbarPressSettings:{guard:x,action:S=>{t.showAnnotationSettings(this.active,S)}},reset:()=>{this.active!=null&&this.node?.toggleActive(!1),this.hovered=void 0,this.active=void 0,t.select(this.active,this.active),t.resetToIdle()},delete:()=>{this.active!=null&&(t.delete(this.active),!sh(this.datum)&&t.recordAction(`Delete ${this.datum?.type} annotation`))},deleteAll:()=>{t.deleteAll()},...n},dragging:{onEnter:(S,M)=>{if(this.active==null)return;const D=t.getAnnotationType(this.active);D&&(this.transitionRoot(D),this.transitionRoot("dragStart",M))},...r},translating:{onEnter:()=>{},translate:{guard:g,target:"translating",action:({translation:S})=>{t.startInteracting(),t.translate(this.active,S),t.update()}},translateEnd:{guard:g,target:"idle"},onExit:()=>{t.stopInteracting(),t.update(),t.recordAction("Translate annotation")}},"text-input":{onEnter:()=>{if(this.active==null)return;const S=dd(this.datum);!S||!("getTextInputCoords"in S)||(t.startInteracting(),t.showTextInput(this.active),S.visible=!1,t.update())},updateTextInputBBox:{guard:g,action:u},resize:{target:"idle",action:d},click:{target:"idle",action:d},drag:{target:"idle",action:d},textInput:[{guard:b2,target:"idle",action:p},{guard:S2,target:"idle",action:d}],color:{guard:g,action:l},fontSize:{guard:g,action:c},cancel:{target:"idle",action:p},onExit:()=>{t.stopInteracting(),t.hideTextInput();const S=this.active;if(this.active=this.hovered=void 0,t.select(this.active,S),S==null)return;const M=t.datum(S),D=t.node(S);!M||!D||(M.visible=!0)}}}),this.setActive=e,this.debug=clt.create(!0,"annotations"),this.snapping=!1}};m([rlt({changeValue(t){this.setActive(t)}}),Yr()],fh.prototype,"active",2),m([Yr()],fh.prototype,"hovered",2),m([Yr()],fh.prototype,"hoverCoords",2),m([Yr()],fh.prototype,"copied",2),m([Yr()],fh.prototype,"snapping",2),m([Yr()],fh.prototype,"datum",2),m([Yr()],fh.prototype,"node",2);var R2=(E(),C(w)),{ARRAY:dlt,BOOLEAN:plt,UNION:glt,POSITIVE_NUMBER:flt,ActionOnSet:mlt,LayoutElement:ylt,Menu:xlt,PropertiesArray:blt,ToolbarButtonProperties:Slt,TempValidate:M0,ChartAxisDirection:vlt}=R2._ModuleSupport,_W=class extends Slt{};m([M0(glt(["line-menu","fibonacci-menu","text-menu","shape-menu","measurer-menu","clear"]))],_W.prototype,"value",2);var D0=class extends R2._ModuleSupport.BaseProperties{constructor(t){super(),this.ctx=t,this.enabled=!0,this.padding=20,this.buttons=new blt(_W),this.events=new R2._ModuleSupport.Listeners,this.annotationMenu=new xlt(this.ctx,"annotations"),this.destroyFns=[],this.toolbar=t.sharedToolbar.getSharedToolbar("annotations");const e=this.onKeyDown.bind(this);this.toolbar.addListener("keydown",e),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onToolbarButtonPress.bind(this)),t.layoutManager.registerElement(ylt.ToolbarLeft,this.onLayoutStart.bind(this)),()=>{this.toolbar.removeListener("keydown",e),this.toolbar.destroy()})}destroy(){for(const t of this.destroyFns)t()}addListener(t,e){return this.events.addListener(t,e)}toggleVisibility(t){this.toolbar.setHidden(!t)}toggleClearButtonEnabled(t){const e=this.buttons.findIndex(i=>i.value==="clear");this.toolbar.toggleButtonEnabledByIndex(e,t)}resetButtonIcons(){for(const[t,e]of this.buttons.entries())switch(e.value){case"line-menu":this.updateButtonByIndex(t,{icon:"trend-line-drawing",value:"line-menu"});break;case"fibonacci-menu":this.updateButtonByIndex(t,{icon:"fibonacci-retracement-drawing",value:"fibonacci-menu"});break;case"text-menu":this.updateButtonByIndex(t,{icon:"text-annotation",value:"text-menu"});break;case"shape-menu":this.updateButtonByIndex(t,{icon:"arrow-drawing",value:"shape-menu"});break;case"measurer-menu":this.updateButtonByIndex(t,{icon:"measurer-drawing",value:"measurer-menu"});break}}hideOverlays(){this.annotationMenu.hide()}clearActiveButton(){this.toolbar.clearActiveButton()}dispatch(t,e){this.events.dispatch(t,e)}onLayoutStart(t){this.enabled&&(this.toolbar.updateButtons(this.buttons),this.toolbar.layout(t.layoutBox,this.padding))}refreshButtonsEnabled(t){for(const[e,i]of this.buttons.entries())i&&this.toolbar.toggleButtonEnabledByIndex(e,t)}onToolbarButtonPress({event:t,button:e,buttonBounds:i}){const s=this.ctx.axisManager.getAxisContext(vlt.Y)[0].scale;switch(e.value){case"clear":this.dispatch("pressed-clear");break;case"line-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsLineAnnotations",rnt.filter(o=>o.visible?o.visible(s):!0));break;case"fibonacci-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsFibonacciAnnotations",lnt);break;case"text-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsTextAnnotations",hnt);break;case"shape-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsShapeAnnotations",unt);break;case"measurer-menu":this.onToolbarButtonPressShowMenu(t,i,e.value,"toolbarAnnotationsMeasurerAnnotations",dnt);break}}onToolbarButtonPressShowMenu(t,e,i,s,o){this.dispatch("pressed-show-menu");const a=this.buttons.findIndex(n=>n.value===i);this.toolbar.toggleActiveButtonByIndex(a),this.annotationMenu.setAnchor({x:e.x+e.width+6,y:e.y}),this.annotationMenu.show({items:o,ariaLabel:this.ctx.localeManager.t(s),class:"ag-charts-annotations__toolbar-menu",sourceEvent:t.sourceEvent,onPress:this.onButtonPressMenuCreateAnnotation.bind(this,i)})}onButtonPressMenuCreateAnnotation(t,e){const i=this.buttons.findIndex(s=>s.value===t);this.updateButtonByIndex(i,{icon:e.icon}),this.dispatch("pressed-create-annotation",{annotation:e.value}),this.annotationMenu.hide()}onKeyDown({sourceEvent:t}){t.key==="Escape"&&this.dispatch("cancel-create-annotation")}updateButtonByIndex(t,e){const i=this.buttons.at(t);i&&(i.set({...i.toJson(),...e,value:e.value??i.value}),this.toolbar.updateButtonByIndex(t,{...i.toJson()}))}};m([M0(plt),mlt({changeValue(t){this.toolbar?.setHidden(!t)}})],D0.prototype,"enabled",2),m([M0(flt)],D0.prototype,"padding",2),m([M0(dlt)],D0.prototype,"buttons",2);var RW=(E(),C(w)),{BaseModuleInstance:Mlt,InteractionState:Zy,TempValidate:Dlt,BOOLEAN:klt,ChartAxisDirection:Alt,getIconClassNames:Ilt}=RW._ModuleSupport,qy="ag-charts-annotations__axis-button",PW=class extends Mlt{constructor(t,e,i,s){super(),this.ctx=t,this.axisCtx=e,this.onButtonClick=i,this.seriesRect=s,this.enabled=!0,this.snap=!1,this.padding=0,this.button=this.setup(),this.toggleVisibility(!1),this.updateButtonElement(),this.snap=!!e.scale.bandwidth,t.domManager.addEventListener("focusin",({target:o})=>{const a=o instanceof HTMLElement?o:void 0;!(a&&t.domManager.contains(a,"series-area"))&&a!==this.button.getElement()&&this.hide()}),this.destroyFns.push(t.widgets.seriesWidget.addListener("drag-move",o=>this.onMouseDrag(o)),t.widgets.seriesWidget.addListener("mousemove",o=>this.onMouseMove(o)),t.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseLeave()),t.widgets.seriesDragInterpreter.addListener("click",o=>this.onClick(o)),t.chartEventManager.addListener("series-focus-change",()=>this.onKeyPress()),t.zoomManager.addListener("zoom-pan-start",()=>this.hide()),t.zoomManager.addListener("zoom-change",()=>this.hide()),()=>this.destroyElements(),()=>this.button.destroy())}update(t,e){this.seriesRect=t,this.padding=e}setup(){const t=new RW._Widget.ButtonWidget;return t.addClass(qy),t.setTabIndex(-1),t.setAriaLabel(this.ctx.localeManager.t("ariaLabelAddHorizontalLine")),this.ctx.widgets.seriesWidget.getElement().appendChild(t.getElement()),t}destroyElements(){this.ctx.domManager.removeChild("canvas-overlay",qy)}onMouseMove(t){this.ctx.interactionManager.isState(Zy.Clickable)&&this.show(t)}onMouseDrag(t){this.ctx.interactionManager.isState(Zy.AnnotationsMoveable)&&this.show(t)}onMouseLeave(){this.ctx.interactionManager.isState(Zy.Clickable)&&this.hide()}onClick(t){this.ctx.interactionManager.isState(Zy.Clickable)&&t.device==="touch"&&this.show(t)}show(t){const{sourceEvent:e,currentX:i,currentY:s}=t;if(!(this.enabled&&this.ctx.widgets.seriesWidget.getElement().contains(e.target))){this.hide();return}this.toggleVisibility(!0);const o=this.getButtonCoordinates({x:i,y:s});this.coords={x:o.x+this.button.clientWidth/2,y:o.y+this.button.clientHeight/2},this.updatePosition(o)}hide(){this.toggleVisibility(!1)}onKeyPress(){this.snap&&this.ctx.interactionManager.isState(Zy.Default)||this.hide()}getButtonCoordinates({x:t,y:e}){const{axisCtx:{direction:i,position:s},seriesRect:o,snap:a,axisCtx:n,padding:r}=this,{clientWidth:l,clientHeight:c}=this.button,[h,u]=[0,o.height],[d,p]=[0,o.width];if(a&&(t=Vl(FM(t-o.x,n),n)+o.x,e=Vl(FM(e-o.y,n),n)+o.y),i===Alt.X){const f=c-Math.max(0,r-5);t=t-l/2,e=s==="top"?h-c+f:u-f}else{const f=l-Math.max(0,r-9);t=s==="left"?d-l+f:p-f,e=e-c/2}return{x:t,y:e}}toggleVisibility(t){const{button:e}=this;if(e==null)return;const i=this.enabled&&t;this.toggleClass("-hidden",!i)}toggleClass(t,e){this.button.toggleClass(`${qy}-${t}`,e)}updatePosition({x:t,y:e}){this.button.getElement().style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`}updateButtonElement(){const{button:t}=this;t.addListener("click",()=>this.onButtonClick(this.coords)),t.addListener("touchend",()=>this.onButtonClick(this.coords)),t.addListener("drag-start",()=>{}),t.setInnerHTML(`<span class="${Ilt("zoom-in")} ${qy}-icon"></span>`)}};m([Dlt(klt)],PW.prototype,"enabled",2);var Tlt=(E(),C(w)),Clt=(E(),C(w)),dn=(P(),C(et)),{Color:BW,DraggablePopover:Llt,NativeWidget:P2,Vec2:Qi,createButton:k0,createCheckbox:Nlt,createElementId:zW,createSelect:Olt,createTextArea:wlt,initRovingTabIndex:FW,getIconClassNames:Elt,mapValues:B2,setAttribute:_lt,setAttributes:z2}=Clt._ModuleSupport,GW=class _E extends Llt{constructor(e,i){super(e,i),this.dragHandleDraggingClass="ag-charts-dialog__drag-handle--dragging",this.colorPicker=new MV(this.ctx,{detached:!0}),this.destroyFns.push(e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)))}showWithChildren(e,i){const s=super.showWithChildren(e,i);return s.classList.add("ag-charts-dialog"),s.setAttribute("role","dialog"),s.addEventListener("mousedown",o=>{o.target.classList?.contains("ag-charts-dialog__color-picker-button")||this.colorPicker.hide()}),s.addEventListener("keydown",this.onKeyDown.bind(this)),(0,dn.getWindow)().requestAnimationFrame(()=>this.reposition()),this.colorPicker.attachTo(this),s}updatePosition(e){super.updatePosition(e);const{anchor:i,fallbackAnchor:s}=this.getColorPickerAnchors()??{};i&&this.colorPicker.setAnchor(i,s)}createTabs(e,i,s){const o=(0,dn.createElement)("div","ag-charts-dialog__tabs"),a=B2(s,()=>zW("ag-charts-dialog__tab")),n=B2(s,()=>zW("ag-charts-dialog__tab-panel"));for(const[p,g]of(0,dn.entries)(s))z2(g.panel,{id:n[p],role:"tabpanel","aria-labelledby":a[p]});const r=p=>{for(const[g,f]of(0,dn.entries)(s))f.panel.classList.toggle("ag-charts-dialog__tab-panel--active",g===p),h[g].classList.toggle("ag-charts-dialog__tab-button--active",g===p),_lt(h[g],"aria-selected",g===p),g===p&&f.onShow?.()},l=new P2((0,dn.createElement)("div","ag-charts-dialog__header"));l.addListener("drag-start",p=>{const{sourceEvent:g}=p;g.target instanceof Element&&g.target.classList.contains("ag-charts-dialog__header")&&this.onDragStart(p)}),l.addListener("drag-move",p=>this.onDragMove(p)),l.addListener("drag-end",()=>this.onDragEnd());const c=new Plt;this.setDragHandle(c);const h=B2(s,(p,g)=>k0({label:this.ctx.localeManager.t(p.label),onPress:()=>r(g)},{id:a[g],class:"ag-charts-dialog__tab-button",role:"tab","aria-controls":n[g]})),u=(0,dn.createElement)("div","ag-charts-dialog__tab-list");z2(u,{role:"tablist","aria-label":this.ctx.localeManager.t(e)}),u.append(...Object.values(h));const d=this.createHeaderCloseButton();return l.getElement().append(c.getElement(),u,d),o.append(l.getElement(),...Object.values(s).map(p=>p.panel)),r(i),FW({orientation:"horizontal",buttons:Object.values(h)}),{tabs:o,initialFocus:h[i]}}createTabPanel(){return(0,dn.createElement)("div","ag-charts-dialog__tab-panel")}createInputGroupLine(){return(0,dn.createElement)("div","ag-charts-dialog__input-group-line")}createRadioGroup({label:e,options:i,value:s,onChange:o}){const a=this.createInputGroup(e);z2(a,{role:"radiogroup",tabindex:-1,"aria-label":this.ctx.localeManager.t(e)});const n="ag-charts-dialog__button--active",r=[];for(const l of i){const{icon:c,altText:h}=l,u=this.ctx.localeManager.t(h),d=k0({icon:c,altText:u,onPress:()=>{for(const p of Array.from(a.children))p.classList.remove(n),p.ariaChecked="false";d.classList.add(n),d.ariaChecked="true",o(l.value)}},{"aria-checked":l.value===s,class:"ag-charts-dialog__button",role:"radio",title:u});l.value===s&&d.classList.add(n),a.appendChild(d),r.push(d)}return FW({orientation:"horizontal",buttons:r}),a}createSelect({altText:e,label:i,options:s,value:o,onChange:a}){const n=this.createInputGroup(i),r=this.ctx.localeManager.t(e),l=Olt({value:o,options:s,onChange:a},{class:"ag-charts-dialog__select","aria-label":r,title:r});return n.append(l),n}createTextArea({placeholder:e,value:i,onChange:s}){const o=e?this.ctx.localeManager.t(e):void 0;return wlt({value:i,onChange:s},{placeholder:o})}createCheckbox({label:e,checked:i,onChange:s}){const o=`ag-charts__${e}`,a=this.createInputGroup(e,{for:o}),n=Nlt({checked:i,onChange:s},{class:"ag-charts-dialog__checkbox",role:"switch",id:o});return a.append(n),a}createColorPicker({color:e,opacity:i,label:s,altText:o,onChange:a,onChangeHide:n,isMultiColor:r,hasMultiColorOption:l}){const c=this.createInputGroup(s),h=this.ctx.localeManager.t(o),u=k0({label:h,onPress:d=>{const{anchor:p,fallbackAnchor:g}=this.getColorPickerAnchors(u)??{};this.colorPicker.show({anchor:p,fallbackAnchor:g,color:e,opacity:i,isMultiColor:r,hasMultiColorOption:l,sourceEvent:d,onChange:(f,x,y,b)=>{u.style.setProperty("--color",f),u.classList.toggle("ag-charts-dialog__color-picker-button--multi-color",b),a(f,x,y,b)},onChangeHide:n})}},{"aria-label":h,tabindex:0,class:"ag-charts-dialog__color-picker-button",title:h});if(r)u.classList.toggle("ag-charts-dialog__color-picker-button--multi-color");else if(e){const d=BW.fromString(e),p=new BW(d.r,d.g,d.b,i);u.style.setProperty("--color",p.toHexString())}return c.append(u),this.hideFns.push(()=>{this.colorPicker.hide()}),c}createHeaderCloseButton(){return k0({icon:"close",altText:this.ctx.localeManager.t("iconAltTextClose"),onPress:()=>this.hide()},{class:"ag-charts-dialog__close-button"})}createInputGroup(e,i){const s=(0,dn.createElement)("div","ag-charts-dialog__input-group"),o=(0,dn.createElement)("label","ag-charts-dialog__input-group-label");return o.innerText=this.ctx.localeManager.t(e),i?.for&&o.setAttribute("for",i.for),s.appendChild(o),s}onLayoutComplete(e){this.seriesRect=e.series.paddedRect,this.reposition()}onKeyDown(e){e.altKey||e.ctrlKey||e.metaKey||e.isComposing||e.key!=="Escape"||this.hide()}reposition(){const{seriesRect:e,ctx:i}=this,s=i.domManager.getBoundingClientRect(),o=this.getPopoverElement();if(!e||!o)return;const a=Qi.from(0,e.y),n=Qi.from(s.width,e.height),r=Qi.from(o),l=Qi.from(.5,1);let c;if(e.width>1e3){const h=Qi.sub(Qi.add(a,Qi.multiply(n,l)),Qi.multiply(r,l));c=Qi.sub(h,Qi.from(0,_E.offset))}else{const h=Qi.sub(Qi.add(a,n),r);c=Qi.sub(h,_E.offset)}this.updatePosition(c)}getColorPickerAnchors(e){if(e&&(this.colorPickerAnchorElement=e),!this.colorPickerAnchorElement)return;const i=this.colorPickerAnchorElement.getBoundingClientRect(),s=this.ctx.domManager.getBoundingClientRect(),o=Qi.sub(Qi.from(i.x,i.y),Qi.from(s.left,s.top)),a=Qi.add(o,Qi.from(0,i.height+5)),n=Qi.sub(o,Qi.from(0,5));return{anchor:a,fallbackAnchor:n}}};GW.offset=60;var Rlt=GW,Plt=class extends P2{constructor(){super((0,dn.createElement)("div","ag-charts-dialog__drag-handle"));const t=new P2((0,dn.createElement)("span",Elt("drag-handle")));t.setAriaHidden(!0),this.addChild(t)}},{Listeners:Blt,focusCursorAtEnd:zlt}=Tlt._ModuleSupport,Flt=class extends Rlt{constructor(t){super(t,"settings"),this.events=new Blt,this.hideFns.push(()=>this.events.dispatch("hidden"))}addListener(t,e){return this.events.addListener(t,e)}show(t,e){const i=this.createLinearLineTab(t,e),s=this.createLinearTextTab(t,e);let o="dialogHeaderLine";Xl(t)?o="dialogHeaderChannel":yV(t)?o="dialogHeaderFibonacciRange":t.type==="date-range"?o="dialogHeaderDateRange":t.type==="price-range"?o="dialogHeaderPriceRange":t.type==="date-price-range"&&(o="dialogHeaderDatePriceRange");const{tabs:a,initialFocus:n}=this.createTabs("ariaLabelSettingsTabBar",e.initialSelectedTab,{line:{label:o,panel:i},text:{label:"dialogHeaderText",panel:s.panel,onShow:s.onShow}});e.initialFocus=n,this.showWithChildren([a],e).classList.add("ag-charts-dialog--annotation-settings")}createLinearLineTab(t,e){const i=this.createTabPanel(),s=this.createInputGroupLine(),o=this.createInputGroupLine(),a="isMultiColor"in t,n=this.createColorPickerInput("line-color",t.getDefaultColor("line-color"),t.getDefaultOpacity("line-color"),a?t.isMultiColor:!1,a,e.onChangeLineColor,e.onChangeHideLineColor),r=this.createStrokeWidthSelect(t.strokeWidth??2,e.onChangeLineStyleWidth),l=this.createLineStyleRadioGroup(t.lineStyle??"solid",e.onChangeLineStyleType);if(s.append(n),"background"in t){const c=this.createColorPickerInput("fill-color",t.getDefaultColor("fill-color"),t.getDefaultOpacity("fill-color"),!1,!1,e.onChangeFillColor,e.onChangeHideFillColor);s.append(c),o.append(r)}else"showFill"in t?(s.append(this.createCheckbox({label:"dialogInputShowFill",checked:t.showFill??!0,onChange:c=>e.onChangeLine({showFill:c})})),o.append(r)):s.append(r);return o.append(l),i.append(s,o),"bands"in t&&i.append(this.createFibonacciRatioSelect(t.bands??10,c=>e.onChangeLine({bands:c}))),"extendStart"in t&&"extendEnd"in t&&i.append(this.createCheckbox({label:Xl(t)?"dialogInputExtendChannelStart":"dialogInputExtendLineStart",checked:t.extendStart??!1,onChange:c=>e.onChangeLine({extendStart:c})}),this.createCheckbox({label:Xl(t)?"dialogInputExtendChannelEnd":"dialogInputExtendLineEnd",checked:t.extendEnd??!1,onChange:c=>e.onChangeLine({extendEnd:c})})),"extendAbove"in t&&"extendBelow"in t&&i.append(this.createCheckbox({label:"dialogInputExtendAbove",checked:t.extendAbove??!1,onChange:c=>e.onChangeLine({extendAbove:c})}),this.createCheckbox({label:"dialogInputExtendBelow",checked:t.extendBelow??!1,onChange:c=>e.onChangeLine({extendBelow:c})})),"extendLeft"in t&&"extendRight"in t&&i.append(this.createCheckbox({label:"dialogInputExtendLeft",checked:t.extendLeft??!1,onChange:c=>e.onChangeLine({extendLeft:c})}),this.createCheckbox({label:"dialogInputExtendRight",checked:t.extendRight??!1,onChange:c=>e.onChangeLine({extendRight:c})})),"reverse"in t&&"showFill"in t&&i.append(this.createCheckbox({label:"dialogInputReverse",checked:t.reverse??!1,onChange:c=>e.onChangeLine({reverse:c})})),i}createLinearTextTab(t,e){const i=this.createTabPanel(),s=this.createTextArea({placeholder:"inputTextareaPlaceholder",value:t.text.label,onChange:h=>e.onChangeText({label:h})}),o=this.createFontSizeSelect(t.text.fontSize,e.onChangeTextFontSize),a=this.createColorPickerInput("text-color",t.text.color,1,!1,!1,e.onChangeTextColor,e.onChangeHideTextColor),n=t.text.position==="inside"?"center":t.text.position,r=this.createPositionRadioGroup(n??"top",h=>e.onChangeText({position:h})),l=this.createAlignmentRadioGroup(t.text.alignment??"center",h=>e.onChangeText({alignment:h})),c=this.createInputGroupLine();return c.append(o,a,r,l),i.append(s,c),{panel:i,onShow:()=>zlt(s)}}createColorPickerInput(t,e,i,s,o,a,n){const r=t==="fill-color"?"dialogInputFillColorPicker":"dialogInputColorPicker",l=t==="fill-color"?"dialogInputFillColorPickerAltText":"dialogInputColorPickerAltText";return this.createColorPicker({label:r,altText:l,color:e,opacity:i,isMultiColor:s,hasMultiColorOption:o,onChange:a,onChangeHide:n})}createStrokeWidthSelect(t,e){return this.createSelect({label:"dialogInputStrokeWidth",altText:"dialogInputStrokeWidthAltText",options:AV.map(({label:i,value:s})=>({label:i,value:`${s}`})),value:String(t),onChange:i=>e(Number(i))})}createFibonacciRatioSelect(t,e){return this.createSelect({label:"dialogInputFibonacciBands",altText:"dialogInputFibonacciBandsAltText",options:cnt.map(({label:i,value:s})=>({label:i,value:`${s}`})),value:String(t),onChange:i=>e(Number(i))})}createLineStyleRadioGroup(t,e){return this.createRadioGroup({label:"dialogInputLineStyle",options:[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],value:t,onChange:e})}createFontSizeSelect(t,e){return this.createSelect({label:"dialogInputFontSize",altText:"dialogInputFontSizeAltText",options:IV.map(({label:i,value:s})=>({label:i,value:String(s)})),value:String(t),onChange:i=>e(Number(i))})}createPositionRadioGroup(t,e){return this.createRadioGroup({label:"dialogInputPosition",options:[{icon:"position-top",altText:"iconAltTextPositionTop",value:"top"},{icon:"position-center",altText:"iconAltTextPositionCenter",value:"center"},{icon:"position-bottom",altText:"iconAltTextPositionBottom",value:"bottom"}],value:t,onChange:e})}createAlignmentRadioGroup(t,e){return this.createRadioGroup({label:"dialogInputAlign",options:[{icon:"align-left",altText:"iconAltTextAlignLeft",value:"left"},{icon:"align-center",altText:"iconAltTextAlignCenter",value:"center"},{icon:"align-right",altText:"iconAltTextAlignRight",value:"right"}],value:t,onChange:e})}};function F2(t){return t.gridPadding+t.seriesAreaPadding+t.tickSize+t.label.spacing}function Glt(t,e,i){for(const{update:s}of Object.values(Ta))s(t,e,i)}var{BOOLEAN:jW,OBJECT:G2,ChartUpdateType:jlt,InteractionState:Qo,ObserveChanges:Vlt,PropertiesArray:Wlt,TempValidate:Qy,ChartAxisDirection:Ult,Vec2:pd,keyProperty:Hlt,valueProperty:Ylt,Selection:Klt,BBox:$lt}=PM._ModuleSupport,Wg=class p6 extends PM._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!0,this.toolbar=new D0(this.ctx),this.optionsToolbar=new p2(this.ctx,()=>{const i=this.state.getActive();if(i!=null)return dd(this.annotationData.at(i))}),this.axesButtons=new jN,this.snap=!1,this.data=void 0,this.xKey=void 0,this.volumeKey=void 0,this.annotationData=new Wlt(p6.createAnnotationDatum),this.defaults=new ant,this.container=new PM._ModuleSupport.Group({name:"static-annotations"}),this.annotations=new Klt(this.container,this.createAnnotationScene.bind(this)),this.settingsDialog=new Flt(this.ctx),this.textInput=new lot(this.ctx),this.isRestoringAnnotations=!0,this.postUpdateFns=[],this.state=this.setupStateMachine(),this.setupListeners(),this.setupDOM(),this.ctx.historyManager.addMementoOriginator(e.annotationManager),this.ctx.historyManager.addMementoOriginator(this.defaults),this.textInput.setKeyDownHandler(this.onTextInput.bind(this))}setupStateMachine(){const{ctx:e}=this;return new v0({resetToIdle:()=>{e.domManager.updateCursor("annotations"),this.popAnnotationState(Qo.Annotations),this.hideOverlays(),this.optionsToolbar.hide(),this.deleteEphemeralAnnotations(),this.update()},hoverAtCoords:(i,s,o)=>{let a;return this.annotations.each((n,r,l)=>{const c=n.containsPoint(i.x,i.y);c&&(a??(a=l)),n.toggleHovered(c||s===l)}),a!=null?e.tooltipManager.suppressTooltip("annotations"):this.isAnnotationState()||e.tooltipManager.unsuppressTooltip("annotations"),this.ctx.domManager.updateCursor("annotations",a==null?void 0:this.annotations.at(a)?.getCursor()),a!==o&&this.update(),a},getNodeAtCoords:(i,s)=>{const o=this.annotations.at(s);if(o)return o.getNodeAtCoords(i.x,i.y)},translate:(i,s)=>{const o=this.annotations.at(i),a=dd(this.annotationData.at(i));if(!(!o||!a))return this.translateNode(o,a,s)},copy:i=>{const s=this.annotations.at(i),o=dd(this.annotationData.at(i));if(!(!s||!o))return this.createAnnotationDatumCopy(s,o)},paste:i=>{this.createAnnotation(i.type,i,!1),this.postUpdateFns.push(()=>{this.state.transitionAsync("selectLast"),this.state.transitionAsync("copy")})},select:(i,s)=>{const{annotations:o,optionsToolbar:a,toolbar:n}=this;this.hideOverlays(),n.clearActiveButton(),n.resetButtonIcons();const r=i!=null?o.at(i):null,l=s!=null?o.at(s):null;l===r&&r!=null||(l?.toggleActive(!1),a.hide(),r?(this.pushAnnotationState(Qo.AnnotationsSelected),r.toggleActive(!0),a.updateButtons(this.annotationData.at(i)),this.postUpdateFns.push(()=>{a.show(),a.setAnchorScene(r)})):(this.popAnnotationState(Qo.AnnotationsSelected),this.popAnnotationState(Qo.Annotations)),this.deleteEphemeralAnnotations(),this.update())},selectLast:()=>(this.pushAnnotationState(Qo.AnnotationsSelected),this.annotationData.length-1),startInteracting:()=>{this.pushAnnotationState(Qo.Annotations)},stopInteracting:()=>{this.popAnnotationState(Qo.Annotations)},create:(i,s)=>{this.createAnnotation(i,s)},delete:i=>{this.annotationData.splice(i,1)},deleteAll:()=>{this.annotationData.splice(0,this.annotationData.length)},validatePoint:(i,s)=>{const o=this.getAnnotationContext();return o?Og(o,i,s):!0},getAnnotationType:i=>mot(this.annotationData[i].type),datum:i=>this.annotationData.at(i),node:i=>this.annotations.at(i),recordAction:i=>{this.recordActionAfterNextUpdate(i)},update:()=>{this.postUpdateFns.push(()=>{const i=this.state.getActive(),s=i!=null?this.annotations.at(i):null;s!=null&&this.optionsToolbar.setAnchorScene(s)}),this.update()},showTextInput:i=>{const s=dd(this.annotationData.at(i));if(!this.annotations.at(i)||!s||!("getTextInputCoords"in s)||!("getTextPosition"in s))return;const a={color:s.color,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight,placeholderColor:s.getPlaceholderColor()},n=this.getAnnotationContext(),r=c=>pd.add(s.getTextInputCoords(n,c),pd.required(this.seriesRect)),l=()=>s.getTextPosition();this.textInput.show({styles:a,layout:{getTextInputCoords:r,getTextPosition:l,alignment:s.alignment,textAlign:s.textAlign,width:s.width},text:s.text,placeholderText:s.placeholderText,onChange:(c,h)=>{this.state.transition("updateTextInputBBox",h)}}),this.ctx.domManager.updateCursor("annotations")},hideTextInput:()=>{this.textInput.hide()},updateTextInputColor:i=>{this.textInput.updateColor(i)},updateTextInputFontSize:i=>{const s=this.textInput.updateFontSize(i);this.state.transition("updateTextInputBBox",s)},updateTextInputBBox:i=>{this.state.transition("updateTextInputBBox",i)},showAnnotationOptions:i=>{const s=this.annotations.at(i);!s||sh(this.annotationData.at(i))||(this.optionsToolbar.updateButtons(this.annotationData.at(i)),this.optionsToolbar.show(),this.optionsToolbar.setAnchorScene(s))},showAnnotationSettings:(i,s,o="line")=>{const a=this.annotationData.at(i);if(!ZM(a)&&!Xl(a)&&!Wy(a)||sh(a))return;const n=c=>(h,u,d,p)=>{this.setColorAndDefault(a.type,c,h,u,d,p),this.optionsToolbar.updateColorPickerColor(c,u,d,p)},r=c=>()=>{this.recordActionAfterNextUpdate(`Change ${a.type} ${c} to ${a.getDefaultColor(c)}`,["annotations","defaults"]),this.update()},l={initialSelectedTab:o,ariaLabel:this.ctx.localeManager.t("ariaLabelAnnotationSettingsDialog"),sourceEvent:s,onChangeLine:c=>{this.state.transition("lineProps",c),c.bands!=null&&this.defaults.setDefaultFibonacciOptions(a.type,"bands",c.bands),c.reverse!=null&&this.defaults.setDefaultFibonacciOptions(a.type,"reverse",c.reverse),c.showFill!=null&&this.defaults.setDefaultFibonacciOptions(a.type,"showFill",c.showFill)},onChangeText:c=>{this.state.transition("lineText",c),c.alignment&&this.defaults.setDefaultLineTextAlignment(a.type,c.alignment),c.position&&this.defaults.setDefaultLineTextPosition(a.type,c.position),this.recordActionAfterNextUpdate(`Change ${a.type} text ${Object.keys(c).map(h=>`${h} to ${c[h]}`).join(", ")}`)},onChangeFillColor:n("fill-color"),onChangeHideFillColor:r("fill-color"),onChangeLineColor:n("line-color"),onChangeHideLineColor:r("line-color"),onChangeLineStyleType:c=>{this.setLineStyleTypeAndDefault(a.type,c),this.optionsToolbar.updateLineStyleType(Hy.find(h=>h.value===c)??Hy[0])},onChangeLineStyleWidth:c=>{this.setLineStyleWidthAndDefault(a.type,c),this.optionsToolbar.updateStrokeWidth({strokeWidth:c,value:c,label:String(c)})},onChangeTextColor:n("text-color"),onChangeHideTextColor:r("text-color"),onChangeTextFontSize:c=>{this.setFontSizeAndDefault(a.type,c)}};this.settingsDialog.show(a,l)}})}setupListeners(){const{ctx:e,optionsToolbar:i,settingsDialog:s,toolbar:o}=this,{seriesWidget:a,seriesDragInterpreter:n,chartWidget:r}=e.widgets;this.destroyFns.push(n.addListener("click",this.hoverTouchPreHandler.bind(this)),n.addListener("drag-start",this.hoverTouchPreHandler.bind(this)),n.addListener("drag-move",this.dragMoveTouchPreHandler.bind(this)),n.addListener("mousemove",this.onHover.bind(this)),n.addListener("click",this.onClick.bind(this)),n.addListener("dblclick",this.onDoubleClick.bind(this)),n.addListener("drag-start",this.onDragStart.bind(this)),n.addListener("drag-move",this.onDrag.bind(this)),n.addListener("drag-end",this.onDragEnd.bind(this)),a.addListener("keydown",this.onKeyDown.bind(this)),a.addListener("keyup",this.onKeyUp.bind(this)),r.addListener("click",this.onCancel.bind(this)),e.annotationManager.addListener("restore-annotations",this.onRestoreAnnotations.bind(this)),e.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),e.updateService.addListener("pre-scene-render",this.onPreRender.bind(this)),e.zoomManager.addListener("zoom-change",()=>this.onResize()),e.domManager.addListener("resize",()=>this.onResize()),o.addListener("cancel-create-annotation",()=>{this.cancel(),this.reset(),this.update()}),o.addListener("pressed-create-annotation",({annotation:l})=>{this.cancel(),this.pushAnnotationState(Qo.Annotations),this.state.transition(l),this.update()}),o.addListener("pressed-clear",()=>{this.clear(),this.recordActionAfterNextUpdate("Clear all")}),o.addListener("pressed-show-menu",()=>{this.cancel(),this.reset()}),o.addListener("pressed-unrelated",()=>{this.reset()}),i.addListener("pressed-delete",()=>{this.cancel(),this.delete(),this.reset()}),i.addListener("pressed-settings",({sourceEvent:l})=>{this.state.transition("toolbarPressSettings",l)}),i.addListener("pressed-lock",()=>{this.update()}),i.addListener("hid-overlays",()=>{this.settingsDialog.hide()}),i.addListener("saved-color",({type:l,colorPickerType:c,color:h})=>{this.recordActionAfterNextUpdate(`Change ${l} ${c} to ${h}`,["annotations","defaults"])}),i.addListener("updated-color",({type:l,colorPickerType:c,colorOpacity:h,color:u,opacity:d,isMultiColor:p})=>{this.setColorAndDefault(l,c,h,u,d,p)}),i.addListener("updated-font-size",({type:l,fontSize:c})=>{this.setFontSizeAndDefault(l,c)}),i.addListener("updated-line-style",({type:l,lineStyleType:c})=>{this.setLineStyleTypeAndDefault(l,c)}),i.addListener("updated-line-width",({type:l,strokeWidth:c})=>{this.setLineStyleWidthAndDefault(l,c)}),s.addListener("hidden",()=>{this.optionsToolbar.clearActiveButton()}))}setupDOM(){const{ctx:e,toolbar:i}=this;this.destroyFns.push(e.annotationManager.attachNode(this.container),()=>e.domManager.removeStyles(qy),()=>i.destroy())}async processData(e){if(!this.enabled||this.data==null||this.xKey==null||this.volumeKey==null)return;const i=[Hlt(this.xKey,void 0,{id:"date"}),Ylt(this.volumeKey,"number",{id:"volume"})],{dataModel:s,processedData:o}=await e.request("annotations",this.data,{props:i});this.dataModel=s,this.processedData=o}createAnnotationScene(e){if(e.type in Ta)return new Ta[e.type].scene;throw new Error(`AG Charts - Cannot create annotation scene of type [${e.type}], expected one of [${Object.keys(Ta)}], ignoring.`)}static createAnnotationDatum(e){if(e.type in Ta)return new Ta[e.type].datum().set(e);throw new Error(`AG Charts - Cannot create annotation datum of unknown type [${e.type}], expected one of [${Object.keys(Ta)}], ignoring.`)}createAnnotation(e,i,s=!0){if(this.annotationData.push(i),s){const o=this.ctx.annotationManager.getAnnotationTypeStyles(e);o&&i.set(o),this.defaults.applyDefaults(i)}this.injectDatumDependencies(i),this.update()}injectDatumDependencies(e){"setLocaleManager"in e&&e.setLocaleManager(this.ctx.localeManager),"getVolume"in e&&(e.getVolume=this.getDatumRangeVolume.bind(this))}getDatumRangeVolume(e,i){const{dataModel:s,processedData:o}=this;let a=Ei(e),n=Ei(i);if(!(0,GN.isValidDate)(a)||!(0,GN.isValidDate)(n)||!s||!o||this.volumeKey==null)return;a>n&&([a,n]=[n,a]);const r=s.resolveKeysById({id:"annotations"},"date",o),l=s.resolveColumnById({id:"annotations"},"volume",o);let c=0;for(let h=0;h<o.input.count;h++){const u=r[h];(0,GN.isValidDate)(u)&&u>=a&&u<=n&&(c+=l[h])}return c}translateNode(e,i,s){const o=this.getAnnotationConfig(i),a=this.getAnnotationContext();a&&o.translate(e,i,s,a)}createAnnotationDatumCopy(e,i){const s=this.getAnnotationConfig(i),o=new s.datum;o.set(i.toJson());const a=this.getAnnotationContext();if(a)return s.copy(e,i,o,a)}getAnnotationConfig(e){if(e.type in Ta)return Ta[e.type];throw new Error(`AG Charts - Cannot get annotation config of unknown type [${e.type}], expected one of [${Object.keys(Ta)}], ignoring.`)}onRestoreAnnotations(e){this.enabled&&(this.clear(),this.annotationData.set(e.annotations),this.isRestoringAnnotations=!0,this.postUpdateFns.push(()=>{this.ctx.annotationManager.fireChangedEvent()}),this.update())}onLayoutComplete(e){const i=e.series.paddedRect;this.seriesRect=i,this.container.setClipRect(i);for(const s of e.axes??[])s.direction===PM._ModuleSupport.ChartAxisDirection.X?this.xAxis=this.getAxis(s,i,this.xAxis?.button):this.yAxis=this.getAxis(s,i,this.yAxis?.button);this.showAnnotations()?this.animateAnnotations({from:0,to:1,phase:"trailing"}):this.animateAnnotations({from:1,to:0,phase:"remove"})}showAnnotations(){if(!this.yAxis||!this.xAxis)return!1;const e=this.ctx.chartService.series.some(o=>o.hasData),s=this.yAxis.context.seriesIds().some(o=>this.ctx.chartService.series.find(n=>n.id===o)?.visible);return e&&s}animateAnnotations({from:e,to:i,phase:s}){const{annotations:o}=this;this.ctx.animationManager?.animate({from:e,to:i,id:"chart-annotations",phase:s,groupId:"opacity",onUpdate(a){o.each(n=>{n.opacity=a,"setAxisLabelOpacity"in n&&n.setAxisLabelOpacity(a)})},onStop(){o.each(a=>{a.opacity=i,"setAxisLabelOpacity"in a&&a.setAxisLabelOpacity(i)})}})}onPreRender(){this.updateAnnotations(),this.state.transition("render")}getAxis(e,i,s){const o=this.ctx.axisManager.getAxisContext(e.direction)[0],{position:a="bottom",direction:n}=o,r=e.gridPadding+e.seriesAreaPadding,l=new $lt(0,0,i.width,i.height).grow(r,a),c=o.direction===Ult.X?"vertical":"horizontal",{axesButtons:h,snap:u}=this;if(this.enabled&&h.enabled&&(h.axes==="xy"||h.axes===n)){s??(s=new PW(this.ctx,{...o,snapToGroup:u},g=>this.onAxisButtonClick(g,c),i));const p=F2(e);s.update(i,p)}else s?.destroy(),s=void 0;return{layout:e,context:o,bounds:l,button:s}}recordActionAfterNextUpdate(e,i=["annotations"]){const{defaults:s,ctx:{annotationManager:o,historyManager:a}}=this,n=i.map(r=>r==="defaults"?s:o);this.postUpdateFns.push(()=>{a.record(e,...n),o.fireChangedEvent()})}setColorAndDefault(e,i,s,o,a,n){this.state.transition("color",{colorPickerType:i,colorOpacity:s,color:o,opacity:a,isMultiColor:n}),this.defaults.setDefaultColor(e,i,s,o,a,n)}setFontSizeAndDefault(e,i){this.state.transition("fontSize",i),this.defaults.setDefaultFontSize(e,i),this.recordActionAfterNextUpdate(`Change ${e} font size to ${i}`,["annotations","defaults"])}setLineStyleTypeAndDefault(e,i){this.state.transition("lineStyle",{type:i}),this.defaults.setDefaultLineStyleType(e,i),this.recordActionAfterNextUpdate(`Change ${e} line style to ${i}`,["annotations","defaults"])}setLineStyleWidthAndDefault(e,i){this.state.transition("lineStyle",{strokeWidth:i}),this.defaults.setDefaultLineStyleWidth(e,i),this.recordActionAfterNextUpdate(`Change ${e} stroke width to ${i}`,["annotations","defaults"])}updateAnnotations(){const{annotationData:e,annotations:i,seriesRect:s,ctx:{annotationManager:o}}=this,a=this.getAnnotationContext();if(!s||!a)return;o.updateData(e.toJson().filter(r=>!sh(r)));const n=this.showAnnotations();this.toolbar.refreshButtonsEnabled(n),this.toolbar.toggleClearButtonEnabled(e.length>0&&n),i.update(e??[],void 0,r=>r.id).each((r,l)=>{if(!n||!this.validateDatum(l)){r.visible=!1,"setAxisLabelVisible"in r&&r.setAxisLabelVisible(!1);return}"setAxisLabelVisible"in r&&r.setAxisLabelVisible(!0),this.injectDatumDependencies(l),Glt(r,l,a)}),this.postUpdateFns.forEach(r=>r()),this.postUpdateFns=[],this.isRestoringAnnotations=!1}validateDatum(e){if(!this.isRestoringAnnotations)return!0;const i=this.getAnnotationContext(),s=`Annotation [${e.type}] `;return i?e.isValidWithContext(i,s):!0}getAnnotationContext(){const{seriesRect:e,xAxis:i,yAxis:s,snap:o}=this;if(e&&i&&s)return{seriesRect:e,xAxis:{...i.context,bounds:i.bounds,labelPadding:F2(i.layout),snapToGroup:o},yAxis:{...s.context,bounds:s.bounds,labelPadding:F2(i.layout),snapToGroup:o}}}onHover(e){const{state:i}=this,s=this.getAnnotationContext();if(!s)return;const o=e.sourceEvent.shiftKey,a=pd.from(e),n=Co(a,s);i.transition("hover",{offset:a,point:n,shiftKey:o,context:s})}onClick(e){const{state:i}=this,s=this.getAnnotationContext();if(!s)return;const o=e.sourceEvent.shiftKey,a=Co(pd.from(e),s),n=this.textInput.getValue(),r=this.textInput.getBBox();i.transition("click",{point:a,shiftKey:o,textInputValue:n,bbox:r})}onDoubleClick(e){const{state:i}=this;if(!this.getAnnotationContext())return;const o=pd.from(e);i.transition("dblclick",{offset:o})}onAxisButtonClick(e,i){this.cancel(),this.reset();const s=this.getAnnotationContext();if(!this.annotationData||!s)return;const{state:o}=this;this.pushAnnotationState(Qo.Annotations);const a=i==="horizontal";if(o.transition(a?"horizontal-line":"vertical-line"),this.optionsToolbar.hide(),!e)return;const n=Co(e,s);Og(s,n)&&(o.transition("click",{point:n,shiftKey:!1}),this.update())}onResize(){const e=this.textInput.getValue(),i=this.textInput.getBBox();this.state.transition("resize",{textInputValue:e,bbox:i})}hoverTouchPreHandler(e){e.device==="touch"&&this.onHover(e)}dragMoveTouchPreHandler(e){e.device==="touch"&&this.ctx.interactionManager.isState(Qo.AnnotationsSelected)&&e.sourceEvent.preventDefault()}onDragStart(e){if(!this.ctx.interactionManager.isState(Qo.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const s=pd.from(e),o=Co(s,i),a=this.textInput.getValue(),n=this.textInput.getBBox();this.state.transition("dragStart",{context:i,offset:s,point:o,textInputValue:a,bbox:n})}onDrag(e){if(!this.ctx.interactionManager.isState(Qo.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const s=pd.from(e),o=Co(s,i),a=e.sourceEvent.shiftKey,n=this.textInput.getValue(),r=this.textInput.getBBox();this.state.transition("drag",{context:i,offset:s,point:o,shiftKey:a,textInputValue:n,bbox:r})}onDragEnd(){this.state.transition("dragEnd")}onCancel(e){const{sourceEvent:i}=e??{};i?.currentTarget===i?.target&&(this.cancel(),this.reset())}onDelete(){this.textInput.isVisible()||(this.cancel(),this.delete(),this.reset(),this.update())}onTextInput(e){const{state:i}=this,s=this.getAnnotationContext();if(!s)return;const{key:o,shiftKey:a}=e,n=this.textInput.getValue(),r=this.textInput.getBBox();i.transition("textInput",{key:o,shiftKey:a,textInputValue:n,bbox:r,context:s})}onKeyDown(e){const{state:i}=this,s=this.getAnnotationContext();if(!s)return;const{sourceEvent:o}=e,{shiftKey:a,ctrlKey:n,metaKey:r}=o,l=n||r,c=n||a;i.transition("keyDown",{shiftKey:a,context:s});const h={x:0,y:0},u=Math.max(s?.xAxis.scale.bandwidth??0,c?10:1),d=Math.max(s?.yAxis.scale.bandwidth??0,c?10:1);switch(o.key){case"ArrowDown":h.y=d;break;case"ArrowUp":h.y=-d;break;case"ArrowLeft":h.x=-u;break;case"ArrowRight":h.x=u;break;case"Escape":this.onCancel();return;case"Backspace":case"Delete":this.onDelete();return}if((h.x||h.y)&&(i.transition("translate",{translation:h}),o.stopPropagation(),o.preventDefault()),!!l)switch(o.key){case"c":i.transition("copy");return;case"x":i.transition("cut"),this.recordActionAfterNextUpdate("Cut annotation");return;case"v":i.transition("paste"),this.recordActionAfterNextUpdate("Paste annotation");return}}onKeyUp(e){const{shiftKey:i}=e.sourceEvent,s=this.getAnnotationContext();s&&(this.state.transition("keyUp",{shiftKey:i,context:s}),this.state.transition("translateEnd"))}clear(){this.cancel(),this.deleteAll(),this.reset()}reset(){this.state.transition("reset")}cancel(){this.state.transition("cancel")}delete(){this.state.transition("delete")}deleteAll(){this.state.transition("deleteAll")}deleteEphemeralAnnotations(){for(const[e,i]of this.annotationData.entries())sh(i)&&this.annotationData.splice(e,1)}hideOverlays(){this.settingsDialog.hide(),this.toolbar.hideOverlays(),this.optionsToolbar.hideOverlays()}pushAnnotationState(e){this.ctx.interactionManager.pushState(e),this.ctx.tooltipManager.suppressTooltip("annotations")}popAnnotationState(e){this.ctx.interactionManager.popState(e),this.ctx.tooltipManager.unsuppressTooltip("annotations")}isAnnotationState(){return this.ctx.interactionManager.isState(Qo.Annotations)||this.ctx.interactionManager.isState(Qo.AnnotationsSelected)}update(e=jlt.PRE_SCENE_RENDER){this.ctx.updateService.update(e)}};m([Vlt((t,e,i)=>{const{ctx:{annotationManager:s,stateManager:o}}=t;e!==i&&(t.toolbar?.toggleVisibility(!!e),i===!1&&e===!0?o.restoreState(s):e===!1&&t.clear())}),Qy(jW)],Wg.prototype,"enabled",2),m([Qy(G2)],Wg.prototype,"toolbar",2),m([Qy(G2)],Wg.prototype,"optionsToolbar",2),m([Qy(G2)],Wg.prototype,"axesButtons",2),m([Qy(jW)],Wg.prototype,"snap",2);var Xlt=Wg,Zlt=(E(),C(w)),{FONT_SIZE_RATIO:qlt,ThemeSymbols:hs}=Zlt._ModuleSupport,pn={stroke:{$ref:"foregroundColor"},strokeOpacity:1,strokeWidth:2},Fs={fill:hs.DEFAULT_ANNOTATION_HANDLE_FILL,strokeOpacity:1,strokeWidth:2},gd={color:{$ref:"backgroundColor"},fontSize:{$rem:[qlt.LARGE]},fontFamily:{$ref:"fontFamily"}},VW={...gd,enabled:!0,fill:{$ref:"foregroundColor"},fontSize:{$ref:"fontSize"}},A0={...gd,textAlign:"left"},fd={...gd,position:"top",alignment:"center",color:{$ref:"textColor"}},WW={...gd,position:"top",alignment:"center",color:{$ref:"textColor"}},j2={...gd,fontSize:{$ref:"fontSize"},color:hs.DEFAULT_ANNOTATION_STATISTICS_COLOR,fill:hs.DEFAULT_ANNOTATION_STATISTICS_FILL,stroke:hs.DEFAULT_ANNOTATION_STATISTICS_STROKE,strokeWidth:1,divider:{stroke:hs.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,strokeWidth:1,strokeOpacity:.5}},V2={...pn,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...Fs},text:{...fd},statistics:{...j2}},Qlt={buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}],padding:{$ref:"padding"}},Jlt={buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color"},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color"},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color"},{tooltip:"toolbarAnnotationsTextSize",value:"text-size"},{tooltip:"toolbarAnnotationsLineStrokeWidth",value:"line-stroke-width"},{icon:"line-style-solid",tooltip:"toolbarAnnotationsLineStyle",value:"line-style-type"},{icon:"settings",tooltip:"toolbarAnnotationsSettings",value:"settings"},{icon:"unlocked",tooltip:"toolbarAnnotationsLock",ariaLabel:"toolbarAnnotationsLock",checkedOverrides:{icon:"locked",tooltip:"toolbarAnnotationsUnlock"},value:"lock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]},tct={enabled:!1,line:{...pn,handle:{...Fs},text:{...fd}},"horizontal-line":{...pn,handle:{...Fs},axisLabel:{...VW},text:{...fd}},"vertical-line":{...pn,handle:{...Fs},axisLabel:{...VW},text:{...fd}},"disjoint-channel":{...pn,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...Fs},text:{...WW}},"parallel-channel":{...pn,middle:{lineDash:[6,5],strokeWidth:1},background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...Fs},text:{...WW}},"fibonacci-retracement":{...pn,strokes:hs.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...Fs},text:{...fd,position:"center"},label:{...gd,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},"fibonacci-retracement-trend-based":{...pn,strokes:hs.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...Fs},text:{...fd,position:"center"},label:{...gd,color:void 0,fontSize:{$round:[{$mul:[{$ref:"fontSize"},10/12]}]}}},callout:{...pn,...A0,color:{$ref:"textColor"},handle:{...Fs},fill:{$ref:"foregroundColor"},fillOpacity:.075},comment:{...A0,fontWeight:700,handle:{...Fs},fill:{$ref:"foregroundColor"}},note:{...A0,color:hs.DEFAULT_TEXTBOX_COLOR,fill:hs.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,stroke:{$ref:"backgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...Fs},background:{fill:hs.DEFAULT_TEXTBOX_FILL,stroke:hs.DEFAULT_TEXTBOX_STROKE,strokeWidth:1}},text:{...A0,color:{$ref:"textColor"},handle:{...Fs}},arrow:{...pn,handle:{...Fs},text:{...fd}},"arrow-up":{fill:hs.PALETTE_UP_FILL,handle:{...Fs,stroke:{$ref:"foregroundColor"}}},"arrow-down":{fill:hs.PALETTE_DOWN_FILL,handle:{...Fs,stroke:{$ref:"foregroundColor"}}},"date-range":{...V2},"price-range":{...V2},"date-price-range":{...V2},"quick-date-price-range":{up:{...pn,fill:hs.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,fillOpacity:.2,handle:{...Fs},statistics:{...j2,color:"#fff",fill:hs.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...pn,stroke:hs.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,fill:hs.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,fillOpacity:.2,handle:{...Fs,stroke:hs.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE},statistics:{...j2,color:"#fff",fill:hs.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{},toolbar:Qlt,optionsToolbar:Jlt},ect={type:"root",optionsKey:"annotations",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Xlt(t),themeTemplate:{annotations:tct}},W2=(E(),C(w)),UW=(E(),C(w)),ict=(P(),C(et)),{BaseProperties:sct,ObserveChanges:oct,ProxyProperty:act,TempValidate:md,NUMBER:I0,POSITIVE_NUMBER:HW,RATIO:nct,calculatePlacement:rct}=UW._ModuleSupport,Kr=class extends sct{constructor(){super(),this.opacity=1,this.loadedSynchronously=!0,this.containerWidth=0,this.containerHeight=0,this.onLoad=void 0,this.onImageLoad=()=>{this.loadedSynchronously||(this.node.visible=!1,this.performLayout(this.containerWidth,this.containerHeight),this.onLoad?.())},this.imageElement=(0,ict.createElement)("img"),this.imageElement.onload=this.onImageLoad,this.node=new UW._ModuleSupport.Image(this.imageElement)}get complete(){return this.imageElement.width>0&&this.imageElement.height>0}performLayout(t,e){this.containerWidth=t,this.containerHeight=e;const i={width:t,height:e},s=rct(this.imageElement.width,this.imageElement.height,i,this);return this.node.setProperties(this.complete?{visible:!0,opacity:this.opacity,...s}:{visible:!1}),s}};m([md(I0,{optional:!0})],Kr.prototype,"top",2),m([md(I0,{optional:!0})],Kr.prototype,"right",2),m([md(I0,{optional:!0})],Kr.prototype,"bottom",2),m([md(I0,{optional:!0})],Kr.prototype,"left",2),m([md(HW,{optional:!0})],Kr.prototype,"width",2),m([md(HW,{optional:!0})],Kr.prototype,"height",2),m([md(nct)],Kr.prototype,"opacity",2),m([act("imageElement.src"),oct(t=>t.loadedSynchronously=t.complete)],Kr.prototype,"url",2);var{ActionOnSet:lct,OBJECT:cct,TempValidate:hct}=W2._ModuleSupport,YW=class extends W2._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Kr}onLayoutComplete(t){if(super.onLayoutComplete(t),this.image){const{width:e,height:i}=t.chart;this.image.performLayout(e,i)}}onImageLoad(){this.ctx.updateService.update(W2._ModuleSupport.ChartUpdateType.SCENE_RENDER)}};m([hct(cct,{optional:!0}),lct({newValue(t){this.node.appendChild(t.node),t.onLoad=()=>this.onImageLoad()},oldValue(t){this.node.removeChild(t.node),t.onLoad=void 0}})],YW.prototype,"image",2);var uct={type:"root",optionsKey:"background",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new YW(t)},jLt=(E(),C(w)),KW=(E(),C(w)),dct=(P(),C(et)),{BOOLEAN:pct,ActionOnSet:gct,LayoutElement:fct,Menu:mct,TempValidate:yct}=KW._ModuleSupport,U2=[{label:"toolbarSeriesTypeOHLC",icon:"ohlc-series",value:"ohlc"},{label:"toolbarSeriesTypeCandles",icon:"candlestick-series",value:"candlestick"},{label:"toolbarSeriesTypeHollowCandles",icon:"hollow-candlestick-series",value:"hollow-candlestick"},{label:"toolbarSeriesTypeLine",icon:"line-series",value:"line"},{label:"toolbarSeriesTypeStepLine",icon:"step-line-series",value:"step-line"},{label:"toolbarSeriesTypeHLC",icon:"hlc-series",value:"hlc"},{label:"toolbarSeriesTypeHighLow",icon:"high-low-series",value:"high-low"}],$W=class extends KW._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.menu=new mct(this.ctx,"chart-toolbar"),this.toolbar=t.sharedToolbar.getSharedToolbar("chartToolbar"),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPressed.bind(this)),t.layoutManager.registerElement(fct.ToolbarLeft,this.onLayoutStart.bind(this)),()=>this.toolbar.destroy())}onLayoutStart(t){this.enabled&&(this.updateButton(),this.toolbar.layout(t.layoutBox))}onButtonPressed({event:t,buttonBounds:e}){this.menu.setAnchor({x:e.x+e.width+6,y:e.y}),this.menu.show({items:U2,menuItemRole:"menuitemradio",ariaLabel:this.ctx.localeManager.t("toolbarSeriesTypeDropdown"),class:"ag-charts-chart-toolbar__menu",value:this.getChartType(),sourceEvent:t.sourceEvent,onPress:i=>{this.setChartType(i.value),this.hidePopover()},onHide:()=>{this.toolbar.clearActiveButton()}}),this.toolbar.toggleActiveButtonByIndex(0)}updateButton(){const t=this.getChartType(),e=U2.find(i=>i.value===t)?.icon;e!=null&&this.toolbar.updateButtons([{icon:e,tooltip:"toolbarSeriesTypeDropdown"}])}hidePopover(){this.toolbar.clearActiveButton(),this.menu.hide()}setChartType(t){const e={chartType:t};this.ctx.chartService.publicApi?.updateDelta(e).catch(i=>dct.Logger.error(i))}getChartType(){const t=this.ctx.chartService.publicApi?.getOptions()?.chartType;return t==null||!U2.some(e=>e.value===t)?"candlestick":t}};m([yct(pct),gct({changeValue(t){this.toolbar?.setHidden(!t)}})],$W.prototype,"enabled",2);var xct={type:"root",optionsKey:"chartToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new $W(t)},bct=(E(),C(w)),T0=(E(),C(w)),yd=(P(),C(et)),C0="ag-charts-context-menu",L0="ag-charts-dark-context-menu",{BOOLEAN:XW,TempValidate:ZW,initMenuKeyNav:Sct,makeAccessibleClickListener:vct,ContextMenuRegistry:Jy}=T0._ModuleSupport,H2="context-menu";function Mct(t,e){const{children:i}=t??{};if(!i)return[];const s=[];for(const o of Array.from(i))o instanceof e&&s.push(o);return s}var Y2=class extends T0._ModuleSupport.BaseModuleInstance{constructor(t){if(super(),this.ctx=t,this.enabled=!0,this.darkTheme=!1,this.extraActions=[],this.extraNodeActions=[],this.extraSeriesAreaActions=[],this.extraLegendItemActions=[],this.pickedNode=void 0,this.showEvent=void 0,this.x=0,this.y=0,this.interactionManager=t.interactionManager,this.registry=t.contextMenuRegistry,this.groups={default:[],extra:[],extraSeriesArea:[],extraNode:[],extraLegendItem:[]},this.element=t.domManager.addChild("canvas-overlay",H2),this.element.classList.add(C0),this.element.addEventListener("contextmenu",e=>e.preventDefault()),this.destroyFns.push(()=>this.element.parentNode?.removeChild(this.element)),this.doClose(),this.destroyFns.push(t.domManager.addListener("hidden",()=>this.hide())),typeof MutationObserver<"u"){const e=new MutationObserver(()=>{this.menuElement&&this.element.contains(this.menuElement)&&this.reposition()});e.observe(this.element,{childList:!0}),this.mutationObserver=e,this.destroyFns.push(()=>e.disconnect())}this.destroyFns.push(this.registry.registerDefaultAction({id:"download",type:"all",label:"contextMenuDownload",action:()=>{const e=t.chartService.title;let i="image";e?.enabled&&e?.text!==void 0&&(i=e.text.replace(/\.+/,"")),this.ctx.chartService.publicApi?.download({fileName:i}).catch(s=>{yd.Logger.error("Unable to download chart",s)})}})),this.destroyFns.push(this.registry.addListener(e=>this.onContext(e)))}onContext(t){if(!this.enabled)return;t.sourceEvent.preventDefault(),this.showEvent=t.sourceEvent,this.x=t.x,this.y=t.y,this.groups.default=this.registry.filterActions(t.type);for(const r of this.groups.default)r.id==null||r.toggleEnabledOnShow==null||(r.toggleEnabledOnShow(t)?this.registry.enableAction(r.id):this.registry.disableAction(r.id));this.pickedNode=void 0,this.pickedLegendItem=void 0,this.groups.extra=this.extraActions.map(({label:r,action:l})=>({type:"all",label:r,action:l})),this.groups.extraSeriesArea=[],this.groups.extraNode=[],Jy.check("series-area",t)&&(this.pickedNode=t.context.pickedNode,this.groups.extraSeriesArea=this.extraSeriesAreaActions.map(({label:r,action:l})=>({type:"series-area",label:r,action:l})),this.pickedNode&&(this.groups.extraNode=this.extraNodeActions.map(({label:r,action:l})=>({type:"node",label:r,action:l})))),this.groups.extraLegendItem=[],Jy.check("legend",t)&&(this.pickedLegendItem=t.context.legendItem,this.pickedLegendItem&&(this.groups.extraLegendItem=this.extraLegendItemActions.map(({label:r,action:l})=>({type:"legend",label:r,action:l}))));const{default:e,extra:i,extraSeriesArea:s,extraNode:o,extraLegendItem:a}=this.groups;[e,i,s,o,a].reduce((r,l)=>l.length+r,0)!==0&&this.show(t.sourceEvent)}show(t){this.interactionManager.pushState(T0._ModuleSupport.InteractionState.ContextMenu),this.element.classList.toggle(L0,this.darkTheme);const e=this.renderMenu();this.menuCloser?.close(),this.menuElement?this.element.replaceChild(e,this.menuElement):this.element.appendChild(e),this.menuElement=e,this.element.style.display="block";const i=t.pointerType==="touch"?!1:void 0,s=Mct(e,HTMLButtonElement);this.menuCloser=Sct({menu:e,buttons:s,orientation:"vertical",sourceEvent:t,overrideFocusVisible:i,autoCloseOnBlur:!0,closeCallback:()=>this.doClose()}),t.pointerType==="touch"&&this.ctx.chartService.overrideFocusVisible(!1)}hide(){this.menuCloser?.close()}doClose(){this.interactionManager.popState(T0._ModuleSupport.InteractionState.ContextMenu),this.menuElement&&(this.element.removeChild(this.menuElement),this.menuElement=void 0,this.menuCloser=void 0),this.element.style.display="none"}renderMenu(){const t=(0,yd.createElement)("div");return t.classList.add(`${C0}__menu`),t.classList.toggle(L0,this.darkTheme),t.role="menu",this.appendMenuGroup(t,this.groups.default,!1),this.appendMenuGroup(t,this.groups.extra),this.appendMenuGroup(t,this.groups.extraSeriesArea),this.pickedNode&&this.appendMenuGroup(t,this.groups.extraNode),this.pickedLegendItem&&this.appendMenuGroup(t,this.groups.extraLegendItem),t}appendMenuGroup(t,e,i=!0){e.length!==0&&(i&&t.appendChild(this.createDividerElement()),e.forEach(s=>{const o=this.renderItem(s);o&&t.appendChild(o)}))}renderItem(t){if(t&&typeof t=="object"&&t.constructor===Object)return this.createActionElement(t)}createDividerElement(){const t=(0,yd.createElement)("div");return t.classList.add(`${C0}__divider`),t.classList.toggle(L0,this.darkTheme),t.role="separator",t}createActionElement({id:t,label:e,type:i,action:s}){const o=!!(t&&this.registry.isDisabled(t));return this.createButtonElement(i,e,s,o)}createButtonOnClick(t,e){return Jy.checkCallback("legend",t,e)?i=>{if(this.pickedLegendItem){const{seriesId:s,itemId:o}=this.pickedLegendItem;e({type:"contextmenu",seriesId:s,itemId:o,event:i}),this.hide()}}:Jy.checkCallback("series-area",t,e)?()=>{e({type:"seriesContextMenuAction",event:this.showEvent}),this.hide()}:Jy.checkCallback("node",t,e)?()=>{const{pickedNode:i,showEvent:s}=this,o=i?.series.createNodeContextMenuActionEvent(s,i);o?e(o):yd.Logger.error("series node not found"),this.hide()}:()=>{e({type:"contextMenuEvent",event:this.showEvent}),this.hide()}}createButtonElement(t,e,i,s){const o=(0,yd.createElement)("button");return o.classList.add(`${C0}__item`),o.classList.toggle(L0,this.darkTheme),o.ariaDisabled=s.toString(),o.textContent=this.ctx.localeManager.t(e),o.role="menuitem",o.onclick=vct(o,this.createButtonOnClick(t,i)),o.addEventListener("mouseover",()=>o.focus({preventScroll:!0})),o}reposition(){let{x:t,y:e}=this;this.element.style.top="unset",this.element.style.bottom="unset";const i=this.ctx.domManager.getBoundingClientRect(),{offsetWidth:s,offsetHeight:o}=this.element;t=(0,yd.clamp)(0,t,i.width-s),e=(0,yd.clamp)(0,e,i.height-o),this.element.style.left=`${t}px`,this.element.style.top=`calc(${e}px - 0.5em)`}destroy(){super.destroy(),this.mutationObserver?.disconnect(),this.ctx.domManager.removeStyles(H2),this.ctx.domManager.removeChild("canvas-overlay",H2)}};m([ZW(XW)],Y2.prototype,"enabled",2),m([ZW(XW)],Y2.prototype,"darkTheme",2);var Dct={type:"root",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],optionsKey:"contextMenu",moduleFactory:t=>new Y2(t),themeTemplate:{contextMenu:{enabled:!0,darkTheme:bct._ModuleSupport.ThemeSymbols.IS_DARK_THEME}}},VLt=(E(),C(w)),Ug=(E(),C(w)),kct=(P(),C(et)),K2=(E(),C(w)),{BaseProperties:Act,BOOLEAN:qW,FUNCTION:QW,NUMBER:N0,STRING:JW,TempValidate:$r,createId:Ict,setAttribute:Tct}=K2._ModuleSupport,Cct="ag-charts-crosshair-label",Hg=class extends K2._ModuleSupport.ChangeDetectableProperties{constructor(){super(...arguments),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.format=void 0,this.renderer=void 0}};m([$r(qW)],Hg.prototype,"enabled",2),m([$r(N0)],Hg.prototype,"xOffset",2),m([$r(N0)],Hg.prototype,"yOffset",2),m([$r(JW,{optional:!0})],Hg.prototype,"format",2),m([$r(QW,{optional:!0})],Hg.prototype,"renderer",2);var Yg=class extends Act{constructor(t,e,i){super(),this.domManager=t,this.id=Ict(this),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.renderer=void 0,this.element=t.addChild("canvas-overlay",`crosshair-label-${this.id}`),this.element.classList.add(Cct),Tct(this.element,"aria-hidden",!0),this.element.setAttribute("data-key",e),this.element.setAttribute("data-axis-id",i)}show(t){const{element:e}=this,i=t.x+this.xOffset,s=t.y+this.yOffset;e.style.top=`${Math.round(s)}px`,e.style.left=`${Math.round(i)}px`,this.toggle(!0)}setLabelHtml(t){t!==void 0&&(this.element.innerHTML=t)}getBBox(){const{element:t}=this;return new K2._ModuleSupport.BBox(t.clientLeft,t.clientTop,t.clientWidth,t.clientHeight)}toggle(t){this.element.classList.toggle("ag-charts-crosshair-label--hidden",!t)}destroy(){this.domManager.removeChild("canvas-overlay",`crosshair-label-${this.id}`)}toLabelHtml(t,e){if(typeof t=="string")return t;e=e??{};const{text:i=e.text??"",color:s=e.color,backgroundColor:o=e.backgroundColor,opacity:a=e.opacity??1}=t;return`<div class="ag-charts-crosshair-label-content" style="${`opacity: ${a}; background-color: ${o?.toLowerCase()}; color: ${s}`}">
<span>${i}</span>
</div>`}};m([$r(qW)],Yg.prototype,"enabled",2),m([$r(N0)],Yg.prototype,"xOffset",2),m([$r(N0)],Yg.prototype,"yOffset",2),m([$r(JW,{optional:!0})],Yg.prototype,"format",2),m([$r(QW,{optional:!0})],Yg.prototype,"renderer",2);var{Group:Lct,TranslatableGroup:Nct,Line:t3,BBox:e3,createId:Oct,POSITIVE_NUMBER:i3,RATIO:wct,BOOLEAN:s3,COLOR_STRING:Ect,LINE_DASH:_ct,OBJECT:Rct,InteractionState:O0,TempValidate:mh,ZIndexMap:o3,formatNumber:Pct,ChartAxisDirection:a3}=Ug._ModuleSupport,Jl=class extends Ug._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.id=Oct(this),this.enabled=!1,this.stroke="rgb(195, 195, 195)",this.lineDash=[6,3],this.lineDashOffset=0,this.strokeWidth=1,this.strokeOpacity=1,this.snap=!0,this.label=new Hg,this.seriesRect=new e3(0,0,0,0),this.bounds=new e3(0,0,0,0),this.crosshairGroup=new Nct({name:"crosshairs",zIndex:o3.SERIES_CROSSHAIR}),this.lineGroup=this.crosshairGroup.appendChild(new Lct({name:`${this.id}-crosshair-lines`,zIndex:o3.SERIES_CROSSHAIR})),this.lineGroupSelection=Ug._ModuleSupport.Selection.select(this.lineGroup,t3,!1),this.activeHighlight=void 0,this.axisCtx=t.parent,this.labels={},this.hideCrosshairs(),t.domManager.addEventListener("focusin",({target:e})=>{const i=e instanceof HTMLElement&&t.domManager.contains(e,"series-area");this.crosshairGroup.visible&&!i&&(this.hideCrosshairs(),this.ctx.updateService.update(Ug._ModuleSupport.ChartUpdateType.PERFORM_LAYOUT))}),this.destroyFns.push(t.scene.attachNode(this.crosshairGroup),t.widgets.seriesWidget.addListener("mousemove",e=>this.onMouseHoverLike(e)),t.widgets.seriesWidget.addListener("drag-move",e=>this.onMouseHoverLike(e)),t.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseOut()),t.widgets.seriesDragInterpreter.addListener("click",e=>this.onClick(e)),t.chartEventManager.addListener("series-focus-change",()=>this.onKeyPress()),t.zoomManager.addListener("zoom-pan-start",()=>this.onMouseOut()),t.zoomManager.addListener("zoom-change",()=>this.onMouseOut()),t.highlightManager.addListener("highlight-change",e=>this.onHighlightChange(e)),t.layoutManager.addListener("layout:complete",e=>this.layout(e)),()=>Object.values(this.labels).forEach(e=>e.destroy()))}layout({series:{rect:t,visible:e},axes:i}){if(!e||!i||!this.enabled)return;this.seriesRect=t;const{position:s="left",axisId:o}=this.axisCtx,a=i.find(c=>c.id===o);if(!a)return;this.axisLayout=a,this.bounds=t.clone().grow(a.gridPadding+a.seriesAreaPadding,s);const{crosshairGroup:n,bounds:r}=this;n.translationX=Math.round(r.x),n.translationY=Math.round(r.y);const l=["pointer",...this.axisCtx.seriesKeyProperties()];this.updateSelections(l),this.updateLines(),this.updateLabels(l)}updateSelections(t){this.lineGroupSelection.update(t,e=>e.append(new t3),e=>e)}updateLabels(t){const{labels:e,ctx:i}=this;for(const s of t)this.label.enabled&&(e[s]??(e[s]=new Yg(i.domManager,s,this.axisCtx.axisId))),e[s]&&this.updateLabel(e[s]);this.labelFormatter=this.axisCtx.scaleValueFormatter(this.label.format)}updateLabel(t){const{enabled:e,xOffset:i,yOffset:s,format:o,renderer:a}=this.label;t.enabled=e,t.xOffset=i,t.yOffset=s,t.format=o,t.renderer=a}updateLines(){const{lineGroupSelection:t,bounds:e,stroke:i,strokeWidth:s,strokeOpacity:o,lineDash:a,lineDashOffset:n,axisLayout:r}=this;if(!r)return;const l=this.isVertical();t.each(c=>{c.stroke=i,c.strokeWidth=s,c.strokeOpacity=o,c.lineDash=a,c.lineDashOffset=n,c.y1=0,c.y2=l?e.height:0,c.x1=0,c.x2=l?0:e.width})}isVertical(){return this.axisCtx.direction===a3.X}isHover(t){return t.type==="mousemove"||t.type==="click"||t.device==="touch"&&this.ctx.chartService.touch.dragAction==="hover"}formatValue(t){const{labelFormatter:e,axisLayout:i,ctx:{callbackCache:s}}=this;if(e){const o=s.call(this.axisCtx,e,t);if(o!=null)return o}if(typeof t=="number"){const o=(i?.label.fractionDigits??0)+((0,kct.isInteger)(t)?0:1);return Pct(t,o)}return String(t??"")}onClick(t){t.device==="touch"&&this.onMouseHoverLike(t)}onMouseHoverLike(t){if(!this.enabled||this.snap)return;const e=this.isHover(t)?O0.Clickable:O0.AnnotationsMoveable;this.ctx.interactionManager.isState(e)&&(this.updatePositions(this.getData(t)),this.crosshairGroup.visible=!0,this.ctx.updateService.update(Ug._ModuleSupport.ChartUpdateType.SCENE_RENDER))}onMouseOut(){this.ctx.interactionManager.isState(O0.Clickable)&&(this.hideCrosshairs(),this.ctx.updateService.update(Ug._ModuleSupport.ChartUpdateType.SCENE_RENDER))}onKeyPress(){this.enabled&&!this.snap&&this.ctx.interactionManager.isState(O0.Default)&&this.hideCrosshairs()}onHighlightChange(t){if(!this.enabled)return;const{crosshairGroup:e,axisCtx:i}=this,{datum:s,series:o}=t.currentHighlight??{},a=s&&(o?.axes.x?.id===i.axisId||o?.axes.y?.id===i.axisId);if(this.activeHighlight=a?t.currentHighlight:void 0,!this.activeHighlight)this.hideCrosshairs();else if(this.snap){const n=this.getActiveHighlightData(this.activeHighlight);this.updatePositions(n),e.visible=!0}}isInRange(t){return this.axisCtx.inRange(t)}updatePositions(t){const{seriesRect:e,lineGroupSelection:i}=this;i.each((s,o)=>{const a=t[o];if(!a){s.visible=!1,this.hideLabel(o);return}s.visible=!0;const{value:n,position:r}=a;let l=0,c=0;this.isVertical()?(l=r,s.x=Math.round(l)):(c=r,s.y=Math.round(c)),this.label.enabled?this.showLabel(l+e.x,c+e.y,n,o):this.hideLabel(o)})}getData(t){const{axisCtx:e}=this,i="pointer",{datum:s,xKey:o="",yKey:a=""}=this.activeHighlight??{},{currentX:n,currentY:r}=t,l=this.isVertical(),c=l?n:r;let h=s?.[l?o:a]??"";return e.continuous&&(h=e.scaleInvert(c)),{[i]:{position:c,value:h}}}getActiveHighlightData(t){const{axisCtx:e}=this,{datum:i,series:s,xKey:o="",aggregatedValue:a,cumulativeValue:n,midPoint:r}=t,l=s.getKeyProperties(e.direction),c=(e.scale.bandwidth??0)/2,h=s.axes[e.direction]?.id===e.axisId,u=l.indexOf("yKey")>-1&&h,d=l.indexOf("xKey")>-1&&h,p=a??n;if(u&&p!==void 0){const f=e.scale.convert(p)+c;return this.isInRange(f)?{yKey:{value:p,position:f}}:{}}if(d){const f=(this.isVertical()?r?.x:r?.y)??0,x=e.continuous?e.scaleInvert(f):i[o];return this.isInRange(f)?{xKey:{value:x,position:f}}:{}}const g={};return l.forEach(f=>{const x=s.properties[f],y=i[x],b=e.scale.convert(y)+c;this.isInRange(b)&&(g[f]={value:y,position:b})}),g}getLabelHtml(t,e){const i=this.axisLayout?.label?.fractionDigits??0,s={text:this.formatValue(t)};return this.label.renderer?e.toLabelHtml(this.label.renderer({value:t,fractionDigits:i}),s):e.toLabelHtml(s)}showLabel(t,e,i,s){if(!this.axisLayout)return;const{bounds:o}=this,a=this.labels[s],n=this.getLabelHtml(i,a);a.setLabelHtml(n);const{width:r,height:l}=a.getBBox(),c=this.axisCtx.position;let h=this.axisLayout.label.spacing+this.axisLayout.tickSize;this.axisCtx.direction===a3.X?(h-=4,a.show({x:t-r/2,y:c==="bottom"?o.y+o.height+h:o.y-l-h})):(h-=8,a.show({x:c==="right"?o.x+o.width+h:o.x-r-h,y:e-l/2}))}hideCrosshairs(){this.crosshairGroup.visible=!1;for(const t of Object.keys(this.labels))this.hideLabel(t)}hideLabel(t){this.labels[t]?.toggle(!1)}};m([mh(s3)],Jl.prototype,"enabled",2),m([mh(Ect,{optional:!0})],Jl.prototype,"stroke",2),m([mh(_ct,{optional:!0})],Jl.prototype,"lineDash",2),m([mh(i3)],Jl.prototype,"lineDashOffset",2),m([mh(i3)],Jl.prototype,"strokeWidth",2),m([mh(wct)],Jl.prototype,"strokeOpacity",2),m([mh(s3)],Jl.prototype,"snap",2),m([mh(Rct)],Jl.prototype,"label",2);var Bct={type:"axis-option",optionsKey:"crosshair",packageType:"enterprise",chartTypes:["cartesian"],axisTypes:["category","ordinal-time","number","log","time"],moduleFactory:t=>new Jl(t),themeTemplate:{crosshair:{snap:!0,stroke:{$ref:"subtleTextColor"},strokeWidth:1,strokeOpacity:1,lineDash:[5,6],lineDashOffset:0,label:{enabled:!0}}}},n3=(E(),C(w)),{BOOLEAN:zct,FUNCTION:Fct,ActionOnSet:tx,TempValidate:r3}=n3._ModuleSupport,Kg=class extends n3._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.enabled=!1,this.getData=()=>Promise.resolve(),this.dataService=t.dataService}updateCallback(t,e){this.dataService&&(t&&e!=null?this.dataService.updateCallback(e):this.dataService.clearCallback())}};m([tx({newValue(t){this.updateCallback(t,this.getData)}}),r3(zct)],Kg.prototype,"enabled",2),m([tx({newValue(t){this.updateCallback(this.enabled,t)}}),r3(Fct)],Kg.prototype,"getData",2),m([tx({newValue(t){this.dataService.requestThrottle=t}})],Kg.prototype,"requestThrottle",2),m([tx({newValue(t){this.dataService.dispatchThrottle=t}})],Kg.prototype,"updateThrottle",2),m([tx({newValue(t){this.dataService.dispatchOnlyLatest=!t}})],Kg.prototype,"updateDuringInteraction",2);var Gct={type:"root",optionsKey:"dataSource",packageType:"enterprise",chartTypes:["cartesian","hierarchy","polar","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new Kg(t),themeTemplate:{dataSource:{enabled:!1}}},jct=(E(),C(w)),ex=(E(),C(w)),Lo=(P(),C(et)),ix=(E(),C(w)),{nearestSquaredInContainer:Vct,partialAssign:Wct,mergeDefaults:l3,BBox:tc}=ix._ModuleSupport,Uct=class{constructor(t){this.components=t,this.union=tc.merge(t)}containsPoint(t,e){if(!this.union.containsPoint(t,e))return!1;for(const i of this.components)if(i.containsPoint(t,e))return!0;return!1}},Hct=class extends ix._ModuleSupport.Group{constructor(){super(),this.capLength=NaN,this._datum=void 0,this.whiskerPath=new ix._ModuleSupport.Path,this.capsPath=new ix._ModuleSupport.Path,this.bboxes=new Uct([]),this.append([this.whiskerPath,this.capsPath])}get datum(){return this._datum}set datum(t){this._datum=t}calculateCapLength(t,e){const{lengthRatio:i=1,length:s}=t,{lengthRatioMultiplier:o,lengthMax:a}=e,n=s??i*o;return Math.min(n,a)}getItemStylerParams(t,e,i){const{datum:s}=this;if(s==null||t.itemStyler==null)return;const{xLowerKey:o,xUpperKey:a,yLowerKey:n,yUpperKey:r}=t;return{...e,datum:s.datum,seriesId:s.datum.seriesId,xKey:s.xKey,yKey:s.yKey,xLowerKey:o,xUpperKey:a,yLowerKey:n,yUpperKey:r,highlighted:i}}formatStyles(t,e,i,s){let{cap:o,...a}=t;const n=this.getItemStylerParams(e,t,s);if(n!=null&&e.itemStyler!=null){const r=i.callWithContext(e.itemStyler,n);a=l3(r,a),o=l3(r?.cap,r,o)}return{whiskerStyle:a,capsStyle:o}}applyStyling(t,e){Wct(["visible","stroke","strokeWidth","strokeOpacity","lineDash","lineDashOffset"],t,e)}update(t,e,i,s){if(this.datum===void 0)return;const{whiskerStyle:o,capsStyle:a}=this.formatStyles(t,e,i,s),{xBar:n,yBar:r,capDefaults:l}=this.datum,c=this.whiskerPath;this.applyStyling(c,o),c.path.clear(!0),r!==void 0&&(c.path.moveTo(r.lowerPoint.x,r.lowerPoint.y),c.path.lineTo(r.upperPoint.x,r.upperPoint.y)),n!==void 0&&(c.path.moveTo(n.lowerPoint.x,n.lowerPoint.y),c.path.lineTo(n.upperPoint.x,n.upperPoint.y)),c.path.closePath(),this.capLength=this.calculateCapLength(a??{},l);const h=this.capLength/2,u=this.capsPath;this.applyStyling(u,a),u.path.clear(!0),r!==void 0&&(u.path.moveTo(r.lowerPoint.x-h,r.lowerPoint.y),u.path.lineTo(r.lowerPoint.x+h,r.lowerPoint.y),u.path.moveTo(r.upperPoint.x-h,r.upperPoint.y),u.path.lineTo(r.upperPoint.x+h,r.upperPoint.y)),n!==void 0&&(u.path.moveTo(n.lowerPoint.x,n.lowerPoint.y-h),u.path.lineTo(n.lowerPoint.x,n.lowerPoint.y+h),u.path.moveTo(n.upperPoint.x,n.upperPoint.y-h),u.path.lineTo(n.upperPoint.x,n.upperPoint.y+h)),u.path.closePath()}updateBBoxes(){const{capLength:t,whiskerPath:e,capsPath:i}=this,{yBar:s,xBar:o}=this.datum??{},a=t/2,n=[];if(s!==void 0){const r=s.lowerPoint.y-s.upperPoint.y;n.push(new tc(s.lowerPoint.x,s.upperPoint.y,e.strokeWidth,r),new tc(s.lowerPoint.x-a,s.lowerPoint.y,t,i.strokeWidth),new tc(s.upperPoint.x-a,s.upperPoint.y,t,i.strokeWidth))}if(o!==void 0){const r=o.upperPoint.x-o.lowerPoint.x;n.push(new tc(o.lowerPoint.x,o.upperPoint.y,r,e.strokeWidth),new tc(o.lowerPoint.x,o.lowerPoint.y-a,i.strokeWidth,t),new tc(o.upperPoint.x,o.upperPoint.y-a,i.strokeWidth,t))}this.bboxes.components=n,this.bboxes.union=tc.merge(n)}containsPoint(t,e){return this.bboxes.containsPoint(t,e)}pickNode(t,e){return this.containsPoint(t,e)?this:void 0}nearestSquared(t,e,i){const{bboxes:s}=this;if(s.union.distanceSquared(t,e)>i)return{nearest:void 0,distanceSquared:1/0};const{distanceSquared:o}=tc.nearestBox(t,e,s.components);return{nearest:this,distanceSquared:o}}},Yct=class extends ix._ModuleSupport.Group{nearestSquared(t,e){const{nearest:i,distanceSquared:s}=Vct(t,e,{children:this.children()});if(i!==void 0&&!isNaN(s))return{datum:i.datum,distanceSquared:s}}},Kct=(E(),C(w)),{BaseProperties:c3,TempValidate:Je,BOOLEAN:h3,COLOR_STRING:u3,FUNCTION:$ct,LINE_DASH:d3,NUMBER:Xct,OBJECT:Zct,POSITIVE_NUMBER:w0,RATIO:$2,STRING:yh}=Kct._ModuleSupport,ec=class extends c3{};m([Je(h3,{optional:!0})],ec.prototype,"visible",2),m([Je(u3,{optional:!0})],ec.prototype,"stroke",2),m([Je(w0,{optional:!0})],ec.prototype,"strokeWidth",2),m([Je($2,{optional:!0})],ec.prototype,"strokeOpacity",2),m([Je(d3,{optional:!0})],ec.prototype,"lineDash",2),m([Je(w0,{optional:!0})],ec.prototype,"lineDashOffset",2),m([Je(Xct,{optional:!0})],ec.prototype,"length",2),m([Je($2,{optional:!0})],ec.prototype,"lengthRatio",2);var Gs=class extends c3{constructor(){super(...arguments),this.visible=!0,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.cap=new ec}};m([Je(yh,{optional:!0})],Gs.prototype,"yLowerKey",2),m([Je(yh,{optional:!0})],Gs.prototype,"yLowerName",2),m([Je(yh,{optional:!0})],Gs.prototype,"yUpperKey",2),m([Je(yh,{optional:!0})],Gs.prototype,"yUpperName",2),m([Je(yh,{optional:!0})],Gs.prototype,"xLowerKey",2),m([Je(yh,{optional:!0})],Gs.prototype,"xLowerName",2),m([Je(yh,{optional:!0})],Gs.prototype,"xUpperKey",2),m([Je(yh,{optional:!0})],Gs.prototype,"xUpperName",2),m([Je(h3,{optional:!0})],Gs.prototype,"visible",2),m([Je(u3,{optional:!0})],Gs.prototype,"stroke",2),m([Je(w0,{optional:!0})],Gs.prototype,"strokeWidth",2),m([Je($2,{optional:!0})],Gs.prototype,"strokeOpacity",2),m([Je(d3,{optional:!0})],Gs.prototype,"lineDash",2),m([Je(w0,{optional:!0})],Gs.prototype,"lineDashOffset",2),m([Je($ct,{optional:!0})],Gs.prototype,"itemStyler",2),m([Je(Zct)],Gs.prototype,"cap",2);var{fixNumericExtent:qct,groupAccumulativeValueProperty:Qct,mergeDefaults:Jct,valueProperty:E0,ChartAxisDirection:X2}=ex._ModuleSupport;function tht(t){for(const e of ex.AgErrorBarSupportedSeriesTypes)if(e===t.series.type)return t.series;throw new Error(`AG Charts - unsupported series type '${t.series.type}', error bars supported series types: ${ex.AgErrorBarSupportedSeriesTypes.join(", ")}`)}var eht=class nb extends ex._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.properties=new Gs;const i=tht(e),{annotationGroup:s,annotationSelections:o}=i;this.cartesianSeries=i,this.groupNode=new Yct({name:`${s.id}-errorBars`}),s.appendChild(this.groupNode),this.selection=ex._ModuleSupport.Selection.select(this.groupNode,()=>this.errorBarFactory()),o.add(this.selection),i.addEventListener("seriesVisibilityChange",a=>this.onToggleSeriesItem(a)),this.destroyFns.push(i.addListener("data-processed",a=>this.onDataProcessed(a)),i.addListener("data-update",a=>this.onDataUpdate(a)),e.highlightManager.addListener("highlight-change",a=>this.onHighlightChange(a)),()=>s.removeChild(this.groupNode),()=>o.delete(this.selection))}hasErrorBars(){const{xLowerKey:e,xUpperKey:i,yLowerKey:s,yUpperKey:o}=this.properties;return(0,Lo.isDefined)(e)&&(0,Lo.isDefined)(i)||(0,Lo.isDefined)(s)&&(0,Lo.isDefined)(o)}isStacked(){const e=this.cartesianSeries.seriesGrouping?.stackCount;return e==null?!1:e>0}getUnstackPropertyDefinition(e){const i=[],{xLowerKey:s,xUpperKey:o,yLowerKey:a,yUpperKey:n,xErrorsID:r,yErrorsID:l}=this.getMaybeFlippedKeys(),{xScaleType:c,yScaleType:h}=e;return a!=null&&n!=null&&i.push(E0(a,h,{id:`${l}-lower`}),E0(n,h,{id:`${l}-upper`})),s!=null&&o!=null&&i.push(E0(s,c,{id:`${r}-lower`}),E0(o,c,{id:`${r}-upper`})),i}getStackPropertyDefinition(e){const i=[],{cartesianSeries:s}=this,{xLowerKey:o,xUpperKey:a,yLowerKey:n,yUpperKey:r,xErrorsID:l,yErrorsID:c}=this.getMaybeFlippedKeys(),{xScaleType:h,yScaleType:u}=e,d=s.seriesGrouping?.groupIndex??s.id,p={invalidValue:null,missingValue:0,separateNegative:!0,...s.visible?{}:{forceValue:0}},g=(x,y,b,S)=>Qct(x,"normal","current",{id:`${y}-${b}`,groupId:`errorGroup-${d}-${b}`,...p},S),f=(x,y,b,S)=>{i.push(...g(x,b,"lower",S),...g(y,b,"upper",S))};return n!=null&&r!=null&&f(n,r,c,u),o!=null&&a!=null&&f(o,a,l,h),i}getPropertyDefinitions(e){return this.isStacked()?this.getStackPropertyDefinition(e):this.getUnstackPropertyDefinition(e)}onDataProcessed(e){this.dataModel=e.dataModel,this.processedData=e.processedData}getDomain(e){const{xLowerKey:i,xUpperKey:s,xErrorsID:o,yLowerKey:a,yUpperKey:n,yErrorsID:r}=this.getMaybeFlippedKeys();if(e===X2.X?(0,Lo.isDefined)(i)&&(0,Lo.isDefined)(s):(0,Lo.isDefined)(a)&&(0,Lo.isDefined)(n)){const{dataModel:c,processedData:h,cartesianSeries:u}=this;if(c!=null&&h!=null){const d={x:o,y:r}[e],p=c.getDomain(u,`${d}-lower`,"value",h),g=c.getDomain(u,`${d}-upper`,"value",h),f=[Math.min(...p,...g),Math.max(...p,...g)];return qct(f)}}return[]}onDataUpdate(e){this.dataModel=e.dataModel,this.processedData=e.processedData,(0,Lo.isDefined)(e.dataModel)&&(0,Lo.isDefined)(e.processedData)&&(this.createNodeData(),this.update())}getNodeData(){return this.hasErrorBars()?this.cartesianSeries.contextNodeData?.nodeData:void 0}createNodeData(){const e=this.getNodeData(),i=this.cartesianSeries.axes[X2.X]?.scale,s=this.cartesianSeries.axes[X2.Y]?.scale;if(!(!i||!s||!e))for(let o=0;o<e.length;o++){const{midPoint:a,xLower:n,xUpper:r,yLower:l,yUpper:c}=this.getDatum(e,o);if(a!=null){let h,u;(0,Lo.isDefined)(n)&&(0,Lo.isDefined)(r)&&(h={lowerPoint:{x:this.convert(i,n),y:a.y},upperPoint:{x:this.convert(i,r),y:a.y}}),(0,Lo.isDefined)(l)&&(0,Lo.isDefined)(c)&&(u={lowerPoint:{x:a.x,y:this.convert(s,l)},upperPoint:{x:a.x,y:this.convert(s,c)}}),e[o].xBar=h,e[o].yBar=u}}}getMaybeFlippedKeys(){let{xLowerKey:e,xUpperKey:i,yLowerKey:s,yUpperKey:o}=this.properties,[a,n]=["xValue-errors","yValue-errors"];return this.cartesianSeries.shouldFlipXY()&&([e,s]=[s,e],[i,o]=[o,i],[a,n]=[n,a]),{xLowerKey:e,xUpperKey:i,xErrorsID:a,yLowerKey:s,yUpperKey:o,yErrorsID:n}}static getDatumKey(e,i,s){if(i==null)return;const o=e.datum[i];if(o!=null){if(typeof o!="number"){Lo.Logger.warnOnce(`Found [${i}] error value of type ${typeof o}. Expected number type`);return}return o+s}}getDatum(e,i){const{xLowerKey:s,xUpperKey:o,yLowerKey:a,yUpperKey:n}=this.getMaybeFlippedKeys(),r=e[i],l=r.cumulativeValue==null||!this.isStacked()?0:r.cumulativeValue-r.yValue,[c,h]=this.cartesianSeries.shouldFlipXY()?[l,0]:[0,l];return{midPoint:r.midPoint,xLower:nb.getDatumKey(r,s,c),xUpper:nb.getDatumKey(r,o,c),yLower:nb.getDatumKey(r,a,h),yUpper:nb.getDatumKey(r,n,h)}}convert(e,i){const s=(e.bandwidth??0)/2;return e.convert(i)+s}update(){const e=this.getNodeData();e!=null&&(this.selection.update(e),this.selection.each((i,s,o)=>this.updateNode(i,s,o)))}updateNode(e,i,s){e.datum=i,e.update(this.getDefaultStyle(),this.properties,this.cartesianSeries,!1),e.updateBBoxes()}pickNodeExact(e){const{x:i,y:s}=e,o=this.groupNode.pickNode(i,s);if(o!=null)return{datum:o.datum,distanceSquared:0}}pickNodeNearest(e){return this.groupNode.nearestSquared(e.x,e.y)}pickNodeMainAxisFirst(e){return this.groupNode.nearestSquared(e.x,e.y)}getTooltipParams(){const{xLowerKey:e,xUpperKey:i,yLowerKey:s,yUpperKey:o,xLowerName:a=e,xUpperName:n=i,yLowerName:r=s,yUpperName:l=o}=this.properties;return{xLowerKey:e,xLowerName:a,xUpperKey:i,xUpperName:n,yLowerKey:s,yLowerName:r,yUpperKey:o,yUpperName:l}}onToggleSeriesItem(e){this.groupNode.visible=e.visible}makeStyle(e){return{visible:e.visible,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeOpacity:e.strokeOpacity,cap:Jct(this.properties.cap,e)}}getDefaultStyle(){return this.makeStyle(this.getWhiskerProperties())}getHighlightStyle(){return this.makeStyle(this.getWhiskerProperties())}restyleHighlightChange(e,i,s){const o=this.getNodeData();if(o!=null){for(let a=0;a<o.length;a++)if(e===o[a]){this.selection.at(a)?.update(i,this.properties,this.cartesianSeries,s);break}}}onHighlightChange(e){const{previousHighlight:i,currentHighlight:s}=e;s?.series===this.cartesianSeries&&this.restyleHighlightChange(s,this.getHighlightStyle(),!0),i?.series===this.cartesianSeries&&this.restyleHighlightChange(i,this.getDefaultStyle(),!1),this.groupNode.opacity=this.cartesianSeries.getOpacity()}errorBarFactory(){return new Hct}getWhiskerProperties(){const{stroke:e,strokeWidth:i,visible:s,strokeOpacity:o,lineDash:a,lineDashOffset:n}=this.properties;return{stroke:e,strokeWidth:i,visible:s,strokeOpacity:o,lineDash:a,lineDashOffset:n}}},WLt=(E(),C(w)),iht={series:{errorBar:{visible:!0,stroke:{$ref:"foregroundColor"},strokeWidth:1,strokeOpacity:1,cap:{length:void 0,lengthRatio:void 0}}}},sht={type:"series-option",identifier:"error-bars",optionsKey:"errorBar",packageType:"enterprise",chartTypes:["cartesian"],seriesTypes:jct.AgErrorBarSupportedSeriesTypes,moduleFactory:t=>new eht(t),themeTemplate:iht},_0=(E(),C(w)),{ZIndexMap:oht,ActionOnSet:aht,TempValidate:Z2,ProxyPropertyOnWrite:p3,OBJECT:nht,RATIO:rht,COLOR_STRING:lht}=_0._ModuleSupport,R0=class extends _0._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Kr,this.fill="transparent",this.fillOpacity=void 0}createNode(){return new _0._ModuleSupport.Group({name:"foreground",zIndex:oht.FOREGROUND})}onLayoutComplete(t){super.onLayoutComplete(t);const{width:e,height:i}=t.chart;let s={x:0,y:0,width:e,height:i};this.image&&(s=this.image.performLayout(e,i)),this.text&&this.updateTextNode(s)}onImageLoad(){this.ctx.updateService.update(_0._ModuleSupport.ChartUpdateType.SCENE_RENDER)}updateTextNode(t){const{textNode:e}=this;e.fontWeight="bold",e.fontFamily="Impact, sans-serif",e.fontSize=19,e.opacity=.7,e.fill="#9b9b9b",e.textBaseline="top";const i=this.textNode.getBBox(),s=10;e.x=t.x+t.width/2-i.width/2,e.y=t.y+t.height+s}};m([Z2(nht,{optional:!0}),aht({newValue(t){this.node.appendChild(t.node),t.onLoad=()=>this.onImageLoad()},oldValue(t){this.node.removeChild(t.node),t.onLoad=void 0}})],R0.prototype,"image",2),m([Z2(lht,{optional:!0}),p3("rectNode","fill")],R0.prototype,"fill",2),m([Z2(rht,{optional:!0}),p3("rectNode","fillOpacity")],R0.prototype,"fillOpacity",2);var cht={type:"root",optionsKey:"foreground",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new R0(t)},ULt=(E(),C(w)),q2=(E(),C(w)),P0=(P(),C(et)),g3=(E(),C(w)),f3=(P(),C(et)),hht=(E(),C(w)),{TranslatableGroup:uht,ScenePathChangeDetection:m3}=hht._ModuleSupport,Q2=class extends uht{constructor(){super(...arguments),this.inset=0,this.cornerRadius=0}applyClip(t,e){const{cornerRadius:i,inset:s}=this,{x:o,y:a,width:n,height:r}=e;t.beginPath(),t.roundRect(o+s,a+s,n-2*s,r-2*s,i),t.clip()}};m([m3()],Q2.prototype,"inset",2),m([m3()],Q2.prototype,"cornerRadius",2);var{TempValidate:J2,BOOLEAN:dht,POSITIVE_NUMBER:y3,ZIndexMap:xd,ActionOnSet:x3,CategoryAxis:pht,TextUtils:ght,Padding:fht,Group:bd,BBox:b3,ProxyProperty:S3}=g3._ModuleSupport,tO=class{constructor(){this.top=0,this.bottom=0}};m([J2(y3)],tO.prototype,"top",2),m([J2(y3)],tO.prototype,"bottom",2);var $g=class extends g3._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.padding=new tO,this.root=new bd({name:"root"}),this.seriesRoot=this.root.appendChild(new Q2({name:"Series-root",zIndex:xd.SERIES_LAYER,renderToOffscreenCanvas:!0})),this.axisGridGroup=this.root.appendChild(new bd({name:"Axes-Grids",zIndex:xd.AXIS_GRID})),this.axisGroup=this.root.appendChild(new bd({name:"Axes-Grids",zIndex:xd.AXIS_GRID})),this.axisLabelGroup=this.root.appendChild(new bd({name:"Axes-Labels",zIndex:xd.SERIES_LABEL})),this.axisCrosslineRangeGroup=this.root.appendChild(new bd({name:"Axes-Crosslines-Range",zIndex:xd.SERIES_CROSSLINE_RANGE})),this.axisCrosslineLineGroup=this.root.appendChild(new bd({name:"Axes-Crosslines-Line",zIndex:xd.SERIES_CROSSLINE_LINE})),this.axisCrosslineLabelGroup=this.root.appendChild(new bd({name:"Axes-Crosslines-Label",zIndex:xd.SERIES_LABEL})),this.data=[],this._destroyed=!1,this.miniChartAnimationPhase="initial",this.axes=[],this.series=[]}destroy(){this._destroyed||(this.destroySeries(this.series),this.axes.forEach(t=>t.destroy()),this.axes=[],this._destroyed=!0)}onSeriesChange(t,e){const i=e?.filter(s=>!t.includes(s))??[];this.destroySeries(i);for(const s of t){if(e?.includes(s))continue;s.attachSeries(this.seriesRoot,this.seriesRoot,void 0);const o=this;s.chart={get mode(){return"standalone"},get isMiniChart(){return!0},get seriesRect(){return o.seriesRect}},s.resetAnimation(this.miniChartAnimationPhase==="initial"?"initial":"disabled")}}destroySeries(t){t?.forEach(e=>{e.destroy(),e.detachSeries(this.seriesRoot,this.seriesRoot,void 0),e.chart=void 0})}assignSeriesToAxes(){this.axes.forEach(t=>{t.boundSeries=this.series.filter(e=>e.axes[t.direction]===t)})}assignAxesToSeries(){const t={};this.axes.forEach(e=>{const i=e.direction;(t[i]??(t[i]=[])).push(e)}),this.series.forEach(e=>{e.directions.forEach(i=>{const s=t[i];if(!s){f3.Logger.warnOnce(`no available axis for direction [${i}]; check series and axes configuration.`);return}const o=e.getKeys(i),a=this.findMatchingAxis(s,o);if(!a){f3.Logger.warnOnce(`no matching axis for direction [${i}] and keys [${o}]; check series and axes configuration.`);return}e.axes[i]=a})})}findMatchingAxis(t,e){for(const i of t){if(!i.keys.length)return i;if(e){for(const s of e)if(i.keys.includes(s))return i}}}updateData(t){this.series.forEach(e=>e.setChartData(t)),this.miniChartAnimationPhase==="initial"&&this.ctx.animationManager.onBatchStop(()=>{this.miniChartAnimationPhase="ready",this.series.forEach(e=>e.resetAnimation("disabled"))})}async processData(t){this.series.some(e=>e.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes()),await Promise.all(this.series.map(e=>(e.resetDatumCallbackCache(),e.processData(t))));for(const e of this.axes)e.processData()}computeAxisPadding(){const t=new fht;return this.enabled&&this.axes.forEach(({position:e,thickness:i,line:s,label:o})=>{if(e==null)return;let a;i?a=i:a=(s.enabled?s.width:0)+(o.enabled?ght.getLineHeight(o.fontSize??0)+o.spacing:0),t[e]=Math.ceil(a)}),t}async layout(t,e){const{padding:i}=this,s=this.seriesRect!=null,o=new b3(0,0,t,e-(i.top+i.bottom));this.seriesRect=o,this.seriesRoot.translationY=i.top,this.seriesRoot.setClipRectCanvasSpace(new b3(0,-i.top,t,e)),this.axes.forEach(a=>{const{position:n="left"}=a;switch(n){case"top":case"bottom":a.range=[0,o.width],a.gridLength=o.height;break;case"right":case"left":{const r=a instanceof pht;a.range=r?[0,o.height]:[o.height,0],a.gridLength=o.width;break}}a.gridPadding=0,a.translation.x=0,a.translation.y=0,n==="right"?a.translation.x=t:n==="bottom"&&(a.translation.y=e),s||a.resetAnimation("initial"),a.calculateLayout(),a.update()}),await Promise.all(this.series.map(a=>a.update({seriesRect:o})))}};m([J2(dht)],$g.prototype,"enabled",2),m([S3(["seriesRoot","inset"])],$g.prototype,"inset",2),m([S3(["seriesRoot","cornerRadius"])],$g.prototype,"cornerRadius",2),m([x3({changeValue(t,e=[]){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const s of e)t.includes(s)||(s.detachAxis(i),s.destroy());for(const s of t)e?.includes(s)||s.attachAxis(i)}})],$g.prototype,"axes",2),m([x3({changeValue(t,e){this.onSeriesChange(t,e)}})],$g.prototype,"series",2);var mht=(E(),C(w)),yht=(P(),C(et)),{SliderWidget:v3}=mht._ModuleSupport,xht=class{constructor(t,e){this.ctx=t,this.sliderHandlers=e,this._min=0,this._max=1,this.minRange=.001,this.dragStartX=0,this.ctx=t,this.toolbar=t.proxyInteractionService.createProxyContainer({type:"toolbar",domManagerId:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],orientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.sliders=[t.proxyInteractionService.createProxyElement({type:"slider",domIndex:1,ariaLabel:{id:"ariaLabelNavigatorMinimum"},parent:this.toolbar,cursor:"ew-resize"}),t.proxyInteractionService.createProxyElement({type:"slider",domIndex:-1/0,ariaLabel:{id:"ariaLabelNavigatorRange"},parent:this.toolbar,cursor:"grab"}),t.proxyInteractionService.createProxyElement({type:"slider",domIndex:2,ariaLabel:{id:"ariaLabelNavigatorMaximum"},parent:this.toolbar,cursor:"ew-resize"})];for(const[i,s]of["min","pan","max"].entries()){const o=this.sliders[i];o.step=v3.STEP_HUNDRETH,o.keyboardStep=v3.STEP_ONE,o.orientation="horizontal",o.setPreventsDefault(!1),o.addListener("drag-start",a=>this.onDragStart(i,a,s)),o.addListener("drag-move",a=>this.onDrag(o,a,s)),o.addListener("drag-end",()=>this.updateSliderRatios()),o.addListener("contextmenu",a=>this.onContextMenu(o,a))}this.sliders[0].addListener("change",()=>this.onMinSliderChange()),this.sliders[1].addListener("change",()=>this.onPanSliderChange()),this.sliders[2].addListener("change",()=>this.onMaxSliderChange()),this.updateSliderRatios(),this.updateVisibility(!1)}destroy(){this.toolbar.destroy()}updateVisibility(t){this.toolbar.setHidden(!t)}updateZoom(){const{_min:t,_max:e}=this;if(!(t==null||e==null))return this.ctx.zoomManager.updateZoom("navigator",{x:{min:t,max:e}})}updateBounds(t){this.toolbar.setBounds(t)}updateSliderBounds(t,e){this.sliders[t].setBounds(e)}updateMinMax(t,e){this._min=t,this._max=e,this.updateSliderRatios()}updateSliderRatios(){let{_min:t,_max:e}=this;t=Math.round(t*100)/100,e=Math.round(e*100)/100;const i=this.ctx.localeManager.t("ariaValuePanRange",{min:t,max:e});this.sliders[0].setValueRatio(t),this.sliders[1].setValueRatio(t,{ariaValueText:i}),this.sliders[2].setValueRatio(e)}toCanvasOffsets(t){return{offsetX:this.dragStartX+t.originDeltaX}}moveToFront(t){if(t===1)return;const e=this.sliders[t],i=this.sliders[2-t];this.toolbar.moveChild(i,e.domIndex-1)}onDragStart(t,e,i){const s=this.sliders[t],o=this.toolbar.cssLeft(),a=s.cssLeft();this.dragStartX=o+a+e.offsetX,this.moveToFront(t),e.device==="touch"&&e.sourceEvent.preventDefault(),this.sliderHandlers.onDragStart(i,this.toCanvasOffsets(e))}onDrag(t,e,i){e.device==="touch"&&e.sourceEvent.preventDefault(),this.sliderHandlers.onDrag(i,this.toCanvasOffsets(e))}onContextMenu(t,{sourceEvent:e,offsetX:i,offsetY:s}){const{x:o,y:a}=this.toolbar.getBounds(),{x:n,y:r}=t.getBounds(),l=i+o+n,c=s+a+r;this.ctx.contextMenuRegistry.dispatchContext("all",{sourceEvent:e,canvasX:l,canvasY:c},{})}onPanSliderChange(){const t=this.sliders[1].getValueRatio(),e=this._max-this._min;this._min=(0,yht.clamp)(0,t,1-e),this._max=this._min+e,this.updateZoom()}onMinSliderChange(){this._min=this.sliders[0].clampValueRatio(0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(){this._max=this.sliders[2].clampValueRatio(this._min+this.minRange,1),this.updateZoom()}},M3=(E(),C(w)),{TempValidate:B0,ScenePathChangeDetection:z0,POSITIVE_NUMBER:eO,BOOLEAN:bht,BBox:Sht,ExtendedPath2D:vht}=M3._ModuleSupport,xh=class extends M3._ModuleSupport.Path{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.cornerRadius=4,this.grip=!0,this.gripPath=new vht}setCenter(t,e){this.dirtyPath=!0,(this.centerX!==t||this.centerY!==e)&&(this.centerX=t,this.centerY=e,this.markDirty("center"))}static align(t,e,i,s,o,a,n,r,l){const c=t.align(i+o*n)+l,h=c+t.align(i+o*n,o*(r-n))-2*l,u=t.align(s+a/2);t.setCenter(c,u),e.setCenter(h,u)}computeBBox(){const{centerX:t,centerY:e,width:i,height:s}=this,o=t-i/2,a=e-s/2;return new Sht(o,a,i,s)}isPointInPath(t,e){return this.getBBox().containsPoint(t,e)}updatePath(){const{centerX:t,centerY:e,path:i,gripPath:s,strokeWidth:o,cornerRadius:a,grip:n}=this,r=o/2,l=this.layerManager?.canvas?.pixelRatio??1;i.clear(),s.clear();const c=Math.floor(this.width/2*l)/l,h=Math.floor(this.height/2*l)/l;i.roundRect(t-c+r,e-h+r,2*(c-r),2*(h-r),a);const u=3;if(n)for(let d=-.5;d<=.5;d+=1)for(let p=-1;p<=1;p+=1)s.arc(t+d*u,e+p*u,1,0,2*Math.PI),s.closePath()}renderFill(t,e){const{stroke:i}=this;super.renderFill(t,e),t.fillStyle=typeof i=="string"?i:"black",t.fill(this.gripPath.getPath2D())}};xh.className="RangeHandle",m([B0(eO),z0()],xh.prototype,"width",2),m([B0(eO),z0()],xh.prototype,"height",2),m([B0(eO),z0()],xh.prototype,"cornerRadius",2),m([B0(bht),z0()],xh.prototype,"grip",2);var Mht=(E(),C(w)),{Path:Dht,BBox:sx,ExtendedPath2D:kht,clippedRoundRect:iO,POSITIVE_NUMBER:Aht,TempValidate:Iht,ScenePathChangeDetection:Tht}=Mht._ModuleSupport,sO=class extends Dht{constructor(){super(...arguments),this.cornerRadius=4,this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1,this.visiblePath=new kht}layout(t,e,i,s,o,a){o=isNaN(o)?this.min:o,a=isNaN(a)?this.max:a,(t!==this.x||e!==this.y||i!==this.width||this.height!==s||o!==this.min||a!==this.max)&&(this.x=t,this.y=e,this.width=i,this.height=s,this.min=o,this.max=a,this.dirtyPath=!0,this.markDirty("RangeMask.layout"))}computeBBox(){const{x:t,y:e,width:i,height:s}=this;return new sx(t,e,i,s)}computeVisibleRangeBBox(){const{x:t,y:e,width:i,height:s,min:o,max:a}=this,n=t+i*o,r=t+i*a;return new sx(n,e,r-n,s)}updatePath(){const{path:t,visiblePath:e,x:i,y:s,width:o,height:a,min:n,max:r,strokeWidth:l,cornerRadius:c}=this,h=l/2;t.clear(),e.clear();const u=this.align(i)+h,d=this.align(s)+h,p=this.align(i,o)-2*h,g=this.align(s,a)-2*h,f=this.align(i+o*n)+h,x=f+this.align(i+o*n,o*(r-n))-2*h,y={topLeft:c,topRight:c,bottomRight:c,bottomLeft:c};iO(t,u,d,p,g,y,new sx(u,d,f-u,g)),iO(t,u,d,p,g,y,new sx(x,d,p+u-x,g)),x-f>1&&iO(e,u,d,p,g,y,new sx(f,d,x-f,g))}renderStroke(t,e){super.renderStroke(t,e),super.renderStroke(t,this.visiblePath.getPath2D())}};sO.className="RangeMask",m([Iht(Aht),Tht()],sO.prototype,"cornerRadius",2);var F0=(E(),C(w)),Cht=class extends F0._ModuleSupport.Group{constructor(t){super({name:"rangeSelectorGroup",zIndex:F0._ModuleSupport.ZIndexMap.NAVIGATOR}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.background=this.appendChild(new F0._ModuleSupport.TranslatableGroup({name:"navigator-background",zIndex:1})),this.append(t)}layout(t,e,i,s,o,a){this.x=t,this.y=e,this.width=i,this.height=s,this.lOffset=o,this.rOffset=a,this.background.translationX=t,this.background.translationY=e,this.markDirty("RangeSelector")}updateBackground(t,e){t!=null&&this.background.removeChild(t),e!=null&&this.background.appendChild(e),this.markDirty("RangeSelector")}computeBBox(){const{x:t,y:e,width:i,height:s,lOffset:o,rOffset:a}=this;return new F0._ModuleSupport.BBox(t-o,e,i+(o+a),s)}},{BaseModuleInstance:Lht,ObserveChanges:oO,TempValidate:G0,BOOLEAN:Nht,POSITIVE_NUMBER:aO}=q2._ModuleSupport,Xg=class extends Lht{constructor(t){super(),this.ctx=t,this.enabled=!1,this.mask=new sO,this.minHandle=new xh,this.maxHandle=new xh,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),toCanvasBBox:()=>this.mask.computeVisibleRangeBBox(),fromCanvasPoint:(e,i)=>({x:e,y:i})},this.height=30,this.cornerRadius=0,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new Cht([this.mask,this.minHandle,this.maxHandle]),this.destroyFns.push(t.scene.attachNode(this.rangeSelector),this.ctx.localeManager.addListener("locale-changed",()=>this.updateZoom()),this.ctx.layoutManager.registerElement(q2._ModuleSupport.LayoutElement.Navigator,e=>this.onLayoutStart(e)),this.ctx.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),t.zoomManager.addListener("zoom-change",e=>this.onZoomChange(e))),this.domProxy=new xht(t,this),this.updateGroupVisibility(),this.miniChart=new $g(t)}updateBackground(t,e){this.rangeSelector?.updateBackground(t,e)}updateGroupVisibility(){const{enabled:t}=this;this.rangeSelector==null||t===this.rangeSelector.visible||(this.rangeSelector.visible=t,this.domProxy.updateVisibility(t),t?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}onLayoutStart(t){if(this.enabled){const{layoutBox:e}=t,i=this.height+this.spacing;e.shrink(i,"bottom"),this.y=e.y+e.height+this.spacing}else this.y=0;if(this.enabled&&this.miniChart){const{top:e,bottom:i}=this.miniChart.computeAxisPadding();t.layoutBox.shrink(e+i,"bottom"),this.y-=i,this.miniChart.inset=this.mask.strokeWidth/2,this.miniChart.cornerRadius=this.mask.cornerRadius}}onLayoutComplete(t){const{x:e,width:i}=t.series.rect,{y:s,height:o}=this;if(this.domProxy.updateVisibility(this.enabled),this.enabled){const{_min:a,_max:n}=this.domProxy;this.layoutNodes(e,s,i,o,a,n),this.domProxy.updateBounds({x:e,y:s,width:i,height:o})}this.x=e,this.width=i,this.miniChart?.layout(i,o).catch(a=>P0.Logger.error(a))}canDrag(){return this.enabled&&this.ctx.interactionManager.isState(q2._ModuleSupport.InteractionState.ZoomDraggable)}onDragStart(t,{offsetX:e}){this.canDrag()&&(t==="pan"&&(this.panStart=(e-this.x)/this.width-this.domProxy._min),this.ctx.zoomManager.fireZoomPanStartEvent("navigator"))}onDrag(t,{offsetX:e}){if(!this.canDrag())return;const{panStart:i,x:s,width:o}=this,{minRange:a}=this.domProxy;let{_min:n,_max:r}=this.domProxy;const l=(e-s)/o;if(t==="min")n=(0,P0.clamp)(0,l,r-a);else if(t==="max")r=(0,P0.clamp)(n+a,l,1);else if(t==="pan"&&i!=null){const c=r-n;n=(0,P0.clamp)(0,l-i,1-c),r=n+c}this.domProxy._min=n,this.domProxy._max=r,this.updateZoom()}onZoomChange(t){const{x:e}=t;if(!e)return;const{x:i,y:s,width:o,height:a}=this,{min:n,max:r}=e;this.domProxy.updateMinMax(n,r),this.layoutNodes(i,s,o,a,n,r)}layoutNodes(t,e,i,s,o,a){const{rangeSelector:n,mask:r,minHandle:l,maxHandle:c}=this;r.layout(t,e,i,s,o,a),n.layout(t,e,i,s,l.width/2,c.width/2),xh.align(l,c,t,e,i,s,o,a,r.strokeWidth/2),o+(a-o)/2<.5?(l.zIndex=3,c.zIndex=4):(l.zIndex=4,c.zIndex=3),[l,this.maskVisibleRange,c].forEach((h,u)=>{const d=h.getBBox(),p={x:d.x-t,y:d.y-e,height:d.height,width:d.width};this.domProxy.updateSliderBounds(u,p)})}updateZoom(){this.enabled&&this.domProxy.updateZoom()}updateData(t){return this.miniChart?.updateData(t)}async processData(t){if(this.miniChart)return this.miniChart?.processData(t)}};m([oO((t,e,i)=>{t.updateBackground(i?.root,e?.root)})],Xg.prototype,"miniChart",2),m([G0(Nht),oO((t,e)=>{t.ctx.zoomManager.setNavigatorEnabled(!!e),t.updateGroupVisibility()})],Xg.prototype,"enabled",2),m([G0(aO)],Xg.prototype,"height",2),m([G0(aO),oO((t,e)=>{t.mask.cornerRadius=e})],Xg.prototype,"cornerRadius",2),m([G0(aO)],Xg.prototype,"spacing",2);var Oht=(E(),C(w)),wht={enabled:!1,height:18,cornerRadius:4,mask:{fill:{$ref:"foregroundColor"},fillOpacity:.1,stroke:{$ref:"borderColor"},strokeWidth:1},minHandle:{fill:{$ref:"backgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},maxHandle:{fill:{$ref:"backgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},miniChart:{enabled:!1,label:{color:{$ref:"textColor"},fontSize:{$rem:[Oht._ModuleSupport.FONT_SIZE_RATIO.SMALLER]},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:5},padding:{top:0,bottom:0}}},Eht={type:"root",optionsKey:"navigator",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Xg(t),removable:!1,themeTemplate:{navigator:wht}},D3=(E(),C(w)),_ht=(E(),C(w)),{AND:Rht,ARRAY:k3,FUNCTION:Pht,NUMBER:Bht,OR:zht,ToolbarButtonProperties:Fht,TempValidate:Ght}=_ht._ModuleSupport,A3=class extends Fht{};m([Ght(zht(Bht,Rht(k3,k3.restrict({length:2})),Pht))],A3.prototype,"value",2);var{BOOLEAN:jht,OBJECT:Vht,ChartAxisDirection:nO,LayoutElement:Wht,PropertiesArray:Uht,Toolbar:Hht,TempValidate:I3}=D3._ModuleSupport,rO=class extends D3._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.buttons=new Uht(A3),this.verticalSpacing=10,this.container=t.domManager.addChild("canvas-overlay","range-buttons"),this.container.role="presentation",this.toolbar=new Hht(this.ctx.localeManager),this.toolbar.addClass("ag-charts-range-buttons"),this.container.append(this.toolbar.getElement()),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),t.layoutManager.registerElement(Wht.ToolbarBottom,this.onLayoutStart.bind(this)),t.zoomManager.addListener("zoom-change",this.onZoomChanged.bind(this)),this.teardown.bind(this))}teardown(){this.container.removeChild(this.toolbar.getElement()),this.toolbar.destroy()}onLayoutStart(t){const{buttons:e,ctx:i,enabled:s,toolbar:o,verticalSpacing:a}=this,{layoutBox:n}=t;if(!s||!i.zoomManager.isZoomEnabled()){o.setHidden(!0);return}o.setHidden(!1),o.updateButtons(e);const r=o.getBounds().height;o.setBounds({x:n.x,y:n.y+n.height-r,width:n.width,height:r}),n.shrink({bottom:r+a})}onZoomChanged(){this.toolbar.clearActiveButton()}onButtonPress({button:{index:t}}){const{zoomManager:e}=this.ctx,i=this.buttons.at(t);if(!i)return;const{value:s}=i;typeof s=="number"?e.extendToEnd("zoom-buttons",nO.X,s):Array.isArray(s)?e.updateWith("zoom-buttons",nO.X,()=>s):typeof s=="function"&&e.updateWith("zoom-buttons",nO.X,s),this.toolbar.toggleActiveButtonByIndex(t)}};m([I3(jht)],rO.prototype,"enabled",2),m([I3(Vht)],rO.prototype,"buttons",2);var T3=1e3*60*60*24,lO=T3*30,Yht=T3*365,Kht={type:"root",optionsKey:"ranges",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new rO(t),themeTemplate:{ranges:{enabled:!1,buttons:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:lO},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:3*lO},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:6*lO},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(t,e)=>[new Date(`${new Date(e).getFullYear()}-01-01`).getTime(),e]},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:Yht},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:(t,e)=>[t,e]}]}}},HLt=(E(),C(w)),C3=(E(),C(w)),L3=class rb extends C3._ModuleSupport.BaseModuleInstance{constructor(e){super(),this.ctx=e,this.activeSections=new Set,this.sectionButtons={annotations:[],chartToolbar:[]},this.container=this.ctx.domManager.addChild("canvas-overlay","shared-toolbar"),this.container.role="presentation"}getSharedToolbar(e){return this.sharedToolbar||this.createSharedToolbar(),this.toolbarWithSection(e)}createSharedToolbar(){this.sharedToolbar=new C3._ModuleSupport.Toolbar(this.ctx.localeManager,"vertical"),this.sharedToolbar.addClass("ag-charts-shared-toolbar"),this.container.append(this.sharedToolbar.getElement()),this.destroyFns.push(()=>{this.sharedToolbar&&(this.container.removeChild(this.sharedToolbar.getElement()),this.sharedToolbar.destroy(),this.sharedToolbar=void 0)})}toolbarWithSection(e){const i=this.sharedToolbar,s={layout:(o,a)=>{if(this.firstLayoutSection!=null&&this.firstLayoutSection!==e&&this.activeSections.has(this.firstLayoutSection))return;this.firstLayoutSection=e;const n=i.getBounds().width;i.setBounds({x:o.x,y:o.y,width:n}),o.shrink({left:n+i.horizontalSpacing+(a??0)})},addToolbarListener:(o,a)=>i.addToolbarListener(o,n=>{const r=this.getSectionIndex(e,n.button.index);if(r<0)return;const l={...n,button:this.sectionButtons[e][r]};a(l)}),updateButtons:o=>{this.sectionButtons[e]=o;const a=rb.SECTION_ORDER.flatMap(n=>this.sectionButtons[n]);i.updateButtons(a)},updateButtonByIndex:(o,a)=>{i.updateButtonByIndex(this.getIndex(e,o),a)},toggleActiveButtonByIndex:o=>{i.toggleActiveButtonByIndex(this.getIndex(e,o))},toggleButtonEnabledByIndex:(o,a)=>{i.toggleButtonEnabledByIndex(this.getIndex(e,o),a)},setHidden:o=>{o?this.activeSections.delete(e):this.activeSections.add(e);let a=0;for(const n of rb.SECTION_ORDER){if(n!==e){a+=this.sectionButtons[n].length;continue}for(const r of this.sectionButtons[e].keys())i.setButtonHiddenByIndex(a+r,o)}},destroy:()=>{s.setHidden(!0),this.activeSections.size===0&&this.destroy()},clearActiveButton:i.clearActiveButton.bind(i),addListener:i.addListener.bind(i),removeListener:i.removeListener.bind(i)};return s.setHidden(!1),s}getIndex(e,i){let s=0;for(const o of rb.SECTION_ORDER){if(o===e)return s+i;s+=this.sectionButtons[o].length}return-1}getSectionIndex(e,i){let s=0;for(const o of rb.SECTION_ORDER){if(o===e)return i>=s+this.sectionButtons[e].length?-1:i-s;s+=this.sectionButtons[o].length}return-1}};L3.SECTION_ORDER=["chartToolbar","annotations"];var $ht=L3,Xht={type:"context",contextKey:"sharedToolbar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new $ht(t)},j0=(E(),C(w)),cO=(E(),C(w)),{CachedTextMeasurerPool:ox,ZIndexMap:Zht,LayoutElement:qht,TempValidate:No,BaseProperties:Qht,OBJECT:Zg,BOOLEAN:Jht,STRING:qg,COLOR_STRING:tut,RATIO:eut,valueProperty:iut,TextUtils:sut,Group:out,Label:ax,Rect:aut,Text:Cs}=cO._ModuleSupport,N3={ohlc:62,candlestick:62,"hollow-candlestick":62,line:96,"step-line":96,hlc:184,"high-low":800},nut={up:"positive",down:"negative"},rut={hlc:"altNeutral"},hO=class extends Qht{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1}};m([No(tut)],hO.prototype,"fill",2),m([No(eut)],hO.prototype,"fillOpacity",2);var Jo=class extends cO._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.openKey=void 0,this.highKey=void 0,this.lowKey=void 0,this.closeKey=void 0,this.volumeKey=void 0,this.title=new ax,this.positive=new ax,this.negative=new ax,this.neutral=new ax,this.altNeutral=new ax,this.background=new hO,this.layoutStyle="block",this.id="status-bar",this.data=void 0,this.layer=new out({name:"StatusBar",zIndex:Zht.STATUS_BAR}),this.labelGroup=this.layer.appendChild(new cO._ModuleSupport.TranslatableGroup),this.backgroundNode=this.labelGroup.appendChild(new aut),this.labels=[{label:"O",configuration:2,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),id:"openValue",key:"openKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:16,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:256,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),style:"neutral",id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:8,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:512,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),style:"neutral",id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:4,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:128,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),id:"closeValue",key:"closeKey",style:"neutral",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"",configuration:64,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),style:"neutral",id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})},{label:"Vol",configuration:32,title:this.labelGroup.appendChild(new Cs),value:this.labelGroup.appendChild(new Cs),id:"volumeValue",key:"volumeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})}],this.highlightManager=t.highlightManager,this.labelGroup.visible=!1,this.destroyFns.push(t.scene.attachNode(this.layer),t.layoutManager.registerElement(qht.Overlay,e=>this.startPerformLayout(e)),t.layoutManager.addListener("layout:complete",e=>this.onLayoutComplete(e)),t.highlightManager.addListener("highlight-change",()=>this.updateHighlight()))}async processData(t){if(!this.enabled||this.data==null)return;const e=[];for(const o of this.labels){const{id:a,key:n}=o,r=this[n];r==null?o.domain=void 0:e.push(iut(r,"number",{id:a}))}if(e.length===0)return;const{processedData:i,dataModel:s}=await t.request(this.id,this.data,{props:e});for(const o of this.labels){const{id:a,key:n}=o;this[n]!=null&&(o.domain=s.getDomain(this,a,"value",i))}}startPerformLayout(t){if(this.labelGroup.translationX=0,this.labelGroup.translationY=0,!this.enabled)return;const{layoutBox:e}=t,i=4,s=12,o=0,a=8;this.labelGroup.translationY=e.y+o;const n=Math.max(this.title.fontSize,this.positive.fontSize,this.negative.fontSize),r=sut.getLineHeight(n),l=N3[this.getChartType()]??0;let c=0,h,u="alphabetic";if(this.layoutStyle==="block")e.shrink(o+r+a,"top"),h=n+(r-n)/2;else{const{title:d}=this.ctx.chartService;if(u="top",h=o+d.padding,d.enabled){const p=d.node.getBBox();c=p.x+p.width+s}else c=d.padding}for(const{label:d,configuration:p,title:g,value:f,domain:x,formatter:y}of this.labels){if(x==null||!(l&p)){g.visible=!1,f.visible=!1;continue}const b=Math.max(ox.measureText(y.format(x[0]),{font:this.positive.getFont(),textBaseline:u,textAlign:"left"}).width,ox.measureText(y.format(x[1]),{font:this.positive.getFont(),textBaseline:u,textAlign:"left"}).width,ox.measureText(y.format(x[0]),{font:this.negative.getFont(),textBaseline:u,textAlign:"left"}).width,ox.measureText(y.format(x[1]),{font:this.negative.getFont(),textBaseline:u,textAlign:"left"}).width);g.visible=!0,f.visible=!0;const S=ox.measureText(d,{font:this.title.getFont(),textBaseline:u,textAlign:"left"});g.setFont(this.title),g.fill=this.title.color,g.text=d,g.textBaseline=u,g.y=h,g.x=c,c+=S.width+i,f.textBaseline=u,f.y=h,f.x=c,c+=b+s}this.backgroundNode.x=0,this.backgroundNode.y=0,this.backgroundNode.width=c-s,this.backgroundNode.height=r+o+a,this.backgroundNode.fill=this.background.fill,this.backgroundNode.fillOpacity=this.background.fillOpacity}onLayoutComplete(t){this.labelGroup.translationX=t.series.rect.x,this.updateHighlight()}updateHighlight(){if(!this.enabled)return;const t=this.highlightManager.getActiveHighlight(),e=t?.datum??this.data?.at(-1);if(e==null){this.labelGroup.visible=!1;return}this.labelGroup.visible=!0;const i=t?.itemId;let s=i!=null?nut[i]:void 0;s==null&&this.openKey!=null&&this.closeKey!=null&&(e[this.openKey]<e[this.closeKey]?s="positive":s="negative");for(const{domain:o,value:a,key:n,formatter:r,style:l}of this.labels){if(o==null)continue;let c=l??s??"neutral";c==="neutral"&&(c=rut[this.getChartType()]??c);const h=this[n],u=h!=null?e?.[h]:void 0;a.setFont(this[c]),a.fill=this[c].color,a.text=typeof u=="number"?r.format(u):""}}getChartType(){let t=this.ctx.chartService.publicApi?.getOptions()?.chartType;return(t==null||N3[t]==null)&&(t="candlestick"),t}};m([No(Jht)],Jo.prototype,"enabled",2),m([No(qg,{optional:!0})],Jo.prototype,"openKey",2),m([No(qg,{optional:!0})],Jo.prototype,"highKey",2),m([No(qg,{optional:!0})],Jo.prototype,"lowKey",2),m([No(qg,{optional:!0})],Jo.prototype,"closeKey",2),m([No(qg,{optional:!0})],Jo.prototype,"volumeKey",2),m([No(Zg)],Jo.prototype,"title",2),m([No(Zg)],Jo.prototype,"positive",2),m([No(Zg)],Jo.prototype,"negative",2),m([No(Zg)],Jo.prototype,"neutral",2),m([No(Zg)],Jo.prototype,"altNeutral",2),m([No(Zg)],Jo.prototype,"background",2),m([No(qg)],Jo.prototype,"layoutStyle",2);var lut={type:"root",identifier:"status-bar",optionsKey:"statusBar",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Jo(t),themeTemplate:{statusBar:{enabled:!1,layoutStyle:j0._ModuleSupport.ThemeSymbols.DEFAULT_CAPTION_LAYOUT_STYLE,title:{color:{$ref:"textColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},positive:{color:j0._ModuleSupport.ThemeSymbols.PALETTE_UP_STROKE,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},negative:{color:j0._ModuleSupport.ThemeSymbols.PALETTE_DOWN_STROKE,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},neutral:{color:j0._ModuleSupport.ThemeSymbols.PALETTE_NEUTRAL_STROKE,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},background:{fill:{$ref:"backgroundColor"},fillOpacity:.5},altNeutral:{color:"gray",fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}}}}},cut=(E(),C(w)),bh=(P(),C(et)),{BOOLEAN:uO,STRING:hut,UNION:uut,BaseProperties:dut,CartesianAxis:O3,ChartUpdateType:w3,ObserveChanges:nx,TooltipManager:put,TempValidate:rx}=cut._ModuleSupport,Sd=class extends dut{constructor(t){super(),this.moduleContext=t,this.enabled=!1,this.axes="x",this.nodeInteraction=!0,this.zoom=!0}updateSiblings(t){const{syncManager:e}=this.moduleContext;for(const i of e.getGroupSiblings(t??this.groupId))this.updateChart(i)}updateChart(t,e=w3.UPDATE_DATA){t.ctx.updateService.update(e,{skipSync:!0})}enabledZoomSync(){const{syncManager:t,zoomManager:e}=this.moduleContext;this.disableZoomSync=e.addListener("zoom-change",()=>{for(const i of t.getGroupSiblings(this.groupId))i.modulesManager.getModule("sync")?.zoom&&i.ctx.zoomManager.updateZoom("sync",this.mergeZoom(i))})}enabledNodeInteractionSync(){const{highlightManager:t,syncManager:e}=this.moduleContext;this.disableNodeInteractionSync=t.addListener("highlight-change",i=>{for(const s of e.getGroupSiblings(this.groupId))if(s.modulesManager.getModule("sync")?.nodeInteraction){if(!i.currentHighlight?.datum){s.ctx.highlightManager.updateHighlight(s.id),s.ctx.tooltipManager.removeTooltip(s.id);continue}for(const o of s.axes){const a=this.axes==="xy"?"x":this.axes;if(!O3.is(o)||o.direction!==a)continue;const n=s.series.map(r=>{const l=r.getKeys(o.direction);if(o.keys.length&&!o.keys.some(g=>l.includes(g)))return;const{nodeData:c}=r.contextNodeData;if(!c?.length)return;const h=c[0][`${o.direction}Key`];let u=i.currentHighlight.datum[h];const d=(0,bh.isDate)(u);d&&(u=u.getTime());const p=c.find(g=>{const f=g.datum[h];return d?f.getTime()===u:f===u});return p?{series:r,nodeDatum:p}:null}).filter(bh.isDefined);if(n.length<2&&n[0]?.nodeDatum!==s.ctx.highlightManager.getActiveHighlight()){const{series:r,nodeDatum:l}=n[0]??{};if(s.ctx.highlightManager.updateHighlight(s.id,l),l){const c=l.midPoint?.x??l.point?.x??0,h=l.midPoint?.y??l.point?.y??0,u=put.makeTooltipMeta({type:"pointermove",canvasX:c,canvasY:h},r,l,void 0);s.ctx.tooltipManager.updateTooltip(s.id,u,s.getTooltipContent(r,l.datumIndex,l))}else s.ctx.tooltipManager.removeTooltip(s.id);this.updateChart(s,w3.SERIES_UPDATE)}}}})}getSyncedDomain(t){if(!O3.is(t)||this.axes!=="xy"&&this.axes!==t.direction)return;const{syncManager:e}=this.moduleContext,i=e.getGroup(this.groupId),[{axes:s}]=i,{direction:o,min:a,max:n,nice:r,reverse:l}=t;for(const c of s)if(o===c.direction&&(r!==c.nice||l!==c.reverse||a!==c.min&&((0,bh.isFiniteNumber)(a)||(0,bh.isFiniteNumber)(c.min))||n!==c.max&&((0,bh.isFiniteNumber)(n)||(0,bh.isFiniteNumber)(c.max)))){bh.Logger.warnOnce("To allow synchronization, ensure that all charts have matching min, max, nice, and reverse properties on the synchronized axes."),this.enabled=!1;return}return(0,bh.unique)(i.flatMap(c=>c.series).filter(c=>{if(c.visible){const h=c.getKeys(t.direction);return t.keys.length?t.keys.some(u=>h.includes(u)):!0}}).flatMap(c=>c.getDomain(t.direction)))}mergeZoom(t){const{zoomManager:e}=this.moduleContext;if(this.axes==="xy")return e.getZoom();const i=t.ctx.zoomManager.getZoom()??{};return i[this.axes]=e.getZoom()?.[this.axes],i}onEnabledChange(){const{syncManager:t}=this.moduleContext;this.enabled?t.subscribe(this.groupId):t.unsubscribe(this.groupId),this.updateSiblings(),this.onNodeInteractionChange(),this.onZoomChange()}onGroupIdChange(t,e){if(!this.enabled||t===e)return;const{syncManager:i}=this.moduleContext;i.unsubscribe(e),i.subscribe(t),this.updateSiblings(e),this.updateSiblings(t)}onAxesChange(){if(!this.enabled)return;const{syncManager:t}=this.moduleContext;this.updateChart(t.getChart())}onNodeInteractionChange(){this.enabled&&this.nodeInteraction?this.enabledNodeInteractionSync():this.disableNodeInteractionSync?.()}onZoomChange(){this.enabled&&this.zoom?this.enabledZoomSync():this.disableZoomSync?.()}destroy(){const{syncManager:t}=this.moduleContext;t.unsubscribe(this.groupId),this.updateSiblings(),this.disableZoomSync?.()}};Sd.className="Sync",m([rx(uO),nx(t=>t.onEnabledChange())],Sd.prototype,"enabled",2),m([rx(hut,{optional:!0}),nx((t,e,i)=>t.onGroupIdChange(e,i))],Sd.prototype,"groupId",2),m([rx(uut(["x","y","xy"],"an axis")),nx(t=>t.onAxesChange())],Sd.prototype,"axes",2),m([rx(uO),nx(t=>t.onNodeInteractionChange())],Sd.prototype,"nodeInteraction",2),m([rx(uO),nx(t=>t.onZoomChange())],Sd.prototype,"zoom",2);var gut={type:"root",optionsKey:"sync",packageType:"enterprise",chartTypes:["cartesian"],moduleFactory:t=>new Sd(t),themeTemplate:{sync:{enabled:!1}}},vd=(E(),C(w)),lx=(P(),C(et)),dO=(E(),C(w)),{COLOR_STRING:fut,RATIO:mut,TempValidate:E3}=dO._ModuleSupport,_3="#2196f3",yut="#8a8a8a",V0=class extends dO._ModuleSupport.Rect{constructor(){super(...arguments),this.fill=_3,this.fillOpacity=.2,this.zIndex=dO._ModuleSupport.ZIndexMap.ZOOM_SELECTION}updateValid(){this.fill=_3}updateInvalid(){this.fill=yut}};V0.className="ZoomRect",m([E3(fut)],V0.prototype,"fill",2),m([E3(mut)],V0.prototype,"fillOpacity",2);var pO=(E(),C(w)),xut=(E(),C(w)),gO=(P(),C(et)),{UNION:but}=xut._ModuleSupport,ti={min:0,max:1},Md=ti.max-ti.min,R3="end",P3="middle",W0=but(["pointer","start","middle","end"],"an anchor point"),U0=(t,e=ti.min,i=ti.max)=>(0,gO.clamp)(e,t,i);function fO(){return{x:{...ti},y:{...ti}}}function Ls(t){return t.x.max-t.x.min}function Ca(t){return t.y.max-t.y.min}function B3(t,e,i=1e-10){return(0,gO.isNumberEqual)(t.min,e.min,i)&&(0,gO.isNumberEqual)(t.max,e.max,i)}function cx(t,e,i){return B3(t.x,e.x,i)&&B3(t.y,e.y,i)}function lo(t){return{x:{min:t?.x?.min??ti.min,max:t?.x?.max??ti.max},y:{min:t?.y?.min??ti.min,max:t?.y?.max??ti.max}}}function ic(t,e,i){if(!t)return{x:0,y:0};const s=U0(e-t.x,0,t.x+t.width),o=U0(i-t.y,0,t.y+t.height),a=1/t.width*s,n=1-1/t.height*o;return{x:U0(a),y:U0(n)}}function Dd(t,e,i){return{x:{min:t.x.min+e,max:t.x.max+e},y:{min:t.y.min+i,max:t.y.max+i}}}function H0(t,e,i){return{x:{min:t.x.min,max:t.x.min+Ls(t)*e},y:{min:t.y.min,max:t.y.min+Ca(t)*i}}}function z3(t,e,i){const s=Ls(t),o=Ca(t),a=t.x.min+s/2,n=t.y.min+o/2;return{x:{min:a-s*e/2,max:a+s*e/2},y:{min:n-o*i/2,max:n+o*i/2}}}function La(t,e,i,s){const{min:o,max:a}=e,n=o+(a-o)/2,r=t.max-t.min;switch(i){case"start":return{min:o,max:e.min+r};case"end":return{min:e.max-r,max:a};case"middle":return{min:n-r/2,max:n+r/2};case"pointer":return Sut(t,e,s??n);default:return{min:o,max:a}}}function Sut(t,e,i){const s=t.max-t.min,o=e.max-e.min,a=i*(1-(o-s)),n=i-a,r=t.min+n,l=t.max+n;return{min:r,max:l}}function vut(t,e,i){return{x:{min:t.x.min*e,max:t.x.max*e},y:{min:t.y.min*i,max:t.y.max*i}}}function gn(t){return{x:Y0(t.x),y:Y0(t.y)}}function Y0(t){const e=t.max-t.min;let i=t.max>ti.max?ti.max-e:t.min,s=t.min<ti.min?e:t.max;return i=Math.max(ti.min,i),s=Math.min(ti.max,s),{min:i,max:s}}var Mut=class{update(t,e,i,s,o,a){return this.oldZoom??(this.oldZoom=lo(e===pO._ModuleSupport.ChartAxisDirection.X?{...o,x:a}:{...o,y:a})),this.updateCoords(t.currentX,t.currentY),this.updateZoom(e,i,s)}stop(){this.coords=void 0,this.oldZoom=void 0}updateCoords(t,e){this.coords?(this.coords.x2=t,this.coords.y2=e):this.coords={x1:t,y1:e,x2:t,y2:e}}updateZoom(t,e,i){const{coords:s,oldZoom:o}=this;let a=lo(o);if(!s||!o)return t===pO._ModuleSupport.ChartAxisDirection.X?a.x:a.y;const n=ic(i,s.x1,s.y1),r=ic(i,s.x2,s.y2);if(t===pO._ModuleSupport.ChartAxisDirection.X){const c=(r.x-n.x)*Ls(o);return a.x.max+=c,a.x=La(a.x,o.x,e,n.x),a=gn(a),a.x}const l=(r.y-n.y)*Ca(o);return a.y.max-=l,a.y=La(a.y,o.y,e,n.y),a=gn(a),a.y}},Dut="zoom-action",kut="pan-action",Aut=class{constructor(t,e,i,s,o,a){this.contextMenuRegistry=t,this.zoomManager=e,this.getModuleProperties=i,this.getRect=s,this.updateZoom=o,this.isZoomValid=a}registerActions(t){if(!t)return;const{contextMenuRegistry:e}=this,i=e.registerDefaultAction({id:Dut,type:"series-area",label:"contextMenuZoomToCursor",action:this.onZoomToHere.bind(this),toggleEnabledOnShow:o=>{const a=this.getRect();if(!a)return!0;const n=ic(a,o.x,o.y);return this.iterateFindNextZoomAtPoint(n)!=null}}),s=e.registerDefaultAction({id:kut,type:"series-area",label:"contextMenuPanToCursor",action:this.onPanToHere.bind(this),toggleEnabledOnShow:()=>!cx(lo(this.zoomManager.getZoom()),fO())});return()=>{i(),s()}}computeOrigin(t){const e=this.getRect(),{enabled:i}=this.getModuleProperties();if(!i||!e||!t?.target||!(t instanceof MouseEvent))return;const s={x:0,y:0,width:e.width,height:e.height};return ic(s,t.offsetX,t.offsetY)}onZoomToHere({event:t}){const e=this.computeOrigin(t);if(!e)return;const i=this.iterateFindNextZoomAtPoint(e);i!=null&&this.updateZoom(i)}onPanToHere({event:t}){const e=this.computeOrigin(t);if(!e)return;const i=lo(this.zoomManager.getZoom()),s=Ls(i),o=Ca(i),a=e.x*s,n=e.y*o,r=Md/2;let l={x:{min:e.x-r,max:e.x+r},y:{min:e.y-r,max:e.y+r}};l=z3(l,s,o),l=Dd(l,i.x.min-e.x+a,i.y.min-e.y+n),this.updateZoom(gn(l))}iterateFindNextZoomAtPoint(t){const{scrollingStep:e}=this.getModuleProperties();for(let i=e;i<=1-e;i+=e){const s=this.getNextZoomAtPoint(t,i);if(this.isZoomValid(s))return s}}getNextZoomAtPoint(t,e){const{isScalingX:i,isScalingY:s}=this.getModuleProperties(),o=lo(this.zoomManager.getZoom()),a=t.x*Ls(o),n=t.y*Ca(o),r=Md/2;let l={x:{min:t.x-r,max:t.x+r},y:{min:t.y-r,max:t.y+r}};return l=z3(l,i?Ls(o)*e:Md,s?Ca(o)*e:Md),l=Dd(l,o.x.min-t.x+a,o.y.min-t.y+n),gn(l)}},F3=(E(),C(w)),{BBoxValues:Iut,ChartAxisDirection:Tut}=F3._ModuleSupport,Cut=class{constructor(t){this.axesHandlers=t,this.axes=[]}destroy(){this.axes.forEach(t=>t.div.destroy())}update(t,e){if(this.axes.forEach(r=>r.div.setHidden(!t)),!t)return;const{X:i,Y:s}=F3._ModuleSupport.ChartAxisDirection,o=[...e.axisManager.getAxisContext(i),...e.axisManager.getAxisContext(s)],{removed:a,added:n}=this.diffAxisIds(o);a.length>0&&(this.axes=this.axes.filter(r=>a.includes(r.axisId)?(r.div.destroy(),!1):!0));for(const r of n){const{axisId:l,direction:c}=r;this.axes.push(this.initAxis(e,l,this.axesHandlers,c))}for(const r of this.axes){const c=o.find(h=>h.axisId===r.axisId).getCanvasBounds();r.div.setHidden(Iut.isEmpty(c)),c!==void 0&&r.div.setBounds(c)}}toggleAxisDraggingCursor(t,e){for(const i of this.axes)i.direction===t&&i.div.setCursor(e?this.getCursor(t):void 0)}getCursor(t){return t===Tut.X?"ew-resize":"ns-resize"}initAxis(t,e,i,s){const o="afterend",a=t.proxyInteractionService.createProxyElement({type:"region",domManagerId:e,where:o});return a.setCursor(this.getCursor(s)),a.addListener("drag-start",n=>{n.device==="touch"&&n.sourceEvent.preventDefault(),i.onDragStart(e,s)}),a.addListener("drag-move",n=>i.onDrag(n)),a.addListener("drag-end",i.onDragEnd),a.addListener("dblclick",()=>i.onDoubleClick(e,s)),{axisId:e,div:a,direction:s}}diffAxisIds(t){const e=this.axes.map(a=>a.axisId),i=t.map(a=>a.axisId),s=e.filter(a=>!i.includes(a)),o=t.filter(a=>!e.includes(a.axisId));return{removed:s,added:o}}},YLt=(E(),C(w)),G3=(P(),C(et)),j3=16,Lut={off:1,short:.01,long:.002},Nut=class{constructor(){this.deceleration=1,this.zoomCoordsHistoryIndex=0,this.coordsHistory=[]}get decelerationValue(){const{deceleration:t}=this;return Math.max(typeof t=="number"?t:Lut[t]??1,1e-4)}addListener(t,e){return this.onUpdate=e,()=>{this.onUpdate=void 0}}stopInteractions(){this.inertiaHandle!=null&&(cancelAnimationFrame(this.inertiaHandle),this.inertiaHandle=void 0)}update(t){this.updateCoords(t.currentX,t.currentY);const{x1:e=0,y1:i=0,x2:s=0,y2:o=0}=this.coords??{};this.onUpdate?.({type:"update",deltaX:e-s,deltaY:i-o})}start(){this.coordsMonitorTimeout=setInterval(this.recordCurrentZoomCoords.bind(this),16)}stop(){const{coordsHistory:t}=this;let e=0,i=0,s=0;if(t.length>0){const o=this.zoomCoordsHistoryIndex%j3;let a=o-1;a<0&&(a=t.length-1);let n=o;n>=t.length&&(n=0);const r=t[a],l=t[n];e=r.x-l.x,i=r.y-l.y,s=r.t-l.t}if(this.coords=void 0,clearInterval(this.coordsMonitorTimeout),this.coordsMonitorTimeout=void 0,this.zoomCoordsHistoryIndex=0,this.coordsHistory.length=0,s>0&&this.decelerationValue<1){const o=e/s,a=i/s,n=Math.hypot(o,a),r=Math.atan2(a,o),l=performance.now();this.inertiaHandle=(0,G3.getWindow)().requestAnimationFrame(c=>{this.animateInertia(c,c,l,n,r)})}}recordCurrentZoomCoords(){const{coords:t,coordsHistory:e,zoomCoordsHistoryIndex:i}=this;if(!t)return;const{x2:s,y2:o}=t,a=Date.now();e[i%j3]={x:s,y:o,t:a},this.zoomCoordsHistoryIndex+=1}animateInertia(t,e,i,s,o){const a=1-this.decelerationValue,n=-s/Math.log(a),r=s*(a**(e-i)-1)/Math.log(a),l=s*(a**(t-i)-1)/Math.log(a);this.onUpdate?.({type:"update",deltaX:-Math.cos(o)*(l-r),deltaY:-Math.sin(o)*(l-r)}),!(l>=n-1)&&(this.inertiaHandle=requestAnimationFrame(c=>{this.animateInertia(c,t,i,s,o)}))}updateCoords(t,e){this.coords?this.coords={x1:this.coords.x2,y1:this.coords.y2,x2:t,y2:e}:this.coords={x1:t,y1:e,x2:t,y2:e}}translateZooms(t,e,i,s){const o=ic(t,t.x+Math.abs(i),t.y+t.height-Math.abs(s)),a=Math.sign(i)*o.x,n=-Math.sign(s)*o.y,r={};for(const[l,{direction:c,zoom:h}]of(0,G3.entries)(e)){if(h&&h.min===ti.min&&h.max===ti.max)continue;let u=lo({[c]:h});u=gn(Dd(u,a*Ls(u),n*Ca(u))),r[l]={direction:c,zoom:u[c]}}return r}},Out=(E(),C(w)),wut=(P(),C(et)),Eut=200,_ut=class{update(t,e,i,s){const o=t.deltaX*e*Eut;return this.translateZooms(i,s,o)}translateZooms(t,e,i){const s={},o=ic(t,t.x+Math.abs(i),0),a=i<0?-o.x:o.x;for(const[n,{direction:r,zoom:l}]of(0,wut.entries)(e)){if(r!==Out._ModuleSupport.ChartAxisDirection.X)continue;let c=lo({x:l});c=gn(Dd(c,a*Ls(c),0)),s[n]={direction:r,zoom:c.x}}return s}},V3=(E(),C(w)),Rut=(P(),C(et)),Put=class{updateAxes(t,e,i,s){const o=t.sourceEvent,a={},{anchorPointX:n,anchorPointY:r,isScalingX:l,isScalingY:c,scrollingStep:h}=e,u=ic(i,o.offsetX??o.clientX,o.offsetY??o.clientY);for(const[d,{direction:p,zoom:g}]of(0,Rut.entries)(s)){if(g==null)continue;let f={...g};const x=h*t.deltaY*(g.max-g.min);if(p===V3._ModuleSupport.ChartAxisDirection.X&&l)f.max+=x,f=La(f,g,n,u.x);else if(p===V3._ModuleSupport.ChartAxisDirection.Y&&c)f.max+=x,f=La(f,g,r,u.y);else continue;a[d]={direction:p,zoom:Y0(f)}}return a}update(t,e,i,s){const{anchorPointX:o,anchorPointY:a,isScalingX:n,isScalingY:r,scrollingStep:l}=e,c=t.offsetX+i.x,h=t.offsetY+i.y,u=ic(i,c,h),d=t.deltaY;let p=lo(s);return p.x.max+=n?l*d*Ls(s):0,p.y.max+=r?l*d*Ca(s):0,n&&(p.x=La(p.x,s.x,o,u.x)),r&&(p.y=La(p.y,s.y,a,u.y)),p=gn(p),p}updateDelta(t,e,i){const{anchorPointX:s,anchorPointY:o,isScalingX:a,isScalingY:n,scrollingStep:r}=e;let l=lo(i);return l.x.max+=a?r*-t*Ls(i):0,l.y.max+=n?r*-t*Ca(i):0,a&&(l.x=La(l.x,i.x,s)),n&&(l.y=La(l.y,i.y,o)),l=gn(l),l}},But=class{constructor(t,e,i){this.rect=t,this.getZoom=e,this.isZoomValid=i,this.rect.visible=!1}update(t,e,i){const s=t.currentX+(i?.x??0),o=t.currentY+(i?.y??0);this.rect.visible=!0,this.updateCoords(s,o,e,i),this.updateRect(i)}stop(t,e,i){let s=lo();if(!t||!e)return s;this.coords&&(s=this.createZoomFromCoords(e,i));const o=e.width/t.width,a=e.height/t.height;return s=gn(vut(s,o,a)),this.reset(),s}reset(){this.coords=void 0,this.rect.visible=!1}didUpdate(){return this.rect.visible&&this.rect.width>0&&this.rect.height>0}updateCoords(t,e,i,s){if(!this.coords){this.coords={x1:t,y1:e,x2:t,y2:e};return}const{coords:o}=this;if(o.x2=t,o.y2=e,!s)return;const{isScalingX:a,isScalingY:n,keepAspectRatio:r}=i,l=this.getNormalisedDimensions();if(r&&a&&n){const c=s.width/s.height;o.y2<o.y1?o.y2=Math.min(o.y1-l.width/c,o.y1):o.y2=Math.max(o.y1+l.width/c,o.y1)}a||(o.x1=s.x,o.x2=s.x+s.width),n||(o.y1=s.y,o.y2=s.y+s.height)}updateRect(t){if(!t)return;const{rect:e}=this,i=this.getNormalisedDimensions(),{width:s,height:o}=i;let{x:a,y:n}=i;a=Math.max(a,t.x),a-=Math.max(0,a+s-(t.x+t.width)),n=Math.max(n,t.y),n-=Math.max(0,n+o-(t.y+t.height)),e.x=a,e.y=n,e.width=s,e.height=o;const r=this.createZoomFromCoords(t,this.getZoom());this.isZoomValid(r)?e.updateValid():e.updateInvalid()}createZoomFromCoords(t,e){const i=lo(e),s=this.getNormalisedDimensions(),o=ic(t,s.x,s.y+s.height),a=s.width/t.width,n=s.height/t.height;let r=H0(i,a,n);const l=o.x*Ls(i),c=o.y*Ca(i);return r=Dd(r,l,c),r=gn(r),r}getNormalisedDimensions(){const{x1:t=0,y1:e=0,x2:i=0,y2:s=0}=this.coords??{},o=t<=i?t:i,a=e<=s?e:s,n=t<=i?i-t:t-i,r=e<=s?s-e:e-s;return{x:o,y:a,width:n,height:r}}},zut=(E(),C(w)),W3=(P(),C(et)),{ARRAY:Fut,BOOLEAN:Gut,STRING:jut,UNION:U3,ActionOnSet:H3,BaseProperties:Vut,ChartAxisDirection:Wut,NativeWidget:Uut,PropertiesArray:Hut,Toolbar:Yut,ToolbarButtonProperties:Kut,TempValidate:kd}=zut._ModuleSupport,mO=class extends Kut{};m([kd(U3(["reset","zoom-in","zoom-out","pan-left","pan-right","pan-start","pan-end"]))],mO.prototype,"value",2),m([kd(jut)],mO.prototype,"section",2);var Qg=class extends Vut{constructor(t,e,i,s,o,a,n){super(),this.ctx=t,this.getModuleProperties=e,this.getResetZoom=i,this.updateZoom=s,this.updateAxisZoom=o,this.resetZoom=a,this.isZoomValid=n,this.enabled=!1,this.buttons=new Hut(mO),this.visible="hover",this.verticalSpacing=10,this.detectionRange=38,this.destroyFns=[],this.container=new Uut((0,W3.createElement)("div")),this.container.addClass("ag-charts-zoom-buttons"),t.domManager.addChild("canvas-overlay","zoom-buttons",this.container.getElement()),this.toolbar=new Yut(t.localeManager),this.container.addChild(this.toolbar),this.toolbar.getElement().style.transform="translateY(54px)",this.toggleVisibility(this.visible==="always"),this.destroyFns.push(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("button-focused",this.onButtonFocus.bind(this)),t.widgets.containerWidget.addListener("mousemove",this.onHover.bind(this)),t.widgets.containerWidget.addListener("mouseleave",this.onLeave.bind(this)),t.layoutManager.addListener("layout:complete",this.onLayoutComplete.bind(this)),this.teardown.bind(this))}destroy(){for(const t of this.destroyFns)t()}toggleVisibleZoomed(t){this.visible==="zoomed"&&this.toggleVisibility(!t)}teardown(){this.ctx.domManager.removeChild("canvas-overlay","zoom-buttons"),this.container.destroy()}onLayoutComplete(t){const{buttons:e,container:i}=this,{rect:s}=t.series;this.toolbar.updateButtons(e),this.toggleButtons();const o=i.getBounds().height;i.setBounds({y:s.y+s.height-o})}onHover(t){if(!this.enabled||this.visible!=="hover"||this.toolbar.isHidden())return;const{container:e,detectionRange:i,ctx:{scene:s}}=this,{currentY:o,sourceEvent:{target:a}}=t,n=e.getElement(),r=n.offsetTop-i,l=o>r&&o<s.canvas.element.offsetHeight||a===n;this.toggleVisibility(l)}onLeave(){this.visible==="hover"&&this.toggleVisibility(!1)}toggleVisibility(t,e=!1){const{container:i,toolbar:s,verticalSpacing:o}=this;s.toggleClass("ag-charts-zoom-buttons__toolbar--hidden",!t);const a=s.getElement();a.style.transitionDuration=e?"0s":"",a.style.transform=t?"translateY(0)":`translateY(${i.getBounds().height+o}px)`}toggleButtons(){const t=lo(this.ctx.zoomManager.getZoom());if(!(this.previousZoom&&cx(this.previousZoom,t))){this.previousZoom=t;for(const[e,i]of this.buttons.entries()){let s=!0;switch(i?.value){case"pan-start":s=t.x.min>ti.min;break;case"pan-end":s=t.x.max<ti.max;break;case"pan-left":s=t.x.min>ti.min;break;case"pan-right":s=t.x.max<ti.max;break;case"zoom-out":s=!cx(t,fO());break;case"zoom-in":s=this.isZoomValid(this.getNextZoomStateUnified("zoom-in",t,this.getModuleProperties()));break;case"reset":s=!cx(t,this.getResetZoom());break}this.toolbar.toggleButtonEnabledByIndex(e,s)}}}onButtonPress({button:t}){if(!this.enabled||this.toolbar.isHidden())return;const e=this.getModuleProperties();if(e.independentAxes&&t.value!=="reset"){const i=this.ctx.zoomManager.getAxisZooms();for(const[s,{direction:o,zoom:a}]of(0,W3.entries)(i))a!=null&&this.onButtonPressAxis(t,e,s,o,a)}else this.onButtonPressUnified(t,e)}onButtonFocus(t){this.toggleVisibility(!0,!0)}onButtonPressAxis(t,e,i,s,o){const{isScalingX:a,isScalingY:n,scrollingStep:r}=e;let l={...o};const c=o.max-o.min;switch(t.value){case"pan-start":l.max=c,l.min=0;break;case"pan-end":l.min=l.max-c,l.max=ti.max;break;case"pan-left":l.min-=c*r,l.max-=c*r;break;case"pan-right":l.min+=c*r,l.max+=c*r;break;case"zoom-in":case"zoom-out":{const h=s===Wut.X,u=h&&a||!h&&n;let d=t.value==="zoom-in"?1-r:1+r;u||(d=1);const p=h?this.getAnchorPointX(e):this.getAnchorPointY(e);l.max=l.min+(l.max-l.min)*d,l=La(l,o,p);break}}this.updateAxisZoom(i,s,Y0(l))}onButtonPressUnified(t,e){const{scrollingStep:i}=e,s=lo(this.ctx.zoomManager.getZoom());let o=lo(s);switch(t.value){case"reset":this.resetZoom();return;case"pan-start":o.x.max=Ls(o),o.x.min=0;break;case"pan-end":o.x.min=ti.max-Ls(o),o.x.max=ti.max;break;case"pan-left":o=Dd(o,-Ls(o)*i,0);break;case"pan-right":o=Dd(o,Ls(o)*i,0);break;case"zoom-in":case"zoom-out":{o=this.getNextZoomStateUnified(t.value,s,e);break}}this.updateZoom(gn(o))}getNextZoomStateUnified(t,e,i){const{isScalingX:s,isScalingY:o,scrollingStep:a}=i,n=t==="zoom-in"?1-a:1+a,r=H0(e,s?n:1,o?n:1);return r.x=La(r.x,e.x,this.getAnchorPointX(i)),r.y=La(r.y,e.y,this.getAnchorPointY(i)),r}getAnchorPointX(t){const e=this.anchorPointX??t.anchorPointX;return e==="pointer"?R3:e}getAnchorPointY(t){const e=this.anchorPointY??t.anchorPointY;return e==="pointer"?P3:e}};m([kd(Gut),H3({changeValue(t){this.toolbar?.setHidden(!t)}})],Qg.prototype,"enabled",2),m([kd(Fut)],Qg.prototype,"buttons",2),m([kd(U3(["always","zoomed","hover"])),H3({changeValue(t,e){e!=null&&this.toggleVisibility(t==="always")}})],Qg.prototype,"visible",2),m([kd(W0)],Qg.prototype,"anchorPointX",2),m([kd(W0)],Qg.prototype,"anchorPointY",2);var KLt=(E(),C(w)),Ad=1e6;function K0({min:t,max:e},i,s,o){return o===0?0:Ad*((i-s)/o*(e-t)+t)}function $ut(t,e,i,s,o,a){[t,e]=[Math.min(t,e),Math.max(t,e)],[i,s]=[Math.min(i,s),Math.max(i,s)];const n=Ad*(i-o)/a,r=Ad*(s-o)/a,l=(i-o)/(s-o),c=(t-l*e)/(Ad-n+l*(r-Ad)),h=(e+(r-Ad)*c)/r;return{min:c,max:h}}function Y3(t,e,i,s){e===0&&(e=30),s===0&&(s=30);const o=t-e,a=t+e,n=i-s,r=i+s;return!(a<n||r<o)}var Xut=class{constructor(){this.touchStart={origins:[{identifier:0,normalX:NaN,normalY:NaN},{identifier:0,normalX:NaN,normalY:NaN}]},this.initialZoom={x:{min:0,max:1},y:{min:0,max:1}},this.previous={a1:NaN,a2:NaN,b1:NaN,b2:NaN}}start(t,e,i){if(t.sourceEvent.targetTouches.length!==2)return!1;t.sourceEvent.preventDefault();const s=Array.from(t.sourceEvent.targetTouches),{x:o,y:a,width:n,height:r}=e.getBoundingClientRect();this.initialZoom.x.min=i.x?.min??0,this.initialZoom.x.max=i.x?.max??1,this.initialZoom.y.min=i.y?.min??0,this.initialZoom.y.max=i.y?.max??1,this.touchStart.origins.forEach(g=>g.identifier=0),this.previous.a1=NaN,this.previous.a2=NaN,this.previous.b1=NaN,this.previous.b2=NaN;for(const g of[0,1]){const f=s[g].clientX,x=a+r-s[g].clientY;this.touchStart.origins[g].identifier=s[g].identifier,this.touchStart.origins[g].normalX=K0(this.initialZoom.x,f,o,n),this.touchStart.origins[g].normalY=K0(this.initialZoom.y,x,a,r)}const[l,c]=s,[h,u]=this.touchStart.origins,d=Y3(l.clientX,l.radiusX,c.clientX,c.radiusX);return Y3(l.clientY,l.radiusY,c.clientY,c.radiusY)&&(h.normalY=u.normalY=(h.normalY+u.normalY)/2),d&&(h.normalX=u.normalX=(h.normalX+u.normalX)/2),!0}update(t,e){t.sourceEvent.preventDefault();const i=Array.from(t.sourceEvent.targetTouches),{x:s,y:o,width:a,height:n}=e.getBoundingClientRect(),{origins:r}=this.touchStart,l=[0,1].map(y=>i.find(b=>b.identifier===r[y].identifier)),c=r[0].normalX,h=r[1].normalX,u=l[0].clientX,d=l[1].clientX,p=r[0].normalY,g=r[1].normalY,f=o+n-l[0].clientY,x=o+n-l[1].clientY;return this.twitchTolerantZoomPan4(c,h,u,d,p,g,f,x,s,o,a,n)}end(t){const e=Array.from(t.sourceEvent.targetTouches).map(i=>i.identifier);return!e.includes(this.touchStart.origins[0].identifier)||!e.includes(this.touchStart.origins[1].identifier)}twitchTolerantZoomPan4(t,e,i,s,o,a,n,r,l,c,h,u){const{initialZoom:d,previous:p}=this,g=K3(t,e,i,s,p,"a1","a2",l,h,d.x),f=K3(o,a,n,r,p,"b1","b2",c,u,d.y);return{x:g,y:f}}};function K3(t,e,i,s,o,a,n,r,l,c){if(t!=e){const h=o[a],u=o[n];return Math.abs(i-h)+Math.abs(s-u)<=1?(i=h,s=u):(o[a]=i,o[n]=s),$ut(t,e,i,s,r,l)}else{const h=K0(c,i,r,l),u=K0(c,s,r,l),d=(h+u)/2,p=(t-d)/Ad;return{min:c.min+p,max:c.max+p}}}var{BOOLEAN:Xr,NUMBER:$3,POSITIVE_NUMBER:Zut,RATIO:yO,UNION:xO,OBJECT:X3,OR:qut,ActionOnSet:$0,ChartAxisDirection:Id,ChartUpdateType:Z3,Deprecated:q3,TempValidate:Di,InteractionState:X0,ProxyProperty:Qut}=vd._ModuleSupport,Z0=t=>(0,lx.roundTo)(t,10),Q3="zoom-cursor",bO="zoom-tooltip",SO=class extends vd._ModuleSupport.BaseProperties{constructor(t){super(),this.onChange=t,this.enabled=!1,this.padding=0}};m([Di(Xr),$0({changeValue(t){this.onChange({enabled:t,padding:this.padding})}})],SO.prototype,"enabled",2),m([Di(yO),$0({changeValue(t){this.onChange({enabled:this.enabled,padding:t})}})],SO.prototype,"padding",2);var Ri=class extends vd._ModuleSupport.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!1,this.enableAxisDragging=!0,this.enableDoubleClickToReset=!0,this.enablePanning=!0,this.enableScrolling=!0,this.enableSelecting=!1,this.enableTwoFingerZoom=!0,this.panKey="alt",this.axes="x",this.scrollingStep=Md/10,this.keepAspectRatio=!1,this.minVisibleItems=2,this.anchorPointX=R3,this.anchorPointY=P3,this.autoScaling=new SO(i=>{this.ctx.zoomManager.setAutoScaleYAxis(i.enabled,i.padding)}),this.buttons=new Qg(this.ctx,this.getModuleProperties.bind(this),this.getResetZoom.bind(this),this.updateZoom.bind(this),this.updateAxisZoom.bind(this),this.resetZoom.bind(this),this.isZoomValid.bind(this)),this.axisDragger=new Mut,this.panner=new Nut,this.scroller=new Put,this.scrollPanner=new _ut,this.twoFingers=new Xut,this.deceleration="short",this.dragState=0,this.isState=i=>this.ctx.interactionManager.isState(i),this.destroyContextMenuActions=void 0,this.isFirstWheelEvent=!0,this.debouncedWheelReset=(0,lx.debounce)(()=>{this.isFirstWheelEvent=!0},100);const e=new V0;this.selector=new But(e,this.getZoom.bind(this),this.isZoomValid.bind(this)),this.contextMenu=new Aut(t.contextMenuRegistry,t.zoomManager,this.getModuleProperties.bind(this),()=>this.paddedRect,this.updateZoom.bind(this),this.isZoomValid.bind(this)),this.domProxy=new Cut({onDragStart:(i,s)=>this.onAxisDragStart(i,s),onDrag:i=>{this.onDragMove({...i,currentX:i.offsetX,currentY:i.offsetY})},onDragEnd:()=>this.onDragEnd(),onDoubleClick:(i,s)=>{this.hoveredAxis={id:i,direction:s},this.onDoubleClick(),this.hoveredAxis=void 0}}),this.destroyFns.push(t.scene.attachNode(e),t.chartEventManager.addListener("series-keynav-zoom",i=>this.onNavZoom(i)),t.widgets.seriesDragInterpreter.addListener("dblclick",i=>this.onDoubleClick(i)),t.widgets.seriesDragInterpreter.addListener("drag-move",i=>this.onDragMove(i)),t.widgets.seriesDragInterpreter.addListener("drag-start",i=>this.onDragStart(i)),t.widgets.seriesDragInterpreter.addListener("drag-end",()=>this.onDragEnd()),t.widgets.seriesWidget.addListener("wheel",i=>this.onWheel(i)),t.widgets.seriesWidget.addListener("touchstart",(i,s)=>this.onTouchStart(i,s)),t.widgets.seriesWidget.addListener("touchmove",(i,s)=>this.onTouchMove(i,s)),t.widgets.seriesWidget.addListener("touchend",i=>this.onTouchEnd(i)),t.widgets.seriesWidget.addListener("touchcancel",i=>this.onTouchEnd(i)),t.updateService.addListener("process-data",i=>this.onProcessData(i)),t.layoutManager.addListener("layout:complete",i=>this.onLayoutComplete(i)),t.zoomManager.addListener("zoom-change",i=>this.onZoomChange(i)),t.zoomManager.addListener("zoom-pan-start",i=>this.onZoomPanStart(i)),this.panner.addListener("update",i=>this.onPanUpdate(i)),()=>this.teardown())}teardown(){this.ctx.zoomManager.setZoomModuleEnabled(!1),this.buttons.destroy(),this.destroyContextMenuActions?.()}onEnabledChange(t){this.ctx.zoomManager.setZoomModuleEnabled(t),this.contextMenu&&(this.destroyContextMenuActions?.(),this.destroyContextMenuActions=this.contextMenu.registerActions(t))}isIgnoredTouch(t){if(t?.device!=="touch")return!1;if(this.ctx.chartService.touch.dragAction!=="drag")return!0;if(this.enableSelecting)return!1;if(!this.enablePanning)return!0;const{x:e,y:i}=this.getZoom();return e.min===0&&e.max===1&&i.min===0&&i.max===1}onDoubleClick(t){const{enabled:e,enableDoubleClickToReset:i,hoveredAxis:s,ctx:{zoomManager:o}}=this;!e||!i||!this.isState(X0.ZoomClickable)||(s?o.resetAxisZoom("zoom",s.id):t?.preventZoomDblClick||this.resetZoom())}onDragStart(t){const{enabled:e,enableAxisDragging:i,enablePanning:s,enableSelecting:o,hoveredAxis:a,ctx:{domManager:n,zoomManager:r}}=this;if(!e||!this.hoveredAxis&&(!this.isState(X0.ZoomDraggable)||this.dragState!==0||this.isIgnoredTouch(t)))return;this.panner.stopInteractions();let l=0;if(i&&a)l=1;else if(t!=null){const c=this.isPanningKeyPressed(t.sourceEvent);s&&(!o||c)?(n.updateCursor(Q3,"grabbing"),l=2,this.panner.start()):o&&!c&&(l=3)}(this.dragState=l)!==0&&r.fireZoomPanStartEvent("zoom")}onDragMove(t){const{anchorPointX:e,anchorPointY:i,axisDragger:s,dragState:o,enabled:a,paddedRect:n,panner:r,selector:l,seriesRect:c,shouldFlipXY:h,hoveredAxis:u,ctx:{interactionManager:d,tooltipManager:p,updateService:g,zoomManager:f}}=this;if(!a||!n||!c||!u&&(!this.isState(X0.ZoomDraggable)||this.isIgnoredTouch(t)))return;d.pushState(vd._ModuleSupport.InteractionState.ZoomDrag),t.device==="touch"&&t.sourceEvent.preventDefault();const x=this.getZoom();switch(o){case 1:{if(!u)break;const{id:y,direction:b}=u;let S=b===Id.X?e:i;h&&(S=b===Id.X?i:e);const M=f.getAxisZoom(y),D=s.update(t,b,S,c,x,M);f.setAxisManuallyAdjusted("zoom",y),this.updateAxisZoom(y,b,D);break}case 2:r.update(t);break;case 3:l.update(t,this.getModuleProperties(),n);break;case 0:return}p.updateTooltip(bO),g.update(Z3.PERFORM_LAYOUT,{skipAnimations:!0})}onDragEnd(){const{axisDragger:t,dragState:e,enabled:i,panner:s,selector:o,ctx:{domManager:a,interactionManager:n,tooltipManager:r}}=this;if(n.popState(vd._ModuleSupport.InteractionState.ZoomDrag),!(!i||e===0)){switch(e){case 1:this.hoveredAxis=void 0,t.stop();break;case 2:s.stop();break;case 3:{if(!o.didUpdate())break;const l=this.getZoom(),c=o.stop(this.seriesRect,this.paddedRect,l);this.updateZoom(c);break}}this.dragState=0,a.updateCursor(Q3),r.removeTooltip(bO)}}onNavZoom(t){const{enabled:e,enableScrolling:i,scroller:s}=this;!this.ctx.interactionManager.isState(vd._ModuleSupport.InteractionState.Default)||!e||!i||(t.widgetEvent.sourceEvent.preventDefault(),this.updateZoom(s.updateDelta(t.delta,this.getModuleProperties(),this.getZoom())))}onWheel(t){const{enabled:e,enablePanning:i,enableScrolling:s,paddedRect:o}=this;if(!e||!s||!o||!this.isState(X0.ZoomWheelable))return;const{deltaX:a,deltaY:n}=t.sourceEvent,r=a!=null&&n!=null&&Math.abs(a)>Math.abs(n);i&&r?this.onWheelPanning(t):this.onWheelScrolling(t)}onWheelPanning(t){const{scrollingStep:e,scrollPanner:i,seriesRect:s,ctx:{zoomManager:o}}=this;if(!s)return;t.sourceEvent.preventDefault();const a=i.update(t,e,s,o.getAxisZooms());for(const[n,{direction:r,zoom:l}]of(0,lx.entries)(a))this.updateAxisZoom(n,r,l)}onWheelScrolling(t){const{enableAxisDragging:e,enableIndependentAxes:i,hoveredAxis:s,scroller:o,seriesRect:a,ctx:{zoomManager:n}}=this;if(!a)return;const r=this.getZoom();let l=t.deltaY>0&&this.isMaxZoom(r);const c=e&&s!=null;let h=this.isScalingX(),u=this.isScalingY();c&&(h=s.direction===vd._ModuleSupport.ChartAxisDirection.X,u=!h);const d=this.getModuleProperties({isScalingX:h,isScalingY:u});let p=!0;if(i===!0){const g=o.updateAxes(t,d,a,n.getAxisZooms());for(const[f,{direction:x,zoom:y}]of(0,lx.entries)(g))c&&s.id!==f||p&&(p=this.updateAxisZoom(f,x,y))}else{const g=o.update(t,d,a,this.getZoom());p=this.updateUnifiedZoom(g)}l||(l=t.deltaY<0&&!p),(!this.isFirstWheelEvent||!l)&&t.sourceEvent.preventDefault(),this.isFirstWheelEvent=!1,this.debouncedWheelReset()}onAxisDragStart(t,e){this.hoveredAxis={id:t,direction:e},this.onDragStart(void 0)}onTouchStart(t,e){!this.enableTwoFingerZoom||this.dragState!==0||this.twoFingers.start(t,e,this.getZoom())&&(this.dragState=4)}onTouchMove(t,e){if(!this.enableTwoFingerZoom||this.dragState!==4)return;const i=this.twoFingers.update(t,e);this.updateZoom(gn(i))}onTouchEnd(t){!this.enableTwoFingerZoom||this.dragState!==4||(t.sourceEvent.preventDefault(),this.twoFingers.end(t)&&(this.dragState=0))}onProcessData(t){this.shouldFlipXY=t.series.shouldFlipXY}onLayoutComplete(t){this.domProxy.update(this.enableAxisDragging,this.ctx),this.enabled&&(this.seriesRect=t.series.rect,this.paddedRect=t.series.paddedRect,this.enableAxisDragging&&this.toggleAxisDraggingCursors())}onZoomChange(t){t.callerId!=="zoom"&&this.panner.stopInteractions();const e=this.getZoom();this.buttons.toggleVisibleZoomed(this.isMaxZoom(e))}onZoomPanStart(t){t.callerId==="zoom"&&this.panner.stopInteractions()}onPanUpdate(t){const{panner:e,seriesRect:i,ctx:{tooltipManager:s,zoomManager:o}}=this;if(!i)return;const a=e.translateZooms(i,o.getAxisZooms(),t.deltaX,t.deltaY);for(const[n,{direction:r,zoom:l}]of(0,lx.entries)(a))this.updateAxisZoom(n,r,l);s.updateTooltip(bO)}isPanningKeyPressed(t){switch(this.panKey){case"alt":return t.altKey;case"ctrl":return t.ctrlKey;case"shift":return t.shiftKey;case"meta":return t.metaKey}}isScalingX(){return this.axes==="xy"?!0:this.shouldFlipXY?this.axes==="y":this.axes==="x"}isScalingY(){return this.axes==="xy"?!0:this.shouldFlipXY?this.axes==="x":this.axes==="y"}getAnchorPointX(){return this.shouldFlipXY?this.anchorPointY:this.anchorPointX}getAnchorPointY(){return this.shouldFlipXY?this.anchorPointX:this.anchorPointY}isMaxZoom(t){return cx(t,fO())}isZoomValid(t){const{minVisibleItems:e,minVisibleItemsX:i,minVisibleItemsY:s,ctx:{zoomManager:o}}=this;if(e===0)return!0;const a=this.getZoom(),n=Z0(Ls(t))<Z0(Ls(a)),r=Z0(Ca(t))<Z0(Ca(a));return!n&&!r?!0:i!=null&&n?o.isVisibleItemsCountAtLeast(t,i):s!=null&&r?o.isVisibleItemsCountAtLeast(t,s):o.isVisibleItemsCountAtLeast(t,e)}isAxisZoomValid(t,e){const{minVisibleItems:i,minVisibleItemsX:s,minVisibleItemsY:o,ctx:{zoomManager:a}}=this,n=this.getZoom(),r=e.max-e.min,l=n[t].max-n[t].min,c={...n,[t]:e},h=t===Id.X?s:o;return r>=l||a.isVisibleItemsCountAtLeast(c,h??i)}resetZoom(){this.ctx.zoomManager.resetZoom("zoom")}updateZoom(t){this.enableIndependentAxes?this.updatePrimaryAxisZooms(t):this.updateUnifiedZoom(t)}updateUnifiedZoom(t){return this.isZoomValid(t)?(this.ctx.zoomManager.updateZoom("zoom",t),!0):(this.ctx.updateService.update(Z3.SCENE_RENDER,{skipAnimations:!0}),!1)}updatePrimaryAxisZooms(t){this.updatePrimaryAxisZoom(t,Id.X),this.updatePrimaryAxisZoom(t,Id.Y)}updatePrimaryAxisZoom(t,e){const i=this.ctx.zoomManager.getPrimaryAxisId(e);i!=null&&this.updateAxisZoom(i,e,t[e])}updateAxisZoom(t,e,i){const{enableIndependentAxes:s,ctx:{zoomManager:o}}=this;if(!i)return!1;const a=this.getZoom();return s!==!0?(a[e]=i,this.updateUnifiedZoom(a)):this.isAxisZoomValid(e,i)?(o.updateAxisZoom("zoom",t,i),!0):!1}toggleAxisDraggingCursors(){const{anchorPointX:t,anchorPointY:e,domProxy:i}=this,s=this.getZoom();let o=Ls(s)!==Md,a=Ca(s)!==Md;if(!o){const n=H0(s,.999,1);n.x=La(n.x,s.x,t),o=this.isZoomValid(n)}if(!a){const n=H0(s,1,.999);n.y=La(n.y,s.y,e),a=this.isZoomValid(n)}i.toggleAxisDraggingCursor(Id.X,o),i.toggleAxisDraggingCursor(Id.Y,a)}getZoom(){return lo(this.ctx.zoomManager.getZoom())}getResetZoom(){return lo(this.ctx.zoomManager.getRestoredZoom())}getModuleProperties(t){return{anchorPointX:t?.anchorPointX??this.getAnchorPointX(),anchorPointY:t?.anchorPointY??this.getAnchorPointY(),enabled:t?.enabled??this.enabled,independentAxes:t?.independentAxes??this.enableIndependentAxes===!0,isScalingX:t?.isScalingX??this.isScalingX(),isScalingY:t?.isScalingY??this.isScalingY(),keepAspectRatio:t?.keepAspectRatio??this.keepAspectRatio,scrollingStep:t?.scrollingStep??this.scrollingStep}}};m([$0({newValue(t){this.onEnabledChange(t)}}),Di(Xr)],Ri.prototype,"enabled",2),m([Di(Xr)],Ri.prototype,"enableAxisDragging",2),m([Di(Xr)],Ri.prototype,"enableDoubleClickToReset",2),m([$0({changeValue(t){this.ctx.zoomManager.setIndependentAxes(!!t)}}),Di(Xr,{optional:!0})],Ri.prototype,"enableIndependentAxes",2),m([Di(Xr)],Ri.prototype,"enablePanning",2),m([Di(Xr)],Ri.prototype,"enableScrolling",2),m([Di(Xr)],Ri.prototype,"enableSelecting",2),m([Di(Xr)],Ri.prototype,"enableTwoFingerZoom",2),m([Di(xO(["alt","ctrl","meta","shift"],"a pan key"))],Ri.prototype,"panKey",2),m([Di(xO(["x","y","xy"],"an axis"))],Ri.prototype,"axes",2),m([Di(yO)],Ri.prototype,"scrollingStep",2),m([Di(Xr)],Ri.prototype,"keepAspectRatio",2),m([Di(Zut)],Ri.prototype,"minVisibleItems",2),m([q3("Use [minVisibleItems] instead."),Di($3.restrict({min:1}))],Ri.prototype,"minVisibleItemsX",2),m([q3("Use [minVisibleItems] instead."),Di($3.restrict({min:1}))],Ri.prototype,"minVisibleItemsY",2),m([Di(W0)],Ri.prototype,"anchorPointX",2),m([Di(W0)],Ri.prototype,"anchorPointY",2),m([Di(X3)],Ri.prototype,"autoScaling",2),m([Di(X3)],Ri.prototype,"buttons",2),m([Qut("panner.deceleration"),Di(qut(yO,xO(["off","short","long"],"a deceleration")))],Ri.prototype,"deceleration",2);var Jut={enabled:!0,visible:"hover",buttons:[{icon:"zoom-out",tooltip:"toolbarZoomZoomOut",value:"zoom-out",section:"scale"},{icon:"zoom-in",tooltip:"toolbarZoomZoomIn",value:"zoom-in",section:"scale"},{icon:"pan-left",tooltip:"toolbarZoomPanLeft",value:"pan-left",section:"pan"},{icon:"pan-right",tooltip:"toolbarZoomPanRight",value:"pan-right",section:"pan"},{icon:"reset",tooltip:"toolbarZoomReset",value:"reset",section:"reset"}]},tdt={type:"root",optionsKey:"zoom",packageType:"enterprise",chartTypes:["cartesian","topology"],moduleFactory:t=>new Ri(t),themeTemplate:{zoom:{anchorPointX:"end",anchorPointY:"middle",axes:"x",buttons:Jut,enabled:!1,enableAxisDragging:!0,enableDoubleClickToReset:!0,enablePanning:!0,enableScrolling:!0,enableSelecting:!1,enableTwoFingerZoom:!0,deceleration:"short",minVisibleItems:2,panKey:"alt",scrollingStep:.1,autoScaling:{enabled:!1,padding:.05}}}},$Lt=(E(),C(w)),edt=(E(),C(w)),{BOOLEAN:J3,OBJECT:idt,POSITION:sdt,POSITIVE_NUMBER:vO,BaseProperties:odt,AxisTicks:adt,ZIndexMap:ndt,ProxyProperty:MO,TempValidate:Td,LayoutElement:rdt,createId:ldt,Group:cdt,Rect:hdt,Marker:udt,TranslatableGroup:ddt,BBox:pdt}=edt._ModuleSupport,DO=class extends odt{constructor(){super(...arguments),this.thickness=16,this.preferredLength=100}};m([Td(vO)],DO.prototype,"thickness",2),m([Td(vO)],DO.prototype,"preferredLength",2);var q0=class{constructor(t){this.axisTicks=t}};m([MO("axisTicks.label")],q0.prototype,"label",2),m([MO("axisTicks.interval")],q0.prototype,"interval",2),m([MO("axisTicks.padding")],q0.prototype,"padding",2);var Cd=class{constructor(t){this.ctx=t,this.id=ldt(this),this.legendGroup=new ddt({name:"legend",zIndex:ndt.LEGEND}),this.gradientRect=new hdt,this.arrow=new udt({shape:"triangle"}),this.ticksGroup=new cdt({name:"legend-axis-group"}),this.destroyFns=[],this.enabled=!1,this.position="bottom",this.reverseOrder=!1,this.gradient=new DO,this.spacing=20,this.data=[],this.highlightManager=t.highlightManager,this.axisTicks=new adt,this.axisTicks.attachAxis(this.ticksGroup),this.scale=new q0(this.axisTicks),this.legendGroup.append([this.gradientRect,this.arrow,this.ticksGroup]),this.destroyFns.push(t.highlightManager.addListener("highlight-change",()=>this.onChartHoverChange()),t.layoutManager.registerElement(rdt.Legend,e=>this.onStartLayout(e)),()=>this.legendGroup.remove())}isVertical(){return this.position==="right"||this.position==="left"}destroy(){this.destroyFns.forEach(t=>t())}attachLegend(t){t.appendChild(this.legendGroup)}onStartLayout(t){const[e]=this.data;if(!this.enabled||!e?.enabled||e.legendType!=="gradient"){this.legendGroup.visible=!1;return}const{colorRange:i}=this.normalizeColorArrays(e);this.updateGradientRect(t.layoutBox,i);const s=this.updateAxis(e)??new pdt(0,0,0,0),{left:o,top:a}=this.getMeasurements(t.layoutBox,s);this.updateArrow(),this.legendGroup.visible=!0,this.legendGroup.translationX=o,this.legendGroup.translationY=a}normalizeColorArrays(t){let e=t.colorDomain.slice();const i=t.colorRange.slice();if(e.length===i.length)return{colorDomain:e,colorRange:i};e.length>i.length&&i.splice(e.length);const[s,o]=e,a=i.length;return e=i.map((n,r)=>r===0?s:r===a-1?o:s+(o-s)*r/(a-1)),{colorDomain:e,colorRange:i}}updateGradientRect(t,e){const{gradientRect:i}=this,{preferredLength:s,thickness:o}=this.gradient;let a;this.isVertical()?(a=0,i.width=o,i.height=Math.min(t.height,s)):(a=90,i.width=Math.min(t.width,s),i.height=o),i.fill={type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:e.map((n,r)=>({stop:r/(e.length-1),color:n})),rotation:a}}updateAxis(t){const{axisTicks:e}=this,i=this.isVertical(),s=this.reverseOrder!==i;return e.position=this.position,e.translationX=i?this.gradient.thickness:0,e.translationY=i?0:this.gradient.thickness,e.scale.domain=s?t.colorDomain.slice().reverse():t.colorDomain,e.scale.range=i?[0,this.gradientRect.height]:[0,this.gradientRect.width],e.calculateLayout()}updateArrow(){const t=this.highlightManager.getActiveHighlight(),{arrow:e}=this;if(t?.colorValue==null){e.visible=!1;return}const{scale:i,label:s}=this.axisTicks,o=s.fontSize??0,a=i.convert(t.colorValue);let{x:n,y:r}=this.gradientRect,l=Math.PI;this.isVertical()?(n-=o/2,r+=a,l/=2):(n+=a,r-=o/2),e.visible=!0,e.fill=s.color,e.rotation=l,e.size=o,e.translationX=n,e.translationY=r}getMeasurements(t,e){let{x:i,y:s}=t,{width:o,height:a}=this.gradientRect;switch(this.isVertical()?o+=e.width+5:a+=e.height+5,this.position){case"left":s+=t.height/2-a/2,t.shrink(o+this.spacing,"left");break;case"right":i+=t.width-o,s+=t.height/2-a/2,t.shrink(o+this.spacing,"right");break;case"top":i+=t.width/2-o/2,t.shrink(a+this.spacing,"top");break;case"bottom":i+=t.width/2-o/2,s+=t.height-a,t.shrink(a+this.spacing,"bottom")}return{top:s,left:i}}onChartHoverChange(){this.enabled&&this.updateArrow()}};Cd.className="GradientLegend",m([Td(J3)],Cd.prototype,"enabled",2),m([Td(sdt)],Cd.prototype,"position",2),m([Td(J3)],Cd.prototype,"reverseOrder",2),m([Td(idt)],Cd.prototype,"gradient",2),m([Td(vO)],Cd.prototype,"spacing",2);var gdt={type:"legend",optionsKey:"gradientLegend",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],identifier:"gradient",moduleFactory:t=>new Cd(t),themeTemplate:{enabled:!1,position:"bottom",spacing:20,scale:{padding:13,label:{color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"}},interval:{minSpacing:15}},gradient:{preferredLength:100,thickness:16},reverseOrder:!1},removable:"standalone-only"},XLt=(E(),C(w)),fdt=(P(),C(et));function mdt(t,e){const i=t.addChild("canvas-overlay","watermark"),s=(0,fdt.createElement)("span");s.innerText=e,i.addEventListener("animationend",()=>{t.removeChild("canvas-overlay","watermark"),t.removeStyles("watermark")}),i.classList.add("ag-watermark"),i.appendChild(s)}var ydt=(E(),C(w)),xdt=(E(),C(w)),kt=(P(),C(et)),{cartesianAxisLabelOptionsDefs:bdt,cartesianAxisOptionsDefs:Sdt,cartesianAxisCrosshairOptions:vdt,continuousAxisOptions:kO,commonAxisLabelOptionsDefs:Q0,commonAxisOptionsDefs:J0,commonCrossLineOptionsDefs:tD,commonCrossLineLabelOptionsDefs:tU,numberFormatValidator:eU}=xdt._ModuleSupport,Mdt={...Sdt,type:(0,kt.required)((0,kt.constant)("ordinal-time")),paddingInner:kt.ratio,paddingOuter:kt.ratio,groupPaddingInner:kt.ratio,label:{...bdt,format:kt.string},interval:kO((0,kt.or)(kt.number,kt.date),!0).interval,crosshair:vdt(!0)},Ddt={...J0,...kO(kt.number),type:(0,kt.required)((0,kt.constant)("angle-number")),crossLines:(0,kt.arrayOfDefs)(tD),startAngle:kt.number,endAngle:kt.number,label:{...Q0,orientation:(0,kt.union)("fixed","parallel","perpendicular"),format:eU}},kdt={innerRadiusRatio:kt.ratio},Adt={...J0,...kdt,type:(0,kt.required)((0,kt.constant)("angle-category")),shape:(0,kt.union)("polygon","circle"),crossLines:(0,kt.arrayOfDefs)(tD),startAngle:kt.number,endAngle:kt.number,paddingInner:kt.ratio,groupPaddingInner:kt.ratio,label:{...Q0,orientation:(0,kt.union)("fixed","parallel","perpendicular")}},Idt={...J0,...kO(kt.number),type:(0,kt.required)((0,kt.constant)("radius-number")),shape:(0,kt.union)("polygon","circle"),positionAngle:kt.number,innerRadiusRatio:kt.ratio,crossLines:(0,kt.arrayOfDefs)({...tD,label:{...tU,positionAngle:kt.number}},"cross-line options"),title:{enabled:kt.boolean,text:kt.string,spacing:kt.positiveNumber,formatter:kt.callback,...kt.fontOptionsDef},label:{...Q0,format:eU}},Tdt={...J0,type:(0,kt.required)((0,kt.constant)("radius-category")),positionAngle:kt.number,innerRadiusRatio:kt.ratio,paddingInner:kt.ratio,paddingOuter:kt.ratio,groupPaddingInner:kt.ratio,label:Q0,crossLines:(0,kt.arrayOfDefs)({...tD,label:{...tU,positionAngle:kt.number}},"cross-line options"),title:{enabled:kt.boolean,text:kt.string,spacing:kt.positiveNumber,formatter:kt.callback,...kt.fontOptionsDef}},Cdt={type:"axis",name:"ordinal-time",chartType:"cartesian",enterprise:!0,options:Mdt,create:t=>new EM(t)},Ldt={type:"axis",name:"angle-number",chartType:"polar",enterprise:!0,options:Ddt,create:t=>new Qu(t)},Ndt={type:"axis",name:"angle-category",chartType:"polar",enterprise:!0,options:Adt,create:t=>new Qc(t)},Odt={type:"axis",name:"radius-number",chartType:"polar",enterprise:!0,options:Idt,create:t=>new Ig(t)},wdt={type:"axis",name:"radius-category",chartType:"polar",enterprise:!0,options:Tdt,create:t=>new Jc(t)},Edt=(E(),C(w)),_dt=(E(),C(w)),{Chart:Rdt,TempValidate:Pdt,ARRAY:Bdt}=_dt._ModuleSupport;function zdt(t){return t.type==="sankey"||t.type==="chord"}var eD=class extends Rdt{getChartType(){return"flow-proportion"}async updateData(){await super.updateData();const t=this.getOptions();this.nodes!==t.nodes&&(this.nodes=t.nodes);const{nodes:e}=this;this.series.forEach(i=>{zdt(i)&&i.setChartNodes(e)})}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const o=s.clone();this.seriesRect=o,this.animationRect=o,e.visible=this.series.some(a=>a.visible);for(const a of[e,i])a.translationX=Math.floor(o.x),a.translationY=Math.floor(o.y);this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:e.visible,rect:o,paddedRect:o}})}};eD.className="FlowProportionChart",eD.type="flow-proportion",m([Pdt(Bdt,{optional:!0})],eD.prototype,"nodes",2);var{isAgFlowProportionChartOptions:Fdt,flowProportionChartOptionsDefs:Gdt}=Edt._ModuleSupport,jdt={type:"chart",name:"flow-proportion",enterprise:!0,options:Gdt,detect:Fdt,create(t,e){return new eD(t,e)}},Vdt=(E(),C(w)),Wdt=(E(),C(w)),{Chart:Udt}=Wdt._ModuleSupport,AO=class extends Udt{getChartType(){return"gauge"}performLayout(t){const{seriesRoot:e,annotationRoot:i,series:s,seriesArea:o}=this,{layoutBox:a}=t,n=a.clone();a.shrink(o.padding.toJson()),this.seriesRect=n.clone().translate(n.x-a.x,n.y-a.y),this.animationRect=a,e.visible=s.some(r=>r.visible);for(const r of[e,i])r.translationX=Math.floor(a.x),r.translationY=Math.floor(a.y);this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:e.visible,rect:n,paddedRect:a}})}getAriaLabel(){const t=[],e=this.getCaptionText();e.length!==0&&t.push(e);for(const s of this.series)t.push(s.getCaptionText());const i=t.join(". ");return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i})}};AO.className="GaugeChart",AO.type="gauge";var{isAgGaugeChartOptions:Hdt,gaugeChartOptionsDefs:Ydt}=Vdt._ModuleSupport,Kdt={type:"chart",name:"gauge",enterprise:!0,options:Ydt,detect:Hdt,create(t,e){return new AO(t,e)}},$dt=(E(),C(w)),Xdt=(E(),C(w)),{Chart:Zdt}=Xdt._ModuleSupport,IO=class extends Zdt{getChartType(){return"hierarchy"}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const o=s.clone();this.seriesRect=o,this.animationRect=o;for(const a of[e,i])a.translationX=Math.floor(o.x),a.translationY=Math.floor(o.y);e.visible=this.series[0].visible,e.setClipRect(o.clone()),this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:o,paddedRect:o}})}getAriaLabel(){const t=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:t})}};IO.className="HierarchyChart",IO.type="hierarchy";var{isAgHierarchyChartOptions:qdt,hierarchyChartOptionsDefs:Qdt}=$dt._ModuleSupport,Jdt={type:"chart",name:"hierarchy",enterprise:!0,options:Qdt,detect:qdt,create(t,e){return new IO(t,e)}},tpt=(E(),C(w)),ept=(E(),C(w)),{Chart:ipt}=ept._ModuleSupport,TO=class extends ipt{getChartType(){return"standalone"}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const o=s.clone();this.seriesRect=o,this.animationRect=o;for(const a of[e,i])a.translationX=Math.floor(s.x),a.translationY=Math.floor(s.y);e.visible=this.series[0].visible,this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:!0,rect:o,paddedRect:s}})}getAriaLabel(){const t=this.getCaptionText();return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:t})}};TO.className="StandaloneChart",TO.type="standalone";var{isAgStandaloneChartOptions:spt,standaloneChartOptionsDefs:opt}=tpt._ModuleSupport,apt={type:"chart",name:"standalone",enterprise:!0,options:opt,detect:spt,create(t,e){return new TO(t,e)}},npt=(E(),C(w)),rpt=(E(),C(w)),lpt=(E(),C(w)),cpt=(P(),C(et));function iU(t){return Array.isArray(t)&&t.length>=2&&t.every(cpt.isFiniteNumber)}function iD(t){return Array.isArray(t)&&t.length>=2&&t.every(iU)}var sU=.001;function hpt(t){return Math.abs(t[0][0]-t[t.length-1][0])<sU&&Math.abs(t[0][1]-t[t.length-1][1])<sU}function oU(t){return Array.isArray(t)&&t.every(iD)&&t.every(hpt)}function aU(t){if(t===null)return!0;if(typeof t!="object"||t.type==null)return!1;const{type:e,coordinates:i}=t;switch(e){case"GeometryCollection":return Array.isArray(t.geometries)&&t.geometries.every(aU);case"MultiPolygon":return Array.isArray(i)&&i.every(oU);case"Polygon":return oU(i);case"MultiLineString":return Array.isArray(i)&&i.every(iD);case"LineString":return iD(i);case"MultiPoint":return iD(i);case"Point":return iU(i)}}function upt(t){return t!==null&&typeof t=="object"&&t.type==="Feature"&&aU(t.geometry)}function dpt(t){return t!==null&&typeof t=="object"&&t.type==="FeatureCollection"&&Array.isArray(t.features)&&t.features.every(upt)}var Jg=lpt._ModuleSupport.predicateWithMessage(dpt,"a GeoJSON object"),{Chart:ppt,MercatorScale:nU,NumberAxis:rU,TempValidate:gpt}=rpt._ModuleSupport;function lU(t){return t.type==="map-shape"||t.type==="map-line"||t.type==="map-marker"||t.type==="map-shape-background"||t.type==="map-line-background"}var sD=class extends ppt{constructor(t,e){super(t,e),this.xAxis=new rU(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new rU(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}async updateData(){await super.updateData();const t=this.getOptions();this.topology!==t.topology&&(this.topology=t.topology);const{topology:e}=this;this.series.forEach(i=>{lU(i)&&i.setChartTopology(e)})}performLayout(t){const{seriesRoot:e,annotationRoot:i}=this,{layoutBox:s}=t;s.shrink(this.seriesArea.padding.toJson());const o=s.clone();this.seriesRect=o,this.animationRect=o;const a=this.series.filter(lU),n=a.reduce((c,h)=>{if(!h.visible)return c;const u=h.topologyBounds;return u==null?c:c==null?u:(c.merge(u),c)},void 0);let r;if(n!=null){const{lon0:c,lat0:h,lon1:u,lat1:d}=n,p=[[c,h],[u,d]],g=nU.bounds(p),{width:f,height:x}=o,y=Math.min(f/g.width,x/g.height),b=g.width*y,S=g.height*y,M=(f-b)/2,D=(x-S)/2,L=M,T=D,I=M+b,N=D+S,O=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),R=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),_=(I-L)/(O.max-O.min),B=L-_*O.min,W=(N-T)/(1-R.min-(1-R.max)),F=T-W*(1-R.max);r=new nU(p,[[B,F],[B+_,F+W]])}a.forEach(c=>{c.scale=r});const l=this.series.some(c=>c.visible);e.visible=l;for(const c of[e,i])c.translationX=Math.floor(o.x),c.translationY=Math.floor(o.y),c.setClipRect(o.clone());this.ctx.layoutManager.emitLayoutComplete(t,{series:{visible:l,rect:o,paddedRect:o}})}};sD.className="TopologyChart",sD.type="topology",m([gpt(Jg,{optional:!0})],sD.prototype,"topology",2);var{isAgTopologyChartOptions:fpt,topologyChartOptionsDefs:mpt}=npt._ModuleSupport,ypt={type:"chart",name:"topology",enterprise:!0,options:mpt,detect:fpt,create(t,e){return new sD(t,e)}},xpt=(E(),C(w)),Y=(P(),C(et)),{toolbarButtonOptionsDefs:oD}=xpt._ModuleSupport,hx={enabled:Y.boolean,axesButtons:{enabled:Y.boolean,axes:(0,Y.union)("x","y","xy")},toolbar:{enabled:Y.boolean,padding:Y.positiveNumber,buttons:(0,Y.arrayOfDefs)({...oD,value:(0,Y.union)("line-menu","fibonacci-menu","text-menu","shape-menu","measurer-menu","line","horizontal-line","vertical-line","parallel-channel","disjoint-channel","fibonacci-retracement","fibonacci-retracement-trend-based","text","comment","callout","note","clear")},"annotation toolbar buttons array")},optionsToolbar:{enabled:Y.boolean,buttons:(0,Y.arrayOf)((0,Y.or)((0,Y.optionsDefs)({...oD,value:(0,Y.union)("line-stroke-width","line-style-type","line-color","fill-color","text-color","text-size","delete","settings")}),(0,Y.optionsDefs)({...oD,value:(0,Y.union)("lock"),checkedOverrides:oD})))}};hx.data=Y.array,hx.xKey=Y.string,hx.volumeKey=Y.string,hx.snap=Y.boolean;var ux=(0,Y.optionsDefs)({__type:(0,Y.required)((0,Y.constant)("date")),value:(0,Y.or)(Y.string,Y.number)},"a serializable date object"),cU=(0,Y.or)(Y.string,Y.number,ux),CO=(0,Y.or)(cU,(0,Y.optionsDefs)({value:cU,groupPercentage:Y.number})),hU={enabled:Y.boolean,cornerRadius:Y.positiveNumber,formatter:Y.callback,...Y.fontOptionsDef,...Y.fillOptionsDef,...Y.strokeOptionsDef,...Y.lineDashOptionsDef},Sh={label:Y.string,position:(0,Y.union)("top","center","bottom"),alignment:(0,Y.union)("left","center","right"),...Y.fontOptionsDef},uU={label:Y.string,position:(0,Y.union)("top","inside","bottom"),alignment:(0,Y.union)("left","center","right"),...Y.fontOptionsDef},co={...Y.fillOptionsDef,...Y.strokeOptionsDef,...Y.lineDashOptionsDef},Pe={x:CO,y:Y.number},Xn={lineStyle:(0,Y.union)("solid","dashed","dotted"),...Y.lineDashOptionsDef},dU={visible:Y.boolean,extendStart:Y.boolean,extendEnd:Y.boolean,locked:Y.boolean,text:Sh,handle:co,label:Y.fontOptionsDef,showFill:Y.boolean,isMultiColor:Y.boolean,strokes:(0,Y.arrayOf)(Y.color),rangeStroke:Y.color,bands:(0,Y.union)(4,6,10),...Y.strokeOptionsDef,...Xn},bpt=(0,Y.typeUnion)({line:{visible:Y.boolean,extendStart:Y.boolean,extendEnd:Y.boolean,locked:Y.boolean,text:Sh,handle:co,start:Pe,end:Pe,...Y.strokeOptionsDef,...Xn},"horizontal-line":{visible:Y.boolean,locked:Y.boolean,value:CO,axisLabel:hU,text:Sh,handle:co,...Y.strokeOptionsDef,...Xn},"vertical-line":{visible:Y.boolean,locked:Y.boolean,value:CO,axisLabel:hU,text:Sh,handle:co,...Y.strokeOptionsDef,...Xn},"disjoint-channel":{visible:Y.boolean,extendStart:Y.boolean,extendEnd:Y.boolean,locked:Y.boolean,startHeight:Y.positiveNumber,endHeight:Y.positiveNumber,text:uU,handle:co,start:Pe,end:Pe,background:Y.fillOptionsDef,...Y.strokeOptionsDef,...Xn},"parallel-channel":{visible:Y.boolean,extendStart:Y.boolean,extendEnd:Y.boolean,locked:Y.boolean,height:Y.positiveNumber,text:uU,handle:co,start:Pe,end:Pe,background:Y.fillOptionsDef,middle:{visible:Y.boolean,...Y.strokeOptionsDef,...Xn},...Y.strokeOptionsDef,...Xn},"fibonacci-retracement":{reverse:Y.boolean,start:Pe,end:Pe,...dU},"fibonacci-retracement-trend-based":{reverse:Y.boolean,start:Pe,end:Pe,endRetracement:Pe,...dU},callout:{visible:Y.boolean,locked:Y.boolean,text:Y.string,handle:co,start:Pe,end:Pe,...Y.fontOptionsDef,...Y.fillOptionsDef,...Y.strokeOptionsDef},comment:{visible:Y.boolean,locked:Y.boolean,text:Y.string,handle:co,...Pe,...Y.fontOptionsDef,...Y.fillOptionsDef},note:{visible:Y.boolean,locked:Y.boolean,text:Y.string,handle:co,background:{...Y.fillOptionsDef,...Y.strokeOptionsDef},...Pe,...Y.fontOptionsDef,...Y.fillOptionsDef,...Y.strokeOptionsDef},text:{visible:Y.boolean,locked:Y.boolean,text:Y.string,handle:co,...Pe,...Y.fontOptionsDef,...Y.fillOptionsDef},arrow:{visible:Y.boolean,extendStart:Y.boolean,extendEnd:Y.boolean,locked:Y.boolean,text:Sh,handle:co,start:Pe,end:Pe,...Y.strokeOptionsDef,...Xn},"arrow-up":{visible:Y.boolean,locked:Y.boolean,handle:co,...Pe,...Y.fillOptionsDef},"arrow-down":{visible:Y.boolean,locked:Y.boolean,handle:co,...Pe,...Y.fillOptionsDef},"date-range":{visible:Y.boolean,extendAbove:Y.boolean,extendBelow:Y.boolean,locked:Y.boolean,text:Sh,handle:co,start:Pe,end:Pe,statistics:{divider:Y.strokeOptionsDef,...Y.fontOptionsDef,...Y.fillOptionsDef,...Y.strokeOptionsDef},...Y.strokeOptionsDef,...Xn},"price-range":{visible:Y.boolean,extendLeft:Y.boolean,extendRight:Y.boolean,locked:Y.boolean,text:Sh,handle:co,start:Pe,end:Pe,statistics:{divider:Y.strokeOptionsDef,...Y.fontOptionsDef,...Y.fillOptionsDef,...Y.strokeOptionsDef},...Y.strokeOptionsDef,...Xn},"date-price-range":{visible:Y.boolean,locked:Y.boolean,text:Sh,handle:co,start:Pe,end:Pe,statistics:{divider:Y.strokeOptionsDef,...Y.fontOptionsDef,...Y.fillOptionsDef,...Y.strokeOptionsDef},...Y.strokeOptionsDef,...Xn}}),Spt={chartType:(0,Y.union)("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),annotations:(0,Y.arrayOf)(bpt),legend:(0,Y.arrayOfDefs)({visible:Y.boolean,seriesId:Y.string,itemId:Y.string,legendItemName:Y.string},"legend state array"),zoom:{rangeX:{start:(0,Y.or)(Y.number,ux),end:(0,Y.or)(Y.number,ux)},rangeY:{start:(0,Y.or)(Y.number,ux),end:(0,Y.or)(Y.number,ux)},ratioX:{start:Y.ratio,end:Y.ratio},ratioY:{start:Y.ratio,end:Y.ratio},autoScaledAxes:(0,Y.arrayOf)((0,Y.constant)("y"))}},vpt=(E(),C(w)),Me=(P(),C(et)),Mpt=(E(),C(w)),LO=(E(),C(w));function Dpt(t){return{from:t?{scalingX:1,scalingY:0}:{scalingX:0,scalingY:1},to:{scalingX:1,scalingY:1}}}function kpt(t){return(e,i)=>t?{scalingCenterY:i.scaledValues.medianValue}:{scalingCenterX:i.scaledValues.medianValue}}var pU=(E(),C(w)),Apt=(P(),C(et)),{ScalableGroup:Ipt,Rect:dx,Line:px,BBox:Tpt,Selection:gU,applyShapeFillBBox:Cpt}=pU._ModuleSupport,Lpt=class extends Ipt{constructor(){super(),this.append([new dx({tag:0}),new dx({tag:2}),new dx({tag:1}),new px({tag:3}),new px({tag:3}),new px({tag:4}),new px({tag:4})])}updateDatumStyles(t,e,i,s,o){const{bandwidth:a,scaledValues:{xValue:n,medianValue:r}}=t;let{minValue:l,q1Value:c,q3Value:h,maxValue:u}=t.scaledValues;(i&&!s||!i&&s)&&([u,h,c,l]=[l,c,h,u]);const d=(G,K,$,Z)=>i?{y:G,x:K,width:Z,height:$}:{x:G,y:K,width:$,height:Z},p=(G,K,$)=>i?{y1:G,y2:K,x:$}:{x1:G,x2:K,y:$},g=(G,K,$)=>i?{x1:K,x2:$,y:G}:{x:G,y1:K,y2:$},f=(G,K,$,Z)=>({x:G,y:K,width:$,height:Z}=d(G,K,$,Z),new Tpt(G,K,$,Z)),{fill:x,fillOpacity:y,stroke:b,strokeWidth:S,strokeOpacity:M,lineDash:D,lineDashOffset:L,cornerRadius:T,cap:I,whisker:N}=e,O=gU.select(this,dx),[R]=O.selectByTag(0),[_]=O.selectByTag(2),[B]=O.selectByTag(1),W=O.selectByTag(3),F=O.selectByTag(4);N.strokeWidth>a&&(N.strokeWidth=a);const z=d(c,n,h-c,a);_.setProperties(z),R.setProperties(z),R.setProperties({cornerRadius:T});const U=Math.max(Math.round(r-S/2),c+S),H=Math.min(Math.round(r+S/2),h-S);B.setProperties(z),B.setProperties({visible:U<H,cornerRadius:T,clipBBox:f(U,n+S,H-U,Math.max(0,a-S*2))});const j=Math.floor(n+a*(1-I.lengthRatio)/2),V=Math.ceil(n+a*(1+I.lengthRatio)/2);F[0].setProperties(g(l,j,V)),F[1].setProperties(g(u,j,V)),W[0].setProperties(p(Math.round(l+N.strokeWidth/2),c,Math.floor(n+a/2))),W[1].setProperties(p(h,Math.round(u-N.strokeWidth/2),Math.floor(n+a/2))),Cpt(R,x,o),R.setProperties({fill:x,fillOpacity:y,strokeWidth:S*2,strokeOpacity:0}),B.setProperties({fill:b,fillOpacity:M,strokeWidth:0});for(const G of[...W,...F])G.setProperties(N);_.setProperties({stroke:b,strokeWidth:S,strokeOpacity:M,lineDash:D,lineDashOffset:L,cornerRadius:T,fillOpacity:0})}distanceSquared(t,e){const i=gU.selectByClass(this,dx,px);return pU._ModuleSupport.nearestSquared(t,e,i).distanceSquared}get midPoint(){const t=this.datum;return t.midPoint===void 0?(Apt.Logger.error("BoxPlotGroup.datum.midPoint is undefined"),{x:NaN,y:NaN}):t.midPoint}},Npt=(E(),C(w)),{BaseProperties:fU,FillGradientDefaults:Opt,FillPatternDefaults:wpt,AbstractBarSeriesProperties:Ept,SeriesTooltip:_pt,TempValidate:he,COLOR_STRING:NO,FUNCTION:Rpt,LINE_DASH:mU,OBJECT:gx,POSITIVE_NUMBER:fx,RATIO:aD,STRING:Na,mergeDefaults:Ppt,COLOR_GRADIENT:Bpt,COLOR_PATTERN:zpt,OR:Fpt}=Npt._ModuleSupport,yU=class extends fU{constructor(){super(...arguments),this.lengthRatio=.5}};m([he(aD)],yU.prototype,"lengthRatio",2);var tf=class extends fU{};m([he(NO,{optional:!0})],tf.prototype,"stroke",2),m([he(fx)],tf.prototype,"strokeWidth",2),m([he(aD)],tf.prototype,"strokeOpacity",2),m([he(mU,{optional:!0})],tf.prototype,"lineDash",2),m([he(fx)],tf.prototype,"lineDashOffset",2);var Ae=class extends Ept{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new Opt,this.fillPatternDefaults=new wpt,this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.cap=new yU,this.whisker=new tf,this.tooltip=new _pt}toJson(){const{stroke:t,strokeWidth:e,strokeOpacity:i,lineDash:s,lineDashOffset:o}=this,a=super.toJson();return a.whisker=Ppt(a.whisker,{stroke:t,strokeWidth:e,strokeOpacity:i,lineDash:s,lineDashOffset:o}),a}};m([he(Na)],Ae.prototype,"xKey",2),m([he(Na)],Ae.prototype,"minKey",2),m([he(Na)],Ae.prototype,"q1Key",2),m([he(Na)],Ae.prototype,"medianKey",2),m([he(Na)],Ae.prototype,"q3Key",2),m([he(Na)],Ae.prototype,"maxKey",2),m([he(Na,{optional:!0})],Ae.prototype,"xName",2),m([he(Na,{optional:!0})],Ae.prototype,"yName",2),m([he(Na,{optional:!0})],Ae.prototype,"minName",2),m([he(Na,{optional:!0})],Ae.prototype,"q1Name",2),m([he(Na,{optional:!0})],Ae.prototype,"medianName",2),m([he(Na,{optional:!0})],Ae.prototype,"q3Name",2),m([he(Na,{optional:!0})],Ae.prototype,"maxName",2),m([he(Fpt(Bpt,zpt,NO))],Ae.prototype,"fill",2),m([he(gx)],Ae.prototype,"fillGradientDefaults",2),m([he(gx)],Ae.prototype,"fillPatternDefaults",2),m([he(aD)],Ae.prototype,"fillOpacity",2),m([he(NO)],Ae.prototype,"stroke",2),m([he(fx)],Ae.prototype,"strokeWidth",2),m([he(aD)],Ae.prototype,"strokeOpacity",2),m([he(mU)],Ae.prototype,"lineDash",2),m([he(fx)],Ae.prototype,"lineDashOffset",2),m([he(fx)],Ae.prototype,"cornerRadius",2),m([he(Rpt,{optional:!0})],Ae.prototype,"itemStyler",2),m([he(gx)],Ae.prototype,"cap",2),m([he(gx)],Ae.prototype,"whisker",2),m([he(gx)],Ae.prototype,"tooltip",2);var{extractDecoratedProperties:xU,fixNumericExtent:Gpt,keyProperty:jpt,mergeDefaults:OO,SeriesNodePickMode:bU,SMALLEST_KEY_INTERVAL:Vpt,valueProperty:mx,diff:Wpt,animationValidation:Upt,computeBarFocusBounds:Hpt,createDatumId:SU,ContinuousScale:Ypt,ChartAxisDirection:vU,motion:MU,isGradientFill:Kpt,getShapeStyle:yx}=LO._ModuleSupport,$pt=class extends LO._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.minKey=s.properties.minKey,this.q1Key=s.properties.q1Key,this.medianKey=s.properties.medianKey,this.q3Key=s.properties.q3Key,this.maxKey=s.properties.maxKey}},nD=class extends LO._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[bU.NEAREST_NODE,bU.EXACT_SHAPE_MATCH],directionKeys:{x:["xKey"],y:["medianKey","q1Key","q3Key","minKey","maxKey"]},directionNames:{x:["xName"],y:["medianName","q1Name","q3Name","minName","maxName"]},categoryKey:"xValue",pathsPerSeries:[],hasHighlightedLabels:!0}),this.properties=new Ae,this.NodeEvent=$pt}async processData(t){if(!this.properties.isValid()||!this.visible)return;const{xKey:e,minKey:i,q1Key:s,medianKey:o,q3Key:a,maxKey:n}=this.properties,r=!this.ctx.animationManager.isSkipped(),l=this.getCategoryAxis()?.scale,c=this.getValueAxis()?.scale,{isContinuousX:h,xScaleType:u,yScaleType:d}=this.getScaleInformation({xScale:l,yScale:c}),p=[];r&&this.processedData&&p.push(Wpt(this.id,this.processedData)),r&&p.push(Upt());const{processedData:g}=await this.requestDataModel(t,this.data,{props:[jpt(e,u,{id:"xValue"}),mx(i,d,{id:"minValue"}),mx(s,d,{id:"q1Value"}),mx(o,d,{id:"medianValue"}),mx(a,d,{id:"q3Value"}),mx(n,d,{id:"maxValue"}),...h?[Vpt]:[],...p]});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];if(t!==this.getBarDirection()){const{index:o,def:a}=i.resolveProcessedDataDefById(this,"xValue"),n=e.domain.keys[o];return a.type==="key"&&a.valueType==="category"?n:this.padBandExtent(n)}const s=this.domainForClippedRange(vU.Y,["minValue","maxValue"],"xValue",!0);return Gpt(s)}getSeriesRange(t,e){return this.domainForVisibleRange(vU.Y,["maxValue","minValue"],"xValue",e,!0)}createNodeData(){const{visible:t,dataModel:e,processedData:i}=this,s=this.getCategoryAxis(),o=this.getValueAxis();if(!(e&&i&&s&&o))return;const{xKey:a,fill:n,fillOpacity:r,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d,cap:p,whisker:g}=this.properties,f=[],x=e.resolveKeysById(this,"xValue",i),y=e.resolveColumnById(this,"minValue",i),b=e.resolveColumnById(this,"q1Value",i),S=e.resolveColumnById(this,"medianValue",i),M=e.resolveColumnById(this,"q3Value",i),D=e.resolveColumnById(this,"maxValue",i),{barWidth:L,groupIndex:T}=this.updateGroupScale(s),I=Ypt.is(s.scale)?L*-.5:0,{groupScale:N}=this,O=this.isVertical(),R={itemId:a,nodeData:f,labelData:[],scales:this.calculateScaling(),visible:this.visible};return t&&(i.dataSources.get(this.id)??[]).forEach((B,W)=>{const F=x[W];if(F==null)return;const z=y[W],U=b[W],H=S[W],j=M[W],V=D[W];if([z,U,H,j,V].some(X=>typeof X!="number")||z>U||U>H||H>j||j>V)return;const G={xValue:Math.round(s.scale.convert(F)),minValue:Math.round(o.scale.convert(z)),q1Value:Math.round(o.scale.convert(U)),medianValue:Math.round(o.scale.convert(H)),q3Value:Math.round(o.scale.convert(j)),maxValue:Math.round(o.scale.convert(V))};G.xValue+=Math.round(N.convert(String(T)))+I;const K=Math.round(L),$=Math.abs(G.q3Value-G.q1Value),Z=G.xValue+K/2,Q=Math.min(G.q3Value,G.q1Value)+$/2,q={x:O?Z:Q,y:O?Q:Z};let J;O?J={x:q.x-K/2,y:G.minValue,width:K,height:G.maxValue-G.minValue}:J={x:G.minValue,y:q.y-K/2,width:G.maxValue-G.minValue,height:K},f.push({series:this,itemId:F,datum:B,datumIndex:W,xKey:a,bandwidth:K,scaledValues:G,cap:p,whisker:g,fill:n,fillOpacity:r,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d,midPoint:q,focusRect:J})}),R}legendItemSymbol(){const{fill:t,fillOpacity:e,stroke:i,strokeWidth:s,strokeOpacity:o,lineDash:a,lineDashOffset:n,fillGradientDefaults:r,fillPatternDefaults:l}=this.properties;return{marker:yx({fill:t,fillOpacity:e,stroke:i,strokeOpacity:o,strokeWidth:s,lineDash:a,lineDashOffset:n},r,l)}}getLegendData(t){const{id:e,ctx:{legendManager:i},visible:s}=this,{xKey:o,yName:a,showInLegend:n,legendItemName:r}=this.properties;return!o||t!=="category"?[]:[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:e}),label:{text:r??a??e},symbol:this.legendItemSymbol(),legendItemName:r,hideInLegend:!n}]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{xKey:a,xName:n,yName:r,medianKey:l,medianName:c,q1Key:h,q1Name:u,q3Key:d,q3Name:p,minKey:g,minName:f,maxKey:x,maxName:y,legendItemName:b,tooltip:S}=o,M=this.getCategoryAxis(),D=this.getValueAxis();if(!i||!s||!M||!D)return;const L=s.dataSources.get(this.id)?.[t],T=i.resolveKeysById(this,"xValue",s)[t],I=i.resolveColumnById(this,"minValue",s)[t],N=i.resolveColumnById(this,"q1Value",s)[t],O=i.resolveColumnById(this,"medianValue",s)[t],R=i.resolveColumnById(this,"q3Value",s)[t],_=i.resolveColumnById(this,"maxValue",s)[t];if(T==null)return;const B=this.getItemBaseStyle(!1);return Object.assign(B,this.getItemStyleOverrides(String(t),L,B,!1)),S.formatTooltip(this.properties,{heading:M.formatDatum(T),title:b??r,symbol:this.legendItemSymbol(),data:[{label:f,fallbackLabel:g,value:D.formatDatum(I)},{label:u,fallbackLabel:h,value:D.formatDatum(N)},{label:c,fallbackLabel:l,value:D.formatDatum(O)},{label:p,fallbackLabel:d,value:D.formatDatum(R)},{label:y,fallbackLabel:x,value:D.formatDatum(_)}]},{seriesId:e,datum:L,title:r,xKey:a,xName:n,yName:r,medianKey:l,medianName:c,q1Key:h,q1Name:u,q3Key:d,q3Name:p,minKey:g,minName:f,maxKey:x,maxName:y,...B})}animateEmptyUpdateReady({datumSelection:t}){const e=this.isVertical(),{from:i,to:s}=Dpt(e);MU.resetMotion([t],kpt(e)),MU.staticFromToMotion(this.id,"datums",this.ctx.animationManager,[t],i,s,{phase:"initial"})}isLabelEnabled(){return!1}updateDatumSelection(t){const e=t.nodeData??[];return t.datumSelection.update(e)}getItemBaseStyle(t){const{properties:e}=this,{cornerRadius:i,cap:s,whisker:o,fillGradientDefaults:a,fillPatternDefaults:n}=e,r=t?e.highlightStyle.item:void 0,l=this.getStrokeWidth(e.strokeWidth);return yx({fill:r?.fill??e.fill,fillOpacity:r?.fillOpacity??e.fillOpacity,stroke:r?.stroke??e.stroke,strokeWidth:r?.strokeWidth??l,strokeOpacity:r?.strokeOpacity??e.strokeOpacity,lineDash:r?.lineDash??e.lineDash??[],lineDashOffset:r?.lineDashOffset??e.lineDashOffset,cornerRadius:i,cap:s,whisker:o},a,n)}getItemStyleOverrides(t,e,i,s){const{id:o,properties:a}=this,{xKey:n,minKey:r,q1Key:l,medianKey:c,q3Key:h,maxKey:u,fillGradientDefaults:d,fillPatternDefaults:p,itemStyler:g}=a;if(g==null)return;const f=this.cachedDatumCallback(SU(t,s?"highlight":"node"),()=>this.callWithContext(g,{seriesId:o,datum:e,xKey:n,minKey:r,q1Key:l,medianKey:c,q3Key:h,maxKey:u,highlighted:s,...i}));return yx(f,d,p)}updateDatumNodes({datumSelection:t,isHighlight:e}){const i=this.isVertical(),s=this.getValueAxis()?.isReversed(),{highlightStyle:o}=this.properties;t.each((a,n)=>{let r=this.getFormattedStyles(n,e?"highlight":"node");e&&(r=OO(o.item,r));const{stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d}=r;r.whisker=OO(r.whisker,{stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d});const p=this.getShapeFillBBox();a.updateDatumStyles(n,r,i,s,p)})}updateLabelNodes(){}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e)}nodeFactory(){return new Lpt}getFormattedStyles(t,e){const{id:i,properties:s}=this,{xKey:o,minKey:a,q1Key:n,medianKey:r,q3Key:l,maxKey:c,itemStyler:h,cornerRadius:u,fillGradientDefaults:d,fillPatternDefaults:p}=s,{datum:g,stroke:f,strokeWidth:x,strokeOpacity:y,lineDash:b,lineDashOffset:S,cap:M,whisker:D}=t;let L,T=1;Kpt(t.fill)?L=t.fill:(L=t.fill,T=s.fillOpacity);let I=yx({fill:L,fillOpacity:T,stroke:f,strokeWidth:x,strokeOpacity:y,lineDash:b,lineDashOffset:S,cornerRadius:u,cap:xU(M),whisker:xU(D)},d,p);if(h){const N=this.cachedDatumCallback(SU(g.index,e),()=>this.callWithContext(h,{datum:g,seriesId:i,highlighted:e==="highlight",...I,xKey:o,minKey:a,q1Key:n,medianKey:r,q3Key:l,maxKey:c}));N&&(I=yx(OO(N,I),d,p))}return I}computeFocusBounds({datumIndex:t}){return Hpt(this,this.contextNodeData?.nodeData[t].focusRect)}};nD.className="BoxPlotSeries",nD.type="box-plot";var Xpt=(E(),C(w)),ue=(P(),C(et)),{commonSeriesOptionsDefs:Zpt,tooltipOptionsDefs:qpt}=Xpt._ModuleSupport,Qpt={type:(0,ue.required)((0,ue.constant)("box-plot")),xKey:(0,ue.required)(ue.string),minKey:(0,ue.required)(ue.string),q1Key:(0,ue.required)(ue.string),medianKey:(0,ue.required)(ue.string),q3Key:(0,ue.required)(ue.string),maxKey:(0,ue.required)(ue.string),xName:ue.string,yName:ue.string,minName:ue.string,q1Name:ue.string,medianName:ue.string,q3Name:ue.string,maxName:ue.string,direction:(0,ue.union)("horizontal","vertical"),grouped:ue.boolean,legendItemName:ue.string,showInMiniChart:ue.boolean,cornerRadius:ue.positiveNumber,itemStyler:ue.callback,whisker:{...ue.strokeOptionsDef,...ue.lineDashOptionsDef},cap:{lengthRatio:ue.ratio},tooltip:qpt,...Zpt,...ue.fillOptionsDef,...ue.strokeOptionsDef,...ue.lineDashOptionsDef},wO=(E(),C(w)),{CARTESIAN_AXIS_TYPE:DU}=wO._ModuleSupport.ThemeConstants,Jpt={series:{direction:"vertical",fill:{$if:[{$or:[{$isGradient:[{$palette:"fill"}]},{$isPattern:[{$palette:"fill"}]}]},{$palette:"fill"},{$mix:[wO._ModuleSupport.SAFE_FILL_OPERATION,{$ref:"backgroundColor"},.7]}]},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:wO._ModuleSupport.FILL_PATTERN_DEFAULTS,strokeWidth:2},axes:{[DU.NUMBER]:{crosshair:{snap:!1}},[DU.CATEGORY]:{groupPaddingInner:.2,crosshair:{enabled:!1,snap:!1}}}},tgt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"box-plot",moduleFactory:t=>new nD(t),tooltipDefaults:{range:"exact"},defaultAxes:Mpt._ModuleSupport.DIRECTION_SWAP_AXES,themeTemplate:Jpt,groupable:!0},kU={type:"series",name:"box-plot",chartType:"cartesian",enterprise:!0,options:Qpt,create:t=>new nD(t)},egt=(E(),C(w)),igt=(E(),C(w)),EO=(E(),C(w)),AU=(P(),C(et)),sgt=(E(),C(w)),{findMinMax:ogt}=sgt._ModuleSupport,js=0,Oo=1,ta=2,ea=3,Oa=4;function xx(t,e=1){let i=Math.ceil(Math.log2(t.length/e))-1;return i=Math.min(Math.max(i,0),16),2**i|0}function bx(t){return ogt(t.map(e=>Number(e)))}function rD(t,e,i){return(t.valueOf()-e)/(i-e)}function lD(t,e){return Math.min(Math.floor(t*e),e-1)*Oa|0}function Sx(t,e,i,s,o,a){const n=new Int32Array(a*Oa).fill(-1),r=new Float64Array(a*Oa).fill(NaN);for(let l=0;l<t.length;l+=1){const c=t[l],h=e[l],u=i[l];if(c==null||h==null||u==null)continue;const d=rD(c,s,o),p=h.valueOf(),g=u.valueOf(),f=lD(d,a),x=n[f+js]===-1;(x||d<r[f+js])&&(n[f+js]=l,r[f+js]=d),(x||d>r[f+Oo])&&(n[f+Oo]=l,r[f+Oo]=d),(x||g<r[f+ta])&&(n[f+ta]=l,r[f+ta]=g),(x||p>r[f+ea])&&(n[f+ea]=l,r[f+ea]=p)}return{indexData:n,valueData:r}}function vx(t,e,i,{inPlace:s=!1}={}){const o=i/2|0,a=s?t:new Int32Array(o*Oa),n=s?e:new Float64Array(o*Oa);for(let r=0;r<o;r+=1){const l=r*Oa|0,c=l*2|0,h=c+Oa|0,u=t[h+js]===-1,d=u||e[c+js]<e[h+js]?c:h;a[l+js]=t[d+js],n[l+js]=e[d+js];const p=u||e[c+Oo]>e[h+Oo]?c:h;a[l+Oo]=t[p+Oo],n[l+Oo]=e[p+Oo];const g=u||e[c+ta]<e[h+ta]?c:h;a[l+ta]=t[g+ta],n[l+ta]=e[g+ta];const f=u||e[c+ea]>e[h+ea]?c:h;a[l+ea]=t[f+ea],n[l+ea]=e[f+ea]}return{maxRange:o,indexData:a,valueData:n}}var agt=1e3,IU=js,ngt=ea,rgt=ta,TU=Oo;function lgt(t,e,i,s){if(t.length<agt)return;const[o,a]=bx(s);let n=xx(t),{indexData:r,valueData:l}=Sx(t,e,i,o,a,n);const c=[{maxRange:n,indexData:r}];for(;n>64;)({indexData:r,valueData:l,maxRange:n}=vx(r,l,n)),c.push({maxRange:n,indexData:r});return c.reverse(),c}var{fixNumericExtent:cgt,keyProperty:hgt,createDatumId:CU,SeriesNodePickMode:LU,ChartAxisDirection:_O,SMALLEST_KEY_INTERVAL:ugt,valueProperty:cD,diff:dgt,animationValidation:pgt,computeBarFocusBounds:ggt,visibleRangeIndices:NU,ContinuousScale:fgt,OrdinalTimeScale:mgt,BandScale:ygt,getShapeStyle:RO}=EO._ModuleSupport,xgt=class extends EO._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.openKey=s.properties.openKey,this.closeKey=s.properties.closeKey,this.highKey=s.properties.highKey,this.lowKey=s.properties.lowKey}},OU=class extends EO._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[LU.AXIS_ALIGNED,LU.EXACT_SHAPE_MATCH],directionKeys:{x:["xKey"],y:["lowKey","highKey","openKey","closeKey"]},directionNames:{x:["xName"],y:["lowName","highName","openName","closeName"]},categoryKey:"xValue",pathsPerSeries:[]}),this.NodeEvent=xgt,this.dataAggregationFilters=void 0}async processData(t){if(!this.properties.isValid()||!this.visible)return;const{xKey:e,openKey:i,closeKey:s,highKey:o,lowKey:a}=this.properties,n=!this.ctx.animationManager.isSkipped(),r=this.getCategoryAxis()?.scale,l=this.getValueAxis()?.scale,{isContinuousX:c,xScaleType:h,yScaleType:u}=this.getScaleInformation({xScale:r,yScale:l}),d=[];n&&(this.processedData&&d.push(dgt(this.id,this.processedData)),d.push(pgt())),i&&d.push(cD(i,u,{id:"openValue",invalidValue:void 0,missingValue:void 0}));const{dataModel:p,processedData:g}=await this.requestDataModel(t,this.data,{props:[hgt(e,h,{id:"xValue"}),cD(s,u,{id:"closeValue"}),cD(o,u,{id:"highValue"}),cD(a,u,{id:"lowValue"}),...c?[ugt]:[],...d]});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.dataAggregationFilters=this.aggregateData(p,g),this.animationState.transition("updateData")}aggregateData(t,e){const i=this.axes[_O.X];if(i==null||!(fgt.is(i.scale)||mgt.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),o=t.resolveColumnById(this,"highValue",e),a=t.resolveColumnById(this,"lowValue",e),{index:n}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[n];return lgt(s,o,a,r)}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];if(t!==this.getBarDirection()){const{index:o,def:a}=i.resolveProcessedDataDefById(this,"xValue"),n=e.domain.keys[o];return a.type==="key"&&a.valueType==="category"?n:this.padBandExtent(n)}const s=this.domainForClippedRange(_O.Y,["highValue","lowValue"],"xValue",!0);return cgt(s)}getSeriesRange(t,e){return this.domainForVisibleRange(_O.Y,["highValue","lowValue"],"xValue",e,!0)}getVisibleItems(t,e,i){return this.countVisibleItems("xValue",["highValue","lowValue"],t,e,i)}createNodeData(){const{visible:t,dataModel:e,processedData:i}=this,s=this.getCategoryAxis(),o=this.getValueAxis();if(!(e&&i&&s&&o))return;const a=[],{xKey:n,highKey:r,lowKey:l}=this.properties,c=i.dataSources.get(this.id)??[],h=e.resolveKeysById(this,"xValue",i),u=e.resolveColumnById(this,"openValue",i),d=e.resolveColumnById(this,"closeValue",i),p=e.resolveColumnById(this,"highValue",i),g=e.resolveColumnById(this,"lowValue",i),{groupScale:f}=this,{barWidth:x,groupIndex:y}=this.updateGroupScale(s),b=f.convert(String(y)),S=x>=1?x:f.rawBandwidth,M=ygt.is(s.scale),D={itemId:n,nodeData:a,labelData:[],scales:this.calculateScaling(),visible:this.visible};if(!t)return D;const L=(W,F,z,U,H,j,V,G)=>{const K=c[W],$=M?V/2:0,Z=s.scale.convert(F)+b+$,Q=o.scale.convert(z),q=o.scale.convert(U),J=o.scale.convert(H),X=o.scale.convert(j),st=U>z,nt=st?"up":"down",dt=Math.min(J,X),ut=Math.max(J,X)-dt,St={x:Z,y:dt+ut/2};a.push({series:this,itemId:nt,datum:K,datumIndex:W,xKey:n,xValue:F,openValue:z,closeValue:U,highValue:H,lowValue:j,midPoint:St,aggregatedValue:U,isRising:st,centerX:Z,width:V,y:dt,height:ut,yOpen:Q,yClose:q,crisp:G})},{dataAggregationFilters:T}=this,I=s.scale,[N,O]=I.range,R=O-N,_=W=>I.convert(h[W])+b,B=T?.find(W=>W.maxRange>R);if(B==null){let[W,F]=NU(c.length,s.range,z=>{const U=_(z);return[U,U+S]});i.input.count<1e3&&(W=0,F=i.input.count);for(let z=W;z<F;z+=1){const U=h[z];if(U==null)continue;const H=u[z],j=d[z],V=p[z],G=g[z],K=G!=null&&G<=H&&G<=j,$=V!=null&&V>=H&&V>=j;if(!K){AU.Logger.warnOnce(`invalid low value for key [${l}] in data element, low value cannot be higher than datum open or close values`);continue}if(!$){AU.Logger.warnOnce(`invalid high value for key [${r}] in data element, high value cannot be lower than datum open or close values.`);continue}L(z,U,H,j,V,G,S,!0)}}else{const{maxRange:W,indexData:F}=B,[z,U]=NU(W,s.range,H=>{const j=H*Oa,V=F[j+IU],G=F[j+TU];if(V!==-1)return[_(V),_(G)+S]});for(let H=z;H<U;H+=1){const j=H*Oa,V=F[j+IU],G=F[j+TU],K=F[j+ngt],$=F[j+rgt];if(V===-1)continue;const Z=(V+G)/2|0,Q=h[Z];if(Q==null)continue;const q=u[V],J=d[G],X=p[K],st=g[$],nt=Math.abs(_(G)-_(V))+S;L(Z,Q,q,J,X,st,nt,!1)}}return D}isVertical(){return!0}isLabelEnabled(){return!1}updateDatumSelection(t){const e=t.nodeData??[];return t.datumSelection.update(e)}updateLabelNodes(t){}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e)}getItemBaseStyle(t,e){const{properties:i}=this,s=i.item[t],o=e?i.highlightStyle.item:void 0,a={fill:o?.fill??s.fill,fillOpacity:o?.fillOpacity??s.fillOpacity,stroke:o?.stroke??s.stroke,strokeWidth:o?.strokeWidth??s.strokeWidth,strokeOpacity:o?.strokeOpacity??s.strokeOpacity,lineDash:o?.lineDash??s.lineDash,lineDashOffset:o?.lineDashOffset??s.lineDashOffset};return s.fillGradientDefaults&&s.fillPatternDefaults?RO(a,s.fillGradientDefaults,s.fillPatternDefaults):a}getItemStyleOverrides(t,e,i,s,o){const{id:a,properties:n}=this,r=n.item[i],{itemStyler:l}=n;if(l==null)return;const{xKey:c,openKey:h,closeKey:u,highKey:d,lowKey:p}=n,g=this.cachedDatumCallback(CU(t,o?"highlight":"node"),()=>this.callWithContext(l,{seriesId:a,datum:e,itemId:i,xKey:c,openKey:h,closeKey:u,highKey:d,lowKey:p,highlighted:o,...s}));return r.fillGradientDefaults&&r.fillPatternDefaults?RO(g,r.fillGradientDefaults,r.fillPatternDefaults):g}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{xKey:a,xName:n,yName:r,openKey:l,openName:c,highKey:h,highName:u,lowKey:d,lowName:p,closeKey:g,closeName:f,legendItemName:x,tooltip:y}=o,b=this.getCategoryAxis(),S=this.getValueAxis();if(!i||!s||!b||!S)return;const M=s.dataSources.get(this.id)?.[t],D=i.resolveKeysById(this,"xValue",s)[t],L=i.resolveColumnById(this,"openValue",s)[t],T=i.resolveColumnById(this,"highValue",s)[t],I=i.resolveColumnById(this,"lowValue",s)[t],N=i.resolveColumnById(this,"closeValue",s)[t];if(D==null)return;const O=N>=L?"up":"down",R=this.properties.item[O],_=this.getItemBaseStyle(O,!1);Object.assign(_,this.getItemStyleOverrides(String(t),M,O,_,!1));let B={fill:R.fill??R.stroke,fillOpacity:R.fillOpacity??R.strokeOpacity??1,stroke:R.stroke,strokeWidth:R.strokeWidth??1,strokeOpacity:R.strokeOpacity??1,lineDash:R.lineDash??[0],lineDashOffset:R.lineDashOffset??0};return R.fillGradientDefaults&&R.fillPatternDefaults&&(B=RO(B,R.fillGradientDefaults,R.fillPatternDefaults)),y.formatTooltip(this.properties,{heading:b.formatDatum(D),title:x,symbol:{marker:B},data:[{label:c,fallbackLabel:l,value:S.formatDatum(L)},{label:u,fallbackLabel:h,value:S.formatDatum(T)},{label:p,fallbackLabel:d,value:S.formatDatum(I)},{label:f,fallbackLabel:g,value:S.formatDatum(N)}]},{seriesId:e,datum:M,title:r,itemId:O,xKey:a,xName:n,yName:r,openKey:l,openName:c,highKey:h,highName:u,lowKey:d,lowName:p,closeKey:g,closeName:f,..._})}getDatumId(t){return CU(t.xValue)}computeFocusBounds(t){const e=this.getNodeData()?.at(t.datumIndex);if(e==null)return;const{centerX:i,y:s,width:o,height:a}=e,n={x:i-o/2,y:s,width:o,height:a};return ggt(this,n)}},bgt=(E(),C(w)),Sgt=(E(),C(w)),{Path:vgt,ScenePathChangeDetection:vh,BBox:Mgt}=Sgt._ModuleSupport,Zr=class extends vgt{constructor(){super(...arguments),this.centerX=0,this.y=0,this.width=0,this.height=0,this.yOpen=0,this.yClose=0,this.crisp=!1,this.strokeAlignment=0}computeBBox(){const{centerX:t,y:e,width:i,height:s}=this;return new Mgt(t-i/2,e,i,s)}isPointInPath(t,e){return this.getBBox().containsPoint(t,e)}distanceSquared(t,e){return this.getBBox().distanceSquared(t,e)}get midPoint(){return{x:this.centerX,y:this.y+this.height/2}}alignedCoordinates(){const{y:t,width:e,height:i,crisp:s,strokeAlignment:o}=this;let{centerX:a,yOpen:n,yClose:r}=this,l=a-e/2,c=a+e/2,h=t,u=t+i;if(s&&e>1){a=this.align(a),n=this.align(n),r=this.align(r);const p=this.align(e/2);l=a-p,c=a+p,h=this.align(t),u=h+this.align(h,i)}const d=(h+u)/2;return a+=o,l+=o,c+=o,h-=o,u+=o,n+=n<d?o:-o,r+=r<d?o:-o,{centerX:a,x0:l,x1:c,y0:h,y1:u,yOpen:n,yClose:r}}executeStroke(t,e){const{width:i,strokeWidth:s}=this;i<s&&(t.lineWidth=i),super.executeStroke(t,e)}};m([vh()],Zr.prototype,"centerX",2),m([vh()],Zr.prototype,"y",2),m([vh()],Zr.prototype,"width",2),m([vh()],Zr.prototype,"height",2),m([vh()],Zr.prototype,"yOpen",2),m([vh()],Zr.prototype,"yClose",2),m([vh()],Zr.prototype,"crisp",2),m([vh()],Zr.prototype,"strokeAlignment",2);var Dgt=class extends Zr{updatePath(){const{path:t}=this,{centerX:e,x0:i,x1:s,y0:o,y1:a,yOpen:n,yClose:r}=this.alignedCoordinates();t.clear(),t.moveTo(e,o),t.lineTo(e,a),Math.abs(s-i)>1&&(t.moveTo(i,n),t.lineTo(e,n),t.moveTo(e,r),t.lineTo(s,r))}},{ScenePathChangeDetection:Mx,ExtendedPath2D:kgt,BBox:Agt}=bgt._ModuleSupport,ef=class extends Zr{constructor(){super(...arguments),this.wickPath=new kgt,this.wickStroke=void 0,this.wickStrokeWidth=void 0,this.wickStrokeOpacity=void 0}computeDefaultGradientFillBBox(){const{width:t,centerX:e,yOpen:i,yClose:s}=this,o=Math.min(i,s),n=Math.max(i,s)-o,r=e-t/2,l=e+t/2;return new Agt(r,o,l-r,n)}updatePath(){const{path:t,stroke:e,strokeWidth:i,strokeOpacity:s,lineDash:o,lineDashOffset:a,wickStroke:n,wickStrokeWidth:r,wickStrokeOpacity:l,wickLineDash:c,wickLineDashOffset:h,strokeAlignment:u}=this,{centerX:d,x0:p,x1:g,y0:f,y1:x,yOpen:y,yClose:b}=this.alignedCoordinates();this.path.clear(),this.wickPath.clear();const M=n!=null&&n!==e||r!=null&&r!==i||l!=null&&l!==s||c!=null&&c!==o||h!=null&&h!==a?this.wickPath:t;if(Math.abs(g-p)<=3){M.moveTo(d,f),M.lineTo(d,x);return}const D=Math.min(y,b),L=Math.max(y,b);M.moveTo(d,f),M.lineTo(d,D+i/2),M.moveTo(d,x),M.lineTo(d,L-i/2);const T=u+i/2,I=L-D-2*T;if(I>0)t.rect(p+T,D+T,g-p-2*T,I);else{const N=(D+L)/2;t.moveTo(p,N),t.lineTo(g,N)}}drawPath(t){super.drawPath(t);const{wickPath:e}=this;if(e.isEmpty())return;const{stroke:i,strokeWidth:s,strokeOpacity:o,lineDash:a,lineDashOffset:n,wickStroke:r=i,wickStrokeWidth:l=s,wickStrokeOpacity:c=o,wickLineDash:h=a,wickLineDashOffset:u=n}=this;l!==0&&(t.globalAlpha*=c,typeof r=="string"&&(t.strokeStyle=r),t.lineWidth=l,h!=null&&t.setLineDash(h),t.lineDashOffset=u,t.stroke(e.getPath2D()))}};m([Mx()],ef.prototype,"wickStroke",2),m([Mx()],ef.prototype,"wickStrokeWidth",2),m([Mx()],ef.prototype,"wickStrokeOpacity",2),m([Mx()],ef.prototype,"wickLineDash",2),m([Mx()],ef.prototype,"wickLineDashOffset",2);var Igt=(E(),C(w)),Tgt=(E(),C(w)),{BaseProperties:wU,TempValidate:Pi,AbstractBarSeriesProperties:Cgt,SeriesTooltip:Lgt,STRING:Zn,COLOR_STRING:Ngt,FUNCTION:Ogt,LINE_DASH:wgt,OBJECT:hD,POSITIVE_NUMBER:EU,RATIO:Egt}=Tgt._ModuleSupport,Ld=class extends wU{constructor(){super(...arguments),this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};m([Pi(Ngt)],Ld.prototype,"stroke",2),m([Pi(EU)],Ld.prototype,"strokeWidth",2),m([Pi(Egt)],Ld.prototype,"strokeOpacity",2),m([Pi(wgt)],Ld.prototype,"lineDash",2),m([Pi(EU)],Ld.prototype,"lineDashOffset",2);var PO=class extends wU{constructor(){super(...arguments),this.up=new Ld,this.down=new Ld}};m([Pi(hD)],PO.prototype,"up",2),m([Pi(hD)],PO.prototype,"down",2);var wa=class extends Cgt{};m([Pi(Zn)],wa.prototype,"xKey",2),m([Pi(Zn)],wa.prototype,"openKey",2),m([Pi(Zn)],wa.prototype,"closeKey",2),m([Pi(Zn)],wa.prototype,"highKey",2),m([Pi(Zn)],wa.prototype,"lowKey",2),m([Pi(Zn,{optional:!0})],wa.prototype,"xName",2),m([Pi(Zn,{optional:!0})],wa.prototype,"yName",2),m([Pi(Zn,{optional:!0})],wa.prototype,"openName",2),m([Pi(Zn,{optional:!0})],wa.prototype,"closeName",2),m([Pi(Zn,{optional:!0})],wa.prototype,"highName",2),m([Pi(Zn,{optional:!0})],wa.prototype,"lowName",2);var uD=class extends wa{constructor(){super(...arguments),this.tooltip=new Lgt,this.item=new PO}};m([Pi(hD)],uD.prototype,"tooltip",2),m([Pi(hD)],uD.prototype,"item",2),m([Pi(Ogt,{optional:!0})],uD.prototype,"itemStyler",2);var{FillGradientDefaults:_gt,FillPatternDefaults:Rgt,BaseProperties:BO,SeriesTooltip:Pgt,TempValidate:Bi,COLOR_STRING:zO,FUNCTION:Bgt,LINE_DASH:_U,OBJECT:Nd,POSITIVE_NUMBER:Dx,RATIO:FO,COLOR_GRADIENT:zgt,COLOR_PATTERN:Fgt,OR:Ggt}=Igt._ModuleSupport,sf=class extends BO{};m([Bi(zO,{optional:!0})],sf.prototype,"stroke",2),m([Bi(Dx)],sf.prototype,"strokeWidth",2),m([Bi(FO)],sf.prototype,"strokeOpacity",2),m([Bi(_U,{optional:!0})],sf.prototype,"lineDash",2),m([Bi(Dx)],sf.prototype,"lineDashOffset",2);var Ea=class extends BO{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new _gt,this.fillPatternDefaults=new Rgt,this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.wick=new sf}};m([Bi(Ggt(zgt,Fgt,zO))],Ea.prototype,"fill",2),m([Bi(Nd)],Ea.prototype,"fillGradientDefaults",2),m([Bi(Nd)],Ea.prototype,"fillPatternDefaults",2),m([Bi(FO)],Ea.prototype,"fillOpacity",2),m([Bi(zO)],Ea.prototype,"stroke",2),m([Bi(Dx)],Ea.prototype,"strokeWidth",2),m([Bi(FO)],Ea.prototype,"strokeOpacity",2),m([Bi(_U)],Ea.prototype,"lineDash",2),m([Bi(Dx)],Ea.prototype,"lineDashOffset",2),m([Bi(Dx)],Ea.prototype,"cornerRadius",2),m([Bi(Nd)],Ea.prototype,"wick",2);var GO=class extends BO{constructor(){super(...arguments),this.up=new Ea,this.down=new Ea}};m([Bi(Nd)],GO.prototype,"up",2),m([Bi(Nd)],GO.prototype,"down",2);var dD=class extends wa{constructor(){super(...arguments),this.item=new GO,this.tooltip=new Pgt}};m([Bi(Nd)],dD.prototype,"item",2),m([Bi(Nd)],dD.prototype,"tooltip",2),m([Bi(Bgt,{optional:!0})],dD.prototype,"itemStyler",2);var{createDatumId:jgt,isGradientFill:RU,isPatternFill:jO,applyShapeFillBBox:Vgt,getShapeFill:PU,getShapeStyle:VO}=igt._ModuleSupport,pD=class extends OU{constructor(){super(...arguments),this.properties=new dD}nodeFactory(){return new ef}updateDatumNodes({datumSelection:t,isHighlight:e}){const{id:i,properties:s}=this,{xKey:o,highKey:a,lowKey:n,openKey:r,closeKey:l,item:c,itemStyler:h}=s,{up:u,down:d}=c,p=VO({fill:u.fill,fillOpacity:u.fillOpacity,stroke:u.stroke,strokeWidth:u.strokeWidth,strokeOpacity:u.strokeOpacity,lineDash:u.lineDash,lineDashOffset:u.lineDashOffset},u.fillGradientDefaults,u.fillPatternDefaults),g=VO({fill:d.fill,fillOpacity:d.fillOpacity,stroke:d.stroke,strokeWidth:d.strokeWidth,strokeOpacity:d.strokeOpacity,lineDash:d.lineDash,lineDashOffset:d.lineDashOffset},d.fillGradientDefaults,d.fillPatternDefaults),f=e?s.highlightStyle.item:void 0;t.each((x,y)=>{const{isRising:b,centerX:S,width:M,y:D,height:L,yOpen:T,yClose:I,crisp:N}=y;let O;if(h!=null){const{fill:F,fillOpacity:z,stroke:U,strokeWidth:H,strokeOpacity:j,lineDash:V,lineDashOffset:G}=b?p:g;O=VO(this.cachedDatumCallback(jgt(this.getDatumId(y),e?"highlight":"node"),()=>this.callWithContext(h,{seriesId:i,itemId:y.itemId,xKey:o,highKey:a,lowKey:n,openKey:r,closeKey:l,datum:y.datum,fill:F,fillOpacity:z,strokeOpacity:j,stroke:U,strokeWidth:H,lineDash:V,lineDashOffset:G,highlighted:e})),b?u.fillGradientDefaults:d.fillGradientDefaults,b?u.fillPatternDefaults:d.fillPatternDefaults)}x.centerX=S,x.width=M,x.y=D,x.height=L,x.yOpen=T,x.yClose=I,x.crisp=N;const R=b?p:g,_=b?u.wick:d.wick,B=f?.fill??O?.fill??R.fill;Vgt(x,B,this.getShapeFillBBox()),x.fill=f?.fill??O?.fill??R.fill,x.fillOpacity=f?.fillOpacity??O?.fillOpacity??R.fillOpacity,x.stroke=f?.stroke??O?.stroke??R.stroke,x.strokeWidth=f?.strokeWidth??O?.strokeWidth??R.strokeWidth,x.strokeOpacity=f?.strokeOpacity??O?.strokeOpacity??R.strokeOpacity,x.lineDash=f?.lineDash??O?.lineDash??R.lineDash,x.lineDashOffset=f?.lineDashOffset??O?.lineDashOffset??R.lineDashOffset;const W=O?.wick;x.wickStroke=f?.stroke??W?.stroke??_.stroke,x.wickStrokeWidth=f?.strokeWidth??W?.strokeWidth??_.strokeWidth,x.wickStrokeOpacity=f?.strokeOpacity??W?.strokeOpacity??_.strokeOpacity,x.wickLineDash=f?.lineDash??W?.lineDash??_.lineDash,x.wickLineDashOffset=f?.lineDashOffset??W?.lineDashOffset??_.lineDashOffset,x.strokeAlignment=(O?.strokeWidth??R.strokeWidth)/2})}legendItemSymbol(){const{up:t,down:e}=this.properties.item,i=PU(t.fill,t.fillGradientDefaults,t.fillPatternDefaults),s=RU(i)?i.colorStops.map(l=>typeof l=="string"?l:{color:l.color,stop:l.stop!=null?l.stop*.5:void 0}):[{color:jO(i)?t.stroke:i,stop:0},{color:jO(i)?t.stroke:i,stop:.5}],o=PU(e.fill,e.fillGradientDefaults,e.fillPatternDefaults),a=RU(o)?o.colorStops.map(l=>typeof l=="string"?l:{color:l.color,stop:l.stop!=null?l.stop*.5:void 0}):[{color:jO(o)?e.stroke:o,stop:.5}],n={type:"gradient",gradient:"linear",rotation:90,colorStops:[...s,...a],reverse:!1},r={type:"gradient",gradient:"linear",rotation:90,colorStops:[{color:t.stroke,stop:0},{color:t.stroke,stop:.5},{color:e.stroke,stop:.5}],reverse:!1};return{marker:{fill:n,fillOpacity:t.fillOpacity,stroke:r,strokeWidth:t.strokeWidth??1,strokeOpacity:t.strokeOpacity??1,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset}}}getLegendData(t){const{id:e,data:i,visible:s,ctx:{legendManager:o}}=this,{xKey:a,yName:n,showInLegend:r,legendItemName:l}=this.properties;return!i?.length||!a||t!=="category"?[]:[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:s&&o.getItemEnabled({seriesId:e,itemId:e}),label:{text:l??n??e},symbol:this.legendItemSymbol(),legendItemName:l,hideInLegend:!r}]}};pD.className="CandleStickSeries",pD.type="candlestick";var Wgt=(E(),C(w)),Ie=(P(),C(et)),{commonSeriesOptionsDefs:Ugt,tooltipOptionsDefs:Hgt}=Wgt._ModuleSupport,BU={cornerRadius:Ie.positiveNumber,wick:{...Ie.strokeOptionsDef,...Ie.lineDashOptionsDef},...Ie.fillOptionsDef,...Ie.strokeOptionsDef,...Ie.lineDashOptionsDef},WO={type:(0,Ie.required)((0,Ie.constant)("candlestick")),xKey:(0,Ie.required)(Ie.string),openKey:(0,Ie.required)(Ie.string),highKey:(0,Ie.required)(Ie.string),lowKey:(0,Ie.required)(Ie.string),closeKey:(0,Ie.required)(Ie.string),xName:Ie.string,yName:Ie.string,openName:Ie.string,highName:Ie.string,lowName:Ie.string,closeName:Ie.string,item:{up:BU,down:BU},itemStyler:Ie.callback,showInMiniChart:Ie.boolean,tooltip:Hgt,...Ugt};WO.pickOutsideVisibleMinorAxis=Ie.boolean,WO.focusPriority=Ie.number;var zU=(E(),C(w)),{CARTESIAN_AXIS_TYPE:FU}=zU._ModuleSupport.ThemeConstants;function GU(t){return{fill:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},t==="up"?"transparent":{$palette:"fill"},{$palette:`${t}.fill`}]},stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:`${t}.stroke`}]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$if:[{$or:[{$isGradient:[{$palette:`${t}.fill`}]},{$isPattern:[{$palette:`${t}.fill`}]}]},{$map:[{$path:["./color",void 0,{$value:"$1"}]},{$path:["./colorStops",void 0,{$palette:`${t}.fill`}]}]},[{$mix:[{$palette:`${t}.fill`},"black",.15]},{$mix:[{$palette:`${t}.fill`},"white",.15]}]]},rotation:0,reverse:!1},fillPatternDefaults:zU._ModuleSupport.FILL_PATTERN_DEFAULTS}}var Ygt={series:{item:{up:GU("up"),down:GU("down")},highlightStyle:{item:{strokeWidth:3}}},animation:{enabled:!1},axes:{[FU.NUMBER]:{crosshair:{snap:!1}},[FU.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},{CARTESIAN_AXIS_TYPE:jU,CARTESIAN_POSITION:VU}=egt._ModuleSupport.ThemeConstants,Kgt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"candlestick",moduleFactory:t=>new pD(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:jU.NUMBER,position:VU.LEFT},{type:jU.ORDINAL_TIME,position:VU.BOTTOM}],themeTemplate:Ygt,groupable:!1},WU={type:"series",name:"candlestick",chartType:"cartesian",enterprise:!0,options:WO,create:t=>new pD(t)},$gt=(E(),C(w)),UO=(E(),C(w)),Xgt=(P(),C(et)),Zgt=(E(),C(w)),HO=(P(),C(et)),{CachedTextMeasurerPool:UU,TextUtils:HU,TextWrapper:gD}=Zgt._ModuleSupport;function qgt(t,e){const{fontSize:i,minimumFontSize:s=i}=t,{fontSize:o,minimumFontSize:a=o}=e,n=i-s,r=o-a;let l=t.fontSize,c=e.fontSize;const h=[{labelFontSize:i,secondaryLabelFontSize:o}];for(;l>s||c>a;){const u=n>0?(l-s)/n:-1,d=r>0?(c-a)/r:-1;u>d?l--:c--,h.push({labelFontSize:l,secondaryLabelFontSize:c})}return h.reverse(),h}function of(t,e){return t.lineHeight!=null&&t.fontSize!=null?t.lineHeight*e/t.fontSize:HU.getLineHeight(e)}function YU(t,e,i,s,{padding:o},a){const{spacing:n=0}=e,r=2*o,l=2*o+n,c=(e.minimumFontSize??e.fontSize)+(s.minimumFontSize??s.fontSize);if(c>a(c+l,!1).height-l)return;const h=qgt(e,s),u={fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight},d={fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight};let p,g;return(0,HO.findMaxValue)(0,h.length-1,f=>{const{labelFontSize:x,secondaryLabelFontSize:y}=h[f],b=f===0,S=of(e,x),M=of(s,y),D=a(S+M+l,b),L=D.width-r,T=D.height-l;if(S+M>T||((p==null||p.fontSize!==x)&&(u.fontSize=x,p=$U(e,t,L,T,u,e.wrapping,b?e.overflowStrategy:"hide")),p==null||p.width>L||p.height>T)||((g==null||g.fontSize!==y)&&(d.fontSize=y,g=$U(s,i,L,T,d,s.wrapping,b?s.overflowStrategy:"hide")),g==null))return;const I=p.height+g.height;if(!(g.width>L||I>T))return{width:Math.max(p.width,g.width),height:I+n,meta:D.meta,label:p,secondaryLabel:g}})}function kx(t,e,{padding:i},s){const o=2*i,a=Math.min(e.minimumFontSize??e.fontSize,e.fontSize),n={fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight};return(0,HO.findMaxValue)(a,e.fontSize,r=>{const l=of(e,r),c=r===a,h=s(l+o,c),u=h.width-o,d=h.height-o;if(l>d)return;n.fontSize=r;const p=gD.wrapLines(t,{maxWidth:u,maxHeight:d,font:n,textWrap:e.wrapping,overflow:(c?e.overflowStrategy:void 0)??"hide"});if(!p.length)return;const g=Qgt(p,{lineHeight:l,font:n,maxWidth:u,maxHeight:d});if(g)return[{fontSize:r,lineHeight:l,...g},h.meta]})}function KU(t){return t?.minimumFontSize!=null&&t?.fontSize!=null&&t?.minimumFontSize>t?.fontSize}function YO(t,e,i,s,o,a){const n=e.enabled?t:void 0,r=s.enabled?i:void 0;(KU(e)||KU(s))&&HO.Logger.warnOnce("minimumFontSize should be set to a value less than or equal to the font size");let l;n!=null&&r!=null&&(l=YU(n,e,r,s,o,a));let c;if(l==null&&n!=null&&(c=kx(n,e,o,a)),c!=null){const[u,d]=c;l={width:u.width,height:u.height,meta:d,label:u,secondaryLabel:void 0}}let h;if(l==null&&n==null&&r!=null&&(h=kx(r,s,o,a)),h!=null){const[u,d]=h;l={width:u.width,height:u.height,meta:d,label:void 0,secondaryLabel:u}}return l}function $U(t,e,i,s,o,a,n){const r=gD.wrapLines(e,{maxWidth:i,maxHeight:s,font:o,textWrap:a,overflow:n});if(!r.length)return;const l=of(t,o.fontSize),{width:c}=UU.measureLines(r,{font:o});return{width:c,lineHeight:l,text:r.join(`
`),height:r.length*l,fontSize:o.fontSize}}function Qgt(t,{font:e,lineHeight:i=HU.defaultLineHeight,maxWidth:s,maxHeight:o=1/0}){let a=i*t.length;for(;a>o;){if(t.length===1)return;t.pop(),t[t.length-1]=gD.appendEllipsis(t.at(-1)),a=i*t.length}const n=UU.measureLines(t,{font:e});let r,l;if(n.width>s){const c=[];l=0;for(const h of n.lineMetrics){if(h.width>s){if(!c.length)return;break}c.push(h.text),l=Math.max(l,h.width)}r=gD.appendEllipsis(c.join(`
`))}else r=t.join(`
`),l=n.width;return{text:r,width:l,height:a}}var Jgt=(E(),C(w)),XU=(E(),C(w)),{TempValidate:Ax,NUMBER:tft,POSITIVE_NUMBER:ZU,TEXT_WRAP:eft,OVERFLOW_STRATEGY:ift}=XU._ModuleSupport,af=class extends XU._ModuleSupport.Label{constructor(){super(...arguments),this.wrapping="on-space",this.overflowStrategy="ellipsis"}};m([Ax(eft)],af.prototype,"wrapping",2),m([Ax(ift)],af.prototype,"overflowStrategy",2),m([Ax(ZU,{optional:!0})],af.prototype,"lineHeight",2),m([Ax(ZU,{optional:!0})],af.prototype,"minimumFontSize",2);var qr=class extends af{constructor(){super(...arguments),this.spacing=0}};m([Ax(tft)],qr.prototype,"spacing",2);var Ix=class extends af{},{CartesianSeriesProperties:sft,SeriesTooltip:oft,TempValidate:Vs,AND:aft,ARRAY:nft,COLOR_STRING:rft,COLOR_STRING_ARRAY:lft,FUNCTION:cft,OBJECT:qU,POSITIVE_NUMBER:QU,RATIO:hft,STRING:Od,TEXT_ALIGN:uft,VERTICAL_ALIGN:dft}=Jgt._ModuleSupport,Ns=class extends sft{constructor(){super(...arguments),this.colorRange=["black","black"],this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.textAlign="center",this.verticalAlign="middle",this.itemPadding=0,this.label=new qr,this.tooltip=new oft}};m([Vs(Od,{optional:!0})],Ns.prototype,"title",2),m([Vs(Od)],Ns.prototype,"xKey",2),m([Vs(Od)],Ns.prototype,"yKey",2),m([Vs(Od,{optional:!0})],Ns.prototype,"colorKey",2),m([Vs(Od,{optional:!0})],Ns.prototype,"xName",2),m([Vs(Od,{optional:!0})],Ns.prototype,"yName",2),m([Vs(Od,{optional:!0})],Ns.prototype,"colorName",2),m([Vs(aft(lft,nft.restrict({minLength:1})))],Ns.prototype,"colorRange",2),m([Vs(rft,{optional:!0})],Ns.prototype,"stroke",2),m([Vs(hft)],Ns.prototype,"strokeOpacity",2),m([Vs(QU,{optional:!0})],Ns.prototype,"strokeWidth",2),m([Vs(uft)],Ns.prototype,"textAlign",2),m([Vs(dft)],Ns.prototype,"verticalAlign",2),m([Vs(QU)],Ns.prototype,"itemPadding",2),m([Vs(cft,{optional:!0})],Ns.prototype,"itemStyler",2),m([Vs(qU)],Ns.prototype,"label",2),m([Vs(qU)],Ns.prototype,"tooltip",2);var{SeriesNodePickMode:JU,computeBarFocusBounds:pft,getMissCount:gft,valueProperty:KO,ChartAxisDirection:fn,DEFAULT_CARTESIAN_DIRECTION_KEYS:fft,DEFAULT_CARTESIAN_DIRECTION_NAMES:mft,createDatumId:yft,ColorScale:xft,Rect:bft,PointerEvents:Sft,applyShapeStyle:vft}=UO._ModuleSupport,Mft=class extends UO._ModuleSupport.CartesianSeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.colorKey=s.properties.colorKey}},Dft={left:-.5,center:0,right:-.5},kft={top:-.5,middle:0,bottom:-.5},fD=class extends UO._ModuleSupport.CartesianSeries{constructor(t){super({moduleCtx:t,directionKeys:fft,directionNames:mft,categoryKey:void 0,pickModes:[JU.NEAREST_NODE,JU.EXACT_SHAPE_MATCH],pathsPerSeries:[],hasMarkers:!1,hasHighlightedLabels:!0}),this.properties=new Ns,this.NodeEvent=Mft,this.colorScale=new xft}async processData(t){const e=this.axes[fn.X],i=this.axes[fn.Y];if(!e||!i||!this.properties.isValid()||!this.data?.length)return;const{xKey:s,yKey:o,colorRange:a,colorKey:n}=this.properties,r=this.axes[fn.X]?.scale,l=this.axes[fn.Y]?.scale,{xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:r,yScale:l}),u=this.colorScale.type,{dataModel:d,processedData:p}=await this.requestDataModel(t,this.data,{props:[KO(s,c,{id:"xValue"}),KO(o,h,{id:"yValue"}),...n?[KO(n,u,{id:"colorValue"})]:[]]});if(this.isColorScaleValid()){const g=d.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=p.domain.values[g],this.colorScale.range=a,this.colorScale.update()}}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const s=e.resolveProcessedDataIndexById(this,"colorValue"),o=i.input.count,a=gft(this,i.defs.values[s].missing);return!(o===0||o===a)}xCoordinateRange(t,e){const i=this.axes[fn.X].scale,s=e*(i.bandwidth??0)/2,o=i.convert(t)+s,a=e*(i.bandwidth??10);return[o,o+a]}yCoordinateRange(t,e){const i=this.axes[fn.Y].scale,s=e*(i.bandwidth??0)/2,o=i.convert(t[0])+s,a=e*(i.bandwidth??10);return[o,o+a]}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;return!e||!i?[]:t===fn.X?e.getDomain(this,"xValue","value",i):e.getDomain(this,"yValue","value",i)}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{data:t,visible:e,axes:i,dataModel:s,processedData:o}=this,a=i[fn.X],n=i[fn.Y];if(!(t&&s&&o&&e&&a&&n))return;if(a.type!=="category"||n.type!=="category"){Xgt.Logger.warnOnce(`Heatmap series expected axes to have "category" type, but received "${a.type}" and "${n.type}" instead.`);return}const{xKey:r,xName:l,yKey:c,yName:h,colorKey:u,colorName:d,textAlign:p,verticalAlign:g,itemPadding:f,label:x}=this.properties,y=s.resolveColumnById(this,"xValue",o),b=s.resolveColumnById(this,"yValue",o),S=u?s.resolveColumnById(this,"colorValue",o):void 0,M=a.scale,D=n.scale,L=(M.bandwidth??0)/2,T=(D.bandwidth??0)/2,I=[],N=[],O=M.bandwidth??10,R=D.bandwidth??10,_=(O-2*f)*Dft[p],B=(R-2*f)*kft[g],W=()=>({width:O,height:R,meta:null});return(o.dataSources.get(this.id)??[]).forEach((z,U)=>{const H=y[U],j=b[U],V=M.convert(H)+L,G=D.convert(j)+T,K=S?.[U],$=K==null?void 0:this.getLabelText(x,{value:K,datum:z,colorKey:u,colorName:d,xKey:r,yKey:c,xName:l,yName:h}),Z=YO($,this.properties.label,void 0,this.properties.label,{padding:f},W),Q={x:V,y:G,size:0};if(I.push({series:this,itemId:c,datumIndex:U,yKey:c,xKey:r,xValue:H,yValue:j,colorValue:K,datum:z,point:Q,width:O,height:R,midPoint:{x:V,y:G},missing:S!=null&&K==null}),Z?.label!=null){const{text:q,fontSize:J,lineHeight:X,height:st}=Z.label,{fontStyle:nt,fontFamily:dt,fontWeight:ut,color:St}=this.properties.label,Lt=Q.x+_*(O-2*f),mt=Q.y+B*(R-2*f)-(Z.height-st)*.5;N.push({series:this,itemId:c,datum:z,datumIndex:U,text:q,fontSize:J,lineHeight:X,fontStyle:nt,fontFamily:dt,fontWeight:ut,color:St,textAlign:p,verticalAlign:g,x:Lt,y:mt})}}),{itemId:this.properties.yKey??this.id,nodeData:I,labelData:N,scales:this.calculateScaling(),visible:this.visible}}nodeFactory(){return new bft}update(t){return this.ctx.animationManager.skipCurrentBatch(),super.update(t)}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,s=e??[];return i.update(s)}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{fill:i?.fill,fillOpacity:i?.fillOpacity??1,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity}}getItemStyleOverrides(t,e,i,s,o){const{id:a,properties:n}=this,{xKey:r,yKey:l,colorRange:c,itemStyler:h}=n,u=this.isColorScaleValid()&&i!=null?this.colorScale.convert(i):c[0];let d=s.fill==null?{fill:u}:void 0;if(h!=null){d??(d={});const p=this.cachedDatumCallback(yft(t,o?"highlight":"node"),()=>this.callWithContext(h,{seriesId:a,datum:e,xKey:r,yKey:l,highlighted:o,...s,fill:u}));Object.assign(d,p)}return d}updateDatumNodes(t){const{isHighlight:e}=t,i=this.axes[fn.X],[s,o]=i?.visibleRange??[],n=!(s!==0||o!==1),r=this.getItemBaseStyle(e);t.datumSelection.each((l,c)=>{const{datumIndex:h,colorValue:u,datum:d,point:p,width:g,height:f}=c,x=this.getItemStyleOverrides(String(h),d,u,r,e);l.crisp=n,l.x=Math.floor(p.x-g/2),l.y=Math.floor(p.y-f/2),l.width=Math.ceil(g),l.height=Math.ceil(f),vft(l,r,x)})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t,{enabled:s}=this.properties.label,o=s?e:[];return i.update(o)}updateLabelNodes(t){t.labelSelection.each((e,i)=>{e.text=i.text,e.fontSize=i.fontSize,e.lineHeight=i.lineHeight,e.fontStyle=i.fontStyle,e.fontFamily=i.fontFamily,e.fontWeight=i.fontWeight,e.fill=i.color,e.textAlign=i.textAlign,e.textBaseline=i.verticalAlign,e.x=i.x,e.y=i.y,e.pointerEvents=Sft.None})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a,colorScale:n}=this,{xKey:r,xName:l,yKey:c,yName:h,colorKey:u,colorName:d,colorRange:p,title:g,legendItemName:f,tooltip:x}=a,y=o[fn.X],b=o[fn.Y];if(!i||!s||!y||!b)return;const S=s.dataSources.get(this.id)?.[t],M=i.resolveColumnById(this,"xValue",s)[t],D=i.resolveColumnById(this,"yValue",s)[t],L=u!=null&&this.isColorScaleValid()?i.resolveColumnById(this,"colorValue",s)[t]:void 0;if(M==null)return;const T=[];let I;L==null?I=p[0]:(I=n.convert(L),T.push({label:d,fallbackLabel:u,value:String(L)})),T.push({label:l,fallbackLabel:r,value:y.formatDatum(M)},{label:h,fallbackLabel:c,value:b.formatDatum(D)});const N=this.getItemBaseStyle(!1);Object.assign(N,this.getItemStyleOverrides(String(t),S,L,N,!1)),N.fill!=null&&(I=N.fill);const O=I!=null?{marker:{shape:"square",fill:I,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}}:void 0;return x.formatTooltip(this.properties,{title:g??f,symbol:O,data:T},{seriesId:e,datum:S,title:g,xKey:r,xName:l,yKey:c,yName:h,colorKey:u,colorName:d,...N})}getLegendData(t){return t!=="gradient"||!this.properties.isValid()||!this.isColorScaleValid()||!this.dataModel?[]:[{legendType:"gradient",enabled:this.visible,seriesId:this.id,colorName:this.properties.colorName,colorDomain:this.processedData.domain.values[this.dataModel.resolveProcessedDataIndexById(this,"colorValue")],colorRange:this.properties.colorRange}]}isLabelEnabled(){return this.properties.label.enabled&&!!this.properties.colorKey}getBandScalePadding(){return{inner:0,outer:0}}computeFocusBounds({datumIndex:t}){const e=this.contextNodeData?.nodeData[t];if(e===void 0)return;const{width:i,height:s,midPoint:o}=e,a={x:o.x-i/2,y:o.y-s/2,width:i,height:s};return pft(this,a)}};fD.className="HeatmapSeries",fD.type="heatmap";var Aft=(E(),C(w)),us=(P(),C(et)),{commonSeriesOptionsDefs:Ift,autoSizedLabelOptionsDefs:Tft,tooltipOptionsDefs:Cft}=Aft._ModuleSupport,Lft={type:(0,us.required)((0,us.constant)("heatmap")),xKey:(0,us.required)(us.string),yKey:(0,us.required)(us.string),colorKey:us.string,xName:us.string,yName:us.string,colorName:us.string,colorRange:(0,us.arrayOf)(us.color),title:us.string,textAlign:(0,us.union)("left","center","right"),verticalAlign:(0,us.union)("top","middle","bottom"),itemPadding:us.positiveNumber,itemStyler:us.callback,showInMiniChart:us.boolean,label:Tft,tooltip:Cft,...Ift,...us.strokeOptionsDef},Nft=(E(),C(w)),Oft={series:{stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"backgroundColor"},{$path:["./0",{$palette:"stroke"},{$palette:"strokes"}]}]},colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},Nft._ModuleSupport.SAFE_RANGE2_OPERATION]},label:{enabled:!1,color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},wrapping:"on-space",overflowStrategy:"ellipsis"},itemPadding:3},gradientLegend:{enabled:!0}},{ThemeConstants:{CARTESIAN_AXIS_TYPE:tH,CARTESIAN_POSITION:eH}}=$gt._ModuleSupport,wft={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"heatmap",moduleFactory:t=>new fD(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:tH.CATEGORY,position:eH.LEFT},{type:tH.CATEGORY,position:eH.BOTTOM}],themeTemplate:Oft},iH={type:"series",name:"heatmap",chartType:"cartesian",enterprise:!0,options:Lft,create:t=>new fD(t)},Eft=(E(),C(w)),_ft=(E(),C(w)),{createDatumId:Rft}=_ft._ModuleSupport,mD=class extends OU{constructor(){super(...arguments),this.properties=new uD}nodeFactory(){return new Dgt}updateDatumNodes({datumSelection:t,isHighlight:e}){const{id:i,properties:s}=this,{xKey:o,highKey:a,lowKey:n,openKey:r,closeKey:l,item:c,itemStyler:h}=s,{up:u,down:d}=c,{stroke:p,strokeWidth:g,strokeOpacity:f,lineDash:x,lineDashOffset:y}=u,{stroke:b,strokeWidth:S,strokeOpacity:M,lineDash:D,lineDashOffset:L}=d,T=e?s.highlightStyle.item:void 0;t.each((I,N)=>{const{isRising:O,centerX:R,width:_,y:B,height:W,yOpen:F,yClose:z,crisp:U}=N;let H;if(h!=null){const{stroke:j,strokeWidth:V,strokeOpacity:G,lineDash:K,lineDashOffset:$}=O?u:d;H=this.cachedDatumCallback(Rft(this.getDatumId(N),e?"highlight":"node"),()=>this.callWithContext(h,{seriesId:i,itemId:N.itemId,xKey:o,highKey:a,lowKey:n,openKey:r,closeKey:l,datum:N.datum,strokeOpacity:G,stroke:j,strokeWidth:V,lineDash:K,lineDashOffset:$,highlighted:e}))}I.centerX=R,I.width=_,I.y=B,I.height=W,I.yOpen=F,I.yClose=z,I.crisp=U,I.stroke=T?.stroke??H?.stroke??(O?p:b),I.strokeWidth=T?.strokeWidth??H?.strokeWidth??(O?g:S),I.strokeOpacity=T?.strokeOpacity??H?.strokeOpacity??(O?f:M),I.lineDash=T?.lineDash??H?.lineDash??(O?x:D),I.lineDashOffset=T?.lineDashOffset??H?.lineDashOffset??(O?y:L),I.strokeAlignment=(H?.strokeWidth??(O?g:S))/2})}getLegendData(t){const{id:e,data:i,ctx:{legendManager:s},visible:o}=this,{xKey:a,yName:n,item:{up:r,down:l},showInLegend:c,legendItemName:h}=this.properties;if(!i?.length||!a||t!=="category")return[];const u={type:"gradient",gradient:"linear",colorSpace:"rgb",colorStops:[{color:r.stroke,stop:0},{color:r.stroke,stop:.5},{color:l.stroke,stop:.5}],rotation:90};return[{legendType:"category",id:e,itemId:e,seriesId:e,enabled:o&&s.getItemEnabled({seriesId:e,itemId:e}),label:{text:h??n??e},symbol:{marker:{fill:u,fillOpacity:r.strokeOpacity,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}},legendItemName:h,hideInLegend:!c}]}};mD.className="ohlc",mD.type="ohlc";var Pft=(E(),C(w)),ei=(P(),C(et)),{commonSeriesOptionsDefs:Bft,tooltipOptionsDefs:zft}=Pft._ModuleSupport,sH={...ei.strokeOptionsDef,...ei.lineDashOptionsDef},$O={type:(0,ei.required)((0,ei.constant)("ohlc")),xKey:(0,ei.required)(ei.string),openKey:(0,ei.required)(ei.string),highKey:(0,ei.required)(ei.string),lowKey:(0,ei.required)(ei.string),closeKey:(0,ei.required)(ei.string),xName:ei.string,yName:ei.string,openName:ei.string,highName:ei.string,lowName:ei.string,closeName:ei.string,showInMiniChart:ei.boolean,itemStyler:ei.callback,item:{up:sH,down:sH},tooltip:zft,...Bft};$O.pickOutsideVisibleMinorAxis=ei.boolean,$O.focusPriority=ei.number;var{CARTESIAN_AXIS_TYPE:yD,CARTESIAN_POSITION:oH}=Eft._ModuleSupport.ThemeConstants,Fft={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ohlc",moduleFactory:t=>new mD(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:yD.NUMBER,position:oH.LEFT},{type:yD.ORDINAL_TIME,position:oH.BOTTOM}],themeTemplate:{animation:{enabled:!1},series:{item:{up:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"up.stroke"}]}},down:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"down.stroke"}]}}}},axes:{[yD.NUMBER]:{crosshair:{snap:!1}},[yD.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},groupable:!1},aH={type:"series",name:"ohlc",chartType:"cartesian",enterprise:!0,options:$O,create:t=>new mD(t)},Gft=(E(),C(w)),xD=(E(),C(w)),jft=1e3;function nH(t,e,i,s,o,a){const n=t[a];if(n==null)return!1;const r=rD(n,e,i),l=lD(r,o);return a===s[l+ea]}function rH(t,e,i,s,o,a){const n=t[a];if(n==null)return!1;const r=rD(n,e,i),l=lD(r,o);return a===s[l+ta]}function Vft(t,e,i,s){if(t.length<jft)return;const[o,a]=bx(s);let n=xx(t);const{indexData:r,valueData:l}=Sx(t,e,i,o,a,n);let c=[],h=[];for(let d=0;d<t.length;d+=1)nH(t,o,a,r,n,d)&&c.push(d),rH(t,o,a,r,n,d)&&h.push(d);const u=[{maxRange:n,topIndices:c,bottomIndices:h}];for(;n>64;)({maxRange:n}=vx(r,l,n,{inPlace:!0})),c=c.filter(nH.bind(null,t,o,a,r,n)),h=h.filter(rH.bind(null,t,o,a,r,n)),u.push({maxRange:n,topIndices:c,bottomIndices:h});return u.reverse(),u}var Wft=(E(),C(w)),{CartesianSeriesProperties:Uft,FillGradientDefaults:Hft,FillPatternDefaults:Yft,InterpolationProperties:Kft,SeriesMarker:$ft,SeriesTooltip:Xft,TempValidate:ii,BOOLEAN:Zft,COLOR_STRING:lH,LINE_DASH:qft,OBJECT:wd,PLACEMENT:Qft,POSITIVE_NUMBER:XO,COLOR_GRADIENT:Jft,COLOR_PATTERN:tmt,OR:emt,RATIO:cH,STRING:Ed,DropShadow:imt,Label:smt}=Wft._ModuleSupport,ZO=class extends smt{constructor(){super(...arguments),this.placement="outside",this.padding=6}};m([ii(Qft)],ZO.prototype,"placement",2),m([ii(XO)],ZO.prototype,"padding",2);var mi=class extends Uft{constructor(){super(...arguments),this.fill="#99CCFF",this.fillGradientDefaults=new Hft,this.fillPatternDefaults=new Yft,this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new Kft,this.shadow=new imt().set({enabled:!1}),this.marker=new $ft,this.label=new ZO,this.tooltip=new Xft,this.connectMissingData=!1}};m([ii(Ed)],mi.prototype,"xKey",2),m([ii(Ed)],mi.prototype,"yLowKey",2),m([ii(Ed)],mi.prototype,"yHighKey",2),m([ii(Ed,{optional:!0})],mi.prototype,"xName",2),m([ii(Ed,{optional:!0})],mi.prototype,"yName",2),m([ii(Ed,{optional:!0})],mi.prototype,"yLowName",2),m([ii(Ed,{optional:!0})],mi.prototype,"yHighName",2),m([ii(emt(Jft,tmt,lH))],mi.prototype,"fill",2),m([ii(wd)],mi.prototype,"fillGradientDefaults",2),m([ii(wd)],mi.prototype,"fillPatternDefaults",2),m([ii(cH)],mi.prototype,"fillOpacity",2),m([ii(lH)],mi.prototype,"stroke",2),m([ii(XO)],mi.prototype,"strokeWidth",2),m([ii(cH)],mi.prototype,"strokeOpacity",2),m([ii(qft)],mi.prototype,"lineDash",2),m([ii(XO)],mi.prototype,"lineDashOffset",2),m([ii(wd)],mi.prototype,"interpolation",2),m([ii(wd)],mi.prototype,"shadow",2),m([ii(wd)],mi.prototype,"marker",2),m([ii(wd)],mi.prototype,"label",2),m([ii(wd)],mi.prototype,"tooltip",2),m([ii(Zft)],mi.prototype,"connectMissingData",2);var omt=(E(),C(w)),{CollapseMode:bD,isScaleValid:hH,pairUpSpans:SD,prepareAreaFillAnimationFns:amt,plotInterpolatedLinePathStroke:nf,prepareLinePathPropertyAnimation:nmt,areScalingEqual:uH}=omt._ModuleSupport;function rmt(t,e,i,s){const o=(l,c)=>{nf(l,c,e.removed),nf(l,c,i.removed)},a=(l,c)=>{nf(l,c,e.moved),nf(l,c,i.moved)},n=(l,c)=>{nf(l,c,e.added),nf(l,c,i.added)},r=nmt(t,s);return{status:t,path:{addPhaseFn:n,updatePhaseFn:a,removePhaseFn:o},pathProperties:r}}function lmt(t,e,i){const s=t.scales.x?.type==="category",o=e.scales.x?.type==="category";if(s!==o||!hH(t.scales.x)||!hH(e.scales.x))return;let a="updated";e.visible&&!t.visible?a="removed":!e.visible&&t.visible&&(a="added");const n=SD({scales:t.scales,data:t.fillData.spans},{scales:e.scales,data:e.fillData.spans},bD.Split);if(n==null)return;const r=SD({scales:t.scales,data:t.fillData.phantomSpans},{scales:e.scales,data:e.fillData.phantomSpans},bD.Split);if(r==null)return;const l=SD({scales:t.scales,data:t.highStrokeData.spans},{scales:e.scales,data:e.highStrokeData.spans},bD.Split);if(l==null)return;const c=SD({scales:t.scales,data:t.lowStrokeData.spans},{scales:e.scales,data:e.lowStrokeData.spans},bD.Split);if(c==null)return;const h="fade",u=amt(a,n,r,h),d=rmt(a,l,c,h),p=(i?.changed??!0)||!uH(t.scales.x,e.scales.x)||!uH(t.scales.y,e.scales.y)||a!=="updated";return{status:a,fill:u,stroke:d,hasMotion:p}}var{valueProperty:dH,keyProperty:cmt,ChartAxisDirection:ho,mergeDefaults:hmt,updateLabelNode:umt,fixNumericExtent:pH,buildResetPathFn:dmt,resetLabelFn:pmt,resetMarkerFn:gmt,resetMarkerPositionFn:gH,pathSwipeInAnimation:fmt,resetMotion:mmt,markerSwipeScaleInAnimation:ymt,seriesLabelFadeInAnimation:qO,animationValidation:xmt,diff:bmt,updateClipPath:fH,computeMarkerFocusBounds:mH,plotAreaPathFill:Smt,plotLinePathStroke:yH,interpolatePoints:xH,pathFadeInAnimation:bH,markerFadeInAnimation:SH,fromToMotion:vH,pathMotion:MH,extent:vmt,createDatumId:Mmt,applyShapeFillBBox:Dmt,PointerEvents:QO,Group:kmt,BBox:Amt,ContinuousScale:Imt,OrdinalTimeScale:Tmt,findMinMax:Cmt,getShapeStyle:Lmt,getShapeFill:Nmt}=xD._ModuleSupport,Omt=class extends xD._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.yLowKey=s.properties.yLowKey,this.yHighKey=s.properties.yHighKey}},vD=class extends xD._ModuleSupport.CartesianSeries{constructor(t){super({moduleCtx:t,hasMarkers:!0,pathsPerSeries:["fill","stroke"],pickModes:[xD._ModuleSupport.SeriesNodePickMode.AXIS_ALIGNED],directionKeys:{[ho.X]:["xKey"],[ho.Y]:["yLowKey","yHighKey"]},directionNames:{[ho.X]:["xName"],[ho.Y]:["yLowName","yHighName","yName"]},categoryKey:"xValue",animationResetFns:{path:dmt({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:pmt,marker:(e,i)=>({...gmt(e),...gH(e,i)})},clipFocusBox:!1}),this.properties=new mi,this.NodeEvent=Omt,this.dataAggregationFilters=void 0}async processData(t){if(!this.properties.isValid())return;const{xKey:e,yLowKey:i,yHighKey:s}=this.properties,o=this.axes[ho.X]?.scale,a=this.axes[ho.Y]?.scale,{xScaleType:n,yScaleType:r}=this.getScaleInformation({xScale:o,yScale:a}),l=[],c=!this.ctx.animationManager.isSkipped();!this.ctx.animationManager.isSkipped()&&this.processedData&&l.push(bmt(this.id,this.processedData)),c&&l.push(xmt());const{dataModel:h,processedData:u}=await this.requestDataModel(t,this.data,{props:[cmt(e,n,{id:"xValue"}),dH(i,r,{id:"yLowValue"}),dH(s,r,{id:"yHighValue"}),...l]});this.dataAggregationFilters=this.aggregateData(h,u),this.animationState.transition("updateData")}aggregateData(t,e){const i=this.axes[ho.X];if(i==null||!(Imt.is(i.scale)||Tmt.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),o=t.resolveColumnById(this,"yHighValue",e),a=t.resolveColumnById(this,"yLowValue",e),{index:n}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[n];return Vft(s,o,a,r)}xCoordinateRange(t){const e=this.axes[ho.X].scale.convert(t);return[e,e]}yCoordinateRange(t){const e=this.axes[ho.Y].scale.convert(t[0]);return[e,e]}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!(e&&i))return[];const{domain:{keys:[s]}}=e;if(t===ho.X){const o=i.resolveProcessedDataDefById(this,"xValue");return o?.def.type==="key"&&o.def.valueType==="category"?s:pH(vmt(s))}else{const o=this.domainForClippedRange(ho.Y,["yHighValue","yLowValue"],"xValue",!0),a=Cmt(o);return pH(a)}}getSeriesRange(t,e){return this.domainForVisibleRange(ho.Y,["yHighValue","yLowValue"],"xValue",e,!0)}createNodeData(){const{data:t,dataModel:e,processedData:i,axes:s}=this,o=s[ho.X],a=s[ho.Y];if(!(t&&o&&a&&e&&i))return;const n=o.scale,r=a.scale,{xKey:l,yLowKey:c,yHighKey:h,connectMissingData:u,marker:d,interpolation:p}=this.properties,g=i.dataSources.get(this.id)??[],f=(n.bandwidth??0)/2,x=e.resolveKeysById(this,"xValue",i),y=e.resolveColumnById(this,"yHighValue",i),b=e.resolveColumnById(this,"yLowValue",i),S=V=>n.convert(x[V])+f,M=[],D=[],L=[],T=(V,G,K)=>{const $=g[V],Z=x[V];if(Z==null)return;const Q=L[L.length-1];if(Number.isFinite(G)&&Number.isFinite(K)){const q=(St,Lt,mt)=>{D.push({index:V,series:this,itemId:St,datum:$,datumIndex:V,midPoint:{x:X,y:mt},yHighValue:G,yLowValue:K,xValue:Z,xKey:l,yLowKey:c,yHighKey:h,point:{x:X,y:mt,size:dt},enabled:!0});const Jt=this.createLabelData({datumIndex:V,point:{x:X,y:mt},value:Lt,yLowValue:K,yHighValue:G,itemId:St,inverted:J,datum:$,series:this});M.push(Jt)},J=K>G,X=S(V),st=r.convert(G),nt=r.convert(K),{size:dt}=d;q("high",G,st),q("low",K,nt);const ut={high:{point:{x:X,y:st},xDatum:Z,yDatum:G},low:{point:{x:X,y:nt},xDatum:Z,yDatum:K}};Array.isArray(Q)?Q.push(ut):Q!=null?(Q.skip+=1,L.push([ut])):L.push([ut])}else u||(Array.isArray(Q)||Q==null?L.push({skip:0}):Q.skip+=1)},{dataAggregationFilters:I}=this,[N,O]=n.range,R=O-N,_=I?.find(V=>V.maxRange>R),B=_?.topIndices,W=_?.bottomIndices;let[F,z]=this.visibleRange("xValue",o.range,B);F=Math.max(F-1,0),z=Math.min(z+1,B?.length??x.length),i.input.count<1e3&&(F=0,z=i.input.count);for(let V=F;V<z;V+=1){const G=B?.[V]??V,K=W?.[V]??V;T(G,y[G],b[K])}const U=L.flatMap(V=>{if(!Array.isArray(V))return[];const G=V.map(K=>K.high);return xH(G,p)}),H=L.flatMap(V=>{if(!Array.isArray(V))return[];const G=V.map(K=>K.low);return xH(G,p)});return{itemId:`${c}-${h}`,labelData:M,nodeData:D,fillData:{itemId:"high",spans:U,phantomSpans:H},highStrokeData:{itemId:"high",spans:U},lowStrokeData:{itemId:"low",spans:H},scales:this.calculateScaling(),visible:this.visible}}createLabelData({datumIndex:t,point:e,value:i,itemId:s,inverted:o,datum:a,series:n}){const{xKey:r,yLowKey:l,yHighKey:c,xName:h,yName:u,yLowName:d,yHighName:p,label:g}=this.properties,{placement:f,padding:x=10}=g;let y=s;o&&(y=s==="low"?"high":"low");const b=f==="outside"&&y==="high"||f==="inside"&&y==="low"?-1:1;return{x:e.x,y:e.y+x*b,series:n,itemId:s,datum:a,datumIndex:t,text:this.getLabelText(g,{value:i,datum:a,itemId:s,xKey:r,yLowKey:l,yHighKey:c,xName:h,yLowName:d,yHighName:p,yName:u}),textAlign:"center",textBaseline:b===-1?"bottom":"top"}}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}updatePathNodes(t){const{opacity:e,visible:i,animationEnabled:s}=t,[o,a]=t.paths,n=this.getStrokeWidth(this.properties.strokeWidth);a.setProperties({fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:QO.None,stroke:this.properties.stroke,strokeWidth:n,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:e,visible:i||s});const r=Nmt(this.properties.fill,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults),l=this.getShapeFillBBox();Dmt(o,r,l),o.setProperties({stroke:void 0,lineJoin:"round",pointerEvents:QO.None,fill:r,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,strokeOpacity:this.properties.strokeOpacity,fillShadow:this.properties.shadow,strokeWidth:n,opacity:e,visible:i||s}),fH(this,a),fH(this,o)}updatePaths(t){this.updateAreaPaths(t.paths,t.contextData)}updateAreaPaths(t,e){for(const i of t)i.visible=e.visible;if(e.visible)this.updateFillPath(t,e),this.updateStrokePath(t,e);else for(const i of t)i.path.clear(),i.markDirty("RangeArea")}updateFillPath(t,e){const[i]=t;i.path.clear(),Smt(i,e.fillData),i.markDirty("RangeArea")}updateStrokePath(t,e){const[,i]=t;i.path.clear(),yH(i,e.highStrokeData.spans),yH(i,e.lowStrokeData.spans),i.markDirty("RangeArea")}updateMarkerSelection(t){const{nodeData:e,markerSelection:i}=t;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?e:[])}getMarkerItemBaseStyle(t){const{properties:e}=this,{marker:i}=e,s=t?e.highlightStyle.item:void 0;return{shape:i.shape,size:i.size,fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??this.getStrokeWidth(i.strokeWidth),strokeOpacity:s?.strokeOpacity??i.strokeOpacity,lineDash:s?.lineDash??i.lineDash,lineDashOffset:s?.lineDashOffset??i.lineDashOffset}}getMarkerItemStyleOverrides(t,e,i,s){const{id:o,properties:a}=this,{xKey:n,yHighKey:r,yLowKey:l,marker:c}=a,{itemStyler:h}=c;if(h!=null)return this.cachedDatumCallback(Mmt(t,s?"highlight":"node"),()=>this.callWithContext(h,{seriesId:o,datum:e,xKey:n,yHighKey:r,yLowKey:l,highlighted:s,...i}))}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i}=t,{xKey:s,yLowKey:o,yHighKey:a,marker:n,fill:r,stroke:l,strokeWidth:c,fillOpacity:h,strokeOpacity:u}=this.properties,d=hmt(i&&this.properties.highlightStyle.item,n.getStyle(),{fill:r,fillOpacity:h,stroke:l,strokeWidth:c,strokeOpacity:u}),p=this.getShapeFillBBox();e.each((g,f)=>{this.updateMarkerStyle(n,g,f.datum,f.point,{xKey:s,yHighKey:a,yLowKey:o},i,d,p)}),i||this.properties.marker.markClean()}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;return i.update(e,s=>{s.pointerEvents=QO.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{umt(e,this.properties.label,i)})}getHighlightLabelData(t,e){const i=t.filter(s=>s.datum===e.datum);return i.length>0?i:void 0}getHighlightData(t,e){const i=t.filter(s=>s.datum===e.datum);return i.length>0?i:void 0}getTooltipContent(t,e){const{id:i,dataModel:s,processedData:o,axes:a,properties:n}=this,{xName:r,yName:l,yLowKey:c,yLowName:h,xKey:u,yHighKey:d,yHighName:p,tooltip:g}=n,f=a[ho.X],x=a[ho.Y];if(!s||!o||!f||!x)return;const y=o.dataSources.get(this.id)?.[t],b=s.resolveKeysById(this,"xValue",o)[t],S=s.resolveColumnById(this,"yHighValue",o)[t],M=s.resolveColumnById(this,"yLowValue",o)[t];if(b==null)return;const D=this.getMarkerItemBaseStyle(!1);Object.assign(D,this.getMarkerItemStyleOverrides(String(t),t,D,!1));const L=`${x.formatDatum(M)} - ${x.formatDatum(S)}`;return g.formatTooltip(this.properties,{heading:f.formatDatum(b),symbol:this.legendItemSymbol(),data:[{label:l,fallbackLabel:`${h??c} - ${p??d}`,value:L}]},{seriesId:i,datum:y,title:l,itemId:e?.itemId??"unknown",xName:r,yName:l,yLowKey:c,yLowName:h,xKey:u,yHighKey:d,yHighName:p,...D})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,strokeOpacity:s,lineDash:o,marker:a}=this.properties;return{marker:Lmt({shape:a.shape,fill:a.fill??t,stroke:a.stroke??e,fillOpacity:a.fillOpacity,strokeOpacity:a.strokeOpacity,strokeWidth:a.strokeWidth,lineDash:a.lineDash,lineDashOffset:a.lineDashOffset},a.fillGradientDefaults,a.fillPatternDefaults),line:{stroke:e,strokeOpacity:s,strokeWidth:i,lineDash:o}}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{yLowKey:s,yHighKey:o,yName:a,yLowName:n,yHighName:r,showInLegend:l}=this.properties,c=a??`${n??s} - ${r??o}`,h=`${s}-${o}`;return[{legendType:"category",id:e,itemId:h,seriesId:e,enabled:i,label:{text:`${c}`},symbol:this.legendItemSymbol(),hideInLegend:!l}]}isLabelEnabled(){return this.properties.label.enabled}onDataChange(){}nodeFactory(){return new kmt}animateEmptyUpdateReady(t){const{markerSelection:e,labelSelection:i,contextData:s,paths:o}=t,{animationManager:a}=this.ctx;this.updateAreaPaths(o,s),fmt(this,a,...o),mmt([e],gH),ymt(this,a,e),qO(this,"labels",a,i)}animateReadyResize(t){const{contextData:e,paths:i}=t;this.updateAreaPaths(i,e),super.animateReadyResize(t)}animateWaitingUpdateReady(t){const{animationManager:e}=this.ctx,{markerSelection:i,labelSelection:s,contextData:o,paths:a,previousContextData:n}=t,[r,l]=a;if(r==null&&l==null)return;this.resetMarkerAnimation(t),this.resetLabelAnimation(t);const c=()=>{this.resetPathAnimation(t),this.updateAreaPaths(a,o)},h=()=>{e.skipCurrentBatch(),c()};if(o==null||n==null){c(),SH(this,e,"added",i),bH(this,"fill_path_properties",e,"add",r),bH(this,"stroke_path_properties",e,"add",l),qO(this,"labels",e,s);return}const u=lmt(o,n,this.processedData?.reduced?.diff?.[this.id]);if(u===void 0){h();return}else if(u.status==="no-op")return;vH(this.id,"fill_path_properties",e,[r],u.fill.pathProperties),vH(this.id,"stroke_path_properties",e,[l],u.stroke.pathProperties),u.status==="added"?this.updateAreaPaths(a,o):u.status==="removed"?this.updateAreaPaths(a,n):(MH(this.id,"fill_path_update",e,[r],u.fill.path),MH(this.id,"stroke_path_update",e,[l],u.stroke.path)),u.hasMotion&&(SH(this,e,void 0,i),qO(this,"labels",e,s)),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(a,o)})}getFormattedMarkerStyle(t){const{xKey:e,yLowKey:i,yHighKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,t.datum,{xKey:e,yLowKey:i,yHighKey:s},!0)}computeFocusBounds(t){const e=mH(this,t),i=mH(this,{...t,datumIndex:t.datumIndex+1});if(e&&i)return Amt.merge([e,i])}isDatumEnabled(t,e){return e%2===0&&super.isDatumEnabled(t,e)}};vD.className="RangeAreaSeries",vD.type="range-area";var wmt=(E(),C(w)),zi=(P(),C(et)),{commonSeriesOptionsDefs:Emt,interpolationValidator:_mt,markerOptionsDefs:Rmt,seriesLabelOptionsDefs:Pmt,shadowOptionsDefs:Bmt,tooltipOptionsDefs:zmt}=wmt._ModuleSupport,JO={type:(0,zi.required)((0,zi.constant)("range-area")),xKey:(0,zi.required)(zi.string),yLowKey:(0,zi.required)(zi.string),yHighKey:(0,zi.required)(zi.string),xName:zi.string,yName:zi.string,yLowName:zi.string,yHighName:zi.string,showInMiniChart:zi.boolean,connectMissingData:zi.boolean,interpolation:_mt,label:{...Pmt,padding:zi.positiveNumber,placement:(0,zi.union)("inside","outside")},marker:Rmt,tooltip:zmt,shadow:Bmt,...Emt,...zi.fillOptionsDef,...zi.strokeOptionsDef,...zi.lineDashOptionsDef};JO.pickOutsideVisibleMinorAxis=zi.boolean,JO.focusPriority=zi.number;var tw=(E(),C(w)),Fmt={series:{fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:tw._ModuleSupport.FILL_PATTERN_DEFAULTS,stroke:{$palette:"stroke"},fillOpacity:.7,nodeClickRange:"nearest",marker:{enabled:!1,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:tw._ModuleSupport.FILL_PATTERN_DEFAULTS,size:6,strokeWidth:2},label:{enabled:!1,placement:"outside",padding:10,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},interpolation:{type:"linear"}},axes:{[tw._ModuleSupport.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},{ThemeConstants:{CARTESIAN_AXIS_TYPE:DH,CARTESIAN_POSITION:kH}}=Gft._ModuleSupport,Gmt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-area",moduleFactory:t=>new vD(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:DH.NUMBER,position:kH.LEFT},{type:DH.CATEGORY,position:kH.BOTTOM}],themeTemplate:Fmt},AH={type:"series",name:"range-area",chartType:"cartesian",enterprise:!0,options:JO,create:t=>new vD(t)},jmt=(E(),C(w)),ew=(E(),C(w)),Vmt=1e3,Wmt=5;function Umt(t,e,i,s){if(t.length<Vmt)return;const[o,a]=bx(s);let n=xx(t,Wmt),{indexData:r,valueData:l}=Sx(t,e,i,o,a,n);const c=[{maxRange:n,indexData:r}];for(;n>64;)({indexData:r,valueData:l,maxRange:n}=vx(r,l,n)),c.push({maxRange:n,indexData:r});return c.reverse(),c}var Hmt=(E(),C(w)),{AbstractBarSeriesProperties:Ymt,FillGradientDefaults:Kmt,FillPatternDefaults:$mt,SeriesTooltip:Xmt,TempValidate:si,COLOR_STRING:IH,FUNCTION:Zmt,LINE_DASH:qmt,OBJECT:Tx,PLACEMENT:Qmt,POSITIVE_NUMBER:MD,RATIO:TH,STRING:_d,BOOLEAN:Jmt,COLOR_GRADIENT:tyt,COLOR_PATTERN:eyt,OR:iyt,DropShadow:syt,Label:oyt}=Hmt._ModuleSupport,iw=class extends oyt{constructor(){super(...arguments),this.placement="inside",this.padding=6}};m([si(Qmt)],iw.prototype,"placement",2),m([si(MD)],iw.prototype,"padding",2);var yi=class extends Ymt{constructor(){super(...arguments),this.fill="#99CCFF",this.fillGradientDefaults=new Kmt,this.fillPatternDefaults=new $mt,this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=new syt().set({enabled:!1}),this.label=new iw,this.tooltip=new Xmt,this.fastDataProcessing=!1}};m([si(_d)],yi.prototype,"xKey",2),m([si(_d)],yi.prototype,"yLowKey",2),m([si(_d)],yi.prototype,"yHighKey",2),m([si(_d,{optional:!0})],yi.prototype,"xName",2),m([si(_d,{optional:!0})],yi.prototype,"yName",2),m([si(_d,{optional:!0})],yi.prototype,"yLowName",2),m([si(_d,{optional:!0})],yi.prototype,"yHighName",2),m([si(iyt(tyt,eyt,IH))],yi.prototype,"fill",2),m([si(Tx)],yi.prototype,"fillGradientDefaults",2),m([si(Tx)],yi.prototype,"fillPatternDefaults",2),m([si(TH)],yi.prototype,"fillOpacity",2),m([si(IH)],yi.prototype,"stroke",2),m([si(MD)],yi.prototype,"strokeWidth",2),m([si(TH)],yi.prototype,"strokeOpacity",2),m([si(qmt)],yi.prototype,"lineDash",2),m([si(MD)],yi.prototype,"lineDashOffset",2),m([si(MD)],yi.prototype,"cornerRadius",2),m([si(Zmt,{optional:!0})],yi.prototype,"itemStyler",2),m([si(Tx)],yi.prototype,"shadow",2),m([si(Tx)],yi.prototype,"label",2),m([si(Tx)],yi.prototype,"tooltip",2),m([si(Jmt)],yi.prototype,"fastDataProcessing",2);var{SeriesNodePickMode:CH,valueProperty:LH,keyProperty:ayt,ChartAxisDirection:Cx,checkCrisp:nyt,updateLabelNode:ryt,SMALLEST_KEY_INTERVAL:lyt,LARGEST_KEY_INTERVAL:cyt,diff:hyt,prepareBarAnimationFunctions:NH,midpointStartingBarPosition:OH,resetBarSelectionsFn:uyt,fixNumericExtent:dyt,seriesLabelFadeInAnimation:wH,resetLabelFn:pyt,animationValidation:gyt,computeBarFocusBounds:fyt,visibleRangeIndices:EH,createDatumId:myt,ContinuousScale:_H,OrdinalTimeScale:yyt,Rect:xyt,PointerEvents:byt,motion:RH,applyShapeStyle:Syt,findMinMax:vyt,getShapeStyle:sw}=ew._ModuleSupport,Myt=class extends ew._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.xKey,this.yLowKey=s.properties.yLowKey,this.yHighKey=s.properties.yHighKey}},DD=class extends ew._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,pickModes:[CH.AXIS_ALIGNED,CH.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,directionKeys:{x:["xKey"],y:["yLowKey","yHighKey"]},directionNames:{x:["xName"],y:["yLowName","yHighName","yName"]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:uyt,label:pyt}}),this.properties=new yi,this.dataAggregationFilters=void 0,this.NodeEvent=Myt}async processData(t){if(!this.properties.isValid())return;const{xKey:e,yLowKey:i,yHighKey:s,fastDataProcessing:o}=this.properties,a=!o,n=this.getCategoryAxis()?.scale,r=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:n,yScale:r}),u=[];this.ctx.animationManager.isSkipped()||(this.processedData&&u.push(hyt(this.id,this.processedData)),u.push(gyt()));const d=this.visible?{}:{forceValue:0},{dataModel:p,processedData:g}=await this.requestDataModel(t,this.data,{props:[ayt(e,c,{id:"xValue"}),LH(i,h,{id:"yLowValue",invalidValue:null,...d}),LH(s,h,{id:"yHighValue",invalidValue:null,...d}),...l?[lyt,cyt]:[],...u],groupByKeys:a});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.largestDataInterval=g.reduced?.largestKeyInterval,this.dataAggregationFilters=this.aggregateData(p,g),this.animationState.transition("updateData")}aggregateData(t,e){if(e.type!=="grouped")return;const i=this.axes[Cx.X];if(i==null||!(_H.is(i.scale)||yyt.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),o=t.resolveColumnById(this,"yHighValue",e),a=t.resolveColumnById(this,"yLowValue",e),{index:n}=t.resolveProcessedDataDefById(this,"xValue"),r=e.domain.keys[n];return Umt(s,o,a,r)}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i)return[];const{keys:[s]}=e.domain;if(t===this.getCategoryDirection()){const o=i.resolveProcessedDataDefById(this,"xValue");return o?.def.type==="key"&&o?.def.valueType==="category"?s:this.padBandExtent(s)}else{const o=this.domainForClippedRange(Cx.Y,["yHighValue","yLowValue"],"xValue",!0),a=vyt(o);return dyt(a)}}getSeriesRange(t,e){return this.domainForVisibleRange(Cx.Y,["yHighValue","yLowValue"],"xValue",e,!0)}createNodeData(){const{data:t,dataModel:e,groupScale:i,processedData:s,visible:o}=this,a=this.getCategoryAxis(),n=this.getValueAxis();if(!(t&&a&&n&&e&&s?.dataSources))return;const r=a.scale,l=n.scale,c=this.getBarDirection()===Cx.X,{xKey:h,yLowKey:u,yHighKey:d,strokeWidth:p}=this.properties,g=`${u}-${d}`,f={itemId:g,nodeData:[],labelData:[],scales:this.calculateScaling(),visible:this.visible};if(!o)return f;const x=s.dataSources.get(this.id)??[],y=e.resolveKeysById(this,"xValue",s),b=e.resolveColumnById(this,"yLowValue",s),S=e.resolveColumnById(this,"yHighValue",s),{barWidth:M,groupIndex:D}=this.updateGroupScale(a),L=_H.is(r)?M*-.5:0,T=i.convert(String(D)),I=nyt(a?.scale,a?.visibleRange,this.smallestDataInterval,this.largestDataInterval),N=z=>Math.round(r.convert(y[z]))+T+L,O=(z,U,H,j,V,G,K)=>{const $=x[z],Z=y[z];if(Z==null)return;const Q=b[z],q=S[z];if(!Number.isFinite(Q?.valueOf())||!Number.isFinite(q?.valueOf()))return;const[J,X]=Q<q?[Q,q]:[q,Q],st=Math.round(l.convert(G)),nt=Math.round(l.convert(V)),dt=Math.max(p,Math.abs(nt-st)),ut={x:c?Math.min(st,nt):H,y:c?H:Math.min(st,nt),width:c?dt:j,height:c?j:dt},St={x:ut.x+ut.width/2,y:ut.y+ut.height/2},Lt=this.createLabelData({datumIndex:z,rect:ut,barAlongX:c,yLowValue:J,yHighValue:X,datum:$,series:this}),mt={index:U,valueIndex:z,series:this,itemId:g,datum:$,datumIndex:z,xValue:Z,yLowValue:Q,yHighValue:q,yLowKey:u,yHighKey:d,xKey:h,x:ut.x,y:ut.y,width:ut.width,height:ut.height,midPoint:St,crisp:K,labels:Lt};f.nodeData.push(mt),f.labelData.push(...Lt)},{dataAggregationFilters:R}=this,[_,B]=r.range,W=B-_,F=R?.find(z=>z.maxRange>W);if(F!=null){const{maxRange:z,indexData:U}=F,[H,j]=EH(z,a.range,V=>{const G=V*Oa,K=U[G+js],$=U[G+Oo];if(K===-1)return;const Z=(K+$)/2|0;return[N(Z),N($)+M]});for(let V=H;V<j;V+=1){const G=V*Oa,K=U[G+js],$=U[G+Oo],Z=U[G+ta],Q=U[G+ea];if(K===-1)continue;const q=(K+$)/2|0;if(y[q]==null)continue;const X=N(q),st=Math.abs(N(K)-N($))+M,nt=b[Z],dt=S[Q];O(q,0,X,st,nt,dt,!1)}}else if(s.type==="ungrouped"){let[z,U]=EH(x.length,a.range,H=>[N(H),M]);s.input.count<1e3&&(z=0,U=s.input.count);for(let H=z;H<U;H+=1){const j=N(H),V=M,G=b[H],K=S[H];O(H,0,j,V,G,K,I)}}else for(const{datumIndex:z,groupIndex:U}of e.forEachGroupDatum(this,s)){const H=N(z),j=M,V=b[z],G=S[z];O(z,U,H,j,V,G,I)}return f}createLabelData({datumIndex:t,rect:e,barAlongX:i,yLowValue:s,yHighValue:o,datum:a,series:n}){const{xKey:r,yLowKey:l,yHighKey:c,xName:h,yLowName:u,yHighName:d,yName:p,label:g}=this.properties,f={datum:a,xKey:r,yLowKey:l,yHighKey:c,xName:h,yLowName:u,yHighName:d,yName:p},{placement:x,padding:y}=g,S=y*(x==="outside"?1:-1),M={datumIndex:t,x:e.x+(i?-S:e.width/2),y:e.y+(i?e.height/2:e.height+S),textAlign:i?"left":"center",textBaseline:i?"middle":"bottom",text:this.getLabelText(g,{itemId:"low",value:s,...f}),itemId:"low",datum:a,series:n},D={datumIndex:t,x:e.x+(i?e.width+S:e.width/2),y:e.y+(i?e.height/2:-S),textAlign:i?"right":"center",textBaseline:i?"middle":"top",text:this.getLabelText(g,{itemId:"high",value:o,...f}),itemId:"high",datum:a,series:n};return x==="outside"&&(M.textAlign=i?"right":"center",M.textBaseline=i?"middle":"top",D.textAlign=i?"left":"center",D.textBaseline=i?"middle":"bottom"),[M,D]}nodeFactory(){return new xyt}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,s=e??[];return i.update(s,void 0,o=>this.getDatumId(o))}getItemBaseStyle(t){const{properties:e}=this,{cornerRadius:i,fillGradientDefaults:s,fillPatternDefaults:o}=e,a=t?e.highlightStyle.item:void 0;return sw({fill:a?.fill??e.fill,fillOpacity:a?.fillOpacity??e.fillOpacity,stroke:a?.stroke??e.stroke,strokeWidth:a?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:a?.strokeOpacity??e.strokeOpacity,lineDash:a?.lineDash??e.lineDash??[],lineDashOffset:a?.lineDashOffset??e.lineDashOffset,cornerRadius:i},s,o)}getItemStyleOverrides(t,e,i,s){const{id:o,properties:a}=this,{xKey:n,yHighKey:r,yLowKey:l,itemStyler:c,fillGradientDefaults:h,fillPatternDefaults:u}=a;if(c==null)return;const d=this.cachedDatumCallback(myt(t,s?"highlight":"node"),()=>this.callWithContext(c,{seriesId:o,datum:e,xKey:n,yHighKey:r,yLowKey:l,highlighted:s,...i}));return sw(d,h,u)}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getCategoryDirection()===Cx.X,o=this.getItemBaseStyle(i),a=this.getShapeFillBBox();e.each((n,r)=>{const l=this.getItemStyleOverrides(String(r.datumIndex),r.datum,o,i);Syt(n,o,l,a),n.cornerRadius=l?.cornerRadius??o.cornerRadius,n.visible=s?r.width>0:r.height>0,n.crisp=r.crisp})}getHighlightLabelData(t,e){const i=t.filter(s=>s.datum===e.datum);return i.length>0?i:void 0}updateLabelSelection(t){const e=this.properties.label.enabled?t.labelData:[];return t.labelSelection.update(e,i=>{i.pointerEvents=byt.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{ryt(e,this.properties.label,i)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{xKey:a,xName:n,yName:r,yLowKey:l,yHighKey:c,yLowName:h,yHighName:u,tooltip:d}=o,p=this.getCategoryAxis(),g=this.getValueAxis();if(!i||!s||!p||!g)return;const f=s.dataSources.get(this.id)?.[t],x=i.resolveKeysById(this,"xValue",s)[t],y=i.resolveColumnById(this,"yHighValue",s)[t],b=i.resolveColumnById(this,"yLowValue",s)[t];if(x==null)return;const S=this.getItemBaseStyle(!1);Object.assign(S,this.getItemStyleOverrides(String(t),f,S,!1));const M=`${g.formatDatum(b)} - ${g.formatDatum(y)}`;return d.formatTooltip(this.properties,{heading:p.formatDatum(x),symbol:this.legendItemSymbol(),data:[{label:r,fallbackLabel:`${h??l} - ${u??c}`,value:M}]},{seriesId:e,datum:f,title:r,xKey:a,xName:n,yName:r,yLowKey:l,yHighKey:c,yLowName:h,yHighName:u,...S})}legendItemSymbol(){const{fill:t,stroke:e,strokeWidth:i,fillOpacity:s,strokeOpacity:o,lineDash:a,lineDashOffset:n,fillGradientDefaults:r,fillPatternDefaults:l}=this.properties;return{marker:sw({fill:t,stroke:e,fillOpacity:s,strokeOpacity:o,strokeWidth:i,lineDash:a,lineDashOffset:n},r,l)}}getLegendData(t){if(t!=="category")return[];const{id:e,visible:i}=this,{yName:s,yLowName:o,yHighName:a,yLowKey:n,yHighKey:r,showInLegend:l}=this.properties,c=s??`${o??n} - ${a??r}`,h=`${n}-${r}`;return[{legendType:"category",id:e,itemId:h,seriesId:e,enabled:i,label:{text:`${c}`},symbol:this.legendItemSymbol(),hideInLegend:!l}]}animateEmptyUpdateReady({datumSelection:t,labelSelection:e}){const i=NH(OH(this.isVertical(),"normal"));RH.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],i),wH(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(t){const{datumSelection:e,labelSelection:i,previousContextData:s}=t,{processedData:o}=this,a=o?.reduced?.diff?.[this.id];this.ctx.animationManager.stopByAnimationGroupId(this.id);const n=s==null?"fade":"normal",r=NH(OH(this.isVertical(),n));RH.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],r,(l,c)=>this.getDatumId(c),a),wH(this,"labels",this.ctx.animationManager,i)}getDatumId(t){return`${t.xValue}-${t.valueIndex}`}isLabelEnabled(){return this.properties.label.enabled}onDataChange(){}computeFocusBounds({datumIndex:t}){return fyt(this,this.contextNodeData?.nodeData[t])}};DD.className="RangeBarSeries",DD.type="range-bar";var Dyt=(E(),C(w)),oi=(P(),C(et)),{commonSeriesOptionsDefs:kyt,seriesLabelOptionsDefs:Ayt,shadowOptionsDefs:Iyt,tooltipOptionsDefs:Tyt}=Dyt._ModuleSupport,kD={type:(0,oi.required)((0,oi.constant)("range-bar")),xKey:(0,oi.required)(oi.string),yLowKey:(0,oi.required)(oi.string),yHighKey:(0,oi.required)(oi.string),xName:oi.string,yName:oi.string,yLowName:oi.string,yHighName:oi.string,direction:(0,oi.union)("horizontal","vertical"),showInMiniChart:oi.boolean,cornerRadius:oi.positiveNumber,itemStyler:oi.callback,label:{...Ayt,padding:oi.positiveNumber,placement:(0,oi.union)("inside","outside")},tooltip:Tyt,shadow:Iyt,...kyt,...oi.fillOptionsDef,...oi.strokeOptionsDef,...oi.lineDashOptionsDef};kD.pickOutsideVisibleMinorAxis=oi.boolean,kD.fastDataProcessing=oi.boolean,kD.focusPriority=oi.number;var PH=(E(),C(w)),Cyt={series:{direction:"vertical",fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:PH._ModuleSupport.FILL_PATTERN_DEFAULTS,strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},placement:"inside"}},axes:{[PH._ModuleSupport.ThemeConstants.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},Lyt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"range-bar",moduleFactory:t=>new DD(t),tooltipDefaults:{range:"exact"},defaultAxes:jmt._ModuleSupport.DIRECTION_SWAP_AXES,themeTemplate:Cyt,groupable:!0},BH={type:"series",name:"range-bar",chartType:"cartesian",enterprise:!0,options:kD,create:t=>new DD(t)},Nyt=(E(),C(w)),Rd=(E(),C(w)),Oyt=(E(),C(w)),{AbstractBarSeriesProperties:wyt,BaseProperties:Lx,FillGradientDefaults:Eyt,FillPatternDefaults:_yt,PropertiesArray:Ryt,SeriesTooltip:Pyt,TempValidate:Ht,BOOLEAN:Byt,COLOR_STRING:ow,COLOR_PATTERN:zyt,FUNCTION:zH,LINE_DASH:FH,NUMBER:Fyt,OBJECT:qn,OBJECT_ARRAY:Gyt,POSITIVE_NUMBER:rf,OR:jyt,COLOR_GRADIENT:Vyt,RATIO:aw,STRING:lf,UNION:GH,DropShadow:Wyt,Label:Uyt}=Oyt._ModuleSupport,AD=class extends Lx{};m([Ht(GH(["subtotal","total"],"a total type"))],AD.prototype,"totalType",2),m([Ht(Fyt)],AD.prototype,"index",2),m([Ht(lf)],AD.prototype,"axisLabel",2);var jH=class extends Lx{};m([Ht(zH,{optional:!0})],jH.prototype,"renderer",2);var nw=class extends Uyt{constructor(){super(...arguments),this.placement="outside-end",this.padding=6}};m([Ht(GH(["inside-center","inside-start","inside-end","outside-start","outside-end"],"a placement"))],nw.prototype,"placement",2),m([Ht(rf)],nw.prototype,"padding",2);var Os=class extends Lx{constructor(){super(...arguments),this.fill="#c16068",this.fillGradientDefaults=new Eyt,this.fillPatternDefaults=new _yt,this.stroke="#c16068",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=1,this.cornerRadius=0,this.shadow=new Wyt().set({enabled:!1}),this.label=new nw,this.tooltip=new jH}};m([Ht(lf,{optional:!0})],Os.prototype,"name",2),m([Ht(jyt(Vyt,ow,zyt))],Os.prototype,"fill",2),m([Ht(qn)],Os.prototype,"fillGradientDefaults",2),m([Ht(qn)],Os.prototype,"fillPatternDefaults",2),m([Ht(ow)],Os.prototype,"stroke",2),m([Ht(aw)],Os.prototype,"fillOpacity",2),m([Ht(aw)],Os.prototype,"strokeOpacity",2),m([Ht(FH)],Os.prototype,"lineDash",2),m([Ht(rf)],Os.prototype,"lineDashOffset",2),m([Ht(rf)],Os.prototype,"strokeWidth",2),m([Ht(rf)],Os.prototype,"cornerRadius",2),m([Ht(zH,{optional:!0})],Os.prototype,"itemStyler",2),m([Ht(qn)],Os.prototype,"shadow",2),m([Ht(qn)],Os.prototype,"label",2),m([Ht(qn)],Os.prototype,"tooltip",2);var Pd=class extends Lx{constructor(){super(...arguments),this.enabled=!0,this.stroke="black",this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=2}};m([Ht(Byt)],Pd.prototype,"enabled",2),m([Ht(ow)],Pd.prototype,"stroke",2),m([Ht(aw)],Pd.prototype,"strokeOpacity",2),m([Ht(FH)],Pd.prototype,"lineDash",2),m([Ht(rf)],Pd.prototype,"lineDashOffset",2),m([Ht(rf)],Pd.prototype,"strokeWidth",2);var ID=class extends Lx{constructor(){super(...arguments),this.positive=new Os,this.negative=new Os,this.total=new Os}};m([Ht(qn)],ID.prototype,"positive",2),m([Ht(qn)],ID.prototype,"negative",2),m([Ht(qn)],ID.prototype,"total",2);var sc=class extends wyt{constructor(){super(...arguments),this.item=new ID,this.totals=new Ryt(AD),this.line=new Pd,this.tooltip=new Pyt}};m([Ht(lf)],sc.prototype,"xKey",2),m([Ht(lf)],sc.prototype,"yKey",2),m([Ht(lf,{optional:!0})],sc.prototype,"xName",2),m([Ht(lf,{optional:!0})],sc.prototype,"yName",2),m([Ht(qn)],sc.prototype,"item",2),m([Ht(Gyt)],sc.prototype,"totals",2),m([Ht(qn)],sc.prototype,"line",2),m([Ht(qn)],sc.prototype,"tooltip",2);var{adjustLabelPlacement:Hyt,SeriesNodePickMode:VH,fixNumericExtent:Yyt,valueProperty:WH,keyProperty:Kyt,accumulativeValueProperty:TD,trailingAccumulatedValueProperty:$yt,ChartAxisDirection:rw,createDatumId:Xyt,checkCrisp:Zyt,updateLabelNode:qyt,prepareBarAnimationFunctions:Qyt,collapsedStartingBarPosition:Jyt,resetBarSelectionsFn:txt,seriesLabelFadeInAnimation:ext,resetLabelFn:ixt,animationValidation:sxt,DEFAULT_CARTESIAN_DIRECTION_KEYS:oxt,DEFAULT_CARTESIAN_DIRECTION_NAMES:axt,computeBarFocusBounds:nxt,isContinuous:UH,Rect:rxt,motion:lxt,applyShapeStyle:cxt,getShapeStyle:lw}=Rd._ModuleSupport,CD=class extends Rd._ModuleSupport.AbstractBarSeries{constructor(t){super({moduleCtx:t,directionKeys:oxt,directionNames:axt,categoryKey:void 0,pickModes:[VH.NEAREST_NODE,VH.EXACT_SHAPE_MATCH],pathsPerSeries:["connector"],hasHighlightedLabels:!0,pathsZIndexSubOrderOffset:[-1,-1],animationResetFns:{datum:txt,label:ixt}}),this.properties=new sc,this.seriesItemTypes=new Set(["positive","negative","total"])}async processData(t){const{xKey:e,yKey:i,totals:s}=this.properties,{data:o=[]}=this;if(!this.properties.isValid()||!this.visible)return;const a=b=>UH(b)&&Number(b)>=0,n=b=>UH(b)&&Number(b)>=0,r=b=>b==="total"||b==="subtotal",l={missingValue:void 0,invalidValue:void 0},c=[],h=s.reduce((b,S)=>{const M=b.get(S.index);return M?M.push(S):b.set(S.index,[S]),b},new Map);o.forEach((b,S)=>{c.push(b),h.get(S)?.forEach(M=>c.push({...M.toJson(),[e]:M.axisLabel}))});const u=[];this.ctx.animationManager.isSkipped()||u.push(sxt());const d=this.getCategoryAxis()?.scale,p=this.getValueAxis()?.scale,{isContinuousX:g,xScaleType:f,yScaleType:x}=this.getScaleInformation({xScale:d,yScale:p}),{processedData:y}=await this.requestDataModel(t,c,{props:[Kyt(e,f,{id:"xValue"}),TD(i,x,{...l,id:"yCurrent"}),TD(i,x,{...l,missingValue:0,id:"yCurrentTotal"}),TD(i,x,{...l,id:"yCurrentPositive",validation:a}),TD(i,x,{...l,id:"yCurrentNegative",validation:n}),$yt(i,x,{...l,id:"yPrevious"}),WH(i,x,{id:"yRaw"}),WH("totalType","band",{id:"totalTypeValue",missingValue:void 0,validation:r}),...g?[Rd._ModuleSupport.SMALLEST_KEY_INTERVAL,Rd._ModuleSupport.LARGEST_KEY_INTERVAL]:[],...u]});this.smallestDataInterval=y.reduced?.smallestKeyInterval,this.largestDataInterval=y.reduced?.largestKeyInterval,this.updateSeriesItemTypes(),this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i}=this;if(!e||!i)return[];const{keys:[s],values:o}=e.domain;if(t===this.getCategoryDirection()){const a=i.resolveProcessedDataDefById(this,"xValue");if(a?.def.type==="key"&&a?.def.valueType==="category")return s;const n=t===rw.Y,r=this.getCategoryAxis().isReversed();return this.padBandExtent(s,r!==n)}else{const a=i.resolveProcessedDataIndexById(this,"yCurrent"),n=o[a],r=[Math.min(0,n[0]),Math.max(0,n[1])];return Yyt(r)}}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{data:t,dataModel:e,processedData:i}=this,s=this.getCategoryAxis(),o=this.getValueAxis();if(!t||!s||!o||!e||!i)return;const{line:a}=this.properties,n=s.scale,r=o.scale,l=this.getBarDirection()===rw.X,c=this.getBandwidth(s)??10,h=s.isReversed(),u=o.isReversed();if(i.type!=="ungrouped")return;const d={itemId:this.properties.yKey,nodeData:[],labelData:[],pointData:[],scales:this.calculateScaling(),visible:this.visible};if(!this.visible)return d;const p=[],g=e.resolveKeysById(this,"xValue",i),f=e.resolveColumnById(this,"yRaw",i),x=e.resolveColumnById(this,"totalTypeValue",i),y=e.resolveColumnById(this,"yCurrent",i),b=e.resolveColumnById(this,"yPrevious",i),S=e.resolveColumnById(this,"yCurrentTotal",i),M=Zyt(s?.scale,s?.visibleRange,this.smallestDataInterval,this.largestDataInterval);function D(W,F,z){return W||F?{cumulativeValue:S[z],trailingValue:F?T:0}:{cumulativeValue:y[z],trailingValue:b[z]}}function L(W,F,z,U,H){return W?U:F?(U??0)-(H??0):z}let T=0;const{xKey:I,yKey:N,xName:O,yName:R}=this.properties;(i.dataSources.get(this.id)??[]).forEach((W,F)=>{const z=x[F],U=this.isSubtotal(z),H=this.isTotal(z),j=H||U,V=g[F];if(V==null)return;const G=Math.round(n.convert(V)),K=f[F],{cumulativeValue:$,trailingValue:Z}=D(H,U,F);j&&(T=$??0);const Q=Math.round(r.convert($)),q=Math.round(r.convert(Z)),J=L(H,U,K,$,Z),X=(J??0)>=0,st=this.getSeriesItemType(X,z),{strokeWidth:nt,label:dt}=this.getItemConfig(st),ut=X?Q:q,St=X?q:Q,Lt=Math.max(nt,Math.abs(St-ut)),mt={x:l?Math.min(ut,St):G,y:l?G:Math.min(ut,St),width:l?Lt:c,height:l?c:Lt},Jt={x:mt.x+mt.width/2,y:mt.y+mt.height/2},ie=j?Q:q,Kt=Math.floor(a.strokeWidth)%2/2,$t=h?Q:ie,Dt=h?ie:Q;let Gt,te;l?(Gt={x:$t+Kt,y:mt.y},te={x:Dt+Kt,y:mt.y+mt.height}):(Gt={x:mt.x,y:$t+Kt},te={x:mt.x+mt.width,y:Dt+Kt});const Xs={x:h?te.x:Gt.x,y:h?te.y:Gt.y,x2:h?Gt.x:te.x,y2:h?Gt.y:te.y,size:0};p.push(Xs);const fo=st==="subtotal"?"total":st,Mn=this.getLabelText(dt,{itemId:fo,value:J,datum:W,xKey:I,yKey:N,xName:O,yName:R}),Qd={index:F,series:this,itemId:st,datum:W,datumIndex:F,cumulativeValue:$??0,xValue:V,yValue:J,yKey:N,xKey:I,x:mt.x,y:mt.y,width:mt.width,height:mt.height,midPoint:Jt,crisp:M,label:{text:Mn,...Hyt({isUpward:(J??-1)>=0!==u,isVertical:!l,placement:dt.placement,padding:dt.padding,rect:mt})}};d.nodeData.push(Qd),d.labelData.push(Qd)});const B=this.properties.line.enabled;return y!=null&&B&&(d.pointData=p),d}updateSeriesItemTypes(){const{dataModel:t,seriesItemTypes:e,processedData:i}=this;if(!t||!i)return;e.clear();const s=t.resolveProcessedDataIndexById(this,"yCurrentPositive"),o=t.resolveProcessedDataIndexById(this,"yCurrentNegative"),a=t.resolveProcessedDataIndexById(this,"totalTypeValue"),n=i.domain.values[s]??[],r=i.domain.values[o]??[];n.length>0&&e.add("positive"),r.length>0&&e.add("negative");const l=i?.domain.values[a];l&&l.forEach(c=>{(c==="total"||c==="subtotal")&&e.add("total")})}isSubtotal(t){return t==="subtotal"}isTotal(t){return t==="total"}nodeFactory(){return new rxt}getSeriesItemType(t,e){return e??(t?"positive":"negative")}getItemConfig(t){switch(t){case"positive":return this.properties.item.positive;case"negative":return this.properties.item.negative;case"subtotal":case"total":return this.properties.item.total}}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,s=e??[];return i.update(s)}getItemStyle(t,e,i,s){const{id:o,properties:a}=this,n=a.item[i==="subtotal"?"total":i],r=s?a.highlightStyle.item:void 0,{itemStyler:l,fillGradientDefaults:c,fillPatternDefaults:h}=n,{xKey:u,yKey:d}=a,p=lw({fill:r?.fill??n.fill,fillOpacity:r?.fillOpacity??n.fillOpacity,stroke:r?.stroke??n.stroke,strokeWidth:r?.strokeWidth??n.strokeWidth,strokeOpacity:r?.strokeOpacity??n.strokeOpacity,lineDash:r?.lineDash??n.lineDash??[],lineDashOffset:r?.lineDashOffset??n.lineDashOffset,cornerRadius:n.cornerRadius},c,h);if(l!=null){let g=this.cachedDatumCallback(Xyt(t,s?"highlight":"node"),()=>this.callWithContext(l,{seriesId:o,itemId:i,datum:e,xKey:u,yKey:d,highlighted:s,...p}));g=lw(g,c,h),Object.assign(p,g)}return p}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getCategoryDirection()===rw.X,o=this.getShapeFillBBox();e.each((a,n)=>{const r=n.itemId,l=this.getItemStyle(String(n.datumIndex),n.datum,r,i);cxt(a,l,void 0,o),a.visible=s?n.width>0:n.height>0,a.crisp=n.crisp})}updateLabelSelection(t){const{labelData:e,labelSelection:i}=t;if(e.length===0)return i.update([]);const s=e.filter(o=>{const{label:a}=this.getItemConfig(o.itemId);return a.enabled});return i.update(s)}updateLabelNodes(t){t.labelSelection.each((e,i)=>{qyt(e,this.getItemConfig(i.itemId).label,i.label)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{xKey:a,xName:n,yKey:r,yName:l,tooltip:c}=o,h=this.getCategoryAxis(),u=this.getValueAxis();if(!i||!s||!h||!u)return;const d=s.dataSources.get(this.id)?.[t],p=i.resolveKeysById(this,"xValue",s)[t],g=i.resolveColumnById(this,"yRaw",s)[t],f=i.resolveColumnById(this,"yCurrentTotal",s),x=i.resolveColumnById(this,"totalTypeValue",s);if(p==null)return;const y=x[t],b=(g??0)>=0,S=this.getSeriesItemType(b,y);let M;if(this.isTotal(y))M=f[t];else if(this.isSubtotal(y)){M=f[t];for(let L=t-1;L>=0;L-=1)if(this.isSubtotal(x[L])){M=M-f[L];break}}else M=g;const D=this.getItemStyle(String(t),d,S,!1);return c.formatTooltip(this.properties,{heading:h.formatDatum(p),symbol:this.legendItemSymbol(S),data:[{label:l,fallbackLabel:r,value:u.formatDatum(M)}]},{seriesId:e,datum:d,title:l,itemId:S,xKey:a,xName:n,yKey:r,yName:l,...D})}legendItemSymbol(t){const{fill:e,stroke:i,fillOpacity:s,strokeOpacity:o,strokeWidth:a,lineDash:n,lineDashOffset:r,fillGradientDefaults:l,fillPatternDefaults:c}=this.getItemConfig(t);return{marker:lw({fill:e,stroke:i,fillOpacity:s,strokeOpacity:o,strokeWidth:a,lineDash:n,lineDashOffset:r},l,c)}}getLegendData(t){if(t!=="category")return[];const{id:e,seriesItemTypes:i}=this,s=[],o=n=>n.charAt(0).toUpperCase()+n.substring(1),{showInLegend:a}=this.properties;return i.forEach(n=>{const{name:r}=this.getItemConfig(n);s.push({legendType:"category",id:e,itemId:n,seriesId:e,enabled:!0,label:{text:r??o(n)},symbol:this.legendItemSymbol(n),hideInLegend:!a,isFixed:!0})}),s}toggleSeriesItem(){}animateEmptyUpdateReady(t){const{datumSelection:e,labelSelection:i,contextData:s}=t,o=Qyt(Jyt(this.isVertical(),this.axes,"normal"));lxt.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],o),ext(this,"labels",this.ctx.animationManager,i);const{pointData:a}=s;a&&(this.isVertical()?this.animateConnectorLinesVertical(t):this.animateConnectorLinesHorizontal(t))}animateConnectorLinesHorizontal(t){const{pointData:e=[]}=t.contextData,[i]=t.paths,{path:s}=i;this.updateLineNode(i);const o=this.getValueAxis(),a=o?.isReversed(),n=a?(h,u)=>h<u:(h,u)=>h>u,r=o?.scale.convert(0),l=e.reduce((h,u)=>(n(u.x,h)&&(h=u.x),h),a?1/0:0),c=(h,u,d,p,g)=>(h-u)/(d-u)*(g-p)+p;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:r,to:l,ease:Rd._ModuleSupport.Motion.easeOut,collapsable:!1,onUpdate(h){s.clear(!0),e.forEach((u,d)=>{const p=c(h,r,l,r,u.x),g=c(h,r,l,r,u.x2);d!==0&&s.lineTo(p,u.y),s.moveTo(g,u.y2)}),i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(t)})}animateConnectorLinesVertical(t){const{pointData:e=[]}=t.contextData,[i]=t.paths,{path:s}=i;this.updateLineNode(i);const o=this.getValueAxis(),a=o?.isReversed(),n=a?(h,u)=>h>u:(h,u)=>h<u,r=o?.scale.convert(0),l=e.reduce((h,u)=>(n(u.y,h)&&(h=u.y),h),a?0:1/0),c=(h,u,d,p,g)=>(h-u)/(d-u)*(g-p)+p;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:r,to:l,ease:Rd._ModuleSupport.Motion.easeOut,collapsable:!1,onUpdate(h){s.clear(!0),e.forEach((u,d)=>{const p=c(h,r,l,r,u.y),g=c(h,r,l,r,u.y2);d!==0&&s.lineTo(u.x,p),s.moveTo(u.x2,g)}),i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(t)})}animateReadyResize(t){super.animateReadyResize(t),this.resetConnectorLinesPath(t)}updatePaths(t){this.resetConnectorLinesPath({contextData:t.contextData,paths:t.paths})}resetConnectorLinesPath({contextData:t,paths:e}){if(e.length===0)return;const[i]=e;this.updateLineNode(i);const{path:s}=i;s.clear(!0);const{pointData:o}=t;o&&(o.forEach((a,n)=>{n!==0&&s.lineTo(a.x,a.y),s.moveTo(a.x2,a.y2)}),i.checkPathDirty())}updateLineNode(t){const{stroke:e,strokeWidth:i,strokeOpacity:s,lineDash:o,lineDashOffset:a}=this.properties.line;t.setProperties({fill:void 0,stroke:e,strokeWidth:this.getStrokeWidth(i),strokeOpacity:s,lineDash:o,lineDashOffset:a,lineJoin:"round",pointerEvents:Rd._ModuleSupport.PointerEvents.None})}isLabelEnabled(){const{positive:t,negative:e,total:i}=this.properties.item;return t.label.enabled||e.label.enabled||i.label.enabled}onDataChange(){}computeFocusBounds({datumIndex:t}){return nxt(this,this.contextNodeData?.nodeData[t])}};CD.className="WaterfallSeries",CD.type="waterfall";var hxt=(E(),C(w)),Te=(P(),C(et)),{commonSeriesOptionsDefs:uxt,seriesLabelOptionsDefs:dxt,shadowOptionsDefs:pxt,tooltipOptionsDefs:HH}=hxt._ModuleSupport,cw={name:Te.string,cornerRadius:Te.positiveNumber,itemStyler:Te.callback,label:{...dxt,padding:Te.positiveNumber,placement:(0,Te.union)("inside-start","inside-center","inside-end","outside-start","outside-end")},tooltip:HH,shadow:pxt,...Te.fillOptionsDef,...Te.strokeOptionsDef,...Te.lineDashOptionsDef},gxt={type:(0,Te.required)((0,Te.constant)("waterfall")),xKey:(0,Te.required)(Te.string),yKey:(0,Te.required)(Te.string),xName:Te.string,yName:Te.string,direction:(0,Te.union)("horizontal","vertical"),totals:(0,Te.arrayOfDefs)({totalType:(0,Te.required)((0,Te.union)("total","subtotal")),index:(0,Te.required)(Te.positiveNumber),axisLabel:(0,Te.required)(Te.string)},"a total definition options array"),showInMiniChart:Te.boolean,item:{positive:cw,negative:cw,total:cw},line:{enabled:Te.boolean,...Te.strokeOptionsDef,...Te.lineDashOptionsDef},tooltip:HH,...uxt},fxt=(E(),C(w));function hw(t,e){return{fill:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$path:[`./${e}`,{$palette:"fill"},{$palette:"fills"}]},{$palette:`${t}.fill`}]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$if:[{$or:[{$isGradient:[{$palette:`${t}.fill`}]},{$isPattern:[{$palette:`${t}.fill`}]}]},{$map:[{$path:["./color",void 0,{$value:"$1"}]},{$path:["./colorStops",void 0,{$palette:`${t}.fill`}]}]},[{$mix:[{$palette:`${t}.fill`},"black",.15]},{$mix:[{$palette:`${t}.fill`},"white",.15]}]]},rotation:0,reverse:!1},fillPatternDefaults:fxt._ModuleSupport.FILL_PATTERN_DEFAULTS,stroke:{$palette:`${t}.stroke`},strokeWidth:0,label:{enabled:!1,fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},formatter:void 0,placement:"outside-end"}}}var mxt={series:{item:{positive:hw("altUp",0),negative:hw("altDown",1),total:hw("neutral",2)},line:{stroke:{$palette:"neutral.stroke"},strokeOpacity:1,lineDash:[0],lineDashOffset:0,strokeWidth:2}},legend:{enabled:!0,toggleSeries:!1}},yxt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"waterfall",solo:!0,moduleFactory:t=>new CD(t),tooltipDefaults:{range:"exact"},defaultAxes:Nyt._ModuleSupport.DIRECTION_SWAP_AXES,themeTemplate:mxt},YH={type:"series",name:"waterfall",chartType:"cartesian",enterprise:!0,options:gxt,create:t=>new CD(t)},{NewAreaSeriesModule:xxt,NewBarSeriesModule:bxt,NewBubbleSeriesModule:Sxt,NewHistogramSeriesModule:vxt,NewLineSeriesModule:Mxt,NewScatterSeriesModule:Dxt,numberFormatValidator:kxt,without:_a}=vpt._ModuleSupport,KH={width:Me.positiveNumber,height:Me.positiveNumber,grip:Me.boolean,fill:Me.color,stroke:Me.color,strokeWidth:Me.positiveNumber,cornerRadius:Me.positiveNumber},Ra=["cursor","highlightStyle","listeners","nodeClickRange","showInLegend","showInMiniChart","tooltip","visible","xName","yName"],Axt={enabled:Me.boolean,height:Me.positiveNumber,spacing:Me.positiveNumber,cornerRadius:Me.number,mask:{fill:Me.color,fillOpacity:Me.ratio,stroke:Me.color,strokeWidth:Me.positiveNumber},minHandle:KH,maxHandle:KH,miniChart:{enabled:Me.boolean,padding:{top:Me.positiveNumber,bottom:Me.positiveNumber},label:{enabled:Me.boolean,avoidCollisions:Me.boolean,spacing:Me.positiveNumber,format:kxt,formatter:Me.callback,interval:{minSpacing:Me.positiveNumber,maxSpacing:Me.positiveNumber,values:Me.array,step:Me.number},...Me.fontOptionsDef},series:(0,Me.arrayOf)((0,Me.typeUnion)({area:_a(xxt.options,Ra),bar:_a(bxt.options,[...Ra,"errorBar","label","legendItemName","direction"]),"box-plot":_a(kU.options,[...Ra,"direction","legendItemName","minName","q1Name","medianName","q3Name","maxName"]),bubble:_a(Sxt.options,[...Ra,"title","label","labelKey","labelName","sizeName"]),candlestick:_a(WU.options,Ra),heatmap:_a(iH.options,[...Ra,"title","label","colorName","textAlign","verticalAlign","itemPadding","colorRange"]),histogram:_a(vxt.options,[...Ra,"label"]),line:_a(Mxt.options,[...Ra,"errorBar","title","label"]),ohlc:_a(aH.options,Ra),"range-area":_a(AH.options,[...Ra,"label","yLowName","yHighName"]),"range-bar":_a(BH.options,[...Ra,"direction","label","yLowName","yHighName"]),scatter:_a(Dxt.options,[...Ra,"errorBar","title","label","labelKey","labelName"]),waterfall:_a(YH.options,[...Ra,"direction"])}))}},Ixt={type:"plugin",name:"annotations",chartType:"cartesian",options:hx,create(){return null}},Txt={type:"plugin",name:"navigator",chartType:"cartesian",options:Axt,create(){return null}},Cxt={type:"plugin",name:"initialState",options:Spt,create(){return null}},Lxt=(E(),C(w)),Nxt=(E(),C(w)),Oxt=(P(),C(et)),$H=(E(),C(w)),wxt=(P(),C(et));function XH(t,e,i){i||(e=Ext(e));const s=new Map;for(const a of t)s.set(a.id,{datum:a,linksBefore:[],linksAfter:[],maxPathLengthBefore:-1,maxPathLengthAfter:-1});let o=0;return s.forEach((a,n)=>{o=Math.max(o,uw(s,e,a,n,-1,[])+uw(s,e,a,n,1,[])+1)}),{links:e,nodeGraph:s,maxPathLength:o}}function ZH(t,e,i,s){const o=s.indexOf(e);if(o!==-1){for(let n=o;n<s.length;n+=1)i.add(s[n]);return}s.push(e);const{toNode:a}=e;for(const n of t)n.fromNode===a&&ZH(t,n,i,s);s.pop()}function Ext(t){const e=new Set;for(const i of t)ZH(t,i,e,[]);return e.size!==0&&wxt.Logger.warnOnce("Some links formed circular references. These will be removed from the output."),e.size===0?t:t.filter(i=>!e.has(i))}function uw(t,e,i,s,o,a){if(a.includes(s))return 1/0;let n=o===-1?i.maxPathLengthBefore:i.maxPathLengthAfter;if(n===-1){n=0;const r=o===-1?i.linksBefore:i.linksAfter;for(const l of e){const{fromNode:c,toNode:h}=l,u=o===-1?h.id:c.id,d=o===-1?c.id:h.id,p=s===u?t.get(d):void 0;p!=null&&(r.push({node:p,link:l}),a?.push(s),n=Math.max(n,uw(t,e,p,d,o,a)+1),a?.pop())}o===-1?i.maxPathLengthBefore=n:i.maxPathLengthAfter=n}return n}var{Series:_xt,DataController:Rxt,keyProperty:Pxt,valueProperty:LD,Selection:Bd,Group:cf,TransformableText:Bxt}=$H._ModuleSupport,zxt=class extends $H._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s);const{datumIndex:o}=i,a=s.contextNodeData?.nodeData.find(n=>n.datumIndex.type===o.type&&n.datumIndex.index===o.index);this.size=a?.size,this.label=a?.type===1?a?.label:void 0}},qH=class extends _xt{constructor(){super(...arguments),this.NodeEvent=zxt,this._chartNodes=void 0,this.nodeCount=0,this.linkCount=0,this.linksDataModel=void 0,this.linksProcessedData=void 0,this.nodesDataModel=void 0,this.nodesProcessedData=void 0,this.processedNodes=new Map,this.linkGroup=this.contentGroup.appendChild(new cf({name:"linkGroup"})),this.nodeGroup=this.contentGroup.appendChild(new cf({name:"nodeGroup"})),this.focusLinkGroup=this.highlightNode.appendChild(new cf({name:"linkGroup"})),this.focusNodeGroup=this.highlightNode.appendChild(new cf({name:"nodeGroup"})),this.highlightLinkGroup=this.highlightNode.appendChild(new cf({name:"linkGroup"})),this.highlightNodeGroup=this.highlightNode.appendChild(new cf({name:"nodeGroup"})),this.labelSelection=Bd.select(this.labelGroup,Bxt),this.linkSelection=Bd.select(this.linkGroup,()=>this.linkFactory()),this.nodeSelection=Bd.select(this.nodeGroup,()=>this.nodeFactory()),this.focusLinkSelection=Bd.select(this.focusLinkGroup,()=>this.linkFactory()),this.focusNodeSelection=Bd.select(this.focusNodeGroup,()=>this.nodeFactory()),this.highlightLinkSelection=Bd.select(this.highlightLinkGroup,()=>this.linkFactory()),this.highlightNodeSelection=Bd.select(this.highlightNodeGroup,()=>this.nodeFactory())}get nodes(){return this.properties.nodes??this._chartNodes}setChartNodes(t){this._chartNodes=t,this.nodes===t&&(this.nodeDataRefresh=!0)}async processData(t){const{data:e,nodes:i}=this;if(e==null||!this.properties.isValid())return;const{fromKey:s,toKey:o,sizeKey:a,idKey:n,labelKey:r}=this.properties,l=new Rxt("standalone",t.suppressFieldDotNotation),c=i!=null?l.request(this.id,i,{props:[Pxt(n,void 0,{id:"idValue",includeProperty:!1}),...r!=null?[LD(r,void 0,{id:"labelValue",includeProperty:!1})]:[]],groupByKeys:!0}):null,h=t.request(this.id,e,{props:[LD(s,void 0,{id:"fromValue",includeProperty:!1}),LD(o,void 0,{id:"toValue",includeProperty:!1}),...a!=null?[LD(a,void 0,{id:"sizeValue",includeProperty:!1,missingValue:0})]:[]],groupByKeys:!1});i!=null&&l.execute();const[u,d]=await Promise.all([c,h]);this.nodesDataModel=u?.dataModel,this.nodesProcessedData=u?.processedData,this.linksDataModel=d?.dataModel,this.linksProcessedData=d?.processedData;const p=new Map;if(u==null){const g=d.dataModel.resolveColumnById(this,"fromValue",d.processedData),f=d.dataModel.resolveColumnById(this,"toValue",d.processedData),x=y=>{const b=p.size;return{series:this,itemId:void 0,datum:{},datumIndex:{type:1,index:b},type:1,index:b,linksBefore:[],linksAfter:[],id:y,size:0,label:y}};d.processedData.dataSources.get(this.id)?.forEach((y,b)=>{const S=g[b],M=f[b];S==null||M==null||(p.has(S)||p.set(S,x(S)),p.has(M)||p.set(M,x(M)))})}else{const g=u.dataModel.resolveColumnById(this,"idValue",u.processedData),f=r!=null?u.dataModel.resolveColumnById(this,"labelValue",u.processedData):void 0;u.processedData.dataSources.get(this.id)?.forEach((x,y)=>{const b=g[y],S=f?.[y];p.set(b,{series:this,itemId:void 0,datum:x,datumIndex:{type:1,index:y},type:1,index:y,linksBefore:[],linksAfter:[],id:b,size:0,label:S})})}this.processedNodes=p}getNodeGraph(t,e,{includeCircularReferences:i}){const{linksDataModel:s,linksProcessedData:o}=this;if(s==null||o==null){const{links:g,nodeGraph:f,maxPathLength:x}=XH(new Map().values(),[],i);return this.nodeCount=0,this.linkCount=0,{nodeGraph:f,links:g,maxPathLength:x}}const{sizeKey:a}=this.properties,n=s.resolveColumnById(this,"fromValue",o),r=s.resolveColumnById(this,"toValue",o),l=a!=null?s.resolveColumnById(this,"sizeValue",o):void 0,c=new Map;this.processedNodes.forEach(g=>{const f=t(g);c.set(g.id,f)});const h=[];o.dataSources.get(this.id)?.forEach((g,f)=>{const x=n[f],y=r[f],b=l!=null?l[f]:1,S=c.get(x),M=c.get(y);if(b<=0||S==null||M==null)return;const D=e({series:this,itemId:void 0,datum:g,datumIndex:{type:0,index:f},type:0,index:f,fromNode:S,toNode:M,size:b});h.push(D)});const{links:u,nodeGraph:d,maxPathLength:p}=XH(c.values(),h,i);return d.forEach(g=>{g.datum.linksBefore=g.linksBefore.map(f=>f.link),g.datum.linksAfter=g.linksAfter.map(f=>f.link)}),this.nodeCount=d.size,this.linkCount=u.length,{nodeGraph:d,links:u,maxPathLength:p}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(t){const{seriesRect:e}=t,i={seriesRectWidth:e?.width??0,seriesRectHeight:e?.height??0};(this._nodeDataDependencies==null||this._nodeDataDependencies.seriesRectWidth!==i.seriesRectWidth||this._nodeDataDependencies.seriesRectHeight!==i.seriesRectHeight)&&(this._nodeDataDependencies=i),this.updateSelections();const s=this.contextNodeData?.nodeData??[],o=this.contextNodeData?.labelData??[];let a=this.ctx.highlightManager?.getActiveHighlight();if(a?.series===this&&a.type==null){const{itemId:h}=a;a=h!=null?s.find(u=>u.type===1&&u.id===h):void 0}else a?.series!==this&&(a=void 0);this.contentGroup.visible=this.visible,this.contentGroup.opacity=a!=null?this.properties.highlightStyle.series.dimOpacity??1:1,this.labelSelection=this.updateLabelSelection({labelData:o,labelSelection:this.labelSelection}),this.updateLabelNodes({labelSelection:this.labelSelection}),this.linkSelection=this.updateLinkSelection({nodeData:s.filter(h=>h.type===0),datumSelection:this.linkSelection}),this.updateLinkNodes({datumSelection:this.linkSelection,isHighlight:!1}),this.nodeSelection=this.updateNodeSelection({nodeData:s.filter(h=>h.type===1),datumSelection:this.nodeSelection}),this.updateNodeNodes({datumSelection:this.nodeSelection,isHighlight:!1});let n,r,l,c;a?.type===1?(n=s.filter(h=>h.type===0&&(h.toNode===a||h.fromNode===a)),r=n.map(h=>h.fromNode===a?h.toNode:h.fromNode),r.push(a),l=[],c=[a]):a?.type===0?(n=[a],r=[a.fromNode,a.toNode],l=[a],c=[]):(n=[],r=[],l=[],c=[]),this.focusLinkSelection=this.updateLinkSelection({nodeData:n,datumSelection:this.focusLinkSelection}),this.updateLinkNodes({datumSelection:this.focusLinkSelection,isHighlight:!1}),this.focusNodeSelection=this.updateNodeSelection({nodeData:r,datumSelection:this.focusNodeSelection}),this.updateNodeNodes({datumSelection:this.focusNodeSelection,isHighlight:!1}),this.highlightLinkSelection=this.updateLinkSelection({nodeData:l,datumSelection:this.highlightLinkSelection}),this.updateLinkNodes({datumSelection:this.highlightLinkSelection,isHighlight:!0}),this.highlightNodeSelection=this.updateNodeSelection({nodeData:c,datumSelection:this.highlightNodeSelection}),this.updateNodeNodes({datumSelection:this.highlightNodeSelection,isHighlight:!0})}resetAnimation(t){}getSeriesDomain(t){return[]}getSeriesRange(t,e){return[NaN,NaN]}legendItemSymbol(t,e,i={}){const{fills:s,strokes:o}=this.properties,{fill:a=s[e%s.length],fillOpacity:n=1,stroke:r=o[e%o.length],strokeWidth:l=0,strokeOpacity:c=1,lineDash:h=[0],lineDashOffset:u=0}=i;return{marker:{fill:a,fillOpacity:n,stroke:r,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}}}getLegendData(t){if(t!=="category")return[];const{showInLegend:e}=this.properties;return Array.from(this.processedNodes.values(),({id:i,label:s},o)=>({legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:!0,label:{text:s??i},symbol:this.legendItemSymbol(1,o),hideInLegend:!e,isFixed:!0}))}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.linkSelection.each((o,a)=>{const n=o.containsPoint(t,e)?0:1/0;n<i&&(i=n,s=a)}),this.nodeSelection.each((o,a)=>{const n=o.distanceSquared(t,e);n<i&&(i=n,s=a)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}getDatumAriaText(t,e){if(t.type===0)return this.ctx.localeManager.t("ariaAnnounceFlowProportionLink",{index:t.index+1,count:this.linkCount,from:t.fromNode.id,to:t.toNode.id,size:t.size,sizeName:this.properties.sizeName??this.properties.sizeKey});if(t.type===1)return this.ctx.localeManager.t("ariaAnnounceFlowProportionNode",{index:t.index+1,count:this.nodeCount,description:e})}pickFocus(t){const{datumIndexDelta:e,otherIndexDelta:i}=t,s=this.contextNodeData?.nodeData[t.datumIndex-t.datumIndexDelta];let o=s;if(i!==0||e===0)return;if(s?.type===0){const r=Array.from(this.linkSelection,h=>h.datum),c=r.indexOf(s)+e;if(c>=0&&c<r.length)o=r[c];else if(c>0)o=r[r.length-1];else{const h=Array.from(this.nodeSelection,u=>u.datum);o=h[h.length-1]}}else if(s?.type===1){const r=Array.from(this.nodeSelection,h=>h.datum),c=r.indexOf(s)+e;c>=0&&c<r.length?o=r[c]:c<0?o=r[0]:o=Array.from(this.linkSelection,u=>u.datum)[0]}if(o==null)return;const a=o.type===1?Array.from(this.nodeSelection).find(r=>r.datum===o):Array.from(this.linkSelection).find(r=>r.datum===o);if(a==null)return;const n=this.computeFocusBounds(a.node);if(n!=null)return{datum:a.datum,datumIndex:this.contextNodeData?.nodeData.indexOf(a.datum)??0,otherIndex:0,bounds:n,clipFocusBox:!0}}getCategoryValue(t){}datumIndexForCategoryValue(t){}},Fxt=(E(),C(w)),{BBox:Gxt,Path:jxt,ScenePathChangeDetection:Mh}=Fxt._ModuleSupport;function ND({radius:t,startAngle:e,endAngle:i,tension:s}){const o=t*Math.cos(e),a=t*Math.sin(e),n=t*Math.cos(i),r=t*Math.sin(i),l=o*s,c=a*s,h=n*s,u=r*s;return{x:[o,l,h,n],y:[a,c,u,r]}}var oc=class extends jxt{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.radius=0,this.startAngle1=0,this.endAngle1=0,this.startAngle2=0,this.endAngle2=0,this.tension=1}computeBBox(){const{centerX:t,centerY:e,radius:i,startAngle1:s,endAngle1:o,startAngle2:a,endAngle2:n,tension:r}=this,l=ND({radius:i,startAngle:s,endAngle:n,tension:r}),c=ND({radius:i,startAngle:a,endAngle:o,tension:r}),h=Math.min(...l.x,...c.x),u=Math.max(...l.x,...c.x)-h,d=Math.min(...l.y,...c.y),p=Math.max(...l.y,...c.y)-d;return new Gxt(t+h,e+d,u,p)}isPointInPath(t,e){return super.isPointInPath(t,e)&&this.getBBox().containsPoint(t,e)}tensionedCurveTo(t,e,i,s,o,a,n,r){const{path:l,tension:c}=this,h=1-c;l.cubicCurveTo((i-t)*h+t,(s-e)*h+e,(o-n)*h+n,(a-r)*h+r,n,r)}updatePath(){const{path:t,centerX:e,centerY:i,radius:s}=this;let{startAngle1:o,endAngle1:a,startAngle2:n,endAngle2:r}=this;o>n&&([o,n]=[n,o],[a,r]=[r,a]),t.clear();const l=e+s*Math.cos(o),c=i+s*Math.sin(o);t.moveTo(l,c),this.tensionedCurveTo(l,c,e,i,e,i,e+s*Math.cos(r),i+s*Math.sin(r)),t.arc(e,i,s,r,n,!0),this.tensionedCurveTo(e+s*Math.cos(n),i+s*Math.sin(n),e,i,e,i,e+s*Math.cos(a),i+s*Math.sin(a)),t.arc(e,i,s,a,o,!0),t.closePath()}};m([Mh()],oc.prototype,"centerX",2),m([Mh()],oc.prototype,"centerY",2),m([Mh()],oc.prototype,"radius",2),m([Mh()],oc.prototype,"startAngle1",2),m([Mh()],oc.prototype,"endAngle1",2),m([Mh()],oc.prototype,"startAngle2",2),m([Mh()],oc.prototype,"endAngle2",2),m([Mh()],oc.prototype,"tension",2);var Vxt=(E(),C(w)),{FillGradientDefaults:Wxt,FillPatternDefaults:Uxt,BaseProperties:QH,SeriesTooltip:Hxt,SeriesProperties:Yxt,ARRAY:Kxt,ARRAY_OF:$xt,COLOR_STRING:Nx,COLOR_STRING_ARRAY:Xxt,FUNCTION:JH,LINE_DASH:tY,OBJECT:hf,POSITIVE_NUMBER:Dh,RATIO:Ox,STRING:kh,OR:dw,COLOR_GRADIENT:pw,TempValidate:Yt,COLOR_PATTERN:gw,Label:Zxt}=Vxt._ModuleSupport,fw=class extends Zxt{constructor(){super(...arguments),this.spacing=1,this.maxWidth=1}};m([Yt(Dh)],fw.prototype,"spacing",2),m([Yt(Dh)],fw.prototype,"maxWidth",2);var Qr=class extends QH{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0,this.tension=0}};m([Yt(dw(pw,Nx,gw),{optional:!0})],Qr.prototype,"fill",2),m([Yt(Ox)],Qr.prototype,"fillOpacity",2),m([Yt(Nx,{optional:!0})],Qr.prototype,"stroke",2),m([Yt(Ox)],Qr.prototype,"strokeOpacity",2),m([Yt(Dh)],Qr.prototype,"strokeWidth",2),m([Yt(tY)],Qr.prototype,"lineDash",2),m([Yt(Dh)],Qr.prototype,"lineDashOffset",2),m([Yt(Ox)],Qr.prototype,"tension",2),m([Yt(JH,{optional:!0})],Qr.prototype,"itemStyler",2);var Qn=class extends QH{constructor(){super(...arguments),this.spacing=1,this.width=1,this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};m([Yt(Dh)],Qn.prototype,"spacing",2),m([Yt(Dh)],Qn.prototype,"width",2),m([Yt(dw(pw,Nx,gw),{optional:!0})],Qn.prototype,"fill",2),m([Yt(Ox)],Qn.prototype,"fillOpacity",2),m([Yt(Nx,{optional:!0})],Qn.prototype,"stroke",2),m([Yt(Ox)],Qn.prototype,"strokeOpacity",2),m([Yt(Dh)],Qn.prototype,"strokeWidth",2),m([Yt(tY)],Qn.prototype,"lineDash",2),m([Yt(Dh)],Qn.prototype,"lineDashOffset",2),m([Yt(JH,{optional:!0})],Qn.prototype,"itemStyler",2);var ws=class extends Yxt{constructor(){super(...arguments),this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.nodes=void 0,this.fillGradientDefaults=new Wxt,this.fillPatternDefaults=new Uxt,this.fills=[],this.strokes=[],this.label=new fw,this.link=new Qr,this.node=new Qn,this.tooltip=new Hxt}};m([Yt(kh)],ws.prototype,"fromKey",2),m([Yt(kh)],ws.prototype,"toKey",2),m([Yt(kh)],ws.prototype,"idKey",2),m([Yt(kh,{optional:!0})],ws.prototype,"idName",2),m([Yt(kh,{optional:!0})],ws.prototype,"labelKey",2),m([Yt(kh,{optional:!0})],ws.prototype,"labelName",2),m([Yt(kh,{optional:!0})],ws.prototype,"sizeKey",2),m([Yt(kh,{optional:!0})],ws.prototype,"sizeName",2),m([Yt(Kxt,{optional:!0})],ws.prototype,"nodes",2),m([Yt(hf)],ws.prototype,"fillGradientDefaults",2),m([Yt(hf)],ws.prototype,"fillPatternDefaults",2),m([Yt($xt(dw(pw,Nx,gw)))],ws.prototype,"fills",2),m([Yt(Xxt)],ws.prototype,"strokes",2),m([Yt(hf)],ws.prototype,"label",2),m([Yt(hf)],ws.prototype,"link",2),m([Yt(hf)],ws.prototype,"node",2),m([Yt(hf)],ws.prototype,"tooltip",2);var{SeriesNodePickMode:eY,CachedTextMeasurerPool:qxt,TextWrapper:Qxt,TextUtils:Jxt,createDatumId:OD,angleBetween:wD,normalizeAngle360:tbt,isBetweenAngles:iY,Sector:ebt,evaluateBezier:ED,applyShapeStyle:sY,getShapeStyle:_D,BBox:ibt}=Nxt._ModuleSupport,RD=t=>t.startAngle+wD(t.startAngle,t.endAngle)/2,PD=class extends qH{constructor(t){super({moduleCtx:t,pickModes:[eY.NEAREST_NODE,eY.EXACT_SHAPE_MATCH]}),this.properties=new ws}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new oc}nodeFactory(){return new ebt}createNodeData(){const{id:t,_nodeDataDependencies:{seriesRectWidth:e,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:s,toKey:o,sizeKey:a,label:{spacing:n,maxWidth:r,fontSize:l},node:{width:c,spacing:h}}=this.properties,u=e/2,d=i/2;let p=[];const{nodeGraph:g,links:f}=this.getNodeGraph(B=>({...B,centerX:u,centerY:d,innerRadius:NaN,outerRadius:NaN,startAngle:NaN,endAngle:NaN}),B=>({...B,centerX:u,centerY:d,radius:NaN,startAngle1:NaN,endAngle1:NaN,startAngle2:NaN,endAngle2:NaN}),{includeCircularReferences:!0});let x=0;g.forEach(({datum:B,linksBefore:W,linksAfter:F},z)=>{const U=W.reduce((H,{link:j})=>H+j.size,0)+F.reduce((H,{link:j})=>H+j.size,0);if(U===0)g.delete(z);else{B.size=U,x+=B.size;const H=this.getLabelText(this.properties.label,{datum:B.datum,value:B.label,fromKey:s,toKey:o,sizeKey:a,size:B.size});B.label=String(H)}});let y=0;if(this.isLabelEnabled()){const B=this.properties.label.getFont();let W=0;g.forEach(({datum:F})=>{const{id:z,label:U}=F;if(U==null)return;const H=Qxt.wrapText(U,{maxWidth:r,font:this.properties.label,textWrap:"never"}),{width:j}=qxt.measureText(H,{font:B,textAlign:"left",textBaseline:"middle"});W=Math.max(j,W),p.push({id:z,text:H,centerX:u,centerY:d,angle:NaN,radius:NaN})}),y=W+n}const b=g.size;let S=Math.min(e,i)/2-c-y,M=h/S;if(y!==0&&(b*M>=1.5*Math.PI||S<=0)&&(p=[],S=Math.min(e,i)/2-c,M=h/S),b*M>=2*Math.PI||S<=0){Oxt.Logger.warnOnce("There was insufficient space to display the Chord Series.");return}const D=S,L=S+c,T=Math.max((2*Math.PI-b*M)/x,0);let I=0;g.forEach(({datum:B})=>{B.innerRadius=D,B.outerRadius=L,B.startAngle=I,B.endAngle=I+B.size*T,I=B.endAngle+M;const W=(B.innerRadius+B.outerRadius)/2,F=RD(B);B.midPoint={x:B.centerX+W*Math.cos(F),y:B.centerY+W*Math.sin(F)}});const N=[];g.forEach(({datum:B,linksBefore:W,linksAfter:F})=>{const z=RD(B),U=[...W.map(j=>({link:j.link,distance:wD(RD(j.node.datum),z),after:!1})),...F.map(j=>({link:j.link,distance:wD(RD(j.node.datum),z),after:!0}))];let H=B.startAngle;U.toSorted((j,V)=>j.distance-V.distance).forEach(({link:j,after:V})=>{const G=j.size*T;V?(j.startAngle1=H,j.endAngle1=H+G):(j.startAngle2=H,j.endAngle2=H+G),H+=j.size*T}),N.push(B)});const{tension:O}=this.properties.link;f.forEach(B=>{B.radius=S;const W=ND({radius:S,startAngle:B.startAngle1,endAngle:B.endAngle2,tension:O}),F=ND({radius:S,startAngle:B.startAngle2,endAngle:B.endAngle1,tension:O}),z=ED(...W.x,.5),U=ED(...W.y,.5),H=ED(...F.x,.5),j=ED(...F.y,.5);B.midPoint={x:B.centerX+(z+H)/2,y:B.centerY+(U+j)/2},N.push(B)}),p.forEach(B=>{const W=g.get(B.id)?.datum;W!=null&&(B.radius=L+n,B.angle=tbt(W.startAngle+wD(W.startAngle,W.endAngle)/2))}),p.sort((B,W)=>B.angle-W.angle);let R=1/0,_=-1/0;return p=p.filter(B=>{const W=Jxt.getLineHeight(l),F=Math.atan2(W/2,B.radius),z=B.angle-F,U=B.angle+F;return iY(R,z,U)||iY(_,z,U)?!1:(R=Math.min(z,R),_=Math.max(U,_),!0)}),{itemId:t,nodeData:N,labelData:p}}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{text:l,centerX:c,centerY:h,radius:u,angle:d})=>{r.visible=!0,r.translationX=c+u*Math.cos(d),r.translationY=h+u*Math.sin(d),r.text=l,r.fill=i,r.fontStyle=s,r.fontWeight=o,r.fontSize=a,r.fontFamily=n,r.textBaseline="middle",Math.cos(d)>=0?(r.textAlign="left",r.rotation=d):(r.textAlign="right",r.rotation=d-Math.PI)})}updateNodeSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>OD([e.type,e.id]))}getBaseNodeStyle(t){const{properties:e}=this,{fill:i,fillOpacity:s,stroke:o,strokeOpacity:a,lineDash:n,lineDashOffset:r}=e.node,l=t?e.highlightStyle.item:void 0;return _D({fill:l?.fill??i,fillOpacity:l?.fillOpacity??s,stroke:l?.stroke??o,strokeOpacity:l?.strokeOpacity??a,strokeWidth:l?.strokeWidth??this.getStrokeWidth(e.node.strokeWidth),lineDash:l?.lineDash??n,lineDashOffset:l?.lineDashOffset??r},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}getNodeStyleOverrides(t,e,i,s,o,a,n){const{id:r,properties:l}=this,{fills:c,strokes:h}=l,{itemStyler:u}=l.node,d=a.fill??c[i%c.length],p=a.stroke??h[i%h.length];let g;if(n||(g??(g={}),g.fill=d,g.stroke=p),u!=null){const f=this.cachedDatumCallback(OD(t,"node",n?"highlight":"node"),()=>{const{fillOpacity:x=1,strokeOpacity:y=1,strokeWidth:b=0,lineDash:S=[],lineDashOffset:M=0}=a;return this.callWithContext(u,{seriesId:r,datum:e,highlighted:n,label:o,size:s,fill:d,fillOpacity:x,stroke:p,strokeOpacity:y,strokeWidth:b,lineDash:S,lineDashOffset:M})});g??(g={}),Object.assign(g,f)}return _D(g,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}updateNodeNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getBaseNodeStyle(i),o=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:r,size:l,label:c}=n,h=this.getNodeStyleOverrides(String(r.index),n.datum,r.index,l,c,s,i);sY(a,s,h,o),a.centerX=n.centerX,a.centerY=n.centerY,a.innerRadius=n.innerRadius,a.outerRadius=n.outerRadius,a.startAngle=n.startAngle,a.endAngle=n.endAngle,a.inset=a.strokeWidth/2})}updateLinkSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>OD([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(t){const{properties:e}=this,{fill:i,fillOpacity:s,stroke:o,strokeOpacity:a,lineDash:n,lineDashOffset:r,tension:l}=e.link,c=t?e.highlightStyle.item:void 0;return _D({fill:c?.fill??i,fillOpacity:c?.fillOpacity??s,stroke:c?.stroke??o,strokeOpacity:c?.strokeOpacity??a,strokeWidth:c?.strokeWidth??this.getStrokeWidth(e.link.strokeWidth),lineDash:c?.lineDash??n,lineDashOffset:c?.lineDashOffset??r,tension:l},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}getLinkStyleOverrides(t,e,i,s,o){const{id:a,properties:n}=this,{fills:r,strokes:l}=n,{itemStyler:c}=n.link,h=s.fill??r[i%r.length],u=s.stroke??l[i%l.length];let d;if(o||(d??(d={}),d.fill=h,d.stroke=u),c!=null){const p=this.cachedDatumCallback(OD(t,"link",o?"highlight":"node"),()=>{const{fillOpacity:g=1,strokeOpacity:f=1,strokeWidth:x=0,lineDash:y=[],lineDashOffset:b=0,tension:S}=s;return this.callWithContext(c,{seriesId:a,datum:e,highlighted:o,tension:S,fill:h,fillOpacity:g,stroke:u,strokeOpacity:f,strokeWidth:x,lineDash:y,lineDashOffset:b})});d??(d={}),Object.assign(d,p)}return _D(d,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}updateLinkNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getBaseLinkStyle(i),o=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:r}=n,l=n.fromNode.datumIndex,c=this.getLinkStyleOverrides(String(r.index),n.datum,l.index,s,i);a.centerX=n.centerX,a.centerY=n.centerY,a.radius=n.radius,a.startAngle1=n.startAngle1,a.endAngle1=n.endAngle1,a.startAngle2=n.startAngle2,a.endAngle2=n.endAngle2,sY(a,s,c,o),a.tension=c?.tension??s.tension})}getShapeFillBBox(){const t=this._nodeDataDependencies?.seriesRectWidth??0,e=this._nodeDataDependencies?.seriesRectHeight??0,i=Math.min(t,e),s=(t-i)/2,o=(e-i)/2,a=new ibt(s,o,t,e);return{series:a,axis:a}}getTooltipContent(t){const{id:e,linksProcessedData:i,nodesProcessedData:s,properties:o}=this,{fromKey:a,toKey:n,sizeKey:r,sizeName:l,tooltip:c}=o,h=this.contextNodeData?.nodeData.find(x=>x.datumIndex.type===t.type&&x.datumIndex.index===t.index);if(h==null)return;const u=h.type===0?h.fromNode.index:h.index,d=h.type===0?`${h.fromNode.label} - ${h.toNode.label}`:h.label,p=t.type===0?i?.dataSources.get(this.id)?.[t.index]:s?.dataSources.get(this.id)?.[t.index],g=h.size;let f;if(h.type===0){const x=h.fromNode.datumIndex,y=this.getBaseLinkStyle(!1);Object.assign(y,this.getLinkStyleOverrides(String(t.index),p,x.index,y,!1)),f=y}else{const x=h.label,y=this.getBaseNodeStyle(!1);Object.assign(y,this.getNodeStyleOverrides(String(t.index),p,t.index,g,x,y,!1)),f=y}return c.formatTooltip(this.properties,{title:d,symbol:this.legendItemSymbol(h.type,u,f),data:r!=null?[{label:l,fallbackLabel:r,value:String(g)}]:[]},{seriesId:e,datum:p,title:d,fromKey:a,toKey:n,sizeKey:r,sizeName:l,size:g,...f})}computeFocusBounds(t){return t}};PD.className="ChordSeries",PD.type="chord";var sbt=(E(),C(w)),Le=(P(),C(et)),{commonSeriesOptionsDefs:obt,seriesLabelOptionsDefs:abt,tooltipOptionsDefs:nbt}=sbt._ModuleSupport,mw={type:(0,Le.required)((0,Le.constant)("chord")),fromKey:(0,Le.required)(Le.string),toKey:(0,Le.required)(Le.string),sizeKey:Le.string,sizeName:Le.string,fills:(0,Le.arrayOf)(Le.colorUnion),strokes:(0,Le.arrayOf)(Le.color),label:{spacing:Le.positiveNumber,maxWidth:Le.positiveNumber,...abt},link:{tension:Le.ratio,itemStyler:Le.callback,...Le.fillOptionsDef,...Le.strokeOptionsDef,...Le.lineDashOptionsDef},node:{width:Le.positiveNumber,spacing:Le.positiveNumber,itemStyler:Le.callback,...Le.fillOptionsDef,...Le.strokeOptionsDef,...Le.lineDashOptionsDef},tooltip:nbt,...obt};mw.fillGradientDefaults=Le.fillGradientDefaults,mw.fillPatternDefaults=Le.fillPatternDefaults;var rbt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"chord",tooltipDefaults:{range:"exact"},moduleFactory:t=>new PD(t),themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Lxt._ModuleSupport.FILL_PATTERN_DEFAULTS,highlightStyle:{series:{dimOpacity:.2}},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:5,maxWidth:100},node:{spacing:8,width:10,strokeWidth:0},link:{fillOpacity:.5,strokeWidth:0,tension:.4}},legend:{enabled:!1,toggleSeries:!1}}},lbt={type:"series",name:"chord",chartType:"flow-proportion",enterprise:!0,options:mw,create:t=>new PD(t)},ZLt=(E(),C(w)),oY=(E(),C(w)),{ThemeConstants:{CARTESIAN_AXIS_TYPE:uf,CARTESIAN_POSITION:df},ThemeSymbols:{DEFAULT_SHADOW_COLOUR:cbt}}=oY._ModuleSupport,aY={$if:[{$eq:[{$path:["/direction",void 0]},"horizontal"]},[{type:uf.NUMBER,position:df.LEFT},{type:uf.CATEGORY,position:{$if:[{$eq:[{$path:["/stageLabel/placement",void 0]},"before"]},df.TOP,df.BOTTOM]},label:{$omit:[["placement"],{$path:["/stageLabel",void 0]}]}}],[{type:uf.CATEGORY,position:{$if:[{$eq:[{$path:["/stageLabel/placement",void 0]},"after"]},df.RIGHT,df.LEFT]},label:{$omit:[["placement"],{$path:["/stageLabel",void 0]}]}},{type:uf.NUMBER,position:df.BOTTOM}]]},hbt={series:{direction:"vertical",strokeWidth:0,spacingRatio:.25,fills:[{$palette:"fill"}],strokes:[{$palette:"stroke"}],fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:oY._ModuleSupport.FILL_PATTERN_DEFAULTS,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},dropOff:{enabled:!0,fillOpacity:.2,strokeWidth:0},shadow:{enabled:!1,color:cbt,xOffset:3,yOffset:3,blur:5}},axes:{[uf.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1,formatter(t){return Math.abs(t.value).toFixed(t.fractionDigits??0)}}},[uf.CATEGORY]:{line:{enabled:!1}}}},ubt=(E(),C(w)),yw=(E(),C(w)),dbt=(E(),C(w)),{lineDistanceSquared:BD,BBox:pbt,Path:gbt,ScenePathChangeDetection:Ah}=dbt._ModuleSupport,nY=1e-6;function rY([t,e],[i,s]){return Math.abs(t-i)<=nY&&Math.abs(e-s)<=nY}var Jr=class extends gbt{constructor(){super(...arguments),this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0}get midPoint(){const{x0:t,y0:e,x1:i,y1:s,x2:o,y2:a,x3:n,y3:r}=this;return{x:(t+i+o+n)/4,y:(e+s+a+r)/4}}distanceSquared(t,e){if(this.containsPoint(t,e))return 0;const{x0:i,y0:s,x1:o,y1:a,x2:n,y2:r,x3:l,y3:c}=this;return Math.min(BD(t,e,i,s,o,a,1/0),BD(t,e,o,a,n,r,1/0),BD(t,e,n,r,l,c,1/0),BD(t,e,l,c,i,s,1/0))}computeBBox(){const{x0:t,y0:e,x1:i,y1:s,x2:o,y2:a,x3:n,y3:r}=this,l=Math.min(t,i,o,n),c=Math.max(t,i,o,n)-l,h=Math.min(e,s,a,r),u=Math.max(e,s,a,r)-h;return new pbt(l,h,c,u)}updatePath(){const{path:t,x0:e,y0:i,x1:s,y1:o,x2:a,y2:n,x3:r,y3:l}=this,c=[[e,i],[s,o],[a,n],[r,l]];t.clear();let h,u;c.forEach(d=>{if(h!=null&&rY(h,d)||u!=null&&rY(u,d))return;const[p,g]=d;h==null?t.moveTo(p,g):t.lineTo(p,g),h??(h=d),u=d}),t.closePath()}};m([Ah()],Jr.prototype,"x0",2),m([Ah()],Jr.prototype,"y0",2),m([Ah()],Jr.prototype,"x1",2),m([Ah()],Jr.prototype,"y1",2),m([Ah()],Jr.prototype,"x2",2),m([Ah()],Jr.prototype,"y2",2),m([Ah()],Jr.prototype,"x3",2),m([Ah()],Jr.prototype,"y3",2);var fbt=(E(),C(w)),{NODE_UPDATE_STATE_TO_PHASE_MAPPING:mbt}=fbt._ModuleSupport;function lY(t,e,i,s){const{x0:o,y0:a,x1:n,y1:r,x2:l,y2:c,x3:h,y3:u,opacity:d}=t;return i?{x0:(o+h)/2,y0:(a+u)/2,x1:(n+l)/2,y1:(r+c)/2,x2:(n+l)/2,y2:(r+c)/2,x3:(o+h)/2,y3:(a+u)/2,opacity:d}:{x0:(o+n)/2,y0:(a+r)/2,x1:(o+n)/2,y1:(a+r)/2,x2:(l+h)/2,y2:(c+u)/2,x3:(l+h)/2,y3:(c+u)/2,opacity:d}}function ybt(t,e){const i=a=>a==null;return{fromFn:(a,n,r)=>{r==="updated"&&i(n)?r="removed":r==="updated"&&i(a.previousDatum)&&(r="added");let l;r==="added"&&a.previousDatum==null&&e==="fade"?l={...wx(a,n),opacity:0}:r==="unknown"||r==="added"?l=lY(n,a.previousDatum,t,e):l={x0:a.x0,y0:a.y0,x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,x3:a.x3,y3:a.y3,opacity:a.opacity};const c=mbt[r];return{...l,phase:c}},toFn:(a,n,r)=>{let l;return r==="removed"&&a.datum==null&&e==="fade"?l={...wx(a,n),opacity:0}:r==="removed"||i(n)?l=lY(n,a.previousDatum,t,e):l=wx(a,n),l}}}function wx(t,e){const{x0:i,y0:s,x1:o,y1:a,x2:n,y2:r,x3:l,y3:c,opacity:h}=e;return{x0:i,y0:s,x1:o,y1:a,x2:n,y2:r,x3:l,y3:c,opacity:h}}var{SeriesNodePickMode:cY,SeriesZIndexMap:hY,valueProperty:xbt,keyProperty:bbt,ChartAxisDirection:uY,updateLabelNode:Sbt,SMALLEST_KEY_INTERVAL:vbt,LARGEST_KEY_INTERVAL:Mbt,diff:Dbt,fixNumericExtent:kbt,seriesLabelFadeInAnimation:dY,resetMotion:Abt,resetLabelFn:Ibt,animationValidation:Tbt,computeBarFocusBounds:Cbt,ContinuousScale:Lbt,Group:Nbt,Selection:Obt,PointerEvents:pY,motion:wbt,checkCrisp:Ebt,createDatumId:_bt,applyShapeFillBBox:Rbt,getShapeStyle:Pbt,getShapeFill:Bbt}=yw._ModuleSupport,zbt=class extends yw._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.xKey=s.properties.stageKey,this.yKey=s.properties.valueKey}},gY=class extends yw._ModuleSupport.AbstractBarSeries{constructor({moduleCtx:t,animationResetFns:e}){super({moduleCtx:t,pickModes:[cY.AXIS_ALIGNED,cY.EXACT_SHAPE_MATCH],hasHighlightedLabels:!0,directionKeys:{x:["stageKey"],y:["valueKey"]},directionNames:{x:[],y:[]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:e.datum,label:Ibt}}),this.NodeEvent=zbt,this.connectorNodeGroup=this.contentGroup.appendChild(new Nbt({name:`${this.id}-series-connectorNodes`,zIndex:hY.BACKGROUND})),this.connectorSelection=Obt.select(this.connectorNodeGroup,()=>this.connectionFactory()),this.connectorNodeGroup.pointerEvents=pY.None}get pickModeAxis(){return"main-category"}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.connectorNodeGroup.zIndex=[hY.BACKGROUND,t],!0):!1}isVertical(){return!super.isVertical()}connectionFactory(){return new Jr}async processData(t){if(!this.properties.isValid())return;const{stageKey:e,valueKey:i}=this.properties,{visible:s,id:o}=this,a=(g,f,x)=>s&&this.ctx.legendManager.getItemEnabled({seriesId:o,itemId:x}),n=this.getCategoryAxis()?.scale,r=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:n,yScale:r}),u=[];this.ctx.animationManager.isSkipped()||(this.processedData&&u.push(Dbt(this.id,this.processedData)),u.push(Tbt()));const d=this.visible?{}:{forceValue:0},{processedData:p}=await this.requestDataModel(t,this.data,{props:[bbt(e,c,{id:"xValue"}),xbt(i,h,{id:"yValue",...d,validation:a,invalidValue:0}),...l?[vbt,Mbt]:[],...u],groupByKeys:!1});this.smallestDataInterval=p.reduced?.smallestKeyInterval,this.largestDataInterval=p.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(t){const{processedData:e,dataModel:i,id:s,ctx:{legendManager:o}}=this;if(!e||!i)return[];const{keys:[a]}=e.domain;if(t===this.getCategoryDirection()){const n=i.resolveProcessedDataDefById(this,"xValue");return n?.def.type==="key"&&n?.def.valueType==="category"?this.hasData?a.filter((r,l)=>o.getItemEnabled({seriesId:s,itemId:l})):[]:this.padBandExtent(a)}else{const n=this.domainForClippedRange(uY.Y,["yValue"],"xValue",!0),r=Math.max(...n),l=[-r,r];return kbt(l)}}getSeriesRange(t,e){return[NaN,NaN]}createNodeData(){const{hasData:t,data:e,dataModel:i,groupScale:s,processedData:o,id:a,ctx:{legendManager:n}}=this,r=this.getCategoryAxis(),l=this.getValueAxis();if(!(t&&e&&r&&l&&i&&o?.type==="ungrouped"))return;const c=r.scale,h=l.scale,u=this.getBarDirection()===uY.X,{stageKey:d,valueKey:p}=this.properties,{strokeWidth:g}=this.barStyle(),f=`${p}`,x={itemId:f,nodeData:[],labelData:[],connectorData:[],scales:this.calculateScaling(),visible:this.visible},y=this.visible;if(!y)return x;const b=i.resolveKeysById(this,"xValue",o),S=i.resolveColumnById(this,"yValue",o),{barWidth:M,groupIndex:D}=this.updateGroupScale(r),L=Lbt.is(c)?M*-.5:0,T=Ebt(r?.scale,r?.visibleRange,this.smallestDataInterval,this.largestDataInterval);let I;return(o.dataSources.get(this.id)??[]).forEach((O,R)=>{const _=y&&n.getItemEnabled({seriesId:a,itemId:R}),B=b[R];if(B==null)return;const W=Math.round(c.convert(B))+s.convert(String(D))+L,F=S[R],z=Math.round(h.convert(-F)),U=Math.round(h.convert(F)),H=Math.max(g,Math.abs(U-z)),j={x:u?Math.min(U,z):W,y:u?W:Math.min(U,z),width:u?H:M,height:u?M:H},V={x:j.x+j.width/2,y:j.y+j.height/2},G=this.createLabelData({datumIndex:R,rect:j,barAlongX:u,yDatum:F,datum:O,visible:_}),K={index:R,series:this,itemId:f,datum:O,datumIndex:R,xValue:B,yValue:F,xKey:d,yKey:p,x:j.x,y:j.y,width:j.width,height:j.height,midPoint:V,strokeWidth:g,crisp:T,label:G,visible:_};if(x.nodeData.push(K),G!=null&&x.labelData.push(G),I!=null){const $=I.rect,Z=I.nodeDatum,Q=I.datumIndex;u?x.connectorData.push({datum:Z,datumIndex:Q,x0:$.x,y0:$.y+$.height,x1:$.x+$.width,y1:$.y+$.height,x2:j.x+j.width,y2:j.y,x3:j.x,y3:j.y,opacity:1}):x.connectorData.push({datum:Z,datumIndex:Q,x0:$.x+$.width,y0:$.y,x1:j.x,y1:j.y,x2:j.x,y2:j.y+j.height,x3:$.x+$.width,y3:$.y+$.height,opacity:1})}_&&(I={itemId:f,rect:j,nodeDatum:K,datumIndex:R})}),x}updateNodes(t,e,i){super.updateNodes(t,e,i);const{connectorSelection:s}=this,o=this.contextNodeData?.connectorData??[];this.connectorSelection=this.updateConnectorSelection({connectorSelection:s,connectorData:o}),this.updateConnectorNodes({connectorSelection:s})}updateDatumSelection(t){const{nodeData:e,datumSelection:i}=t,s=e??[];return i.update(s,void 0,o=>this.getDatumId(o))}updateConnectorSelection(t){const{connectorData:e,connectorSelection:i}=t;return i.update(this.connectorEnabled()?e:[],void 0,s=>this.getDatumId(s.datum))}updateConnectorNodes(t){const{fills:e,strokes:i,fillGradientDefaults:s,fillPatternDefaults:o}=this.properties,{fill:a,fillOpacity:n,stroke:r,strokeOpacity:l,strokeWidth:c,lineDash:h,lineDashOffset:u}=this.connectorStyle(),d=this.getShapeFillBBox();t.connectorSelection.each((p,g)=>{const{datumIndex:f}=g;p.setProperties(wx(p,g));const x=Bbt(a??e[f%e.length],s,o);p.fill=x,Rbt(p,x,d),p.fillOpacity=n,p.stroke=r??i[f%i.length],p.strokeOpacity=l,p.strokeWidth=c,p.lineDash=h,p.lineDashOffset=u})}getHighlightLabelData(t,e){const i=t.filter(s=>s.datum===e.datum);return i.length>0?i:void 0}updateLabelSelection(t){const e=this.properties.label.enabled?t.labelData:[];return t.labelSelection.update(e,i=>{i.pointerEvents=pY.None})}updateLabelNodes(t){t.labelSelection.each((e,i)=>{Sbt(e,this.properties.label,i)})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{stageKey:a,valueKey:n,tooltip:r}=o,l=this.getCategoryAxis(),c=this.getValueAxis();if(!i||!s||!l||!c)return;const h=s.dataSources.get(this.id)?.[t],u=i.resolveKeysById(this,"xValue",s)[t],d=i.resolveColumnById(this,"yValue",s)[t];if(u!=null)return r.formatTooltip(this.properties,{symbol:this.legendItemSymbol(t),data:[{label:l.formatDatum(u),value:c.formatDatum(d)}]},{seriesId:e,datum:h,title:a,stageKey:a,valueKey:n,...this.tooltipStyle(h,t)})}resetAllAnimation(t){super.resetAllAnimation(t),Abt([this.connectorSelection],wx)}animateEmptyUpdateReady({labelSelection:t}){const{connectorSelection:e}=this,i=this.isVertical(),o=ybt(i,"normal");wbt.fromToMotion(this.id,"connectors",this.ctx.animationManager,[e],o),dY(this,"labels",this.ctx.animationManager,t)}animateWaitingUpdateReady(t){const{labelSelection:e}=t;this.ctx.animationManager.stopByAnimationGroupId(this.id),dY(this,"labels",this.ctx.animationManager,e)}getDatumId(t){return _bt(t.xValue)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:t}){return Cbt(this,this.contextNodeData?.nodeData[t])}legendItemSymbol(t){const{strokeWidth:e,fillOpacity:i,strokeOpacity:s,lineDash:o,lineDashOffset:a,fillGradientDefaults:n,fillPatternDefaults:r}=this.barStyle(),{fills:l,strokes:c}=this.properties,h=l[t%l.length]??"black",u=c[t%c.length]??"black";return{marker:Pbt({fill:h,fillOpacity:i,stroke:u,strokeWidth:e,strokeOpacity:s,lineDash:o,lineDashOffset:a},n,r)}}getLegendData(t){const{id:e,processedData:i,dataModel:s,ctx:{legendManager:o},visible:a}=this;if(!s||!i||t!=="category"||!this.properties.isValid())return[];const{showInLegend:n}=this.properties,r=s.resolveKeysById(this,"xValue",i);return(i.dataSources.get(this.id)??[]).map((l,c)=>{const h=r[c];if(h!=null)return{legendType:"category",id:e,datum:l,itemId:c,seriesId:e,enabled:a&&o.getItemEnabled({seriesId:e,itemId:c}),label:{text:String(h)},symbol:this.legendItemSymbol(c),skipAnimations:!0,hideInLegend:!n}}).filter(l=>l!=null)}},Fbt=(E(),C(w)),{FillGradientDefaults:Gbt,FillPatternDefaults:jbt,Label:Vbt,AbstractBarSeriesProperties:Wbt,SeriesTooltip:Ubt,AxisLabel:Hbt,TempValidate:Ws,UNION:fY,OR:Ybt,ARRAY_OF:Kbt,COLOR_GRADIENT:$bt,COLOR_STRING:Xbt,COLOR_STRING_ARRAY:Zbt,COLOR_PATTERN:qbt,LINE_DASH:Qbt,OBJECT:Ex,POSITIVE_NUMBER:xw,RATIO:mY,STRING:yY}=Fbt._ModuleSupport,bw=class extends Vbt{constructor(){super(...arguments),this.spacing=0}};m([Ws(fY(["before","middle","after"],"a placement"))],bw.prototype,"placement",2),m([Ws(xw)],bw.prototype,"spacing",2);var xY=class extends Hbt{};m([Ws(fY(["before","after"],"a placement"))],xY.prototype,"placement",2);var wo=class extends Wbt{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new Gbt,this.fillPatternDefaults=new jbt,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new bw,this.stageLabel=new xY,this.tooltip=new Ubt}};m([Ws(yY)],wo.prototype,"stageKey",2),m([Ws(yY)],wo.prototype,"valueKey",2),m([Ws(Kbt(Ybt($bt,qbt,Xbt)))],wo.prototype,"fills",2),m([Ws(Ex)],wo.prototype,"fillGradientDefaults",2),m([Ws(Ex)],wo.prototype,"fillPatternDefaults",2),m([Ws(mY)],wo.prototype,"fillOpacity",2),m([Ws(Zbt)],wo.prototype,"strokes",2),m([Ws(xw)],wo.prototype,"strokeWidth",2),m([Ws(mY)],wo.prototype,"strokeOpacity",2),m([Ws(Qbt)],wo.prototype,"lineDash",2),m([Ws(xw)],wo.prototype,"lineDashOffset",2),m([Ws(Ex)],wo.prototype,"label",2),m([Ws(Ex)],wo.prototype,"stageLabel",2),m([Ws(Ex)],wo.prototype,"tooltip",2);function bY(t,{x:e,y:i,width:s,height:o,opacity:a}){return{x1:e,y1:i,x2:e+s,y2:i+o,opacity:a}}var{formatValue:Jbt,Line:tSt}=ubt._ModuleSupport,zD=class extends gY{constructor(t){super({moduleCtx:t,animationResetFns:{datum:bY}}),this.properties=new wo}get hasData(){const{id:t,ctx:{legendManager:e}}=this,i=this.data?.reduce((s,o,a)=>s+(e.getItemEnabled({seriesId:t,itemId:a})?1:0),0);return i!=null&&i>1}getBandScalePadding(){return{inner:1,outer:0}}connectorEnabled(){return!0}barStyle(){return{fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[],lineDashOffset:0,fillGradientDefaults:this.properties.fillGradientDefaults,fillPatternDefaults:this.properties.fillPatternDefaults}}connectorStyle(){const{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:n}=this.properties;return{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:n}}nodeFactory(){return new tSt}createLabelData({datumIndex:t,rect:e,barAlongX:i,yDatum:s,datum:o,visible:a}){const{stageKey:n,valueKey:r,label:l}=this.properties,{spacing:c,placement:h}=l;let u,d,p,g;if(i)switch(u=e.x+e.width/2,p="center",h){case"before":d=e.y-c,g="bottom";break;case"after":d=e.y+e.height+c,g="top";break;default:d=e.y+e.height/2,g="middle"}else switch(d=e.y+e.height/2,g="middle",h){case"before":u=e.x-c,p="right";break;case"after":u=e.x+e.width+c,p="left";break;default:u=e.x+e.width/2,p="center"}return{x:u,y:d,textAlign:p,textBaseline:g,text:this.getLabelText(l,{itemId:r,value:s,datum:o,stageKey:n,valueKey:r},f=>Jbt(f,0)),itemId:r,datum:o,datumIndex:t,series:this,visible:a}}updateDatumNodes(t){const e=t.isHighlight?this.properties.highlightStyle.item:void 0;t.datumSelection.each((i,s)=>{i.setProperties(bY(i,s)),i.stroke=e?.stroke,i.strokeWidth=e?.strokeWidth??0,i.strokeOpacity=e?.strokeOpacity??1,i.lineDash=e?.lineDash,i.lineDashOffset=e?.lineDashOffset??0})}tooltipStyle(t,e){const{fills:i,strokes:s}=this.properties,o=i[e%i.length]??"black",a=s[e%s.length]??"black",{fillOpacity:n,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}=this.barStyle();return{fill:o,fillOpacity:n,stroke:a,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}}};zD.className="ConeFunnelSeries",zD.type="cone-funnel";var eSt=(E(),C(w)),ai=(P(),C(et)),{commonSeriesOptionsDefs:iSt,seriesLabelOptionsDefs:SY,tooltipOptionsDefs:sSt,without:vY}=eSt._ModuleSupport,oSt={type:(0,ai.required)((0,ai.constant)("cone-funnel")),stageKey:(0,ai.required)(ai.string),valueKey:(0,ai.required)(ai.string),direction:(0,ai.union)("horizontal","vertical"),fills:(0,ai.arrayOf)(ai.colorUnion),strokes:(0,ai.arrayOf)(ai.color),showInMiniChart:ai.boolean,label:{spacing:ai.positiveNumber,placement:(0,ai.union)("before","middle","after"),...SY},stageLabel:{rotation:ai.number,spacing:ai.positiveNumber,minSpacing:ai.positiveNumber,placement:(0,ai.union)("before","after"),avoidCollisions:ai.boolean,itemStyler:ai.callback,format:ai.string,...SY},tooltip:sSt,...iSt,...vY(ai.fillOptionsDef,["fill"]),...vY(ai.strokeOptionsDef,["stroke"]),...ai.lineDashOptionsDef},FD=(E(),C(w)),{ThemeConstants:{CARTESIAN_AXIS_TYPE:MY}}=FD._ModuleSupport,aSt={series:{direction:"vertical",fills:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},FD._ModuleSupport.SAFE_RANGE2_OPERATION]},strokes:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},FD._ModuleSupport.SAFE_RANGE2_OPERATION]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:FD._ModuleSupport.FILL_PATTERN_DEFAULTS,strokeWidth:0,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},placement:"before",spacing:4}},seriesArea:{padding:{top:20,bottom:20}},axes:{[MY.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1,formatter(t){return Math.abs(t.value).toFixed(t.fractionDigits??0)}}},[MY.CATEGORY]:{line:{enabled:!1}}}},nSt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"cone-funnel",moduleFactory:t=>new zD(t),solo:!0,tooltipDefaults:{range:"nearest"},defaultAxes:aY,themeTemplate:aSt},rSt={type:"series",name:"cone-funnel",chartType:"cartesian",enterprise:!0,options:oSt,create:t=>new zD(t)},qLt=(E(),C(w)),lSt=(E(),C(w)),cSt=(E(),C(w)),{FillGradientDefaults:hSt,FillPatternDefaults:uSt,Label:dSt,DropShadow:pSt,AbstractBarSeriesProperties:gSt,BaseProperties:fSt,SeriesTooltip:mSt,AxisLabel:ySt,TempValidate:Ne,UNION:xSt,BOOLEAN:bSt,ARRAY_OF:SSt,OR:DY,COLOR_GRADIENT:kY,COLOR_STRING_ARRAY:vSt,COLOR_PATTERN:AY,COLOR_STRING:Sw,FUNCTION:MSt,LINE_DASH:IY,OBJECT:zd,POSITIVE_NUMBER:GD,RATIO:_x,STRING:TY}=cSt._ModuleSupport,DSt=class extends dSt{},CY=class extends ySt{};m([Ne(xSt(["before","after"],"a placement"))],CY.prototype,"placement",2);var ac=class extends fSt{constructor(){super(...arguments),this.enabled=!0,this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};m([Ne(bSt)],ac.prototype,"enabled",2),m([Ne(DY(kY,Sw,AY),{optional:!0})],ac.prototype,"fill",2),m([Ne(_x)],ac.prototype,"fillOpacity",2),m([Ne(Sw,{optional:!0})],ac.prototype,"stroke",2),m([Ne(GD)],ac.prototype,"strokeWidth",2),m([Ne(_x)],ac.prototype,"strokeOpacity",2),m([Ne(IY)],ac.prototype,"lineDash",2),m([Ne(GD)],ac.prototype,"lineDashOffset",2);var ds=class extends gSt{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new hSt,this.fillPatternDefaults=new uSt,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.spacingRatio=0,this.dropOff=new ac,this.shadow=new pSt().set({enabled:!1}),this.label=new DSt,this.stageLabel=new CY,this.tooltip=new mSt}};m([Ne(TY)],ds.prototype,"stageKey",2),m([Ne(TY)],ds.prototype,"valueKey",2),m([Ne(SSt(DY(kY,AY,Sw)))],ds.prototype,"fills",2),m([Ne(zd)],ds.prototype,"fillGradientDefaults",2),m([Ne(zd)],ds.prototype,"fillPatternDefaults",2),m([Ne(_x)],ds.prototype,"fillOpacity",2),m([Ne(vSt)],ds.prototype,"strokes",2),m([Ne(GD)],ds.prototype,"strokeWidth",2),m([Ne(_x)],ds.prototype,"strokeOpacity",2),m([Ne(IY)],ds.prototype,"lineDash",2),m([Ne(GD)],ds.prototype,"lineDashOffset",2),m([Ne(_x)],ds.prototype,"spacingRatio",2),m([Ne(MSt,{optional:!0})],ds.prototype,"itemStyler",2),m([Ne(zd)],ds.prototype,"dropOff",2),m([Ne(zd)],ds.prototype,"shadow",2),m([Ne(zd)],ds.prototype,"label",2),m([Ne(zd)],ds.prototype,"stageLabel",2),m([Ne(zd)],ds.prototype,"tooltip",2);var{ChartAxisDirection:kSt,resetBarSelectionsFn:ASt,prepareBarAnimationFunctions:LY,midpointStartingBarPosition:NY,createDatumId:ISt,formatValue:TSt,Rect:CSt,motion:OY,applyShapeStyle:LSt,getShapeStyle:wY}=lSt._ModuleSupport,jD=class extends gY{constructor(t){super({moduleCtx:t,animationResetFns:{datum:ASt}}),this.properties=new ds}getBandScalePadding(){return{inner:this.properties.spacingRatio,outer:0}}connectorEnabled(){return this.properties.dropOff.enabled}barStyle(){const{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:n}=this.properties;return{fillOpacity:t,strokeOpacity:e,strokeWidth:i,lineDash:s,lineDashOffset:o,fillGradientDefaults:a,fillPatternDefaults:n}}connectorStyle(){const{fill:t,fillOpacity:e,stroke:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n}=this.properties.dropOff;return{fill:t,fillOpacity:e,stroke:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n,fillGradientDefaults:this.properties.fillGradientDefaults,fillPatternDefaults:this.properties.fillPatternDefaults}}nodeFactory(){return new CSt}createLabelData({datumIndex:t,rect:e,yDatum:i,datum:s,visible:o}){const{valueKey:a,stageKey:n,label:r}=this.properties;return{x:e.x+e.width/2,y:e.y+e.height/2,textAlign:"center",textBaseline:"middle",text:this.getLabelText(r,{itemId:n,value:i,datum:s,valueKey:a,stageKey:n},l=>TSt(l,0)),itemId:n,datum:s,datumIndex:t,series:this,visible:o}}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return wY({fill:i?.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset},e.fillGradientDefaults,e.fillPatternDefaults)}getItemStyleOverrides(t,e,i,s,o){const{id:a,properties:n}=this,{stageKey:r,valueKey:l,fills:c,strokes:h,itemStyler:u}=n,d=s.fill??c[i%c.length]??"black",p=s.stroke??h[i%h.length]??"black",g={};if(o||(g.fill=d,g.stroke=p),u!=null){const f=this.cachedDatumCallback(ISt(t,o?"highlight":"node"),()=>{const{fillOpacity:x,strokeOpacity:y,strokeWidth:b,lineDash:S,lineDashOffset:M}=s;return this.callWithContext(u,{seriesId:a,datum:e,highlighted:o,stageKey:r,valueKey:l,fill:d,fillOpacity:x,stroke:p,strokeOpacity:y,strokeWidth:b,lineDash:S,lineDashOffset:M})});Object.assign(g,f)}return wY(g,n.fillGradientDefaults,n.fillPatternDefaults)}updateDatumNodes(t){const{shadow:e}=this.properties,{datumSelection:i,isHighlight:s}=t,o=this.getCategoryDirection()===kSt.X,a=this.getItemBaseStyle(s),n=this.getShapeFillBBox();i.each((r,l)=>{const{datumIndex:c}=l,h=this.getItemStyleOverrides(String(l.datumIndex),l.datum,c,a,s);LSt(r,a,h,n),r.visible=o?l.width>0:l.height>0,r.crisp=l.crisp,r.fillShadow=e})}tooltipStyle(t,e){const i=this.getItemBaseStyle(!1);return Object.assign(i,this.getItemStyleOverrides(String(e),t,e,i,!1)),i}animateEmptyUpdateReady(t){super.animateEmptyUpdateReady(t);const{datumSelection:e}=t,i=this.isVertical(),o=LY(NY(i,"normal"));OY.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],o)}animateWaitingUpdateReady(t){super.animateWaitingUpdateReady(t);const{datumSelection:e}=t,{processedData:i}=this,s=i?.reduced?.diff?.[this.id],o=LY(NY(this.isVertical(),"fade"));OY.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],o,(a,n)=>n.xValue,s)}};jD.className="FunnelSeries",jD.type="funnel";var NSt=(E(),C(w)),De=(P(),C(et)),{commonSeriesOptionsDefs:OSt,seriesLabelOptionsDefs:EY,shadowOptionsDefs:wSt,tooltipOptionsDefs:ESt,without:_Y}=NSt._ModuleSupport,_St={type:(0,De.required)((0,De.constant)("funnel")),stageKey:(0,De.required)(De.string),valueKey:(0,De.required)(De.string),direction:(0,De.union)("horizontal","vertical"),fills:(0,De.arrayOf)(De.colorUnion),strokes:(0,De.arrayOf)(De.color),showInMiniChart:De.boolean,itemStyler:De.callback,spacingRatio:De.ratio,crisp:De.boolean,dropOff:{enabled:De.boolean,...De.fillOptionsDef,...De.strokeOptionsDef,...De.lineDashOptionsDef},stageLabel:{rotation:De.number,spacing:De.positiveNumber,minSpacing:De.positiveNumber,placement:(0,De.union)("before","after"),avoidCollisions:De.boolean,itemStyler:De.callback,format:De.string,...EY},label:EY,tooltip:ESt,shadow:wSt,...OSt,..._Y(De.fillOptionsDef,["fill"]),..._Y(De.strokeOptionsDef,["stroke"]),...De.lineDashOptionsDef},RSt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"funnel",moduleFactory:t=>new jD(t),solo:!0,tooltipDefaults:{range:"exact"},defaultAxes:aY,themeTemplate:hbt},PSt={type:"series",name:"funnel",chartType:"cartesian",enterprise:!0,options:_St,create:t=>new jD(t)},RY=(E(),C(w)),pf=(E(),C(w)),PY=class{*[Symbol.iterator](){const{node:t,datum:e}=this;t&&e&&(yield{node:t,datum:e})}nodes(){return this.node?[this.node]:[]}update(t,e,i,s){const o=t.nodes();if(o.length===0)this.node?.remove(),this.node=void 0;else{this.node===void 0&&(this.node=new i,this.node.fillOpacity=0,this.node.strokeOpacity=0,e.appendChild(this.node));const a=o[0],n=o.toReversed().find(r=>r.datum.datum.value>r.datum.datum.segmentStart)??o[o.length-1];this.node.datum=this.datum=a.datum,s(this.node,a,n)}}},BY={fromFn:()=>({opacity:0,phase:"initial"}),toFn:()=>({opacity:1})};function zY(t,e){if(t==null)return"";const{min:i,max:s}=e,o=i!==0?Math.ceil(Math.log10(Math.abs(i))):0,a=s!==0?Math.ceil(Math.log10(Math.abs(s))):0,n=Math.max(2-Math.max(o,a),0);return t.toFixed(n)}function Rx(t,e,i){if(e.text!=null)return e.text;const s=i??e.value,o=e?.formatter?.({seriesId:t.id,datum:void 0,value:s});if(o!=null)return String(o)}var QLt=(E(),C(w));function FY({path:t,x:e,y:i,size:s}){t.moveTo(e,i-s/2),t.lineTo(e,i+s/2)}var JLt=(E(),C(w)),vw=(P(),C(et));function GY(t,e){const i=(0,vw.iterate)(t.datumUnion.nodes(),t.targetSelection.nodes());return t.pickNodeNearestDistantObject(e,i)}function jY(t,e){const i=[{data:t.contextNodeData?.nodeData,selection:t.datumUnion},{data:t.contextNodeData?.targetData,selection:t.targetSelection}].filter(l=>l.data&&l.data.length>0),s=(0,vw.clamp)(0,e.otherIndex+e.otherIndexDelta,i.length-1);if(i.length===0)return;const{data:o,selection:a}=i[s];if(o==null||o.length===0)return;const n=(0,vw.clamp)(0,e.datumIndex,o.length-1),r=o[n];for(const l of a)if(l.datum===r)return{bounds:l.node,clipFocusBox:!0,datum:r,datumIndex:n,otherIndex:s}}var Mw=(E(),C(w)),BSt=(E(),C(w)),{MARKER_SHAPE:zSt,UNION:Dw,OR:FSt}=BSt._ModuleSupport,VD=Dw(["continuous","discrete"],"a fill mode"),VY=FSt(zSt,Dw(["line"],"a marker shape")),WY=Dw(["container","item"],"a corner mode"),GSt=(E(),C(w)),jSt=(P(),C(et)),{BaseProperties:UY,TempValidate:gf,OBJECT:VSt,BOOLEAN:WSt,NUMBER:kw,NUMBER_ARRAY:USt}=GSt._ModuleSupport,WD=class extends UY{getSegments(t,e){const{values:i,step:s,count:o}=this,a=Math.min(...t.domain),n=Math.max(...t.domain);let r;if(i!=null){const l=i.filter(c=>c>a&&c<n).sort((c,h)=>c-h);r=[a,...l,n]}else if(s!=null){const l=[];for(let c=a;c<n;c+=s)l.push(c);l.push(n),r=l}else if(o!=null){const l=o+1;r=Array.from({length:l+1},(c,h)=>h/l*(n-a)+a)}else{const l=t.ticks({nice:!0,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.filter(c=>c>a&&c<n);r=l!=null?[a,...l,n]:void 0}return r!=null&&r.length>e&&(jSt.Logger.warnOnce("the configured segmentation results in more than 1 item per pixel, ignoring. Supply a segmentation configuration that results in larger segments or omit this configuration"),r=void 0),r??(r=[a,n]),r}};m([gf(USt,{optional:!0})],WD.prototype,"values",2),m([gf(kw,{optional:!0})],WD.prototype,"step",2),m([gf(kw,{optional:!0})],WD.prototype,"count",2);var Px=class extends UY{constructor(){super(...arguments),this.enabled=!1,this.interval=new WD,this.spacing=0}};m([gf(WSt)],Px.prototype,"enabled",2),m([gf(VSt)],Px.prototype,"interval",2),m([gf(kw)],Px.prototype,"spacing",2);var{BaseProperties:UD,SeriesTooltip:HSt,SeriesProperties:YSt,PropertiesArray:Aw,TempValidate:yt,BOOLEAN:HY,COLOR_STRING:Fd,COLOR_STRING_ARRAY:KSt,FUNCTION:$St,LINE_DASH:Iw,NUMBER:Jn,OBJECT_ARRAY:Tw,OBJECT:tl,POSITIVE_NUMBER:el,RATIO:Gd,STRING:YY,NUMBER_ARRAY:XSt,UNION:HD,AND:KY,LESS_THAN:ZSt,GREATER_THAN:qSt,Label:QSt,AxisLabel:JSt}=Mw._ModuleSupport,tvt=HD(["before","after","middle"],"a placement"),evt=HD(["inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end"],"an placement"),ivt=HD(["horizontal","vertical"],"an orientation"),svt=HD(["before","after"],"a placement"),$Y=class extends QSt{};m([yt(Jn,{optional:!0})],$Y.prototype,"spacing",2);var Us=class extends UD{constructor(){super(...arguments),this.value=0,this.label=new $Y}};m([yt(YY,{optional:!0})],Us.prototype,"text",2),m([yt(Jn)],Us.prototype,"value",2),m([yt(VY,{optional:!0})],Us.prototype,"shape",2),m([yt(tvt,{optional:!0})],Us.prototype,"placement",2),m([yt(Jn,{optional:!0})],Us.prototype,"spacing",2),m([yt(el,{optional:!0})],Us.prototype,"size",2),m([yt(Jn,{optional:!0})],Us.prototype,"rotation",2),m([yt(Fd,{optional:!0})],Us.prototype,"fill",2),m([yt(Gd,{optional:!0})],Us.prototype,"fillOpacity",2),m([yt(Fd,{optional:!0})],Us.prototype,"stroke",2),m([yt(el,{optional:!0})],Us.prototype,"strokeWidth",2),m([yt(Gd,{optional:!0})],Us.prototype,"strokeOpacity",2),m([yt(Iw,{optional:!0})],Us.prototype,"lineDash",2),m([yt(el,{optional:!0})],Us.prototype,"lineDashOffset",2),m([yt(tl)],Us.prototype,"label",2);var Pa=class extends UD{constructor(){super(...arguments),this.enabled=!0,this.thicknessRatio=1,this.fills=new Aw(Mw._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};m([yt(HY)],Pa.prototype,"enabled",2),m([yt(el,{optional:!0})],Pa.prototype,"thickness",2),m([yt(Gd)],Pa.prototype,"thicknessRatio",2),m([yt(Tw)],Pa.prototype,"fills",2),m([yt(VD)],Pa.prototype,"fillMode",2),m([yt(Fd,{optional:!0})],Pa.prototype,"fill",2),m([yt(Gd)],Pa.prototype,"fillOpacity",2),m([yt(Fd)],Pa.prototype,"stroke",2),m([yt(el)],Pa.prototype,"strokeWidth",2),m([yt(Gd)],Pa.prototype,"strokeOpacity",2),m([yt(Iw)],Pa.prototype,"lineDash",2),m([yt(el)],Pa.prototype,"lineDashOffset",2);var Bx=class extends UD{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};m([yt(XSt,{optional:!0})],Bx.prototype,"values",2),m([yt(Jn,{optional:!0})],Bx.prototype,"step",2),m([yt(Jn)],Bx.prototype,"minSpacing",2),m([yt(Jn)],Bx.prototype,"maxSpacing",2);var XY=class extends JSt{constructor(){super(...arguments),this.placement=void 0}};m([yt(svt,{optional:!0})],XY.prototype,"placement",2);var uo=class extends UD{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new Aw(Mw._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black",this.interval=new Bx,this.label=new XY}};m([yt(KY(Jn,ZSt("max")))],uo.prototype,"min",2),m([yt(KY(Jn,qSt("min")))],uo.prototype,"max",2),m([yt(Tw)],uo.prototype,"fills",2),m([yt(VD)],uo.prototype,"fillMode",2),m([yt(Fd,{optional:!0})],uo.prototype,"fill",2),m([yt(Gd)],uo.prototype,"fillOpacity",2),m([yt(Fd)],uo.prototype,"stroke",2),m([yt(el)],uo.prototype,"strokeWidth",2),m([yt(Gd)],uo.prototype,"strokeOpacity",2),m([yt(Iw)],uo.prototype,"lineDash",2),m([yt(el)],uo.prototype,"lineDashOffset",2),m([yt(Fd)],uo.prototype,"defaultFill",2),m([yt(tl)],uo.prototype,"interval",2),m([yt(tl)],uo.prototype,"label",2);var YD=class extends qr{constructor(){super(...arguments),this.placement="inside-center",this.avoidCollisions=!0}};m([yt(YY,{optional:!0})],YD.prototype,"text",2),m([yt(evt)],YD.prototype,"placement",2),m([yt(HY)],YD.prototype,"avoidCollisions",2);var Hs=class extends YSt{constructor(){super(...arguments),this.value=0,this.segmentation=new Px,this.defaultColorRange=[],this.targets=new Aw(Us),this.defaultTarget=new Us,this.defaultScale=new uo,this.direction="vertical",this.thickness=1,this.cornerRadius=0,this.cornerMode="container",this.margin=0,this.scale=new uo,this.bar=new Pa,this.label=new YD,this.tooltip=new HSt}};m([yt(Jn)],Hs.prototype,"value",2),m([yt(tl)],Hs.prototype,"segmentation",2),m([yt(KSt)],Hs.prototype,"defaultColorRange",2),m([yt(Tw)],Hs.prototype,"targets",2),m([yt(tl)],Hs.prototype,"defaultTarget",2),m([yt(tl)],Hs.prototype,"defaultScale",2),m([yt(ivt)],Hs.prototype,"direction",2),m([yt(el)],Hs.prototype,"thickness",2),m([yt(el)],Hs.prototype,"cornerRadius",2),m([yt(WY)],Hs.prototype,"cornerMode",2),m([yt(Jn)],Hs.prototype,"margin",2),m([yt(tl)],Hs.prototype,"scale",2),m([yt(tl)],Hs.prototype,"bar",2),m([yt($St,{optional:!0})],Hs.prototype,"itemStyler",2),m([yt(tl)],Hs.prototype,"label",2),m([yt(tl)],Hs.prototype,"tooltip",2);var ovt=(E(),C(w)),{CachedTextMeasurerPool:avt,BBox:nvt}=ovt._ModuleSupport;function Cw(t){const{x0:e,y0:i,x1:s,y1:o,horizontalInset:a,verticalInset:n}=t,r=Math.min(e,s)+a,l=Math.min(i,o)+n,c=Math.max(Math.abs(s-e)-2*a,0),h=Math.max(Math.abs(o-i)-2*n,0);return{x:r,y:l,width:c,height:h}}function rvt(t,e){if(e==null)return!0;const i=Cw(t),s=1e-6,o=i.x+s,a=i.y+s,n=i.x+i.width-s,r=i.y+i.height-s,l=e.x,c=e.x+e.width,h=e.y,u=e.y+e.height;return Math.max(o,l)<=Math.min(n,c)&&Math.max(a,h)<=Math.min(r,u)}function Lw(t){const{clipX0:e,clipX1:i,clipY0:s,clipY1:o}=t;return e!=null&&i!=null||s!=null&&o!=null}function lvt(t){if(!Lw(t))return;const{x0:e,y0:i,x1:s,y1:o}=t,{x:a,y:n,width:r,height:l}=Cw(t);let{clipX0:c,clipX1:h,clipY0:u,clipY1:d}=t;(c==null||h==null)&&(c=e,h=s),(u==null||d==null)&&(u=i,d=o);const p=Math.min(c,h),g=Math.min(u,d),f=Math.abs(h-c),x=Math.abs(d-u);return c=Math.max(a,p),u=Math.max(n,g),h=Math.min(a+r,p+f),d=Math.min(n+l,g+x),new nvt(Math.min(c,h),Math.min(u,d),Math.abs(h-c),Math.abs(d-u))}function ZY(t,e){const i=t?"initial":"update";return{node:{fromFn(o,a){const n=o.previousDatum;let{x0:r,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g}=n??a;const{horizontalInset:f,verticalInset:x}=a,y=n!=null&&Lw(n),b=Lw(a);return y&&b||(!y&&b?({x0:r,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g}=a,t&&(e?p=a.clipX0:g=a.clipY0)):y&&!b?({x0:r,y0:l,x1:c,y1:h}=a,u=void 0,d=void 0,p=void 0,g=void 0):t&&(e?c=r:h=l)),{x0:r,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g,horizontalInset:f,verticalInset:x,phase:i}},toFn(o,a){const{x0:n,y0:r,x1:l,y1:c,clipX0:h,clipY0:u,clipX1:d,clipY1:p,horizontalInset:g,verticalInset:f}=a;return{x0:n,y0:r,x1:l,y1:c,clipX0:h,clipY0:u,clipX1:d,clipY1:p,horizontalInset:g,verticalInset:f}},applyFn(o,a){o.setProperties(KD(o,a))}}}}function KD(t,e){const{x:i,y:s,width:o,height:a}=Cw(e),n=lvt(e),r=rvt(e,n);return{x:i,y:s,width:o,height:a,clipBBox:n,visible:r}}var cvt={Before:"right",Center:"center",After:"left"},hvt={Before:"top",Center:"middle",After:"bottom"},uvt={Before:-1,Center:-.5,After:0},dvt={Before:0,Center:-.5,After:-1};function pvt(t,e,i,s,o){const{seriesRect:a,gaugeRect:n,barRect:r}=s,{padding:l,horizontal:c}=i;e.each((h,u)=>{const d=Rx(t,u,o?.label);let p,g;u.placement==="outside-start"?c?(p=n.x,g=a.height):(p=a.width,g=a.height-(n.y+n.height)):u.placement==="outside-end"?c?(p=a.width-(n.x+n.width),g=a.height):(p=a.width,g=n.y):u.avoidCollisions&&(p=n.width,g=n.height);let f;if(d==null)return;if(p!=null&&g!=null)f=kx(d,u,{padding:l},()=>({width:p,height:g,meta:null}))?.[0];else{const W={fontSize:u.fontSize,fontStyle:u.fontStyle,fontWeight:u.fontWeight,fontFamily:u.fontFamily,lineHeight:u.lineHeight},{width:F,height:z}=avt.measureText(d,{font:W});f={text:d,fontSize:u.fontSize,lineHeight:of(u,u.fontSize),width:F,height:z}}if(f==null){h.visible=!1;return}const x=c?n.x:n.y+n.height,y=c?n.x+n.width:n.y,b=c?r.x:r.y+r.height,S=c?r.x+r.width:r.y,M=u.spacing*(c?1:-1);let D,L,T,I;switch(u.placement){case"outside-start":D=-1/0,L=1/0,T=x-M,I="Before";break;case"outside-end":D=-1/0,L=1/0,T=y+M,I="After";break;case"inside-start":D=x,L=S,T=x+M,I="After";break;case"inside-end":D=S,L=y,T=y-M,I="Before";break;case"inside-center":D=x,L=y,T=(x+y)/2,I="Center";break;case"bar-inside":D=b,L=S,T=(b+S)/2,I="Center";break;case"bar-inside-end":D=b,L=S,T=S-M,I="Before";break;case"bar-outside-end":D=S,L=y,T=S+M,I="After";break;case"bar-end":D=-1/0,L=1/0,T=S,I="Center";break}const N=c?T:n.x+n.width/2,O=c?n.y+n.height/2:T;let R,_;c?(R=N+uvt[I]*f.width,_=R+f.width):(R=O+dvt[I]*f.height,_=R+f.height);const B=Math.min(R,_)>=Math.min(D,L)&&Math.max(R,_)<=Math.max(D,L);if(u.avoidCollisions&&!B){h.visible=!1;return}h.visible=!0,h.text=f.text,h.fontSize=f.fontSize,h.lineHeight=f.lineHeight,h.textAlign=c?cvt[I]:"center",h.textBaseline=c?"middle":hvt[I],h.x=N,h.y=O})}var{fromToMotion:Nw,resetMotion:gvt,SeriesNodePickMode:qY,StateMachine:fvt,createDatumId:QY,CachedTextMeasurerPool:mvt,toRadians:JY,BBox:Ih,Group:jd,PointerEvents:t5,Selection:Vd,Rect:yvt,Text:e5,TransformableText:xvt,Marker:bvt,LinearScale:Svt,AxisTickGenerator:vvt,NiceMode:Mvt,easing:Dvt,getColorStops:kvt,findRangeExtent:Avt}=pf._ModuleSupport,Ivt={before:180,middle:0,after:0},Tvt={before:90,middle:0,after:-90},Cvt=class{constructor(t){this.gauge=t}get defaultTickMinSpacing(){return 0}get range(){return this.gauge.range}get reverse(){return!1}get scale(){return this.gauge.scale}get label(){return this.gauge.properties.scale.label}get interval(){return this.gauge.properties.scale.interval}formatTick(t,e,i,s,o){const{label:a}=this;return a.formatter?.({value:t,index:e,domain:i,boundSeries:void 0})??(a.format!=null?o?.(t):void 0)??this.gauge.formatLabel(t)}inRange(){return!0}},$D=class extends pf._ModuleSupport.Series{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[qY.EXACT_SHAPE_MATCH,qY.NEAREST_NODE]}),this.properties=new Hs,this.seriesRect=Ih.NaN,this.gaugeRect=Ih.NaN,this.scale=new Svt,this.axis=new Cvt(this),this.tickGenerator=new vvt(this.axis),this.originX=0,this.originY=0,this.scaleGroup=this.contentGroup.appendChild(new jd({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new jd({name:"itemGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new jd({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new jd({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new jd({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new jd({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new jd({name:"tickGroup"})),this.scaleSelection=Vd.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Vd.select(this.itemGroup,()=>this.nodeFactory()),this.targetSelection=Vd.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Vd.select(this.itemTargetLabelGroup,e5),this.labelSelection=Vd.select(this.itemLabelGroup,e5),this.highlightTargetSelection=Vd.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=Vd.select(this.tickGroup,xvt),this.datumUnion=new PY,this.animationState=new fvt("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=t5.None,this.tickGroup.pointerEvents=t5.None}get range(){return this.horizontal?[0,this.gaugeRect.width]:[0,this.gaugeRect.height]}get horizontal(){return this.properties.direction==="horizontal"}get hasData(){return!0}nodeFactory(){const t=new yvt;return t.crisp=!0,t}markerFactory(){return new bvt}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(t){return zY(t,this.properties.scale)}createLinearGradient(t,e,i){const{properties:s,horizontal:o}=this,{defaultColorRange:a}=s;return{type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:kvt(e,a,t.domain,i),rotation:o?90:0}}getShapeFillBBox(){const{properties:t,originX:e,originY:i,horizontal:s,scale:o}=this,{thickness:a}=t,n=Avt(o.range);return new Ih(e,i,s?n:a,s?a:n)}getTargets(){const{properties:t}=this,e=t.defaultTarget;return Array.from(t.targets).map(i=>{const{text:s=e.text,value:o=e.value??0,shape:a=e.shape??"triangle",rotation:n=e.rotation??0,strokeWidth:r=e.strokeWidth??0,placement:l=e.placement??"middle",spacing:c=e.spacing??0,size:h=e.size??0,fill:u=e.fill??"black",fillOpacity:d=e.fillOpacity??1,stroke:p=e.stroke??"black",strokeOpacity:g=e.strokeOpacity??1,lineDash:f=e.lineDash??[0],lineDashOffset:x=e.lineDashOffset??0}=i,{enabled:y=e.label.enabled,color:b=e.label.color??"black",fontStyle:S=e.label.fontStyle??"normal",fontWeight:M=e.label.fontWeight??"normal",fontSize:D=e.label.fontSize,fontFamily:L=e.label.fontFamily,spacing:T=e.label.spacing??0}=i.label;return{text:s,value:o,shape:a,placement:l,spacing:c,size:h,rotation:n,fill:u,fillOpacity:d,stroke:p,strokeWidth:r,strokeOpacity:g,lineDash:f,lineDashOffset:x,label:{enabled:y,color:b,fontStyle:S,fontWeight:M,fontSize:D,fontFamily:L,spacing:T}}})}getTargetPoint(t){const{properties:e,originX:i,originY:s,horizontal:o,scale:a,gaugeRect:n}=this,{thickness:r}=e,{value:l,placement:c,spacing:h,size:u}=t,d=a.convert(l);let p;switch(c){case"before":p=-(h+u/2);break;case"after":p=r+h+u/2;break;default:p=r/2;break}return{x:i+n.x+(o?d:p),y:s+n.y+(o?p:d)}}getTargetLabel(t){const{size:e,placement:i,label:s}=t,{spacing:o,color:a,fontStyle:n,fontWeight:r,fontSize:l,fontFamily:c}=s,h=void 0,u=e/2+o;let d,p,g=0,f=0;return this.horizontal?(d="center",i==="after"?(p="top",f=u):(p="bottom",f=-u)):(p="middle",i==="before"?(d="right",g=-u):(d="left",g=u)),{offsetX:g,offsetY:f,fill:a,textAlign:d,textBaseline:p,fontStyle:n,fontWeight:r,fontSize:l,fontFamily:c,lineHeight:h}}labelDatum(t,e){const{placement:i,avoidCollisions:s,spacing:o,text:a,color:n,fontSize:r,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:u,lineHeight:d,wrapping:p,overflowStrategy:g,formatter:f=x=>this.formatLabel(x.value)}=t;return{placement:i,avoidCollisions:s,spacing:o,text:a,value:e,fill:n,fontSize:r,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:u,lineHeight:d,wrapping:p,overflowStrategy:g,formatter:f}}verticalLabelInset(){const{properties:t}=this,{label:e}=t,i=e.text?.split(`
`),s=of(e,e.fontSize)*(i?.length??1);return e.spacing+s}horizontalLabelInset(){const{scale:t,properties:e}=this,{scale:i,label:s}=e,o=s.text?.split(`
`),a=s.getFont(),n=i.interval.values??t.ticks({nice:!1,interval:i.interval.step,minTickCount:0,maxTickCount:6,tickCount:5}),l=(o??n.map(c=>Rx(this,this.labelDatum(s,c))??"")).reduce((c,h)=>{const{width:u}=mvt.measureText(h,{font:a});return Math.max(c,u)},0);return s.spacing+l}createNodeData(){const{id:t,properties:e,horizontal:i,scale:s,seriesRect:o}=this;if(!e.isValid())return;const{value:a,segmentation:n,thickness:r,cornerRadius:l,cornerMode:c,bar:h,scale:u,label:d}=e;s.domain=[u.min,u.max],s.range=i?[0,o.width]:[o.height,0];let p,g;i?(g=1,p=Math.PI/2):u.label.placement==="before"?(g=1,p=0):(g=-1,p=0);const f=p-Math.PI/2;let x,y,b,S;i?(x=0,y=o.width,b=(o.height-r)/2,S=b+r,d.placement==="outside-start"?x+=this.horizontalLabelInset():d.placement==="outside-end"&&(y-=this.horizontalLabelInset())):(x=(o.width-r)/2,y=x+r,S=0,b=o.height,d.placement==="outside-start"?b-=this.verticalLabelInset():d.placement==="outside-end"&&(S+=this.verticalLabelInset())),this.gaugeRect=new Ih(Math.min(x,y),Math.min(b,S),Math.abs(y-x),Math.abs(S-b));const M=0,D=0;s.domain=[u.min,u.max],s.range=i?[x,y]:[b,S];const{ticks:L}=this.tickGenerator.generateTicks({domain:s.domain,primaryTickCount:void 0,visibleRange:[0,1],niceMode:Mvt.Off,labelX:0,parallelFlipRotation:p,regularFlipRotation:f,sideFlag:g}).tickData,T=!1,I=this.getTargets(),N=[],O=[],R=[],_=[],[B,W]=s.range,F=Math.abs(W-B),z=i?s.convert(a):y,U=i?S:s.convert(a),H=n.enabled?n.spacing/2:0,j=i?H:0,V=i?0:H,G=Math.min(h.thickness??Math.round(h.thicknessRatio*r),r),K=-(r-G)/2,$=i?0:K,Z=i?K:0,Q=c==="item",q=Math.ceil(F);let J=n.enabled?n.interval.getSegments(s,q):void 0;const X=h.fill??this.createLinearGradient(s,h.fills,h.fillMode),st=u.fill??(h.enabled&&u.fills.length===0?u.defaultFill:void 0)??this.createLinearGradient(s,u.fills,u.fillMode);if(J==null&&Q){const dt=Math.min(...s.domain),ut=Math.max(...s.domain),St={value:a,segmentStart:dt,segmentEnd:ut};if(h.enabled){const $t=Math.min(l,G/2,F/2)*(T?-1:1),Dt=i?$t:0,Gt=i?0:$t;N.push({series:this,itemId:"value",datum:St,datumIndex:{type:0},type:0,x0:M+x-Dt-$,y0:D+b-Gt-Z,x1:M+z+Dt+$,y1:D+U+Gt+Z,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:X,horizontalInset:j,verticalInset:V})}const mt=Math.min(l,r/2,F/2)*(T?-1:1),Jt=i?mt:0,ie=i?0:mt;_.push({series:this,itemId:"scale",datum:St,datumIndex:{type:0},type:0,x0:M+x-Jt,y0:D+b-ie,x1:M+y+Jt,y1:D+S+ie,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,fill:st,horizontalInset:j,verticalInset:V})}else{J??(J=s.domain);const dt=M+x-$,ut=D+b-Z,St=M+z+$,Lt=D+U+Z;for(let mt=0;mt<J.length-1;mt+=1){const Jt=J[mt+0],ie=J[mt+1],Kt={value:a,segmentStart:Jt,segmentEnd:ie},$t=mt===0,Dt=mt===J.length-2,Gt=s.convert(Jt),te=s.convert(ie),Xs=Q||$t?l:0,fo=Q||Dt?l:0,Mn=i?Xs:fo,Qd=fo,hc=i?fo:Xs,Ph=Xs;h.enabled&&N.push({series:this,itemId:`value-${mt}`,datum:Kt,datumIndex:{type:0},type:0,x0:M+(i?Gt:x),y0:D+(i?b:Gt),x1:M+(i?te:y),y1:D+(i?S:te),clipX0:dt,clipY0:ut,clipX1:St,clipY1:Lt,topLeftCornerRadius:Mn,topRightCornerRadius:Qd,bottomRightCornerRadius:hc,bottomLeftCornerRadius:Ph,fill:X,horizontalInset:j,verticalInset:V}),_.push({series:this,itemId:`scale-${mt}`,datum:Kt,datumIndex:{type:0},type:0,x0:M+(i?Gt:x),y0:D+(i?b:Gt),x1:M+(i?te:y),y1:D+(i?S:te),clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:Mn,topRightCornerRadius:Qd,bottomRightCornerRadius:hc,bottomLeftCornerRadius:Ph,fill:st,horizontalInset:j,verticalInset:V})}}d.enabled&&R.push(this.labelDatum(d,a));const nt=i?Ivt:Tvt;for(let dt=0;dt<I.length;dt+=1){const ut=I[dt],{value:St,text:Lt,shape:mt,size:Jt,fill:ie,fillOpacity:Kt,stroke:$t,strokeWidth:Dt,strokeOpacity:Gt,lineDash:te,lineDashOffset:Xs}=ut,fo=this.getTargetPoint(ut),Mn=JY(ut.rotation+nt[ut.placement]);O.push({series:this,itemId:`target-${dt}`,midPoint:fo,datum:{value:St},datumIndex:{type:1,index:dt},type:1,value:St,text:Lt,x:fo.x,y:fo.y,shape:mt,size:Jt,rotation:Mn,fill:ie,fillOpacity:Kt,stroke:$t,strokeOpacity:Gt,strokeWidth:Dt,lineDash:te,lineDashOffset:Xs,label:this.getTargetLabel(ut)})}return{itemId:t,nodeData:N,tickData:L,targetData:O,labelData:R,scaleData:_}}updateSelections(t){(this.nodeDataRefresh||t)&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}highlightDatum(t){if(t!=null&&t.series===this&&t.type===1)return t}update({seriesRect:t}){const{datumSelection:e,labelSelection:i,targetSelection:s,targetLabelSelection:o,scaleSelection:a,highlightTargetSelection:n,tickSelection:r}=this;this.seriesRect=t??Ih.NaN;const l=this.checkResize(t);this.updateSelections(l),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const c=this.contextNodeData?.nodeData??[],h=this.contextNodeData?.labelData??[],u=this.contextNodeData?.targetData??[],d=this.contextNodeData?.scaleData??[],p=this.contextNodeData?.tickData??[],g=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:d,scaleSelection:a}),this.updateScaleNodes({scaleSelection:a}),this.targetSelection=this.updateTargetSelection({targetData:u,targetSelection:s}),this.updateTargetNodes({targetSelection:s,isHighlight:!1}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:u,targetLabelSelection:o}),this.updateTargetLabelNodes({targetLabelSelection:o}),this.datumSelection=this.updateDatumSelection({nodeData:c,datumSelection:e}),this.updateDatumNodes({datumSelection:e}),this.labelSelection=this.updateLabelSelection({labelData:h,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:g!=null?[g]:[],targetSelection:n}),this.updateTargetNodes({targetSelection:n,isHighlight:!0}),this.tickSelection=this.updateTickSelection({tickData:p,tickSelection:r}),this.updateTickNodes({tickSelection:r}),l&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>QY(t.nodeData.length,e.itemId))}updateDatumNodes(t){const{datumSelection:e}=t,{ctx:i,properties:s}=this,{bar:o}=s,{fillOpacity:a,stroke:n,strokeOpacity:r,lineDash:l,lineDashOffset:c}=o,h=this.getStrokeWidth(o.strokeWidth),u=i.animationManager.isSkipped(),d=this.getShapeFillBBox();e.each((p,g)=>{const{topLeftCornerRadius:f,topRightCornerRadius:x,bottomRightCornerRadius:y,bottomLeftCornerRadius:b,fill:S}=g;p.fill=S,p.fillBBox=d,p.fillOpacity=a,p.stroke=n,p.strokeOpacity=r,p.strokeWidth=h,p.lineDash=l,p.lineDashOffset=c,p.topLeftCornerRadius=f,p.topRightCornerRadius=x,p.bottomRightCornerRadius=y,p.bottomLeftCornerRadius=b,p.pointerEvents=this.properties.bar.enabled?pf._ModuleSupport.PointerEvents.All:pf._ModuleSupport.PointerEvents.None,(u||p.previousDatum==null)&&p.setProperties(KD(p,g))}),this.datumUnion.update(e,this.itemGroup,pf._ModuleSupport.Rect,(p,g,f)=>{p.pointerEvents=pf._ModuleSupport.PointerEvents.None,p.clipBBox??(p.clipBBox=new Ih(NaN,NaN,NaN,NaN)),p.x=g.x,p.y=g.y,p.clipBBox.x=g.clipBBox?.x??g.x,p.clipBBox.y=g.clipBBox?.y??g.y,this.horizontal?(p.height=p.clipBBox.height=f.height,p.width=f===g?f.width:f.x+f.width,p.clipBBox.width=p.width-(f.width-(f.clipBBox?.width??f.width)),p.topLeftCornerRadius=g.topLeftCornerRadius,p.bottomLeftCornerRadius=g.bottomLeftCornerRadius,p.topRightCornerRadius=f.topRightCornerRadius,p.bottomRightCornerRadius=f.bottomRightCornerRadius):(p.width=p.clipBBox.width=f.width,p.height=f===g?f.height:f.x+f.height,p.clipBBox.height=p.height-(f.height-(f.clipBBox?.height??f.height)),p.topLeftCornerRadius=g.topLeftCornerRadius,p.topRightCornerRadius=g.topRightCornerRadius,p.bottomLeftCornerRadius=f.bottomLeftCornerRadius,p.bottomRightCornerRadius=f.bottomRightCornerRadius)})}updateScaleSelection(t){return t.scaleSelection.update(t.scaleData,void 0,e=>QY(t.scaleData.length,e.itemId))}updateScaleNodes(t){const{scaleSelection:e}=t,{scale:i}=this.properties,{fillOpacity:s,stroke:o,strokeOpacity:a,strokeWidth:n,lineDash:r,lineDashOffset:l}=i,c=this.getShapeFillBBox();e.each((h,u)=>{const{topLeftCornerRadius:d,topRightCornerRadius:p,bottomRightCornerRadius:g,bottomLeftCornerRadius:f,fill:x}=u;h.fill=x,h.fillBBox=c,h.fillOpacity=s,h.stroke=o,h.strokeOpacity=a,h.strokeWidth=n,h.lineDash=r,h.lineDashOffset=l,h.topLeftCornerRadius=d,h.topRightCornerRadius=p,h.bottomRightCornerRadius=g,h.bottomLeftCornerRadius=f,h.setProperties(KD(h,u))})}updateTargetSelection(t){return t.targetSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetNodes(t){const{targetSelection:e,isHighlight:i}=t,s=i?this.properties.highlightStyle.item:void 0;e.each((o,a)=>{const{x:n,y:r,shape:l,size:c,rotation:h,fill:u,fillOpacity:d,stroke:p,strokeOpacity:g,strokeWidth:f,lineDash:x,lineDashOffset:y}=a;o.size=c,o.shape=l==="line"?FY:l,o.fill=s?.fill??u,o.fillOpacity=s?.fillOpacity??d,o.stroke=s?.stroke??p,o.strokeOpacity=s?.strokeOpacity??g,o.strokeWidth=s?.strokeWidth??f,o.lineDash=s?.lineDash??x,o.lineDashOffset=s?.lineDashOffset??y,o.translationX=n,o.translationY=r,o.rotation=h})}updateTargetLabelSelection(t){return t.targetLabelSelection.update(t.targetData)}updateTargetLabelNodes(t){const{targetLabelSelection:e}=t;e.each((i,s)=>{const{x:o,y:a,text:n}=s,{offsetX:r,offsetY:l,fill:c,fontStyle:h,fontWeight:u,fontSize:d,fontFamily:p,textAlign:g,textBaseline:f}=s.label;i.visible=!0,i.x=o+r,i.y=a+l,i.text=n,i.fill=c,i.fontStyle=h,i.fontWeight=u,i.fontSize=d,i.fontFamily=p,i.textAlign=g,i.textBaseline=f})}updateTickSelection(t){return t.tickSelection.update(t.tickData,void 0,e=>e.tickId)}updateTickNodes(t){const{gaugeRect:e,properties:i}=this,s=i.defaultScale,{enabled:o,color:a,fontFamily:n=s.label.fontFamily,fontSize:r=s.label.fontSize,fontStyle:l,fontWeight:c=s.label.fontWeight,spacing:h}=i.scale.label;let{placement:u}=i.scale.label;const d=JY(i.scale.label.rotation??0);let p,g,f,x;this.horizontal?(u??(u="after"),p="center",g=u==="before"?"bottom":"top",x=this.originY+e.y+(u==="before"?-h:e.height+h)):(u??(u="before"),p=u==="before"?"end":"start",g="middle",f=this.originX+e.x+(u==="before"?-h:e.width+h)),t.tickSelection.each((y,b)=>{if(!o){y.visible=!1;return}const S=f??b.translationY,M=x??b.translationY;y.visible=!0,y.text=b.tickLabel,y.fill=a,y.fontFamily=n,y.fontSize=r,y.fontStyle=l,y.fontWeight=c,y.textBaseline=g,y.textAlign=p,y.x=S,y.y=M,y.rotationCenterX=S,y.rotationCenterY=M,y.rotation=d})}updateLabelSelection(t){return t.labelSelection.update(t.labelData,void 0,e=>"primary")}updateLabelNodes(t){const{labelSelection:e}=t,i=this.ctx.animationManager.isSkipped();e.each((s,o)=>{s.fill=o.fill,s.fontStyle=o.fontStyle,s.fontWeight=o.fontWeight,s.fontFamily=o.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}labelsHaveExplicitText(){for(const{datum:t}of this.labelSelection)if(t.text==null)return!1;return!0}formatLabelText(t){const{labelSelection:e,horizontal:i,scale:s,seriesRect:o,gaugeRect:a}=this,{x:n,y:r,width:l,height:c}=a,h=t?.label??this.properties.value;let u;if(i){const g=s.convert(h);u=new Ih(n,r,g-n,c)}else{const g=s.convert(h);u=new Ih(n,g,l,c-g)}const d={seriesRect:o,gaugeRect:a,barRect:u},{margin:p}=this.properties;pvt(this,e,{padding:p,horizontal:i},d,t)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),gvt([this.datumSelection],KD),this.formatLabelText()}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}animateLabelText(t={}){const{animationManager:e}=this.ctx;let i=0,s=0;if(this.labelSelection.each((o,a)=>{o.opacity=1,i=o.previousDatum?.value??t.from??a.value,s=a.value}),!this.labelsHaveExplicitText())if(i===s)this.formatLabelText({label:s});else{const o=`${this.id}_labels`;e.animate({id:o,groupId:"label",from:{label:i},to:{label:s},phase:t.phase??"update",ease:Dvt.easeOut,onUpdate:a=>this.formatLabelText(a)})}}animateEmptyUpdateReady(){const{animationManager:t}=this.ctx,{node:e}=ZY(!0,this.horizontal);Nw(this.id,"node",t,[this.datumSelection],e,(i,s)=>s.itemId),Nw(this.id,"label",t,[this.labelSelection],BY,()=>"primary"),this.animateLabelText({from:0,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:t}=this.ctx,{node:e}=ZY(!1,this.horizontal);Nw(this.id,"node",t,[this.datumSelection],e,(i,s)=>s.itemId),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return[0,1]}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(t){const{id:e,properties:i}=this,{tooltip:s}=i;if(!i.isValid())return;let o,a;if(t.type===0?(o=i.value,a=i.label.text):{value:o,text:a}=i.targets[t.index],o!=null)return s.formatTooltip(this.properties,{data:[{label:a,fallbackLabel:"Value",value:this.formatLabel(o)}]},{seriesId:e,title:void 0,datum:void 0,value:o})}pickNodeClosestDatum(t){return GY(this,t)}pickFocus(t){return jY(this,t)}getCaptionText(){return this.formatLabel(this.properties.value)}getCategoryValue(t){}datumIndexForCategoryValue(t){}};$D.className="LinearGaugeSeries",$D.type="linear-gauge";var Lvt=(E(),C(w)),xt=(P(),C(et)),{commonSeriesOptionsDefs:Nvt,autoSizedLabelOptionsDefs:Ovt,seriesLabelOptionsDefs:wvt,tooltipOptionsDefs:Evt,numberFormatValidator:_vt}=Lvt._ModuleSupport,XD={fills:xt.gradientColorStops,fillMode:(0,xt.union)("continuous","discrete")},i5={value:(0,xt.required)(xt.number),text:xt.string,shape:(0,xt.or)((0,xt.union)("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),xt.callback),placement:(0,xt.union)("before","after","middle"),spacing:xt.positiveNumber,size:xt.positiveNumber,rotation:xt.number,...xt.fillOptionsDef,...xt.strokeOptionsDef,...xt.lineDashOptionsDef},Wd={type:(0,xt.required)((0,xt.constant)("linear-gauge")),value:(0,xt.required)(xt.number),direction:(0,xt.union)("horizontal","vertical"),cornerMode:(0,xt.union)("container","item"),cornerRadius:xt.positiveNumber,thickness:xt.positiveNumber,scale:{min:(0,xt.and)(xt.number,(0,xt.lessThan)("max")),max:(0,xt.and)(xt.number,(0,xt.greaterThan)("min")),label:{enabled:xt.boolean,formatter:xt.callback,rotation:xt.number,spacing:xt.positiveNumber,minSpacing:xt.positiveNumber,placement:(0,xt.union)("before","after"),avoidCollisions:xt.boolean,format:_vt,...xt.fontOptionsDef},interval:{values:(0,xt.arrayOf)(xt.number),step:xt.number},...XD,...xt.fillOptionsDef,...xt.strokeOptionsDef,...xt.lineDashOptionsDef},targets:(0,xt.arrayOfDefs)(i5,"target options array"),segmentation:{enabled:xt.boolean,spacing:xt.positiveNumber,interval:{values:(0,xt.arrayOf)(xt.number),step:xt.number,count:xt.number}},bar:{enabled:xt.boolean,thickness:xt.positiveNumber,thicknessRatio:xt.ratio,...XD,...xt.fillOptionsDef,...xt.strokeOptionsDef,...xt.lineDashOptionsDef},label:{...Ovt,text:xt.string,spacing:xt.positiveNumber,avoidCollisions:xt.boolean,placement:(0,xt.union)("inside-start","outside-start","inside-end","outside-end","inside-center","bar-inside","bar-inside-end","bar-outside-end","bar-end")},tooltip:Evt,...Nvt};Wd.margin=xt.number,Wd.defaultColorRange=(0,xt.arrayOf)(xt.color),Wd.defaultTarget={...i5,value:xt.number,label:{...wvt,spacing:xt.number}},Wd.defaultScale=Wd.scale,Wd.scale.defaultFill=xt.color;var Rvt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"linear-gauge",moduleFactory:t=>new $D(t),tooltipDefaults:{range:10},themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{thickness:50,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},RY._ModuleSupport.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["./2",RY._ModuleSupport.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},label:{spacing:11}},bar:{strokeWidth:0},segmentation:{enabled:!1,interval:{},spacing:1},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"after",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},defaultScale:{label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},label:{enabled:!1,placement:"inside-start",fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[2]},minimumFontSize:12,spacing:18,color:{$ref:"backgroundColor"}},margin:4}}},Pvt={type:"series",name:"linear-gauge",chartType:"gauge",enterprise:!0,options:Wd,create:t=>new $D(t)},s5=(E(),C(w)),zx={zoom:{axes:"xy",anchorPointX:"pointer",anchorPointY:"pointer",buttons:{anchorPointX:"middle",anchorPointY:"middle"}},legend:{enabled:!1},gradientLegend:{enabled:!1}},o5=(E(),C(w)),a5=(P(),C(et)),Bvt=(E(),C(w)),zvt=1e-9;function n5(t,e,i,s){const[o,a]=t,[n,r]=e,l=n-o,c=r-a,h=l*l+c*c;let u,d;if(Math.abs(h)<zvt)u=o,d=a;else{let f=((i-o)*l+(s-a)*c)/h;f=Math.max(0,Math.min(1,f)),u=o+f*(n-o),d=a+f*(r-a)}const p=i-u,g=s-d;return p*p+g*g}function r5(t,e,i){let s=1/0,o=t[t.length-1];for(const a of t)s=Math.min(s,n5(o,a,e,i)),o=a;return Math.sqrt(s)}function Ow(t){let[e,i]=t[0],s=0;for(let o=1;o<t.length;o+=1){const[a,n]=t[o],r=Math.hypot(a-e,n-i);s+=r,e=a,i=n}return s}function ZD(t){if(t.length===0)return;const e=Ow(t)/2;let[i,s]=t[0],o=0;for(let a=1;a<t.length;a+=1){const[n,r]=t[a],l=Math.hypot(n-i,r-s),c=o+l;if(c>e){const h=(e-o)/l,u=[i+(n-i)*h,s+(r-s)*h],d=Math.atan2(r-s,n-i);return{point:u,angle:d}}o=c,i=n,s=r}}var Fvt=(E(),C(w)),{LonLatBBox:Gvt}=Fvt._ModuleSupport;function Fx(t,e,i,s,o){return t==null?t=new Gvt(e,i,s,o):(t.lon0=Math.min(t.lon0,e),t.lat0=Math.min(t.lat0,i),t.lon1=Math.max(t.lon1,s),t.lat1=Math.max(t.lat1,o)),t}function Ud(t,e){return t.forEach(i=>{const[s,o]=i;e=Fx(e,s,o,s,o)}),e}function jvt(t){if(t.length===0)return;let e=0,i=0,s=0,[o,a]=t[t.length-1];for(const[n,r]of t){const l=o*r-n*a;s+=l,e+=(o+n)*l,i+=(a+r)*l,o=n,a=r}return s*=3,[e/s,i/s]}function qD(t,e,i){let s=!1,o=1/0;for(const a of t){let n=a[a.length-1],[r,l]=n;for(const c of a){const[h,u]=c;u>i!=l>i&&e<(r-h)*(i-u)/(l-u)+h&&(s=!s),o=Math.min(o,n5(n,c,e,i)),n=c,r=h,l=u}}return(s?-1:1)*Math.sqrt(o)}var{Path:Vvt,ExtendedPath2D:Wvt,BBox:Uvt,ScenePathChangeDetection:l5}=Bvt._ModuleSupport,ff=class extends Vvt{constructor(){super(...arguments),this.projectedGeometry=void 0,this.renderMode=3,this.strokePath=new Wvt}computeBBox(){return(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.bbox?.clone()}updatePath(){const{projectedGeometry:t}=this;this.strokePath.clear(),this.path.clear(),this.bbox=t!=null?this.drawGeometry(t,void 0):void 0}drawPath(t){super.drawPath(t),this.renderStroke(t,this.strokePath.getPath2D())}containsPoint(t,e){const{projectedGeometry:i}=this;return i==null||!this.getBBox().containsPoint(t,e)?!1:this.geometryDistance(i,t,e)<=0}distanceSquared(t,e){const{projectedGeometry:i}=this;if(i==null)return 1/0;const s=this.geometryDistance(i,t,e);return s>0?s*s:0}geometryDistance(t,e,i){const{renderMode:s,strokeWidth:o}=this,a=(s&1)!==0,n=(s&2)!==0,r=Math.max(o/2,1)+1;switch(t.type){case"GeometryCollection":return t.geometries.reduce((l,c)=>Math.min(l,this.geometryDistance(c,e,i)),1/0);case"MultiPolygon":return a?t.coordinates.reduce((l,c)=>Math.min(l,Math.max(qD(c,e,i),0)),1/0):1/0;case"Polygon":return a?Math.max(qD(t.coordinates,e,i),0):1/0;case"MultiLineString":return n?t.coordinates.reduce((l,c)=>Math.min(l,Math.max(r5(c,e,i)-r,0)),1/0):1/0;case"LineString":return n?Math.max(r5(t.coordinates,e,i)-r,0):1/0;case"MultiPoint":case"Point":default:return 1/0}}drawGeometry(t,e){const{renderMode:i,path:s,strokePath:o}=this,a=(i&1)!==0,n=(i&2)!==0;switch(t.type){case"GeometryCollection":t.geometries.forEach(r=>{e=this.drawGeometry(r,e)});break;case"MultiPolygon":a&&t.coordinates.forEach(r=>{e=this.drawPolygon(s,r,e)});break;case"Polygon":a&&(e=this.drawPolygon(s,t.coordinates,e));break;case"LineString":n&&(e=this.drawLineString(o,t.coordinates,e,!1));break;case"MultiLineString":n&&t.coordinates.forEach(r=>{e=this.drawLineString(o,r,e,!1)});break;case"Point":case"MultiPoint":break}return e}drawPolygon(t,e,i){if(e.length<1)return i;i=this.drawLineString(t,e[0],i,!0);for(let s=1;s<e.length;s+=1){const o=e[s];this.drawLineString(t,o,void 0,!0)}return i}drawLineString(t,e,i,s){if(e.length<2)return i;const o=s?e.length-1:e.length;for(let a=0;a<o;a+=1){const[n,r]=e[a];if(a===0?t.moveTo(n,r):t.lineTo(n,r),i==null)i=new Uvt(n,r,0,0);else{const{x:l,y:c}=i,h=l+i.width,u=c+i.height;i.x=Math.min(l,n),i.y=Math.min(c,r),i.width=Math.max(h,n)-i.x,i.height=Math.max(u,r)-i.y}}return s&&t.closePath(),i}};m([l5()],ff.prototype,"projectedGeometry",2),m([l5()],ff.prototype,"renderMode",2);function mf(t,e){if(t.bbox!=null){const[i,s,o,a]=t.bbox;return e=Fx(e,i,s,o,a),e}switch(t.type){case"GeometryCollection":t.geometries.forEach(i=>{e=mf(i,e)});break;case"MultiPolygon":t.coordinates.forEach(i=>{i.length>0&&(e=Ud(i[0],e))});break;case"Polygon":t.coordinates.length>0&&(e=Ud(t.coordinates[0],e));break;case"MultiLineString":t.coordinates.forEach(i=>{e=Ud(i,e)});break;case"LineString":e=Ud(t.coordinates,e);break;case"MultiPoint":t.coordinates.forEach(i=>{const[s,o]=i;e=Fx(e,s,o,s,o)});break;case"Point":{const[i,s]=t.coordinates;e=Fx(e,i,s,i,s);break}}return e}function QD(t){switch(t.type){case"GeometryCollection":{let e,i;return t.geometries.forEach(s=>{const o=QD(s);if(o==null)return;const a=Ud(o[0],void 0);if(a==null)return;const n=Math.abs(a.lat1-a.lat0)*Math.abs(a.lon1-a.lon0);(e==null||n>e)&&(e=n,i=o)}),i}case"MultiPolygon":{let e,i;return t.coordinates.forEach(s=>{const o=Ud(s[0],void 0);if(o==null)return;const a=Math.abs(o.lat1-o.lat0)*Math.abs(o.lon1-o.lon0);(e==null||a>e)&&(e=a,i=s)}),i}case"Polygon":return t.coordinates;case"MultiLineString":case"LineString":case"MultiPoint":case"Point":return}}function JD(t){switch(t.type){case"GeometryCollection":{let e,i;return t.geometries.forEach(s=>{const o=JD(s);if(o==null)return;const a=Ow(o);a!=null&&(e==null||a>e)&&(e=a,i=o)}),i}case"MultiLineString":{let e=0,i;return t.coordinates.forEach(s=>{const o=Ow(s);o>e&&(e=o,i=s)}),i}case"LineString":return t.coordinates;case"MultiPolygon":case"Polygon":case"MultiPoint":case"Point":return}}function ww(t,e){if(t==null)return!1;switch(t.type){case"GeometryCollection":return t.geometries.some(i=>ww(i,e));case"MultiPolygon":case"Polygon":return(e&1)!==0;case"MultiLineString":case"LineString":return(e&2)!==0;case"MultiPoint":case"Point":return(e&4)!==0}}function Th(t,e){switch(t.type){case"GeometryCollection":return{type:"GeometryCollection",geometries:t.geometries.map(i=>Th(i,e))};case"Polygon":return{type:"Polygon",coordinates:Ew(t.coordinates,e)};case"MultiPolygon":return{type:"MultiPolygon",coordinates:Hvt(t.coordinates,e)};case"MultiLineString":return{type:"MultiLineString",coordinates:Ew(t.coordinates,e)};case"LineString":return{type:"LineString",coordinates:_w(t.coordinates,e)};case"MultiPoint":return{type:"MultiPoint",coordinates:_w(t.coordinates,e)};case"Point":return{type:"Point",coordinates:e.convert(t.coordinates)}}}function Hvt(t,e){return t.map(i=>Ew(i,e))}function Ew(t,e){return t.map(i=>_w(i,e))}function _w(t,e){return t.map(i=>e.convert(i))}function Yvt(){return{fromFn:(i,s,o)=>o==="removed"?{scalingX:1,scalingY:1}:i.previousDatum==null?{scalingX:0,scalingY:0}:{scalingX:i.scalingX,scalingY:i.scalingY},toFn:(i,s,o)=>o==="removed"?{scalingX:0,scalingY:0}:{scalingX:1,scalingY:1}}}function c5(t,e){const i=t.contextNodeData?.nodeData[e.datumIndex];if(i!==void 0){for(const s of t.datumSelection.nodes())if(s.datum===i)return s}}var h5=(E(),C(w)),tNt=class extends h5._ModuleSupport.SeriesProperties{},Gx=class extends h5._ModuleSupport.DataModelSeries{addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",t=>{this.onLegendItemClick(t)}),this.ctx.chartEventManager.addListener("legend-item-double-click",t=>{this.onLegendItemDoubleClick(t)}))}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}},Kvt=(E(),C(w)),{AND:$vt,ARRAY:Xvt,COLOR_STRING:Zvt,COLOR_STRING_ARRAY:qvt,FUNCTION:Qvt,LINE_DASH:Jvt,NUMBER_ARRAY:tMt,OBJECT:u5,POSITIVE_NUMBER:Rw,RATIO:eMt,STRING:tr,TempValidate:xi,SeriesProperties:iMt,SeriesTooltip:sMt,Label:oMt}=Kvt._ModuleSupport,ni=class extends iMt{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.topologyIdKey="name",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.maxStrokeWidth=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.label=new oMt,this.tooltip=new sMt}};m([xi(Jg,{optional:!0})],ni.prototype,"topology",2),m([xi(tr,{optional:!0})],ni.prototype,"title",2),m([xi(tr,{optional:!0})],ni.prototype,"legendItemName",2),m([xi(tr)],ni.prototype,"idKey",2),m([xi(tr)],ni.prototype,"topologyIdKey",2),m([xi(tr,{optional:!0})],ni.prototype,"idName",2),m([xi(tr,{optional:!0})],ni.prototype,"labelKey",2),m([xi(tr,{optional:!0})],ni.prototype,"labelName",2),m([xi(tr,{optional:!0})],ni.prototype,"sizeKey",2),m([xi(tr,{optional:!0})],ni.prototype,"sizeName",2),m([xi(tr,{optional:!0})],ni.prototype,"colorKey",2),m([xi(tr,{optional:!0})],ni.prototype,"colorName",2),m([xi(tMt,{optional:!0})],ni.prototype,"sizeDomain",2),m([xi($vt(qvt,Xvt.restrict({minLength:1})),{optional:!0})],ni.prototype,"colorRange",2),m([xi(Rw,{optional:!0})],ni.prototype,"maxStrokeWidth",2),m([xi(Zvt)],ni.prototype,"stroke",2),m([xi(eMt)],ni.prototype,"strokeOpacity",2),m([xi(Rw)],ni.prototype,"strokeWidth",2),m([xi(Jvt)],ni.prototype,"lineDash",2),m([xi(Rw)],ni.prototype,"lineDashOffset",2),m([xi(Qvt,{optional:!0})],ni.prototype,"itemStyler",2),m([xi(u5)],ni.prototype,"label",2),m([xi(u5)],ni.prototype,"tooltip",2);var{getMissCount:aMt,createDatumId:d5,SeriesNodePickMode:p5,valueProperty:jx,CachedTextMeasurerPool:nMt,ColorScale:rMt,LinearScale:lMt,Selection:Pw,Text:cMt,Transformable:hMt}=o5._ModuleSupport,tk=class extends Gx{constructor(t){super({moduleCtx:t,categoryKey:void 0,useLabelLayer:!0,pickModes:[p5.EXACT_SHAPE_MATCH,p5.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new ni,this._chartTopology=void 0,this.colorScale=new rMt,this.sizeScale=new lMt,this.datumSelection=Pw.select(this.contentGroup,()=>this.nodeFactory()),this.labelSelection=Pw.select(this.labelGroup,cMt),this.highlightDatumSelection=Pw.select(this.highlightNode,()=>this.nodeFactory()),this._previousDatumMidPoint=void 0}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&this.topology!=null}renderToOffscreenCanvas(){return!0}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[1,t],this.highlightGroup.zIndex=[2,t],!0):!1}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}nodeFactory(){const t=new ff;return t.renderMode=2,t.lineJoin="round",t.lineCap="round",t}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,topology:i,sizeScale:s,colorScale:o}=this,{topologyIdKey:a,idKey:n,sizeKey:r,colorKey:l,labelKey:c,sizeDomain:h,colorRange:u}=this.properties,d=new Map;i?.features.forEach(S=>{const M=S.properties?.[a];M==null||!ww(S.geometry,2)||d.set(M,S)});const p=this.sizeScale.type,g=this.colorScale.type,f=this.scale?.type,{dataModel:x,processedData:y}=await this.requestDataModel(t,e,{props:[jx(n,f,{id:"idValue",includeProperty:!1}),jx(n,f,{id:"featureValue",includeProperty:!1,processor:()=>S=>d.get(S)}),...c!=null?[jx(c,"band",{id:"labelValue"})]:[],...r!=null?[jx(r,p,{id:"sizeValue"})]:[],...l!=null?[jx(l,g,{id:"colorValue"})]:[]]}),b=x.resolveColumnById(this,"featureValue",y);if(this.topologyBounds=b.reduce((S,M)=>{const D=M?.geometry;return D==null?S:mf(D,S)},void 0),r!=null){const S=x.resolveProcessedDataIndexById(this,"sizeValue"),M=y.domain.values[S]??[];s.domain=h??M}if(u!=null&&this.isColorScaleValid()){const S=x.resolveProcessedDataIndexById(this,"colorValue");o.domain=y.domain.values[S],o.range=u,o.update()}i==null&&a5.Logger.warnOnce("no topology was provided for [MapLineSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const s=e.resolveProcessedDataIndexById(this,"colorValue"),o=i.input.count,a=aMt(this,i.defs.values[s].missing);return!(o===0||o===a)}getLabelDatum(t,e,i,s){if(e==null||i==null)return;const o=JD(i);if(o==null)return;const{idKey:a,idName:n,sizeKey:r,sizeName:l,colorKey:c,colorName:h,labelKey:u,labelName:d,label:p}=this.properties,g=this.getLabelText(p,{value:e,datum:t,idKey:a,idName:n,sizeKey:r,sizeName:l,colorKey:c,colorName:h,labelKey:u,labelName:d});if(g==null)return;const f=nMt.measureText(String(g),{font:s}),x=ZD(o);if(x==null)return;const[y,b]=x.point,{width:S,height:M}=f;return{point:{x:y,y:b,size:0},label:{width:S,height:M,text:g},anchor:void 0,placement:void 0}}createNodeData(){const{id:t,dataModel:e,processedData:i,sizeScale:s,properties:o,scale:a}=this,{idKey:n,sizeKey:r,colorKey:l,labelKey:c,label:h}=o;if(e==null||i==null)return;const u=e.resolveColumnById(this,"idValue",i),d=e.resolveColumnById(this,"featureValue",i),p=c!=null?e.resolveColumnById(this,"labelValue",i):void 0,g=r!=null?e.resolveColumnById(this,"sizeValue",i):void 0,f=l!=null?e.resolveColumnById(this,"colorValue",i):void 0,x=o.maxStrokeWidth??o.strokeWidth;s.range=[Math.min(o.strokeWidth,x),x];const y=h.getFont(),b=new Map;i.dataSources.get(this.id)?.forEach((I,N)=>{const O=u[N],R=d[N]?.geometry??void 0,_=R!=null&&a!=null?Th(R,a):void 0;O!=null&&_!=null&&b.set(O,_)});const S=[],M=[],D=[];(i.dataSources.get(this.id)??[]).forEach((I,N)=>{const O=u[N],R=f?.[N],_=g?.[N],B=p?.[N],W=b.get(O);W==null&&D.push(O);const F=this.getLabelDatum(I,B,W,y);F!=null&&M.push(F),S.push({series:this,itemId:n,datum:I,datumIndex:N,idValue:O,labelValue:B,colorValue:R,sizeValue:_,projectedGeometry:W})});const T=10;if(D.length>T){const I=D.length-T;D.length=T,D.push(`(+${I} more)`)}return D.length>0&&a5.Logger.warnOnce("some data items do not have matches in the provided topology",D),{itemId:t,nodeData:S,labelData:M}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t,highlightDatumSelection:e}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let i=this.ctx.highlightManager?.getActiveHighlight();i!=null&&(i.series!==this||i.datum==null)&&(i=void 0);const s=this.contextNodeData?.nodeData??[];this.datumSelection=this.updateDatumSelection({nodeData:s,datumSelection:t}),this.updateDatumNodes({datumSelection:t,isHighlight:!1}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:i!=null?[i]:[],datumSelection:e}),this.updateDatumNodes({datumSelection:e,isHighlight:!0})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>d5(e.idValue))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return{stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset}}getItemStyleOverrides(t,e,i,s,o,a){const{id:n,properties:r,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:u}=r;let d;if(!a&&i!=null&&(d??(d={}),d.stroke=this.isColorScaleValid()?l.convert(i):h?.[0]??r.stroke),s!=null&&(d??(d={}),d.strokeWidth=c.convert(s,!0)),u!=null){const p=this.cachedDatumCallback(d5(t,a?"highlight":"node"),()=>this.callWithContext(u,{seriesId:n,datum:e,highlighted:a,...o,...d}));d??(d={}),Object.assign(d,p)}return d}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getItemBaseStyle(i);e.each((o,a)=>{const{datum:n,datumIndex:r,colorValue:l,sizeValue:c,projectedGeometry:h}=a;if(h==null){o.visible=!1,o.projectedGeometry=void 0;return}const u=this.getItemStyleOverrides(String(r),n,l,c,s,i);o.visible=!0,o.projectedGeometry=h,o.stroke=u?.stroke??s.stroke,o.strokeWidth=u?.strokeWidth??s.strokeWidth,o.strokeOpacity=u?.strokeOpacity??s.strokeOpacity,o.lineDash=u?.lineDash??s.lineDash,o.lineDashOffset=u?.lineDashOffset??s.lineDashOffset})}updatePlacedLabelData(t){this.labelSelection=this.labelSelection.update(t,e=>{e.pointerEvents=o5._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{x:l,y:c,width:h,height:u,text:d})=>{r.visible=!0,r.x=l+h/2,r.y=c+u/2,r.text=d,r.fill=i,r.fontStyle=s,r.fontWeight=o,r.fontSize=a,r.fontFamily=n,r.textAlign="center",r.textBaseline="middle"})}resetAnimation(){}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.datumSelection.each((o,a)=>{const n=o.distanceSquared(t,e);n<i&&(i=n,s=a)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}datumMidPoint(t){const{_previousDatumMidPoint:e}=this;if(e?.datum===t)return e.point;const i=t.projectedGeometry,s=i!=null?JD(i):void 0,o=s!=null?ZD(s)?.point:void 0,a=o!=null?{x:o[0],y:o[1]}:void 0;return this._previousDatumMidPoint={datum:t,point:a},a}legendItemSymbol(t){const{dataModel:e,processedData:i,properties:s}=this,{strokeWidth:o,strokeOpacity:a,lineDash:n}=s;let{stroke:r}=s;if(t!=null&&this.isColorScaleValid()){const c=e.resolveColumnById(this,"colorValue",i)[t];r=this.colorScale.convert(c)}return{marker:{fill:void 0,fillOpacity:0,stroke:void 0,strokeWidth:0,strokeOpacity:0,lineDash:[0],lineDashOffset:0,enabled:!1},line:{stroke:r,strokeWidth:o,strokeOpacity:a,lineDash:n}}}getLegendData(t){const{processedData:e,dataModel:i}=this;if(e==null||i==null)return[];const{id:s,visible:o}=this,{title:a,legendItemName:n,idKey:r,idName:l,colorKey:c,colorName:h,colorRange:u,showInLegend:d}=this.properties;if(t==="gradient"&&c!=null&&u!=null){const p=e.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:o,seriesId:s,colorName:h,colorRange:u,colorDomain:p}]}else return t==="category"?[{legendType:"category",id:s,itemId:s,seriesId:s,enabled:o,label:{text:n??a??l??r},symbol:this.legendItemSymbol(),legendItemName:n,hideInLegend:!d}]:[]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{idKey:a,idName:n,colorKey:r,colorName:l,sizeKey:c,sizeName:h,labelKey:u,labelName:d,title:p,legendItemName:g,tooltip:f}=o;if(!i||!s)return;const x=s.dataSources.get(this.id)?.[t],y=i.resolveColumnById(this,"idValue",s),b=[],S=c!=null?i.resolveColumnById(this,"sizeValue",s)[t]:void 0,M=r!=null?i.resolveColumnById(this,"colorValue",s)[t]:void 0;if(c!=null&&b.push({label:h,fallbackLabel:c,value:String(S)}),r!=null&&b.push({label:l,fallbackLabel:r,value:String(M)}),u!=null&&u!==a){const L=i.resolveColumnById(this,"labelValue",s)[t];b.push({label:d,fallbackLabel:u,value:L})}const D=this.getItemBaseStyle(!1);return Object.assign(D,this.getItemStyleOverrides(String(t),t,M,S,D,!1)),f.formatTooltip(this.properties,{heading:y[t],title:p??g,symbol:this.legendItemSymbol(t),data:b},{seriesId:e,datum:x,title:p,idKey:a,idName:n,colorKey:r,colorName:l,sizeKey:c,sizeName:h,labelKey:u,labelName:d,...D})}computeFocusBounds(t){const e=c5(this,t);return e?hMt.toCanvas(this.contentGroup,e.getBBox()):void 0}};tk.className="MapLineSeries",tk.type="map-line";var uMt=(E(),C(w)),Be=(P(),C(et)),{commonSeriesOptionsDefs:g5,seriesLabelOptionsDefs:dMt,tooltipOptionsDefs:pMt}=uMt._ModuleSupport,f5={type:(0,Be.required)((0,Be.constant)("map-line")),idKey:(0,Be.required)(Be.string),sizeKey:Be.string,colorKey:Be.string,labelKey:Be.string,idName:Be.string,sizeName:Be.string,colorName:Be.string,labelName:Be.string,topology:Be.object,topologyIdKey:Be.string,legendItemName:Be.string,maxStrokeWidth:Be.positiveNumber,title:Be.string,itemStyler:Be.callback,sizeDomain:(0,Be.arrayOf)(Be.positiveNumber),label:dMt,tooltip:pMt,...g5,...Be.strokeOptionsDef,...Be.lineDashOptionsDef,highlightStyle:{...g5.highlightStyle,...Be.strokeOptionsDef}};f5.colorRange=(0,Be.and)((0,Be.arrayOf)(Be.color),(0,Be.arrayLength)(1));var gMt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-line",moduleFactory:t=>new tk(t),tooltipDefaults:{range:"exact"},themeTemplate:{...zx,series:{stroke:s5._ModuleSupport.SAFE_STROKE_FILL_OPERATION,colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},s5._ModuleSupport.SAFE_RANGE2_OPERATION]},strokeWidth:1,maxStrokeWidth:3,lineDash:[0],lineDashOffset:0,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},tooltip:{range:"exact"}}},fMt={type:"series",name:"map-line",chartType:"topology",enterprise:!0,options:f5,create:t=>new tk(t)},eNt=(E(),C(w)),mMt=(E(),C(w)),yMt=(P(),C(et)),xMt=(E(),C(w)),{COLOR_STRING:bMt,LINE_DASH:SMt,OBJECT:vMt,POSITIVE_NUMBER:m5,RATIO:MMt,TempValidate:Hd,SeriesProperties:DMt,SeriesTooltip:kMt}=xMt._ModuleSupport,Ch=class extends DMt{constructor(){super(...arguments),this.topology=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=new kMt}};m([Hd(Jg,{optional:!0})],Ch.prototype,"topology",2),m([Hd(bMt)],Ch.prototype,"stroke",2),m([Hd(MMt)],Ch.prototype,"strokeOpacity",2),m([Hd(m5)],Ch.prototype,"strokeWidth",2),m([Hd(SMt)],Ch.prototype,"lineDash",2),m([Hd(m5)],Ch.prototype,"lineDashOffset",2),m([Hd(vMt)],Ch.prototype,"tooltip",2);var{createDatumId:AMt,SeriesNodePickMode:IMt,Group:TMt,Selection:CMt,PointerEvents:LMt}=mMt._ModuleSupport,ek=class extends Gx{constructor(t){super({moduleCtx:t,categoryKey:void 0,useLabelLayer:!0,pickModes:[IMt.EXACT_SHAPE_MATCH]}),this.properties=new Ch,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new TMt({name:"itemGroup"})),this.datumSelection=CMt.select(this.itemGroup,()=>this.nodeFactory())}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[0,t,0],this.highlightGroup.zIndex=[0,t,1],!0):!1}nodeFactory(){const t=new ff;return t.renderMode=2,t.lineJoin="round",t.lineCap="round",t.pointerEvents=LMt.None,t}processData(){const{topology:t}=this;this.topologyBounds=t?.features.reduce((e,i)=>{const s=i.geometry;return s==null?e:mf(s,e)},void 0),t==null&&yMt.Logger.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:t,topology:e,scale:i}=this;if(e==null)return;const s=[],o=[];return e.features.forEach((a,n)=>{const{geometry:r}=a,l=r!=null&&i!=null?Th(r,i):void 0;l!=null&&s.push({series:this,itemId:n,datum:a,datumIndex:0,index:n,projectedGeometry:l})}),{itemId:t,nodeData:s,labelData:o}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t}=this;this.updateSelections(),this.contentGroup.visible=this.visible;const{nodeData:e=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:e,datumSelection:t}),this.updateDatumNodes({datumSelection:t})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>AMt(e.index))}updateDatumNodes(t){const{properties:e}=this,{datumSelection:i}=t,{stroke:s,strokeOpacity:o,lineDash:a,lineDashOffset:n}=e,r=this.getStrokeWidth(e.strokeWidth);i.each((l,c)=>{const{projectedGeometry:h}=c;if(h==null){l.visible=!1,l.projectedGeometry=void 0;return}l.visible=!0,l.projectedGeometry=h,l.stroke=s,l.strokeWidth=r,l.strokeOpacity=o,l.lineDash=a,l.lineDashOffset=n})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(t){}computeFocusBounds(t){}};ek.className="MapLineBackgroundSeries",ek.type="map-line-background";var iNt=(E(),C(w)),Vx=(P(),C(et)),NMt={type:(0,Vx.required)((0,Vx.constant)("map-line-background")),topology:Vx.object,...Vx.strokeOptionsDef,...Vx.lineDashOptionsDef},OMt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-line-background",moduleFactory:t=>new ek(t),tooltipDefaults:{range:"exact"},themeTemplate:{...zx,series:{stroke:{$path:["./1",{$palette:"stroke"},{$palette:"secondHierarchyColors"}]},strokeWidth:1,lineDash:[0],lineDashOffset:0}}},wMt={type:"series",name:"map-line-background",chartType:"topology",enterprise:!0,options:NMt,create:t=>new ek(t)},y5=(E(),C(w)),x5=(P(),C(et)),b5=(E(),C(w)),EMt=(P(),C(et)),_Mt=(t,e,i)=>{let s=t,o=s;for(const a of e)if(s==null||i(s.value,a)>0)s={value:a,next:s},o=s;else{for(o=o;o.next!=null&&i(o.next.value,a)<=0;)o=o.next;o.next={value:a,next:o.next}}return s};function S5(t,e,i){const s=Ud(t[0],void 0);if(s==null)return;const o=(s.lon0+s.lon1)/2,a=(s.lat0+s.lat1)/2,n=Math.abs(s.lon1-s.lon0),r=Math.abs(s.lat1-s.lat0),l=jvt(t[0]),[c,h]=l,u=-qD(t,c,h);let d;const p=(D,L)=>{const I=Math.max(L-u,0);return D-.5*I},g=(D,L,T)=>{const{distance:I,maxDistance:N}=i(t,D,L,T),O=Math.hypot(c-D,h-L),R=Math.min(Math.max(c,D-T/2),D+T/2),_=Math.min(Math.max(h,L-T/2),L+T/2),B=Math.hypot(c-R,h-_),W=p(I,O),F=p(N,B);return{distance:I,maxDistance:N,value:W,maxValue:F,x:D,y:L,stride:T}},f=(D,L,T,I)=>{const N=g(L,T,I);N.maxDistance>=0&&D.push(N)},x=Math.min(n,r)/2;let y={value:g(o,a,x),next:null};for(;y!=null;){const D=y.value,{distance:L,value:T,maxValue:I,x:N,y:O,stride:R}=D;if(y=y.next,L>0&&(d==null||T>d.value)&&(d=D),d!=null&&I-d.value<=e)continue;const _=R/2,B=[];f(B,N-_,O-_,_),f(B,N+_,O-_,_),f(B,N-_,O+_,_),f(B,N+_,O+_,_),B.sort(v5),y=_Mt(y,B,v5)}if(d==null)return;const{distance:b,x:S,y:M}=d;return{x:S,y:M,distance:b}}var v5=(t,e)=>e.maxValue-t.maxValue;function Bw(t,e){const i=S5(t,e,(a,n,r,l)=>{const c=-qD(a,n,r),h=c+l*Math.SQRT2;return{distance:c,maxDistance:h}});if(i==null)return;const{x:s,y:o}=i;return[s,o]}function M5(t,e){let i;switch(t.type){case"GeometryCollection":return t.geometries.flatMap(s=>M5(s,e));case"MultiPoint":return t.coordinates;case"Point":return[t.coordinates];case"MultiPolygon":{const s=QD(t);i=s!=null?Bw(s,e):void 0;break}case"Polygon":{const s=t.coordinates;i=s!=null?Bw(s,e):void 0;break}case"MultiLineString":{const s=JD(t);i=s!=null?ZD(s)?.point:void 0;break}case"LineString":{const s=t.coordinates;i=ZD(s)?.point;break}}return i!=null?[i]:[]}var RMt=(E(),C(w)),{BBox:PMt}=RMt._ModuleSupport;function D5(t){if(!t)return;const{range:e}=t,i=e[1][0]-e[0][0],s=e[1][1]-e[0][1],o=new PMt(0,0,i,s);return{series:o,axis:o}}var BMt=(E(),C(w)),{FillGradientDefaults:zMt,FillPatternDefaults:FMt,AND:GMt,ARRAY:jMt,COLOR_STRING:k5,COLOR_STRING_ARRAY:VMt,FUNCTION:WMt,NUMBER_ARRAY:UMt,OBJECT:ik,OR:HMt,COLOR_GRADIENT:YMt,COLOR_PATTERN:KMt,POSITIVE_NUMBER:sk,RATIO:A5,STRING:po,MARKER_SHAPE:$Mt,LINE_DASH:XMt,TempValidate:se,SeriesProperties:ZMt,SeriesTooltip:qMt,Label:QMt}=BMt._ModuleSupport,I5=class extends QMt{constructor(){super(...arguments),this.placement="bottom"}};m([se(po)],I5.prototype,"placement",2);var oe=class extends ZMt{constructor(){super(...arguments),this.topology=void 0,this.idKey=void 0,this.topologyIdKey="name",this.idName=void 0,this.latitudeKey=void 0,this.latitudeName=void 0,this.longitudeKey=void 0,this.longitudeName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.shape="circle",this.size=6,this.fill="black",this.fillGradientDefaults=new zMt,this.fillPatternDefaults=new FMt,this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new I5,this.tooltip=new qMt}};m([se(Jg,{optional:!0})],oe.prototype,"topology",2),m([se(po,{optional:!0})],oe.prototype,"title",2),m([se(po,{optional:!0})],oe.prototype,"legendItemName",2),m([se(po,{optional:!0})],oe.prototype,"idKey",2),m([se(po)],oe.prototype,"topologyIdKey",2),m([se(po,{optional:!0})],oe.prototype,"idName",2),m([se(po,{optional:!0})],oe.prototype,"latitudeKey",2),m([se(po,{optional:!0})],oe.prototype,"latitudeName",2),m([se(po,{optional:!0})],oe.prototype,"longitudeKey",2),m([se(po,{optional:!0})],oe.prototype,"longitudeName",2),m([se(po,{optional:!0})],oe.prototype,"labelKey",2),m([se(po,{optional:!0})],oe.prototype,"labelName",2),m([se(po,{optional:!0})],oe.prototype,"sizeKey",2),m([se(po,{optional:!0})],oe.prototype,"sizeName",2),m([se(po,{optional:!0})],oe.prototype,"colorKey",2),m([se(po,{optional:!0})],oe.prototype,"colorName",2),m([se(GMt(VMt,jMt.restrict({minLength:1})),{optional:!0})],oe.prototype,"colorRange",2),m([se($Mt)],oe.prototype,"shape",2),m([se(sk)],oe.prototype,"size",2),m([se(sk,{optional:!0})],oe.prototype,"maxSize",2),m([se(UMt,{optional:!0})],oe.prototype,"sizeDomain",2),m([se(HMt(YMt,KMt,k5))],oe.prototype,"fill",2),m([se(ik)],oe.prototype,"fillGradientDefaults",2),m([se(ik)],oe.prototype,"fillPatternDefaults",2),m([se(A5)],oe.prototype,"fillOpacity",2),m([se(k5)],oe.prototype,"stroke",2),m([se(sk)],oe.prototype,"strokeWidth",2),m([se(A5)],oe.prototype,"strokeOpacity",2),m([se(XMt)],oe.prototype,"lineDash",2),m([se(sk)],oe.prototype,"lineDashOffset",2),m([se(WMt,{optional:!0})],oe.prototype,"itemStyler",2),m([se(ik)],oe.prototype,"label",2),m([se(ik)],oe.prototype,"tooltip",2);var{CachedTextMeasurerPool:JMt,fromToMotion:t0t,StateMachine:e0t,getMissCount:i0t,createDatumId:T5,SeriesNodePickMode:C5,valueProperty:Yd,computeMarkerFocusBounds:s0t,ColorScale:o0t,LinearScale:a0t,Group:n0t,Selection:zw,Text:r0t,Marker:Fw,applyShapeStyle:l0t,getShapeStyle:L5}=b5._ModuleSupport,ok=class extends Gx{constructor(t){super({moduleCtx:t,categoryKey:void 0,useLabelLayer:!0,pickModes:[C5.EXACT_SHAPE_MATCH,C5.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new oe,this._chartTopology=void 0,this.colorScale=new o0t,this.sizeScale=new a0t,this.markerGroup=this.contentGroup.appendChild(new n0t({name:"markerGroup"})),this.labelSelection=zw.select(this.labelGroup,r0t,!1),this.markerSelection=zw.select(this.markerGroup,Fw,!1),this.highlightMarkerSelection=zw.select(this.highlightNode,Fw),this.animationState=new e0t("empty",{empty:{update:{target:"ready",action:()=>this.animateMarkers()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.resetAllAnimation(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateMarkers()},resize:{target:"ready",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){const t=this.properties.latitudeKey!=null&&this.properties.longitudeKey!=null;return super.hasData&&(this.topology!=null||t)}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[3,t],this.highlightGroup.zIndex=[4,t],!0):!1}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,topology:i,sizeScale:s,colorScale:o}=this,{topologyIdKey:a,idKey:n,latitudeKey:r,longitudeKey:l,sizeKey:c,colorKey:h,labelKey:u,sizeDomain:d,colorRange:p}=this.properties,g=new Map;i?.features.forEach(I=>{const N=I.properties?.[a];N!=null&&g.set(N,I)});const f=this.sizeScale.type,x=this.colorScale.type,y=this.scale?.type,b=r!=null&&l!=null,{dataModel:S,processedData:M}=await this.requestDataModel(t,e,{props:[...n!=null?[Yd(n,y,{id:"idValue",includeProperty:!1}),Yd(n,y,{id:"featureValue",includeProperty:!1,processor:()=>I=>g.get(I)})]:[],...b?[Yd(r,y,{id:"latValue"}),Yd(l,y,{id:"lonValue"})]:[],...u?[Yd(u,"band",{id:"labelValue"})]:[],...c?[Yd(c,f,{id:"sizeValue"})]:[],...h?[Yd(h,x,{id:"colorValue"})]:[]]}),D=n!=null?S.resolveColumnById(this,"featureValue",M):void 0,L=b?S.resolveColumnById(this,"latValue",M):void 0,T=b?S.resolveColumnById(this,"lonValue",M):void 0;if(this.topologyBounds=M.dataSources.get(this.id)?.reduce((I,N,O)=>{const _=D?.[O]?.geometry;if(_!=null&&(I=mf(_,I)),L!=null&&T!=null){const B=T[O],W=L[O];I=Fx(I,B,W,B,W)}return I},void 0),c!=null){const I=S.resolveProcessedDataIndexById(this,"sizeValue"),N=M.domain.values[I]??[];s.domain=d??N}if(p!=null&&this.isColorScaleValid()){const I=S.resolveProcessedDataIndexById(this,"colorValue");o.domain=M.domain.values[I],o.range=p,o.update()}this.animationState.transition("updateData")}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const s=e.resolveProcessedDataIndexById(this,"colorValue"),o=i.input.count,a=i0t(this,i.defs.values[s].missing);return!(o===0||o===a)}getLabelDatum(t,e,i,s,o,a){if(e==null)return;const{idKey:n,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,sizeKey:d,sizeName:p,colorKey:g,colorName:f,labelKey:x,labelName:y,label:b,shape:S}=this.properties,{placement:M}=b,D=this.getLabelText(b,{value:e,datum:t,idKey:n,idName:r,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,sizeKey:d,sizeName:p,colorKey:g,colorName:f,labelKey:x,labelName:y});if(D==null)return;const{width:L,height:T}=JMt.measureText(String(D),{font:a}),I=Fw.anchor(S);return{point:{x:i,y:s,size:o},label:{width:L,height:T,text:D},anchor:I,placement:M}}createNodeData(){const{id:t,dataModel:e,processedData:i,sizeScale:s,properties:o,scale:a}=this,{idKey:n,latitudeKey:r,longitudeKey:l,sizeKey:c,colorKey:h,labelKey:u,label:d}=o;if(e==null||i==null||a==null)return;const p=r!=null&&l!=null,g=n!=null?e.resolveColumnById(this,"idValue",i):void 0,f=n!=null?e.resolveColumnById(this,"featureValue",i):void 0,x=p?e.resolveColumnById(this,"latValue",i):void 0,y=p?e.resolveColumnById(this,"lonValue",i):void 0,b=u!=null?e.resolveColumnById(this,"labelValue",i):void 0,S=c!=null?e.resolveColumnById(this,"sizeValue",i):void 0,M=h!=null?e.resolveColumnById(this,"colorValue",i):void 0,D=o.maxSize??o.size;s.range=[Math.min(o.size,D),D];const L=d.getFont();let T;g!=null&&f!=null&&(T=new Map,i.dataSources.get(this.id)?.forEach((B,W)=>{const F=g[W],z=f[W]?.geometry??void 0,U=z!=null&&a!=null?Th(z,a):void 0;F!=null&&U!=null&&T.set(F,U)}));const I=[],N=[],O=[];(i.dataSources.get(this.id)??[]).forEach((B,W)=>{const F=g?.[W],z=y?.[W],U=x?.[W],H=M?.[W],j=S?.[W],V=b?.[W],G=j!=null?s.convert(j,!0):o.size,K=F!=null?T?.get(F):void 0;if(F!=null&&Th==null&&O.push(F),z!=null&&U!=null){const[$,Z]=a.convert([z,U]),Q=this.getLabelDatum(B,V,$,Z,G,L);Q&&N.push(Q),I.push({series:this,itemId:r,datum:B,datumIndex:W,index:-1,idValue:F,lonValue:z,latValue:U,labelValue:V,sizeValue:j,colorValue:H,point:{x:$,y:Z,size:G},midPoint:{x:$,y:Z}})}else K!=null&&M5(K,1).forEach(([$,Z],Q)=>{const q=this.getLabelDatum(B,V,$,Z,G,L);q&&N.push(q),I.push({series:this,itemId:r,datum:B,datumIndex:W,index:Q,idValue:F,lonValue:z,latValue:U,labelValue:V,sizeValue:j,colorValue:H,point:{x:$,y:Z,size:G},midPoint:{x:$,y:Z}})})});const _=10;if(O.length>_){const B=O.length-_;O.length=_,O.push(`(+${B} more)`)}return O.length>0&&EMt.Logger.warnOnce("some data items do not have matches in the provided topology",O),{itemId:t,nodeData:I,labelData:N}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}checkScaleChange(){return this.previousScale===this.scale?!1:(this.previousScale=this.scale,!0)}update({seriesRect:t}){const e=this.checkResize(t),i=this.checkScaleChange(),{markerSelection:s,highlightMarkerSelection:o}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let a=this.ctx.highlightManager?.getActiveHighlight();a!=null&&(a.series!==this||a.datum==null)&&(a=void 0);const n=this.contextNodeData?.nodeData??[];this.markerSelection=this.updateMarkerSelection({markerData:n,markerSelection:s}),this.updateMarkerNodes({markerSelection:s,isHighlight:!1,highlightedDatum:a}),this.highlightMarkerSelection=this.updateMarkerSelection({markerData:a!=null?[a]:[],markerSelection:o}),this.updateMarkerNodes({markerSelection:o,isHighlight:!0,highlightedDatum:a}),(i||e)&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePlacedLabelData(t){this.labelSelection=this.labelSelection.update(t,e=>{e.pointerEvents=b5._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection})}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{x:l,y:c,width:h,height:u,text:d})=>{r.visible=!0,r.x=l+h/2,r.y=c+u/2,r.text=d,r.fill=i,r.fontStyle=s,r.fontWeight=o,r.fontSize=a,r.fontFamily=n,r.textAlign="center",r.textBaseline="middle"})}updateMarkerSelection(t){const{markerData:e,markerSelection:i}=t;return i.update(e,void 0,s=>T5([s.index,s.idValue,s.lonValue,s.latValue]))}getMarkerItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return L5({shape:e.shape,size:e.size,fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}getMarkerItemStyleOverrides(t,e,i,s,o,a){const{id:n,properties:r,colorScale:l,sizeScale:c}=this,{colorRange:h,itemStyler:u}=r;let d;if(d??(d={}),!a&&i!=null&&(d.fill=this.isColorScaleValid()?l.convert(i):h?.[0]??r.fill),s!=null&&(d.size=c.convert(s,!0)),u!=null){const p=this.cachedDatumCallback(T5(t,a?"highlight":"node"),()=>this.callWithContext(u,{seriesId:n,datum:e,highlighted:a,...o,...d}));d??(d={}),Object.assign(d,p)}return d}updateMarkerNodes(t){const{markerSelection:e,isHighlight:i,highlightedDatum:s}=t,o=this.getMarkerItemBaseStyle(i),a=D5(this.scale);e.each((n,r)=>{const{datumIndex:l,datum:c,point:h,colorValue:u,sizeValue:d}=r,p=this.getMarkerItemStyleOverrides(String(l),c,u,d,o,i);n.shape=p?.shape??o.shape,n.size=p?.size??o.size,l0t(n,o,p,a),n.x=h.x,n.y=h.y,n.scalingCenterX=h.x,n.scalingCenterY=h.y,n.zIndex=!i&&s!=null&&c===s.datum?1:0})}isProcessedDataAnimatable(){return!0}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.ctx.animationManager.skipCurrentBatch(),this.labelSelection.cleanup(),this.markerSelection.cleanup(),this.highlightMarkerSelection.cleanup()}animateMarkers(){const{animationManager:t}=this.ctx,e=Yvt();t0t(this.id,"markers",t,[this.markerSelection,this.highlightMarkerSelection],e)}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum(t){const{x:e,y:i}=t;let s=1/0,o;return this.contextNodeData?.nodeData.forEach(a=>{const{x:n,y:r,size:l}=a.point,c=Math.max(Math.abs(n-e)-l,0),h=Math.max(Math.abs(r-i)-l,0),u=c*c+h*h;u<s&&(s=u,o=a)}),o!=null?{datum:o,distance:Math.sqrt(s)}:void 0}legendItemSymbol(t){const{dataModel:e,processedData:i,properties:s}=this,{shape:o,fillOpacity:a,stroke:n,strokeWidth:r,strokeOpacity:l,lineDash:c,lineDashOffset:h}=s;let{fill:u}=s;if(t!=null&&this.isColorScaleValid()){const p=e.resolveColumnById(this,"colorValue",i)[t];u=this.colorScale.convert(p)}return{marker:L5({shape:o,fill:u,fillOpacity:a,stroke:n,strokeWidth:r,strokeOpacity:l,lineDash:c,lineDashOffset:h},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}}getLegendData(t){const{processedData:e,dataModel:i}=this;if(e==null||i==null)return[];const{id:s,visible:o}=this,{title:a,legendItemName:n,idName:r,idKey:l,colorKey:c,colorName:h,colorRange:u,showInLegend:d}=this.properties;if(t==="gradient"&&c!=null&&u!=null){const p=e.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:o,seriesId:s,colorName:h,colorRange:u,colorDomain:p}]}else return t==="category"?[{legendType:"category",id:s,itemId:s,seriesId:s,enabled:o,label:{text:n??a??r??l??s},symbol:this.legendItemSymbol(),legendItemName:n,hideInLegend:!d}]:[]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{idKey:a,idName:n,latitudeKey:r,latitudeName:l,longitudeKey:c,longitudeName:h,colorKey:u,colorName:d,sizeKey:p,sizeName:g,labelKey:f,labelName:x,title:y,legendItemName:b,tooltip:S}=o;if(!i||!s)return;const M=s.dataSources.get(this.id)?.[t],D=p!=null?i.resolveColumnById(this,"sizeValue",s)[t]:void 0,L=u!=null?i.resolveColumnById(this,"colorValue",s)[t]:void 0,T=[];if(D!=null&&T.push({label:g,fallbackLabel:p,value:String(D)}),L!=null&&T.push({label:d,fallbackLabel:u,value:String(L)}),f!=null&&f!==a){const O=i.resolveColumnById(this,"labelValue",s)[t];T.push({label:x,fallbackLabel:f,value:O})}let I;if(a!=null)I=i.resolveColumnById(this,"idValue",s)[t];else if(r!=null&&c!=null){const O=i.resolveColumnById(this,"latValue",s)[t],R=i.resolveColumnById(this,"lonValue",s)[t];I=`${Math.abs(O).toFixed(4)}\xB0 ${O>=0?"N":"S"}, ${Math.abs(R).toFixed(4)}\xB0 ${R>=0?"W":"E"}`}const N=this.getMarkerItemBaseStyle(!1);return Object.assign(N,this.getMarkerItemStyleOverrides(String(t),t,L,D,N,!1)),S.formatTooltip(this.properties,{heading:I,title:y??b,symbol:this.legendItemSymbol(t),data:T},{seriesId:e,datum:M,title:y,idKey:a,idName:n,latitudeKey:r,latitudeName:l,longitudeKey:c,longitudeName:h,colorKey:u,colorName:d,sizeKey:p,sizeName:g,labelKey:f,labelName:x,...N})}getFormattedMarkerStyle(t){const{datumIndex:e,colorValue:i,sizeValue:s}=t,o=this.getMarkerItemBaseStyle(!1);return Object.assign(o,this.getMarkerItemStyleOverrides(String(e),e,i,s,o,!1)),{size:o.size}}computeFocusBounds(t){return s0t(this,t)}};ok.className="MapMarkerSeries",ok.type="map-marker";var c0t=(E(),C(w)),ze=(P(),C(et)),{commonSeriesOptionsDefs:N5,markerOptionsDefs:h0t,seriesLabelOptionsDefs:u0t,tooltipOptionsDefs:d0t,without:p0t}=c0t._ModuleSupport,g0t={type:(0,ze.required)((0,ze.constant)("map-marker")),idKey:ze.string,latitudeKey:ze.string,longitudeKey:ze.string,sizeKey:ze.string,colorKey:ze.string,labelKey:ze.string,idName:ze.string,latitudeName:ze.string,longitudeName:ze.string,sizeName:ze.string,colorName:ze.string,labelName:ze.string,topology:ze.object,topologyIdKey:ze.string,legendItemName:ze.string,colorRange:(0,ze.arrayOf)(ze.color),title:ze.string,maxSize:ze.positiveNumber,sizeDomain:(0,ze.arrayOf)(ze.positiveNumber),label:{placement:(0,ze.union)("top","bottom","left","right"),...u0t},tooltip:d0t,...N5,...p0t(h0t,["enabled"]),highlightStyle:{...N5.highlightStyle,...ze.fillOptionsDef,...ze.strokeOptionsDef}},f0t={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-marker",moduleFactory:t=>new ok(t),tooltipDefaults:{range:"exact"},themeTemplate:{...zx,series:{shape:"circle",maxSize:30,fill:{$palette:"fill"},stroke:{$palette:"stroke"},colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},y5._ModuleSupport.SAFE_RANGE2_OPERATION]},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:y5._ModuleSupport.FILL_PATTERN_DEFAULTS,fillOpacity:.5,label:{color:{$ref:"textColor"}}},tooltip:{range:"exact"}}},m0t={type:"series",name:"map-marker",chartType:"topology",enterprise:!0,options:g0t,create:t=>new ok(t),validate(t,e,i){const s=(0,x5.validate)(t,e,i);if(s.valid?.idKey==null&&(s.valid?.latitudeKey==null||s.valid?.longitudeKey==null)){const o=n=>i?`${i}.${n}`:n,a=`Either \`${o("idKey")}\` or both \`${o("latitudeKey")}\` and \`${o("longitudeKey")}\` are required.`;s.errors.push(new x5.ValidationError(a,i,!0))}return s}},O5=(E(),C(w)),w5=(E(),C(w)),E5=(P(),C(et));function y0t(t,{aspectRatio:e,precision:i}){const s=S5(t,i,(l,c,h,u)=>{const d=b0t(l,c,h,e),p=d+2*u*e,g=d*Math.SQRT2,f=p*Math.SQRT2;return{distance:g,maxDistance:f}});if(s==null)return;const{x:o,y:a,distance:n}=s,r=n/Math.SQRT2;return{x:o,y:a,maxWidth:r}}function x0t(t,e,i,s,o){const[a,n]=t,[r,l]=e,c=1/o,h=r-a,u=l-n,[d,p]=n<=l?t:e,[g,f]=a<=r?t:e,[x,y]=n<=l?e:t,[b,S]=a<=r?e:t;let M=1/0;if(h!==0){const O=u/h;for(let R=0;R<=1;R+=1){const _=R===0?c:-c,B=(O*a-n-_*i+s)/(O-_);if(B>=g&&B<=b){const W=Math.abs(i-B)*2;M=Math.min(M,W)}}}else for(let O=0;O<=1;O+=1){const _=(O===0?c:-c)*(a-i)+s;if(_>=p&&_<=y){const W=Math.abs(s-_)*2*o;M=Math.min(M,W)}}const D=o,L=Math.abs((d-i)/(p-s)),T=Math.abs((x-i)/(y-s));if(y<s&&T<D){const R=Math.abs(s-y)*2*o;M=Math.min(M,R)}else if(p>s&&L<D){const R=Math.abs(s-p)*2*o;M=Math.min(M,R)}const I=Math.abs((f-s)/(g-i)),N=Math.abs((S-s)/(b-i));if(b<i&&N<c){const O=Math.abs(i-b)*2;M=Math.min(M,O)}else if(g>i&&I<c){const O=Math.abs(i-g)*2;M=Math.min(M,O)}return M}function b0t(t,e,i,s){let o=!1,a=1/0;for(const n of t){let r=n[n.length-1],[l,c]=r;for(const h of n){const[u,d]=h;d>i!=c>i&&e<(l-u)*(i-d)/(c-d)+u&&(o=!o);const p=x0t(r,h,e,i,s);a=Math.min(a,p),r=h,l=u,c=d}}return(o?1:-1)*a}function ak(t,e,i){i>=e&&(t.maxX=Math.min(t.maxX,i-e)),i<=e&&(t.minX=Math.max(t.minX,i-e))}function S0t(t,e,i,s,o,a){const n=o-a/2,r=o+a/2,[l,c]=e,[h,u]=i,d=h-l,p=u-c,[g,f]=l<=h?e:i,[x,y]=l<=h?i:e;if(d!==0){const b=p/d;for(let S=0;S<=1;S+=1){const D=((S===0?n:r)-c)/b+l;D>=g&&D<=x&&ak(t,s,D)}}else Math.max(n,Math.min(c,u))<=Math.min(r,Math.max(c,u))&&ak(t,s,l);return x<s&&y>=n&&y<=r?ak(t,s,x):g>s&&f>=n&&f<=r&&ak(t,s,g),t}function v0t(t,e,i,s){const o={minX:-1/0,maxX:1/0};for(const r of t){let l=r[r.length-1];for(const c of r)S0t(o,l,c,e,i,s),l=c}const{minX:a,maxX:n}=o;return Number.isFinite(a)&&Number.isFinite(n)?{x:e+(a+n)/2,width:n-a}:{x:e,width:0}}var M0t=(E(),C(w)),{AND:D0t,ARRAY:k0t,COLOR_STRING:_5,COLOR_STRING_ARRAY:A0t,COLOR_GRADIENT:I0t,COLOR_PATTERN:T0t,FUNCTION:C0t,LINE_DASH:L0t,OR:N0t,OBJECT:nk,POSITIVE_NUMBER:Gw,RATIO:R5,STRING:nc,TempValidate:ri,SeriesProperties:O0t,SeriesTooltip:w0t,FillGradientDefaults:E0t,FillPatternDefaults:_0t}=M0t._ModuleSupport,He=class extends O0t{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.idName=void 0,this.topologyIdKey="name",this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.fill="black",this.fillGradientDefaults=new E0t,this.fillPatternDefaults=new _0t,this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.padding=0,this.label=new Ix,this.tooltip=new w0t}};m([ri(Jg,{optional:!0})],He.prototype,"topology",2),m([ri(nc,{optional:!0})],He.prototype,"title",2),m([ri(nc,{optional:!0})],He.prototype,"legendItemName",2),m([ri(nc)],He.prototype,"idKey",2),m([ri(nc,{optional:!0})],He.prototype,"idName",2),m([ri(nc)],He.prototype,"topologyIdKey",2),m([ri(nc,{optional:!0})],He.prototype,"labelKey",2),m([ri(nc,{optional:!0})],He.prototype,"labelName",2),m([ri(nc,{optional:!0})],He.prototype,"colorKey",2),m([ri(nc,{optional:!0})],He.prototype,"colorName",2),m([ri(D0t(A0t,k0t.restrict({minLength:1})),{optional:!0})],He.prototype,"colorRange",2),m([ri(N0t(I0t,T0t,_5))],He.prototype,"fill",2),m([ri(nk)],He.prototype,"fillGradientDefaults",2),m([ri(nk)],He.prototype,"fillPatternDefaults",2),m([ri(R5)],He.prototype,"fillOpacity",2),m([ri(_5)],He.prototype,"stroke",2),m([ri(R5)],He.prototype,"strokeOpacity",2),m([ri(Gw)],He.prototype,"strokeWidth",2),m([ri(L0t)],He.prototype,"lineDash",2),m([ri(Gw)],He.prototype,"lineDashOffset",2),m([ri(Gw)],He.prototype,"padding",2),m([ri(C0t,{optional:!0})],He.prototype,"itemStyler",2),m([ri(nk)],He.prototype,"label",2),m([ri(nk)],He.prototype,"tooltip",2);var{getMissCount:R0t,createDatumId:P5,SeriesNodePickMode:B5,valueProperty:rk,CachedTextMeasurerPool:P0t,TextUtils:z5,ColorScale:B0t,Group:F5,Selection:jw,Text:z0t,PointerEvents:F0t,applyShapeStyle:G0t,getShapeStyle:Vw}=w5._ModuleSupport,G5=w5._ModuleSupport.MercatorScale.fixedScale(),lk=class extends Gx{constructor(t){super({moduleCtx:t,categoryKey:void 0,useLabelLayer:!0,pickModes:[B5.EXACT_SHAPE_MATCH,B5.NEAREST_NODE]}),this.properties=new He,this._chartTopology=void 0,this.colorScale=new B0t,this.itemGroup=this.contentGroup.appendChild(new F5({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new F5({name:"itemLabelGroup"})),this.datumSelection=jw.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=jw.select(this.itemLabelGroup,z0t),this.highlightDatumSelection=jw.select(this.highlightNode,()=>this.nodeFactory()),this.previousLabelLayouts=void 0,this._previousDatumMidPoint=void 0,this.itemLabelGroup.pointerEvents=F0t.None}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&this.topology!=null}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[1,t],this.highlightGroup.zIndex=[2,t],!0):!1}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}nodeFactory(){const t=new ff;return t.renderMode=1,t.lineJoin="round",t}async processData(t){if(this.data==null||!this.properties.isValid())return;const{data:e,topology:i,colorScale:s}=this,{topologyIdKey:o,idKey:a,colorKey:n,labelKey:r,colorRange:l}=this.properties,c=new Map;i?.features.forEach(f=>{const x=f.properties?.[o];x==null||!ww(f.geometry,1)||c.set(x,f)});const h=this.colorScale.type,u=this.scale?.type,{dataModel:d,processedData:p}=await this.requestDataModel(t,e,{props:[rk(a,u,{id:"idValue",includeProperty:!1}),rk(a,u,{id:"featureValue",includeProperty:!1,processor:()=>f=>c.get(f)}),...r?[rk(r,"band",{id:"labelValue"})]:[],...n?[rk(n,h,{id:"colorValue"})]:[]]}),g=d.resolveColumnById(this,"featureValue",p);if(this.topologyBounds=g.reduce((f,x)=>{const y=x?.geometry;return y==null?f:mf(y,f)},void 0),l!=null&&this.isColorScaleValid()){const f=d.resolveProcessedDataIndexById(this,"colorValue");s.domain=p.domain.values[f],s.range=l,s.update()}i==null&&E5.Logger.warnOnce("no topology was provided for [MapShapeSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:t}=this.properties;if(!t)return!1;const{dataModel:e,processedData:i}=this;if(!e||!i)return!1;const s=e.resolveProcessedDataIndexById(this,"colorValue"),o=i.input.count,a=R0t(this,i.defs.values[s].missing);return!(o===0||o===a)}getLabelLayout(t,e,i,s,o){if(e==null||s==null)return;const{idKey:a,idName:n,colorKey:r,colorName:l,labelKey:c,labelName:h,padding:u,label:d}=this.properties,p=this.getLabelText(d,{value:e,datum:t,idKey:a,idName:n,colorKey:r,colorName:l,labelKey:c,labelName:h});if(p==null)return;const g=P0t.measureText(String(p),{font:i}),f=p.split(`
`).length,x=(g.width+2*u)/(f*z5.getLineHeight(d.fontSize)+2*u);if(o?.geometry===s&&o?.labelText===p&&o?.aspectRatio===x)return o;const y=Th(s,G5),b=QD(y);if(b==null)return;const S=y0t(b,{aspectRatio:x,precision:.001});if(S==null)return;const{x:M,y:D,maxWidth:L}=S;return{geometry:s,labelText:p,aspectRatio:x,x:M,y:D,maxWidth:L,fixedPolygon:b}}getLabelDatum(t,e){const{scale:i}=this;if(i==null)return;const{padding:s,label:o}=this.properties,{labelText:a,aspectRatio:n,x:r,y:l,maxWidth:c,fixedPolygon:h}=t,u={width:Math.ceil(c*e),height:Math.ceil(c*e/n),meta:r},d=kx(a,o,{padding:s},(M,D)=>{if(!D)return u;const L=v0t(h,r,l,M/e);return{width:L.width*e,height:M,meta:L.x}});if(d==null)return;const[{text:p,fontSize:g,lineHeight:f,width:x},y]=d;if(p===z5.EllipsisChar)return;const b=x<u.width?r:y,S=this.scale.convert(G5.invert([b,l]));return{x:S[0],y:S[1],text:p,fontSize:g,lineHeight:f}}createNodeData(){const{id:t,dataModel:e,processedData:i,properties:s,scale:o,previousLabelLayouts:a}=this,{idKey:n,colorKey:r,labelKey:l,label:c}=s;if(e==null||i==null)return;const h=o!=null?(o.range[1][0]-o.range[0][0])/o.bounds.width:NaN,u=e.resolveColumnById(this,"idValue",i),d=e.resolveColumnById(this,"featureValue",i),p=l!=null?e.resolveColumnById(this,"labelValue",i):void 0,g=r!=null?e.resolveColumnById(this,"colorValue",i):void 0,f=c.getFont(),x=new Map;this.previousLabelLayouts=x;const y=[],b=[],S=[];(i.dataSources.get(this.id)??[]).forEach((L,T)=>{const I=u[T],N=g?.[T],O=p?.[T],R=d[T]?.geometry??void 0;R==null&&S.push(I);const _=this.getLabelLayout(L,O,f,R,a?.get(I));_!=null&&x.set(I,_);const B=_!=null&&o!=null?this.getLabelDatum(_,h):void 0;B!=null&&b.push(B);const W=R!=null&&o!=null?Th(R,o):void 0;y.push({series:this,itemId:n,datum:L,datumIndex:T,idValue:I,colorValue:N,labelValue:O,projectedGeometry:W})});const D=10;if(S.length>D){const L=S.length-D;S.length=D,S.push(`(+${L} more)`)}return S.length>0&&E5.Logger.warnOnce("some data items do not have matches in the provided topology",S),{itemId:t,nodeData:y,labelData:b}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t,labelSelection:e,highlightDatumSelection:i}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let s=this.ctx.highlightManager?.getActiveHighlight();s!=null&&(s.series!==this||s.datum==null)&&(s=void 0);const o=this.contextNodeData?.nodeData??[],a=this.contextNodeData?.labelData??[];this.datumSelection=this.updateDatumSelection({nodeData:o,datumSelection:t}),this.updateDatumNodes({datumSelection:t,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:a,labelSelection:e}),this.updateLabelNodes({labelSelection:e}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:s!=null?[s]:[],datumSelection:i}),this.updateDatumNodes({datumSelection:i,isHighlight:!0})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>P5(e.idValue))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return Vw({fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}getItemStyleOverrides(t,e,i,s,o){const{id:a,properties:n,colorScale:r}=this,{colorRange:l,itemStyler:c}=n;let h;if(!o&&i!=null&&(h??(h={}),h.fill=this.isColorScaleValid()?r.convert(i):l?.[0]??n.fill),c!=null){const u=this.cachedDatumCallback(P5(t,o?"highlight":"node"),()=>this.callWithContext(c,{seriesId:a,datum:e,highlighted:o,...s,...h}));h??(h={}),Object.assign(h,u)}return Vw(h,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getItemBaseStyle(i),o=D5(this.scale);e.each((a,n)=>{const{datum:r,datumIndex:l,colorValue:c,projectedGeometry:h}=n;if(h==null){a.visible=!1,a.projectedGeometry=void 0;return}const u=this.getItemStyleOverrides(String(l),r,c,s,i);a.visible=!0,a.projectedGeometry=h,G0t(a,s,u,o)})}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:o,fontFamily:a}=this.properties.label;e.each((n,{x:r,y:l,text:c,fontSize:h,lineHeight:u})=>{n.visible=!0,n.x=r,n.y=l,n.text=c,n.fill=i,n.fontStyle=s,n.fontWeight=o,n.fontSize=h,n.lineHeight=u,n.fontFamily=a,n.textAlign="center",n.textBaseline="middle"})}resetAnimation(){}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.datumSelection.each((o,a)=>{const n=o.distanceSquared(t,e);n<i&&(i=n,s=a)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}datumMidPoint(t){const{_previousDatumMidPoint:e}=this;if(e?.datum===t)return e.point;const i=t.projectedGeometry,s=i!=null?QD(i):void 0,o=s!=null?Bw(s,2):void 0,a=o!=null?{x:o[0],y:o[1]}:void 0;return this._previousDatumMidPoint={datum:t,point:a},a}legendItemSymbol(t){const{dataModel:e,processedData:i,properties:s}=this,{fillOpacity:o,stroke:a,strokeWidth:n,strokeOpacity:r,lineDash:l,lineDashOffset:c}=s;let{fill:h}=s;if(t!=null&&this.isColorScaleValid()){const d=e.resolveColumnById(this,"colorValue",i)[t];h=this.colorScale.convert(d)}return{marker:Vw({fill:h,fillOpacity:o,stroke:a,strokeWidth:n,strokeOpacity:r,lineDash:l,lineDashOffset:c},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}}getLegendData(t){const{processedData:e,dataModel:i}=this;if(e==null||i==null)return[];const{id:s,visible:o}=this,{title:a,legendItemName:n,idKey:r,idName:l,colorKey:c,colorName:h,colorRange:u,showInLegend:d}=this.properties;if(t==="gradient"&&c!=null&&u!=null){const p=e.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:o,seriesId:s,colorName:h,colorRange:u,colorDomain:p}]}else return t==="category"?[{legendType:"category",id:s,itemId:s,seriesId:s,enabled:o,label:{text:n??a??l??r},symbol:this.legendItemSymbol(),legendItemName:n,hideInLegend:!d}]:[]}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{idKey:a,idName:n,colorKey:r,colorName:l,labelKey:c,labelName:h,legendItemName:u,title:d,tooltip:p}=o;if(!i||!s)return;const g=s.dataSources.get(this.id)?.[t],f=i.resolveColumnById(this,"idValue",s)[t],x=r!=null?i.resolveColumnById(this,"colorValue",s)[t]:void 0,y=[];if(x!=null&&y.push({label:l,fallbackLabel:r,value:String(x)}),c!=null&&c!==a){const S=i.resolveColumnById(this,"labelValue",s)[t];y.push({label:h,fallbackLabel:c,value:S})}const b=this.getItemBaseStyle(!1);return Object.assign(b,this.getItemStyleOverrides(String(t),t,x,b,!1)),p.formatTooltip(this.properties,{heading:f,title:d??u,symbol:this.legendItemSymbol(t),data:y},{seriesId:e,datum:g,title:d,idKey:a,idName:n,colorKey:r,colorName:l,labelKey:c,labelName:h,...b})}computeFocusBounds(t){return c5(this,t)}};lk.className="MapShapeSeries",lk.type="map-shape";var j0t=(E(),C(w)),ki=(P(),C(et)),{commonSeriesOptionsDefs:j5,autoSizedLabelOptionsDefs:V0t,tooltipOptionsDefs:W0t}=j0t._ModuleSupport,U0t={type:(0,ki.required)((0,ki.constant)("map-shape")),idKey:(0,ki.required)(ki.string),colorKey:ki.string,labelKey:ki.string,idName:ki.string,colorName:ki.string,labelName:ki.string,topology:ki.object,topologyIdKey:ki.string,legendItemName:ki.string,colorRange:(0,ki.arrayOf)(ki.color),padding:ki.positiveNumber,itemStyler:ki.callback,title:ki.string,label:V0t,tooltip:W0t,...j5,...ki.fillOptionsDef,...ki.strokeOptionsDef,...ki.lineDashOptionsDef,highlightStyle:{...j5.highlightStyle,...ki.fillOptionsDef,...ki.strokeOptionsDef}},H0t={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-shape",moduleFactory:t=>new lk(t),tooltipDefaults:{range:"exact"},themeTemplate:{...zx,series:{fill:{$palette:"fill"},stroke:{$ref:"backgroundColor"},colorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},O5._ModuleSupport.SAFE_RANGE2_OPERATION]},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:O5._ModuleSupport.FILL_PATTERN_DEFAULTS,fillOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,padding:2,label:{color:{$ref:"backgroundColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:"bold",overflowStrategy:"hide"}},tooltip:{range:"exact"}}},Y0t={type:"series",name:"map-shape",chartType:"topology",enterprise:!0,options:U0t,create:t=>new lk(t)},K0t=(E(),C(w)),$0t=(E(),C(w)),X0t=(P(),C(et)),Z0t=(E(),C(w)),{FillGradientDefaults:q0t,FillPatternDefaults:Q0t,COLOR_STRING:V5,COLOR_GRADIENT:J0t,COLOR_PATTERN:tDt,OR:eDt,LINE_DASH:iDt,OBJECT:Ww,POSITIVE_NUMBER:W5,RATIO:U5,TempValidate:er,SeriesProperties:sDt,SeriesTooltip:oDt}=Z0t._ModuleSupport,mn=class extends sDt{constructor(){super(...arguments),this.topology=void 0,this.fill="black",this.fillGradientDefaults=new q0t,this.fillPatternDefaults=new Q0t,this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=new oDt}};m([er(Jg,{optional:!0})],mn.prototype,"topology",2),m([er(eDt(J0t,tDt,V5))],mn.prototype,"fill",2),m([er(Ww)],mn.prototype,"fillGradientDefaults",2),m([er(Ww)],mn.prototype,"fillPatternDefaults",2),m([er(U5)],mn.prototype,"fillOpacity",2),m([er(V5)],mn.prototype,"stroke",2),m([er(U5)],mn.prototype,"strokeOpacity",2),m([er(W5)],mn.prototype,"strokeWidth",2),m([er(iDt)],mn.prototype,"lineDash",2),m([er(W5)],mn.prototype,"lineDashOffset",2),m([er(Ww)],mn.prototype,"tooltip",2);var{createDatumId:aDt,SeriesNodePickMode:nDt,Selection:rDt,Group:lDt,PointerEvents:cDt,getShapeStyle:hDt}=$0t._ModuleSupport,ck=class extends Gx{constructor(t){super({moduleCtx:t,categoryKey:void 0,useLabelLayer:!0,pickModes:[nDt.EXACT_SHAPE_MATCH]}),this.properties=new mn,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new lDt({name:"itemGroup"})),this.datumSelection=rDt.select(this.itemGroup,()=>this.nodeFactory())}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}getNodeData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(t){this._chartTopology=t,this.topology===t&&(this.nodeDataRefresh=!0)}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[0,t,0],this.highlightGroup.zIndex=[0,t,1],!0):!1}nodeFactory(){const t=new ff;return t.renderMode=1,t.lineJoin="round",t.pointerEvents=cDt.None,t}processData(){const{topology:t}=this;this.topologyBounds=t?.features.reduce((e,i)=>{const s=i.geometry;return s==null?e:mf(s,e)},void 0),t==null&&X0t.Logger.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:t,topology:e,scale:i}=this;if(e==null)return;const s=[],o=[];return e.features.forEach((a,n)=>{const{geometry:r}=a,l=r!=null&&i!=null?Th(r,i):void 0;l!=null&&s.push({series:this,itemId:n,datum:a,datumIndex:0,index:n,projectedGeometry:l})}),{itemId:t,nodeData:s,labelData:o}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:t}=this;this.updateSelections(),this.contentGroup.visible=this.visible;const{nodeData:e=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:e,datumSelection:t}),this.updateDatumNodes({datumSelection:t})}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>aDt(e.index))}updateDatumNodes(t){const{properties:e}=this,{datumSelection:i}=t,{fill:s,fillOpacity:o,stroke:a,strokeOpacity:n,lineDash:r,lineDashOffset:l}=e,c=this.getStrokeWidth(e.strokeWidth);i.each((h,u)=>{const{projectedGeometry:d}=u;if(d==null){h.visible=!1,h.projectedGeometry=void 0;return}h.visible=!0,h.projectedGeometry=d;const p=hDt({fill:s,fillOpacity:o,stroke:a,strokeWidth:c,strokeOpacity:n,lineDash:r,lineDashOffset:l},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults);h.setProperties(p)})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(t){}pickFocus(){}computeFocusBounds(t){}};ck.className="MapShapeBackgroundSeries",ck.type="map-shape-background";var uDt=(E(),C(w)),yf=(P(),C(et)),{commonSeriesOptionsDefs:dDt}=uDt._ModuleSupport,pDt={type:(0,yf.required)((0,yf.constant)("map-shape-background")),topology:yf.object,...dDt,...yf.fillOptionsDef,...yf.strokeOptionsDef,...yf.lineDashOptionsDef},gDt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["topology"],identifier:"map-shape-background",moduleFactory:t=>new ck(t),tooltipDefaults:{range:"exact"},themeTemplate:{...zx,series:{fill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$ref:"backgroundColor"},strokeWidth:1,fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:[{$mix:[{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"black",.15]},{$mix:[{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},"white",.15]}],rotation:0,reverse:!1},fillPatternDefaults:{...K0t._ModuleSupport.FILL_PATTERN_DEFAULTS,fill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]}}}}},fDt={type:"series",name:"map-shape-background",chartType:"topology",enterprise:!0,options:pDt,create:t=>new ck(t)},mDt=(E(),C(w)),yDt=(E(),C(w)),hk=(E(),C(w)),xDt=(P(),C(et)),{ChartAxisDirection:rc,PolarAxis:bDt,diff:SDt,fixNumericExtent:vDt,groupAccumulativeValueProperty:H5,keyProperty:MDt,normaliseGroupTo:DDt,resetLabelFn:kDt,seriesLabelFadeInAnimation:ADt,seriesLabelFadeOutAnimation:IDt,valueProperty:TDt,animationValidation:CDt,createDatumId:Y5,SeriesNodePickMode:K5,normalizeAngle360:$5,CategoryScale:LDt,motion:X5,applyShapeStyle:NDt,isGradientFill:ODt,getShapeStyle:Uw}=hk._ModuleSupport,wDt=class extends hk._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey}},Z5=class extends hk._ModuleSupport.PolarSeries{constructor(t,{animationResetFns:e}){super({moduleCtx:t,categoryKey:"angleValue",useLabelLayer:!0,canHaveAxes:!0,pickModes:[K5.NEAREST_NODE,K5.EXACT_SHAPE_MATCH],animationResetFns:{...e,label:kDt}}),this.NodeEvent=wDt,this.groupScale=new LDt,this.circleCache={r:0,cx:0,cy:0}}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===rc.X)return e.getDomain(this,"angleValue","key",i);{const s=e.getDomain(this,"radiusValue-end","value",i),o=Number.isFinite(s[1]-s[0])?[s[0]>0?0:s[0],s[1]<0?0:s[1]]:[];return vDt(o)}}async processData(t){const{angleKey:e,radiusKey:i,normalizedTo:s}=this.properties,o=!this.ctx.animationManager.isSkipped();if(!this.properties.isValid())return;const a=this.getStackId(),n=`${a}-trailing`,r=[];(0,xDt.isDefined)(s)&&r.push(DDt([a,n],Math.abs(s))),o&&this.processedData&&r.push(SDt(this.id,this.processedData)),o&&r.push(CDt());const l=this.visible?{}:{forceValue:0},c=this.axes[rc.Y]?.scale.type,h=this.axes[rc.X]?.scale.type;await this.requestDataModel(t,this.data,{props:[MDt(e,h,{id:"angleValue"}),TDt(i,c,{id:"radiusValue-raw",invalidValue:null,...l}),...H5(i,"normal","current",{id:"radiusValue-end",rangeId:"radiusValue-range",invalidValue:null,groupId:a,separateNegative:!0,...l},c),...H5(i,"trailing","current",{id:"radiusValue-start",invalidValue:null,groupId:n,separateNegative:!0,...l},c),...r],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,s=this.circleCache;return t!==s.r||e!==s.cx||i!==s.cy?(this.circleCache={r:t,cx:e,cy:i},!0):!1}isRadiusAxisReversed(){return this.axes[rc.Y]?.isReversed()}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}getAxisInnerRadius(){const t=this.axes[rc.Y];return t instanceof bDt?this.radius*t.innerRadiusRatio:0}createNodeData(){const{processedData:t,dataModel:e,groupScale:i}=this;if(!e||!t||t.type!=="grouped"||!this.properties.isValid())return;const s=this.axes[rc.X],o=this.axes[rc.Y],a=s?.scale,n=o?.scale;if(!a||!n)return;const r=e.resolveKeysById(this,"angleValue",t),l=e.resolveColumnById(this,"radiusValue-start",t),c=e.resolveColumnById(this,"radiusValue-end",t),h=e.resolveColumnById(this,"radiusValue-raw",t),u=e.resolveProcessedDataIndexById(this,"radiusValue-range");let d=0,p=0;s instanceof Qc&&(d=s.groupPaddingInner,p=s.paddingInner);const f=(a.bandwidth??0)*(1-p),{index:x,visibleGroupCount:y}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);i.domain=Array.from({length:y}).map((z,U)=>String(U)),i.range=[-f/2,f/2],i.paddingInner=y>1?d:0;const b=this.isRadiusAxisReversed(),S=b?this.radius:this.getAxisInnerRadius(),M=b?this.getAxisInnerRadius():this.radius,D=M+S,{angleKey:L,radiusKey:T,angleName:I,radiusName:N,label:O}=this.properties,R=(z,U,H,j)=>{const V=this.getLabelText(O,{value:U,datum:z,angleKey:L,radiusKey:T,angleName:I,radiusName:N});if(V)return{x:H,y:j,text:V,textAlign:"center",textBaseline:"middle"}},_=[],B={itemId:T,nodeData:_,labelData:_};if(!this.visible)return B;const{dataSources:W}=t,F=W.get(this.id)??[];for(const{datumIndex:z,group:U}of e.forEachGroupDatum(this,t)){const H=F[z],j=r[z];if(j==null)return;const V=h[z],G=V>=0&&!Object.is(V,-0),K=l[z],$=c[z],Z=U.aggregation[u][G?1:0]??0,Q=G===b;if(K===void 0||$===void 0)return;let q,J;if(F.length===1)q=-.5*Math.PI,J=1.5*Math.PI;else{const Kt=a.convert(j);q=$5(Kt+i.convert(String(x))),J=$5(q+i.bandwidth)}const X=q+i.bandwidth/2,st=D-n.convert(K),nt=D-n.convert($),dt=(st+nt)/2,ut=D-n.convert(0),St=D-n.convert(Z),Lt=Math.cos(X)*dt,mt=Math.sin(X)*dt,Jt=this.properties.label.enabled?R(H,V,Lt,mt):void 0,ie=this.getColumnWidth(q,J);_.push({series:this,datum:H,datumIndex:z,point:{x:Lt,y:mt,size:0},midPoint:{x:Lt,y:mt},label:Jt,angleValue:j,radiusValue:V,negative:Q,innerRadius:st,outerRadius:nt,stackInnerRadius:ut,stackOuterRadius:St,startAngle:q,endAngle:J,midAngle:X,axisInnerRadius:S,axisOuterRadius:M,columnWidth:ie,index:z})}return{itemId:T,nodeData:_,labelData:_}}getColumnWidth(t,e){return NaN}update({seriesRect:t}){const e=this.checkResize(t);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),e&&this.animationState.transition("resize"),this.animationState.transition("update")}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return Uw({fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset,cornerRadius:e.cornerRadius},e.fillGradientDefaults,e.fillPatternDefaults)}getItemStyleOverrides(t,e,i,s){const{id:o,properties:a}=this,{angleKey:n,radiusKey:r,itemStyler:l,fillGradientDefaults:c,fillPatternDefaults:h}=a;if(l==null)return;const u=this.cachedDatumCallback(Y5(t,s?"highlight":"node"),()=>this.callWithContext(l,{seriesId:o,datum:e,highlighted:s,angleKey:n,radiusKey:r,...i}));return Uw(u,c,h)}updateSectorSelection(t,e){let i=[];if(e){const l=this.ctx.highlightManager?.getActiveHighlight();l?.datum&&l.series===this&&i.push(l)}else i=this.nodeData;const s=this.isRadiusAxisReversed(),o=s?this.radius:this.getAxisInnerRadius(),a=s?this.getAxisInnerRadius():this.radius,n=this.getShapeFillBBox(),r=this.getItemBaseStyle(e);t.update(i,void 0,l=>this.getDatumId(l)).each((l,c)=>{const{datum:h,datumIndex:u,midPoint:d}=c,p=this.getItemStyleOverrides(String(u),h,r,e),g=p?.fill??r.fill,x=ODt(g)&&g.bounds==="item"?{centerX:d?.x??0,centerY:d?.y??0}:{centerX:0,centerY:0,innerRadius:o,outerRadius:a};this.updateItemPath(l,c,e),NDt(l,r,p,n,x),l.cornerRadius=p?.cornerRadius??r.cornerRadius,l.lineJoin="round"})}updateLabels(){const{label:t}=this.properties;this.labelSelection.update(this.nodeData).each((e,i)=>{t.enabled&&i.label?(e.x=i.label.x,e.y=i.label.y,e.fill=t.color,e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=i.label.text,e.textAlign=i.label.textAlign,e.textBaseline=i.label.textBaseline,e.visible=!0):e.visible=!1})}animateEmptyUpdateReady(){const{labelSelection:t}=this,e=this.getColumnTransitionFunctions();X5.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],e),ADt(this,"labels",this.ctx.animationManager,t)}animateClearingUpdateEmpty(){const{itemSelection:t}=this,{animationManager:e}=this.ctx,i=this.getColumnTransitionFunctions();X5.fromToMotion(this.id,"datums",e,[t],i),IDt(this,"labels",e,this.labelSelection)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a}=this,{angleKey:n,angleName:r,radiusKey:l,radiusName:c,tooltip:h}=a,u=o[rc.X],d=o[rc.Y];if(!i||!s||!u||!d)return;const p=s.dataSources.get(this.id)?.[t],g=i.resolveKeysById(this,"angleValue",s)[t],f=i.resolveColumnById(this,"radiusValue-raw",s)[t];if(g==null)return;const x=this.getItemBaseStyle(!1);return Object.assign(x,this.getItemStyleOverrides(String(t),t,x,!1)),h.formatTooltip(this.properties,{heading:u.formatDatum(g),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:d.formatDatum(f)}]},{seriesId:e,datum:p,title:r,angleKey:n,angleName:r,radiusKey:l,radiusName:c,...x})}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.itemSelection.nodes())}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n,fillGradientDefaults:r,fillPatternDefaults:l}=this.properties,c=Uw({fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n},r,l);return hk._ModuleSupport.isGradientFill(c.fill)&&(c.fill={...c.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:c}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{id:e,visible:i}=this,{radiusKey:s,radiusName:o,showInLegend:a}=this.properties;return[{legendType:"category",id:e,itemId:s,seriesId:e,enabled:i,label:{text:o??s},symbol:this.legendItemSymbol(),hideInLegend:!a}]}getDatumId(t){return Y5(t.angleValue)}computeLabelsBBox(){return null}},EDt=(E(),C(w)),{SeriesProperties:_Dt,FillGradientDefaults:RDt,FillPatternDefaults:PDt,SeriesTooltip:BDt,TempValidate:Ji,COLOR_STRING:q5,NUMBER:Q5,FUNCTION:zDt,LINE_DASH:FDt,OBJECT:uk,POSITIVE_NUMBER:Hw,RATIO:J5,STRING:Wx,Label:GDt,OR:jDt,COLOR_GRADIENT:VDt,COLOR_PATTERN:WDt}=EDt._ModuleSupport,Ai=class extends _Dt{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new RDt,this.fillPatternDefaults=new PDt,this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new GDt,this.tooltip=new BDt}};m([Ji(Wx)],Ai.prototype,"angleKey",2),m([Ji(Wx,{optional:!0})],Ai.prototype,"angleName",2),m([Ji(Wx)],Ai.prototype,"radiusKey",2),m([Ji(Wx,{optional:!0})],Ai.prototype,"radiusName",2),m([Ji(jDt(VDt,WDt,q5))],Ai.prototype,"fill",2),m([Ji(uk)],Ai.prototype,"fillGradientDefaults",2),m([Ji(uk)],Ai.prototype,"fillPatternDefaults",2),m([Ji(J5)],Ai.prototype,"fillOpacity",2),m([Ji(q5)],Ai.prototype,"stroke",2),m([Ji(Hw)],Ai.prototype,"strokeWidth",2),m([Ji(J5)],Ai.prototype,"strokeOpacity",2),m([Ji(FDt)],Ai.prototype,"lineDash",2),m([Ji(Hw)],Ai.prototype,"lineDashOffset",2),m([Ji(Hw)],Ai.prototype,"cornerRadius",2),m([Ji(zDt,{optional:!0})],Ai.prototype,"itemStyler",2),m([Ji(Q5)],Ai.prototype,"rotation",2),m([Ji(Wx,{optional:!0})],Ai.prototype,"stackGroup",2),m([Ji(Q5,{optional:!0})],Ai.prototype,"normalizedTo",2),m([Ji(uk)],Ai.prototype,"label",2),m([Ji(uk)],Ai.prototype,"tooltip",2);var UDt=(E(),C(w)),HDt=(E(),C(w)),{motion:YDt}=HDt._ModuleSupport;function tK(){const t={startAngle:new Map,endAngle:new Map},e=["startAngle","endAngle"],i=(n,r,l)=>{e.forEach(c=>{const h=t[c];let u=(l==="removed"||l==="updated"?n:r)[c],d=(l==="removed"?n:r)[c];isNaN(d)&&(d=n.previousDatum?.[c]??NaN);const p=u-d;Math.abs(p)>Math.PI&&(u-=Math.sign(p)*2*Math.PI),h.set(r,{from:u,to:d})})},s=(n,r)=>({startAngle:t.startAngle.get(n)[r],endAngle:t.endAngle.get(n)[r]});return{calculate:i,from:n=>s(n,"from"),to:n=>s(n,"to")}}function eK(t,e,i){if(i==="updated"){if(t.previousDatum==null||isNaN(t.previousDatum.startAngle)||isNaN(t.previousDatum.endAngle))return"added";if(isNaN(e.startAngle)||isNaN(e.endAngle))return"removed"}return i==="added"&&t.previousDatum!=null?"updated":i}function KDt(t){const e=tK();return{toFn:(o,a,n)=>{const{startAngle:r,endAngle:l}=e.to(a);let c,h,u,d,p;return n==="removed"?(c=o.innerRadius,h=o.innerRadius,u=o.columnWidth,d=o.axisInnerRadius,p=o.axisOuterRadius):(c=isNaN(a.innerRadius)?t:a.innerRadius,h=isNaN(a.outerRadius)?t:a.outerRadius,u=isNaN(a.columnWidth)?o.columnWidth:a.columnWidth,d=a.axisInnerRadius,p=a.axisOuterRadius),{innerRadius:c,outerRadius:h,columnWidth:u,axisInnerRadius:d,axisOuterRadius:p,startAngle:r,endAngle:l}},fromFn:(o,a,n)=>{n=eK(o,a,n),e.calculate(o,a,n);const{startAngle:r,endAngle:l}=e.from(a);let c,h,u,d,p;n==="removed"||n==="updated"?(c=o.innerRadius,h=o.outerRadius,u=o.columnWidth,d=o.axisInnerRadius,p=o.axisOuterRadius):(c=t,h=t,u=a.columnWidth,d=a.axisInnerRadius,p=a.axisOuterRadius);const g=YDt.NODE_UPDATE_STATE_TO_PHASE_MAPPING[n];return{innerRadius:c,outerRadius:h,columnWidth:u,axisInnerRadius:d,axisOuterRadius:p,startAngle:r,endAngle:l,phase:g}}}}function $Dt(t,{innerRadius:e,outerRadius:i,columnWidth:s,axisInnerRadius:o,axisOuterRadius:a,startAngle:n,endAngle:r}){return{innerRadius:e,outerRadius:i,columnWidth:s,axisInnerRadius:o,axisOuterRadius:a,startAngle:n,endAngle:r}}var{SectorBox:dk,motion:XDt}=UDt._ModuleSupport;function Yw(t){const{negative:e,innerRadius:i,outerRadius:s,stackInnerRadius:o,stackOuterRadius:a}=t;return{innerRadius:e?a:o,outerRadius:e?o:a,clipInnerRadius:e?s:i,clipOuterRadius:e?i:s}}function ZDt(t){const e=tK();return{toFn:(o,a,n)=>{const{startAngle:r,endAngle:l}=e.to(a);let c,h,u;if(n==="removed")c=t,h=t,u=new dk(r,l,c,h);else{let d,p;({innerRadius:c,outerRadius:h,clipInnerRadius:d,clipOuterRadius:p}=Yw(a)),isNaN(c)&&(c=t),isNaN(h)&&(h=t),isNaN(d)&&(d=t),isNaN(p)&&(p=t),u=new dk(r,l,d,p)}return{innerRadius:c,outerRadius:h,startAngle:r,endAngle:l,clipSector:u}},fromFn:(o,a,n)=>{n=eK(o,a,n),e.calculate(o,a,n);const{startAngle:r,endAngle:l}=e.from(a);let c,h,u;n==="removed"||n==="updated"?(c=o.innerRadius,h=o.outerRadius,u=o.clipSector):(c=t,h=t),u??(u=new dk(r,l,c,h));const d=XDt.NODE_UPDATE_STATE_TO_PHASE_MAPPING[n];return{innerRadius:c,outerRadius:h,startAngle:r,endAngle:l,clipSector:u,phase:d}}}}function qDt(t,e){const{startAngle:i,endAngle:s}=e,{innerRadius:o,outerRadius:a,clipInnerRadius:n,clipOuterRadius:r}=Yw(e),l=new dk(i,s,n,r);return{innerRadius:o,outerRadius:a,startAngle:i,endAngle:s,clipSector:l}}var{Sector:QDt,SectorBox:JDt,PolarZIndexMap:Kw}=yDt._ModuleSupport,pk=class extends Z5{constructor(t){super(t,{animationResetFns:{item:qDt}}),this.properties=new Ai}setSeriesIndex(t){return super.setSeriesIndex(t)?(this.contentGroup.zIndex=[0,Kw.FOREGROUND,t],this.highlightGroup.zIndex=[0,Kw.HIGHLIGHT,t],this.labelGroup.zIndex=[0,Kw.LABEL,t],!0):!1}getStackId(){return`nightingale-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new QDt}updateItemPath(t,e,i){const{negative:s}=e;if(t.centerX=0,t.centerY=0,t.startOuterCornerRadius=s?0:this.properties.cornerRadius,t.endOuterCornerRadius=s?0:this.properties.cornerRadius,t.startInnerCornerRadius=s?this.properties.cornerRadius:0,t.endInnerCornerRadius=s?this.properties.cornerRadius:0,i){const{startAngle:o,endAngle:a}=e,{innerRadius:n,outerRadius:r,clipInnerRadius:l,clipOuterRadius:c}=Yw(e);t.innerRadius=n,t.outerRadius=r,t.startAngle=o,t.endAngle=a,t.clipSector=new JDt(o,a,l,c)}}getColumnTransitionFunctions(){const t=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return ZDt(t)}};pk.className="NightingaleSeries",pk.type="nightingale";var tkt=(E(),C(w)),Ys=(P(),C(et)),{commonSeriesOptionsDefs:ekt,seriesLabelOptionsDefs:ikt,tooltipOptionsDefs:skt}=tkt._ModuleSupport,okt={type:(0,Ys.required)((0,Ys.constant)("nightingale")),angleKey:(0,Ys.required)(Ys.string),radiusKey:(0,Ys.required)(Ys.string),angleName:Ys.string,radiusName:Ys.string,grouped:Ys.boolean,stacked:Ys.boolean,stackGroup:Ys.string,normalizedTo:Ys.number,cornerRadius:Ys.positiveNumber,itemStyler:Ys.callback,label:ikt,tooltip:skt,...ekt,...Ys.fillOptionsDef,...Ys.strokeOptionsDef,...Ys.lineDashOptionsDef},iK=(E(),C(w)),{ThemeConstants:{POLAR_AXIS_TYPE:sK,POLAR_AXIS_SHAPE:akt}}=iK._ModuleSupport,oK={$path:["./shape",akt.CIRCLE,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]},nkt={series:{fill:{$palette:"fill"},stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"backgroundColor"},{$palette:"stroke"}]},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:iK._ModuleSupport.FILL_PATTERN_DEFAULTS,strokeWidth:1,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},axes:{[sK.ANGLE_CATEGORY]:{shape:oK,groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[sK.RADIUS_NUMBER]:{shape:oK}}},{ThemeConstants:{POLAR_AXIS_TYPE:aK}}=mDt._ModuleSupport,rkt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"nightingale",moduleFactory:t=>new pk(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:aK.ANGLE_CATEGORY},{type:aK.RADIUS_NUMBER}],themeTemplate:nkt,stackable:!0,groupable:!0,stackedByDefault:!0},lkt={type:"series",name:"nightingale",chartType:"polar",enterprise:!0,options:okt,create:t=>new pk(t)},sNt=(E(),C(w)),nK=(E(),C(w)),ckt=(E(),C(w)),{SeriesProperties:hkt,FillGradientDefaults:ukt,FillPatternDefaults:dkt,SeriesTooltip:pkt,TempValidate:Ii,UNION:gkt,OR:fkt,ARRAY_OF:mkt,COLOR_GRADIENT:ykt,COLOR_STRING:xkt,COLOR_STRING_ARRAY:bkt,FUNCTION:Skt,DIRECTION:vkt,BOOLEAN:Mkt,LINE_DASH:Dkt,OBJECT:xf,NUMBER:kkt,POSITIVE_NUMBER:gk,COLOR_PATTERN:Akt,RATIO:rK,STRING:lK,Label:cK,DropShadow:Ikt}=ckt._ModuleSupport,Tkt=class extends cK{},$w=class extends cK{constructor(){super(...arguments),this.spacing=0}};m([Ii(kkt)],$w.prototype,"spacing",2),m([Ii(gkt(["before","after"],"a placement"))],$w.prototype,"placement",2);var Fi=class extends hkt{constructor(){super(...arguments),this.fills=[],this.fillGradientDefaults=new ukt,this.fillPatternDefaults=new dkt,this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.direction="vertical",this.reverse=void 0,this.spacing=0,this.aspectRatio=void 0,this.shadow=new Ikt().set({enabled:!1}),this.label=new Tkt,this.stageLabel=new $w,this.tooltip=new pkt}};m([Ii(lK)],Fi.prototype,"stageKey",2),m([Ii(lK)],Fi.prototype,"valueKey",2),m([Ii(mkt(fkt(ykt,Akt,xkt)))],Fi.prototype,"fills",2),m([Ii(xf)],Fi.prototype,"fillGradientDefaults",2),m([Ii(xf)],Fi.prototype,"fillPatternDefaults",2),m([Ii(rK)],Fi.prototype,"fillOpacity",2),m([Ii(bkt)],Fi.prototype,"strokes",2),m([Ii(gk)],Fi.prototype,"strokeWidth",2),m([Ii(rK)],Fi.prototype,"strokeOpacity",2),m([Ii(Dkt)],Fi.prototype,"lineDash",2),m([Ii(gk)],Fi.prototype,"lineDashOffset",2),m([Ii(vkt)],Fi.prototype,"direction",2),m([Ii(Mkt,{optional:!0})],Fi.prototype,"reverse",2),m([Ii(gk)],Fi.prototype,"spacing",2),m([Ii(gk,{optional:!0})],Fi.prototype,"aspectRatio",2),m([Ii(Skt,{optional:!0})],Fi.prototype,"itemStyler",2),m([Ii(xf)],Fi.prototype,"shadow",2),m([Ii(xf)],Fi.prototype,"label",2),m([Ii(xf)],Fi.prototype,"stageLabel",2),m([Ii(xf)],Fi.prototype,"tooltip",2);function hK(t,{x:e,y:i,top:s,right:o,bottom:a,left:n}){t.x0=e-s/2,t.x1=e+s/2,t.x2=e+a/2,t.x3=e-a/2,t.y0=i-n/2,t.y1=i-o/2,t.y2=i+o/2,t.y3=i+n/2}function Ckt(t){return{fromFn:(o,a)=>{const{x:n,y:r}=a;let{top:l,right:c,bottom:h,left:u}=a;return t==="vertical"?(l=0,h=0):(u=0,c=0),{x:n,y:r,top:l,right:c,bottom:h,left:u}},toFn:(o,a)=>{const{x:n,y:r,top:l,right:c,bottom:h,left:u}=a;return{x:n,y:r,top:l,right:c,bottom:h,left:u}},applyFn:hK}}var{StateMachine:Lkt,valueProperty:uK,SeriesNodePickMode:dK,CachedTextMeasurerPool:Nkt,TextUtils:Okt,createDatumId:wkt,BBox:Xw,Group:Zw,Selection:fk,Text:pK,PointerEvents:gK,applyShapeStyle:Ekt,fromToMotion:_kt,seriesLabelFadeInAnimation:Rkt,getShapeStyle:qw}=nK._ModuleSupport,mk=class extends nK._ModuleSupport.DataModelSeries{constructor(t){super({moduleCtx:t,categoryKey:void 0,pickModes:[dK.EXACT_SHAPE_MATCH,dK.NEAREST_NODE]}),this.properties=new Fi,this.itemGroup=this.contentGroup.appendChild(new Zw({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Zw({name:"itemLabelGroup"})),this.stageLabelGroup=this.contentGroup.appendChild(new Zw({name:"stageLabelGroup"})),this.datumSelection=fk.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=fk.select(this.itemLabelGroup,pK),this.stageLabelSelection=fk.select(this.stageLabelGroup,pK),this.highlightDatumSelection=fk.select(this.highlightNode,()=>this.nodeFactory()),this.animationState=new Lkt("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{clear:"empty",reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable()),this.itemLabelGroup.pointerEvents=gK.None,this.stageLabelGroup.pointerEvents=gK.None}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",t=>this.onLegendItemClick(t)))}nodeFactory(){return new Jr}getNodeData(){return this.contextNodeData?.nodeData}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}async processData(t){if(this.data==null||!this.properties.isValid())return;const{id:e,visible:i,ctx:{legendManager:s}}=this,{stageKey:o,valueKey:a}=this.properties,n="band",r="number",l=(h,u,d)=>i&&s.getItemEnabled({seriesId:e,itemId:d}),c=this.visible?{}:{forceValue:0};await this.requestDataModel(t,this.data,{props:[uK(o,n,{id:"xValue"}),uK(a,r,{id:"yValue",...c,validation:l,invalidValue:0})]})}createNodeData(){const{id:t,dataModel:e,processedData:i,properties:s,visible:o,ctx:{legendManager:a}}=this,{stageKey:n,valueKey:r,direction:l,reverse:c=l==="horizontal",spacing:h,aspectRatio:u,label:d,stageLabel:p}=s;if(e==null||i==null)return;const g=l==="horizontal",f=e.resolveColumnById(this,"xValue",i),x=e.resolveColumnById(this,"yValue",i),y=Nkt.getMeasurer({font:p.getFont()});let b,S;g?(b="center",S=p.placement==="before"?"bottom":"top"):(b=p.placement==="after"?"left":"right",S="middle");const M=p.enabled?[]:void 0;let D=0,L=0,T=0;const I=i.dataSources.get(this.id)??[];I.forEach((V,G)=>{const K=f[G],$=x[G],Z=o&&a.getItemEnabled({seriesId:t,itemId:G});if(T+=$,M==null)return;const Q=this.getLabelText(this.properties.stageLabel,{datum:V,value:K,stageKey:n,valueKey:r}),{width:q}=y.measureText(Q),J=Q.split(`
`).length*Okt.getLineHeight(d.fontSize);D=Math.max(D,q),L=Math.max(L,J),M.push({x:NaN,y:NaN,text:Q,textAlign:b,textBaseline:S,visible:Z})});const N=this._nodeDataDependencies?.seriesRectWidth??0,O=this._nodeDataDependencies?.seriesRectHeight??0,R=h*(i.input.count-1);let _;if(g){const V=L+p.spacing;_=new Xw(0,p.placement==="before"?V:0,N,O-V)}else{const V=D+p.spacing;_=new Xw(p.placement==="after"?0:V,0,N-V,O)}if(u!=null&&u!==0){const V=l==="horizontal"?1/u:u,G=Math.min(_.width,_.height*V),K=G/V;_=new Xw(_.x+(_.width-G)/2,_.y+(_.height-K)/2,G,K)}let B,W;g?W=p.placement==="before"?_.y-p.spacing:_.y+_.height+p.spacing:B=p.placement==="after"?_.x+_.width+p.spacing:_.x-p.spacing;const F=_.width-(g?R:0),z=_.height-(g?0:R);if(F<0||z<0)return;const U=[],H=[];let j=0;return I.forEach((V,G)=>{const K=f[G],$=x[G],Z=o&&a.getItemEnabled({seriesId:t,itemId:G}),Q=j+$,q=(j+Q)/(2*T),J=(Q-j)/T,X=g?F*q+h*G:F*.5,st=g?z*.5:z*q+h*G,nt=_.x+X,dt=_.y+st;if(M!=null){const Kt=M[G];Kt.x=B??nt,Kt.y=W??dt}let ut,St,Lt,mt;if(g){const Kt=F*J;ut=Kt,Lt=Kt;const $t=(X+Kt/2)*(z/_.width),Dt=(X-Kt/2)*(z/_.width);St=c?_.height-$t:$t,mt=c?_.height-Dt:Dt}else{const Kt=z*J;St=Kt,mt=Kt;const $t=(st-Kt/2)*(F/_.height),Dt=(st+Kt/2)*(F/_.height);ut=c?_.width-$t:$t,Lt=c?_.width-Dt:Dt}const Jt=this.getLabelText(d,{datum:V,value:$,stageKey:n,valueKey:r}),ie={x:nt,y:dt,text:Jt,textAlign:"center",textBaseline:"middle",visible:Z};H.push(ie),U.push({series:this,itemId:r,datum:V,datumIndex:G,index:G,xValue:K,yValue:$,x:nt,y:dt,top:ut,right:St,bottom:Lt,left:mt,label:ie,enabled:Z,midPoint:{x:nt,y:dt}}),j=Q}),{itemId:t,nodeData:U,labelData:H,stageLabelData:M,bounds:_}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update({seriesRect:t}){this.checkResize(t);const{datumSelection:e,labelSelection:i,stageLabelSelection:s,highlightDatumSelection:o}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let a=this.ctx.highlightManager?.getActiveHighlight();a!=null&&(a.series!==this||a.datum==null)&&(a=void 0);const n=this.contextNodeData?.nodeData??[],r=this.contextNodeData?.labelData??[],l=this.contextNodeData?.stageLabelData??[];this.datumSelection=this.updateDatumSelection({nodeData:n,datumSelection:e}),this.updateDatumNodes({datumSelection:e,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:i}),this.updateLabelNodes({labelSelection:i,labelProperties:this.properties.label}),this.stageLabelSelection=this.updateStageLabelSelection({stageLabelData:l,stageLabelSelection:s}),this.updateLabelNodes({labelSelection:s,labelProperties:this.properties.stageLabel}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:a!=null?[a]:[],datumSelection:o}),this.updateDatumNodes({datumSelection:o,isHighlight:!0}),this.animationState.transition("update")}updateDatumSelection(t){return t.datumSelection.update(t.nodeData)}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return qw({fill:i?.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}getItemStyleOverrides(t,e,i,s,o){const{id:a,properties:n}=this,{fills:r,strokes:l,stageKey:c,valueKey:h,itemStyler:u}=n,d=s.fill??r[i%r.length],p=s.stroke??l[i%l.length],g={};if(o||(g.fill=d,g.stroke=p),u!=null){const f=this.cachedDatumCallback(wkt(t,o?"highlight":"node"),()=>this.callWithContext(u,{seriesId:a,datum:e,stageKey:c,valueKey:h,highlighted:o,fill:d,stroke:p,...s}));Object.assign(g,f)}return qw(g,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}updateDatumNodes(t){const{datumSelection:e,isHighlight:i}=t,{properties:s}=this,{shadow:o}=s,a=this.getItemBaseStyle(i),n=this.contextNodeData?.bounds,r=n?{series:n,axis:n}:void 0;e.each((l,c)=>{const{datumIndex:h,datum:u}=c,d=this.getItemStyleOverrides(String(h),u,h,a,i);Ekt(l,a,d,r),hK(l,c),l.fillShadow=o})}updateLabelSelection(t){return t.labelSelection.update(this.properties.label.enabled?t.labelData:[])}updateStageLabelSelection(t){return t.stageLabelSelection.update(t.stageLabelData)}updateLabelNodes(t){const{labelSelection:e,labelProperties:i}=t,{color:s,fontSize:o,fontStyle:a,fontWeight:n,fontFamily:r}=i;e.each((l,{visible:c,x:h,y:u,text:d,textAlign:p,textBaseline:g})=>{l.visible=c,l.x=h,l.y=u,l.text=d,l.fill=s,l.fontStyle=a,l.fontWeight=n,l.fontSize=o,l.fontFamily=r,l.textAlign=p,l.textBaseline=g})}computeFocusBounds(t){const e=this.getNodeData()?.[t.datumIndex];if(e!==void 0){for(const i of this.datumSelection)if(i.datum===e)return i.node}}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,properties:o}=this,{stageKey:a,valueKey:n,tooltip:r}=o;if(!i||!s)return;const l=s.dataSources.get(this.id)?.[t],c=i.resolveColumnById(this,"xValue",s)[t],h=i.resolveColumnById(this,"yValue",s)[t];if(c==null)return;const u=this.getLabelText(this.properties.stageLabel,{datum:s.dataSources.get(this.id)?.[t],value:h,stageKey:a,valueKey:n}),d=this.getItemBaseStyle(!1);return Object.assign(d,this.getItemStyleOverrides(String(t),t,t,d,!1)),r.formatTooltip(this.properties,{symbol:this.legendItemSymbol(t),data:[{label:String(c),value:u}]},{seriesId:e,datum:l,title:void 0,stageKey:a,valueKey:n,...d})}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}pickNodeClosestDatum({x:t,y:e}){let i=1/0,s;return this.datumSelection.each((o,a)=>{const n=o.distanceSquared(t,e);n<i&&(i=n,s=a)}),s!=null?{datum:s,distance:Math.sqrt(i)}:void 0}legendItemSymbol(t){const{fills:e,strokes:i,strokeWidth:s,fillOpacity:o,strokeOpacity:a,lineDash:n,lineDashOffset:r}=this.properties,l=e[t%e.length]??"black",c=i[t%i.length]??"black";return{marker:qw({fill:l,fillOpacity:o,stroke:c,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:r},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}}getLegendData(t){const{processedData:e,dataModel:i,id:s,ctx:{legendManager:o},visible:a}=this;if(!i||!e||t!=="category"||!this.properties.isValid())return[];const{showInLegend:n}=this.properties,r=[],l=i.resolveColumnById(this,"xValue",e);return(e.dataSources.get(this.id)??[]).forEach((h,u)=>{const d=l[u];r.push({legendType:"category",id:s,itemId:u,seriesId:s,enabled:a&&o.getItemEnabled({seriesId:s,itemId:u}),label:{text:d},symbol:this.legendItemSymbol(u),hideInLegend:!n})}),r}animateReset(){this.ctx.animationManager.skipCurrentBatch(),this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(){const{datumSelection:t,labelSelection:e,properties:i}=this,s=Ckt(i.direction);_kt(this.id,"nodes",this.ctx.animationManager,[t],s),Rkt(this,"labels",this.ctx.animationManager,e)}};mk.className="PyramidSeries",mk.type="pyramid";var Pkt=(E(),C(w)),ts=(P(),C(et)),{commonSeriesOptionsDefs:Bkt,seriesLabelOptionsDefs:fK,shadowOptionsDefs:zkt,tooltipOptionsDefs:Fkt,without:mK}=Pkt._ModuleSupport,Gkt={type:(0,ts.required)((0,ts.constant)("pyramid")),stageKey:(0,ts.required)(ts.string),valueKey:(0,ts.required)(ts.string),direction:(0,ts.union)("horizontal","vertical"),aspectRatio:ts.positiveNumber,spacing:ts.positiveNumber,reverse:ts.boolean,itemStyler:ts.callback,fills:(0,ts.arrayOf)(ts.colorUnion),strokes:(0,ts.arrayOf)(ts.color),label:fK,stageLabel:{spacing:ts.positiveNumber,placement:(0,ts.union)("before","after"),...fK},tooltip:Fkt,shadow:zkt,...Bkt,...mK(ts.fillOptionsDef,["fill"]),...mK(ts.strokeOptionsDef,["stroke"]),...ts.lineDashOptionsDef},yK=(E(),C(w)),{ThemeSymbols:{DEFAULT_SHADOW_COLOUR:jkt}}=yK._ModuleSupport,Vkt={series:{direction:"vertical",strokeWidth:0,spacing:2,fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:yK._ModuleSupport.FILL_PATTERN_DEFAULTS,label:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}},stageLabel:{enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:12},shadow:{enabled:!1,color:jkt,xOffset:3,yOffset:3,blur:5}}},Wkt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["standalone"],identifier:"pyramid",moduleFactory:t=>new mk(t),solo:!0,tooltipDefaults:{range:"exact"},themeTemplate:Vkt},Ukt={type:"series",name:"pyramid",chartType:"standalone",enterprise:!0,options:Gkt,create:t=>new mk(t)},Hkt=(E(),C(w)),Kd=(E(),C(w)),{ThemeConstants:{POLAR_AXIS_TYPE:Ykt}}=Kd._ModuleSupport,xK={series:{stroke:{$palette:"stroke"},label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},marker:{enabled:!0,fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Kd._ModuleSupport.FILL_PATTERN_DEFAULTS,fillOpacity:1,shape:"circle",size:6,strokeOpacity:1,strokeWidth:0}},axes:{[Ykt.ANGLE_CATEGORY]:{label:{spacing:10}}}},Kkt=Kd._ModuleSupport.mergeDefaults({series:{stroke:Kd._ModuleSupport.SAFE_STROKE_FILL_OPERATION,strokeWidth:2}},xK),$kt=Kd._ModuleSupport.mergeDefaults({series:{fill:{$palette:"fill"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:Kd._ModuleSupport.FILL_PATTERN_DEFAULTS,fillOpacity:.8,strokeWidth:2,marker:{enabled:!1,fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:Kd._ModuleSupport.FILL_PATTERN_DEFAULTS}}},xK),bK=(E(),C(w)),Qw=(E(),C(w)),yk=(P(),C(et)),Xkt=(E(),C(w)),{Label:Zkt,SeriesMarker:qkt,SeriesProperties:Qkt,SeriesTooltip:Jkt,TempValidate:ia,BOOLEAN:tAt,COLOR_STRING:eAt,NUMBER:iAt,LINE_DASH:sAt,OBJECT:Jw,POSITIVE_NUMBER:SK,RATIO:oAt,STRING:xk}=Xkt._ModuleSupport,go=class extends Qkt{constructor(){super(...arguments),this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.rotation=0,this.marker=new qkt,this.label=new Zkt,this.tooltip=new Jkt,this.connectMissingData=!1}};m([ia(xk)],go.prototype,"angleKey",2),m([ia(xk)],go.prototype,"radiusKey",2),m([ia(xk,{optional:!0})],go.prototype,"angleName",2),m([ia(xk,{optional:!0})],go.prototype,"radiusName",2),m([ia(eAt)],go.prototype,"stroke",2),m([ia(SK)],go.prototype,"strokeWidth",2),m([ia(oAt)],go.prototype,"strokeOpacity",2),m([ia(sAt)],go.prototype,"lineDash",2),m([ia(SK)],go.prototype,"lineDashOffset",2),m([ia(iAt)],go.prototype,"rotation",2),m([ia(Jw)],go.prototype,"marker",2),m([ia(Jw)],go.prototype,"label",2),m([ia(Jw)],go.prototype,"tooltip",2),m([ia(tAt)],go.prototype,"connectMissingData",2);var{ChartAxisDirection:ir,PolarAxis:aAt,SeriesNodePickMode:vK,valueProperty:MK,fixNumericExtent:nAt,seriesLabelFadeInAnimation:rAt,markerFadeInAnimation:lAt,resetMarkerFn:cAt,animationValidation:hAt,computeMarkerFocusBounds:uAt,extent:dAt,BBox:pAt,Group:gAt,Path:fAt,PointerEvents:mAt,Selection:DK,Text:yAt,Marker:xAt,mergeDefaults:bAt,getShapeStyle:SAt}=Qw._ModuleSupport,vAt=class extends Qw._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey}},tE=class extends Qw._ModuleSupport.PolarSeries{constructor(t){super({moduleCtx:t,categoryKey:"angleValue",useLabelLayer:!0,pickModes:[vK.NEAREST_NODE,vK.EXACT_SHAPE_MATCH],canHaveAxes:!0,animationResetFns:{item:cAt},clipFocusBox:!1}),this.properties=new go,this.NodeEvent=vAt,this.lineGroup=this.contentGroup.appendChild(new gAt({name:"radar-line"})),this.lineSelection=DK.select(this.lineGroup,fAt),this.resetInvalidToZero=!1,this.circleCache={r:0,cx:0,cy:0},this.lineGroup.zIndex=0,this.itemGroup.zIndex=1}nodeFactory(){return new xAt}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===ir.X)return e.getDomain(this,"angleValue","value",i);{const s=e.getDomain(this,"radiusValue","value",i),o=dAt(s.length===0?s:[0].concat(s));return nAt(o)}}async processData(t){if(!this.properties.isValid())return;const{angleKey:e,radiusKey:i}=this.properties,s=[];this.ctx.animationManager.isSkipped()||s.push(hAt());const o=this.axes[ir.Y]?.scale.type,a=this.axes[ir.X]?.scale.type;await this.requestDataModel(t,this.data,{props:[MK(e,a,{id:"angleValue"}),MK(i,o,{id:"radiusValue",invalidValue:void 0}),...s]}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,s=this.circleCache;return t===s.r&&e===s.cx&&i===s.cy?!1:(this.circleCache={r:t,cx:e,cy:i},!0)}getAxisInnerRadius(){const t=this.axes[ir.Y];return t instanceof aAt?this.radius*t.innerRadiusRatio:0}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}createNodeData(){const{processedData:t,dataModel:e}=this;if(!t||!e||!this.properties.isValid())return;const{angleKey:i,radiusKey:s,angleName:o,radiusName:a,marker:n,label:r}=this.properties,l=this.axes[ir.X]?.scale,c=this.axes[ir.Y]?.scale;if(!l||!c)return;const h=e.resolveColumnById(this,"angleValue",t),u=e.resolveColumnById(this,"radiusValue",t),d=this.getAxisInnerRadius(),g=(t.dataSources.get(this.id)??[]).map((f,x)=>{const y=h[x],b=u[x],S=l.convert(y),M=this.radius+d-c.convert(b),D=Math.cos(S),L=Math.sin(S),T=D*M,I=L*M;let N;if(r.enabled){const O=this.getLabelText(r,{value:b,datum:f,angleKey:i,radiusKey:s,angleName:o,radiusName:a});if(O){let R="right";(0,yk.isNumberEqual)(D,0)?R="center":D>0&&(R="left");let _="bottom";(0,yk.isNumberEqual)(L,0)?_="middle":L>0&&(_="top"),N={x:T+D*n.size,y:I+L*n.size,text:O,textAlign:R,textBaseline:_}}}return{series:this,datum:f,datumIndex:x,index:x,point:{x:T,y:I,size:n.size},midPoint:{x:T,y:I},label:N,angleValue:y,radiusValue:b,missing:!(0,yk.isFiniteNumber)(S)||!(0,yk.isFiniteNumber)(M)}});return{itemId:s,nodeData:g,labelData:g}}update({seriesRect:t}){const e=this.checkResize(t),i=!this.ctx.animationManager.isSkipped(),{series:s}=this.ctx.highlightManager?.getActiveHighlight()??{};this.highlightGroup.visible=(i||this.visible)&&s===this,this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updatePathSelections(),this.updateMarkerSelection(),this.updateMarkers(this.itemSelection,!1),this.updateMarkers(this.highlightSelection,!0),this.updateLabels(),e&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePathSelections(){const t=this.visible?[!0]:[];this.lineSelection.update(t)}updateMarkerSelection(){this.properties.marker.isDirty()&&(this.itemSelection.clear(),this.itemSelection.cleanup(),this.itemSelection=DK.select(this.itemGroup,()=>this.nodeFactory(),!1)),this.itemSelection.update(this.properties.marker.enabled?this.nodeData:[])}getMarkerFill(t){return t?.fill??this.properties.marker.fill}getDatumStylerProperties(t){const{id:e,properties:i}=this,{angleKey:s,radiusKey:o}=i;return{seriesId:e,datum:t,angleKey:s,radiusKey:o}}updateMarkers(t,e){const{visible:i}=this,{marker:s,stroke:o,strokeWidth:a,strokeOpacity:n,highlightStyle:r}=this.properties;let l=[];if(i&&s.shape&&s.enabled)if(e){const u=this.ctx.highlightManager?.getActiveHighlight();u?.datum&&(l=[u])}else l=this.nodeData;const c=bAt(e&&r.item,s.getStyle(),{stroke:o,strokeWidth:a,strokeOpacity:n}),h=this.getShapeFillBBox();t.update(l).each((u,d)=>{this.updateMarkerStyle(s,u,d.datum,d.point,this.getDatumStylerProperties(d),e,c,h)})}updateLabels(){const{label:t}=this.properties;this.labelSelection.update(this.nodeData).each((e,i)=>{t.enabled&&i.label?(e.x=i.label.x,e.y=i.label.y,e.fill=t.color,e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=i.label.text,e.textAlign=i.label.textAlign,e.textBaseline=i.label.textBaseline,e.visible=!0):e.visible=!1})}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a}=this,{angleKey:n,angleName:r,radiusKey:l,radiusName:c,tooltip:h,marker:u}=a,d=o[ir.X],p=o[ir.Y];if(!i||!s||!d||!p)return;const g=s.dataSources.get(this.id)?.[t],f=i.resolveColumnById(this,"angleValue",s)[t],x=i.resolveColumnById(this,"radiusValue",s)[t];if(f==null)return;const y=this.getMarkerStyle(u,g,this.getDatumStylerProperties(g),!1);return h.formatTooltip(this.properties,{heading:d.formatDatum(f),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:p.formatDatum(x)}]},{seriesId:e,datum:g,title:r,angleKey:n,radiusKey:l,angleName:r,radiusName:c,...y})}legendItemSymbol(){const{stroke:t,strokeWidth:e,strokeOpacity:i,lineDash:s,marker:o}=this.properties;return{marker:SAt({shape:o.shape,enabled:o.enabled||e<=0,fill:this.getMarkerFill()??o.stroke??t??"rgba(0, 0, 0, 0)",stroke:o.stroke??t??"rgba(0, 0, 0, 0)",fillOpacity:o.fillOpacity,strokeOpacity:o.strokeOpacity,strokeWidth:o.strokeWidth,lineDash:o.lineDash,lineDashOffset:o.lineDashOffset},o.fillGradientDefaults,o.fillPatternDefaults),line:{stroke:t,strokeOpacity:i,strokeWidth:e,lineDash:s}}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{id:e,ctx:{legendManager:i},visible:s}=this,{radiusKey:o,radiusName:a,showInLegend:n}=this.properties;return[{legendType:"category",id:e,itemId:o,seriesId:e,enabled:s&&i.getItemEnabled({seriesId:e,itemId:o}),label:{text:a??o},symbol:this.legendItemSymbol(),hideInLegend:!n}]}pickNodeClosestDatum(t){const{nodeData:e,centerX:i,centerY:s}=this,{x:o,y:a}=t,n=this.radius;if(Math.sqrt((o-i)**2+(a-s)**2)>n+this.properties.marker.size)return;let l=1/0,c;for(const h of e){const{point:{x:u=NaN,y:d=NaN}={}}=h;if(isNaN(u)||isNaN(d))continue;const p=Math.sqrt((t.x-u-i)**2+(t.y-d-s)**2);p<l&&(l=p,c=h)}if(c){const h=Math.max(l-(c.point?.size??0),0);return{datum:c,distance:h}}}computeLabelsBBox(){const{label:t}=this.properties;this.maybeRefreshNodeData();const e=[],i=new yAt;return this.nodeData.forEach(s=>{if(!t.enabled||!s.label)return;i.text=s.label.text,i.x=s.label.x,i.y=s.label.y,i.setFont(t),i.setAlign(s.label);const o=i.getBBox();e.push(o)}),e.length===0?null:pAt.merge(e)}getLineNode(){return this.lineSelection?.at(0)}beforePathAnimation(){const t=this.getLineNode();t&&(t.fill=void 0,t.lineJoin="round",t.lineCap="round",t.pointerEvents=mAt.None,t.stroke=this.properties.stroke,t.strokeWidth=this.getStrokeWidth(this.properties.strokeWidth),t.strokeOpacity=this.properties.strokeOpacity,t.lineDash=this.properties.lineDash,t.lineDashOffset=this.properties.lineDashOffset)}getLinePoints(){const{nodeData:t,resetInvalidToZero:e}=this,{connectMissingData:i}=this.properties;if(t.length===0)return[];const s=this.axes[ir.Y],a=this.axes[ir.X]?.isReversed(),r=s?.isReversed()&&!a?[...t].reverse():t,l=[];let c=!1,h;return r.forEach((u,d)=>{let{x:p,y:g}=u.point;const f=isNaN(p)||isNaN(g);f||(h??(h=u)),f&&!i&&(p=0,g=0);const x=d===0||!e&&!i&&(f||c);l.push({x:p,y:g,moveTo:x}),c=f}),h!==void 0&&l.push({x:h.point.x,y:h.point.y,moveTo:!1}),l}animateSinglePath(t,e,i){const{path:s}=t;s.clear(!0);const o=this.getAxisInnerRadius(),a=this.axes[ir.Y],r=a?.isReversed()?this.radius+o-a?.scale.convert(0):o;e.forEach(l=>{const{x:c,y:h,arc:u,radius:d=0,startAngle:p=0,endAngle:g=0,moveTo:f}=l,x=Math.atan2(h,c),y=r*Math.cos(x),b=r*Math.sin(x),S=i,M=y*(1-S)+c*S,D=b*(1-S)+h*S;u?s.arc(c,h,d,p,g):f?s.moveTo(M,D):s.lineTo(M,D)}),t.checkPathDirty()}animatePaths(t){const e=this.getLinePoints(),i=this.getLineNode();i&&this.animateSinglePath(i,e,t)}animateEmptyUpdateReady(){const{itemSelection:t,labelSelection:e}=this,{animationManager:i}=this.ctx;this.beforePathAnimation(),i.animate({id:`${this.id}_'path`,groupId:this.id,from:0,to:1,phase:"initial",collapsable:!1,onUpdate:s=>this.animatePaths(s),onStop:()=>this.animatePaths(1)}),lAt(this,i,"added",t),rAt(this,"labels",i,e)}animateWaitingUpdateReady(t){super.animateWaitingUpdateReady(t),this.resetPaths()}animateReadyResize(t){super.animateReadyResize(t),this.resetPaths()}resetPaths(){const t=this.getLineNode();if(t){const{path:e}=t,i=this.getLinePoints();t.fill=void 0,t.stroke=this.properties.stroke,t.strokeWidth=this.getStrokeWidth(this.properties.strokeWidth),t.strokeOpacity=this.properties.strokeOpacity,t.lineDash=this.properties.lineDash,t.lineDashOffset=this.properties.lineDashOffset,e.clear(!0);for(const{x:s,y:o,moveTo:a}of i)a?e.moveTo(s,o):e.lineTo(s,o);t.checkPathDirty()}}getFormattedMarkerStyle(t){const{angleKey:e,radiusKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,t.datum,{angleKey:e,radiusKey:i},!0)}computeFocusBounds(t){return uAt(this,t)}};tE.className="RadarSeries";var MAt=(E(),C(w)),{FillGradientDefaults:DAt,FillPatternDefaults:kAt,RATIO:AAt,COLOR_STRING:IAt,TempValidate:bk,OR:TAt,COLOR_GRADIENT:CAt,COLOR_PATTERN:LAt,OBJECT:kK}=MAt._ModuleSupport,Ux=class extends go{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new DAt,this.fillPatternDefaults=new kAt,this.fillOpacity=1}};m([bk(TAt(CAt,LAt,IAt))],Ux.prototype,"fill",2),m([bk(kK)],Ux.prototype,"fillGradientDefaults",2),m([bk(kK)],Ux.prototype,"fillPatternDefaults",2),m([bk(AAt)],Ux.prototype,"fillOpacity",2);var{Group:NAt,Path:OAt,PointerEvents:wAt,Selection:EAt,ChartAxisDirection:AK,applyShapeStyle:_At,getShapeFill:RAt,getShapeStyle:PAt}=bK._ModuleSupport,Sk=class extends tE{constructor(t){super(t),this.properties=new Ux,this.areaGroup=this.contentGroup.appendChild(new NAt({name:"radar-area"})),this.areaSelection=EAt.select(this.areaGroup,OAt),this.resetInvalidToZero=!0,this.areaGroup.zIndex=-1}updatePathSelections(){const t=this.visible?[!0]:[];this.areaSelection.update(t),super.updatePathSelections()}getAreaNode(){return this.areaSelection.at(0)}getMarkerFill(t){return t?.fill??this.properties.marker.fill??this.properties.fill}beforePathAnimation(){super.beforePathAnimation();const t=this.getAreaNode(),{fillOpacity:e,fill:i}=this.properties,s=PAt({fill:i,fillOpacity:e},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults);_At(t,s,void 0,this.getShapeFillBBox()),t.pointerEvents=wAt.None,t.stroke=void 0}animatePaths(t){super.animatePaths(t),this.animateSinglePath(this.getAreaNode(),this.getAreaPoints(),t)}getAreaPoints(){const t=this.getLinePoints(),e=n=>{const r=this.axes[n];return r instanceof bK._ModuleSupport.PolarAxis?r:void 0},i=e(AK.Y),s=e(AK.X);if(!i?.isReversed())return t;const a=s?.getAxisLinePoints()?.points??[];return t.concat(...a)}resetPaths(){super.resetPaths();const t=this.getAreaNode();if(t){const{path:e}=t,i=this.getAreaPoints();t.fill=RAt(this.properties.fill,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults),t.fillOpacity=this.properties.fillOpacity,t.stroke=void 0,t.lineDash=this.properties.lineDash,t.lineDashOffset=this.properties.lineDashOffset,t.lineJoin=t.lineCap="round",e.clear(!0),i.forEach(({x:s,y:o,moveTo:a,arc:n,radius:r=0,startAngle:l=0,endAngle:c=0})=>{n?e.arc(s,o,r,l,c):a?e.moveTo(s,o):e.lineTo(s,o)}),e.closePath(),t.checkPathDirty()}}};Sk.className="RadarAreaSeries",Sk.type="radar-area";var BAt=(E(),C(w)),yn=(P(),C(et)),{commonSeriesOptionsDefs:zAt,seriesLabelOptionsDefs:FAt,markerOptionsDefs:GAt,tooltipOptionsDefs:jAt}=BAt._ModuleSupport,VAt={type:(0,yn.required)((0,yn.constant)("radar-area")),angleKey:(0,yn.required)(yn.string),radiusKey:(0,yn.required)(yn.string),angleName:yn.string,radiusName:yn.string,connectMissingData:yn.boolean,marker:GAt,label:FAt,tooltip:jAt,...zAt,...yn.fillOptionsDef,...yn.strokeOptionsDef,...yn.lineDashOptionsDef},{ThemeConstants:{POLAR_AXIS_TYPE:IK}}=Hkt._ModuleSupport,WAt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-area",moduleFactory:t=>new Sk(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:IK.ANGLE_CATEGORY},{type:IK.RADIUS_NUMBER}],themeTemplate:$kt},UAt={type:"series",name:"radar-area",chartType:"polar",enterprise:!0,options:VAt,create:t=>new Sk(t)},HAt=(E(),C(w)),vk=class extends tE{updatePathSelections(){this.lineSelection.update(this.visible?[!0]:[])}};vk.className="RadarLineSeries",vk.type="radar-line";var YAt=(E(),C(w)),sr=(P(),C(et)),{commonSeriesOptionsDefs:KAt,seriesLabelOptionsDefs:$At,markerOptionsDefs:XAt,tooltipOptionsDefs:ZAt}=YAt._ModuleSupport,qAt={type:(0,sr.required)((0,sr.constant)("radar-line")),angleKey:(0,sr.required)(sr.string),radiusKey:(0,sr.required)(sr.string),angleName:sr.string,radiusName:sr.string,connectMissingData:sr.boolean,marker:XAt,label:$At,tooltip:ZAt,...KAt,...sr.strokeOptionsDef,...sr.lineDashOptionsDef},{POLAR_AXIS_TYPE:TK}=HAt._ModuleSupport.ThemeConstants,QAt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radar-line",moduleFactory:t=>new vk(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:TK.ANGLE_CATEGORY},{type:TK.RADIUS_NUMBER}],themeTemplate:Kkt},JAt={type:"series",name:"radar-line",chartType:"polar",enterprise:!0,options:qAt,create:t=>new vk(t)},tIt=(E(),C(w)),Hx=(E(),C(w)),eIt=(P(),C(et)),iIt=(E(),C(w)),{SeriesProperties:sIt,FillGradientDefaults:oIt,FillPatternDefaults:aIt,SeriesTooltip:nIt,TempValidate:es,COLOR_STRING:CK,NUMBER:LK,FUNCTION:rIt,LINE_DASH:lIt,OBJECT:Mk,POSITIVE_NUMBER:eE,RATIO:NK,STRING:Yx,Label:cIt,COLOR_GRADIENT:hIt,COLOR_PATTERN:uIt,OR:dIt}=iIt._ModuleSupport,Gi=class extends sIt{constructor(){super(...arguments),this.fill="black",this.fillGradientDefaults=new oIt,this.fillPatternDefaults=new aIt,this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new cIt,this.tooltip=new nIt}};m([es(Yx)],Gi.prototype,"angleKey",2),m([es(Yx)],Gi.prototype,"radiusKey",2),m([es(Yx,{optional:!0})],Gi.prototype,"angleName",2),m([es(Yx,{optional:!0})],Gi.prototype,"radiusName",2),m([es(dIt(hIt,uIt,CK))],Gi.prototype,"fill",2),m([es(Mk)],Gi.prototype,"fillGradientDefaults",2),m([es(Mk)],Gi.prototype,"fillPatternDefaults",2),m([es(NK)],Gi.prototype,"fillOpacity",2),m([es(CK)],Gi.prototype,"stroke",2),m([es(eE)],Gi.prototype,"strokeWidth",2),m([es(NK)],Gi.prototype,"strokeOpacity",2),m([es(lIt)],Gi.prototype,"lineDash",2),m([es(eE)],Gi.prototype,"lineDashOffset",2),m([es(eE)],Gi.prototype,"cornerRadius",2),m([es(rIt,{optional:!0})],Gi.prototype,"itemStyler",2),m([es(LK)],Gi.prototype,"rotation",2),m([es(Yx,{optional:!0})],Gi.prototype,"stackGroup",2),m([es(LK,{optional:!0})],Gi.prototype,"normalizedTo",2),m([es(Mk)],Gi.prototype,"label",2),m([es(Mk)],Gi.prototype,"tooltip",2);var pIt=(E(),C(w)),{SectorBox:OK,motion:gIt}=pIt._ModuleSupport;function fIt(t,e,i){if(i==="updated"){if(t.previousDatum==null||isNaN(t.previousDatum.innerRadius)||isNaN(t.previousDatum.outerRadius))return"added";if(isNaN(e.innerRadius)||isNaN(e.outerRadius))return"removed"}return i==="added"&&t.previousDatum!=null?"updated":i}function wK(t){return{toFn:(s,o,a)=>{let n,r,l,c,h;return a==="removed"?(n=t,r=t,l=o.innerRadius,c=o.outerRadius,h=new OK(n,r,l,c)):(n=o.startAngle,r=o.endAngle,l=isNaN(o.innerRadius)?s.innerRadius:o.innerRadius,c=isNaN(o.outerRadius)?s.outerRadius:o.outerRadius,h=o.clipSector),{startAngle:n,endAngle:r,innerRadius:l,outerRadius:c,clipSector:h}},fromFn:(s,o,a)=>{a=fIt(s,o,a);let n,r,l,c,h;a==="removed"||a==="updated"?(n=s.startAngle,r=s.endAngle,l=s.innerRadius,c=s.outerRadius,h=s.clipSector):(n=t,r=t,l=o.innerRadius,c=o.outerRadius),h??(h=new OK(n,r,l,c));const u=gIt.NODE_UPDATE_STATE_TO_PHASE_MAPPING[a];return{startAngle:n,endAngle:r,innerRadius:l,outerRadius:c,clipSector:h,phase:u}}}}function mIt(t,e){return{centerX:0,centerY:0,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clipSector:e.clipSector}}var{ChartAxisDirection:il,PolarAxis:yIt,diff:xIt,groupAccumulativeValueProperty:EK,keyProperty:bIt,normaliseGroupTo:SIt,valueProperty:vIt,fixNumericExtent:MIt,resetLabelFn:DIt,seriesLabelFadeInAnimation:kIt,seriesLabelFadeOutAnimation:AIt,animationValidation:IIt,angleBetween:TIt,createDatumId:_K,CategoryScale:CIt,Sector:LIt,SectorBox:NIt,motion:RK,isGradientFill:OIt,applyShapeStyle:wIt,getShapeStyle:iE}=Hx._ModuleSupport,EIt=class extends Hx._ModuleSupport.SeriesNodeEvent{constructor(t,e,i,s){super(t,e,i,s),this.angleKey=s.properties.angleKey,this.radiusKey=s.properties.radiusKey}},Dk=class extends Hx._ModuleSupport.PolarSeries{constructor(t){super({moduleCtx:t,categoryKey:"radiusValue",useLabelLayer:!0,canHaveAxes:!0,animationResetFns:{item:mIt,label:DIt}}),this.properties=new Gi,this.NodeEvent=EIt,this.groupScale=new CIt,this.circleCache={r:0,cx:0,cy:0}}get defaultShapeStyle(){const t=this.axes[il.X]?.scale;return{...this.properties.fillGradientDefaults.toJson(),rotation:Hx._ModuleSupport.toDegrees(t.range[0])+90}}nodeFactory(){return new LIt}getSeriesDomain(t){const{dataModel:e,processedData:i}=this;if(!i||!e)return[];if(t===il.X){const s=e.getDomain(this,"angleValue-end","value",i),o=[s[0]>0?0:s[0],s[1]<0?0:s[1]];return MIt(o)}else return e.getDomain(this,"radiusValue","key",i)}async processData(t){const{angleKey:e,radiusKey:i,normalizedTo:s}=this.properties,o=!this.ctx.animationManager.isSkipped();if(!this.properties.isValid())return;const a=this.getStackId(),n=`${a}-trailing`,r=[];(0,eIt.isDefined)(s)&&r.push(SIt([a,n],Math.abs(s))),o&&(this.processedData&&r.push(xIt(this.id,this.processedData)),r.push(IIt()));const l=this.visible?{}:{forceValue:0},c=this.axes[il.Y]?.scale.type,h=this.axes[il.X]?.scale.type;await this.requestDataModel(t,this.data,{props:[bIt(i,c,{id:"radiusValue"}),vIt(e,h,{id:"angleValue-raw",invalidValue:null,...l}),...EK(e,"normal","current",{id:"angleValue-end",rangeId:"angleValue-range",invalidValue:null,groupId:a,separateNegative:!0,...l},h),...EK(e,"trailing","current",{id:"angleValue-start",invalidValue:null,groupId:n,separateNegative:!0,...l},h),...r],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const t=this.radius,e=this.centerX,i=this.centerY,s=this.circleCache;return t===s.r&&e===s.cx&&i===s.cy?!1:(this.circleCache={r:t,cx:e,cy:i},!0)}maybeRefreshNodeData(){if(!this.didCircleChange()&&!this.nodeDataRefresh)return;const{nodeData:e=[]}=this.createNodeData()??{};this.nodeData=e,this.nodeDataRefresh=!1}getAxisInnerRadius(){const t=this.axes[il.Y];return t instanceof yIt?this.radius*t.innerRadiusRatio:0}createNodeData(){const{processedData:t,dataModel:e}=this;if(!e||!t||t.type!=="grouped"||!this.properties.isValid())return;const i=this.axes[il.X],s=this.axes[il.Y],o=i?.scale,a=s?.scale;if(!o||!a)return;const n=e.resolveKeysById(this,"radiusValue",t),r=e.resolveColumnById(this,"angleValue-start",t),l=e.resolveColumnById(this,"angleValue-end",t),c=e.resolveColumnById(this,"angleValue-raw",t),h=e.resolveProcessedDataIndexById(this,"angleValue-range");let u=0;s instanceof Jc&&(u=s.groupPaddingInner);const{groupScale:d}=this,{index:p,visibleGroupCount:g}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);d.domain=Array.from({length:g}).map((F,z)=>String(z)),d.range=[0,Math.abs(a.bandwidth??0)],d.paddingInner=g>1?u:0;const f=d.bandwidth>=1?d.bandwidth:d.rawBandwidth,x=i.isReversed(),y=s.isReversed(),b=y?this.radius:this.getAxisInnerRadius(),M=(y?this.getAxisInnerRadius():this.radius)+b,{angleKey:D,radiusKey:L,angleName:T,radiusName:I,label:N}=this.properties,O=(F,z,U,H)=>{const j=this.getLabelText(N,{value:z,datum:F,angleKey:D,radiusKey:L,angleName:T,radiusName:I});if(j)return{x:U,y:H,text:j,textAlign:"center",textBaseline:"middle"}},R=[],_={itemId:L,nodeData:R,labelData:R};if(!this.visible)return _;const{dataSources:B}=t,W=B.get(this.id)??[];for(const{datumIndex:F,group:z}of e.forEachGroupDatum(this,t)){const U=W[F],H=n[F];if(H==null)return;const j=c[F],V=r[F],G=l[F],K=j>=0&&!Object.is(j,-0),$=z.aggregation[h][K?1:0],Z=K===x;let Q=o.convert(V,!0),q=o.convert(G,!0),J=o.convert(0,!0),X=o.convert($,!0);Z&&([J,X]=[X,J],[Q,q]=[q,Q]);const nt=M-a.convert(H)+d.convert(String(p)),dt=nt+f,ut=(nt+dt)/2,St=Q+TIt(Q,q)/2,Lt=Math.cos(St)*ut,mt=Math.sin(St)*ut,Jt=this.properties.label.enabled?O(U,j,Lt,mt):void 0,ie=new NIt(Q,q,nt,dt);R.push({series:this,datum:U,datumIndex:F,point:{x:Lt,y:mt,size:0},midPoint:{x:Lt,y:mt},label:Jt,angleValue:j,radiusValue:H,innerRadius:nt,outerRadius:dt,startAngle:J,endAngle:X,clipSector:ie,reversed:Z,index:F})}return _}update({seriesRect:t}){const e=this.checkResize(t);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),e&&this.animationState.transition("resize"),this.animationState.transition("update")}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle.item:void 0;return iE({fill:i?.fill??e.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke??e.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity,lineDash:i?.lineDash??e.lineDash,lineDashOffset:i?.lineDashOffset??e.lineDashOffset,cornerRadius:e.cornerRadius},this.defaultShapeStyle,e.fillPatternDefaults)}getItemStyleOverrides(t,e,i,s){const{id:o,properties:a}=this,{angleKey:n,radiusKey:r,itemStyler:l}=a;let c;return l!=null&&(c=this.cachedDatumCallback(_K(t,s?"highlight":"node"),()=>this.callWithContext(l,{seriesId:o,datum:e,highlighted:s,angleKey:n,radiusKey:r,...i}))),iE(c,this.defaultShapeStyle,this.properties.fillPatternDefaults)}updateSectorSelection(t,e){let i=[];if(e){const a=this.ctx.highlightManager?.getActiveHighlight();a?.datum&&a.series===this&&i.push(a)}else i=this.nodeData;const s=this.getItemBaseStyle(e),o=this.getShapeFillBBox();t.update(i,void 0,a=>this.getDatumId(a)).each((a,n)=>{const{datum:r,datumIndex:l}=n,c=this.getItemStyleOverrides(String(l),r,s,e),h=c?.cornerRadius??s.cornerRadius,u=c?.fill??s.fill,d=Hx._ModuleSupport.isGradientFill(u)&&u.bounds!=="item"?{centerX:0,centerY:0}:void 0;wIt(a,s,c,o,d),a.lineJoin="round",a.inset=a.stroke!=null?a.strokeWidth/2:0,a.startInnerCornerRadius=r.reversed?h:0,a.startOuterCornerRadius=r.reversed?h:0,a.endInnerCornerRadius=r.reversed?0:h,a.endOuterCornerRadius=r.reversed?0:h,e&&(a.startAngle=n.startAngle,a.endAngle=n.endAngle,a.clipSector=n.clipSector,a.innerRadius=n.innerRadius,a.outerRadius=n.outerRadius)})}updateLabels(){const{label:t}=this.properties;this.labelSelection.update(this.nodeData).each((e,i)=>{t.enabled&&i.label?(e.x=i.label.x,e.y=i.label.y,e.fill=t.color,e.fontFamily=t.fontFamily,e.fontSize=t.fontSize,e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.text=i.label.text,e.textAlign=i.label.textAlign,e.textBaseline=i.label.textBaseline,e.visible=!0):e.visible=!1})}getBarTransitionFunctions(){const t=this.axes[il.X]?.scale;let e=0;if(!t)return wK(e);const i=Math.min(t.domain[0],t.domain[1]),s=Math.max(t.domain[0],t.domain[1]);return i<=0&&s>=0&&(e=t.convert(0)),wK(e)}animateEmptyUpdateReady(){const{labelSelection:t}=this,e=this.getBarTransitionFunctions();RK.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],e),kIt(this,"labels",this.ctx.animationManager,t)}animateClearingUpdateEmpty(){const{itemSelection:t}=this,{animationManager:e}=this.ctx,i=this.getBarTransitionFunctions();RK.fromToMotion(this.id,"datums",e,[t],i),AIt(this,"labels",e,this.labelSelection)}getTooltipContent(t){const{id:e,dataModel:i,processedData:s,axes:o,properties:a}=this,{angleKey:n,angleName:r,radiusKey:l,radiusName:c,tooltip:h}=a,u=o[il.X],d=o[il.Y];if(!i||!s||!u||!d)return;const p=s.dataSources.get(this.id)?.[t],g=i.resolveKeysById(this,"radiusValue",s)[t],f=i.resolveColumnById(this,"angleValue-raw",s)[t];if(g==null)return;const x=this.getItemBaseStyle(!1);return Object.assign(x,this.getItemStyleOverrides(String(t),t,x,!1)),h.formatTooltip(this.properties,{heading:d.formatDatum(g),symbol:this.legendItemSymbol(),data:[{label:r,fallbackLabel:n,value:u.formatDatum(f)}]},{seriesId:e,datum:p,title:r,angleKey:n,angleName:r,radiusKey:l,radiusName:c,...x})}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.itemSelection.nodes())}legendItemSymbol(){const{fill:t,stroke:e,fillOpacity:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n,fillPatternDefaults:r}=this.properties,l=iE({fill:t??"rgba(0, 0, 0, 0)",stroke:e??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:s,strokeWidth:o,lineDash:a,lineDashOffset:n},this.defaultShapeStyle,r);return OIt(l.fill)&&(l.fill={...l.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:l}}getLegendData(t){if(!this.properties.isValid()||t!=="category")return[];const{id:e,visible:i}=this,{angleKey:s,angleName:o,showInLegend:a}=this.properties;return[{legendType:"category",id:e,itemId:s,seriesId:e,enabled:i,label:{text:o??s},symbol:this.legendItemSymbol(),hideInLegend:!a}]}getDatumId(t){return _K(t.radiusValue)}computeLabelsBBox(){return null}getStackId(){return`radialBar-stack-${this.seriesGrouping?.groupIndex??this.id}-xValues`}};Dk.className="RadialBarSeries",Dk.type="radial-bar";var _It=(E(),C(w)),Ks=(P(),C(et)),{commonSeriesOptionsDefs:RIt,seriesLabelOptionsDefs:PIt,tooltipOptionsDefs:BIt}=_It._ModuleSupport,zIt={type:(0,Ks.required)((0,Ks.constant)("radial-bar")),angleKey:(0,Ks.required)(Ks.string),radiusKey:(0,Ks.required)(Ks.string),angleName:Ks.string,radiusName:Ks.string,grouped:Ks.boolean,stacked:Ks.boolean,stackGroup:Ks.string,normalizedTo:Ks.number,cornerRadius:Ks.positiveNumber,itemStyler:Ks.callback,label:PIt,tooltip:BIt,...RIt,...Ks.fillOptionsDef,...Ks.strokeOptionsDef,...Ks.lineDashOptionsDef},PK=(E(),C(w)),{ThemeConstants:{POLAR_AXIS_TYPE:FIt}}=PK._ModuleSupport,GIt={series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"conic",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:PK._ModuleSupport.FILL_PATTERN_DEFAULTS,strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"}}},axes:{[FIt.RADIUS_CATEGORY]:{innerRadiusRatio:.2,groupPaddingInner:.2,paddingInner:.2,paddingOuter:.1}}},{POLAR_AXIS_TYPE:BK}=tIt._ModuleSupport.ThemeConstants,jIt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-bar",moduleFactory:t=>new Dk(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:BK.ANGLE_NUMBER},{type:BK.RADIUS_CATEGORY}],themeTemplate:GIt,stackable:!0,groupable:!0},VIt={type:"series",name:"radial-bar",chartType:"polar",enterprise:!0,options:zIt,create:t=>new Dk(t)},WIt=(E(),C(w)),UIt=(E(),C(w)),HIt=(E(),C(w)),{TempValidate:zK,RATIO:FK}=HIt._ModuleSupport,sE=class extends Ai{};m([zK(FK,{optional:!0})],sE.prototype,"columnWidthRatio",2),m([zK(FK,{optional:!0})],sE.prototype,"maxColumnWidthRatio",2);var{ChartAxisDirection:YIt,PolarAxis:KIt,RadialColumnShape:$It,getRadialColumnWidth:XIt}=UIt._ModuleSupport,kk=class extends Z5{constructor(t){super(t,{animationResetFns:{item:$Dt}}),this.properties=new sE}getStackId(){return`radarColumn-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new $It}getColumnTransitionFunctions(){const t=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return KDt(t)}isRadiusAxisCircle(){const t=this.axes[YIt.Y];return t instanceof KIt?t.shape==="circle":!1}updateItemPath(t,e,i){t.isBeveled=this.isRadiusAxisCircle(),t.isRadiusAxisReversed=this.isRadiusAxisReversed(),i&&(t.innerRadius=e.innerRadius,t.outerRadius=e.outerRadius,t.startAngle=e.startAngle,t.endAngle=e.endAngle,t.columnWidth=e.columnWidth,t.axisInnerRadius=e.axisInnerRadius,t.axisOuterRadius=e.axisOuterRadius)}getColumnWidth(t,e){const{columnWidthRatio:i=.5,maxColumnWidthRatio:s=.5}=this.properties;return XIt(t,e,this.radius,i,s)}};kk.className="RadialColumnSeries",kk.type="radial-column";var ZIt=(E(),C(w)),ps=(P(),C(et)),{commonSeriesOptionsDefs:qIt,seriesLabelOptionsDefs:QIt,tooltipOptionsDefs:JIt}=ZIt._ModuleSupport,tTt={type:(0,ps.required)((0,ps.constant)("radial-column")),angleKey:(0,ps.required)(ps.string),radiusKey:(0,ps.required)(ps.string),angleName:ps.string,radiusName:ps.string,grouped:ps.boolean,stacked:ps.boolean,stackGroup:ps.string,normalizedTo:ps.number,cornerRadius:ps.positiveNumber,columnWidthRatio:ps.ratio,maxColumnWidthRatio:ps.ratio,itemStyler:ps.callback,label:QIt,tooltip:JIt,...qIt,...ps.fillOptionsDef,...ps.strokeOptionsDef,...ps.lineDashOptionsDef},GK=(E(),C(w)),{ThemeConstants:{POLAR_AXIS_TYPE:jK,POLAR_AXIS_SHAPE:eTt}}=GK._ModuleSupport,VK={$path:["./shape",eTt.CIRCLE,{$find:[{$not:[{$isOperation:"./shape"}]},{$path:".."}]}]},iTt={series:{fill:{$palette:"fill"},stroke:{$palette:"stroke"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:GK._ModuleSupport.FILL_PATTERN_DEFAULTS,columnWidthRatio:.5,maxColumnWidthRatio:.5,strokeWidth:0,label:{enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}}},axes:{[jK.ANGLE_CATEGORY]:{shape:VK,groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[jK.RADIUS_NUMBER]:{shape:VK,innerRadiusRatio:.5}}},{POLAR_AXIS_TYPE:WK}=WIt._ModuleSupport.ThemeConstants,sTt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radial-column",moduleFactory:t=>new kk(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:WK.ANGLE_CATEGORY},{type:WK.RADIUS_NUMBER}],themeTemplate:iTt,stackable:!0,groupable:!0},oTt={type:"series",name:"radial-column",chartType:"polar",enterprise:!0,options:tTt,create:t=>new kk(t)},oE=(E(),C(w)),$d=(E(),C(w)),aTt=(P(),C(et)),nTt=(E(),C(w)),{SvgPath:rTt,Rotatable:lTt,Translatable:cTt,Scalable:hTt}=nTt._ModuleSupport,aE=class extends lTt(hTt(cTt(rTt))){constructor(){super(...arguments),this.scalingCenterX=.5,this.scalingCenterY=.5,this.rotationCenterX=.5,this.rotationCenterY=.5}};aE.defaultPathData="M0.50245 0.53745C0.481767 0.53745 0.465 0.520683 0.465 0.5C0.465 0.479317 0.481767 0.46255 0.50245 0.46255L1 0.500012L0.50245 0.53745Z";var nE=(E(),C(w)),uTt=(P(),C(et)),{BaseProperties:Kx,SeriesTooltip:dTt,SeriesProperties:pTt,PropertiesArray:rE,AxisLabel:gTt,TempValidate:ht,BOOLEAN:UK,COLOR_STRING:lc,COLOR_STRING_ARRAY:fTt,FUNCTION:mTt,LINE_DASH:Ak,NUMBER:sa,NUMBER_ARRAY:yTt,OBJECT_ARRAY:lE,OBJECT:or,POSITIVE_NUMBER:xn,RATIO:ar,STRING:cE,UNION:xTt,AND:HK,LESS_THAN:bTt,GREATER_THAN:STt,Label:vTt}=nE._ModuleSupport,MTt=xTt(["inside","outside","middle"],"a placement"),YK=class extends vTt{};m([ht(sa,{optional:!0})],YK.prototype,"spacing",2);var $s=class extends Kx{constructor(){super(...arguments),this.label=new YK}};m([ht(cE,{optional:!0})],$s.prototype,"text",2),m([ht(sa,{optional:!0})],$s.prototype,"value",2),m([ht(VY,{optional:!0})],$s.prototype,"shape",2),m([ht(MTt,{optional:!0})],$s.prototype,"placement",2),m([ht(sa,{optional:!0})],$s.prototype,"spacing",2),m([ht(xn,{optional:!0})],$s.prototype,"size",2),m([ht(sa,{optional:!0})],$s.prototype,"rotation",2),m([ht(lc,{optional:!0})],$s.prototype,"fill",2),m([ht(ar,{optional:!0})],$s.prototype,"fillOpacity",2),m([ht(lc,{optional:!0})],$s.prototype,"stroke",2),m([ht(xn,{optional:!0})],$s.prototype,"strokeWidth",2),m([ht(ar,{optional:!0})],$s.prototype,"strokeOpacity",2),m([ht(Ak,{optional:!0})],$s.prototype,"lineDash",2),m([ht(xn,{optional:!0})],$s.prototype,"lineDashOffset",2),m([ht(or)],$s.prototype,"label",2);var nr=class extends Kx{constructor(){super(...arguments),this.enabled=!0,this.fills=new rE(nE._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};m([ht(UK)],nr.prototype,"enabled",2),m([ht(lE)],nr.prototype,"fills",2),m([ht(VD)],nr.prototype,"fillMode",2),m([ht(lc,{optional:!0})],nr.prototype,"fill",2),m([ht(ar)],nr.prototype,"fillOpacity",2),m([ht(lc,{optional:!0})],nr.prototype,"stroke",2),m([ht(xn,{optional:!0})],nr.prototype,"strokeWidth",2),m([ht(ar)],nr.prototype,"strokeOpacity",2),m([ht(Ak)],nr.prototype,"lineDash",2),m([ht(xn)],nr.prototype,"lineDashOffset",2);var $x=class extends Kx{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};m([ht(yTt,{optional:!0})],$x.prototype,"values",2),m([ht(sa,{optional:!0})],$x.prototype,"step",2),m([ht(sa)],$x.prototype,"minSpacing",2),m([ht(sa)],$x.prototype,"maxSpacing",2);var DTt=class extends gTt{},Eo=class extends Kx{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new rE(nE._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black",this.interval=new $x,this.label=new DTt}};m([ht(HK(sa,bTt("max")))],Eo.prototype,"min",2),m([ht(HK(sa,STt("min")))],Eo.prototype,"max",2),m([ht(lE)],Eo.prototype,"fills",2),m([ht(VD)],Eo.prototype,"fillMode",2),m([ht(lc,{optional:!0})],Eo.prototype,"fill",2),m([ht(ar)],Eo.prototype,"fillOpacity",2),m([ht(lc)],Eo.prototype,"stroke",2),m([ht(xn)],Eo.prototype,"strokeWidth",2),m([ht(ar)],Eo.prototype,"strokeOpacity",2),m([ht(Ak)],Eo.prototype,"lineDash",2),m([ht(xn)],Eo.prototype,"lineDashOffset",2),m([ht(lc)],Eo.prototype,"defaultFill",2),m([ht(or)],Eo.prototype,"interval",2),m([ht(or)],Eo.prototype,"label",2);var rr=class extends Kx{constructor(){super(...arguments),this.enabled=!0,this.spacing=0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};m([ht(UK)],rr.prototype,"enabled",2),m([ht(ar,{optional:!0})],rr.prototype,"radiusRatio",2),m([ht(sa)],rr.prototype,"spacing",2),m([ht(lc)],rr.prototype,"fill",2),m([ht(ar)],rr.prototype,"fillOpacity",2),m([ht(lc)],rr.prototype,"stroke",2),m([ht(xn)],rr.prototype,"strokeWidth",2),m([ht(ar)],rr.prototype,"strokeOpacity",2),m([ht(Ak)],rr.prototype,"lineDash",2),m([ht(xn)],rr.prototype,"lineDashOffset",2);var KK=class extends qr{};m([ht(cE,{optional:!0})],KK.prototype,"text",2);var $K=class extends Ix{};m([ht(cE,{optional:!0})],$K.prototype,"text",2);var Ti=class extends pTt{constructor(){super(...arguments),this.startAngle=0,this.endAngle=0,this.segmentation=new Px,this.defaultColorRange=[],this.targets=new rE($s),this.defaultTarget=new $s,this.outerRadiusRatio=1,this.innerRadiusRatio=1,this.cornerRadius=0,this.cornerMode="container",this.spacing=0,this.scale=new Eo,this.bar=new nr,this.needle=new rr,this.label=new KK,this.secondaryLabel=new $K,this.tooltip=new dTt}isValid(t){if(!super.isValid(t))return!1;const{outerRadius:e,innerRadius:i}=this;return e==null!=(i==null)?(uTt.Logger.warnOnce("Either [innerRadius] and [outerRadius] must both be set, or neither can be set."),!1):!0}};m([ht(sa)],Ti.prototype,"value",2),m([ht(sa)],Ti.prototype,"startAngle",2),m([ht(sa)],Ti.prototype,"endAngle",2),m([ht(or)],Ti.prototype,"segmentation",2),m([ht(fTt)],Ti.prototype,"defaultColorRange",2),m([ht(lE)],Ti.prototype,"targets",2),m([ht(or)],Ti.prototype,"defaultTarget",2),m([ht(ar)],Ti.prototype,"outerRadiusRatio",2),m([ht(ar)],Ti.prototype,"innerRadiusRatio",2),m([ht(xn,{optional:!0})],Ti.prototype,"outerRadius",2),m([ht(xn,{optional:!0})],Ti.prototype,"innerRadius",2),m([ht(xn)],Ti.prototype,"cornerRadius",2),m([ht(WY)],Ti.prototype,"cornerMode",2),m([ht(sa)],Ti.prototype,"spacing",2),m([ht(or)],Ti.prototype,"scale",2),m([ht(or)],Ti.prototype,"bar",2),m([ht(or)],Ti.prototype,"needle",2),m([ht(mTt,{optional:!0})],Ti.prototype,"itemStyler",2),m([ht(or)],Ti.prototype,"label",2),m([ht(or)],Ti.prototype,"secondaryLabel",2),m([ht(or)],Ti.prototype,"tooltip",2);var kTt=(E(),C(w)),{SectorBox:hE}=kTt._ModuleSupport;function ATt(t){const{startAngle:e,endAngle:i,clipStartAngle:s,clipEndAngle:o,innerRadius:a,outerRadius:n}=t;if(!(s==null||o==null))return new hE(Math.max(s,e),Math.min(o,i),a,n)}function XK(t,e,i){return Math.max(t,i.startAngle)<=Math.min(e,i.endAngle)}function uE(t){return t.clipStartAngle!=null&&t.clipEndAngle!=null}function dE(t,e){const{clipStartAngle:i,clipEndAngle:s,innerRadius:o,outerRadius:a}=t;return new hE(i,e?i:s,o,a)}function ZK(t,e){const i=t?"initial":"update";return{node:{fromFn(a,n){const r=a.previousDatum;let{startAngle:l,endAngle:c}=r??n;const h=r!=null&&uE(r)?dE(r,t):void 0,u=uE(n)?dE(n,t):void 0;let d;return h!=null&&u!=null?d=h:h==null&&u!=null?(d=u,l=n.startAngle,c=n.endAngle):h!=null&&u==null?(d=void 0,l=n.startAngle,c=n.endAngle):t&&(c=l),{startAngle:l,endAngle:c,clipSector:d,phase:i}},toFn(a,n){const{startAngle:r,endAngle:l}=n;let c;return uE(n)&&(c=dE(n,!1)),{startAngle:r,endAngle:l,clipSector:c}},applyFn(a,n){const{startAngle:r,endAngle:l}=n;let{clipSector:c}=n;c!=null&&(c=new hE(Math.max(r,c.startAngle),Math.min(l,c.endAngle),c.innerRadius,c.outerRadius));const h=c==null||XK(r,l,c);a.startAngle=r,a.endAngle=l,a.clipSector=c,a.visible=h}},needle:{fromFn(a){let{angle:n}=a.previousDatum??a.datum;return t&&(n=e),{rotation:n,phase:i}},toFn(a,n){const{angle:r}=n;return{rotation:r}}}}}function pE(t,e){const{startAngle:i,endAngle:s}=e,o=ATt(e),a=o==null||XK(i,s,o);return{startAngle:i,endAngle:s,clipSector:o,visible:a}}function qK(t,e){const{angle:i}=e;return{rotation:i}}var ITt={top:0,middle:.5,bottom:1};function TTt(t,e,i,s,o){const{padding:a,textAlign:n,verticalAlign:r}=i;let l,c;if(e.each((M,D)=>{D.label==="primary"?l=D:D.label==="secondary"&&(c=D)}),l==null)return;const h=Rx(t,l,o?.label);if(h==null)return;const u=c!=null?Rx(t,c,o?.secondaryLabel):void 0,d={padding:a},p=n==="center"?2:1,g=r==="middle"?2:1,f=M=>({width:Math.sqrt(Math.max(s**2-(M/g)**2,0))*p,height:Math.min(M,g*s),meta:null});let x,y,b;if(c!=null&&u!=null){const M=YU(h,l,u,c,d,f);x=M?.label,y=M?.secondaryLabel,b=M?.height??0}else{const M=kx(h,l,d,f);x=M?.[0],y=void 0,b=M?.[0].height??0}const S=b*ITt[r];e.each((M,D)=>{let L;if(D.label==="primary"?L=x:D.label==="secondary"&&(L=y),L==null){M.visible=!1;return}M.visible=!0,M.text=L.text,M.fontSize=L.fontSize,M.lineHeight=L.lineHeight,M.textAlign=n,M.textBaseline="middle";const T=D.label==="primary"?L.height/2:b-L.height/2;M.y=D.centerY+T-S,M.x=D.centerX})}var{fromToMotion:Xx,resetMotion:QK,CachedTextMeasurerPool:CTt,SeriesNodePickMode:JK,StateMachine:LTt,createDatumId:gE,normalizeAngle360:t$,normalizeAngle360Inclusive:fE,isBetweenAngles:Ik,sectorBox:NTt,toDegrees:OTt,toRadians:Tk,BBox:wTt,Group:Lh,PointerEvents:Ck,Selection:Nh,Sector:ETt,SectorBox:_Tt,Text:e$,Marker:RTt,getColorStops:PTt}=$d._ModuleSupport,BTt={inside:90,middle:0,outside:-90},zTt=[{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"},{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"}],FTt=[{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"},{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"}],Lk=class extends $d._ModuleSupport.Series{constructor(t){super({moduleCtx:t,useLabelLayer:!0,pickModes:[JK.EXACT_SHAPE_MATCH,JK.NEAREST_NODE]}),this.centerX=0,this.centerY=0,this.radius=0,this.textAlign="center",this.verticalAlign="middle",this.properties=new Ti,this.scale=new Mj,this.scaleGroup=this.contentGroup.appendChild(new Lh({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new Lh({name:"itemGroup"})),this.itemNeedleGroup=this.contentGroup.appendChild(new Lh({name:"itemNeedleGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new Lh({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new Lh({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Lh({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new Lh({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new Lh({name:"tickGroup"})),this.scaleSelection=Nh.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Nh.select(this.itemGroup,()=>this.nodeFactory()),this.needleSelection=Nh.select(this.itemNeedleGroup,aE),this.targetSelection=Nh.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Nh.select(this.itemTargetLabelGroup,e$),this.labelSelection=Nh.select(this.itemLabelGroup,e$),this.highlightTargetSelection=Nh.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=Nh.select(this.tickGroup,$d._ModuleSupport.TransformableText),this.datumUnion=new PY,this.animationState=new LTt("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=Ck.None,this.tickGroup.pointerEvents=Ck.None,this.itemNeedleGroup.pointerEvents=Ck.None,this.itemLabelGroup.pointerEvents=Ck.None}get hasData(){return this.properties.value!=null}nodeFactory(){return new ETt}markerFactory(){const t=new RTt;return t.size=1,t}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(t){const{min:e,max:i}=this.properties.scale;return zY(t,{min:e,max:i})}layoutScale(){const{scale:t,properties:e}=this,{seriesRectWidth:i,seriesRectHeight:s}=this.nodeDataDependencies,{scale:o,outerRadius:a}=this.properties,{min:n,max:r,label:l,interval:c}=o,h=Tk(e.startAngle-90),u=Tk(e.endAngle-90),p=fE(u-h)>Math.PI,g=p||Ik(1.5*Math.PI,h,u),f=p||Ik(0*Math.PI,h,u),x=p||Ik(.5*Math.PI,h,u),y=p||Ik(1*Math.PI,h,u);let b;y&&!f?b="right":!y&&f?b="left":b="center";let S;g&&!x?S="bottom":!g&&x?S="top":S="middle";const M=NTt({startAngle:h,endAngle:u,innerRadius:0,outerRadius:.5}),D=-(M.x+M.width/2)*2,L=-(M.y+M.height/2)*2,T=Math.min(i/M.width,s/M.height);t.domain=[n,r],t.range=[h,u],t.arcLength=T/2;const{maxSpacing:I,minSpacing:N}=c,{arcLength:O}=t,R=I?Math.floor(O/I):1,_=N?Math.floor(O/N):1/0,B=Math.floor(4/Math.PI*Math.abs(t.range[0]-t.range[1])),W=Math.max(R,Math.min(_,B)),F=c.values??t.ticks({nice:!1,interval:c.step,minTickCount:R,maxTickCount:_,tickCount:W}),z=F.reduce((Q,q)=>Math.max(Q,typeof q=="number"?(0,aTt.countFractionDigits)(q):0),0),U=t.tickFormatter({domain:t.domain,ticks:F,fractionDigits:z,specifier:l.format}),H=l.getFont(),j=F.map((Q,q)=>{const J=l.formatter?.({value:Q,index:q,domain:t.domain,boundSeries:void 0})??U(Q),{width:X,height:st}=CTt.measureText(J,{font:H});return{index:q,value:Q,text:J,width:X,height:st}}),V=j.reduce((Q,q)=>Math.max(Q,q.width),0),G=j.reduce((Q,q)=>Math.max(Q,q.height),0),K=l.enabled?Math.max(V,G)+l.spacing:0,$=Math.max(.5*T-K,0),Z=a??$;return this.centerX=i/2+D*Z,this.centerY=s/2+L*Z,this.radius=Z,this.textAlign=b,this.verticalAlign=S,j}createConicGradient(t,e){const{scale:i}=this,{domain:s,range:o}=i,[a,n]=o,{defaultColorRange:r}=this.properties,l=t$((a+n)/2+Math.PI),c=fE(n-a);return{type:"gradient",gradient:"conic",colorSpace:"oklch",colorStops:PTt(t,r,s,e).map(({color:u,stop:d})=>(d=Math.min(Math.max(d,0),1),d=(a+c*d-l)/(2*Math.PI),d=(d%1+1)%1,{stop:d,color:u})),rotation:OTt(l)+90}}getShapeFillBBox(){const{centerX:t,centerY:e,radius:i}=this;return new wTt(t-i,e-i,2*i,2*i)}getTargets(){const{properties:t}=this,e=t.defaultTarget;return Array.from(t.targets).map(i=>{const{text:s=e.text,value:o=e.value??0,shape:a=e.shape??"triangle",rotation:n=e.rotation??0,strokeWidth:r=e.strokeWidth??0,placement:l=e.placement??"middle",spacing:c=e.spacing??0,size:h=e.size??0,fill:u=e.fill??"black",fillOpacity:d=e.fillOpacity??1,stroke:p=e.stroke??"black",strokeOpacity:g=e.strokeOpacity??1,lineDash:f=e.lineDash??[0],lineDashOffset:x=e.lineDashOffset??0}=i,{enabled:y=e.label.enabled,color:b=e.label.color??"black",fontStyle:S=e.label.fontStyle??"normal",fontWeight:M=e.label.fontWeight??"normal",fontSize:D=e.label.fontSize,fontFamily:L=e.label.fontFamily,spacing:T=e.label.spacing??0}=i.label;return{text:s,value:o,shape:a,placement:l,spacing:c,size:h,rotation:n,fill:u,fillOpacity:d,stroke:p,strokeWidth:r,strokeOpacity:g,lineDash:f,lineDashOffset:x,label:{enabled:y,color:b,fontStyle:S,fontWeight:M,fontSize:D,fontFamily:L,spacing:T}}})}getTargetRadius(t){const{radius:e,properties:i}=this,{innerRadiusRatio:s,outerRadiusRatio:o}=i,{placement:a,spacing:n,size:r}=t,l=e*o,c=e*s;switch(a){case"inside":return Math.max(c-n-r/2,0);case"outside":return l+n+r/2;default:return(c+l)/2}}getTargetLabel(t){const{scale:e}=this,{value:i,size:s,placement:o,label:a}=t,{spacing:n,color:r,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u}=a,d=void 0,p=e.convert(i),g=t$(p)/(Math.PI/2)|0,f=s/2+n;let x,y,b,S;switch(o){case"outside":({textAlign:x,textBaseline:y}=zTt[g]),b=f*Math.cos(p),S=f*Math.sin(p);break;case"inside":({textAlign:x,textBaseline:y}=FTt[g]),b=-f*Math.cos(p),S=-f*Math.sin(p);break;default:x="center",y="bottom",b=0,S=-f;break}return{offsetX:b,offsetY:S,fill:r,textAlign:x,textBaseline:y,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u,lineHeight:d}}createNodeData(){if(!this.properties.isValid())return;const t=this.layoutScale(),{id:e,scale:i,properties:s,radius:o,centerX:a,centerY:n}=this,{value:r,innerRadiusRatio:l,outerRadiusRatio:c,segmentation:h,cornerRadius:u,cornerMode:d,needle:p,bar:g,scale:f,label:x,secondaryLabel:y}=s,{outerRadius:b=o*c,innerRadius:S=o*l}=s,M=this.getTargets(),D=[],L=[],T=[],I=[],N=[],O=d==="item",R=i.convert(i.domain[0]),_=i.convert(r),B=Math.ceil(fE(_-R)*o);let W=h.enabled?h.interval.getSegments(i,B):void 0;const F=g.enabled?g.fill??this.createConicGradient(g.fills,g.fillMode):"rgba(0,0,0,0)",z=f.fill??(g.enabled&&f.fills.length===0?f.defaultFill:void 0)??this.createConicGradient(f.fills,f.fillMode);if(W==null&&O){const U=Math.min(...i.domain),H=Math.max(...i.domain),j={value:r,segmentStart:U,segmentEnd:H},G=Math.min(u,(b-S)/2)/((S+b)/2);D.push({series:this,itemId:"value",datum:j,datumIndex:{type:0},type:0,centerX:a,centerY:n,outerRadius:b,innerRadius:S,startAngle:R-G,endAngle:_+G,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:u,endCornerRadius:u,fill:F}),N.push({series:this,itemId:"scale",datum:j,datumIndex:{type:0},type:0,centerX:a,centerY:n,outerRadius:b,innerRadius:S,startAngle:i.range[0]-G,endAngle:i.range[1]+G,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:u,endCornerRadius:u,fill:z})}else{W??(W=i.domain);for(let U=0;U<W.length-1;U++){const H=W[U],j=W[U+1],V={value:r,segmentStart:H,segmentEnd:j},G=U===0,K=U===W.length-2,$=i.convert(H),Z=i.convert(j);D.push({series:this,itemId:`value-${U}`,datum:V,datumIndex:{type:0},type:0,centerX:a,centerY:n,outerRadius:b,innerRadius:S,startAngle:$,endAngle:Z,clipStartAngle:R,clipEndAngle:_,startCornerRadius:O||G?u:0,endCornerRadius:O||K?u:0,fill:F}),N.push({series:this,itemId:`scale-${U}`,datum:V,datumIndex:{type:0},type:0,centerX:a,centerY:n,outerRadius:b,innerRadius:S,startAngle:$,endAngle:Z,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:O||G?u:0,endCornerRadius:O||K?u:0,fill:z})}}if(!p.enabled&&x.enabled){const{text:U,color:H,fontSize:j,minimumFontSize:V,fontStyle:G,fontWeight:K,fontFamily:$,lineHeight:Z,formatter:Q=q=>this.formatLabel(q.value)}=x;I.push({label:"primary",centerX:a,centerY:n,text:U,value:r,fill:H,fontSize:j,minimumFontSize:V,fontStyle:G,fontWeight:K,fontFamily:$,lineHeight:Z,formatter:Q})}if(!p.enabled&&y.enabled){const{text:U,color:H,fontSize:j,minimumFontSize:V,fontStyle:G,fontWeight:K,fontFamily:$,lineHeight:Z,formatter:Q}=y;I.push({label:"secondary",centerX:a,centerY:n,text:U,value:r,fill:H,fontSize:j,minimumFontSize:V,fontStyle:G,fontWeight:K,fontFamily:$,lineHeight:Z,formatter:Q})}if(p.enabled){let U=p.radiusRatio!=null?o*p.radiusRatio:S;U=Math.max(U-p.spacing,0);const H=i.convert(r);T.push({centerX:a,centerY:n,radius:U,angle:H,series:this})}for(let U=0;U<M.length;U+=1){const H=M[U],{value:j,text:V,size:G,shape:K,fill:$,fillOpacity:Z,stroke:Q,strokeWidth:q,strokeOpacity:J,lineDash:X,lineDashOffset:st}=H;if(j<Math.min(...i.domain)||j>Math.max(...i.domain))continue;const nt=this.getTargetRadius(H),dt=i.convert(j),ut=Tk(H.rotation+BTt[H.placement]);L.push({series:this,itemId:`target-${U}`,midPoint:{x:nt*Math.cos(dt)+a,y:nt*Math.sin(dt)+n},datum:{value:j},datumIndex:{type:1,index:U},type:1,value:j,text:V,centerX:a,centerY:n,shape:K,radius:nt,angle:dt,rotation:ut,size:G,fill:$,fillOpacity:Z,stroke:Q,strokeOpacity:J,strokeWidth:q,lineDash:X,lineDashOffset:st,label:this.getTargetLabel(H)})}return{itemId:e,nodeData:D,needleData:T,targetData:L,labelData:I,scaleData:N,tickData:t}}updateSelections(t){(this.nodeDataRefresh||t)&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}highlightDatum(t){if(t!=null&&t.series===this&&t.type===1)return t}update({seriesRect:t}){const{datumSelection:e,labelSelection:i,needleSelection:s,targetSelection:o,targetLabelSelection:a,scaleSelection:n,highlightTargetSelection:r,tickSelection:l}=this,c=this.checkResize(t);this.updateSelections(c),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const h=this.contextNodeData?.nodeData??[],u=this.contextNodeData?.labelData??[],d=this.contextNodeData?.needleData??[],p=this.contextNodeData?.targetData??[],g=this.contextNodeData?.scaleData??[],f=this.contextNodeData?.tickData??[],x=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:g,scaleSelection:n}),this.updateScaleNodes({scaleSelection:n}),this.needleSelection=this.updateNeedleSelection({needleData:d,needleSelection:s}),this.updateNeedleNodes({needleSelection:s}),this.targetSelection=this.updateTargetSelection({targetData:p,targetSelection:o}),this.updateTargetNodes({targetSelection:o,isHighlight:!1}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:p,targetLabelSelection:a}),this.updateTargetLabelNodes({targetLabelSelection:a}),this.datumSelection=this.updateDatumSelection({nodeData:h,datumSelection:e}),this.updateDatumNodes({datumSelection:e}),this.labelSelection=this.updateLabelSelection({labelData:u,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:x!=null?[x]:[],targetSelection:r}),this.updateTargetNodes({targetSelection:r,isHighlight:!0}),this.tickSelection=this.updateTickSelection({tickData:f,tickSelection:l}),this.updateTickNodes({tickSelection:l}),c&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>gE(t.nodeData.length,e.itemId))}updateDatumNodes(t){const{datumSelection:e}=t,{ctx:i,properties:s}=this,{bar:o,segmentation:a}=s,n=a.spacing??0,{fillOpacity:r,stroke:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}=o,d=this.getStrokeWidth(o.strokeWidth),p=i.animationManager.isSkipped(),g=this.getShapeFillBBox();e.each((f,x)=>{const{centerX:y,centerY:b,innerRadius:S,outerRadius:M,startCornerRadius:D,endCornerRadius:L,fill:T}=x;f.centerX=y,f.centerY=b,f.innerRadius=S,f.outerRadius=M,f.pointerEvents=this.properties.bar.enabled?$d._ModuleSupport.PointerEvents.All:$d._ModuleSupport.PointerEvents.None,f.fill=T,f.fillBBox=g,f.fillOpacity=r,f.stroke=l,f.strokeOpacity=c,f.strokeWidth=d,f.lineDash=h,f.lineDashOffset=u,f.startOuterCornerRadius=D,f.startInnerCornerRadius=D,f.endOuterCornerRadius=L,f.endInnerCornerRadius=L,f.radialEdgeInset=(n+f.strokeWidth)/2,f.concentricEdgeInset=f.strokeWidth/2,(p||f.previousDatum==null)&&f.setProperties(pE(f,x))}),this.datumUnion.update(e,this.itemGroup,$d._ModuleSupport.Sector,(f,x,y)=>{f.clipSector??(f.clipSector=new _Tt(NaN,NaN,NaN,NaN)),f.centerX=x.centerX,f.centerY=x.centerY,f.outerRadius=f.clipSector.outerRadius=x.outerRadius,f.innerRadius=f.clipSector.innerRadius=x.innerRadius,f.startAngle=f.clipSector.startAngle=x.startAngle,f.startInnerCornerRadius=x.startInnerCornerRadius,f.startOuterCornerRadius=x.startOuterCornerRadius,f.endAngle=y.endAngle,f.clipSector.endAngle=y.clipSector?.endAngle??y.endAngle,f.endInnerCornerRadius=y.endInnerCornerRadius,f.endOuterCornerRadius=y.endOuterCornerRadius,f.pointerEvents=$d._ModuleSupport.PointerEvents.None})}updateScaleSelection(t){return t.scaleSelection.update(t.scaleData,void 0,e=>gE(t.scaleData.length,e.itemId))}updateScaleNodes(t){const{scaleSelection:e}=t,{scale:i,segmentation:s}=this.properties,o=s.spacing??0,{fillOpacity:a,stroke:n,strokeOpacity:r,strokeWidth:l,lineDash:c,lineDashOffset:h}=i,u=this.getShapeFillBBox();e.each((d,p)=>{const{centerX:g,centerY:f,innerRadius:x,outerRadius:y,startCornerRadius:b,endCornerRadius:S,fill:M}=p;d.centerX=g,d.centerY=f,d.innerRadius=x,d.outerRadius=y,d.fill=M,d.fillBBox=u,d.fillOpacity=a,d.stroke=n,d.strokeOpacity=r,d.strokeWidth=l,d.lineDash=c,d.lineDashOffset=h,d.startOuterCornerRadius=b,d.startInnerCornerRadius=b,d.endOuterCornerRadius=S,d.endInnerCornerRadius=S,d.radialEdgeInset=(o+d.strokeWidth)/2,d.concentricEdgeInset=d.strokeWidth/2,d.setProperties(pE(d,p))})}updateNeedleSelection(t){return t.needleSelection.update(t.needleData,void 0,()=>gE([]))}updateNeedleNodes(t){const{needleSelection:e}=t,{fill:i,fillOpacity:s,stroke:o,strokeOpacity:a,strokeWidth:n,lineDash:r,lineDashOffset:l}=this.properties.needle,c=this.ctx.animationManager.isSkipped();e.each((h,u)=>{const{centerX:d,centerY:p,radius:g}=u,f=g*2;h.d=aE.defaultPathData,h.fill=i,h.fillOpacity=s,h.stroke=o,h.strokeOpacity=a,h.strokeWidth=n/f,h.lineDash=r.map(x=>x/f),h.lineDashOffset=l/f,h.translationX=d,h.translationY=p,h.scalingX=f,h.scalingY=f,c&&h.setProperties(qK(h,u))})}updateTargetSelection(t){return t.targetSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetNodes(t){const{targetSelection:e,isHighlight:i}=t,s=i?this.properties.highlightStyle.item:void 0;e.each((o,a)=>{const{centerX:n,centerY:r,angle:l,radius:c,shape:h,size:u,rotation:d,fill:p,fillOpacity:g,stroke:f,strokeOpacity:x,strokeWidth:y,lineDash:b,lineDashOffset:S}=a;o.shape=h==="line"?FY:h,o.size=u,o.fill=s?.fill??p,o.fillOpacity=s?.fillOpacity??g,o.stroke=s?.stroke??f,o.strokeOpacity=s?.strokeOpacity??x,o.strokeWidth=s?.strokeWidth??y,o.lineDash=s?.lineDash??b,o.lineDashOffset=s?.lineDashOffset??S,o.translationX=n+c*Math.cos(l),o.translationY=r+c*Math.sin(l),o.rotation=l+d})}updateTargetLabelSelection(t){return t.targetLabelSelection.update(t.targetData,void 0,e=>e.itemId)}updateTargetLabelNodes(t){const{targetLabelSelection:e}=t;e.each((i,s)=>{const{centerX:o,centerY:a,radius:n,angle:r,text:l}=s,{offsetX:c,offsetY:h,fill:u,fontStyle:d,fontWeight:p,fontSize:g,fontFamily:f,textAlign:x,textBaseline:y}=s.label;if(l==null){i.visible=!1;return}i.visible=!0,i.x=o+n*Math.cos(r)+c,i.y=a+n*Math.sin(r)+h,i.text=l,i.fill=u,i.fontStyle=d,i.fontWeight=p,i.fontSize=g,i.fontFamily=f,i.textAlign=x,i.textBaseline=y})}updateLabelSelection(t){return t.labelSelection.update(t.labelData,void 0,e=>e.label)}updateLabelNodes(t){const{labelSelection:e}=t,i=this.ctx.animationManager.isSkipped();e.each((s,o)=>{s.fill=o.fill,s.fontStyle=o.fontStyle,s.fontWeight=o.fontWeight,s.fontFamily=o.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}updateTickSelection(t){return t.tickSelection.update(t.tickData,void 0,e=>e.index)}updateTickNodes(t){const{scale:e,radius:i,centerX:s,centerY:o,properties:a}=this,{enabled:n,color:r,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:u,spacing:d}=a.scale.label,p=Tk(a.scale.label.rotation??0);t.tickSelection.each((g,f)=>{if(!n){g.visible=!1;return}g.visible=!0,g.text=f.text,g.fill=r,g.fontFamily=l,g.fontSize=c,g.fontStyle=h,g.fontWeight=u,g.textAlign="center",g.textBaseline="middle";const x=e.convert(f.value),{width:y,height:b}=f,S=Math.abs(i*Math.cos(x)),M=Math.abs(i*Math.sin(x)),D=Math.min(Math.max(Math.abs(i/Math.tan(x)),S-y/2),S+y/2),L=Math.min(Math.max(Math.abs(i*Math.tan(x)),M-b/2),M+b/2),T=Math.hypot(D,L),I=s+(T+d)*Math.cos(x),N=o+(T+d)*Math.sin(x);g.x=I,g.y=N,g.rotationCenterX=I,g.rotationCenterY=N,g.rotation=p})}labelsHaveExplicitText(){for(const{datum:t}of this.labelSelection)if(t.text==null)return!1;return!0}formatLabelText(t){const{labelSelection:e,radius:i,textAlign:s,verticalAlign:o}=this,{spacing:a,innerRadiusRatio:n}=this.properties;TTt(this,e,{padding:a,textAlign:s,verticalAlign:o},i*n,t)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),QK([this.datumSelection],pE),QK([this.needleSelection],qK),this.formatLabelText()}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}animateLabelText(t={}){const{animationManager:e}=this.ctx;let i,s,o,a;if(this.labelSelection.each((n,r)=>{n.opacity=1,r.label==="primary"?(i=n.previousDatum?.value??t.from??r.value,s=r.value):r.label==="secondary"&&(o=n.previousDatum?.value??t.from??r.value,a=r.value)}),!this.labelsHaveExplicitText())if(s==null||a==null)this.formatLabelText();else if(i===s&&o===a)this.formatLabelText({label:s,secondaryLabel:a});else{const n=`${this.id}_labels`;e.animate({id:n,groupId:"label",from:{label:i,secondaryLabel:o},to:{label:s,secondaryLabel:a},phase:t.phase??"update",onUpdate:r=>this.formatLabelText(r)})}}animateEmptyUpdateReady(){const{animationManager:t}=this.ctx,{node:e,needle:i}=ZK(!0,this.scale.range[0]);Xx(this.id,"node",t,[this.datumSelection],e,(s,o)=>o.itemId),Xx(this.id,"needle",t,[this.needleSelection],i,()=>"needle"),Xx(this.id,"label",t,[this.labelSelection],BY,(s,o)=>o.label),this.animateLabelText({from:this.properties.scale.min,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:t}=this.ctx,{node:e,needle:i}=ZK(!1,this.scale.range[0]);Xx(this.id,"node",t,[this.datumSelection],e,(s,o)=>o.itemId),Xx(this.id,"needle",t,[this.needleSelection],i,()=>"needle"),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return[NaN,NaN]}getSeriesRange(t,e){return[NaN,NaN]}getLegendData(){return[]}getTooltipContent(t){const{id:e,properties:i}=this,{tooltip:s}=i;if(!i.isValid())return;let o,a;if(t.type===0?(o=i.value,a=i.label.text):{value:o,text:a}=i.targets[t.index],o!=null)return s.formatTooltip(this.properties,{data:[{label:a,fallbackLabel:"Value",value:this.formatLabel(o)}]},{seriesId:e,title:void 0,datum:void 0,value:o})}pickNodeClosestDatum(t){return GY(this,t)}pickFocus(t){return jY(this,t)}getCaptionText(){const{value:t}=this.properties,e=[];return e.push(this.formatLabel(t)),this.labelSelection.each((i,s)=>{const o=Rx(this,s);o!=null&&e.push(o)}),e.join(". ")}getCategoryValue(t){}datumIndexForCategoryValue(t){}};Lk.className="RadialGaugeSeries",Lk.type="radial-gauge";var GTt=(E(),C(w)),ft=(P(),C(et)),{commonSeriesOptionsDefs:jTt,autoSizedLabelOptionsDefs:i$,seriesLabelOptionsDefs:s$,tooltipOptionsDefs:VTt,numberFormatValidator:WTt}=GTt._ModuleSupport,o$={value:(0,ft.required)(ft.number),text:ft.string,shape:(0,ft.or)((0,ft.union)("circle","cross","diamond","heart","plus","pin","square","star","triangle","line"),ft.callback),placement:(0,ft.union)("inside","outside","middle"),spacing:ft.positiveNumber,size:ft.positiveNumber,rotation:ft.number,label:{...s$,spacing:ft.positiveNumber},...ft.fillOptionsDef,...ft.strokeOptionsDef,...ft.lineDashOptionsDef},Nk={type:(0,ft.required)((0,ft.constant)("radial-gauge")),value:(0,ft.required)(ft.number),outerRadius:ft.positiveNumber,innerRadius:ft.positiveNumber,outerRadiusRatio:ft.ratio,innerRadiusRatio:ft.ratio,startAngle:ft.number,endAngle:ft.number,spacing:ft.positiveNumber,cornerMode:(0,ft.union)("container","item"),cornerRadius:ft.positiveNumber,scale:{min:(0,ft.and)(ft.number,(0,ft.lessThan)("max")),max:(0,ft.and)(ft.number,(0,ft.greaterThan)("min")),label:{enabled:ft.boolean,formatter:ft.callback,rotation:ft.number,spacing:ft.positiveNumber,minSpacing:ft.positiveNumber,avoidCollisions:ft.boolean,format:WTt,...ft.fontOptionsDef},interval:{values:(0,ft.arrayOf)(ft.number),step:ft.number},...XD,...ft.fillOptionsDef,...ft.strokeOptionsDef,...ft.lineDashOptionsDef},targets:(0,ft.arrayOfDefs)(o$,"target options array"),segmentation:{enabled:ft.boolean,spacing:ft.positiveNumber,interval:{values:(0,ft.arrayOf)(ft.number),step:ft.number,count:ft.number}},bar:{enabled:ft.boolean,...XD,...ft.fillOptionsDef,...ft.strokeOptionsDef,...ft.lineDashOptionsDef},needle:{enabled:ft.boolean,spacing:ft.positiveNumber,radiusRatio:ft.ratio,...ft.fillOptionsDef,...ft.strokeOptionsDef,...ft.lineDashOptionsDef},label:{text:ft.string,spacing:ft.positiveNumber,...i$},secondaryLabel:{text:ft.string,...i$},tooltip:VTt,...jTt};Nk.defaultColorRange=(0,ft.arrayOf)(ft.color),Nk.defaultTarget={...o$,value:ft.number,label:{...s$,spacing:ft.number}},Nk.scale.defaultFill=ft.color;var{FONT_SIZE_RATIO:UTt}=oE._ModuleSupport,HTt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["gauge"],identifier:"radial-gauge",moduleFactory:t=>new Lk(t),tooltipDefaults:{range:10},themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{outerRadiusRatio:1,innerRadiusRatio:.8,startAngle:270,endAngle:450,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},oE._ModuleSupport.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["./1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["./2",oE._ModuleSupport.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:12}},bar:{strokeWidth:0},segmentation:{enabled:!1,interval:{},spacing:2},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"outside",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},needle:{enabled:!1,fill:{$ref:"foregroundColor"},spacing:10},label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:56,minimumFontSize:18/56,fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}},secondaryLabel:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[UTt.LARGE]},minimumFontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"}}}}},YTt={type:"series",name:"radial-gauge",chartType:"gauge",enterprise:!0,options:Nk,create:t=>new Lk(t)},a$=(E(),C(w)),KTt=(E(),C(w)),$Tt=(P(),C(et));function n$(t){t.nodes.sort((e,i)=>Math.round((e.datum.y-i.datum.y)*100)/100||-(e.datum.size-i.datum.size))}function XTt({nodes:t,size:e},{seriesRectHeight:i,nodeSpacing:s,sizeScale:o}){const a=i*e*o;let n=(i-(a+s*(t.length-1)))/2;t.forEach(({datum:r})=>{const l=i*r.size*o;r.y=n,r.height=l,n+=l+s})}function ZTt(t,e){const{nodes:i}=t,{seriesRectHeight:s,nodeSpacing:o}=e;n$(t);let a=0,n=0;for(const{datum:c}of i){const h=Math.max(n-c.y,0);c.y+=h,a+=h,n=c.y+c.height+o}if(n-o<s)return a>0;let l=s;for(let c=i.length-1;c>=0;c-=1){const{datum:h}=i[c],u=h.y+h.height,d=Math.min(l-u,0);h.y+=d,a+=d,l=h.y-o}return!0}function mE(t,e,i,s,o,a,n,r){const l=(i-t)/(s-e),c=(n-o)/(r-a),h=((a-e)*(l*c)+t*c-o*l)/(c-l);return t<i?h>t&&h<Math.min(i,n):h<t&&h>Math.max(i,n)}function r$(t,e){let i=!1;const s=t.nodes.filter(a=>e(a).length===1);let o=!0;for(let a=0;o&&a<s.length;a+=1){o=!1;for(let n=0;n<s.length-1;n+=1){const{datum:r}=s[n],l=e(s[n])[0].node.datum,{datum:c}=s[n+1],h=e(s[n+1])[0].node.datum;if(!(mE(r.x,r.y,l.x,l.y,c.x,c.y,h.x,h.y)||mE(r.x,r.y+r.height/2,l.x,l.y+l.height/2,c.x,c.y+c.height/2,h.x,h.y+h.height/2)||mE(r.x,r.y+r.height,l.x,l.y+l.height,c.x,c.y+c.height,h.x,h.y+h.height)))continue;const d=s[n];s[n]=s[n+1],s[n+1]=d;const p=r.y;r.y=c.y+c.height-r.height,c.y=p,i=!0,o=!0}}return i}function qTt(t){let e=!1;return n$(t),e=r$(t,i=>i.linksBefore)||e,e=r$(t,i=>i.linksAfter)||e,e}function QTt(t){if(t.length===0)return;let e=0,i=0;for(const{node:{datum:s}}of t)e+=s.y*s.size,i+=s.size;return e/i}function l$(t,e,i,s){return t.nodes.forEach(({datum:o,linksBefore:a,linksAfter:n})=>{const r=s===1?a:n,l=s===1?n:a,c=QTt(r);if(c!=null){const h=l.length!==0?i:1;o.y=o.y+(c-o.y)*h}}),ZTt(t,e)}function c$(t,e,i){let s=!1;for(const o of t)s=l$(o,e,i,1)||s;return s}function JTt(t,e,i){let s=!1;for(let o=t.length-1;o>=0;o-=1)s=l$(t[o],e,i,-1)||s;return s}function h$(t){let e=!1;for(let i=t.length-1;i>=0;i-=1)e=qTt(t[i])||e;return e}function tCt(t,e){t.forEach(s=>{XTt(s,e)});let i=!1;for(let s=0;s<6;s+=1){const o=c$(t,e,1);i=JTt(t,e,.5);const a=h$(t);if(!o&&!i&&!a)break}i&&(c$(t,e,1),h$(t))}var eCt=(E(),C(w)),{BBox:iCt,Path:sCt,ScenePathChangeDetection:bf,splitBezier:oCt}=eCt._ModuleSupport;function Ok(t,e,i,s,o,a,n,r,l,c){let h,u;if(o!==i&&l!==n){const L=-(s-e)/(o-i),T=-(r-a)/(l-n);h=(n-i+L*e-T*a)/(L-T),u=L*(h-e)+i}else if(o===i&&l!==n)h=e,u=-(r-a)/(l-n)*(h-r)+l;else if(o!==i&&l===n)h=r,u=-(s-e)/(o-i)*(h-e)+i;else throw new Error("Offsetting flat bezier curve");const d=Math.hypot(i-u,e-h),p=(d+c)/d,g=Math.hypot(l-u,r-h),f=(g+c)/g,x=h+(s-h)*p,y=u+(o-u)*p,b=h+(a-h)*f,S=u+(n-u)*f,M=h+(r-h)*f,D=u+(l-u)*f;t.cubicCurveTo(x,y,b,S,M,D)}var Xd=class extends sCt{constructor(){super(...arguments),this.x1=0,this.x2=0,this.y1=0,this.y2=0,this.height=0,this.inset=0}computeBBox(){const t=Math.min(this.x1,this.x2),e=Math.max(this.x1,this.x2)-t,i=Math.min(this.y1,this.y2),s=Math.max(this.y1,this.y2)-i+this.height;return new iCt(t,i,e,s)}updatePath(){const{path:t,inset:e}=this;t.clear();const i=this.x1+e,s=this.x2-e,o=this.y1+e,a=this.y2+e,n=this.height-2*e;if(n<0||i>s)return;const r=i,l=o+n/2,c=(i+s)/2,h=o+n/2,u=(i+s)/2,d=a+n/2,p=s,g=a+n/2;if(t.moveTo(r,l-n/2),Math.abs(this.y2-this.y1)<1||this.x2-this.x1<this.height*Math.SQRT2)t.cubicCurveTo(c,h-n/2,u,d-n/2,p,g-n/2),t.lineTo(p,g+n/2),t.cubicCurveTo(u,d+n/2,c,h+n/2,r,l+n/2);else{const[f,x]=oCt(r,l,c,h,u,d,p,g,.5),y=(a>o?1:-1)*n/2;Ok(t,f[0].x,f[0].y,f[1].x,f[1].y,f[2].x,f[2].y,f[3].x,f[3].y,y),Ok(t,x[0].x,x[0].y,x[1].x,x[1].y,x[2].x,x[2].y,x[3].x,x[3].y,-y),t.lineTo(p,g+n/2),Ok(t,x[3].x,x[3].y,x[2].x,x[2].y,x[1].x,x[1].y,x[0].x,x[0].y,y),Ok(t,f[3].x,f[3].y,f[2].x,f[2].y,f[1].x,f[1].y,f[0].x,f[0].y,-y)}t.closePath()}};m([bf()],Xd.prototype,"x1",2),m([bf()],Xd.prototype,"x2",2),m([bf()],Xd.prototype,"y1",2),m([bf()],Xd.prototype,"y2",2),m([bf()],Xd.prototype,"height",2),m([bf()],Xd.prototype,"inset",2);var aCt=(E(),C(w)),{BaseProperties:u$,FillGradientDefaults:nCt,FillPatternDefaults:rCt,SeriesTooltip:lCt,SeriesProperties:cCt,ARRAY:hCt,ARRAY_OF:yE,COLOR_STRING:Sf,COLOR_STRING_ARRAY:d$,FUNCTION:p$,LINE_DASH:g$,OBJECT:vf,POSITIVE_NUMBER:Zd,OR:xE,COLOR_GRADIENT:bE,COLOR_PATTERN:uCt,RATIO:wk,STRING:Oh,UNION:dCt,TempValidate:jt,Label:pCt}=aCt._ModuleSupport,gCt=dCt(["left","right","center","justify"],"a justification value"),f$=class extends pCt{constructor(){super(...arguments),this.spacing=1}};m([jt(Zd)],f$.prototype,"spacing",2);var cc=class extends u${constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};m([jt(xE(bE,Sf),{optional:!0})],cc.prototype,"fill",2),m([jt(wk)],cc.prototype,"fillOpacity",2),m([jt(Sf,{optional:!0})],cc.prototype,"stroke",2),m([jt(wk)],cc.prototype,"strokeOpacity",2),m([jt(Zd)],cc.prototype,"strokeWidth",2),m([jt(g$)],cc.prototype,"lineDash",2),m([jt(Zd)],cc.prototype,"lineDashOffset",2),m([jt(p$,{optional:!0})],cc.prototype,"itemStyler",2);var bn=class extends u${constructor(){super(...arguments),this.spacing=1,this.width=1,this.alignment="justify",this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};m([jt(Zd)],bn.prototype,"spacing",2),m([jt(Zd)],bn.prototype,"width",2),m([jt(gCt)],bn.prototype,"alignment",2),m([jt(xE(bE,Sf),{optional:!0})],bn.prototype,"fill",2),m([jt(wk)],bn.prototype,"fillOpacity",2),m([jt(Sf,{optional:!0})],bn.prototype,"stroke",2),m([jt(wk)],bn.prototype,"strokeOpacity",2),m([jt(Zd)],bn.prototype,"strokeWidth",2),m([jt(g$)],bn.prototype,"lineDash",2),m([jt(Zd)],bn.prototype,"lineDashOffset",2),m([jt(p$,{optional:!0})],bn.prototype,"itemStyler",2);var is=class extends cCt{constructor(){super(...arguments),this.nodes=void 0,this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.fillGradientDefaults=new nCt,this.fillPatternDefaults=new rCt,this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=[],this.strokes=[],this.label=new f$,this.link=new cc,this.node=new bn,this.tooltip=new lCt}};m([jt(hCt,{optional:!0})],is.prototype,"nodes",2),m([jt(Oh)],is.prototype,"fromKey",2),m([jt(Oh)],is.prototype,"toKey",2),m([jt(Oh)],is.prototype,"idKey",2),m([jt(Oh,{optional:!0})],is.prototype,"idName",2),m([jt(Oh,{optional:!0})],is.prototype,"labelKey",2),m([jt(Oh,{optional:!0})],is.prototype,"labelName",2),m([jt(Oh,{optional:!0})],is.prototype,"sizeKey",2),m([jt(Oh,{optional:!0})],is.prototype,"sizeName",2),m([jt(vf)],is.prototype,"fillGradientDefaults",2),m([jt(vf)],is.prototype,"fillPatternDefaults",2),m([jt(yE(d$))],is.prototype,"defaultColorRange",2),m([jt(yE(Sf))],is.prototype,"defaultPatternFills",2),m([jt(yE(xE(bE,Sf,uCt)))],is.prototype,"fills",2),m([jt(d$)],is.prototype,"strokes",2),m([jt(vf)],is.prototype,"label",2),m([jt(vf)],is.prototype,"link",2),m([jt(vf)],is.prototype,"node",2),m([jt(vf)],is.prototype,"tooltip",2);var{Transformable:fCt,applyShapeStyle:m$,SeriesNodePickMode:y$,CachedTextMeasurerPool:mCt,TextWrapper:x$,TextUtils:b$,createDatumId:Ek,getShapeStyle:_k,Rect:S$,BBox:v$}=KTt._ModuleSupport,Rk=class extends qH{constructor(t){super({moduleCtx:t,pickModes:[y$.NEAREST_NODE,y$.EXACT_SHAPE_MATCH]}),this.properties=new is}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new Xd}nodeFactory(){return new S$}createNodeData(){const{id:t,_nodeDataDependencies:{seriesRectWidth:e,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0}}=this,{fromKey:s,toKey:o,sizeKey:a,label:{spacing:n},node:{spacing:r,width:l,alignment:c}}=this.properties,{nodeGraph:h,links:u,maxPathLength:d}=this.getNodeGraph(T=>({...T,x:NaN,y:NaN,width:l,height:NaN}),T=>({...T,x1:NaN,x2:NaN,y1:NaN,y2:NaN,height:NaN}),{includeCircularReferences:!1}),p=h,g=this.isLabelEnabled()?(e-l)*(1-d/(d+1)):0,f=(e-l-2*g)/(d-1),x=[];for(let T=0;T<d;T+=1){const I=g+T*f;x.push({index:T,size:0,nodes:[],x:I})}p.forEach(T=>{const{datum:I,linksBefore:N,linksAfter:O,maxPathLengthBefore:R,maxPathLengthAfter:_}=T,B=Math.max(N.reduce((z,{link:U})=>z+U.size,0),O.reduce((z,{link:U})=>z+U.size,0));if(N.length===0&&O.length===0||B===0){T.columnIndex=-1;return}let W;switch(c){case"left":W=x[R];break;case"right":W=x[d-1-_];break;case"center":{if(N.length!==0)W=x[R];else if(O.length!==0){const z=O.reduce((U,H)=>Math.min(U,H.node.maxPathLengthBefore),d)-1;W=x[z]}else W=x[0];break}case"justify":{W=O.length===0?x[d-1]:x[R];break}}I.x=W.x,I.size=B;const F=this.getLabelText(this.properties.label,{datum:I.datum,value:I.label,fromKey:s,toKey:o,sizeKey:a,size:B});I.label=String(F),W.nodes.push(T),W.size+=B,T.columnIndex=W.index}),p.forEach(T=>{let I=1/0,N=0;T.linksAfter.forEach(O=>{const R=O.node,{columnIndex:_}=R;_<I?(I=_,N=R.datum.size):_===I&&(N=Math.max(N,R.datum.size))}),T.closestColumnIndex=I,T.maxSizeOfClosestNodesAfter=N});const y=x.reduce((T,{size:I,nodes:N})=>{const O=(1-(N.length-1)*(r/i))/I;return Math.min(T,O)},1/0);for(let T=x.length-1;T>=0;T-=1)x[T].nodes.sort((N,O)=>N.closestColumnIndex-O.closestColumnIndex||N.maxSizeOfClosestNodesAfter-O.maxSizeOfClosestNodesAfter||N.datum.size-O.datum.size);tCt(x,{seriesRectHeight:i,nodeSpacing:r,sizeScale:y});let b=!1;if(p.forEach(({datum:T,linksBefore:I,linksAfter:N})=>{b||(b=T.height<0);const O=T.y+T.height,R=W=>W.sort((F,z)=>{const U=F.node.datum,H=z.node.datum,j=U.y+U.height,V=H.y+H.height,G=Math.atan2(U.y-T.y,Math.abs(U.x-T.x))-Math.atan2(H.y-T.y,Math.abs(H.x-T.x)),K=Math.atan2(j-O,Math.abs(U.x-T.x))-Math.atan2(V-O,Math.abs(H.x-T.x));return G+K});let _=T.y;R(I).forEach(({link:W})=>{W.y2=_,_+=W.size*i*y});let B=T.y;R(N).forEach(({link:W})=>{W.y1=B,B+=W.size*i*y})}),b){$Tt.Logger.warnOnce("There was insufficient space to display the Sankey Series. Reduce the node spacing, or provide a larger container.");return}const S=[],M=[],{fontSize:D}=this.properties.label,L=this.properties.label.getFont();return x.forEach((T,I)=>{const N=I===0,O=I===x.length-1;let R=-1/0;T.nodes.sort((_,B)=>_.datum.y-B.datum.y),T.nodes.forEach(({datum:_})=>{if(_.midPoint={x:_.x+_.width/2,y:_.y+_.height/2},S.push(_),_.label==null)return;const B=N?_.x-n:_.x+_.width+n,W=_.y+_.height/2;let F;if(!N&&!O){const j=W-b$.getLineHeight(D),V=W+b$.getLineHeight(D);let G=e;p.forEach(({datum:$})=>{$.x>_.x&&Math.max($.y,j)<=Math.min($.y+$.height,V)&&(G=Math.min(G,$.x-n))});const K=G-_.x-2*n;F=x$.wrapText(_.label,{maxWidth:K,maxHeight:_.height,font:this.properties.label,textWrap:"never",overflow:"hide"})}if(F==null||F===""){const j=N||O?n:n*2;F=x$.wrapText(_.label,{maxWidth:f-j,maxHeight:_.height,font:this.properties.label,textWrap:"never"})}if(F==="")return;const{height:z}=mCt.measureText(F,{font:L,textAlign:"left",textBaseline:"middle"}),U=W-z/2,H=W+z/2;U>=R&&(M.push({x:B,y:W,leading:N,text:F}),R=H)})}),u.forEach(T=>{const{fromNode:I,toNode:N,size:O}=T;T.height=i*O*y,T.x1=I.x+l,T.x2=N.x,T.midPoint={x:(T.x1+T.x2)/2,y:(T.y1+T.y2)/2+T.height/2},S.push(T)}),{itemId:t,nodeData:S,labelData:M}}updateLabelSelection(t){const e=this.isLabelEnabled()?t.labelData:[];return t.labelSelection.update(e)}updateLabelNodes(t){const{labelSelection:e}=t,{color:i,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:n}=this.properties.label;e.each((r,{x:l,y:c,leading:h,text:u})=>{r.visible=!0,r.x=l,r.y=c,r.text=u,r.fill=i,r.fontStyle=s,r.fontWeight=o,r.fontSize=a,r.fontFamily=n,r.textAlign=h?"right":"left",r.textBaseline="middle"})}updateNodeSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>Ek([e.type,e.id]))}getBaseNodeStyle(t){const{properties:e}=this,{fill:i,fillOpacity:s,stroke:o,strokeOpacity:a,lineDash:n,lineDashOffset:r}=e.node,l=t?e.highlightStyle.item:void 0;return _k({fill:l?.fill??i,fillOpacity:l?.fillOpacity??s,stroke:l?.stroke??o,strokeOpacity:l?.strokeOpacity??a,strokeWidth:l?.strokeWidth??this.getStrokeWidth(e.node.strokeWidth),lineDash:l?.lineDash??n,lineDashOffset:l?.lineDashOffset??r},e.fillGradientDefaults,e.fillPatternDefaults)}getNodeStyleOverrides(t,e,i,s,o,a,n){const{id:r,properties:l}=this,{fills:c,strokes:h,defaultColorRange:u,defaultPatternFills:d}=l,{itemStyler:p}=l.node,g=a.fill??c[i%c.length],f=a.stroke??h[i%h.length],x=u[i%u.length].map(S=>({color:S})),y=d[i%d.length];let b;if(n||(b??(b={}),b.fill=g,b.stroke=f),p!=null){const S=this.cachedDatumCallback(Ek(t,"node",n?"highlight":"node"),()=>{const{fillOpacity:M=1,strokeOpacity:D=1,strokeWidth:L=0,lineDash:T=[],lineDashOffset:I=0}=a;return this.callWithContext(p,{seriesId:r,datum:e,highlighted:n,label:o,size:s,fill:g,fillOpacity:M,stroke:f,strokeOpacity:D,strokeWidth:L,lineDash:T,lineDashOffset:I})});b??(b={}),Object.assign(b,S)}return _k(b,{...this.properties.fillGradientDefaults.toJson(),colorStops:x},{...this.properties.fillPatternDefaults.toJson(),fill:y,stroke:y})}updateNodeNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getBaseNodeStyle(i),o=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:r,size:l,label:c}=n,h=this.getNodeStyleOverrides(String(r.index),n.datum,r.index,l,c,s,i);a.x=n.x,a.y=n.y,a.width=Math.max(n.width,0),a.height=Math.max(n.height,0),m$(a,s,h,o)})}getShapeFillBBox(){const t=this._nodeDataDependencies?.seriesRectWidth??0,e=this._nodeDataDependencies?.seriesRectHeight??0,i=new v$(0,0,t,e);return{series:i,axis:i}}updateLinkSelection(t){return t.datumSelection.update(t.nodeData,void 0,e=>Ek([e.type,e.index,e.fromNode.id,e.toNode.id]))}getBaseLinkStyle(t){const{properties:e}=this,{fill:i,fillOpacity:s,stroke:o,strokeOpacity:a,lineDash:n,lineDashOffset:r}=e.link,l=t?e.highlightStyle.item:void 0;return _k({fill:l?.fill??i,fillOpacity:l?.fillOpacity??s,stroke:l?.stroke??o,strokeOpacity:l?.strokeOpacity??a,strokeWidth:l?.strokeWidth??this.getStrokeWidth(e.link.strokeWidth),lineDash:l?.lineDash??n,lineDashOffset:l?.lineDashOffset??r},e.fillGradientDefaults,e.fillPatternDefaults)}getLinkStyleOverrides(t,e,i,s,o){const{id:a,properties:n}=this,{fills:r,strokes:l,defaultColorRange:c,defaultPatternFills:h}=n,{itemStyler:u}=n.link,d=s.fill??r[i%r.length],p=s.stroke??l[i%l.length],g=c[i%c.length].map(y=>({color:y})),f=h[i%h.length];let x;if(o||(x??(x={}),x.fill=d,x.stroke=p),u!=null){const y=this.cachedDatumCallback(Ek(t,"link",o?"highlight":"node"),()=>{const{fillOpacity:b=1,strokeOpacity:S=1,strokeWidth:M=0,lineDash:D=[],lineDashOffset:L=0}=s;return this.callWithContext(u,{seriesId:a,datum:e,highlighted:o,fill:d,fillOpacity:b,stroke:p,strokeOpacity:S,strokeWidth:M,lineDash:D,lineDashOffset:L})});x??(x={}),Object.assign(x,y)}return _k(x,{...this.properties.fillGradientDefaults.toJson(),colorStops:g},{...this.properties.fillPatternDefaults.toJson(),fill:f,stroke:f})}updateLinkNodes(t){const{datumSelection:e,isHighlight:i}=t,s=this.getBaseLinkStyle(i),o=this.getShapeFillBBox();e.each((a,n)=>{const{datumIndex:r}=n,l=n.fromNode.datumIndex,c=this.getLinkStyleOverrides(String(r.index),n.datum,l.index,s,i);a.x1=n.x1,a.y1=n.y1,a.x2=n.x2,a.y2=n.y2,a.height=n.height,m$(a,s,c,o),a.inset=a.strokeWidth/2})}getTooltipContent(t){const{id:e,linksProcessedData:i,nodesProcessedData:s,properties:o}=this,{fromKey:a,toKey:n,sizeKey:r,sizeName:l,tooltip:c}=o,h=this.contextNodeData?.nodeData.find(x=>x.datumIndex.type===t.type&&x.datumIndex.index===t.index);if(h==null)return;const u=h.type===0?h.fromNode.index:h.index,d=h.type===0?`${h.fromNode.label} - ${h.toNode.label}`:h.label,p=t.type===0?i?.dataSources.get(this.id)?.[t.index]:s?.dataSources.get(this.id)?.[t.index],g=h.size;let f;if(h.type===0){const x=h.fromNode.datumIndex,y=this.getBaseLinkStyle(!1);Object.assign(y,this.getLinkStyleOverrides(String(t.index),p,x.index,y,!1)),f=y}else{const x=h.label,y=this.getBaseNodeStyle(!1);Object.assign(y,this.getNodeStyleOverrides(String(t.index),p,t.index,g,x,y,!1)),f=y}return c.formatTooltip(this.properties,{title:d,symbol:this.legendItemSymbol(h.type,u,f),data:r!=null?[{label:l,fallbackLabel:r,value:String(g)}]:[]},{seriesId:e,datum:p,title:d,fromKey:a,toKey:n,sizeKey:r,sizeName:l,size:g,...f})}computeFocusBounds(t){if(t instanceof S$){const{x:e,y:i,width:s,height:o}=t,a=new v$(e,i,s,o);return fCt.toCanvas(this.contentGroup,a)}return t}};Rk.className="SankeySeries",Rk.type="sankey";var yCt=(E(),C(w)),ye=(P(),C(et)),{commonSeriesOptionsDefs:xCt,seriesLabelOptionsDefs:bCt,tooltipOptionsDefs:SCt}=yCt._ModuleSupport,Zx={type:(0,ye.required)((0,ye.constant)("sankey")),fromKey:(0,ye.required)(ye.string),toKey:(0,ye.required)(ye.string),sizeKey:ye.string,sizeName:ye.string,fills:(0,ye.arrayOf)(ye.colorUnion),strokes:(0,ye.arrayOf)(ye.color),label:{...bCt,spacing:ye.positiveNumber},link:{itemStyler:ye.callback,...ye.fillOptionsDef,...ye.strokeOptionsDef,...ye.lineDashOptionsDef},node:{width:ye.positiveNumber,spacing:ye.positiveNumber,alignment:(0,ye.union)("left","center","right","justify"),itemStyler:ye.callback,...ye.fillOptionsDef,...ye.strokeOptionsDef,...ye.lineDashOptionsDef},tooltip:SCt,...xCt};Zx.fillGradientDefaults=ye.fillGradientDefaults,Zx.fillPatternDefaults=ye.fillPatternDefaults,Zx.defaultColorRange=(0,ye.arrayOf)((0,ye.arrayOf)(ye.color)),Zx.defaultPatternFills=(0,ye.arrayOf)(ye.color);var vCt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["flow-proportion"],solo:!0,identifier:"sankey",moduleFactory:t=>new Rk(t),tooltipDefaults:{range:"exact"},themeTemplate:{seriesArea:{padding:{top:10,bottom:10}},series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:a$._ModuleSupport.FILL_PATTERN_DEFAULTS,defaultColorRange:{$palette:"gradients"},defaultPatternFills:a$._ModuleSupport.SAFE_FILLS_OPERATION,highlightStyle:{series:{dimOpacity:.2}},label:{fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:10},node:{spacing:20,width:10,strokeWidth:0},link:{fillOpacity:.5,strokeWidth:0}},legend:{enabled:!1,toggleSeries:!1}}},MCt={type:"series",name:"sankey",chartType:"flow-proportion",enterprise:!0,options:Zx,create:t=>new Rk(t)},M$=(E(),C(w)),qx=(E(),C(w)),DCt=(E(),C(w)),{HierarchySeriesProperties:kCt,HighlightStyle:ACt,SeriesTooltip:ICt,TempValidate:ji,COLOR_STRING:TCt,FUNCTION:CCt,NUMBER:D$,OBJECT:Mf,POSITIVE_NUMBER:SE,RATIO:Pk,STRING:Bk}=DCt._ModuleSupport,wh=class extends ACt{constructor(){super(...arguments),this.label=new qr,this.secondaryLabel=new qr}};m([ji(Bk,{optional:!0})],wh.prototype,"fill",2),m([ji(Pk,{optional:!0})],wh.prototype,"fillOpacity",2),m([ji(TCt,{optional:!0})],wh.prototype,"stroke",2),m([ji(SE,{optional:!0})],wh.prototype,"strokeWidth",2),m([ji(Pk,{optional:!0})],wh.prototype,"strokeOpacity",2),m([ji(Mf)],wh.prototype,"label",2),m([ji(Mf)],wh.prototype,"secondaryLabel",2);var _o=class extends kCt{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=0,this.strokeOpacity=1,this.cornerRadius=0,this.highlightStyle=new wh,this.label=new qr,this.secondaryLabel=new Ix,this.tooltip=new ICt}};m([ji(Bk,{optional:!0})],_o.prototype,"sizeName",2),m([ji(Bk,{optional:!0})],_o.prototype,"labelKey",2),m([ji(Bk,{optional:!0})],_o.prototype,"secondaryLabelKey",2),m([ji(Pk)],_o.prototype,"fillOpacity",2),m([ji(SE)],_o.prototype,"strokeWidth",2),m([ji(Pk)],_o.prototype,"strokeOpacity",2),m([ji(SE)],_o.prototype,"cornerRadius",2),m([ji(D$,{optional:!0})],_o.prototype,"sectorSpacing",2),m([ji(D$,{optional:!0})],_o.prototype,"padding",2),m([ji(CCt,{optional:!0})],_o.prototype,"itemStyler",2),m([ji(Mf)],_o.prototype,"highlightStyle",2),m([ji(Mf)],_o.prototype,"label",2),m([ji(Mf)],_o.prototype,"secondaryLabel",2),m([ji(Mf)],_o.prototype,"tooltip",2);var{fromToMotion:LCt,normalizeAngle360:NCt,createDatumId:OCt,Sector:vE,Group:zk,ScalableGroup:wCt,Selection:ME,TransformableText:DE,BBox:k$,applyShapeStyle:ECt,getShapeStyle:kE}=qx._ModuleSupport,_Ct=class extends qx._ModuleSupport.HierarchyNode{constructor(){super(...arguments),this.label=void 0,this.secondaryLabel=void 0,this.contentHeight=0,this.bbox=void 0,this.startAngle=0,this.endAngle=0}};function A$(t,e=0,i=2*Math.PI/t.sumSize){for(const s of t.children){const o=e+s.sumSize*i;s.startAngle=e,s.endAngle=o,A$(s,e,i),e=o}}var Fk=class extends qx._ModuleSupport.HierarchySeries{constructor(){super(...arguments),this.NodeClass=_Ct,this.properties=new _o,this.scalingGroup=this.contentGroup.appendChild(new wCt),this.sectorGroup=this.scalingGroup.appendChild(new zk),this.sectorLabelGroup=this.scalingGroup.appendChild(new zk),this.highlightSectorGroup=this.scalingGroup.appendChild(new zk),this.datumSelection=ME.select(this.sectorGroup,vE),this.labelSelection=ME.select(this.sectorLabelGroup,zk),this.highlightSelection=ME.select(this.highlightSectorGroup,vE)}processData(){super.processData(),A$(this.rootNode)}updateSelections(){const t=this.ctx.highlightManager?.getActiveHighlight();if(this.highlightSelection.update(t!=null?[t]:[],void 0,a=>this.getDatumId(a)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{chart:e}=this;if(e==null||e.seriesRect==null)return;const s=Array.from(this.rootNode),o=a=>{a.append([new DE({tag:0}),new DE({tag:1})])};this.datumSelection.update(s,void 0,a=>this.getDatumId(a)),this.labelSelection.update(s,o,a=>this.getDatumId(a))}getItemBaseStyle(t){const{properties:e}=this,i=t?e.highlightStyle:void 0;return kE({fill:i?.fill,fillOpacity:i?.fillOpacity??e.fillOpacity,stroke:i?.stroke,strokeWidth:i?.strokeWidth??this.getStrokeWidth(e.strokeWidth),strokeOpacity:i?.strokeOpacity??e.strokeOpacity},e.fillGradientDefaults,e.fillPatternDefaults)}getItemStyleOverrides(t,e,i,s,o,a){const{id:n,properties:r,colorScale:l}=this,{fills:c,strokes:h,itemStyler:u}=r,d=t[0],p=o.fill??c[d%c.length],g=o.stroke??h[d%h.length],f={};if(a||(f.fill=s!=null?l.convert(s):p,f.stroke=g),u!=null){const x=this.cachedDatumCallback(OCt(t.join(":"),a?"highlight":"node"),()=>this.callWithContext(u,{seriesId:n,datum:e,depth:i,highlighted:a,fill:p,stroke:g,...o}));Object.assign(f,x)}return kE(f,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}updateNodes(){const{chart:t,data:e,maxDepth:i}=this;if(t==null||e==null)return;const{width:s,height:o}=t.seriesRect,{sectorSpacing:a=0,padding:n=0,cornerRadius:r,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g}=this.properties;this.contentGroup.translationX=s/2,this.contentGroup.translationY=o/2;const f=a*.5,x=Math.min(s,o)/2,y=x/(i+1),b=-Math.PI/2,S={series:new k$(-x,-x,2*x,2*x),axis:new k$(-x,-x,2*x,2*x)};this.rootNode?.walk(N=>{const{startAngle:O,endAngle:R}=N;if(N.depth!=null){const _=(O+R)/2+b,B=(N.depth+.5)*y;N.midPoint.x=Math.cos(_)*B,N.midPoint.y=Math.sin(_)*B}}),this.rootNode?.walk(N=>{const{datum:O,depth:R,startAngle:_,endAngle:B,parent:W,sumSize:F}=N;N.label=void 0,N.secondaryLabel=void 0,N.contentHeight=0;let z;if(O!=null&&R!=null&&u!=null){const Dt=O[u];z=this.getLabelText(this.properties.label,{depth:R,datum:O,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g,value:Dt})}z===""&&(z=void 0);let U;if(O!=null&&R!=null&&d!=null){const Dt=O[d];U=this.getLabelText(this.properties.secondaryLabel,{depth:R,datum:O,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g,value:Dt})}if(U===""&&(U=void 0),R==null)return;const H=R*y+f,j=(R+1)*y-f,V=H>f?f/H:f,G=j>f?f/j:f,K=_+V,Z=B+V-K,Q=_+G,J=B+G-Q,X=Dt=>{if(R===0&&W?.sumSize===F)return{width:2*Math.sqrt(j**2-(Dt*.5)**2),height:Dt,meta:0};const te=Dt,Xs=2*Math.sqrt(j**2-(H+te)**2),fo=Z<Math.PI?2*H*Math.tan(Z*.5):1/0,Mn=Math.min(Xs,fo),Qd=Math.PI/4;let hc,Ph;return R===0?(hc=Dt,Ph=Math.sqrt(j**2-(hc/2)**2)-Dt/(2*Math.tan(J*.5))):NCt(Z)<Qd?(hc=2*H*Math.tan(Z*.5),Ph=Math.sqrt(j**2-(hc/2)**2)-H):(Ph=0,hc=0),Mn>=Ph?{width:Mn,height:te,meta:1}:{width:Ph,height:hc,meta:2}},st=YO(z,this.properties.label,U,this.properties.secondaryLabel,{padding:n},X);if(st==null)return;const{width:nt,height:dt,meta:ut,label:St,secondaryLabel:Lt}=st,mt=b+(_+B)/2,Jt=Math.sin(mt)>=0,ie=Math.cos(mt)>=0,Kt=(Jt?3:12)&(ie?6:9);let $t;switch(ut){case 0:$t=0;break;case 1:{const Gt=j-(y-dt)*.58,te=Math.sqrt((j-n)**2-(nt/2)**2);$t=Math.min(Gt,te);break}case 2:if(R===0){const Dt=dt/(2*Math.tan(Z*.5))+nt*.5,Gt=Math.sqrt(j**2-(dt*.5)**2)-nt*.5;$t=(Dt+Gt)*.5}else $t=(H+j)*.5;break}if(St!=null){const{fontStyle:Dt="normal",fontFamily:Gt,fontWeight:te="normal",color:Xs="black"}=this.properties.label;N.label={...St,fontStyle:Dt,fontFamily:Gt,fontWeight:te,color:Xs,labelPlacement:ut,circleQuarter:Kt,radius:$t,theta:mt}}if(Lt!=null){const{fontStyle:Dt="normal",fontFamily:Gt,fontWeight:te="normal",color:Xs="black"}=this.properties.secondaryLabel;N.secondaryLabel={...Lt,fontStyle:Dt,fontFamily:Gt,fontWeight:te,color:Xs,labelPlacement:ut,circleQuarter:Kt,radius:$t,theta:mt}}N.contentHeight=st.height});const M=(N,O,R,_)=>{const{datum:B,datumIndex:W,depth:F,colorValue:z,startAngle:U,endAngle:H}=N;if(F==null){O.visible=!1;return}O.visible=!0;const j=this.getItemStyleOverrides(W,B,F,z,R,_),V=j.fill??R.fill,G=j.strokeWidth??R.strokeWidth,K=qx._ModuleSupport.isGradientFill(V)&&V.bounds!=="item"?S:void 0;ECt(O,R,j,K),O.centerX=0,O.centerY=0,O.innerRadius=F*y,O.outerRadius=(F+1)*y,O.startAngle=U+b,O.endAngle=H+b,O.inset=f+G*.5,O.cornerRadius=r},D=this.getItemBaseStyle(!1);this.datumSelection.each((N,O)=>{M(O,N,D,!1)});const L=this.getItemBaseStyle(!0);this.highlightSelection.each((N,O)=>{M(O,N,L,!0)});const T=(N,O,R,_)=>{const{depth:B,contentHeight:W}=N,F=R===0,z=F?N.label:N.secondaryLabel;if(B==null||z==null){O.visible=!1;return}const{labelPlacement:U,circleQuarter:H,radius:j,theta:V}=z;let G;switch(_&&(G=(F?this.properties.highlightStyle.label:this.properties.highlightStyle.secondaryLabel).color),O.text=z.text,O.fontSize=z.fontSize,O.lineHeight=z.lineHeight,O.fontStyle=z.fontStyle,O.fontFamily=z.fontFamily,O.fontWeight=z.fontWeight,O.fill=G??z.color,U){case 0:O.textAlign="center",O.textBaseline="top",O.translationX=0,O.translationY=(F?0:W-z.height)-W*.5,O.rotation=0;break;case 1:{const K=(H&3)!==0,$=F===!K?j:j-(W-z.height);O.textAlign="center",O.textBaseline=K?"bottom":"top",O.translationX=Math.cos(V)*$,O.translationY=Math.sin(V)*$,O.rotation=K?V-Math.PI*.5:V+Math.PI*.5;break}case 2:{const K=(H&6)!==0,$=F===!K?(W-z.height)*.5:(z.height-W)*.5;O.textAlign="center",O.textBaseline="middle",O.translationX=Math.cos(V)*j+Math.cos(V+Math.PI/2)*$,O.translationY=Math.sin(V)*j+Math.sin(V+Math.PI/2)*$,O.rotation=K?V:V+Math.PI;break}}O.visible=!0},I=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(DE).forEach(N=>{const O=N.closestDatum();T(O,N,N.tag,O===I)})}getTooltipContent(t){const{id:e,properties:i}=this,{labelKey:s,secondaryLabelKey:o,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,tooltip:h}=i,u=t.reduce((M,D)=>M?.children[D],this.rootNode);if(u==null)return;const{datum:d,depth:p}=u;if(d==null||p==null)return;const g=[],f=n!=null?d[n]:void 0;f!=null&&g.push({label:r,fallbackLabel:n,value:f});const x=l!=null?d[l]:void 0;x!=null&&g.push({label:c,fallbackLabel:l,value:x});const y=this.getItemBaseStyle(!1);Object.assign(y,this.getItemStyleOverrides(t,d,p,x,y,!1));const b=y.fill,S=kE({shape:"square",fill:b,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0},i.fillGradientDefaults,i.fillPatternDefaults);return qx._ModuleSupport.isGradientFill(S.fill)&&(S.fill={...S.fill,gradient:"linear",rotation:0,reverse:!1}),h.formatTooltip(i,{title:s!=null?d[s]:void 0,symbol:{marker:S},data:g},{seriesId:e,datum:d,title:void 0,depth:p,labelKey:s,secondaryLabelKey:o,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,...y})}createNodeData(){}pickNodeClosestDatum(t){return this.pickNodeNearestDistantObject(t,this.datumSelection.selectByClass(vE))}animateEmptyUpdateReady(){LCt(this.id,"nodes",this.ctx.animationManager,[this.scalingGroup],{toFn(){return{scalingX:1,scalingY:1}},fromFn(){return{scalingX:0,scalingY:0}}})}computeFocusBounds(t){return t}};Fk.className="SunburstSeries",Fk.type="sunburst";var RCt=(E(),C(w)),Fe=(P(),C(et)),{commonSeriesOptionsDefs:PCt,autoSizedLabelOptionsDefs:I$,tooltipOptionsDefs:BCt,without:T$}=RCt._ModuleSupport,zCt={type:(0,Fe.required)((0,Fe.constant)("sunburst")),labelKey:Fe.string,secondaryLabelKey:Fe.string,childrenKey:Fe.string,sizeKey:Fe.string,colorKey:Fe.string,sizeName:Fe.string,colorName:Fe.string,fills:(0,Fe.arrayOf)(Fe.colorUnion),strokes:(0,Fe.arrayOf)(Fe.color),colorRange:(0,Fe.arrayOf)(Fe.color),sectorSpacing:Fe.positiveNumber,cornerRadius:Fe.positiveNumber,padding:Fe.positiveNumber,itemStyler:Fe.callback,label:{spacing:Fe.positiveNumber,...I$},secondaryLabel:I$,tooltip:BCt,...PCt,...T$(Fe.fillOptionsDef,["fill"]),...T$(Fe.strokeOptionsDef,["stroke"]),highlightStyle:{label:{color:Fe.color},secondaryLabel:{color:Fe.color},...Fe.fillOptionsDef,...Fe.strokeOptionsDef}},{FONT_SIZE_RATIO:C$}=M$._ModuleSupport,FCt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"sunburst",moduleFactory:t=>new Fk(t),tooltipDefaults:{range:"exact"},solo:!0,themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},colorRange:{$palette:"divergingColors"},fillGradientDefaults:{type:"gradient",gradient:"radial",bounds:"series",colorStops:{$palette:"gradient"},rotation:0,reverse:!0},fillPatternDefaults:M$._ModuleSupport.FILL_PATTERN_DEFAULTS,label:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:[C$.LARGE]},minimumFontSize:{$round:[{$mul:[{$ref:"fontSize"},9/12]}]},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},overflowStrategy:"ellipsis",wrapping:"never",spacing:2},secondaryLabel:{fontFamily:{$ref:"fontFamily"},fontSize:{$rem:[C$.SMALLEST]},minimumFontSize:{$round:[{$mul:[{$ref:"fontSize"},7/12]}]},fontWeight:{$ref:"fontWeight"},color:{$ref:"backgroundColor"},overflowStrategy:"ellipsis",wrapping:"never"},sectorSpacing:2,padding:3,highlightStyle:{label:{color:{$ref:"backgroundColor"}},secondaryLabel:{color:{$ref:"backgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}},gradientLegend:{enabled:!0}}},GCt={type:"series",name:"sunburst",chartType:"hierarchy",enterprise:!0,options:zCt,create:t=>new Fk(t)},L$=(E(),C(w)),Qx=(E(),C(w)),jCt=(P(),C(et)),VCt=(E(),C(w)),{BaseProperties:Gk,HierarchySeriesProperties:WCt,HighlightStyle:UCt,SeriesTooltip:HCt,TempValidate:wt,BOOLEAN:YCt,COLOR_STRING:Df,FUNCTION:KCt,NUMBER:$Ct,OBJECT:Sn,POSITIVE_NUMBER:sl,RATIO:Eh,STRING:Jx,STRING_ARRAY:N$,TEXT_ALIGN:O$,VERTICAL_ALIGN:XCt,COLOR_GRADIENT:w$,COLOR_PATTERN:E$,OR:_$,Label:ZCt}=VCt._ModuleSupport,R$=class extends ZCt{constructor(){super(...arguments),this.spacing=0}};m([wt($Ct)],R$.prototype,"spacing",2);var vn=class extends Gk{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.gap=0,this.padding=0,this.interactive=!0,this.label=new R$}};m([wt(_$(w$,Df,E$),{optional:!0})],vn.prototype,"fill",2),m([wt(Eh)],vn.prototype,"fillOpacity",2),m([wt(Df,{optional:!0})],vn.prototype,"stroke",2),m([wt(sl)],vn.prototype,"strokeWidth",2),m([wt(Eh)],vn.prototype,"strokeOpacity",2),m([wt(sl)],vn.prototype,"cornerRadius",2),m([wt(O$)],vn.prototype,"textAlign",2),m([wt(sl)],vn.prototype,"gap",2),m([wt(sl)],vn.prototype,"padding",2),m([wt(YCt)],vn.prototype,"interactive",2),m([wt(Sn)],vn.prototype,"label",2);var Ba=class extends Gk{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.verticalAlign="middle",this.gap=0,this.padding=0,this.label=new qr,this.secondaryLabel=new Ix}};m([wt(_$(w$,Df,E$),{optional:!0})],Ba.prototype,"fill",2),m([wt(Eh)],Ba.prototype,"fillOpacity",2),m([wt(Df,{optional:!0})],Ba.prototype,"stroke",2),m([wt(sl,{optional:!0})],Ba.prototype,"strokeWidth",2),m([wt(Eh)],Ba.prototype,"strokeOpacity",2),m([wt(sl)],Ba.prototype,"cornerRadius",2),m([wt(O$)],Ba.prototype,"textAlign",2),m([wt(XCt)],Ba.prototype,"verticalAlign",2),m([wt(sl)],Ba.prototype,"gap",2),m([wt(sl)],Ba.prototype,"padding",2),m([wt(Sn)],Ba.prototype,"label",2),m([wt(Sn)],Ba.prototype,"secondaryLabel",2);var qd=class extends Gk{constructor(){super(...arguments),this.label=new qr}};m([wt(Jx,{optional:!0})],qd.prototype,"fill",2),m([wt(Eh,{optional:!0})],qd.prototype,"fillOpacity",2),m([wt(Df,{optional:!0})],qd.prototype,"stroke",2),m([wt(sl,{optional:!0})],qd.prototype,"strokeWidth",2),m([wt(Eh,{optional:!0})],qd.prototype,"strokeOpacity",2),m([wt(Sn)],qd.prototype,"label",2);var _h=class extends Gk{constructor(){super(...arguments),this.label=new qr,this.secondaryLabel=new Ix}};m([wt(Jx,{optional:!0})],_h.prototype,"fill",2),m([wt(Eh,{optional:!0})],_h.prototype,"fillOpacity",2),m([wt(Df,{optional:!0})],_h.prototype,"stroke",2),m([wt(sl,{optional:!0})],_h.prototype,"strokeWidth",2),m([wt(Eh,{optional:!0})],_h.prototype,"strokeOpacity",2),m([wt(Sn)],_h.prototype,"label",2),m([wt(Sn)],_h.prototype,"secondaryLabel",2);var AE=class extends UCt{constructor(){super(...arguments),this.group=new qd,this.tile=new _h}};m([wt(Sn)],AE.prototype,"group",2),m([wt(Sn)],AE.prototype,"tile",2);var lr=class extends WCt{constructor(){super(...arguments),this.highlightStyle=new AE,this.tooltip=new HCt,this.group=new vn,this.tile=new Ba,this.undocumentedGroupFills=[],this.undocumentedGroupStrokes=[]}};m([wt(Jx,{optional:!0})],lr.prototype,"sizeName",2),m([wt(Jx,{optional:!0})],lr.prototype,"labelKey",2),m([wt(Jx,{optional:!0})],lr.prototype,"secondaryLabelKey",2),m([wt(KCt,{optional:!0})],lr.prototype,"itemStyler",2),m([wt(Sn)],lr.prototype,"highlightStyle",2),m([wt(Sn)],lr.prototype,"tooltip",2),m([wt(Sn)],lr.prototype,"group",2),m([wt(Sn)],lr.prototype,"tile",2),m([wt(N$)],lr.prototype,"undocumentedGroupFills",2),m([wt(N$)],lr.prototype,"undocumentedGroupStrokes",2);var{TextUtils:qCt,TextWrapper:QCt,createDatumId:P$,Rect:B$,Group:z$,BBox:kf,Selection:IE,Text:jk,Transformable:JCt,applyShapeStyle:tLt,getShapeStyle:tb}=Qx._ModuleSupport,eLt=class extends Qx._ModuleSupport.HierarchyNode{constructor(){super(...arguments),this.labelValue=void 0,this.secondaryLabelValue=void 0,this.label=void 0,this.secondaryLabel=void 0,this.bbox=void 0,this.padding=void 0}},F$=new jk;function iLt(t,e){const{fontStyle:i,fontWeight:s,fontSize:o,fontFamily:a}=e;F$.setProperties({text:t,fontStyle:i,fontWeight:s,fontSize:o,fontFamily:a,textAlign:"left",textBaseline:"top"});const{width:n,height:r}=F$.getBBox();return{width:n,height:r}}function Rh(t){return t.children.length>0?t.sumSize-t.sizeValue:t.sizeValue}var G$={left:0,center:.5,right:1},sLt={top:0,middle:.5,bottom:1},oNt=class extends Qx._ModuleSupport.Group{distanceSquared(t,e){return this.getBBox().distanceSquared(t,e)}},Vk=class extends Qx._ModuleSupport.HierarchySeries{constructor(){super(...arguments),this.NodeClass=eLt,this.properties=new lr,this.rectGroup=this.contentGroup.appendChild(new z$),this.datumSelection=IE.select(this.rectGroup,B$),this.labelSelection=IE.select(this.labelGroup,z$),this.highlightSelection=IE.select(this.rectGroup,B$)}groupTitleHeight(t,e){const{labelValue:i}=t,{label:s}=this.properties.group,o=3;if(i!=null){if(s.fontSize>e.width/o||s.fontSize>e.height/o)return;{const{height:a}=iLt(i,s);return Math.max(a,s.fontSize)}}}getNodePadding(t,e){if(t.parent==null)return{top:0,right:0,bottom:0,left:0};if(t.children.length===0){const{padding:n}=this.properties.tile;return{top:n,right:n,bottom:n,left:n}}const{label:{spacing:i},padding:s}=this.properties.group,o=this.groupTitleHeight(t,e),a=o!=null?o+i:0;return{top:s+a,right:s,bottom:s,left:s}}sortChildren({children:t}){const e=Array.from(t,(s,o)=>o).filter(s=>Rh(t[s])>0).sort((s,o)=>Rh(t[o])-Rh(t[s]));return{sortedChildrenIndices:e,childAt:s=>{const o=e[s];return t[o]}}}squarify(t,e){const{datum:i,children:s}=t;if(e.width<=0||e.height<=0){t.bbox=void 0,t.padding=void 0,t.midPoint.x=NaN,t.midPoint.y=NaN;return}const o=i!=null?this.getNodePadding(t,e):{top:0,right:0,bottom:0,left:0};t.parent==null?(t.bbox=void 0,t.padding=void 0,t.midPoint.x=NaN,t.midPoint.y=NaN):(t.bbox=e,t.padding=o,t.midPoint.x=e.x+e.width/2,t.midPoint.y=e.y);const{sortedChildrenIndices:a,childAt:n}=this.sortChildren(t),r=a.every(D=>s[D].children.length===0),l=1,c=e.width-o.left-o.right,h=e.height-o.top-o.bottom;if(c<=0||h<=0)return;const u=a.length;let d=0,p=0,g=1/0,f=a.reduce((D,L)=>D+Rh(s[L]),0);const x=new kf(e.x+o.left,e.y+o.top,c,h),y=x.clone();let b=0;for(;b<u;){const D=Rh(n(b)),L=Rh(n(p)),T=y.width<y.height;d+=D;const I=T?y.height:y.width,N=T?y.width:y.height,O=N*L/d;let R=I*d/f;const _=Math.max(O,R)/Math.min(O,R),B=Math.abs(l-_);if(B<g){g=B,b++;continue}d-=D,R=I*d/f;let W=T?y.x:y.y;for(let F=p;F<b;F++){const z=n(F),U=Rh(z),H=T?W:y.x,j=T?y.y:W,V=N*U/d,G=T?V:R,K=T?R:V,$=new kf(H,j,G,K);this.applyGap(x,$,r),this.squarify(z,$),f-=U,W+=V}T?(y.y+=R,y.height-=R):(y.x+=R,y.width-=R),p=b,d=0,g=1/0}const S=y.width<y.height;let M=S?y.x:y.y;for(let D=p;D<u;D++){const L=n(D),T=S?M:y.x,I=S?y.y:M,N=Rh(L)/f,O=y.width*(S?N:1),R=y.height*(S?1:N),_=new kf(T,I,O,R);this.applyGap(x,_,r),this.squarify(L,_),M+=S?O:R}}applyGap(t,e,i){const s=i?this.properties.tile.gap*.5:this.properties.group.gap*.5,o=l=>({left:l.x,top:l.y,right:l.x+l.width,bottom:l.y+l.height}),a=o(t),n=o(e);["top","right","bottom","left"].forEach(l=>{(0,jCt.isNumberEqual)(a[l],n[l])||e.shrink(s,l)})}createNodeData(){}getGroupBaseStyle(t){const{properties:e}=this,{group:i}=e,s=t?e.highlightStyle.group:void 0;return tb({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??i.strokeWidth,strokeOpacity:s?.strokeOpacity??i.strokeOpacity},e.fillGradientDefaults,e.fillPatternDefaults)}getGroupStyleOverrides(t,e,i,s,o){const{id:a,properties:n}=this,{undocumentedGroupFills:r,undocumentedGroupStrokes:l,itemStyler:c}=n,h=s.fill??r[Math.min(i??0,r.length)],u=s.stroke??l[Math.min(i??0,l.length)],d={};if(o||(d.fill=h,d.stroke=u),c!=null){const p=this.cachedDatumCallback(P$(t.join(":"),o?"highlight":"node"),()=>this.callWithContext(c,{seriesId:a,datum:e,depth:i,highlighted:o,fill:h,stroke:u,...s}));Object.assign(d,p)}return tb(d,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}getTileBaseStyle(t){const{properties:e}=this,{tile:i}=e,s=t?e.highlightStyle.tile:void 0;return tb({fill:s?.fill??i.fill,fillOpacity:s?.fillOpacity??i.fillOpacity,stroke:s?.stroke??i.stroke,strokeWidth:s?.strokeWidth??i.strokeWidth,strokeOpacity:s?.strokeOpacity??i.strokeOpacity},e.fillGradientDefaults,e.fillPatternDefaults)}getTileStyleOverrides(t,e,i,s,o,a){const{id:n,properties:r,colorScale:l}=this,{fills:c,strokes:h,itemStyler:u}=r,d=t[0],p=o.fill??c[d%c.length],g=o.stroke??h[d%h.length],f={};if(a||(f.fill=s!=null?l.convert(s):p,f.stroke=g),u!=null){const x=this.cachedDatumCallback(P$(t.join(":"),a?"highlight":"node"),()=>this.callWithContext(u,{seriesId:n,datum:e,depth:i,highlighted:a,fill:p,stroke:g,...o}));Object.assign(f,x)}return tb(f,this.properties.fillGradientDefaults,this.properties.fillPatternDefaults)}updateSelections(){let t=this.ctx.highlightManager?.getActiveHighlight();if(t!=null&&!this.properties.group.interactive&&t.children.length!==0&&(t=void 0),this.highlightSelection.update(t!=null?[t]:[],void 0,o=>this.getDatumId(o)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{seriesRect:e}=this.chart??{};if(!e)return;const i=Array.from(this.rootNode),s=o=>{o.append([new jk({tag:0}),new jk({tag:1})])};this.datumSelection.update(i,void 0,o=>this.getDatumId(o)),this.labelSelection.update(i,s,o=>this.getDatumId(o))}updateNodes(){const{rootNode:t,data:e}=this,{childrenKey:i,colorKey:s,colorName:o,labelKey:a,secondaryLabelKey:n,sizeKey:r,sizeName:l,highlightStyle:c,tile:h,group:u}=this.properties,{seriesRect:d}=this.chart??{};if(!d||!e)return;this.rootNode?.walk(T=>{const{datum:I,depth:N,children:O}=T,R=O.length===0,_=R?h.label:u.label;let B;if(I!=null&&N!=null&&a!=null){const F=I[a];B=this.getLabelText(_,{depth:N,datum:I,childrenKey:i,colorKey:s,colorName:o,labelKey:a,secondaryLabelKey:n,sizeKey:r,sizeName:l,value:F})}B===""&&(B=void 0);let W;if(R&&I!=null&&N!=null&&n!=null){const F=I[n];W=this.getLabelText(h.secondaryLabel,{depth:N,datum:I,childrenKey:i,colorKey:s,colorName:o,labelKey:a,secondaryLabelKey:n,sizeKey:r,sizeName:l,value:F})}W===""&&(W=void 0),T.labelValue=B,T.secondaryLabelValue=W});const{width:p,height:g}=d;this.squarify(t,new kf(0,0,p,g)),this.rootNode?.walk(T=>{const{bbox:I,children:N,labelValue:O,secondaryLabelValue:R}=T;if(T.label=void 0,T.secondaryLabel=void 0,I!=null)if(N.length===0){const _={width:I.width,height:I.height,meta:null},B=YO(O,this.properties.tile.label,R,this.properties.tile.secondaryLabel,{padding:h.padding},()=>_);if(B==null)return;const{height:W,label:F,secondaryLabel:z}=B,{textAlign:U,verticalAlign:H,padding:j}=h,V=G$[U]??.5,G=I.x+j+(I.width-2*j)*V,K=sLt[H]??.5,$=I.y+j+W*.5+(I.height-2*j-W)*K;if(F!=null){const{fontStyle:Z="normal",fontFamily:Q,fontWeight:q="normal",color:J="black"}=this.properties.tile.label;T.label={text:F.text,fontSize:F.fontSize,lineHeight:F.lineHeight,fontStyle:Z,fontFamily:Q,fontWeight:q,color:J,textAlign:U,verticalAlign:"middle",x:G,y:$-(W-F.height)*.5}}if(z!=null){const{fontStyle:Z="normal",fontFamily:Q,fontWeight:q="normal",color:J="black"}=this.properties.tile.secondaryLabel;T.secondaryLabel={text:z.text,fontSize:z.fontSize,lineHeight:z.fontSize,fontStyle:Z,fontFamily:Q,fontWeight:q,color:J,textAlign:U,verticalAlign:"middle",x:G,y:$+(W-z.height)*.5}}}else{if(O==null)return;{const{padding:_,textAlign:B}=u,W=this.groupTitleHeight(T,I);if(W==null)return;const F=I.width-2*_,z=QCt.wrapText(O,{maxWidth:I.width-2*_,font:u.label,textWrap:"never"}),U=G$[B]??.5,{fontStyle:H="normal",fontFamily:j,fontWeight:V="normal",color:G="black"}=this.properties.group.label;T.label={text:z,fontSize:u.label.fontSize,lineHeight:qCt.getLineHeight(u.label.fontSize),fontStyle:H,fontFamily:j,fontWeight:V,color:G,textAlign:B,verticalAlign:"middle",x:I.x+_+F*U,y:I.y+_+W*.5}}}});const f={series:new kf(0,0,p,g),axis:new kf(0,0,p,g)},x=(T,I,N,O,R)=>{const{bbox:_}=T;if(_==null){I.visible=!1;return}const{datum:B,depth:W=-1,datumIndex:F,colorValue:z}=T,U=T.children.length===0,H=U?O:N,j=U?this.getTileStyleOverrides(F,B,W,z,H,R):this.getGroupStyleOverrides(F,B,W,H,R);I.crisp=!0,tLt(I,H,j,f),I.cornerRadius=U?h.cornerRadius:u.cornerRadius,I.zIndex=[0,W,R?1:0];const V=T.parent?.children.every($=>$.children.length===0),G=T.parent!=null?T.parent.bbox:void 0,K=T.parent!=null?T.parent.padding:void 0;V===!0&&G!=null&&K!=null?(I.clipBBox=_,I.x=G.x+K.left,I.y=G.y+K.top,I.width=G.width-(K.left+K.right),I.height=G.height-(K.top+K.bottom)):(I.clipBBox=void 0,I.x=_.x,I.y=_.y,I.width=_.width,I.height=_.height),I.visible=!0},y=this.getGroupBaseStyle(!1),b=this.getTileBaseStyle(!1);this.datumSelection.each((T,I)=>x(I,T,y,b,!1));const S=this.getGroupBaseStyle(!0),M=this.getTileBaseStyle(!0);this.highlightSelection.each((T,I)=>{x(I,T,S,M,!0)});const D=(T,I,N,O)=>{const R=T.children.length===0,_=N===0?T.label:T.secondaryLabel;if(_==null){I.visible=!1;return}let B;if(O){const{tile:W,group:F}=c;B=W.secondaryLabel.color,R?N===0&&(B=W.label.color):B=F.label.color}I.text=_.text,I.fontSize=_.fontSize,I.lineHeight=_.lineHeight,I.fontStyle=_.fontStyle,I.fontFamily=_.fontFamily,I.fontWeight=_.fontWeight,I.fill=B??_.color,I.textAlign=_.textAlign,I.textBaseline=_.verticalAlign,I.x=_.x,I.y=_.y,I.visible=!0,I.zIndex=1},L=this.ctx.highlightManager?.getActiveHighlight();this.labelSelection.selectByClass(jk).forEach(T=>{const I=T.closestDatum();D(I,T,T.tag,I===L)})}pickNodesExactShape(t){const e=super.pickNodesExactShape(t);return e.sort((i,s)=>s.datumIndex.length-i.datumIndex.length),e}pickNodeClosestDatum(t){const e=this.pickNodesExactShape(t);return e.length!==0?{datum:e[0],distance:0}:this.pickNodeNearestDistantObject(t,this.datumSelection.nodes())}getTooltipContent(t){const{id:e,properties:i}=this,{labelKey:s,secondaryLabelKey:o,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,tooltip:h}=i,u=t.reduce((T,I)=>T?.children[I],this.rootNode);if(u==null)return;const{datum:d,depth:p,children:g}=u;if(d==null||p==null)return;const f=g.length===0,x=[],y=n!=null?d[n]:void 0;y!=null&&x.push({label:r,fallbackLabel:n,value:y});const b=l!=null?d[l]:void 0;b!=null&&x.push({label:c,fallbackLabel:l,value:b});let S;f?(S=this.getTileBaseStyle(!1),Object.assign(S,this.getTileStyleOverrides(t,d,p,b,S,!1))):(S=this.getGroupBaseStyle(!1),Object.assign(S,this.getGroupStyleOverrides(t,d,p,S,!1)));const M=S.fill,D=tb({shape:"square",fill:M,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0},this.properties.fillGradientDefaults,this.properties.fillPatternDefaults);Qx._ModuleSupport.isGradientFill(D.fill)&&(D.fill={...D.fill,gradient:"linear",rotation:0,reverse:!1});const L=f?{marker:D}:void 0;return h.formatTooltip(this.properties,{title:s!=null?d[s]:void 0,symbol:L,data:x},{seriesId:e,datum:d,title:void 0,depth:p,labelKey:s,secondaryLabelKey:o,childrenKey:a,sizeKey:n,sizeName:r,colorKey:l,colorName:c,...S})}computeFocusBounds(t){return JCt.toCanvas(this.contentGroup,t.getBBox())}};Vk.className="TreemapSeries",Vk.type="treemap";var oLt=(E(),C(w)),At=(P(),C(et)),{commonSeriesOptionsDefs:aLt,seriesLabelOptionsDefs:TE,tooltipOptionsDefs:nLt}=oLt._ModuleSupport,eb={type:(0,At.required)((0,At.constant)("treemap")),labelKey:At.string,secondaryLabelKey:At.string,childrenKey:At.string,sizeKey:At.string,colorKey:At.string,sizeName:At.string,colorName:At.string,fills:(0,At.arrayOf)(At.colorUnion),strokes:(0,At.arrayOf)(At.color),colorRange:(0,At.arrayOf)(At.color),itemStyler:At.callback,group:{gap:At.positiveNumber,padding:At.positiveNumber,cornerRadius:At.positiveNumber,textAlign:(0,At.union)("left","center","right"),interactive:At.boolean,label:{...TE,spacing:At.positiveNumber},...At.fillOptionsDef,...At.strokeOptionsDef},tile:{gap:At.positiveNumber,padding:At.positiveNumber,cornerRadius:At.positiveNumber,textAlign:(0,At.union)("left","center","right"),verticalAlign:(0,At.union)("top","middle","bottom"),label:{...TE,spacing:At.positiveNumber,lineHeight:At.positiveNumber,minimumFontSize:At.positiveNumber,wrapping:(0,At.union)("never","always","hyphenate","on-space"),overflowStrategy:(0,At.union)("ellipsis","hide")},secondaryLabel:{...TE,lineHeight:At.positiveNumber,minimumFontSize:At.positiveNumber,wrapping:(0,At.union)("never","always","hyphenate","on-space"),overflowStrategy:(0,At.union)("ellipsis","hide")},...At.fillOptionsDef,...At.strokeOptionsDef},tooltip:nLt,...aLt,highlightStyle:{group:{label:{color:At.color},...At.fillOptionsDef,...At.strokeOptionsDef},tile:{label:{color:At.color},secondaryLabel:{color:At.color},...At.fillOptionsDef,...At.strokeOptionsDef}}};eb.fillGradientDefaults=At.fillGradientDefaults,eb.fillPatternDefaults=At.fillPatternDefaults,eb.undocumentedGroupFills=(0,At.arrayOf)(At.color),eb.undocumentedGroupStrokes=(0,At.arrayOf)(At.color);var{FONT_SIZE_RATIO:j$}=L$._ModuleSupport,rLt={type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["hierarchy"],identifier:"treemap",moduleFactory:t=>new Vk(t),tooltipDefaults:{range:"exact"},solo:!0,themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},colorRange:{$palette:"divergingColors"},fillGradientDefaults:{type:"gradient",gradient:"linear",bounds:"item",colorStops:{$palette:"gradient"},rotation:0,reverse:!1},fillPatternDefaults:L$._ModuleSupport.FILL_PATTERN_DEFAULTS,undocumentedGroupFills:{$palette:"hierarchyColors"},undocumentedGroupStrokes:{$palette:"secondHierarchyColors"},group:{label:{enabled:!0,color:{$ref:"textColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},spacing:4},fill:void 0,stroke:void 0,strokeWidth:1,padding:4,gap:2,textAlign:"left"},tile:{label:{enabled:!0,color:{$ref:"backgroundColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:[1.5]},minimumFontSize:{$rem:[j$.SMALLER]},fontFamily:{$ref:"fontFamily"},wrapping:"on-space",overflowStrategy:"ellipsis",spacing:2},secondaryLabel:{enabled:!0,color:{$ref:"backgroundColor"},fontStyle:void 0,fontWeight:void 0,fontSize:{$ref:"fontSize"},minimumFontSize:{$rem:[j$.SMALLER]},fontFamily:{$ref:"fontFamily"},wrapping:"never",overflowStrategy:"ellipsis"},fill:void 0,stroke:void 0,strokeWidth:0,padding:3,gap:1},highlightStyle:{group:{label:{color:{$ref:"textColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2},tile:{label:{color:{$ref:"backgroundColor"}},secondaryLabel:{color:{$ref:"backgroundColor"}},fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}}},gradientLegend:{enabled:!0}}},lLt={type:"series",name:"treemap",chartType:"hierarchy",enterprise:!0,options:eb,create:t=>new Vk(t)},aNt=ydt._ModuleSupport.ModuleRegistry,cLt=[Cdt,kU,WU,rSt,PSt,iH,aH,AH,BH,YH],hLt=[Ldt,Ndt,Odt,wdt,lkt,UAt,JAt,VIt,oTt],uLt=[jdt,lbt,MCt],dLt=[Kdt,Pvt,YTt],pLt=[Jdt,GCt,lLt],gLt=[apt,Ukt],fLt=[ypt,fMt,wMt,m0t,Y0t,fDt],mLt=[...cLt,...hLt,...uLt,...dLt,...pLt,...gLt,...fLt,Ixt,Txt,Cxt],yLt=(E(),C(w)),V$=(E(),C(w)),nNt=(E(),C(w)),W$={xMin:js,xMax:Oo,yMin:ta,yMax:ea,span:Oa},xLt=1e3,bLt=5;function U$(t,e){return Array.from({length:t},(i,s)=>{const o=s*Oa,a=e[o+js],n=e[o+Oo];return(a+n)/2|0})}function SLt(t,e,i){if(t.length<xLt)return;const[s,o]=bx(i);let a=xx(t,bLt),{indexData:n,valueData:r}=Sx(t,e,e,s,o,a),l=U$(a,n);const c=[{maxRange:a,indexData:n,indices:l,indexes:W$}];for(;a>64;)({indexData:n,valueData:r,maxRange:a}=vx(n,r,a)),l=U$(a,n),c.push({maxRange:a,indexData:n,indices:l,indexes:W$});return c.reverse(),c}var{ChartAxisDirection:vLt,ContinuousScale:MLt,OrdinalTimeScale:DLt}=V$._ModuleSupport,kLt=class extends V$._ModuleSupport.BarSeries{aggregateData(t,e){if(e?.type!=="ungrouped")return;const i=this.axes[vLt.X];if(i==null||!(MLt.is(i.scale)||DLt.is(i.scale)))return;const s=t.resolveKeysById(this,"xValue",e),o=t.resolveColumnById(this,"yValue-raw",e),{index:a}=t.resolveProcessedDataDefById(this,"xValue"),n=e.domain.keys[a];return SLt(s,o,n)}},{BarSeriesModule:ALt}=yLt._ModuleSupport,ILt={...ALt,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"bar",moduleFactory:t=>new kLt(t)},TLt=(E(),C(w)),H$=(E(),C(w)),rNt=(E(),C(w)),CLt=1e3,Y$=10;function K$(t,e,i,s,o,a){const n=t[a];if(n==null)return!1;const r=rD(n,e,i),l=lD(r,o);return a===s[l+js]||a===s[l+Oo]||a===s[l+ta]||a===s[l+ea]}function LLt(t,e,i){if(t.length<CLt)return;const[s,o]=bx(i);let a=xx(t,Y$);const{indexData:n,valueData:r}=Sx(t,e,e,s,o,a);let l=[];for(let h=0;h<t.length;h+=1)K$(t,s,o,n,a,h)&&l.push(h);const c=[{maxRange:a,indices:l}];for(;l.length>Y$&&a>64;)({maxRange:a}=vx(n,r,a,{inPlace:!0})),l=l.filter(K$.bind(null,t,s,o,n,a)),c.push({maxRange:a,indices:l});return c.reverse(),c}var{ChartAxisDirection:NLt,ContinuousScale:OLt,OrdinalTimeScale:wLt}=H$._ModuleSupport,ELt=class extends H$._ModuleSupport.LineSeries{aggregateData(t,e){const i=this.axes[NLt.X];if(i==null||!(OLt.is(i.scale)||wLt.is(i.scale)))return;const s=t.resolveColumnById(this,"xValue",e),o=t.resolveColumnById(this,"yValueRaw",e),a=t.getDomain(this,"xValue","value",e);return LLt(s,o,a)}},{LineSeriesModule:_Lt}=TLt._ModuleSupport,RLt={..._Lt,type:"series",optionsKey:"series[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"line",moduleFactory:t=>new ELt(t)},PLt=`.ag-watermark{position:absolute;bottom:20px;right:25px;font-weight:700;font-family:Impact,sans-serif;font-size:19px;opacity:.7;animation:1s ease-out 3s ag-watermark-fadeout;color:#9b9b9b;pointer-events:none;&:before{content:"";display:block;height:40px;width:170px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=);background-repeat:no-repeat;background-size:170px 40px}>span{padding-left:.7rem}}@keyframes ag-watermark-fadeout{0%{opacity:.5}to{opacity:0}}.ag-charts-dialog{display:flex;flex-direction:column;font-size:var(--ag-charts-chrome-font-size-large)}.ag-charts-dialog__tabs{display:flex;flex-direction:column}.ag-charts-dialog__header{border-bottom:1px solid var(--ag-charts-border-color);display:flex}.ag-charts-dialog__tab-list{display:flex;gap:calc(var(--ag-charts-spacing) * 2)}.ag-charts-dialog__drag-handle{align-items:center;color:inherit;cursor:grab;display:flex;padding:1px 6px;text-align:center}.ag-charts-dialog__drag-handle--dragging{cursor:grabbing}.ag-charts-dialog__tab-button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--ag-charts-chrome-subtle-text-color);margin-bottom:-1px;padding:var(--input-padding) calc(var(--input-padding) / 2)}.ag-charts-dialog__tab-button:hover{background:none}.ag-charts-dialog__tab-button--active{border-color:var(--ag-charts-accent-color);color:inherit}.ag-charts-dialog__drag-handle+.ag-charts-dialog__tab-button{margin-left:calc(var(--ag-charts-spacing) * -2)}.ag-charts-button.ag-charts-dialog__close-button{background:none;border:0;margin-left:auto;padding:1px 6px}.ag-charts-dialog__close-button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-dialog__tab-panel{display:none;flex-direction:column;gap:calc(var(--ag-charts-spacing) * 4);margin:0 calc(var(--ag-charts-spacing) * 4);padding:calc(var(--ag-charts-spacing) * 4) 0}.ag-charts-dialog__tab-panel--active{display:flex}.ag-charts-dialog__input-group-line{display:flex;gap:16px 18px;flex-wrap:wrap}.ag-charts-dialog__input-group{align-items:center;display:flex;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-dialog__input-group-label{color:var(--ag-charts-chrome-subtle-text-color);margin-right:5px}.ag-charts-dialog__input-group-label[for]{cursor:pointer}.ag-charts-dialog__button{border-radius:0;margin-right:-1px}.ag-charts-dialog__button.ag-charts-dialog__button--active{background:var(--ag-charts-button-focus-background-color);border-color:var(--ag-charts-input-focus-border-color);color:var(--ag-charts-input-focus-text-color);z-index:var(--input-layer-active)}.ag-charts-dialog__button:first-child,.ag-charts-dialog__input-group-label+.ag-charts-dialog__button{border-bottom-left-radius:var(--ag-charts-input-border-radius);border-top-left-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__button:last-child{border-bottom-right-radius:var(--ag-charts-input-border-radius);border-top-right-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__color-picker-button{--color: #000;background:var(--color);border:none;color:transparent;height:26px;width:26px}.ag-charts-dialog__color-picker-button:hover{background:var(--color)}.ag-charts-dialog__color-picker-button--multi-color,.ag-charts-dialog__color-picker-button--multi-color:hover{background:linear-gradient(135deg,red 0%,#ff0 calc(100% * 1 / 6),#0f0 calc(100% * 2 / 6),#0ff 50%,#00f calc(100% * 4 / 6),#f0f calc(100% * 5 / 6),red 100%)}.ag-charts-color-picker{width:190px;padding:8px;--h: 0;--s: 0;--v: 0;--a: 0;--color: #000;--color-a: #000;--thumb-size: 18px;--inner-width: 172px;--track-height: 12px;--palette-height: 136px;--checker: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>');--multi-color: linear-gradient( 135deg, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-color-picker__content{display:flex;flex-direction:column}.ag-charts-color-picker__palette{position:relative;width:100%;height:var(--palette-height);margin-bottom:8px;background:linear-gradient(to bottom,#0000,#000),linear-gradient(to right,#fff,#fff0) hsl(var(--h),100%,50%);border-radius:calc(var(--ag-charts-border-radius) * 1.5);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__palette:after{content:"";position:absolute;display:block;top:calc(var(--thumb-size) * -.5 + (1 - var(--v)) * 100%);left:calc(var(--thumb-size) * -.5 + var(--s) * 100%);background:var(--color);width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038}.ag-charts-color-picker__palette:focus-visible:after{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),0 0 0 2px #fff8,var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-row{display:flex;gap:8px;align-items:center;margin-bottom:4px;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input,.ag-charts-color-picker__alpha-input{-webkit-appearance:none;display:block;position:relative;padding:0;margin:0 calc(var(--inset) * -1);border:0;height:var(--thumb-size);width:auto;background:transparent;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{-webkit-appearance:none;width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038;transform:translateZ(0)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb{background:hsl(var(--h),100%,50%)}.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{background:transparent}.ag-charts-color-picker__alpha-input--opaque::-webkit-slider-thumb{background:var(--color)}.ag-charts-color-picker__hue-input:focus-visible::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input:focus-visible::-webkit-slider-thumb{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__hue-input:before,.ag-charts-color-picker__alpha-input:before{position:absolute;content:"";display:block;top:calc(50% - var(--track-height) / 2);left:var(--inset);right:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button{width:36px;margin-left:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);border:0;background:var(--multi-color);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button--hidden{display:none}.ag-charts-color-picker__multi-color-button--active{box-shadow:inset 0 0 0 1px #0003;outline-offset:1px;outline:2px solid #2196f3}.ag-charts-color-picker__hue-input{flex:1 0 0}.ag-charts-color-picker__hue-input:before{background:linear-gradient(to right,red,red calc((100% - var(--track-height)) * 0 / 6 + var(--track-height) / 2),#ff0 calc((100% - var(--track-height)) * 1 / 6 + var(--track-height) / 2),#0f0 calc((100% - var(--track-height)) * 2 / 6 + var(--track-height) / 2),#0ff calc((100% - var(--track-height)) * 3 / 6 + var(--track-height) / 2),#00f calc((100% - var(--track-height)) * 4 / 6 + var(--track-height) / 2),#f0f calc((100% - var(--track-height)) * 5 / 6 + var(--track-height) / 2),red calc((100% - var(--track-height)) * 6 / 6 + var(--track-height) / 2))}.ag-charts-color-picker__alpha-input{margin-bottom:7px}.ag-charts-color-picker__alpha-input:before{background:linear-gradient(to right,transparent,var(--color)),var(--checker) top left / 4px 4px}.ag-charts-color-picker__color-field{display:flex;border:var(--ag-charts-border);background:var(--ag-charts-background-color);border-radius:var(--ag-charts-border-radius);overflow:hidden}.ag-charts-color-picker__color-field:has(:focus-visible){border-color:var(--ag-charts-accent-color);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-label{width:16px;height:16px;margin:7px 0 7px 7px;color:transparent;background:linear-gradient(to right,var(--color-a),var(--color-a)),var(--checker) top left / 4px 4px;border-radius:calc(var(--ag-charts-border-radius) / 2);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__color-label--multi-color{background:var(--multi-color)}.ag-charts-color-picker__color-input{flex:1;min-width:0;padding:7px 7px 7px 8px;border:0;margin:0;color:inherit;background:transparent;font-variant:tabular-nums}.ag-charts-color-picker__color-input:focus-visible{border:none;outline:none}.ag-charts-annotations__line-stroke-width-menu,.ag-charts-annotations__line-style-type-menu,.ag-charts-annotations__text-size-menu{border-top-left-radius:0;border-top-right-radius:0;.ag-charts-menu__row:first-child{border-radius:0}}.ag-charts-annotations__text-size-menu{--item-padding: 4px 8px;min-width:34px;text-align:center}.ag-charts-annotations__line-stroke-width-menu{--item-padding: 6px;column-gap:6px}.ag-charts-annotations__line-style-type-menu{--item-padding: 6px;column-gap:0}.ag-charts-annotations__stroke-width-button:before{background:var(--ag-charts-foreground-color);content:"";margin-right:var(--toolbar-button-padding);height:min(var(--stroke-width),20px);width:12px}.ag-charts-annotations__stroke-width-button[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-annotations__color-picker-button{--emblem: var(--color)}.ag-charts-annotations__color-picker-button--multi-color{--emblem: linear-gradient( to right, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-annotations__color-picker-button:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--emblem)}.ag-charts-annotations__color-picker-button[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-annotations__toolbar-menu{min-width:200px}.ag-charts-annotations__axis-button--hidden{display:none}.ag-charts-annotations__axis-button{background-color:var(--ag-charts-crosshair-label-background-color);border-radius:calc(var(--ag-charts-border-radius) / 2);border:none;box-sizing:border-box;color:var(--ag-charts-crosshair-label-text-color);cursor:pointer;font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);left:0;line-height:16px;overflow:hidden;padding:0;position:absolute;top:0;user-select:none;white-space:nowrap;z-index:var(--ag-charts-layer-annotations)}.ag-charts-annotations__axis-button:hover{opacity:.8;color:var(--ag-charts-background-color)}.ag-charts-dialog--annotation-settings{min-height:233px;width:289px}.ag-charts-dialog--annotation-settings .ag-charts-textarea{height:calc(10px * 2 + var(--textarea-line-height) * 1em * 3 + 2px);overflow-y:auto;resize:vertical}.ag-charts-context-menu{background:var(--ag-charts-chrome-background-color);border:var(--ag-charts-border);border-radius:var(--ag-charts-border-radius);box-shadow:var(--ag-charts-shadow);color:var(--ag-charts-chrome-text-color);font-family:var(--ag-charts-chrome-font-family);font-size:calc(var(--ag-charts-chrome-font-size) * (13 / 12));font-weight:var(--ag-charts-chrome-font-weight);transition:transform .1s ease;white-space:nowrap;z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-context-menu__cover{position:fixed;left:0;top:0}.ag-charts-context-menu__menu{display:flex;flex-direction:column;padding:.5em 0}.ag-charts-context-menu__menu:focus{outline:none}.ag-charts-context-menu__item{background:none;border:none;box-sizing:border-box;color:inherit;font:inherit;padding:.5em 1em;text-align:left;-webkit-appearance:none;-moz-appearance:none}.ag-charts-context-menu__item:focus,.ag-charts-context-menu__item:active{background:var(--ag-charts-focus-color)}.ag-charts-context-menu__item[data-focus-visible-override=true]:focus,.ag-charts-context-menu__item:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-context-menu__item[data-focus-visible-override=false]{outline:inherit;box-shadow:inherit;z-index:inherit}.ag-charts-context-menu__item[aria-disabled=true]{border:none;opacity:.5;text-align:left}.ag-charts-context-menu__item[aria-disabled=true]:focus{background:inherit;cursor:inherit}.ag-charts-context-menu__divider{margin:5px 0;background:#babfc7;height:1px}.ag-charts-context-menu__divider.ag-charts-dark-context-menu{background:#2196f31a}.ag-charts-crosshair-label{position:absolute;left:0;top:0;user-select:none;pointer-events:none;font-family:var(--ag-charts-font-family);font-size:var(--ag-charts-font-size);font-weight:var(--ag-charts-font-weight);overflow:hidden;white-space:nowrap;z-index:var(--ag-charts-layer-crosshair);box-sizing:border-box}.ag-charts-crosshair-label-content{padding:0 8px;border-radius:calc(var(--ag-charts-border-radius) / 2);line-height:calc(var(--ag-charts-font-size) + 8px);background-color:var(--ag-charts-crosshair-label-background-color);color:var(--ag-charts-crosshair-label-text-color)}.ag-charts-crosshair-label--hidden{visibility:hidden!important}.ag-charts-text-input{position:absolute}.ag-charts-text-input__textarea{--placeholder-text-color: var(--ag-charts-input-placeholder-text-color);display:block;height:100%;width:100%;border:0;background:none;line-height:1.38;outline:none;transform:translateY(.09em)}.ag-charts-text-input__textarea[placeholder]:empty:before{content:attr(placeholder);color:var(--placeholder-text-color);font-weight:400}.ag-charts-text-input__textarea[placeholder]:not(:empty):before{content:""}.ag-charts-chart-toolbar__menu{min-width:200px}.ag-charts-range-buttons .ag-charts-toolbar__button{padding:var(--toolbar-button-padding) calc(var(--toolbar-button-padding) * 1.5)}.ag-charts-zoom-buttons{align-items:center;display:flex;height:44px;justify-content:center;overflow:hidden;padding-bottom:10px;pointer-events:none;width:100%;.ag-charts-toolbar{--toolbar-size: 24px;--toolbar-button-padding: 1px;display:flex;font-size:var(--ag-charts-chrome-font-size);height:var(--toolbar-size);justify-content:center;opacity:1;pointer-events:auto;transition:opacity .2s ease-in-out,transform .4s ease-in-out;.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__label{padding-left:var(--ag-charts-spacing);padding-right:var(--ag-charts-spacing)}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{padding-left:0}.ag-charts-toolbar__button--gap{margin-left:var(--toolbar-gap)}.ag-charts-zoom-buttons__toolbar--hidden{opacity:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out}}}.ag-charts-shared-toolbar{gap:var(--toolbar-gap);.ag-charts-toolbar__button{border-radius:var(--ag-charts-border-radius);margin:0}}
`;kg._ModuleSupport.ModuleRegistry.registerMany(mLt);function $$(){kg._ModuleSupport.moduleRegistry.register(dst,Dst,aot,ect,uct,ILt,cht,tgt,Kgt,rbt,nSt,RSt,Fft,xct,Dct,Bct,Gct,sht,Rvt,RLt,gMt,OMt,f0t,H0t,gDt,Eht,lut,gdt,wft,rkt,Ast,WAt,QAt,jIt,sTt,Zst,HTt,iot,Lyt,Gmt,Kht,Wkt,vCt,Xht,FCt,gut,rLt,yxt,tdt),kg._ModuleSupport.enterpriseModule.isEnterprise=!0,kg._ModuleSupport.enterpriseModule.styles=PLt,kg._ModuleSupport.enterpriseModule.licenseManager=t=>new Dg(t.container?.ownerDocument??(typeof document>"u"?void 0:document)),kg._ModuleSupport.enterpriseModule.injectWatermark=mdt}Tit(mN,(E(),C(w)),Dn.exports),$$();var BLt={setLicenseKey(t){Dg.setLicenseKey(t)}};function X$(){$$(),(0,Gl.setupCommunityModules)()}var zLt={VERSION:Gl.VERSION,_Scene:Gl._Scene,_Theme:Gl._Theme,_Util:Gl._Util,create:Gl.AgCharts.create.bind(Gl.AgCharts),createSparkline:Gl.AgCharts.__createSparkline.bind(Gl.AgCharts),setup:X$,setGridContext:Dg.setGridContext.bind(Dg),setLicenseKey:Dg.setLicenseKey.bind(Dg),isEnterprise:!0};if(typeof Dn.exports=="object"&&typeof If=="object"){var FLt=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Object.getOwnPropertyNames(e))!Object.prototype.hasOwnProperty.call(t,o)&&o!==i&&Object.defineProperty(t,o,{get:()=>e[o],enumerable:!(s=Object.getOwnPropertyDescriptor(e,o))||s.enumerable});return t};Dn.exports=FLt(Dn.exports,If)}return Dn.exports});