UNPKG

ag-charts-enterprise

Version:

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

1 lines 776 kB
var ND=Object.defineProperty,OD=Object.getOwnPropertyDescriptor,d=(t,e,i,o)=>{for(var s=o>1?void 0:o?OD(e,i):e,a=t.length-1,n;a>=0;a--)(n=t[a])&&(s=(o?n(e,i,s):n(s))||s);return o&&s&&ND(e,i,s),s};import{AgCharts as ar,VERSION as RD,_Scene as ED,_Theme as _D,_Util as BD,setupCommunityModules as zD}from"ag-charts-community";var FD=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(t,e){let i=t[0],o=t[1],s=t[2],a=t[3];i=this.ff(i,o,s,a,e[0],7,-680876936),a=this.ff(a,i,o,s,e[1],12,-389564586),s=this.ff(s,a,i,o,e[2],17,606105819),o=this.ff(o,s,a,i,e[3],22,-1044525330),i=this.ff(i,o,s,a,e[4],7,-176418897),a=this.ff(a,i,o,s,e[5],12,1200080426),s=this.ff(s,a,i,o,e[6],17,-1473231341),o=this.ff(o,s,a,i,e[7],22,-45705983),i=this.ff(i,o,s,a,e[8],7,1770035416),a=this.ff(a,i,o,s,e[9],12,-1958414417),s=this.ff(s,a,i,o,e[10],17,-42063),o=this.ff(o,s,a,i,e[11],22,-1990404162),i=this.ff(i,o,s,a,e[12],7,1804603682),a=this.ff(a,i,o,s,e[13],12,-40341101),s=this.ff(s,a,i,o,e[14],17,-1502002290),o=this.ff(o,s,a,i,e[15],22,1236535329),i=this.gg(i,o,s,a,e[1],5,-165796510),a=this.gg(a,i,o,s,e[6],9,-1069501632),s=this.gg(s,a,i,o,e[11],14,643717713),o=this.gg(o,s,a,i,e[0],20,-373897302),i=this.gg(i,o,s,a,e[5],5,-701558691),a=this.gg(a,i,o,s,e[10],9,38016083),s=this.gg(s,a,i,o,e[15],14,-660478335),o=this.gg(o,s,a,i,e[4],20,-405537848),i=this.gg(i,o,s,a,e[9],5,568446438),a=this.gg(a,i,o,s,e[14],9,-1019803690),s=this.gg(s,a,i,o,e[3],14,-187363961),o=this.gg(o,s,a,i,e[8],20,1163531501),i=this.gg(i,o,s,a,e[13],5,-1444681467),a=this.gg(a,i,o,s,e[2],9,-51403784),s=this.gg(s,a,i,o,e[7],14,1735328473),o=this.gg(o,s,a,i,e[12],20,-1926607734),i=this.hh(i,o,s,a,e[5],4,-378558),a=this.hh(a,i,o,s,e[8],11,-2022574463),s=this.hh(s,a,i,o,e[11],16,1839030562),o=this.hh(o,s,a,i,e[14],23,-35309556),i=this.hh(i,o,s,a,e[1],4,-1530992060),a=this.hh(a,i,o,s,e[4],11,1272893353),s=this.hh(s,a,i,o,e[7],16,-155497632),o=this.hh(o,s,a,i,e[10],23,-1094730640),i=this.hh(i,o,s,a,e[13],4,681279174),a=this.hh(a,i,o,s,e[0],11,-358537222),s=this.hh(s,a,i,o,e[3],16,-722521979),o=this.hh(o,s,a,i,e[6],23,76029189),i=this.hh(i,o,s,a,e[9],4,-640364487),a=this.hh(a,i,o,s,e[12],11,-421815835),s=this.hh(s,a,i,o,e[15],16,530742520),o=this.hh(o,s,a,i,e[2],23,-995338651),i=this.ii(i,o,s,a,e[0],6,-198630844),a=this.ii(a,i,o,s,e[7],10,1126891415),s=this.ii(s,a,i,o,e[14],15,-1416354905),o=this.ii(o,s,a,i,e[5],21,-57434055),i=this.ii(i,o,s,a,e[12],6,1700485571),a=this.ii(a,i,o,s,e[3],10,-1894986606),s=this.ii(s,a,i,o,e[10],15,-1051523),o=this.ii(o,s,a,i,e[1],21,-2054922799),i=this.ii(i,o,s,a,e[8],6,1873313359),a=this.ii(a,i,o,s,e[15],10,-30611744),s=this.ii(s,a,i,o,e[6],15,-1560198380),o=this.ii(o,s,a,i,e[13],21,1309151649),i=this.ii(i,o,s,a,e[4],6,-145523070),a=this.ii(a,i,o,s,e[11],10,-1120210379),s=this.ii(s,a,i,o,e[2],15,718787259),o=this.ii(o,s,a,i,e[9],21,-343485551),t[0]=this.add32(i,t[0]),t[1]=this.add32(o,t[1]),t[2]=this.add32(s,t[2]),t[3]=this.add32(a,t[3])}cmn(t,e,i,o,s,a){return e=this.add32(this.add32(e,t),this.add32(o,a)),this.add32(e<<s|e>>>32-s,i)}ff(t,e,i,o,s,a,n){return this.cmn(e&i|~e&o,t,e,s,a,n)}gg(t,e,i,o,s,a,n){return this.cmn(e&o|i&~o,t,e,s,a,n)}hh(t,e,i,o,s,a,n){return this.cmn(e^i^o,t,e,s,a,n)}ii(t,e,i,o,s,a,n){return this.cmn(i^(e|~o),t,e,s,a,n)}md51(t){const e=t.length,i=[1732584193,-271733879,-1732584194,271733878];let o;for(o=64;o<=t.length;o+=64)this.md5cycle(i,this.md5blk(t.substring(o-64,o)));t=t.substring(o-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(o=0;o<t.length;o++)s[o>>2]|=t.charCodeAt(o)<<(o%4<<3);if(s[o>>2]|=128<<(o%4<<3),o>55)for(this.md5cycle(i,s),o=0;o<16;o++)s[o]=0;return s[14]=e*8,this.md5cycle(i,s),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="",o=0;for(;o<4;o++)i+=e[t>>o*8+4&15]+e[t>>o*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 ph(t){return t==null||t.length===0}var nr={"01":"GRID","02":"CHARTS","0102":"BOTH"},ig="https://www.ag-grid.com/charts/licensing/",uh=class jt{constructor(e){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=e,this.md5=new FD,this.md5.init()}validateLicense(){const e=this.getLicenseDetails(jt.licenseKey,jt.gridContext),i=`AG ${e.currentLicenseType==="BOTH"?"Grid and ":""}Charts Enterprise`;let o="";if(e.suppliedLicenseType==="BOTH"?o="AG Grid and AG Charts Enterprise":e.suppliedLicenseType==="GRID"?o="AG Grid Enterprise":e.suppliedLicenseType!==void 0&&(o="AG Charts Enterprise"),e.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(e.expired){const s=jt.getChartsReleaseDate(),a=jt.formatDate(s);this.outputExpiredKey(e.expiry,a,o)}else e.valid?e.isTrial&&e.trialExpired&&this.outputExpiredTrialKey(e.expiry,i,o):this.outputInvalidLicenseKey(!!e.incorrectLicenseType,i,o)}static extractExpiry(e){const i=e.substring(e.lastIndexOf("_")+1,e.length);return new Date(parseInt(jt.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 o=i.length-32,s=i.substring(o),a=i.substring(0,o),[n,r,l]=jt.extractBracketedInformation(i);return{md5:s,license:a,version:n,isTrial:r,type:l}}getLicenseDetails(e,i=!1){const o="CHARTS";if(ph(e))return{licenseKey:e,valid:!1,missing:!0,currentLicenseType:o};const s=jt.getChartsReleaseDate(),{md5:a,license:n,version:r,isTrial:l,type:c}=jt.extractLicenseComponents(e);let h=a===this.md5.md5(n)&&e.indexOf("For_Trialing_ag-Grid_Only")===-1,p,u,g=null,f=!1,y;function x(){p=g<new Date,u=void 0}if(h&&(g=jt.extractExpiry(n),h=!isNaN(g.getTime()),h))switch(u=s>g,r){case"legacy":case"2":{h=!1;break}case"3":ph(c)?h=!1:(y=c,c!==nr["02"]&&c!==nr["0102"]?(h=!1,f=!0):l&&x())}return h?{licenseKey:e,valid:h,expiry:jt.formatDate(g),expired:u,version:r,isTrial:l,trialExpired:p,invalidLicenseTypeForCombo:i?y!=="BOTH":void 0,incorrectLicenseType:f,currentLicenseType:o,suppliedLicenseType:y}:{licenseKey:e,valid:h,incorrectLicenseType:f,currentLicenseType:o,suppliedLicenseType:y}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isE2ETest()&&!this.isWebsiteUrl()&&!ph(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:o=""}=i;return o}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}isE2ETest(){const e=this.getHostname();return/^(?:172\.17\.0\.1|host\.docker\.internal)$/.exec(e)!==null}static formatDate(e){const i=["January","February","March","April","May","June","July","August","September","October","November","December"],o=e.getDate(),s=e.getMonth(),a=e.getFullYear();return o+" "+i[s]+" "+a}static getChartsReleaseDate(){return new Date(parseInt(jt.decode(jt.RELEASE_INFORMATION),10))}static decode(e){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let o="",s,a,n,r,l,c,h,p=0;const u=e.replace(/[^A-Za-z0-9+/=]/g,"");for(;p<u.length;)r=i.indexOf(u.charAt(p++)),l=i.indexOf(u.charAt(p++)),c=i.indexOf(u.charAt(p++)),h=i.indexOf(u.charAt(p++)),s=r<<2|l>>4,a=(l&15)<<4|c>>2,n=(c&3)<<6|h,o=o+String.fromCharCode(s),c!=64&&(o=o+String.fromCharCode(a)),h!=64&&(o=o+String.fromCharCode(n));return o=jt.utf8_decode(o),o}static utf8_decode(e){e=e.replace(/rn/g,"n");let i="";for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);s<128?i+=String.fromCharCode(s):s>127&&s<2048?(i+=String.fromCharCode(s>>6|192),i+=String.fromCharCode(s&63|128)):(i+=String.fromCharCode(s>>12|224),i+=String.fromCharCode(s>>6&63|128),i+=String.fromCharCode(s&63|128))}return i}static setGridContext(e=!1){jt.gridContext=e}static setLicenseKey(e){jt.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 o=i.filter(r=>r==="TRIAL").length===1,s=i.filter(r=>r.startsWith("v"))[0],a=s?s.replace("v",""):"legacy",n=nr[i.filter(r=>nr[r])[0]];return[a,o,n]}centerPadAndOutput(e){const i=this.totalMessageLength-e.length;console.error(e.padStart(i/2+e.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(e,i="*",o=""){console.error(e.padEnd(this.totalMessageLength-o.length,i)+o)}outputInvalidLicenseKey(e,i,o){jt.gridContext||(e?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${o} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${ig}.`," ","*"),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 ${ig}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(e,i,o){jt.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${o} 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){jt.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,o){jt.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${o} 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"}};uh.RELEASE_INFORMATION="MTc1MTk2ODUyNTkzNw==",uh.gridContext=!1;var Xs=uh;import{VERSION as WD,_ModuleSupport as Zs}from"ag-charts-community";import{_ModuleSupport as GD}from"ag-charts-community";import{isNumberEqual as og}from"ag-charts-core";function gh(t,e,i){const o=(a,n,r,l)=>{let c=t[0];for(let h=a;r>0?h<=n:h>n;h+=r){const p=t[h];if(l(c,p))return!0;c=p}return!1},s=Math.floor(t.length/2);return o(e,s,e,i)?!0:o(t.length-e,s,-e,i)}import{_ModuleSupport as VD}from"ag-charts-community";var{AxisInterval:HD,Property:KD}=VD,fh=class extends HD{};d([KD],fh.prototype,"minSpacing",2);import{_ModuleSupport as rr}from"ag-charts-community";import{countFractionDigits as $D,isNumberEqual as qs}from"ag-charts-core";import{_ModuleSupport as sg}from"ag-charts-community";import{isNumberEqual as ag}from"ag-charts-core";import{_ModuleSupport as jD}from"ag-charts-community";import{createId as YD}from"ag-charts-core";var{BaseProperties:ng,ChartAxisDirection:UD,Property:Pt,Group:yh,FONT_SIZE:XD}=jD,Si=class extends ng{constructor(){super(...arguments),this.fontSize=XD.LARGE,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};d([Pt],Si.prototype,"enabled",2),d([Pt],Si.prototype,"text",2),d([Pt],Si.prototype,"fontStyle",2),d([Pt],Si.prototype,"fontWeight",2),d([Pt],Si.prototype,"fontSize",2),d([Pt],Si.prototype,"fontFamily",2),d([Pt],Si.prototype,"padding",2),d([Pt],Si.prototype,"color",2),d([Pt],Si.prototype,"parallel",2);var be=class extends ng{constructor(){super(...arguments),this.id=YD(this),this.defaultColorRange=[],this.shape="polygon",this.label=new Si,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=UD.Angle,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new yh({name:this.id}),this.rangeGroup=new yh({name:this.id}),this.labelGroup=new yh({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,o,s){const{label:a}=this;t.x=e,t.y=i,t.text=a.text,t.textAlign="center",t.textBaseline=o,t.rotation=s,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}};d([Pt],be.prototype,"enabled",2),d([Pt],be.prototype,"type",2),d([Pt],be.prototype,"range",2),d([Pt],be.prototype,"value",2),d([Pt],be.prototype,"defaultColorRange",2),d([Pt],be.prototype,"fill",2),d([Pt],be.prototype,"fillOpacity",2),d([Pt],be.prototype,"stroke",2),d([Pt],be.prototype,"strokeWidth",2),d([Pt],be.prototype,"strokeOpacity",2),d([Pt],be.prototype,"lineDash",2),d([Pt],be.prototype,"shape",2),d([Pt],be.prototype,"label",2);var{ChartAxisDirection:ZD,getCrossLineValue:qD,validateCrossLineValue:QD,normalizeAngle360:mh,Group:JD,Path:rg,Sector:tk,RotatableText:ek,ContinuousScale:ik}=sg,xh=class extends be{constructor(){super(),this.direction=ZD.Angle,this.polygonNode=new rg,this.sectorNode=new tk,this.lineNode=new rg,this.crossLineRange=new JD,this.labelNode=new ek,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}visibilityCheck(){if(!ik.is(this.scale))return!0;const[t,e]=this.scale.domain,i=qD(this);if(this.type==="range"){const[o,s]=i;return o>=t&&o<=e&&s>=o&&s<=e}else return i>=t&&i<=e}update(t){const{scale:e}=this;if(!e||!QD(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:o,lineNode:s}=this;if(!t||i!=="line"||!e){s.visible=!1;return}const a=e.convert(o);if(isNaN(a)){s.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this;s.visible=!0,s.stroke=this.stroke,s.strokeOpacity=this.strokeOpacity??1,s.strokeWidth=this.strokeWidth??1,s.fill=void 0,s.lineDash=this.lineDash;const l=r*Math.cos(a),c=r*Math.sin(a),h=n*Math.cos(a),p=n*Math.sin(a);s.path.clear(!0),s.path.moveTo(h,p),s.path.lineTo(l,c),this.assignCrossLineGroup(!1,this.crossLineRange)}updatePolygonNode(t){const{polygonNode:e,range:i,scale:o,shape:s,type:a,ticks:n}=this;if(!t||a!=="range"||s!=="polygon"||!o||!i){e.visible=!1;return}const{axisInnerRadius:r,axisOuterRadius:l}=this,c=n.indexOf(i[0]),h=n.indexOf(i[1]),u=(c<=h?n.slice(c,h+1):n.slice(c).concat(n.slice(0,h+1))).map(f=>o.convert(f));e.visible=!0,this.setSectorNodeProps(e);const{path:g}=e;g.clear(!0),u.forEach((f,y)=>{const x=l*Math.cos(f),m=l*Math.sin(f);y===0?g.moveTo(x,m):g.lineTo(x,m)}),r===0?g.lineTo(0,0):u.slice().reverse().forEach(f=>{const y=r*Math.cos(f),x=r*Math.sin(f);g.lineTo(y,x)}),e.path.closePath(),this.assignCrossLineGroup(!0,this.crossLineRange)}updateSectorNode(t){const{sectorNode:e,range:i,scale:o,shape:s,type:a}=this;if(!t||a!=="range"||s!=="circle"||!o||!i){e.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:r}=this,l=i.map(p=>o.convert(p)),c=o.step??0,h=o instanceof sg.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:o,scale:s,type:a,ticks:n}=this;if(!t||e.enabled===!1||!e.text||!s||a==="range"&&!o){i.visible=!1;return}i.visible=!0;const{axisInnerRadius:r,axisOuterRadius:l}=this;let c,h,p,u;if(a==="line"){const g=mh(s.convert(this.value)),f=1.5*Math.PI,y=ag(g,f)||g>f||g<Math.PI/2,x=(r+l)/2*Math.cos(g),m=(r+l)/2*Math.sin(g);c=x+e.padding*Math.cos(g+Math.PI/2),h=m+e.padding*Math.sin(g+Math.PI/2),u=y?"top":"bottom",p=y?g:g-Math.PI}else{const[g,f]=o.map(b=>mh(s.convert(b)));let y=(g+f)/2;g>f&&(y-=Math.PI),y=mh(y);const x=(ag(y,0)||y>0)&&y<Math.PI;let m;this.shape==="circle"||n.length<3?m=l-e.padding:m=l*Math.cos(Math.PI/n.length)-e.padding,c=m*Math.cos(y),h=m*Math.sin(y),u=x?"bottom":"top",p=x?y-Math.PI/2:y+Math.PI/2}this.setLabelNodeProps(i,c,h,u,p)}};xh.className="AngleCrossLine";var{ChartAxisDirection:ok,TextWrapper:sk,TextUtils:ak,Property:Sh,toRadians:Ua,normalizeAngle360:Do,normalizeAngle360Inclusive:nk,Path:rk,RotatableText:lk,Transformable:ck,BBox:hk,Selection:lg,Line:cg}=rr,bh=class extends rr.AxisLabel{constructor(){super(...arguments),this.orientation="fixed"}};d([Sh],bh.prototype,"orientation",2);var Xa=class extends rr.PolarAxis{constructor(t,e){super(t,e),this.startAngle=0,this.endAngle=void 0,this.tickLineGroupSelection=lg.select(this.tickLineGroup,cg,!1),this.gridLineGroupSelection=lg.select(this.gridLineGroup,cg,!1),this.labelData=[],this.tickData=[],this.radiusLineGroup=this.axisGroup.appendChild(new rr.TransformableGroup),this.radiusLine=this.radiusLineGroup.appendChild(new rk),this.includeInvisibleDomains=!0}get direction(){return ok.Angle}createLabel(){return new bh}calculateRotations(){const t=Ua(this.startAngle),e=Do(t),i=Do(t-Math.PI/2);return{rotation:t,parallelFlipRotation:e,regularFlipRotation:i}}calculateTickLayout(t){const{nice:e,scale:i}=this,o={nice:e,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},s=e?i.niceDomain(o,t):t,a=this.generateAngleTicks(s);this.tickData=a;const n=a.map(l=>l.value),r=n.reduce((l,c)=>Math.max(typeof c=="number"?$D(c):0,l),0);return{niceDomain:s,tickDomain:s,ticks:n,rawTickCount:void 0,fractionDigits:r,timeInterval:void 0,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine(),this.updateGridLines(),this.updateTickLines()}normalizedAngles(){const t=Do(-Math.PI/2+Ua(this.startAngle)),e=this.endAngle!=null?nk(Ua(this.endAngle)-Ua(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(){super.updatePosition();const{translation:t,radiusLineGroup:e}=this,i=Math.floor(t.x),o=Math.floor(t.y);e.translationX=i,e.translationY=o}updateRadiusLine(){const t=this.radiusLine,{path:e}=t;e.clear(!0);const{points:i,closePath:o}=this.getAxisLinePoints();i.forEach(({x:s,y:a,moveTo:n,arc:r,radius:l=0,startAngle:c=0,endAngle:h=0})=>{r?e.arc(s,a,l,c,h):n?e.moveTo(s,a):e.lineTo(s,a)}),o&&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,[o,s]=this.range,a=qs(s-o,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(o),y:i*Math.sin(o),moveTo:!0},{x:0,y:0,radius:i,startAngle:Do(o),endAngle:Do(s),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})?.ticks?.map(l=>t.convert(l));r&&r.length>2&&r.forEach((l,c)=>{const h=i*Math.cos(l),p=i*Math.sin(l),u=c===0;n.push({x:h,y:p,moveTo:u})})}return{points:n,closePath:a}}updateGridLines(){const{scale:t,gridLength:e,gridLine:{style:i,width:o},innerRadiusRatio:s}=this;if(!(i&&e>0))return;const a=e*s,n=i.length;this.gridLineGroupSelection.each((r,l,c)=>{const{value:h}=l,{stroke:p,lineDash:u}=i[c%n],g=t.convert(h);r.x1=a*Math.cos(g),r.y1=a*Math.sin(g),r.x2=e*Math.cos(g),r.y2=e*Math.sin(g),r.stroke=p,r.strokeWidth=o,r.lineDash=u,r.fill=void 0}),this.gridLineGroupSelection.cleanup()}updateLabels(){const{label:t,tickLabelGroupSelection:e}=this;e.each((i,o,s)=>{const a=this.labelData[s];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:o}=this;o.each((s,a)=>{const{value:n}=a,r=t.convert(n),l=Math.cos(r),c=Math.sin(r);s.x1=e*l,s.y1=e*c,s.x2=(e+i.size)*l,s.y2=(e+i.size)*c,s.stroke=i.stroke,s.strokeWidth=i.width})}createLabelNodeData(t,e,i){const{label:o,gridLength:s,scale:a,tick:n}=this;if(!o.enabled)return[];const r=new lk,l=i.x-this.translation.x,c=i.x+i.width-this.translation.x,{fractionDigits:h}=this.layout.label,p=this.tickFormatter(this.scale.domain,this.tickData,!1,h),u=t.map((g,f)=>{const{value:y}=g,x=s+o.spacing+n.size,m=a.convert(y),b=Math.cos(m),S=Math.sin(m),v=x*b,D=x*S,{textAlign:C,textBaseline:A}=this.getLabelAlign(m),k=f===t.length-1&&y!==t[0]&&qs(Do(m),Do(a.convert(t[0]))),I=this.getLabelRotation(m);let M=p(y,f);r.text=M,r.x=v,r.y=D,r.setFont(o),r.textAlign=C,r.textBaseline=A,r.rotation=I,I&&(r.rotationCenterX=v,r.rotationCenterY=D);let L=I?ck.toCanvas(r):r.getBBox();if(L&&e.hideWhenNecessary&&!I){const w=l-L.x,R=L.x+L.width-c,T=1;if(w>T||R>T){const N=L.width-Math.max(w,R);M=sk.wrapText(M,{maxWidth:N,font:o,textWrap:"never"}),M===ak.EllipsisChar&&(M=""),r.text=M,L=r.getBBox()}}return{text:M,x:v,y:D,textAlign:C,textBaseline:A,hidden:M===""||g.hidden||k,rotation:I,box:L}});return o.avoidCollisions&&this.avoidLabelCollisions(u),u}computeLabelsBBox(t,e){this.labelData=this.createLabelNodeData(this.tickData,t,e);const i=this.labelData.map(({box:o})=>o).filter(o=>o!=null);return!this.label.enabled||i.length===0?null:hk.merge(i)}getLabelOrientation(){const{label:t}=this;return t instanceof bh?t.orientation:"fixed"}getLabelRotation(t){let e=Ua(this.label.rotation??0);t=Do(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 o,s;const a=this.getLabelOrientation(),n=qs(e,0),r=qs(i,0),l=qs(e,1),c=qs(i,-1),h=e>0&&!n,p=i>0&&!r;return a==="parallel"?(o="center",s=l&&r||p?"top":"bottom"):a==="perpendicular"?(o=c||h?"left":"right",s="middle"):(o="right",n?o="center":h&&(o="left"),s="bottom",r?s="middle":p&&(s="top")),{textAlign:o,textBaseline:s}}updateCrossLines(){const{shape:t,gridLength:e,innerRadiusRatio:i}=this;this.crossLines.forEach(o=>{o instanceof xh&&(o.ticks=this.tickData.map(s=>s.value),o.shape=t,o.axisOuterRadius=e,o.axisInnerRadius=e*i)}),super.updateCrossLines()}};Xa.CrossLineConstructor=xh,d([Sh],Xa.prototype,"startAngle",2),d([Sh],Xa.prototype,"endAngle",2);var{Property:vh,CategoryScale:dk}=GD,ko=class extends Xa{constructor(t){super(t,new dk),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new fh}generateAngleTicks(t){const{scale:e,gridLength:i}=this,{values:o,minSpacing:s}=this.interval,a={nice:this.nice,interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},n=o??e.ticks(a,t)?.ticks??[];if(n.length<2||s==null)return n.map(p=>({value:p,visible:!0}));const r=n[0],l=e.convert(r),c=i*Math.cos(l),h=i*Math.sin(l);for(let p=1;p<n.length-1;p++){const u=n[p],g=e.convert(u);if(g-l>Math.PI)break;const f=i*Math.cos(g),y=i*Math.sin(g);if(Math.sqrt((f-c)**2+(y-h)**2)>s){const m=new Set([r]);return gh(n,p,(b,S)=>{m.add(S)}),n.map(b=>{const S=m.has(b);return{value:b,visible:S}})}}return[{value:r,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),p=c.box.clone().grow(e/2);return h.collidesBBox(p)},o=t[0],s=t.at(-1),a=new Set([o]),n=og(o.x,s.x)&&og(o.y,s.y),r=Math.floor(t.length/2);for(let l=1;l<=r;l++){const c=n?t.slice(0,-1):t;if(!gh(c,l,i)){gh(c,l,(p,u)=>{a.add(u)});break}}t.forEach(l=>{a.has(l)||(l.hidden=!0,l.box=void 0)})}tickFormatParams(){return{type:"category"}}datumFormatParams(t,e){const{datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}=e;return{type:"category",value:t,datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}}};ko.className="AngleCategoryAxis",ko.type="angle-category",d([vh],ko.prototype,"groupPaddingInner",2),d([vh],ko.prototype,"paddingInner",2),d([vh],ko.prototype,"interval",2);var pk={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-category",moduleFactory:t=>new ko(t)};import{_ModuleSupport as uk}from"ag-charts-community";import{isNumberEqual as hg}from"ag-charts-core";import{_ModuleSupport as gk}from"ag-charts-community";import{isNumberEqual as fk}from"ag-charts-core";var{range:dg,isDenseInterval:yk,LinearScale:Dh}=gk,pg=class Ju extends Dh{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(e,i){const[o,s]=i;let a=Dh.getTickStep(o,s,e);const n=isNaN(e.maxTickCount)?1/0:e.maxTickCount,r=Math.abs(s-o)/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:o}=this;if(!i||i.length<2||i.some(c=>!isFinite(c))||o<=0)return{ticks:[],count:0};const{nice:s,interval:a}=e,[n,r]=i;if(a){const c=Math.abs(a),h=this.getPixelRange();if(!yk((r-n)/c,h))return dg(n,r,c)}let l;if(s&&this.hasNiceRange()){const c=super.niceDomain(e,i);l=Ju.getNiceStepAndTickCount(e,c).step}else l=Dh.getTickStep(n,r,e);return dg(n,r,l)}hasNiceRange(){const e=this.range.slice().sort((o,s)=>o-s);return[Math.PI,2*Math.PI].some(o=>fk(o,e[1]-e[0]))}niceDomain(e,i=this.domain){const o=super.niceDomain(e,i);if(!this.hasNiceRange())return o;const s=o[0]>o[1],a=s?o[1]:o[0],{step:n,count:r}=Ju.getNiceStepAndTickCount(e,o),l=1/n,c=n>=1?Math.ceil(a/n+r)*n:Math.ceil((a+r*n)*l)/l;return s?[c,a]:[a,c]}getPixelRange(){return this.arcLength}},{Property:kh,angleBetween:mk,normalisedExtentWithMetadata:xk,findMinMax:Sk}=uk,is=class extends Xa{constructor(t){super(t,new pg),this.shape="circle",this.interval=new fh}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:o,clipped:s}=xk(t,e,i);return{domain:o,clipped:s}}updateScale(){super.updateScale(),this.scale.arcLength=this.getRangeArcLength()}getRangeArcLength(){const{range:t}=this,e=Math.min(...t),i=Math.max(...t),o=mk(e,i)||2*Math.PI,s=this.gridLength;return o*s}generateAngleTicks(t){const{scale:e,range:i,nice:o}=this,{values:s,step:a,minSpacing:n,maxSpacing:r}=this.interval;let l;if(s==null){const{arcLength:c}=e,h=r?Math.floor(c/r):1,p=n?Math.floor(c/n):1/0,u=Math.floor(4/Math.PI*Math.abs(i[0]-i[1])),g=Math.max(h,Math.min(p,u)),f={nice:o,interval:a,tickCount:g,minTickCount:h,maxTickCount:p};l=e.ticks(f,t)?.ticks??[]}else{const[c,h]=Sk(t.map(Number));l=s.filter(p=>p>=c&&p<=h).sort((p,u)=>p-u)}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)},o=t[0],s=t.at(-1);o!==s&&hg(o.x,s.x)&&hg(o.y,s.y)&&(s.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)})}tickFormatParams(t,e,i){return{type:"number",fractionDigits:i}}datumFormatParams(t,e,i){const{datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h}=e;return{type:"number",value:t,datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h,fractionDigits:i}}};is.className="AngleNumberAxis",is.type="angle-number",d([kh],is.prototype,"min",2),d([kh],is.prototype,"max",2),d([kh],is.prototype,"interval",2);var bk={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"angle-number",moduleFactory:t=>new is(t)};import{_ModuleSupport as ug}from"ag-charts-community";var{OrdinalTimeScale:vk,Property:Dk,TimeAxisParentLevel:kk,lowestGranularityUnitForTicks:Mk,lowestGranularityUnitForValue:Ak,minimumTimeAxisDatumGranularity:Ik,dateTruncationForDomain:Ck,intervalUnit:gg,intervalStep:fg,intervalEpoch:yg,intervalMilliseconds:mg}=ug,Za=class extends ug.CategoryAxis{constructor(t){super(t,new vk),this.parentLevel=new kk,this.minGranularity=void 0}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}updateScale(){super.updateScale();const{boundSeries:t,direction:e}=this;this.minGranularity=Ik(t,e,void 0,void 0)}tickFormatParams(t,e,i,o){o??(o=Mk(e));const s=Ck(t),a=gg(o),n=fg(o),r=yg(o);return{type:"date",unit:a,step:n,epoch:r,truncateDate:s}}datumFormatParams(t,e,i,o,s){if(typeof t=="number"&&(t=new Date(t)),o==null){const{minGranularity:x}=this,m=Ak(t);x!=null&&mg(x)<mg(m)?o=x:o=m}const{datum:a,seriesId:n,legendItemName:r,key:l,source:c,property:h,domain:p,boundSeries:u}=e,g=gg(o),f=fg(o),y=yg(o);return{type:"date",value:t,datum:a,seriesId:n,legendItemName:r,key:l,source:c,property:h,domain:p,boundSeries:u,unit:g,step:f,epoch:y,style:s}}};Za.className="OrdinalTimeAxis",Za.type="ordinal-time",d([Dk],Za.prototype,"parentLevel",2);var Tk={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["cartesian"],identifier:"ordinal-time",moduleFactory:t=>new Za(t)};import{_ModuleSupport as Lk}from"ag-charts-community";import{_ModuleSupport as lr}from"ag-charts-community";import{isNumberEqual as wk}from"ag-charts-core";import{_ModuleSupport as xg}from"ag-charts-community";import{clamp as Sg,isNumberEqual as Pk}from"ag-charts-core";var{ChartAxisDirection:Nk,Property:Ok,validateCrossLineValue:Rk,normalizeAngle360FromDegrees:Ek,Group:_k,Path:Bk,Sector:zk,RotatableText:Fk}=xg,bg=class extends Si{constructor(){super(...arguments),this.positionAngle=void 0}};d([Ok],bg.prototype,"positionAngle",2);var Mh=class extends be{constructor(){super(),this.direction=Nk.Radius,this.label=new bg,this.polygonNode=new Bk,this.sectorNode=new zk,this.crossLineRange=new _k,this.labelNode=new Fk,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||!Rk(this,e)){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.updateRadii();const{innerRadius:i,outerRadius:o}=this;t&&(t=i>=this.axisInnerRadius&&o<=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:o,axisOuterRadius:s}=this;if(!e)return{innerRadius:0,outerRadius:0};const a=l=>s+o-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((o,s)=>{const a=t*Math.cos(o),n=t*Math.sin(o);s===0?i.path.moveTo(a,n):i.path.lineTo(a,n)}),i.path.closePath()}updatePolygonNode(t){const{gridAngles:e,polygonNode:i,scale:o,shape:s,type:a,innerRadius:n,outerRadius:r}=this;if(!t||s!=="polygon"||!o||!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:o,sectorNode:s,shape:a,innerRadius:n,outerRadius:r}=this;if(!t||a!=="circle"||!o){s.visible=!1;return}s.visible=!0,s.startAngle=0,s.endAngle=2*Math.PI;const l=this.getPadding(),c=Sg(e,n+l,i),h=Sg(e,r-l,i);s.innerRadius=Math.min(c,h),s.outerRadius=Math.max(c,h),this.setSectorNodeProps(s)}updateLabelNode(t){const{innerRadius:e,label:i,labelNode:o,scale:s,shape:a,type:n}=this;if(!t||i.enabled===!1||!i.text||!s){o.visible=!1;return}const r=Ek((i.positionAngle??0)-90),l=(Pk(r,0)||r>0)&&r<Math.PI,c=l?r-Math.PI/2:r+Math.PI/2;let h;const p=this.gridAngles??[];n==="line"?h=e+i.padding:a==="circle"||p.length<3?h=e-i.padding:h=e*Math.cos(Math.PI/p.length)-i.padding;const u=h*Math.cos(r),g=h*Math.sin(r);let f;n==="line"?f=l?"top":"bottom":f=l?"bottom":"top",this.setLabelNodeProps(o,u,g,f,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 xg.BandScale?(i-e)/2:0}};Mh.className="RadiusCrossLine";var{ChartAxisDirection:Wk,ZIndexMap:Gk,Property:Ah,normalizeAngle360:vg,toRadians:Vk,Caption:Hk,Group:Kk,TransformableGroup:Dg,Path:$k,Line:kg,Selection:Mg,AxisTickGenerator:jk,AxisGroupZIndexMap:Yk}=lr,Ih=class extends lr.AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};d([Ah],Ih.prototype,"autoRotate",2),d([Ah],Ih.prototype,"autoRotateAngle",2);var cr=class extends lr.PolarAxis{constructor(t,e){super(t,e),this.positionAngle=0,this.gridLineGroupSelection=Mg.select(this.gridLineGroup,kg,!1),this.tickGenerator=new jk(this),this.generatedTicks=void 0,this.headingLabelGroup=this.axisGroup.appendChild(new Dg({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new Dg({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new kg({name:`${this.id}-Axis-line`,zIndex:Yk.AxisLine})),this.gridPathGroup=this.gridGroup.appendChild(new Kk({name:`${this.id}-gridPaths`,zIndex:Gk.AXIS_GRID})),this.gridPathSelection=Mg.select(this.gridPathGroup,$k),this.headingLabelGroup.appendChild(this.title.caption.node),this.cleanup.register(this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}get direction(){return Wk.Radius}getAxisTransform(){const t=this.scale.range[0],{translation:e,positionAngle:i,innerRadiusRatio:o}=this,s=t*o,a=Vk(i);return{translationX:e.x,translationY:e.y-t-s,rotation:a,rotationCenterX:0,rotationCenterY:t+s}}update(){super.update(),this.updateTitle(),this.updateGridLines();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]})}updatePosition(){super.updatePosition();const t=this.getAxisTransform();this.tickLineGroup.setProperties(t),this.tickLabelGroup.setProperties(t),this.lineNodeGroup.setProperties(t),this.headingLabelGroup.setProperties(t)}calculateRotations(){return{rotation:0,parallelFlipRotation:0,regularFlipRotation:-Math.PI/2}}calculateTickLayout(t,e,i){const s=-Math.PI/2,a=[0,1],n=this.label.getSideFlag(),r=n*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),{range:l,reverse:c,defaultTickMinSpacing:h}=this,p=this.tickGenerator.generateTicks({domain:t,range:l,reverse:c,niceMode:e,visibleRange:a,primaryTickCount:void 0,defaultTickMinSpacing:h,parallelFlipRotation:0,regularFlipRotation:s,labelX:r,sideFlag:n,removeOverflowLabels:!1}),{tickData:u}=p,{ticks:g,rawTicks:f,rawTickCount:y,tickDomain:x,fractionDigits:m,niceDomain:b=t}=u,S=g.map(v=>this.getTickLabelProps(v,p));return this.generatedTicks={ticks:g,labels:S},{ticks:f,tickDomain:x,niceDomain:b,rawTickCount:y,fractionDigits:m,timeInterval:void 0}}updateSelections(){const{generatedTicks:t}=this;if(!t)return;const{ticks:e,labels:i}=t;this.gridLineGroupSelection.update(this.gridLength?e:[]),this.tickLabelGroupSelection.update(i),this.gridPathSelection.update(this.gridLine.enabled?this.prepareGridPathTickData(e):[]),this.gridLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup(),this.gridPathSelection.cleanup()}updateLabels(){if(!this.label.enabled)return;const t=lr.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(){const{gridLine:{style:t,width:e},shape:i,generatedTicks:o}=this;if(!t||!o)return;const s=t.length,a=(u,g)=>{const{stroke:f,lineDash:y}=t[g%s];u.stroke=f,u.strokeWidth=e,u.lineDash=y,u.fill=void 0},[n,r]=this.gridRange??[0,2*Math.PI],l=wk(r-n,2*Math.PI),p=i==="circle"?(u,g)=>{const{path:f}=u;f.clear(!0);const y=this.getTickRadius(g);l?(f.moveTo(y,0),f.arc(0,0,y,0,2*Math.PI)):(f.moveTo(y*Math.cos(n),y*Math.sin(n)),f.arc(0,0,y,vg(n),vg(r))),l&&f.closePath()}:(u,g)=>{const{path:f}=u,y=this.gridAngles;if(f.clear(!0),!y||y.length<3)return;const x=this.getTickRadius(g);y.forEach((m,b)=>{const S=x*Math.cos(m),v=x*Math.sin(m);b===0?f.moveTo(S,v):f.lineTo(S,v),y.forEach((D,C)=>{const A=x*Math.cos(D),k=x*Math.sin(D);C===0?f.moveTo(A,k):f.lineTo(A,k)}),f.closePath()}),f.closePath()};this.gridPathSelection.each((u,g,f)=>{a(u,f),p(u,g)})}updateTitle(){const t=n=>n.defaultValue,{title:e,range:i}=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 s=!1;const a=e.caption.node;e.enabled&&(s=!0,a.rotation=Math.PI/2,a.x=Math.floor((i[0]+i[1])/2),a.y=-Hk.SMALL_PADDING,a.textAlign="center",a.textBaseline="bottom",a.text=this.callWithContext(o,this.getTitleFormatterParams(this.scale.domain))),a.visible=s}updateCrossLines(){this.crossLines.forEach(t=>{if(t instanceof Mh){const{shape:e,gridAngles:i,range:o,innerRadiusRatio:s}=this,a=o[0];t.shape=e,t.gridAngles=i,t.axisOuterRadius=a,t.axisInnerRadius=a*s}}),super.updateCrossLines()}createLabel(){return new Ih}getTickLabelProps(t,e){const{label:i}=this,{rotation:o,textBaseline:s,textAlign:a}=e,n=this.scale.range,r=t.tickLabel??"",c=i.getSideFlag()*(this.getTickSize()+i.spacing+this.seriesAreaPadding),h=r!==""&&r!=null,p=o;return{...this.getLabelStyles({value:t.tickLabel}),tickId:t.tickId,rotation:p,text:r,textAlign:a,textBaseline:s,visible:h,x:c,y:t.translation,rotationCenterX:c,rotationCenterY:t.translation,range:n}}};cr.CrossLineConstructor=Mh,d([Ah],cr.prototype,"positionAngle",2);var{ProxyPropertyOnWrite:Ag,Property:Ch,CategoryScale:Ig}=Lk,Mo=class extends cr{constructor(t){super(t,new Ig),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,o=e.range[0],s=o*i;if(Ig.is(e)){const a=e.domain,n=a.length-1-a.indexOf(t.tick);return n===0?s:e.inset+e.step*(n-.5)+e.bandwidth/2}else{const a=(o-s)/e.domain.length;return o-t.translation+s-a/2}}tickFormatParams(){return{type:"category"}}datumFormatParams(t,e){const{datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}=e;return{type:"category",value:t,datum:i,seriesId:o,legendItemName:s,key:a,source:n,property:r,domain:l,boundSeries:c}}};Mo.className="RadiusCategoryAxis",Mo.type="radius-category",d([Ch],Mo.prototype,"groupPaddingInner",2),d([Ag("scale","paddingInner"),Ch],Mo.prototype,"paddingInner",2),d([Ag("scale","paddingOuter"),Ch],Mo.prototype,"paddingOuter",2);var Uk={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-category",moduleFactory:t=>new Mo(t)};import{_ModuleSupport as Xk}from"ag-charts-community";var{Property:Cg,normalisedExtentWithMetadata:Zk,LinearScale:qk}=Xk,Qs=class extends cr{constructor(t){super(t,new qk),this.shape="polygon"}prepareGridPathTickData(t){const{scale:e}=this,i=e.domain[1];return t.filter(({tick:o})=>o!==i).sort((o,s)=>s.tick-o.tick)}getTickRadius(t){const{scale:e}=this,i=e.range[0],o=i*this.innerRadiusRatio;return i-t.translation+o}normaliseDataDomain(t){const{min:e,max:i}=this,{extent:o,clipped:s}=Zk(t,e,i);return{domain:o,clipped:s}}tickFormatParams(t,e,i){return{type:"number",fractionDigits:i}}datumFormatParams(t,e,i){const{datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h}=e;return{type:"number",value:t,datum:o,seriesId:s,legendItemName:a,key:n,source:r,property:l,domain:c,boundSeries:h,fractionDigits:i}}};Qs.className="RadiusNumberAxis",Qs.type="radius-number",d([Cg],Qs.prototype,"min",2),d([Cg],Qs.prototype,"max",2);var Qk={type:"axis",optionsKey:"axes[]",packageType:"enterprise",chartTypes:["polar"],identifier:"radius-number",moduleFactory:t=>new Qs(t)};import{_ModuleSupport as Tg}from"ag-charts-community";var{ObserveChanges:Lg,Property:wg}=Tg,Th=class extends Tg.BaseModuleInstance{constructor(t){super(),this.ctx=t,this.enabled=!0,t.animationManager.skip(!1),this.cleanup.register(()=>{t.animationManager.skip(!0)})}};d([Lg((t,e)=>{t.ctx.animationManager.skip(!e)}),wg],Th.prototype,"enabled",2),d([Lg((t,e)=>{t.ctx.animationManager.defaultDuration=e}),wg],Th.prototype,"duration",2);var Jk={type:"root",optionsKey:"animation",packageType:"enterprise",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion","standalone","gauge"],moduleFactory:t=>new Th(t),themeTemplate:{animation:{enabled:!0}}};import{_ModuleSupport as hr}from"ag-charts-community";import{isValidDate as Lh}from"ag-charts-core";import{_ModuleSupport as wh}from"ag-charts-community";import{attachListener as tM,setAttribute as eM}from"ag-charts-core";var iM='<div contenteditable="plaintext-only" class="ag-charts-text-input__textarea" tabindex="0"></div>',{focusCursorAtEnd:oM}=wh,Pg="text-input",Ng="canvas-overlay",sM=class extends wh.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(Ng,Pg),this.element.classList.add("ag-charts-text-input"),this.cleanup.register(()=>t.domManager.removeChild(Ng,Pg))}setKeyDownHandler(t){this.cleanup.register(tM(this.element,"keydown",t))}show(t){this.element.innerHTML=iM;const e=this.element.firstElementChild;eM(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",oM(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:o,getTextInputCoords:s,getTextPosition:a,alignment:n,textAlign:r}=this.layout;t.style.setProperty("width",o?`${o}px`:"unset");const l=e.getBoundingClientRect(),c=s(l.height);let h=c.x;n==="center"?h-=(o??l.width)/2:n==="right"&&(h-=o??l.width);const p=a();let u=c.y;p==="center"?u-=l.height/2:p==="bottom"&&(u-=l.height),t.style.setProperty("top",`${u}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:o}=this.element.getBoundingClientRect();return new wh.BBox(t,e,i,o)}};import{_ModuleSupport as aM}from"ag-charts-community";var{BaseProperties:nM,Property:Og}=aM,Ph=class extends nM{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};d([Og],Ph.prototype,"enabled",2),d([Og],Ph.prototype,"axes",2);import{_ModuleSupport as rM}from"ag-charts-community";var Nh=(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))(Nh||{}),lM=Object.values(Nh);function cM(t){for(const e of lM)if(e===t)return e}import{isObject as hM}from"ag-charts-core";import{_ModuleSupport as dM}from"ag-charts-community";import{isObject as pM}from"ag-charts-core";import{_ModuleSupport as uM}from"ag-charts-community";import{generateUUID as gM}from"ag-charts-core";var{BaseProperties:Ao,FONT_SIZE:fM,Property:st}=uM,qa=class extends Ao{};d([st],qa.prototype,"x",2),d([st],qa.prototype,"y",2);var yM=class extends ue(qi(Bg(Ao))){},Oh=class extends ue(qi(Ei(_h(as(Ao))))){constructor(){super(...arguments),this.cornerRadius=2}};d([st],Oh.prototype,"enabled",2),d([st],Oh.prototype,"cornerRadius",2);var mM=class extends Ei(Ao){},xM=class extends ue(qi(Ei(Ao))){},os=class extends as(Ao){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};d([st],os.prototype,"label",2),d([st],os.prototype,"position",2),d([st],os.prototype,"alignment",2);var SM=class extends as(Ao){},Qa=class extends as(Ao){constructor(){super(...arguments),this.label=""}};d([st],Qa.prototype,"label",2),d([st],Qa.prototype,"position",2),d([st],Qa.prototype,"alignment",2);function ss(t){class e extends vM(Bg(t)){constructor(){super(...arguments),this.id=gM()}}return e}function Rh(t){class e extends t{constructor(){super(...arguments),this.start=new qa,this.end=new qa}}return d([st],e.prototype,"start",2),d([st],e.prototype,"end",2),e}function Rg(t){class e extends t{}return d([st],e.prototype,"x",2),d([st],e.prototype,"y",2),e}function Eg(t){class e extends t{}return d([st],e.prototype,"value",2),e}function Eh(t){class e extends t{constructor(){super(...arguments),this.background=new mM}}return d([st],e.prototype,"background",2),e}function Io(t){class e extends t{constructor(){super(...arguments),this.handle=new xM}}return d([st],e.prototype,"handle",2),e}function _g(t){class e extends t{constructor(){super(...arguments),this.axisLabel=new Oh}}return d([st],e.prototype,"axisLabel",2),e}function _h(t){class e extends t{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return d([st],e.prototype,"padding",2),d([st],e.prototype,"textAlign",2),d([st],e.prototype,"formatter",2),e}function bM(t){class e extends t{}return e}function Bh(t){class e extends t{}return d([st],e.prototype,"extendStart",2),d([st],e.prototype,"extendEnd",2),e}function vM(t){class e extends t{}return d([st],e.prototype,"locked",2),e}function zh(t){class e extends t{setLocaleManager(o){this.localeManager??(this.localeManager=o)}}return e}function Bg(t){class e extends t{}return d([st],e.prototype,"visible",2),e}function Ei(t){class e extends t{}return d([st],e.prototype,"fill",2),d([st],e.prototype,"fillOpacity",2),e}function ue(t){class e extends t{}return d([st],e.prototype,"stroke",2),d([st],e.prototype,"strokeOpacity",2),d([st],e.prototype,"strokeWidth",2),e}function qi(t){class e extends t{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return d([st],e.prototype,"lineDash",2),d([st],e.prototype,"lineDashOffset",2),d([st],e.prototype,"lineStyle",2),e}function as(t){class e extends t{constructor(){super(...arguments),this.fontSize=fM.SMALL,this.fontFamily="Verdana, sans-serif"}}return d([st],e.prototype,"fontStyle",2),d([st],e.prototype,"font