@visactor/vchart 1.9.1 → 1.9.3

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.
Files changed (237) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +1186 -1033
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/chart/base/base-chart.d.ts +1 -1
  6. package/cjs/chart/base/base-chart.js.map +1 -1
  7. package/cjs/chart/box-plot/box-plot-transformer.js +1 -1
  8. package/cjs/chart/box-plot/box-plot-transformer.js.map +1 -1
  9. package/cjs/chart/correlation/correlation-transformer.js.map +1 -1
  10. package/cjs/component/axis/base-axis.d.ts +3 -2
  11. package/cjs/component/axis/base-axis.js +4 -4
  12. package/cjs/component/axis/base-axis.js.map +1 -1
  13. package/cjs/component/axis/cartesian/axis.js +8 -6
  14. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  15. package/cjs/component/axis/cartesian/time-axis.js +3 -3
  16. package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
  17. package/cjs/component/axis/mixin/band-axis-mixin.d.ts +1 -0
  18. package/cjs/component/axis/mixin/band-axis-mixin.js +24 -12
  19. package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
  20. package/cjs/component/axis/polar/axis.js +2 -1
  21. package/cjs/component/axis/polar/axis.js.map +1 -1
  22. package/cjs/component/data-zoom/data-filter-base-component.d.ts +1 -0
  23. package/cjs/component/data-zoom/data-filter-base-component.js +2 -2
  24. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  25. package/cjs/component/data-zoom/data-zoom/data-zoom.js +15 -13
  26. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  27. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +15 -13
  28. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  29. package/cjs/component/data-zoom/util.d.ts +1 -1
  30. package/cjs/component/data-zoom/util.js.map +1 -1
  31. package/cjs/component/label/label.d.ts +2 -2
  32. package/cjs/component/label/label.js.map +1 -1
  33. package/cjs/component/label/total-label.js.map +1 -1
  34. package/cjs/component/label/util.js +12 -16
  35. package/cjs/component/label/util.js.map +1 -1
  36. package/cjs/component/legend/util.d.ts +7 -1
  37. package/cjs/component/marker/mark-area/mark-area.js +15 -10
  38. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  39. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  40. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  41. package/cjs/component/player/utils/transform.js +2 -2
  42. package/cjs/component/player/utils/transform.js.map +1 -1
  43. package/cjs/component/title/title.js.map +1 -1
  44. package/cjs/core/index.d.ts +1 -1
  45. package/cjs/core/index.js +1 -1
  46. package/cjs/core/index.js.map +1 -1
  47. package/cjs/core/vchart.js +3 -2
  48. package/cjs/core/vchart.js.map +1 -1
  49. package/cjs/data/transforms/pie.js +4 -4
  50. package/cjs/data/transforms/pie.js.map +1 -1
  51. package/cjs/mark/group.d.ts +1 -1
  52. package/cjs/mark/group.js.map +1 -1
  53. package/cjs/plugin/components/tooltip-handler/base.js +4 -3
  54. package/cjs/plugin/components/tooltip-handler/base.js.map +1 -1
  55. package/cjs/plugin/components/tooltip-handler/dom/model/content-column-model.js +27 -22
  56. package/cjs/plugin/components/tooltip-handler/dom/model/content-column-model.js.map +1 -1
  57. package/cjs/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -1
  58. package/cjs/plugin/components/tooltip-handler/dom/model/content-model.js.map +1 -1
  59. package/cjs/plugin/components/tooltip-handler/dom/model/shape-model.js +3 -3
  60. package/cjs/plugin/components/tooltip-handler/dom/model/shape-model.js.map +1 -1
  61. package/cjs/plugin/components/tooltip-handler/dom/model/style-constants.js +2 -1
  62. package/cjs/plugin/components/tooltip-handler/dom/model/style-constants.js.map +1 -1
  63. package/cjs/plugin/components/tooltip-handler/dom/utils/style.js +4 -1
  64. package/cjs/plugin/components/tooltip-handler/dom/utils/style.js.map +1 -1
  65. package/cjs/series/area/area.js +9 -9
  66. package/cjs/series/area/area.js.map +1 -1
  67. package/cjs/series/bar/bar.js +23 -23
  68. package/cjs/series/bar/bar.js.map +1 -1
  69. package/cjs/series/base/base-series-transformer.js +3 -2
  70. package/cjs/series/base/base-series-transformer.js.map +1 -1
  71. package/cjs/series/base/base-series.d.ts +2 -1
  72. package/cjs/series/base/base-series.js.map +1 -1
  73. package/cjs/series/box-plot/box-plot.js +19 -19
  74. package/cjs/series/box-plot/box-plot.js.map +1 -1
  75. package/cjs/series/cartesian/cartesian.d.ts +1 -0
  76. package/cjs/series/cartesian/cartesian.js +18 -13
  77. package/cjs/series/cartesian/cartesian.js.map +1 -1
  78. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  79. package/cjs/series/correlation/correlation.js.map +1 -1
  80. package/cjs/series/heatmap/heatmap.d.ts +1 -1
  81. package/cjs/series/heatmap/heatmap.js.map +1 -1
  82. package/cjs/series/line/constant.d.ts +1 -1
  83. package/cjs/series/line/constant.js.map +1 -1
  84. package/cjs/series/mixin/line-mixin.d.ts +1 -1
  85. package/cjs/series/mixin/line-mixin.js +3 -3
  86. package/cjs/series/mixin/line-mixin.js.map +1 -1
  87. package/cjs/series/pie/pie.js.map +1 -1
  88. package/cjs/series/polar/animation.js +3 -3
  89. package/cjs/series/polar/animation.js.map +1 -1
  90. package/cjs/series/radar/radar.js.map +1 -1
  91. package/cjs/series/range-area/constant.d.ts +1 -1
  92. package/cjs/series/range-area/constant.js.map +1 -1
  93. package/cjs/series/range-area/range-area.js +12 -12
  94. package/cjs/series/range-area/range-area.js.map +1 -1
  95. package/cjs/series/range-column/range-column-transformer.d.ts +1 -1
  96. package/cjs/series/range-column/range-column-transformer.js.map +1 -1
  97. package/cjs/series/range-column/range-column.d.ts +1 -1
  98. package/cjs/series/range-column/range-column.js.map +1 -1
  99. package/cjs/series/rose/rose.js.map +1 -1
  100. package/cjs/series/sankey/sankey.js.map +1 -1
  101. package/cjs/series/scatter/scatter.js.map +1 -1
  102. package/cjs/series/sunburst/sunburst.js.map +1 -1
  103. package/cjs/series/waterfall/waterfall.js +14 -14
  104. package/cjs/series/waterfall/waterfall.js.map +1 -1
  105. package/cjs/series/word-cloud/config.js +1 -1
  106. package/cjs/series/word-cloud/config.js.map +1 -1
  107. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
  108. package/cjs/theme/builtin/common/series/rangeColumn.d.ts +1 -1
  109. package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -1
  110. package/cjs/util/math.d.ts +1 -0
  111. package/cjs/util/math.js +18 -2
  112. package/cjs/util/math.js.map +1 -1
  113. package/cjs/util/scale.d.ts +2 -1
  114. package/cjs/util/scale.js.map +1 -1
  115. package/cjs/util/space.d.ts +1 -1
  116. package/cjs/util/space.js.map +1 -1
  117. package/cjs/util/spec/common.d.ts +1 -1
  118. package/cjs/util/spec/common.js.map +1 -1
  119. package/cjs/util/spec/merge-theme.d.ts +1 -1
  120. package/cjs/util/spec/merge-theme.js.map +1 -1
  121. package/esm/chart/base/base-chart.d.ts +1 -1
  122. package/esm/chart/base/base-chart.js.map +1 -1
  123. package/esm/chart/box-plot/box-plot-transformer.js +1 -1
  124. package/esm/chart/box-plot/box-plot-transformer.js.map +1 -1
  125. package/esm/chart/correlation/correlation-transformer.js.map +1 -1
  126. package/esm/component/axis/base-axis.d.ts +3 -2
  127. package/esm/component/axis/base-axis.js +1 -3
  128. package/esm/component/axis/base-axis.js.map +1 -1
  129. package/esm/component/axis/cartesian/axis.js +5 -3
  130. package/esm/component/axis/cartesian/axis.js.map +1 -1
  131. package/esm/component/axis/cartesian/time-axis.js +3 -3
  132. package/esm/component/axis/cartesian/time-axis.js.map +1 -1
  133. package/esm/component/axis/mixin/band-axis-mixin.d.ts +1 -0
  134. package/esm/component/axis/mixin/band-axis-mixin.js +23 -12
  135. package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
  136. package/esm/component/axis/polar/axis.js +2 -1
  137. package/esm/component/axis/polar/axis.js.map +1 -1
  138. package/esm/component/data-zoom/data-filter-base-component.d.ts +1 -0
  139. package/esm/component/data-zoom/data-filter-base-component.js +2 -2
  140. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  141. package/esm/component/data-zoom/data-zoom/data-zoom.js +15 -13
  142. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  143. package/esm/component/data-zoom/scroll-bar/scroll-bar.js +15 -13
  144. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  145. package/esm/component/data-zoom/util.d.ts +1 -1
  146. package/esm/component/data-zoom/util.js.map +1 -1
  147. package/esm/component/label/label.d.ts +2 -2
  148. package/esm/component/label/label.js.map +1 -1
  149. package/esm/component/label/total-label.js.map +1 -1
  150. package/esm/component/label/util.js +10 -19
  151. package/esm/component/label/util.js.map +1 -1
  152. package/esm/component/legend/util.d.ts +7 -1
  153. package/esm/component/marker/mark-area/mark-area.js +15 -9
  154. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  155. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  156. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  157. package/esm/component/player/utils/transform.js +2 -2
  158. package/esm/component/player/utils/transform.js.map +1 -1
  159. package/esm/component/title/title.js.map +1 -1
  160. package/esm/core/index.d.ts +1 -1
  161. package/esm/core/index.js +1 -1
  162. package/esm/core/index.js.map +1 -1
  163. package/esm/core/vchart.js +3 -2
  164. package/esm/core/vchart.js.map +1 -1
  165. package/esm/data/transforms/pie.js +5 -5
  166. package/esm/data/transforms/pie.js.map +1 -1
  167. package/esm/mark/group.d.ts +1 -1
  168. package/esm/mark/group.js.map +1 -1
  169. package/esm/plugin/components/tooltip-handler/base.js +4 -3
  170. package/esm/plugin/components/tooltip-handler/base.js.map +1 -1
  171. package/esm/plugin/components/tooltip-handler/dom/model/content-column-model.js +25 -20
  172. package/esm/plugin/components/tooltip-handler/dom/model/content-column-model.js.map +1 -1
  173. package/esm/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -1
  174. package/esm/plugin/components/tooltip-handler/dom/model/content-model.js.map +1 -1
  175. package/esm/plugin/components/tooltip-handler/dom/model/shape-model.js +3 -3
  176. package/esm/plugin/components/tooltip-handler/dom/model/shape-model.js.map +1 -1
  177. package/esm/plugin/components/tooltip-handler/dom/model/style-constants.js +2 -1
  178. package/esm/plugin/components/tooltip-handler/dom/model/style-constants.js.map +1 -1
  179. package/esm/plugin/components/tooltip-handler/dom/utils/style.js +4 -1
  180. package/esm/plugin/components/tooltip-handler/dom/utils/style.js.map +1 -1
  181. package/esm/series/area/area.js +9 -9
  182. package/esm/series/area/area.js.map +1 -1
  183. package/esm/series/bar/bar.js +22 -22
  184. package/esm/series/bar/bar.js.map +1 -1
  185. package/esm/series/base/base-series-transformer.js +2 -2
  186. package/esm/series/base/base-series-transformer.js.map +1 -1
  187. package/esm/series/base/base-series.d.ts +2 -1
  188. package/esm/series/base/base-series.js.map +1 -1
  189. package/esm/series/box-plot/box-plot.js +19 -19
  190. package/esm/series/box-plot/box-plot.js.map +1 -1
  191. package/esm/series/cartesian/cartesian.d.ts +1 -0
  192. package/esm/series/cartesian/cartesian.js +17 -12
  193. package/esm/series/cartesian/cartesian.js.map +1 -1
  194. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  195. package/esm/series/correlation/correlation.js.map +1 -1
  196. package/esm/series/heatmap/heatmap.d.ts +1 -1
  197. package/esm/series/heatmap/heatmap.js.map +1 -1
  198. package/esm/series/line/constant.d.ts +1 -1
  199. package/esm/series/line/constant.js.map +1 -1
  200. package/esm/series/mixin/line-mixin.d.ts +1 -1
  201. package/esm/series/mixin/line-mixin.js +3 -3
  202. package/esm/series/mixin/line-mixin.js.map +1 -1
  203. package/esm/series/pie/pie.js.map +1 -1
  204. package/esm/series/polar/animation.js +4 -2
  205. package/esm/series/polar/animation.js.map +1 -1
  206. package/esm/series/radar/radar.js.map +1 -1
  207. package/esm/series/range-area/constant.d.ts +1 -1
  208. package/esm/series/range-area/constant.js.map +1 -1
  209. package/esm/series/range-area/range-area.js +12 -12
  210. package/esm/series/range-area/range-area.js.map +1 -1
  211. package/esm/series/range-column/range-column-transformer.d.ts +1 -1
  212. package/esm/series/range-column/range-column-transformer.js.map +1 -1
  213. package/esm/series/range-column/range-column.d.ts +1 -1
  214. package/esm/series/range-column/range-column.js.map +1 -1
  215. package/esm/series/rose/rose.js.map +1 -1
  216. package/esm/series/sankey/sankey.js.map +1 -1
  217. package/esm/series/scatter/scatter.js.map +1 -1
  218. package/esm/series/sunburst/sunburst.js.map +1 -1
  219. package/esm/series/waterfall/waterfall.js +13 -13
  220. package/esm/series/waterfall/waterfall.js.map +1 -1
  221. package/esm/series/word-cloud/config.js +1 -1
  222. package/esm/series/word-cloud/config.js.map +1 -1
  223. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
  224. package/esm/theme/builtin/common/series/rangeColumn.d.ts +1 -1
  225. package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -1
  226. package/esm/util/math.d.ts +1 -0
  227. package/esm/util/math.js +16 -0
  228. package/esm/util/math.js.map +1 -1
  229. package/esm/util/scale.d.ts +2 -1
  230. package/esm/util/scale.js.map +1 -1
  231. package/esm/util/space.d.ts +1 -1
  232. package/esm/util/space.js.map +1 -1
  233. package/esm/util/spec/common.d.ts +1 -1
  234. package/esm/util/spec/common.js.map +1 -1
  235. package/esm/util/spec/merge-theme.d.ts +1 -1
  236. package/esm/util/spec/merge-theme.js.map +1 -1
  237. package/package.json +12 -12
package/build/index.js CHANGED
@@ -484,17 +484,17 @@
484
484
  const isDate = value => isType$1(value, "Date");
485
485
  var isDate$1 = isDate;
486
486
 
487
- const isNumber$1 = function (value) {
487
+ const isNumber = function (value) {
488
488
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
489
489
  const type = typeof value;
490
490
  return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
491
491
  };
492
- var isNumber$2 = isNumber$1;
492
+ var isNumber$1 = isNumber;
493
493
 
494
494
  const isNumeric = value => "string" == typeof value && !isNaN(Number(value)) && !isNaN(parseFloat(value));
495
495
  var isNumeric$1 = isNumeric;
496
496
 
497
- const isValidNumber = value => isNumber$2(value) && Number.isFinite(value);
497
+ const isValidNumber = value => isNumber$1(value) && Number.isFinite(value);
498
498
  var isValidNumber$1 = isValidNumber;
499
499
 
500
500
  const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
@@ -540,7 +540,7 @@
540
540
  if (!isValid$1(value) || "object" != typeof value) return value;
541
541
  const isArr = isArray$1(value),
542
542
  length = value.length;
543
- result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$1(value) || isNumber$2(value) || isString$1(value) ? value : isDate$1(value) ? new Date(+value) : void 0;
543
+ result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$1(value) || isNumber$1(value) || isString$1(value) ? value : isDate$1(value) ? new Date(+value) : void 0;
544
544
  const props = isArr ? void 0 : Object.keys(Object(value));
545
545
  let index = -1;
546
546
  if (result) for (; ++index < (props || value).length;) {
@@ -1007,10 +1007,10 @@
1007
1007
  return this.x = x, this.y = y, this;
1008
1008
  }
1009
1009
  add(point) {
1010
- return isNumber$2(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1010
+ return isNumber$1(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1011
1011
  }
1012
1012
  sub(point) {
1013
- return isNumber$2(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1013
+ return isNumber$1(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1014
1014
  }
1015
1015
  multi(point) {
1016
1016
  throw new Error("暂不支持");
@@ -1600,10 +1600,10 @@
1600
1600
  return ((value = Math.max(0, Math.min(255, Math.round(value) || 0))) < 16 ? "0" : "") + value.toString(16);
1601
1601
  }
1602
1602
  function rgb(value) {
1603
- return isNumber$2(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$1(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
1603
+ return isNumber$1(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$1(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
1604
1604
  }
1605
1605
  function rgba(value) {
1606
- return isNumber$2(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$1(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
1606
+ return isNumber$1(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$1(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
1607
1607
  }
1608
1608
  function SRGBToLinear(c) {
1609
1609
  return c < .04045 ? .0773993808 * c : Math.pow(.9478672986 * c + .0521327014, 2.4);
@@ -2248,7 +2248,7 @@
2248
2248
  }(LoggerLevel || (LoggerLevel = {}));
2249
2249
  class Logger {
2250
2250
  static getInstance(level, method) {
2251
- return Logger._instance && isNumber$2(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
2251
+ return Logger._instance && isNumber$1(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
2252
2252
  }
2253
2253
  static setInstance(logger) {
2254
2254
  return Logger._instance = logger;
@@ -8336,6 +8336,9 @@
8336
8336
  clear() {
8337
8337
  this.transformCbList = null, this.commandList.length = 0, this.curves.length = 0;
8338
8338
  }
8339
+ beginPath() {
8340
+ this.clear();
8341
+ }
8339
8342
  toString() {
8340
8343
  if (!this.toStringCbList) {
8341
8344
  const list = [];
@@ -8345,7 +8348,7 @@
8345
8348
  let path = "";
8346
8349
  for (let i = 0; i < bezierPathList.length; i += 6) path += `C${bezierPathList[i]} ${bezierPathList[i + 1]} ${bezierPathList[i + 2]} ${bezierPathList[i + 3]} ${bezierPathList[i + 4]} ${bezierPathList[i + 5]}`;
8347
8350
  return path;
8348
- }, list[enumCommandMap.Z] = cmd => "Z", this.toStringCbList = list;
8351
+ }, list[enumCommandMap.R] = cmd => `M${cmd[1]} ${cmd[2]} h${cmd[3]} v${cmd[4]} H${cmd[1]}Z`, list[enumCommandMap.Z] = cmd => "Z", this.toStringCbList = list;
8349
8352
  }
8350
8353
  const list = this.toStringCbList;
8351
8354
  let path = "";
@@ -8684,6 +8687,7 @@
8684
8687
  zIndex: 0,
8685
8688
  layout: null,
8686
8689
  boundsPadding: 0,
8690
+ renderStyle: "default",
8687
8691
  pickMode: "accurate",
8688
8692
  customPickShape: null,
8689
8693
  boundsMode: "accurate",
@@ -9236,9 +9240,6 @@
9236
9240
  function isNotAroundZero(val) {
9237
9241
  return val > EPSILON || val < -EPSILON;
9238
9242
  }
9239
- function isNumber(data) {
9240
- return "number" == typeof data && Number.isFinite(data);
9241
- }
9242
9243
  const _v0 = [0, 0],
9243
9244
  _v1 = [0, 0],
9244
9245
  _v2 = [0, 0];
@@ -10013,7 +10014,7 @@
10013
10014
  }
10014
10015
  const globalTheme = new Theme();
10015
10016
  function getTheme$1(graphic, theme) {
10016
- return graphic.glyphHost ? getTheme$1(graphic.glyphHost) : theme ? (graphic.isContainer, theme) : getThemeFromGroup(graphic) || globalTheme.getTheme();
10017
+ return graphic.glyphHost ? getTheme$1(graphic.glyphHost) : theme ? (graphic.isContainer, theme) : getThemeFromGroup(graphic) || graphic.attachedThemeGraphic && getTheme$1(graphic.attachedThemeGraphic) || globalTheme.getTheme();
10017
10018
  }
10018
10019
  function getThemeFromGroup(graphic) {
10019
10020
  let g;
@@ -10178,10 +10179,13 @@
10178
10179
  delete() {
10179
10180
  this.parent && this.parent.removeChild(this);
10180
10181
  }
10181
- removeAllChild() {
10182
+ removeAllChild(deep) {
10182
10183
  if (!this._idMap) return;
10183
10184
  let child = this._firstChild;
10184
- for (; child;) child.parent = null, child._prev = null, child._next = null, child = child._next;
10185
+ for (; child;) {
10186
+ const next = child._next;
10187
+ child.parent = null, child._prev = null, child._next = null, child = child._next, child = next;
10188
+ }
10185
10189
  this._firstChild = null, this._lastChild = null, this._idMap.clear(), this._structEdit = !0, this.setCount(1 - this._count);
10186
10190
  }
10187
10191
  replaceChild(newChild, oldChild) {
@@ -11782,7 +11786,7 @@
11782
11786
  }
11783
11787
  onBind() {
11784
11788
  var _a, _b, _c, _d, _e, _f, _g, _h;
11785
- this.fromNumber = isNumber$2(null === (_a = this.from) || void 0 === _a ? void 0 : _a.text) ? null === (_b = this.from) || void 0 === _b ? void 0 : _b.text : Number.parseFloat(null === (_c = this.from) || void 0 === _c ? void 0 : _c.text), this.toNumber = isNumber$2(null === (_d = this.to) || void 0 === _d ? void 0 : _d.text) ? null === (_e = this.to) || void 0 === _e ? void 0 : _e.text : Number.parseFloat(null === (_f = this.to) || void 0 === _f ? void 0 : _f.text), Number.isFinite(this.toNumber) || (this.fromNumber = 0), Number.isFinite(this.toNumber) || (this.valid = !1), !1 !== this.valid && (this.decimalLength = null !== (_h = null === (_g = this.params) || void 0 === _g ? void 0 : _g.fixed) && void 0 !== _h ? _h : Math.max(getDecimalPlaces(this.fromNumber), getDecimalPlaces(this.toNumber)));
11789
+ this.fromNumber = isNumber$1(null === (_a = this.from) || void 0 === _a ? void 0 : _a.text) ? null === (_b = this.from) || void 0 === _b ? void 0 : _b.text : Number.parseFloat(null === (_c = this.from) || void 0 === _c ? void 0 : _c.text), this.toNumber = isNumber$1(null === (_d = this.to) || void 0 === _d ? void 0 : _d.text) ? null === (_e = this.to) || void 0 === _e ? void 0 : _e.text : Number.parseFloat(null === (_f = this.to) || void 0 === _f ? void 0 : _f.text), Number.isFinite(this.toNumber) || (this.fromNumber = 0), Number.isFinite(this.toNumber) || (this.valid = !1), !1 !== this.valid && (this.decimalLength = null !== (_h = null === (_g = this.params) || void 0 === _g ? void 0 : _g.fixed) && void 0 !== _h ? _h : Math.max(getDecimalPlaces(this.fromNumber), getDecimalPlaces(this.toNumber)));
11786
11790
  }
11787
11791
  onEnd() {}
11788
11792
  onUpdate(end, ratio, out) {
@@ -12468,7 +12472,7 @@
12468
12472
  return res;
12469
12473
  };
12470
12474
  const samplingPoints = (points, count) => {
12471
- const validatePoints = points.filter(point => !1 !== point.defined && isNumber$2(point.x) && isNumber$2(point.y));
12475
+ const validatePoints = points.filter(point => !1 !== point.defined && isNumber$1(point.x) && isNumber$1(point.y));
12472
12476
  if (0 === validatePoints.length) return [];
12473
12477
  if (1 === validatePoints.length) return new Array(count).fill(0).map(i => validatePoints[0]);
12474
12478
  const res = [];
@@ -12504,7 +12508,7 @@
12504
12508
  var _a;
12505
12509
  return res.concat(null !== (_a = seg.points) && void 0 !== _a ? _a : []);
12506
12510
  }, []));
12507
- const validatePoints = points.filter(point => !1 !== point.defined && isNumber$2(point.x) && isNumber$2(point.y));
12511
+ const validatePoints = points.filter(point => !1 !== point.defined && isNumber$1(point.x) && isNumber$1(point.y));
12508
12512
  if (!validatePoints.length) return [];
12509
12513
  const allPoints = [];
12510
12514
  validatePoints.forEach(point => {
@@ -13087,18 +13091,10 @@
13087
13091
  class ResourceLoader {
13088
13092
  static GetImage(url, mark) {
13089
13093
  var _a;
13090
- let data = ResourceLoader.cache.get(url);
13094
+ const data = ResourceLoader.cache.get(url);
13091
13095
  data ? "fail" === data.loadState ? application.global.getRequestAnimationFrame()(() => {
13092
13096
  mark.imageLoadFail(url);
13093
- }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : (data = {
13094
- type: "image",
13095
- loadState: "init"
13096
- }, ResourceLoader.cache.set(url, data), data.dataPromise = application.global.loadImage(url), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(res => {
13097
- var _a;
13098
- data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map((mark, index) => {
13099
- (null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(url, res.data)) : (data.loadState = "fail", mark.imageLoadFail(url));
13100
- });
13101
- })) : (data.loadState = "fail", mark.imageLoadFail(url)));
13097
+ }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : ResourceLoader.loadImage(url, mark);
13102
13098
  }
13103
13099
  static GetSvg(svgStr, mark) {
13104
13100
  var _a;
@@ -13124,8 +13120,60 @@
13124
13120
  loadState: "init"
13125
13121
  }, ResourceLoader.cache.set(url, data), "arrayBuffer" === type ? data.dataPromise = application.global.loadArrayBuffer(url) : "blob" === type ? data.dataPromise = application.global.loadBlob(url) : "json" === type && (data.dataPromise = application.global.loadJson(url)), data.dataPromise.then(data => data.data));
13126
13122
  }
13123
+ static loading() {
13124
+ setTimeout(() => {
13125
+ if (!ResourceLoader.isLoading && ResourceLoader.toLoadAueue.length) {
13126
+ ResourceLoader.isLoading = !0;
13127
+ const tasks = ResourceLoader.toLoadAueue.splice(0, 10),
13128
+ promises = [];
13129
+ tasks.forEach(task => {
13130
+ const {
13131
+ url: url,
13132
+ marks: marks
13133
+ } = task,
13134
+ data = {
13135
+ type: "image",
13136
+ loadState: "init"
13137
+ };
13138
+ if (ResourceLoader.cache.set(url, data), data.dataPromise = application.global.loadImage(url), data.dataPromise) {
13139
+ data.waitingMark = marks;
13140
+ const end = data.dataPromise.then(res => {
13141
+ var _a;
13142
+ data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map((mark, index) => {
13143
+ (null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(url, res.data)) : (data.loadState = "fail", mark.imageLoadFail(url));
13144
+ });
13145
+ });
13146
+ promises.push(end);
13147
+ } else data.loadState = "fail", marks.forEach(mark => mark.imageLoadFail(url));
13148
+ }), Promise.all(promises).then(() => {
13149
+ ResourceLoader.isLoading = !1, ResourceLoader.loading();
13150
+ }).catch(error => {
13151
+ console.error(error), ResourceLoader.isLoading = !1, ResourceLoader.loading();
13152
+ });
13153
+ }
13154
+ }, 0);
13155
+ }
13156
+ static loadImage(url, mark) {
13157
+ const index = getIndex(url, ResourceLoader.toLoadAueue);
13158
+ if (-1 !== index) return ResourceLoader.toLoadAueue[index].marks.push(mark), void ResourceLoader.loading();
13159
+ ResourceLoader.toLoadAueue.push({
13160
+ url: url,
13161
+ marks: [mark]
13162
+ }), ResourceLoader.loading();
13163
+ }
13164
+ static improveImageLoading(url) {
13165
+ const index = getIndex(url, ResourceLoader.toLoadAueue);
13166
+ if (-1 !== index) {
13167
+ const elememt = ResourceLoader.toLoadAueue.splice(index, 1);
13168
+ ResourceLoader.toLoadAueue.unshift(elememt[0]);
13169
+ }
13170
+ }
13127
13171
  }
13128
- ResourceLoader.cache = new Map();
13172
+ function getIndex(url, arr) {
13173
+ for (let i = 0; i < arr.length; i++) if (arr[i].url === url) return i;
13174
+ return -1;
13175
+ }
13176
+ ResourceLoader.cache = new Map(), ResourceLoader.isLoading = !1, ResourceLoader.toLoadAueue = [];
13129
13177
 
13130
13178
  const tempMatrix = new Matrix(),
13131
13179
  tempBounds$1 = new AABBBounds();
@@ -13221,7 +13269,7 @@
13221
13269
  if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
13222
13270
  application.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
13223
13271
  const bounds = this.doUpdateAABBBounds(full);
13224
- return this.addUpdateLayoutTag(), application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), bounds;
13272
+ return application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), bounds;
13225
13273
  }
13226
13274
  combindShadowAABBBounds(bounds) {
13227
13275
  if (this.shadowRoot) {
@@ -13230,7 +13278,8 @@
13230
13278
  }
13231
13279
  }
13232
13280
  tryUpdateGlobalAABBBounds() {
13233
- return this._globalAABBBounds ? this._globalAABBBounds.setValue(this._AABBBounds.x1, this._AABBBounds.y1, this._AABBBounds.x2, this._AABBBounds.y2) : this._globalAABBBounds = this.AABBBounds.clone(), this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
13281
+ const b = this.AABBBounds;
13282
+ return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
13234
13283
  }
13235
13284
  tryUpdateGlobalTransMatrix() {
13236
13285
  if (this._globalTransMatrix) {
@@ -13741,7 +13790,7 @@
13741
13790
  data: "init",
13742
13791
  state: null
13743
13792
  };
13744
- this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
13793
+ this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$2(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
13745
13794
  }
13746
13795
  imageLoadSuccess(url, image, cb) {
13747
13796
  if (!this.resources) return;
@@ -14211,8 +14260,9 @@
14211
14260
  return child.stage = null, application.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
14212
14261
  }
14213
14262
  removeAllChild() {
14263
+ let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
14214
14264
  this.forEachChildren(child => {
14215
- application.graphicService.onRemove(child);
14265
+ application.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
14216
14266
  }), super.removeAllChild(), this.addUpdateBoundTag();
14217
14267
  }
14218
14268
  setStage(stage, layer) {
@@ -15538,7 +15588,7 @@
15538
15588
 
15539
15589
  class BaseSymbol {
15540
15590
  bounds(size, bounds) {
15541
- if (isNumber$2(size)) {
15591
+ if (isNumber$1(size)) {
15542
15592
  const halfS = size / 2;
15543
15593
  bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
15544
15594
  } else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
@@ -15969,10 +16019,10 @@
15969
16019
  super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
15970
16020
  }
15971
16021
  draw(ctx, size, x, y) {
15972
- return isNumber$2(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
16022
+ return isNumber$1(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
15973
16023
  }
15974
16024
  drawOffset(ctx, size, x, y, offset) {
15975
- return isNumber$2(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
16025
+ return isNumber$1(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
15976
16026
  }
15977
16027
  }
15978
16028
  var rect = new RectSymbol();
@@ -16450,16 +16500,7 @@
16450
16500
  deltaY = -height;
16451
16501
  }
16452
16502
  let deltaX = 0;
16453
- switch (this.globalAlign) {
16454
- case "left":
16455
- deltaX = 0;
16456
- break;
16457
- case "center":
16458
- deltaX = -width / 2;
16459
- break;
16460
- case "right":
16461
- deltaX = -width;
16462
- }
16503
+ "right" === this.globalAlign || "end" === this.globalAlign ? deltaX = -width : "center" === this.globalAlign && (deltaX = -width / 2);
16463
16504
  let frameHeight = this[this.directionKey.height];
16464
16505
  this.singleLine && (frameHeight = this.lines[0].height + 1);
16465
16506
  let lastLineTag = !1;
@@ -16608,9 +16649,9 @@
16608
16649
  let direction = this.direction;
16609
16650
  if (this.verticalEllipsis) text = "...", direction = "vertical", baseline -= this.ellipsisWidth / 2;else {
16610
16651
  if ("hide" === this.ellipsis) return;
16611
- if ("add" === this.ellipsis) text += "...", "right" === textAlign && (left -= this.ellipsisWidth);else if ("replace" === this.ellipsis) {
16652
+ if ("add" === this.ellipsis) text += "...", "right" !== textAlign && "end" !== textAlign || (left -= this.ellipsisWidth);else if ("replace" === this.ellipsis) {
16612
16653
  const index = getStrByWithCanvas(text, ("vertical" === direction ? this.height : this.width) - this.ellipsisWidth + this.ellipsisOtherParagraphWidth, this.character, text.length - 1);
16613
- if (text = text.slice(0, index), text += "...", "right" === textAlign) {
16654
+ if (text = text.slice(0, index), text += "...", "right" === textAlign || "end" === textAlign) {
16614
16655
  const {
16615
16656
  width: width
16616
16657
  } = measureTextCanvas(this.text.slice(index), this.character);
@@ -16801,17 +16842,7 @@
16801
16842
  maxHeight = this.height;
16802
16843
  let x = this.left,
16803
16844
  spacing = 0;
16804
- if (this.actualWidth < width && !isWidthMax) switch (this.textAlign) {
16805
- case "right":
16806
- x = width - this.actualWidth;
16807
- break;
16808
- case "center":
16809
- x = (width - this.actualWidth) / 2;
16810
- break;
16811
- case "justify":
16812
- this.paragraphs.length < 2 ? x = (width - this.actualWidth) / 2 : spacing = (width - this.actualWidth) / (this.paragraphs.length - 1);
16813
- }
16814
- this.paragraphs.map(function (paragraph) {
16845
+ this.actualWidth < width && !isWidthMax && ("right" === this.textAlign || "end" === this.textAlign ? x = width - this.actualWidth : "center" === this.textAlign ? x = (width - this.actualWidth) / 2 : "justify" === this.textAlign && (this.paragraphs.length < 2 ? x = (width - this.actualWidth) / 2 : spacing = (width - this.actualWidth) / (this.paragraphs.length - 1))), this.paragraphs.map(function (paragraph) {
16815
16846
  paragraph instanceof RichTextIcon ? (paragraph["_" + directionKey.x] = x, x += paragraph[directionKey.width] + spacing, paragraph["_" + directionKey.y] = "top" === paragraph.attribute.textBaseline ? 0 : "bottom" === paragraph.attribute.textBaseline ? maxHeight - paragraph.height : (maxHeight - paragraph.height) / 2) : (paragraph[directionKey.left] = x, x += paragraph[directionKey.width] + spacing);
16816
16847
  });
16817
16848
  }
@@ -17035,10 +17066,10 @@
17035
17066
  }
17036
17067
  } else {
17037
17068
  const richTextConfig = textConfig[i];
17038
- if (isNumber$2(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text.includes("\n")) {
17069
+ if (isNumber$1(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
17039
17070
  const textParts = richTextConfig.text.split("\n");
17040
17071
  for (let j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, richTextConfig));
17041
- } else paragraphs.push(new Paragraph(richTextConfig.text, !1, richTextConfig));
17072
+ } else richTextConfig.text && paragraphs.push(new Paragraph(richTextConfig.text, !1, richTextConfig));
17042
17073
  }
17043
17074
  const maxWidthFinite = "number" == typeof maxWidth && Number.isFinite(maxWidth) && maxWidth > 0,
17044
17075
  maxHeightFinite = "number" == typeof maxHeight && Number.isFinite(maxHeight) && maxHeight > 0,
@@ -17283,7 +17314,7 @@
17283
17314
  } = this.attribute;
17284
17315
  if (0 === cornerRadius || "0%" === cornerRadius) return 0;
17285
17316
  const deltaRadius = Math.abs(outerRadius - innerRadius);
17286
- return Math.min(isNumber$2(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
17317
+ return Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
17287
17318
  }
17288
17319
  getParsedAngle() {
17289
17320
  const arcTheme = getTheme$1(this).arc;
@@ -19127,7 +19158,7 @@
19127
19158
  const halfPi = pi$1 / 2;
19128
19159
  function createRectPath(path, x, y, width, height, rectCornerRadius) {
19129
19160
  let cornerRadius;
19130
- if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$2(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs$1(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
19161
+ if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs$1(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
19131
19162
  const cornerRadiusArr = rectCornerRadius;
19132
19163
  let cr0, cr1;
19133
19164
  switch (cornerRadiusArr.length) {
@@ -19235,7 +19266,7 @@
19235
19266
  y = bounds.y1,
19236
19267
  width = bounds.width(),
19237
19268
  height = bounds.height();
19238
- return isNumber$2(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
19269
+ return isNumber$1(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
19239
19270
  x: x,
19240
19271
  y: y,
19241
19272
  width: width,
@@ -20092,11 +20123,12 @@
20092
20123
  }
20093
20124
  drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
20094
20125
  var _a, _b, _c, _d, _e;
20126
+ const {
20127
+ points: points
20128
+ } = area.attribute;
20129
+ if (points.length < 2) return;
20095
20130
  context.beginPath();
20096
20131
  const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
20097
- {
20098
- points: points
20099
- } = area.attribute,
20100
20132
  startP = points[0];
20101
20133
  context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
20102
20134
  for (let i = 1; i < points.length; i++) {
@@ -20253,6 +20285,7 @@
20253
20285
  }
20254
20286
  _drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, connect, fillCb, strokeCb) {
20255
20287
  var _a, _b, _c, _d;
20288
+ if (!(cache && cache.top && cache.bottom && cache.top.curves && cache.top.curves.length && cache.bottom.curves && cache.bottom.curves.length)) return;
20256
20289
  let {
20257
20290
  connectedType: connectedType,
20258
20291
  connectedX: connectedX,
@@ -20261,7 +20294,6 @@
20261
20294
  } = attribute;
20262
20295
  const da = [];
20263
20296
  if (connect && (isArray$1(defaultAttribute) ? (connectedType = null !== (_a = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _a ? _a : defaultAttribute[1].connectedType, connectedX = null !== (_b = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _b ? _b : defaultAttribute[1].connectedX, connectedY = null !== (_c = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _c ? _c : defaultAttribute[1].connectedY, connectedStyle = null !== (_d = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _d ? _d : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), isArray$1(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
20264
- if (!cache) return;
20265
20297
  context.beginPath();
20266
20298
  const {
20267
20299
  points: points,
@@ -20930,7 +20962,9 @@
20930
20962
  image: url
20931
20963
  } = image.attribute;
20932
20964
  if (!url || !image.resources) return;
20933
- if ("success" !== image.resources.get(url).state) return;
20965
+ const res = image.resources.get(url);
20966
+ if ("loading" === res.state && isString$1(url)) return void ResourceLoader.improveImageLoading(url);
20967
+ if ("success" !== res.state) return;
20934
20968
  const {
20935
20969
  context: context
20936
20970
  } = renderService.drawParams;
@@ -20970,6 +21004,197 @@
20970
21004
  },
20971
21005
  __metadata$V = undefined && undefined.__metadata || function (k, v) {
20972
21006
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21007
+ };
21008
+ const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
21009
+ const tempDirtyBounds = new AABBBounds();
21010
+ class ShadowRootDrawItemInterceptorContribution {
21011
+ constructor() {
21012
+ this.order = 1;
21013
+ }
21014
+ afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21015
+ return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21016
+ }
21017
+ beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21018
+ return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21019
+ }
21020
+ drawItem(graphic, renderService, drawContext, drawContribution, params) {
21021
+ if (!graphic.shadowRoot) return !1;
21022
+ const {
21023
+ context: context
21024
+ } = drawContext;
21025
+ if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
21026
+ tempDirtyBounds.copy(drawContribution.dirtyBounds);
21027
+ const m = graphic.globalTransMatrix.getInverse();
21028
+ drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
21029
+ }
21030
+ return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
21031
+ }
21032
+ }
21033
+ class DebugDrawItemInterceptorContribution {
21034
+ constructor() {
21035
+ this.order = 1;
21036
+ }
21037
+ afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21038
+ return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21039
+ }
21040
+ drawItem(graphic, renderService, drawContext, drawContribution, params) {
21041
+ if (!graphic.attribute._debug_bounds) return !1;
21042
+ const {
21043
+ context: context
21044
+ } = drawContext;
21045
+ context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
21046
+ const b = graphic.AABBBounds;
21047
+ return !0 !== graphic.attribute._debug_bounds && graphic.attribute._debug_bounds(context, graphic), context.strokeRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore(), !0;
21048
+ }
21049
+ }
21050
+ let CommonDrawItemInterceptorContribution = class {
21051
+ constructor() {
21052
+ this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
21053
+ }
21054
+ afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21055
+ for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].afterDrawItem && this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
21056
+ return !1;
21057
+ }
21058
+ beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21059
+ if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
21060
+ for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].beforeDrawItem && this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
21061
+ return !1;
21062
+ }
21063
+ };
21064
+ CommonDrawItemInterceptorContribution = __decorate$1d([injectable(), __metadata$V("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
21065
+ class InteractiveDrawItemInterceptorContribution {
21066
+ constructor() {
21067
+ this.order = 1;
21068
+ }
21069
+ beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21070
+ return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
21071
+ }
21072
+ beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
21073
+ let interactiveGraphic = graphic.interactiveGraphic;
21074
+ if (graphic.attribute.globalZIndex) {
21075
+ interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
21076
+ globalZIndex: 0,
21077
+ zIndex: graphic.attribute.globalZIndex
21078
+ }, !1, {
21079
+ skipUpdateCallback: !0
21080
+ }), drawContext.stage.tryInitInteractiveLayer();
21081
+ const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
21082
+ if (interactiveLayer) {
21083
+ this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
21084
+ }
21085
+ return !0;
21086
+ }
21087
+ if (interactiveGraphic) {
21088
+ drawContext.stage.tryInitInteractiveLayer();
21089
+ const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
21090
+ if (interactiveLayer) {
21091
+ this.getShadowRoot(interactiveLayer).removeChild(interactiveGraphic);
21092
+ }
21093
+ graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
21094
+ }
21095
+ return !1;
21096
+ }
21097
+ beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
21098
+ const baseGraphic = graphic.baseGraphic;
21099
+ if (baseGraphic) {
21100
+ this.processing = !0;
21101
+ const {
21102
+ context: context
21103
+ } = drawContext;
21104
+ return context.highPerformanceSave(), context.setTransformFromMatrix(baseGraphic.parent.globalTransMatrix, !0), baseGraphic.isContainer ? drawContribution.renderGroup(baseGraphic, drawContext, baseGraphic.parent.globalTransMatrix) : drawContribution.renderItem(baseGraphic, drawContext), context.highPerformanceRestore(), this.processing = !1, !0;
21105
+ }
21106
+ return !1;
21107
+ }
21108
+ getShadowRoot(interactiveLayer) {
21109
+ var _a;
21110
+ let group = interactiveLayer.getElementById("_interactive_group");
21111
+ return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
21112
+ }
21113
+ }
21114
+ class Canvas3DDrawItemInterceptor {
21115
+ constructor() {
21116
+ this.order = 1;
21117
+ }
21118
+ beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21119
+ if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
21120
+ drawContext.in3dInterceptor = !0;
21121
+ const {
21122
+ context: context,
21123
+ stage: stage
21124
+ } = renderService.drawParams;
21125
+ context.canvas;
21126
+ context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
21127
+ const m = context.currentMatrix;
21128
+ m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
21129
+ const matrix = mat4Allocate.allocate();
21130
+ mat3Tomat4(matrix, m);
21131
+ const lastModelMatrix = context.modelMatrix;
21132
+ if (lastModelMatrix) {
21133
+ if (matrix) {
21134
+ const m = mat4Allocate.allocate();
21135
+ context.modelMatrix = multiplyMat4Mat4(m, lastModelMatrix, matrix);
21136
+ }
21137
+ } else context.modelMatrix = matrix;
21138
+ if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
21139
+ let isPie = !1,
21140
+ is3d = !1;
21141
+ if (graphic.forEachChildren(c => (isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie)), graphic.forEachChildren(c => (is3d = !!c.findFace, !is3d)), isPie) {
21142
+ const children = graphic.getChildren(),
21143
+ sortedChildren = [...children];
21144
+ sortedChildren.sort((a, b) => {
21145
+ var _a, _b, _c, _d;
21146
+ let angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
21147
+ angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
21148
+ for (; angle1 < 0;) angle1 += pi2;
21149
+ for (; angle2 < 0;) angle2 += pi2;
21150
+ return angle2 - angle1;
21151
+ }), sortedChildren.forEach(c => {
21152
+ c._next = null, c._prev = null;
21153
+ }), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(c => {
21154
+ graphic.appendChild(c);
21155
+ });
21156
+ const m = graphic.parent.globalTransMatrix;
21157
+ drawContext.hack_pieFace = "outside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "inside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "top", drawContribution.renderGroup(graphic, drawContext, m), graphic.removeAllChild(), children.forEach(c => {
21158
+ c._next = null, c._prev = null;
21159
+ }), children.forEach(c => {
21160
+ graphic.appendChild(c);
21161
+ });
21162
+ } else if (is3d) {
21163
+ const children = graphic.getChildren(),
21164
+ zChildren = children.map(g => ({
21165
+ ave_z: g.findFace().vertices.map(v => {
21166
+ var _a;
21167
+ return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
21168
+ }).reduce((a, b) => a + b, 0),
21169
+ g: g
21170
+ }));
21171
+ zChildren.sort((a, b) => b.ave_z - a.ave_z), graphic.removeAllChild(), zChildren.forEach(i => {
21172
+ i.g._next = null, i.g._prev = null;
21173
+ }), graphic.update(), zChildren.forEach(i => {
21174
+ graphic.add(i.g);
21175
+ }), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), children.forEach(g => {
21176
+ g._next = null, g._prev = null;
21177
+ }), graphic.update(), children.forEach(g => {
21178
+ graphic.add(g);
21179
+ });
21180
+ } else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
21181
+ } else drawContribution.renderItem(graphic, drawContext);
21182
+ return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
21183
+ }
21184
+ initCanvasCtx(context) {
21185
+ context.setTransformForCurrent();
21186
+ }
21187
+ }
21188
+
21189
+ var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21190
+ var d,
21191
+ c = arguments.length,
21192
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21193
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21194
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
21195
+ },
21196
+ __metadata$U = undefined && undefined.__metadata || function (k, v) {
21197
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
20973
21198
  },
20974
21199
  __param$z = undefined && undefined.__param || function (paramIndex, decorator) {
20975
21200
  return function (target, key) {
@@ -21008,7 +21233,7 @@
21008
21233
  this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params);
21009
21234
  }
21010
21235
  };
21011
- DefaultRenderService = __decorate$1d([injectable(), __param$z(0, inject(DrawContribution)), __metadata$V("design:paramtypes", [Object])], DefaultRenderService);
21236
+ DefaultRenderService = __decorate$1c([injectable(), __param$z(0, inject(DrawContribution)), __metadata$U("design:paramtypes", [Object])], DefaultRenderService);
21012
21237
 
21013
21238
  var renderModule$1 = new ContainerModule(bind => {
21014
21239
  bind(RenderService).to(DefaultRenderService).inSingletonScope();
@@ -21017,7 +21242,7 @@
21017
21242
  const PickerService = Symbol.for("PickerService");
21018
21243
  const GlobalPickerService = Symbol.for("GlobalPickerService");
21019
21244
 
21020
- var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21245
+ var __decorate$1b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21021
21246
  var d,
21022
21247
  c = arguments.length,
21023
21248
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21050,7 +21275,7 @@
21050
21275
  return context.highPerformanceRestore(), result;
21051
21276
  }
21052
21277
  };
21053
- ShadowRootPickItemInterceptorContribution = __decorate$1c([injectable()], ShadowRootPickItemInterceptorContribution);
21278
+ ShadowRootPickItemInterceptorContribution = __decorate$1b([injectable()], ShadowRootPickItemInterceptorContribution);
21054
21279
  let InteractivePickItemInterceptorContribution = class {
21055
21280
  constructor() {
21056
21281
  this.order = 1;
@@ -21069,7 +21294,7 @@
21069
21294
  return null;
21070
21295
  }
21071
21296
  };
21072
- InteractivePickItemInterceptorContribution = __decorate$1c([injectable()], InteractivePickItemInterceptorContribution);
21297
+ InteractivePickItemInterceptorContribution = __decorate$1b([injectable()], InteractivePickItemInterceptorContribution);
21073
21298
  let Canvas3DPickItemInterceptor = class {
21074
21299
  constructor() {
21075
21300
  this.order = 1;
@@ -21129,7 +21354,7 @@
21129
21354
  context.setTransformForCurrent();
21130
21355
  }
21131
21356
  };
21132
- Canvas3DPickItemInterceptor = __decorate$1c([injectable()], Canvas3DPickItemInterceptor);
21357
+ Canvas3DPickItemInterceptor = __decorate$1b([injectable()], Canvas3DPickItemInterceptor);
21133
21358
 
21134
21359
  var pickModule = new ContainerModule((bind, unbind, isBound) => {
21135
21360
  isBound(PickerService) || (bind(GlobalPickerService).toSelf(), bind(PickerService).toService(GlobalPickerService)), bind(Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(Canvas3DPickItemInterceptor), bind(ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(ShadowRootPickItemInterceptorContribution), bind(InteractivePickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(InteractivePickItemInterceptorContribution), bindContributionProvider(bind, PickItemInterceptor);
@@ -21142,14 +21367,14 @@
21142
21367
  const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
21143
21368
  const PluginService = Symbol.for("PluginService");
21144
21369
 
21145
- var __decorate$1b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21370
+ var __decorate$1a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21146
21371
  var d,
21147
21372
  c = arguments.length,
21148
21373
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21149
21374
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21150
21375
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21151
21376
  },
21152
- __metadata$U = undefined && undefined.__metadata || function (k, v) {
21377
+ __metadata$T = undefined && undefined.__metadata || function (k, v) {
21153
21378
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21154
21379
  },
21155
21380
  __param$y = undefined && undefined.__param || function (paramIndex, decorator) {
@@ -21192,7 +21417,7 @@
21192
21417
  }), this.onRegisterPlugin = [];
21193
21418
  }
21194
21419
  };
21195
- DefaultPluginService = __decorate$1b([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(AutoEnablePlugins)), __metadata$U("design:paramtypes", [Object])], DefaultPluginService);
21420
+ DefaultPluginService = __decorate$1a([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(AutoEnablePlugins)), __metadata$T("design:paramtypes", [Object])], DefaultPluginService);
21196
21421
 
21197
21422
  var pluginModule = new ContainerModule(bind => {
21198
21423
  bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
@@ -21206,14 +21431,14 @@
21206
21431
  bind(TextMeasureContribution).to(DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
21207
21432
  });
21208
21433
 
21209
- var __decorate$1a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21434
+ var __decorate$19 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21210
21435
  var d,
21211
21436
  c = arguments.length,
21212
21437
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21213
21438
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21214
21439
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21215
21440
  },
21216
- __metadata$T = undefined && undefined.__metadata || function (k, v) {
21441
+ __metadata$S = undefined && undefined.__metadata || function (k, v) {
21217
21442
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21218
21443
  };
21219
21444
  let CanvasLayerHandlerContribution = class {
@@ -21283,16 +21508,16 @@
21283
21508
  this.canvas.release();
21284
21509
  }
21285
21510
  };
21286
- CanvasLayerHandlerContribution = __decorate$1a([injectable(), __metadata$T("design:paramtypes", [])], CanvasLayerHandlerContribution);
21511
+ CanvasLayerHandlerContribution = __decorate$19([injectable(), __metadata$S("design:paramtypes", [])], CanvasLayerHandlerContribution);
21287
21512
 
21288
- var __decorate$19 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21513
+ var __decorate$18 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21289
21514
  var d,
21290
21515
  c = arguments.length,
21291
21516
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21292
21517
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21293
21518
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21294
21519
  },
21295
- __metadata$S = undefined && undefined.__metadata || function (k, v) {
21520
+ __metadata$R = undefined && undefined.__metadata || function (k, v) {
21296
21521
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21297
21522
  };
21298
21523
  let EmptyLayerHandlerContribution = class {
@@ -21327,16 +21552,16 @@
21327
21552
  }
21328
21553
  release() {}
21329
21554
  };
21330
- EmptyLayerHandlerContribution = __decorate$19([injectable(), __metadata$S("design:paramtypes", [])], EmptyLayerHandlerContribution);
21555
+ EmptyLayerHandlerContribution = __decorate$18([injectable(), __metadata$R("design:paramtypes", [])], EmptyLayerHandlerContribution);
21331
21556
 
21332
- var __decorate$18 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21557
+ var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21333
21558
  var d,
21334
21559
  c = arguments.length,
21335
21560
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21336
21561
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21337
21562
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21338
21563
  },
21339
- __metadata$R = undefined && undefined.__metadata || function (k, v) {
21564
+ __metadata$Q = undefined && undefined.__metadata || function (k, v) {
21340
21565
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21341
21566
  };
21342
21567
  let OffscreenLayerHandlerContribution = class {
@@ -21398,7 +21623,7 @@
21398
21623
  }
21399
21624
  merge(layerHandlers) {}
21400
21625
  };
21401
- OffscreenLayerHandlerContribution = __decorate$18([injectable(), __metadata$R("design:paramtypes", [])], OffscreenLayerHandlerContribution);
21626
+ OffscreenLayerHandlerContribution = __decorate$17([injectable(), __metadata$Q("design:paramtypes", [])], OffscreenLayerHandlerContribution);
21402
21627
 
21403
21628
  var layerHandlerModules = new ContainerModule(bind => {
21404
21629
  bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
@@ -21514,197 +21739,6 @@
21514
21739
  return result;
21515
21740
  }
21516
21741
 
21517
- var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21518
- var d,
21519
- c = arguments.length,
21520
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21521
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21522
- return c > 3 && r && Object.defineProperty(target, key, r), r;
21523
- },
21524
- __metadata$Q = undefined && undefined.__metadata || function (k, v) {
21525
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21526
- };
21527
- const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
21528
- const tempDirtyBounds = new AABBBounds();
21529
- class ShadowRootDrawItemInterceptorContribution {
21530
- constructor() {
21531
- this.order = 1;
21532
- }
21533
- afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21534
- return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21535
- }
21536
- beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21537
- return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21538
- }
21539
- drawItem(graphic, renderService, drawContext, drawContribution, params) {
21540
- if (!graphic.shadowRoot) return !1;
21541
- const {
21542
- context: context
21543
- } = drawContext;
21544
- if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
21545
- tempDirtyBounds.copy(drawContribution.dirtyBounds);
21546
- const m = graphic.globalTransMatrix.getInverse();
21547
- drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
21548
- }
21549
- return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
21550
- }
21551
- }
21552
- class DebugDrawItemInterceptorContribution {
21553
- constructor() {
21554
- this.order = 1;
21555
- }
21556
- afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21557
- return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21558
- }
21559
- drawItem(graphic, renderService, drawContext, drawContribution, params) {
21560
- if (!graphic.attribute._debug_bounds) return !1;
21561
- const {
21562
- context: context
21563
- } = drawContext;
21564
- context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
21565
- const b = graphic.AABBBounds;
21566
- return !0 !== graphic.attribute._debug_bounds && graphic.attribute._debug_bounds(context, graphic), context.strokeRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore(), !0;
21567
- }
21568
- }
21569
- let CommonDrawItemInterceptorContribution = class {
21570
- constructor() {
21571
- this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
21572
- }
21573
- afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21574
- for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].afterDrawItem && this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
21575
- return !1;
21576
- }
21577
- beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21578
- if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
21579
- for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].beforeDrawItem && this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
21580
- return !1;
21581
- }
21582
- };
21583
- CommonDrawItemInterceptorContribution = __decorate$17([injectable(), __metadata$Q("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
21584
- class InteractiveDrawItemInterceptorContribution {
21585
- constructor() {
21586
- this.order = 1;
21587
- }
21588
- beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21589
- return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
21590
- }
21591
- beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
21592
- let interactiveGraphic = graphic.interactiveGraphic;
21593
- if (graphic.attribute.globalZIndex) {
21594
- interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
21595
- globalZIndex: 0,
21596
- zIndex: graphic.attribute.globalZIndex
21597
- }, !1, {
21598
- skipUpdateCallback: !0
21599
- }), drawContext.stage.tryInitInteractiveLayer();
21600
- const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
21601
- if (interactiveLayer) {
21602
- this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
21603
- }
21604
- return !0;
21605
- }
21606
- if (interactiveGraphic) {
21607
- drawContext.stage.tryInitInteractiveLayer();
21608
- const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
21609
- if (interactiveLayer) {
21610
- this.getShadowRoot(interactiveLayer).removeChild(interactiveGraphic);
21611
- }
21612
- graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
21613
- }
21614
- return !1;
21615
- }
21616
- beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
21617
- const baseGraphic = graphic.baseGraphic;
21618
- if (baseGraphic) {
21619
- this.processing = !0;
21620
- const {
21621
- context: context
21622
- } = drawContext;
21623
- return context.highPerformanceSave(), context.setTransformFromMatrix(baseGraphic.parent.globalTransMatrix, !0), baseGraphic.isContainer ? drawContribution.renderGroup(baseGraphic, drawContext, baseGraphic.parent.globalTransMatrix) : drawContribution.renderItem(baseGraphic, drawContext), context.highPerformanceRestore(), this.processing = !1, !0;
21624
- }
21625
- return !1;
21626
- }
21627
- getShadowRoot(interactiveLayer) {
21628
- var _a;
21629
- let group = interactiveLayer.getElementById("_interactive_group");
21630
- return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
21631
- }
21632
- }
21633
- class Canvas3DDrawItemInterceptor {
21634
- constructor() {
21635
- this.order = 1;
21636
- }
21637
- beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21638
- if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
21639
- drawContext.in3dInterceptor = !0;
21640
- const {
21641
- context: context,
21642
- stage: stage
21643
- } = renderService.drawParams;
21644
- context.canvas;
21645
- context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
21646
- const m = context.currentMatrix;
21647
- m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
21648
- const matrix = mat4Allocate.allocate();
21649
- mat3Tomat4(matrix, m);
21650
- const lastModelMatrix = context.modelMatrix;
21651
- if (lastModelMatrix) {
21652
- if (matrix) {
21653
- const m = mat4Allocate.allocate();
21654
- context.modelMatrix = multiplyMat4Mat4(m, lastModelMatrix, matrix);
21655
- }
21656
- } else context.modelMatrix = matrix;
21657
- if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
21658
- let isPie = !1,
21659
- is3d = !1;
21660
- if (graphic.forEachChildren(c => (isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie)), graphic.forEachChildren(c => (is3d = !!c.findFace, !is3d)), isPie) {
21661
- const children = graphic.getChildren(),
21662
- sortedChildren = [...children];
21663
- sortedChildren.sort((a, b) => {
21664
- var _a, _b, _c, _d;
21665
- let angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
21666
- angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
21667
- for (; angle1 < 0;) angle1 += pi2;
21668
- for (; angle2 < 0;) angle2 += pi2;
21669
- return angle2 - angle1;
21670
- }), sortedChildren.forEach(c => {
21671
- c._next = null, c._prev = null;
21672
- }), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(c => {
21673
- graphic.appendChild(c);
21674
- });
21675
- const m = graphic.parent.globalTransMatrix;
21676
- drawContext.hack_pieFace = "outside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "inside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "top", drawContribution.renderGroup(graphic, drawContext, m), graphic.removeAllChild(), children.forEach(c => {
21677
- c._next = null, c._prev = null;
21678
- }), children.forEach(c => {
21679
- graphic.appendChild(c);
21680
- });
21681
- } else if (is3d) {
21682
- const children = graphic.getChildren(),
21683
- zChildren = children.map(g => ({
21684
- ave_z: g.findFace().vertices.map(v => {
21685
- var _a;
21686
- return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
21687
- }).reduce((a, b) => a + b, 0),
21688
- g: g
21689
- }));
21690
- zChildren.sort((a, b) => b.ave_z - a.ave_z), graphic.removeAllChild(), zChildren.forEach(i => {
21691
- i.g._next = null, i.g._prev = null;
21692
- }), graphic.update(), zChildren.forEach(i => {
21693
- graphic.add(i.g);
21694
- }), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), children.forEach(g => {
21695
- g._next = null, g._prev = null;
21696
- }), graphic.update(), children.forEach(g => {
21697
- graphic.add(g);
21698
- });
21699
- } else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
21700
- } else drawContribution.renderItem(graphic, drawContext);
21701
- return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
21702
- }
21703
- initCanvasCtx(context) {
21704
- context.setTransformForCurrent();
21705
- }
21706
- }
21707
-
21708
21742
  var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21709
21743
  var d,
21710
21744
  c = arguments.length,
@@ -21746,20 +21780,26 @@
21746
21780
  height: height
21747
21781
  } = drawContext;
21748
21782
  if (!context) return;
21783
+ if (drawContext.keepMatrix) {
21784
+ if (context.nativeContext && context.nativeContext.getTransform) {
21785
+ const t = context.nativeContext.getTransform();
21786
+ context.setTransformFromMatrix(t, !0, 1);
21787
+ }
21788
+ } else context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0);
21749
21789
  const dirtyBounds = this.dirtyBounds.setValue(0, 0, width, height);
21750
21790
  if (stage.dirtyBounds && !stage.dirtyBounds.empty()) {
21751
21791
  const b = getRectIntersect(dirtyBounds, stage.dirtyBounds, !1);
21752
21792
  dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
21753
21793
  }
21754
21794
  const d = context.dpr % 1;
21755
- (d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0);
21795
+ (d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds);
21756
21796
  const drawInArea = dirtyBounds.width() * context.dpr < context.canvas.width || dirtyBounds.height() * context.dpr < context.canvas.height;
21757
21797
  context.save(), context.translate(x, y, !0), drawInArea && (context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip()), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), context.save(), renderService.renderTreeRoots.sort((a, b) => {
21758
21798
  var _a, _b;
21759
21799
  return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
21760
21800
  }).forEach(group => {
21761
21801
  group.isContainer ? this.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0)) : this.renderItem(group, drawContext);
21762
- }), context.restore(), context.restore(), context.draw(), context.inuse = !1;
21802
+ }), context.restore(), context.restore(), context.draw(), drawContext.keepMatrix || (context.inuse = !1);
21763
21803
  }
21764
21804
  doRegister() {
21765
21805
  throw new Error("暂不支持");
@@ -21840,7 +21880,7 @@
21840
21880
  }
21841
21881
  getRenderContribution(graphic) {
21842
21882
  let renderer;
21843
- return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType)), renderer || (renderer = this.selectRenderByType(graphic.type)), renderer;
21883
+ return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType, graphic)), renderer || (renderer = this.selectRenderByType(graphic.type)), renderer;
21844
21884
  }
21845
21885
  renderItem(graphic, drawContext, params) {
21846
21886
  if (this.InterceptorContributions.length) for (let i = 0; i < this.InterceptorContributions.length; i++) {
@@ -21872,8 +21912,13 @@
21872
21912
  selectRenderByType(type) {
21873
21913
  return Logger.getInstance().warn("未知错误,不应该走到这里"), null;
21874
21914
  }
21875
- selectRenderByNumberType(type) {
21876
- return this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
21915
+ selectRenderByNumberType(type, graphic) {
21916
+ let data;
21917
+ if (graphic.attribute.renderStyle) {
21918
+ const currentRenderMap = this.styleRenderMap.get(graphic.attribute.renderStyle);
21919
+ data = currentRenderMap && currentRenderMap.get(type);
21920
+ }
21921
+ return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
21877
21922
  }
21878
21923
  clearScreen(renderService, context, drawContext) {
21879
21924
  var _a, _b;
@@ -22160,14 +22205,22 @@
22160
22205
  x = 0,
22161
22206
  y = 0
22162
22207
  } = drawContext;
22163
- context && (context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0), context.save(), drawContext.restartIncremental && this.clearScreen(this.currentRenderService, context, drawContext), context.translate(x, y, !0), context.save(), renderService.renderTreeRoots.sort((a, b) => {
22164
- var _a, _b;
22165
- return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
22166
- }).forEach(group => {
22167
- this.renderGroup(group, drawContext);
22168
- }), this.hooks.completeDraw.tap("top-draw", () => {
22169
- context.restore(), context.restore(), context.draw(), context.inuse = !1, this.rendering = !1;
22170
- }));
22208
+ if (context) {
22209
+ if (drawContext.keepMatrix) {
22210
+ if (context.nativeContext && context.nativeContext.getTransform) {
22211
+ const t = context.nativeContext.getTransform();
22212
+ context.setTransformFromMatrix(t, !0, 1);
22213
+ }
22214
+ } else context.inuse = !0, context.clearMatrix();
22215
+ context.setTransformForCurrent(!0), context.save(), drawContext.restartIncremental && this.clearScreen(this.currentRenderService, context, drawContext), context.translate(x, y, !0), context.save(), renderService.renderTreeRoots.sort((a, b) => {
22216
+ var _a, _b;
22217
+ return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
22218
+ }).forEach(group => {
22219
+ this.renderGroup(group, drawContext);
22220
+ }), this.hooks.completeDraw.tap("top-draw", () => {
22221
+ context.restore(), context.restore(), context.draw(), drawContext.keepMatrix || (context.inuse = !1), this.rendering = !1;
22222
+ });
22223
+ }
22171
22224
  });
22172
22225
  }
22173
22226
  _increaseRender(group, drawContext) {
@@ -22360,6 +22413,8 @@
22360
22413
  activate(context) {
22361
22414
  this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, stage => {
22362
22415
  stage && stage === this.pluginService.stage && this.drawHTML(context.stage.renderService);
22416
+ }), application.graphicService.hooks.onRemove.tap(this.key, graphic => {
22417
+ this.removeDom(graphic);
22363
22418
  }), application.graphicService.hooks.onRelease.tap(this.key, graphic => {
22364
22419
  this.removeDom(graphic);
22365
22420
  });
@@ -22404,28 +22459,29 @@
22404
22459
  } = html;
22405
22460
  graphic.bindDom || (graphic.bindDom = new Map());
22406
22461
  const lastDom = graphic.bindDom.get(dom);
22407
- if (lastDom && (!container || container === lastDom.container)) return;
22408
- let nativeDom, nativeContainer;
22409
- graphic.bindDom.forEach(_ref => {
22410
- let {
22462
+ let wrapGroup, nativeContainer;
22463
+ if (!lastDom || container && container !== lastDom.container) {
22464
+ let nativeDom;
22465
+ graphic.bindDom.forEach(_ref => {
22466
+ let {
22467
+ wrapGroup: wrapGroup
22468
+ } = _ref;
22469
+ application.global.removeDom(wrapGroup);
22470
+ }), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
22471
+ const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
22472
+ nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer(), wrapGroup = application.global.createDom({
22473
+ tagName: "div",
22474
+ width: width,
22475
+ height: height,
22476
+ style: style,
22477
+ parent: nativeContainer
22478
+ }), wrapGroup && (wrapGroup.appendChild(nativeDom), graphic.bindDom.set(dom, {
22479
+ dom: nativeDom,
22480
+ container: container,
22411
22481
  wrapGroup: wrapGroup
22412
- } = _ref;
22413
- application.global.removeDom(wrapGroup);
22414
- }), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
22415
- const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
22416
- nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
22417
- const wrapGroup = application.global.createDom({
22418
- tagName: "div",
22419
- width: width,
22420
- height: height,
22421
- style: style,
22422
- parent: nativeContainer
22423
- });
22424
- wrapGroup && (wrapGroup.appendChild(nativeDom), graphic.bindDom.set(dom, {
22425
- dom: nativeDom,
22426
- container: container,
22427
- wrapGroup: wrapGroup
22428
- })), wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
22482
+ }));
22483
+ } else wrapGroup = lastDom.wrapGroup, nativeContainer = wrapGroup.parentNode;
22484
+ wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
22429
22485
  let left = 0,
22430
22486
  top = 0;
22431
22487
  const b = graphic.globalAABBBounds;
@@ -22468,34 +22524,48 @@
22468
22524
  constructor() {
22469
22525
  this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds();
22470
22526
  }
22527
+ pauseLayout(p) {
22528
+ this.pause = p;
22529
+ }
22530
+ tryLayoutChildren(graphic) {
22531
+ graphic.firstChild && this.tryLayout(graphic.firstChild);
22532
+ }
22471
22533
  tryLayout(graphic) {
22472
- if (this.layouting) return;
22473
- this.layouting = !0;
22534
+ let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
22535
+ if (this.pause) return;
22474
22536
  const p = graphic.parent;
22475
- if (!p || !graphic.needUpdateLayout()) return;
22537
+ if (!(force || p && graphic.needUpdateLayout())) return;
22476
22538
  const theme = getTheme$1(p).group,
22477
22539
  {
22478
22540
  display = theme.display
22479
22541
  } = p.attribute;
22480
22542
  if ("flex" !== display) return;
22481
22543
  const {
22482
- flexDirection = theme.flexDirection,
22483
- flexWrap = theme.flexWrap,
22484
- justifyContent = theme.justifyContent,
22485
- alignItems = theme.alignItems,
22486
- alignContent = theme.alignContent,
22487
- clip = theme.clip
22544
+ flexDirection = theme.flexDirection,
22545
+ flexWrap = theme.flexWrap,
22546
+ alignItems = theme.alignItems,
22547
+ clip = theme.clip
22548
+ } = p.attribute,
22549
+ {
22550
+ alignContent = null != alignItems ? alignItems : theme.alignContent
22551
+ } = p.attribute;
22552
+ let {
22553
+ width: width,
22554
+ height: height,
22555
+ justifyContent = theme.justifyContent
22488
22556
  } = p.attribute;
22489
- let childrenWidth = 0,
22490
- childrenHeight = 0,
22491
- boundsLegal = 0;
22492
- if (p.forEachChildren(child => {
22493
- const bounds = child.AABBBounds;
22494
- "column" === flexDirection || "column-reverse" === flexDirection ? (childrenHeight += bounds.height(), childrenWidth = Math.max(childrenWidth, bounds.width())) : (childrenWidth += bounds.width(), childrenHeight = Math.max(childrenHeight, bounds.height())), boundsLegal += bounds.x1, boundsLegal += bounds.y1, boundsLegal += bounds.x2, boundsLegal += bounds.y2;
22495
- }), !isFinite(boundsLegal)) return;
22496
- const width = p.attribute.width || childrenWidth,
22497
- height = p.attribute.height || childrenHeight;
22498
- p.attribute.width || (p.attribute.width = 0), p.attribute.height || (p.attribute.height = 0), this.tempBounds.copy(p._AABBBounds);
22557
+ const children = p.getChildren();
22558
+ if (null == width || null == height) {
22559
+ let childrenWidth = 0,
22560
+ childrenHeight = 0,
22561
+ boundsLegal = 0;
22562
+ if (children.forEach(child => {
22563
+ const bounds = this.getAABBBounds(child);
22564
+ bounds.empty() || ("column" === flexDirection || "column-reverse" === flexDirection ? (childrenHeight += bounds.height(), childrenWidth = Math.max(childrenWidth, bounds.width())) : (childrenWidth += bounds.width(), childrenHeight = Math.max(childrenHeight, bounds.height())), boundsLegal += bounds.x1, boundsLegal += bounds.y1, boundsLegal += bounds.x2, boundsLegal += bounds.y2);
22565
+ }), !isFinite(boundsLegal)) return;
22566
+ width = childrenWidth, height = childrenHeight;
22567
+ }
22568
+ p.attribute.width = width, p.attribute.height = height, this.tempBounds.copy(p._AABBBounds);
22499
22569
  const result = {
22500
22570
  main: {
22501
22571
  len: width,
@@ -22504,18 +22574,18 @@
22504
22574
  cross: {
22505
22575
  len: height,
22506
22576
  field: "y"
22507
- },
22508
- dir: 1
22577
+ }
22509
22578
  },
22510
22579
  main = result.main,
22511
22580
  cross = result.cross;
22512
- "row-reverse" === flexDirection ? result.dir = -1 : "column" === flexDirection ? (main.len = height, cross.len = width, main.field = "y", cross.field = "x") : "column-reverse" === flexDirection && (main.len = height, cross.len = width, main.field = "y", cross.field = "x", result.dir = -1);
22581
+ "column" !== flexDirection && "column-reverse" !== flexDirection || (main.len = height, cross.len = width, main.field = "y", cross.field = "x"), "row-reverse" !== flexDirection && "column-reverse" !== flexDirection || ("flex-start" === justifyContent ? justifyContent = "flex-end" : "flex-end" === justifyContent ? justifyContent = "flex-start" : children.reverse());
22513
22582
  let mainLen = 0,
22514
22583
  crossLen = 0;
22515
22584
  const mianLenArray = [];
22516
- p.forEachChildren(c => {
22517
- const b = c.AABBBounds,
22518
- ml = "x" === main.field ? b.width() : b.height(),
22585
+ children.forEach(c => {
22586
+ const b = this.getAABBBounds(c);
22587
+ if (b.empty()) return;
22588
+ const ml = "x" === main.field ? b.width() : b.height(),
22519
22589
  cl = "x" === cross.field ? b.width() : b.height();
22520
22590
  mianLenArray.push({
22521
22591
  mainLen: ml,
@@ -22550,107 +22620,168 @@
22550
22620
  mainLen: mainLen,
22551
22621
  crossLen: crossLen
22552
22622
  });
22553
- const children = p.getChildren();
22554
22623
  let lastIdx = 0;
22555
22624
  if (mainList.forEach(s => {
22556
22625
  this.layoutMain(p, children, justifyContent, main, mianLenArray, lastIdx, s), lastIdx = s.idx + 1;
22557
22626
  }), crossLen = mainList.reduce((a, b) => a + b.crossLen, 0), 1 === mainList.length) {
22558
- if ("flex-end" === alignItems) {
22559
- const anchorPos = cross.len;
22560
- this.layoutCross(children, alignItems, cross, anchorPos, mianLenArray, mainList[0], 0);
22561
- } else if ("center" === alignItems) {
22562
- const anchorPos = cross.len / 2;
22563
- this.layoutCross(children, alignItems, cross, anchorPos, mianLenArray, mainList[0], 0);
22564
- } else children.forEach(child => {
22565
- child.attribute[cross.field] = getPadding(child, cross.field);
22566
- });
22627
+ const anchorPosMap = {
22628
+ "flex-start": 0,
22629
+ "flex-end": cross.len,
22630
+ center: cross.len / 2
22631
+ };
22632
+ this.layoutCross(children, alignItems, cross, anchorPosMap, mianLenArray, mainList[0], 0);
22567
22633
  } else if ("flex-start" === alignContent) {
22568
22634
  lastIdx = 0;
22569
22635
  let anchorPos = 0;
22570
22636
  mainList.forEach((s, i) => {
22571
- this.layoutCross(children, "flex-start", cross, anchorPos, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen;
22637
+ const anchorPosMap = {
22638
+ "flex-start": anchorPos,
22639
+ "flex-end": anchorPos + s.crossLen,
22640
+ center: anchorPos + s.crossLen / 2
22641
+ };
22642
+ this.layoutCross(children, "flex-start", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen;
22572
22643
  });
22573
22644
  } else if ("center" === alignContent) {
22574
22645
  lastIdx = 0;
22575
22646
  let anchorPos = Math.max(0, (cross.len - crossLen) / 2);
22576
22647
  mainList.forEach((s, i) => {
22577
- this.layoutCross(children, "center", cross, anchorPos + s.crossLen / 2, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen;
22648
+ const anchorPosMap = {
22649
+ "flex-start": anchorPos,
22650
+ "flex-end": anchorPos + s.crossLen,
22651
+ center: anchorPos + s.crossLen / 2
22652
+ };
22653
+ this.layoutCross(children, "center", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen;
22578
22654
  });
22579
22655
  } else if ("space-around" === alignContent) {
22580
22656
  lastIdx = 0;
22581
22657
  const padding = Math.max(0, (cross.len - crossLen) / mainList.length / 2);
22582
22658
  let anchorPos = padding;
22583
22659
  mainList.forEach((s, i) => {
22584
- this.layoutCross(children, "flex-start", cross, anchorPos, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen + 2 * padding;
22660
+ const anchorPosMap = {
22661
+ "flex-start": anchorPos,
22662
+ "flex-end": anchorPos + s.crossLen,
22663
+ center: anchorPos + s.crossLen / 2
22664
+ };
22665
+ this.layoutCross(children, "flex-start", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen + 2 * padding;
22585
22666
  });
22586
22667
  } else if ("space-between" === alignContent) {
22587
22668
  lastIdx = 0;
22588
22669
  const padding = Math.max(0, (cross.len - crossLen) / (2 * mainList.length - 2));
22589
22670
  let anchorPos = 0;
22590
22671
  mainList.forEach((s, i) => {
22591
- this.layoutCross(children, "flex-start", cross, anchorPos, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen + 2 * padding;
22672
+ const anchorPosMap = {
22673
+ "flex-start": anchorPos,
22674
+ "flex-end": anchorPos + s.crossLen,
22675
+ center: anchorPos + s.crossLen / 2
22676
+ };
22677
+ this.layoutCross(children, "flex-start", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen + 2 * padding;
22592
22678
  });
22593
22679
  }
22594
22680
  children.forEach((child, idx) => {
22595
22681
  child.addUpdateBoundTag(), child.addUpdatePositionTag(), child.clearUpdateLayoutTag();
22596
- }), p.addUpdateLayoutTag(), clip || this.tempBounds.equals(p.AABBBounds) || (this.tryLayout(p), this.layouting = !1);
22682
+ }), p.addUpdateLayoutTag();
22683
+ const b = this.getAABBBounds(p);
22684
+ clip || this.tempBounds.equals(b) || this.tryLayout(p, !1);
22685
+ }
22686
+ getAABBBounds(graphic) {
22687
+ this.skipBoundsTrigger = !0;
22688
+ const b = graphic.AABBBounds;
22689
+ return this.skipBoundsTrigger = !1, b;
22690
+ }
22691
+ updateChildPos(posBaseLeftTop, lastP, lastBP) {
22692
+ return posBaseLeftTop + (null != lastP ? lastP : 0) - lastBP;
22597
22693
  }
22598
22694
  layoutMain(p, children, justifyContent, main, mianLenArray, lastIdx, currSeg) {
22599
22695
  if ("flex-start" === justifyContent) {
22600
22696
  let pos = 0;
22601
- for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen;
22697
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22698
+ const posBaseLeftTop = pos + getPadding(children[i], main.field),
22699
+ b = this.getAABBBounds(children[i]);
22700
+ !b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
22701
+ }
22602
22702
  } else if ("flex-end" === justifyContent) {
22603
22703
  let pos = main.len;
22604
- for (let i = lastIdx; i <= currSeg.idx; i++) pos -= mianLenArray[i].mainLen, children[i].attribute[main.field] = pos + getPadding(children[i], main.field);
22704
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22705
+ pos -= mianLenArray[i].mainLen;
22706
+ const posBaseLeftTop = pos + getPadding(children[i], main.field),
22707
+ b = this.getAABBBounds(children[i]);
22708
+ !b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`]));
22709
+ }
22605
22710
  } else if ("space-around" === justifyContent) {
22606
22711
  if (currSeg.mainLen >= main.len) {
22607
22712
  let pos = 0;
22608
- for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen;
22713
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22714
+ const posBaseLeftTop = pos + getPadding(children[i], main.field),
22715
+ b = this.getAABBBounds(children[i]);
22716
+ !b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
22717
+ }
22609
22718
  } else {
22610
22719
  const size = currSeg.idx - lastIdx + 1,
22611
22720
  padding = (main.len - currSeg.mainLen) / size / 2;
22612
22721
  let pos = padding;
22613
- for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen + 2 * padding;
22722
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22723
+ const posBaseLeftTop = pos + getPadding(children[i], main.field),
22724
+ b = this.getAABBBounds(children[i]);
22725
+ !b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen + 2 * padding;
22726
+ }
22614
22727
  }
22615
22728
  } else if ("space-between" === justifyContent) {
22616
22729
  if (currSeg.mainLen >= main.len) {
22617
22730
  let pos = 0;
22618
- for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen;
22731
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22732
+ const posBaseLeftTop = pos + getPadding(children[i], main.field),
22733
+ b = this.getAABBBounds(children[i]);
22734
+ !b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
22735
+ }
22619
22736
  } else {
22620
22737
  const size = currSeg.idx - lastIdx + 1,
22621
22738
  padding = (main.len - currSeg.mainLen) / (2 * size - 2);
22622
22739
  let pos = 0;
22623
- for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen + 2 * padding;
22740
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22741
+ const posBaseLeftTop = pos + getPadding(children[i], main.field),
22742
+ b = this.getAABBBounds(children[i]);
22743
+ !b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen + 2 * padding;
22744
+ }
22624
22745
  }
22625
22746
  } else if ("center" === justifyContent) {
22626
22747
  let pos = (main.len - currSeg.mainLen) / 2;
22627
- for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen;
22748
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22749
+ const posBaseLeftTop = pos + getPadding(children[i], main.field),
22750
+ b = this.getAABBBounds(children[i]);
22751
+ !b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
22752
+ }
22628
22753
  }
22629
22754
  }
22630
- layoutCross(children, alignItem, cross, anchorPos, lenArray, currSeg, lastIdx) {
22631
- if ("flex-end" === alignItem) for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[cross.field] = anchorPos - lenArray[i].crossLen + getPadding(children[i], cross.field);else if ("center" === alignItem) for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[cross.field] = anchorPos - lenArray[i].crossLen / 2 + getPadding(children[i], cross.field);else for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[cross.field] = anchorPos + getPadding(children[i], cross.field);
22755
+ layoutCross(children, alignItem, cross, anchorPosMap, lenArray, currSeg, lastIdx) {
22756
+ var _a;
22757
+ for (let i = lastIdx; i <= currSeg.idx; i++) {
22758
+ const child = children[i];
22759
+ let {
22760
+ alignSelf: alignSelf
22761
+ } = child.attribute;
22762
+ alignSelf && "auto" !== alignSelf || (alignSelf = alignItem);
22763
+ const b = this.getAABBBounds(child),
22764
+ anchorPos = null !== (_a = anchorPosMap[alignSelf]) && void 0 !== _a ? _a : anchorPosMap["flex-start"];
22765
+ "flex-end" === alignSelf ? !b.empty() && (child.attribute[cross.field] = this.updateChildPos(anchorPos - lenArray[i].crossLen + getPadding(child, cross.field), child.attribute[cross.field], b[`${cross.field}1`])) : "center" === alignSelf ? !b.empty() && (child.attribute[cross.field] = this.updateChildPos(anchorPos - lenArray[i].crossLen / 2 + getPadding(child, cross.field), child.attribute[cross.field], b[`${cross.field}1`])) : !b.empty() && (child.attribute[cross.field] = this.updateChildPos(anchorPos + getPadding(child, cross.field), child.attribute[cross.field], b[`${cross.field}1`]));
22766
+ }
22632
22767
  }
22633
22768
  activate(context) {
22634
22769
  this.pluginService = context, application.graphicService.hooks.onAttributeUpdate.tap(this.key, graphic => {
22635
- graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic), this.layouting = !1;
22770
+ graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage && graphic.stage === this.pluginService.stage && this.tryLayout(graphic, !1);
22636
22771
  }), application.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
22637
- graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && _tempBounds.copy(bounds);
22772
+ graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && _tempBounds.copy(bounds);
22638
22773
  }), application.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
22639
- stage && stage === this.pluginService.stage && graphic.isContainer && (_tempBounds.equals(bounds) || (this.tryLayout(graphic), this.layouting = !1));
22774
+ stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && (_tempBounds.equals(bounds) || this.tryLayout(graphic, !1));
22640
22775
  }), application.graphicService.hooks.onSetStage.tap(this.key, graphic => {
22641
- graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic), this.layouting = !1;
22776
+ graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic, !1);
22642
22777
  });
22643
22778
  }
22644
22779
  deactivate(context) {
22645
- application.graphicService.hooks.onAttributeUpdate.taps = application.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onSetStage.taps = application.graphicService.hooks.onSetStage.taps.filter(item => item.name !== this.key);
22780
+ application.graphicService.hooks.onAttributeUpdate.taps = application.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onSetStage.taps = application.graphicService.hooks.onSetStage.taps.filter(item => item.name !== this.key);
22646
22781
  }
22647
22782
  }
22648
22783
  function getPadding(graphic, field) {
22649
- if (!graphic.attribute.boundsPadding) return 0;
22650
- if (isNumber(graphic.attribute.boundsPadding)) return graphic.attribute.boundsPadding;
22651
- if (isArray$1(graphic.attribute.boundsPadding) && 1 === graphic.attribute.boundsPadding.length) return graphic.attribute.boundsPadding[0];
22652
- const paddingArray = parsePadding(graphic.attribute.boundsPadding);
22653
- return "x" === field ? paddingArray[3] : "y" === field ? paddingArray[0] : 0;
22784
+ return 0;
22654
22785
  }
22655
22786
 
22656
22787
  const defaultTicker = new DefaultTicker();
@@ -23064,6 +23195,9 @@
23064
23195
  this.pluginService.unRegister(plugin);
23065
23196
  }));
23066
23197
  }
23198
+ getPluginsByName(name) {
23199
+ return this.pluginService.findPluginsByName(name);
23200
+ }
23067
23201
  tryUpdateAABBBounds() {
23068
23202
  const viewBox = this._viewBox;
23069
23203
  return this._AABBBounds.setValue(viewBox.x1, viewBox.y1, viewBox.x2, viewBox.y2), this._AABBBounds;
@@ -23097,7 +23231,7 @@
23097
23231
  render(layers, params) {
23098
23232
  this.ticker.start(), this.timeline.resume();
23099
23233
  const state = this.state;
23100
- this.state = "rendering", this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this.renderLayerList(this.children), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear(), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
23234
+ this.state = "rendering", this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this.renderLayerList(this.children, params), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear(), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
23101
23235
  }
23102
23236
  combineLayersToWindow() {}
23103
23237
  renderNextFrame(layers, force) {
@@ -23124,7 +23258,8 @@
23124
23258
  background: layer === this.defaultLayer ? this.background : void 0,
23125
23259
  updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty())
23126
23260
  }, Object.assign({
23127
- renderStyle: this.renderStyle
23261
+ renderStyle: this.renderStyle,
23262
+ keepMatrix: this.params.renderKeepMatrix
23128
23263
  }, params)));
23129
23264
  }), this.interactiveLayer && !layerList.includes(this.interactiveLayer) && this.interactiveLayer.render({
23130
23265
  renderService: this.renderService,
@@ -23723,11 +23858,17 @@
23723
23858
  if (!params.bounds.contains(point.x, point.y)) return result;
23724
23859
  offsetX = params.bounds.x1, offsetY = params.bounds.y1;
23725
23860
  }
23726
- this.pickContext && (this.pickContext.inuse = !0), params.pickContext = this.pickContext, this.pickContext && this.pickContext.clearMatrix(!0, 1);
23861
+ if (this.pickContext) if (params.keepMatrix) {
23862
+ if (this.pickContext.nativeContext && this.pickContext.nativeContext.getTransform) {
23863
+ const t = this.pickContext.nativeContext.getTransform();
23864
+ this.pickContext.setTransformFromMatrix(t, !0, 1);
23865
+ }
23866
+ } else this.pickContext.inuse = !0, this.pickContext.clearMatrix(!0, 1);
23867
+ params.pickContext = this.pickContext;
23727
23868
  const parentMatrix = new Matrix(1, 0, 0, 1, offsetX, offsetY);
23728
23869
  let group;
23729
23870
  for (let i = graphics.length - 1; i >= 0 && (result = graphics[i].isContainer ? this.pickGroup(graphics[i], point, parentMatrix, params) : this.pickItem(graphics[i], point, parentMatrix, params), !result.graphic); i--) group || (group = result.group);
23730
- if (result.graphic || (result.group = group), this.pickContext && (this.pickContext.inuse = !1), result.graphic) {
23871
+ if (result.graphic || (result.group = group), this.pickContext && !params.keepMatrix && (this.pickContext.inuse = !1), result.graphic) {
23731
23872
  let g = result.graphic;
23732
23873
  for (; g.parent;) g = g.parent;
23733
23874
  g.shadowHost && (result.params = {
@@ -24439,7 +24580,7 @@
24439
24580
  if (v === null || v === undefined || v === '') {
24440
24581
  return false;
24441
24582
  }
24442
- if (isNumber$2(v)) {
24583
+ if (isNumber$1(v)) {
24443
24584
  return true;
24444
24585
  }
24445
24586
  return +v === +v;
@@ -24532,7 +24673,7 @@
24532
24673
  const n = array.length;
24533
24674
  for (let i = 0; i < n; i += 1) {
24534
24675
  let value = valueGetter(array[i]);
24535
- isNil$1(value) || !isNumber$2(value = +value) || Number.isNaN(value) || (isNil$1(min) ? (min = value, max = value) : (min = Math.min(min, value), max = Math.max(max, value)));
24676
+ isNil$1(value) || !isNumber$1(value = +value) || Number.isNaN(value) || (isNil$1(min) ? (min = value, max = value) : (min = Math.min(min, value), max = Math.max(max, value)));
24536
24677
  }
24537
24678
  return [min, max];
24538
24679
  }
@@ -25017,7 +25158,7 @@
25017
25158
  return this._isFixed && !!this._bandwidth;
25018
25159
  }
25019
25160
  _isBandwidthFixedByUser() {
25020
- return this._isFixed && this._userBandwidth && isNumber$2(this._userBandwidth);
25161
+ return this._isFixed && this._userBandwidth && isNumber$1(this._userBandwidth);
25021
25162
  }
25022
25163
  clone() {
25023
25164
  var _a, _b, _c;
@@ -25285,13 +25426,13 @@
25285
25426
  }
25286
25427
  }
25287
25428
  function parseNiceOptions(originalDomain, option) {
25288
- const hasForceMin = isNumber$2(option.forceMin),
25289
- hasForceMax = isNumber$2(option.forceMax);
25429
+ const hasForceMin = isNumber$1(option.forceMin),
25430
+ hasForceMax = isNumber$1(option.forceMax);
25290
25431
  let niceType = null;
25291
25432
  const niceMinMax = [];
25292
25433
  let niceDomain = null;
25293
25434
  const domainValidator = hasForceMin && hasForceMax ? x => x >= option.forceMin && x <= option.forceMax : hasForceMin ? x => x >= option.forceMin : hasForceMax ? x => x <= option.forceMax : null;
25294
- return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$2(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$2(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$2(niceMinMax[0]) && isNumber$2(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$2(niceMinMax[0]) || isNumber$2(niceMinMax[1]) ? isNumber$2(niceMinMax[0]) ? "max" : "min" : "all", {
25435
+ return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$1(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$1(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$1(niceMinMax[0]) && isNumber$1(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$1(niceMinMax[0]) || isNumber$1(niceMinMax[1]) ? isNumber$1(niceMinMax[0]) ? "max" : "min" : "all", {
25295
25436
  niceType: niceType,
25296
25437
  niceDomain: niceDomain,
25297
25438
  niceMinMax: niceMinMax,
@@ -26164,6 +26305,45 @@
26164
26305
  function distance(p1, p2 = { x: 0, y: 0 }) {
26165
26306
  return PointService.distancePP(p1, p2);
26166
26307
  }
26308
+ function getPercentValue(valueList, idx, precision = 2) {
26309
+ if (!valueList[idx]) {
26310
+ return 0;
26311
+ }
26312
+ const sum = valueList.reduce((a, c) => {
26313
+ return (a += isNaN(c) ? 0 : c);
26314
+ }, 0);
26315
+ if (sum === 0) {
26316
+ return 0;
26317
+ }
26318
+ const digits = Math.pow(10, precision);
26319
+ const votesPerQuota = valueList.map(val => {
26320
+ return ((isNaN(val) ? 0 : val) / sum) * digits * 100;
26321
+ });
26322
+ const targetSeats = digits * 100;
26323
+ const seats = votesPerQuota.map(votes => {
26324
+ return Math.floor(votes);
26325
+ });
26326
+ let currentSum = seats.reduce((a, c) => {
26327
+ return a + c;
26328
+ }, 0);
26329
+ const remainder = votesPerQuota.map((votes, idx) => {
26330
+ return votes - seats[idx];
26331
+ });
26332
+ while (currentSum < targetSeats) {
26333
+ let max = Number.NEGATIVE_INFINITY;
26334
+ let maxId = null;
26335
+ for (let i = 0; i < remainder.length; i++) {
26336
+ if (remainder[i] > max) {
26337
+ max = remainder[i];
26338
+ maxId = i;
26339
+ }
26340
+ }
26341
+ ++seats[maxId];
26342
+ remainder[maxId] = 0;
26343
+ ++currentSum;
26344
+ }
26345
+ return seats[idx] / digits;
26346
+ }
26167
26347
 
26168
26348
  function eachSeries(regions, callback, filter) {
26169
26349
  let flag = false;
@@ -26523,7 +26703,7 @@
26523
26703
  }] : [];
26524
26704
  }
26525
26705
  function getLinePoints(items, includeOnePoint, lastPoints, isArea) {
26526
- if (!items || !items.length || 1 === items.length && includeOnePoint) return [];
26706
+ if (!items || !items.length || 1 === items.length && !includeOnePoint) return [];
26527
26707
  return items.some(item => isValidPointsChannel(Object.keys(item.nextAttrs), "line")) ? items.map((item, index) => {
26528
26708
  var _a;
26529
26709
  const attrs = item.nextAttrs,
@@ -26539,7 +26719,7 @@
26539
26719
  }
26540
26720
  function getLargeRectsPoints(items, includeOnePoint) {
26541
26721
  let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
26542
- if (!items || !items.length || 1 === items.length && includeOnePoint) return [];
26722
+ if (!items || !items.length || 1 === items.length && !includeOnePoint) return [];
26543
26723
  const arr = new Float32Array(4 * items.length);
26544
26724
  return items.forEach((item, index) => {
26545
26725
  var _a, _b, _c, _d;
@@ -26553,7 +26733,7 @@
26553
26733
  }
26554
26734
  function getLargeSymbolsPoints(items, includeOnePoint) {
26555
26735
  let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
26556
- if (!items || !items.length || 1 === items.length && includeOnePoint) return [];
26736
+ if (!items || !items.length || 1 === items.length && !includeOnePoint) return [];
26557
26737
  const arr = new Float32Array(2 * items.length);
26558
26738
  return items.forEach((item, index) => {
26559
26739
  var _a, _b;
@@ -26594,6 +26774,57 @@
26594
26774
  return [GrammarMarkType.line, GrammarMarkType.area, GrammarMarkType.largeRects, GrammarMarkType.largeSymbols].includes(markType);
26595
26775
  }
26596
26776
 
26777
+ function invokeEncoderToItems(element, items, encoder, parameters, onlyFullEncodeFirst) {
26778
+ encoder && (isFunctionType(encoder) ? items.forEach(item => {
26779
+ const attributes = invokeFunctionType(encoder, parameters, item.datum, element);
26780
+ Object.assign(item.nextAttrs, attributes);
26781
+ }) : Object.keys(encoder).forEach(channel => {
26782
+ var _a, _b;
26783
+ const encode = encoder[channel],
26784
+ encodeItems = onlyFullEncodeFirst && !isPositionOrSizeChannel(element.mark.markType, channel) ? [items[0]] : items;
26785
+ if (isScaleEncode(encode)) {
26786
+ const scale = getGrammarOutput(encode.scale, parameters),
26787
+ offset = null !== (_a = null == encode ? void 0 : encode.offset) && void 0 !== _a ? _a : 0,
26788
+ bandOffset = !isNil$1(encode.band) && scale.bandwidth ? scale.bandwidth() * encode.band : null,
26789
+ hasField = isString$1(null == encode ? void 0 : encode.field),
26790
+ fieldAccessor = hasField ? field$3(encode.field) : null;
26791
+ let to = hasField ? null : isNil$1(null == encode ? void 0 : encode.value) ? 0 : null === (_b = scale.scale) || void 0 === _b ? void 0 : _b.call(scale, encode.value);
26792
+ encodeItems.forEach(item => {
26793
+ var _a;
26794
+ hasField && (to = null === (_a = scale.scale) || void 0 === _a ? void 0 : _a.call(scale, fieldAccessor(item.datum))), item.nextAttrs[channel] = isNumber$1(to) || isNumber$1(bandOffset) ? to + offset + bandOffset : to;
26795
+ });
26796
+ } else if (isFieldEncode(encode)) {
26797
+ const fieldAccessor = field$3(encode.field);
26798
+ encodeItems.forEach(item => {
26799
+ item.nextAttrs[channel] = fieldAccessor(item.datum);
26800
+ });
26801
+ } else encodeItems.forEach(item => {
26802
+ item.nextAttrs[channel] = invokeFunctionType(encode, parameters, item.datum, element);
26803
+ });
26804
+ }));
26805
+ }
26806
+ function invokeEncoder(encoder, datum, element, parameters) {
26807
+ if (!encoder) return null;
26808
+ if (isFunctionType(encoder)) return invokeFunctionType(encoder, parameters, datum, element);
26809
+ const attributes = {};
26810
+ return Object.keys(encoder).forEach(channel => {
26811
+ var _a, _b, _c;
26812
+ const encode = encoder[channel];
26813
+ if (isScaleEncode(encode)) {
26814
+ const scale = getGrammarOutput(encode.scale, parameters),
26815
+ offset = null !== (_a = null == encode ? void 0 : encode.offset) && void 0 !== _a ? _a : 0,
26816
+ bandOffset = !isNil$1(encode.band) && scale.bandwidth ? scale.bandwidth() * encode.band : null,
26817
+ hasField = isString$1(null == encode ? void 0 : encode.field),
26818
+ fieldAccessor = hasField ? field$3(encode.field) : null,
26819
+ to = hasField ? null === (_b = scale.scale) || void 0 === _b ? void 0 : _b.call(scale, fieldAccessor(datum)) : isNil$1(null == encode ? void 0 : encode.value) ? 0 : null === (_c = scale.scale) || void 0 === _c ? void 0 : _c.call(scale, encode.value);
26820
+ attributes[channel] = isNumber$1(to) || isNumber$1(bandOffset) ? to + offset + bandOffset : to;
26821
+ } else if (isFieldEncode(encode)) {
26822
+ const fieldAccessor = field$3(encode.field);
26823
+ attributes[channel] = fieldAccessor(datum);
26824
+ } else attributes[channel] = invokeFunctionType(encode, parameters, datum, element);
26825
+ }), attributes;
26826
+ }
26827
+
26597
26828
  class GlyphMeta {
26598
26829
  constructor(marks, encoders, defaultEncoder, progressiveChannels) {
26599
26830
  this.channelEncoder = {}, this.marks = marks, encoders && this.registerChannelEncoder(encoders), defaultEncoder && this.registerDefaultEncoder(defaultEncoder), this.progressiveChannels && this.registerProgressiveChannels(progressiveChannels);
@@ -26709,83 +26940,6 @@
26709
26940
  return creator ? creator(attributes) : null;
26710
26941
  };
26711
26942
 
26712
- function invokeEncoderToItems(element, items, encoder, parameters, onlyFullEncodeFirst) {
26713
- encoder && (isFunctionType(encoder) ? items.forEach(item => {
26714
- const attributes = invokeFunctionType(encoder, parameters, item.datum, element);
26715
- Object.assign(item.nextAttrs, attributes);
26716
- }) : Object.keys(encoder).forEach(channel => {
26717
- var _a, _b;
26718
- const encode = encoder[channel],
26719
- encodeItems = onlyFullEncodeFirst && !isPositionOrSizeChannel(element.mark.markType, channel) ? [items[0]] : items;
26720
- if (isScaleEncode(encode)) {
26721
- const scale = getGrammarOutput(encode.scale, parameters),
26722
- offset = null !== (_a = null == encode ? void 0 : encode.offset) && void 0 !== _a ? _a : 0,
26723
- bandOffset = !isNil$1(encode.band) && scale.bandwidth ? scale.bandwidth() * encode.band : null,
26724
- hasField = isString$1(null == encode ? void 0 : encode.field),
26725
- fieldAccessor = hasField ? field$3(encode.field) : null;
26726
- let to = hasField ? null : isNil$1(null == encode ? void 0 : encode.value) ? 0 : null === (_b = scale.scale) || void 0 === _b ? void 0 : _b.call(scale, encode.value);
26727
- encodeItems.forEach(item => {
26728
- var _a;
26729
- hasField && (to = null === (_a = scale.scale) || void 0 === _a ? void 0 : _a.call(scale, fieldAccessor(item.datum))), item.nextAttrs[channel] = isNumber$2(to) || isNumber$2(bandOffset) ? to + offset + bandOffset : to;
26730
- });
26731
- } else if (isFieldEncode(encode)) {
26732
- const fieldAccessor = field$3(encode.field);
26733
- encodeItems.forEach(item => {
26734
- item.nextAttrs[channel] = fieldAccessor(item.datum);
26735
- });
26736
- } else encodeItems.forEach(item => {
26737
- item.nextAttrs[channel] = invokeFunctionType(encode, parameters, item.datum, element);
26738
- });
26739
- }));
26740
- }
26741
- function invokeEncoder(encoder, datum, element, parameters) {
26742
- if (!encoder) return null;
26743
- if (isFunctionType(encoder)) return invokeFunctionType(encoder, parameters, datum, element);
26744
- const attributes = {};
26745
- return Object.keys(encoder).forEach(channel => {
26746
- var _a, _b, _c;
26747
- const encode = encoder[channel];
26748
- if (isScaleEncode(encode)) {
26749
- const scale = getGrammarOutput(encode.scale, parameters),
26750
- offset = null !== (_a = null == encode ? void 0 : encode.offset) && void 0 !== _a ? _a : 0,
26751
- bandOffset = !isNil$1(encode.band) && scale.bandwidth ? scale.bandwidth() * encode.band : null,
26752
- hasField = isString$1(null == encode ? void 0 : encode.field),
26753
- fieldAccessor = hasField ? field$3(encode.field) : null,
26754
- to = hasField ? null === (_b = scale.scale) || void 0 === _b ? void 0 : _b.call(scale, fieldAccessor(datum)) : isNil$1(null == encode ? void 0 : encode.value) ? 0 : null === (_c = scale.scale) || void 0 === _c ? void 0 : _c.call(scale, encode.value);
26755
- attributes[channel] = isNumber$2(to) || isNumber$2(bandOffset) ? to + offset + bandOffset : to;
26756
- } else if (isFieldEncode(encode)) {
26757
- const fieldAccessor = field$3(encode.field);
26758
- attributes[channel] = fieldAccessor(datum);
26759
- } else attributes[channel] = invokeFunctionType(encode, parameters, datum, element);
26760
- }), attributes;
26761
- }
26762
- function splitEncoderInLarge(markType, encoder, glyphType) {
26763
- if (isFunctionType(encoder)) return {
26764
- themeEncoder: {},
26765
- positionEncoder: encoder
26766
- };
26767
- const themeEncoder = {},
26768
- positionEncoder = {};
26769
- if (markType === GrammarMarkType.glyph && Factory$1.getGlyph(glyphType)) {
26770
- const glyphMeta = Factory$1.getGlyph(glyphType),
26771
- progressiveChannels = glyphMeta.getProgressiveChannels();
26772
- if (progressiveChannels) Object.keys(encoder).forEach(channel => {
26773
- progressiveChannels.includes(channel) ? positionEncoder[channel] = encoder[channel] : themeEncoder[channel] = encoder[channel];
26774
- });else {
26775
- const markTypes = Array.from(new Set(Object.values(glyphMeta.getMarks())));
26776
- Object.keys(encoder).forEach(channel => {
26777
- markTypes.some(type => isPositionOrSizeChannel(type, channel)) ? positionEncoder[channel] = encoder[channel] : themeEncoder[channel] = encoder[channel];
26778
- });
26779
- }
26780
- } else Object.keys(encoder).forEach(channel => {
26781
- isPositionOrSizeChannel(markType, channel) ? positionEncoder[channel] = encoder[channel] : themeEncoder[channel] = encoder[channel];
26782
- });
26783
- return {
26784
- positionEncoder: positionEncoder,
26785
- themeEncoder: themeEncoder
26786
- };
26787
- }
26788
-
26789
26943
  const isMarkType = type => !!GrammarMarkType[type];
26790
26944
  function createGraphicItem(mark, markType) {
26791
26945
  let attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -27015,7 +27169,7 @@
27015
27169
  }
27016
27170
  updateGraphicItem(config) {
27017
27171
  if (!this.graphicItem) return;
27018
- isNil$1(config.clip) || this.graphicItem.setAttribute("clip", config.clip), isNil$1(config.interactive) || this.graphicItem.setAttribute("pickable", config.interactive), isNil$1(config.zIndex) || this.graphicItem.setAttribute("zIndex", config.zIndex), this.diffState === DiffState.exit ? this.graphicItem.releaseStatus = "willRelease" : this.graphicItem.releaseStatus = void 0;
27172
+ isNil$1(config.clip) || this.graphicItem.setAttribute("clip", config.clip), isNil$1(config.zIndex) || this.graphicItem.setAttribute("zIndex", config.zIndex), isNil$1(config.clipPath) || this.graphicItem.setAttribute("path", isArray$1(config.clipPath) ? config.clipPath : config.clipPath([this])), isNil$1(config.interactive) || this.graphicItem.setAttribute("pickable", config.interactive), isNil$1(config.zIndex) || this.graphicItem.setAttribute("zIndex", config.zIndex), this.diffState === DiffState.exit ? this.graphicItem.releaseStatus = "willRelease" : this.graphicItem.releaseStatus = void 0;
27019
27173
  const stateAnimation = this.mark.animate.getAnimationConfigs("state");
27020
27174
  0 !== stateAnimation.length && (this.graphicItem.stateAnimateConfig = stateAnimation[0].originConfig);
27021
27175
  }
@@ -27394,7 +27548,7 @@
27394
27548
  handler: this.handleStart
27395
27549
  }];
27396
27550
  let eventName = triggerOff;
27397
- return "empty" === triggerOff ? (eventName = trigger, this._resetType = "view") : isString$1(triggerOff) ? triggerOff.includes("view:") ? (eventName = triggerOff.replace("view:", ""), this._resetType = "view") : (eventName = triggerOff, this._resetType = "self") : isNumber$2(triggerOff) ? (eventName = null, this._resetType = "timeout") : this._resetType = null, eventName && eventName !== trigger && events.push({
27551
+ return "empty" === triggerOff ? (eventName = trigger, this._resetType = "view") : isString$1(triggerOff) ? triggerOff.includes("view:") ? (eventName = triggerOff.replace("view:", ""), this._resetType = "view") : (eventName = triggerOff, this._resetType = "self") : isNumber$1(triggerOff) ? (eventName = null, this._resetType = "timeout") : this._resetType = null, eventName && eventName !== trigger && events.push({
27398
27552
  type: eventName,
27399
27553
  handler: this.handleReset
27400
27554
  }), events;
@@ -30845,7 +30999,7 @@
30845
30999
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
30846
31000
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
30847
31001
  let picked = !0;
30848
- if (!onlyTranslate || rect.shadowRoot || isNumber$2(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
31002
+ if (!onlyTranslate || rect.shadowRoot || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
30849
31003
  if (picked) return !0;
30850
31004
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
30851
31005
  pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
@@ -30913,7 +31067,7 @@
30913
31067
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
30914
31068
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
30915
31069
  let picked = !0;
30916
- if (!onlyTranslate || isNumber$2(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
31070
+ if (!onlyTranslate || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
30917
31071
  if (picked) return !0;
30918
31072
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
30919
31073
  pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
@@ -32508,6 +32662,14 @@
32508
32662
  height: bounds.height()
32509
32663
  };
32510
32664
  }
32665
+ function isRichText(attributes) {
32666
+ let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
32667
+ return typeKey in attributes && "rich" === attributes[typeKey] || isObject$2(attributes.text) && "rich" === attributes.text.type;
32668
+ }
32669
+ function richTextAttributeTransform(attributes) {
32670
+ var _a, _b;
32671
+ return attributes.width = null !== (_a = attributes.width) && void 0 !== _a ? _a : 0, attributes.height = null !== (_b = attributes.height) && void 0 !== _b ? _b : 0, attributes.maxWidth = attributes.maxLineWidth, attributes.textConfig = attributes.text.text || attributes.text, attributes;
32672
+ }
32511
32673
 
32512
32674
  function loadTagComponent() {
32513
32675
  registerGroup(), registerRect(), registerSymbol(), registerRichtext(), registerText();
@@ -32528,7 +32690,7 @@
32528
32690
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Tag.defaultAttributes, attributes)), this.name = "tag";
32529
32691
  }
32530
32692
  render() {
32531
- var _a, _b, _c, _d;
32693
+ var _a, _b;
32532
32694
  const {
32533
32695
  text = "",
32534
32696
  textStyle = {},
@@ -32560,7 +32722,7 @@
32560
32722
  shapeStyle = __rest$6(shape, ["visible"]);
32561
32723
  if (isBoolean$1(shapeVisible)) {
32562
32724
  const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
32563
- maxSize = isNumber$2(size) ? size : Math.max(size[0], size[1]);
32725
+ maxSize = isNumber$1(size) ? size : Math.max(size[0], size[1]);
32564
32726
  symbol = group.createOrUpdateChild("tag-shape", Object.assign(Object.assign({
32565
32727
  symbolType: "circle",
32566
32728
  size: size,
@@ -32572,39 +32734,15 @@
32572
32734
  }), "symbol"), isEmpty(null == state ? void 0 : state.shape) || (symbol.states = state.shape), shapeVisible && (symbolPlaceWidth = maxSize + space);
32573
32735
  }
32574
32736
  let textShape;
32575
- if (tagWidth += symbolPlaceWidth, textX += symbolPlaceWidth, "rich" === type) {
32576
- const richTextAttrs = Object.assign(Object.assign({
32577
- textConfig: text,
32578
- visible: isValid$1(text) && !1 !== visible
32579
- }, textStyle), {
32580
- x: textX,
32581
- y: 0,
32582
- width: null !== (_a = textStyle.width) && void 0 !== _a ? _a : 0,
32583
- height: null !== (_b = textStyle.height) && void 0 !== _b ? _b : 0
32584
- });
32585
- textShape = group.createOrUpdateChild("tag-text", richTextAttrs, "richtext");
32586
- const {
32587
- visible: bgVisible
32588
- } = panel,
32589
- backgroundStyle = __rest$6(panel, ["visible"]);
32590
- if (visible && isBoolean$1(bgVisible)) {
32591
- const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
32592
- visible: bgVisible && !!text,
32593
- x: textShape.AABBBounds.x1,
32594
- y: textShape.AABBBounds.y1,
32595
- width: textShape.AABBBounds.width(),
32596
- height: textShape.AABBBounds.height()
32597
- }), "rect");
32598
- isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
32599
- }
32600
- } else if ("html" === type) {
32601
- const richTextAttrs = Object.assign(Object.assign({
32602
- textConfig: [],
32737
+ tagWidth += symbolPlaceWidth, textX += symbolPlaceWidth;
32738
+ if (isRichText({
32739
+ text: text
32740
+ }) || "rich" === type) {
32741
+ const richTextAttrs = Object.assign(Object.assign(Object.assign({}, richTextAttributeTransform(Object.assign({
32742
+ type: type,
32743
+ text: text
32744
+ }, textStyle))), textStyle), {
32603
32745
  visible: isValid$1(text) && !1 !== visible,
32604
- html: Object.assign(Object.assign({
32605
- dom: text
32606
- }, DEFAULT_HTML_TEXT_SPEC), textStyle)
32607
- }, textStyle), {
32608
32746
  x: textX,
32609
32747
  y: 0
32610
32748
  });
@@ -32625,7 +32763,7 @@
32625
32763
  }
32626
32764
  } else {
32627
32765
  const textAttrs = Object.assign(Object.assign({
32628
- text: text,
32766
+ text: isObject$2(text) && "type" in text && "text" === text.type ? text.text : text,
32629
32767
  visible: isValid$1(text) && !1 !== visible,
32630
32768
  lineHeight: null == textStyle ? void 0 : textStyle.fontSize
32631
32769
  }, textStyle), {
@@ -32633,12 +32771,12 @@
32633
32771
  y: 0
32634
32772
  });
32635
32773
  isNil$1(textAttrs.lineHeight) && (textAttrs.lineHeight = textStyle.fontSize), textShape = group.createOrUpdateChild("tag-text", textAttrs, "text"), isEmpty(null == state ? void 0 : state.text) || (textShape.states = state.text);
32636
- const textBounds = measureTextSize(textAttrs.text, textStyle, null === (_c = this.stage) || void 0 === _c ? void 0 : _c.getTheme().text.fontFamily),
32774
+ const textBounds = measureTextSize(textAttrs.text, textStyle, null === (_a = this.stage) || void 0 === _a ? void 0 : _a.getTheme().text.fontFamily),
32637
32775
  textWidth = textBounds.width,
32638
32776
  textHeight = textBounds.height;
32639
32777
  tagWidth += textWidth;
32640
- const size = null !== (_d = shape.size) && void 0 !== _d ? _d : 10,
32641
- maxSize = isNumber$2(size) ? size : Math.max(size[0], size[1]);
32778
+ const size = null !== (_b = shape.size) && void 0 !== _b ? _b : 10,
32779
+ maxSize = isNumber$1(size) ? size : Math.max(size[0], size[1]);
32642
32780
  tagHeight += Math.max(textHeight, shape.visible ? maxSize : 0);
32643
32781
  const {
32644
32782
  textAlign: textAlign,
@@ -32646,11 +32784,21 @@
32646
32784
  } = textStyle;
32647
32785
  (isValid$1(minWidth) || isValid$1(maxWidth)) && (isValid$1(minWidth) && tagWidth < minWidth && (tagWidth = minWidth), isValid$1(maxWidth) && tagWidth > maxWidth && (tagWidth = maxWidth, textShape.setAttribute("maxLineWidth", maxWidth - parsedPadding[1] - parsedPadding[2])));
32648
32786
  let x = 0,
32649
- y = 0;
32650
- "center" === textAlign ? (x -= tagWidth / 2, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth / 2), group.setAttribute("x", -symbolPlaceWidth / 2)) : "right" === textAlign || "end" === textAlign ? (x -= tagWidth, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth), group.setAttribute("x", -parsedPadding[1] - symbolPlaceWidth)) : "left" !== textAlign && "start" !== textAlign || group.setAttribute("x", parsedPadding[3]), !textAlwaysCenter || "left" !== textAlign && "start" !== textAlign || textShape.setAttributes({
32651
- x: textX + tagWidth / 2,
32652
- textAlign: "center"
32653
- }), "middle" === textBaseline ? (y -= tagHeight / 2, symbol && symbol.setAttribute("y", 0)) : "bottom" === textBaseline ? (y -= tagHeight, symbol && symbol.setAttribute("y", -textHeight / 2), group.setAttribute("y", -parsedPadding[2])) : "top" === textBaseline && (group.setAttribute("y", parsedPadding[0]), symbol && symbol.setAttribute("y", textHeight / 2));
32787
+ y = 0,
32788
+ flag = 0;
32789
+ if ("left" === textAlign || "start" === textAlign ? flag = 1 : "right" === textAlign || "end" === textAlign ? flag = -1 : "center" === textAlign && (flag = 0), flag ? flag < 0 ? (x -= tagWidth, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth), group.setAttribute("x", -parsedPadding[1] - symbolPlaceWidth)) : flag > 0 && group.setAttribute("x", parsedPadding[3]) : (x -= tagWidth / 2, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth / 2), group.setAttribute("x", -symbolPlaceWidth / 2)), textAlwaysCenter && flag) {
32790
+ const containerWidth = tagWidth - parsedPadding[1] - parsedPadding[3],
32791
+ tsWidth = textWidth + symbolPlaceWidth,
32792
+ textX = (containerWidth - tsWidth) / 2 + symbolPlaceWidth + textWidth / 2,
32793
+ symbolX = (containerWidth - tsWidth) / 2 + maxSize / 2;
32794
+ textShape.setAttributes({
32795
+ x: textX * flag,
32796
+ textAlign: "center"
32797
+ }), null == symbol || symbol.setAttributes({
32798
+ x: symbolX * flag
32799
+ }), group.setAttribute("x", parsedPadding[2 + flag] * flag);
32800
+ }
32801
+ "middle" === textBaseline ? (y -= tagHeight / 2, symbol && symbol.setAttribute("y", 0)) : "bottom" === textBaseline ? (y -= tagHeight, symbol && symbol.setAttribute("y", -textHeight / 2), group.setAttribute("y", -parsedPadding[2])) : "top" === textBaseline && (group.setAttribute("y", parsedPadding[0]), symbol && symbol.setAttribute("y", textHeight / 2));
32654
32802
  const {
32655
32803
  visible: bgVisible
32656
32804
  } = panel,
@@ -33910,18 +34058,7 @@
33910
34058
  state && !isEmpty(state) && (target.states = state);
33911
34059
  }
33912
34060
  _createLabelText(attributes) {
33913
- var _a, _b;
33914
- if ("rich" === attributes.textType) {
33915
- attributes.textConfig = attributes.text, attributes.width = null !== (_a = attributes.width) && void 0 !== _a ? _a : 0, attributes.height = null !== (_b = attributes.height) && void 0 !== _b ? _b : 0, attributes.maxWidth = attributes.maxLineWidth;
33916
- return graphicCreator.richtext(attributes);
33917
- }
33918
- if ("html" === attributes.textType) {
33919
- attributes.textConfig = [], attributes.html = Object.assign(Object.assign({
33920
- dom: attributes.text
33921
- }, DEFAULT_HTML_TEXT_SPEC), attributes);
33922
- return graphicCreator.richtext(attributes);
33923
- }
33924
- return graphicCreator.text(attributes);
34061
+ return isRichText(attributes, "textType") ? graphicCreator.richtext(richTextAttributeTransform(attributes)) : graphicCreator.text(attributes);
33925
34062
  }
33926
34063
  _prepare() {
33927
34064
  var _a, _b, _c, _d, _e;
@@ -33992,8 +34129,10 @@
33992
34129
  const textData = text.attribute,
33993
34130
  baseMark = this.getRelatedGraphic(textData);
33994
34131
  if (!baseMark) continue;
33995
- const textBounds = this.getGraphicBounds(text),
33996
- actualPosition = isFunction$1(position) ? position(textData) : position,
34132
+ text.attachedThemeGraphic = this;
34133
+ const textBounds = this.getGraphicBounds(text);
34134
+ text.attachedThemeGraphic = null;
34135
+ const actualPosition = isFunction$1(position) ? position(textData) : position,
33997
34136
  graphicBounds = this._isCollectionBase ? this.getGraphicBounds(null, this._idToPoint.get(textData.id), actualPosition) : this.getGraphicBounds(baseMark, {
33998
34137
  x: textData.x,
33999
34138
  y: textData.y
@@ -35157,7 +35296,7 @@
35157
35296
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Segment.defaultAttributes, attributes)), this.name = "segment";
35158
35297
  }
35159
35298
  render() {
35160
- this.removeAllChild(), this._reset();
35299
+ this.removeAllChild(!0), this._reset();
35161
35300
  const {
35162
35301
  startSymbol: startSymbol,
35163
35302
  endSymbol: endSymbol,
@@ -35426,7 +35565,7 @@
35426
35565
  return this.add(offscreenGroup), this._renderInner(offscreenGroup), this.removeChild(offscreenGroup), this.attribute = currentAttribute, offscreenGroup.AABBBounds;
35427
35566
  }
35428
35567
  render() {
35429
- this.removeAllChild(), this._prevInnerView = this._innerView, this._innerView = graphicCreator.group({
35568
+ this.removeAllChild(!0), this._prevInnerView = this._innerView, this._innerView = graphicCreator.group({
35430
35569
  x: 0,
35431
35570
  y: 0,
35432
35571
  pickable: !1
@@ -35533,12 +35672,10 @@
35533
35672
  pickable: !1
35534
35673
  });
35535
35674
  return labelGroup.name = `${AXIS_ELEMENT_NAME.labelContainer}-layer-${layer}`, labelGroup.id = this._getNodeId(`label-container-layer-${layer}`), container.add(labelGroup), data.forEach((item, index) => {
35536
- var _a, _b, _c;
35675
+ var _a;
35537
35676
  const labelStyle = this._getLabelAttribute(item, index, data, layer);
35538
35677
  let text;
35539
- if ("rich" === labelStyle.type ? (labelStyle.textConfig = labelStyle.text, labelStyle.width = null !== (_a = labelStyle.width) && void 0 !== _a ? _a : 0, labelStyle.height = null !== (_b = labelStyle.height) && void 0 !== _b ? _b : 0, text = graphicCreator.richtext(labelStyle)) : "html" === labelStyle.type ? (labelStyle.textConfig = [], labelStyle.html = Object.assign(Object.assign({
35540
- dom: labelStyle.text
35541
- }, DEFAULT_HTML_TEXT_SPEC), labelStyle), text = graphicCreator.richtext(labelStyle)) : text = graphicCreator.text(labelStyle), text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty(null === (_c = this.attribute.label) || void 0 === _c ? void 0 : _c.state)) text.states = DEFAULT_STATES$2;else {
35678
+ if (text = isRichText(labelStyle) ? graphicCreator.richtext(richTextAttributeTransform(labelStyle)) : graphicCreator.text(labelStyle), text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty(null === (_a = this.attribute.label) || void 0 === _a ? void 0 : _a.state)) text.states = DEFAULT_STATES$2;else {
35542
35679
  const labelState = merge$2({}, DEFAULT_STATES$2, this.attribute.label.state);
35543
35680
  Object.keys(labelState).forEach(key => {
35544
35681
  isFunction$1(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
@@ -36664,7 +36801,7 @@
36664
36801
  return this._prevInnerView;
36665
36802
  }
36666
36803
  render() {
36667
- this.removeAllChild(), this._prevInnerView = this._innerView, this._innerView = graphicCreator.group({
36804
+ this.removeAllChild(!0), this._prevInnerView = this._innerView, this._innerView = graphicCreator.group({
36668
36805
  x: 0,
36669
36806
  y: 0,
36670
36807
  pickable: !1
@@ -37183,10 +37320,10 @@
37183
37320
  }, this._statePointToData = state => state, this._onHandlerPointerDown = (e, tag) => {
37184
37321
  e.stopPropagation(), "start" === tag ? (this._activeTag = DataZoomActiveTag.startHandler, this._activeItem = this._startHandlerMask) : "end" === tag ? (this._activeTag = DataZoomActiveTag.endHandler, this._activeItem = this._endHandlerMask) : "middleRect" === tag ? (this._activeTag = DataZoomActiveTag.middleHandler, this._activeItem = this._middleHandlerRect) : "middleSymbol" === tag ? (this._activeTag = DataZoomActiveTag.middleHandler, this._activeItem = this._middleHandlerSymbol) : "background" === tag && (this._activeTag = DataZoomActiveTag.background, this._activeItem = this._background), this._activeState = !0, this._activeCache.startPos = this.eventPosToStagePos(e), this._activeCache.lastPos = this.eventPosToStagePos(e), "browser" === vglobal.env && (vglobal.addEventListener("pointermove", this._onHandlerPointerMove, {
37185
37322
  capture: !0
37186
- }), vglobal.addEventListener("pointerup", this._onHandlerPointerUp.bind(this))), this.addEventListener("pointermove", this._onHandlerPointerMove, {
37323
+ }), vglobal.addEventListener("pointerup", this._onHandlerPointerUp)), this.addEventListener("pointermove", this._onHandlerPointerMove, {
37187
37324
  capture: !0
37188
37325
  });
37189
- }, this._onHandlerPointerMove = delayMap$2[this.attribute.delayType](e => {
37326
+ }, this._pointerMove = e => {
37190
37327
  e.stopPropagation();
37191
37328
  const {
37192
37329
  start: startAttr,
@@ -37204,12 +37341,33 @@
37204
37341
  start: start,
37205
37342
  end: end
37206
37343
  } = this.state;
37207
- this._activeState && (this._activeTag === DataZoomActiveTag.middleHandler ? this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis) : this._activeTag === DataZoomActiveTag.startHandler ? start + dis > end ? (start = end, end = start + dis, this._activeTag = DataZoomActiveTag.endHandler) : start += dis : this._activeTag === DataZoomActiveTag.endHandler && (end + dis < start ? (end = start, start = end + dis, this._activeTag = DataZoomActiveTag.startHandler) : end += dis), this._activeCache.lastPos = pos, brushSelect && this.renderDragMask()), start = Math.min(Math.max(start, 0), 1), end = Math.min(Math.max(end, 0), 1), startAttr === start && endAttr === end || (this.setStateAttr(start, end, !0), this._dispatchEvent("change", {
37344
+ this._activeState && (this._activeTag === DataZoomActiveTag.middleHandler ? this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis) : this._activeTag === DataZoomActiveTag.startHandler ? start + dis > end ? (start = end, end = start + dis, this._activeTag = DataZoomActiveTag.endHandler) : start += dis : this._activeTag === DataZoomActiveTag.endHandler && (end + dis < start ? (end = start, start = end + dis, this._activeTag = DataZoomActiveTag.startHandler) : end += dis), this._activeCache.lastPos = pos, brushSelect && this.renderDragMask()), start = Math.min(Math.max(start, 0), 1), end = Math.min(Math.max(end, 0), 1), !realTime || startAttr === start && endAttr === end || (this.setStateAttr(start, end, !0), this._dispatchEvent("change", {
37208
37345
  start: start,
37209
37346
  end: end,
37210
37347
  tag: this._activeTag
37211
37348
  }));
37212
- }, this.attribute.delayTime);
37349
+ }, this._onHandlerPointerMove = 0 === this.attribute.delayTime ? this._pointerMove : delayMap$2[this.attribute.delayType](this._pointerMove, this.attribute.delayTime), this._onHandlerPointerUp = e => {
37350
+ e.preventDefault();
37351
+ const {
37352
+ start: start,
37353
+ end: end,
37354
+ brushSelect: brushSelect,
37355
+ realTime = !0
37356
+ } = this.attribute;
37357
+ if (this._activeState && this._activeTag === DataZoomActiveTag.background) {
37358
+ const pos = this.eventPosToStagePos(e);
37359
+ this.backgroundDragZoom(this._activeCache.startPos, pos);
37360
+ }
37361
+ this._activeState = !1, brushSelect && this.renderDragMask(), realTime && start === this.state.start && end === this.state.end || (this.setStateAttr(this.state.start, this.state.end, !0), this._dispatchEvent("change", {
37362
+ start: this.state.start,
37363
+ end: this.state.end,
37364
+ tag: this._activeTag
37365
+ })), "browser" === vglobal.env && (vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
37366
+ capture: !0
37367
+ }), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)), this.removeEventListener("pointermove", this._onHandlerPointerMove, {
37368
+ capture: !0
37369
+ }), this.removeEventListener("pointerup", this._onHandlerPointerUp);
37370
+ };
37213
37371
  const {
37214
37372
  position: position,
37215
37373
  showDetail: showDetail
@@ -37262,28 +37420,6 @@
37262
37420
  y: y - ((null === (_b = this.stage) || void 0 === _b ? void 0 : _b.y) || 0)
37263
37421
  };
37264
37422
  }
37265
- _onHandlerPointerUp(e) {
37266
- e.preventDefault();
37267
- const {
37268
- start: start,
37269
- end: end,
37270
- brushSelect: brushSelect,
37271
- realTime = !0
37272
- } = this.attribute;
37273
- if (this._activeState && this._activeTag === DataZoomActiveTag.background) {
37274
- const pos = this.eventPosToStagePos(e);
37275
- this.backgroundDragZoom(this._activeCache.startPos, pos);
37276
- }
37277
- this._activeState = !1, brushSelect && this.renderDragMask(), realTime && start === this.state.start && end === this.state.end || (this.setStateAttr(this.state.start, this.state.end, !0), this._dispatchEvent("change", {
37278
- start: this.state.start,
37279
- end: this.state.end,
37280
- tag: this._activeTag
37281
- })), "browser" === vglobal.env && (vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
37282
- capture: !0
37283
- }), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp.bind(this))), this.removeEventListener("pointermove", this._onHandlerPointerMove, {
37284
- capture: !0
37285
- });
37286
- }
37287
37423
  _onHandlerPointerEnter(e) {
37288
37424
  e.stopPropagation(), this._showText = !0, this.renderText();
37289
37425
  }
@@ -37472,7 +37608,7 @@
37472
37608
  }, this._layoutAttrFromConfig;
37473
37609
  }
37474
37610
  render() {
37475
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
37611
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
37476
37612
  this._layoutAttrFromConfig = null;
37477
37613
  const {
37478
37614
  orient: orient,
@@ -37505,15 +37641,15 @@
37505
37641
  height: height,
37506
37642
  cursor: brushSelect ? "crosshair" : "auto"
37507
37643
  }, backgroundStyle), {
37508
- pickable: !zoomLock
37509
- }), "rect"), (null === (_c = backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group), (null === (_d = backgroundChartStyle.area) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("area", group), brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
37644
+ pickable: !zoomLock && (null === (_c = backgroundStyle.pickable) || void 0 === _c || _c)
37645
+ }), "rect"), (null === (_d = backgroundChartStyle.line) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("line", group), (null === (_e = backgroundChartStyle.area) || void 0 === _e ? void 0 : _e.visible) && this.setPreviewAttributes("area", group), brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
37510
37646
  x: position.x + start * width,
37511
37647
  y: position.y,
37512
37648
  width: (end - start) * width,
37513
37649
  height: height,
37514
37650
  cursor: brushSelect ? "crosshair" : "move"
37515
37651
  }, selectedBackgroundStyle), {
37516
- pickable: !zoomLock
37652
+ pickable: !zoomLock && (null === (_f = selectedBackgroundChartStyle.pickable) || void 0 === _f || _f)
37517
37653
  }), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
37518
37654
  x: position.x,
37519
37655
  y: position.y + start * height,
@@ -37521,41 +37657,41 @@
37521
37657
  height: (end - start) * height,
37522
37658
  cursor: brushSelect ? "crosshair" : "move"
37523
37659
  }, selectedBackgroundStyle), {
37524
- pickable: !zoomLock
37525
- }), "rect"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group), (null === (_f = selectedBackgroundChartStyle.area) || void 0 === _f ? void 0 : _f.visible) && this.setSelectedPreviewAttributes("area", group), this._isHorizontal) {
37660
+ pickable: !zoomLock && (null === (_g = selectedBackgroundStyle.pickable) || void 0 === _g || _g)
37661
+ }), "rect"), (null === (_h = selectedBackgroundChartStyle.line) || void 0 === _h ? void 0 : _h.visible) && this.setSelectedPreviewAttributes("line", group), (null === (_j = selectedBackgroundChartStyle.area) || void 0 === _j ? void 0 : _j.visible) && this.setSelectedPreviewAttributes("area", group), this._isHorizontal) {
37526
37662
  if (middleHandlerStyle.visible) {
37527
- const middleHandlerBackgroundSize = (null === (_g = middleHandlerStyle.background) || void 0 === _g ? void 0 : _g.size) || 10;
37663
+ const middleHandlerBackgroundSize = (null === (_k = middleHandlerStyle.background) || void 0 === _k ? void 0 : _k.size) || 10;
37528
37664
  this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
37529
37665
  x: position.x + start * width,
37530
37666
  y: position.y - middleHandlerBackgroundSize,
37531
37667
  width: (end - start) * width,
37532
37668
  height: middleHandlerBackgroundSize
37533
- }, null === (_h = middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.style), {
37534
- pickable: !zoomLock
37669
+ }, null === (_l = middleHandlerStyle.background) || void 0 === _l ? void 0 : _l.style), {
37670
+ pickable: !zoomLock && (null === (_p = null === (_o = null === (_m = middleHandlerStyle.background) || void 0 === _m ? void 0 : _m.style) || void 0 === _o ? void 0 : _o.pickable) || void 0 === _p || _p)
37535
37671
  }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
37536
37672
  x: position.x + (start + end) / 2 * width,
37537
37673
  y: position.y - middleHandlerBackgroundSize / 2,
37538
37674
  strokeBoundsBuffer: 0,
37539
37675
  angle: 0,
37540
- symbolType: null !== (_k = null === (_j = middleHandlerStyle.icon) || void 0 === _j ? void 0 : _j.symbolType) && void 0 !== _k ? _k : "square"
37676
+ symbolType: null !== (_r = null === (_q = middleHandlerStyle.icon) || void 0 === _q ? void 0 : _q.symbolType) && void 0 !== _r ? _r : "square"
37541
37677
  }, middleHandlerStyle.icon), {
37542
- pickable: !zoomLock
37678
+ pickable: !zoomLock && (null === (_s = middleHandlerStyle.icon.pickable) || void 0 === _s || _s)
37543
37679
  }), "symbol");
37544
37680
  }
37545
37681
  this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
37546
37682
  x: position.x + start * width,
37547
37683
  y: position.y + height / 2,
37548
37684
  size: height,
37549
- symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
37685
+ symbolType: null !== (_t = startHandlerStyle.symbolType) && void 0 !== _t ? _t : "square"
37550
37686
  }, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), {
37551
- pickable: !zoomLock
37687
+ pickable: !zoomLock && (null === (_u = startHandlerStyle.pickable) || void 0 === _u || _u)
37552
37688
  }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
37553
37689
  x: position.x + end * width,
37554
37690
  y: position.y + height / 2,
37555
37691
  size: height,
37556
- symbolType: null !== (_m = endHandlerStyle.symbolType) && void 0 !== _m ? _m : "square"
37692
+ symbolType: null !== (_v = endHandlerStyle.symbolType) && void 0 !== _v ? _v : "square"
37557
37693
  }, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), {
37558
- pickable: !zoomLock
37694
+ pickable: !zoomLock && (null === (_w = endHandlerStyle.pickable) || void 0 === _w || _w)
37559
37695
  }), "symbol");
37560
37696
  const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
37561
37697
  startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize),
@@ -37584,38 +37720,38 @@
37584
37720
  }), "rect");
37585
37721
  } else {
37586
37722
  if (middleHandlerStyle.visible) {
37587
- const middleHandlerBackgroundSize = (null === (_o = middleHandlerStyle.background) || void 0 === _o ? void 0 : _o.size) || 10;
37723
+ const middleHandlerBackgroundSize = (null === (_x = middleHandlerStyle.background) || void 0 === _x ? void 0 : _x.size) || 10;
37588
37724
  this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
37589
37725
  x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
37590
37726
  y: position.y + start * height,
37591
37727
  width: middleHandlerBackgroundSize,
37592
37728
  height: (end - start) * height
37593
- }, null === (_p = middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.style), {
37594
- pickable: !zoomLock
37729
+ }, null === (_y = middleHandlerStyle.background) || void 0 === _y ? void 0 : _y.style), {
37730
+ pickable: !zoomLock && (null === (_1 = null === (_0 = null === (_z = middleHandlerStyle.background) || void 0 === _z ? void 0 : _z.style) || void 0 === _0 ? void 0 : _0.pickable) || void 0 === _1 || _1)
37595
37731
  }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
37596
37732
  x: "left" === orient ? position.x - middleHandlerBackgroundSize / 2 : position.x + width + middleHandlerBackgroundSize / 2,
37597
37733
  y: position.y + (start + end) / 2 * height,
37598
37734
  angle: Math.PI / 180 * 90,
37599
- symbolType: null !== (_r = null === (_q = middleHandlerStyle.icon) || void 0 === _q ? void 0 : _q.symbolType) && void 0 !== _r ? _r : "square",
37735
+ symbolType: null !== (_3 = null === (_2 = middleHandlerStyle.icon) || void 0 === _2 ? void 0 : _2.symbolType) && void 0 !== _3 ? _3 : "square",
37600
37736
  strokeBoundsBuffer: 0
37601
37737
  }, middleHandlerStyle.icon), {
37602
- pickable: !zoomLock
37738
+ pickable: !zoomLock && (null === (_5 = null === (_4 = middleHandlerStyle.icon) || void 0 === _4 ? void 0 : _4.pickable) || void 0 === _5 || _5)
37603
37739
  }), "symbol");
37604
37740
  }
37605
37741
  this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
37606
37742
  x: position.x + width / 2,
37607
37743
  y: position.y + start * height,
37608
37744
  size: width,
37609
- symbolType: null !== (_s = startHandlerStyle.symbolType) && void 0 !== _s ? _s : "square"
37745
+ symbolType: null !== (_6 = startHandlerStyle.symbolType) && void 0 !== _6 ? _6 : "square"
37610
37746
  }, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), {
37611
- pickable: !zoomLock
37747
+ pickable: !zoomLock && (null === (_7 = startHandlerStyle.pickable) || void 0 === _7 || _7)
37612
37748
  }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
37613
37749
  x: position.x + width / 2,
37614
37750
  y: position.y + end * height,
37615
37751
  size: width,
37616
- symbolType: null !== (_t = endHandlerStyle.symbolType) && void 0 !== _t ? _t : "square"
37752
+ symbolType: null !== (_8 = endHandlerStyle.symbolType) && void 0 !== _8 ? _8 : "square"
37617
37753
  }, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
37618
- pickable: !zoomLock
37754
+ pickable: !zoomLock && (null === (_9 = endHandlerStyle.pickable) || void 0 === _9 || _9)
37619
37755
  }), "symbol");
37620
37756
  const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
37621
37757
  startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize),
@@ -37877,7 +38013,7 @@
37877
38013
  var _a;
37878
38014
  this.setAttribute("pickable", !1);
37879
38015
  const markerVisible = null === (_a = this.attribute.visible) || void 0 === _a || _a;
37880
- !1 === this.attribute.interactive && this.setAttribute("childrenPickable", !1), markerVisible && this.isValidPoints() ? this._container ? (this._updateContainer(), this.updateMarker()) : (this._initContainer(), this.initMarker(this._container)) : (this._container = null, this.removeAllChild());
38016
+ !1 === this.attribute.interactive && this.setAttribute("childrenPickable", !1), markerVisible && this.isValidPoints() ? this._container ? (this._updateContainer(), this.updateMarker()) : (this._initContainer(), this.initMarker(this._container)) : (this._container = null, this.removeAllChild(!0));
37881
38017
  }
37882
38018
  }
37883
38019
 
@@ -38664,8 +38800,8 @@
38664
38800
  textAlign: "center",
38665
38801
  textBaseline: "middle"
38666
38802
  }, textStyle), null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme().text.fontFamily),
38667
- handlerSizeX = isNumber$2(handlerSize) ? handlerSize : handlerSize[0],
38668
- handlerSizeY = isNumber$2(handlerSize) ? handlerSize : handlerSize[1],
38803
+ handlerSizeX = isNumber$1(handlerSize) ? handlerSize : handlerSize[0],
38804
+ handlerSizeY = isNumber$1(handlerSize) ? handlerSize : handlerSize[1],
38669
38805
  text = graphicCreator.text(Object.assign({
38670
38806
  x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
38671
38807
  y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
@@ -38694,7 +38830,7 @@
38694
38830
  this.attribute.disableTriggerEvent || (this.preHandler && (this.preHandler.addEventListener("pointerenter", this._onHover), this.preHandler.addEventListener("pointerleave", this._onUnHover), this.preHandler.addEventListener("pointerdown", this._onClick)), this.nextHandler && (this.nextHandler.addEventListener("pointerenter", this._onHover), this.nextHandler.addEventListener("pointerleave", this._onUnHover), this.nextHandler.addEventListener("pointerdown", this._onClick)));
38695
38831
  }
38696
38832
  _reset() {
38697
- this.removeAllChild(), this._current = 1, this._total = this.attribute.total, this.preHandler = this.nextHandler = this.text = null;
38833
+ this.removeAllChild(!0), this._current = 1, this._total = this.attribute.total, this.preHandler = this.nextHandler = this.text = null;
38698
38834
  }
38699
38835
  }
38700
38836
  Pager.defaultAttributes = {
@@ -38731,7 +38867,7 @@
38731
38867
  super(...arguments), this.name = "legend", this._title = null;
38732
38868
  }
38733
38869
  render() {
38734
- this.removeAllChild();
38870
+ this.removeAllChild(!0);
38735
38871
  const {
38736
38872
  interactive = !0,
38737
38873
  title: title,
@@ -38994,7 +39130,8 @@
38994
39130
  shape.fill && isNil$1(shapeStyle.state[key].fill) && color && (shapeStyle.state[key].fill = color), shape.stroke && isNil$1(shapeStyle.state[key].stroke) && color && (shapeStyle.state[key].stroke = color);
38995
39131
  }), this._appendDataToShape(itemShape, LEGEND_ELEMENT_NAME.itemShape, item, itemGroup, shapeStyle.state), itemShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(itemShape);
38996
39132
  }
38997
- let focusSpace = 0;
39133
+ let labelShape,
39134
+ focusSpace = 0;
38998
39135
  if (focus) {
38999
39136
  const focusSize = get$1(focusIconStyle, "size", DEFAULT_SHAPE_SIZE);
39000
39137
  focusShape = graphicCreator.symbol(Object.assign(Object.assign({
@@ -39007,29 +39144,32 @@
39007
39144
  boundsPadding: parsedPadding
39008
39145
  })), this._appendDataToShape(focusShape, LEGEND_ELEMENT_NAME.focus, item, itemGroup), focusSpace = focusSize;
39009
39146
  }
39010
- const labelShape = graphicCreator.text(Object.assign(Object.assign({
39011
- x: shapeSize / 2 + shapeSpace,
39012
- y: 0,
39013
- textAlign: "start",
39014
- textBaseline: "middle",
39015
- lineHeight: null === (_b = labelStyle.style) || void 0 === _b ? void 0 : _b.fontSize
39016
- }, labelStyle.style), {
39017
- text: labelAttr.formatMethod ? labelAttr.formatMethod(label, item, index) : label
39018
- }));
39019
- this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelStyle.state), labelShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(labelShape);
39147
+ const text = labelAttr.formatMethod ? labelAttr.formatMethod(label, item, index) : label,
39148
+ labelAttributes = Object.assign(Object.assign({
39149
+ x: shapeSize / 2 + shapeSpace,
39150
+ y: 0,
39151
+ textAlign: "start",
39152
+ textBaseline: "middle",
39153
+ lineHeight: null === (_b = labelStyle.style) || void 0 === _b ? void 0 : _b.fontSize
39154
+ }, labelStyle.style), {
39155
+ text: text
39156
+ });
39157
+ labelShape = isRichText(labelAttributes) ? graphicCreator.richtext(richTextAttributeTransform(labelAttributes)) : graphicCreator.text(labelAttributes), this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelStyle.state), labelShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(labelShape);
39020
39158
  const labelSpace = get$1(labelAttr, "space", DEFAULT_LABEL_SPACE);
39021
39159
  if (isValid$1(value)) {
39022
39160
  const valueSpace = get$1(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
39023
- valueShape = graphicCreator.text(Object.assign(Object.assign({
39161
+ valueText = valueAttr.formatMethod ? valueAttr.formatMethod(value, item, index) : value,
39162
+ valueAttributes = Object.assign(Object.assign({
39024
39163
  x: 0,
39025
39164
  y: 0,
39026
39165
  textAlign: "start",
39027
39166
  textBaseline: "middle",
39028
39167
  lineHeight: valueStyle.style.fontSize
39029
39168
  }, valueStyle.style), {
39030
- text: valueAttr.formatMethod ? valueAttr.formatMethod(value, item, index) : value
39031
- }));
39032
- if (this._appendDataToShape(valueShape, LEGEND_ELEMENT_NAME.itemValue, item, itemGroup, valueStyle.state), valueShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), this._itemWidthByUser) {
39169
+ text: valueText
39170
+ });
39171
+ let valueShape;
39172
+ if (valueShape = isRichText(valueAttributes) ? graphicCreator.richtext(richTextAttributeTransform(valueAttributes)) : graphicCreator.text(valueAttributes), this._appendDataToShape(valueShape, LEGEND_ELEMENT_NAME.itemValue, item, itemGroup, valueStyle.state), valueShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), this._itemWidthByUser) {
39033
39173
  const layoutWidth = this._itemWidthByUser - parsedPadding[1] - parsedPadding[3] - shapeSize - shapeSpace - labelSpace - focusSpace - valueSpace,
39034
39174
  valueBounds = valueShape.AABBBounds,
39035
39175
  labelBounds = labelShape.AABBBounds,
@@ -39448,7 +39588,7 @@
39448
39588
  }
39449
39589
  render() {
39450
39590
  var _a, _b;
39451
- this.removeAllChild();
39591
+ this.removeAllChild(!0);
39452
39592
  const {
39453
39593
  layout = "horizontal",
39454
39594
  railWidth: railWidth,
@@ -40261,7 +40401,7 @@
40261
40401
  super(...arguments), this.name = "indicator";
40262
40402
  }
40263
40403
  render() {
40264
- var _a, _b, _c;
40404
+ var _a;
40265
40405
  const {
40266
40406
  visible: visible,
40267
40407
  title = {},
@@ -40278,20 +40418,7 @@
40278
40418
  if (!0 !== visible) return void (group && group.hideAll());
40279
40419
  if (isValid$1(title)) if (!1 !== title.visible) {
40280
40420
  const titleStyle = merge$2({}, get$1(DEFAULT_INDICATOR_THEME, "title.style"), title.style);
40281
- "rich" === titleStyle.type ? this._title = group.createOrUpdateChild("indicator-title", Object.assign(Object.assign({
40282
- textConfig: titleStyle.text
40283
- }, titleStyle), {
40284
- visible: title.visible,
40285
- x: 0,
40286
- y: 0,
40287
- width: null !== (_a = titleStyle.width) && void 0 !== _a ? _a : 0,
40288
- height: null !== (_b = titleStyle.height) && void 0 !== _b ? _b : 0
40289
- }), "richtext") : "html" === titleStyle.type ? this._title = group.createOrUpdateChild("indicator-title", Object.assign(Object.assign({
40290
- textConfig: [],
40291
- html: Object.assign(Object.assign({
40292
- dom: titleStyle.text
40293
- }, DEFAULT_HTML_TEXT_SPEC), titleStyle)
40294
- }, titleStyle), {
40421
+ isRichText(titleStyle) ? this._title = group.createOrUpdateChild("indicator-title", Object.assign(Object.assign({}, richTextAttributeTransform(titleStyle)), {
40295
40422
  visible: title.visible,
40296
40423
  x: 0,
40297
40424
  y: 0
@@ -40309,24 +40436,10 @@
40309
40436
  const contents = array(content),
40310
40437
  contentComponents = [];
40311
40438
  contents.forEach((contentItem, i) => {
40312
- var _a, _b;
40313
40439
  if (!1 !== contentItem.visible) {
40314
40440
  const contentStyle = merge$2({}, get$1(DEFAULT_INDICATOR_THEME, "content.style"), contentItem.style);
40315
40441
  let contentComponent;
40316
- contentComponent = "rich" === contentStyle.type ? group.createOrUpdateChild("indicator-content-" + i, Object.assign(Object.assign({
40317
- textConfig: contentStyle.text
40318
- }, contentStyle), {
40319
- visible: title.visible,
40320
- x: 0,
40321
- y: 0,
40322
- width: null !== (_a = contentStyle.width) && void 0 !== _a ? _a : 0,
40323
- height: null !== (_b = contentStyle.height) && void 0 !== _b ? _b : 0
40324
- }), "richtext") : "html" === contentStyle.type ? group.createOrUpdateChild("indicator-content-" + i, Object.assign(Object.assign({
40325
- textConfig: [],
40326
- html: Object.assign(Object.assign({
40327
- dom: contentStyle.text
40328
- }, DEFAULT_HTML_TEXT_SPEC), contentStyle)
40329
- }, contentStyle), {
40442
+ contentComponent = isRichText(contentStyle) ? group.createOrUpdateChild("indicator-content-" + i, Object.assign(Object.assign({}, richTextAttributeTransform(contentStyle)), {
40330
40443
  visible: title.visible,
40331
40444
  x: 0,
40332
40445
  y: 0
@@ -40343,7 +40456,7 @@
40343
40456
  }), this._content = contentComponents;
40344
40457
  }
40345
40458
  this._setGlobalAutoFit(limit), this._setYPosition();
40346
- const totalHeight = null !== (_c = null == group ? void 0 : group.AABBBounds.height()) && void 0 !== _c ? _c : 0;
40459
+ const totalHeight = null !== (_a = null == group ? void 0 : group.AABBBounds.height()) && void 0 !== _a ? _a : 0;
40347
40460
  group.setAttribute("y", size.height / 2 - totalHeight / 2), group.setAttribute("x", size.width / 2);
40348
40461
  }
40349
40462
  _setLocalAutoFit(limit, indicatorItem, indicatorItemSpec) {
@@ -40719,7 +40832,7 @@
40719
40832
  railSectionLength = null !== (_a = isHorizontal$1(this._orient) ? this._railStyle.height : this._railStyle.width) && void 0 !== _a ? _a : RailDefaultSize[1],
40720
40833
  controllerPx = controllers.reduce((len, controller) => {
40721
40834
  const size = controller.style.size,
40722
- maxSize = isNumber$2(size) ? size : max$1(size[0], size[1]);
40835
+ maxSize = isNumber$1(size) ? size : max$1(size[0], size[1]);
40723
40836
  return len + controller.space + maxSize;
40724
40837
  }, 0),
40725
40838
  sliderPx = this._sliderVisible ? (isHorizontal$1(this._orient) ? null === (_b = this._size) || void 0 === _b ? void 0 : _b.width : null === (_c = this._size) || void 0 === _c ? void 0 : _c.height) - controllerPx : 0,
@@ -40732,7 +40845,7 @@
40732
40845
  size: size
40733
40846
  }
40734
40847
  } = controller,
40735
- maxSize = isNumber$2(size) ? size : max$1(size[0], size[1]);
40848
+ maxSize = isNumber$1(size) ? size : max$1(size[0], size[1]);
40736
40849
  return this._layoutInfo[key] = Object.assign(Object.assign({}, this._layoutInfo[key]), {
40737
40850
  size: maxSize,
40738
40851
  x: isHorizontal$1(this._orient) ? px + space : (this._size.width - maxSize) / 2,
@@ -40751,7 +40864,7 @@
40751
40864
  size: size
40752
40865
  }
40753
40866
  } = controller,
40754
- maxSize = isNumber$2(size) ? size : max$1(size[0], size[1]);
40867
+ maxSize = isNumber$1(size) ? size : max$1(size[0], size[1]);
40755
40868
  return this._layoutInfo[key] = Object.assign(Object.assign({}, this._layoutInfo[key]), {
40756
40869
  size: maxSize,
40757
40870
  x: isHorizontal$1(this._orient) ? px + space : (this._size.width - maxSize) / 2,
@@ -41431,7 +41544,7 @@
41431
41544
  const titleHeight = isVisible(titleAttr) ? titleAttr.height + titleAttr.spaceRow : 0;
41432
41545
  if (this._tooltipContent = this.createOrUpdateChild("tooltip-content", {
41433
41546
  visible: !0
41434
- }, "group"), this._tooltipContent.removeAllChild(), content && content.length) {
41547
+ }, "group"), this._tooltipContent.removeAllChild(!0), content && content.length) {
41435
41548
  this._tooltipContent.setAttribute("x", padding[3]), this._tooltipContent.setAttribute("y", padding[0] + titleHeight);
41436
41549
  let lastYPos = 0;
41437
41550
  content.forEach((item, i) => {
@@ -42641,7 +42754,7 @@
42641
42754
  };
42642
42755
  const normalizePadding = value => {
42643
42756
  var _a, _b, _c, _d;
42644
- return isNumber$2(value) ? {
42757
+ return isNumber$1(value) ? {
42645
42758
  top: value,
42646
42759
  bottom: value,
42647
42760
  left: value,
@@ -43523,10 +43636,10 @@
43523
43636
  delayAfter: delayAfter
43524
43637
  }), loopTime += delay + duration + delayAfter;
43525
43638
  });
43526
- const oneByOneDelay = isNumber$2(oneByOne) ? oneByOne : !0 === oneByOne ? loopTime : 0;
43639
+ const oneByOneDelay = isNumber$1(oneByOne) ? oneByOne : !0 === oneByOne ? loopTime : 0;
43527
43640
  return {
43528
43641
  initialDelay: startTime,
43529
- loopCount: isNumber$2(loop) ? loop : !0 === loop ? 1 / 0 : 1,
43642
+ loopCount: isNumber$1(loop) ? loop : !0 === loop ? 1 / 0 : 1,
43530
43643
  loopDelay: oneByOneDelay * index,
43531
43644
  loopDelayAfter: oneByOneDelay * (elementCount - index - 1),
43532
43645
  loopAnimateDuration: loopTime,
@@ -43626,7 +43739,7 @@
43626
43739
  if (this.markType === GrammarMarkType.group) return;
43627
43740
  const res = groupData(null != data ? data : DefaultMarkData, this.spec.groupBy, this.spec.groupSort),
43628
43741
  groupKeys = res.keys;
43629
- this._groupKeys = groupKeys, this.differ.setCurrentData(res);
43742
+ this._groupKeys = groupKeys, this._groupEncodeResult = null, this.differ.setCurrentData(res);
43630
43743
  }
43631
43744
  _getTransformsAfterEncodeItems() {
43632
43745
  return this.transforms && this.transforms.filter(entry => "afterEncodeItems" === entry.markPhase);
@@ -43697,7 +43810,7 @@
43697
43810
  return nextTransforms && (this.attach(nextTransforms.refs), this.transforms = nextTransforms.transforms), this.spec.transform = transforms, this.commit(), this;
43698
43811
  }
43699
43812
  configure(config) {
43700
- const keys = ["clip", "zIndex", "interactive", "context", "setCustomizedShape", "large", "largeThreshold", "progressiveStep", "progressiveThreshold", "support3d", "morph", "morphKey", "morphElementKey", "attributeTransforms", "skipTheme", "enableSegments", "stateSort"];
43813
+ const keys = ["clip", "clipPath", "zIndex", "interactive", "context", "setCustomizedShape", "large", "largeThreshold", "progressiveStep", "progressiveThreshold", "support3d", "morph", "morphKey", "morphElementKey", "attributeTransforms", "skipTheme", "enableSegments", "stateSort"];
43701
43814
  return null === config ? (keys.forEach(key => {
43702
43815
  isNil$1(this.spec[key]) || (this.spec[key] = void 0);
43703
43816
  }), this) : (keys.forEach(key => {
@@ -43777,7 +43890,7 @@
43777
43890
  this.graphicIndex = markIndex;
43778
43891
  }
43779
43892
  update(spec) {
43780
- this._context = this.spec.context, this.isUpdated = !0, this.renderContext.progressive || (spec.animation && this.animate.updateConfig(spec.animation), this.animate.updateState(spec.animationState)), this.markType !== GrammarMarkType.group ? (isNil$1(spec.zIndex) || this.graphicItem.setAttribute("zIndex", spec.zIndex), isNil$1(spec.clip) || this.graphicItem.setAttribute("clip", spec.clip), this.elementMap.forEach(element => {
43893
+ this._context = this.spec.context, this.isUpdated = !0, this.renderContext.progressive || (spec.animation && this.animate.updateConfig(spec.animation), this.animate.updateState(spec.animationState)), this.markType !== GrammarMarkType.group ? (isNil$1(spec.zIndex) || this.graphicItem.setAttribute("zIndex", spec.zIndex), isNil$1(spec.clip) || this.graphicItem.setAttribute("clip", spec.clip), isNil$1(spec.clipPath) || this.graphicItem.setAttribute("path", isArray$1(spec.clipPath) ? spec.clipPath : spec.clipPath(this.elements)), this.elementMap.forEach(element => {
43781
43894
  element.updateGraphicItem({
43782
43895
  interactive: spec.interactive
43783
43896
  });
@@ -43785,7 +43898,8 @@
43785
43898
  element.updateGraphicItem({
43786
43899
  clip: spec.clip,
43787
43900
  zIndex: spec.zIndex,
43788
- interactive: spec.interactive
43901
+ interactive: spec.interactive,
43902
+ clipPath: spec.clipPath
43789
43903
  });
43790
43904
  });
43791
43905
  }
@@ -43834,25 +43948,27 @@
43834
43948
  items = [Object.assign({}, null === (_a = el.items) || void 0 === _a ? void 0 : _a[0], {
43835
43949
  nextAttrs: nextAttrs
43836
43950
  })];
43837
- return invokeEncoderToItems(el, items, groupEncode, parameters), nextAttrs;
43951
+ return invokeEncoderToItems(el, items, groupEncode, parameters), this._groupEncodeResult = nextAttrs, nextAttrs;
43838
43952
  }
43839
43953
  if (!this._groupKeys || !groupEncode) return;
43840
43954
  const res = {};
43841
43955
  return this._groupKeys.forEach(key => {
43842
43956
  const el = elements.find(el => el.groupKey === key);
43843
43957
  el && (res[key] = invokeEncoder(groupEncode, el.items && el.items[0] && el.items[0].datum, el, parameters));
43844
- }), res;
43958
+ }), this._groupEncodeResult = res, res;
43845
43959
  }
43846
- evaluateEncode(elements, encoders, parameters) {
43960
+ evaluateEncode(elements, encoders, parameters, noGroupEncode) {
43847
43961
  if (encoders) {
43848
43962
  this.emit(exports.VGRAMMAR_HOOK_EVENT.BEFORE_ELEMENT_ENCODE, {
43849
43963
  encoders: encoders,
43850
43964
  parameters: parameters
43851
43965
  }, this);
43852
- const groupEncodeAttrs = this.evaluateGroupEncode(elements, encoders[BuiltInEncodeNames.group], parameters);
43966
+ const groupEncodeAttrs = noGroupEncode ? null : this.evaluateGroupEncode(elements, encoders[BuiltInEncodeNames.group], parameters);
43853
43967
  elements.forEach(element => {
43854
43968
  this.markType === GrammarMarkType.group && groupEncodeAttrs ? element.items.forEach(item => {
43855
43969
  item.nextAttrs = Object.assign(item.nextAttrs, groupEncodeAttrs);
43970
+ }) : this.markType === GrammarMarkType.glyph && this._groupEncodeResult ? element.items.forEach(item => {
43971
+ item.nextAttrs = Object.assign(item.nextAttrs, this._groupEncodeResult[element.groupKey]);
43856
43972
  }) : (null == groupEncodeAttrs ? void 0 : groupEncodeAttrs[element.groupKey]) && !this.isCollectionMark() && element.items.forEach(item => {
43857
43973
  item.nextAttrs = Object.assign(item.nextAttrs, groupEncodeAttrs[element.groupKey]);
43858
43974
  }), element.encodeItems(element.items, encoders, this._isReentered, parameters);
@@ -43951,41 +44067,17 @@
43951
44067
  };
43952
44068
  }
43953
44069
  evaluateEncodeProgressive(elements, encoders, parameters) {
43954
- if (!encoders) return void elements.forEach(element => {
43955
- element.initGraphicItem();
43956
- });
43957
- const positionEncoders = Object.keys(encoders).reduce((res, state) => (!encoders[state] || state !== BuiltInEncodeNames.enter && state !== BuiltInEncodeNames.exit && state !== BuiltInEncodeNames.update || (res[state] = splitEncoderInLarge(this.markType, encoders[state], this.glyphType).positionEncoder), res), {}),
43958
- progressiveIndex = this.renderContext.progressive.currentIndex,
43959
- isCollection = this.isCollectionMark();
43960
- this.emit(exports.VGRAMMAR_HOOK_EVENT.BEFORE_ELEMENT_ENCODE, {
43961
- encoders: encoders,
43962
- parameters: parameters
43963
- }, this);
43964
- const groupEncodeAttrs = this.evaluateGroupEncode(elements, encoders[BuiltInEncodeNames.group], parameters);
43965
- if (elements.forEach((element, index) => {
43966
- const onlyPos = progressiveIndex > 0 || !isCollection && index > 0;
43967
- !onlyPos && (null == groupEncodeAttrs ? void 0 : groupEncodeAttrs[element.groupKey]) && element.items.forEach(item => {
43968
- item.nextAttrs = Object.assign(item.nextAttrs, groupEncodeAttrs[element.groupKey]);
43969
- }), element.encodeItems(element.items, onlyPos ? positionEncoders : encoders, this._isReentered, parameters);
43970
- }), this._isReentered = !1, this.evaluateTransform(this._getTransformsAfterEncodeItems(), elements, parameters), elements.forEach(element => {
43971
- element.encodeGraphic();
43972
- }), this.emit(exports.VGRAMMAR_HOOK_EVENT.AFTER_ELEMENT_ENCODE, {
43973
- encoders: encoders,
43974
- parameters: parameters
43975
- }, this), 0 === progressiveIndex && !isCollection) {
43976
- const firstChild = elements[0].getGraphicItem(),
43977
- group = null == firstChild ? void 0 : firstChild.parent;
43978
- if (group) {
43979
- const attrs = firstChild.attribute,
43980
- theme = {},
43981
- itemAttrs = {};
43982
- Object.keys(attrs).forEach(key => {
43983
- ["pickable", "zIndex"].includes(key) || (isPositionOrSizeChannel(this.markType, key) ? itemAttrs[key] = attrs[key] : theme[key] = attrs[key]);
43984
- }), group.setTheme({
43985
- common: theme
43986
- }), firstChild.initAttributes(itemAttrs);
44070
+ const progressiveIndex = this.renderContext.progressive.currentIndex;
44071
+ if (0 === progressiveIndex) {
44072
+ if (this.evaluateEncode(elements, encoders, parameters), 0 === progressiveIndex && this._groupEncodeResult && !this.isCollectionMark() && this.markType !== GrammarMarkType.glyph) {
44073
+ const firstElement = elements[0],
44074
+ firstChild = firstElement.getGraphicItem(),
44075
+ group = null == firstChild ? void 0 : firstChild.parent;
44076
+ group && this._groupEncodeResult[firstElement.groupKey] && group.setTheme({
44077
+ common: this._groupEncodeResult[firstElement.groupKey]
44078
+ });
43987
44079
  }
43988
- }
44080
+ } else this.evaluateEncode(elements, encoders, parameters, !0);
43989
44081
  }
43990
44082
  evaluateProgressive() {
43991
44083
  var _a, _b, _c;
@@ -44455,7 +44547,7 @@
44455
44547
  duration = invokeFunctionType(runningConfig.animation.duration, parameters, morphData, morphElements),
44456
44548
  oneByOne = invokeFunctionType(runningConfig.animation.oneByOne, parameters, morphData, morphElements),
44457
44549
  splitPath = invokeFunctionType(runningConfig.animation.splitPath, parameters, morphData, morphElements),
44458
- individualDelay = isValidNumber$1(oneByOne) && oneByOne > 0 ? index => isNumber$2(oneByOne) ? index * oneByOne : !0 === oneByOne ? index * duration : 0 : void 0;
44550
+ individualDelay = isValidNumber$1(oneByOne) && oneByOne > 0 ? index => isNumber$1(oneByOne) ? index * oneByOne : !0 === oneByOne ? index * duration : 0 : void 0;
44459
44551
  1 !== prev.length && 0 !== prev.length || 1 !== next.length ? 1 === prev.length && next.length > 1 ? oneToMultiMorph(prev[0].getGraphicItem(), next.map(element => element.getGraphicItem()), {
44460
44552
  delay: delay,
44461
44553
  duration: duration,
@@ -45830,9 +45922,9 @@
45830
45922
  grammarWillDetach && (this.reuseCachedGrammars(normalizedRunningConfig), this.detachCachedGrammar());
45831
45923
  const hasResize = this._resizeRenderer(),
45832
45924
  hasUpdate = this._dataflow.hasCommitted();
45833
- return grammarWillDetach || hasUpdate || this._layoutState || hasResize ? (this.clearProgressive(), this._dataflow.evaluate(), this._needBuildLayoutTree && (this.buildLayoutTree(), this._needBuildLayoutTree = !1), this._layoutState && (this._layoutState = LayoutState.layouting, this.doLayout(), this._dataflow.hasCommitted() && (this._layoutState = LayoutState.reevaluate, this._dataflow.evaluate()), this._layoutState = LayoutState.after, (null === (_a = this._layoutMarks) || void 0 === _a ? void 0 : _a.length) && this.handleLayoutEnd()), this._layoutState = null, this.findProgressiveMarks(), this._resizeRenderer(), this.doRender(!0), null === (_b = this._willMorphMarks) || void 0 === _b || _b.forEach(morphMarks => {
45925
+ return grammarWillDetach || hasUpdate || this._layoutState || hasResize ? (this.clearProgressive(), this._dataflow.evaluate(), this._needBuildLayoutTree && (this.buildLayoutTree(), this._needBuildLayoutTree = !1), this._layoutState && (this._layoutState = LayoutState.layouting, this.doLayout(), this._dataflow.hasCommitted() && (this._layoutState = LayoutState.reevaluate, this._dataflow.evaluate()), this._layoutState = LayoutState.after, (null === (_a = this._layoutMarks) || void 0 === _a ? void 0 : _a.length) && this.handleLayoutEnd()), this._layoutState = null, this.findProgressiveMarks(), this._resizeRenderer(), null === (_b = this._willMorphMarks) || void 0 === _b || _b.forEach(morphMarks => {
45834
45926
  this._morph.morph(morphMarks.prev, morphMarks.next, normalizedRunningConfig);
45835
- }), this._willMorphMarks = null, this.releaseCachedGrammars(normalizedRunningConfig), this.doPreProgressive(), this) : this;
45927
+ }), this._willMorphMarks = null, this.releaseCachedGrammars(normalizedRunningConfig), this.doRender(!0), this.doPreProgressive(), this) : this;
45836
45928
  }
45837
45929
  reuseCachedGrammars(runningConfig) {
45838
45930
  if (this._willMorphMarks || (this._willMorphMarks = []), runningConfig.reuse) {
@@ -47773,7 +47865,7 @@
47773
47865
  x1 = element.getGraphicAttribute("x1", !1),
47774
47866
  width = element.getGraphicAttribute("width", !1);
47775
47867
  let overallValue;
47776
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? null == options ? void 0 : options.overall : 0, {
47868
+ return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? null == options ? void 0 : options.overall : 0, {
47777
47869
  from: {
47778
47870
  x: overallValue,
47779
47871
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -47818,7 +47910,7 @@
47818
47910
  const x1 = element.getGraphicAttribute("x1", !1),
47819
47911
  width = element.getGraphicAttribute("width", !1);
47820
47912
  let overallValue;
47821
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
47913
+ return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0, {
47822
47914
  to: {
47823
47915
  x: overallValue,
47824
47916
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -47869,7 +47961,7 @@
47869
47961
  y1 = element.getGraphicAttribute("y1", !1),
47870
47962
  height = element.getGraphicAttribute("height", !1);
47871
47963
  let overallValue;
47872
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
47964
+ return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0, {
47873
47965
  from: {
47874
47966
  y: overallValue,
47875
47967
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -47914,7 +48006,7 @@
47914
48006
  const y1 = element.getGraphicAttribute("y1", !1),
47915
48007
  height = element.getGraphicAttribute("height", !1);
47916
48008
  let overallValue;
47917
- return options && "negative" === options.orient ? isNumber$2(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0, {
48009
+ return options && "negative" === options.orient ? isNumber$1(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0, {
47918
48010
  to: {
47919
48011
  y: overallValue,
47920
48012
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -47944,7 +48036,7 @@
47944
48036
  },
47945
48037
  growAngleInOverall = (element, options, animationParameters) => {
47946
48038
  if (options && "anticlockwise" === options.orient) {
47947
- const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
48039
+ const overallValue = isNumber$1(options.overall) ? options.overall : 2 * Math.PI;
47948
48040
  return {
47949
48041
  from: {
47950
48042
  startAngle: overallValue,
@@ -47956,7 +48048,7 @@
47956
48048
  }
47957
48049
  };
47958
48050
  }
47959
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
48051
+ const overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
47960
48052
  return {
47961
48053
  from: {
47962
48054
  startAngle: overallValue,
@@ -47989,7 +48081,7 @@
47989
48081
  },
47990
48082
  growAngleOutOverall = (element, options, animationParameters) => {
47991
48083
  if (options && "anticlockwise" === options.orient) {
47992
- const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
48084
+ const overallValue = isNumber$1(options.overall) ? options.overall : 2 * Math.PI;
47993
48085
  return {
47994
48086
  from: {
47995
48087
  startAngle: element.getGraphicAttribute("startAngle", !0),
@@ -48001,7 +48093,7 @@
48001
48093
  }
48002
48094
  };
48003
48095
  }
48004
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
48096
+ const overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
48005
48097
  return {
48006
48098
  from: {
48007
48099
  startAngle: element.getGraphicAttribute("startAngle", !0),
@@ -48033,7 +48125,7 @@
48033
48125
  }
48034
48126
  },
48035
48127
  growRadiusInOverall = (element, options, animationParameters) => {
48036
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
48128
+ const overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
48037
48129
  return {
48038
48130
  from: {
48039
48131
  innerRadius: overallValue,
@@ -48065,7 +48157,7 @@
48065
48157
  }
48066
48158
  },
48067
48159
  growRadiusOutOverall = (element, options, animationParameters) => {
48068
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 0;
48160
+ const overallValue = isNumber$1(null == options ? void 0 : options.overall) ? options.overall : 0;
48069
48161
  return {
48070
48162
  from: {
48071
48163
  innerRadius: element.getGraphicAttribute("innerRadius", !0),
@@ -48504,7 +48596,7 @@
48504
48596
  return [{
48505
48597
  channels: ["size", "padding"],
48506
48598
  transform: (graphicAttributes, nextAttrs, storedAttrs) => {
48507
- if (isNumber$2(storedAttrs.padding) && storedAttrs.padding > 0) graphicAttributes.size = isArray$1(storedAttrs.size) ? storedAttrs.size.map(entry => Math.max(entry - storedAttrs.padding, 1)) : Math.max(storedAttrs.size - storedAttrs.padding, 1);else if (isArray$1(storedAttrs.padding) && 2 === storedAttrs.padding.length) {
48599
+ if (isNumber$1(storedAttrs.padding) && storedAttrs.padding > 0) graphicAttributes.size = isArray$1(storedAttrs.size) ? storedAttrs.size.map(entry => Math.max(entry - storedAttrs.padding, 1)) : Math.max(storedAttrs.size - storedAttrs.padding, 1);else if (isArray$1(storedAttrs.padding) && 2 === storedAttrs.padding.length) {
48508
48600
  const arraySize = isArray$1(storedAttrs.size) ? storedAttrs.size : [storedAttrs.size, storedAttrs.size];
48509
48601
  graphicAttributes.size = [Math.max(arraySize[0] - storedAttrs.padding[0], 1), Math.max(arraySize[1] - storedAttrs.padding[1], 1)];
48510
48602
  } else graphicAttributes.size = storedAttrs.size;
@@ -49146,7 +49238,7 @@
49146
49238
  }
49147
49239
  function calcLayoutNumber(v, size, callOp) {
49148
49240
  var _a, _b;
49149
- if (isNumber$2(v)) {
49241
+ if (isNumber$1(v)) {
49150
49242
  return v;
49151
49243
  }
49152
49244
  if (isPercent(v)) {
@@ -49168,7 +49260,7 @@
49168
49260
  left: 0,
49169
49261
  right: 0
49170
49262
  };
49171
- if (Object.values(paddingSpec).every(value => isNumber$2(value))) {
49263
+ if (Object.values(paddingSpec).every(value => isNumber$1(value))) {
49172
49264
  result.top = (_a = paddingSpec.top) !== null && _a !== void 0 ? _a : 0;
49173
49265
  result.right = (_b = paddingSpec.right) !== null && _b !== void 0 ? _b : 0;
49174
49266
  result.bottom = (_c = paddingSpec.bottom) !== null && _c !== void 0 ? _c : 0;
@@ -49218,7 +49310,7 @@
49218
49310
  }
49219
49311
  return result;
49220
49312
  }
49221
- if (isNumber$2(spec) || isPercent(spec) || isFunction$1(spec) || isPercentOffset(spec)) {
49313
+ if (isNumber$1(spec) || isPercent(spec) || isFunction$1(spec) || isPercentOffset(spec)) {
49222
49314
  result.top = result.left = result.bottom = result.right = spec;
49223
49315
  return result;
49224
49316
  }
@@ -51371,7 +51463,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
51371
51463
  else if (typeof value === 'object') {
51372
51464
  result = {};
51373
51465
  }
51374
- else if (isBoolean$1(value) || isNumber$2(value) || isString$1(value)) {
51466
+ else if (isBoolean$1(value) || isNumber$1(value) || isString$1(value)) {
51375
51467
  result = value;
51376
51468
  }
51377
51469
  else if (isDate$1(value)) {
@@ -56558,7 +56650,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
56558
56650
  this._initSpecStyle(spec, this.stateStyle, key);
56559
56651
  }
56560
56652
  convertAngleToRadian(styleConverter) {
56561
- if (isNumber$2(styleConverter)) {
56653
+ if (isNumber$1(styleConverter)) {
56562
56654
  return degreeToRadian(styleConverter);
56563
56655
  }
56564
56656
  else if (styleConverter.scale) {
@@ -57419,11 +57511,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
57419
57511
  this._specInfo = (_a = this._chartSpecTransformer) === null || _a === void 0 ? void 0 : _a.createSpecInfo(this._spec);
57420
57512
  }
57421
57513
  _initChart(spec) {
57422
- var _a, _b;
57514
+ var _a, _b, _c;
57423
57515
  if (!this._compiler) {
57424
57516
  (_a = this._option) === null || _a === void 0 ? void 0 : _a.onError('compiler is not initialized');
57425
57517
  return;
57426
57518
  }
57519
+ if (this._chart) {
57520
+ (_b = this._option) === null || _b === void 0 ? void 0 : _b.onError('chart is already initialized');
57521
+ return;
57522
+ }
57427
57523
  const chart = Factory.createChart(spec.type, spec, {
57428
57524
  type: spec.type,
57429
57525
  globalInstance: this,
@@ -57445,7 +57541,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
57445
57541
  disableTriggerEvent: this._option.disableTriggerEvent === true
57446
57542
  });
57447
57543
  if (!chart) {
57448
- (_b = this._option) === null || _b === void 0 ? void 0 : _b.onError('init chart fail');
57544
+ (_c = this._option) === null || _c === void 0 ? void 0 : _c.onError('init chart fail');
57449
57545
  return;
57450
57546
  }
57451
57547
  this._chart = chart;
@@ -58736,7 +58832,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
58736
58832
  registerChartPlugin(MediaQuery);
58737
58833
  };
58738
58834
 
58739
- const version = "1.9.1";
58835
+ const version = "1.9.3";
58740
58836
 
58741
58837
  const addVChartProperty = (data, op) => {
58742
58838
  const context = op.beforeCall();
@@ -59360,13 +59456,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59360
59456
  _getDefaultSpecFromChart(chartSpec) {
59361
59457
  var _a;
59362
59458
  const spec = (_a = super._getDefaultSpecFromChart(chartSpec)) !== null && _a !== void 0 ? _a : {};
59363
- const { outerRadius, innerRadius } = chartSpec;
59459
+ const { outerRadius, innerRadius, direction } = chartSpec;
59364
59460
  if (isValid$1(outerRadius)) {
59365
59461
  spec.outerRadius = outerRadius;
59366
59462
  }
59367
59463
  if (isValid$1(innerRadius)) {
59368
59464
  spec.innerRadius = innerRadius;
59369
59465
  }
59466
+ if (isValid$1(direction)) {
59467
+ spec.direction = direction;
59468
+ }
59370
59469
  return Object.keys(spec).length > 0 ? spec : undefined;
59371
59470
  }
59372
59471
  }
@@ -60612,41 +60711,46 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60612
60711
  getStackGroupFields() {
60613
60712
  return this.getGroupFields();
60614
60713
  }
60714
+ getStackValue() {
60715
+ var _a, _b;
60716
+ const axisId = (_a = (this.direction === "horizontal" ? this.getXAxisHelper() : this.getYAxisHelper())) === null || _a === void 0 ? void 0 : _a.getAxisId();
60717
+ return (_b = this._spec.stackValue) !== null && _b !== void 0 ? _b : `${PREFIX}_series_${this.type}_${axisId}`;
60718
+ }
60615
60719
  getStackValueField() {
60616
- if (this.direction === "vertical") {
60617
- return array(this._spec.yField)[0];
60720
+ if (this.direction === "horizontal") {
60721
+ return array(this._spec.xField)[0];
60618
60722
  }
60619
- return array(this._spec.xField)[0];
60723
+ return array(this._spec.yField)[0];
60620
60724
  }
60621
60725
  setValueFieldToStack() {
60622
- if (this.direction === "vertical") {
60623
- this.setFieldY(STACK_FIELD_END);
60624
- this.setFieldY2(STACK_FIELD_START);
60625
- }
60626
- else {
60726
+ if (this.direction === "horizontal") {
60627
60727
  this.setFieldX(STACK_FIELD_END);
60628
60728
  this.setFieldX2(STACK_FIELD_START);
60629
60729
  }
60730
+ else {
60731
+ this.setFieldY(STACK_FIELD_END);
60732
+ this.setFieldY2(STACK_FIELD_START);
60733
+ }
60630
60734
  }
60631
60735
  setValueFieldToPercent() {
60632
- if (this.direction === "vertical") {
60633
- this.setFieldY(STACK_FIELD_END_PERCENT);
60634
- this.setFieldY2(STACK_FIELD_START_PERCENT);
60635
- }
60636
- else {
60736
+ if (this.direction === "horizontal") {
60637
60737
  this.setFieldX(STACK_FIELD_END_PERCENT);
60638
60738
  this.setFieldX2(STACK_FIELD_START_PERCENT);
60639
60739
  }
60740
+ else {
60741
+ this.setFieldY(STACK_FIELD_END_PERCENT);
60742
+ this.setFieldY2(STACK_FIELD_START_PERCENT);
60743
+ }
60640
60744
  }
60641
60745
  setValueFieldToStackOffsetSilhouette() {
60642
- if (this.direction === "vertical") {
60643
- this.setFieldY(STACK_FIELD_END_OffsetSilhouette);
60644
- this.setFieldY2(STACK_FIELD_START_OffsetSilhouette);
60645
- }
60646
- else {
60746
+ if (this.direction === "horizontal") {
60647
60747
  this.setFieldX(STACK_FIELD_END_OffsetSilhouette);
60648
60748
  this.setFieldX2(STACK_FIELD_START_OffsetSilhouette);
60649
60749
  }
60750
+ else {
60751
+ this.setFieldY(STACK_FIELD_END_OffsetSilhouette);
60752
+ this.setFieldY2(STACK_FIELD_START_OffsetSilhouette);
60753
+ }
60650
60754
  }
60651
60755
  onXAxisHelperUpdate() {
60652
60756
  this.onMarkPositionUpdate();
@@ -60820,22 +60924,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60820
60924
  this._buildScaleConfig();
60821
60925
  }
60822
60926
  getDimensionField() {
60823
- if (this._direction === "vertical") {
60824
- return this._specXField;
60927
+ if (this._direction === "horizontal") {
60928
+ return this._specYField;
60825
60929
  }
60826
- return this._specYField;
60930
+ return this._specXField;
60827
60931
  }
60828
60932
  getDimensionContinuousField() {
60829
- if (this._direction === "vertical") {
60830
- return [this.fieldX[0], this.fieldX2];
60933
+ if (this._direction === "horizontal") {
60934
+ return [this.fieldY[0], this.fieldY2];
60831
60935
  }
60832
- return [this.fieldY[0], this.fieldY2];
60936
+ return [this.fieldX[0], this.fieldX2];
60833
60937
  }
60834
60938
  getMeasureField() {
60835
- if (this._direction === "vertical") {
60836
- return this._specYField;
60939
+ if (this._direction === "horizontal") {
60940
+ return this._specXField;
60837
60941
  }
60838
- return this._specXField;
60942
+ return this._specYField;
60839
60943
  }
60840
60944
  viewDataUpdate(d) {
60841
60945
  super.viewDataUpdate(d);
@@ -60875,9 +60979,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60875
60979
  const fieldsX = this._fieldX;
60876
60980
  samplingTrans.push({
60877
60981
  type: 'sampling',
60878
- size: this._direction === "vertical" ? width : height,
60982
+ size: this._direction === "horizontal" ? height : width,
60879
60983
  factor: this._spec.samplingFactor,
60880
- yfield: this._direction === "vertical" ? fieldsY[0] : fieldsX[0],
60984
+ yfield: this._direction === "horizontal" ? fieldsX[0] : fieldsY[0],
60881
60985
  groupBy: this._seriesField,
60882
60986
  mode: this._spec.sampling
60883
60987
  });
@@ -60941,9 +61045,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60941
61045
  else {
60942
61046
  const userCurveType = areaCurveType !== null && areaCurveType !== void 0 ? areaCurveType : (_b = (_a = this.getSpec().line) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.curveType;
60943
61047
  const curveType = userCurveType === DEFAULT_SMOOTH_INTERPOLATE
60944
- ? direction === "vertical"
60945
- ? 'monotoneX'
60946
- : 'monotoneY'
61048
+ ? direction === "horizontal"
61049
+ ? 'monotoneY'
61050
+ : 'monotoneX'
60947
61051
  : userCurveType;
60948
61052
  this.setMarkStyle(lineMark, {
60949
61053
  curveType
@@ -63198,33 +63302,33 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63198
63302
  var _a, _b, _c, _d, _e;
63199
63303
  const userCurveType = ((_c = (_b = (_a = this.getSpec().area) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.curveType) !== null && _c !== void 0 ? _c : (_e = (_d = this.getSpec().line) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.curveType);
63200
63304
  const curveType = userCurveType === DEFAULT_SMOOTH_INTERPOLATE
63201
- ? this._direction === "vertical"
63202
- ? 'monotoneX'
63203
- : 'monotoneY'
63305
+ ? this._direction === "horizontal"
63306
+ ? 'monotoneY'
63307
+ : 'monotoneX'
63204
63308
  : userCurveType;
63205
63309
  const areaMark = this._areaMark;
63206
63310
  if (areaMark) {
63207
- if (this._direction === "vertical") {
63311
+ if (this._direction === "horizontal") {
63208
63312
  this.setMarkStyle(this._areaMark, {
63209
63313
  x: this.dataToPositionX.bind(this),
63210
- y1: (datum) => {
63314
+ x1: (datum) => {
63211
63315
  var _a, _b;
63212
- return valueInScaleRange(this.dataToPositionY1(datum), (_b = (_a = this._yAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0));
63316
+ return valueInScaleRange(this.dataToPositionX1(datum), (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0));
63213
63317
  },
63214
63318
  y: this.dataToPositionY.bind(this),
63215
- z: this._fieldZ ? this.dataToPositionZ.bind(this) : null
63319
+ z: this._fieldZ ? this.dataToPositionZ.bind(this) : null,
63320
+ orient: this._direction
63216
63321
  }, 'normal', exports.AttributeLevel.Series);
63217
63322
  }
63218
63323
  else {
63219
63324
  this.setMarkStyle(this._areaMark, {
63220
63325
  x: this.dataToPositionX.bind(this),
63221
- x1: (datum) => {
63326
+ y1: (datum) => {
63222
63327
  var _a, _b;
63223
- return valueInScaleRange(this.dataToPositionX1(datum), (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0));
63328
+ return valueInScaleRange(this.dataToPositionY1(datum), (_b = (_a = this._yAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0));
63224
63329
  },
63225
63330
  y: this.dataToPositionY.bind(this),
63226
- z: this._fieldZ ? this.dataToPositionZ.bind(this) : null,
63227
- orient: this._direction
63331
+ z: this._fieldZ ? this.dataToPositionZ.bind(this) : null
63228
63332
  }, 'normal', exports.AttributeLevel.Series);
63229
63333
  }
63230
63334
  this.setMarkStyle(areaMark, {
@@ -63844,30 +63948,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63844
63948
  var _a, _b, _c, _d;
63845
63949
  const xScale = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
63846
63950
  const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
63847
- if (this.direction === "vertical") {
63848
- this.setMarkStyle(this._barMark, {
63849
- x: (datum) => valueInScaleRange(this.dataToPositionX(datum), xScale),
63850
- x1: (datum) => valueInScaleRange(this.dataToPositionX1(datum), xScale),
63851
- y: (datum, ctx, opt, dataView) => {
63852
- if (this._shouldDoPreCalculate()) {
63853
- this._calculateStackRectPosition(true);
63854
- return datum[RECT_Y];
63855
- }
63856
- if (this._spec.barMinHeight) {
63857
- return this._calculateRectPosition(datum, true);
63858
- }
63859
- return valueInScaleRange(this.dataToPositionY(datum), yScale);
63860
- },
63861
- y1: (datum) => {
63862
- if (this._shouldDoPreCalculate()) {
63863
- this._calculateStackRectPosition(true);
63864
- return datum[RECT_Y1];
63865
- }
63866
- return valueInScaleRange(this.dataToPositionY1(datum), yScale);
63867
- }
63868
- }, 'normal', exports.AttributeLevel.Series);
63869
- }
63870
- else {
63951
+ if (this.direction === "horizontal") {
63871
63952
  this.setMarkStyle(this._barMark, {
63872
63953
  x: (datum) => {
63873
63954
  if (this._shouldDoPreCalculate()) {
@@ -63890,42 +63971,65 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63890
63971
  y1: (datum) => valueInScaleRange(this.dataToPositionY1(datum), yScale)
63891
63972
  }, 'normal', exports.AttributeLevel.Series);
63892
63973
  }
63974
+ else {
63975
+ this.setMarkStyle(this._barMark, {
63976
+ x: (datum) => valueInScaleRange(this.dataToPositionX(datum), xScale),
63977
+ x1: (datum) => valueInScaleRange(this.dataToPositionX1(datum), xScale),
63978
+ y: (datum, ctx, opt, dataView) => {
63979
+ if (this._shouldDoPreCalculate()) {
63980
+ this._calculateStackRectPosition(true);
63981
+ return datum[RECT_Y];
63982
+ }
63983
+ if (this._spec.barMinHeight) {
63984
+ return this._calculateRectPosition(datum, true);
63985
+ }
63986
+ return valueInScaleRange(this.dataToPositionY(datum), yScale);
63987
+ },
63988
+ y1: (datum) => {
63989
+ if (this._shouldDoPreCalculate()) {
63990
+ this._calculateStackRectPosition(true);
63991
+ return datum[RECT_Y1];
63992
+ }
63993
+ return valueInScaleRange(this.dataToPositionY1(datum), yScale);
63994
+ }
63995
+ }, 'normal', exports.AttributeLevel.Series);
63996
+ }
63893
63997
  this._initLinearBarBackgroundMarkStyle();
63894
63998
  }
63895
63999
  _initLinearBarBackgroundMarkStyle() {
63896
64000
  var _a, _b, _c, _d;
63897
64001
  const xScale = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getScale) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
63898
64002
  const yScale = (_d = (_c = this._yAxisHelper) === null || _c === void 0 ? void 0 : _c.getScale) === null || _d === void 0 ? void 0 : _d.call(_c, 0);
63899
- if (this.direction === "vertical") {
64003
+ if (this.direction === "horizontal") {
63900
64004
  this.setMarkStyle(this._barBackgroundMark, {
63901
- x: (datum) => valueInScaleRange(this.dataToPositionX(datum), xScale),
63902
- x1: (datum) => valueInScaleRange(this.dataToPositionX1(datum), xScale),
63903
- y: () => {
63904
- const range = yScale.range();
64005
+ x: () => {
64006
+ const range = xScale.range();
63905
64007
  const min = Math.min(range[0], range[range.length - 1]);
63906
64008
  return min;
63907
64009
  },
63908
- y1: () => {
63909
- const range = yScale.range();
64010
+ x1: () => {
64011
+ const range = xScale.range();
63910
64012
  const max = Math.max(range[0], range[range.length - 1]);
63911
64013
  return max;
63912
- }
64014
+ },
64015
+ y: (datum) => valueInScaleRange(this.dataToPositionY(datum), yScale),
64016
+ y1: (datum) => valueInScaleRange(this.dataToPositionY1(datum), yScale)
63913
64017
  }, 'normal', exports.AttributeLevel.Series);
63914
64018
  }
63915
64019
  else {
63916
64020
  this.setMarkStyle(this._barBackgroundMark, {
63917
- x: () => {
63918
- const range = xScale.range();
64021
+ x: (datum) => valueInScaleRange(this.dataToPositionX(datum), xScale),
64022
+ x1: (datum) => valueInScaleRange(this.dataToPositionX1(datum), xScale),
64023
+ y: () => {
64024
+ const range = yScale.range();
63919
64025
  const min = Math.min(range[0], range[range.length - 1]);
63920
64026
  return min;
63921
64027
  },
63922
- x1: () => {
63923
- const range = xScale.range();
64028
+ y1: () => {
64029
+ const range = yScale.range();
63924
64030
  const max = Math.max(range[0], range[range.length - 1]);
63925
64031
  return max;
63926
- },
63927
- y: (datum) => valueInScaleRange(this.dataToPositionY(datum), yScale),
63928
- y1: (datum) => valueInScaleRange(this.dataToPositionY1(datum), yScale)
64032
+ }
63929
64033
  }, 'normal', exports.AttributeLevel.Series);
63930
64034
  }
63931
64035
  }
@@ -64042,9 +64146,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64042
64146
  const fieldsX = this._fieldX;
64043
64147
  samplingTrans.push({
64044
64148
  type: 'sampling',
64045
- size: this._direction === "vertical" ? width : height,
64149
+ size: this._direction === "horizontal" ? height : width,
64046
64150
  factor: this._spec.samplingFactor,
64047
- yfield: this._direction === "vertical" ? fieldsY[0] : fieldsX[0],
64151
+ yfield: this._direction === "horizontal" ? fieldsX[0] : fieldsY[0],
64048
64152
  groupBy: this._seriesField,
64049
64153
  mode: this._spec.sampling
64050
64154
  });
@@ -64280,7 +64384,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64280
64384
  if (isNil$1(sizeSpec)) {
64281
64385
  return SCATTER_DEFAULT_SIZE;
64282
64386
  }
64283
- if (isNumber$2(sizeSpec)) {
64387
+ if (isNumber$1(sizeSpec)) {
64284
64388
  return sizeSpec;
64285
64389
  }
64286
64390
  if (isString$1(sizeSpec) && isNumeric$1(sizeSpec)) {
@@ -64345,7 +64449,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64345
64449
  y: this.dataToPositionY.bind(this),
64346
64450
  z: this._fieldZ ? this.dataToPositionZ.bind(this) : null,
64347
64451
  fill: this.getColorAttribute(),
64348
- size: isNumber$2(this._size) || isFunction$1(this._size) ? this._size : SCATTER_DEFAULT_SIZE,
64452
+ size: isNumber$1(this._size) || isFunction$1(this._size) ? this._size : SCATTER_DEFAULT_SIZE,
64349
64453
  symbolType: isString$1(this._shape) || isFunction$1(this._shape) ? this._shape : SCATTER_DEFAULT_SHAPE
64350
64454
  }, STATE_VALUE_ENUM.STATE_NORMAL, exports.AttributeLevel.Series);
64351
64455
  if (isValid$1(this._sizeField) || isValid$1(this._size)) {
@@ -66718,59 +66822,59 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66718
66822
  }
66719
66823
  totalPositionX(datum, field, pos = 0.5) {
66720
66824
  const { dataToPosition, getBandwidth } = this._xAxisHelper;
66721
- if (this._direction === "vertical") {
66722
- return (dataToPosition([datum[field]], {
66825
+ if (this._direction === "horizontal") {
66826
+ return valueInScaleRange(dataToPosition([datum[field]], {
66723
66827
  bandPosition: this._bandPosition
66724
- }) +
66725
- getBandwidth(0) * 0.5 -
66726
- this._barMark.getAttribute('width', datum) * (0.5 - pos));
66828
+ }));
66727
66829
  }
66728
- return valueInScaleRange(dataToPosition([datum[field]], {
66830
+ return (dataToPosition([datum[field]], {
66729
66831
  bandPosition: this._bandPosition
66730
- }));
66832
+ }) +
66833
+ getBandwidth(0) * 0.5 -
66834
+ this._barMark.getAttribute('width', datum) * (0.5 - pos));
66731
66835
  }
66732
66836
  totalPositionY(datum, field, pos = 0.5) {
66733
66837
  const { dataToPosition, getBandwidth } = this._yAxisHelper;
66734
- if (this._direction === "vertical") {
66735
- return valueInScaleRange(dataToPosition([datum[field]], {
66838
+ if (this._direction === "horizontal") {
66839
+ return (dataToPosition([datum[field]], {
66736
66840
  bandPosition: this._bandPosition
66737
- }));
66841
+ }) +
66842
+ getBandwidth(0) * 0.5 -
66843
+ this._barMark.getAttribute('height', datum) * (0.5 - pos));
66738
66844
  }
66739
- return (dataToPosition([datum[field]], {
66845
+ return valueInScaleRange(dataToPosition([datum[field]], {
66740
66846
  bandPosition: this._bandPosition
66741
- }) +
66742
- getBandwidth(0) * 0.5 -
66743
- this._barMark.getAttribute('height', datum) * (0.5 - pos));
66847
+ }));
66744
66848
  }
66745
66849
  initMarkStyle() {
66746
66850
  super.initMarkStyle();
66747
66851
  if (this._leaderLineMark) {
66748
- if (this._direction === "vertical") {
66852
+ if (this._direction === "horizontal") {
66749
66853
  this.setMarkStyle(this._leaderLineMark, {
66750
66854
  visible: (datum) => !isNil$1(datum.lastIndex),
66751
- x: (datum) => {
66855
+ x: (datum) => this.totalPositionX(datum, 'lastEnd', 0),
66856
+ x1: (datum) => this.totalPositionX(datum, datum.isTotal ? 'end' : 'start', 0),
66857
+ y: (datum) => {
66752
66858
  if (!datum.lastIndex) {
66753
66859
  return 0;
66754
66860
  }
66755
- return this.totalPositionX(datum, 'lastIndex', 1);
66861
+ return this.totalPositionY(datum, 'lastIndex', 1);
66756
66862
  },
66757
- x1: (datum) => this.totalPositionX(datum, 'index', 0),
66758
- y: (datum) => this.totalPositionY(datum, 'lastEnd', 0),
66759
- y1: (datum) => this.totalPositionY(datum, datum.isTotal ? 'end' : 'start', 0)
66863
+ y1: (datum) => this.totalPositionY(datum, 'index', 0)
66760
66864
  }, 'normal', exports.AttributeLevel.Series);
66761
66865
  }
66762
66866
  else {
66763
66867
  this.setMarkStyle(this._leaderLineMark, {
66764
66868
  visible: (datum) => !isNil$1(datum.lastIndex),
66765
- x: (datum) => this.totalPositionX(datum, 'lastEnd', 0),
66766
- x1: (datum) => this.totalPositionX(datum, datum.isTotal ? 'end' : 'start', 0),
66767
- y: (datum) => {
66869
+ x: (datum) => {
66768
66870
  if (!datum.lastIndex) {
66769
66871
  return 0;
66770
66872
  }
66771
- return this.totalPositionY(datum, 'lastIndex', 1);
66873
+ return this.totalPositionX(datum, 'lastIndex', 1);
66772
66874
  },
66773
- y1: (datum) => this.totalPositionY(datum, 'index', 0)
66875
+ x1: (datum) => this.totalPositionX(datum, 'index', 0),
66876
+ y: (datum) => this.totalPositionY(datum, 'lastEnd', 0),
66877
+ y1: (datum) => this.totalPositionY(datum, datum.isTotal ? 'end' : 'start', 0)
66774
66878
  }, 'normal', exports.AttributeLevel.Series);
66775
66879
  }
66776
66880
  }
@@ -67117,15 +67221,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67117
67221
  minMaxFillOpacity: this._shaftFillOpacity,
67118
67222
  stroke: (_b = this._strokeColor) !== null && _b !== void 0 ? _b : (this._shaftShape === 'line' ? this.getColorAttribute() : DEFAULT_STROKE_COLOR)
67119
67223
  };
67120
- const boxPlotMarkStyles = this._direction === "vertical"
67121
- ? Object.assign(Object.assign({ x: this.dataToPositionX.bind(this) }, commonBoxplotStyles), { boxWidth: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, ruleWidth: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, q1q3Width: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, minMaxWidth: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); } }) : Object.assign(Object.assign({ y: this.dataToPositionY.bind(this) }, commonBoxplotStyles), { boxHeight: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, ruleHeight: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, q1q3Height: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, minMaxHeight: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); } });
67224
+ const boxPlotMarkStyles = this._direction === "horizontal"
67225
+ ? Object.assign(Object.assign({ y: this.dataToPositionY.bind(this) }, commonBoxplotStyles), { boxHeight: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, ruleHeight: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, q1q3Height: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, minMaxHeight: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); } }) : Object.assign(Object.assign({ x: this.dataToPositionX.bind(this) }, commonBoxplotStyles), { boxWidth: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, ruleWidth: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, q1q3Width: () => { var _a; return (_a = this._boxWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); }, minMaxWidth: () => { var _a; return (_a = this._shaftWidth) !== null && _a !== void 0 ? _a : this._getMarkWidth(); } });
67122
67226
  this.setMarkStyle(boxPlotMark, boxPlotMarkStyles, STATE_VALUE_ENUM.STATE_NORMAL, exports.AttributeLevel.Series);
67123
67227
  }
67124
67228
  const outlierMark = this._outlierMark;
67125
67229
  if (outlierMark) {
67126
67230
  this.setMarkStyle(outlierMark, {
67127
67231
  fill: (_d = (_c = this._outliersStyle) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.getColorAttribute(),
67128
- size: isNumber$2((_e = this._outliersStyle) === null || _e === void 0 ? void 0 : _e.size) ? this._outliersStyle.size : DEFAULT_OUTLIER_SIZE,
67232
+ size: isNumber$1((_e = this._outliersStyle) === null || _e === void 0 ? void 0 : _e.size) ? this._outliersStyle.size : DEFAULT_OUTLIER_SIZE,
67129
67233
  symbolType: 'circle'
67130
67234
  }, STATE_VALUE_ENUM.STATE_NORMAL, exports.AttributeLevel.Series);
67131
67235
  }
@@ -67133,7 +67237,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67133
67237
  initBoxPlotMarkStyle() {
67134
67238
  var _a, _b;
67135
67239
  const boxPlotMark = this._boxPlotMark;
67136
- const axisHelper = this._direction === "vertical" ? this._yAxisHelper : this._xAxisHelper;
67240
+ const axisHelper = this._direction === "horizontal" ? this._xAxisHelper : this._yAxisHelper;
67137
67241
  if (boxPlotMark && axisHelper) {
67138
67242
  const { dataToPosition } = axisHelper;
67139
67243
  const scale = (_a = axisHelper === null || axisHelper === void 0 ? void 0 : axisHelper.getScale) === null || _a === void 0 ? void 0 : _a.call(axisHelper, 0);
@@ -67159,16 +67263,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67159
67263
  if (outlierMark && axisHelper) {
67160
67264
  const { dataToPosition } = axisHelper;
67161
67265
  const scale = (_b = axisHelper === null || axisHelper === void 0 ? void 0 : axisHelper.getScale) === null || _b === void 0 ? void 0 : _b.call(axisHelper, 0);
67162
- const outlierMarkPositionChannel = this._direction === "vertical"
67266
+ const outlierMarkPositionChannel = this._direction === "horizontal"
67163
67267
  ? {
67164
- x: this.dataToPositionX.bind(this),
67165
- y: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, BOX_PLOT_OUTLIER_VALUE_FIELD), {
67268
+ y: this.dataToPositionY.bind(this),
67269
+ x: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, BOX_PLOT_OUTLIER_VALUE_FIELD), {
67166
67270
  bandPosition: this._bandPosition
67167
67271
  }), scale)
67168
67272
  }
67169
67273
  : {
67170
- y: this.dataToPositionY.bind(this),
67171
- x: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, BOX_PLOT_OUTLIER_VALUE_FIELD), {
67274
+ x: this.dataToPositionX.bind(this),
67275
+ y: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, BOX_PLOT_OUTLIER_VALUE_FIELD), {
67172
67276
  bandPosition: this._bandPosition
67173
67277
  }), scale)
67174
67278
  };
@@ -67190,7 +67294,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67190
67294
  outlierDataView.transform({
67191
67295
  type: 'foldOutlierData',
67192
67296
  options: {
67193
- dimensionField: this._direction === "vertical" ? this._fieldX : this._fieldY,
67297
+ dimensionField: this._direction === "horizontal" ? this._fieldY : this._fieldX,
67194
67298
  outliersField: this._outliersField
67195
67299
  }
67196
67300
  });
@@ -67211,8 +67315,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67211
67315
  if (this._autoBoxWidth) {
67212
67316
  return this._autoBoxWidth;
67213
67317
  }
67214
- const bandAxisHelper = this._direction === "vertical" ? this._xAxisHelper : this._yAxisHelper;
67215
- const xField = this._direction === "vertical" ? this._fieldX : this._fieldY;
67318
+ const bandAxisHelper = this._direction === "horizontal" ? this._yAxisHelper : this._xAxisHelper;
67319
+ const xField = this._direction === "horizontal" ? this._fieldY : this._fieldX;
67216
67320
  const innerBandWidth = bandAxisHelper.getBandwidth(xField.length - 1);
67217
67321
  const autoBoxWidth = innerBandWidth / xField.length;
67218
67322
  this._autoBoxWidth = autoBoxWidth;
@@ -67790,41 +67894,41 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67790
67894
  var _a, _b, _c, _d, _e;
67791
67895
  const userCurveType = (_c = (_b = (_a = this.getSpec().area) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.curveType) !== null && _c !== void 0 ? _c : (_e = (_d = this.getSpec().line) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.curveType;
67792
67896
  const curveType = userCurveType === DEFAULT_SMOOTH_INTERPOLATE
67793
- ? this._direction === "vertical"
67794
- ? 'monotoneX'
67795
- : 'monotoneY'
67897
+ ? this._direction === "horizontal"
67898
+ ? 'monotoneY'
67899
+ : 'monotoneX'
67796
67900
  : userCurveType;
67797
67901
  const areaMark = this._areaMark;
67798
67902
  if (areaMark) {
67799
- if (this._direction === "vertical") {
67903
+ if (this._direction === "horizontal") {
67800
67904
  this.setMarkStyle(this._areaMark, {
67801
67905
  x: this.dataToPositionX.bind(this),
67802
- y1: (datum) => {
67803
- if (!this._yAxisHelper) {
67906
+ x1: (datum) => {
67907
+ if (!this._xAxisHelper) {
67804
67908
  return Number.NaN;
67805
67909
  }
67806
- const { dataToPosition } = this._yAxisHelper;
67807
- return dataToPosition(this.getDatumPositionValues(datum, this._spec.yField[1]), {
67910
+ const { dataToPosition } = this._xAxisHelper;
67911
+ return dataToPosition(this.getDatumPositionValues(datum, this._spec.xField[1]), {
67808
67912
  bandPosition: this._bandPosition
67809
67913
  });
67810
67914
  },
67811
- y: this.dataToPositionY.bind(this)
67915
+ y: this.dataToPositionY.bind(this),
67916
+ orient: this._direction
67812
67917
  }, 'normal', exports.AttributeLevel.Series);
67813
67918
  }
67814
67919
  else {
67815
67920
  this.setMarkStyle(this._areaMark, {
67816
67921
  x: this.dataToPositionX.bind(this),
67817
- x1: (datum) => {
67818
- if (!this._xAxisHelper) {
67922
+ y1: (datum) => {
67923
+ if (!this._yAxisHelper) {
67819
67924
  return Number.NaN;
67820
67925
  }
67821
- const { dataToPosition } = this._xAxisHelper;
67822
- return dataToPosition(this.getDatumPositionValues(datum, this._spec.xField[1]), {
67926
+ const { dataToPosition } = this._yAxisHelper;
67927
+ return dataToPosition(this.getDatumPositionValues(datum, this._spec.yField[1]), {
67823
67928
  bandPosition: this._bandPosition
67824
67929
  });
67825
67930
  },
67826
- y: this.dataToPositionY.bind(this),
67827
- orient: this._direction
67931
+ y: this.dataToPositionY.bind(this)
67828
67932
  }, 'normal', exports.AttributeLevel.Series);
67829
67933
  }
67830
67934
  this.setMarkStyle(areaMark, {
@@ -68072,11 +68176,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
68072
68176
  max = Math.max(angleFieldValue, max);
68073
68177
  data[index][ARC_TRANSFORM_VALUE] = angleFieldValue;
68074
68178
  }
68179
+ const valueList = data.map(d => Number(d[angleField]));
68075
68180
  const angleRange = endAngle - startAngle;
68076
68181
  let lastAngle = startAngle;
68077
68182
  let restAngle = angleRange;
68078
68183
  let largeThanMinAngleTotal = 0;
68079
- data.forEach(d => {
68184
+ data.forEach((d, i) => {
68080
68185
  const angleFieldValue = d[ARC_TRANSFORM_VALUE];
68081
68186
  const ratio = total ? angleFieldValue / total : 0;
68082
68187
  let radian = ratio * angleRange;
@@ -68091,6 +68196,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
68091
68196
  const dEndAngle = lastAngle + radian;
68092
68197
  d[asRatio] = ratio;
68093
68198
  d[asK] = max ? angleFieldValue / max : 0;
68199
+ d._percent_ = getPercentValue(valueList, i);
68094
68200
  appendArcInfo(d, dStartAngle, radian);
68095
68201
  lastAngle = dEndAngle;
68096
68202
  });
@@ -69041,11 +69147,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
69041
69147
  polarPointInterpolation(pointA, pointB, ratio) {
69042
69148
  const polarPointA0 = this._pointToCoord(pointA);
69043
69149
  const polarPointA1 = this._pointToCoord({ x: pointA.x1, y: pointA.y1 });
69150
+ const angleA0 = normalizeAngle$1(polarPointA0.angle);
69151
+ const angleA1 = normalizeAngle$1(polarPointA1.angle);
69044
69152
  const polarPointB0 = this._pointToCoord(pointB);
69045
69153
  const polarPointB1 = this._pointToCoord({ x: pointB.x1, y: pointB.y1 });
69046
- const angle0 = polarPointA0.angle + (polarPointB0.angle - polarPointA0.angle) * ratio;
69154
+ const angleB0 = normalizeAngle$1(polarPointB0.angle);
69155
+ const angleB1 = normalizeAngle$1(polarPointB1.angle);
69156
+ const angle0 = angleA0 + (angleB0 - angleA0) * ratio;
69047
69157
  const radius0 = polarPointA0.radius + (polarPointB0.radius - polarPointA0.radius) * ratio;
69048
- const angle1 = polarPointA1.angle + (polarPointB1.angle - polarPointA1.angle) * ratio;
69158
+ const angle1 = angleA1 + (angleB1 - angleA1) * ratio;
69049
69159
  const radius1 = polarPointA1.radius + (polarPointB1.radius - polarPointA1.radius) * ratio;
69050
69160
  const { x, y } = this._coordToPoint({ angle: angle0, radius: radius0 });
69051
69161
  const { x: x1, y: y1 } = this._coordToPoint({ angle: angle1, radius: radius1 });
@@ -70860,7 +70970,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
70860
70970
  'star',
70861
70971
  'cardioid',
70862
70972
  'circle',
70863
- 'pentagon'
70973
+ 'pentagon',
70974
+ 'rect'
70864
70975
  ];
70865
70976
 
70866
70977
  const WORD_CLOUD_ANGLE = `${PREFIX}_WORD_CLOUD_ANGLE`;
@@ -72071,7 +72182,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72071
72182
  postProjection = options.postProjection;
72072
72183
  let fontSize = options.fontSize ? field$1(options.fontSize) : 14;
72073
72184
  const fontSizeRange = options.fontSizeRange;
72074
- if (fontSizeRange && !isNumber$2(fontSize)) {
72185
+ if (fontSizeRange && !isNumber$1(fontSize)) {
72075
72186
  const fsize = fontSize,
72076
72187
  fontSizeSqrtScale = generateSqrtScale(extent$1(fsize, data), fontSizeRange);
72077
72188
  fontSize = datum => fontSizeSqrtScale(fsize(datum));
@@ -72109,7 +72220,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72109
72220
  progressive: layout
72110
72221
  } : layout.output();
72111
72222
  };
72112
- const field$1 = option => isString$1(option) || isNumber$2(option) || isFunction$1(option) ? option : datum => datum[option.field],
72223
+ const field$1 = option => isString$1(option) || isNumber$1(option) || isFunction$1(option) ? option : datum => datum[option.field],
72113
72224
  sqrt = x => x < 0 ? -Math.sqrt(-x) : Math.sqrt(x),
72114
72225
  generateSqrtScale = (domain, range) => {
72115
72226
  if (domain[0] === domain[1]) return datum => range[0];
@@ -73832,7 +73943,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
73832
73943
  }
73833
73944
  _computeLabelLimit(datum, labelSpec) {
73834
73945
  const limit = labelSpec === null || labelSpec === void 0 ? void 0 : labelSpec.limit;
73835
- if (isNumber$2(limit)) {
73946
+ if (isNumber$1(limit)) {
73836
73947
  return limit;
73837
73948
  }
73838
73949
  const points = this.getPoints(datum);
@@ -74510,11 +74621,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74510
74621
  }
74511
74622
  _filterChildren(node) {
74512
74623
  const maxDepth = this.options.maxDepth;
74513
- if (isNumber$2(maxDepth) && maxDepth >= 0 && node.depth >= maxDepth) return !1;
74624
+ if (isNumber$1(maxDepth) && maxDepth >= 0 && node.depth >= maxDepth) return !1;
74514
74625
  const minChildrenVisibleArea = this.options.minChildrenVisibleArea;
74515
- if (isNumber$2(minChildrenVisibleArea) && Math.abs((node.x1 - node.x0) * (node.y1 - node.y0)) < minChildrenVisibleArea) return !1;
74626
+ if (isNumber$1(minChildrenVisibleArea) && Math.abs((node.x1 - node.x0) * (node.y1 - node.y0)) < minChildrenVisibleArea) return !1;
74516
74627
  const minChildrenVisibleSize = this.options.minChildrenVisibleSize;
74517
- return !isNumber$2(minChildrenVisibleSize) || !(Math.abs(node.x1 - node.x0) < minChildrenVisibleSize || Math.abs(node.y1 - node.y0) < minChildrenVisibleSize);
74628
+ return !isNumber$1(minChildrenVisibleSize) || !(Math.abs(node.x1 - node.x0) < minChildrenVisibleSize || Math.abs(node.y1 - node.y0) < minChildrenVisibleSize);
74518
74629
  }
74519
74630
  _layout(parent) {
74520
74631
  var _a;
@@ -74874,7 +74985,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74874
74985
  this.options = options;
74875
74986
  const keyOption = null == options ? void 0 : options.nodeKey,
74876
74987
  keyFunc = isFunction$1(keyOption) ? keyOption : keyOption ? field$3(keyOption) : null;
74877
- this._getNodeKey = keyFunc, this._getPadding = isNumber$2(null == options ? void 0 : options.padding) ? node => options.padding : isArray$1(null == options ? void 0 : options.padding) ? node => {
74988
+ this._getNodeKey = keyFunc, this._getPadding = isNumber$1(null == options ? void 0 : options.padding) ? node => options.padding : isArray$1(null == options ? void 0 : options.padding) ? node => {
74878
74989
  var _a;
74879
74990
  return null !== (_a = options.padding[node.depth + 1]) && void 0 !== _a ? _a : 0;
74880
74991
  } : () => 0, this._maxDepth = -1;
@@ -75908,13 +76019,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
75908
76019
  const ratio = clamp$1(parseFloat(nodeWidthOption.replace("%", "")) / 100, 0, 1);
75909
76020
  let stepWidth = width / (this._maxDepth - 1 + ratio);
75910
76021
  minStepWidth > 0 && (stepWidth = Math.max(minStepWidth, stepWidth)), nodeWidth = stepWidth * ratio, linkWidth = stepWidth * (1 - ratio), isEvenWidth = !0;
75911
- } else if (isNumber$2(nodeWidthOption)) {
75912
- if (nodeWidth = nodeWidthOption, isNumber$2(linkWidthOption)) linkWidth = linkWidthOption;else if (isNil$1(linkWidthOption)) {
76022
+ } else if (isNumber$1(nodeWidthOption)) {
76023
+ if (nodeWidth = nodeWidthOption, isNumber$1(linkWidthOption)) linkWidth = linkWidthOption;else if (isNil$1(linkWidthOption)) {
75913
76024
  let stepWidth = (width - nodeWidthOption) / (this._maxDepth - 1);
75914
76025
  minStepWidth > 0 && (stepWidth = Math.max(minStepWidth, stepWidth)), linkWidth = stepWidth - nodeWidthOption;
75915
76026
  }
75916
76027
  isEvenWidth = !0;
75917
- } else isFunction$1(nodeWidthOption) && isNumber$2(linkWidthOption) && (linkWidth = linkWidthOption);
76028
+ } else isFunction$1(nodeWidthOption) && isNumber$1(linkWidthOption) && (linkWidth = linkWidthOption);
75918
76029
  const columns = [];
75919
76030
  for (let i = 0, len = nodes.length; i < len; i++) {
75920
76031
  const node = nodes[i];
@@ -76285,7 +76396,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
76285
76396
  key: undefined,
76286
76397
  value: (datum) => {
76287
76398
  if (datum.source) {
76288
- if (isNumber$2(datum.source)) {
76399
+ if (isNumber$1(datum.source)) {
76289
76400
  const seriesKeys = this.series.getSeriesKeys();
76290
76401
  return seriesKeys[datum.source] + ' => ' + seriesKeys[datum.target];
76291
76402
  }
@@ -78538,10 +78649,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78538
78649
  const innerRadius = toPercent((_c = options.innerRadius) !== null && _c !== void 0 ? _c : 0, maxRadius);
78539
78650
  const outerRadius = toPercent(options.outerRadius, maxRadius);
78540
78651
  const center = [
78541
- isNumber$2((_d = options.center) === null || _d === void 0 ? void 0 : _d[0])
78652
+ isNumber$1((_d = options.center) === null || _d === void 0 ? void 0 : _d[0])
78542
78653
  ? options.center[0]
78543
78654
  : viewBox.x0 + toPercent((_f = (_e = options.center) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : '50%', viewBox.x1 - viewBox.x0),
78544
- isNumber$2((_g = options.center) === null || _g === void 0 ? void 0 : _g[1])
78655
+ isNumber$1((_g = options.center) === null || _g === void 0 ? void 0 : _g[1])
78545
78656
  ? options.center[1]
78546
78657
  : viewBox.y0 + toPercent((_j = (_h = options.center) === null || _h === void 0 ? void 0 : _h[1]) !== null && _j !== void 0 ? _j : '50%', viewBox.y1 - viewBox.y0)
78547
78658
  ];
@@ -80316,7 +80427,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80316
80427
  var _a;
80317
80428
  const dataFields = [spec.maxField, spec.medianField, spec.q1Field, spec.q3Field, spec.minField, spec.outliersField];
80318
80429
  const seriesSpec = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { boxPlot: spec.boxPlot, direction: (_a = spec.direction) !== null && _a !== void 0 ? _a : "vertical", minField: spec.minField, maxField: spec.maxField, q1Field: spec.q1Field, medianField: spec.medianField, q3Field: spec.q3Field, outliersField: spec.outliersField, outliersStyle: spec.outliersStyle });
80319
- seriesSpec[seriesSpec.direction === "vertical" ? 'yField' : 'xField'] = dataFields;
80430
+ seriesSpec[seriesSpec.direction === "horizontal" ? 'xField' : 'yField'] = dataFields;
80320
80431
  return seriesSpec;
80321
80432
  }
80322
80433
  transformSpec(spec) {
@@ -81598,7 +81709,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81598
81709
  }
81599
81710
  else {
81600
81711
  if (isXAxis(this.getOrient())) {
81601
- field = s.fieldX2
81712
+ field = s.getSpec().x2Field
81602
81713
  ? [...s.fieldX, s.fieldX2]
81603
81714
  : s.fieldX;
81604
81715
  }
@@ -81606,7 +81717,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81606
81717
  field = s.fieldZ;
81607
81718
  }
81608
81719
  else {
81609
- field = s.fieldY;
81720
+ field = s.getSpec().y2Field
81721
+ ? [...s.fieldY, s.fieldY2]
81722
+ : s.fieldY;
81610
81723
  }
81611
81724
  }
81612
81725
  field = (isArray$1(field) ? (isContinuous(this._scale.type) ? field : [field[0]]) : [field]);
@@ -81657,6 +81770,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81657
81770
  });
81658
81771
  }
81659
81772
  getBoundsInRect(rect) {
81773
+ var _a;
81660
81774
  let result = { x1: 0, y1: 0, x2: 0, y2: 0 };
81661
81775
  if (!this._visible) {
81662
81776
  return result;
@@ -81664,7 +81778,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81664
81778
  this._verticalLimitSize = isXAxis(this.getOrient()) ? rect.height : rect.width;
81665
81779
  this.setLayoutRect(rect);
81666
81780
  const isChanged = this.updateScaleRange();
81667
- if (isChanged || !isArray$1(this.getTickData().getLatestData())) {
81781
+ if (isChanged || !isArray$1((_a = this.getTickData()) === null || _a === void 0 ? void 0 : _a.getLatestData())) {
81668
81782
  this.computeData('range');
81669
81783
  }
81670
81784
  const context = { skipLayout: false };
@@ -81836,8 +81950,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81836
81950
  return attrs;
81837
81951
  }
81838
81952
  getLabelItems(length) {
81839
- const tickData = this.getTickData();
81840
- const tickLatestData = tickData.getLatestData();
81953
+ var _a;
81954
+ const tickLatestData = (_a = this.getTickData()) === null || _a === void 0 ? void 0 : _a.getLatestData();
81841
81955
  if (tickLatestData && tickLatestData.length) {
81842
81956
  return [
81843
81957
  tickLatestData
@@ -82236,14 +82350,23 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82236
82350
  if (layerConfig.visible !== false && layerConfig.tickCount !== 0 && layerConfig.forceTickCount !== 0) {
82237
82351
  const tickData = this._initTickDataSet(Object.assign(Object.assign({}, this._tickTransformOption()), layerConfig), layer);
82238
82352
  tickData.target.addListener('change', this._forceLayout.bind(this));
82239
- this._tickData.push(new CompilableData(this._option, tickData));
82353
+ const compilableData = new CompilableData(this._option, tickData);
82354
+ this._tickData.push(compilableData);
82355
+ if (!this._tickDataMap) {
82356
+ this._tickDataMap = {};
82357
+ }
82358
+ this._tickDataMap[layer] = compilableData;
82240
82359
  }
82241
82360
  }
82242
82361
  }
82243
82362
  else {
82244
82363
  const tickData = this._initTickDataSet(this._tickTransformOption());
82245
82364
  tickData.target.addListener('change', this._forceLayout.bind(this));
82246
- this._tickData = [new CompilableData(this._option, tickData)];
82365
+ const compilableData = new CompilableData(this._option, tickData);
82366
+ this._tickData = [compilableData];
82367
+ this._tickDataMap = {
82368
+ 0: compilableData
82369
+ };
82247
82370
  }
82248
82371
  }
82249
82372
  dataToPosition(values, cfg = {}) {
@@ -82338,30 +82461,44 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82338
82461
  getLabelItems(length) {
82339
82462
  const labelItems = [];
82340
82463
  let preData = [];
82341
- this._tickData.forEach((eachTickData, index) => {
82342
- const latestData = eachTickData.getLatestData();
82343
- if (latestData && latestData.length) {
82464
+ this._scales.forEach((scale, index) => {
82465
+ var _a;
82466
+ const tickData = this._tickDataMap[index];
82467
+ const isTickDataHaveData = (_a = tickData === null || tickData === void 0 ? void 0 : tickData.getLatestData()) === null || _a === void 0 ? void 0 : _a.length;
82468
+ const ticks = isTickDataHaveData
82469
+ ? tickData.getLatestData().map((obj) => obj.value)
82470
+ : scale.domain();
82471
+ if (ticks && ticks.length) {
82344
82472
  if (preData && preData.length) {
82345
82473
  const currentLabelItems = [];
82346
82474
  const curData = [];
82347
82475
  preData.forEach(value => {
82348
- latestData.forEach((obj) => {
82349
- const values = array(value).concat(obj.value);
82476
+ ticks.forEach(tick => {
82477
+ const values = array(value).concat(tick);
82350
82478
  curData.push(values);
82351
- const axisItem = getAxisItem(obj.value, this._getNormalizedValue(values, length));
82352
- currentLabelItems.push(axisItem);
82479
+ if (isTickDataHaveData) {
82480
+ const axisItem = getAxisItem(tick, this._getNormalizedValue(values, length));
82481
+ currentLabelItems.push(axisItem);
82482
+ }
82353
82483
  });
82354
82484
  });
82355
- labelItems.push(currentLabelItems.filter((entry) => entry.value >= 0 && entry.value <= 1));
82485
+ if (isTickDataHaveData) {
82486
+ labelItems.push(currentLabelItems.filter((entry) => entry.value >= 0 && entry.value <= 1));
82487
+ }
82356
82488
  preData = curData;
82357
82489
  }
82358
82490
  else {
82359
- labelItems.push(latestData
82360
- .map((obj) => {
82361
- preData.push(obj.value);
82362
- return getAxisItem(obj.value, this._getNormalizedValue([obj.value], length));
82363
- })
82364
- .filter((entry) => entry.value >= 0 && entry.value <= 1));
82491
+ ticks.forEach(tick => {
82492
+ preData.push(tick);
82493
+ });
82494
+ if (isTickDataHaveData) {
82495
+ labelItems.push(tickData
82496
+ .getLatestData()
82497
+ .map((obj) => {
82498
+ return getAxisItem(obj.value, this._getNormalizedValue([obj.value], length));
82499
+ })
82500
+ .filter((entry) => entry.value >= 0 && entry.value <= 1));
82501
+ }
82365
82502
  }
82366
82503
  }
82367
82504
  });
@@ -82531,16 +82668,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82531
82668
  };
82532
82669
  }
82533
82670
  getLabelItems(length) {
82534
- var _a;
82671
+ var _a, _b;
82535
82672
  const items = [];
82536
- const tickData = this.getTickData();
82537
- const tickLatestData = tickData.getLatestData();
82673
+ const tickLatestData = (_a = this.getTickData()) === null || _a === void 0 ? void 0 : _a.getLatestData();
82538
82674
  if (tickLatestData && tickLatestData.length) {
82539
82675
  items.push(tickLatestData.map((obj) => {
82540
82676
  return getAxisItem(obj.value, this._getNormalizedValue([obj.value], length));
82541
82677
  }));
82542
82678
  }
82543
- const layerLatestData = (_a = this._layerTickData) === null || _a === void 0 ? void 0 : _a.getLatestData();
82679
+ const layerLatestData = (_b = this._layerTickData) === null || _b === void 0 ? void 0 : _b.getLatestData();
82544
82680
  if (layerLatestData && layerLatestData.length) {
82545
82681
  items.push(layerLatestData.map((obj) => {
82546
82682
  return getAxisItem(obj.value, this._getNormalizedValue([obj.value], length));
@@ -82940,8 +83076,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82940
83076
  return length === 0 ? 0 : (this.dataToPosition(values) - this._getStartValue()) / length;
82941
83077
  }
82942
83078
  getLabelItems(length) {
82943
- const tickData = this.getTickData();
82944
- const tickLatestData = tickData.getLatestData();
83079
+ var _a;
83080
+ const tickLatestData = (_a = this.getTickData()) === null || _a === void 0 ? void 0 : _a.getLatestData();
82945
83081
  if (tickLatestData && tickLatestData.length) {
82946
83082
  return [
82947
83083
  tickLatestData.map((obj) => {
@@ -84995,7 +85131,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
84995
85131
  this._handleClickInEvent = (params) => {
84996
85132
  this._handleIn(params);
84997
85133
  this._clickLock = this._hasActive && this._spec.lockAfterClick;
84998
- if (this._clickLock && isNumber$2(this.triggerOff)) {
85134
+ if (this._clickLock && isNumber$1(this.triggerOff)) {
84999
85135
  if (this._timer) {
85000
85136
  clearTimeout(this._timer);
85001
85137
  }
@@ -85210,7 +85346,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
85210
85346
  if (trigger) {
85211
85347
  this.trigger = trigger;
85212
85348
  }
85213
- if (triggerOff === 'none' || (isNumber$2(triggerOff) && triggerOff > 0)) {
85349
+ if (triggerOff === 'none' || (isNumber$1(triggerOff) && triggerOff > 0)) {
85214
85350
  this.triggerOff = triggerOff;
85215
85351
  }
85216
85352
  if (labelZIndex !== undefined) {
@@ -85234,7 +85370,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
85234
85370
  const _d = style, { strokeOpacity, fillOpacity, opacity, stroke, fill, lineWidth } = _d, restStyle = __rest$7(_d, ["strokeOpacity", "fillOpacity", "opacity", "stroke", "fill", "lineWidth"]);
85235
85371
  const isLineType = hair.type === 'line';
85236
85372
  let finalOpacity = isLineType ? strokeOpacity : fillOpacity;
85237
- if (isNumber$2(opacity)) {
85373
+ if (isNumber$1(opacity)) {
85238
85374
  finalOpacity = (finalOpacity !== null && finalOpacity !== void 0 ? finalOpacity : 1) * opacity;
85239
85375
  }
85240
85376
  hair.style = Object.assign({ opacity: finalOpacity, pickable: false, visible: true }, restStyle);
@@ -86275,7 +86411,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86275
86411
  var _a, _b;
86276
86412
  const zoomLock = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.zoomLock) !== null && _b !== void 0 ? _b : false;
86277
86413
  if (zoomLock || end - start < this._minSpan || end - start > this._maxSpan) {
86278
- return;
86414
+ this._shouldChange = false;
86279
86415
  }
86280
86416
  }
86281
86417
  _isReverse() {
@@ -86335,6 +86471,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86335
86471
  this.layoutType = 'none';
86336
86472
  this._orient = 'left';
86337
86473
  this._cacheVisibility = undefined;
86474
+ this._shouldChange = true;
86338
86475
  this._stateField = 'x';
86339
86476
  this._activeRoam = true;
86340
86477
  this._zoomAttr = {
@@ -87150,7 +87287,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87150
87287
  if (this._visible === false) {
87151
87288
  return 0;
87152
87289
  }
87153
- if (isNumber$2(this._spec.width)) {
87290
+ if (isNumber$1(this._spec.width)) {
87154
87291
  return this._spec.width;
87155
87292
  }
87156
87293
  if (this._isHorizontal) {
@@ -87162,7 +87299,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87162
87299
  if (this._visible === false) {
87163
87300
  return 0;
87164
87301
  }
87165
- if (isNumber$2(this._spec.height)) {
87302
+ if (isNumber$1(this._spec.height)) {
87166
87303
  return this._spec.height;
87167
87304
  }
87168
87305
  if (this._isHorizontal) {
@@ -87224,24 +87361,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87224
87361
  }
87225
87362
  _handleChange(start, end, updateComponent, tag) {
87226
87363
  super._handleChange(start, end, updateComponent);
87227
- if (updateComponent && this._component) {
87228
- this._component.setStartAndEnd(start, end);
87229
- }
87230
- this._start = start;
87231
- this._end = end;
87232
- const hasChange = this._handleStateChange(this._statePointToData(start), this._statePointToData(end), tag);
87233
- if (hasChange) {
87234
- this.event.emit(exports.ChartEvent.dataZoomChange, {
87235
- model: this,
87236
- value: {
87237
- filterData: this._filterMode !== "axis",
87238
- start,
87239
- end,
87240
- startValue: this._startValue,
87241
- endValue: this._endValue,
87242
- newDomain: this._newDomain
87243
- }
87244
- });
87364
+ if (this._shouldChange) {
87365
+ if (updateComponent && this._component) {
87366
+ this._component.setStartAndEnd(start, end);
87367
+ }
87368
+ this._start = start;
87369
+ this._end = end;
87370
+ const hasChange = this._handleStateChange(this._statePointToData(start), this._statePointToData(end), tag);
87371
+ if (hasChange) {
87372
+ this.event.emit(exports.ChartEvent.dataZoomChange, {
87373
+ model: this,
87374
+ value: {
87375
+ filterData: this._filterMode !== "axis",
87376
+ start,
87377
+ end,
87378
+ startValue: this._startValue,
87379
+ endValue: this._endValue,
87380
+ newDomain: this._newDomain
87381
+ }
87382
+ });
87383
+ }
87245
87384
  }
87246
87385
  }
87247
87386
  _handleDataCollectionChange() {
@@ -87373,7 +87512,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87373
87512
  }
87374
87513
  }
87375
87514
  _computeWidth() {
87376
- if (isNumber$2(this._spec.width)) {
87515
+ if (isNumber$1(this._spec.width)) {
87377
87516
  return this._spec.width;
87378
87517
  }
87379
87518
  if (this._isHorizontal) {
@@ -87382,7 +87521,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87382
87521
  return SCROLL_BAR_DEFAULT_SIZE;
87383
87522
  }
87384
87523
  _computeHeight() {
87385
- if (isNumber$2(this._spec.height)) {
87524
+ if (isNumber$1(this._spec.height)) {
87386
87525
  return this._spec.height;
87387
87526
  }
87388
87527
  if (!this._isHorizontal) {
@@ -87411,24 +87550,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87411
87550
  }
87412
87551
  _handleChange(start, end, updateComponent) {
87413
87552
  super._handleChange(start, end, updateComponent);
87414
- if (updateComponent && this._component) {
87415
- this._component.setAttribute('range', [start, end]);
87416
- }
87417
- this._start = start;
87418
- this._end = end;
87419
- const hasChange = this._handleStateChange(this._statePointToData(start), this._statePointToData(end));
87420
- if (hasChange) {
87421
- this.event.emit(exports.ChartEvent.scrollBarChange, {
87422
- model: this,
87423
- value: {
87424
- filterData: this._filterMode !== "axis",
87425
- start: this._start,
87426
- end: this._end,
87427
- startValue: this._startValue,
87428
- endValue: this._endValue,
87429
- newDomain: this._newDomain
87430
- }
87431
- });
87553
+ if (this._shouldChange) {
87554
+ if (updateComponent && this._component) {
87555
+ this._component.setAttribute('range', [start, end]);
87556
+ }
87557
+ this._start = start;
87558
+ this._end = end;
87559
+ const hasChange = this._handleStateChange(this._statePointToData(start), this._statePointToData(end));
87560
+ if (hasChange) {
87561
+ this.event.emit(exports.ChartEvent.scrollBarChange, {
87562
+ model: this,
87563
+ value: {
87564
+ filterData: this._filterMode !== "axis",
87565
+ start: this._start,
87566
+ end: this._end,
87567
+ startValue: this._startValue,
87568
+ endValue: this._endValue,
87569
+ newDomain: this._newDomain
87570
+ }
87571
+ });
87572
+ }
87432
87573
  }
87433
87574
  }
87434
87575
  _handleDataCollectionChange() {
@@ -87807,7 +87948,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87807
87948
  function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint) {
87808
87949
  var _a, _b;
87809
87950
  const { relativeSeries } = refSeries;
87810
- isNumber$2(datum.x) &&
87951
+ isNumber$1(datum.x) &&
87811
87952
  isNeedExtendDomain(xDomain, datum.x, autoRange) &&
87812
87953
  ((_b = relativeSeries === null || relativeSeries === void 0 ? void 0 : (_a = relativeSeries.getXAxisHelper()).setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', datum.x));
87813
87954
  let x;
@@ -87822,7 +87963,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87822
87963
  function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint) {
87823
87964
  var _a, _b;
87824
87965
  const { relativeSeries } = refSeries;
87825
- isNumber$2(datum.y) &&
87966
+ isNumber$1(datum.y) &&
87826
87967
  isNeedExtendDomain(yDomain, datum.y, autoRange) &&
87827
87968
  ((_b = (_a = relativeSeries.getYAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_yAxis_extend', datum.y));
87828
87969
  let y;
@@ -87927,11 +88068,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87927
88068
  const xValue = array(datum.x);
87928
88069
  const yValue = array(datum.y);
87929
88070
  xValue.length === 1 &&
87930
- isNumber$2(xValue[0]) &&
88071
+ isNumber$1(xValue[0]) &&
87931
88072
  isNeedExtendDomain(xDomain, xValue[0], autoRange) &&
87932
88073
  ((_b = (_a = refRelativeSeries.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', xValue[0]));
87933
88074
  yValue.length === 1 &&
87934
- isNumber$2(yValue[0]) &&
88075
+ isNumber$1(yValue[0]) &&
87935
88076
  isNeedExtendDomain(yDomain, yValue[0], autoRange) &&
87936
88077
  ((_d = (_c = refRelativeSeries.getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, 'marker_yAxis_extend', yValue[0]));
87937
88078
  points.push({
@@ -88774,22 +88915,28 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88774
88915
  let lines = [];
88775
88916
  if (isXYLayout) {
88776
88917
  lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
88777
- points = [
88778
- {
88779
- x: lines[0][0].x,
88780
- y: lines[1][0].y
88781
- },
88782
- lines[0][0],
88783
- {
88784
- x: lines[1][0].x,
88785
- y: lines[0][0].y
88786
- },
88787
- lines[1][0]
88788
- ];
88918
+ const [start, end] = lines;
88919
+ if (start && start.length && end && end.length) {
88920
+ points = [
88921
+ {
88922
+ x: start[0].x,
88923
+ y: end[0].y
88924
+ },
88925
+ start[0],
88926
+ {
88927
+ x: end[0].x,
88928
+ y: start[0].y
88929
+ },
88930
+ end[0]
88931
+ ];
88932
+ }
88789
88933
  }
88790
88934
  else if (isXLayout || isYLayout) {
88791
88935
  lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
88792
- points = [...lines[0], lines[1][1], lines[1][0]];
88936
+ const [start, end] = lines;
88937
+ if (start && start.length && end && end.length) {
88938
+ points = [...start, end[1], end[0]];
88939
+ }
88793
88940
  }
88794
88941
  else if (isCoordinateLayout) {
88795
88942
  points = coordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
@@ -88894,7 +89041,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88894
89041
  return result;
88895
89042
  };
88896
89043
  const transformToAttrs = (spec) => {
88897
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
89044
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
88898
89045
  const trackStyle = rectToAttribute((_b = (_a = spec === null || spec === void 0 ? void 0 : spec.slider) === null || _a === void 0 ? void 0 : _a.trackStyle) !== null && _b !== void 0 ? _b : {});
88899
89046
  const railStyle = rectToAttribute((_d = (_c = spec === null || spec === void 0 ? void 0 : spec.slider) === null || _c === void 0 ? void 0 : _c.railStyle) !== null && _d !== void 0 ? _d : {});
88900
89047
  const handlerStyle = symbolToAttribute((_f = (_e = spec === null || spec === void 0 ? void 0 : spec.slider) === null || _e === void 0 ? void 0 : _e.handlerStyle) !== null && _f !== void 0 ? _f : {});
@@ -88902,7 +89049,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88902
89049
  const pause = baseToAttribute((_k = (_j = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _j === void 0 ? void 0 : _j.pause) !== null && _k !== void 0 ? _k : {});
88903
89050
  const backward = baseToAttribute((_m = (_l = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _l === void 0 ? void 0 : _l.backward) !== null && _m !== void 0 ? _m : {});
88904
89051
  const forward = baseToAttribute((_p = (_o = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _o === void 0 ? void 0 : _o.forward) !== null && _p !== void 0 ? _p : {});
88905
- return Object.assign(Object.assign({}, spec), { direction: spec.direction, interval: spec.interval, visible: spec.visible, orient: spec.orient, slider: Object.assign(Object.assign({}, spec.slider), { trackStyle: trackStyle, railStyle: railStyle, handlerStyle: handlerStyle }), controller: Object.assign(Object.assign({}, spec.controller), { start: start, pause: pause, backward: backward, forward: forward }) });
89052
+ return Object.assign(Object.assign({}, spec), { direction: spec.direction, interval: spec.interval, visible: spec.visible, orient: (_q = spec.orient) !== null && _q !== void 0 ? _q : 'bottom', slider: Object.assign(Object.assign({}, spec.slider), { trackStyle: trackStyle, railStyle: railStyle, handlerStyle: handlerStyle }), controller: Object.assign(Object.assign({}, spec.controller), { start: start, pause: pause, backward: backward, forward: forward }) });
88906
89053
  };
88907
89054
  const transformContinuousSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'continuous' }));
88908
89055
  const transformDiscreteSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'discrete' }));
@@ -89137,7 +89284,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89137
89284
  }
89138
89285
  }
89139
89286
  _computeWidth(rect) {
89140
- if (isNumber$2(this._spec.width)) {
89287
+ if (isNumber$1(this._spec.width)) {
89141
89288
  return Math.min(rect.width, Number(this._spec.width));
89142
89289
  }
89143
89290
  if (isVertical(this._orient)) {
@@ -89146,7 +89293,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89146
89293
  return rect.width;
89147
89294
  }
89148
89295
  _computeHeight(rect) {
89149
- if (isNumber$2(this._spec.height)) {
89296
+ if (isNumber$1(this._spec.height)) {
89150
89297
  this._height = this._spec.height;
89151
89298
  return Math.min(rect.height, Number(this._spec.height));
89152
89299
  }
@@ -89222,12 +89369,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89222
89369
  textAttribute.text = formatMethod(textAttribute.text, datum, { series });
89223
89370
  }
89224
89371
  if (formatter) {
89225
- if (series.type === 'pie') {
89226
- datum._percent_ = (datum[ARC_RATIO] * 100).toFixed(2) + '%';
89227
- }
89228
- else if (datum[STACK_FIELD_END_PERCENT]) {
89229
- datum._percent_ = (datum[STACK_FIELD_END_PERCENT] * 100).toFixed(2) + '%';
89230
- }
89231
89372
  textAttribute.text = substitute(formatter, datum);
89232
89373
  }
89233
89374
  return textAttribute;
@@ -89282,22 +89423,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89282
89423
  ? (_c = series.getXAxisHelper()) === null || _c === void 0 ? void 0 : _c.isInverse()
89283
89424
  : (_d = series.getYAxisHelper()) === null || _d === void 0 ? void 0 : _d.isInverse();
89284
89425
  let position = originPosition;
89285
- if (isString$1(originPosition) && position !== 'inside') {
89426
+ if (isString$1(originPosition) && originPosition === 'outside') {
89286
89427
  position = (data) => {
89287
89428
  const { data: datum } = data;
89288
89429
  const dataField = series.getMeasureField()[0];
89289
- if (originPosition === 'outside') {
89290
- const positionMap = { vertical: ['top', 'bottom'], horizontal: ['right', 'left'] };
89291
- const index = ((datum === null || datum === void 0 ? void 0 : datum[dataField]) >= 0 && isInverse) || ((datum === null || datum === void 0 ? void 0 : datum[dataField]) < 0 && !isInverse) ? 1 : 0;
89292
- return positionMap[direction][index];
89293
- }
89294
- if (originPosition === 'inside-bottom') {
89295
- return series.direction === 'horizontal' ? 'inside-left' : 'inside-bottom';
89296
- }
89297
- if (originPosition === 'inside-top') {
89298
- return series.direction === 'horizontal' ? 'inside-right' : 'inside-top';
89299
- }
89300
- return originPosition;
89430
+ const positionMap = { vertical: ['top', 'bottom'], horizontal: ['right', 'left'] };
89431
+ const index = ((datum === null || datum === void 0 ? void 0 : datum[dataField]) >= 0 && isInverse) || ((datum === null || datum === void 0 ? void 0 : datum[dataField]) < 0 && !isInverse) ? 1 : 0;
89432
+ return positionMap[direction][index];
89301
89433
  };
89302
89434
  }
89303
89435
  let overlap;
@@ -89380,46 +89512,38 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89380
89512
  const datum = label.data;
89381
89513
  const attribute = textAttribute(labelInfo, datum, labelSpec.formatMethod);
89382
89514
  const x = (datum) => {
89383
- if (series.direction === "vertical") {
89384
- return series.totalPositionX(datum, 'index', 0.5);
89385
- }
89386
- if (pos === 'middle') {
89387
- return (series.totalPositionX(datum, 'end') + series.totalPositionY(datum, 'start')) * 0.5;
89388
- }
89389
- else if (pos === 'max') {
89390
- return series.totalPositionX(datum, datum.end >= datum.start ? 'end' : 'start') + offset;
89391
- }
89392
- else if (pos === 'min') {
89393
- return series.totalPositionX(datum, datum.end >= datum.start ? 'start' : 'end') - offset;
89394
- }
89395
- return series.totalPositionX(datum, 'end') + (datum.end >= datum.start ? offset : -offset);
89396
- };
89397
- const y = (datum) => {
89398
- if (series.direction === "vertical") {
89515
+ if (series.direction === "horizontal") {
89399
89516
  if (pos === 'middle') {
89400
- return (series.totalPositionY(datum, 'end') + series.totalPositionY(datum, 'start')) * 0.5;
89517
+ return (series.totalPositionX(datum, 'end') + series.totalPositionY(datum, 'start')) * 0.5;
89401
89518
  }
89402
89519
  else if (pos === 'max') {
89403
- return series.totalPositionY(datum, datum.end >= datum.start ? 'end' : 'start') - offset;
89520
+ return series.totalPositionX(datum, datum.end >= datum.start ? 'end' : 'start') + offset;
89404
89521
  }
89405
89522
  else if (pos === 'min') {
89406
- return series.totalPositionY(datum, datum.end >= datum.start ? 'start' : 'end') + offset;
89523
+ return series.totalPositionX(datum, datum.end >= datum.start ? 'start' : 'end') - offset;
89407
89524
  }
89408
- return series.totalPositionY(datum, 'end') + (datum.end >= datum.start ? -offset : offset);
89525
+ return series.totalPositionX(datum, 'end') + (datum.end >= datum.start ? offset : -offset);
89526
+ }
89527
+ return series.totalPositionX(datum, 'index', 0.5);
89528
+ };
89529
+ const y = (datum) => {
89530
+ if (series.direction === "horizontal") {
89531
+ return series.totalPositionY(datum, 'index', 0.5);
89532
+ }
89533
+ if (pos === 'middle') {
89534
+ return (series.totalPositionY(datum, 'end') + series.totalPositionY(datum, 'start')) * 0.5;
89535
+ }
89536
+ else if (pos === 'max') {
89537
+ return series.totalPositionY(datum, datum.end >= datum.start ? 'end' : 'start') - offset;
89409
89538
  }
89410
- return series.totalPositionY(datum, 'index', 0.5);
89539
+ else if (pos === 'min') {
89540
+ return series.totalPositionY(datum, datum.end >= datum.start ? 'start' : 'end') + offset;
89541
+ }
89542
+ return series.totalPositionY(datum, 'end') + (datum.end >= datum.start ? -offset : offset);
89411
89543
  };
89412
89544
  attribute.x = x(datum);
89413
89545
  attribute.y = y(datum);
89414
- if (series.direction === "vertical") {
89415
- attribute.textBaseline =
89416
- pos === 'middle'
89417
- ? pos
89418
- : (pos === 'withChange' && datum.end - datum.start >= 0) || pos === 'max'
89419
- ? 'bottom'
89420
- : 'top';
89421
- }
89422
- else {
89546
+ if (series.direction === "horizontal") {
89423
89547
  attribute.textAlign =
89424
89548
  pos === 'middle'
89425
89549
  ? 'center'
@@ -89427,6 +89551,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89427
89551
  ? 'left'
89428
89552
  : 'right';
89429
89553
  }
89554
+ else {
89555
+ attribute.textBaseline =
89556
+ pos === 'middle'
89557
+ ? pos
89558
+ : (pos === 'withChange' && datum.end - datum.start >= 0) || pos === 'max'
89559
+ ? 'bottom'
89560
+ : 'top';
89561
+ }
89430
89562
  return createText(Object.assign(Object.assign({}, attribute), { id: label.id }));
89431
89563
  });
89432
89564
  },
@@ -91635,12 +91767,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91635
91767
  const getActualTooltipPositionValue = (position, event) => {
91636
91768
  let result;
91637
91769
  if (isValid$1(position)) {
91638
- if (isNumber$2(position)) {
91770
+ if (isNumber$1(position)) {
91639
91771
  result = position;
91640
91772
  }
91641
91773
  else if (isFunction$1(position)) {
91642
91774
  const tooltipPosition = position(event);
91643
- if (isNumber$2(tooltipPosition)) {
91775
+ if (isNumber$1(tooltipPosition)) {
91644
91776
  result = tooltipPosition;
91645
91777
  }
91646
91778
  }
@@ -92637,7 +92769,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92637
92769
  _throttle(callback) {
92638
92770
  const tooltipSpec = this._component.getSpec();
92639
92771
  let wait;
92640
- if (isNumber$2(tooltipSpec.throttleInterval)) {
92772
+ if (isNumber$1(tooltipSpec.throttleInterval)) {
92641
92773
  wait = tooltipSpec.throttleInterval;
92642
92774
  }
92643
92775
  else {
@@ -92656,14 +92788,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92656
92788
  return Object.assign(Object.assign({}, DEFAULT_OPTIONS), { offsetX: (_a = offset === null || offset === void 0 ? void 0 : offset.x) !== null && _a !== void 0 ? _a : DEFAULT_OPTIONS.offsetX, offsetY: (_b = offset === null || offset === void 0 ? void 0 : offset.y) !== null && _b !== void 0 ? _b : DEFAULT_OPTIONS.offsetY });
92657
92789
  }
92658
92790
  _getTooltipBoxSize(actualTooltip, changePositionOnly) {
92659
- var _a, _b, _c, _d, _e, _f;
92791
+ var _a, _b, _c;
92660
92792
  if (!changePositionOnly || isNil$1(this._attributes)) {
92661
92793
  const chartTheme = (_b = (_a = this._chartOption) === null || _a === void 0 ? void 0 : _a.getTheme()) !== null && _b !== void 0 ? _b : {};
92662
92794
  this._attributes = getTooltipAttributes(actualTooltip, this._component.getSpec(), chartTheme);
92663
92795
  }
92796
+ const { panel, panelDomHeight } = (_c = this._attributes) !== null && _c !== void 0 ? _c : {};
92664
92797
  return {
92665
- width: (_d = (_c = this._attributes) === null || _c === void 0 ? void 0 : _c.panel) === null || _d === void 0 ? void 0 : _d.width,
92666
- height: (_f = (_e = this._attributes) === null || _e === void 0 ? void 0 : _e.panel) === null || _f === void 0 ? void 0 : _f.height
92798
+ width: panel === null || panel === void 0 ? void 0 : panel.width,
92799
+ height: panelDomHeight !== null && panelDomHeight !== void 0 ? panelDomHeight : panel === null || panel === void 0 ? void 0 : panel.height
92667
92800
  };
92668
92801
  }
92669
92802
  _getPointerPositionRelativeToTooltipParent(params) {
@@ -92819,7 +92952,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92819
92952
  content: {},
92820
92953
  shapeColumn: {
92821
92954
  common: shapeStyle,
92822
- items: [],
92955
+ items: contentAttribute === null || contentAttribute === void 0 ? void 0 : contentAttribute.map(({ spaceRow }, i) => ({
92956
+ marginTop: '0px',
92957
+ marginBottom: i < contentAttribute.length - 1 ? getPixelPropertyStr(spaceRow) : '0px'
92958
+ })),
92823
92959
  width: getPixelPropertyStr(shape.size),
92824
92960
  marginRight: getPixelPropertyStr((_a = shape.spacing) !== null && _a !== void 0 ? _a : DEFAULT_SHAPE_SPACING)
92825
92961
  },
@@ -93010,7 +93146,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93010
93146
  fontWeight: 'normal'
93011
93147
  };
93012
93148
  const defaultShapeStyle = {
93013
- lineHeight: 'normal'
93149
+ lineHeight: 'normal',
93150
+ boxSizing: 'border-box'
93014
93151
  };
93015
93152
 
93016
93153
  class ShapeModel extends BaseTooltipModel {
@@ -93049,7 +93186,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93049
93186
  }
93050
93187
  const { symbolType, fill, stroke, hollow = false } = option;
93051
93188
  const size = option.size ? valueToHtml(option.size) : '8px';
93052
- const marginTop = option.marginTop ? valueToHtml(option.marginTop) : '0px';
93053
93189
  const lineWidth = option.lineWidth ? valueToHtml(option.lineWidth) + 'px' : '0px';
93054
93190
  let fillString = 'currentColor';
93055
93191
  const getStroke = () => (stroke ? valueToHtml(stroke) : fillString);
@@ -93073,7 +93209,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93073
93209
  fillString = hollow ? 'none' : fill ? valueToHtml(fill) : 'currentColor';
93074
93210
  return `
93075
93211
  <svg width="${size}" height="${size}" viewBox="${viewBox}"
93076
- style="display: inline-block; vertical-align: middle; margin-top: ${marginTop};">
93212
+ style="display: block;">
93077
93213
  <path
93078
93214
  d="${path}"
93079
93215
  style="fill: ${fillString}; stroke: ${getStroke()}; stroke-width: ${lineWidth}"
@@ -93099,7 +93235,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93099
93235
  }
93100
93236
  return `
93101
93237
  <svg width="${size}" height="${size}" viewBox="-0.5 -0.5 1 1"
93102
- style="display: inline-block; vertical-align: middle; margin-top: ${marginTop};">
93238
+ style="display: block;">
93103
93239
  ${gradient}
93104
93240
  <path
93105
93241
  d="${path}"
@@ -93183,29 +93319,47 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93183
93319
  super.setStyle(mergeSpec({}, defaultContentColumnStyle, tooltipStyle.content, this._getContentColumnStyle()));
93184
93320
  const renderContent = (_b = (_a = this._option.getTooltipActual()) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : [];
93185
93321
  const contentAttributes = (_d = (_c = this._option.getTooltipAttributes()) === null || _c === void 0 ? void 0 : _c.content) !== null && _d !== void 0 ? _d : [];
93322
+ const getKeyItemStyle = (line, i) => {
93323
+ var _a, _b;
93324
+ const { key, isKeyAdaptive } = line;
93325
+ const { height } = contentAttributes[i];
93326
+ const { keyColumn } = tooltipStyle;
93327
+ const style = mergeSpec({}, isKeyAdaptive ? defaultAdaptiveKeyStyle : defaultKeyStyle, Object.assign(Object.assign(Object.assign({ height: getPixelPropertyStr(height) }, defaultLabelStyle), keyColumn.common), (_a = keyColumn.items) === null || _a === void 0 ? void 0 : _a[i]));
93328
+ const hasContent = (isString$1(key) && ((_b = key === null || key === void 0 ? void 0 : key.trim) === null || _b === void 0 ? void 0 : _b.call(key)) !== '') || isNumber$1(key);
93329
+ if (!hasContent && !style.visibility) {
93330
+ style.visibility = 'hidden';
93331
+ }
93332
+ else {
93333
+ style.visibility = 'visible';
93334
+ }
93335
+ return style;
93336
+ };
93337
+ const getValueItemStyle = (line, i) => {
93338
+ var _a;
93339
+ const { height } = contentAttributes[i];
93340
+ const { valueColumn } = tooltipStyle;
93341
+ const style = mergeSpec({}, defaultValueStyle, Object.assign(Object.assign(Object.assign({ height: getPixelPropertyStr(height) }, defaultLabelStyle), valueColumn.common), (_a = valueColumn.items) === null || _a === void 0 ? void 0 : _a[i]));
93342
+ return style;
93343
+ };
93344
+ const getShapeItemStyle = (line, i) => {
93345
+ var _a, _b, _c, _d;
93346
+ const { height } = contentAttributes[i];
93347
+ const { shapeColumn } = tooltipStyle;
93348
+ const keyStyle = getKeyItemStyle(line, i);
93349
+ const paddingTop = `calc((${(_b = (_a = keyStyle.lineHeight) !== null && _a !== void 0 ? _a : keyStyle.fontSize) !== null && _b !== void 0 ? _b : '18px'} - ${(_c = shapeColumn.width) !== null && _c !== void 0 ? _c : '8px'}) / 2)`;
93350
+ const style = mergeSpec({}, defaultShapeStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(height), paddingTop }, shapeColumn.common), (_d = shapeColumn.items) === null || _d === void 0 ? void 0 : _d[i]));
93351
+ return style;
93352
+ };
93186
93353
  renderContent.forEach((line, i) => {
93187
- var _a, _b, _c, _d, _e;
93188
- let childStyle = {};
93189
- const { height, spaceRow = 0 } = contentAttributes[i];
93354
+ var _a;
93190
93355
  if (this.className === 'key-box') {
93191
- const { key, isKeyAdaptive } = line;
93192
- childStyle = mergeSpec({}, isKeyAdaptive ? defaultAdaptiveKeyStyle : defaultKeyStyle, Object.assign(Object.assign(Object.assign({ height: getPixelPropertyStr(height) }, defaultLabelStyle), tooltipStyle.keyColumn.common), (_a = tooltipStyle.keyColumn.items) === null || _a === void 0 ? void 0 : _a[i]));
93193
- const hasContent = (isString$1(key) && ((_b = key === null || key === void 0 ? void 0 : key.trim) === null || _b === void 0 ? void 0 : _b.call(key)) !== '') || isNumber$2(key);
93194
- if (!hasContent && !childStyle.visibility) {
93195
- childStyle.visibility = 'hidden';
93196
- }
93197
- else {
93198
- childStyle.visibility = 'visible';
93199
- }
93200
- this.children[i].setStyle(childStyle);
93356
+ this.children[i].setStyle(getKeyItemStyle(line, i));
93201
93357
  }
93202
93358
  else if (this.className === 'value-box') {
93203
- childStyle = mergeSpec({}, defaultValueStyle, Object.assign(Object.assign(Object.assign({ height: getPixelPropertyStr(height) }, defaultLabelStyle), tooltipStyle.valueColumn.common), (_c = tooltipStyle.valueColumn.items) === null || _c === void 0 ? void 0 : _c[i]));
93204
- this.children[i].setStyle(childStyle);
93359
+ this.children[i].setStyle(getValueItemStyle(line, i));
93205
93360
  }
93206
93361
  else if (this.className === 'shape-box') {
93207
- childStyle = mergeSpec({}, defaultShapeStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(height + (i < renderContent.length - 1 ? spaceRow : 0)) }, tooltipStyle.shapeColumn.common), (_d = tooltipStyle.shapeColumn.items) === null || _d === void 0 ? void 0 : _d[i]));
93208
- (_e = this.children[i]) === null || _e === void 0 ? void 0 : _e.setStyle(childStyle, this._getShapeSvgOption(line, i));
93362
+ (_a = this.children[i]) === null || _a === void 0 ? void 0 : _a.setStyle(getShapeItemStyle(line, i), this._getShapeSvgOption(line, i));
93209
93363
  }
93210
93364
  });
93211
93365
  }
@@ -93218,7 +93372,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93218
93372
  let childContent;
93219
93373
  if (this.className === 'key-box') {
93220
93374
  const keyContent = line.key;
93221
- if ((isString$1(keyContent) && ((_a = keyContent === null || keyContent === void 0 ? void 0 : keyContent.trim) === null || _a === void 0 ? void 0 : _a.call(keyContent)) !== '') || isNumber$2(keyContent)) {
93375
+ if ((isString$1(keyContent) && ((_a = keyContent === null || keyContent === void 0 ? void 0 : keyContent.trim) === null || _a === void 0 ? void 0 : _a.call(keyContent)) !== '') || isNumber$1(keyContent)) {
93222
93376
  childContent = keyContent;
93223
93377
  }
93224
93378
  else {
@@ -93228,7 +93382,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93228
93382
  }
93229
93383
  else if (this.className === 'value-box') {
93230
93384
  const valueContent = line.value;
93231
- if ((isString$1(valueContent) && ((_d = valueContent === null || valueContent === void 0 ? void 0 : valueContent.trim) === null || _d === void 0 ? void 0 : _d.call(valueContent)) !== '') || isNumber$2(valueContent)) {
93385
+ if ((isString$1(valueContent) && ((_d = valueContent === null || valueContent === void 0 ? void 0 : valueContent.trim) === null || _d === void 0 ? void 0 : _d.call(valueContent)) !== '') || isNumber$1(valueContent)) {
93232
93386
  childContent = valueContent;
93233
93387
  }
93234
93388
  else {
@@ -93258,10 +93412,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93258
93412
  }
93259
93413
  }
93260
93414
  _getShapeSvgOption(line, index) {
93261
- var _a, _b, _c, _d, _e, _f;
93415
+ var _a, _b, _c;
93262
93416
  const tooltipStyle = this._option.getTooltipStyle();
93263
93417
  const shapeColumn = Object.assign(Object.assign({}, tooltipStyle.shapeColumn), (_a = tooltipStyle.shapeColumn.items) === null || _a === void 0 ? void 0 : _a[index]);
93264
- const keyColumn = Object.assign(Object.assign({}, tooltipStyle.keyColumn), (_b = tooltipStyle.keyColumn.items) === null || _b === void 0 ? void 0 : _b[index]);
93418
+ Object.assign(Object.assign({}, tooltipStyle.keyColumn), (_b = tooltipStyle.keyColumn.items) === null || _b === void 0 ? void 0 : _b[index]);
93265
93419
  return {
93266
93420
  hasShape: line.hasShape,
93267
93421
  symbolType: line.shapeType,
@@ -93270,7 +93424,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
93270
93424
  stroke: line.shapeStroke,
93271
93425
  lineWidth: line.shapeLineWidth,
93272
93426
  hollow: line.shapeHollow,
93273
- marginTop: `calc((${(_e = (_d = keyColumn.lineHeight) !== null && _d !== void 0 ? _d : keyColumn.fontSize) !== null && _e !== void 0 ? _e : '18px'} - ${(_f = shapeColumn.width) !== null && _f !== void 0 ? _f : '8px'}) / 2)`,
93274
93427
  index
93275
93428
  };
93276
93429
  }