@kubit-ui-web/react-charts 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/charts/barChart/barChart.type.d.ts +8 -0
- package/dist/cjs/charts/barChart/barChart.type.d.ts.map +1 -1
- package/dist/cjs/charts/barChart/fragments/barChartPath.d.ts.map +1 -1
- package/dist/cjs/charts/barChart/fragments/barChartPath.js +2 -2
- package/dist/cjs/charts/customBackgroundChart/context/customBackgroundChartContext.d.ts +3 -0
- package/dist/cjs/charts/customBackgroundChart/context/customBackgroundChartContext.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/context/customBackgroundChartContext.js +3 -0
- package/dist/cjs/charts/customBackgroundChart/context/index.d.ts +2 -0
- package/dist/cjs/charts/customBackgroundChart/context/index.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/context/index.js +1 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChart.d.ts +6 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChart.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChart.js +7 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChart.type.d.ts +50 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChart.type.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChart.type.js +1 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChartStructure.d.ts +4 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChartStructure.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/customBackgroundChartStructure.js +41 -0
- package/dist/cjs/charts/customBackgroundChart/fragments/customBackgroundChartPlot.d.ts +4 -0
- package/dist/cjs/charts/customBackgroundChart/fragments/customBackgroundChartPlot.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/fragments/customBackgroundChartPlot.js +49 -0
- package/dist/cjs/charts/customBackgroundChart/fragments/index.d.ts +2 -0
- package/dist/cjs/charts/customBackgroundChart/fragments/index.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/fragments/index.js +1 -0
- package/dist/cjs/charts/customBackgroundChart/index.d.ts +2 -0
- package/dist/cjs/charts/customBackgroundChart/index.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/index.js +1 -0
- package/dist/cjs/charts/customBackgroundChart/utils/accessibility.d.ts +19 -0
- package/dist/cjs/charts/customBackgroundChart/utils/accessibility.d.ts.map +1 -0
- package/dist/cjs/charts/customBackgroundChart/utils/accessibility.js +32 -0
- package/dist/cjs/charts/index.d.ts +1 -0
- package/dist/cjs/charts/index.d.ts.map +1 -1
- package/dist/cjs/charts/index.js +1 -0
- package/dist/cjs/components/bar/bar.d.ts.map +1 -1
- package/dist/cjs/components/bar/bar.js +6 -3
- package/dist/cjs/components/bar/bar.type.d.ts +9 -0
- package/dist/cjs/components/bar/bar.type.d.ts.map +1 -1
- package/dist/cjs/components/path/path.d.ts.map +1 -1
- package/dist/cjs/components/path/path.js +24 -11
- package/dist/cjs/components/path/path.types.d.ts +9 -0
- package/dist/cjs/components/path/path.types.d.ts.map +1 -1
- package/dist/cjs/components/plot/plot.d.ts.map +1 -1
- package/dist/cjs/components/plot/plot.js +21 -3
- package/dist/cjs/types/errors.type.d.ts +2 -0
- package/dist/cjs/types/errors.type.d.ts.map +1 -1
- package/dist/cjs/types/errors.type.js +3 -0
- package/dist/cjs/types/focusConfig.type.d.ts +13 -7
- package/dist/cjs/types/focusConfig.type.d.ts.map +1 -1
- package/dist/cjs/types/focusConfig.type.js +3 -3
- package/dist/cjs/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.d.ts +20 -0
- package/dist/cjs/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.d.ts.map +1 -0
- package/dist/cjs/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.js +27 -0
- package/dist/cjs/utils/adaptLegacyFocusConfig/index.d.ts +2 -0
- package/dist/cjs/utils/adaptLegacyFocusConfig/index.d.ts.map +1 -0
- package/dist/cjs/utils/adaptLegacyFocusConfig/index.js +1 -0
- package/dist/esm/charts/barChart/barChart.type.d.ts +8 -0
- package/dist/esm/charts/barChart/barChart.type.d.ts.map +1 -1
- package/dist/esm/charts/barChart/fragments/barChartPath.d.ts.map +1 -1
- package/dist/esm/charts/barChart/fragments/barChartPath.js +2 -2
- package/dist/esm/charts/customBackgroundChart/context/customBackgroundChartContext.d.ts +3 -0
- package/dist/esm/charts/customBackgroundChart/context/customBackgroundChartContext.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/context/customBackgroundChartContext.js +3 -0
- package/dist/esm/charts/customBackgroundChart/context/index.d.ts +2 -0
- package/dist/esm/charts/customBackgroundChart/context/index.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/context/index.js +1 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChart.d.ts +6 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChart.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChart.js +7 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChart.type.d.ts +50 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChart.type.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChart.type.js +1 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChartStructure.d.ts +4 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChartStructure.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/customBackgroundChartStructure.js +41 -0
- package/dist/esm/charts/customBackgroundChart/fragments/customBackgroundChartPlot.d.ts +4 -0
- package/dist/esm/charts/customBackgroundChart/fragments/customBackgroundChartPlot.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/fragments/customBackgroundChartPlot.js +49 -0
- package/dist/esm/charts/customBackgroundChart/fragments/index.d.ts +2 -0
- package/dist/esm/charts/customBackgroundChart/fragments/index.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/fragments/index.js +1 -0
- package/dist/esm/charts/customBackgroundChart/index.d.ts +2 -0
- package/dist/esm/charts/customBackgroundChart/index.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/index.js +1 -0
- package/dist/esm/charts/customBackgroundChart/utils/accessibility.d.ts +19 -0
- package/dist/esm/charts/customBackgroundChart/utils/accessibility.d.ts.map +1 -0
- package/dist/esm/charts/customBackgroundChart/utils/accessibility.js +32 -0
- package/dist/esm/charts/index.d.ts +1 -0
- package/dist/esm/charts/index.d.ts.map +1 -1
- package/dist/esm/charts/index.js +1 -0
- package/dist/esm/components/bar/bar.d.ts.map +1 -1
- package/dist/esm/components/bar/bar.js +6 -3
- package/dist/esm/components/bar/bar.type.d.ts +9 -0
- package/dist/esm/components/bar/bar.type.d.ts.map +1 -1
- package/dist/esm/components/path/path.d.ts.map +1 -1
- package/dist/esm/components/path/path.js +24 -11
- package/dist/esm/components/path/path.types.d.ts +9 -0
- package/dist/esm/components/path/path.types.d.ts.map +1 -1
- package/dist/esm/components/plot/plot.d.ts.map +1 -1
- package/dist/esm/components/plot/plot.js +21 -3
- package/dist/esm/types/errors.type.d.ts +2 -0
- package/dist/esm/types/errors.type.d.ts.map +1 -1
- package/dist/esm/types/errors.type.js +3 -0
- package/dist/esm/types/focusConfig.type.d.ts +13 -7
- package/dist/esm/types/focusConfig.type.d.ts.map +1 -1
- package/dist/esm/types/focusConfig.type.js +3 -3
- package/dist/esm/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.d.ts +20 -0
- package/dist/esm/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.d.ts.map +1 -0
- package/dist/esm/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.js +27 -0
- package/dist/esm/utils/adaptLegacyFocusConfig/index.d.ts +2 -0
- package/dist/esm/utils/adaptLegacyFocusConfig/index.d.ts.map +1 -0
- package/dist/esm/utils/adaptLegacyFocusConfig/index.js +1 -0
- package/dist/kubit-ui-web-react-charts.cjs.js +1 -1
- package/dist/kubit-ui-web-react-charts.es.js +1 -1
- package/dist/kubit-ui-web-react-charts.umd.js +1 -1
- package/dist/react-charts.css +1 -1
- package/dist/types/charts/barChart/barChart.type.d.ts +8 -0
- package/dist/types/charts/barChart/barChart.type.d.ts.map +1 -1
- package/dist/types/charts/barChart/fragments/barChartPath.d.ts.map +1 -1
- package/dist/types/charts/customBackgroundChart/context/customBackgroundChartContext.d.ts +3 -0
- package/dist/types/charts/customBackgroundChart/context/customBackgroundChartContext.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/context/index.d.ts +2 -0
- package/dist/types/charts/customBackgroundChart/context/index.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/customBackgroundChart.d.ts +6 -0
- package/dist/types/charts/customBackgroundChart/customBackgroundChart.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/customBackgroundChart.type.d.ts +50 -0
- package/dist/types/charts/customBackgroundChart/customBackgroundChart.type.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/customBackgroundChartStructure.d.ts +4 -0
- package/dist/types/charts/customBackgroundChart/customBackgroundChartStructure.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/fragments/customBackgroundChartPlot.d.ts +4 -0
- package/dist/types/charts/customBackgroundChart/fragments/customBackgroundChartPlot.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/fragments/index.d.ts +2 -0
- package/dist/types/charts/customBackgroundChart/fragments/index.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/index.d.ts +2 -0
- package/dist/types/charts/customBackgroundChart/index.d.ts.map +1 -0
- package/dist/types/charts/customBackgroundChart/utils/accessibility.d.ts +19 -0
- package/dist/types/charts/customBackgroundChart/utils/accessibility.d.ts.map +1 -0
- package/dist/types/charts/index.d.ts +1 -0
- package/dist/types/charts/index.d.ts.map +1 -1
- package/dist/types/components/bar/bar.d.ts.map +1 -1
- package/dist/types/components/bar/bar.type.d.ts +9 -0
- package/dist/types/components/bar/bar.type.d.ts.map +1 -1
- package/dist/types/components/path/path.d.ts.map +1 -1
- package/dist/types/components/path/path.types.d.ts +9 -0
- package/dist/types/components/path/path.types.d.ts.map +1 -1
- package/dist/types/components/plot/plot.d.ts.map +1 -1
- package/dist/types/types/errors.type.d.ts +2 -0
- package/dist/types/types/errors.type.d.ts.map +1 -1
- package/dist/types/types/focusConfig.type.d.ts +13 -7
- package/dist/types/types/focusConfig.type.d.ts.map +1 -1
- package/dist/types/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.d.ts +20 -0
- package/dist/types/utils/adaptLegacyFocusConfig/adaptLegacyFocusConfig.d.ts.map +1 -0
- package/dist/types/utils/adaptLegacyFocusConfig/index.d.ts +2 -0
- package/dist/types/utils/adaptLegacyFocusConfig/index.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KubitCharts={})}(this,function(e){"use strict";var t,r,a,n,i={exports:{}},o={},s={exports:{}},c={};function d(){return r||(r=1,s.exports=function(){if(t)return c;t=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),x=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function R(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}function A(){}function E(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}R.prototype.isReactComponent={},R.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},R.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},A.prototype=R.prototype;var _=E.prototype=new A;_.constructor=E,f(_,R.prototype),_.isPureReactComponent=!0;var T=Array.isArray,y=Object.prototype.hasOwnProperty,v={current:null},m={key:!0,ref:!0,__self:!0,__source:!0};function C(t,r,a){var n,i={},o=null,s=null;if(null!=r)for(n in void 0!==r.ref&&(s=r.ref),void 0!==r.key&&(o=""+r.key),r)y.call(r,n)&&!m.hasOwnProperty(n)&&(i[n]=r[n]);var c=arguments.length-2;if(1===c)i.children=a;else if(1<c){for(var d=Array(c),l=0;l<c;l++)d[l]=arguments[l+2];i.children=d}if(t&&t.defaultProps)for(n in c=t.defaultProps)void 0===i[n]&&(i[n]=c[n]);return{$$typeof:e,type:t,key:o,ref:s,props:i,_owner:v.current}}function S(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var I=/\/+/g;function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function $(t,a,n,i,o){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case e:case r:c=!0}}if(c)return o=o(c=t),t=""===i?"."+N(c,0):i,T(o)?(n="",null!=t&&(n=t.replace(I,"$&/")+"/"),$(o,a,n,"",function(e){return e})):null!=o&&(S(o)&&(o=function(t,r){return{$$typeof:e,type:t.type,key:r,ref:t.ref,props:t.props,_owner:t._owner}}(o,n+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(I,"$&/")+"/")+t)),a.push(o)),1;if(c=0,i=""===i?".":i+":",T(t))for(var d=0;d<t.length;d++){var l=i+N(s=t[d],d);c+=$(s,a,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=x&&e[x]||e["@@iterator"])?e:null}(t),"function"==typeof l)for(t=l.call(t),d=0;!(s=t.next()).done;)c+=$(s=s.value,a,n,l=i+N(s,d++),o);else if("object"===s)throw a=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(t).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");return c}function k(e,t,r){if(null==e)return e;var a=[],n=0;return $(e,a,"","",function(e){return t.call(r,e,n++)}),a}function b(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},O={transition:null},H={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:O,ReactCurrentOwner:v};function w(){throw Error("act(...) is not supported in production builds of React.")}return c.Children={map:k,forEach:function(e,t,r){k(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},c.Component=R,c.Fragment=a,c.Profiler=i,c.PureComponent=E,c.StrictMode=n,c.Suspense=l,c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,c.act=w,c.cloneElement=function(t,r,a){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=f({},t.props),i=t.key,o=t.ref,s=t._owner;if(null!=r){if(void 0!==r.ref&&(o=r.ref,s=v.current),void 0!==r.key&&(i=""+r.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(d in r)y.call(r,d)&&!m.hasOwnProperty(d)&&(n[d]=void 0===r[d]&&void 0!==c?c[d]:r[d])}var d=arguments.length-2;if(1===d)n.children=a;else if(1<d){c=Array(d);for(var l=0;l<d;l++)c[l]=arguments[l+2];n.children=c}return{$$typeof:e,type:t.type,key:i,ref:o,props:n,_owner:s}},c.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},c.createElement=C,c.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},c.createRef=function(){return{current:null}},c.forwardRef=function(e){return{$$typeof:d,render:e}},c.isValidElement=S,c.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:b}},c.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},c.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},c.unstable_act=w,c.useCallback=function(e,t){return L.current.useCallback(e,t)},c.useContext=function(e){return L.current.useContext(e)},c.useDebugValue=function(){},c.useDeferredValue=function(e){return L.current.useDeferredValue(e)},c.useEffect=function(e,t){return L.current.useEffect(e,t)},c.useId=function(){return L.current.useId()},c.useImperativeHandle=function(e,t,r){return L.current.useImperativeHandle(e,t,r)},c.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},c.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},c.useMemo=function(e,t){return L.current.useMemo(e,t)},c.useReducer=function(e,t,r){return L.current.useReducer(e,t,r)},c.useRef=function(e){return L.current.useRef(e)},c.useState=function(e){return L.current.useState(e)},c.useSyncExternalStore=function(e,t,r){return L.current.useSyncExternalStore(e,t,r)},c.useTransition=function(){return L.current.useTransition()},c.version="18.3.1",c}()),s.exports}var l=(n||(n=1,i.exports=function(){if(a)return o;a=1;var e=d(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,a){var o,c={},d=null,l=null;for(o in void 0!==a&&(d=""+a),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(l=r.ref),r)n.call(r,o)&&!s.hasOwnProperty(o)&&(c[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===c[o]&&(c[o]=r[o]);return{$$typeof:t,type:e,key:d,ref:l,props:c,_owner:i.current}}return o.Fragment=r,o.jsx=c,o.jsxs=c,o}()),i.exports),u=d();const h=u.forwardRef(({ariaHidden:e,ariaLabel:t,backgroundColor:r,caption:a,children:n,className:i,dataTestId:o,height:s,imageSrc:c,overflow:d,radius:u="0px",role:h,tabIndex:x,viewBox:p,width:f,...g},R)=>l.jsxs("svg",{ref:R,"aria-hidden":e,"aria-label":t,className:i,"data-testid":o,height:s,role:h,style:{backgroundColor:r,borderRadius:u,overflow:d},tabIndex:x,viewBox:p,width:f,onMouseDown:e=>e.preventDefault(),...g,children:[a&&l.jsx("title",{children:a}),c&&l.jsx("image",{height:s,href:c,width:f,x:"0",y:"0"}),n]})),x={},p=e=>{const[t]=u.useState(()=>(e=>(x[e]||(x[e]=0),x[e]++))(e||"$component$"));return`${e}${t}`},f=()=>"undefined"!=typeof window&&"undefined"!=typeof document,g=()=>f()?document:void 0,R=e=>{const t=g();if(t)return t.createElementNS("http://www.w3.org/2000/svg",e)},A="%",E="rem",_={[A]:A,[E]:E},T="WIDTH",y=/^(\d+(\.\d+)?)(px|rem|%)?$/,v=e=>{if("number"==typeof e)return{unit:void 0,value:e};const t=e.match(y);if(!t)throw new Error(`Invalid string format: "${e}"`);const r=parseFloat(t[1]),a=t[3];return{unit:_[a],value:r}},m=(e,t,r)=>{const a=r.parentElement;return a?e/100*(t===T?a.clientWidth:a.clientHeight):0},C=e=>{const t=g();if(!t)return 16*e;const r=(e=>{const t=f()?window:void 0;if(t)return t.getComputedStyle(e)})(t.documentElement);return r?e*(parseFloat(r.fontSize)||16):16*e},S=/^(\d+(\.\d+)?)(px|rem|%)?$/,I=e=>{if("number"==typeof e)return e;const t=e.match(S);if(!t)throw new Error(`Invalid string format: "${e}"`);const r=t[1];return t[3]===E?16*parseFloat(r):parseFloat(r)},N=({canvasConfig:e,dataTestId:t,extraSpace:r=0,height:a,width:n})=>{const[i,o]=u.useState({height:0,width:0}),s=u.useMemo(()=>e||{extraSpace:r,height:a,width:n},[e,n,a,r]),{extraSpace:c,height:d,width:l}=s,h=c?I(c):void 0;u.useEffect(()=>{if(!f())return;const e=(e=>{const t=g();return t?t.querySelector(e):null})(`[data-testid="${t}"]`);if(!e)return;const r=()=>{const{parsedCanvasHeight:t,parsedCanvasWidth:r}=(({canvasHeight:e,canvasWidth:t,svgElement:r})=>{const{unit:a,value:n}=v(t),i=a===A?m(n,T,r):a===E?C(n):n,{unit:o,value:s}=v(e);return{parsedCanvasHeight:o===A?m(s,"HEIGHT",r):o===E?C(s):s,parsedCanvasWidth:i}})({canvasHeight:d,canvasWidth:l,svgElement:e});o({height:t,width:r})};r();const a=new ResizeObserver(()=>{r()});return a.observe(e),()=>{a.disconnect()}},[l,d,t]);const x=u.useMemo(()=>{const e=((e,t,r=0)=>`${-r} ${-r} ${e} ${t}`)(i.width,i.height,h);return e},[i.width,i.height,h]);return{parsedCanvas:i,parsedCanvasExtraSpace:h,viewBox:x}},$={extraSpace:0,height:80,width:100},k=e=>{const t=new Map,r=()=>{const e={};return t.forEach((t,r)=>{e[r]=t}),e};return{addError:(a,n)=>{if(!n)return;const i={...n,type:a},o=t.get(a)||[];if(o.push(i),t.set(a,o),e){const t=r(),a={};Object.entries(t).forEach(([e,t])=>{const r=e;Array.isArray(t)&&t.length,a[r]=t}),e(a)}},clearErrors:()=>{t.clear(),e&&e({})},getAccumulatedErrors:r}},b=e=>JSON.stringify(e),L=u.createContext({}),O={HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL"},H={BAR_CHART_CONTEXT_ERROR:"BAR_CHART_CONTEXT_ERROR",BAR_CHART_PATH_ERROR:"BAR_CHART_PATH_ERROR",BAR_CHART_SEPARATOR_ERROR:"BAR_CHART_SEPARATOR_ERROR",BAR_CHART_X_AXIS_ERROR:"BAR_CHART_X_AXIS_ERROR",BAR_CHART_Y_AXIS_ERROR:"BAR_CHART_Y_AXIS_ERROR",GENERIC:"GENERIC",LINE_CHART_CONTEXT_ERROR:"LINE_CHART_CONTEXT_ERROR",LINE_CHART_PATH_ERROR:"LINE_CHART_PATH_ERROR",LINE_CHART_PROJECTION_ERROR:"LINE_CHART_PROJECTION_ERROR",LINE_CHART_SEPARATOR_ERROR:"LINE_CHART_SEPARATOR_ERROR",LINE_CHART_X_AXIS_ERROR:"LINE_CHART_X_AXIS_ERROR",LINE_CHART_Y_AXIS_ERROR:"LINE_CHART_Y_AXIS_ERROR",PIE_CHART_CONTEXT_ERROR:"PIE_CHART_CONTEXT_ERROR",PIE_CHART_PATH_ERROR:"PIE_CHART_PATH_ERROR",PIE_CHART_SEGMENT_ERROR:"PIE_CHART_SEGMENT_ERROR"},w={BOTTOM:"BOTTOM",CENTER:"CENTER",CUSTOM:"CUSTOM",LEFT:"LEFT",RIGHT:"RIGHT",TOP:"TOP"},P=Object.entries({BAR_CHART_AXIS_INSUFFICIENT_TICKS:"Axis requires at least two ticks for proper bar scaling",BAR_CHART_AXIS_INVALID_SCALE:"Invalid axis scale for current bar values",BAR_CHART_DISTRIBUTION_INSUFFICIENT_SPACE:"Insufficient space for bar distribution with current configuration",BAR_CHART_DISTRIBUTION_INVALID_GAP:"Invalid gap between bars - must be >= 0 and allow bar rendering",BAR_CHART_DISTRIBUTION_OVERLAP:"Bar distribution results in overlapping bars",BAR_CHART_EMPTY_DATA:"No valid data entries found for bar chart rendering",BAR_CHART_INSUFFICIENT_SPACE_HEIGHT:"Insufficient height to render bars. Consider reducing bar count or increasing chart height",BAR_CHART_INSUFFICIENT_SPACE_WIDTH:"Insufficient width to render bars. Consider reducing bar width or increasing chart width",BAR_CHART_INVALID_VALUE:"Bar value must be a valid number for rendering",BAR_CHART_NEGATIVE_VALUE:"Negative values are not supported in this bar configuration",BAR_CHART_NO_DATA:"Data validation failed: no data provided for bar chart rendering",BAR_CHART_OVERLAP:"Bars are overlapping due to insufficient spacing",BAR_CHART_SEPARATOR_X_OUT_OF_RANGE:"Separator X position is outside valid bar range",BAR_CHART_SEPARATOR_Y_OUT_OF_RANGE:"Separator Y position is outside valid bar range",BAR_CHART_STACK_INVALID:"Invalid stacking configuration - all bars in stack must have consistent configuration",BAR_CHART_STACK_MISSING_VALUES:"Stack is incomplete - all bars in stack must have valid values"}).reduce((e,[t,r])=>(e[t]=new Error(r),e),{}),M=Object.entries({LINE_CHART_INVALID_CANVAS:"Canvas dimensions validation failed: both width and height must be > 0",LINE_CHART_NO_DATA:"Data validation failed: no data provided for chart rendering",LINE_CHART_PATH_ALL_VALUES_NULL:"Path data cannot be generated - all Y values are null or undefined",LINE_CHART_PATH_INSUFFICIENT_POINTS:"Unable to calculate curved path with insufficient points (minimum 2 required)",LINE_CHART_PATH_INVALID_DATAKEY:"DataKey must be a valid string",LINE_CHART_PROJECTION_INVALID_BOUNDS:"Invalid projection bounds - upper projection must be below lower projection",LINE_CHART_PROJECTION_LOWER_X_OUT_OF_RANGE:"Lower projection X coordinate is outside valid range (0-100)",LINE_CHART_PROJECTION_LOWER_Y_OUT_OF_RANGE:"Lower projection Y coordinate is outside chart area",LINE_CHART_PROJECTION_UPPER_X_OUT_OF_RANGE:"Upper projection X coordinate is outside valid range (0-100)",LINE_CHART_PROJECTION_UPPER_Y_OUT_OF_RANGE:"Upper projection Y coordinate is outside chart area",LINE_CHART_SEPARATOR_INVALID_COORDINATES:"Invalid separator position - coordinates overlap, cannot render separator",LINE_CHART_SEPARATOR_INVALID_X_BREAK_AXIS:"Invalid xBreakAxis value: cannot be parsed as number",LINE_CHART_SEPARATOR_INVALID_Y_BREAK_AXIS:"Invalid yBreakAxis value: cannot be parsed as number",LINE_CHART_SEPARATOR_X_OUT_OF_RANGE:"xBreakAxis value is outside data range",LINE_CHART_SEPARATOR_Y_OUT_OF_RANGE:"yBreakAxis value is outside data range",LINE_CHART_SINGLE_POINT:"Data validation failed: single data point provided, minimum 2 required for line chart",LINE_CHART_X_AXIS_IDENTICAL_VALUES:"X-axis range validation failed: minimum and maximum values are identical, cannot render chart line",LINE_CHART_X_AXIS_INSUFFICIENT_TICKS:"X-axis tick calculation: insufficient data points (1/2 minimum required)",LINE_CHART_X_AXIS_ZERO_LENGTH:"X-axis geometry validation failed: start and end X coordinates are identical (x1=x2), axis has zero length",LINE_CHART_Y_AXIS_IDENTICAL_VALUES:"Y-axis range validation failed: minimum and maximum values are identical, cannot render chart line",LINE_CHART_Y_AXIS_INSUFFICIENT_TICKS:"Y-axis tick calculation: insufficient data points (1/2 minimum required)",LINE_CHART_Y_AXIS_ZERO_LENGTH:"Y-axis geometry validation failed: start and end Y coordinates are identical (y1=y2), axis has zero length"}).reduce((e,[t,r])=>(e[t]=new Error(r),e),{}),B=Object.entries({PIE_CHART_EMPTY_DATA:"PieChart data is empty or undefined",PIE_CHART_INNER_RADIUS_OUT_OF_RANGE:"Inner radius must be less than radius",PIE_CHART_INVALID_CANVAS_DIMENSIONS:"Invalid canvas dimensions for PieChart",PIE_CHART_INVALID_DATA_KEY:"Invalid or missing dataKey in PieChart data",PIE_CHART_INVALID_INNER_RADIUS:"Invalid innerRadius value",PIE_CHART_INVALID_RADIUS:"Invalid radius value",PIE_CHART_INVALID_SEGMENT_VALUE:"Invalid segment value (non-numeric)",PIE_CHART_INVALID_TOTAL:"PieChart total value is zero or invalid",PIE_CHART_MISSING_SEGMENT_NAME:"Segment is missing required name property",PIE_CHART_NEGATIVE_SEGMENT_VALUE:"Segment value cannot be negative"}).reduce((e,[t,r])=>(e[t]=new Error(r),e),{}),D=(e,t)=>new Error(`Invalid value "${e}" for bar with dataKey "${t}". Must be a valid number.`),j=(e,t)=>new Error(`Negative value ${e} not allowed for bar with dataKey "${t}" in current configuration`),F=(e,t)=>new Error(`Invalid segment value for "${t}": "${e}" is not a valid number`),V=(e,t)=>new Error(`Negative segment value for "${t}": ${e} (values must be >= 0)`),X=e=>new Error(`DataKey "${e}" not found in PieChart dataset`),W=e=>new Error(`Data array for key "${e}" is empty`),K=(e,t)=>new Error(`Invalid total value for "${e}": ${t} (must be > 0)`),Y=(e,t,r)=>new Error(`Invalid group at index ${t} in "${e}": missing required property "${r}"`),U=e=>new Error(`Invalid radius value: "${e}" (must be a positive number)`),G=e=>new Error(`Invalid innerRadius value: "${e}" (must be a positive number or zero)`),z=(e,t)=>new Error(`innerRadius (${e}) must be less than radius (${t}) for donut chart rendering`),Z="INVALID_X_TICK",q="BAR_CHART_NO_DATA",J="LINE_CHART_NO_DATA",Q="LINE_CHART_PATH_ALL_VALUES_NULL",ee="LINE_CHART_PATH_INSUFFICIENT_POINTS",te="LINE_CHART_PATH_INVALID_DATAKEY",re="LINE_CHART_SEPARATOR_INVALID_COORDINATES",ae="LINE_CHART_SINGLE_POINT",ne="LINE_CHART_X_AXIS_IDENTICAL_VALUES",ie="LINE_CHART_X_AXIS_INSUFFICIENT_TICKS",oe="LINE_CHART_X_AXIS_ZERO_LENGTH",se="LINE_CHART_Y_AXIS_IDENTICAL_VALUES",ce="LINE_CHART_Y_AXIS_INSUFFICIENT_TICKS",de="LINE_CHART_Y_AXIS_ZERO_LENGTH",le={...P,...M,...B,INVALID_X_TICK:new Error("[getXTicks] Invalid X tick values calculated")},ue=e=>le[e],he=e=>new Error(`DataKey "${e}" not found in dataset`),xe=(e,t)=>new Error(`Canvas dimensions validation failed: width=${e}, height=${t} (both must be > 0)`),pe=e=>new Error(`Invalid xBreakAxis value: '${e}' cannot be parsed as number`),fe=e=>new Error(`Invalid yBreakAxis value: '${e}' cannot be parsed as number`),ge=(e,t,r)=>new Error(`xBreakAxis value ${e} is outside data range (${t} - ${r})`),Re=(e,t,r)=>new Error(`yBreakAxis value ${e} is outside data range (${t} - ${r})`),Ae=(e,t,r)=>t.map(t=>{if(isNaN(Number(t))){const r=e.find(e=>String(e.value)===String(t));return r?r.position:0}const{index:a,tick:n}=e.reduce((e,r,a)=>Math.abs(Number(r.value)-Number(t))<=Math.abs(Number(e.tick.value)-Number(t))?{index:a,tick:r}:e,{index:0,tick:e[0]}),i=Number(t),o=Number(n.value);if(i!==o){const t=e.map(e=>Number(e.value)),s=Math.min(...t),c=Math.max(...t);if(i<s)return e.at(0)?.position;if(i>c)return e.at(-1)?.position;const d=Math.abs(o-i),l=i>o,u=l?e[a+1]:e[a-1],h=100*d/Math.abs(Number(u.value)-o),x=Math.abs(n.position-u.position)*h/100;return r?l?n.position+x:n.position-x:l?n.position-x:n.position+x}return n.position}),Ee="0",_e="1",Te="fallbackData";(()=>{if("undefined"!=typeof globalThis&&"process"in globalThis){const e=globalThis.process;return"production"===e?.env?.NODE_ENV}})();const ye=e=>e?Object.entries(e).reduce((e,[t,r])=>((t.startsWith("aria-")||t.startsWith("data-")||"role"===t)&&null!=r&&(e[t]=String(r)),e),{}):{},ve=({height:e="140%",width:t="140%",x:r="-20%",y:a="-20%",...n})=>l.jsx("defs",{children:l.jsx("filter",{height:e,id:n.id,width:t,x:r,y:a,children:l.jsx("feDropShadow",{...n.shadowSvgConfig})})}),me=-1/0,Ce=u.forwardRef(({dataTestId:e,position:t,size:r=1,...a},n)=>l.jsx("circle",{...a,ref:n,cx:t?.x,cy:t?.y,"data-testid":`${e}-circle`,r:r/2})),Se=(e,t,r,a,n)=>{let i="";const o=a===n,s=o?r:2*r;for(let r=0;r<s;r++){const c=o||r%2==0?a:n,d=2*Math.PI/s*r-Math.PI/2;i+=`${e+Math.cos(d)*c},${t+Math.sin(d)*c} `}return i.trim()},Ie=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=Se(t.x,t.y,6,r/2,r/2);return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-hexagon`,points:i})}),Ne=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=Se(t.x,t.y,5,r/2,r/2);return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-pentagon`,points:i})}),$e=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>l.jsx("rect",{...a,ref:n,"data-testid":`${e}-square`,height:r,width:r,x:t.x-r/2,y:t.y-r/2})),ke=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=r/2,o=i/2,s=Se(t.x,t.y,5,i,o);return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-star`,points:s})}),be=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=`M ${t.x-r/2} ${t.y} H ${t.x+r/2} M ${t.x} ${t.y-r/2} V ${t.y+r/2}`;return l.jsx("path",{...a,ref:n,d:i,"data-testid":`${e}-straight`,strokeWidth:2})}),Le=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=[`${t.x},${t.y-r/2}`,`${t.x-r/2},${t.y+r/2}`,`${t.x+r/2},${t.y+r/2}`].join(" ");return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-triangle`,points:i})}),Oe={Circle:"circle",Hexagon:"hexagon",Pentagon:"pentagon",Square:"square",Star:"star",Straight:"straight",Triangle:"triangle"},He={[Oe.Circle]:Ce,[Oe.Hexagon]:Ie,[Oe.Pentagon]:Ne,[Oe.Square]:$e,[Oe.Star]:ke,[Oe.Straight]:be,[Oe.Triangle]:Le},we=u.forwardRef(({dataTestId:e="node",haloConfig:t,hasHalo:r=!1,onBlur:a,onClick:n,onDoubleClick:i,onFocus:o,onKeyDown:s,onMouseEnter:c,onMouseLeave:d,position:h={x:0,y:0},size:x=1,type:p=Oe.Circle,...f},g)=>{const[R,A]=(e=>{const t=u.useRef(!1),r=u.useRef(null);u.useImperativeHandle(e,()=>r.current,[]);const a=e=>{t.current=!!e.autoClick};return u.useEffect(()=>{if(!r.current)return;const e=r.current;return e.addEventListener("click",a),()=>e.removeEventListener("click",a)},[]),[r,t]})(g),E={...f,className:`node ${f.className}`,onBlur:e=>{a?.(e)},onClick:e=>{n?.(e,{...f.data,nodePosition:h},A.current)},onDoubleClick:e=>{i?.(e,f.data)},onFocus:e=>{o?.(e,f.data)},onKeyDown:e=>{"Enter"===e.key&&s?.(e,f.data)},onMouseEnter:e=>{c?.(e,f.data)},onMouseLeave:e=>{d?.(e)}},_={className:f.className,fill:t?.fill||f.fill,fillOpacity:t?.fillOpacity||.25,opacity:t?.opacity||.3,stroke:t?.stroke||f.stroke,strokeWidth:t?.strokeWidth||f.strokeWidth},T=He[p];return l.jsxs(l.Fragment,{children:[r&&l.jsx(T,{..._,"aria-hidden":"true",dataTestId:`${e}-halo`,position:h,size:x+x/2}),l.jsx(T,{...E,ref:R,dataTestId:e,position:h,size:x})]})}),Pe=u.forwardRef(({data:e,nodeConfig:t,tabIndex:r=0,x:a,y:n},i)=>{const o=t?ye(t):{};if(o["aria-label"]&&e&&"string"==typeof o["aria-label"]){const t=o["aria-label"];if(t.includes("{{")){const r=((e,t,r)=>{if(!e)return;const a=r??t.dataValue,n=Array.isArray(a)?a[t.index]:void 0,{xValue:i,yValue:o}=((e,t)=>({xValue:e&&t.xKey?e[t.xKey]?.toString()??"":"",yValue:e&&t.dataKey?e[t.dataKey]?.toString()??"":""}))(n,t);return((e,t,r,a)=>{let n=e;return void 0!==t.dataKey&&(n=n.replace(new RegExp("{{dataKey}}","g"),t.dataKey)),n=n.replace(new RegExp("{{xValue}}","g"),r),n=n.replace(new RegExp("{{yValue}}","g"),a),void 0!==t.index&&(n=n.replace(new RegExp("{{index}}","g"),(t.index+1).toString())),n})(e,t,i,o)})(t,{dataKey:e.dataKey,dataValue:e.dataValue,index:e.index??0,xKey:e.xKey},e.dataValue);r&&(o["aria-label"]=r)}}return l.jsx(l.Fragment,{children:t&&l.jsx(we,{...t,ref:i,...o,className:"node-path-focus-border",data:e,hasHalo:t.hasHalo,position:{x:a,y:n},tabIndex:r})})}),Me=u.forwardRef(({classNames:e="",fill:t="transparent",stroke:r="#0000FF",strokeWidth:a="1",focusConfig:n={stroke:"#0000FF",strokeWidth:"0.5"},hoverConfig:i={stroke:"#0000FF",strokeWidth:"0.5"},role:o="img",...s},c)=>{const{handleBlur:d,handleFocus:h,isFocused:x}=((e,t)=>{const[r,a]=u.useState(!1),n=u.useCallback(t=>{a(!0),e?.(t)},[e]);return{handleBlur:u.useCallback(e=>{a(!1),t?.(e)},[t]),handleFocus:n,isFocused:r}})(s.onFocus,s.onBlur),{handleMouseEnter:p,handleMouseLeave:f,isHovered:g}=((e,t)=>{const[r,a]=u.useState(!1);return{handleMouseEnter:u.useCallback(t=>{a(!0),e?.(t)},[e]),handleMouseLeave:u.useCallback(e=>{a(!1),t?.(e)},[t]),isHovered:r}})(s.onMouseEnter,s.onMouseLeave),R=u.useRef(null),A=u.useRef([]),E=u.useRef(null);u.useImperativeHandle(c,()=>({get main(){return E.current},get node(){return A.current},get path(){return R.current}}));const _=s.gradient&&((e,t="gradientePath")=>{const r=e.split(",").map(e=>e.trim()),a=parseInt(r[0],10),n=r.slice(1).map(e=>{const[t,r]=e.split(" ");return{color:t,offset:r}});let i="0%",o="0%",s="0%";switch(a){case 180:s="100%";break;case 90:o="100%";break;case 270:i="100%";break;default:return l.jsx(l.Fragment,{})}return l.jsx("defs",{children:l.jsx("linearGradient",{id:t,x1:i,x2:o,y1:"0%",y2:s,children:n.map((e,t)=>l.jsx("stop",{offset:e.offset,stopColor:e.color},`${t}-${e.offset}`.toString()))})})})(s.gradient),T=ye(s),y={...{...s,classNames:`path ${e}`,fill:_?"url(#gradientePath)":t,filter:"url(#shadow)",role:o,stroke:r,strokeWidth:a},...x&&n,...g&&i};return l.jsxs("g",{ref:E,children:[_&&_,y.shadowSvgConfig&&l.jsx(ve,{id:"shadow",shadowSvgConfig:y.shadowSvgConfig}),l.jsxs("g",{"aria-label":y.ariaLabel,className:y.classNames,"data-draw":!0,filter:y.shadowSvgConfig&&y.filter,opacity:y.opacity,orientation:y.orientation,role:y.role,rotate:y.rotate,tabIndex:y.tabIndex,transform:y.transform,visibility:y.visibility,...T,onBlur:d,onClick:()=>{s.onClick?.(s.dataValue)},onDoubleClick:e=>{s.onDoubleClick?.(e,s.dataValue)},onFocus:h,onKeyDown:e=>{"Enter"===e.key&&s.onKeyDown?.(s.dataValue)},onMouseDown:e=>{e.preventDefault()},onMouseEnter:p,onMouseLeave:f,children:[l.jsx("path",{ref:R,d:y.d,"data-testid":y.dataTestId,fill:y.dFill?"transparent":y.fill,fillOpacity:y.fillOpacity,fillRule:y.fillRule,stroke:y.stroke,strokeDasharray:y.strokeDasharray,strokeDashoffset:y.strokeDashoffset,strokeLinecap:y.strokeLinecap,strokeLinejoin:y.strokeLinejoin,strokeMiterlimit:y.strokeMiterlimit,strokeOpacity:y.strokeOpacity,strokeWidth:y.strokeWidth,children:y.title&&l.jsx("title",{children:y.title})}),y.dFill&&l.jsx("path",{d:y.dFill,fill:y.fill,fillOpacity:y.fillOpacity,fillRule:y.fillRule})]}),y.points&&y.nodeConfig&&y.points.map(([e,t],r)=>{const a={dataKey:y.dataKey,dataValue:y.dataValue,index:r,xKey:y?.xKey};return l.jsx(Pe,{ref:e=>A.current[r]=e,data:a,nodeConfig:y.nodeConfig,tabIndex:-1,x:e,y:t},`${r.toString()}`)})]})}),Be=({ariaLabel:e,dataKey:t,xKey:r,yKey:a,xData:n,yData:i,coverage:o,index:s})=>{if(!e)return;const c=new RegExp("{{dataKey}}","g"),d=new RegExp("{{xKey}}","g"),l=new RegExp("{{yKey}}","g"),u=new RegExp("{{xData}}","g"),h=new RegExp("{{yData}}","g"),x=new RegExp("{{coverage}}","g"),p=new RegExp("{{index}}","g");return e.replace(c,t??"").replace(d,r??"").replace(l,a??"").replace(u,String(n??"")).replace(h,String(i??"")).replace(x,String(o)).replace(p,String(s))},De=(e,t,r)=>e?t+r/2:t-r/2,je=({barConfig:e,currentBars:t,endRounded:r,extraSpacing:a=0,order:n=1,orientation:i,startRounded:o,x1:s,x2:c,y1:d,y2:u,dataKey:h,xKey:x,yKey:p,xData:f,yData:g})=>{const{barWidth:R,singleConfig:A}=e,E=(({barConfig:e,orientation:t,x1:r,x2:a,y1:n,y2:i})=>{const{gap:o=0,singleConfig:s}=e,c=t===O.HORIZONTAL,d=c?r:n,l=c?a:i,u={end:l<d,start:l>d};return s.reduce((e,t,r)=>{const{coverage:a}=t,n=((e,t)=>e/100*t)(a,l-d),i=0===r?d:De(u.start,e[r-1][1],o),c=r+1===s.length?l:De(u.end,i+n,o);return e.push([i,c]),e},[])})({barConfig:e,orientation:i,x1:s,x2:c,y1:d,y2:u});return l.jsx("g",{children:A.map(({color:e,"aria-label":_,...T},y)=>{const[v,m]="HORIZONTAL"===i?E[y]:[s,c],[C,S]="VERTICAL"===i?E[y]:[d,u],I=(({barWidth:e,currentBars:t,endRounded:r=0,extraSpacing:a,order:n,orientation:i,startRounded:o=0,x1:s,x2:c,y1:d,y2:l})=>{let u,h,x,p,f="Z";const g=(({barWidth:e,currentBars:t,extraSpacing:r,order:a,orientation:n})=>{const i=e/2,o=r/2,s=t%2==0,c=s?o:o+i,d=a-Math.ceil(t/2);let l=0;return 0===d?l=s?-o:i:d<0?l=n===O.HORIZONTAL?d*-c+e:d*c:d>0&&(l=n===O.HORIZONTAL?d*-c:d*c+e),l})({barWidth:e,currentBars:t,extraSpacing:a,order:n,orientation:i});if(i===O.HORIZONTAL){const t=s+o,a=c-r;o&&r?(u=`M ${t},${d+g}`,h=`L${a},${l+g}`,x=`Q${c+r} ${l+g-e/2}, ${a} ${l+g-e}`,p=`L${t},${d+g-e}`,f=`Q${s-o} ${d+g-e/2}, ${t} ${d+g}`):o?(u=`M ${t},${d+g}`,h=`L${c},${l+g}`,x=`L${c},${l+g-e}`,p=`L${t},${d+g-e}`,f=`Q${s-o} ${d+g-e/2}, ${t} ${d+g}`):r?(u=`M${s},${d+g}`,h=`L${a},${l+g}`,x=`Q${c+r} ${l+g-e/2}, ${a} ${l+g-e}`,p=`L${s},${d+g-e}`):(u=`M${s},${d+g}`,h=`L${c},${l+g}`,x=`L${c},${l+g-e}`,p=`L${s},${d+g-e}`)}else{const t=d-o,a=l+r;o&&r?(u=`M${s+g}, ${t}`,h=`L${c+g},${a}`,x=`Q${c+g-e/2} ${l-r}, ${c+g-e} ${a}`,p=`L${s+g-e},${t}`,f=`Q${s+g-e/2} ${d+o}, ${s+g} ${t}`):o?(u=`M${s+g}, ${t}`,h=`L${c+g},${l}`,x=`L${c+g-e},${l}`,p=`L${s+g-e},${t}`,f=`Q${s+g-e/2} ${d+o}, ${s+g} ${t}`):r?(u=`M${s+g},${d}`,h=`L${c+g},${a}`,x=`Q${c+g-e/2} ${l-r}, ${c+g-e} ${a}`,p=`L${c+g-e},${d}`):(u=`M${s+g},${d}`,h=`L${c+g},${l}`,x=`L${c+g-e},${l}`,p=`L${s+g-e},${d}`)}return`${u} ${h} ${x} ${p} ${f}`})({barWidth:R,currentBars:t,endRounded:y===A.length-1&&r?r:void 0,extraSpacing:a,order:n,orientation:i,startRounded:0===y&&o?o:void 0,x1:v,x2:m,y1:C,y2:S});return l.jsx(Me,{"aria-label":Be({ariaLabel:_,dataKey:h,xKey:x,yKey:p,xData:f,yData:g,coverage:T.coverage,index:y}),d:I,fill:e,hoverConfig:{stroke:"transparent",strokeWidth:"0"},stroke:"transparent",...T},`${y.toString()}`)})})},Fe=({barConfig:e,dataIdx:t,dataKey:r,order:a,...n})=>{const{addError:i,xAxisCoordinates:o,yAxisCoordinates:s,...c}=u.useContext(L),{coordinates:d,tickValues:h}=o,{coordinates:x,tickValues:p}=s,f=c.orientation===O.VERTICAL,g=f?c.pKey:r,R=f?r:c.pKey,A=c.data[t],E=A?.[g],_=A?.[R],T=c.data[0],y=!!T&&Object.prototype.hasOwnProperty.call(T,r),v=c.data.length>0,m=Number(_);u.useEffect(()=>{!v||y?isNaN(m)?i?.("BAR_CHART_PATH_ERROR",{error:D(_,r)}):m<0&&i?.("BAR_CHART_PATH_ERROR",{error:j(m,r)}):i?.("BAR_CHART_PATH_ERROR",{error:he(r)})},[r,v,y,m,_]);const C=Ae(h,[String(E)],!0)[0],S=Ae(p,[String(_)])[0],I=f?{x1:C,x2:C,y1:d.y1,y2:S}:{x1:x.x1,x2:C,y1:S,y2:S};return l.jsx(je,{barConfig:e,currentBars:c.barChildrenCount,dataKey:r,extraSpacing:c.gapBetweenBars,order:a,orientation:c.orientation,xData:E,xKey:g,yData:_,yKey:R,...I,...n})},Ve=e=>{let t=0;return u.Children.toArray(e).forEach(e=>{u.isValidElement(e)&&e.type===Fe&&e.props.order>t&&(t=e.props.order)}),t},Xe=e=>{if(0===e.length)return{numeric:{max:2,min:0,step:1}};const t=Math.min(...e.map(e=>parseFloat(e))),r=Math.max(...e.map(e=>parseFloat(e)));return{numeric:{max:r,min:t,step:Math.abs(r-t)/2}}},We=({bound:e,data:t,fontSize:r,svgHeight:a,svgWidth:n,viewBox:i})=>{if(!f()||!t.length)return 0;const o=g();if(!o)return 0;const s=R("svg");if(!s)return 0;s.setAttribute("style","position: absolute; visibility: hidden; top: -9999px; left: -9999px;"),s.setAttribute("viewBox",i),s.setAttribute("width",n),s.setAttribute("height",a),o.body.appendChild(s);const c=t.map(t=>{const a=R("text");if(!a)return 0;a.setAttribute("font-size",r),a.textContent=t,s.appendChild(a);const n=a.getBBox()[e];return a.remove(),n});return s.remove(),Math.max(...c,0)},Ke=({ariaLabel:e,className:t="line",dataTestId:r,...a})=>l.jsx("line",{...a,"aria-label":e,className:t,"data-testid":r}),Ye=({children:e,className:t="circle",...r})=>l.jsx("text",{className:t,...r,children:e}),Ue=({showTickLines:e,tick:t,tickLine:r,tickText:a})=>l.jsxs("g",{children:[e&&l.jsx(Ke,{...r}),a&&l.jsx(Ye,{...a,children:t.value})]}),Ge=(e,t,r=1)=>e>=t-r&&e<=t+r,ze=e=>{const{ariaLabel:t,className:r,dataTestId:a,opacity:n,stroke:i,strokeDasharray:o,strokeDashoffset:s,strokeLinecap:c,strokeLinejoin:d,strokeOpacity:l,strokeWidth:u,style:h,tabIndex:x,transform:p,x1:f,x2:g,y1:R,y2:A}=e;return{ariaLabel:t,className:r,dataTestId:a,opacity:n,stroke:i,strokeDasharray:o,strokeDashoffset:s,strokeLinecap:c,strokeLinejoin:d,strokeOpacity:l,strokeWidth:u,style:h,tabIndex:x,transform:p,x1:f,x2:g,y1:R,y2:A}},Ze=({canvasHeight:e=$.height,canvasWidth:t=$.width,cursor:r=0,extraSpace:a={bottom:0,left:0,right:0,top:0},position:n=w.BOTTOM,showTickLines:i=!1,tickLine:o,tickLineHover:s,tickText:c,tickValues:d=[],...u})=>{const h=ye(u);return l.jsxs("g",{...h,children:[l.jsx(Ke,{...ze(u)}),d&&d.length>0&&d.map((e,t)=>{const a=Ge(r,e.position)&&s?{...o,...s}:o,n="rotate"===c?.transform?`rotate(-30, ${e.position}, ${c.y})`:void 0;return l.jsx(Ue,{showTickLines:i,tick:e,tickLine:{...a,x1:e.position,x2:e.position},tickText:{...c,transform:n,x:e.position}},`${t.toString()}`)})]})},qe=(e,t,r)=>e===w.RIGHT?t+r:t-r,Je=(e,t,r,a)=>e===w.TOP?r:t+r+a,Qe=({position:e=w.BOTTOM,tickLine:t,tickText:r,...a})=>{const{xAxisCoordinates:{coordinates:n,tickValues:i},...o}=u.useContext(L),s=Je(e,n.y1,Number(r?.fontSize),r?.top??0),c=o.extraSpaceTopY,d=Number(o.canvasHeight)-o.extraSpaceBottomY;return l.jsx(Ze,{...n,...a,canvasHeight:Number(o.canvasHeight),canvasWidth:Number(o.canvasWidth),dataTestId:`${o.dataTestId}xAxis`,extraSpace:{left:o.extraSpaceLeftX,right:o.extraSpaceRightX},tickLine:{...t,y1:c,y2:d},tickText:{...r,y:s},tickValues:r?i:void 0})},et=({canvasWidth:e,cursor:t=0,extraSpace:r={bottom:0,left:0,right:0,top:0},position:a=w.LEFT,showTickLines:n=!0,tickLine:i,tickLineHover:o,tickText:s,tickValues:c=[],...d})=>{const u=ye(d);return l.jsxs("g",{...u,children:[l.jsx(Ke,{...ze(d)}),c&&c.length>0&&c.map((e,r)=>{const a=Ge(t,e.position)&&o?{...i,...o}:i,c="rotate"===s?.transform?`rotate(-30, ${s.x}, ${e.position})`:void 0;return l.jsx(Ue,{showTickLines:n,tick:e,tickLine:{...a,y1:e.position,y2:e.position},tickText:{...s,transform:c,y:e.position}},`${r.toString()}`)})]})},tt=(e,t,r)=>{let a=0;switch(e){case"middle":a=t/2+r;break;case"end":a=t+r;break;default:a=0}return a},rt=({position:e=w.LEFT,tickLine:t,tickText:r,...a})=>{const{yAxisCoordinates:{coordinates:n,tickValues:i},...o}=u.useContext(L),s=r?.textAnchor||"middle",c=(e===w.RIGHT?r?.right:r?.left)??0,d=tt(s,o.yAxisText,c),h=qe(e,n.x1,d);return l.jsx(et,{...n,...a,canvasHeight:Number(o.canvasHeight),canvasWidth:Number(o.canvasWidth),dataTestId:`${o.dataTestId}yAxis`,tickLine:{...t,x1:o.extraSpaceLeftX,x2:Number(o.canvasWidth)-o.extraSpaceRightX},tickText:{...r,x:h},tickValues:r?i:void 0})},at=e=>{if(e.custom)return e.custom?.values;if(e.numeric){const{max:t,min:r=0,step:a}=e.numeric;if(a>=Math.abs(t-r)||a<=0)return[r.toString()];const n=[];for(let e=r;e<=t;e+=a)n.push(e.toString());return n}},nt=(e,t)=>e.flatMap(e=>Object.keys(e).filter(r=>r!==t&&"number"==typeof e[r]).map(t=>Number(e[t]))),it=(e,t,r,a,n,i,o,s)=>{const{position:c,tickText:d,tickValues:l}=e.props,u=d?.fontSize??0,h=u*a,x=l?at(l):t.map(e=>e[r]),p=We({bound:"width",data:x,fontSize:u,svgHeight:`${o}`,svgWidth:`${s}`,viewBox:i}),f=n>p?n:p,g=c===w.BOTTOM?h+(d?.top??0):0,R=c===w.TOP?h+(d?.bottom??0):0;return{barChartXPosition:c||w.BOTTOM,extraSpaceBottomY:g,extraSpaceTopY:R,securityXSpace:f,xBreakAxis:l?.numeric?l.numeric.breakAxis??0:d?.custom?.breakAxis??0,xData:x}},ot=(e,t,r,a,n,i,o,s)=>{const{position:c,tickText:d,tickValues:l}=e.props,u=d?.fontSize??0,h=u*a,x=l||Xe([...new Set(nt(t,r))]),p=at(x),f=n>h?n:h,g=We({bound:"width",data:p,fontSize:u,svgHeight:`${o}`,svgWidth:`${s}`,viewBox:i}),R=c===w.LEFT?g+(d?.right??0):0,A=c===w.RIGHT?g+(d?.left??0):0;return{barChartYPosition:c||w.LEFT,extraSpaceLeftX:R,extraSpaceRightX:A,securityYSpace:f,yAxisText:g,yBreakAxis:l?.numeric?l.numeric.breakAxis??0:d?.custom?.breakAxis??0,yData:p}},st=({addError:e,ajustedX:t,ajustedY:r,canvasHeight:a,canvasWidth:n,children:i,data:o,gapBetweenBars:s,orientation:c,pKey:d,viewBox:l})=>{let h;if(!o||0===o.length){const t={error:ue(q)};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}if(n<=0||a<=0){const t={error:xe(n,a)};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}const x=Ve(i),p=20*x,f=(x-1)*s,g=c===O.VERTICAL?n:a;if(p+f>g){const t={error:(R=`Insufficient space: requires ${p+f}px but only ${g}px available`,new Error(`Invalid bar distribution for "all": ${R}`))};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}var R;const A=o&&o.length>0?o:[{[Te]:0,[d]:Ee},{[Te]:0,[d]:_e}],E=n>0?n:100,_=a>0?a:100,{barChartXPosition:T,barChartYPosition:y,extraSpaceBottomY:v,extraSpaceLeftX:m,extraSpaceRightX:C,extraSpaceTopY:S,securityXSpace:I,securityYSpace:N,xAxisText:$,xBreakAxis:k,xData:b,yAxisText:L,yBreakAxis:P,yData:M}=(({ajustedX:e,ajustedY:t,canvasHeight:r,canvasWidth:a,children:n,data:i,gapBetweenBars:o,orientation:s,pKey:c,viewBox:d})=>{let l={barChartXPosition:w.BOTTOM,barChartYPosition:w.LEFT,extraSpaceBottomY:0,extraSpaceLeftX:0,extraSpaceRightX:0,extraSpaceTopY:0,securityXSpace:0,securityYSpace:0,xAxisText:0,xBreakAxis:0,xData:[],yAxisText:0,yBreakAxis:0,yData:[]},h=o;const x=[];return u.Children.forEach(n,n=>{if(u.isValidElement(n))if(n.type!==Fe||x.includes(n.props.order)||(x.push(n.props.order),h+=n.props.barConfig.barWidth??0),n.type===Qe){const t=s===O.VERTICAL?h:0;l={...l,...it(n,i,c,e,t,d,r,a)}}else if(n.type===rt){const e=s===O.HORIZONTAL?h:0;l={...l,...ot(n,i,c,t,e,d,r,a)}}}),l})({ajustedX:t,ajustedY:r,canvasHeight:_,canvasWidth:E,children:i,data:A,gapBetweenBars:s,orientation:c,pKey:d,viewBox:l}),B=T!==w.TOP&&T!==w.BOTTOM,D=(({initPos:e,maxSpaceAvailable:t,otherAxisSpace:r,securitySpace:a,tickValues:n})=>{const i=n.length-1,o=(t-r-a)/i;return n.map((t,r)=>({position:e+r*o+a/2,value:t}))})({initPos:m,maxSpaceAvailable:E,otherAxisSpace:m+C,securitySpace:I,tickValues:b});if((D??[]).some(({position:e})=>isNaN(e))){const t={error:ue(Z)};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}if(D){const t=D.length<2,r=D.length>=2&&1===new Set(D.map(e=>e.value)).size;if(t){const t={error:ue(ie)};e?.("BAR_CHART_X_AXIS_ERROR",t),h||(h=t)}if(r){const t={error:ue(ne)};e?.("BAR_CHART_X_AXIS_ERROR",t),h||(h=t)}}const j=y!==w.LEFT&&y!==w.RIGHT,F=(({initPos:e,maxSpaceAvailable:t,needAjusted:r,otherAxisSpace:a,securitySpace:n,tickValues:i})=>{const o=(t-a-n)/(i.length-1),s=r?n/2:0;return i.map((t,r)=>({position:e-r*o-s,value:t}))})({initPos:_-v,maxSpaceAvailable:_,needAjusted:c===O.HORIZONTAL,otherAxisSpace:S+v,securitySpace:N,tickValues:M});if(F){const t=F.length<2,r=F.length>=2&&1===new Set(F.map(e=>e.value)).size;if(t){const t={error:ue(ce)};e?.("BAR_CHART_Y_AXIS_ERROR",t),h||(h=t)}if(r){const t={error:ue(se)};e?.("BAR_CHART_Y_AXIS_ERROR",t),h||(h=t)}}const V=B?Ae(F||[],[String(k)])[0]:0,X=j?Ae(D||[],[String(P)])[0]:0,W=(({canvasHeight:e,canvasWidth:t,customBreakAxis:r,extraSpaceBottomY:a,extraSpaceLeftX:n,extraSpaceRightX:i,extraSpaceTopY:o,position:s})=>s===w.TOP?{x1:n,x2:t-i,y1:o,y2:o}:s===w.CENTER?{x1:n,x2:t-i,y1:e/2,y2:e/2}:s===w.CUSTOM?{x1:n,x2:t-i,y1:r,y2:r}:{x1:n,x2:t-i,y1:e-a,y2:e-a})({canvasHeight:_,canvasWidth:E,customBreakAxis:Number(V),extraSpaceBottomY:v,extraSpaceLeftX:m,extraSpaceRightX:C,extraSpaceTopY:S,position:T}),K=(({canvasHeight:e,canvasWidth:t,customBreakAxis:r,extraSpaceBottomY:a,extraSpaceLeftX:n,extraSpaceRightX:i,extraSpaceTopY:o,position:s})=>s===w.RIGHT?{x1:t-i,x2:t-i,y1:o,y2:e-a}:s===w.CENTER?{x1:t/2,x2:t/2,y1:o,y2:e-a}:s===w.CUSTOM?{x1:r,x2:r,y1:o,y2:e-a}:{x1:n,x2:n,y1:o,y2:e-a})({canvasHeight:_,canvasWidth:E,customBreakAxis:Number(X),extraSpaceBottomY:v,extraSpaceLeftX:m,extraSpaceRightX:C,extraSpaceTopY:S,position:y});if(W.x1===W.x2){const t={error:ue(oe)};e?.("BAR_CHART_X_AXIS_ERROR",t),h||(h=t)}if(K.y1===K.y2){const t={error:ue(de)};e?.("BAR_CHART_Y_AXIS_ERROR",t),h||(h=t)}const Y={addError:e,crossXAxis:B,crossYAxis:j,data:A,extraSpaceBottomY:v,extraSpaceLeftX:m,extraSpaceRightX:C,extraSpaceTopY:S,securityXSpace:I,securityYSpace:N,xAxisCoordinates:{coordinates:W,tickValues:D||(h?[{position:0,value:Ee},{position:E,value:_e}]:[])},xAxisText:$,yAxisCoordinates:{coordinates:K,tickValues:F||(h?[{position:_,value:Ee},{position:0,value:_e}]:[])},yAxisText:L};return h?{...Y,error:{...h,type:H.BAR_CHART_CONTEXT_ERROR}}:Y},ct=Object.assign(({canvasConfig:e=$,caption:t,children:r,classNames:a,data:n,dataTestId:i="bar-chart",gapBetweenBars:o=0,height:s="100%",onErrors:c,orientation:d,pKey:x,role:f,tabIndex:g,width:R="100%",...A})=>{const E=p(i),{parsedCanvas:_,parsedCanvasExtraSpace:T,viewBox:y}=N({canvasConfig:e,dataTestId:E,height:s,width:R}),v=_.width,m=_.height,C=Ve(r),S=2*o,I=[l.jsx(Qe,{},"default-x-axis"),l.jsx(rt,{},"default-y-axis")],O=u.Children.toArray(r)||[],H=I.concat(O),w=Math.max(v,m,T??0),P=v/w,M=m/w,B=u.useMemo(()=>k(c),[c]),D=b(n),j=u.useMemo(()=>(B.clearErrors(),st({addError:(e,t)=>{B.addError(e,t)},ajustedX:P,ajustedY:M,canvasHeight:m,canvasWidth:v,children:H,data:n,gapBetweenBars:S,orientation:d,pKey:x,viewBox:y})),[m,v,D,x,d,B.addError]);return l.jsx(h,{caption:t,className:a,dataTestId:E,height:s,role:f,tabIndex:g,viewBox:y,width:R,...A,children:l.jsx(L.Provider,{value:{...j,barChildrenCount:C,canvasExtraSpace:T,canvasHeight:m,canvasWidth:v,data:n,dataTestId:E,gapBetweenBars:o,orientation:d,pKey:x},children:r})})},{Path:Fe,Separator:({areaSeparator:e,dataTestId:t,rightSeparator:r,topSeparator:a,xBreakAxis:n,yBreakAxis:i})=>{const{addError:o,crossXAxis:s,crossYAxis:c,xAxisCoordinates:d,yAxisCoordinates:h}=u.useContext(L),x=d.tickValues,p=h.tickValues,f=void 0!==n?"string"==typeof n?parseFloat(n):n:void 0,g=void 0!==i?"string"==typeof i?parseFloat(i):i:void 0;if(u.useEffect(()=>{if(void 0!==n){const e=x.map(e=>e.value);if(void 0===f||isNaN(f))o?.("BAR_CHART_SEPARATOR_ERROR",{error:pe(n)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(f<t||f>r)&&o?.("BAR_CHART_SEPARATOR_ERROR",{error:ge(f,t,r)})}}if(void 0!==i){const e=p.map(e=>e.value);if(void 0===g||isNaN(g))o?.("BAR_CHART_SEPARATOR_ERROR",{error:fe(i)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(g<t||g>r)&&o?.("BAR_CHART_SEPARATOR_ERROR",{error:Re(g,t,r)})}}},[n,f,x,i,g,p]),!a&&!r&&!e)return l.jsx(l.Fragment,{});const R=n&&Ae(d.tickValues,[n],!0)[0],A=i&&Ae(h.tickValues,[i])[0],E=c?h.coordinates.x1:d.coordinates.x2,_=s?d.coordinates.y1:h.coordinates.y1,T=d.coordinates.x1,y=R??E,v=h.coordinates.y2,m=A??_;u.useEffect(()=>{T===y&&v===m&&o?.("BAR_CHART_SEPARATOR_ERROR",{error:ue(re)})},[T,y,v,m]);const C=`M${T} ${v} H ${y} V ${m} H ${T} Z`,S=`M${T} ${m} H ${y}`,I=`M${y} ${v} V ${m}`;return l.jsxs("g",{children:[l.jsx("path",{d:C,"data-testid":`${t}Area`,...e}),l.jsx("path",{d:S,"data-testid":`${t}Top`,...a}),l.jsx("path",{d:I,"data-testid":`${t}Right`,...r})]})},XAxis:Qe,YAxis:rt}),dt=u.createContext({}),lt=({curved:e=!1,extendToBottom:t=!1,points:r,svgHeight:a})=>{if(0===r.length)return"";const[n,...i]=r;let o=`M ${n[0]} ${n[1]}`;return o+=e?i.reduce((e,t,a)=>{const[n,i]=r[a],[o,s]=t,c=.3*(o-n),d=[n+c,i],l=[o-c,s];return`${e} C ${d[0]} ${d[1]}, ${l[0]} ${l[1]}, ${o} ${s}`},""):i.reduce((e,t)=>`${e} L ${t[0]} ${t[1]}`,""),t&&(o+=` L ${i[i.length-1][0]} ${a} L ${n[0]} ${a} Z`),o},ut=(e,t)=>new Error(`Invalid projection bounds - upper projection (${e}) must be below lower projection (${t})`),ht=(e,t)=>new Error(`${t?"Upper":"Lower"} projection X coordinate (${e}) is outside valid range (0-100)`),xt=(e,t,r)=>new Error(`${r?"Upper":"Lower"} projection Y coordinate (${e}) is outside chart area (0-${t})`),pt=(e,t)=>{if(!t)return e;const r=t<0,a=e*Math.abs(t)/100;return r?e-a:e+a},ft=(e,t,r)=>{if(!r)return e;const a=r<0,n=(0===e?t:e)*Math.abs(r)/100;return a?e+n:e-n},gt=({curved:e,lineProjection:t,points:r,svgHeight:a})=>{const{addError:n}=u.useContext(dt),{lower:i,shapeColor:o,upper:s}=t,{xProjection:c,yProjection:d,...h}=s||{},{xProjection:x,yProjection:p,...f}=i||{},g=c||d?{x:c,y:d}:void 0,R=x||p?{x:x,y:p}:void 0,A=g?.y,E=R?.y,_=g?.x,T=R?.x;u.useEffect(()=>{if(g&&R){const e=A||0,t=E||0;e>=t&&n?.("LINE_CHART_PROJECTION_ERROR",{error:ut(e,t)})}g&&(void 0!==_&&(_<0||_>100)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:ht(_,!0)}),void 0!==A&&(A<0||A>a)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:xt(A,a,!0)})),R&&(void 0!==T&&(T<0||T>100)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:ht(T,!1)}),void 0!==E&&(E<0||E>a)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:xt(E,a,!1)}))},[R,T,E,a,g,_,A]);const{downPath:y,shapePath:v,upPath:m}=(({curved:e,lowerProjection:t,points:r,svgHeight:a,upperProjection:n})=>{const i=n||t;if(0===r.length&&!i)return{shapePath:""};const[o,...s]=r,c=`M ${o[0]} ${o[1]}`;let d=c,l=n?c:void 0,u=t?c:void 0;const h=[],x=[];s.forEach(([e,r])=>{const i=n?[pt(e,n.x),ft(r,a,n.y)]:[e,r],o=t?[pt(e,-(t.x??0)),ft(r,a,-(t.y??0))]:[e,r];h.push(i),x.push(o)});const p=n&&t?[...h,s.at(-1),...x.reverse(),o]:[...h,...x.reverse(),o];return e?(d+=p.reduce((e,t,r)=>{const a=0===r?o:p[r-1],[n,i]=a,[s,c]=t,d=.3*(s-n),l=[n+d,i],u=[s-d,c];return`${e} C ${l[0]} ${l[1]}, ${u[0]} ${u[1]}, ${s} ${c}`},""),l&&(l+=h.reduce((e,t,r)=>{const a=0===r?o:h[r-1],[n,i]=a,[s,c]=t,d=.3*(s-n),l=[n+d,i],u=[s-d,c];return`${e} C ${l[0]} ${l[1]}, ${u[0]} ${u[1]}, ${s} ${c}`},"")),u&&(u+=x.reverse().reduce((e,t,r)=>{const a=0===r?o:x[r-1],[n,i]=a,[s,c]=t,d=.3*(s-n),l=[n+d,i],u=[s-d,c];return`${e} C ${l[0]} ${l[1]}, ${u[0]} ${u[1]}, ${s} ${c}`},""))):(d+=p.reduce((e,t)=>`${e} L ${t?.[0]} ${t?.[1]}`,""),l&&(l+=h.reduce((e,t)=>`${e} L ${t[0]} ${t[1]}`,"")),u&&(u+=x.reverse().reduce((e,t)=>`${e} L ${t[0]} ${t[1]}`,""))),{downPath:u,shapePath:d,upPath:l}})({curved:e,lowerProjection:R,points:r,svgHeight:a,upperProjection:g});return l.jsxs("g",{className:"pointer-events-none",children:[l.jsx("path",{d:v,fill:o,stroke:"transparent",strokeWidth:"0.1"}),";",m&&l.jsx("path",{d:m,...h}),y&&l.jsx("path",{d:y,...f})]})},Rt=(e,t)=>e.map(e=>e[t]),At={formatTicksValues:(e,t)=>e.map(e=>({...e,value:t(e.value)}))},Et=({ariaLabel:e,position:t=w.BOTTOM,tickLine:r,tickText:a,valueFormatter:n=e=>e,...i})=>{const{xAxisCoordinates:{coordinates:o,tickValues:s},xCursor:c,...d}=u.useContext(dt),h=Je(t,o.y1,Number(a?.fontSize),a?.top??0),x=a?At.formatTicksValues(s,n):void 0,p=ye(i),f=e||i["aria-label"],g={...i,...p,...f&&{"aria-label":f}};return l.jsx(Ze,{...o,...g,canvasHeight:Number(d.canvasHeight),canvasWidth:Number(d.canvasWidth),cursor:c,dataTestId:`${d.dataTestId}xAxis`,tickLine:{...r,y1:d.yAxisCoordinates.coordinates.y1,y2:d.yAxisCoordinates.coordinates.y2},tickText:{...a,y:h},tickValues:x})},_t=({tickText:e,textWidth:t,yAxisPosition:r})=>{if(r!==w.LEFT)return 0;if(e?.useAxisAsOrigin){const{textAnchor:r="start"}=e;let a=0;return"end"===r&&(a=t),"middle"===r&&(a=t/2),a+=e.left??0,a-=e.right??0,Math.max(0,a)}const a=e?.textAnchor,n=e?.left??0;return"start"===a?0:"middle"===a?t+n:"end"===a?2*t+n:t/2+n},Tt=({tickText:e,textWidth:t,yAxisPosition:r})=>{if(r!==w.RIGHT)return 0;if(e?.useAxisAsOrigin){const{textAnchor:r="start"}=e;let a=t;return"end"===r&&(a=0),"middle"===r&&(a=t/2),a-=e.left??0,a+=e.right??0,Math.max(0,a)}const a=e?.textAnchor,n=e?.right??0;return"start"===a?t:"middle"===a||"end"===a?t+n:2*t-t/2+n},yt=({tickText:e,textWidth:t})=>{const r=e?.textAnchor??"start";return"start"===r?0:"middle"===r?t/2:t},vt=({tickText:e,textWidth:t})=>{const r=e?.textAnchor??"start";return"end"===r?0:"middle"===r?t/2:t},mt=({ariaLabel:e,position:t=w.LEFT,tickLine:r,tickText:a,valueFormatter:n=e=>e,...i})=>{const{yAxisCoordinates:{coordinates:o,tickValues:s},yCursor:c,...d}=u.useContext(dt),h=(({tickText:e,yAxisPosition:t,textWidth:r,yAxisX1:a})=>{if(e?.useAxisAsOrigin){let t=a;return t+=e.right??0,t-=e.left??0,t}const n=e?.textAnchor||"middle";let i=0;t===w.RIGHT?i=e?.right??0:t===w.LEFT&&(i=e?.left??0);const o=tt(n,r,i);return qe(t,a,o)})({tickText:a,yAxisPosition:t,textWidth:d.yAxisText,yAxisX1:o.x1}),x=a?At.formatTicksValues(s,n):void 0,p=ye(i),f=e||i["aria-label"],g={...i,...p,...f&&{"aria-label":f}};return l.jsx(et,{...o,...g,canvasHeight:Number(d.canvasHeight),canvasWidth:Number(d.canvasWidth),cursor:c,dataTestId:`${d.dataTestId}yAxis`,tickLine:{...r,x1:d.xAxisCoordinates.coordinates.x1,x2:d.xAxisCoordinates.coordinates.x2},tickText:{...a,x:h},tickValues:x})},Ct=e=>{if(e.custom)return e.custom?.values;if(e.numeric){const{max:t,min:r=0,step:a}=e.numeric;if(a>=Math.abs(t-r)||a<=0)return[r.toString(),t.toString()];const n=[];for(let e=r;e<=t;e+=a)n.push(e.toString());return n}},St=(e,t)=>e.flatMap(e=>Object.keys(e).filter(r=>r!==t&&"number"==typeof e[r]).map(t=>e[t])),It=({tickValues:e,tickText:t})=>e?.numeric?e.numeric.breakAxis??0:t?.custom?.breakAxis??0,Nt=(e,t,r,a,n,i)=>{const{position:o=w.BOTTOM,tickText:s,tickValues:c,valueFormatter:d}=e.props,l=s?.fontSize??0,u=c?Ct(c):t.map(e=>e[r]),h=d?u.map(d):u,x=We({bound:"width",data:h,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a}),p=We({bound:"height",data:h,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a}),f=o===w.BOTTOM?p+(s?.top??0):0,g=o===w.TOP?p+(s?.bottom??0):0,R=It({tickValues:c,tickText:s});return{xAxisLeftSpacing:yt({textWidth:x,tickText:s}),xAxisTopSpacing:g,xAxisRightSpacing:vt({textWidth:x,tickText:s}),xAxisBottomSpacing:f,lineChartXPosition:o,xBreakAxis:R,xData:u}},$t=(e,t,r,a,n,i)=>{const{position:o=w.LEFT,tickText:s,tickValues:c,valueFormatter:d}=e.props,l=s?.fontSize??0,u=c||Xe([...new Set(St(t,r))]),h=Ct(u),x=d?h.map(d):h,p=We({bound:"width",data:x,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a}),f=We({bound:"height",data:x,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a});return{yAxisLeftSpacing:_t({tickText:s,textWidth:p,yAxisPosition:o}),yAxisTopSpacing:f,yAxisRightSpacing:Tt({tickText:s,textWidth:p,yAxisPosition:o}),yAxisBottomSpacing:0,lineChartYPosition:o,yAxisText:p,yBreakAxis:It({tickValues:c,tickText:s}),yData:h}},kt=({addError:e,canvasHeight:t,canvasWidth:r,children:a,data:n,viewBox:i,xKey:o})=>{let s;const{error:c}=(({data:e,addError:t})=>{let r;if(!e||0===e.length){const e={error:ue(J)};t?.("LINE_CHART_CONTEXT_ERROR",e),r=e}if(e&&1===e.length){const e={error:ue(ae)};t?.("LINE_CHART_CONTEXT_ERROR",e),r=e}return{error:r}})({data:n,addError:e});c&&(s=c);const{error:d}=(({canvasWidth:e,canvasHeight:t,addError:r})=>{let a;if(e<=0||t<=0){const n={error:xe(e,t)};r?.("LINE_CHART_CONTEXT_ERROR",n),a=n}return{error:a}})({canvasWidth:r,canvasHeight:t,addError:e});d&&(s=d);const l=n&&n.length>0?n:[{[o]:"0",y:0},{[o]:"1",y:1}],h=r>0?r:100,x=t>0?t:100,{xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:_,yAxisBottomSpacing:T,lineChartXPosition:y,lineChartYPosition:v,xAxisText:m,xBreakAxis:C,xData:S,yAxisText:I,yBreakAxis:N,yData:$}=(({canvasHeight:e,canvasWidth:t,children:r,data:a,viewBox:n,xKey:i})=>{let o={xAxisLeftSpacing:0,xAxisTopSpacing:0,xAxisRightSpacing:0,xAxisBottomSpacing:0,yAxisLeftSpacing:0,yAxisTopSpacing:0,yAxisRightSpacing:0,yAxisBottomSpacing:0,lineChartXPosition:w.BOTTOM,lineChartYPosition:w.LEFT,xAxisText:0,xBreakAxis:0,xData:[],yAxisText:0,yBreakAxis:0,yData:[]};return u.Children.forEach(r,r=>{u.isValidElement(r)&&(r.type===Et?o={...o,...Nt(r,a,i,n,e,t)}:r.type===mt&&(o={...o,...$t(r,a,i,n,e,t)}))}),o})({canvasHeight:x,canvasWidth:h,children:a,data:l,viewBox:i,xKey:o}),k=(({tickValues:e,maxSpaceAvailable:t,xAxisLeftSpacing:r,xAxisRightSpacing:a,yAxisLeftSpacing:n,yAxisRightSpacing:i})=>{const o=Math.max(n,r),s=t-Math.max(a,i);if(e.length<=1)return[{position:o,value:e[0]}];const c=(s-o)/(e.length-1);return e.map((e,t)=>({position:o+c*t,value:e}))})({tickValues:S,maxSpaceAvailable:h,xAxisLeftSpacing:p,xAxisRightSpacing:g,yAxisLeftSpacing:A,yAxisRightSpacing:_}),{error:b}=(({xTickValues:e,addError:t})=>{let r;if(e){if((e??[]).some(({position:e})=>isNaN(e))){const e={error:ue(Z)};t?.("LINE_CHART_CONTEXT_ERROR",e),r=e}const a=e.length<2,n=e.length>=2&&1===new Set(e.map(e=>e.value)).size;if(a){const e={error:ue(ie)};t?.("LINE_CHART_X_AXIS_ERROR",e),r||(r=e)}if(n){const e={error:ue(ne)};t?.("LINE_CHART_X_AXIS_ERROR",e),r||(r=e)}}return{error:r}})({xTickValues:k,addError:e});!s&&b&&(s=b);const L=(({maxSpaceAvailable:e,tickValues:t,xAxisTopSpacing:r,xAxisBottomSpacing:a,yAxisTopSpacing:n,yAxisBottomSpacing:i})=>{const o=e-Math.max(a,i),s=Math.max(n,r);if(t.length<=1)return[{position:o,value:t[0]}];const c=(o-s)/(t.length-1);return t.map((e,t)=>({position:o-c*t,value:e}))})({maxSpaceAvailable:x,tickValues:$,xAxisTopSpacing:f,xAxisBottomSpacing:R,yAxisTopSpacing:E,yAxisBottomSpacing:T}),{error:O}=(({yTickValues:e,addError:t})=>{let r;if(e){const a=e.length<2,n=e.length>=2&&1===new Set(e.map(e=>e.value)).size;if(a){const e={error:ue(ce)};t?.("LINE_CHART_Y_AXIS_ERROR",e),r||(r=e)}if(n){const e={error:ue(se)};t?.("LINE_CHART_Y_AXIS_ERROR",e),r||(r=e)}}return{error:r}})({yTickValues:L,addError:e});!s&&O&&(s=O);const P=y!==w.TOP&&y!==w.BOTTOM,M=v!==w.LEFT&&v!==w.RIGHT,B=P?Ae(L||[],[String(C)])[0]:0,D=M?Ae(k||[],[String(N)])[0]:0,j=(({lineChartXPosition:e,lineChartYPosition:t,canvasHeight:r,canvasWidth:a,customBreakAxis:n,xAxisLeftSpacing:i,xAxisTopSpacing:o,xAxisRightSpacing:s,xAxisBottomSpacing:c,yAxisLeftSpacing:d,yAxisTopSpacing:l,yAxisRightSpacing:u,yAxisBottomSpacing:h})=>{const x=t===w.LEFT?Math.max(d,i):0,p=t===w.RIGHT?a-Math.max(u,s):a;return e===w.TOP?{x1:x,x2:p,y1:Math.max(l,o),y2:Math.max(l,o)}:e===w.CENTER?{x1:x,x2:p,y1:r/2,y2:r/2}:e===w.CUSTOM?{x1:x,x2:p,y1:n,y2:n}:{x1:x,x2:p,y1:r-Math.max(h,c),y2:r-Math.max(h,c)}})({canvasHeight:x,canvasWidth:h,customBreakAxis:Number(B),lineChartXPosition:y,lineChartYPosition:v,xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:_,yAxisBottomSpacing:T}),F=(({lineChartXPosition:e,lineChartYPosition:t,canvasHeight:r,canvasWidth:a,customBreakAxis:n,xAxisLeftSpacing:i,xAxisTopSpacing:o,xAxisRightSpacing:s,xAxisBottomSpacing:c,yAxisLeftSpacing:d,yAxisTopSpacing:l,yAxisRightSpacing:u,yAxisBottomSpacing:h})=>{const x=e===w.TOP?Math.max(l,o):0,p=e===w.BOTTOM?r-Math.max(h,c):r;return t===w.RIGHT?{x1:a-Math.max(u,s),x2:a-Math.max(u,s),y1:x,y2:p}:t===w.CENTER?{x1:a/2,x2:a/2,y1:x,y2:p}:t===w.CUSTOM?{x1:n,x2:n,y1:x,y2:p}:{x1:Math.max(d,i),x2:Math.max(d,i),y1:x,y2:p}})({canvasHeight:x,canvasWidth:h,customBreakAxis:Number(D),lineChartXPosition:y,lineChartYPosition:v,xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:_,yAxisBottomSpacing:T}),{error:V}=(({xCoordinates:e,addError:t})=>{let r;if(e.x1===e.x2){const e={error:ue(oe)};t?.("LINE_CHART_X_AXIS_ERROR",e),r=e}return{error:r}})({xCoordinates:j,addError:e});!s&&V&&(s=V);const{error:X}=(({yCoordinates:e,addError:t})=>{let r;if(e.y1===e.y2){const e={error:ue(de)};t?.("LINE_CHART_Y_AXIS_ERROR",e),r||(r=e)}return{error:r}})({yCoordinates:F,addError:e});!s&&X&&(s=X);const W={addError:e,crossXAxis:P,crossYAxis:M,xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:_,yAxisBottomSpacing:T,xAxisCoordinates:{coordinates:j,tickValues:k||(s?[{position:0,value:"0"},{position:h,value:"1"}]:[])},xAxisText:m,yAxisCoordinates:{coordinates:F,tickValues:L||(s?[{position:x,value:Ee},{position:0,value:_e}]:[])},yAxisText:I};return s?{...W,error:{...s,type:H.LINE_CHART_CONTEXT_ERROR}}:W},bt=Object.assign(({ariaHidden:e,ariaLabel:t,canvasConfig:r=$,caption:a,children:n,classNames:i,data:o,dataTestId:s="line-chart",getPathArea:c,height:d="100%",onErrors:x,role:f,tabIndex:g,width:R="100%",xKey:A,...E})=>{const _=p(s),[T,y]=u.useState(""),{parsedCanvas:v,parsedCanvasExtraSpace:m,viewBox:C}=N({canvasConfig:r,dataTestId:_,height:d,width:R}),S=[l.jsx(Et,{},"default-x-axis"),l.jsx(mt,{},"default-y-axis")],I=u.Children.toArray(n)||[],L=S.concat(I);(({attrName:e,children:t,originalValue:r,updateValue:a})=>{let n="";u.Children.toArray(t).forEach(t=>{if(u.isValidElement(t)){const r=t.props[e];r&&(n+=r)}}),n!==r&&a(n)})({attrName:"dataKey",children:L,originalValue:T,updateValue:y});const O=u.useMemo(()=>k(x),[x]),H=b(o),w=u.useMemo(()=>(O.clearErrors(),kt({addError:(e,t)=>{O.addError(e,t)},canvasHeight:v.height,canvasWidth:v.width,children:L,data:o,viewBox:C,xKey:A})),[v.width,v.height,H,A,T,O.addError]),{svgRef:P,xCursor:M,yCursor:B}=(({canvasHeight:e,canvasWidth:t})=>{const[[r,a],n]=u.useState([me,me]),i=u.useCallback((r,a)=>{const{height:i,left:o,top:s,width:c}=a.getBoundingClientRect(),d=r.clientX-o,l=r.clientY-s;n([d*t/c,l*e/i])},[t,e]),o=e=>{e.preventDefault()};return{svgRef:u.useCallback(e=>{e&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",t=>i(t.touches[0],e)),e.addEventListener("mousemove",t=>i(t,e))),e?.removeEventListener("touchstart",o),e?.removeEventListener("touchmove",t=>i(t.touches[0],e)),e?.removeEventListener("mousemove",t=>i(t,e))},[e,t]),xCursor:r,yCursor:a}})({canvasHeight:v.height,canvasWidth:v.width});return u.useEffect(()=>{c?.({x1:w.xAxisCoordinates.coordinates.x1,y1:w.yAxisCoordinates.coordinates.y1,x2:w.xAxisCoordinates.coordinates.x2,y2:w.yAxisCoordinates.coordinates.y2})},[w.xAxisCoordinates.coordinates.x1,w.yAxisCoordinates.coordinates.y1,w.xAxisCoordinates.coordinates.x2,w.yAxisCoordinates.coordinates.y2,c]),l.jsx(h,{ref:P,ariaHidden:e,ariaLabel:t,caption:a,className:i,"data-kbt-svg":!0,dataTestId:_,height:d,role:f,tabIndex:g,viewBox:C,width:R,...E,children:l.jsx(dt.Provider,{value:{...w,canvasExtraSpace:m,canvasHeight:v.height,canvasWidth:v.width,data:o,dataTestId:_,xCursor:M,xKey:A,yCursor:B},children:n})})},{Path:({ariaLabel:e,closestClick:t,curved:r,getNodeFocusInfo:a,getNodesCoords:n,indicatorConfig:i,lineProjection:o,onClick:s,...c})=>{const{addError:d,xAxisCoordinates:h,yAxisCoordinates:x,...p}=u.useContext(dt),f=c.dataKey,g=p.data.length>0,R=p.data[0],A=!!R&&Object.prototype.hasOwnProperty.call(R,f),E=p.data.length;u.useEffect(()=>{if(!f||"string"!=typeof f)return void d?.("LINE_CHART_PATH_ERROR",{error:ue(te)});if(g&&!A)return void d?.("LINE_CHART_PATH_ERROR",{error:he(f)});if(r&&E<2)return void d?.("LINE_CHART_PATH_ERROR",{error:ue(ee)});const e=Rt(p.data,f);e.length>0&&e.every(e=>null==e)&&d?.("LINE_CHART_PATH_ERROR",{error:ue(Q)})},[d,r,f,E,g,A,p.data]);const{indicatorRef:_,pathRef:T}=((e,t)=>{const r=u.useRef(null),a=u.useRef(null);return u.useEffect(()=>{if(!t||!r.current||!a.current)return;const n=r.current,i=a.current;let o,s,c=0,d=n.getTotalLength();for(;d-c>.01;)o=(c+d)/2,s=n.getPointAtLength(o),s.x<e?c=o:d=o;const l=n.getPointAtLength(d);i.setAttribute("transform",`translate(${l.x}, ${l.y})`),i.setAttribute("pointer-events","none")},[e]),{indicatorRef:a,pathRef:r}})(p.xCursor,!!i),y=!!i&&p.xCursor!==-1/0,v=u.useRef(null),m=u.useRef(null),{autoClick:C,lineIndicator:S,...I}=i||{},{y1:N,y2:$}=x.coordinates,{x1:k,x2:b}=h.coordinates,L=p.xCursor>=k&&p.xCursor<=b,{tickValues:O}=h,{tickValues:H}=x,w=Rt(p.data,p.xKey),P=Rt(p.data,f),M=Ae(O,w,!0),B=Ae(H,P),D=M.map((e,t)=>[e,B[t]]),j=lt({curved:r,extendToBottom:!1,points:D,svgHeight:x.coordinates.y2}),F=lt({curved:r,extendToBottom:!!c.fill||!!c.gradient,points:D,svgHeight:x.coordinates.y2});u.useEffect(()=>{if(!v.current?.path)return;T.current=v.current.path;const e=v.current.main,t=v.current.node,r=w.map((e,t)=>({x:e,y:P[t]})),{mount:n,unmount:i}=(({data:e,getNodeFocusInfo:t,nodes:r,ref:a})=>{let n;const i=a.querySelector("[data-draw]"),o=a=>{let i;"ArrowRight"===a.key?i=void 0===n||n===r.length-1?0:n+1:"ArrowLeft"===a.key&&(i=void 0===n||0===n?r.length-1:n-1),void 0!==i&&(n=i,r[n]&&(r[n].focus(),t?.(e[n])))},s=()=>{n=void 0};return{mount:()=>{i?.addEventListener("focus",s),a.addEventListener("keydown",e=>o(e))},unmount:()=>{i?.removeEventListener("focus",s),a.removeEventListener("keydown",e=>o(e))}}})({data:r,getNodeFocusInfo:a,nodes:t,ref:e});return n(),()=>i()},[]),u.useEffect(()=>{if(c.nodeConfig&&y&&C){const{idx:e,match:t}=((e,t)=>{let r=0,a=!1;for(let n=0;n<e.length;n++)if(Math.round(e[n])===Math.round(t)){a=!0,r=n;break}return{idx:r,match:a}})(M,p.xCursor);if(t&&e!==m.current){m.current=e;const t=new MouseEvent("click",{bubbles:!0});t.autoClick=!0,v.current?.node?.[e]?.dispatchEvent(t),navigator?.vibrate?.(200)}else m.current=null}},[p.xCursor]),u.useEffect(()=>{n?.(D)},[D]);const V=ye(c),X={...c,...V,...e&&{"aria-label":e}};return l.jsxs(l.Fragment,{children:[l.jsx(Me,{ref:v,d:j,dFill:F,dataTestId:`${p.dataTestId}path`,dataValue:p.data,points:D,xKey:p.xKey,onClick:e=>{if(s?.(e),t){const e=((e,t)=>{let r=0,a=Math.abs(e[0]-t);for(let n=1;n<e.length;n++){const i=Math.abs(e[n]-t);i<a&&(r=n,a=i)}return r})(M,p.xCursor),t=new MouseEvent("click",{bubbles:!0});t.autoClick=!1,v.current?.node?.[e]?.dispatchEvent(t)}},...X}),o&&l.jsx(gt,{curved:r,dataKey:c.dataKey,lineProjection:o,points:D,svgHeight:x.coordinates.y2}),y&&l.jsxs(l.Fragment,{children:[!!S&&L&&l.jsx(Ke,{...S,className:"pointer-events-none",x1:p.xCursor,x2:p.xCursor,y1:N,y2:$}),l.jsx("g",{ref:_,className:"pointer-events-none",children:l.jsx(we,{...I})})]})]})},Separator:({areaSeparator:e,dataTestId:t,rightSeparator:r,topSeparator:a,xBreakAxis:n,yBreakAxis:i})=>{const{addError:o,crossXAxis:s,crossYAxis:c,xAxisCoordinates:d,yAxisCoordinates:h}=u.useContext(dt),x=d.tickValues,p=h.tickValues,f=void 0!==n?"string"==typeof n?parseFloat(n):n:void 0,g=void 0!==i?"string"==typeof i?parseFloat(i):i:void 0;if(u.useEffect(()=>{if(void 0!==n){const e=x.map(e=>e.value);if(void 0===f||isNaN(f))o?.("LINE_CHART_SEPARATOR_ERROR",{error:pe(n)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(f<t||f>r)&&o?.("LINE_CHART_SEPARATOR_ERROR",{error:ge(f,t,r)})}}if(void 0!==i){const e=p.map(e=>e.value);if(void 0===g||isNaN(g))o?.("LINE_CHART_SEPARATOR_ERROR",{error:fe(i)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(g<t||g>r)&&o?.("LINE_CHART_SEPARATOR_ERROR",{error:Re(g,t,r)})}}},[n,f,x,i,g,p]),!a&&!r&&!e)return l.jsx(l.Fragment,{});const R=n&&Ae(d.tickValues,[n],!0)[0],A=i&&Ae(h.tickValues,[i])[0],E=c?h.coordinates.x1:d.coordinates.x2,_=s?d.coordinates.y1:h.coordinates.y1,T=d.coordinates.x1,y=R??E,v=h.coordinates.y2,m=A??_;u.useEffect(()=>{T===y&&v===m&&o?.("LINE_CHART_SEPARATOR_ERROR",{error:ue(re)})},[T,y,v,m]);const C=`M${T} ${v} H ${y} V ${m} H ${T} Z`,S=`M${T} ${m} H ${y}`,I=`M${y} ${v} V ${m}`;return l.jsxs("g",{children:[l.jsx("path",{d:C,"data-testid":`${t}Area`,...e}),l.jsx("path",{d:S,"data-testid":`${t}Top`,...a}),l.jsx("path",{d:I,"data-testid":`${t}Right`,...r})]})},XAxis:Et,YAxis:mt}),Lt=({children:e,dataTestId:t,height:r,width:a,x:n,y:i})=>l.jsx("foreignObject",{"data-testid":t,height:r,width:a,x:n,y:i,children:e}),Ot=u.createContext({}),Ht=({ariaLabel:e,dataKey:t,index:r,groupName:a,groupValue:n})=>{if(!e)return;const i=new RegExp("{{dataKey}}","g"),o=new RegExp("{{index}}","g"),s=new RegExp("{{groupName}}","g"),c=new RegExp("{{groupValue}}","g");return e.replace(i,t).replace(o,String(r)).replace(s,a).replace(c,String(n))},wt=(e,t,r)=>({x:e.x+t*Math.cos(r),y:e.y+t*Math.sin(r)}),Pt=({center:e,innerEnd:t,innerRadius:r,singleStroke:a})=>{if(!a)return r>0?`L ${t.x},${t.y}`:`L ${e.x},${e.y}`},Mt="CLOCKWISE",Bt=({canvasHeight:e,canvasWidth:t,color:r="blue",dataKey:a,gap:n,halfChart:i,index:o,innerRadius:s,name:c,radius:d,singleStroke:h,startAngle:x,total:p,value:f,...g})=>{const{addError:R}=u.useContext(Ot),A=Number(f),E=void 0!==d?Number(d):void 0,_=void 0!==s?Number(s):void 0,T=c?.trim()||"";u.useEffect(()=>{T||R?.("PIE_CHART_SEGMENT_ERROR",{error:Y(a||"unknown",o||0,"name")}),isNaN(A)?R?.("PIE_CHART_SEGMENT_ERROR",{error:F(f,T||`segment-${o}`)}):(A<0&&R?.("PIE_CHART_SEGMENT_ERROR",{error:V(A,T||`segment-${o}`)}),void 0!==E&&(isNaN(E)||E<=0)&&R?.("PIE_CHART_SEGMENT_ERROR",{error:U(d)}),void 0!==_&&((isNaN(_)||_<0)&&R?.("PIE_CHART_SEGMENT_ERROR",{error:G(s)}),void 0!==E&&(isNaN(E)||isNaN(_)||_>=E&&R?.("PIE_CHART_SEGMENT_ERROR",{error:z(_,E)}))))},[a,o,_,E,A,T]);const y=(({canvasHeight:e,canvasWidth:t,customRadius:r,gap:a,halfChart:n,innerRadius:i,rotateDirection:o,singleStroke:s,startAngle:c,total:d,value:l})=>{const u=n?2*e:e,h=Math.min(t,u)/2,x=r&&r<h?r:h,p=n?Math.PI:2*Math.PI,f={x:t/2,y:n?e:e/2},g=s?2*d:d,R=100*l/g*p/100,A=a/x,{carryAngle:E,finalAngle:_,initialAngle:T}=(({angleEquivalent:e,direction:t,gapAngle:r,startAngle:a})=>{const n=t===Mt;return{carryAngle:n?a+e:a-e,finalAngle:n?a+e-r/2:a-e+r/2,initialAngle:n?a+r/2:a-r/2}})({angleEquivalent:R,direction:o,gapAngle:A,startAngle:c.current});c.current=E;const y=p*l/g-A<=Math.PI?"0":"1",v=wt(f,i,T),m=wt(f,i,_),C=wt(f,x,T);return(({center:e,innerEnd:t,innerRadius:r,innerStart:a,largeArcFlag:n,outerEnd:i,outerStart:o,radius:s,rotateDirection:c,singleStroke:d})=>{let l,u,h,x,p,f,g,R,A,E;return c===Mt?(l=`M ${o.x},${o.y}`,u=`A ${s},${s} 0 ${n} 1 ${i.x}, ${i.y}`,h=Pt({center:e,innerEnd:t,innerRadius:r,singleStroke:d}),x=d?`M ${t.x},${t.y}`:void 0,p=r>0?`A ${r},${r} 0 ${n} 0 ${a.x},${a.y}`:void 0,f=`M ${o.x},${o.y}`,R=`M ${t.x},${t.y}`,g=`A ${s},${s} 0 ${n} 0 ${i.x},${i.y}`,A=`A ${r},${r} 0 ${n} 1 ${a.x},${a.y}`,E=d?void 0:"Z"):(l=`M ${o.x} ${o.y}`,u=`A ${s},${s} 0 ${n},0 ${i.x}, ${i.y}`,h=Pt({center:e,innerEnd:t,innerRadius:r,singleStroke:d}),x=d?`M ${t.x},${t.y}`:void 0,p=r>0?`A ${r}, ${r} 0 ${n},1 ${a.x},${a.y}`:void 0,f=`M ${o.x},${o.y}`,R=`M ${t.x},${t.y}`,g=`A ${s},${s} 0 ${n} 1 ${i.x},${i.y}`,A=`A ${r},${r} 0 ${n} 0 ${a.x},${a.y}`,E=d?void 0:"Z"),[l,u,h,x,p,E].concat(d?[f,g,R,A]:[]).filter(Boolean).join(" ")})({center:f,innerEnd:m,innerRadius:i,innerStart:v,largeArcFlag:y,outerEnd:wt(f,x,_),outerStart:C,radius:x,rotateDirection:o,singleStroke:s})})({canvasHeight:e,canvasWidth:t,customRadius:d,gap:n,halfChart:i,innerRadius:s,singleStroke:h,startAngle:x,total:p,value:f});return l.jsx(Me,{...g,d:y,dataValue:f,fill:r})},Dt=({ariaLabel:e,"aria-label":t,dataKey:r,fill:a,gap:n,innerRadius:i,radius:o,...s})=>{const c=String(r),{addError:d,canvasHeight:h,canvasWidth:x,data:p,dataTestId:f,halfChart:g}=u.useContext(Ot),R=g?0:-Math.PI/2,A=u.useRef(R),E=p[c],_=Object.prototype.hasOwnProperty.call(p,c);u.useEffect(()=>{if(!_)return void d?.("PIE_CHART_PATH_ERROR",{error:X(c)});if(!E||0===E.length)return void d?.("PIE_CHART_PATH_ERROR",{error:W(c)});const e=E.reduce((e,t)=>e+t.value,0);(e<=0||isNaN(e))&&d?.("PIE_CHART_PATH_ERROR",{error:K(c,e)})},[E,_,c]);const T=p[c]?.reduce((e,t)=>e+t.value,0),y=1===p[c]?.length,v=i?I(i):void 0,m=o?I(o):void 0;return p[c]?.length?l.jsx("g",{children:p[c].map((r,i)=>u.createElement(Bt,{...s,...r,key:`${i.toString()}`,ariaLabel:Ht({ariaLabel:t||e,dataKey:c,index:i,groupName:r.name,groupValue:r.value}),canvasHeight:h,canvasWidth:x,color:r.color||a,dataKey:c,dataTestId:`${f}path-${i}`,gap:n,halfChart:g,index:i,innerRadius:v,radius:m,singleStroke:y,startAngle:A,total:T}))}):l.jsx(l.Fragment,{})},jt=Object.assign(({ariaHidden:e,ariaLabel:t,canvasConfig:r=$,caption:a,children:n,classNames:i,data:o,dataTestId:s="pie-chart",halfChart:c,height:d="100%",onErrors:x,radius:f="50%",role:g,tabIndex:R,width:A="100%",...E})=>{const _=p(s),{parsedCanvas:T,viewBox:y}=N({canvasConfig:r,dataTestId:_,height:d,width:A}),v=T.width,m=T.height,C=u.useMemo(()=>k(x),[x]),S=b(o),L=u.useMemo(()=>(C.clearErrors(),(({addError:e,canvasHeight:t,canvasWidth:r,children:a,halfChart:n})=>{(r<=0||t<=0)&&e?.("PIE_CHART_CONTEXT_ERROR",{error:xe(r,t)});const i=r>0?r:100,o=t>0?t:100;let s,c;u.Children.forEach(a,e=>{if(u.isValidElement(e)&&e.type===Dt){const{innerRadius:t}=e.props;if(!t)return;const r=I(t);(!s||r<s)&&(s=r)}}),s&&(c=2*s);const d=c??0,l=n?d/2:d,h=n?o:o/2;return{addError:e,foreignObject:{height:l,width:d,x:i/2-d/2,y:n?h-l:h-l/2}}})({addError:(e,t)=>{C.addError(e,t)},canvasHeight:m,canvasWidth:v,children:n,halfChart:c})),[m,v,c,S,C]);return l.jsx(h,{ariaHidden:e,ariaLabel:t,caption:a,className:i,dataTestId:_,height:d,radius:f,role:g,tabIndex:R,viewBox:y,width:A,...E,children:l.jsx(Ot.Provider,{value:{...L,canvasHeight:m,canvasWidth:v,data:o,dataTestId:_,halfChart:c},children:n})})},{Foreign:({children:e,dataTestId:t,height:r,width:a,x:n,y:i,...o})=>{const{dataTestId:s,foreignObject:c}=u.useContext(Ot),d=!a&&c?.width?c.width:a,h=!r&&c?.height?c.height:r,x=!n&&c?.x?c.x:n,p=!i&&c?.y?c.y:i,f=!t&&s?`${s}-foreign-object`:t;return l.jsx(Lt,{...o,dataTestId:f,height:h,width:d,x:x,y:p,children:e})},Path:Dt}),Ft={FOCUS_COLOR:"#0078D4",FOCUS_INNER:"#ffffff",INNER_FOCUS_STROKE_WIDTH:2,OUTER_FOCUS_STROKE_WIDTH:2,OUTLINES_GAP:0,VARIANT:"adaptive"},Vt=e=>({gap:e?.gap??Ft.OUTLINES_GAP,innerColor:e?.innerColor??Ft.FOCUS_INNER,innerStrokeWidth:e?.innerStrokeWidth??Ft.INNER_FOCUS_STROKE_WIDTH,outlineColor:e?.outlineColor??Ft.FOCUS_COLOR,outlineStrokeWidth:e?.outlineStrokeWidth??Ft.OUTER_FOCUS_STROKE_WIDTH,variant:e?.variant??Ft.VARIANT}),Xt=["cx","cy","r","x","y","width","height","rx","ry","d","points","x1","y1","x2","y2"],Wt=["stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity"],Kt=["circle","rect","ellipse","path","polygon","polyline","line"];function Yt({elementRef:e,focusConfig:t,isFocused:r}){const a=u.useMemo(()=>Vt(t),[t]),[n,i]=u.useState(void 0);return u.useEffect(()=>{if(!e?.current||!r)return void i(void 0);const t=e.current,n=()=>{if("adaptive"===a.variant){const e=function(e,t){const r=e.tagName.toLowerCase();if(!Kt.includes(r))return;const a=e.getAttribute("stroke-width")||e.getAttribute("strokeWidth"),n=parseFloat(a||"0"),i=e.getAttribute("fill"),o="line"===r||"polyline"===r||"path"===r&&"none"===i,s=n+2*(t.outlineStrokeWidth+t.innerStrokeWidth),c=n+2*t.innerStrokeWidth,d=o?e.getAttribute("stroke-linecap")||"round":void 0,l=o?e.getAttribute("stroke-linejoin")||"round":"miter",u=o?void 0:"10",h=function(e){const t={},r=new Set([...Xt,...Wt]);for(let a=0;a<e.attributes.length;a++){const n=e.attributes[a];r.has(n.name)&&(t[n.name]=n.value)}return t}(e);return{innerRing:{props:{...h,className:"focus-ring-inner",fill:"none",stroke:t.innerColor,strokeLinecap:d,strokeLinejoin:l,strokeMiterlimit:u,strokeWidth:c},type:r},outerRing:{props:{...h,className:"focus-ring-outer",fill:"none",stroke:t.outlineColor,strokeLinecap:d,strokeLinejoin:l,strokeMiterlimit:u,strokeWidth:s},type:r}}}(t,a);i(e)}if("bounding-box"===a.variant){const e=function(e,t){const r=function(e){try{const t=e.getBBox();if(t.width<=0||t.height<=0)return null;const r=window.getComputedStyle(e),a=parseFloat(r.strokeWidth||"0");return{elementHeight:t.height,elementPosition:{x:t.x+t.width/2,y:t.y+t.height/2},elementStrokeWidth:a,elementWidth:t.width}}catch{return null}}(e);if(!r)return;const a=((e,t)=>{const{elementHeight:r,elementPosition:a,elementStrokeWidth:n,elementWidth:i}=e,{gap:o,innerStrokeWidth:s,outlineStrokeWidth:c}=t,d=i+n+s+2*o,l=r+n+s+2*o,u=d+s+c,h=l+s+c;return{inner:{height:l,width:d,x:a.x-d/2,y:a.y-l/2},outer:{height:h,width:u,x:a.x-u/2,y:a.y-h/2}}})(r,{gap:t.gap,innerStrokeWidth:t.innerStrokeWidth,outlineStrokeWidth:t.outlineStrokeWidth});return{innerRing:{props:{className:"focus-ring-inner",fill:"none",height:a.inner.height,stroke:t.innerColor,strokeWidth:t.innerStrokeWidth,width:a.inner.width,x:a.inner.x,y:a.inner.y},type:"rect"},outerRing:{props:{className:"focus-ring-outer",fill:"none",height:a.outer.height,stroke:t.outlineColor,strokeWidth:t.outlineStrokeWidth,width:a.outer.width,x:a.outer.x,y:a.outer.y},type:"rect"}}}(t,a);i(e)}};n();const o=new MutationObserver(e=>{e.some(e=>"attributes"===e.type&&Xt.includes(e.attributeName??""))&&n()});return o.observe(t,{attributeFilter:[...Xt],attributes:!0}),()=>o.disconnect()},[r,a]),{layers:n,resolvedConfig:a}}const Ut=({dataTestId:e,layers:t})=>t?l.jsxs("g",{className:"focus-ring-container",pointerEvents:"none",children:[u.createElement(t.outerRing.type,{...t.outerRing.props,"data-testid":`${e}-focus-outer`}),u.createElement(t.innerRing.type,{...t.innerRing.props,"data-testid":`${e}-focus-inner`})]}):null,Gt=({children:e,dataTestId:t="focus-ring",disabled:r=!1,focusConfig:a,isFocused:n})=>{const i=u.useRef(null),{layers:o}=Yt({elementRef:i,focusConfig:a,isFocused:n}),s=function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})}}(i,e.ref),c=u.cloneElement(e,{ref:s});return l.jsxs(l.Fragment,{children:[n&&!r&&l.jsx(Ut,{dataTestId:t,layers:o??void 0}),c]})},zt=({dataTestId:e="focus-ring",disabled:t=!1,focusConfig:r,isFocused:a,targetRef:n})=>{const{layers:i}=Yt({elementRef:n,focusConfig:r,isFocused:a});return!a||t?null:l.jsx(Ut,{dataTestId:e,layers:i})},Zt=({children:e,dataTestId:t="focus-ring",disabled:r=!1,focusConfig:a,isFocused:n,targetRef:i})=>e?l.jsx(Gt,{dataTestId:t,disabled:r,focusConfig:a,isFocused:n,children:e}):i?l.jsx(zt,{dataTestId:t,disabled:r,focusConfig:a,isFocused:n,targetRef:i}):null,qt=({fill:e="#8f8f8f",x:t,y:r})=>l.jsxs("g",{fill:e,pointerEvents:"none",transform:`translate(${t-5}, ${r-5})`,children:[l.jsx("path",{d:"M4.99948 9.99802C4.47168 9.99802 4.04419 9.64335 4.04419 9.20547V0.79255C4.04419 0.354666 4.47168 0 4.99948 0C5.52728 0 5.95477 0.354666 5.95477 0.79255V9.20745C5.95477 9.64533 5.52728 10 4.99948 10V9.99802Z"}),l.jsx("path",{d:"M0.955289 8.78839C0.427492 8.78839 0 8.43372 0 7.99584V2.00416C0 1.56628 0.427492 1.21161 0.955289 1.21161C1.48309 1.21161 1.91058 1.56628 1.91058 2.00416V7.99584C1.91058 8.43372 1.48309 8.78839 0.955289 8.78839Z"}),l.jsx("path",{d:"M8.08936 7.99584C8.08936 8.43372 8.51685 8.78839 9.04464 8.78839C9.57244 8.78839 9.99993 8.43372 9.99993 7.99584V2.00416C9.99993 1.56628 9.57244 1.21161 9.04464 1.21161C8.51685 1.21161 8.08936 1.56628 8.08936 2.00416V7.99584Z"})]}),Jt=({linesData:e})=>l.jsx(l.Fragment,{children:e.map((e,t)=>l.jsxs("g",{children:[e.config.fill&&e.fillPath&&l.jsx("path",{d:e.fillPath,fill:e.config.fill,fillOpacity:e.config.fillOpacity||.2,stroke:"none"}),l.jsx("path",{d:e.linePath,fill:"none",stroke:e.config.stroke||"#0078D4",strokeWidth:e.config.strokeWidth||1})]},e.config.dataKey||e.config.yKey||t))}),Qt=(e,t,r)=>{const a=e.start/Math.max(1,t-1)*r;return{endX:e.end/Math.max(1,t-1)*r,startX:a}},er=(e,t,r)=>{const a=Math.max(0,Math.min(t,e))/t;return Math.round(a*(r-1))},tr=(e,t,r=.1)=>{const a=Math.max(0,Math.min(e.start,t-1-r));return{end:Math.min(t-1,Math.max(e.end,a+r)),start:a}},rr=e=>({end:Math.max(0,e-1),start:0}),ar=(e,t)=>0===e.start&&e.end===t-1,nr=u.forwardRef(({currentRange:e,dataLength:t,dataTestId:r,endX:a,height:n,onBlur:i,onFocus:o,onKeyDown:s,onMouseDown:c,onTouchStart:d,screenReaderText:u,selectionConfig:h,startX:x},p)=>{const f=h.hideOverlayOnFullRange&&ar(e,t);return l.jsx(l.Fragment,{children:l.jsx("rect",{ref:p,"aria-label":u,"aria-valuemax":t-1,"aria-valuemin":0,"aria-valuetext":u,cursor:"grab","data-testid":r,fill:h.fill,fillOpacity:h.fillOpacity,height:n,role:"slider",stroke:h.stroke,strokeWidth:h.strokeWidth,style:{outline:"none",visibility:f?"hidden":"visible"},tabIndex:0,width:a-x,x:x,y:0,onBlur:i,onFocus:o,onKeyDown:s,onMouseDown:c,onTouchStart:d})})});nr.displayName="SelectionArea";const ir="#8f8f8f",or=({dataTestId:e,focusConfig:t,handlerConfig:r,height:a,isFocused:n,max:i,min:o,onBlur:s,onFocus:c,onKeyDown:d,onMouseDown:u,onTouchStart:h,screenReaderText:x,x:p})=>{const f=a/2,g=(e=>({fill:e?.fill||"#ffffff",iconColor:e?.iconColor||ir,radius:e?.radius||17,stroke:e?.stroke||ir,strokeWidth:e?.strokeWidth||1,verticalLineStroke:e?.verticalLineStroke||ir,verticalLineStrokeWidth:e?.verticalLineStrokeWidth||2}))(r);return l.jsxs("g",{"data-testid":`${e}-group`,children:[l.jsx("line",{pointerEvents:"none",stroke:g.verticalLineStroke,strokeWidth:g.verticalLineStrokeWidth,x1:p,x2:p,y1:0,y2:a}),l.jsx(Zt,{dataTestId:e,focusConfig:t,isFocused:n,children:l.jsx("circle",{"aria-label":x,"aria-valuemax":i,"aria-valuemin":o,"aria-valuetext":x,cursor:"ew-resize",cx:p,cy:f,"data-testid":e,fill:g.fill,r:g.radius,role:"slider",stroke:g.stroke,strokeWidth:g.strokeWidth,style:{outline:"none"},tabIndex:0,onBlur:s,onFocus:c,onKeyDown:d,onMouseDown:u,onTouchStart:h})}),l.jsx(qt,{fill:g.iconColor,x:p,y:f})]})},sr={END_HANDLER:"END_HANDLER",SELECTION_AREA:"SELECTION_AREA",START_HANDLER:"START_HANDLER"},cr=e=>{const{currentRange:t,dataLength:r,interactionConfig:a,onRangeChange:n,width:i}=e,o=u.useRef(null),[s,c]=u.useState(null),d=u.useCallback(e=>()=>{c(e)},[]),l=u.useCallback(e=>()=>{c(e)},[]),h=u.useCallback(e=>{if(!s||!o.current)return;const c=o.current;if(!c)return;const d=e-c.getBoundingClientRect().left,l=er(d,i,r),u=((e,t,r,a,n)=>{const i={...t};if(e===sr.START_HANDLER)i.start=Math.max(0,Math.min(r,t.end-n.minHandlerDistance));else if(e===sr.END_HANDLER)i.end=Math.min(a-1,Math.max(r,t.start+n.minHandlerDistance));else if(e===sr.SELECTION_AREA){const e=t.end-t.start,n=Math.max(0,Math.min(a-1-e,r-e/2));i.start=n,i.end=n+e}return i})(s,t,l,r,a),h=tr(u,r,a.minHandlerDistance);n(h)},[s,i,r,t,n,a]),x=u.useCallback(e=>{h(e.clientX)},[h]),p=u.useCallback(e=>{0!==e.touches.length&&(e.preventDefault(),h(e.touches[0].clientX))},[h]),f=u.useCallback(()=>{c(null)},[]),g=u.useCallback(()=>{c(null)},[]);return u.useEffect(()=>{if(s)return document.addEventListener("mousemove",x),document.addEventListener("mouseup",f),document.addEventListener("touchmove",p,{passive:!1}),document.addEventListener("touchend",g),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",p),document.removeEventListener("touchend",g)}},[s,x,f,p,g]),{groupRef:o,handleMouseDown:d,handleTouchStart:l,isDragging:s}},dr=e=>{const{currentRange:t,dataLength:r,interactionConfig:a,onRangeChange:n}=e;return{handleKeyDown:u.useCallback(e=>i=>{const o=i.shiftKey?a.keyboardFastStep:a.keyboardStep;let s={...t};switch(i.key){case"ArrowLeft":case"ArrowDown":i.preventDefault(),s=((e,t,r,a)=>{const n={...t};if(e===sr.START_HANDLER)n.start=Math.max(0,t.start-r);else if(e===sr.END_HANDLER)n.end=Math.max(t.start+a.minHandlerDistance,t.end-r);else if(e===sr.SELECTION_AREA){const e=t.end-t.start,a=Math.max(0,t.start-r);n.start=a,n.end=a+e}return n})(e,t,o,a);break;case"ArrowRight":case"ArrowUp":i.preventDefault(),s=((e,t,r,a,n)=>{const i={...t};if(e===sr.START_HANDLER)i.start=Math.min(t.end-n.minHandlerDistance,t.start+r);else if(e===sr.END_HANDLER)i.end=Math.min(a-1,t.end+r);else if(e===sr.SELECTION_AREA){const e=t.end-t.start,n=Math.min(a-1-e,t.start+r);i.start=n,i.end=n+e}return i})(e,t,o,r,a);break;case"Home":i.preventDefault(),s=((e,t,r)=>{const a={...t};if(e===sr.START_HANDLER)a.start=0;else if(e===sr.END_HANDLER)a.end=r-1;else if(e===sr.SELECTION_AREA){const e=t.end-t.start;a.start=0,a.end=e}return a})(e,t,r);break;case"End":i.preventDefault(),s=((e,t,r,a)=>{const n={...t};if(e===sr.START_HANDLER)n.start=t.end-a.minHandlerDistance;else if(e===sr.END_HANDLER)n.end=r-1;else if(e===sr.SELECTION_AREA){const e=t.end-t.start;n.start=r-1-e,n.end=r-1}return n})(e,t,r,a);break;default:return}const c=tr(s,r,a.minHandlerDistance);n(c)},[t,r,n,a])}},lr=()=>{const[e,t]=u.useState(null),r=u.useCallback(e=>()=>t(e),[]);return{handleBlur:u.useCallback(()=>{t(null)},[]),handleFocus:r,isFocused:u.useCallback(t=>e===t,[e])}},ur=(e,t)=>{const r=Math.floor(e);return Math.max(0,Math.min(t,r))},hr=(e,t)=>{const r=Math.ceil(e);return Math.max(0,Math.min(t,r))},xr=(e,t)=>{const r=Math.max(0,t-1);return{endIndex:hr(e.end,r),startIndex:ur(e.start,r)}},pr=({data:e,initialRange:t,onDataChange:r})=>{const a=t||rr(e.length),[n,i]=u.useState(a),o=t=>{if(!r||0===e.length)return;const{endIndex:a,startIndex:n}=xr(t,e.length),i=e.slice(n,a+1);r(i)};return u.useEffect(()=>{o(n)},[]),{currentRange:n,handleRangeChange:e=>{i(e),o(e)}}},fr=e=>({keyboardFastStep:e?.keyboardFastStep??2,keyboardStep:e?.keyboardStep??1,minHandlerDistance:e?.minHandlerDistance??1}),gr=e=>{if(0===e.length)return"";if(1===e.length)return`M ${e[0][0]} ${e[0][1]}`;const[t,...r]=e;let a=`M ${t[0]} ${t[1]}`;return r.forEach((e,n)=>{const i=0===n?t:r[n-1],[o,s]=i,[c,d]=e,l=.3*(c-o),u=[o+l,s],h=[c-l,d];a+=` C ${u[0]} ${u[1]}, ${h[0]} ${h[1]}, ${c} ${d}`}),a},Rr=(e,t,r,a)=>{if(0===e.length||0===t.length)return[];const n=.05*a,i=a-2*n,o=t.flatMap(t=>e.map(e=>Number(e[t.yKey]))),s=Math.min(...o),c=Math.max(...o)-s||1;return t.map(t=>{const o=e.map((a,o)=>[o/Math.max(1,e.length-1)*r,n+i-(Number(a[t.yKey])-s)/c*i]),d=t.curved?gr(o):`M ${o.map(([e,t])=>`${e},${t}`).join(" L ")}`;let l="";return t.fill&&(l=t.curved?`${gr(o)} L ${r} ${a} L 0 ${a} Z`:`${d} L ${r},${a} L 0,${a} Z`),{config:t,fillPath:l,linePath:d}})},Ar=(e,t,r)=>e[r]?.[t]?.toString()||`${r}`,Er=(e,t,r)=>{if(!e)return e;const a=new RegExp("{{startValue}}","g"),n=new RegExp("{{endValue}}","g");return e.replace(a,t).replace(n,r)};e.Bar=je,e.BarChart=ct,e.BarOrientation=O,e.ChartText=Ye,e.DefaultCanvasConfig=$,e.ErrorType=H,e.FOCUS_DEFAULT=Ft,e.FocusRing=Zt,e.ForeignObject=Lt,e.HandlerIcon=qt,e.Line=Ke,e.LineChart=bt,e.LineRenderer=Jt,e.Node=we,e.NodeType=Oe,e.Path=Me,e.PieChart=jt,e.Positions=w,e.SelectionArea=nr,e.SvgContainer=h,e.Tick=Ue,e.TickDataUtils=At,e.XAxis=Ze,e.YAxis=et,e.ZoomArea=({ariaHidden:e,ariaLabel:t,backgroundColor:r,canvasConfig:a,caption:n,classNames:i,data:o,focusConfig:s,handlerConfig:c,height:d="40px",initialRange:x,interactionConfig:p,lines:f,onDataChange:g,role:R,screenReaderTextConfig:A,selectionConfig:E,width:_="100%",xKey:T,...y})=>{const v="zoom-area",m=fr(p),C=(S=E,{fill:S?.fill??"#0078d4",fillOpacity:S?.fillOpacity??.5,hideOverlayOnFullRange:S?.hideOverlayOnFullRange??true,stroke:S?.stroke??"#0078d4",strokeWidth:S?.strokeWidth??0});var S;const{currentRange:I,handleRangeChange:$}=pr({data:o,initialRange:x,onDataChange:g}),{parsedCanvas:k,viewBox:L}=N({canvasConfig:a,dataTestId:v,height:d,width:_}),O=b(o),H=JSON.stringify(f),w=u.useRef(null),P=((e,t,r,a)=>{const{endIndex:n,startIndex:i}=xr(r,e.length),o=Ar(e,t,i),s=Ar(e,t,n),c=Er(a?.startHandler,o,s)??o;return{endHandler:Er(a?.endHandler,o,s)??s,selectionArea:Er(a?.selectionArea,o,s)??`${o} - ${s}`,startHandler:c}})(o,T,I,A),M=u.useMemo(()=>Rr(o,f,k.width,k.height),[O,H,k.width,k.height]),{endX:B,startX:D}=u.useMemo(()=>Qt(I,o.length,k.width),[I,O,k.width]),{handleBlur:j,handleFocus:F,isFocused:V}=lr(),{handleKeyDown:X}=dr({currentRange:I,dataLength:o.length,interactionConfig:m,onRangeChange:$}),{groupRef:W,handleMouseDown:K,handleTouchStart:Y}=cr({currentRange:I,dataLength:o.length,interactionConfig:m,onRangeChange:$,width:k.width});return l.jsxs(h,{ref:W,ariaHidden:e,ariaLabel:t,backgroundColor:r,caption:n,className:i,"data-testid":v,height:d,overflow:"visible",role:R,viewBox:L,width:_,...y,children:[l.jsx(Jt,{linesData:M}),l.jsx(nr,{ref:w,currentRange:I,dataLength:o.length,dataTestId:`${v}-selection-area`,endX:B,height:k.height,screenReaderText:P.selectionArea,selectionConfig:C,startX:D,onBlur:j,onFocus:F(sr.SELECTION_AREA),onKeyDown:X(sr.SELECTION_AREA),onMouseDown:K(sr.SELECTION_AREA),onTouchStart:Y(sr.SELECTION_AREA)}),l.jsx(or,{dataTestId:`${v}-start-handler`,focusConfig:s,handlerConfig:c,height:k.height,isFocused:V(sr.START_HANDLER),max:I.end-m.minHandlerDistance,min:0,screenReaderText:P.startHandler,type:sr.START_HANDLER,value:I.start,x:D,onBlur:j,onFocus:F(sr.START_HANDLER),onKeyDown:X(sr.START_HANDLER),onMouseDown:K(sr.START_HANDLER),onTouchStart:Y(sr.START_HANDLER)}),l.jsx(or,{dataTestId:`${v}-end-handler`,focusConfig:s,handlerConfig:c,height:k.height,isFocused:V(sr.END_HANDLER),max:o.length-1,min:I.start+m.minHandlerDistance,screenReaderText:P.endHandler,type:sr.END_HANDLER,value:I.end,x:B,onBlur:j,onFocus:F(sr.END_HANDLER),onKeyDown:X(sr.END_HANDLER),onMouseDown:K(sr.END_HANDLER),onTouchStart:Y(sr.END_HANDLER)}),l.jsx(Zt,{dataTestId:"selection-area-focus",focusConfig:{...s,variant:"bounding-box"},isFocused:V(sr.SELECTION_AREA),targetRef:w})]})},e.ZoomAreaElements=sr,e.ZoomHandler=or,e.calculateHandlerPositions=Qt,e.calculateLinesPathData=Rr,e.clampRange=tr,e.createDefaultRange=rr,e.generateCurvedPath=gr,e.getFocusConfig=Vt,e.getInteractionConfig=fr,e.isFullRange=ar,e.mouseToDataIndex=er,e.normalizeToArray=e=>Array.isArray(e)?e:[e],e.useDragInteraction=cr,e.useKeyboardNavigation=dr,e.useZoomAreaFocus=lr,e.useZoomData=pr,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KubitCharts={})}(this,function(e){"use strict";var t,r,a,n,i={exports:{}},o={},s={exports:{}},c={};function d(){return r||(r=1,s.exports=function(){if(t)return c;t=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),x=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function R(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}function A(){}function E(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}R.prototype.isReactComponent={},R.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},R.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},A.prototype=R.prototype;var T=E.prototype=new A;T.constructor=E,f(T,R.prototype),T.isPureReactComponent=!0;var y=Array.isArray,_=Object.prototype.hasOwnProperty,v={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function m(t,r,a){var n,i={},o=null,s=null;if(null!=r)for(n in void 0!==r.ref&&(s=r.ref),void 0!==r.key&&(o=""+r.key),r)_.call(r,n)&&!C.hasOwnProperty(n)&&(i[n]=r[n]);var c=arguments.length-2;if(1===c)i.children=a;else if(1<c){for(var d=Array(c),l=0;l<c;l++)d[l]=arguments[l+2];i.children=d}if(t&&t.defaultProps)for(n in c=t.defaultProps)void 0===i[n]&&(i[n]=c[n]);return{$$typeof:e,type:t,key:o,ref:s,props:i,_owner:v.current}}function S(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var I=/\/+/g;function $(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function N(t,a,n,i,o){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case e:case r:c=!0}}if(c)return o=o(c=t),t=""===i?"."+$(c,0):i,y(o)?(n="",null!=t&&(n=t.replace(I,"$&/")+"/"),N(o,a,n,"",function(e){return e})):null!=o&&(S(o)&&(o=function(t,r){return{$$typeof:e,type:t.type,key:r,ref:t.ref,props:t.props,_owner:t._owner}}(o,n+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(I,"$&/")+"/")+t)),a.push(o)),1;if(c=0,i=""===i?".":i+":",y(t))for(var d=0;d<t.length;d++){var l=i+$(s=t[d],d);c+=N(s,a,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=x&&e[x]||e["@@iterator"])?e:null}(t),"function"==typeof l)for(t=l.call(t),d=0;!(s=t.next()).done;)c+=N(s=s.value,a,n,l=i+$(s,d++),o);else if("object"===s)throw a=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(t).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");return c}function b(e,t,r){if(null==e)return e;var a=[],n=0;return N(e,a,"","",function(e){return t.call(r,e,n++)}),a}function k(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},L={transition:null},H={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:L,ReactCurrentOwner:v};function w(){throw Error("act(...) is not supported in production builds of React.")}return c.Children={map:b,forEach:function(e,t,r){b(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return b(e,function(){t++}),t},toArray:function(e){return b(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},c.Component=R,c.Fragment=a,c.Profiler=i,c.PureComponent=E,c.StrictMode=n,c.Suspense=l,c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,c.act=w,c.cloneElement=function(t,r,a){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=f({},t.props),i=t.key,o=t.ref,s=t._owner;if(null!=r){if(void 0!==r.ref&&(o=r.ref,s=v.current),void 0!==r.key&&(i=""+r.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(d in r)_.call(r,d)&&!C.hasOwnProperty(d)&&(n[d]=void 0===r[d]&&void 0!==c?c[d]:r[d])}var d=arguments.length-2;if(1===d)n.children=a;else if(1<d){c=Array(d);for(var l=0;l<d;l++)c[l]=arguments[l+2];n.children=c}return{$$typeof:e,type:t.type,key:i,ref:o,props:n,_owner:s}},c.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},c.createElement=m,c.createFactory=function(e){var t=m.bind(null,e);return t.type=e,t},c.createRef=function(){return{current:null}},c.forwardRef=function(e){return{$$typeof:d,render:e}},c.isValidElement=S,c.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:k}},c.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},c.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},c.unstable_act=w,c.useCallback=function(e,t){return O.current.useCallback(e,t)},c.useContext=function(e){return O.current.useContext(e)},c.useDebugValue=function(){},c.useDeferredValue=function(e){return O.current.useDeferredValue(e)},c.useEffect=function(e,t){return O.current.useEffect(e,t)},c.useId=function(){return O.current.useId()},c.useImperativeHandle=function(e,t,r){return O.current.useImperativeHandle(e,t,r)},c.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},c.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},c.useMemo=function(e,t){return O.current.useMemo(e,t)},c.useReducer=function(e,t,r){return O.current.useReducer(e,t,r)},c.useRef=function(e){return O.current.useRef(e)},c.useState=function(e){return O.current.useState(e)},c.useSyncExternalStore=function(e,t,r){return O.current.useSyncExternalStore(e,t,r)},c.useTransition=function(){return O.current.useTransition()},c.version="18.3.1",c}()),s.exports}var l=(n||(n=1,i.exports=function(){if(a)return o;a=1;var e=d(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,a){var o,c={},d=null,l=null;for(o in void 0!==a&&(d=""+a),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(l=r.ref),r)n.call(r,o)&&!s.hasOwnProperty(o)&&(c[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===c[o]&&(c[o]=r[o]);return{$$typeof:t,type:e,key:d,ref:l,props:c,_owner:i.current}}return o.Fragment=r,o.jsx=c,o.jsxs=c,o}()),i.exports),u=d();const h=u.forwardRef(({ariaHidden:e,ariaLabel:t,backgroundColor:r,caption:a,children:n,className:i,dataTestId:o,height:s,imageSrc:c,overflow:d,radius:u="0px",role:h,tabIndex:x,viewBox:p,width:f,...g},R)=>l.jsxs("svg",{ref:R,"aria-hidden":e,"aria-label":t,className:i,"data-testid":o,height:s,role:h,style:{backgroundColor:r,borderRadius:u,overflow:d},tabIndex:x,viewBox:p,width:f,onMouseDown:e=>e.preventDefault(),...g,children:[a&&l.jsx("title",{children:a}),c&&l.jsx("image",{height:s,href:c,width:f,x:"0",y:"0"}),n]})),x={},p=e=>{const[t]=u.useState(()=>(e=>(x[e]||(x[e]=0),x[e]++))(e||"$component$"));return`${e}${t}`},f=()=>"undefined"!=typeof window&&"undefined"!=typeof document,g=()=>f()?document:void 0,R=e=>{const t=g();if(t)return t.createElementNS("http://www.w3.org/2000/svg",e)},A="%",E="rem",T={[A]:A,[E]:E},y="WIDTH",_=/^(\d+(\.\d+)?)(px|rem|%)?$/,v=e=>{if("number"==typeof e)return{unit:void 0,value:e};const t=e.match(_);if(!t)throw new Error(`Invalid string format: "${e}"`);const r=parseFloat(t[1]),a=t[3];return{unit:T[a],value:r}},C=(e,t,r)=>{const a=r.parentElement;return a?e/100*(t===y?a.clientWidth:a.clientHeight):0},m=e=>{const t=g();if(!t)return 16*e;const r=(e=>{const t=f()?window:void 0;if(t)return t.getComputedStyle(e)})(t.documentElement);return r?e*(parseFloat(r.fontSize)||16):16*e},S=/^(\d+(\.\d+)?)(px|rem|%)?$/,I=e=>{if("number"==typeof e)return e;const t=e.match(S);if(!t)throw new Error(`Invalid string format: "${e}"`);const r=t[1];return t[3]===E?16*parseFloat(r):parseFloat(r)},$=({canvasConfig:e,dataTestId:t,extraSpace:r=0,height:a,width:n})=>{const[i,o]=u.useState({height:0,width:0}),s=u.useMemo(()=>e||{extraSpace:r,height:a,width:n},[e,n,a,r]),{extraSpace:c,height:d,width:l}=s,h=c?I(c):void 0;u.useEffect(()=>{if(!f())return;const e=(e=>{const t=g();return t?t.querySelector(e):null})(`[data-testid="${t}"]`);if(!e)return;const r=()=>{const{parsedCanvasHeight:t,parsedCanvasWidth:r}=(({canvasHeight:e,canvasWidth:t,svgElement:r})=>{const{unit:a,value:n}=v(t),i=a===A?C(n,y,r):a===E?m(n):n,{unit:o,value:s}=v(e);return{parsedCanvasHeight:o===A?C(s,"HEIGHT",r):o===E?m(s):s,parsedCanvasWidth:i}})({canvasHeight:d,canvasWidth:l,svgElement:e});o({height:t,width:r})};r();const a=new ResizeObserver(()=>{r()});return a.observe(e),()=>{a.disconnect()}},[l,d,t]);const x=u.useMemo(()=>{const e=((e,t,r=0)=>`${-r} ${-r} ${e} ${t}`)(i.width,i.height,h);return e},[i.width,i.height,h]);return{parsedCanvas:i,parsedCanvasExtraSpace:h,viewBox:x}},N={extraSpace:0,height:80,width:100},b=e=>{const t=new Map,r=()=>{const e={};return t.forEach((t,r)=>{e[r]=t}),e};return{addError:(a,n)=>{if(!n)return;const i={...n,type:a},o=t.get(a)||[];if(o.push(i),t.set(a,o),e){const t=r(),a={};Object.entries(t).forEach(([e,t])=>{const r=e;Array.isArray(t)&&t.length,a[r]=t}),e(a)}},clearErrors:()=>{t.clear(),e&&e({})},getAccumulatedErrors:r}},k=e=>JSON.stringify(e),O=u.createContext({}),L={HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL"},H={BAR_CHART_CONTEXT_ERROR:"BAR_CHART_CONTEXT_ERROR",BAR_CHART_PATH_ERROR:"BAR_CHART_PATH_ERROR",BAR_CHART_SEPARATOR_ERROR:"BAR_CHART_SEPARATOR_ERROR",BAR_CHART_X_AXIS_ERROR:"BAR_CHART_X_AXIS_ERROR",BAR_CHART_Y_AXIS_ERROR:"BAR_CHART_Y_AXIS_ERROR",CUSTOM_BACKGROUND_CHART_CONTEXT_ERROR:"CUSTOM_BACKGROUND_CHART_CONTEXT_ERROR",CUSTOM_BACKGROUND_CHART_PLOT_ERROR:"CUSTOM_BACKGROUND_CHART_PLOT_ERROR",GENERIC:"GENERIC",LINE_CHART_CONTEXT_ERROR:"LINE_CHART_CONTEXT_ERROR",LINE_CHART_PATH_ERROR:"LINE_CHART_PATH_ERROR",LINE_CHART_PROJECTION_ERROR:"LINE_CHART_PROJECTION_ERROR",LINE_CHART_SEPARATOR_ERROR:"LINE_CHART_SEPARATOR_ERROR",LINE_CHART_X_AXIS_ERROR:"LINE_CHART_X_AXIS_ERROR",LINE_CHART_Y_AXIS_ERROR:"LINE_CHART_Y_AXIS_ERROR",PIE_CHART_CONTEXT_ERROR:"PIE_CHART_CONTEXT_ERROR",PIE_CHART_PATH_ERROR:"PIE_CHART_PATH_ERROR",PIE_CHART_SEGMENT_ERROR:"PIE_CHART_SEGMENT_ERROR"},w={BOTTOM:"BOTTOM",CENTER:"CENTER",CUSTOM:"CUSTOM",LEFT:"LEFT",RIGHT:"RIGHT",TOP:"TOP"},M=Object.entries({BAR_CHART_AXIS_INSUFFICIENT_TICKS:"Axis requires at least two ticks for proper bar scaling",BAR_CHART_AXIS_INVALID_SCALE:"Invalid axis scale for current bar values",BAR_CHART_DISTRIBUTION_INSUFFICIENT_SPACE:"Insufficient space for bar distribution with current configuration",BAR_CHART_DISTRIBUTION_INVALID_GAP:"Invalid gap between bars - must be >= 0 and allow bar rendering",BAR_CHART_DISTRIBUTION_OVERLAP:"Bar distribution results in overlapping bars",BAR_CHART_EMPTY_DATA:"No valid data entries found for bar chart rendering",BAR_CHART_INSUFFICIENT_SPACE_HEIGHT:"Insufficient height to render bars. Consider reducing bar count or increasing chart height",BAR_CHART_INSUFFICIENT_SPACE_WIDTH:"Insufficient width to render bars. Consider reducing bar width or increasing chart width",BAR_CHART_INVALID_VALUE:"Bar value must be a valid number for rendering",BAR_CHART_NEGATIVE_VALUE:"Negative values are not supported in this bar configuration",BAR_CHART_NO_DATA:"Data validation failed: no data provided for bar chart rendering",BAR_CHART_OVERLAP:"Bars are overlapping due to insufficient spacing",BAR_CHART_SEPARATOR_X_OUT_OF_RANGE:"Separator X position is outside valid bar range",BAR_CHART_SEPARATOR_Y_OUT_OF_RANGE:"Separator Y position is outside valid bar range",BAR_CHART_STACK_INVALID:"Invalid stacking configuration - all bars in stack must have consistent configuration",BAR_CHART_STACK_MISSING_VALUES:"Stack is incomplete - all bars in stack must have valid values"}).reduce((e,[t,r])=>(e[t]=new Error(r),e),{}),B=Object.entries({LINE_CHART_INVALID_CANVAS:"Canvas dimensions validation failed: both width and height must be > 0",LINE_CHART_NO_DATA:"Data validation failed: no data provided for chart rendering",LINE_CHART_PATH_ALL_VALUES_NULL:"Path data cannot be generated - all Y values are null or undefined",LINE_CHART_PATH_INSUFFICIENT_POINTS:"Unable to calculate curved path with insufficient points (minimum 2 required)",LINE_CHART_PATH_INVALID_DATAKEY:"DataKey must be a valid string",LINE_CHART_PROJECTION_INVALID_BOUNDS:"Invalid projection bounds - upper projection must be below lower projection",LINE_CHART_PROJECTION_LOWER_X_OUT_OF_RANGE:"Lower projection X coordinate is outside valid range (0-100)",LINE_CHART_PROJECTION_LOWER_Y_OUT_OF_RANGE:"Lower projection Y coordinate is outside chart area",LINE_CHART_PROJECTION_UPPER_X_OUT_OF_RANGE:"Upper projection X coordinate is outside valid range (0-100)",LINE_CHART_PROJECTION_UPPER_Y_OUT_OF_RANGE:"Upper projection Y coordinate is outside chart area",LINE_CHART_SEPARATOR_INVALID_COORDINATES:"Invalid separator position - coordinates overlap, cannot render separator",LINE_CHART_SEPARATOR_INVALID_X_BREAK_AXIS:"Invalid xBreakAxis value: cannot be parsed as number",LINE_CHART_SEPARATOR_INVALID_Y_BREAK_AXIS:"Invalid yBreakAxis value: cannot be parsed as number",LINE_CHART_SEPARATOR_X_OUT_OF_RANGE:"xBreakAxis value is outside data range",LINE_CHART_SEPARATOR_Y_OUT_OF_RANGE:"yBreakAxis value is outside data range",LINE_CHART_SINGLE_POINT:"Data validation failed: single data point provided, minimum 2 required for line chart",LINE_CHART_X_AXIS_IDENTICAL_VALUES:"X-axis range validation failed: minimum and maximum values are identical, cannot render chart line",LINE_CHART_X_AXIS_INSUFFICIENT_TICKS:"X-axis tick calculation: insufficient data points (1/2 minimum required)",LINE_CHART_X_AXIS_ZERO_LENGTH:"X-axis geometry validation failed: start and end X coordinates are identical (x1=x2), axis has zero length",LINE_CHART_Y_AXIS_IDENTICAL_VALUES:"Y-axis range validation failed: minimum and maximum values are identical, cannot render chart line",LINE_CHART_Y_AXIS_INSUFFICIENT_TICKS:"Y-axis tick calculation: insufficient data points (1/2 minimum required)",LINE_CHART_Y_AXIS_ZERO_LENGTH:"Y-axis geometry validation failed: start and end Y coordinates are identical (y1=y2), axis has zero length"}).reduce((e,[t,r])=>(e[t]=new Error(r),e),{}),P=Object.entries({PIE_CHART_EMPTY_DATA:"PieChart data is empty or undefined",PIE_CHART_INNER_RADIUS_OUT_OF_RANGE:"Inner radius must be less than radius",PIE_CHART_INVALID_CANVAS_DIMENSIONS:"Invalid canvas dimensions for PieChart",PIE_CHART_INVALID_DATA_KEY:"Invalid or missing dataKey in PieChart data",PIE_CHART_INVALID_INNER_RADIUS:"Invalid innerRadius value",PIE_CHART_INVALID_RADIUS:"Invalid radius value",PIE_CHART_INVALID_SEGMENT_VALUE:"Invalid segment value (non-numeric)",PIE_CHART_INVALID_TOTAL:"PieChart total value is zero or invalid",PIE_CHART_MISSING_SEGMENT_NAME:"Segment is missing required name property",PIE_CHART_NEGATIVE_SEGMENT_VALUE:"Segment value cannot be negative"}).reduce((e,[t,r])=>(e[t]=new Error(r),e),{}),D=(e,t)=>new Error(`Invalid value "${e}" for bar with dataKey "${t}". Must be a valid number.`),j=(e,t)=>new Error(`Negative value ${e} not allowed for bar with dataKey "${t}" in current configuration`),F=(e,t)=>new Error(`Invalid segment value for "${t}": "${e}" is not a valid number`),X=(e,t)=>new Error(`Negative segment value for "${t}": ${e} (values must be >= 0)`),V=e=>new Error(`DataKey "${e}" not found in PieChart dataset`),W=e=>new Error(`Data array for key "${e}" is empty`),K=(e,t)=>new Error(`Invalid total value for "${e}": ${t} (must be > 0)`),U=(e,t,r)=>new Error(`Invalid group at index ${t} in "${e}": missing required property "${r}"`),Y=e=>new Error(`Invalid radius value: "${e}" (must be a positive number)`),G=e=>new Error(`Invalid innerRadius value: "${e}" (must be a positive number or zero)`),z=(e,t)=>new Error(`innerRadius (${e}) must be less than radius (${t}) for donut chart rendering`),Z="INVALID_X_TICK",q="BAR_CHART_NO_DATA",J="LINE_CHART_NO_DATA",Q="LINE_CHART_PATH_ALL_VALUES_NULL",ee="LINE_CHART_PATH_INSUFFICIENT_POINTS",te="LINE_CHART_PATH_INVALID_DATAKEY",re="LINE_CHART_SEPARATOR_INVALID_COORDINATES",ae="LINE_CHART_SINGLE_POINT",ne="LINE_CHART_X_AXIS_IDENTICAL_VALUES",ie="LINE_CHART_X_AXIS_INSUFFICIENT_TICKS",oe="LINE_CHART_X_AXIS_ZERO_LENGTH",se="LINE_CHART_Y_AXIS_IDENTICAL_VALUES",ce="LINE_CHART_Y_AXIS_INSUFFICIENT_TICKS",de="LINE_CHART_Y_AXIS_ZERO_LENGTH",le={...M,...B,...P,INVALID_X_TICK:new Error("[getXTicks] Invalid X tick values calculated")},ue=e=>le[e],he=e=>new Error(`DataKey "${e}" not found in dataset`),xe=(e,t)=>new Error(`Canvas dimensions validation failed: width=${e}, height=${t} (both must be > 0)`),pe=e=>new Error(`Invalid xBreakAxis value: '${e}' cannot be parsed as number`),fe=e=>new Error(`Invalid yBreakAxis value: '${e}' cannot be parsed as number`),ge=(e,t,r)=>new Error(`xBreakAxis value ${e} is outside data range (${t} - ${r})`),Re=(e,t,r)=>new Error(`yBreakAxis value ${e} is outside data range (${t} - ${r})`),Ae=(e,t,r)=>t.map(t=>{if(isNaN(Number(t))){const r=e.find(e=>String(e.value)===String(t));return r?r.position:0}const{index:a,tick:n}=e.reduce((e,r,a)=>Math.abs(Number(r.value)-Number(t))<=Math.abs(Number(e.tick.value)-Number(t))?{index:a,tick:r}:e,{index:0,tick:e[0]}),i=Number(t),o=Number(n.value);if(i!==o){const t=e.map(e=>Number(e.value)),s=Math.min(...t),c=Math.max(...t);if(i<s)return e.at(0)?.position;if(i>c)return e.at(-1)?.position;const d=Math.abs(o-i),l=i>o,u=l?e[a+1]:e[a-1],h=100*d/Math.abs(Number(u.value)-o),x=Math.abs(n.position-u.position)*h/100;return r?l?n.position+x:n.position-x:l?n.position-x:n.position+x}return n.position}),Ee="0",Te="1",ye="fallbackData",_e={FOCUS_COLOR:"#0078D4",FOCUS_INNER:"#ffffff",INNER_FOCUS_STROKE_WIDTH:2,OUTER_FOCUS_STROKE_WIDTH:2,OUTLINES_GAP:0,VARIANT:"adaptive"},ve=e=>({gap:e?.gap??_e.OUTLINES_GAP,innerColor:e?.innerColor??_e.FOCUS_INNER,innerStrokeWidth:e?.innerStrokeWidth??_e.INNER_FOCUS_STROKE_WIDTH,outlineColor:e?.outlineColor??_e.FOCUS_COLOR,outlineStrokeWidth:e?.outlineStrokeWidth??_e.OUTER_FOCUS_STROKE_WIDTH,variant:e?.variant??_e.VARIANT}),Ce=["cx","cy","r","x","y","width","height","rx","ry","d","points","x1","y1","x2","y2"],me=["stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity"],Se=["circle","rect","ellipse","path","polygon","polyline","line"];function Ie({elementRef:e,focusConfig:t,isFocused:r}){const a=u.useMemo(()=>ve(t),[t]),[n,i]=u.useState(void 0);return u.useEffect(()=>{if(!e?.current||!r)return void i(void 0);const t=e.current,n=()=>{if("adaptive"===a.variant){const e=function(e,t){const r=e.tagName.toLowerCase();if(!Se.includes(r))return;const a=e.getAttribute("stroke-width")||e.getAttribute("strokeWidth"),n=parseFloat(a||"0"),i=e.getAttribute("fill"),o="line"===r||"polyline"===r||"path"===r&&"none"===i,s=n+2*(t.outlineStrokeWidth+t.innerStrokeWidth),c=n+2*t.innerStrokeWidth,d=o?e.getAttribute("stroke-linecap")||"round":void 0,l=o?e.getAttribute("stroke-linejoin")||"round":"miter",u=o?void 0:"10",h=function(e){const t={},r=new Set([...Ce,...me]);for(let a=0;a<e.attributes.length;a++){const n=e.attributes[a];r.has(n.name)&&(t[n.name]=n.value)}return t}(e);return{innerRing:{props:{...h,className:"focus-ring-inner",fill:"none",stroke:t.innerColor,strokeLinecap:d,strokeLinejoin:l,strokeMiterlimit:u,strokeWidth:c},type:r},outerRing:{props:{...h,className:"focus-ring-outer",fill:"none",stroke:t.outlineColor,strokeLinecap:d,strokeLinejoin:l,strokeMiterlimit:u,strokeWidth:s},type:r}}}(t,a);i(e)}if("bounding-box"===a.variant){const e=function(e,t){const r=function(e){try{const t=e.getBBox();if(t.width<=0||t.height<=0)return null;const r=window.getComputedStyle(e),a=parseFloat(r.strokeWidth||"0");return{elementHeight:t.height,elementPosition:{x:t.x+t.width/2,y:t.y+t.height/2},elementStrokeWidth:a,elementWidth:t.width}}catch{return null}}(e);if(!r)return;const a=((e,t)=>{const{elementHeight:r,elementPosition:a,elementStrokeWidth:n,elementWidth:i}=e,{gap:o,innerStrokeWidth:s,outlineStrokeWidth:c}=t,d=i+n+s+2*o,l=r+n+s+2*o,u=d+s+c,h=l+s+c;return{inner:{height:l,width:d,x:a.x-d/2,y:a.y-l/2},outer:{height:h,width:u,x:a.x-u/2,y:a.y-h/2}}})(r,{gap:t.gap,innerStrokeWidth:t.innerStrokeWidth,outlineStrokeWidth:t.outlineStrokeWidth});return{innerRing:{props:{className:"focus-ring-inner",fill:"none",height:a.inner.height,stroke:t.innerColor,strokeWidth:t.innerStrokeWidth,width:a.inner.width,x:a.inner.x,y:a.inner.y},type:"rect"},outerRing:{props:{className:"focus-ring-outer",fill:"none",height:a.outer.height,stroke:t.outlineColor,strokeWidth:t.outlineStrokeWidth,width:a.outer.width,x:a.outer.x,y:a.outer.y},type:"rect"}}}(t,a);i(e)}};n();const o=new MutationObserver(e=>{e.some(e=>"attributes"===e.type&&Ce.includes(e.attributeName??""))&&n()});return o.observe(t,{attributeFilter:[...Ce],attributes:!0}),()=>o.disconnect()},[r,a]),{layers:n,resolvedConfig:a}}const $e=({dataTestId:e,layers:t})=>t?l.jsxs("g",{className:"focus-ring-container",pointerEvents:"none",children:[u.createElement(t.outerRing.type,{...t.outerRing.props,"data-testid":`${e}-focus-outer`}),u.createElement(t.innerRing.type,{...t.innerRing.props,"data-testid":`${e}-focus-inner`})]}):null,Ne=({children:e,dataTestId:t="focus-ring",disabled:r=!1,focusConfig:a,isFocused:n})=>{const i=u.useRef(null),{layers:o}=Ie({elementRef:i,focusConfig:a,isFocused:n}),s=function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})}}(i,e.ref),c=u.cloneElement(e,{ref:s});return l.jsxs(l.Fragment,{children:[n&&!r&&l.jsx($e,{dataTestId:t,layers:o??void 0}),c]})},be=({dataTestId:e="focus-ring",disabled:t=!1,focusConfig:r,isFocused:a,targetRef:n})=>{const{layers:i}=Ie({elementRef:n,focusConfig:r,isFocused:a});return!a||t?null:l.jsx($e,{dataTestId:e,layers:i})},ke=({children:e,dataTestId:t="focus-ring",disabled:r=!1,focusConfig:a,isFocused:n,targetRef:i})=>e?l.jsx(Ne,{dataTestId:t,disabled:r,focusConfig:a,isFocused:n,children:e}):i?l.jsx(be,{dataTestId:t,disabled:r,focusConfig:a,isFocused:n,targetRef:i}):null,Oe=(e,t)=>{const[r,a]=u.useState(!1),n=u.useCallback(t=>{a(!0),e?.(t)},[e]);return{handleBlur:u.useCallback(e=>{a(!1),t?.(e)},[t]),handleFocus:n,isFocused:r}},Le=(e,t)=>{const[r,a]=u.useState(!1);return{handleMouseEnter:u.useCallback(t=>{a(!0),e?.(t)},[e]),handleMouseLeave:u.useCallback(e=>{a(!1),t?.(e)},[t]),isHovered:r}};(()=>{if("undefined"!=typeof globalThis&&"process"in globalThis){const e=globalThis.process;return"production"===e?.env?.NODE_ENV}})();const He=e=>e?Object.entries(e).reduce((e,[t,r])=>((t.startsWith("aria-")||t.startsWith("data-")||"role"===t)&&null!=r&&(e[t]=String(r)),e),{}):{},we=({height:e="140%",width:t="140%",x:r="-20%",y:a="-20%",...n})=>l.jsx("defs",{children:l.jsx("filter",{height:e,id:n.id,width:t,x:r,y:a,children:l.jsx("feDropShadow",{...n.shadowSvgConfig})})}),Me=-1/0,Be=u.forwardRef(({dataTestId:e,position:t,size:r=1,...a},n)=>l.jsx("circle",{...a,ref:n,cx:t?.x,cy:t?.y,"data-testid":`${e}-circle`,r:r/2})),Pe=(e,t,r,a,n)=>{let i="";const o=a===n,s=o?r:2*r;for(let r=0;r<s;r++){const c=o||r%2==0?a:n,d=2*Math.PI/s*r-Math.PI/2;i+=`${e+Math.cos(d)*c},${t+Math.sin(d)*c} `}return i.trim()},De=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=Pe(t.x,t.y,6,r/2,r/2);return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-hexagon`,points:i})}),je=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=Pe(t.x,t.y,5,r/2,r/2);return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-pentagon`,points:i})}),Fe=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>l.jsx("rect",{...a,ref:n,"data-testid":`${e}-square`,height:r,width:r,x:t.x-r/2,y:t.y-r/2})),Xe=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=r/2,o=i/2,s=Pe(t.x,t.y,5,i,o);return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-star`,points:s})}),Ve=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=`M ${t.x-r/2} ${t.y} H ${t.x+r/2} M ${t.x} ${t.y-r/2} V ${t.y+r/2}`;return l.jsx("path",{...a,ref:n,d:i,"data-testid":`${e}-straight`,strokeWidth:2})}),We=u.forwardRef(({dataTestId:e,position:t={x:0,y:0},size:r=1,...a},n)=>{const i=[`${t.x},${t.y-r/2}`,`${t.x-r/2},${t.y+r/2}`,`${t.x+r/2},${t.y+r/2}`].join(" ");return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-triangle`,points:i})}),Ke={Circle:"circle",Hexagon:"hexagon",Pentagon:"pentagon",Square:"square",Star:"star",Straight:"straight",Triangle:"triangle"},Ue={[Ke.Circle]:Be,[Ke.Hexagon]:De,[Ke.Pentagon]:je,[Ke.Square]:Fe,[Ke.Star]:Xe,[Ke.Straight]:Ve,[Ke.Triangle]:We},Ye=u.forwardRef(({dataTestId:e="node",haloConfig:t,hasHalo:r=!1,onBlur:a,onClick:n,onDoubleClick:i,onFocus:o,onKeyDown:s,onMouseEnter:c,onMouseLeave:d,position:h={x:0,y:0},size:x=1,type:p=Ke.Circle,...f},g)=>{const[R,A]=(e=>{const t=u.useRef(!1),r=u.useRef(null);u.useImperativeHandle(e,()=>r.current,[]);const a=e=>{t.current=!!e.autoClick};return u.useEffect(()=>{if(!r.current)return;const e=r.current;return e.addEventListener("click",a),()=>e.removeEventListener("click",a)},[]),[r,t]})(g),E={...f,className:`node ${f.className}`,onBlur:e=>{a?.(e)},onClick:e=>{n?.(e,{...f.data,nodePosition:h},A.current)},onDoubleClick:e=>{i?.(e,f.data)},onFocus:e=>{o?.(e,f.data)},onKeyDown:e=>{"Enter"===e.key&&s?.(e,f.data)},onMouseEnter:e=>{c?.(e,f.data)},onMouseLeave:e=>{d?.(e)}},T={className:f.className,fill:t?.fill||f.fill,fillOpacity:t?.fillOpacity||.25,opacity:t?.opacity||.3,stroke:t?.stroke||f.stroke,strokeWidth:t?.strokeWidth||f.strokeWidth},y=Ue[p];return l.jsxs(l.Fragment,{children:[r&&l.jsx(y,{...T,"aria-hidden":"true",dataTestId:`${e}-halo`,position:h,size:x+x/2}),l.jsx(y,{...E,ref:R,dataTestId:e,position:h,size:x})]})}),Ge=u.forwardRef(({data:e,nodeConfig:t,tabIndex:r=0,x:a,y:n},i)=>{const o=t?He(t):{};if(o["aria-label"]&&e&&"string"==typeof o["aria-label"]){const t=o["aria-label"];if(t.includes("{{")){const r=((e,t,r)=>{if(!e)return;const a=r??t.dataValue,n=Array.isArray(a)?a[t.index]:void 0,{xValue:i,yValue:o}=((e,t)=>({xValue:e&&t.xKey?e[t.xKey]?.toString()??"":"",yValue:e&&t.dataKey?e[t.dataKey]?.toString()??"":""}))(n,t);return((e,t,r,a)=>{let n=e;return void 0!==t.dataKey&&(n=n.replace(new RegExp("{{dataKey}}","g"),t.dataKey)),n=n.replace(new RegExp("{{xValue}}","g"),r),n=n.replace(new RegExp("{{yValue}}","g"),a),void 0!==t.index&&(n=n.replace(new RegExp("{{index}}","g"),(t.index+1).toString())),n})(e,t,i,o)})(t,{dataKey:e.dataKey,dataValue:e.dataValue,index:e.index??0,xKey:e.xKey},e.dataValue);r&&(o["aria-label"]=r)}}return l.jsx(l.Fragment,{children:t&&l.jsx(Ye,{...t,ref:i,...o,className:"node-path-focus-border",data:e,hasHalo:t.hasHalo,position:{x:a,y:n},tabIndex:r})})}),ze=u.forwardRef(({classNames:e="",fill:t="transparent",stroke:r="#0000FF",strokeWidth:a="1",focusConfig:n,hoverConfig:i={stroke:"#0000FF",strokeWidth:"0.5"},role:o="img",tabIndex:s=0,...c},d)=>{const{handleBlur:h,handleFocus:x,isFocused:p}=Oe(c.onFocus,c.onBlur),f=(e=>{if(!e)return;const t=e.strokeWidth?Number(e.strokeWidth):void 0;return{innerStrokeWidth:t,outlineColor:e.stroke,outlineStrokeWidth:t}})(n),{handleMouseEnter:g,handleMouseLeave:R,isHovered:A}=Le(c.onMouseEnter,c.onMouseLeave),E=u.useRef(null),T=u.useRef([]),y=u.useRef(null);u.useImperativeHandle(d,()=>({get main(){return y.current},get node(){return T.current},get path(){return E.current}}));const _=c.gradient&&((e,t="gradientePath")=>{const r=e.split(",").map(e=>e.trim()),a=parseInt(r[0],10),n=r.slice(1).map(e=>{const[t,r]=e.split(" ");return{color:t,offset:r}});let i="0%",o="0%",s="0%";switch(a){case 180:s="100%";break;case 90:o="100%";break;case 270:i="100%";break;default:return l.jsx(l.Fragment,{})}return l.jsx("defs",{children:l.jsx("linearGradient",{id:t,x1:i,x2:o,y1:"0%",y2:s,children:n.map((e,t)=>l.jsx("stop",{offset:e.offset,stopColor:e.color},`${t}-${e.offset}`.toString()))})})})(c.gradient),v=He(c),C={...{...c,classNames:`path ${e}`,fill:_?"url(#gradientePath)":t,filter:"url(#shadow)",role:o,stroke:r,strokeWidth:a,tabIndex:s},...A&&i};return l.jsxs("g",{ref:y,children:[_&&_,C.shadowSvgConfig&&l.jsx(we,{id:"shadow",shadowSvgConfig:C.shadowSvgConfig}),l.jsx(ke,{dataTestId:`${C.dataTestId}-focus-ring`,focusConfig:f,isFocused:p,targetRef:E}),l.jsxs("g",{"aria-label":C.ariaLabel,className:C.classNames,"data-draw":!0,filter:C.shadowSvgConfig&&C.filter,opacity:C.opacity,orientation:C.orientation,role:C.role,rotate:C.rotate,tabIndex:C.tabIndex,transform:C.transform,visibility:C.visibility,...v,onBlur:h,onClick:()=>{c.onClick?.(c.dataValue)},onDoubleClick:e=>{c.onDoubleClick?.(e,c.dataValue)},onFocus:x,onKeyDown:e=>{"Enter"===e.key&&c.onKeyDown?.(c.dataValue)},onMouseDown:e=>{e.preventDefault()},onMouseEnter:g,onMouseLeave:R,children:[l.jsx("path",{ref:E,d:C.d,"data-testid":C.dataTestId,fill:C.dFill?"transparent":C.fill,fillOpacity:C.fillOpacity,fillRule:C.fillRule,stroke:C.stroke,strokeDasharray:C.strokeDasharray,strokeDashoffset:C.strokeDashoffset,strokeLinecap:C.strokeLinecap,strokeLinejoin:C.strokeLinejoin,strokeMiterlimit:C.strokeMiterlimit,strokeOpacity:C.strokeOpacity,strokeWidth:C.strokeWidth,children:C.title&&l.jsx("title",{children:C.title})}),C.dFill&&l.jsx("path",{d:C.dFill,fill:C.fill,fillOpacity:C.fillOpacity,fillRule:C.fillRule})]}),C.points&&C.nodeConfig&&C.points.map(([e,t],r)=>{const a={dataKey:C.dataKey,dataValue:C.dataValue,index:r,xKey:C?.xKey};return l.jsx(Ge,{ref:e=>T.current[r]=e,data:a,nodeConfig:C.nodeConfig,tabIndex:-1,x:e,y:t},`${r.toString()}`)})]})}),Ze=({ariaLabel:e,dataKey:t,xKey:r,yKey:a,xData:n,yData:i,coverage:o,index:s})=>{if(!e)return;const c=new RegExp("{{dataKey}}","g"),d=new RegExp("{{xKey}}","g"),l=new RegExp("{{yKey}}","g"),u=new RegExp("{{xData}}","g"),h=new RegExp("{{yData}}","g"),x=new RegExp("{{coverage}}","g"),p=new RegExp("{{index}}","g");return e.replace(c,t??"").replace(d,r??"").replace(l,a??"").replace(u,String(n??"")).replace(h,String(i??"")).replace(x,String(o)).replace(p,String(s))},qe=(e,t,r)=>e?t+r/2:t-r/2,Je=({barConfig:e,currentBars:t,endRounded:r,extraSpacing:a=0,focusConfig:n={stroke:"#0078D4",strokeWidth:.2},onBlur:i,onFocus:o,order:s=1,orientation:c,startRounded:d,tabIndex:u=0,x1:h,x2:x,y1:p,y2:f,dataKey:g,xKey:R,yKey:A,xData:E,yData:T})=>{const{barWidth:y,singleConfig:_}=e,v=(({barConfig:e,orientation:t,x1:r,x2:a,y1:n,y2:i})=>{const{gap:o=0,singleConfig:s}=e,c=t===L.HORIZONTAL,d=c?r:n,l=c?a:i,u={end:l<d,start:l>d};return s.reduce((e,t,r)=>{const{coverage:a}=t,n=((e,t)=>e/100*t)(a,l-d),i=0===r?d:qe(u.start,e[r-1][1],o),c=r+1===s.length?l:qe(u.end,i+n,o);return e.push([i,c]),e},[])})({barConfig:e,orientation:c,x1:h,x2:x,y1:p,y2:f});return l.jsx("g",{children:_.map(({color:e,"aria-label":C,...m},S)=>{const[I,$]="HORIZONTAL"===c?v[S]:[h,x],[N,b]="VERTICAL"===c?v[S]:[p,f],k=(({barWidth:e,currentBars:t,endRounded:r=0,extraSpacing:a,order:n,orientation:i,startRounded:o=0,x1:s,x2:c,y1:d,y2:l})=>{let u,h,x,p,f="Z";const g=(({barWidth:e,currentBars:t,extraSpacing:r,order:a,orientation:n})=>{const i=e/2,o=r/2,s=t%2==0,c=s?o:o+i,d=a-Math.ceil(t/2);let l=0;return 0===d?l=s?-o:i:d<0?l=n===L.HORIZONTAL?d*-c+e:d*c:d>0&&(l=n===L.HORIZONTAL?d*-c:d*c+e),l})({barWidth:e,currentBars:t,extraSpacing:a,order:n,orientation:i});if(i===L.HORIZONTAL){const t=s+o,a=c-r;o&&r?(u=`M ${t},${d+g}`,h=`L${a},${l+g}`,x=`Q${c+r} ${l+g-e/2}, ${a} ${l+g-e}`,p=`L${t},${d+g-e}`,f=`Q${s-o} ${d+g-e/2}, ${t} ${d+g}`):o?(u=`M ${t},${d+g}`,h=`L${c},${l+g}`,x=`L${c},${l+g-e}`,p=`L${t},${d+g-e}`,f=`Q${s-o} ${d+g-e/2}, ${t} ${d+g}`):r?(u=`M${s},${d+g}`,h=`L${a},${l+g}`,x=`Q${c+r} ${l+g-e/2}, ${a} ${l+g-e}`,p=`L${s},${d+g-e}`):(u=`M${s},${d+g}`,h=`L${c},${l+g}`,x=`L${c},${l+g-e}`,p=`L${s},${d+g-e}`)}else{const t=d-o,a=l+r;o&&r?(u=`M${s+g}, ${t}`,h=`L${c+g},${a}`,x=`Q${c+g-e/2} ${l-r}, ${c+g-e} ${a}`,p=`L${s+g-e},${t}`,f=`Q${s+g-e/2} ${d+o}, ${s+g} ${t}`):o?(u=`M${s+g}, ${t}`,h=`L${c+g},${l}`,x=`L${c+g-e},${l}`,p=`L${s+g-e},${t}`,f=`Q${s+g-e/2} ${d+o}, ${s+g} ${t}`):r?(u=`M${s+g},${d}`,h=`L${c+g},${a}`,x=`Q${c+g-e/2} ${l-r}, ${c+g-e} ${a}`,p=`L${c+g-e},${d}`):(u=`M${s+g},${d}`,h=`L${c+g},${l}`,x=`L${c+g-e},${l}`,p=`L${s+g-e},${d}`)}return`${u} ${h} ${x} ${p} ${f}`})({barWidth:y,currentBars:t,endRounded:S===_.length-1&&r?r:void 0,extraSpacing:a,order:s,orientation:c,startRounded:0===S&&d?d:void 0,x1:I,x2:$,y1:N,y2:b});return l.jsx(ze,{"aria-label":Ze({ariaLabel:C,dataKey:g,xKey:R,yKey:A,xData:E,yData:T,coverage:m.coverage,index:S}),d:k,fill:e,focusConfig:n,hoverConfig:{stroke:"transparent",strokeWidth:"0"},stroke:"transparent",tabIndex:u,onBlur:i,onFocus:o,...m},`${S.toString()}`)})})},Qe=({barConfig:e,dataIdx:t,dataKey:r,focusConfig:a,onBlur:n,onFocus:i,order:o,tabIndex:s,...c})=>{const{addError:d,xAxisCoordinates:h,yAxisCoordinates:x,...p}=u.useContext(O),{coordinates:f,tickValues:g}=h,{coordinates:R,tickValues:A}=x,E=p.orientation===L.VERTICAL,T=E?p.pKey:r,y=E?r:p.pKey,_=p.data[t],v=_?.[T],C=_?.[y],m=p.data[0],S=!!m&&Object.prototype.hasOwnProperty.call(m,r),I=p.data.length>0,$=Number(C);u.useEffect(()=>{!I||S?isNaN($)?d?.("BAR_CHART_PATH_ERROR",{error:D(C,r)}):$<0&&d?.("BAR_CHART_PATH_ERROR",{error:j($,r)}):d?.("BAR_CHART_PATH_ERROR",{error:he(r)})},[r,I,S,$,C]);const N=Ae(g,[String(v)],!0)[0],b=Ae(A,[String(C)])[0],k=E?{x1:N,x2:N,y1:f.y1,y2:b}:{x1:R.x1,x2:N,y1:b,y2:b};return l.jsx(Je,{barConfig:e,currentBars:p.barChildrenCount,dataKey:r,extraSpacing:p.gapBetweenBars,focusConfig:a,order:o,orientation:p.orientation,tabIndex:s,xData:v,xKey:T,yData:C,yKey:y,onBlur:n,onFocus:i,...k,...c})},et=e=>{let t=0;return u.Children.toArray(e).forEach(e=>{u.isValidElement(e)&&e.type===Qe&&e.props.order>t&&(t=e.props.order)}),t},tt=e=>{if(0===e.length)return{numeric:{max:2,min:0,step:1}};const t=Math.min(...e.map(e=>parseFloat(e))),r=Math.max(...e.map(e=>parseFloat(e)));return{numeric:{max:r,min:t,step:Math.abs(r-t)/2}}},rt=({bound:e,data:t,fontSize:r,svgHeight:a,svgWidth:n,viewBox:i})=>{if(!f()||!t.length)return 0;const o=g();if(!o)return 0;const s=R("svg");if(!s)return 0;s.setAttribute("style","position: absolute; visibility: hidden; top: -9999px; left: -9999px;"),s.setAttribute("viewBox",i),s.setAttribute("width",n),s.setAttribute("height",a),o.body.appendChild(s);const c=t.map(t=>{const a=R("text");if(!a)return 0;a.setAttribute("font-size",r),a.textContent=t,s.appendChild(a);const n=a.getBBox()[e];return a.remove(),n});return s.remove(),Math.max(...c,0)},at=({ariaLabel:e,className:t="line",dataTestId:r,...a})=>l.jsx("line",{...a,"aria-label":e,className:t,"data-testid":r}),nt=({children:e,className:t="circle",...r})=>l.jsx("text",{className:t,...r,children:e}),it=({showTickLines:e,tick:t,tickLine:r,tickText:a})=>l.jsxs("g",{children:[e&&l.jsx(at,{...r}),a&&l.jsx(nt,{...a,children:t.value})]}),ot=(e,t,r=1)=>e>=t-r&&e<=t+r,st=e=>{const{ariaLabel:t,className:r,dataTestId:a,opacity:n,stroke:i,strokeDasharray:o,strokeDashoffset:s,strokeLinecap:c,strokeLinejoin:d,strokeOpacity:l,strokeWidth:u,style:h,tabIndex:x,transform:p,x1:f,x2:g,y1:R,y2:A}=e;return{ariaLabel:t,className:r,dataTestId:a,opacity:n,stroke:i,strokeDasharray:o,strokeDashoffset:s,strokeLinecap:c,strokeLinejoin:d,strokeOpacity:l,strokeWidth:u,style:h,tabIndex:x,transform:p,x1:f,x2:g,y1:R,y2:A}},ct=({canvasHeight:e=N.height,canvasWidth:t=N.width,cursor:r=0,extraSpace:a={bottom:0,left:0,right:0,top:0},position:n=w.BOTTOM,showTickLines:i=!1,tickLine:o,tickLineHover:s,tickText:c,tickValues:d=[],...u})=>{const h=He(u);return l.jsxs("g",{...h,children:[l.jsx(at,{...st(u)}),d&&d.length>0&&d.map((e,t)=>{const a=ot(r,e.position)&&s?{...o,...s}:o,n="rotate"===c?.transform?`rotate(-30, ${e.position}, ${c.y})`:void 0;return l.jsx(it,{showTickLines:i,tick:e,tickLine:{...a,x1:e.position,x2:e.position},tickText:{...c,transform:n,x:e.position}},`${t.toString()}`)})]})},dt=(e,t,r)=>e===w.RIGHT?t+r:t-r,lt=(e,t,r,a)=>e===w.TOP?r:t+r+a,ut=({position:e=w.BOTTOM,tickLine:t,tickText:r,...a})=>{const{xAxisCoordinates:{coordinates:n,tickValues:i},...o}=u.useContext(O),s=lt(e,n.y1,Number(r?.fontSize),r?.top??0),c=o.extraSpaceTopY,d=Number(o.canvasHeight)-o.extraSpaceBottomY;return l.jsx(ct,{...n,...a,canvasHeight:Number(o.canvasHeight),canvasWidth:Number(o.canvasWidth),dataTestId:`${o.dataTestId}xAxis`,extraSpace:{left:o.extraSpaceLeftX,right:o.extraSpaceRightX},tickLine:{...t,y1:c,y2:d},tickText:{...r,y:s},tickValues:r?i:void 0})},ht=({canvasWidth:e,cursor:t=0,extraSpace:r={bottom:0,left:0,right:0,top:0},position:a=w.LEFT,showTickLines:n=!0,tickLine:i,tickLineHover:o,tickText:s,tickValues:c=[],...d})=>{const u=He(d);return l.jsxs("g",{...u,children:[l.jsx(at,{...st(d)}),c&&c.length>0&&c.map((e,r)=>{const a=ot(t,e.position)&&o?{...i,...o}:i,c="rotate"===s?.transform?`rotate(-30, ${s.x}, ${e.position})`:void 0;return l.jsx(it,{showTickLines:n,tick:e,tickLine:{...a,y1:e.position,y2:e.position},tickText:{...s,transform:c,y:e.position}},`${r.toString()}`)})]})},xt=(e,t,r)=>{let a=0;switch(e){case"middle":a=t/2+r;break;case"end":a=t+r;break;default:a=0}return a},pt=({position:e=w.LEFT,tickLine:t,tickText:r,...a})=>{const{yAxisCoordinates:{coordinates:n,tickValues:i},...o}=u.useContext(O),s=r?.textAnchor||"middle",c=(e===w.RIGHT?r?.right:r?.left)??0,d=xt(s,o.yAxisText,c),h=dt(e,n.x1,d);return l.jsx(ht,{...n,...a,canvasHeight:Number(o.canvasHeight),canvasWidth:Number(o.canvasWidth),dataTestId:`${o.dataTestId}yAxis`,tickLine:{...t,x1:o.extraSpaceLeftX,x2:Number(o.canvasWidth)-o.extraSpaceRightX},tickText:{...r,x:h},tickValues:r?i:void 0})},ft=e=>{if(e.custom)return e.custom?.values;if(e.numeric){const{max:t,min:r=0,step:a}=e.numeric;if(a>=Math.abs(t-r)||a<=0)return[r.toString()];const n=[];for(let e=r;e<=t;e+=a)n.push(e.toString());return n}},gt=(e,t)=>e.flatMap(e=>Object.keys(e).filter(r=>r!==t&&"number"==typeof e[r]).map(t=>Number(e[t]))),Rt=(e,t,r,a,n,i,o,s)=>{const{position:c,tickText:d,tickValues:l}=e.props,u=d?.fontSize??0,h=u*a,x=l?ft(l):t.map(e=>e[r]),p=rt({bound:"width",data:x,fontSize:u,svgHeight:`${o}`,svgWidth:`${s}`,viewBox:i}),f=n>p?n:p,g=c===w.BOTTOM?h+(d?.top??0):0,R=c===w.TOP?h+(d?.bottom??0):0;return{barChartXPosition:c||w.BOTTOM,extraSpaceBottomY:g,extraSpaceTopY:R,securityXSpace:f,xBreakAxis:l?.numeric?l.numeric.breakAxis??0:d?.custom?.breakAxis??0,xData:x}},At=(e,t,r,a,n,i,o,s)=>{const{position:c,tickText:d,tickValues:l}=e.props,u=d?.fontSize??0,h=u*a,x=l||tt([...new Set(gt(t,r))]),p=ft(x),f=n>h?n:h,g=rt({bound:"width",data:p,fontSize:u,svgHeight:`${o}`,svgWidth:`${s}`,viewBox:i}),R=c===w.LEFT?g+(d?.right??0):0,A=c===w.RIGHT?g+(d?.left??0):0;return{barChartYPosition:c||w.LEFT,extraSpaceLeftX:R,extraSpaceRightX:A,securityYSpace:f,yAxisText:g,yBreakAxis:l?.numeric?l.numeric.breakAxis??0:d?.custom?.breakAxis??0,yData:p}},Et=({addError:e,ajustedX:t,ajustedY:r,canvasHeight:a,canvasWidth:n,children:i,data:o,gapBetweenBars:s,orientation:c,pKey:d,viewBox:l})=>{let h;if(!o||0===o.length){const t={error:ue(q)};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}if(n<=0||a<=0){const t={error:xe(n,a)};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}const x=et(i),p=20*x,f=(x-1)*s,g=c===L.VERTICAL?n:a;if(p+f>g){const t={error:(R=`Insufficient space: requires ${p+f}px but only ${g}px available`,new Error(`Invalid bar distribution for "all": ${R}`))};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}var R;const A=o&&o.length>0?o:[{[ye]:0,[d]:Ee},{[ye]:0,[d]:Te}],E=n>0?n:100,T=a>0?a:100,{barChartXPosition:y,barChartYPosition:_,extraSpaceBottomY:v,extraSpaceLeftX:C,extraSpaceRightX:m,extraSpaceTopY:S,securityXSpace:I,securityYSpace:$,xAxisText:N,xBreakAxis:b,xData:k,yAxisText:O,yBreakAxis:M,yData:B}=(({ajustedX:e,ajustedY:t,canvasHeight:r,canvasWidth:a,children:n,data:i,gapBetweenBars:o,orientation:s,pKey:c,viewBox:d})=>{let l={barChartXPosition:w.BOTTOM,barChartYPosition:w.LEFT,extraSpaceBottomY:0,extraSpaceLeftX:0,extraSpaceRightX:0,extraSpaceTopY:0,securityXSpace:0,securityYSpace:0,xAxisText:0,xBreakAxis:0,xData:[],yAxisText:0,yBreakAxis:0,yData:[]},h=o;const x=[];return u.Children.forEach(n,n=>{if(u.isValidElement(n))if(n.type!==Qe||x.includes(n.props.order)||(x.push(n.props.order),h+=n.props.barConfig.barWidth??0),n.type===ut){const t=s===L.VERTICAL?h:0;l={...l,...Rt(n,i,c,e,t,d,r,a)}}else if(n.type===pt){const e=s===L.HORIZONTAL?h:0;l={...l,...At(n,i,c,t,e,d,r,a)}}}),l})({ajustedX:t,ajustedY:r,canvasHeight:T,canvasWidth:E,children:i,data:A,gapBetweenBars:s,orientation:c,pKey:d,viewBox:l}),P=y!==w.TOP&&y!==w.BOTTOM,D=(({initPos:e,maxSpaceAvailable:t,otherAxisSpace:r,securitySpace:a,tickValues:n})=>{const i=n.length-1,o=(t-r-a)/i;return n.map((t,r)=>({position:e+r*o+a/2,value:t}))})({initPos:C,maxSpaceAvailable:E,otherAxisSpace:C+m,securitySpace:I,tickValues:k});if((D??[]).some(({position:e})=>isNaN(e))){const t={error:ue(Z)};e?.("BAR_CHART_CONTEXT_ERROR",t),h=t}if(D){const t=D.length<2,r=D.length>=2&&1===new Set(D.map(e=>e.value)).size;if(t){const t={error:ue(ie)};e?.("BAR_CHART_X_AXIS_ERROR",t),h||(h=t)}if(r){const t={error:ue(ne)};e?.("BAR_CHART_X_AXIS_ERROR",t),h||(h=t)}}const j=_!==w.LEFT&&_!==w.RIGHT,F=(({initPos:e,maxSpaceAvailable:t,needAjusted:r,otherAxisSpace:a,securitySpace:n,tickValues:i})=>{const o=(t-a-n)/(i.length-1),s=r?n/2:0;return i.map((t,r)=>({position:e-r*o-s,value:t}))})({initPos:T-v,maxSpaceAvailable:T,needAjusted:c===L.HORIZONTAL,otherAxisSpace:S+v,securitySpace:$,tickValues:B});if(F){const t=F.length<2,r=F.length>=2&&1===new Set(F.map(e=>e.value)).size;if(t){const t={error:ue(ce)};e?.("BAR_CHART_Y_AXIS_ERROR",t),h||(h=t)}if(r){const t={error:ue(se)};e?.("BAR_CHART_Y_AXIS_ERROR",t),h||(h=t)}}const X=P?Ae(F||[],[String(b)])[0]:0,V=j?Ae(D||[],[String(M)])[0]:0,W=(({canvasHeight:e,canvasWidth:t,customBreakAxis:r,extraSpaceBottomY:a,extraSpaceLeftX:n,extraSpaceRightX:i,extraSpaceTopY:o,position:s})=>s===w.TOP?{x1:n,x2:t-i,y1:o,y2:o}:s===w.CENTER?{x1:n,x2:t-i,y1:e/2,y2:e/2}:s===w.CUSTOM?{x1:n,x2:t-i,y1:r,y2:r}:{x1:n,x2:t-i,y1:e-a,y2:e-a})({canvasHeight:T,canvasWidth:E,customBreakAxis:Number(X),extraSpaceBottomY:v,extraSpaceLeftX:C,extraSpaceRightX:m,extraSpaceTopY:S,position:y}),K=(({canvasHeight:e,canvasWidth:t,customBreakAxis:r,extraSpaceBottomY:a,extraSpaceLeftX:n,extraSpaceRightX:i,extraSpaceTopY:o,position:s})=>s===w.RIGHT?{x1:t-i,x2:t-i,y1:o,y2:e-a}:s===w.CENTER?{x1:t/2,x2:t/2,y1:o,y2:e-a}:s===w.CUSTOM?{x1:r,x2:r,y1:o,y2:e-a}:{x1:n,x2:n,y1:o,y2:e-a})({canvasHeight:T,canvasWidth:E,customBreakAxis:Number(V),extraSpaceBottomY:v,extraSpaceLeftX:C,extraSpaceRightX:m,extraSpaceTopY:S,position:_});if(W.x1===W.x2){const t={error:ue(oe)};e?.("BAR_CHART_X_AXIS_ERROR",t),h||(h=t)}if(K.y1===K.y2){const t={error:ue(de)};e?.("BAR_CHART_Y_AXIS_ERROR",t),h||(h=t)}const U={addError:e,crossXAxis:P,crossYAxis:j,data:A,extraSpaceBottomY:v,extraSpaceLeftX:C,extraSpaceRightX:m,extraSpaceTopY:S,securityXSpace:I,securityYSpace:$,xAxisCoordinates:{coordinates:W,tickValues:D||(h?[{position:0,value:Ee},{position:E,value:Te}]:[])},xAxisText:N,yAxisCoordinates:{coordinates:K,tickValues:F||(h?[{position:T,value:Ee},{position:0,value:Te}]:[])},yAxisText:O};return h?{...U,error:{...h,type:H.BAR_CHART_CONTEXT_ERROR}}:U},Tt=Object.assign(({canvasConfig:e=N,caption:t,children:r,classNames:a,data:n,dataTestId:i="bar-chart",gapBetweenBars:o=0,height:s="100%",onErrors:c,orientation:d,pKey:x,role:f,tabIndex:g,width:R="100%",...A})=>{const E=p(i),{parsedCanvas:T,parsedCanvasExtraSpace:y,viewBox:_}=$({canvasConfig:e,dataTestId:E,height:s,width:R}),v=T.width,C=T.height,m=et(r),S=2*o,I=[l.jsx(ut,{},"default-x-axis"),l.jsx(pt,{},"default-y-axis")],L=u.Children.toArray(r)||[],H=I.concat(L),w=Math.max(v,C,y??0),M=v/w,B=C/w,P=u.useMemo(()=>b(c),[c]),D=k(n),j=u.useMemo(()=>(P.clearErrors(),Et({addError:(e,t)=>{P.addError(e,t)},ajustedX:M,ajustedY:B,canvasHeight:C,canvasWidth:v,children:H,data:n,gapBetweenBars:S,orientation:d,pKey:x,viewBox:_})),[C,v,D,x,d,P.addError]);return l.jsx(h,{caption:t,className:a,dataTestId:E,height:s,role:f,tabIndex:g,viewBox:_,width:R,...A,children:l.jsx(O.Provider,{value:{...j,barChildrenCount:m,canvasExtraSpace:y,canvasHeight:C,canvasWidth:v,data:n,dataTestId:E,gapBetweenBars:o,orientation:d,pKey:x},children:r})})},{Path:Qe,Separator:({areaSeparator:e,dataTestId:t,rightSeparator:r,topSeparator:a,xBreakAxis:n,yBreakAxis:i})=>{const{addError:o,crossXAxis:s,crossYAxis:c,xAxisCoordinates:d,yAxisCoordinates:h}=u.useContext(O),x=d.tickValues,p=h.tickValues,f=void 0!==n?"string"==typeof n?parseFloat(n):n:void 0,g=void 0!==i?"string"==typeof i?parseFloat(i):i:void 0;if(u.useEffect(()=>{if(void 0!==n){const e=x.map(e=>e.value);if(void 0===f||isNaN(f))o?.("BAR_CHART_SEPARATOR_ERROR",{error:pe(n)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(f<t||f>r)&&o?.("BAR_CHART_SEPARATOR_ERROR",{error:ge(f,t,r)})}}if(void 0!==i){const e=p.map(e=>e.value);if(void 0===g||isNaN(g))o?.("BAR_CHART_SEPARATOR_ERROR",{error:fe(i)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(g<t||g>r)&&o?.("BAR_CHART_SEPARATOR_ERROR",{error:Re(g,t,r)})}}},[n,f,x,i,g,p]),!a&&!r&&!e)return l.jsx(l.Fragment,{});const R=n&&Ae(d.tickValues,[n],!0)[0],A=i&&Ae(h.tickValues,[i])[0],E=c?h.coordinates.x1:d.coordinates.x2,T=s?d.coordinates.y1:h.coordinates.y1,y=d.coordinates.x1,_=R??E,v=h.coordinates.y2,C=A??T;u.useEffect(()=>{y===_&&v===C&&o?.("BAR_CHART_SEPARATOR_ERROR",{error:ue(re)})},[y,_,v,C]);const m=`M${y} ${v} H ${_} V ${C} H ${y} Z`,S=`M${y} ${C} H ${_}`,I=`M${_} ${v} V ${C}`;return l.jsxs("g",{children:[l.jsx("path",{d:m,"data-testid":`${t}Area`,...e}),l.jsx("path",{d:S,"data-testid":`${t}Top`,...a}),l.jsx("path",{d:I,"data-testid":`${t}Right`,...r})]})},XAxis:ut,YAxis:pt}),yt=u.createContext({}),_t=u.forwardRef(({dataTestId:e,position:t,size:r,...a},n)=>l.jsx("circle",{...a,ref:n,cx:t.x,cy:t.y,"data-testid":`${e}-circle`,r:r/2})),vt=u.forwardRef(({dataTestId:e,position:t,size:r,...a},n)=>l.jsx("rect",{...a,ref:n,"data-testid":`${e}-square`,height:r,width:r,x:t.x-r/2,y:t.y-r/2})),Ct=u.forwardRef(({dataTestId:e,position:t,size:r,...a},n)=>{const i=r/2,o=r,s=`${t.x},${t.y-o/2} ${t.x-i},${t.y+o/2} ${t.x+i},${t.y+o/2}`;return l.jsx("polygon",{...a,ref:n,"data-testid":`${e}-triangle`,points:s})}),mt="CIRCLE",St="SQUARE",It="TRIANGLE",$t="EXTRA_LARGE",Nt="EXTRA_SMALL",bt="LARGE",kt="MEDIUM",Ot="SMALL",Lt={[$t]:40,[Nt]:8,[bt]:32,[kt]:24,[Ot]:16},Ht={[mt]:_t,[St]:vt,[It]:Ct},wt=u.forwardRef(({className:e,data:t,dataTestId:r="plot",fill:a,fillOpacity:n,focusConfig:i,hasHoverEffect:o,hoverConfig:s,id:c,label:d,onBlur:u,onClick:h,onFocus:x,onKeyDown:p,onMouseEnter:f,onMouseLeave:g,opacity:R,position:A={x:0,y:0},size:E=kt,stroke:T,strokeWidth:y,tabIndex:_,type:v=mt,...C},m)=>{const{handleMouseEnter:S,handleMouseLeave:I,isHovered:$}=Le(f,g),{handleBlur:N,handleFocus:b,isFocused:k}=Oe(x,u),{fill:O=a,opacity:L=.3,scale:H=1.3,stroke:w=a,strokeWidth:M=0}=s||{},B="number"==typeof E?E:Lt[E],P={...C,"aria-label":d,className:`plot ${e||""}`,dataTestId:r,fill:a,fillOpacity:n,id:c,onBlur:N,onClick:h,onFocus:b,onKeyDown:e=>{!h||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),h(e)),p?.(e)},onMouseEnter:S,onMouseLeave:I,opacity:R,position:A,role:"button",size:B,stroke:T,strokeWidth:o&&$&&!k?0:y,tabIndex:_},D=Ht[v],j=v===It?{x:A.x,y:A.y-B*(H-1)/6}:A;return l.jsxs(l.Fragment,{children:[o&&$&&!k&&l.jsx(D,{dataTestId:`${r}-hover`,fill:O,opacity:L,position:j,size:B*H,stroke:w,strokeWidth:M}),l.jsx(ke,{dataTestId:r,focusConfig:{...i,variant:i?.variant??"bounding-box"},isFocused:k,children:l.jsx(D,{ref:m,...P})})]})}),Mt="{{name}}",Bt="{{value}}",Pt=`${Mt}, ${Bt}`,Dt=new RegExp("{{dataKey}}","g"),jt=new RegExp(Mt,"g"),Ft=new RegExp(Bt,"g"),Xt=new RegExp("{{x}}","g"),Vt=new RegExp("{{y}}","g"),Wt=Object.assign(({ariaHidden:e,ariaLabel:t,backgroundUrl:r,caption:a,children:n,className:i,data:o,dataTestId:s="custom-background-chart",height:c="100%",onBlur:d,onClick:x,onDoubleClick:f,onErrors:g,onFocus:R,onKeyDown:A,onKeyUp:E,onMouseEnter:T,onMouseLeave:y,role:_="img",tabIndex:v,viewBox:C,width:m="100%",...S})=>{const I=p(s),$=`0 0 ${C.width} ${C.height}`,N=u.useMemo(()=>b(g),[g]);u.useEffect(()=>{0===Object.keys(o).length&&N.addError("CUSTOM_BACKGROUND_CHART_CONTEXT_ERROR",{error:new Error("Data object is empty. At least one data point is required.")}),r&&""!==r.trim()||N.addError("CUSTOM_BACKGROUND_CHART_CONTEXT_ERROR",{error:new Error("backgroundUrl is required and cannot be empty.")}),(C.width<=0||C.height<=0)&&N.addError("CUSTOM_BACKGROUND_CHART_CONTEXT_ERROR",{error:new Error(`Invalid viewBox dimensions: width=${C.width}, height=${C.height} (both must be > 0)`)})},[o,r,C,N]);const k=u.useMemo(()=>({addError:(e,t)=>{N.addError(e,t)},data:o,dataTestId:I,viewBox:C}),[C,o,I,N]);return l.jsx(h,{ariaHidden:e,ariaLabel:t,caption:a,className:i,dataTestId:I,height:c,role:_,tabIndex:v,viewBox:$,width:m,onBlur:d,onClick:x,onDoubleClick:f,onFocus:R,onKeyDown:A,onKeyUp:E,onMouseEnter:T,onMouseLeave:y,...S,children:l.jsxs(yt.Provider,{value:k,children:[l.jsx("image",{"data-testid":`${I}-background`,height:C.height,href:r,preserveAspectRatio:"xMidYMid meet",width:C.width,x:0,y:0}),l.jsx("g",{"data-testid":`${I}-plots`,children:n})]})})},{Plot:({ariaLabel:e,dataKey:t,formatAriaValue:r,...a})=>{const{addError:n,data:i,dataTestId:o,viewBox:s}=u.useContext(yt),c=u.useMemo(()=>i[t],[i,t]);u.useEffect(()=>{if(!c)return void n?.("CUSTOM_BACKGROUND_CHART_PLOT_ERROR",{error:new Error(`dataKey "${t}" not found in data object.`)});const{x:e,y:r}=c;(e<0||e>s.width||r<0||r>s.height)&&n?.("CUSTOM_BACKGROUND_CHART_PLOT_ERROR",{error:new Error(`Plot "${t}" coordinates (${e}, ${r}) are outside viewBox bounds (0-${s.width}, 0-${s.height})`)})},[c,t,n,s.width,s.height]);const d=u.useMemo(()=>{if(!c)return t;const a=r?r(c.value):"number"==typeof(n=c.value)?n.toLocaleString():"string"==typeof n?n:JSON.stringify(n);var n;return(({ariaLabel:e,dataKey:t,name:r,formattedValue:a,x:n,y:i})=>{const o=r??t;return(e??Pt).replace(Dt,t).replace(jt,o).replace(Ft,a).replace(Xt,String(n)).replace(Vt,String(i))})({ariaLabel:e,dataKey:t,formattedValue:a,name:c.name,x:c.x,y:c.y})},[e,c,t,r]),h=u.useMemo(()=>({x:c?.x??0,y:c?.y??0}),[c?.x,c?.y]);return c?l.jsx(wt,{...a,data:{value:c.value},dataTestId:`${o}-plot-${t}`,label:d,position:h}):null}}),Kt=u.createContext({}),Ut=({curved:e=!1,extendToBottom:t=!1,points:r,svgHeight:a})=>{if(0===r.length)return"";const[n,...i]=r;let o=`M ${n[0]} ${n[1]}`;return o+=e?i.reduce((e,t,a)=>{const[n,i]=r[a],[o,s]=t,c=.3*(o-n),d=[n+c,i],l=[o-c,s];return`${e} C ${d[0]} ${d[1]}, ${l[0]} ${l[1]}, ${o} ${s}`},""):i.reduce((e,t)=>`${e} L ${t[0]} ${t[1]}`,""),t&&(o+=` L ${i[i.length-1][0]} ${a} L ${n[0]} ${a} Z`),o},Yt=(e,t)=>new Error(`Invalid projection bounds - upper projection (${e}) must be below lower projection (${t})`),Gt=(e,t)=>new Error(`${t?"Upper":"Lower"} projection X coordinate (${e}) is outside valid range (0-100)`),zt=(e,t,r)=>new Error(`${r?"Upper":"Lower"} projection Y coordinate (${e}) is outside chart area (0-${t})`),Zt=(e,t)=>{if(!t)return e;const r=t<0,a=e*Math.abs(t)/100;return r?e-a:e+a},qt=(e,t,r)=>{if(!r)return e;const a=r<0,n=(0===e?t:e)*Math.abs(r)/100;return a?e+n:e-n},Jt=({curved:e,lineProjection:t,points:r,svgHeight:a})=>{const{addError:n}=u.useContext(Kt),{lower:i,shapeColor:o,upper:s}=t,{xProjection:c,yProjection:d,...h}=s||{},{xProjection:x,yProjection:p,...f}=i||{},g=c||d?{x:c,y:d}:void 0,R=x||p?{x:x,y:p}:void 0,A=g?.y,E=R?.y,T=g?.x,y=R?.x;u.useEffect(()=>{if(g&&R){const e=A||0,t=E||0;e>=t&&n?.("LINE_CHART_PROJECTION_ERROR",{error:Yt(e,t)})}g&&(void 0!==T&&(T<0||T>100)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:Gt(T,!0)}),void 0!==A&&(A<0||A>a)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:zt(A,a,!0)})),R&&(void 0!==y&&(y<0||y>100)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:Gt(y,!1)}),void 0!==E&&(E<0||E>a)&&n?.("LINE_CHART_PROJECTION_ERROR",{error:zt(E,a,!1)}))},[R,y,E,a,g,T,A]);const{downPath:_,shapePath:v,upPath:C}=(({curved:e,lowerProjection:t,points:r,svgHeight:a,upperProjection:n})=>{const i=n||t;if(0===r.length&&!i)return{shapePath:""};const[o,...s]=r,c=`M ${o[0]} ${o[1]}`;let d=c,l=n?c:void 0,u=t?c:void 0;const h=[],x=[];s.forEach(([e,r])=>{const i=n?[Zt(e,n.x),qt(r,a,n.y)]:[e,r],o=t?[Zt(e,-(t.x??0)),qt(r,a,-(t.y??0))]:[e,r];h.push(i),x.push(o)});const p=n&&t?[...h,s.at(-1),...x.reverse(),o]:[...h,...x.reverse(),o];return e?(d+=p.reduce((e,t,r)=>{const a=0===r?o:p[r-1],[n,i]=a,[s,c]=t,d=.3*(s-n),l=[n+d,i],u=[s-d,c];return`${e} C ${l[0]} ${l[1]}, ${u[0]} ${u[1]}, ${s} ${c}`},""),l&&(l+=h.reduce((e,t,r)=>{const a=0===r?o:h[r-1],[n,i]=a,[s,c]=t,d=.3*(s-n),l=[n+d,i],u=[s-d,c];return`${e} C ${l[0]} ${l[1]}, ${u[0]} ${u[1]}, ${s} ${c}`},"")),u&&(u+=x.reverse().reduce((e,t,r)=>{const a=0===r?o:x[r-1],[n,i]=a,[s,c]=t,d=.3*(s-n),l=[n+d,i],u=[s-d,c];return`${e} C ${l[0]} ${l[1]}, ${u[0]} ${u[1]}, ${s} ${c}`},""))):(d+=p.reduce((e,t)=>`${e} L ${t?.[0]} ${t?.[1]}`,""),l&&(l+=h.reduce((e,t)=>`${e} L ${t[0]} ${t[1]}`,"")),u&&(u+=x.reverse().reduce((e,t)=>`${e} L ${t[0]} ${t[1]}`,""))),{downPath:u,shapePath:d,upPath:l}})({curved:e,lowerProjection:R,points:r,svgHeight:a,upperProjection:g});return l.jsxs("g",{className:"pointer-events-none",children:[l.jsx("path",{d:v,fill:o,stroke:"transparent",strokeWidth:"0.1"}),";",C&&l.jsx("path",{d:C,...h}),_&&l.jsx("path",{d:_,...f})]})},Qt=(e,t)=>e.map(e=>e[t]),er={formatTicksValues:(e,t)=>e.map(e=>({...e,value:t(e.value)}))},tr=({ariaLabel:e,position:t=w.BOTTOM,tickLine:r,tickText:a,valueFormatter:n=e=>e,...i})=>{const{xAxisCoordinates:{coordinates:o,tickValues:s},xCursor:c,...d}=u.useContext(Kt),h=lt(t,o.y1,Number(a?.fontSize),a?.top??0),x=a?er.formatTicksValues(s,n):void 0,p=He(i),f=e||i["aria-label"],g={...i,...p,...f&&{"aria-label":f}};return l.jsx(ct,{...o,...g,canvasHeight:Number(d.canvasHeight),canvasWidth:Number(d.canvasWidth),cursor:c,dataTestId:`${d.dataTestId}xAxis`,tickLine:{...r,y1:d.yAxisCoordinates.coordinates.y1,y2:d.yAxisCoordinates.coordinates.y2},tickText:{...a,y:h},tickValues:x})},rr=({tickText:e,textWidth:t,yAxisPosition:r})=>{if(r!==w.LEFT)return 0;if(e?.useAxisAsOrigin){const{textAnchor:r="start"}=e;let a=0;return"end"===r&&(a=t),"middle"===r&&(a=t/2),a+=e.left??0,a-=e.right??0,Math.max(0,a)}const a=e?.textAnchor,n=e?.left??0;return"start"===a?0:"middle"===a?t+n:"end"===a?2*t+n:t/2+n},ar=({tickText:e,textWidth:t,yAxisPosition:r})=>{if(r!==w.RIGHT)return 0;if(e?.useAxisAsOrigin){const{textAnchor:r="start"}=e;let a=t;return"end"===r&&(a=0),"middle"===r&&(a=t/2),a-=e.left??0,a+=e.right??0,Math.max(0,a)}const a=e?.textAnchor,n=e?.right??0;return"start"===a?t:"middle"===a||"end"===a?t+n:2*t-t/2+n},nr=({tickText:e,textWidth:t})=>{const r=e?.textAnchor??"start";return"start"===r?0:"middle"===r?t/2:t},ir=({tickText:e,textWidth:t})=>{const r=e?.textAnchor??"start";return"end"===r?0:"middle"===r?t/2:t},or=({ariaLabel:e,position:t=w.LEFT,tickLine:r,tickText:a,valueFormatter:n=e=>e,...i})=>{const{yAxisCoordinates:{coordinates:o,tickValues:s},yCursor:c,...d}=u.useContext(Kt),h=(({tickText:e,yAxisPosition:t,textWidth:r,yAxisX1:a})=>{if(e?.useAxisAsOrigin){let t=a;return t+=e.right??0,t-=e.left??0,t}const n=e?.textAnchor||"middle";let i=0;t===w.RIGHT?i=e?.right??0:t===w.LEFT&&(i=e?.left??0);const o=xt(n,r,i);return dt(t,a,o)})({tickText:a,yAxisPosition:t,textWidth:d.yAxisText,yAxisX1:o.x1}),x=a?er.formatTicksValues(s,n):void 0,p=He(i),f=e||i["aria-label"],g={...i,...p,...f&&{"aria-label":f}};return l.jsx(ht,{...o,...g,canvasHeight:Number(d.canvasHeight),canvasWidth:Number(d.canvasWidth),cursor:c,dataTestId:`${d.dataTestId}yAxis`,tickLine:{...r,x1:d.xAxisCoordinates.coordinates.x1,x2:d.xAxisCoordinates.coordinates.x2},tickText:{...a,x:h},tickValues:x})},sr=e=>{if(e.custom)return e.custom?.values;if(e.numeric){const{max:t,min:r=0,step:a}=e.numeric;if(a>=Math.abs(t-r)||a<=0)return[r.toString(),t.toString()];const n=[];for(let e=r;e<=t;e+=a)n.push(e.toString());return n}},cr=(e,t)=>e.flatMap(e=>Object.keys(e).filter(r=>r!==t&&"number"==typeof e[r]).map(t=>e[t])),dr=({tickValues:e,tickText:t})=>e?.numeric?e.numeric.breakAxis??0:t?.custom?.breakAxis??0,lr=(e,t,r,a,n,i)=>{const{position:o=w.BOTTOM,tickText:s,tickValues:c,valueFormatter:d}=e.props,l=s?.fontSize??0,u=c?sr(c):t.map(e=>e[r]),h=d?u.map(d):u,x=rt({bound:"width",data:h,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a}),p=rt({bound:"height",data:h,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a}),f=o===w.BOTTOM?p+(s?.top??0):0,g=o===w.TOP?p+(s?.bottom??0):0,R=dr({tickValues:c,tickText:s});return{xAxisLeftSpacing:nr({textWidth:x,tickText:s}),xAxisTopSpacing:g,xAxisRightSpacing:ir({textWidth:x,tickText:s}),xAxisBottomSpacing:f,lineChartXPosition:o,xBreakAxis:R,xData:u}},ur=(e,t,r,a,n,i)=>{const{position:o=w.LEFT,tickText:s,tickValues:c,valueFormatter:d}=e.props,l=s?.fontSize??0,u=c||tt([...new Set(cr(t,r))]),h=sr(u),x=d?h.map(d):h,p=rt({bound:"width",data:x,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a}),f=rt({bound:"height",data:x,fontSize:l,svgHeight:`${n}`,svgWidth:`${i}`,viewBox:a});return{yAxisLeftSpacing:rr({tickText:s,textWidth:p,yAxisPosition:o}),yAxisTopSpacing:f,yAxisRightSpacing:ar({tickText:s,textWidth:p,yAxisPosition:o}),yAxisBottomSpacing:0,lineChartYPosition:o,yAxisText:p,yBreakAxis:dr({tickValues:c,tickText:s}),yData:h}},hr=({addError:e,canvasHeight:t,canvasWidth:r,children:a,data:n,viewBox:i,xKey:o})=>{let s;const{error:c}=(({data:e,addError:t})=>{let r;if(!e||0===e.length){const e={error:ue(J)};t?.("LINE_CHART_CONTEXT_ERROR",e),r=e}if(e&&1===e.length){const e={error:ue(ae)};t?.("LINE_CHART_CONTEXT_ERROR",e),r=e}return{error:r}})({data:n,addError:e});c&&(s=c);const{error:d}=(({canvasWidth:e,canvasHeight:t,addError:r})=>{let a;if(e<=0||t<=0){const n={error:xe(e,t)};r?.("LINE_CHART_CONTEXT_ERROR",n),a=n}return{error:a}})({canvasWidth:r,canvasHeight:t,addError:e});d&&(s=d);const l=n&&n.length>0?n:[{[o]:"0",y:0},{[o]:"1",y:1}],h=r>0?r:100,x=t>0?t:100,{xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:T,yAxisBottomSpacing:y,lineChartXPosition:_,lineChartYPosition:v,xAxisText:C,xBreakAxis:m,xData:S,yAxisText:I,yBreakAxis:$,yData:N}=(({canvasHeight:e,canvasWidth:t,children:r,data:a,viewBox:n,xKey:i})=>{let o={xAxisLeftSpacing:0,xAxisTopSpacing:0,xAxisRightSpacing:0,xAxisBottomSpacing:0,yAxisLeftSpacing:0,yAxisTopSpacing:0,yAxisRightSpacing:0,yAxisBottomSpacing:0,lineChartXPosition:w.BOTTOM,lineChartYPosition:w.LEFT,xAxisText:0,xBreakAxis:0,xData:[],yAxisText:0,yBreakAxis:0,yData:[]};return u.Children.forEach(r,r=>{u.isValidElement(r)&&(r.type===tr?o={...o,...lr(r,a,i,n,e,t)}:r.type===or&&(o={...o,...ur(r,a,i,n,e,t)}))}),o})({canvasHeight:x,canvasWidth:h,children:a,data:l,viewBox:i,xKey:o}),b=(({tickValues:e,maxSpaceAvailable:t,xAxisLeftSpacing:r,xAxisRightSpacing:a,yAxisLeftSpacing:n,yAxisRightSpacing:i})=>{const o=Math.max(n,r),s=t-Math.max(a,i);if(e.length<=1)return[{position:o,value:e[0]}];const c=(s-o)/(e.length-1);return e.map((e,t)=>({position:o+c*t,value:e}))})({tickValues:S,maxSpaceAvailable:h,xAxisLeftSpacing:p,xAxisRightSpacing:g,yAxisLeftSpacing:A,yAxisRightSpacing:T}),{error:k}=(({xTickValues:e,addError:t})=>{let r;if(e){if((e??[]).some(({position:e})=>isNaN(e))){const e={error:ue(Z)};t?.("LINE_CHART_CONTEXT_ERROR",e),r=e}const a=e.length<2,n=e.length>=2&&1===new Set(e.map(e=>e.value)).size;if(a){const e={error:ue(ie)};t?.("LINE_CHART_X_AXIS_ERROR",e),r||(r=e)}if(n){const e={error:ue(ne)};t?.("LINE_CHART_X_AXIS_ERROR",e),r||(r=e)}}return{error:r}})({xTickValues:b,addError:e});!s&&k&&(s=k);const O=(({maxSpaceAvailable:e,tickValues:t,xAxisTopSpacing:r,xAxisBottomSpacing:a,yAxisTopSpacing:n,yAxisBottomSpacing:i})=>{const o=e-Math.max(a,i),s=Math.max(n,r);if(t.length<=1)return[{position:o,value:t[0]}];const c=(o-s)/(t.length-1);return t.map((e,t)=>({position:o-c*t,value:e}))})({maxSpaceAvailable:x,tickValues:N,xAxisTopSpacing:f,xAxisBottomSpacing:R,yAxisTopSpacing:E,yAxisBottomSpacing:y}),{error:L}=(({yTickValues:e,addError:t})=>{let r;if(e){const a=e.length<2,n=e.length>=2&&1===new Set(e.map(e=>e.value)).size;if(a){const e={error:ue(ce)};t?.("LINE_CHART_Y_AXIS_ERROR",e),r||(r=e)}if(n){const e={error:ue(se)};t?.("LINE_CHART_Y_AXIS_ERROR",e),r||(r=e)}}return{error:r}})({yTickValues:O,addError:e});!s&&L&&(s=L);const M=_!==w.TOP&&_!==w.BOTTOM,B=v!==w.LEFT&&v!==w.RIGHT,P=M?Ae(O||[],[String(m)])[0]:0,D=B?Ae(b||[],[String($)])[0]:0,j=(({lineChartXPosition:e,lineChartYPosition:t,canvasHeight:r,canvasWidth:a,customBreakAxis:n,xAxisLeftSpacing:i,xAxisTopSpacing:o,xAxisRightSpacing:s,xAxisBottomSpacing:c,yAxisLeftSpacing:d,yAxisTopSpacing:l,yAxisRightSpacing:u,yAxisBottomSpacing:h})=>{const x=t===w.LEFT?Math.max(d,i):0,p=t===w.RIGHT?a-Math.max(u,s):a;return e===w.TOP?{x1:x,x2:p,y1:Math.max(l,o),y2:Math.max(l,o)}:e===w.CENTER?{x1:x,x2:p,y1:r/2,y2:r/2}:e===w.CUSTOM?{x1:x,x2:p,y1:n,y2:n}:{x1:x,x2:p,y1:r-Math.max(h,c),y2:r-Math.max(h,c)}})({canvasHeight:x,canvasWidth:h,customBreakAxis:Number(P),lineChartXPosition:_,lineChartYPosition:v,xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:T,yAxisBottomSpacing:y}),F=(({lineChartXPosition:e,lineChartYPosition:t,canvasHeight:r,canvasWidth:a,customBreakAxis:n,xAxisLeftSpacing:i,xAxisTopSpacing:o,xAxisRightSpacing:s,xAxisBottomSpacing:c,yAxisLeftSpacing:d,yAxisTopSpacing:l,yAxisRightSpacing:u,yAxisBottomSpacing:h})=>{const x=e===w.TOP?Math.max(l,o):0,p=e===w.BOTTOM?r-Math.max(h,c):r;return t===w.RIGHT?{x1:a-Math.max(u,s),x2:a-Math.max(u,s),y1:x,y2:p}:t===w.CENTER?{x1:a/2,x2:a/2,y1:x,y2:p}:t===w.CUSTOM?{x1:n,x2:n,y1:x,y2:p}:{x1:Math.max(d,i),x2:Math.max(d,i),y1:x,y2:p}})({canvasHeight:x,canvasWidth:h,customBreakAxis:Number(D),lineChartXPosition:_,lineChartYPosition:v,xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:T,yAxisBottomSpacing:y}),{error:X}=(({xCoordinates:e,addError:t})=>{let r;if(e.x1===e.x2){const e={error:ue(oe)};t?.("LINE_CHART_X_AXIS_ERROR",e),r=e}return{error:r}})({xCoordinates:j,addError:e});!s&&X&&(s=X);const{error:V}=(({yCoordinates:e,addError:t})=>{let r;if(e.y1===e.y2){const e={error:ue(de)};t?.("LINE_CHART_Y_AXIS_ERROR",e),r||(r=e)}return{error:r}})({yCoordinates:F,addError:e});!s&&V&&(s=V);const W={addError:e,crossXAxis:M,crossYAxis:B,xAxisLeftSpacing:p,xAxisTopSpacing:f,xAxisRightSpacing:g,xAxisBottomSpacing:R,yAxisLeftSpacing:A,yAxisTopSpacing:E,yAxisRightSpacing:T,yAxisBottomSpacing:y,xAxisCoordinates:{coordinates:j,tickValues:b||(s?[{position:0,value:"0"},{position:h,value:"1"}]:[])},xAxisText:C,yAxisCoordinates:{coordinates:F,tickValues:O||(s?[{position:x,value:Ee},{position:0,value:Te}]:[])},yAxisText:I};return s?{...W,error:{...s,type:H.LINE_CHART_CONTEXT_ERROR}}:W},xr=Object.assign(({ariaHidden:e,ariaLabel:t,canvasConfig:r=N,caption:a,children:n,classNames:i,data:o,dataTestId:s="line-chart",getPathArea:c,height:d="100%",onErrors:x,role:f,tabIndex:g,width:R="100%",xKey:A,...E})=>{const T=p(s),[y,_]=u.useState(""),{parsedCanvas:v,parsedCanvasExtraSpace:C,viewBox:m}=$({canvasConfig:r,dataTestId:T,height:d,width:R}),S=[l.jsx(tr,{},"default-x-axis"),l.jsx(or,{},"default-y-axis")],I=u.Children.toArray(n)||[],O=S.concat(I);(({attrName:e,children:t,originalValue:r,updateValue:a})=>{let n="";u.Children.toArray(t).forEach(t=>{if(u.isValidElement(t)){const r=t.props[e];r&&(n+=r)}}),n!==r&&a(n)})({attrName:"dataKey",children:O,originalValue:y,updateValue:_});const L=u.useMemo(()=>b(x),[x]),H=k(o),w=u.useMemo(()=>(L.clearErrors(),hr({addError:(e,t)=>{L.addError(e,t)},canvasHeight:v.height,canvasWidth:v.width,children:O,data:o,viewBox:m,xKey:A})),[v.width,v.height,H,A,y,L.addError]),{svgRef:M,xCursor:B,yCursor:P}=(({canvasHeight:e,canvasWidth:t})=>{const[[r,a],n]=u.useState([Me,Me]),i=u.useCallback((r,a)=>{const{height:i,left:o,top:s,width:c}=a.getBoundingClientRect(),d=r.clientX-o,l=r.clientY-s;n([d*t/c,l*e/i])},[t,e]),o=e=>{e.preventDefault()};return{svgRef:u.useCallback(e=>{e&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",t=>i(t.touches[0],e)),e.addEventListener("mousemove",t=>i(t,e))),e?.removeEventListener("touchstart",o),e?.removeEventListener("touchmove",t=>i(t.touches[0],e)),e?.removeEventListener("mousemove",t=>i(t,e))},[e,t]),xCursor:r,yCursor:a}})({canvasHeight:v.height,canvasWidth:v.width});return u.useEffect(()=>{c?.({x1:w.xAxisCoordinates.coordinates.x1,y1:w.yAxisCoordinates.coordinates.y1,x2:w.xAxisCoordinates.coordinates.x2,y2:w.yAxisCoordinates.coordinates.y2})},[w.xAxisCoordinates.coordinates.x1,w.yAxisCoordinates.coordinates.y1,w.xAxisCoordinates.coordinates.x2,w.yAxisCoordinates.coordinates.y2,c]),l.jsx(h,{ref:M,ariaHidden:e,ariaLabel:t,caption:a,className:i,"data-kbt-svg":!0,dataTestId:T,height:d,role:f,tabIndex:g,viewBox:m,width:R,...E,children:l.jsx(Kt.Provider,{value:{...w,canvasExtraSpace:C,canvasHeight:v.height,canvasWidth:v.width,data:o,dataTestId:T,xCursor:B,xKey:A,yCursor:P},children:n})})},{Path:({ariaLabel:e,closestClick:t,curved:r,getNodeFocusInfo:a,getNodesCoords:n,indicatorConfig:i,lineProjection:o,onClick:s,...c})=>{const{addError:d,xAxisCoordinates:h,yAxisCoordinates:x,...p}=u.useContext(Kt),f=c.dataKey,g=p.data.length>0,R=p.data[0],A=!!R&&Object.prototype.hasOwnProperty.call(R,f),E=p.data.length;u.useEffect(()=>{if(!f||"string"!=typeof f)return void d?.("LINE_CHART_PATH_ERROR",{error:ue(te)});if(g&&!A)return void d?.("LINE_CHART_PATH_ERROR",{error:he(f)});if(r&&E<2)return void d?.("LINE_CHART_PATH_ERROR",{error:ue(ee)});const e=Qt(p.data,f);e.length>0&&e.every(e=>null==e)&&d?.("LINE_CHART_PATH_ERROR",{error:ue(Q)})},[d,r,f,E,g,A,p.data]);const{indicatorRef:T,pathRef:y}=((e,t)=>{const r=u.useRef(null),a=u.useRef(null);return u.useEffect(()=>{if(!t||!r.current||!a.current)return;const n=r.current,i=a.current;let o,s,c=0,d=n.getTotalLength();for(;d-c>.01;)o=(c+d)/2,s=n.getPointAtLength(o),s.x<e?c=o:d=o;const l=n.getPointAtLength(d);i.setAttribute("transform",`translate(${l.x}, ${l.y})`),i.setAttribute("pointer-events","none")},[e]),{indicatorRef:a,pathRef:r}})(p.xCursor,!!i),_=!!i&&p.xCursor!==-1/0,v=u.useRef(null),C=u.useRef(null),{autoClick:m,lineIndicator:S,...I}=i||{},{y1:$,y2:N}=x.coordinates,{x1:b,x2:k}=h.coordinates,O=p.xCursor>=b&&p.xCursor<=k,{tickValues:L}=h,{tickValues:H}=x,w=Qt(p.data,p.xKey),M=Qt(p.data,f),B=Ae(L,w,!0),P=Ae(H,M),D=B.map((e,t)=>[e,P[t]]),j=Ut({curved:r,extendToBottom:!1,points:D,svgHeight:x.coordinates.y2}),F=Ut({curved:r,extendToBottom:!!c.fill||!!c.gradient,points:D,svgHeight:x.coordinates.y2});u.useEffect(()=>{if(!v.current?.path)return;y.current=v.current.path;const e=v.current.main,t=v.current.node,r=w.map((e,t)=>({x:e,y:M[t]})),{mount:n,unmount:i}=(({data:e,getNodeFocusInfo:t,nodes:r,ref:a})=>{let n;const i=a.querySelector("[data-draw]"),o=a=>{let i;"ArrowRight"===a.key?i=void 0===n||n===r.length-1?0:n+1:"ArrowLeft"===a.key&&(i=void 0===n||0===n?r.length-1:n-1),void 0!==i&&(n=i,r[n]&&(r[n].focus(),t?.(e[n])))},s=()=>{n=void 0};return{mount:()=>{i?.addEventListener("focus",s),a.addEventListener("keydown",e=>o(e))},unmount:()=>{i?.removeEventListener("focus",s),a.removeEventListener("keydown",e=>o(e))}}})({data:r,getNodeFocusInfo:a,nodes:t,ref:e});return n(),()=>i()},[]),u.useEffect(()=>{if(c.nodeConfig&&_&&m){const{idx:e,match:t}=((e,t)=>{let r=0,a=!1;for(let n=0;n<e.length;n++)if(Math.round(e[n])===Math.round(t)){a=!0,r=n;break}return{idx:r,match:a}})(B,p.xCursor);if(t&&e!==C.current){C.current=e;const t=new MouseEvent("click",{bubbles:!0});t.autoClick=!0,v.current?.node?.[e]?.dispatchEvent(t),navigator?.vibrate?.(200)}else C.current=null}},[p.xCursor]),u.useEffect(()=>{n?.(D)},[D]);const X=He(c),V={...c,...X,...e&&{"aria-label":e}};return l.jsxs(l.Fragment,{children:[l.jsx(ze,{ref:v,d:j,dFill:F,dataTestId:`${p.dataTestId}path`,dataValue:p.data,points:D,xKey:p.xKey,onClick:e=>{if(s?.(e),t){const e=((e,t)=>{let r=0,a=Math.abs(e[0]-t);for(let n=1;n<e.length;n++){const i=Math.abs(e[n]-t);i<a&&(r=n,a=i)}return r})(B,p.xCursor),t=new MouseEvent("click",{bubbles:!0});t.autoClick=!1,v.current?.node?.[e]?.dispatchEvent(t)}},...V}),o&&l.jsx(Jt,{curved:r,dataKey:c.dataKey,lineProjection:o,points:D,svgHeight:x.coordinates.y2}),_&&l.jsxs(l.Fragment,{children:[!!S&&O&&l.jsx(at,{...S,className:"pointer-events-none",x1:p.xCursor,x2:p.xCursor,y1:$,y2:N}),l.jsx("g",{ref:T,className:"pointer-events-none",children:l.jsx(Ye,{...I})})]})]})},Separator:({areaSeparator:e,dataTestId:t,rightSeparator:r,topSeparator:a,xBreakAxis:n,yBreakAxis:i})=>{const{addError:o,crossXAxis:s,crossYAxis:c,xAxisCoordinates:d,yAxisCoordinates:h}=u.useContext(Kt),x=d.tickValues,p=h.tickValues,f=void 0!==n?"string"==typeof n?parseFloat(n):n:void 0,g=void 0!==i?"string"==typeof i?parseFloat(i):i:void 0;if(u.useEffect(()=>{if(void 0!==n){const e=x.map(e=>e.value);if(void 0===f||isNaN(f))o?.("LINE_CHART_SEPARATOR_ERROR",{error:pe(n)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(f<t||f>r)&&o?.("LINE_CHART_SEPARATOR_ERROR",{error:ge(f,t,r)})}}if(void 0!==i){const e=p.map(e=>e.value);if(void 0===g||isNaN(g))o?.("LINE_CHART_SEPARATOR_ERROR",{error:fe(i)});else{const t=Math.min(...e.map(e=>"string"==typeof e?parseFloat(e):e)),r=Math.max(...e.map(e=>"string"==typeof e?parseFloat(e):e));(g<t||g>r)&&o?.("LINE_CHART_SEPARATOR_ERROR",{error:Re(g,t,r)})}}},[n,f,x,i,g,p]),!a&&!r&&!e)return l.jsx(l.Fragment,{});const R=n&&Ae(d.tickValues,[n],!0)[0],A=i&&Ae(h.tickValues,[i])[0],E=c?h.coordinates.x1:d.coordinates.x2,T=s?d.coordinates.y1:h.coordinates.y1,y=d.coordinates.x1,_=R??E,v=h.coordinates.y2,C=A??T;u.useEffect(()=>{y===_&&v===C&&o?.("LINE_CHART_SEPARATOR_ERROR",{error:ue(re)})},[y,_,v,C]);const m=`M${y} ${v} H ${_} V ${C} H ${y} Z`,S=`M${y} ${C} H ${_}`,I=`M${_} ${v} V ${C}`;return l.jsxs("g",{children:[l.jsx("path",{d:m,"data-testid":`${t}Area`,...e}),l.jsx("path",{d:S,"data-testid":`${t}Top`,...a}),l.jsx("path",{d:I,"data-testid":`${t}Right`,...r})]})},XAxis:tr,YAxis:or}),pr=({children:e,dataTestId:t,height:r,width:a,x:n,y:i})=>l.jsx("foreignObject",{"data-testid":t,height:r,width:a,x:n,y:i,children:e}),fr=u.createContext({}),gr=({ariaLabel:e,dataKey:t,index:r,groupName:a,groupValue:n})=>{if(!e)return;const i=new RegExp("{{dataKey}}","g"),o=new RegExp("{{index}}","g"),s=new RegExp("{{groupName}}","g"),c=new RegExp("{{groupValue}}","g");return e.replace(i,t).replace(o,String(r)).replace(s,a).replace(c,String(n))},Rr=(e,t,r)=>({x:e.x+t*Math.cos(r),y:e.y+t*Math.sin(r)}),Ar=({center:e,innerEnd:t,innerRadius:r,singleStroke:a})=>{if(!a)return r>0?`L ${t.x},${t.y}`:`L ${e.x},${e.y}`},Er="CLOCKWISE",Tr=({canvasHeight:e,canvasWidth:t,color:r="blue",dataKey:a,gap:n,halfChart:i,index:o,innerRadius:s,name:c,radius:d,singleStroke:h,startAngle:x,total:p,value:f,...g})=>{const{addError:R}=u.useContext(fr),A=Number(f),E=void 0!==d?Number(d):void 0,T=void 0!==s?Number(s):void 0,y=c?.trim()||"";u.useEffect(()=>{y||R?.("PIE_CHART_SEGMENT_ERROR",{error:U(a||"unknown",o||0,"name")}),isNaN(A)?R?.("PIE_CHART_SEGMENT_ERROR",{error:F(f,y||`segment-${o}`)}):(A<0&&R?.("PIE_CHART_SEGMENT_ERROR",{error:X(A,y||`segment-${o}`)}),void 0!==E&&(isNaN(E)||E<=0)&&R?.("PIE_CHART_SEGMENT_ERROR",{error:Y(d)}),void 0!==T&&((isNaN(T)||T<0)&&R?.("PIE_CHART_SEGMENT_ERROR",{error:G(s)}),void 0!==E&&(isNaN(E)||isNaN(T)||T>=E&&R?.("PIE_CHART_SEGMENT_ERROR",{error:z(T,E)}))))},[a,o,T,E,A,y]);const _=(({canvasHeight:e,canvasWidth:t,customRadius:r,gap:a,halfChart:n,innerRadius:i,rotateDirection:o,singleStroke:s,startAngle:c,total:d,value:l})=>{const u=n?2*e:e,h=Math.min(t,u)/2,x=r&&r<h?r:h,p=n?Math.PI:2*Math.PI,f={x:t/2,y:n?e:e/2},g=s?2*d:d,R=100*l/g*p/100,A=a/x,{carryAngle:E,finalAngle:T,initialAngle:y}=(({angleEquivalent:e,direction:t,gapAngle:r,startAngle:a})=>{const n=t===Er;return{carryAngle:n?a+e:a-e,finalAngle:n?a+e-r/2:a-e+r/2,initialAngle:n?a+r/2:a-r/2}})({angleEquivalent:R,direction:o,gapAngle:A,startAngle:c.current});c.current=E;const _=p*l/g-A<=Math.PI?"0":"1",v=Rr(f,i,y),C=Rr(f,i,T),m=Rr(f,x,y);return(({center:e,innerEnd:t,innerRadius:r,innerStart:a,largeArcFlag:n,outerEnd:i,outerStart:o,radius:s,rotateDirection:c,singleStroke:d})=>{let l,u,h,x,p,f,g,R,A,E;return c===Er?(l=`M ${o.x},${o.y}`,u=`A ${s},${s} 0 ${n} 1 ${i.x}, ${i.y}`,h=Ar({center:e,innerEnd:t,innerRadius:r,singleStroke:d}),x=d?`M ${t.x},${t.y}`:void 0,p=r>0?`A ${r},${r} 0 ${n} 0 ${a.x},${a.y}`:void 0,f=`M ${o.x},${o.y}`,R=`M ${t.x},${t.y}`,g=`A ${s},${s} 0 ${n} 0 ${i.x},${i.y}`,A=`A ${r},${r} 0 ${n} 1 ${a.x},${a.y}`,E=d?void 0:"Z"):(l=`M ${o.x} ${o.y}`,u=`A ${s},${s} 0 ${n},0 ${i.x}, ${i.y}`,h=Ar({center:e,innerEnd:t,innerRadius:r,singleStroke:d}),x=d?`M ${t.x},${t.y}`:void 0,p=r>0?`A ${r}, ${r} 0 ${n},1 ${a.x},${a.y}`:void 0,f=`M ${o.x},${o.y}`,R=`M ${t.x},${t.y}`,g=`A ${s},${s} 0 ${n} 1 ${i.x},${i.y}`,A=`A ${r},${r} 0 ${n} 0 ${a.x},${a.y}`,E=d?void 0:"Z"),[l,u,h,x,p,E].concat(d?[f,g,R,A]:[]).filter(Boolean).join(" ")})({center:f,innerEnd:C,innerRadius:i,innerStart:v,largeArcFlag:_,outerEnd:Rr(f,x,T),outerStart:m,radius:x,rotateDirection:o,singleStroke:s})})({canvasHeight:e,canvasWidth:t,customRadius:d,gap:n,halfChart:i,innerRadius:s,singleStroke:h,startAngle:x,total:p,value:f});return l.jsx(ze,{...g,d:_,dataValue:f,fill:r})},yr=({ariaLabel:e,"aria-label":t,dataKey:r,fill:a,gap:n,innerRadius:i,radius:o,...s})=>{const c=String(r),{addError:d,canvasHeight:h,canvasWidth:x,data:p,dataTestId:f,halfChart:g}=u.useContext(fr),R=g?0:-Math.PI/2,A=u.useRef(R),E=p[c],T=Object.prototype.hasOwnProperty.call(p,c);u.useEffect(()=>{if(!T)return void d?.("PIE_CHART_PATH_ERROR",{error:V(c)});if(!E||0===E.length)return void d?.("PIE_CHART_PATH_ERROR",{error:W(c)});const e=E.reduce((e,t)=>e+t.value,0);(e<=0||isNaN(e))&&d?.("PIE_CHART_PATH_ERROR",{error:K(c,e)})},[E,T,c]);const y=p[c]?.reduce((e,t)=>e+t.value,0),_=1===p[c]?.length,v=i?I(i):void 0,C=o?I(o):void 0;return p[c]?.length?l.jsx("g",{children:p[c].map((r,i)=>u.createElement(Tr,{...s,...r,key:`${i.toString()}`,ariaLabel:gr({ariaLabel:t||e,dataKey:c,index:i,groupName:r.name,groupValue:r.value}),canvasHeight:h,canvasWidth:x,color:r.color||a,dataKey:c,dataTestId:`${f}path-${i}`,gap:n,halfChart:g,index:i,innerRadius:v,radius:C,singleStroke:_,startAngle:A,total:y}))}):l.jsx(l.Fragment,{})},_r=Object.assign(({ariaHidden:e,ariaLabel:t,canvasConfig:r=N,caption:a,children:n,classNames:i,data:o,dataTestId:s="pie-chart",halfChart:c,height:d="100%",onErrors:x,radius:f="50%",role:g,tabIndex:R,width:A="100%",...E})=>{const T=p(s),{parsedCanvas:y,viewBox:_}=$({canvasConfig:r,dataTestId:T,height:d,width:A}),v=y.width,C=y.height,m=u.useMemo(()=>b(x),[x]),S=k(o),O=u.useMemo(()=>(m.clearErrors(),(({addError:e,canvasHeight:t,canvasWidth:r,children:a,halfChart:n})=>{(r<=0||t<=0)&&e?.("PIE_CHART_CONTEXT_ERROR",{error:xe(r,t)});const i=r>0?r:100,o=t>0?t:100;let s,c;u.Children.forEach(a,e=>{if(u.isValidElement(e)&&e.type===yr){const{innerRadius:t}=e.props;if(!t)return;const r=I(t);(!s||r<s)&&(s=r)}}),s&&(c=2*s);const d=c??0,l=n?d/2:d,h=n?o:o/2;return{addError:e,foreignObject:{height:l,width:d,x:i/2-d/2,y:n?h-l:h-l/2}}})({addError:(e,t)=>{m.addError(e,t)},canvasHeight:C,canvasWidth:v,children:n,halfChart:c})),[C,v,c,S,m]);return l.jsx(h,{ariaHidden:e,ariaLabel:t,caption:a,className:i,dataTestId:T,height:d,radius:f,role:g,tabIndex:R,viewBox:_,width:A,...E,children:l.jsx(fr.Provider,{value:{...O,canvasHeight:C,canvasWidth:v,data:o,dataTestId:T,halfChart:c},children:n})})},{Foreign:({children:e,dataTestId:t,height:r,width:a,x:n,y:i,...o})=>{const{dataTestId:s,foreignObject:c}=u.useContext(fr),d=!a&&c?.width?c.width:a,h=!r&&c?.height?c.height:r,x=!n&&c?.x?c.x:n,p=!i&&c?.y?c.y:i,f=!t&&s?`${s}-foreign-object`:t;return l.jsx(pr,{...o,dataTestId:f,height:h,width:d,x:x,y:p,children:e})},Path:yr}),vr=({fill:e="#8f8f8f",x:t,y:r})=>l.jsxs("g",{fill:e,pointerEvents:"none",transform:`translate(${t-5}, ${r-5})`,children:[l.jsx("path",{d:"M4.99948 9.99802C4.47168 9.99802 4.04419 9.64335 4.04419 9.20547V0.79255C4.04419 0.354666 4.47168 0 4.99948 0C5.52728 0 5.95477 0.354666 5.95477 0.79255V9.20745C5.95477 9.64533 5.52728 10 4.99948 10V9.99802Z"}),l.jsx("path",{d:"M0.955289 8.78839C0.427492 8.78839 0 8.43372 0 7.99584V2.00416C0 1.56628 0.427492 1.21161 0.955289 1.21161C1.48309 1.21161 1.91058 1.56628 1.91058 2.00416V7.99584C1.91058 8.43372 1.48309 8.78839 0.955289 8.78839Z"}),l.jsx("path",{d:"M8.08936 7.99584C8.08936 8.43372 8.51685 8.78839 9.04464 8.78839C9.57244 8.78839 9.99993 8.43372 9.99993 7.99584V2.00416C9.99993 1.56628 9.57244 1.21161 9.04464 1.21161C8.51685 1.21161 8.08936 1.56628 8.08936 2.00416V7.99584Z"})]}),Cr=({linesData:e})=>l.jsx(l.Fragment,{children:e.map((e,t)=>l.jsxs("g",{children:[e.config.fill&&e.fillPath&&l.jsx("path",{d:e.fillPath,fill:e.config.fill,fillOpacity:e.config.fillOpacity||.2,stroke:"none"}),l.jsx("path",{d:e.linePath,fill:"none",stroke:e.config.stroke||"#0078D4",strokeWidth:e.config.strokeWidth||1})]},e.config.dataKey||e.config.yKey||t))}),mr=(e,t,r)=>{const a=e.start/Math.max(1,t-1)*r;return{endX:e.end/Math.max(1,t-1)*r,startX:a}},Sr=(e,t,r)=>{const a=Math.max(0,Math.min(t,e))/t;return Math.round(a*(r-1))},Ir=(e,t,r=.1)=>{const a=Math.max(0,Math.min(e.start,t-1-r));return{end:Math.min(t-1,Math.max(e.end,a+r)),start:a}},$r=e=>({end:Math.max(0,e-1),start:0}),Nr=(e,t)=>0===e.start&&e.end===t-1,br=u.forwardRef(({currentRange:e,dataLength:t,dataTestId:r,endX:a,height:n,onBlur:i,onFocus:o,onKeyDown:s,onMouseDown:c,onTouchStart:d,screenReaderText:u,selectionConfig:h,startX:x},p)=>{const f=h.hideOverlayOnFullRange&&Nr(e,t);return l.jsx(l.Fragment,{children:l.jsx("rect",{ref:p,"aria-label":u,"aria-valuemax":t-1,"aria-valuemin":0,"aria-valuetext":u,cursor:"grab","data-testid":r,fill:h.fill,fillOpacity:h.fillOpacity,height:n,role:"slider",stroke:h.stroke,strokeWidth:h.strokeWidth,style:{outline:"none",visibility:f?"hidden":"visible"},tabIndex:0,width:a-x,x:x,y:0,onBlur:i,onFocus:o,onKeyDown:s,onMouseDown:c,onTouchStart:d})})});br.displayName="SelectionArea";const kr="#8f8f8f",Or=({dataTestId:e,focusConfig:t,handlerConfig:r,height:a,isFocused:n,max:i,min:o,onBlur:s,onFocus:c,onKeyDown:d,onMouseDown:u,onTouchStart:h,screenReaderText:x,x:p})=>{const f=a/2,g=(e=>({fill:e?.fill||"#ffffff",iconColor:e?.iconColor||kr,radius:e?.radius||17,stroke:e?.stroke||kr,strokeWidth:e?.strokeWidth||1,verticalLineStroke:e?.verticalLineStroke||kr,verticalLineStrokeWidth:e?.verticalLineStrokeWidth||2}))(r);return l.jsxs("g",{"data-testid":`${e}-group`,children:[l.jsx("line",{pointerEvents:"none",stroke:g.verticalLineStroke,strokeWidth:g.verticalLineStrokeWidth,x1:p,x2:p,y1:0,y2:a}),l.jsx(ke,{dataTestId:e,focusConfig:t,isFocused:n,children:l.jsx("circle",{"aria-label":x,"aria-valuemax":i,"aria-valuemin":o,"aria-valuetext":x,cursor:"ew-resize",cx:p,cy:f,"data-testid":e,fill:g.fill,r:g.radius,role:"slider",stroke:g.stroke,strokeWidth:g.strokeWidth,style:{outline:"none"},tabIndex:0,onBlur:s,onFocus:c,onKeyDown:d,onMouseDown:u,onTouchStart:h})}),l.jsx(vr,{fill:g.iconColor,x:p,y:f})]})},Lr={END_HANDLER:"END_HANDLER",SELECTION_AREA:"SELECTION_AREA",START_HANDLER:"START_HANDLER"},Hr=e=>{const{currentRange:t,dataLength:r,interactionConfig:a,onRangeChange:n,width:i}=e,o=u.useRef(null),[s,c]=u.useState(null),d=u.useCallback(e=>()=>{c(e)},[]),l=u.useCallback(e=>()=>{c(e)},[]),h=u.useCallback(e=>{if(!s||!o.current)return;const c=o.current;if(!c)return;const d=e-c.getBoundingClientRect().left,l=Sr(d,i,r),u=((e,t,r,a,n)=>{const i={...t};if(e===Lr.START_HANDLER)i.start=Math.max(0,Math.min(r,t.end-n.minHandlerDistance));else if(e===Lr.END_HANDLER)i.end=Math.min(a-1,Math.max(r,t.start+n.minHandlerDistance));else if(e===Lr.SELECTION_AREA){const e=t.end-t.start,n=Math.max(0,Math.min(a-1-e,r-e/2));i.start=n,i.end=n+e}return i})(s,t,l,r,a),h=Ir(u,r,a.minHandlerDistance);n(h)},[s,i,r,t,n,a]),x=u.useCallback(e=>{h(e.clientX)},[h]),p=u.useCallback(e=>{0!==e.touches.length&&(e.preventDefault(),h(e.touches[0].clientX))},[h]),f=u.useCallback(()=>{c(null)},[]),g=u.useCallback(()=>{c(null)},[]);return u.useEffect(()=>{if(s)return document.addEventListener("mousemove",x),document.addEventListener("mouseup",f),document.addEventListener("touchmove",p,{passive:!1}),document.addEventListener("touchend",g),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",p),document.removeEventListener("touchend",g)}},[s,x,f,p,g]),{groupRef:o,handleMouseDown:d,handleTouchStart:l,isDragging:s}},wr=e=>{const{currentRange:t,dataLength:r,interactionConfig:a,onRangeChange:n}=e;return{handleKeyDown:u.useCallback(e=>i=>{const o=i.shiftKey?a.keyboardFastStep:a.keyboardStep;let s={...t};switch(i.key){case"ArrowLeft":case"ArrowDown":i.preventDefault(),s=((e,t,r,a)=>{const n={...t};if(e===Lr.START_HANDLER)n.start=Math.max(0,t.start-r);else if(e===Lr.END_HANDLER)n.end=Math.max(t.start+a.minHandlerDistance,t.end-r);else if(e===Lr.SELECTION_AREA){const e=t.end-t.start,a=Math.max(0,t.start-r);n.start=a,n.end=a+e}return n})(e,t,o,a);break;case"ArrowRight":case"ArrowUp":i.preventDefault(),s=((e,t,r,a,n)=>{const i={...t};if(e===Lr.START_HANDLER)i.start=Math.min(t.end-n.minHandlerDistance,t.start+r);else if(e===Lr.END_HANDLER)i.end=Math.min(a-1,t.end+r);else if(e===Lr.SELECTION_AREA){const e=t.end-t.start,n=Math.min(a-1-e,t.start+r);i.start=n,i.end=n+e}return i})(e,t,o,r,a);break;case"Home":i.preventDefault(),s=((e,t,r)=>{const a={...t};if(e===Lr.START_HANDLER)a.start=0;else if(e===Lr.END_HANDLER)a.end=r-1;else if(e===Lr.SELECTION_AREA){const e=t.end-t.start;a.start=0,a.end=e}return a})(e,t,r);break;case"End":i.preventDefault(),s=((e,t,r,a)=>{const n={...t};if(e===Lr.START_HANDLER)n.start=t.end-a.minHandlerDistance;else if(e===Lr.END_HANDLER)n.end=r-1;else if(e===Lr.SELECTION_AREA){const e=t.end-t.start;n.start=r-1-e,n.end=r-1}return n})(e,t,r,a);break;default:return}const c=Ir(s,r,a.minHandlerDistance);n(c)},[t,r,n,a])}},Mr=()=>{const[e,t]=u.useState(null),r=u.useCallback(e=>()=>t(e),[]);return{handleBlur:u.useCallback(()=>{t(null)},[]),handleFocus:r,isFocused:u.useCallback(t=>e===t,[e])}},Br=(e,t)=>{const r=Math.floor(e);return Math.max(0,Math.min(t,r))},Pr=(e,t)=>{const r=Math.ceil(e);return Math.max(0,Math.min(t,r))},Dr=(e,t)=>{const r=Math.max(0,t-1);return{endIndex:Pr(e.end,r),startIndex:Br(e.start,r)}},jr=({data:e,initialRange:t,onDataChange:r})=>{const a=t||$r(e.length),[n,i]=u.useState(a),o=t=>{if(!r||0===e.length)return;const{endIndex:a,startIndex:n}=Dr(t,e.length),i=e.slice(n,a+1);r(i)};return u.useEffect(()=>{o(n)},[]),{currentRange:n,handleRangeChange:e=>{i(e),o(e)}}},Fr=e=>({keyboardFastStep:e?.keyboardFastStep??2,keyboardStep:e?.keyboardStep??1,minHandlerDistance:e?.minHandlerDistance??1}),Xr=e=>{if(0===e.length)return"";if(1===e.length)return`M ${e[0][0]} ${e[0][1]}`;const[t,...r]=e;let a=`M ${t[0]} ${t[1]}`;return r.forEach((e,n)=>{const i=0===n?t:r[n-1],[o,s]=i,[c,d]=e,l=.3*(c-o),u=[o+l,s],h=[c-l,d];a+=` C ${u[0]} ${u[1]}, ${h[0]} ${h[1]}, ${c} ${d}`}),a},Vr=(e,t,r,a)=>{if(0===e.length||0===t.length)return[];const n=.05*a,i=a-2*n,o=t.flatMap(t=>e.map(e=>Number(e[t.yKey]))),s=Math.min(...o),c=Math.max(...o)-s||1;return t.map(t=>{const o=e.map((a,o)=>[o/Math.max(1,e.length-1)*r,n+i-(Number(a[t.yKey])-s)/c*i]),d=t.curved?Xr(o):`M ${o.map(([e,t])=>`${e},${t}`).join(" L ")}`;let l="";return t.fill&&(l=t.curved?`${Xr(o)} L ${r} ${a} L 0 ${a} Z`:`${d} L ${r},${a} L 0,${a} Z`),{config:t,fillPath:l,linePath:d}})},Wr=(e,t,r)=>e[r]?.[t]?.toString()||`${r}`,Kr=(e,t,r)=>{if(!e)return e;const a=new RegExp("{{startValue}}","g"),n=new RegExp("{{endValue}}","g");return e.replace(a,t).replace(n,r)};e.Bar=Je,e.BarChart=Tt,e.BarOrientation=L,e.ChartText=nt,e.CustomBackgroundChart=Wt,e.DefaultCanvasConfig=N,e.ErrorType=H,e.FOCUS_DEFAULT=_e,e.FocusRing=ke,e.ForeignObject=pr,e.HandlerIcon=vr,e.Line=at,e.LineChart=xr,e.LineRenderer=Cr,e.Node=Ye,e.NodeType=Ke,e.Path=ze,e.PieChart=_r,e.Positions=w,e.SelectionArea=br,e.SvgContainer=h,e.Tick=it,e.TickDataUtils=er,e.XAxis=ct,e.YAxis=ht,e.ZoomArea=({ariaHidden:e,ariaLabel:t,backgroundColor:r,canvasConfig:a,caption:n,classNames:i,data:o,focusConfig:s,handlerConfig:c,height:d="40px",initialRange:x,interactionConfig:p,lines:f,onDataChange:g,role:R,screenReaderTextConfig:A,selectionConfig:E,width:T="100%",xKey:y,..._})=>{const v="zoom-area",C=Fr(p),m=(S=E,{fill:S?.fill??"#0078d4",fillOpacity:S?.fillOpacity??.5,hideOverlayOnFullRange:S?.hideOverlayOnFullRange??true,stroke:S?.stroke??"#0078d4",strokeWidth:S?.strokeWidth??0});var S;const{currentRange:I,handleRangeChange:N}=jr({data:o,initialRange:x,onDataChange:g}),{parsedCanvas:b,viewBox:O}=$({canvasConfig:a,dataTestId:v,height:d,width:T}),L=k(o),H=JSON.stringify(f),w=u.useRef(null),M=((e,t,r,a)=>{const{endIndex:n,startIndex:i}=Dr(r,e.length),o=Wr(e,t,i),s=Wr(e,t,n),c=Kr(a?.startHandler,o,s)??o;return{endHandler:Kr(a?.endHandler,o,s)??s,selectionArea:Kr(a?.selectionArea,o,s)??`${o} - ${s}`,startHandler:c}})(o,y,I,A),B=u.useMemo(()=>Vr(o,f,b.width,b.height),[L,H,b.width,b.height]),{endX:P,startX:D}=u.useMemo(()=>mr(I,o.length,b.width),[I,L,b.width]),{handleBlur:j,handleFocus:F,isFocused:X}=Mr(),{handleKeyDown:V}=wr({currentRange:I,dataLength:o.length,interactionConfig:C,onRangeChange:N}),{groupRef:W,handleMouseDown:K,handleTouchStart:U}=Hr({currentRange:I,dataLength:o.length,interactionConfig:C,onRangeChange:N,width:b.width});return l.jsxs(h,{ref:W,ariaHidden:e,ariaLabel:t,backgroundColor:r,caption:n,className:i,"data-testid":v,height:d,overflow:"visible",role:R,viewBox:O,width:T,..._,children:[l.jsx(Cr,{linesData:B}),l.jsx(br,{ref:w,currentRange:I,dataLength:o.length,dataTestId:`${v}-selection-area`,endX:P,height:b.height,screenReaderText:M.selectionArea,selectionConfig:m,startX:D,onBlur:j,onFocus:F(Lr.SELECTION_AREA),onKeyDown:V(Lr.SELECTION_AREA),onMouseDown:K(Lr.SELECTION_AREA),onTouchStart:U(Lr.SELECTION_AREA)}),l.jsx(Or,{dataTestId:`${v}-start-handler`,focusConfig:s,handlerConfig:c,height:b.height,isFocused:X(Lr.START_HANDLER),max:I.end-C.minHandlerDistance,min:0,screenReaderText:M.startHandler,type:Lr.START_HANDLER,value:I.start,x:D,onBlur:j,onFocus:F(Lr.START_HANDLER),onKeyDown:V(Lr.START_HANDLER),onMouseDown:K(Lr.START_HANDLER),onTouchStart:U(Lr.START_HANDLER)}),l.jsx(Or,{dataTestId:`${v}-end-handler`,focusConfig:s,handlerConfig:c,height:b.height,isFocused:X(Lr.END_HANDLER),max:o.length-1,min:I.start+C.minHandlerDistance,screenReaderText:M.endHandler,type:Lr.END_HANDLER,value:I.end,x:P,onBlur:j,onFocus:F(Lr.END_HANDLER),onKeyDown:V(Lr.END_HANDLER),onMouseDown:K(Lr.END_HANDLER),onTouchStart:U(Lr.END_HANDLER)}),l.jsx(ke,{dataTestId:"selection-area-focus",focusConfig:{...s,variant:"bounding-box"},isFocused:X(Lr.SELECTION_AREA),targetRef:w})]})},e.ZoomAreaElements=Lr,e.ZoomHandler=Or,e.calculateHandlerPositions=mr,e.calculateLinesPathData=Vr,e.clampRange=Ir,e.createDefaultRange=$r,e.generateCurvedPath=Xr,e.getFocusConfig=ve,e.getInteractionConfig=Fr,e.isFullRange=Nr,e.mouseToDataIndex=Sr,e.normalizeToArray=e=>Array.isArray(e)?e:[e],e.useDragInteraction=Hr,e.useKeyboardNavigation=wr,e.useZoomAreaFocus=Mr,e.useZoomData=jr,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
package/dist/react-charts.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.path{&:focus{outline:none}}.node-focus-border{outline:none;&:focus-visible{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:#2c71db}}.node-path-focus-border{outline:none;&:focus-visible{outline-style:solid;outline-offset:1px;outline-width:1px;outline-color:#2c71db}}.
|
|
1
|
+
.focus-ring-outer,.focus-ring-inner,.focus-ring-container{pointer-events:none}.path{&:focus{outline:none}}.node-focus-border{outline:none;&:focus-visible{outline-style:solid;outline-offset:2px;outline-width:2px;outline-color:#2c71db}}.node-path-focus-border{outline:none;&:focus-visible{outline-style:solid;outline-offset:1px;outline-width:1px;outline-color:#2c71db}}.plot{outline:none}.plot-focus-outer,.plot-focus-inner,.pointer-events-none{pointer-events:none}
|
|
@@ -126,6 +126,14 @@ export interface BarChartPathProps {
|
|
|
126
126
|
dataIdx: number;
|
|
127
127
|
startRounded?: number;
|
|
128
128
|
endRounded?: number;
|
|
129
|
+
/**
|
|
130
|
+
* @deprecated In the next major version, this prop will use a more restrictive interface
|
|
131
|
+
* based on FocusConfig type. Other StyleProps fields are currently ignored.
|
|
132
|
+
*/
|
|
133
|
+
focusConfig?: StyleProps;
|
|
134
|
+
tabIndex?: number;
|
|
135
|
+
onFocus?: (event: React.FocusEvent<SVGPathElement>) => void;
|
|
136
|
+
onBlur?: (event: React.FocusEvent<SVGPathElement>) => void;
|
|
129
137
|
}
|
|
130
138
|
export {};
|
|
131
139
|
//# sourceMappingURL=barChart.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barChart.type.d.ts","sourceRoot":"","sources":["../../../../src/charts/barChart/barChart.type.ts"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"barChart.type.d.ts","sourceRoot":"","sources":["../../../../src/charts/barChart/barChart.type.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barChartPath.d.ts","sourceRoot":"","sources":["../../../../../src/charts/barChart/fragments/barChartPath.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"barChartPath.d.ts","sourceRoot":"","sources":["../../../../../src/charts/barChart/fragments/barChartPath.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+FpD,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CustomBackgroundChartContextType } from '../customBackgroundChart.type';
|
|
2
|
+
export declare const CustomBackgroundChartContext: import('../../../../node_modules/react').Context<CustomBackgroundChartContextType<any>>;
|
|
3
|
+
//# sourceMappingURL=customBackgroundChartContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customBackgroundChartContext.d.ts","sourceRoot":"","sources":["../../../../../src/charts/customBackgroundChart/context/customBackgroundChartContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAGtF,eAAO,MAAM,4BAA4B,gEAExC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/charts/customBackgroundChart/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const CustomBackgroundChart: (<T = number>({ ariaHidden, ariaLabel, backgroundUrl, caption, children, className, data, dataTestId: dataTestIdProp, height, onBlur, onClick, onDoubleClick, onErrors, onFocus, onKeyDown, onKeyUp, onMouseEnter, onMouseLeave, role, tabIndex, viewBox, width, ...props }: import('./customBackgroundChart.type').CustomBackgroundChartProps<T>) => import('../../../node_modules/react').ReactElement) & {
|
|
2
|
+
Plot: <T = number>({ ariaLabel, dataKey, formatAriaValue, ...props }: import('./customBackgroundChart.type').CustomBackgroundChartPlotProps<T>) => import('../../../node_modules/react').ReactElement | null;
|
|
3
|
+
};
|
|
4
|
+
export { CustomBackgroundChart };
|
|
5
|
+
export * from './customBackgroundChart.type';
|
|
6
|
+
//# sourceMappingURL=customBackgroundChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customBackgroundChart.d.ts","sourceRoot":"","sources":["../../../../src/charts/customBackgroundChart/customBackgroundChart.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,qBAAqB;;CAEzB,CAAC;AAEH,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PlotProps } from '../../components/plot/plot.types';
|
|
2
|
+
import { ChartError, ChartErrorCollection, ErrorType } from '../../types/errors.type';
|
|
3
|
+
export interface CustomBackgroundDataPoint<T = number> {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
value: T;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
export type CustomBackgroundData<T = number> = Record<string, CustomBackgroundDataPoint<T>>;
|
|
10
|
+
export interface ViewBoxDimensions {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}
|
|
14
|
+
export interface CustomBackgroundChartProps<T = number> {
|
|
15
|
+
data: CustomBackgroundData<T>;
|
|
16
|
+
backgroundUrl: string;
|
|
17
|
+
viewBox: ViewBoxDimensions;
|
|
18
|
+
width?: string | number;
|
|
19
|
+
height?: string | number;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
ariaHidden?: boolean;
|
|
23
|
+
role?: string;
|
|
24
|
+
tabIndex?: number;
|
|
25
|
+
caption?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
dataTestId?: string;
|
|
28
|
+
onErrors?: (errors: ChartErrorCollection) => void;
|
|
29
|
+
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
30
|
+
onDoubleClick?: (event: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
31
|
+
onMouseEnter?: (event: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
32
|
+
onMouseLeave?: (event: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
33
|
+
onFocus?: (event: React.FocusEvent<SVGElement>) => void;
|
|
34
|
+
onBlur?: (event: React.FocusEvent<SVGElement>) => void;
|
|
35
|
+
onKeyDown?: (event: React.KeyboardEvent<SVGSVGElement>) => void;
|
|
36
|
+
onKeyUp?: (event: React.KeyboardEvent<SVGSVGElement>) => void;
|
|
37
|
+
}
|
|
38
|
+
export interface CustomBackgroundChartPlotProps<T = number> extends Omit<PlotProps<T>, 'position' | 'data' | 'label'> {
|
|
39
|
+
dataKey: string;
|
|
40
|
+
/** Supports placeholders: {{dataKey}}, {{name}}, {{value}}, {{x}}, {{y}} */
|
|
41
|
+
ariaLabel?: string;
|
|
42
|
+
formatAriaValue?: (value: T) => string;
|
|
43
|
+
}
|
|
44
|
+
export interface CustomBackgroundChartContextType<T = number> {
|
|
45
|
+
data: CustomBackgroundData<T>;
|
|
46
|
+
viewBox: ViewBoxDimensions;
|
|
47
|
+
dataTestId: string;
|
|
48
|
+
addError?: (errorType: keyof typeof ErrorType, error: Omit<ChartError, 'type'>) => void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=customBackgroundChart.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customBackgroundChart.type.d.ts","sourceRoot":"","sources":["../../../../src/charts/customBackgroundChart/customBackgroundChart.type.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from '../../../node_modules/react';
|
|
2
|
+
import { CustomBackgroundChartProps } from './customBackgroundChart.type';
|
|
3
|
+
export declare const CustomBackgroundChartStructure: <T = number>({ ariaHidden, ariaLabel, backgroundUrl, caption, children, className, data, dataTestId: dataTestIdProp, height, onBlur, onClick, onDoubleClick, onErrors, onFocus, onKeyDown, onKeyUp, onMouseEnter, onMouseLeave, role, tabIndex, viewBox, width, ...props }: CustomBackgroundChartProps<T>) => ReactElement;
|
|
4
|
+
//# sourceMappingURL=customBackgroundChartStructure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customBackgroundChartStructure.d.ts","sourceRoot":"","sources":["../../../../src/charts/customBackgroundChart/customBackgroundChartStructure.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,OAAO,CAAC;AAQ9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,eAAO,MAAM,8BAA8B,GAAI,CAAC,GAAG,MAAM,EAAG,+PAwBzD,0BAA0B,CAAC,CAAC,CAAC,KAAG,YAiFlC,CAAC"}
|