@progress/kendo-react-charts 8.1.0-develop.7 → 8.1.0-develop.9

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/BaseChart.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),I=require("prop-types"),b=require("@progress/kendo-react-intl"),w=require("@progress/kendo-charts"),p=require("@progress/kendo-react-common"),m=require("./utils/index.js"),D=require("./events/dom-events-builder.js"),y=require("./events/chart-event-builder.js"),E=require("./events/dom-event.js"),k=require("./theming/theme-service.js"),g=require("./store/store.js"),S=require("./store/reducer.js"),P=require("./tooltip/Series.js"),q=require("./tooltip/CrosshairContainer.js"),T=require("./ChartContext.js"),O=require("./package-metadata.js"),x=require("./events/drilldown-event.js");function L(u){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const e in u)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(u,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>u[e]})}}return t.default=u,Object.freeze(t)}const l=L(C),f=class f extends l.Component{constructor(t){super(t),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{this.chartInstance!==null&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var a;const{series:s}=this.optionsStore.getState(),r=s.find(n=>n.name===e.series.name);if(!r.drilldownSeriesFactory)return!0;const i="onDrilldown";if(this.props.hasOwnProperty(i)){const n={seriesName:r.name,drilldownValue:e.value},c=[...((a=this.props.drilldownState)==null?void 0:a.steps)||[],n],h=this.props.getTarget(),d={...e,currentState:this.props.drilldownState,nextState:{steps:c}},o=new x.DrilldownEvent(d,h);this.props[i].call(void 0,o)}return!0},this.onLegendItemClick=e=>{if(this.chartInstance!==null)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:s}=this.optionsStore.getState();if(!s)return;let r={};const{seriesIndex:i,pointIndex:a}=e,n=s[i];if(a===void 0)r=Object.assign({},n,{visible:m.toggle(n.visible)});else{const c=n.pointVisibility=n.pointVisibility||[];c[a]=m.toggle(c[a]),r=Object.assign({},n)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${i}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{this.chartInstance!==null&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const s=E.toDomEvent(this,e);this.triggerDomEvent("onMouseLeave",s)?e.preventDefault():this.chartInstance!==null&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:s}=e;return this.chartInstance&&!m.hasParent(s.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},p.validatePackage(O.packageMetadata),this.showLicenseWatermark=p.shouldShowValidationUI(O.packageMetadata),this.optionsStore=g.createStore(S.optionsReducer),this.observersStore=g.createStore(S.observersReducer),this.childrenObserver=new w.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=g.createStore(S.themeReducer),this.chartObserver=new w.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(t,e){return{...e,drilldownState:t.drilldownState||[]}}componentDidMount(){var e;const t=((e=this._element)==null?void 0:e.ownerDocument)||document;k.loadTheme(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),this.chartInstance!==null&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(t){const{dir:e,children:s,...r}=this.props;if(this.chartInstance!==null){const i=b.provideIntlService(this),a=this.chartInstance.chartService,n=i.locale!==a._intlService.locale,c=Object.entries(t).filter(h=>h[0]!=="dir"&&h[0]!=="children").some(h=>{const[d,o]=h;return!(r.hasOwnProperty(d)&&r[d]===o)});n&&(this.chartInstance.chartService._intlService=i,this.chartInstance.chartService.format._intlService=i,c||this.chartInstance.noTransitionsRedraw()),c&&this.refresh(),t.dir!==e&&this.chartInstance.setDirection(this.getDirection(e))}}render(){const{style:t={},className:e,wrapper:s,children:r}=this.props,i=Object.assign({},t,{position:"relative"}),a=l.createElement(s,{className:e,style:i,key:"chartElement"},l.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:n=>this._element=n,className:"k-chart-surface"},r),l.createElement(l.Fragment,null,this.showLicenseWatermark&&l.createElement(p.WatermarkOverlay,null)));return l.createElement(T.ChartContext.Provider,{value:this.state},l.createElement(P.SeriesTooltip,{key:"seriesTooltip"}),l.createElement(q.CrosshairTooltipContainer,{key:"crosshairTooltips"}),a)}getDirection(t){return(t!==void 0?t:p.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")==="rtl"}getChartOptions(){const{renderAs:t,pannable:e,zoomable:s,paneDefaults:r,panes:i,transitions:a,seriesColors:n,seriesDefaults:c,axisDefaults:h,deriveOptionsFromParent:d}=this.props;let o={};return t!==void 0&&(o.renderAs=t),e!==void 0&&(o.pannable=e),s!==void 0&&(o.zoomable=s),r!==void 0&&(o.paneDefaults=r),i!==void 0&&(o.panes=i),a!==void 0&&(o.transitions=a),n!==void 0&&(o.seriesColors=n),c!==void 0&&(o.seriesDefaults=c),h!==void 0&&(o.axisDefaults=h),o=Object.assign(o,this.optionsStore.getState()),d&&(o=d(o)),o}refresh(){if(this.chartInstance!==null){const t=this.themeStore.getState(),e=this.getChartOptions(),s=e.transitions;this.suppressTransitions&&(e.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,e,t,this.chartInstance):this.chartInstance.setOptions(e,t),this.suppressTransitions&&(e.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:t,chartConstructor:e}=this.props,s=this.getChartOptions();this.chartInstance=new e(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(t),intlService:b.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(t,e){const s=this.props.getTarget(),r=y.create(t,e,s),i="on"+t.charAt(0).toUpperCase()+t.slice(1),a=this.observersStore.getState();let n=!1;for(let c=0;c<a.length;c++)a[c].trigger(t,e)&&(n=!0);return n===!1&&r&&this.props.hasOwnProperty(i)?(this.props[i].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):n}requiresHandlers(t){for(let e=0;e<t.length;e++){const s=t[e],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(t,e){const s=this.observersStore.getState();let r=!1;for(let i=0;i<s.length;i++)s[i].trigger(t,e)&&(r=!0);return r}};f.propTypes={dir:I.string,renderAs:I.oneOf(["svg","canvas"])},f.defaultProps={renderAs:"svg"};let v=f;b.registerForIntl(v);w.DomEventsBuilder.register(D.DomEventsBuilder);exports.BaseChart=v;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),w=require("prop-types"),b=require("@progress/kendo-react-intl"),I=require("@progress/kendo-charts"),u=require("@progress/kendo-react-common"),m=require("./utils/index.js"),D=require("./events/chart-event-builder.js"),y=require("./events/dom-event.js"),k=require("./theming/theme-service.js"),g=require("./store/store.js"),S=require("./store/reducer.js"),E=require("./tooltip/Series.js"),P=require("./tooltip/CrosshairContainer.js"),T=require("./ChartContext.js"),O=require("./package-metadata.js"),q=require("./events/drilldown-event.js");function x(p){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const e in p)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(p,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>p[e]})}}return t.default=p,Object.freeze(t)}const l=x(C),f=class f extends l.Component{constructor(t){super(t),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{this.chartInstance!==null&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var a;const{series:s}=this.optionsStore.getState(),r=s.find(n=>n.name===e.series.name);if(!r.drilldownSeriesFactory)return!0;const i="onDrilldown";if(this.props.hasOwnProperty(i)){const n={seriesName:r.name,drilldownValue:e.value},c=[...((a=this.props.drilldownState)==null?void 0:a.steps)||[],n],h=this.props.getTarget(),d={...e,currentState:this.props.drilldownState,nextState:{steps:c}},o=new q.DrilldownEvent(d,h);this.props[i].call(void 0,o)}return!0},this.onLegendItemClick=e=>{if(this.chartInstance!==null)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:s}=this.optionsStore.getState();if(!s)return;let r={};const{seriesIndex:i,pointIndex:a}=e,n=s[i];if(a===void 0)r=Object.assign({},n,{visible:m.toggle(n.visible)});else{const c=n.pointVisibility=n.pointVisibility||[];c[a]=m.toggle(c[a]),r=Object.assign({},n)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${i}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{this.chartInstance!==null&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const s=y.toDomEvent(this,e);this.triggerDomEvent("onMouseLeave",s)?e.preventDefault():this.chartInstance!==null&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:s}=e;return this.chartInstance&&!m.hasParent(s.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},u.validatePackage(O.packageMetadata),this.showLicenseWatermark=u.shouldShowValidationUI(O.packageMetadata),this.optionsStore=g.createStore(S.optionsReducer),this.observersStore=g.createStore(S.observersReducer),this.childrenObserver=new I.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=g.createStore(S.themeReducer),this.chartObserver=new I.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(t,e){return{...e,drilldownState:t.drilldownState||[]}}componentDidMount(){var e;const t=((e=this._element)==null?void 0:e.ownerDocument)||document;k.loadTheme(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),this.chartInstance!==null&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(t){const{dir:e,children:s,...r}=this.props;if(this.chartInstance!==null){const i=b.provideIntlService(this),a=this.chartInstance.chartService,n=i.locale!==a._intlService.locale,c=Object.entries(t).filter(h=>h[0]!=="dir"&&h[0]!=="children").some(h=>{const[d,o]=h;return!(r.hasOwnProperty(d)&&r[d]===o)});n&&(this.chartInstance.chartService._intlService=i,this.chartInstance.chartService.format._intlService=i,c||this.chartInstance.noTransitionsRedraw()),c&&this.refresh(),t.dir!==e&&this.chartInstance.setDirection(this.getDirection(e))}}render(){const{style:t={},className:e,wrapper:s,children:r}=this.props,i=Object.assign({},t,{position:"relative"}),a=l.createElement(s,{className:e,style:i,key:"chartElement"},l.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:n=>this._element=n,className:"k-chart-surface"},r),l.createElement(l.Fragment,null,this.showLicenseWatermark&&l.createElement(u.WatermarkOverlay,null)));return l.createElement(T.ChartContext.Provider,{value:this.state},l.createElement(E.SeriesTooltip,{key:"seriesTooltip"}),l.createElement(P.CrosshairTooltipContainer,{key:"crosshairTooltips"}),a)}getDirection(t){return(t!==void 0?t:u.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")==="rtl"}getChartOptions(){const{renderAs:t,pannable:e,zoomable:s,paneDefaults:r,panes:i,transitions:a,seriesColors:n,seriesDefaults:c,axisDefaults:h,deriveOptionsFromParent:d}=this.props;let o={};return t!==void 0&&(o.renderAs=t),e!==void 0&&(o.pannable=e),s!==void 0&&(o.zoomable=s),r!==void 0&&(o.paneDefaults=r),i!==void 0&&(o.panes=i),a!==void 0&&(o.transitions=a),n!==void 0&&(o.seriesColors=n),c!==void 0&&(o.seriesDefaults=c),h!==void 0&&(o.axisDefaults=h),o=Object.assign(o,this.optionsStore.getState()),d&&(o=d(o)),o}refresh(){if(this.chartInstance!==null){const t=this.themeStore.getState(),e=this.getChartOptions(),s=e.transitions;this.suppressTransitions&&(e.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,e,t,this.chartInstance):this.chartInstance.setOptions(e,t),this.suppressTransitions&&(e.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:t,chartConstructor:e}=this.props,s=this.getChartOptions();this.chartInstance=new e(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(t),intlService:b.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(t,e){const s=this.props.getTarget(),r=D.create(t,e,s),i="on"+t.charAt(0).toUpperCase()+t.slice(1),a=this.observersStore.getState();let n=!1;for(let c=0;c<a.length;c++)a[c].trigger(t,e)&&(n=!0);return n===!1&&r&&this.props.hasOwnProperty(i)?(this.props[i].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):n}requiresHandlers(t){for(let e=0;e<t.length;e++){const s=t[e],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(t,e){const s=this.observersStore.getState();let r=!1;for(let i=0;i<s.length;i++)s[i].trigger(t,e)&&(r=!0);return r}};f.propTypes={dir:w.string,renderAs:w.oneOf(["svg","canvas"])},f.defaultProps={renderAs:"svg"};let v=f;b.registerForIntl(v);exports.BaseChart=v;
package/BaseChart.mjs CHANGED
@@ -9,20 +9,19 @@
9
9
  import * as l from "react";
10
10
  import f from "prop-types";
11
11
  import { provideIntlService as v, registerForIntl as w } from "@progress/kendo-react-intl";
12
- import { InstanceObserver as g, DomEventsBuilder as I } from "@progress/kendo-charts";
13
- import { validatePackage as D, shouldShowValidationUI as O, WatermarkOverlay as C, canUseDOM as y } from "@progress/kendo-react-common";
14
- import { toggle as S, hasParent as E } from "./utils/index.mjs";
15
- import { DomEventsBuilder as P } from "./events/dom-events-builder.mjs";
16
- import { create as T } from "./events/chart-event-builder.mjs";
17
- import { toDomEvent as k } from "./events/dom-event.mjs";
18
- import { loadTheme as L } from "./theming/theme-service.mjs";
12
+ import { InstanceObserver as g } from "@progress/kendo-charts";
13
+ import { validatePackage as I, shouldShowValidationUI as D, WatermarkOverlay as O, canUseDOM as C } from "@progress/kendo-react-common";
14
+ import { toggle as S, hasParent as y } from "./utils/index.mjs";
15
+ import { create as E } from "./events/chart-event-builder.mjs";
16
+ import { toDomEvent as P } from "./events/dom-event.mjs";
17
+ import { loadTheme as T } from "./theming/theme-service.mjs";
19
18
  import { createStore as m } from "./store/store.mjs";
20
- import { optionsReducer as x, observersReducer as U, themeReducer as R } from "./store/reducer.mjs";
21
- import { SeriesTooltip as M } from "./tooltip/Series.mjs";
22
- import { CrosshairTooltipContainer as W } from "./tooltip/CrosshairContainer.mjs";
23
- import { ChartContext as F } from "./ChartContext.mjs";
19
+ import { optionsReducer as k, observersReducer as L, themeReducer as x } from "./store/reducer.mjs";
20
+ import { SeriesTooltip as U } from "./tooltip/Series.mjs";
21
+ import { CrosshairTooltipContainer as R } from "./tooltip/CrosshairContainer.mjs";
22
+ import { ChartContext as M } from "./ChartContext.mjs";
24
23
  import { packageMetadata as b } from "./package-metadata.mjs";
25
- import { DrilldownEvent as z } from "./events/drilldown-event.mjs";
24
+ import { DrilldownEvent as W } from "./events/drilldown-event.mjs";
26
25
  const d = class d extends l.Component {
27
26
  constructor(t) {
28
27
  super(t), this.chartInstance = null, this.surface = null, this._element = null, this.optionsStore = {}, this.optionsUnsubscriber = Function.prototype, this.themeStore = {}, this.themeUnsubscriber = Function.prototype, this.observersStore = {}, this.suppressTransitions = !1, this.showLicenseWatermark = !1, this.onRender = (e) => {
@@ -38,7 +37,7 @@ const d = class d extends l.Component {
38
37
  ...e,
39
38
  currentState: this.props.drilldownState,
40
39
  nextState: { steps: h }
41
- }, o = new z(p, c);
40
+ }, o = new W(p, c);
42
41
  this.props[i].call(void 0, o);
43
42
  }
44
43
  return !0;
@@ -66,17 +65,17 @@ const d = class d extends l.Component {
66
65
  }, this.onWindowResize = () => {
67
66
  this.chartInstance !== null && this.chartInstance.resize();
68
67
  }, this.onChartMouseLeave = (e) => {
69
- const s = k(this, e);
68
+ const s = P(this, e);
70
69
  this.triggerDomEvent("onMouseLeave", s) ? e.preventDefault() : this.chartInstance !== null && this.chartInstance.hideElements();
71
70
  }, this.onChildMouseLeave = (e) => {
72
71
  const { syntheticEvent: s } = e;
73
- return this.chartInstance && !E(s.relatedTarget, this.element) && this.chartInstance.hideElements(), !1;
74
- }, D(b), this.showLicenseWatermark = O(b), this.optionsStore = m(x), this.observersStore = m(U), this.childrenObserver = new g(this, { onMouseLeave: "onChildMouseLeave" }), this.state = {
72
+ return this.chartInstance && !y(s.relatedTarget, this.element) && this.chartInstance.hideElements(), !1;
73
+ }, I(b), this.showLicenseWatermark = D(b), this.optionsStore = m(k), this.observersStore = m(L), this.childrenObserver = new g(this, { onMouseLeave: "onChildMouseLeave" }), this.state = {
75
74
  optionsStore: this.optionsStore,
76
75
  observersStore: this.observersStore,
77
76
  childrenObserver: this.childrenObserver,
78
77
  drilldownState: { steps: [] }
79
- }, this.themeStore = m(R), this.chartObserver = new g(this, {
78
+ }, this.themeStore = m(x), this.chartObserver = new g(this, {
80
79
  render: "onRender",
81
80
  legendItemClick: "onLegendItemClick",
82
81
  drilldown: "onDrilldown"
@@ -103,7 +102,7 @@ const d = class d extends l.Component {
103
102
  componentDidMount() {
104
103
  var e;
105
104
  const t = ((e = this._element) == null ? void 0 : e.ownerDocument) || document;
106
- L(this.themeStore, this.instantiateCoreChart.bind(this), t), this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this)), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
105
+ T(this.themeStore, this.instantiateCoreChart.bind(this), t), this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this)), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
107
106
  }
108
107
  /**
109
108
  * @hidden
@@ -144,15 +143,15 @@ const d = class d extends l.Component {
144
143
  },
145
144
  r
146
145
  ),
147
- /* @__PURE__ */ l.createElement(l.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ l.createElement(C, null))
146
+ /* @__PURE__ */ l.createElement(l.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ l.createElement(O, null))
148
147
  );
149
- return /* @__PURE__ */ l.createElement(F.Provider, { value: this.state }, /* @__PURE__ */ l.createElement(M, { key: "seriesTooltip" }), /* @__PURE__ */ l.createElement(W, { key: "crosshairTooltips" }), a);
148
+ return /* @__PURE__ */ l.createElement(M.Provider, { value: this.state }, /* @__PURE__ */ l.createElement(U, { key: "seriesTooltip" }), /* @__PURE__ */ l.createElement(R, { key: "crosshairTooltips" }), a);
150
149
  }
151
150
  /**
152
151
  * @hidden
153
152
  */
154
153
  getDirection(t) {
155
- return (t !== void 0 ? t : y && window.getComputedStyle(this.element).direction || "ltr") === "rtl";
154
+ return (t !== void 0 ? t : C && window.getComputedStyle(this.element).direction || "ltr") === "rtl";
156
155
  }
157
156
  /**
158
157
  * @hidden
@@ -204,7 +203,7 @@ const d = class d extends l.Component {
204
203
  * @hidden
205
204
  */
206
205
  trigger(t, e) {
207
- const s = this.props.getTarget(), r = T(t, e, s), i = "on" + t.charAt(0).toUpperCase() + t.slice(1), a = this.observersStore.getState();
206
+ const s = this.props.getTarget(), r = E(t, e, s), i = "on" + t.charAt(0).toUpperCase() + t.slice(1), a = this.observersStore.getState();
208
207
  let n = !1;
209
208
  for (let h = 0; h < a.length; h++)
210
209
  a[h].trigger(t, e) && (n = !0);
@@ -242,7 +241,6 @@ d.propTypes = {
242
241
  };
243
242
  let u = d;
244
243
  w(u);
245
- I.register(P);
246
244
  export {
247
245
  u as BaseChart
248
246
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-intl","@progress/kendo-charts","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-layout","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactCharts={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoCharts,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactLayout,e.KendoSvgIcons)}(this,(function(e,t,r,s,n,a,i,o,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var h=c(t);function d(e,t){let r=e;for(;r&&r!==t;)r=r.parentNode;return!!r}function p(e,t,r,s){const n=e[t];if(n&&Array.isArray(n))for(let e of n)if(!e.type||e.type!==s)return new Error(`${r} children should be Array of type ${s.displayName}.`);return null}const u=e=>void 0!==e&&!e,m=e=>({x:{location:e.pageX},y:{location:e.pageY}});function v(e,t){for(let r=0;r<e.length;r++)if(t[e[r]])return!0;return!1}const y=[{end:"panend",move:"panmove",start:"panstart"},{gesturechange:"pinchmove",gestureend:"pinchend",gesturestart:"pinchstart"},{press:"press"},{tap:"tap"}];let g=class{constructor(e,t){this.hammerInstance=e,this.eventHandlers={},this.tap=this.tap.bind(this),this.press=this.press.bind(this),this.panstart=this.panstart.bind(this),this.panmove=this.panmove.bind(this),this.panend=this.panend.bind(this),this.pinchstart=this.pinchstart.bind(this),this.pinchmove=this.pinchmove.bind(this),this.pinchend=this.pinchend.bind(this),t&&this.bind(t)}tap(e){this.trigger("tap",e)}press(e){this.trigger("press",e)}panstart(e){delete this.previous,this.previous=this.trigger("start",e)}panmove(e){this.previous=this.trigger("move",e)}panend(e){this.trigger("end",e),delete this.previous}pinchstart(e){this.trigger("gesturestart",e)}pinchmove(e){this.trigger("gesturechange",e)}pinchend(e){this.trigger("gestureend",e)}trigger(e,t){const r=((e,t)=>{const r=e.pointers,s=r[0],n=s.pageX,a=s.pageY;let i=0;if(r.length>1){const e=r[0],t=r[1];i=Math.sqrt(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2))}return{distance:i,event:e.srcEvent,preventDefault:function(){e.preventDefault()},target:e.target,touches:r.map(m),type:e.type,x:{delta:t?n-t.x.location:0,initialDelta:e.deltaX,location:n,startLocation:n-e.deltaX},y:{delta:t?a-t.y.location:0,initialDelta:e.deltaY,location:a,startLocation:a-e.deltaY}}})(t,this.previous);return this.eventHandlers[e]&&this.eventHandlers[e](r),r}bind(e={}){this.unbind(),this.eventHandlers=e;for(let t=0;t<y.length;t++){const r=y[t],s=Object.keys(r);if(v(s,e))for(let e=0;e<s.length;e++){const t=r[s[e]];this.hammerInstance.on(t,this[t])}}}unbind(){this.hammerInstance&&this.hammerInstance.off(),this.eventHandlers={}}destroy(){this.hammerInstance&&(this.hammerInstance.destroy(),delete this.hammerInstance),delete this.eventHandlers}toggleDrag(e){this.toggle("pan",e)}toggleZoom(e){this.toggle("pinch",e)}toggle(e,t){this.hammerInstance&&this.hammerInstance.get(e).set({enable:t})}};let f=class{constructor(e){this.target=e}},b=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},C=class extends f{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},x=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},S=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},E=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},k=class extends f{constructor(e,t){super(t),this.value=e.value,this.point=e.point,this.series=e.series,this.currentState=e.currentState,this.nextState=e.nextState}},I=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},w=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},_=class extends f{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},D=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},N=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},T=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},A=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},O=class extends f{constructor(e,t){super(t)}},K=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},L=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},R=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},P=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},F=class extends C{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},q=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},j=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},H=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const V={axisLabelClick:b,drag:x,dragEnd:S,dragStart:E,drilldownEvent:k,legendItemHover:I,legendItemClick:w,legendItemLeave:class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:_,noteClick:D,noteHover:N,plotAreaClick:T,plotAreaHover:A,render:O,select:K,selectEnd:L,selectStart:R,seriesClick:P,seriesHover:F,zoom:q,zoomEnd:j,zoomStart:H};let M=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function z(e,t){return new M(e,t)}const U=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,B=e=>window.getComputedStyle(e).backgroundColor,$=`\n <div class="k-var--primary"></div>\n <div class="k-var--base"></div>\n <div class="k-var--background"></div>\n\n <div class="k-var--normal-background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--hover-background"></div>\n <div class="k-var--hover-text-color"></div>\n <div class="k-var--selected-background"></div>\n <div class="k-var--selected-text-color"></div>\n <div class="k-var--chart-error-bars-background"></div>\n <div class="k-var--chart-notes-background"></div>\n <div class="k-var--chart-notes-border"></div>\n <div class="k-var--chart-notes-lines"></div>\n <div class="k-var--chart-crosshair-background"></div>\n\n <div class="k-var--chart-inactive"></div>\n <div class="k-var--chart-major-lines"></div>\n <div class="k-var--chart-minor-lines"></div>\n <div class="k-var--chart-area-opacity"></div>\n <div class="k-var--chart-area-inactive-opacity"></div>\n <div class="k-var--chart-line-inactive-opacity"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n <div class="k-var--chart-pane-title-font"></div>\n <div class="k-var--chart-label-font"></div>\n </div>\n\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class X{constructor(e){this.store=e}setStyle(e,t){this.store.dispatch({type:"set",payload:{field:e,value:t}})}setColors(){this.mapColor("axisDefaults.crosshair.color","chart-crosshair-background"),this.mapColor("axisDefaults.labels.color","normal-text-color"),this.mapColor("axisDefaults.line.color","chart-major-lines"),this.mapColor("axisDefaults.majorGridLines.color","chart-major-lines"),this.mapColor("axisDefaults.minorGridLines.color","chart-minor-lines"),this.mapColor("axisDefaults.notes.icon.background","chart-notes-background"),this.mapColor("axisDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("axisDefaults.notes.line.color","chart-notes-lines"),this.mapColor("axisDefaults.title.color","normal-text-color"),this.mapColor("chartArea.background","background"),this.mapColor("legend.inactiveItems.labels.color","chart-inactive"),this.mapColor("legend.inactiveItems.markers.color","chart-inactive"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("seriesDefaults.boxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.boxPlot.mean.color","base"),this.mapColor("seriesDefaults.boxPlot.median.color","base"),this.mapColor("seriesDefaults.boxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.bullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.candlestick.downColor","normal-text-color"),this.mapColor("seriesDefaults.candlestick.line.color","normal-text-color"),this.mapColor("seriesDefaults.errorBars.color","chart-error-bars-background"),this.mapColor("seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),this.mapColor("seriesDefaults.icon.border.color","chart-major-lines"),this.mapColor("seriesDefaults.labels.background","background"),this.mapColor("seriesDefaults.labels.color","normal-text-color"),this.mapColor("seriesDefaults.notes.icon.background","chart-notes-background"),this.mapColor("seriesDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("seriesDefaults.notes.line.color","chart-notes-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.mean.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.median.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.verticalBullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.waterfall.line.color","chart-major-lines"),this.mapColor("title.color","normal-text-color"),this.mapColor("subtitle.color","normal-text-color");const e=parseFloat(this.queryStyle("chart-area-opacity").opacity);isNaN(e)||(this.setStyle("seriesDefaults.area.opacity",e),this.setStyle("seriesDefaults.radarArea.opacity",e),this.setStyle("seriesDefaults.verticalArea.opacity",e),this.setStyle("seriesDefaults.labels.opacity",e)),this.setInactiveOpacity(["area","verticalArea"],"chart-area-inactive-opacity"),this.setInactiveOpacity(["line","verticalLine"],"chart-line-inactive-opacity")}setFonts(){const e=U(this.queryStyle("chart-font")),t=U(this.queryStyle("chart-title-font")),r=U(this.queryStyle("chart-pane-title-font")),s=U(this.queryStyle("chart-label-font"));this.setStyle("axisDefaults.labels.font",s),this.setStyle("axisDefaults.notes.label.font",e),this.setStyle("axisDefaults.title.font",e),this.setStyle("legend.labels.font",e),this.setStyle("seriesDefaults.labels.font",s),this.setStyle("seriesDefaults.notes.label.font",e),this.setStyle("title.font",t),this.setStyle("subtitle.font",r),this.setStyle("paneDefaults.title.font",r)}setSeriesColors(){const e=this.element,t=[].slice.call(e.querySelectorAll(".k-var--series div")),r=B(e.querySelector(".k-var--series-unset")),s=t.reduce(((e,t)=>{const s=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const r=e.split("--series-")[1];return parseInt(r,10)-1})(t.className),n=B(t);return n!==r&&(e[s]=n),e}),[]);this.setStyle("seriesColors",s)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}setInactiveOpacity(e,t){const r=parseFloat(this.queryStyle(t).opacity);!isNaN(r)&&r<1&&e.forEach((e=>this.setStyle(`seriesDefaults.${e}.highlight.inactiveOpacity`,r)))}}const Y=e=>{let t,r,s=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>s.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(s.push(e),()=>s=s.filter((t=>t!==e)))}},W=(e,t)=>t.chartCollectionIdxKey?J.collectionConfigurationItem(e,t):t.chartKey?J.configurationItem(e,t):{},Z=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return J.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},G=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},J={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let r=!1;const[s,n]=t.chartCollectionIdxKey.split("_"),a=e[s].map(((e,s)=>parseInt(n,10)===s?(r=!0,t.payload):e));return!1===r&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[s]:a})},themeItem(e,t){let r={},s=Object.assign(r,e);const{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)r=r[o]=r[o]||{},o=i.shift();return r[o]=a,s}};let Q=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const ee=e=>{const{categoryText:t,colorMarker:r,colspan:s,nameColumn:n,points:a}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:s},t))),h.createElement("tbody",null,a.map(((e,t)=>h.createElement("tr",{key:t},r&&h.createElement("td",null,h.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&h.createElement("td",null,e.series.name),h.createElement("td",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},te=h.createContext(null);te.displayName="ChartContext";const re={horizontal:"fit",vertical:"fit"},se="k-chart-tooltip",ne=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!d(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=z(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:n,className:a}=this.props,o=[se,a].join(" ").trim();return h.createElement(i.Popup,{animate:!1,popupAlign:t,offset:r,show:e,collision:re,className:"k-chart-tooltip-wrapper"},h.createElement("div",{className:o,style:s,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};ne.contextType=te;let ae=ne;const ie=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:r,...s}=this.state,n=this.state.popupShown?()=>{const r=this.findRenderFunction();if(t)return null!==r?r(e):h.createElement(ee,{...e});{const t=e.point,s=this.findRenderFunctionByIndex(t.series.index);return null!==s?s(e):null!==r?r(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}}:Function.prototype,i=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!r});return h.createElement(ae,{...s,popupContent:n,className:i})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,shared:s,className:n,crosshair:a}=e;let i;a||(i=s?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:i,popupStyles:r,className:n,shared:s}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:r}=e,s=t.filter((e=>void 0!==e.series.name)).length>0,n=e.series.length>1;let a=1;return s&&a++,n&&a++,{categoryText:r,colorMarker:n,colspan:a,nameColumn:s,points:e.points.map((t=>new Q(t,e.format)))}}createTooltipContext(e){const{point:t,format:r}=e;return{point:new Q(t,r)}}findRenderFunctionByIndex(e){const t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}findRenderFunction(){const e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null}};ie.contextType=te;let oe=ie;const le=e=>e.children;le.displayName="Container";const ce=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...r}=this.state,s=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(ae,{...r,popupContent:s,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,className:s,crosshair:n,axisName:a,axisIndex:i,value:o}=e,{name:l,index:c}=this.props;n&&a===l&&i===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:o,popupStyles:r,className:s})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};ce.contextType=te;let he=ce;const de=["categoryAxis","valueAxis","xAxis","yAxis"];function pe(e){const t={};for(let r=0;r<de.length;r++){const s=ue(e,de[r]);for(let e=0;e<s.length;e++){const r=s[e];t[r.name+r.index]=r}}return t}function ue(e,t){const r=[];if(e[t]){const s=[].concat(e[t]);for(let e=0;e<s.length;e++){const n=(s[e].crosshair||{}).tooltip;n&&n.visible&&r.push({index:e,name:t})}}return r}const me=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:pe(null==(e=this.context)?void 0:e.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:e}=this.state,t=Object.keys(e).map((t=>h.createElement(he,{...e[t],key:t})));return h.createElement(le,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};me.contextType=te;let ve=me;const ye={name:"@progress/kendo-react-charts",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},ge=class extends h.Component{constructor(e){super(e),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{null!==this.chartInstance&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var t;const{series:r}=this.optionsStore.getState(),s=r.find((t=>t.name===e.series.name));if(!s.drilldownSeriesFactory)return!0;const n="onDrilldown";if(this.props.hasOwnProperty(n)){const r={seriesName:s.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],r],i=this.props.getTarget(),o={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new k(o,i);this.props[n].call(void 0,l)}return!0},this.onLegendItemClick=e=>{if(null!==this.chartInstance)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:t}=this.optionsStore.getState();if(!t)return;let r={};const{seriesIndex:s,pointIndex:n}=e,a=t[s];if(void 0===n)r=Object.assign({},a,{visible:u(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||[];e[n]=u(e[n]),r=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${s}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=z(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!d(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},a.validatePackage(ye),this.showLicenseWatermark=a.shouldShowValidationUI(ye),this.optionsStore=Y(W),this.observersStore=Y(G),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=Y(Z),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){var e;const t=(null==(e=this._element)?void 0:e.ownerDocument)||document;((e,t,r)=>{const s=new X(e);if(void 0===r)return void e.dispatch({type:"push",payload:n.chartBaseTheme()});const a=s.element=r.createElement("div");a.style.display="none",a.innerHTML=$,r.body.appendChild(a);try{e.dispatch({type:"push",payload:n.chartBaseTheme()}),s.setColors(),s.setFonts(),s.setSeriesColors()}finally{r.body.removeChild(s.element),delete s.element,t()}})(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(e){const{dir:t,children:r,...n}=this.props;if(null!==this.chartInstance){const r=s.provideIntlService(this),a=this.chartInstance.chartService,i=r.locale!==a._intlService.locale,o=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,r]=e;return!(n.hasOwnProperty(t)&&n[t]===r)}));i&&(this.chartInstance.chartService._intlService=r,this.chartInstance.chartService.format._intlService=r,o||this.chartInstance.noTransitionsRedraw()),o&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:r,children:s}=this.props,n=Object.assign({},e,{position:"relative"}),i=h.createElement(r,{className:t,style:n,key:"chartElement"},h.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>this._element=e,className:"k-chart-surface"},s),h.createElement(h.Fragment,null,this.showLicenseWatermark&&h.createElement(a.WatermarkOverlay,null)));return h.createElement(te.Provider,{value:this.state},h.createElement(oe,{key:"seriesTooltip"}),h.createElement(ve,{key:"crosshairTooltips"}),i)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:r,paneDefaults:s,panes:n,transitions:a,seriesColors:i,seriesDefaults:o,axisDefaults:l,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==r&&(h.zoomable=r),void 0!==s&&(h.paneDefaults=s),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==i&&(h.seriesColors=i),void 0!==o&&(h.seriesDefaults=o),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),r=t.transitions;this.suppressTransitions&&(t.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,t,e,this.chartInstance):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=r,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.props,r=this.getChartOptions();this.chartInstance=new t(this.element,r,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:s.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(e,t){const r=function(e,t,r){if(V[e])return new V[e](t,r)}(e,t,this.props.getTarget()),s="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let r=0;r<n.length;r++)n[r].trigger(e,t)&&(a=!0);return!1===a&&r&&this.props.hasOwnProperty(s)?(this.props[s].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const r=e[t],s="on"+r.charAt(0).toUpperCase()+r.slice(1);if(this.props.hasOwnProperty(s))return!0}return!1}triggerDomEvent(e,t){const r=this.observersStore.getState();let s=!1;for(let n=0;n<r.length;n++)r[n].trigger(e,t)&&(s=!0);return s}};ge.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},ge.defaultProps={renderAs:"svg"};let fe=ge;s.registerForIntl(fe),n.DomEventsBuilder.register(class{static create(e,t){if("undefined"!=typeof window){const r=window.Hammer;if(!r)return void("production"!==process.env.NODE_ENV&&console.warn("Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation"));const s=new r(e,{recognizers:[[r.Tap],[r.Pan],[r.Pinch],[r.Press,{time:0}]]});return new g(s,t)}}});const be=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let r=null;return e&&t&&(r=h.createElement("div",{className:"k-chart-donut-center",style:t},h.createElement(e,null))),r}onRender(e){var t;const r=null==(t=this.context)?void 0:t.optionsStore.getState().series,s=Array.isArray(r)?r[0]:null,n=e.sender._plotArea.charts;if(!s||"donut"!==s.type||0===n[0].points.length)return;const a=n[0].points[0].sector,i=a.innerRadius,o=a.center.y-i,l=a.center.x-i,c=2*i;this.setState({donutCenterStyles:{height:c,left:l,top:o,width:c}})}};be.contextType=te;let Ce=be,xe=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{donutCenterRender:e,children:t,className:r,...s}=this.props;return h.createElement(fe,{...s,ref:e=>this._baseChart=e,chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",r)},t,h.createElement(Ce,{render:e}))}},Se=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:r}=this.props,s=Object.assign({},e,{type:t,data:r});return n.Sparkline.normalizeOptions(s)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:r,...s}=this.props;return h.createElement(fe,{...s,ref:e=>this._baseChart=e,chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",r)},e)}};const Ee={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let ke=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Ee);return Object.assign({},e,{navigator:t})},this.onRefresh=(e,t,r)=>{this.props.partialRedraw?(r.applyOptions(e),r.bindCategories(),r.navigator.redrawSlaves()):r.setOptions(e,t)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,className:t,...r}=this.props;return h.createElement(fe,{...r,ref:e=>this._baseChart=e,chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const Ie=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_chartKey:s,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:n};return h.cloneElement(e,a,r)}render(){const{_chartKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),h.Children.map(r,((e,t)=>h.isValidElement(e)?this.renderChildren(e,t):e))}};Ie.contextType=te;let we=Ie;const _e=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=Y(W)}render(){const{children:e}=this.props;return void 0!==e?h.Children.map(e,(e=>h.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:r,children:s,...n}=this.props;(r||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,r={...e.props,_parentStore:this.childStore};return h.cloneElement(e,r,t)}};_e.contextType=te;let De=_e,Ne=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Te=h.forwardRef(((e,t)=>{const r=h.useRef(null),s=h.useRef(null);h.useImperativeHandle(r,(()=>({element:s.current,props:e}))),h.useImperativeHandle(t,(()=>r.current));let n=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(n=[...n,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const i={...e,data:n};return h.createElement("div",null,h.createElement(o.Breadcrumb,{...i,onItemSelect:t=>{var r;const s="onDrilldownStateChange";if(e.hasOwnProperty(s)){const a=n.findIndex((e=>e.id===t.id)),i={steps:((null==(r=e.drilldownState)?void 0:r.steps)||[]).slice(0,a)},o=new Ne({currentState:e.drilldownState,nextState:i});e[s].call(void 0,o)}}}))})),Ae={id:r.string,style:r.object,className:r.string,breadcrumbOrderedList:r.elementType,breadcrumbListItem:r.elementType,breadcrumbDelimiter:r.elementType,breadcrumbLink:r.elementType,dir:r.oneOf(["ltr","rtl"]),disabled:r.bool,valueField:r.string,textField:r.string,iconField:r.string,iconClassField:r.string,onItemSelect:r.func,ariaLabel:r.string,onDrilldownStateChange:r.func,drilldownState:r.shape({steps:r.array}),rootItem:r.object};Te.displayName="KendoReactChartBreadcrumb",Te.propTypes=Ae,Te.defaultProps={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};const Oe=e=>h.createElement(De,{...e,_chartKey:"title"});Oe.displayName="ChartAxisDefaultsTitle";const Ke=e=>h.createElement(De,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Le=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"});Le.displayName="ChartAxisDefaultsCrosshair";const Re=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"});Re.displayName="ChartAxisDefaultsCrosshairTooltip";const Pe=e=>h.createElement(De,{...e,_chartKey:"title"});Pe.displayName="ChartCategoryAxisTitle";const Fe=e=>h.createElement(De,{...e,_chartKey:"title"});Fe.displayName="ChartPaneDefaultsTitle";const qe=e=>h.createElement(De,{...e,_chartKey:"item"});qe.displayName="ChartLegendItem";const je=e=>h.createElement(De,{...e,_chartKey:"title"});je.displayName="ChartLegendTitle";const He=e=>h.createElement(De,{...e,_chartKey:"inactiveItems"});He.displayName="ChartLegendInactiveItems";const Ve=e=>h.createElement(De,{...e,_chartKey:"title"});Ve.displayName="ChartValueAxisTitle";const Me=e=>h.createElement(De,{...e,_chartKey:"title"});Me.displayName="ChartXAxisTitle";const ze=e=>h.createElement(De,{...e,_chartKey:"title"});ze.displayName="ChartYAxisTitle";const Ue=e=>h.createElement(De,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const Be=e=>h.createElement(De,{...e,_chartKey:"pane"});Be.displayName="ChartNavigatorPane";const $e=e=>h.createElement(De,{...e});$e.displayName="ChartNavigatorSeriesItem";const Xe=e=>h.createElement(we,{...e,_chartKey:"series"});Xe.propTypes={children:function(e,t,r){return p(e,t,r,$e)}};const Ye=e=>h.createElement(De,{...e});Ye.displayName="ChartCategoryAxisItem";const We=e=>h.createElement(we,{...e,_chartKey:"categoryAxis"});We.propTypes={children:function(e,t,r){return p(e,t,r,Ye)}};const Ze=e=>h.createElement(De,{...e});Ze.displayName="ChartPane";const Ge=e=>h.createElement(De,{...e,_chartKey:"paneDefaults"});Ge.displayName="ChartPaneDefaults";const Je=e=>h.createElement(we,{...e,_chartKey:"panes"});Je.propTypes={children:function(e,t,r){return p(e,t,r,Ze)}};const Qe=e=>{let t=e=>h.createElement(h.Fragment,null);e.drilldownSeriesFactory&&(t=e.drilldownSeriesFactory);const r=t=>{var r,s;return t&&(null==(s=null==(r=t.drilldownState)?void 0:r.steps)?void 0:s.find((({seriesName:t})=>t===e.name)))};return h.createElement(te.Consumer,null,(s=>r(s)?h.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:r(s).drilldownValue}):h.createElement(De,{...e})))};Qe.displayName="ChartSeriesItem";const et=e=>h.createElement(we,{...e,_chartKey:"series"});et.propTypes={children:function(e,t,r){return p(e,t,r,Qe)}};const tt=e=>h.createElement(De,{...e});tt.displayName="ChartValueAxisItem";const rt=e=>h.createElement(we,{...e,_chartKey:"valueAxis"});rt.propTypes={children:function(e,t,r){return p(e,t,r,tt)}};const st=e=>h.createElement(De,{...e});st.displayName="ChartXAxisItem";const nt=e=>h.createElement(we,{...e,_chartKey:"xAxis"});nt.prototype={children:function(e,t,r){return p(e,t,r,st)}};const at=e=>h.createElement(De,{...e});at.displayName="ChartYAxisItem";const it=e=>h.createElement(we,{...e,_chartKey:"yAxis"});it.propTypes={children:function(e,t,r){return p(e,t,r,at)}};const ot=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,lt=e=>window.getComputedStyle(e).backgroundColor,ct=`\n <div class="k-var--background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--kendo-color-subtle"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n </div>\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;let ht=class{constructor(e){this.store=e}setStyle(e,t){const r=e.split(".");let s=this.store;r.forEach(((e,t,r)=>{t<r.length-1&&(s=s[e]=s[e]||{})}));const n=r.pop();n&&(s[n]=t)}setColors(){this.mapColor("labels.color","normal-text-color"),this.mapColor("labels.stroke.color","background");this.element.querySelector(".k-var--kendo-color-subtle").style.color="var(--kendo-color-subtle)",this.mapColor("links.color","kendo-color-subtle","color"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("title.color","normal-text-color")}setFonts(){const e=ot(this.queryStyle("chart-title-font")),t=ot(this.queryStyle("chart-font"));this.setStyle("title.font",e),this.setStyle("labels.font",t),this.setStyle("legend.labels.font",t)}setNodeColors(){const e=this.element;if(!e)return;const t=[].slice.call(e.querySelectorAll(".k-var--series div")),r=lt(e.querySelector(".k-var--series-unset")),s=t.reduce(((e,t)=>{const s=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const r=e.split("--series-")[1];return parseInt(r,10)-1})(t.className),n=lt(t);return n!==r&&(e[s]=n),e}),[]);this.setStyle("nodeColors",s)}mapColor(e,t,r="backgroundColor"){this.setStyle(e,this.queryStyle(t)[r])}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}};const dt=(e,t)=>{const r={nodeColors:[]},s=new ht(r),n=s.element=e.createElement("div");n.style.display="none",n.innerHTML=ct,e.body.appendChild(n);try{s.setColors(),s.setFonts(),s.setNodeColors()}finally{e.body.removeChild(s.element),s.element=null,t(r)}},pt=r.exact({left:r.number,top:r.number}),ut={left:r.number,right:r.number},mt={...ut,top:r.number,bottom:r.number},vt=r.oneOfType([r.number,r.exact(mt)]),yt=vt,gt=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),ft={visible:r.bool,font:r.string,color:r.string,opacity:r.number,align:r.oneOf(["left","right","center"]),position:r.oneOf(["inside","before","after"]),padding:yt,margin:r.exact(ut),border:gt,offset:pt},bt={color:r.string,opacity:r.number,offset:pt,padding:r.number,width:r.number},Ct={colorType:r.oneOf(["static","source","target"]),color:r.string,opacity:r.number,highlight:r.exact({opacity:r.number,inactiveOpacity:r.number})},xt=r.exact({text:r.string,...ft}),St=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:xt.isRequired,...bt}),Et=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...Ct}),kt={data:r.exact({nodes:r.arrayOf(St.isRequired).isRequired,links:r.arrayOf(Et.isRequired).isRequired}).isRequired,links:r.exact(Ct),nodes:r.exact(bt),labels:r.exact(ft),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:gt,height:r.number,labels:r.object,margin:vt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:yt,position:r.oneOf(["top","bottom","left","right","custom"]),reverse:r.bool,visible:r.bool,width:r.number,item:r.object,title:r.object}),title:r.exact({align:r.oneOf(["center","left","right"]),background:r.string,border:gt,color:r.string,font:r.string,margin:vt,padding:yt,position:r.oneOf(["top","bottom"]),text:r.string,visible:r.bool}),tooltip:r.exact({visible:r.bool,offset:r.number,followPointer:r.bool,delay:r.number,linkComponent:r.any,nodeComponent:r.any}),className:r.string,style:r.object,dir:r.string,disableAutoLayout:r.bool,disableKeyboardNavigation:r.bool,onNodeEnter:r.func,onNodeLeave:r.func,onLinkEnter:r.func,onLinkLeave:r.func,onNodeClick:r.func,onLinkClick:r.func},It="sankey.tooltipUnitFormat",wt={[It]:"({0} units)"},_t=e=>{const{Content:t,dir:r,offset:s,event:{tooltipData:n,dataItem:a,nodeValue:i}}=e,o=h.useRef(null);return h.useEffect((()=>{const e=o.current;if(!n||!e)return;const t=e.offsetWidth,r=e.offsetHeight,a={...n.popupOffset},i=n.popupAlign;a.left+="left"===i.horizontal?s:-1*s,"right"===i.horizontal&&(a.left-=t),"bottom"===i.vertical?a.top-=r+s:a.top+=s,e.style.left=`${a.left}px`,e.style.top=`${a.top}px`,e.style.visibility=""}),[n]),h.createElement("div",{ref:o,style:{visibility:"hidden"},dir:r,className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},h.createElement("div",{className:"k-tooltip-content"},h.createElement(t,{dir:r,dataItem:a,nodeValue:i})))},Dt={display:"flex",alignItems:"center"},Nt=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Tt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),At=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(It,wt[It]),[e||0]),Ot=e=>{const{color:t,label:r}=e.dataItem;return h.createElement("div",{style:Dt,className:"k-tooltip-content"},h.createElement(Nt,{color:t}),h.createElement(Tt,null,r.text),h.createElement(Tt,null,At(e.nodeValue)))},Kt=e=>{const{source:t,target:r,value:s}=e.dataItem,n="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return h.createElement("div",{style:Dt},h.createElement(Nt,{color:t.color}),h.createElement(Tt,null,t.label.text),h.createElement(a.IconWrap,{icon:n,name:n.name}),h.createElement(Nt,{color:r.color}),h.createElement(Tt,null,r.label.text),h.createElement(Tt,null,At(s)))},Lt=12,Rt={offset:Lt,visible:!0},Pt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Ft=h.forwardRef(((e,t)=>{a.validatePackage(ye);const r=h.useRef(null),s=h.useRef(null),i=a.useRtl(r,e.dir,[e.dir,r.current]),o=h.useRef(null),{data:l,links:c,nodes:d,labels:p,title:u,legend:m,tooltip:v=Rt,disableAutoLayout:y,disableKeyboardNavigation:g}=e,f=h.useRef();f.current=e;const[b,C]=h.useState(null),x=h.useCallback((e=>{const{visible:t,offset:r=Lt,nodeComponent:s=Ot,linkComponent:n=Kt}={...Rt,...v};if(t){const t={event:e,offset:r,dir:i,Content:"node"===e.targetType?s:n};C(t)}}),[v,i]),S=h.useCallback((()=>{C(null)}),[]),E=h.useCallback(((e,t)=>{const r=f.current[e];if(r){const e={...t,nativeEvent:t.originalEvent,target:o.current};r.call(void 0,e)}}),[]);return h.useEffect((()=>{const e={data:l,links:c,nodes:d,labels:p,title:u,legend:m,disableAutoLayout:y,disableKeyboardNavigation:g,rtl:"rtl"===i,tooltip:{...Rt,...v}};return s.current?s.current.setOptions(e):a.canUseDOM&&r.current&&dt(r.current.ownerDocument,(t=>{s.current=new n.Sankey(r.current,e,t),((e,t)=>{e&&(e.unbind(),Pt.forEach((r=>{t[r]&&e.bind(r,t[r])})))})(s.current,{nodeEnter:e=>{E("onNodeEnter",e)},nodeLeave:e=>{E("onNodeLeave",e)},linkEnter:e=>{E("onLinkEnter",e)},linkLeave:e=>{E("onLinkLeave",e)},nodeClick:e=>{E("onNodeClick",e)},linkClick:e=>{E("onLinkClick",e)}}),s.current.bind("tooltipShow",x),s.current.bind("tooltipHide",S)})),()=>{s.current&&(s.current.destroy(),s.current=null)}}),[l,c,d,p,u,m,y,g,i,v,S,x,E]),h.useImperativeHandle(o,(()=>({get element(){return r.current},exportVisual:e=>s.current.exportVisual(e),props:e})),[]),h.useImperativeHandle(t,(()=>o.current)),h.createElement(h.Fragment,null,h.createElement("div",{ref:r,className:e.className,style:e.style,dir:i}),b&&h.createElement(_t,{...b}))}));Ft.propTypes=kt,Ft.displayName="KendoReactSankey";const qt=n.createSankeyData;e.AxisLabelClickEvent=b,e.Chart=xe,e.ChartArea=e=>h.createElement(De,{...e,_chartKey:"chartArea"}),e.ChartAxisDefaults=e=>h.createElement(De,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Le,e.ChartAxisDefaultsCrosshairTooltip=Re,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Oe,e.ChartBreadcrumb=Te,e.ChartCategoryAxis=We,e.ChartCategoryAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Ye,e.ChartCategoryAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=Pe,e.ChartLegend=e=>h.createElement(De,{visible:!0,...e,_chartKey:"legend"}),e.ChartLegendInactiveItems=He,e.ChartLegendItem=qe,e.ChartLegendTitle=je,e.ChartNavigator=e=>h.createElement(De,{visible:!0,position:"bottom",...e,_chartKey:"navigator"}),e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>h.createElement(De,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Be,e.ChartNavigatorSelect=e=>h.createElement(De,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Xe,e.ChartNavigatorSeriesItem=$e,e.ChartPane=Ze,e.ChartPaneDefaults=Ge,e.ChartPaneDefaultsTitle=Fe,e.ChartPanes=Je,e.ChartPlotArea=e=>h.createElement(De,{...e,_chartKey:"plotArea"}),e.ChartSeries=et,e.ChartSeriesDefaults=e=>h.createElement(De,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>h.createElement(De,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>h.createElement(De,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>h.createElement(De,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=Qe,e.ChartSeriesItemOutliers=e=>h.createElement(De,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>h.createElement(De,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>h.createElement(De,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>h.createElement(De,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>h.createElement(De,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartSubtitle=e=>h.createElement(De,{...e,_chartKey:"subtitle"}),e.ChartTitle=e=>h.createElement(De,{...e,_chartKey:"title"}),e.ChartTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxis=rt,e.ChartValueAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=tt,e.ChartValueAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=Ve,e.ChartXAxis=nt,e.ChartXAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=st,e.ChartXAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartXAxisTitle=Me,e.ChartYAxis=it,e.ChartYAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=at,e.ChartYAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartYAxisTitle=ze,e.ChartZoomable=e=>h.createElement(De,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=we,e.ConfigurationComponent=De,e.CrosshairTooltip=he,e.CrosshairTooltipContainer=ve,e.DonutCenter=Ce,e.DragEndEvent=S,e.DragEvent=x,e.DragStartEvent=E,e.DrilldownEvent=k,e.DrilldownStateChangeEvent=Ne,e.LegendItemClickEvent=w,e.LegendItemHoverEvent=I,e.NavigatorFilterEvent=_,e.NoteClickEvent=D,e.NoteHoverEvent=N,e.PlotAreaClickEvent=T,e.PlotAreaHoverEvent=A,e.RenderEvent=O,e.Sankey=Ft,e.SelectEndEvent=L,e.SelectEvent=K,e.SelectStartEvent=R,e.SeriesClickEvent=P,e.SeriesHoverEvent=F,e.SeriesTooltip=oe,e.SharedTooltipContent=ee,e.Sparkline=Se,e.StockChart=ke,e.TooltipPoint=Q,e.TooltipPopup=ae,e.ZoomEndEvent=j,e.ZoomEvent=q,e.ZoomStartEvent=H,e.createSankeyData=qt,e.exportVisual=(e,t={})=>{if(e&&null!==e.chartInstance)return e.chartInstance.exportVisual(t)},e.findAxisByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findAxisByName(t)},e.findPaneByIndex=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByIndex(t)},e.findPaneByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByName(t)}}));
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-intl","@progress/kendo-charts","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-layout","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactCharts={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoCharts,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactLayout,e.KendoSvgIcons)}(this,(function(e,t,r,s,n,a,o,i,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var h=c(t);function d(e,t){let r=e;for(;r&&r!==t;)r=r.parentNode;return!!r}function p(e,t,r,s){const n=e[t];if(n&&Array.isArray(n))for(let e of n)if(!e.type||e.type!==s)return new Error(`${r} children should be Array of type ${s.displayName}.`);return null}const u=e=>void 0!==e&&!e;let m=class{constructor(e){this.target=e}},v=class extends m{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},y=class extends m{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},g=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},f=class extends m{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},C=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},b=class extends m{constructor(e,t){super(t),this.value=e.value,this.point=e.point,this.series=e.series,this.currentState=e.currentState,this.nextState=e.nextState}},x=class extends y{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},S=class extends y{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},E=class extends m{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},k=class extends m{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},I=class extends m{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},w=class extends m{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},_=class extends m{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},N=class extends m{constructor(e,t){super(t)}},D=class extends y{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},T=class extends m{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},A=class extends y{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},K=class extends m{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},O=class extends y{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},L=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},R=class extends m{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},P=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const F={axisLabelClick:v,drag:g,dragEnd:f,dragStart:C,drilldownEvent:b,legendItemHover:x,legendItemClick:S,legendItemLeave:class extends y{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:E,noteClick:k,noteHover:I,plotAreaClick:w,plotAreaHover:_,render:N,select:D,selectEnd:T,selectStart:A,seriesClick:K,seriesHover:O,zoom:L,zoomEnd:R,zoomStart:P};let q=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function j(e,t){return new q(e,t)}const V=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,H=e=>window.getComputedStyle(e).backgroundColor,M=`\n <div class="k-var--primary"></div>\n <div class="k-var--base"></div>\n <div class="k-var--background"></div>\n\n <div class="k-var--normal-background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--hover-background"></div>\n <div class="k-var--hover-text-color"></div>\n <div class="k-var--selected-background"></div>\n <div class="k-var--selected-text-color"></div>\n <div class="k-var--chart-error-bars-background"></div>\n <div class="k-var--chart-notes-background"></div>\n <div class="k-var--chart-notes-border"></div>\n <div class="k-var--chart-notes-lines"></div>\n <div class="k-var--chart-crosshair-background"></div>\n\n <div class="k-var--chart-inactive"></div>\n <div class="k-var--chart-major-lines"></div>\n <div class="k-var--chart-minor-lines"></div>\n <div class="k-var--chart-area-opacity"></div>\n <div class="k-var--chart-area-inactive-opacity"></div>\n <div class="k-var--chart-line-inactive-opacity"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n <div class="k-var--chart-pane-title-font"></div>\n <div class="k-var--chart-label-font"></div>\n </div>\n\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class U{constructor(e){this.store=e}setStyle(e,t){this.store.dispatch({type:"set",payload:{field:e,value:t}})}setColors(){this.mapColor("axisDefaults.crosshair.color","chart-crosshair-background"),this.mapColor("axisDefaults.labels.color","normal-text-color"),this.mapColor("axisDefaults.line.color","chart-major-lines"),this.mapColor("axisDefaults.majorGridLines.color","chart-major-lines"),this.mapColor("axisDefaults.minorGridLines.color","chart-minor-lines"),this.mapColor("axisDefaults.notes.icon.background","chart-notes-background"),this.mapColor("axisDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("axisDefaults.notes.line.color","chart-notes-lines"),this.mapColor("axisDefaults.title.color","normal-text-color"),this.mapColor("chartArea.background","background"),this.mapColor("legend.inactiveItems.labels.color","chart-inactive"),this.mapColor("legend.inactiveItems.markers.color","chart-inactive"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("seriesDefaults.boxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.boxPlot.mean.color","base"),this.mapColor("seriesDefaults.boxPlot.median.color","base"),this.mapColor("seriesDefaults.boxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.bullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.candlestick.downColor","normal-text-color"),this.mapColor("seriesDefaults.candlestick.line.color","normal-text-color"),this.mapColor("seriesDefaults.errorBars.color","chart-error-bars-background"),this.mapColor("seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),this.mapColor("seriesDefaults.icon.border.color","chart-major-lines"),this.mapColor("seriesDefaults.labels.background","background"),this.mapColor("seriesDefaults.labels.color","normal-text-color"),this.mapColor("seriesDefaults.notes.icon.background","chart-notes-background"),this.mapColor("seriesDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("seriesDefaults.notes.line.color","chart-notes-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.mean.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.median.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.verticalBullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.waterfall.line.color","chart-major-lines"),this.mapColor("title.color","normal-text-color"),this.mapColor("subtitle.color","normal-text-color");const e=parseFloat(this.queryStyle("chart-area-opacity").opacity);isNaN(e)||(this.setStyle("seriesDefaults.area.opacity",e),this.setStyle("seriesDefaults.radarArea.opacity",e),this.setStyle("seriesDefaults.verticalArea.opacity",e),this.setStyle("seriesDefaults.labels.opacity",e)),this.setInactiveOpacity(["area","verticalArea"],"chart-area-inactive-opacity"),this.setInactiveOpacity(["line","verticalLine"],"chart-line-inactive-opacity")}setFonts(){const e=V(this.queryStyle("chart-font")),t=V(this.queryStyle("chart-title-font")),r=V(this.queryStyle("chart-pane-title-font")),s=V(this.queryStyle("chart-label-font"));this.setStyle("axisDefaults.labels.font",s),this.setStyle("axisDefaults.notes.label.font",e),this.setStyle("axisDefaults.title.font",e),this.setStyle("legend.labels.font",e),this.setStyle("seriesDefaults.labels.font",s),this.setStyle("seriesDefaults.notes.label.font",e),this.setStyle("title.font",t),this.setStyle("subtitle.font",r),this.setStyle("paneDefaults.title.font",r)}setSeriesColors(){const e=this.element,t=[].slice.call(e.querySelectorAll(".k-var--series div")),r=H(e.querySelector(".k-var--series-unset")),s=t.reduce(((e,t)=>{const s=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const r=e.split("--series-")[1];return parseInt(r,10)-1})(t.className),n=H(t);return n!==r&&(e[s]=n),e}),[]);this.setStyle("seriesColors",s)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}setInactiveOpacity(e,t){const r=parseFloat(this.queryStyle(t).opacity);!isNaN(r)&&r<1&&e.forEach((e=>this.setStyle(`seriesDefaults.${e}.highlight.inactiveOpacity`,r)))}}const z=e=>{let t,r,s=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>s.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(s.push(e),()=>s=s.filter((t=>t!==e)))}},B=(e,t)=>t.chartCollectionIdxKey?X.collectionConfigurationItem(e,t):t.chartKey?X.configurationItem(e,t):{},$=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return X.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},W=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},X={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let r=!1;const[s,n]=t.chartCollectionIdxKey.split("_"),a=e[s].map(((e,s)=>parseInt(n,10)===s?(r=!0,t.payload):e));return!1===r&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[s]:a})},themeItem(e,t){let r={},s=Object.assign(r,e);const{field:n,value:a}=t.payload,o=n.split(".");let i=o.shift();for(;o.length>0;)r=r[i]=r[i]||{},i=o.shift();return r[i]=a,s}};let Y=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const Z=e=>{const{categoryText:t,colorMarker:r,colspan:s,nameColumn:n,points:a}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:s},t))),h.createElement("tbody",null,a.map(((e,t)=>h.createElement("tr",{key:t},r&&h.createElement("td",null,h.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&h.createElement("td",null,e.series.name),h.createElement("td",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},G=h.createContext(null);G.displayName="ChartContext";const J={horizontal:"fit",vertical:"fit"},Q="k-chart-tooltip",ee=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!d(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=j(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:n,className:a}=this.props,i=[Q,a].join(" ").trim();return h.createElement(o.Popup,{animate:!1,popupAlign:t,offset:r,show:e,collision:J,className:"k-chart-tooltip-wrapper"},h.createElement("div",{className:i,style:s,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};ee.contextType=G;let te=ee;const re=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:r,...s}=this.state,n=this.state.popupShown?()=>{const r=this.findRenderFunction();if(t)return null!==r?r(e):h.createElement(Z,{...e});{const t=e.point,s=this.findRenderFunctionByIndex(t.series.index);return null!==s?s(e):null!==r?r(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}}:Function.prototype,o=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!r});return h.createElement(te,{...s,popupContent:n,className:o})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,shared:s,className:n,crosshair:a}=e;let o;a||(o=s?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:o,popupStyles:r,className:n,shared:s}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:r}=e,s=t.filter((e=>void 0!==e.series.name)).length>0,n=e.series.length>1;let a=1;return s&&a++,n&&a++,{categoryText:r,colorMarker:n,colspan:a,nameColumn:s,points:e.points.map((t=>new Y(t,e.format)))}}createTooltipContext(e){const{point:t,format:r}=e;return{point:new Y(t,r)}}findRenderFunctionByIndex(e){const t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}findRenderFunction(){const e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null}};re.contextType=G;let se=re;const ne=e=>e.children;ne.displayName="Container";const ae=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...r}=this.state,s=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(te,{...r,popupContent:s,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,className:s,crosshair:n,axisName:a,axisIndex:o,value:i}=e,{name:l,index:c}=this.props;n&&a===l&&o===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:i,popupStyles:r,className:s})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};ae.contextType=G;let oe=ae;const ie=["categoryAxis","valueAxis","xAxis","yAxis"];function le(e){const t={};for(let r=0;r<ie.length;r++){const s=ce(e,ie[r]);for(let e=0;e<s.length;e++){const r=s[e];t[r.name+r.index]=r}}return t}function ce(e,t){const r=[];if(e[t]){const s=[].concat(e[t]);for(let e=0;e<s.length;e++){const n=(s[e].crosshair||{}).tooltip;n&&n.visible&&r.push({index:e,name:t})}}return r}const he=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:le(null==(e=this.context)?void 0:e.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:e}=this.state,t=Object.keys(e).map((t=>h.createElement(oe,{...e[t],key:t})));return h.createElement(ne,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};he.contextType=G;let de=he;const pe={name:"@progress/kendo-react-charts",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},ue=class extends h.Component{constructor(e){super(e),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{null!==this.chartInstance&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var t;const{series:r}=this.optionsStore.getState(),s=r.find((t=>t.name===e.series.name));if(!s.drilldownSeriesFactory)return!0;const n="onDrilldown";if(this.props.hasOwnProperty(n)){const r={seriesName:s.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],r],o=this.props.getTarget(),i={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new b(i,o);this.props[n].call(void 0,l)}return!0},this.onLegendItemClick=e=>{if(null!==this.chartInstance)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:t}=this.optionsStore.getState();if(!t)return;let r={};const{seriesIndex:s,pointIndex:n}=e,a=t[s];if(void 0===n)r=Object.assign({},a,{visible:u(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||[];e[n]=u(e[n]),r=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${s}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=j(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!d(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},a.validatePackage(pe),this.showLicenseWatermark=a.shouldShowValidationUI(pe),this.optionsStore=z(B),this.observersStore=z(W),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=z($),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){var e;const t=(null==(e=this._element)?void 0:e.ownerDocument)||document;((e,t,r)=>{const s=new U(e);if(void 0===r)return void e.dispatch({type:"push",payload:n.chartBaseTheme()});const a=s.element=r.createElement("div");a.style.display="none",a.innerHTML=M,r.body.appendChild(a);try{e.dispatch({type:"push",payload:n.chartBaseTheme()}),s.setColors(),s.setFonts(),s.setSeriesColors()}finally{r.body.removeChild(s.element),delete s.element,t()}})(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(e){const{dir:t,children:r,...n}=this.props;if(null!==this.chartInstance){const r=s.provideIntlService(this),a=this.chartInstance.chartService,o=r.locale!==a._intlService.locale,i=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,r]=e;return!(n.hasOwnProperty(t)&&n[t]===r)}));o&&(this.chartInstance.chartService._intlService=r,this.chartInstance.chartService.format._intlService=r,i||this.chartInstance.noTransitionsRedraw()),i&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:r,children:s}=this.props,n=Object.assign({},e,{position:"relative"}),o=h.createElement(r,{className:t,style:n,key:"chartElement"},h.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>this._element=e,className:"k-chart-surface"},s),h.createElement(h.Fragment,null,this.showLicenseWatermark&&h.createElement(a.WatermarkOverlay,null)));return h.createElement(G.Provider,{value:this.state},h.createElement(se,{key:"seriesTooltip"}),h.createElement(de,{key:"crosshairTooltips"}),o)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:r,paneDefaults:s,panes:n,transitions:a,seriesColors:o,seriesDefaults:i,axisDefaults:l,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==r&&(h.zoomable=r),void 0!==s&&(h.paneDefaults=s),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==o&&(h.seriesColors=o),void 0!==i&&(h.seriesDefaults=i),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),r=t.transitions;this.suppressTransitions&&(t.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,t,e,this.chartInstance):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=r,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.props,r=this.getChartOptions();this.chartInstance=new t(this.element,r,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:s.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(e,t){const r=function(e,t,r){if(F[e])return new F[e](t,r)}(e,t,this.props.getTarget()),s="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let r=0;r<n.length;r++)n[r].trigger(e,t)&&(a=!0);return!1===a&&r&&this.props.hasOwnProperty(s)?(this.props[s].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const r=e[t],s="on"+r.charAt(0).toUpperCase()+r.slice(1);if(this.props.hasOwnProperty(s))return!0}return!1}triggerDomEvent(e,t){const r=this.observersStore.getState();let s=!1;for(let n=0;n<r.length;n++)r[n].trigger(e,t)&&(s=!0);return s}};ue.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},ue.defaultProps={renderAs:"svg"};let me=ue;s.registerForIntl(me);const ve=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let r=null;return e&&t&&(r=h.createElement("div",{className:"k-chart-donut-center",style:t},h.createElement(e,null))),r}onRender(e){var t;const r=null==(t=this.context)?void 0:t.optionsStore.getState().series,s=Array.isArray(r)?r[0]:null,n=e.sender._plotArea.charts;if(!s||"donut"!==s.type||0===n[0].points.length)return;const a=n[0].points[0].sector,o=a.innerRadius,i=a.center.y-o,l=a.center.x-o,c=2*o;this.setState({donutCenterStyles:{height:c,left:l,top:i,width:c}})}};ve.contextType=G;let ye=ve,ge=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{donutCenterRender:e,children:t,className:r,...s}=this.props;return h.createElement(me,{...s,ref:e=>this._baseChart=e,chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",r)},t,h.createElement(ye,{render:e}))}},fe=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:r}=this.props,s=Object.assign({},e,{type:t,data:r});return n.Sparkline.normalizeOptions(s)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:r,...s}=this.props;return h.createElement(me,{...s,ref:e=>this._baseChart=e,chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",r)},e)}};const Ce={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let be=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Ce);return Object.assign({},e,{navigator:t})},this.onRefresh=(e,t,r)=>{this.props.partialRedraw?(r.applyOptions(e),r.bindCategories(),r.navigator.redrawSlaves()):r.setOptions(e,t)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,className:t,...r}=this.props;return h.createElement(me,{...r,ref:e=>this._baseChart=e,chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const xe=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_chartKey:s,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:n};return h.cloneElement(e,a,r)}render(){const{_chartKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),h.Children.map(r,((e,t)=>h.isValidElement(e)?this.renderChildren(e,t):e))}};xe.contextType=G;let Se=xe;const Ee=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=z(B)}render(){const{children:e}=this.props;return void 0!==e?h.Children.map(e,(e=>h.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:r,children:s,...n}=this.props;(r||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,r={...e.props,_parentStore:this.childStore};return h.cloneElement(e,r,t)}};Ee.contextType=G;let ke=Ee,Ie=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const we=h.forwardRef(((e,t)=>{const r=h.useRef(null),s=h.useRef(null);h.useImperativeHandle(r,(()=>({element:s.current,props:e}))),h.useImperativeHandle(t,(()=>r.current));let n=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(n=[...n,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const o={...e,data:n};return h.createElement("div",null,h.createElement(i.Breadcrumb,{...o,onItemSelect:t=>{var r;const s="onDrilldownStateChange";if(e.hasOwnProperty(s)){const a=n.findIndex((e=>e.id===t.id)),o={steps:((null==(r=e.drilldownState)?void 0:r.steps)||[]).slice(0,a)},i=new Ie({currentState:e.drilldownState,nextState:o});e[s].call(void 0,i)}}}))})),_e={id:r.string,style:r.object,className:r.string,breadcrumbOrderedList:r.elementType,breadcrumbListItem:r.elementType,breadcrumbDelimiter:r.elementType,breadcrumbLink:r.elementType,dir:r.oneOf(["ltr","rtl"]),disabled:r.bool,valueField:r.string,textField:r.string,iconField:r.string,iconClassField:r.string,onItemSelect:r.func,ariaLabel:r.string,onDrilldownStateChange:r.func,drilldownState:r.shape({steps:r.array}),rootItem:r.object};we.displayName="KendoReactChartBreadcrumb",we.propTypes=_e,we.defaultProps={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};const Ne=e=>h.createElement(ke,{...e,_chartKey:"title"});Ne.displayName="ChartAxisDefaultsTitle";const De=e=>h.createElement(ke,{...e,_chartKey:"labels"});De.displayName="ChartAxisDefaultsLabels";const Te=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"});Te.displayName="ChartAxisDefaultsCrosshair";const Ae=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"});Ae.displayName="ChartAxisDefaultsCrosshairTooltip";const Ke=e=>h.createElement(ke,{...e,_chartKey:"title"});Ke.displayName="ChartCategoryAxisTitle";const Oe=e=>h.createElement(ke,{...e,_chartKey:"title"});Oe.displayName="ChartPaneDefaultsTitle";const Le=e=>h.createElement(ke,{...e,_chartKey:"item"});Le.displayName="ChartLegendItem";const Re=e=>h.createElement(ke,{...e,_chartKey:"title"});Re.displayName="ChartLegendTitle";const Pe=e=>h.createElement(ke,{...e,_chartKey:"inactiveItems"});Pe.displayName="ChartLegendInactiveItems";const Fe=e=>h.createElement(ke,{...e,_chartKey:"title"});Fe.displayName="ChartValueAxisTitle";const qe=e=>h.createElement(ke,{...e,_chartKey:"title"});qe.displayName="ChartXAxisTitle";const je=e=>h.createElement(ke,{...e,_chartKey:"title"});je.displayName="ChartYAxisTitle";const Ve=e=>h.createElement(ke,{...e,_chartKey:"categoryAxis"});Ve.displayName="ChartNavigatorCategoryAxis";const He=e=>h.createElement(ke,{...e,_chartKey:"pane"});He.displayName="ChartNavigatorPane";const Me=e=>h.createElement(ke,{...e});Me.displayName="ChartNavigatorSeriesItem";const Ue=e=>h.createElement(Se,{...e,_chartKey:"series"});Ue.propTypes={children:function(e,t,r){return p(e,t,r,Me)}};const ze=e=>h.createElement(ke,{...e});ze.displayName="ChartCategoryAxisItem";const Be=e=>h.createElement(Se,{...e,_chartKey:"categoryAxis"});Be.propTypes={children:function(e,t,r){return p(e,t,r,ze)}};const $e=e=>h.createElement(ke,{...e});$e.displayName="ChartPane";const We=e=>h.createElement(ke,{...e,_chartKey:"paneDefaults"});We.displayName="ChartPaneDefaults";const Xe=e=>h.createElement(Se,{...e,_chartKey:"panes"});Xe.propTypes={children:function(e,t,r){return p(e,t,r,$e)}};const Ye=e=>{let t=e=>h.createElement(h.Fragment,null);e.drilldownSeriesFactory&&(t=e.drilldownSeriesFactory);const r=t=>{var r,s;return t&&(null==(s=null==(r=t.drilldownState)?void 0:r.steps)?void 0:s.find((({seriesName:t})=>t===e.name)))};return h.createElement(G.Consumer,null,(s=>r(s)?h.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:r(s).drilldownValue}):h.createElement(ke,{...e})))};Ye.displayName="ChartSeriesItem";const Ze=e=>h.createElement(Se,{...e,_chartKey:"series"});Ze.propTypes={children:function(e,t,r){return p(e,t,r,Ye)}};const Ge=e=>h.createElement(ke,{...e});Ge.displayName="ChartValueAxisItem";const Je=e=>h.createElement(Se,{...e,_chartKey:"valueAxis"});Je.propTypes={children:function(e,t,r){return p(e,t,r,Ge)}};const Qe=e=>h.createElement(ke,{...e});Qe.displayName="ChartXAxisItem";const et=e=>h.createElement(Se,{...e,_chartKey:"xAxis"});et.prototype={children:function(e,t,r){return p(e,t,r,Qe)}};const tt=e=>h.createElement(ke,{...e});tt.displayName="ChartYAxisItem";const rt=e=>h.createElement(Se,{...e,_chartKey:"yAxis"});rt.propTypes={children:function(e,t,r){return p(e,t,r,tt)}};const st=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,nt=e=>window.getComputedStyle(e).backgroundColor,at=`\n <div class="k-var--background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--kendo-color-subtle"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n </div>\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;let ot=class{constructor(e){this.store=e}setStyle(e,t){const r=e.split(".");let s=this.store;r.forEach(((e,t,r)=>{t<r.length-1&&(s=s[e]=s[e]||{})}));const n=r.pop();n&&(s[n]=t)}setColors(){this.mapColor("labels.color","normal-text-color"),this.mapColor("labels.stroke.color","background");this.element.querySelector(".k-var--kendo-color-subtle").style.color="var(--kendo-color-subtle)",this.mapColor("links.color","kendo-color-subtle","color"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("title.color","normal-text-color")}setFonts(){const e=st(this.queryStyle("chart-title-font")),t=st(this.queryStyle("chart-font"));this.setStyle("title.font",e),this.setStyle("labels.font",t),this.setStyle("legend.labels.font",t)}setNodeColors(){const e=this.element;if(!e)return;const t=[].slice.call(e.querySelectorAll(".k-var--series div")),r=nt(e.querySelector(".k-var--series-unset")),s=t.reduce(((e,t)=>{const s=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const r=e.split("--series-")[1];return parseInt(r,10)-1})(t.className),n=nt(t);return n!==r&&(e[s]=n),e}),[]);this.setStyle("nodeColors",s)}mapColor(e,t,r="backgroundColor"){this.setStyle(e,this.queryStyle(t)[r])}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}};const it=(e,t)=>{const r={nodeColors:[]},s=new ot(r),n=s.element=e.createElement("div");n.style.display="none",n.innerHTML=at,e.body.appendChild(n);try{s.setColors(),s.setFonts(),s.setNodeColors()}finally{e.body.removeChild(s.element),s.element=null,t(r)}},lt=r.exact({left:r.number,top:r.number}),ct={left:r.number,right:r.number},ht={...ct,top:r.number,bottom:r.number},dt=r.oneOfType([r.number,r.exact(ht)]),pt=dt,ut=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),mt={visible:r.bool,font:r.string,color:r.string,opacity:r.number,align:r.oneOf(["left","right","center"]),position:r.oneOf(["inside","before","after"]),padding:pt,margin:r.exact(ct),border:ut,offset:lt},vt={color:r.string,opacity:r.number,offset:lt,padding:r.number,width:r.number},yt={colorType:r.oneOf(["static","source","target"]),color:r.string,opacity:r.number,highlight:r.exact({opacity:r.number,inactiveOpacity:r.number})},gt=r.exact({text:r.string,...mt}),ft=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:gt.isRequired,...vt}),Ct=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...yt}),bt={data:r.exact({nodes:r.arrayOf(ft.isRequired).isRequired,links:r.arrayOf(Ct.isRequired).isRequired}).isRequired,links:r.exact(yt),nodes:r.exact(vt),labels:r.exact(mt),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:ut,height:r.number,labels:r.object,margin:dt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:pt,position:r.oneOf(["top","bottom","left","right","custom"]),reverse:r.bool,visible:r.bool,width:r.number,item:r.object,title:r.object}),title:r.exact({align:r.oneOf(["center","left","right"]),background:r.string,border:ut,color:r.string,font:r.string,margin:dt,padding:pt,position:r.oneOf(["top","bottom"]),text:r.string,visible:r.bool}),tooltip:r.exact({visible:r.bool,offset:r.number,followPointer:r.bool,delay:r.number,linkComponent:r.any,nodeComponent:r.any}),className:r.string,style:r.object,dir:r.string,disableAutoLayout:r.bool,disableKeyboardNavigation:r.bool,onNodeEnter:r.func,onNodeLeave:r.func,onLinkEnter:r.func,onLinkLeave:r.func,onNodeClick:r.func,onLinkClick:r.func},xt="sankey.tooltipUnitFormat",St={[xt]:"({0} units)"},Et=e=>{const{Content:t,dir:r,offset:s,event:{tooltipData:n,dataItem:a,nodeValue:o}}=e,i=h.useRef(null);return h.useEffect((()=>{const e=i.current;if(!n||!e)return;const t=e.offsetWidth,r=e.offsetHeight,a={...n.popupOffset},o=n.popupAlign;a.left+="left"===o.horizontal?s:-1*s,"right"===o.horizontal&&(a.left-=t),"bottom"===o.vertical?a.top-=r+s:a.top+=s,e.style.left=`${a.left}px`,e.style.top=`${a.top}px`,e.style.visibility=""}),[n]),h.createElement("div",{ref:i,style:{visibility:"hidden"},dir:r,className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},h.createElement("div",{className:"k-tooltip-content"},h.createElement(t,{dir:r,dataItem:a,nodeValue:o})))},kt={display:"flex",alignItems:"center"},It=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),wt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),_t=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(xt,St[xt]),[e||0]),Nt=e=>{const{color:t,label:r}=e.dataItem;return h.createElement("div",{style:kt,className:"k-tooltip-content"},h.createElement(It,{color:t}),h.createElement(wt,null,r.text),h.createElement(wt,null,_t(e.nodeValue)))},Dt=e=>{const{source:t,target:r,value:s}=e.dataItem,n="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return h.createElement("div",{style:kt},h.createElement(It,{color:t.color}),h.createElement(wt,null,t.label.text),h.createElement(a.IconWrap,{icon:n,name:n.name}),h.createElement(It,{color:r.color}),h.createElement(wt,null,r.label.text),h.createElement(wt,null,_t(s)))},Tt=12,At={offset:Tt,visible:!0},Kt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Ot=h.forwardRef(((e,t)=>{a.validatePackage(pe);const r=h.useRef(null),s=h.useRef(null),o=a.useRtl(r,e.dir,[e.dir,r.current]),i=h.useRef(null),{data:l,links:c,nodes:d,labels:p,title:u,legend:m,tooltip:v=At,disableAutoLayout:y,disableKeyboardNavigation:g}=e,f=h.useRef();f.current=e;const[C,b]=h.useState(null),x=h.useCallback((e=>{const{visible:t,offset:r=Tt,nodeComponent:s=Nt,linkComponent:n=Dt}={...At,...v};if(t){const t={event:e,offset:r,dir:o,Content:"node"===e.targetType?s:n};b(t)}}),[v,o]),S=h.useCallback((()=>{b(null)}),[]),E=h.useCallback(((e,t)=>{const r=f.current[e];if(r){const e={...t,nativeEvent:t.originalEvent,target:i.current};r.call(void 0,e)}}),[]);return h.useEffect((()=>{const e={data:l,links:c,nodes:d,labels:p,title:u,legend:m,disableAutoLayout:y,disableKeyboardNavigation:g,rtl:"rtl"===o,tooltip:{...At,...v}};return s.current?s.current.setOptions(e):a.canUseDOM&&r.current&&it(r.current.ownerDocument,(t=>{s.current=new n.Sankey(r.current,e,t),((e,t)=>{e&&(e.unbind(),Kt.forEach((r=>{t[r]&&e.bind(r,t[r])})))})(s.current,{nodeEnter:e=>{E("onNodeEnter",e)},nodeLeave:e=>{E("onNodeLeave",e)},linkEnter:e=>{E("onLinkEnter",e)},linkLeave:e=>{E("onLinkLeave",e)},nodeClick:e=>{E("onNodeClick",e)},linkClick:e=>{E("onLinkClick",e)}}),s.current.bind("tooltipShow",x),s.current.bind("tooltipHide",S)})),()=>{s.current&&(s.current.destroy(),s.current=null)}}),[l,c,d,p,u,m,y,g,o,v,S,x,E]),h.useImperativeHandle(i,(()=>({get element(){return r.current},exportVisual:e=>s.current.exportVisual(e),props:e})),[]),h.useImperativeHandle(t,(()=>i.current)),h.createElement(h.Fragment,null,h.createElement("div",{ref:r,className:e.className,style:e.style,dir:o}),C&&h.createElement(Et,{...C}))}));Ot.propTypes=bt,Ot.displayName="KendoReactSankey";const Lt=n.createSankeyData;e.AxisLabelClickEvent=v,e.Chart=ge,e.ChartArea=e=>h.createElement(ke,{...e,_chartKey:"chartArea"}),e.ChartAxisDefaults=e=>h.createElement(ke,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Te,e.ChartAxisDefaultsCrosshairTooltip=Ae,e.ChartAxisDefaultsLabels=De,e.ChartAxisDefaultsTitle=Ne,e.ChartBreadcrumb=we,e.ChartCategoryAxis=Be,e.ChartCategoryAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=ze,e.ChartCategoryAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=Ke,e.ChartLegend=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"legend"}),e.ChartLegendInactiveItems=Pe,e.ChartLegendItem=Le,e.ChartLegendTitle=Re,e.ChartNavigator=e=>h.createElement(ke,{visible:!0,position:"bottom",...e,_chartKey:"navigator"}),e.ChartNavigatorCategoryAxis=Ve,e.ChartNavigatorHint=e=>h.createElement(ke,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=He,e.ChartNavigatorSelect=e=>h.createElement(ke,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Ue,e.ChartNavigatorSeriesItem=Me,e.ChartPane=$e,e.ChartPaneDefaults=We,e.ChartPaneDefaultsTitle=Oe,e.ChartPanes=Xe,e.ChartPlotArea=e=>h.createElement(ke,{...e,_chartKey:"plotArea"}),e.ChartSeries=Ze,e.ChartSeriesDefaults=e=>h.createElement(ke,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>h.createElement(ke,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>h.createElement(ke,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>h.createElement(ke,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=Ye,e.ChartSeriesItemOutliers=e=>h.createElement(ke,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>h.createElement(ke,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>h.createElement(ke,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>h.createElement(ke,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>h.createElement(ke,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartSubtitle=e=>h.createElement(ke,{...e,_chartKey:"subtitle"}),e.ChartTitle=e=>h.createElement(ke,{...e,_chartKey:"title"}),e.ChartTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxis=Je,e.ChartValueAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=Ge,e.ChartValueAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=Fe,e.ChartXAxis=et,e.ChartXAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=Qe,e.ChartXAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartXAxisTitle=qe,e.ChartYAxis=rt,e.ChartYAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=tt,e.ChartYAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartYAxisTitle=je,e.ChartZoomable=e=>h.createElement(ke,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=Se,e.ConfigurationComponent=ke,e.CrosshairTooltip=oe,e.CrosshairTooltipContainer=de,e.DonutCenter=ye,e.DragEndEvent=f,e.DragEvent=g,e.DragStartEvent=C,e.DrilldownEvent=b,e.DrilldownStateChangeEvent=Ie,e.LegendItemClickEvent=S,e.LegendItemHoverEvent=x,e.NavigatorFilterEvent=E,e.NoteClickEvent=k,e.NoteHoverEvent=I,e.PlotAreaClickEvent=w,e.PlotAreaHoverEvent=_,e.RenderEvent=N,e.Sankey=Ot,e.SelectEndEvent=T,e.SelectEvent=D,e.SelectStartEvent=A,e.SeriesClickEvent=K,e.SeriesHoverEvent=O,e.SeriesTooltip=se,e.SharedTooltipContent=Z,e.Sparkline=fe,e.StockChart=be,e.TooltipPoint=Y,e.TooltipPopup=te,e.ZoomEndEvent=R,e.ZoomEvent=L,e.ZoomStartEvent=P,e.createSankeyData=Lt,e.exportVisual=(e,t={})=>{if(e&&null!==e.chartInstance)return e.chartInstance.exportVisual(t)},e.findAxisByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findAxisByName(t)},e.findPaneByIndex=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByIndex(t)},e.findPaneByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByName(t)}}));
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-charts",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1718109998,
13
+ publishDate: 1718182657,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-charts",
3
- "version": "8.1.0-develop.7",
3
+ "version": "8.1.0-develop.9",
4
4
  "description": "React Chart renders a wide range of high-quality data visualizations. KendoReact Charts package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -24,12 +24,11 @@
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-drawing": "^1.20.1",
26
26
  "@progress/kendo-licensing": "^1.3.4",
27
- "@progress/kendo-react-common": "8.1.0-develop.7",
28
- "@progress/kendo-react-intl": "8.1.0-develop.7",
29
- "@progress/kendo-react-layout": "8.1.0-develop.7",
30
- "@progress/kendo-react-popup": "8.1.0-develop.7",
27
+ "@progress/kendo-react-common": "8.1.0-develop.9",
28
+ "@progress/kendo-react-intl": "8.1.0-develop.9",
29
+ "@progress/kendo-react-layout": "8.1.0-develop.9",
30
+ "@progress/kendo-react-popup": "8.1.0-develop.9",
31
31
  "@progress/kendo-svg-icons": "^3.0.0",
32
- "hammerjs": "^2.0.0",
33
32
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
34
33
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
35
34
  },
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./dom-events.js"),r="Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation";class i{static create(t,n){if(typeof window!="undefined"){const e=window.Hammer;if(!e){process.env.NODE_ENV!=="production"&&console.warn(r);return}const o=new e(t,{recognizers:[[e.Tap],[e.Pan],[e.Pinch],[e.Press,{time:0}]]});return new s.DomEvents(o,n)}}}exports.DomEventsBuilder=i;
@@ -1,33 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use client";
9
- import { DomEvents as r } from "./dom-events.mjs";
10
- const s = "Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation";
11
- class a {
12
- static create(n, o) {
13
- if (typeof window != "undefined") {
14
- const e = window.Hammer;
15
- if (!e) {
16
- process.env.NODE_ENV !== "production" && console.warn(s);
17
- return;
18
- }
19
- const t = new e(n, {
20
- recognizers: [
21
- [e.Tap],
22
- [e.Pan],
23
- [e.Pinch],
24
- [e.Press, { time: 0 }]
25
- ]
26
- });
27
- return new r(t, o);
28
- }
29
- }
30
- }
31
- export {
32
- a as DomEventsBuilder
33
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=n=>({x:{location:n.pageX},y:{location:n.pageY}}),g=(n,t)=>{const e=n.pointers,s=e[0],i=s.pageX,a=s.pageY;let r=0;if(e.length>1){const h=e[0],o=e[1];r=Math.sqrt(Math.pow(h.pageX-o.pageX,2)+Math.pow(h.pageY-o.pageY,2))}return{distance:r,event:n.srcEvent,preventDefault:function(){n.preventDefault()},target:n.target,touches:e.map(p),type:n.type,x:{delta:t?i-t.x.location:0,initialDelta:n.deltaX,location:i,startLocation:i-n.deltaX},y:{delta:t?a-t.y.location:0,initialDelta:n.deltaY,location:a,startLocation:a-n.deltaY}}};function d(n,t){for(let e=0;e<n.length;e++)if(t[n[e]])return!0;return!1}const c=[{end:"panend",move:"panmove",start:"panstart"},{gesturechange:"pinchmove",gestureend:"pinchend",gesturestart:"pinchstart"},{press:"press"},{tap:"tap"}];class l{constructor(t,e){this.hammerInstance=t,this.eventHandlers={},this.tap=this.tap.bind(this),this.press=this.press.bind(this),this.panstart=this.panstart.bind(this),this.panmove=this.panmove.bind(this),this.panend=this.panend.bind(this),this.pinchstart=this.pinchstart.bind(this),this.pinchmove=this.pinchmove.bind(this),this.pinchend=this.pinchend.bind(this),e&&this.bind(e)}tap(t){this.trigger("tap",t)}press(t){this.trigger("press",t)}panstart(t){delete this.previous,this.previous=this.trigger("start",t)}panmove(t){this.previous=this.trigger("move",t)}panend(t){this.trigger("end",t),delete this.previous}pinchstart(t){this.trigger("gesturestart",t)}pinchmove(t){this.trigger("gesturechange",t)}pinchend(t){this.trigger("gestureend",t)}trigger(t,e){const s=g(e,this.previous);return this.eventHandlers[t]&&this.eventHandlers[t](s),s}bind(t={}){this.unbind(),this.eventHandlers=t;for(let e=0;e<c.length;e++){const s=c[e],i=Object.keys(s);if(d(i,t))for(let a=0;a<i.length;a++){const r=s[i[a]];this.hammerInstance.on(r,this[r])}}}unbind(){this.hammerInstance&&this.hammerInstance.off(),this.eventHandlers={}}destroy(){this.hammerInstance&&(this.hammerInstance.destroy(),delete this.hammerInstance),delete this.eventHandlers}toggleDrag(t){this.toggle("pan",t)}toggleZoom(t){this.toggle("pinch",t)}toggle(t,e){this.hammerInstance&&this.hammerInstance.get(t).set({enable:e})}}exports.DomEvents=l;
@@ -1,128 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use client";
9
- const c = (n) => ({
10
- x: {
11
- location: n.pageX
12
- },
13
- y: {
14
- location: n.pageY
15
- }
16
- }), g = (n, t) => {
17
- const e = n.pointers, s = e[0], i = s.pageX, a = s.pageY;
18
- let r = 0;
19
- if (e.length > 1) {
20
- const h = e[0], o = e[1];
21
- r = Math.sqrt(Math.pow(h.pageX - o.pageX, 2) + Math.pow(h.pageY - o.pageY, 2));
22
- }
23
- return {
24
- distance: r,
25
- event: n.srcEvent,
26
- preventDefault: function() {
27
- n.preventDefault();
28
- },
29
- target: n.target,
30
- touches: e.map(c),
31
- type: n.type,
32
- x: {
33
- delta: t ? i - t.x.location : 0,
34
- initialDelta: n.deltaX,
35
- location: i,
36
- startLocation: i - n.deltaX
37
- },
38
- y: {
39
- delta: t ? a - t.y.location : 0,
40
- initialDelta: n.deltaY,
41
- location: a,
42
- startLocation: a - n.deltaY
43
- }
44
- };
45
- };
46
- function d(n, t) {
47
- for (let e = 0; e < n.length; e++)
48
- if (t[n[e]])
49
- return !0;
50
- return !1;
51
- }
52
- const p = [{
53
- end: "panend",
54
- move: "panmove",
55
- start: "panstart"
56
- }, {
57
- gesturechange: "pinchmove",
58
- gestureend: "pinchend",
59
- gesturestart: "pinchstart"
60
- }, {
61
- press: "press"
62
- }, {
63
- tap: "tap"
64
- }];
65
- class l {
66
- constructor(t, e) {
67
- this.hammerInstance = t, this.eventHandlers = {}, this.tap = this.tap.bind(this), this.press = this.press.bind(this), this.panstart = this.panstart.bind(this), this.panmove = this.panmove.bind(this), this.panend = this.panend.bind(this), this.pinchstart = this.pinchstart.bind(this), this.pinchmove = this.pinchmove.bind(this), this.pinchend = this.pinchend.bind(this), e && this.bind(e);
68
- }
69
- tap(t) {
70
- this.trigger("tap", t);
71
- }
72
- press(t) {
73
- this.trigger("press", t);
74
- }
75
- panstart(t) {
76
- delete this.previous, this.previous = this.trigger("start", t);
77
- }
78
- panmove(t) {
79
- this.previous = this.trigger("move", t);
80
- }
81
- panend(t) {
82
- this.trigger("end", t), delete this.previous;
83
- }
84
- pinchstart(t) {
85
- this.trigger("gesturestart", t);
86
- }
87
- pinchmove(t) {
88
- this.trigger("gesturechange", t);
89
- }
90
- pinchend(t) {
91
- this.trigger("gestureend", t);
92
- }
93
- trigger(t, e) {
94
- const s = g(e, this.previous);
95
- return this.eventHandlers[t] && this.eventHandlers[t](s), s;
96
- }
97
- bind(t = {}) {
98
- this.unbind(), this.eventHandlers = t;
99
- for (let e = 0; e < p.length; e++) {
100
- const s = p[e], i = Object.keys(s);
101
- if (d(i, t))
102
- for (let a = 0; a < i.length; a++) {
103
- const r = s[i[a]];
104
- this.hammerInstance.on(r, this[r]);
105
- }
106
- }
107
- }
108
- unbind() {
109
- this.hammerInstance && this.hammerInstance.off(), this.eventHandlers = {};
110
- }
111
- destroy() {
112
- this.hammerInstance && (this.hammerInstance.destroy(), delete this.hammerInstance), delete this.eventHandlers;
113
- }
114
- toggleDrag(t) {
115
- this.toggle("pan", t);
116
- }
117
- toggleZoom(t) {
118
- this.toggle("pinch", t);
119
- }
120
- toggle(t, e) {
121
- this.hammerInstance && this.hammerInstance.get(t).set({
122
- enable: e
123
- });
124
- }
125
- }
126
- export {
127
- l as DomEvents
128
- };