infobae-charts 0.0.17 → 0.0.18

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.

Potentially problematic release.


This version of infobae-charts might be problematic. Click here for more details.

@@ -1,4 +1,5 @@
1
- import { ChartData, Data, Visualization } from '../types';
1
+ import { ChartData, ChartSeries, Data, Visualization } from '../types';
2
2
  export declare const NEGATIVE_SERIES_KEYS: string[];
3
+ export declare const withRowFocus: (series: ChartSeries[], activeRowIndex: number | null) => ChartSeries[];
3
4
  export declare const buildChartData: (data?: Data, visualization?: Visualization) => ChartData;
4
5
  //# sourceMappingURL=chart-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../../src/components/HorizontalBarChart/chart/chart-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAA8B,IAAI,EAAU,aAAa,EAAE,MAAM,UAAU,CAAC;AAGxG,eAAO,MAAM,oBAAoB,UAAe,CAAC;AAyDjD,eAAO,MAAM,cAAc,GAAI,OAAM,IAAS,EAAE,gBAAe,aAAkB,KAAG,SAuCnF,CAAC"}
1
+ {"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../../src/components/HorizontalBarChart/chart/chart-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAiB,WAAW,EAAE,IAAI,EAAU,aAAa,EAAE,MAAM,UAAU,CAAC;AAGxG,eAAO,MAAM,oBAAoB,UAAe,CAAC;AA8DjD,eAAO,MAAM,YAAY,GAAI,QAAQ,WAAW,EAAE,EAAE,gBAAgB,MAAM,GAAG,IAAI,KAAG,WAAW,EAU1F,CAAC;AAEN,eAAO,MAAM,cAAc,GAAI,OAAM,IAAS,EAAE,gBAAe,aAAkB,KAAG,SAyCnF,CAAC"}
@@ -1,34 +1,35 @@
1
1
  import { TooltipItem } from '../types';
2
+ export declare const BAR_BORDER_WIDTH = 4;
2
3
  export declare const BAR_ITEM_STYLE: {
3
4
  borderColor: string;
4
5
  borderRadius: number;
5
6
  borderWidth: number;
6
7
  };
7
- export declare const BAR_WIDTH = 14;
8
- export declare const BAR_GAP = "20%";
8
+ export declare const BAR_WIDTH: number;
9
+ export declare const BAR_GAP = "0%";
10
+ export declare const IMAGE_SIZE = 24;
11
+ export declare const getAxisLabelRich: (images?: string[]) => Record<string, unknown>;
12
+ export declare const getAxisLabelFormatter: (images?: string[]) => (value: string, index: number) => string;
9
13
  export declare const LAYOUT: {
10
- ASPECT_RATIO: string;
11
14
  AXIS_HEIGHT: number;
12
- MAX_CATEGORIES_WITH_ASPECT_RATIO: number;
15
+ CATEGORY_GAP: number;
13
16
  MIN_HEIGHT: number;
14
- ROW_HEIGHT: number;
15
17
  };
16
- export declare const getChartSize: (categoriesCount?: number) => {
17
- aspectRatio: string;
18
- minHeight: string;
19
- width: string;
20
- height?: undefined;
21
- } | {
18
+ export declare const getChartSize: (categoriesCount?: number, seriesCount?: number, hasImages?: boolean) => {
22
19
  height: string;
23
20
  width: string;
24
- aspectRatio?: undefined;
25
21
  minHeight?: undefined;
26
22
  } | {
27
23
  minHeight: string;
28
24
  width: string;
29
- aspectRatio?: undefined;
30
25
  height?: undefined;
31
26
  };
27
+ export declare const SPLIT_LINE_COLOR = "#EFEFEF";
28
+ export declare const LABEL_COLOR = "#3B3B3B";
29
+ export declare const DIMMED_LABEL_COLOR = "#B9B9B9";
30
+ export declare const DIMMED_OPACITY = 0.25;
31
+ export declare const getAxisLabelColor: (activeRowIndex: number | null) => (_value: string, index: number) => "#3B3B3B" | "#B9B9B9";
32
+ export declare const getSplitLineColors: (categoriesCount?: number) => string[];
32
33
  export declare const BASE_CHART_OPTION: {
33
34
  backgroundColor: string;
34
35
  grid: {
@@ -1 +1 @@
1
- {"version":3,"file":"chart-styles.d.ts","sourceRoot":"","sources":["../../../../src/components/HorizontalBarChart/chart/chart-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIvC,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,eAAO,MAAM,OAAO,QAAQ,CAAC;AAE7B,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,wBAAmB;;;;;;;;;;;;;;;CAe/C,CAAC;AA2BF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;4BAzBI,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkF9C,CAAC"}
1
+ {"version":3,"file":"chart-styles.d.ts","sourceRoot":"","sources":["../../../../src/components/HorizontalBarChart/chart/chart-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKvC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,SAAS,QAA4B,CAAC;AACnD,eAAO,MAAM,OAAO,OAAO,CAAC;AAE5B,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B,eAAO,MAAM,gBAAgB,GAAI,SAAQ,MAAM,EAAO,4BAa9C,CAAC;AAET,eAAO,MAAM,qBAAqB,GAAI,SAAQ,MAAM,EAAO,MAAM,OAAO,MAAM,EAAE,OAAO,MAAM,WACvC,CAAC;AAEvD,eAAO,MAAM,MAAM;;;;CAIlB,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,wBAAmB,EAAE,oBAAe,EAAE,mBAAiB;;;;;;;;CAYnF,CAAC;AA2BF,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,MAAM,GAAG,IAAI,MAAM,QAAQ,MAAM,EAAE,OAAO,MAAM,0BAIjG,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,wBAAmB,KAAG,MAAM,EAW9D,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;4BAlDI,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2G9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBarChartItem.d.ts","sourceRoot":"","sources":["../../../../src/components/HorizontalBarChart/children/HorizontalBarChartItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQ/C,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAUD,eAAO,MAAM,sBAAsB,GAAI,sCAIpC,2BAA2B,gCA4D7B,CAAA;AAED,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"HorizontalBarChartItem.d.ts","sourceRoot":"","sources":["../../../../src/components/HorizontalBarChart/children/HorizontalBarChartItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAoB/C,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAUD,eAAO,MAAM,sBAAsB,GAAI,sCAIpC,2BAA2B,gCA+F7B,CAAA;AAED,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Series } from '../types';
2
+ export interface HorizontalBarChartLegendProps {
3
+ series?: Series[];
4
+ showLegend?: boolean;
5
+ }
6
+ export declare const HorizontalBarChartLegend: ({ series, showLegend }: HorizontalBarChartLegendProps) => import("react").JSX.Element | null;
7
+ export default HorizontalBarChartLegend;
8
+ //# sourceMappingURL=HorizontalBarChartLegend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalBarChartLegend.d.ts","sourceRoot":"","sources":["../../../../src/components/HorizontalBarChart/children/HorizontalBarChartLegend.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,GAAI,wBAAoC,6BAA6B,uCAyDzG,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { ApiData } from './types';
2
2
  export interface HorizontalBarChartProps {
3
3
  data: ApiData;
4
+ type?: string | undefined;
4
5
  }
5
- export declare const HorizontalBarChart: ({ data: apiData }: HorizontalBarChartProps) => import("react").JSX.Element;
6
+ export declare const HorizontalBarChart: ({ data: apiData, type }: HorizontalBarChartProps) => import("react").JSX.Element;
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HorizontalBarChart/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,cAAc,CAAC;AAGtB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB,GAAI,mBAAwB,uBAAuB,gCAyEjF,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HorizontalBarChart/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,cAAc,CAAC;AAItB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,kBAAkB,GAAI,yBAAmC,uBAAuB,gCA2D5F,CAAA"}
@@ -1,8 +1,9 @@
1
1
  export interface Metadata {
2
- title?: string;
2
+ articleUrl?: string;
3
3
  description?: string;
4
- source?: string;
5
4
  image?: string;
5
+ source?: string;
6
+ title?: string;
6
7
  }
7
8
  export type DataRow = Array<string | number | null>;
8
9
  export interface Data {
@@ -62,6 +63,8 @@ export interface ChartSeries {
62
63
  }
63
64
  export interface ChartData {
64
65
  categories: string[];
66
+ hasImages: boolean;
67
+ images: string[];
65
68
  series: ChartSeries[];
66
69
  }
67
70
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/HorizontalBarChart/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;AAEpD,MAAM,WAAW,IAAI;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACpC,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/HorizontalBarChart/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;AAEpD,MAAM,WAAW,IAAI;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACpC,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB"}
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{border-bottom:1px solid #c2c2c2;gap:8px;max-width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:72px 82px 0}}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);-webkit-user-select:none;user-select:none;border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{scrollbar-width:none;touch-action:pan-x;-webkit-user-select:none;user-select:none;gap:8px;width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-legend{border-bottom:1px solid #c2c2c2;align-items:center;gap:8px;max-width:100%;display:flex}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:36px 20px}}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require("react/jsx-runtime"),r=require("react");var i=`https://www.infobae.com/assets/images/logos/logo_infobae_naranja.svg`,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),o=/iPad|iPhone|iPod/.test(navigator.userAgent),s=[{buttonText:`Whatsapp`,id:`wa`,iconName:`whatsapp`},{buttonText:`Facebook`,id:`fb`,iconName:`facebook`},{buttonText:`Telegram`,id:`tl`,iconName:`telegram`},{buttonText:`X`,id:`x`,iconName:`x`},{buttonText:`Linkedin`,id:`li`,iconName:`linkedin`}],c=({source:e=``,showSource:t=!0,showLogo:r=!0,logoSrc:i=``})=>!t&&!r?null:(0,n.jsxs)(`div`,{className:`ibc-footer`,children:[!t||!e?null:(0,n.jsxs)(`p`,{className:`ibc-footer-font`,children:[`Fuente: `,(0,n.jsx)(`span`,{children:e})]}),!r||!i?null:(0,n.jsx)(`img`,{className:`ibc-footer-logo`,src:i||`https://www.infobae.com/assets/images/logos/logo_infobae_naranja.svg`,alt:`Infobae`})]}),l=({color:e=`var(--gray-90)`})=>(0,n.jsx)(`svg`,{width:25,height:23,viewBox:`0 0 25 23`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{d:`M15.1484 18.209C16.2165 17.062 17.2844 15.9156 18.3525 14.7686C19.6733 13.3501 21.0013 11.9235 22.3223 10.5049C21.0337 9.12301 19.7399 7.73568 18.4463 6.34863C17.3459 5.16872 16.2458 3.98836 15.1484 2.81152V7.11133L15.0605 7.12207L13.7334 7.2832C13.2462 7.34244 12.7328 7.3756 12.3428 7.40918C11.9212 7.4455 11.5709 7.487 11.25 7.55957L11.249 7.55859L11.2188 7.56641L11.2139 7.56836V7.56738L11.1797 7.57422C6.97754 8.31826 3.54696 11.4713 2.3457 15.6885L2.33203 15.7441C2.04422 16.8005 1.87981 17.8793 1.8252 18.9707C2.122 18.5479 2.4433 18.1395 2.79492 17.749L2.80762 17.7363C5.6064 14.6866 9.60855 13.2162 13.625 13.6777H13.624C13.6309 13.6784 13.6373 13.6791 13.6406 13.6797C13.6426 13.68 13.6445 13.6805 13.6455 13.6807L13.7715 13.7002C14.0526 13.7561 14.2412 13.8734 14.2803 13.8965C14.3888 13.9606 14.4699 14.0248 14.5107 14.0586C14.5577 14.0974 14.5963 14.1335 14.6191 14.1553L14.6514 14.1865L14.6533 14.1875L14.5908 14.2471L14.5811 14.2568L14.6533 14.1885L14.6738 14.209H14.6729L15.1201 14.6709L15.1484 14.7002V18.209ZM24.2998 10.7754L24.2832 10.8008C24.095 11.0787 23.9061 11.3293 23.6904 11.5801L23.6875 11.583C20.9494 14.5235 18.2039 17.4716 15.4658 20.4121L15.374 20.5234C15.1464 20.7683 14.828 20.9048 14.4971 20.9043H14.4902V20.9033L14.3389 20.8926H14.332L14.3252 20.8906C13.7676 20.7689 13.3904 20.2251 13.4482 19.6543V15.4482L13.4316 15.4375C9.93065 15.0376 6.45647 16.3191 4.03418 18.959L4.03516 18.96C3.32287 19.7509 2.74215 20.6242 2.2666 21.5801C2.03257 22.1442 1.3672 22.4611 0.805664 22.2168L0.745117 22.1914V22.1768C0.443793 22.0328 0.22449 21.7539 0.171875 21.418L0.170898 21.4102L0.15918 21.2695V21.2686C0.0187049 19.5013 0.124356 17.7326 0.511719 16.001L0.512695 15.998L0.695312 15.2617L0.696289 15.2598C2.02169 10.5049 5.78955 6.91872 10.4414 5.91699L10.8936 5.82812C11.3251 5.73086 11.7619 5.68221 12.2012 5.64453C12.6152 5.60902 13.0281 5.58023 13.4482 5.53223V1.33789C13.3904 0.707944 13.8273 0.161489 14.4434 0.100586L14.4531 0.0996094V0.100586C14.6044 0.100586 14.7904 0.0990999 14.9502 0.194336C15.1239 0.257283 15.2662 0.374645 15.3779 0.516602H15.3789L23.9541 9.71289L23.959 9.71777V9.71875C24.0959 9.88874 24.2065 10.0607 24.29 10.2334L24.2998 10.2539V10.7754Z`,fill:e,stroke:e,strokeWidth:.2})});function u({className:e,showShare:t=!0,showSubtitle:i=!0,showTitle:c=!0,subtitle:u,title:d,url:f}){if(!t&&!c&&!i)return null;let[p,m]=(0,r.useState)(!1),h=e=>{if(typeof window>`u`||!f)return null;let t=`Te comparto este gráfico de Infobae`;switch(e){case`fb`:window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(f)}&quote=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`,`share_facebook`,`width=658,height=354,scrollbars=no`);break;case`x`:window.open(`https://x.com/intent/post?url=${encodeURIComponent(f)}&text=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`,`share_x`,`width=950,height=850,scrollbars=no`);break;case`wa`:o?window.location.href=`whatsapp://send?text=${encodeURIComponent(`${t} ${f}`)}`:window.open(`https://wa.me/?text=${encodeURIComponent(`${t} ${f}`)}&type=custom_url&app_absent=0`,`_blank`,`noopener,noreferrer`);break;case`li`:window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(f)}`,`share_linkedin`,`width=830,height=460,scrollbars=no`);break;case`tl`:a?window.location.href=`tg://msg_url?url=${encodeURIComponent(f)}&text=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`:window.open(`https://telegram.me/share/url?url=${encodeURIComponent(f)}&text=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`,`_blank`,`noopener,noreferrer`)}return null};return(0,n.jsx)(`header`,{className:[`ibc-title`,e].filter(Boolean).join(` `),children:(0,n.jsxs)(`div`,{className:`ibc-title__row`,children:[(0,n.jsxs)(`div`,{className:`ibc-title__text`,children:[!c||!d?null:(0,n.jsx)(`p`,{className:`ibc-title__heading`,children:d}),!i||!u?null:(0,n.jsx)(`p`,{className:`ibc-title__subtitle`,children:u})]}),!t||!f?null:(0,n.jsx)(`div`,{className:`ibc-title__brand`,children:(0,n.jsxs)(`button`,{className:`ibc-title__button`,onClick:()=>m(e=>!e),children:[(0,n.jsx)(l,{}),p?(0,n.jsx)(`div`,{className:`ibc-title__share-modal`,children:s.map(({buttonText:e,id:t,iconName:r})=>(0,n.jsxs)(`button`,{"aria-label":`Compartir en ${e}`,className:`ibc-title__share-modal-button`,onClick:()=>h(t),type:`button`,children:[(0,n.jsx)(`div`,{className:`ibc-title__share-modal-icon`,children:(0,n.jsx)(`img`,{alt:`Ícono de ${e}`,src:`https://infobae-static.infobae.com/assets/images/icons/${r}-icon.svg`})}),(0,n.jsx)(`p`,{children:e})]},t))}):null]})})]})})}var d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},d(e,t)};function f(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);d(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var p=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),m=new(function(){function e(){this.browser=new p,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(m.wxa=!0,m.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?m.worker=!0:!m.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(m.node=!0,m.svgSupported=!0):h(navigator.userAgent,m);function h(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var g=`12px sans-serif`,_=20,v=100,y=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function b(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-_)/v}return t}var x=b(y),S={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=S.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=x[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},C=le([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),w=le([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),T=Object.prototype.toString,E=Array.prototype,D=E.forEach,O=E.filter,k=E.slice,A=E.map,j=function(){}.constructor,ee=j?j.prototype:null,te=`__proto__`,ne=2311,re=2**53-1;function ie(){return ne>=re&&(ne=0),ne++}function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function M(e){if(typeof e!=`object`||!e)return e;var t=e,n=T.call(e);if(n===`[object Array]`){if(!je(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=M(e[r])}}else if(w[n]){if(!je(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!C[n]&&!je(e)&&!ye(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==te&&(t[o]=M(e[o]));return t}function N(e,t,n){if(!W(t)||!W(e))return n?M(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==te){var i=e[r],a=t[r];W(a)&&W(i)&&!V(a)&&!V(i)&&!ye(a)&&!ye(i)&&!_e(a)&&!_e(i)&&!je(a)&&!je(i)?N(i,a,n):(n||!(r in e))&&(e[r]=M(t[r]))}return e}function P(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==te&&(e[n]=t[n]);return e}function oe(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function F(e,t,n){for(var r=B(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}S.createCanvas;function I(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function se(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function ce(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else F(e,t,n)}function L(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function R(e,t,n){if(e&&t){if(e.forEach&&e.forEach===D)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function z(e,t,n){if(!e)return[];if(!t)return Ee(e);if(e.map&&e.map===A)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function le(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function ue(e,t,n){if(!e)return[];if(!t)return Ee(e);if(e.filter&&e.filter===O)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function de(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function B(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function fe(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(k.call(arguments)))}}var pe=ee&&H(ee.bind)?ee.call.bind(ee.bind):fe;function me(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(k.call(arguments)))}}function V(e){return Array.isArray?Array.isArray(e):T.call(e)===`[object Array]`}function H(e){return typeof e==`function`}function U(e){return typeof e==`string`}function he(e){return T.call(e)===`[object String]`}function ge(e){return typeof e==`number`}function W(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function _e(e){return!!C[T.call(e)]}function ve(e){return!!w[T.call(e)]}function ye(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function be(e){return e.colorStops!=null}function xe(e){return e.image!=null}function Se(e){return T.call(e)===`[object RegExp]`}function Ce(e){return e!==e}function we(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function G(e,t){return e??t}function Te(e,t,n){return e??t??n}function Ee(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return k.apply(e,t)}function De(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function K(e,t){if(!e)throw Error(t)}function Oe(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var ke=`__ec_primitive__`;function Ae(e){e[ke]=!0}function je(e){return e[ke]}var Me=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return B(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Ne=typeof Map==`function`;function Pe(){return Ne?new Map:new Me}var Fe=function(){function e(t){var n=V(t);this.data=Pe();var r=this;t instanceof e?t.each(i):t&&R(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Ne?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function q(e){return new Fe(e)}function Ie(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Le(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&P(n,t),n}function Re(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function ze(e,t){return e.hasOwnProperty(t)}function Be(){}var Ve=180/Math.PI;function He(e,t){return e??=0,t??=0,[e,t]}function Ue(e,t){return e[0]=t[0],e[1]=t[1],e}function We(e){return[e[0],e[1]]}function Ge(e,t,n){return e[0]=t,e[1]=n,e}function Ke(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function qe(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Je(e){return Math.sqrt(Ye(e))}function Ye(e){return e[0]*e[0]+e[1]*e[1]}function Xe(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Ze(e,t){var n=Je(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Qe(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var $e=Qe;function et(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var tt=et;function nt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function rt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function it(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var at=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),ot=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new at(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new at(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new at(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new at(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new at(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new at(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),st=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),ct=Math.log(2);function lt(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/ct);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*lt(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function ut(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=lt(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*lt(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var dt=`___zrEVENTSAVED`,ft=[];function pt(e,t,n,r,i){return ht(ft,t,r,i,!0)&&ht(e,n,ft[0],ft[1])}function mt(e,t){e&&n(e),t&&n(t);function n(e){var t=e[dt];t&&(t.clearMarkers&&t.clearMarkers(),delete e[dt])}}function ht(e,t,n,r,i){if(t.getBoundingClientRect&&m.domSupported&&!vt(t)){var a=t[dt]||(t[dt]={}),o=_t(gt(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function gt(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function _t(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?ut(s,o):ut(o,s))}function vt(e){return e.nodeName.toUpperCase()===`CANVAS`}var yt=/([&<>"'])/g,bt={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function xt(e){return e==null?``:(e+``).replace(yt,function(e,t){return bt[t]})}var St=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ct=[],wt=m.browser.firefox&&+m.browser.version.split(`.`)[0]<39;function Tt(e,t,n,r){return n||={},r?Et(e,t,n):wt&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Et(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Et(e,t,n){if(m.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(vt(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(ht(Ct,e,r,i)){n.zrX=Ct[0],n.zrY=Ct[1];return}}n.zrX=n.zrY=0}function Dt(e){return e||window.event}function Ot(e,t,n){if(t=Dt(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Tt(e,i,t,n)}else{Tt(e,t,t,n);var a=kt(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&St.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function kt(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function At(e,t,n,r){e.addEventListener(t,n,r)}function jt(e,t,n,r){e.removeEventListener(t,n,r)}var Mt=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Nt=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Tt(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in It)if(It.hasOwnProperty(t)){var n=It[t](this._track,e);if(n)return n}},e}();function Pt(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function Ft(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var It={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=Pt(r)/Pt(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Ft(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function Lt(){return[1,0,0,1,0,0]}function Rt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function zt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Bt(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Vt(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Ht(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Ut(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Wt(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var Gt=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Kt=Math.min,qt=Math.max,Jt=Math.abs,Yt=[`x`,`y`],Xt=[`width`,`height`],Zt=new Gt,Qt=new Gt,$t=new Gt,en=new Gt,tn=gn(),nn=tn.minTv,rn=tn.maxTv,an=[0,0],J=function(){function e(e,t,n,r){sn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Kt(e.x,this.x),n=Kt(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?qt(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?qt(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return ln(Lt(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&Gt.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=sn(fn,t.x,t.y,t.width,t.height)),n instanceof e||(n=sn(pn,n.x,n.y,n.width,n.height));var s=!!r;tn.reset(i,s);var c=tn.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(an[0]=1/0,an[1]=0,hn(l,u,p,m,0,s,a,o),hn(d,f,h,g,1,s,a,o),s&&Gt.copy(r,_?tn.useDir?tn.dirMinTv:nn:rn)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){cn(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&cn(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Zt.x=$t.x=t.x,Zt.y=en.y=t.y,Qt.x=en.x=t.x+t.width,Qt.y=$t.y=t.y+t.height,Zt.transform(n),en.transform(n),Qt.transform(n),$t.transform(n),e.x=Kt(Zt.x,Qt.x,$t.x,en.x),e.y=Kt(Zt.y,Qt.y,$t.y,en.y);var s=qt(Zt.x,Qt.x,$t.x,en.x),c=qt(Zt.y,Qt.y,$t.y,en.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=Rt(e||[]),Vt(e,e,Ge(mn,-t.x,-t.y)),Ut(e,e,Ge(mn,r,i)),Vt(e,e,Ge(mn,n.x,n.y)),e},e}(),on=J.create,sn=J.set,cn=J.copy,ln=J.calculateTransform,un=J.applyTransform,dn=J.contain,fn=new J(0,0,0,0),pn=new J(0,0,0,0),mn=[];function hn(e,t,n,r,i,a,o,s){var c=Jt(t-n),l=Jt(r-e),u=Kt(c,l),d=Yt[i],f=Yt[1-i],p=Xt[i];t<n||r<e?c<l?(a&&(rn[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(rn[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=qt(e,n),o[p]=Kt(t,r)-o[d]),a&&(u<an[0]||tn.useDir)&&(an[0]=Kt(u,an[0]),(c<l||!tn.bidirectional)&&(nn[d]=c,nn[f]=0,tn.useDir&&tn.calcDirMTV()),(c>=l||!tn.bidirectional)&&(nn[d]=-l,nn[f]=0,tn.useDir&&tn.calcDirMTV())))}function gn(){var e=0,t=new Gt,n=new Gt,r={minTv:new Gt,maxTv:new Gt,useDir:!1,dirMinTv:new Gt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=qt(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return Jt(e)<1e-10}return r}var _n=`silent`;function vn(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:yn}}function yn(){Mt(this.event)}var bn=function(e){f(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(st),xn=function(){function e(e,t){this.x=e,this.y=t}return e}(),Sn=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Cn=new J(0,0,0,0),wn=function(e){f(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new xn(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new bn,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new ot(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(Sn,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Dn(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new xn(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new xn(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=vn(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new xn(e,t);if(En(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new J(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Cn.copy(u.getBoundingRect()),u.transform&&Cn.applyTransform(u.transform),Cn.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(En(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new Nt;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new xn;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(st);R([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){wn.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Dn(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||$e(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Tn(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||_n}return!1}function En(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Tn(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==_n)){t.target=o;break}}}function Dn(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var On=32,kn=7;function An(e){for(var t=0;e>=On;)t|=e&1,e>>=1;return e+t}function jn(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Mn(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Mn(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Nn(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Pn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Fn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function In(e,t){var n=kn,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Fn(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Pn(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Fn(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Pn(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=kn||m>=kn);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Fn(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Pn(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=kn||g>=kn);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Ln(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<On){a=jn(e,n,r,t),Nn(e,n,r,n+a,t);return}var o=In(e,t),s=An(i);do{if(a=jn(e,n,r,t),a<s){var c=i;c>s&&(c=s),Nn(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Rn=!1;function zn(){Rn||(Rn=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Bn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Vn=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Bn}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Ln(n,Bn)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(zn(),p.z=0),isNaN(p.z2)&&(zn(),p.z2=0),isNaN(p.zlevel)&&(zn(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=I(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Hn=m.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Un={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Un.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Un.bounceIn(e*2)*.5:Un.bounceOut(e*2-1)*.5+.5}},Wn=Math.pow,Gn=Math.sqrt,Kn=1e-8,qn=1e-4,Jn=Gn(3),Yn=1/3,Xn=He(),Zn=He(),Qn=He();function $n(e){return e>-Kn&&e<Kn}function er(e){return e>Kn||e<-Kn}function tr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function nr(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function rr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if($n(u)&&$n(d)){if($n(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if($n(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Gn(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Wn(-y,Yn):Wn(y,Yn),b=b<0?-Wn(-b,Yn):Wn(b,Yn);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Gn(u*u*u)),S=Math.acos(x)/3,C=Gn(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Jn*Math.sin(S)))/(3*o),T=(-s+C*(w-Jn*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function ir(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if($n(o)){if(er(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if($n(u))i[0]=-a/(2*o);else if(u>0){var d=Gn(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function ar(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function or(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Xn[0]=c,Xn[1]=l;for(var v=0;v<1;v+=.05)Zn[0]=tr(e,n,i,o,v),Zn[1]=tr(t,r,a,s,v),g=tt(Xn,Zn),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<qn);y++)m=d-f,h=d+f,Zn[0]=tr(e,n,i,o,m),Zn[1]=tr(t,r,a,s,m),g=tt(Zn,Xn),m>=0&&g<p?(d=m,p=g):(Qn[0]=tr(e,n,i,o,h),Qn[1]=tr(t,r,a,s,h),_=tt(Qn,Xn),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=tr(e,n,i,o,d),u[1]=tr(t,r,a,s,d)),Gn(p)}function sr(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=tr(e,n,i,o,m),g=tr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function cr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function lr(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function ur(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if($n(a)){if(er(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if($n(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Gn(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function dr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function fr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function pr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Xn[0]=o,Xn[1]=s;for(var f=0;f<1;f+=.05){Zn[0]=cr(e,n,i,f),Zn[1]=cr(t,r,a,f);var p=tt(Xn,Zn);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<qn);m++){var h=l-u,g=l+u;Zn[0]=cr(e,n,i,h),Zn[1]=cr(t,r,a,h);var p=tt(Zn,Xn);if(h>=0&&p<d)l=h,d=p;else{Qn[0]=cr(e,n,i,g),Qn[1]=cr(t,r,a,g);var _=tt(Qn,Xn);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=cr(e,n,i,l),c[1]=cr(t,r,a,l)),Gn(d)}function mr(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=cr(e,n,i,f),m=cr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var hr=/cubic-bezier\(([0-9,\.e ]+)\)/;function gr(e){var t=e&&hr.exec(e);if(t){var n=t[1].split(`,`),r=+Oe(n[0]),i=+Oe(n[1]),a=+Oe(n[2]),o=+Oe(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:rr(0,r,a,1,e,s)&&tr(0,i,o,1,s[0])}}}var _r=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Be,this.ondestroy=e.ondestroy||Be,this.onrestart=e.onrestart||Be,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=H(e)?e:Un[e]||gr(e)},e}(),vr=function(){function e(e){this.value=e}return e}(),yr=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new vr(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),br=function(){function e(e){this._list=new yr,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new vr(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),xr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Sr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Cr(e){return e=Math.round(e),e<0?0:e>360?360:e}function wr(e){return e<0?0:e>1?1:e}function Tr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Sr(parseFloat(t)/100*255):Sr(parseInt(t,10))}function Er(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?wr(parseFloat(t)/100):wr(parseFloat(t))}function Dr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Or(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function kr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ar=new br(20),jr=null;function Mr(e,t){jr&&kr(jr,t),jr=Ar.put(e,jr||t.slice())}function Nr(e,t){if(e){t||=[];var n=Ar.get(e);if(n)return kr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in xr)return kr(t,xr[r]),Mr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Or(t,0,0,0,1);return}return Or(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Mr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Or(t,0,0,0,1);return}return Or(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Mr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Or(t,+l[0],+l[1],+l[2],1):Or(t,0,0,0,1);u=Er(l.pop());case`rgb`:if(l.length>=3)return Or(t,Tr(l[0]),Tr(l[1]),Tr(l[2]),l.length===3?u:Er(l[3])),Mr(e,t),t;Or(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Or(t,0,0,0,1);return}return l[3]=Er(l[3]),Pr(l,t),Mr(e,t),t;case`hsl`:if(l.length!==3){Or(t,0,0,0,1);return}return Pr(l,t),Mr(e,t),t;default:return}}Or(t,0,0,0,1)}}function Pr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Er(e[1]),i=Er(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Or(t,Sr(Dr(o,a,n+1/3)*255),Sr(Dr(o,a,n)*255),Sr(Dr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Fr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Ir(e,t){var n=Nr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Rr(n,n.length===4?`rgba`:`rgb`)}}function Lr(e,t,n,r){var i=Nr(e);if(e)return i=Fr(i),t!=null&&(i[0]=Cr(H(t)?t(i[0]):t)),n!=null&&(i[1]=Er(H(n)?n(i[1]):n)),r!=null&&(i[2]=Er(H(r)?r(i[2]):r)),Rr(Pr(i),`rgba`)}function Rr(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function zr(e,t){var n=Nr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Br=new br(100);function Vr(e){if(U(e)){var t=Br.get(e);return t||(t=Ir(e,-.1),Br.put(e,t)),t}if(be(e)){var n=P({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Ir(e.color,-.1)}}),n}return e}var Hr=Math.round;function Ur(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Nr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Wr=1e-4;function Gr(e){return e<Wr&&e>-Wr}function Kr(e){return Hr(e*1e3)/1e3}function qr(e){return Hr(e*1e4)/1e4}function Jr(e){return`matrix(`+Kr(e[0])+`,`+Kr(e[1])+`,`+Kr(e[2])+`,`+Kr(e[3])+`,`+qr(e[4])+`,`+qr(e[5])+`)`}var Yr={left:`start`,right:`end`,center:`middle`,middle:`middle`};function Xr(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Zr(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Qr(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function $r(e){return e&&!!e.image}function ei(e){return e&&!!e.svgElement}function ti(e){return $r(e)||ei(e)}function ni(e){return e.type===`linear`}function ri(e){return e.type===`radial`}function ii(e){return e&&(e.type===`linear`||e.type===`radial`)}function ai(e){return`url(#`+e+`)`}function oi(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function si(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Ve,i=G(e.scaleX,1),a=G(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Hr(o*Ve)+`deg, `+Hr(s*Ve)+`deg)`),c.join(` `)}var ci=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return process.env.NODE_ENV!==`production`&&ae(`Base64 isn't natively supported in the current environment.`),null}})(),li=Array.prototype.slice;function ui(e,t,n){return(t-e)*n+e}function di(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=ui(t[a],n[a],r);return e}function fi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=ui(t[o][s],n[o][s],r)}return e}function pi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function mi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function hi(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function gi(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:li.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function _i(e){if(L(e)){var t=e.length;if(L(e[0])){for(var n=[],r=0;r<t;r++)n.push(li.call(e[r]));return n}return li.call(e)}return e}function vi(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function yi(e){return L(e&&e[0])?2:1}var bi=0,xi=1,Si=2,Ci=3,wi=4,Ti=5,Ei=6;function Di(e){return e===wi||e===Ti}function Oi(e){return e===xi||e===Si}var ki=[0,0,0,0],Ai=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Ei,s=t;if(L(t)){var c=yi(t);o=c,(c===1&&!ge(t[0])||c===2&&!ge(t[0][0]))&&(a=!0)}else if(ge(t)&&!Ce(t))o=bi;else if(U(t)){if(!isNaN(+t))o=bi;else{var l=Nr(t);l&&(s=l,o=Ci)}}else if(be(t)){var u=P({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Nr(e.color)}}),ni(t)?o=wi:ri(t)&&(o=Ti),s=u}i===0?this.valType=o:(o!==this.valType||o===Ei)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=H(n)?n:Un[n]||gr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Oi(r),c=Di(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?gi(d,f,r):c&&hi(d.colorStops,f.colorStops))}if(!o&&r!==Ti&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===bi?n[l].additiveValue=n[l].value-p:r===Ci?n[l].additiveValue=pi([],n[l].value,p,-1):Oi(r)&&(n[l].additiveValue=r===xi?pi([],n[l].value,p,-1):mi([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Ci,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?ki:e[s];if((Oi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Oi(i))i===xi?di(g,f[r],p[r],h):fi(g,f[r],p[r],h);else if(Di(i)){var _=f[r],v=p[r],y=i===wi;e[s]={type:y?`linear`:`radial`,x:ui(_.x,v.x,h),y:ui(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:ui(e.offset,n.offset,h),color:vi(di([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=ui(_.x2,v.x2,h),e[s].y2=ui(_.y2,v.y2,h)):e[s].r=ui(_.r,v.r,h)}else if(c)di(g,f[r],p[r],h),n||(e[s]=vi(g));else{var b=ui(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===bi?e[n]=e[n]+r:t===Ci?(Nr(e[n],ki),pi(ki,ki,r,1),e[n]=vi(ki)):t===xi?pi(e[n],e[n],r,1):t===Si&&mi(e[n],e[n],r,1)},e}(),ji=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){ae(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,B(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Ai(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Ci&&c&&(c=vi(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,_i(c),r),this._trackKeys.push(o)}s.addKeyframe(e,_i(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new _r({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return z(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=_i(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=B(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function Mi(){return new Date().getTime()}var Ni=function(e){f(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Mi()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Hn(t),!e._paused&&e.update())}Hn(t)},t.prototype.start=function(){this._running||(this._time=Mi(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Mi(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Mi()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new ji(e,t.loop);return this.addAnimator(n),n},t}(st),Pi=300,Fi=m.domSupported,Ii=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Li={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ri=!1;function zi(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Bi(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Vi(e){e&&(e.zrByTouch=!0)}function Hi(e,t){return Ot(e.dom,new Wi(e,t),!0)}function Ui(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Wi=function(){function e(e,t){this.stopPropagation=Be,this.stopImmediatePropagation=Be,this.preventDefault=Be,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Gi={mousedown:function(e){e=Ot(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Ot(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Ot(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Ot(this.dom,e);var t=e.toElement||e.relatedTarget;Ui(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ri=!0,e=Ot(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ri||(e=Ot(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Ot(this.dom,e),Vi(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Gi.mousemove.call(this,e),Gi.mousedown.call(this,e)},touchmove:function(e){e=Ot(this.dom,e),Vi(e),this.handler.processGesture(e,`change`),Gi.mousemove.call(this,e)},touchend:function(e){e=Ot(this.dom,e),Vi(e),this.handler.processGesture(e,`end`),Gi.mouseup.call(this,e),+new Date-this.__lastTouchMoment<Pi&&Gi.click.call(this,e)},pointerdown:function(e){Gi.mousedown.call(this,e)},pointermove:function(e){zi(e)||Gi.mousemove.call(this,e)},pointerup:function(e){Gi.mouseup.call(this,e)},pointerout:function(e){zi(e)||Gi.mouseout.call(this,e)}};R([`click`,`dblclick`,`contextmenu`],function(e){Gi[e]=function(t){t=Ot(this.dom,t),this.trigger(e,t)}});var Ki={pointermove:function(e){zi(e)||Ki.mousemove.call(this,e)},pointerup:function(e){Ki.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function qi(e,t){var n=t.domHandlers;m.pointerEventsSupported?R(Ii.pointer,function(r){Yi(t,r,function(t){n[r].call(e,t)})}):(m.touchEventsSupported&&R(Ii.touch,function(r){Yi(t,r,function(i){n[r].call(e,i),Bi(t)})}),R(Ii.mouse,function(r){Yi(t,r,function(i){i=Dt(i),t.touching||n[r].call(e,i)})}))}function Ji(e,t){m.pointerEventsSupported?R(Li.pointer,n):m.touchEventsSupported||R(Li.mouse,n);function n(n){function r(r){r=Dt(r),Ui(e,r.target)||(r=Hi(e,r),t.domHandlers[n].call(e,r))}Yi(t,n,r,{capture:!0})}}function Yi(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,At(e.domTarget,t,n,r)}function Xi(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&jt(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Zi=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Qi=function(e){f(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new Zi(t,Gi),Fi&&(r._globalHandlerScope=new Zi(document,Ki)),qi(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Xi(this._localHandlerScope),Fi&&Xi(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Fi&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Ji(this,t):Xi(t)}},t}(st),$i=1;m.hasGlobalWindow&&($i=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ea=$i,ta=.4,na=`#333`,ra=`#ccc`,ia=`#eee`,aa=Rt,oa=5e-5;function sa(e){return e>oa||e<-oa}var ca=[],la=[],ua=Lt(),da=Math.abs,fa=function(){function e(){}return e.prototype.getLocalTransform=function(e){return pa(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return sa(this.rotation)||sa(this.x)||sa(this.y)||sa(this.scaleX-1)||sa(this.scaleY-1)||sa(this.skewX)||sa(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(aa(n),this.invTransform=null);return}n||=Lt(),t?this.getLocalTransform(n):aa(n),e&&(t?Bt(n,e,n):zt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||Lt(),Wt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ca);var n=ca[0]<0?-1:1,r=ca[1]<0?-1:1,i=((ca[0]-n)*t+n)/ca[0]||0,a=((ca[1]-r)*t+r)/ca[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Lt(),Bt(la,e.invTransform,t),t=la);var n=this.originX,r=this.originY;(n||r)&&(ua[4]=n,ua[5]=r,Bt(la,t,ua),la[4]-=n,la[5]-=r,t=la),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&nt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&nt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&da(e[0]-1)>1e-10&&da(e[3]-1)>1e-10?Math.sqrt(da(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){ga(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Ht(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),pa=fa.getLocalTransform;function ma(){return new fa}var ha=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function ga(e,t){return oe(e,t,ha)}function _a(e){va||=new br(100),e||=`12px sans-serif`;var t=va.get(e);return t||(t={font:e,strWidthCache:new br(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:S.measureText(`国`,e).width,asciiCharWidth:S.measureText(`a`,e).width},va.put(e,t)),t}var va;function ya(e){if(!(ba>=xa)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=S.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?ba=xa:i>2&&ba++,t}}var ba=0,xa=5;function Sa(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=ya(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Ca(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=S.measureText(t,e.font).width,n.put(t,r)),r}function wa(e,t,n,r){var i=Ca(_a(t),e),a=Oa(t);return new J(Ea(0,i,n),Da(0,a,r),i,a)}function Ta(e,t,n,r){var i=((e||``)+``).split(`
3
3
  `);if(i.length===1)return wa(i[0],t,n,r);for(var a=new J(0,0,0,0),o=0;o<i.length;o++){var s=wa(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Ea(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Da(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Oa(e){return _a(e).stWideCharWidth}function ka(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Aa(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=ka(r[0],n.width),l+=ka(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var ja=`__zr_normal__`,Ma=ha.concat([`ignore`]),Na=le(ha,function(e,t){return e[t]=!0,e},{ignore:!1}),Pa={},Fa=new J(0,0,0,0),Ia=[],La=function(){function e(e){this.id=ie(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=Fa,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Pa,n,d):Aa(Pa,n,d),i.x=Pa.x,i.y=Pa.y,a=Pa.align,o=Pa.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=ka(f[0],d.width),m=ka(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new J(0,0,0,0);i.getLocalTransform(Ia),Wt(Ia,Ia),J.copy(_,d),_.applyTransform(Ia)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ra:na},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Nr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Rr(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},P(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(W(e))for(var n=B(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Ma)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ja,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ja;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(I(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){ae(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=Ga(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,qa(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=Ga(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,qa(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=I(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=I(r,e),a=I(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];P(t,i),i.textConfig&&(n||={},P(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=P({},r?this.textConfig:n.textConfig),P(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Ma.length;l++){var u=Ma[l],d=i&&Na[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!==`production`)throw Error(`Text element has been added to zrender.`);return}if(e===this){if(process.env.NODE_ENV!==`production`)throw Error(`Recursive component attachment.`);return}var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;if(t!==e){if(t&&t!==e&&this.removeTextContent(),process.env.NODE_ENV!==`production`&&e.__zr&&!e.__hostTarget)throw Error(`Text element has been added to zrender.`);e.innerTransformable=new fa,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||={},P(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this;if(process.env.NODE_ENV!==`production`&&!r){ae(`Property "`+e+`" is not existed in element `+this.id);return}var i=new ji(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=I(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Ra(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Ra(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Ra(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;var n={};function r(e,t,r){n[e+t+r]||(console.warn(`DEPRECATED: '`+e+`' has been deprecated. use '`+t+`', '`+r+`' instead`),n[e+t+r]=!0)}function i(e,n,i,a){Object.defineProperty(t,e,{get:function(){if(process.env.NODE_ENV!==`production`&&r(e,i,a),!this[n]){var t=this[n]=[];o(this,t)}return this[n]},set:function(t){process.env.NODE_ENV!==`production`&&r(e,i,a),this[i]=t[0],this[a]=t[1],this[n]=t,o(this,t)}});function o(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[a]},set:function(t){e[a]=t}})}}Object.defineProperty&&(i(`position`,`_legacyPos`,`x`,`y`),i(`scale`,`_legacyScale`,`scaleX`,`scaleY`),i(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();ce(La,st),ce(La,fa);function Ra(e,t,n,r,i){n||={};var a=[];Wa(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function za(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Ba(e){return L(e[0])}function Va(e,t,n){if(L(t[n])){if(L(e[n])||(e[n]=[]),ve(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),za(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(Ba(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?za(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else za(a,i,o);a.length=i.length}}else e[n]=t[n]}function Ha(e,t){return e===t||L(e)&&L(t)&&Ua(e,t)}function Ua(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Wa(e,t,n,r,i,a,o,s){for(var c=B(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!W(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(W(v)&&!L(v)&&!be(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}Wa(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=I(m,x);m.splice(S,1)}}if(i.force||(h=ue(h,function(e){return!Ha(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=_i(n[_]),Va(n,r,_)}}var x=new ji(n,!1,!1,d?ue(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function Ga(e,t,n,r){return!(n&&n.hoverLayer||r)||Ka(e)||t&&Ka(t)?0:1}function Ka(e){return e.type===`text`||e.type===`tspan`}function qa(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var Ja=function(e){f(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),process.env.NODE_ENV!==`production`&&e.__hostTarget))throw`This elemenet has been used as an attachment`;return this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=I(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=I(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new J(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(J.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(La);Ja.prototype.type=`group`;var Ya={},Xa={};function Za(e){delete Xa[e]}function Qa(e){if(!e)return!1;if(typeof e==`string`)return zr(e,1)<ta;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=zr(t[i].color,1);return n/=r,n<ta}return!1}var $a=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new Vn,a=n.renderer||`canvas`;if(Ya[a]||(a=B(Ya)[0]),process.env.NODE_ENV!==`production`&&!Ya[a])throw Error(`Renderer '`+a+`' is not imported. Please import it first.`);n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new Ya[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!m.node&&!m.worker&&!s?new Qi(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?m.touchEventsSupported:!!l,d=44,f;u&&(f=G(n.pointerSize,d)),this.handler=new wn(i,o,c,o.root,f),this.animation=new Ni({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Qa(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=Mi(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=Mi();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ja&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Za(this.id))},e}();function eo(e,t){var n=new $a(ie(),e,t);return Xa[n.id]=n,n}function to(e,t){Ya[e]=t}var no;function ro(e){if(typeof no==`function`)return no(e)}function io(e){no=e}var ao=1e-4,oo=20;function so(e){return e.replace(/^\s+|\s+$/g,``)}var co=Math.min,Y=Math.max,lo=Math.abs,uo=Math.round,fo=Math.floor,po=Math.ceil,mo=Math.pow,ho=Math.log,go=Math.LN10,_o=Math.PI,vo=Math.random;function yo(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var bo=xo;function xo(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return So(e,t,n)}function So(e,t,n){return U(e)?Co(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Co(e){return!!so(e).match(/%$/)}function X(e,t,n){return process.env.NODE_ENV!==`production`&&K(t!=null),isNaN(t)?n?``+e:+e:(t=co(Y(0,t),oo),e=(+e).toFixed(t),n?e:+e)}function wo(e){return e.sort(function(e,t){return e-t}),e}function To(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(uo(e*t)/t===e)return n}return Eo(e)}function Eo(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return Y(0,(a<0?0:i-1-a)-r)}function Do(e,t,n){var r=lo(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ho(2*lo(n||1)*lo(r))/go,a=ho(lo(t))/go,o=Y(0,po(-i+a));return isFinite(o)||(o=NaN),o}function Oo(e,t){var n=Y(To(e),To(t)),r=e+t;return n>oo?r:X(r,n)}var ko=mo(2,53)-1;function Ao(e){var t=_o*2;return(e%t+t)%t}function jo(e){return e>-ao&&e<ao}var Mo=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function No(e){if(e instanceof Date)return e;if(U(e)){var t=Mo.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(uo(e))}function Po(e){return mo(10,Fo(e))}function Fo(e){if(e===0)return 0;var t=fo(ho(e)/go);return e/mo(10,t)>=10&&t++,t}function Io(e,t){var n=Fo(e),r=mo(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,X(e,-n)}function Lo(e){var t=parseFloat(e);return t==e&&(t!==0||!U(e)||e.indexOf(`x`)<=0)?t:NaN}function Ro(e){return!isNaN(Lo(e))}function zo(){return uo(vo()*9)}function Bo(e,t){return t===0?e:Bo(t,e%t)}function Vo(e,t){return e==null?t:t==null?e:e*t/Bo(e,t)}function Ho(e){return e!=null&&isFinite(e)}var Uo=`[ECharts] `,Wo={},Go=typeof console<`u`&&console.warn&&console.log;function Ko(e,t,n){if(Go){if(n){if(Wo[t])return;Wo[t]=!0}console[e](Uo+t)}}function qo(e,t){Ko(`log`,e,t)}function Jo(e,t){Ko(`warn`,e,t)}function Yo(e,t){Ko(`error`,e,t)}function Xo(e){process.env.NODE_ENV!==`production`&&Ko(`warn`,`DEPRECATED: `+e,!0)}function Zo(e,t,n){process.env.NODE_ENV!==`production`&&Xo((n?`[`+n+`]`:``)+(e+` is deprecated; use `+t+` instead.`))}function Qo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=``;if(process.env.NODE_ENV!==`production`){var r=function(e){return e===void 0?`undefined`:e===1/0?`Infinity`:e===-1/0?`-Infinity`:Ce(e)?`NaN`:e instanceof Date?`Date(`+e.toISOString()+`)`:H(e)?`function () { ... }`:Se(e)?e+``:null};n=z(e,function(e){if(U(e))return e;var t=r(e);if(t!=null)return t;if(typeof JSON<`u`&&JSON.stringify)try{return JSON.stringify(e,function(e,t){return r(t)??t})}catch{return`?`}return`?`}).join(` `)}return n}function $o(e){throw Error(e)}var es=`series\0`,ts=`\0_ec_\0`;function ns(e){return e instanceof Array?e:e==null?[]:[e]}function rs(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var is=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function as(e){return W(e)&&!V(e)&&!(e instanceof Date)?e.value:e}function os(e){return W(e)&&!(e instanceof Array)}function ss(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=q();R(t,function(e,n){if(!W(e)){t[n]=null;return}process.env.NODE_ENV!==`production`&&(e.id!=null&&!vs(e.id)&&_s(e.id),e.name!=null&&!vs(e.name)&&_s(e.name))});var s=cs(e,o,n);return(r||i)&&ls(s,e,o,t),r&&us(s,t),r||i?ds(s,t,i):a&&fs(s,t),ps(s),s}function cs(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||bs(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function ls(e,t,n,r){R(r,function(i,a){if(!(!i||i.id==null)){var o=hs(i.id),s=n.get(o);if(s!=null){var c=e[s];K(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function us(e,t){R(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!bs(n)&&!bs(a)&&ms(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function ds(e,t,n){R(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||bs(r.existing)||r.existing&&t.id!=null&&!ms(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function fs(e,t){R(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function ps(e){var t=q();R(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),R(e,function(e){var n=e.newOption;K(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),R(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(W(i)){if(a.name=i.name==null?r?r.name:es+n:hs(i.name),r)a.id=hs(r.id);else if(i.id!=null)a.id=hs(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function ms(e,t,n){var r=gs(t[e],null),i=gs(n[e],null);return r!=null&&i!=null&&r===i}function hs(e){if(process.env.NODE_ENV!==`production`&&e==null)throw Error();return gs(e,``)}function gs(e,t){return e==null?t:U(e)?e:ge(e)||he(e)?e+``:t}function _s(e){process.env.NODE_ENV!==`production`&&Jo("`"+e+"` is invalid id or name. Must be a string or number.")}function vs(e){return he(e)||Ro(e)}function ys(e){var t=e.name;return!!(t&&t.indexOf(es))}function bs(e){return e&&e.id!=null&&hs(e.id).indexOf(ts)===0}function xs(e){return ts+e}function Ss(e,t,n){R(e,function(e){var r=e.newOption;W(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Cs(t,r,e.existing,n))})}function Cs(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function ws(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return V(t.dataIndex)?z(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return V(t.name)?z(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Ts(){var e=`__ec_inner_`+Es++;return function(t){return t[e]||(t[e]={})}}var Es=zo();function Ds(e,t,n){var r=Os(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=js(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Os(e,t){var n;if(U(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=q(),a={},o=!1;return R(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&I(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var ks={useDefault:!0,enableAll:!1,enableNone:!1},As={useDefault:!1,enableAll:!0,enableNone:!0};function js(e,t,n,r){r||=ks;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;process.env.NODE_ENV!==`production`&&Yo('`"none"` or `false` is not a valid value on index option.'),i=-1}return i===`all`&&(r.enableAll?i=a=o=null:(process.env.NODE_ENV!==`production`&&Yo('`"all"` is not a valid value on index option.'),i=-1)),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Ms(e,t,n){process.env.NODE_ENV!==`production`&&K(t);var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function Ns(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ps(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Fs(e){return e===`auto`?m.domSupported?`html`:`richText`:e||`html`}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Is(){return[1/0,-1/0]}function Ls(e,t){Vs(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Rs(e,t){Vs(t)&&t<e[0]&&(e[0]=t)}function zs(e,t){Vs(t)&&t>e[1]&&(e[1]=t)}function Bs(e,t){Hs(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Vs(e){return e!=null&&isFinite(e)}function Hs(e,t){return Vs(e)&&Vs(t)&&e<=t}function Us(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Ws(e){Hs(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Gs(){var e=`__ec_once_`+Ks++;return function(t,n){process.env.NODE_ENV!==`production`&&K(t),ze(t,e)||(t[e]=1,n())}}var Ks=zo();function qs(e,t,n){var r=q(),i=0;R(e,function(a){var o=t(a);process.env.NODE_ENV!==`production`&&K(U(o));var s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Js(e){return process.env.NODE_ENV!==`production`&&K(e.value!=null),e.value+``}function Ys(e){return process.env.NODE_ENV!==`production`&&K(e!=null),e+``}function Xs(e,t){return G(t,!0)?e.seriesIndex+2:0}function Zs(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Qs(e){return{overallReset:e}}var $s=`.`,ec=`___EC__COMPONENT__CONTAINER___`,tc=`___EC__EXTENDED_CLASS___`;function nc(e){var t={main:``,sub:``};if(e){var n=e.split($s);t.main=n[0]||``,t.sub=n[1]||``}return t}function rc(e){K(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function ic(e){return!!(e&&e[tc])}function ac(e,t){e.$constructor=e,e.extend=function(e){process.env.NODE_ENV!==`production`&&R(t,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?` in `+e.type:``)+`.`)});var n=this,r;return oc(n)?r=function(e){f(t,e);function t(){return e.apply(this,arguments)||this}return t}(n):(r=function(){(e.$constructor||n).apply(this,arguments)},se(r,this)),P(r.prototype,e),r[tc]=!0,r.extend=this.extend,r.superCall=uc,r.superApply=dc,r.superClass=n,r}}function oc(e){return H(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function sc(e,t){e.extend=t.extend}var cc=Math.round(Math.random()*10);function lc(e){var t=[`__\0is_clz`,cc++].join(`_`);e.prototype[t]=!0,process.env.NODE_ENV!==`production`&&K(!e.isInstance,`The method "is" can not be defined.`),e.isInstance=function(e){return!!(e&&e[t])}}function uc(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function dc(e,t,n){return this.superClass.prototype[t].apply(e,n)}function fc(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){rc(r),e.prototype.type=r;var i=nc(r);if(!i.sub)process.env.NODE_ENV!==`production`&&t[i.main]&&console.warn(i.main+` exists.`),t[i.main]=e;else if(i.sub!==ec){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[ec]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=nc(e),r=[],i=t[n.main];return i&&i[ec]?R(i,function(e,t){t!==ec&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[nc(e).main]},e.getAllClassMainTypes=function(){var e=[];return R(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[nc(e).main];return n&&n[ec]};function n(e){var n=t[e.main];return(!n||!n[ec])&&(n=t[e.main]={},n[ec]=!0),n}}function pc(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&I(r,s)>=0||i&&I(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var mc=pc([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),hc=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return mc(this,e,t)},e}(),gc=new br(50);function _c(e){if(typeof e==`string`){var t=gc.get(e);return t&&t.image}return e}function vc(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=gc.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!bc(t)&&a.pending.push(o)):(t=S.loadImage(e,yc,yc),t.__zrImageSrc=e,gc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function yc(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function bc(e){return e&&e.width&&e.height}var xc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Sc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
4
4
  `);a=Cc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)wc(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
@@ -41,10 +41,10 @@ echarts.use([`+c+`]);`:`Unknown series `+s))}return}if(t===`tooltip`){if(f){proc
41
41
  `)){var p=new sP;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,aP(dP,f,null,r,d)).on(`mouseover`,aP(fP,m.name,null,r,d)).on(`mouseout`,aP(pP,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Pu(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Nr(h.fill);_&&_[3]===0&&(_[3]=.2,h=P(P({},h),{fill:Rr(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,aP(dP,null,f,r,d)).on(`mouseover`,aP(fP,null,f,r,d)).on(`mouseout`,aP(pP,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Pu(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this);process.env.NODE_ENV!==`production`&&(c.get(f)||console.warn(f+` series not exists. Legend data should be same with series name or data name.`))}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Pu(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();oP(e,function(e){var r=e.type,i=new bu({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Om(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Bd(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=lP(c,r,o,s,d,m,u),y=new sP,b=r.getModel(`textStyle`);if(H(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(uP({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;U(w)&&w?T=w.replace(`{name}`,t??``):H(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new bu({style:Am(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new hu({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&um({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Bd(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();wg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){wg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(Ky);function lP(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),oP(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:rS(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function uP(e){var t=e.icon||`roundRect`,n=mx(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function dP(e,t,n,r){pP(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),fP(e,t,n,r)}function fP(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function pP(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function mP(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),hP(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),hP(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function hP(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==`
42
42
  `&&r!==``){var i=e.isSelected(r);n[r]=ze(n,r)?n[r]&&i:i}}),n}function gP(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,me(mP,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,me(mP,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,me(mP,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,me(mP,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,me(mP,`unSelect`))}var _P=Qs(vP);function vP(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function yP(e){e.registerComponentModel(iP),e.registerComponentView(cP),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,_P),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),gP(e)}var bP=function(e){f(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Mg(t);e.prototype.init.call(this,t,n,r),xP(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),xP(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=rh(iP.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(iP);function xP(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,jg(t,n,{type:`box`,ignoreSize:!!i})}var SP=Ja,CP=[`width`,`height`],wP=[`x`,`y`],TP=function(e){f(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new SP),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new SP)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=V(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new bu({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=nm(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:pe(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=CP[s],l=wP[s],u=CP[1-s],d=wP[1-s];i&&wg(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=M(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;wg(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),wg(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=G(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new hu({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&wp(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,U(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=CP[i],o=wP[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(cP);function EP(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function DP(e){qE(yP),e.registerComponentModel(bP),e.registerComponentView(TP),EP(e)}function OP(e){qE(yP),qE(DP)}function kP(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new hu({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=H(i)?function(e){i(e,d)}:null;Tp(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function AP(e,t,n){var r=e.getArea(),i=X(r.r0,1),a=X(r.r,1),o=new Hf({shape:{cx:X(e.cx,1),cy:X(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,Tp(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function jP(e,t,n,r,i){return e?e.type===`polar`?AP(e,t,n):e.type===`cartesian2d`?kP(e,t,n,r,i):null:null}var MP={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},NP=function(e){return Math.round(e.length/2)};function PP(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;U(i)?p=MP[i]:H(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,NP))}}}}}var FP=Gs(),IP=`__ec_stack_`;function LP(e){return e.get(`stack`)||IP+e.seriesIndex}function RP(e,t){var n=zP(e,t);return n.columnMap=BP(n),n}function zP(e,t){var n=NA(t,VD),r=[],i=_D(e,{fromStat:{key:n},min:1});return cE(e,n,function(e){r.push({barWidth:bo(e.get(`barWidth`),i.w),barMaxWidth:bo(e.get(`barMaxWidth`),i.w),barMinWidth:bo(e.get(`barMinWidth`)||(UP(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:LP(e)})}),{bandWidthResult:i,seriesInfo:r}}function BP(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};R(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;ze(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=co(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=Y(35-o.length*4,15)+`%`;var c=bo(i,t),l=bo(a,1),u=(n-c)/(r+(r-1)*l);u=Y(u,0),R(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=co(o,i)),a&&(o=Y(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=co(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=Y(u,0);var d=0,f;R(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return R(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function VP(e){return{seriesType:e,overallReset:function(t){var n=NA(e,VD);uE(t,n,function(t){process.env.NODE_ENV!==`production`&&K(t instanceof nO);var r=RP(t,e);cE(t,n,function(e){var t=r.columnMap[LP(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function HP(e){return{seriesType:e,plan:qy(),reset:function(e){if(RO(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=Ow(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(IA(i))),p=UP(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&DA(r*3),c=p&&s&&DA(r*3),l=p&&DA(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,lo(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,lo(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function UP(e){return e.pipelineContext&&e.pipelineContext.large}function WP(e){return MA(NA(e,VD))}function GP(e){FP(e,function(){function t(t){var n=NA(t,VD);FA(e,n,t,VD),NE(n,WP(t))}t(`bar`),t(`pictorialBar`)})}var KP=function(e){f(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return Mw(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)R(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(Ly);Ly.registerClass(KP);var qP=function(e){f(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return Mw(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Zs(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=rh(KP.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(KP),JP=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),YP=function(e){f(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new JP},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(tu);function XP(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Aa(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+QP(m,s+_,!1),x=u+p*y(m)+$P(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+QP(m,-s+_,!1),x=u+p*y(m)+$P(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+QP(h,s+_,!0),x=u+p*y(h)+$P(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+QP(h,-s+_,!0),x=u+p*y(h)+$P(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Aa(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function ZP(e,t,n,r){if(ge(r)){e.setTextConfig({rotation:r});return}if(V(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function QP(e,t,n){return t*Math.sin(e)*(n?-1:1)}function $P(e,t,n){return t*Math.cos(e)*(n?1:-1)}function eF(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;V(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:z(r,function(e){return ka(e,i)})}}var tF=Math.max,nF=Math.min,rF=function(e){f(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);i===`cartesian2d`||i===`polar`?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r)):process.env.NODE_ENV!==`production`&&Jo(`Only cartesian2d and polar supported for bar.`)},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){fm(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=oF(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=fF[s.type](a,e);if(!t)return null;var n=CF(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=fF[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!dF[s.type](r)))){var o=!1;f&&(o=iF[s.type](p,r));var g=aF[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),hF(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?sF(d,u,g,r,t,l,!1,!1):Tp(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=fF[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=fF[s.type](a,t),E=SF(l,T,s);wp(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!dF[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=iF[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&kp(D,e,n),D=null),D?Ap(D):D=aF[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=zm(k);A.prevValue!=null&&(A.prevValue=A.value)}}else hF(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?sF(d,u,D,C,t,l,!0,x):wp(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&kp(n,e,t)}).execute();var C=this._backgroundGroup||=new Ja;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),yF(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),yF(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&jP(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:z(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){kp(t,e,Pu(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(Xy),iF={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=tF(t.x,e.x),s=nF(t.x+t.width,i),c=tF(t.y,e.y),l=nF(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=nF(t.r,e.r),a=tF(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},aF={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new hu({shape:P({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?YP:Hf,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=XP(mF(i),{isRoundCap:l===YP}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?wp:Tp)(u,{shape:p},a)}return u}};function oF(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(process.env.NODE_ENV!==`production`&&n&&(r.type!==`category`&&Jo("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!==`cartesian2d`&&Jo("`realtimeSort` will not work because this bar series is not on cartesian2d.")),n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function sF(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?wp:Tp)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?wp:Tp)(n,{shape:l},u,i)}function cF(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var lF=[`x`,`y`,`width`,`height`],uF=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],dF={cartesian2d:function(e){return!cF(e,lF)},polar:function(e){return!cF(e,uF)}},fF={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?gF(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function pF(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function mF(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function hF(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;P(u,eF(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?wF(i,a.coordinateSystem):TF(i,a.coordinateSystem),p=km(r);Om(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:eP(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,ZP(e,h===`outside`?f:h,mF(o),r.get([`label`,`rotate`]))}Bm(m,p,a.getRawValue(n),function(e){return tP(t,e)});var g=r.getModel([`emphasis`]);Hd(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),Kd(e,r),pF(i)&&(e.style.fill=`none`,e.style.stroke=`none`,R(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function gF(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var _F=function(){function e(){}return e}(),vF=function(e){f(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new _F},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(tu);function yF(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Xs(e):0;if(l){var d=new vF({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new vF({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,Pu(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,bF),f.on(`mousemove`,bF)),n&&n.push(f)}var bF=ab(function(e){var t=this,n=xF(t,e.offsetX,e.offsetY);Pu(t).dataIndex=n>=0?n:null},30,!1);function xF(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function SF(e,t,n){if(nP(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function CF(e,t,n){return new(e.type===`polar`?Hf:hu)({shape:SF(t,n,e),silent:!0,z2:0})}function wF(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function TF(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function EF(e){e.registerChartView(rF),e.registerSeriesModel(qP),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,VP(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,HP(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,PP(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),GP(e)}var DF=Math.sin,OF=Math.cos,kF=Math.PI,AF=Math.PI*2,jF=180/kF,MF=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=Gr(u-AF)||(l?c>=AF:-c>=AF),f=c>0?c%AF:c%AF+AF,p=!1;p=d?!0:!Gr(u)&&f>=kF==!!l;var m=e+n*OF(a),h=t+r*DF(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*jF);if(d){var _=1/this._p,v=(l?1:-1)*(AF-_);this._add(`A`,n,r,g,1,+l,e+n*OF(a+v),t+r*DF(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*OF(o),b=t+r*DF(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),NF=`none`,PF=Math.round;function FF(e){var t=e.fill;return t!=null&&t!==NF}function IF(e){var t=e.stroke;return t!=null&&t!==NF}var LF=[`lineCap`,`miterLimit`,`lineJoin`],RF=z(LF,function(e){return`stroke-`+e.toLowerCase()});function zF(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof su){e(`opacity`,i);return}if(FF(t)){var a=Ur(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,NF);if(IF(t)){var s=Ur(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=Tx(n),p=f[0],m=f[1];p&&(m=PF(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,NF);for(var h=0;h<LF.length;h++){var g=LF[h];if(r||t[g]!==Ql[g]){var _=t[g]||Ql[g];_&&e(RF[h],_)}}}else r&&e(`stroke`,NF)}var BF=`http://www.w3.org/2000/svg`,VF=`http://www.w3.org/1999/xlink`,HF=`http://www.w3.org/2000/xmlns/`,UF=`http://www.w3.org/XML/1998/namespace`,WF=`ecmeta_`;function GF(e){return document.createElementNS(BF,e)}function KF(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function qF(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function JF(e){return`</`+e+`>`}function YF(e,t){t||={};var n=t.newline?`
43
43
  `:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return qF(i,a)+(i===`style`?o||``:xt(o))+(t?``+n+z(t,function(e){return r(e)}).join(n)+n:``)+JF(i)}return r(e)}function XF(e,t,n){n||={};var r=n.newline?`
44
- `:``,i=` {`+r,a=r+`}`,o=z(B(e),function(t){return t+i+z(B(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(B(t),function(e){return`@keyframes `+e+i+z(B(t[e]),function(n){return n+i+z(B(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function ZF(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function QF(e,t,n,r){return KF(`svg`,`root`,{width:e,height:t,xmlns:BF,"xmlns:xlink":VF,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var $F=0;function eI(){return $F++}var tI={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},nI=`transform-origin`;function rI(e,t,n){var r=P({},e.shape);P(r,t),e.buildPath(n,r);var i=new MF;return i.reset(oi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function iI(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[nI]=n+`px `+r+`px`)}var aI={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function oI(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function sI(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=ZF(n.zrId);t.animation=!0,lI(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=B(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=oI(i,n);return a.replace(o,s)}}function cI(e){return U(e)?tI[e]?`cubic-bezier(`+tI[e]+`)`:gr(e)?e:``:``}function lI(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof op){var s=sI(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=cI(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=cI(d.easing),m=d.rawValue;(U(m)||ge(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};ga(g,e),P(g,s[h]);var _=si(g),v=s[h][u];l[h]=_?{transform:_}:{},iI(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new Al);var S=y.len();y.reset(),l[h].d=rI(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return aI[e]})}for(var w=B(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][nI]!==l[O][nI]){T=!1;break}E=l[D][nI]}if(T&&E){for(var h in l)l[h][nI]&&delete l[h][nI];t[nI]=E}if(ue(w,function(e){return B(l[e]).length>0}).length)return oI(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+eI();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function uI(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};dI(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Vr(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),dI(r,t,n,!0)}}}function dI(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+eI(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var fI=Math.round;function pI(e){return e&&U(e.src)}function mI(e){return e&&H(e.toDataURL)}function hI(e,t,n,r){zF(function(i,a){var o=i===`fill`||i===`stroke`;o&&ii(a)?AI(t,e,i,r):o&&ti(a)?jI(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),kI(n,e,r)}function gI(e,t){var n=ro(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[WF+`silent`]=`true`))}function _I(e){return Gr(e[0]-1)&&Gr(e[1])&&Gr(e[2])&&Gr(e[3]-1)}function vI(e){return Gr(e[4])&&Gr(e[5])}function yI(e,t,n){if(t&&!(vI(t)&&_I(t))){var r=n?10:1e4;e.transform=_I(t)?`translate(`+fI(t[4]*r)/r+` `+fI(t[5]*r)/r+`)`:Jr(t)}}function bI(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(fI(r[a][0]*n)/n),i.push(fI(r[a][1]*n)/n);t.points=i.join(` `)}function xI(e){return!e.smooth}function SI(e){var t=z(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=fI(o*r)/r)}}}var CI={circle:[SI([`cx`,`cy`,`r`])],polyline:[bI,xI],polygon:[bI,xI]};function wI(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function TI(e,t){var n=e.style,r=e.shape,i=CI[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&oi(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&wI(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;(m.__svgPathVersion!==p||!h||c!==m.__svgPathStrokePercent)&&(h||=m.__svgPathBuilder=new MF,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return yI(a,e.transform),hI(a,n,e,t),gI(a,e),t.animation&&lI(e,a,t),t.emphasis&&uI(e,a,t),KF(s,e.id+``,a)}function EI(e,t){var n=e.style,r=n.image;if(r&&!U(r)&&(pI(r)?r=r.src:mI(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),yI(c,e.transform),hI(c,n,e,t),gI(c,e),t.animation&&lI(e,c,t),KF(`image`,e.id+``,c)}}function DI(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=Xr(n.y||0,Oa(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":Yr[n.textAlign]||n.textAlign};if(Eu(n)){var c=``,l=n.fontStyle,u=wu(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),yI(s,e.transform),hI(s,n,e,t),gI(s,e),t.animation&&lI(e,s,t),KF(`text`,e.id+``,s,void 0,r)}}function OI(e,t){if(e instanceof tu)return TI(e,t);if(e instanceof su)return EI(e,t);if(e instanceof ru)return DI(e,t)}function kI(e,t,n){var r=e.style;if(Zr(r)){var i=Qr(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=Ur(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=KF(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[KF(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=ai(o)}}function AI(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(ni(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(ri(i))a=`radialGradient`,o.cx=G(i.x,.5),o.cy=G(i.y,.5),o.r=G(i.r,.5);else{process.env.NODE_ENV!==`production`&&ae(`Illegal gradient type.`);return}for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=qr(s[l].offset)*100+`%`,f=s[l].color,p=Ur(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(KF(`stop`,l+``,g))}var _=YF(KF(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=KF(a,y,o,c)),t[n]=ai(y)}function jI(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if($r(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(U(h)?m=h:pI(h)?m=h.src:mI(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;K(f,g),K(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=vc(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=KF(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=M(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=si(i);x&&(o.patternTransform=x);var S=KF(`pattern`,``,o,[d]),C=YF(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=KF(`pattern`,T,o,[d])),t[n]=ai(T)}}function MI(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=KF(`clipPath`,a,o,[TI(e,n)])}t[`clip-path`]=ai(a)}function NI(e){return document.createTextNode(e)}function PI(e,t,n){e.insertBefore(t,n)}function FI(e,t){e.removeChild(t)}function II(e,t){e.appendChild(t)}function LI(e){return e.parentNode}function RI(e){return e.nextSibling}function zI(e,t){e.textContent=t}var BI=58,VI=120,HI=KF(``,``);function UI(e){return e===void 0}function WI(e){return e!==void 0}function GI(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!==`production`&&r[a]!=null&&console.error(`Duplicate key `+a),r[a]=i)}return r}function KI(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function qI(e){var t,n=e.children,r=e.tag;if(WI(r)){var i=e.elm=GF(r);if(XI(HI,e),V(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&II(i,qI(a))}else WI(e.text)&&!W(e.text)&&II(i,NI(e.text))}else e.elm=NI(e.text);return e.elm}function JI(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&PI(e,qI(a),t)}}function YI(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(WI(i.tag)?FI(LI(i.elm),i.elm):FI(e,i.elm))}}function XI(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===VI?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(HF,n,o):n.charCodeAt(3)===BI?r.setAttributeNS(UF,n,o):n.charCodeAt(5)===BI?r.setAttributeNS(VF,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function ZI(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:KI(o,l)?(QI(o,l),o=t[++r],l=n[++i]):KI(s,u)?(QI(s,u),s=t[--a],u=n[--c]):KI(o,u)?(QI(o,u),PI(e,o.elm,RI(s.elm)),o=t[++r],u=n[--c]):KI(s,l)?(QI(s,l),PI(e,s.elm,o.elm),s=t[--a],l=n[++i]):(UI(d)&&(d=GI(t,r,a)),f=d[l.key],UI(f)?PI(e,qI(l),o.elm):(p=t[f],p.tag===l.tag?(QI(p,l),t[f]=void 0,PI(e,p.elm,o.elm)):PI(e,qI(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,JI(e,m,n,i,c)):YI(e,t,r,a))}function QI(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(XI(e,t),UI(t.text)?WI(r)&&WI(i)?r!==i&&ZI(n,r,i):WI(i)?(WI(e.text)&&zI(n,``),JI(n,null,i,0,i.length-1)):WI(r)?YI(n,r,0,r.length-1):WI(e.text)&&zI(n,``):e.text!==t.text&&(WI(r)&&YI(n,r,0,r.length-1),zI(n,t.text)))}function $I(e,t){if(KI(e,t))QI(e,t);else{var n=e.elm,r=LI(n);qI(t),r!==null&&(PI(r,t.elm,RI(n)),YI(r,[e],0,0))}return t}var eL=0,tL=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=nL(`configLayer`),this.storage=t,this._opts=n=P({},n),this.root=e,this._id=`zr`+eL++,this._oldVNode=QF(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=GF(`svg`);XI(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,$I(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return OI(e,ZF(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=ZF(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=rL(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=KF(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(B(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(KF(`defs`,`defs`,{},c)),e.animation){var l=XF(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=KF(`style`,`stl`,{},[],l);a.push(u)}}return QF(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},YF(this.renderToVNode({animation:G(e.cssAnimation,!0),emphasis:G(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:G(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};MI(d[g],_,t);var v=KF(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=OI(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=Sx(r,0,n),t=Sx(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(ti(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=ci(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function nL(e){return function(){process.env.NODE_ENV!==`production`&&ae(`In SVG mode painter not support method "`+e+`"`)}}function rL(e,t,n,r){var i;if(n&&n!==`none`){if(i=KF(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),ii(n))AI({fill:n},i.attrs,`fill`,r);else if(ti(n))jI({style:{fill:n},dirty:Be,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=Ur(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function iL(e){e.registerPainter(`svg`,tL)}function aL(e,t,n){var r=S.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function oL(e){return!e.__cursors.get(0)}function sL(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var cL=function(e){f(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=ea,typeof t==`string`?a=aL(t,n,r):W(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Re(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=sL(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=aL(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new J(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new J(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new J(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new J(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=sL(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;be(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||yx(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):xe(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=Mx(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&R(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(st),lL=1e5,uL=314159,dL=void 0,fL=1,pL=2;function mL(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function hL(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function gL(e,t,n,r){var i=new cL(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,_L(i),i}function _L(e){e.__cursorStack=[],e.__cursors=q()}function vL(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function yL(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,vL({key:r})))}function bL(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function xL(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function SL(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&CL)||s.__builtin__)&&(!(n&wL)||!s.__builtin__)&&(!(n&TL)||s!==e.hoverlayer))&&t(s,a,o,i)}}var CL=1,wL=2,TL=4,EL=CL|TL,DL=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=P({},n||{}),this.dpr=n.devicePixelRatio||ea,this._singleCanvas=i,this.root=e,e.style&&(Re(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=gL(a,this,uL,0);c.initContext(),this._insertLayer(c,uL,0,!0),this._domRoot=e}else{this._width=Sx(e,0,n),this._height=Sx(e,1,n);var l=this._domRoot=hL(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!W(e)?{paintAll:!!e}:e||{},n=G(t.refresh,!0),r=G(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=pL),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return SL(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},wL),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=dL,n!==dL&&(!t&&n===pL&&(t=this._i.hoverlayer=this._ensureLayer(lL)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),Zx(i,s,r),c&&(s.style=l)}}i&&(Qx(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(lL)},e.prototype.paintOne=function(e,t){Xx(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)SL(this._i,function(e){e.afterBrush&&e.afterBrush()},EL),this._paintHoverList(e);else{var i=this;Hn(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(uL).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),SL(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},CL)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return SL(this._i,function(i){var a=!1;if(bL(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!oL(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}bL(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},EL),m.wxa&&SL(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=oL(e),c=s&&S.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=pL),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(Zx(o,f,a),f.setPrevPaintRect(p))}else Zx(o,f,a);if(s&&S.getTime()-c>15){d++;break}}}Qx(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=uL,t=0);var i=xL(this._i,e)[t];return i||(i=gL(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&N(i,this._layerConfig[e],!0),(n||r&&e!==uL)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(a[t]&&a[t][n]){process.env.NODE_ENV!==`production`&&ae(`ZLevel `+t+`.`+n+` has been used already`);return}if(!mL(e)){process.env.NODE_ENV!==`production`&&ae(`Layer of zlevel `+t+` is not valid`);return}for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=xL(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),xL(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this},e.prototype.eachLayer=function(e,t){return SL(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return SL(this._i,function(n,r){e.call(t,n,r)},CL)},e.prototype.eachOtherLayer=function(e,t){return SL(this._i,function(n,r){e.call(t,n,r)},wL)},e.prototype.getLayers=function(){var e={};return SL(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}SL(n._i,function(e){e.__dirty=!1,bL(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},EL);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){ae(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=yL(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}SL(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(oL(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(bL(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===dL&&(n._hoverLayerDirty=fL))},EL)},e.prototype.clear=function(){return SL(this._i,function(e){e.clear(),_L(e)},CL),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,SL(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?N(n[e],t,!0):n[e]=t,SL(this._i,function(e,t){N(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=Sx(i,0,r),t=Sx(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,SL(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(uL).resize(e,t)}return this},e.prototype.clearLayer=function(e){R(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[uL][0].dom;var t=new cL(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;SL(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];Zx(n,l,a)}Qx(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function OL(e){e.registerPainter(`canvas`,DL)}var kL=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},AL=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},jL=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e),s=r.some(({key:e})=>a.some(t=>t.includes(e)))||!1,c=r.some(({key:e})=>i.includes(e))||!1,l=n.map((e,t)=>{let n=o[t]||null;return{name:e,data:a.map(e=>n&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`bar`,stack:t+1,itemStyle:{borderRadius:[16,16,0,0]},emphasis:{focus:`series`,itemStyle:{shadowBlur:8,shadowColor:`rgba(0,0,0,0.25)`}},showBackground:!0,backgroundStyle:{color:`rgba(175, 175, 175, 0.1)`,borderRadius:[16,16,0,0]}}}),u=AL({visualization:e,data:t}),d=kL({visualization:e,data:t});return l.map(e=>{let{stack:t=0,data:n=[]}=e||{},i=n.map((e,t)=>{let n=u[t];return{value:e,itemStyle:{color:r.find(({key:e})=>e===n)?.color||`var(--orange-90)`}}}),a=s?i:n,o=d[t-1],l=r.find(({key:e})=>e===o)?.color||`var(--orange-90)`,f=c?l:null;return{...e,color:f,data:a,emphasis:{...e.emphasis,itemStyle:{...e.emphasis.itemStyle,color:f}}}})},ML=({xData:e=[],series:t=[]})=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t.find(({key:e})=>e===i)||{};a?.image&&a.key?n[r]={key:i,image:a.image}:n[r]={}}return n};qE([wA,$N,xN,EF,iL]);var NL=({visualization:e={},data:t={},showLegend:i=!0})=>{let a=(0,r.useRef)(null),o=(0,r.useRef)(null),s=jL({visualization:e,data:t}),c=AL({visualization:e,data:t}),{series:l=[]}=e||{},u=ML({xData:c,series:l});return(0,r.useEffect)(()=>{if(!a.current)return;o.current||=wC(a.current,void 0,{renderer:`svg`});let e=[...s],t={valueStyle:{color:`#333`,align:`center`,padding:[0,0,6,0]}};u.forEach(({image:e},n)=>{e&&(t[`img_${n}`]={height:24,width:24,align:`center`,backgroundColor:{image:e}})});let n={grid:{left:`0%`,right:`0%`,top:`0%`,bottom:`0%`,containLabel:!0},tooltip:{trigger:`axis`},xAxis:{type:`category`,data:c,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{interval:0,formatter:(e,n)=>{let r=`img_${n}`;return t[r]?`{valueStyle|${e}}\n{${r}|}`:`{valueStyle|${e}}`},rich:t}},yAxis:{type:`value`,splitLine:{lineStyle:{color:`#d5d5d566`}}},series:e};o.current.setOption(n);let r=new ResizeObserver(()=>{o.current?.resize()});return r.observe(a.current),()=>{r.disconnect(),o.current?.dispose(),o.current=null}},[s,c,u]),(0,n.jsxs)(`div`,{className:`vertical-bar-chart-ctn`,children:[(0,n.jsx)(`div`,{ref:a,className:`bars-vertical-bar-chart`,style:{width:`100%`}}),(()=>{if(!i||!l.length)return null;let e=l.map(({key:e,color:t},r)=>(0,n.jsxs)(`div`,{className:`vertical-bar-chart-label`,children:[(0,n.jsx)(`div`,{className:`vertical-bar-chart-label-icon`,style:{background:t||``}}),(0,n.jsx)(`p`,{className:`vertical-bar-chart-label-text`,children:e})]},`vertical-bar-chart-label-${e}-${t}-${r}`));return(0,n.jsx)(`div`,{className:`vertical-bar-chart-labels`,children:e})})()]})},PL=({data:e={},type:t=``})=>{let{data:r={},metadata:{title:i=``,description:a=``,source:o=``,image:s=void 0,articleUrl:l=``}={},visualization:d={},visualization:{settings:{showChart:f=!0,showDescription:p=!0,showImage:m=!0,showLegend:h=!0,showSource:g=!0,showTitle:_=!0}={}}={}}=e||{},v=t===`only-graph`,y=!v,b=!v&&m;return(0,n.jsxs)(`div`,{className:`vertical-bar-chart`,children:[(0,n.jsx)(u,{title:i,showTitle:_,subtitle:a,showSubtitle:p,url:l,showShare:y}),f?(0,n.jsx)(NL,{data:r,visualization:d,showLegend:h}):null,!g||!o?null:(0,n.jsx)(c,{showLogo:b,logoSrc:s,source:o,showSource:g})]})},FL={borderColor:`#FFFFFF`,borderRadius:8,borderWidth:2},IL={ASPECT_RATIO:`1242 / 478`,AXIS_HEIGHT:60,MAX_CATEGORIES_WITH_ASPECT_RATIO:5,MIN_HEIGHT:350,ROW_HEIGHT:56},LL=(e=0)=>{try{let t=Number(e)||0;if(t<=IL.MAX_CATEGORIES_WITH_ASPECT_RATIO)return{aspectRatio:IL.ASPECT_RATIO,minHeight:`${IL.MIN_HEIGHT}px`,width:`100%`};let n=t*IL.ROW_HEIGHT+IL.AXIS_HEIGHT;return{height:`${Math.max(n,IL.MIN_HEIGHT)}px`,width:`100%`}}catch(e){return console.log(`[HorizontalBarChart] Error al calcular el alto del gráfico:`,e),{minHeight:`${IL.MIN_HEIGHT}px`,width:`100%`}}},RL={backgroundColor:`#FFF`,grid:{bottom:`5%`,containLabel:!0,left:`2%`,right:`5%`,top:`5%`},textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:14},tooltip:{backgroundColor:`#FFFFFF`,borderColor:`#E2E2E2`,borderRadius:8,borderWidth:1,extraCssText:`box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);`,formatter:e=>{try{let t=`<div style="font-weight: bold; font-size: 16px; margin-bottom: 12px; color: #555;">${String(e[0]?.name??``).toUpperCase()}</div>`;return e.forEach(e=>{let n=Math.abs(Number(e.value)||0);t+=`
44
+ `:``,i=` {`+r,a=r+`}`,o=z(B(e),function(t){return t+i+z(B(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(B(t),function(e){return`@keyframes `+e+i+z(B(t[e]),function(n){return n+i+z(B(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function ZF(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function QF(e,t,n,r){return KF(`svg`,`root`,{width:e,height:t,xmlns:BF,"xmlns:xlink":VF,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var $F=0;function eI(){return $F++}var tI={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},nI=`transform-origin`;function rI(e,t,n){var r=P({},e.shape);P(r,t),e.buildPath(n,r);var i=new MF;return i.reset(oi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function iI(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[nI]=n+`px `+r+`px`)}var aI={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function oI(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function sI(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=ZF(n.zrId);t.animation=!0,lI(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=B(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=oI(i,n);return a.replace(o,s)}}function cI(e){return U(e)?tI[e]?`cubic-bezier(`+tI[e]+`)`:gr(e)?e:``:``}function lI(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof op){var s=sI(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=cI(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=cI(d.easing),m=d.rawValue;(U(m)||ge(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};ga(g,e),P(g,s[h]);var _=si(g),v=s[h][u];l[h]=_?{transform:_}:{},iI(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new Al);var S=y.len();y.reset(),l[h].d=rI(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return aI[e]})}for(var w=B(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][nI]!==l[O][nI]){T=!1;break}E=l[D][nI]}if(T&&E){for(var h in l)l[h][nI]&&delete l[h][nI];t[nI]=E}if(ue(w,function(e){return B(l[e]).length>0}).length)return oI(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+eI();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function uI(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};dI(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Vr(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),dI(r,t,n,!0)}}}function dI(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+eI(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var fI=Math.round;function pI(e){return e&&U(e.src)}function mI(e){return e&&H(e.toDataURL)}function hI(e,t,n,r){zF(function(i,a){var o=i===`fill`||i===`stroke`;o&&ii(a)?AI(t,e,i,r):o&&ti(a)?jI(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),kI(n,e,r)}function gI(e,t){var n=ro(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[WF+`silent`]=`true`))}function _I(e){return Gr(e[0]-1)&&Gr(e[1])&&Gr(e[2])&&Gr(e[3]-1)}function vI(e){return Gr(e[4])&&Gr(e[5])}function yI(e,t,n){if(t&&!(vI(t)&&_I(t))){var r=n?10:1e4;e.transform=_I(t)?`translate(`+fI(t[4]*r)/r+` `+fI(t[5]*r)/r+`)`:Jr(t)}}function bI(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(fI(r[a][0]*n)/n),i.push(fI(r[a][1]*n)/n);t.points=i.join(` `)}function xI(e){return!e.smooth}function SI(e){var t=z(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=fI(o*r)/r)}}}var CI={circle:[SI([`cx`,`cy`,`r`])],polyline:[bI,xI],polygon:[bI,xI]};function wI(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function TI(e,t){var n=e.style,r=e.shape,i=CI[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&oi(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&wI(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;(m.__svgPathVersion!==p||!h||c!==m.__svgPathStrokePercent)&&(h||=m.__svgPathBuilder=new MF,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return yI(a,e.transform),hI(a,n,e,t),gI(a,e),t.animation&&lI(e,a,t),t.emphasis&&uI(e,a,t),KF(s,e.id+``,a)}function EI(e,t){var n=e.style,r=n.image;if(r&&!U(r)&&(pI(r)?r=r.src:mI(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),yI(c,e.transform),hI(c,n,e,t),gI(c,e),t.animation&&lI(e,c,t),KF(`image`,e.id+``,c)}}function DI(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=Xr(n.y||0,Oa(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":Yr[n.textAlign]||n.textAlign};if(Eu(n)){var c=``,l=n.fontStyle,u=wu(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),yI(s,e.transform),hI(s,n,e,t),gI(s,e),t.animation&&lI(e,s,t),KF(`text`,e.id+``,s,void 0,r)}}function OI(e,t){if(e instanceof tu)return TI(e,t);if(e instanceof su)return EI(e,t);if(e instanceof ru)return DI(e,t)}function kI(e,t,n){var r=e.style;if(Zr(r)){var i=Qr(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=Ur(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=KF(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[KF(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=ai(o)}}function AI(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(ni(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(ri(i))a=`radialGradient`,o.cx=G(i.x,.5),o.cy=G(i.y,.5),o.r=G(i.r,.5);else{process.env.NODE_ENV!==`production`&&ae(`Illegal gradient type.`);return}for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=qr(s[l].offset)*100+`%`,f=s[l].color,p=Ur(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(KF(`stop`,l+``,g))}var _=YF(KF(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=KF(a,y,o,c)),t[n]=ai(y)}function jI(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if($r(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(U(h)?m=h:pI(h)?m=h.src:mI(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;K(f,g),K(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=vc(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=KF(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=M(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=si(i);x&&(o.patternTransform=x);var S=KF(`pattern`,``,o,[d]),C=YF(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=KF(`pattern`,T,o,[d])),t[n]=ai(T)}}function MI(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=KF(`clipPath`,a,o,[TI(e,n)])}t[`clip-path`]=ai(a)}function NI(e){return document.createTextNode(e)}function PI(e,t,n){e.insertBefore(t,n)}function FI(e,t){e.removeChild(t)}function II(e,t){e.appendChild(t)}function LI(e){return e.parentNode}function RI(e){return e.nextSibling}function zI(e,t){e.textContent=t}var BI=58,VI=120,HI=KF(``,``);function UI(e){return e===void 0}function WI(e){return e!==void 0}function GI(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!==`production`&&r[a]!=null&&console.error(`Duplicate key `+a),r[a]=i)}return r}function KI(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function qI(e){var t,n=e.children,r=e.tag;if(WI(r)){var i=e.elm=GF(r);if(XI(HI,e),V(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&II(i,qI(a))}else WI(e.text)&&!W(e.text)&&II(i,NI(e.text))}else e.elm=NI(e.text);return e.elm}function JI(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&PI(e,qI(a),t)}}function YI(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(WI(i.tag)?FI(LI(i.elm),i.elm):FI(e,i.elm))}}function XI(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===VI?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(HF,n,o):n.charCodeAt(3)===BI?r.setAttributeNS(UF,n,o):n.charCodeAt(5)===BI?r.setAttributeNS(VF,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function ZI(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:KI(o,l)?(QI(o,l),o=t[++r],l=n[++i]):KI(s,u)?(QI(s,u),s=t[--a],u=n[--c]):KI(o,u)?(QI(o,u),PI(e,o.elm,RI(s.elm)),o=t[++r],u=n[--c]):KI(s,l)?(QI(s,l),PI(e,s.elm,o.elm),s=t[--a],l=n[++i]):(UI(d)&&(d=GI(t,r,a)),f=d[l.key],UI(f)?PI(e,qI(l),o.elm):(p=t[f],p.tag===l.tag?(QI(p,l),t[f]=void 0,PI(e,p.elm,o.elm)):PI(e,qI(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,JI(e,m,n,i,c)):YI(e,t,r,a))}function QI(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(XI(e,t),UI(t.text)?WI(r)&&WI(i)?r!==i&&ZI(n,r,i):WI(i)?(WI(e.text)&&zI(n,``),JI(n,null,i,0,i.length-1)):WI(r)?YI(n,r,0,r.length-1):WI(e.text)&&zI(n,``):e.text!==t.text&&(WI(r)&&YI(n,r,0,r.length-1),zI(n,t.text)))}function $I(e,t){if(KI(e,t))QI(e,t);else{var n=e.elm,r=LI(n);qI(t),r!==null&&(PI(r,t.elm,RI(n)),YI(r,[e],0,0))}return t}var eL=0,tL=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=nL(`configLayer`),this.storage=t,this._opts=n=P({},n),this.root=e,this._id=`zr`+eL++,this._oldVNode=QF(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=GF(`svg`);XI(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,$I(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return OI(e,ZF(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=ZF(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=rL(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=KF(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(B(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(KF(`defs`,`defs`,{},c)),e.animation){var l=XF(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=KF(`style`,`stl`,{},[],l);a.push(u)}}return QF(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},YF(this.renderToVNode({animation:G(e.cssAnimation,!0),emphasis:G(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:G(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};MI(d[g],_,t);var v=KF(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=OI(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=Sx(r,0,n),t=Sx(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(ti(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=ci(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function nL(e){return function(){process.env.NODE_ENV!==`production`&&ae(`In SVG mode painter not support method "`+e+`"`)}}function rL(e,t,n,r){var i;if(n&&n!==`none`){if(i=KF(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),ii(n))AI({fill:n},i.attrs,`fill`,r);else if(ti(n))jI({style:{fill:n},dirty:Be,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=Ur(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function iL(e){e.registerPainter(`svg`,tL)}function aL(e,t,n){var r=S.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function oL(e){return!e.__cursors.get(0)}function sL(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var cL=function(e){f(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=ea,typeof t==`string`?a=aL(t,n,r):W(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Re(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=sL(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=aL(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new J(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new J(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new J(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new J(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=sL(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;be(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||yx(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):xe(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=Mx(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&R(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(st),lL=1e5,uL=314159,dL=void 0,fL=1,pL=2;function mL(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function hL(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function gL(e,t,n,r){var i=new cL(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,_L(i),i}function _L(e){e.__cursorStack=[],e.__cursors=q()}function vL(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function yL(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,vL({key:r})))}function bL(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function xL(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function SL(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&CL)||s.__builtin__)&&(!(n&wL)||!s.__builtin__)&&(!(n&TL)||s!==e.hoverlayer))&&t(s,a,o,i)}}var CL=1,wL=2,TL=4,EL=CL|TL,DL=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=P({},n||{}),this.dpr=n.devicePixelRatio||ea,this._singleCanvas=i,this.root=e,e.style&&(Re(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=gL(a,this,uL,0);c.initContext(),this._insertLayer(c,uL,0,!0),this._domRoot=e}else{this._width=Sx(e,0,n),this._height=Sx(e,1,n);var l=this._domRoot=hL(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!W(e)?{paintAll:!!e}:e||{},n=G(t.refresh,!0),r=G(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=pL),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return SL(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},wL),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=dL,n!==dL&&(!t&&n===pL&&(t=this._i.hoverlayer=this._ensureLayer(lL)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),Zx(i,s,r),c&&(s.style=l)}}i&&(Qx(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(lL)},e.prototype.paintOne=function(e,t){Xx(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)SL(this._i,function(e){e.afterBrush&&e.afterBrush()},EL),this._paintHoverList(e);else{var i=this;Hn(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(uL).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),SL(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},CL)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return SL(this._i,function(i){var a=!1;if(bL(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!oL(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}bL(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},EL),m.wxa&&SL(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=oL(e),c=s&&S.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=pL),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(Zx(o,f,a),f.setPrevPaintRect(p))}else Zx(o,f,a);if(s&&S.getTime()-c>15){d++;break}}}Qx(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=uL,t=0);var i=xL(this._i,e)[t];return i||(i=gL(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&N(i,this._layerConfig[e],!0),(n||r&&e!==uL)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(a[t]&&a[t][n]){process.env.NODE_ENV!==`production`&&ae(`ZLevel `+t+`.`+n+` has been used already`);return}if(!mL(e)){process.env.NODE_ENV!==`production`&&ae(`Layer of zlevel `+t+` is not valid`);return}for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=xL(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),xL(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this},e.prototype.eachLayer=function(e,t){return SL(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return SL(this._i,function(n,r){e.call(t,n,r)},CL)},e.prototype.eachOtherLayer=function(e,t){return SL(this._i,function(n,r){e.call(t,n,r)},wL)},e.prototype.getLayers=function(){var e={};return SL(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}SL(n._i,function(e){e.__dirty=!1,bL(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},EL);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){ae(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=yL(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}SL(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(oL(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(bL(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===dL&&(n._hoverLayerDirty=fL))},EL)},e.prototype.clear=function(){return SL(this._i,function(e){e.clear(),_L(e)},CL),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,SL(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?N(n[e],t,!0):n[e]=t,SL(this._i,function(e,t){N(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=Sx(i,0,r),t=Sx(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,SL(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(uL).resize(e,t)}return this},e.prototype.clearLayer=function(e){R(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[uL][0].dom;var t=new cL(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;SL(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];Zx(n,l,a)}Qx(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function OL(e){e.registerPainter(`canvas`,DL)}var kL=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},AL=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},jL=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e),s=r.some(({key:e})=>a.some(t=>t.includes(e)))||!1,c=r.some(({key:e})=>i.includes(e))||!1,l=n.map((e,t)=>{let n=o[t]||null;return{name:e,data:a.map(e=>n&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`bar`,stack:t+1,itemStyle:{borderRadius:[16,16,0,0]},emphasis:{focus:`series`,itemStyle:{shadowBlur:8,shadowColor:`rgba(0,0,0,0.25)`}},showBackground:!0,backgroundStyle:{color:`rgba(175, 175, 175, 0.1)`,borderRadius:[16,16,0,0]}}}),u=AL({visualization:e,data:t}),d=kL({visualization:e,data:t});return l.map(e=>{let{stack:t=0,data:n=[]}=e||{},i=n.map((e,t)=>{let n=u[t];return{value:e,itemStyle:{color:r.find(({key:e})=>e===n)?.color||`var(--orange-90)`}}}),a=s?i:n,o=d[t-1],l=r.find(({key:e})=>e===o)?.color||`var(--orange-90)`,f=c?l:null;return{...e,color:f,data:a,emphasis:{...e.emphasis,itemStyle:{...e.emphasis.itemStyle,color:f}}}})},ML=({xData:e=[],series:t=[]})=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t.find(({key:e})=>e===i)||{};a?.image&&a.key?n[r]={key:i,image:a.image}:n[r]={}}return n};qE([wA,$N,xN,EF,iL]);var NL=({visualization:e={},data:t={},showLegend:i=!0})=>{let a=(0,r.useRef)(null),o=(0,r.useRef)(null),s=jL({visualization:e,data:t}),c=AL({visualization:e,data:t}),{series:l=[]}=e||{},u=ML({xData:c,series:l});return(0,r.useEffect)(()=>{if(!a.current)return;o.current||=wC(a.current,void 0,{renderer:`svg`});let e=[...s],t={valueStyle:{color:`#333`,align:`center`,padding:[0,0,6,0]}};u.forEach(({image:e},n)=>{e&&(t[`img_${n}`]={height:24,width:24,align:`center`,backgroundColor:{image:e}})});let n={grid:{left:`0%`,right:`0%`,top:`0%`,bottom:`0%`,containLabel:!0},tooltip:{trigger:`axis`},xAxis:{type:`category`,data:c,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{interval:0,formatter:(e,n)=>{let r=`img_${n}`;return t[r]?`{valueStyle|${e}}\n{${r}|}`:`{valueStyle|${e}}`},rich:t}},yAxis:{type:`value`,splitLine:{lineStyle:{color:`#d5d5d566`}}},series:e};o.current.setOption(n);let r=new ResizeObserver(()=>{o.current?.resize()});return r.observe(a.current),()=>{r.disconnect(),o.current?.dispose(),o.current=null}},[s,c,u]),(0,n.jsxs)(`div`,{className:`vertical-bar-chart-ctn`,children:[(0,n.jsx)(`div`,{ref:a,className:`bars-vertical-bar-chart`,style:{width:`100%`}}),(()=>{if(!i||!l.length)return null;let e=l.map(({key:e,color:t},r)=>(0,n.jsxs)(`div`,{className:`vertical-bar-chart-label`,children:[(0,n.jsx)(`div`,{className:`vertical-bar-chart-label-icon`,style:{background:t||``}}),(0,n.jsx)(`p`,{className:`vertical-bar-chart-label-text`,children:e})]},`vertical-bar-chart-label-${e}-${t}-${r}`));return(0,n.jsx)(`div`,{className:`vertical-bar-chart-labels`,children:e})})()]})},PL=({data:e={},type:t=``})=>{let{data:r={},metadata:{title:i=``,description:a=``,source:o=``,image:s=void 0,articleUrl:l=``}={},visualization:d={},visualization:{settings:{showChart:f=!0,showDescription:p=!0,showImage:m=!0,showLegend:h=!0,showSource:g=!0,showTitle:_=!0}={}}={}}=e||{},v=t===`only-graph`,y=!v,b=!v&&m;return(0,n.jsxs)(`div`,{className:`vertical-bar-chart`,children:[(0,n.jsx)(u,{title:i,showTitle:_,subtitle:a,showSubtitle:p,url:l,showShare:y}),f?(0,n.jsx)(NL,{data:r,visualization:d,showLegend:h}):null,!g||!o?null:(0,n.jsx)(c,{showLogo:b,logoSrc:s,source:o,showSource:g})]})},FL={borderColor:`#FFFFFF`,borderRadius:100,borderWidth:4},IL=(e=[])=>e.reduce((e,t,n)=>t?{...e,[`image_${n}`]:{backgroundColor:{image:t},borderRadius:12,height:24,width:24}}:e,{}),LL=(e=[])=>(t,n)=>e[n]?`{image_${n}|} ${t}`:t,RL={AXIS_HEIGHT:60,CATEGORY_GAP:8,MIN_HEIGHT:200},zL=(e=0,t=1,n=!1)=>{try{let r=Number(e)||0,i=(Number(t)||1)*22,a=r*(Math.max(i,n?24:0)+RL.CATEGORY_GAP)+RL.AXIS_HEIGHT;return{height:`${Math.max(a,RL.MIN_HEIGHT)}px`,width:`100%`}}catch(e){return console.log(`[HorizontalBarChart] Error al calcular el alto del gráfico:`,e),{minHeight:`${RL.MIN_HEIGHT}px`,width:`100%`}}},BL=e=>{try{let t=`<div style="font-weight: bold; font-size: 16px; margin-bottom: 12px; color: #555;">${String(e[0]?.name??``).toUpperCase()}</div>`;return e.forEach(e=>{let n=Number(e.value)||0;t+=`
45
45
  <div style="display: flex; align-items: center; margin-bottom: 6px; font-size: 16px; color: #3B3B3B;">
46
46
  ${e.marker}
47
47
  <span style="margin-left: 6px;">${e.seriesName}: </span>
48
48
  <span style="margin-left: 4px;">${n}</span>
49
49
  </div>
50
- `}),t}catch(e){return console.log(`[HorizontalBarChart] Error al formatear el tooltip:`,e),``}},padding:[12,16],show:!0,textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:16},trigger:`axis`},xAxis:[{axisLabel:{fontSize:14},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},tooltip:{show:!1},type:`value`}],yAxis:[{axisLabel:{fontSize:14,interval:0},axisLine:{lineStyle:{color:`#D3D3D3`,type:`solid`,width:2},onZero:!0,show:!0},axisTick:{show:!1},splitLine:{lineStyle:{color:`#EFEFEF`,type:`solid`,width:1},show:!0},type:`category`,z:10}]},zL=[`negativa`],BL={categories:[],series:[]},VL=e=>{try{let t=Number(e);return Number.isFinite(t)?t:0}catch(t){return console.log(`[HorizontalBarChart] Valor no numérico:`,e,t),0}},HL=e=>{try{return String(e??``).trim().toLowerCase()}catch(t){return console.log(`[HorizontalBarChart] Valor no convertible a texto:`,e,t),``}},UL=e=>zL.includes(HL(e)),WL=(e={})=>{let{category:t,x:n,y:r}=e||{};return HL([t,r,n].find(e=>typeof e==`string`&&e.length>0))},GL=(e={},t=[],n=``)=>{let{values:r,x:i}=e||{};return([r,i].find(e=>Array.isArray(e)&&e.length>0)??t.filter(e=>HL(e)!==n)).map(e=>String(e))},KL=(e,t)=>e.findIndex(e=>HL(e)===HL(t)),qL=(e,t)=>e.find(e=>HL(e.key)===HL(t))?.color??``,JL=(e,t)=>({barGap:`20%`,barWidth:14,data:t,label:{show:!1},name:e,type:`bar`}),YL=(e={},t={})=>{let{columns:n=[],rows:r=[]}=e||{},{bindings:i={},series:a=[]}=t||{};if(!n.length||!r.length||!a.length)return BL;let o=WL(i),s=n.findIndex(e=>HL(e)===o);if(s<0)return BL;let c=r.map(e=>String(e?.[s]??``)),l=GL(i,n,o),u=a.some(({key:e})=>KL(n,e)>=0);return{categories:c,series:l.map(e=>{let t=KL(n,e);if(t<0)return null;let i=UL(e)?-1:1,o=qL(a,e);return JL(e,r.map((e,n)=>{let r=u?o:qL(a,c[n]);return{itemStyle:{...FL,color:r},value:VL(e?.[t])*i}}))}).filter(e=>e!==null)}};qE([$N,wA,OP,EF,OL]);var XL=({data:e={},showLegend:t=!0,visualization:i={}})=>{let{series:a=[]}=i||{},o=(0,r.useRef)(null),s=(0,r.useRef)(null),c=(0,r.useMemo)(()=>YL(e,i),[e,i]),l=(0,r.useMemo)(()=>LL(c.categories.length),[c.categories.length]);return(0,r.useEffect)(()=>{if(!o.current)return;s.current||=wC(o.current,void 0,{renderer:`svg`});let e={...RL,yAxis:[{...RL.yAxis[0],data:c.categories}],series:c.series};s.current.setOption(e,!0);let t=new ResizeObserver(()=>{s.current?.resize()});return t.observe(o.current),()=>{t.disconnect(),s.current?.dispose(),s.current=null}},[c]),(0,n.jsxs)(`div`,{className:`horizontal-bar-chart-ctn`,children:[(0,n.jsx)(`div`,{ref:o,className:`horizontal-bar-chart-ref`,style:l}),(()=>{if(!t||!a.length)return null;let e=a.map(({key:e,color:t},r)=>(0,n.jsxs)(`div`,{className:`horizontal-bar-chart-label`,children:[(0,n.jsx)(`div`,{className:`horizontal-bar-chart-label-icon`,style:{background:t||``}}),(0,n.jsx)(`p`,{className:`horizontal-bar-chart-label-text`,children:e})]},`horizontal-bar-chart-label-${e}-${t}-${r}`));return(0,n.jsx)(`div`,{className:`horizontal-bar-chart-labels`,children:e})})()]})},ZL=({data:e={}})=>{let{metadata:{description:t=``,image:r=i,source:a=``,title:o=``}={},data:s={},visualization:c={},visualization:{settings:{showChart:l=!0,showDescription:d=!0,showImage:f=!0,showLegend:p=!0,showSource:m=!0,showTitle:h=!0}={}}={}}=e||{};return(0,n.jsxs)(`div`,{className:`horizontal-bar-chart`,children:[(0,n.jsx)(u,{showSubtitle:d,showTitle:h,subtitle:t,title:o}),l?(0,n.jsx)(XL,{data:s,visualization:c,showLegend:p}):null,!m&&!f?null:(0,n.jsxs)(`div`,{className:`horizontal-bar-chart-credits`,children:[!m||!a?null:(0,n.jsxs)(`p`,{className:`horizontal-bar-chart-font`,children:[`Fuente: `,(0,n.jsx)(`span`,{children:a})]}),!f||!r?null:(0,n.jsx)(`img`,{className:`ibc-title__logo`,src:r,alt:`logo infobae of title component`,loading:`lazy`,decoding:`async`})]})]})};exports.HorizontalBarChart=ZL,exports.Title=u,exports.VerticalBar=PL;
50
+ `}),t}catch(e){return console.log(`[HorizontalBarChart] Error al formatear el tooltip:`,e),``}},VL=`#EFEFEF`,HL=`#3B3B3B`,UL=`#B9B9B9`,WL=.25,GL=e=>(t,n)=>e===null||n===e?HL:UL,KL=(e=0)=>{try{let t=(Number(e)||0)+1;return Array.from({length:t},(e,n)=>n===0||n===t-1?`transparent`:VL)}catch(e){return console.log(`[HorizontalBarChart] Error al calcular las líneas del grid:`,e),[VL]}},qL={backgroundColor:`#FFF`,grid:{bottom:`5%`,containLabel:!0,left:`2%`,right:`2%`,top:`5%`},textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:14},tooltip:{backgroundColor:`#FFFFFF`,borderColor:`#E2E2E2`,borderRadius:8,borderWidth:1,extraCssText:`box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);`,formatter:BL,padding:[12,16],show:!0,textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:16},trigger:`axis`},xAxis:[{axisLabel:{fontSize:14},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},tooltip:{show:!1},type:`value`}],yAxis:[{axisLabel:{fontSize:14,interval:0},axisLine:{lineStyle:{color:`#D3D3D3`,type:`solid`,width:2},onZero:!0,show:!0},axisTick:{show:!1},splitLine:{lineStyle:{color:VL,type:`solid`,width:1},show:!0},type:`category`,z:10}]},JL=[`negativa`],YL={categories:[],hasImages:!1,images:[],series:[]},XL=e=>{try{let t=Number(e);return Number.isFinite(t)?t:0}catch(t){return console.log(`[HorizontalBarChart] Valor no numérico:`,e,t),0}},ZL=e=>{try{return String(e??``).trim().toLowerCase()}catch(t){return console.log(`[HorizontalBarChart] Valor no convertible a texto:`,e,t),``}},QL=e=>JL.includes(ZL(e)),$L=(e={})=>{let{category:t,x:n,y:r}=e||{};return ZL([t,r,n].find(e=>typeof e==`string`&&e.length>0))},eR=(e={},t=[],n=``)=>{let{values:r,x:i}=e||{};return([r,i].find(e=>Array.isArray(e)&&e.length>0)??t.filter(e=>ZL(e)!==n)).map(e=>String(e))},tR=(e,t)=>e.findIndex(e=>ZL(e)===ZL(t)),nR=(e,t)=>e.find(e=>ZL(e.key)===ZL(t)),rR=(e,t)=>nR(e,t)?.color??``,iR=(e,t)=>nR(e,t)?.image??``,aR=(e,t)=>({barGap:`0%`,barWidth:22,data:t,label:{show:!1},name:e,type:`bar`}),oR=(e,t)=>e.map(e=>({...e,data:e.data.map((e,n)=>({...e,itemStyle:{...e.itemStyle,opacity:t===null||t===n?1:WL}}))})),sR=(e={},t={})=>{let{columns:n=[],rows:r=[]}=e||{},{bindings:i={},series:a=[]}=t||{};if(!n.length||!r.length||!a.length)return YL;let o=$L(i),s=n.findIndex(e=>ZL(e)===o);if(s<0)return YL;let c=r.map(e=>String(e?.[s]??``)),l=eR(i,n,o),u=a.some(({key:e})=>tR(n,e)>=0),d=l.map(e=>{let t=tR(n,e);if(t<0)return null;let i=QL(e)?-1:1,o=rR(a,e);return aR(e,r.map((e,n)=>{let r=u?o:rR(a,c[n]);return{itemStyle:{...FL,color:r},value:XL(e?.[t])*i}}))}).filter(e=>e!==null),f=c.map(e=>iR(a,e));return{categories:c,hasImages:f.some(Boolean),images:f,series:d}},cR=({series:e=[],showLegend:t=!0})=>{let i=(0,r.useRef)(null),a=(0,r.useRef)({isDragging:!1,startScroll:0,startX:0});if(!t||!e.length||!Array.isArray(e))return null;let o=e=>{let t=i.current;!t||e.pointerType===`touch`||(e.preventDefault(),a.current={isDragging:!0,startScroll:t.scrollLeft,startX:e.clientX},t.setPointerCapture(e.pointerId))},s=e=>{let t=i.current;if(!(!t||!a.current.isDragging))try{let{startScroll:n,startX:r}=a.current;t.scrollLeft=n-(e.clientX-r)}catch(e){console.log(`[HorizontalBarChart] Error al arrastrar la leyenda:`,e)}},c=e=>{let t=i.current;a.current.isDragging=!1,t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)};return(0,n.jsx)(`div`,{className:`horizontal-bar-chart-legend`,children:(0,n.jsx)(`div`,{className:`horizontal-bar-chart-labels`,onPointerCancel:c,onPointerDown:o,onPointerMove:s,onPointerUp:c,ref:i,children:e.map(({key:e,color:t},r)=>(0,n.jsxs)(`div`,{className:`horizontal-bar-chart-label`,children:[(0,n.jsx)(`div`,{className:`horizontal-bar-chart-label-icon`,style:{background:t||``}}),(0,n.jsx)(`p`,{className:`horizontal-bar-chart-label-text`,children:e})]},`horizontal-bar-chart-label-${e}-${t}-${r}`))})})};qE([$N,wA,OP,EF,OL]);var lR=({data:e={},showLegend:t=!0,visualization:i={}})=>{let{series:a=[]}=i||{},o=(0,r.useRef)(null),s=(0,r.useRef)(null),c=(0,r.useMemo)(()=>sR(e,i),[e,i]),l=(0,r.useMemo)(()=>zL(c.categories.length,c.series.length,c.hasImages),[c.categories.length,c.series.length,c.hasImages]);return(0,r.useEffect)(()=>{if(!o.current)return;s.current||=wC(o.current,void 0,{renderer:`svg`});let e=qL.yAxis[0],t=t=>[{...e,axisLabel:{...e.axisLabel,color:GL(t),formatter:LL(c.images),rich:IL(c.images)},data:c.categories,splitLine:{...e.splitLine,lineStyle:{...e.splitLine.lineStyle,color:KL(c.categories.length)}}}],n={...qL,yAxis:t(null),series:c.series};s.current.setOption(n,!0);let r=e=>{s.current?.setOption({series:oR(c.series,e),yAxis:t(e)})},i=(...e)=>{try{let{axesInfo:t}=e[0]??{},n=Number(t?.[0]?.value);r(Number.isInteger(n)?n:null)}catch(e){console.log(`[HorizontalBarChart] Error al resaltar la fila:`,e)}},a=()=>r(null);s.current.on(`updateAxisPointer`,i),s.current.on(`globalout`,a);let l=new ResizeObserver(()=>{s.current?.resize()});return l.observe(o.current),()=>{l.disconnect(),s.current?.off(`updateAxisPointer`,i),s.current?.off(`globalout`,a),s.current?.dispose(),s.current=null}},[c]),(0,n.jsxs)(`div`,{className:`horizontal-bar-chart-ctn`,children:[(0,n.jsx)(`div`,{ref:o,className:`horizontal-bar-chart-ref`,style:l}),(0,n.jsx)(cR,{series:a,showLegend:t})]})},uR=({data:e={},type:t=``})=>{let{metadata:{description:r=``,image:a=i,source:o=``,title:s=``,articleUrl:l=``}={},data:d={},visualization:f={},visualization:{settings:{showChart:p=!0,showDescription:m=!0,showImage:h=!0,showLegend:g=!0,showSource:_=!0,showTitle:v=!0}={}}={}}=e||{},y=t===`only-graph`,b=!y&&h;return(0,n.jsxs)(`div`,{className:`horizontal-bar-chart`,children:[(0,n.jsx)(u,{showShare:!y,showSubtitle:m,showTitle:v,subtitle:r,title:s,url:l}),p?(0,n.jsx)(lR,{data:d,visualization:f,showLegend:g}):null,!_||!o?null:(0,n.jsx)(c,{logoSrc:a,showLogo:b,showSource:_,source:o})]})};exports.HorizontalBarChart=uR,exports.Title=u,exports.VerticalBar=PL;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{border-bottom:1px solid #c2c2c2;gap:8px;max-width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:72px 82px 0}}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);-webkit-user-select:none;user-select:none;border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{scrollbar-width:none;touch-action:pan-x;-webkit-user-select:none;user-select:none;gap:8px;width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-legend{border-bottom:1px solid #c2c2c2;align-items:center;gap:8px;max-width:100%;display:flex}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:36px 20px}}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
3
  import { useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
4
4
  //#region \0rolldown/runtime.js
@@ -24287,40 +24287,63 @@ var LL = ({ visualization: r = {}, data: a = {}, showLegend: o = !0 }) => {
24287
24287
  });
24288
24288
  }, zL = {
24289
24289
  borderColor: "#FFFFFF",
24290
- borderRadius: 8,
24291
- borderWidth: 2
24292
- }, BL = {
24293
- ASPECT_RATIO: "1242 / 478",
24290
+ borderRadius: 100,
24291
+ borderWidth: 4
24292
+ }, BL = (e = []) => e.reduce((e, t, n) => t ? {
24293
+ ...e,
24294
+ [`image_${n}`]: {
24295
+ backgroundColor: { image: t },
24296
+ borderRadius: 12,
24297
+ height: 24,
24298
+ width: 24
24299
+ }
24300
+ } : e, {}), VL = (e = []) => (t, n) => e[n] ? `{image_${n}|} ${t}` : t, HL = {
24294
24301
  AXIS_HEIGHT: 60,
24295
- MAX_CATEGORIES_WITH_ASPECT_RATIO: 5,
24296
- MIN_HEIGHT: 350,
24297
- ROW_HEIGHT: 56
24298
- }, VL = (e = 0) => {
24302
+ CATEGORY_GAP: 8,
24303
+ MIN_HEIGHT: 200
24304
+ }, UL = (e = 0, t = 1, n = !1) => {
24299
24305
  try {
24300
- let t = Number(e) || 0;
24301
- if (t <= BL.MAX_CATEGORIES_WITH_ASPECT_RATIO) return {
24302
- aspectRatio: BL.ASPECT_RATIO,
24303
- minHeight: `${BL.MIN_HEIGHT}px`,
24304
- width: "100%"
24305
- };
24306
- let n = t * BL.ROW_HEIGHT + BL.AXIS_HEIGHT;
24306
+ let r = Number(e) || 0, i = (Number(t) || 1) * 22, a = r * (Math.max(i, n ? 24 : 0) + HL.CATEGORY_GAP) + HL.AXIS_HEIGHT;
24307
24307
  return {
24308
- height: `${Math.max(n, BL.MIN_HEIGHT)}px`,
24308
+ height: `${Math.max(a, HL.MIN_HEIGHT)}px`,
24309
24309
  width: "100%"
24310
24310
  };
24311
24311
  } catch (e) {
24312
24312
  return console.log("[HorizontalBarChart] Error al calcular el alto del gráfico:", e), {
24313
- minHeight: `${BL.MIN_HEIGHT}px`,
24313
+ minHeight: `${HL.MIN_HEIGHT}px`,
24314
24314
  width: "100%"
24315
24315
  };
24316
24316
  }
24317
- }, HL = {
24317
+ }, WL = (e) => {
24318
+ try {
24319
+ let t = `<div style="font-weight: bold; font-size: 16px; margin-bottom: 12px; color: #555;">${String(e[0]?.name ?? "").toUpperCase()}</div>`;
24320
+ return e.forEach((e) => {
24321
+ let n = Number(e.value) || 0;
24322
+ t += `
24323
+ <div style="display: flex; align-items: center; margin-bottom: 6px; font-size: 16px; color: #3B3B3B;">
24324
+ ${e.marker}
24325
+ <span style="margin-left: 6px;">${e.seriesName}: </span>
24326
+ <span style="margin-left: 4px;">${n}</span>
24327
+ </div>
24328
+ `;
24329
+ }), t;
24330
+ } catch (e) {
24331
+ return console.log("[HorizontalBarChart] Error al formatear el tooltip:", e), "";
24332
+ }
24333
+ }, GL = "#EFEFEF", KL = "#3B3B3B", qL = "#B9B9B9", JL = .25, YL = (e) => (t, n) => e === null || n === e ? KL : qL, XL = (e = 0) => {
24334
+ try {
24335
+ let t = (Number(e) || 0) + 1;
24336
+ return Array.from({ length: t }, (e, n) => n === 0 || n === t - 1 ? "transparent" : GL);
24337
+ } catch (e) {
24338
+ return console.log("[HorizontalBarChart] Error al calcular las líneas del grid:", e), [GL];
24339
+ }
24340
+ }, ZL = {
24318
24341
  backgroundColor: "#FFF",
24319
24342
  grid: {
24320
24343
  bottom: "5%",
24321
24344
  containLabel: !0,
24322
24345
  left: "2%",
24323
- right: "5%",
24346
+ right: "2%",
24324
24347
  top: "5%"
24325
24348
  },
24326
24349
  textStyle: {
@@ -24334,23 +24357,7 @@ var LL = ({ visualization: r = {}, data: a = {}, showLegend: o = !0 }) => {
24334
24357
  borderRadius: 8,
24335
24358
  borderWidth: 1,
24336
24359
  extraCssText: "box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);",
24337
- formatter: (e) => {
24338
- try {
24339
- let t = `<div style="font-weight: bold; font-size: 16px; margin-bottom: 12px; color: #555;">${String(e[0]?.name ?? "").toUpperCase()}</div>`;
24340
- return e.forEach((e) => {
24341
- let n = Math.abs(Number(e.value) || 0);
24342
- t += `
24343
- <div style="display: flex; align-items: center; margin-bottom: 6px; font-size: 16px; color: #3B3B3B;">
24344
- ${e.marker}
24345
- <span style="margin-left: 6px;">${e.seriesName}: </span>
24346
- <span style="margin-left: 4px;">${n}</span>
24347
- </div>
24348
- `;
24349
- }), t;
24350
- } catch (e) {
24351
- return console.log("[HorizontalBarChart] Error al formatear el tooltip:", e), "";
24352
- }
24353
- },
24360
+ formatter: WL,
24354
24361
  padding: [12, 16],
24355
24362
  show: !0,
24356
24363
  textStyle: {
@@ -24385,7 +24392,7 @@ var LL = ({ visualization: r = {}, data: a = {}, showLegend: o = !0 }) => {
24385
24392
  axisTick: { show: !1 },
24386
24393
  splitLine: {
24387
24394
  lineStyle: {
24388
- color: "#EFEFEF",
24395
+ color: GL,
24389
24396
  type: "solid",
24390
24397
  width: 1
24391
24398
  },
@@ -24394,63 +24401,123 @@ var LL = ({ visualization: r = {}, data: a = {}, showLegend: o = !0 }) => {
24394
24401
  type: "category",
24395
24402
  z: 10
24396
24403
  }]
24397
- }, UL = ["negativa"], WL = {
24404
+ }, QL = ["negativa"], $L = {
24398
24405
  categories: [],
24406
+ hasImages: !1,
24407
+ images: [],
24399
24408
  series: []
24400
- }, GL = (e) => {
24409
+ }, eR = (e) => {
24401
24410
  try {
24402
24411
  let t = Number(e);
24403
24412
  return Number.isFinite(t) ? t : 0;
24404
24413
  } catch (t) {
24405
24414
  return console.log("[HorizontalBarChart] Valor no numérico:", e, t), 0;
24406
24415
  }
24407
- }, KL = (e) => {
24416
+ }, tR = (e) => {
24408
24417
  try {
24409
24418
  return String(e ?? "").trim().toLowerCase();
24410
24419
  } catch (t) {
24411
24420
  return console.log("[HorizontalBarChart] Valor no convertible a texto:", e, t), "";
24412
24421
  }
24413
- }, qL = (e) => UL.includes(KL(e)), JL = (e = {}) => {
24422
+ }, nR = (e) => QL.includes(tR(e)), rR = (e = {}) => {
24414
24423
  let { category: t, x: n, y: r } = e || {};
24415
- return KL([
24424
+ return tR([
24416
24425
  t,
24417
24426
  r,
24418
24427
  n
24419
24428
  ].find((e) => typeof e == "string" && e.length > 0));
24420
- }, YL = (e = {}, t = [], n = "") => {
24429
+ }, iR = (e = {}, t = [], n = "") => {
24421
24430
  let { values: r, x: i } = e || {};
24422
- return ([r, i].find((e) => Array.isArray(e) && e.length > 0) ?? t.filter((e) => KL(e) !== n)).map((e) => String(e));
24423
- }, XL = (e, t) => e.findIndex((e) => KL(e) === KL(t)), ZL = (e, t) => e.find((e) => KL(e.key) === KL(t))?.color ?? "", QL = (e, t) => ({
24424
- barGap: "20%",
24425
- barWidth: 14,
24431
+ return ([r, i].find((e) => Array.isArray(e) && e.length > 0) ?? t.filter((e) => tR(e) !== n)).map((e) => String(e));
24432
+ }, aR = (e, t) => e.findIndex((e) => tR(e) === tR(t)), oR = (e, t) => e.find((e) => tR(e.key) === tR(t)), sR = (e, t) => oR(e, t)?.color ?? "", cR = (e, t) => oR(e, t)?.image ?? "", lR = (e, t) => ({
24433
+ barGap: "0%",
24434
+ barWidth: 22,
24426
24435
  data: t,
24427
24436
  label: { show: !1 },
24428
24437
  name: e,
24429
24438
  type: "bar"
24430
- }), $L = (e = {}, t = {}) => {
24439
+ }), uR = (e, t) => e.map((e) => ({
24440
+ ...e,
24441
+ data: e.data.map((e, n) => ({
24442
+ ...e,
24443
+ itemStyle: {
24444
+ ...e.itemStyle,
24445
+ opacity: t === null || t === n ? 1 : JL
24446
+ }
24447
+ }))
24448
+ })), dR = (e = {}, t = {}) => {
24431
24449
  let { columns: n = [], rows: r = [] } = e || {}, { bindings: i = {}, series: a = [] } = t || {};
24432
- if (!n.length || !r.length || !a.length) return WL;
24433
- let o = JL(i), s = n.findIndex((e) => KL(e) === o);
24434
- if (s < 0) return WL;
24435
- let c = r.map((e) => String(e?.[s] ?? "")), l = YL(i, n, o), u = a.some(({ key: e }) => XL(n, e) >= 0);
24450
+ if (!n.length || !r.length || !a.length) return $L;
24451
+ let o = rR(i), s = n.findIndex((e) => tR(e) === o);
24452
+ if (s < 0) return $L;
24453
+ let c = r.map((e) => String(e?.[s] ?? "")), l = iR(i, n, o), u = a.some(({ key: e }) => aR(n, e) >= 0), d = l.map((e) => {
24454
+ let t = aR(n, e);
24455
+ if (t < 0) return null;
24456
+ let i = nR(e) ? -1 : 1, o = sR(a, e);
24457
+ return lR(e, r.map((e, n) => {
24458
+ let r = u ? o : sR(a, c[n]);
24459
+ return {
24460
+ itemStyle: {
24461
+ ...zL,
24462
+ color: r
24463
+ },
24464
+ value: eR(e?.[t]) * i
24465
+ };
24466
+ }));
24467
+ }).filter((e) => e !== null), f = c.map((e) => cR(a, e));
24436
24468
  return {
24437
24469
  categories: c,
24438
- series: l.map((e) => {
24439
- let t = XL(n, e);
24440
- if (t < 0) return null;
24441
- let i = qL(e) ? -1 : 1, o = ZL(a, e);
24442
- return QL(e, r.map((e, n) => {
24443
- let r = u ? o : ZL(a, c[n]);
24444
- return {
24445
- itemStyle: {
24446
- ...zL,
24447
- color: r
24448
- },
24449
- value: GL(e?.[t]) * i
24450
- };
24451
- }));
24452
- }).filter((e) => e !== null)
24470
+ hasImages: f.some(Boolean),
24471
+ images: f,
24472
+ series: d
24453
24473
  };
24474
+ }, fR = ({ series: n = [], showLegend: r = !0 }) => {
24475
+ let a = i(null), o = i({
24476
+ isDragging: !1,
24477
+ startScroll: 0,
24478
+ startX: 0
24479
+ });
24480
+ if (!r || !n.length || !Array.isArray(n)) return null;
24481
+ let s = (e) => {
24482
+ let t = a.current;
24483
+ !t || e.pointerType === "touch" || (e.preventDefault(), o.current = {
24484
+ isDragging: !0,
24485
+ startScroll: t.scrollLeft,
24486
+ startX: e.clientX
24487
+ }, t.setPointerCapture(e.pointerId));
24488
+ }, c = (e) => {
24489
+ let t = a.current;
24490
+ if (!(!t || !o.current.isDragging)) try {
24491
+ let { startScroll: n, startX: r } = o.current;
24492
+ t.scrollLeft = n - (e.clientX - r);
24493
+ } catch (e) {
24494
+ console.log("[HorizontalBarChart] Error al arrastrar la leyenda:", e);
24495
+ }
24496
+ }, l = (e) => {
24497
+ let t = a.current;
24498
+ o.current.isDragging = !1, t?.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId);
24499
+ };
24500
+ return /* @__PURE__ */ e("div", {
24501
+ className: "horizontal-bar-chart-legend",
24502
+ children: /* @__PURE__ */ e("div", {
24503
+ className: "horizontal-bar-chart-labels",
24504
+ onPointerCancel: l,
24505
+ onPointerDown: s,
24506
+ onPointerMove: c,
24507
+ onPointerUp: l,
24508
+ ref: a,
24509
+ children: n.map(({ key: n, color: r }, i) => /* @__PURE__ */ t("div", {
24510
+ className: "horizontal-bar-chart-label",
24511
+ children: [/* @__PURE__ */ e("div", {
24512
+ className: "horizontal-bar-chart-label-icon",
24513
+ style: { background: r || "" }
24514
+ }), /* @__PURE__ */ e("p", {
24515
+ className: "horizontal-bar-chart-label-text",
24516
+ children: n
24517
+ })]
24518
+ }, `horizontal-bar-chart-label-${n}-${r}-${i}`))
24519
+ })
24520
+ });
24454
24521
  };
24455
24522
  //#endregion
24456
24523
  //#region src/components/HorizontalBarChart/children/HorizontalBarChartItem.tsx
@@ -24461,25 +24528,56 @@ ZE([
24461
24528
  AF,
24462
24529
  ML
24463
24530
  ]);
24464
- var eR = ({ data: a = {}, showLegend: o = !0, visualization: s = {} }) => {
24465
- let { series: c = [] } = s || {}, l = i(null), u = i(null), d = r(() => $L(a, s), [a, s]), f = r(() => VL(d.categories.length), [d.categories.length]);
24531
+ var pR = ({ data: a = {}, showLegend: o = !0, visualization: s = {} }) => {
24532
+ let { series: c = [] } = s || {}, l = i(null), u = i(null), d = r(() => dR(a, s), [a, s]), f = r(() => UL(d.categories.length, d.series.length, d.hasImages), [
24533
+ d.categories.length,
24534
+ d.series.length,
24535
+ d.hasImages
24536
+ ]);
24466
24537
  return n(() => {
24467
24538
  if (!l.current) return;
24468
24539
  u.current ||= OC(l.current, void 0, { renderer: "svg" });
24469
- let e = {
24470
- ...HL,
24471
- yAxis: [{
24472
- ...HL.yAxis[0],
24473
- data: d.categories
24474
- }],
24540
+ let e = ZL.yAxis[0], t = (t) => [{
24541
+ ...e,
24542
+ axisLabel: {
24543
+ ...e.axisLabel,
24544
+ color: YL(t),
24545
+ formatter: VL(d.images),
24546
+ rich: BL(d.images)
24547
+ },
24548
+ data: d.categories,
24549
+ splitLine: {
24550
+ ...e.splitLine,
24551
+ lineStyle: {
24552
+ ...e.splitLine.lineStyle,
24553
+ color: XL(d.categories.length)
24554
+ }
24555
+ }
24556
+ }], n = {
24557
+ ...ZL,
24558
+ yAxis: t(null),
24475
24559
  series: d.series
24476
24560
  };
24477
- u.current.setOption(e, !0);
24478
- let t = new ResizeObserver(() => {
24561
+ u.current.setOption(n, !0);
24562
+ let r = (e) => {
24563
+ u.current?.setOption({
24564
+ series: uR(d.series, e),
24565
+ yAxis: t(e)
24566
+ });
24567
+ }, i = (...e) => {
24568
+ try {
24569
+ let { axesInfo: t } = e[0] ?? {}, n = Number(t?.[0]?.value);
24570
+ r(Number.isInteger(n) ? n : null);
24571
+ } catch (e) {
24572
+ console.log("[HorizontalBarChart] Error al resaltar la fila:", e);
24573
+ }
24574
+ }, a = () => r(null);
24575
+ u.current.on("updateAxisPointer", i), u.current.on("globalout", a);
24576
+ let o = new ResizeObserver(() => {
24479
24577
  u.current?.resize();
24480
24578
  });
24481
- return t.observe(l.current), () => {
24482
- t.disconnect(), u.current?.dispose(), u.current = null;
24579
+ return o.observe(l.current), () => {
24580
+ o.disconnect(), u.current?.off("updateAxisPointer", i), u.current?.off("globalout", a), u.current?.dispose(), u.current = null;
24483
24581
  };
24484
24582
  }, [d]), /* @__PURE__ */ t("div", {
24485
24583
  className: "horizontal-bar-chart-ctn",
@@ -24487,55 +24585,37 @@ var eR = ({ data: a = {}, showLegend: o = !0, visualization: s = {} }) => {
24487
24585
  ref: l,
24488
24586
  className: "horizontal-bar-chart-ref",
24489
24587
  style: f
24490
- }), (() => {
24491
- if (!o || !c.length) return null;
24492
- let n = c.map(({ key: n, color: r }, i) => /* @__PURE__ */ t("div", {
24493
- className: "horizontal-bar-chart-label",
24494
- children: [/* @__PURE__ */ e("div", {
24495
- className: "horizontal-bar-chart-label-icon",
24496
- style: { background: r || "" }
24497
- }), /* @__PURE__ */ e("p", {
24498
- className: "horizontal-bar-chart-label-text",
24499
- children: n
24500
- })]
24501
- }, `horizontal-bar-chart-label-${n}-${r}-${i}`));
24502
- return /* @__PURE__ */ e("div", {
24503
- className: "horizontal-bar-chart-labels",
24504
- children: n
24505
- });
24506
- })()]
24588
+ }), /* @__PURE__ */ e(fR, {
24589
+ series: c,
24590
+ showLegend: o
24591
+ })]
24507
24592
  });
24508
- }, tR = ({ data: n = {} }) => {
24509
- let { metadata: { description: r = "", image: i = c, source: a = "", title: o = "" } = {}, data: s = {}, visualization: l = {}, visualization: { settings: { showChart: u = !0, showDescription: d = !0, showImage: f = !0, showLegend: p = !0, showSource: h = !0, showTitle: g = !0 } = {} } = {} } = n || {};
24593
+ }, mR = ({ data: n = {}, type: r = "" }) => {
24594
+ let { metadata: { description: i = "", image: a = c, source: o = "", title: s = "", articleUrl: l = "" } = {}, data: u = {}, visualization: d = {}, visualization: { settings: { showChart: p = !0, showDescription: h = !0, showImage: g = !0, showLegend: _ = !0, showSource: v = !0, showTitle: y = !0 } = {} } = {} } = n || {}, b = r === "only-graph";
24510
24595
  return /* @__PURE__ */ t("div", {
24511
24596
  className: "horizontal-bar-chart",
24512
24597
  children: [
24513
24598
  /* @__PURE__ */ e(m, {
24514
- showSubtitle: d,
24515
- showTitle: g,
24516
- subtitle: r,
24517
- title: o
24599
+ showShare: !b,
24600
+ showSubtitle: h,
24601
+ showTitle: y,
24602
+ subtitle: i,
24603
+ title: s,
24604
+ url: l
24518
24605
  }),
24519
- u ? /* @__PURE__ */ e(eR, {
24520
- data: s,
24521
- visualization: l,
24522
- showLegend: p
24606
+ p ? /* @__PURE__ */ e(pR, {
24607
+ data: u,
24608
+ visualization: d,
24609
+ showLegend: _
24523
24610
  }) : null,
24524
- !h && !f ? null : /* @__PURE__ */ t("div", {
24525
- className: "horizontal-bar-chart-credits",
24526
- children: [!h || !a ? null : /* @__PURE__ */ t("p", {
24527
- className: "horizontal-bar-chart-font",
24528
- children: ["Fuente: ", /* @__PURE__ */ e("span", { children: a })]
24529
- }), !f || !i ? null : /* @__PURE__ */ e("img", {
24530
- className: "ibc-title__logo",
24531
- src: i,
24532
- alt: "logo infobae of title component",
24533
- loading: "lazy",
24534
- decoding: "async"
24535
- })]
24611
+ !v || !o ? null : /* @__PURE__ */ e(f, {
24612
+ logoSrc: a,
24613
+ showLogo: !b && g,
24614
+ showSource: v,
24615
+ source: o
24536
24616
  })
24537
24617
  ]
24538
24618
  });
24539
24619
  };
24540
24620
  //#endregion
24541
- export { tR as HorizontalBarChart, m as Title, RL as VerticalBar };
24621
+ export { mR as HorizontalBarChart, m as Title, RL as VerticalBar };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infobae-charts",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "description": "Infobae charts components",
6
6
  "main": "./dist/index.cjs",