@visactor/vchart 1.8.0-beta.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +574 -633
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/core/index.d.ts +1 -1
  6. package/cjs/core/index.js +1 -1
  7. package/cjs/core/index.js.map +1 -1
  8. package/cjs/interaction/config.js +1 -1
  9. package/cjs/interaction/dimension-trigger.js +1 -1
  10. package/cjs/interaction/interaction.js +1 -1
  11. package/cjs/interaction/interface.js +1 -1
  12. package/cjs/layout/base-layout.js +1 -1
  13. package/cjs/layout/index.js +1 -1
  14. package/cjs/layout/interface.js +1 -1
  15. package/cjs/layout/layout-item.js +1 -1
  16. package/cjs/mark/text.js +2 -1
  17. package/cjs/mark/text.js.map +1 -1
  18. package/cjs/series/funnel/funnel.js +2 -1
  19. package/cjs/series/funnel/funnel.js.map +1 -1
  20. package/cjs/series/gauge/animation.d.ts +7 -0
  21. package/cjs/series/gauge/animation.js +37 -0
  22. package/cjs/series/gauge/animation.js.map +1 -0
  23. package/cjs/series/gauge/gauge-pointer.js +3 -3
  24. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  25. package/cjs/series/gauge/gauge.js +1 -1
  26. package/cjs/series/gauge/gauge.js.map +1 -1
  27. package/cjs/series/polar/progress-like/animation.d.ts +1 -1
  28. package/cjs/series/polar/progress-like/animation.js +3 -3
  29. package/cjs/series/polar/progress-like/animation.js.map +1 -1
  30. package/cjs/series/progress/circular/circular.js +1 -1
  31. package/cjs/series/progress/circular/circular.js.map +1 -1
  32. package/esm/core/index.d.ts +1 -1
  33. package/esm/core/index.js +1 -1
  34. package/esm/core/index.js.map +1 -1
  35. package/esm/interaction/config.js +1 -1
  36. package/esm/interaction/dimension-trigger.js +1 -1
  37. package/esm/interaction/interaction.js +1 -1
  38. package/esm/interaction/interface.js +1 -1
  39. package/esm/layout/base-layout.js +1 -1
  40. package/esm/layout/index.js +1 -1
  41. package/esm/layout/interface.js +1 -1
  42. package/esm/layout/layout-item.js +1 -1
  43. package/esm/mark/text.js +2 -2
  44. package/esm/mark/text.js.map +1 -1
  45. package/esm/series/funnel/funnel.js +2 -1
  46. package/esm/series/funnel/funnel.js.map +1 -1
  47. package/esm/series/gauge/animation.d.ts +7 -0
  48. package/esm/series/gauge/animation.js +29 -0
  49. package/esm/series/gauge/animation.js.map +1 -0
  50. package/esm/series/gauge/gauge-pointer.js +5 -3
  51. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  52. package/esm/series/gauge/gauge.js +2 -2
  53. package/esm/series/gauge/gauge.js.map +1 -1
  54. package/esm/series/polar/progress-like/animation.d.ts +1 -1
  55. package/esm/series/polar/progress-like/animation.js +1 -1
  56. package/esm/series/polar/progress-like/animation.js.map +1 -1
  57. package/esm/series/progress/circular/circular.js +3 -3
  58. package/esm/series/progress/circular/circular.js.map +1 -1
  59. package/package.json +12 -12
package/build/index.js CHANGED
@@ -1591,7 +1591,7 @@
1591
1591
  function LinearToSRGB(c) {
1592
1592
  return c < .0031308 ? 12.92 * c : 1.055 * Math.pow(c, .41666) - .055;
1593
1593
  }
1594
- let Color$2 = class Color {
1594
+ class Color {
1595
1595
  static Brighter(source) {
1596
1596
  let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1597
1597
  return 1 === b ? source : new Color(source).brighter(b).toRGBA();
@@ -1752,7 +1752,7 @@
1752
1752
  convertLinearToSRGB() {
1753
1753
  return this.copyLinearToSRGB(this), this;
1754
1754
  }
1755
- };
1755
+ }
1756
1756
  class RGB {
1757
1757
  constructor(r, g, b, opacity) {
1758
1758
  this.r = isNaN(+r) ? 255 : Math.max(0, Math.min(255, +r)), this.g = isNaN(+g) ? 255 : Math.max(0, Math.min(255, +g)), this.b = isNaN(+b) ? 255 : Math.max(0, Math.min(255, +b)), isValid$1(opacity) ? this.opacity = isNaN(+opacity) ? 1 : Math.max(0, Math.min(1, +opacity)) : this.opacity = 1;
@@ -1810,7 +1810,7 @@
1810
1810
 
1811
1811
  var ColorUtil = /*#__PURE__*/Object.freeze({
1812
1812
  __proto__: null,
1813
- Color: Color$2,
1813
+ Color: Color,
1814
1814
  DEFAULT_COLORS: DEFAULT_COLORS,
1815
1815
  RGB: RGB,
1816
1816
  hexToRgb: hexToRgb,
@@ -6736,6 +6736,13 @@
6736
6736
  };
6737
6737
  }
6738
6738
 
6739
+ function isHorizontal$2(direction) {
6740
+ return "horizontal" === direction;
6741
+ }
6742
+ function isVertical$1(direction) {
6743
+ return "vertical" === direction;
6744
+ }
6745
+
6739
6746
  var ScaleEnum;
6740
6747
  !function (ScaleEnum) {
6741
6748
  ScaleEnum.Identity = "identity", ScaleEnum.Linear = "linear", ScaleEnum.Log = "log", ScaleEnum.Pow = "pow", ScaleEnum.Sqrt = "sqrt", ScaleEnum.Symlog = "symlog", ScaleEnum.Time = "time", ScaleEnum.Quantile = "quantile", ScaleEnum.Quantize = "quantize", ScaleEnum.Threshold = "threshold", ScaleEnum.Ordinal = "ordinal", ScaleEnum.Point = "point", ScaleEnum.Band = "band";
@@ -7170,13 +7177,13 @@
7170
7177
  if (isNil$1(b) || "boolean" === t) return () => b;
7171
7178
  if ("number" === t) return interpolateNumber(a, b);
7172
7179
  if ("string" === t) {
7173
- if (c = Color$2.parseColorString(b)) {
7174
- const rgb = interpolateRgb(Color$2.parseColorString(a), c);
7180
+ if (c = Color.parseColorString(b)) {
7181
+ const rgb = interpolateRgb(Color.parseColorString(a), c);
7175
7182
  return t => rgb(t).formatRgb();
7176
7183
  }
7177
7184
  return interpolateNumber(Number(a), Number(b));
7178
7185
  }
7179
- return b instanceof RGB ? interpolateRgb(a, b) : b instanceof Color$2 ? interpolateRgb(a.color, b.color) : b instanceof Date ? interpolateDate(a, b) : interpolateNumber(Number(a), Number(b));
7186
+ return b instanceof RGB ? interpolateRgb(a, b) : b instanceof Color ? interpolateRgb(a.color, b.color) : b instanceof Date ? interpolateDate(a, b) : interpolateNumber(Number(a), Number(b));
7180
7187
  }
7181
7188
 
7182
7189
  class ContinuousScale extends BaseScale {
@@ -8506,7 +8513,7 @@
8506
8513
  const EnvContribution = Symbol.for("EnvContribution");
8507
8514
  const VGlobal = Symbol.for("VGlobal");
8508
8515
 
8509
- var __decorate$1w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8516
+ var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8510
8517
  var d,
8511
8518
  c = arguments.length,
8512
8519
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -8673,7 +8680,7 @@
8673
8680
  return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
8674
8681
  }
8675
8682
  };
8676
- DefaultGlobal = __decorate$1w([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(EnvContribution)), __metadata$18("design:paramtypes", [Object])], DefaultGlobal);
8683
+ DefaultGlobal = __decorate$1v([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(EnvContribution)), __metadata$18("design:paramtypes", [Object])], DefaultGlobal);
8677
8684
 
8678
8685
  const circleThreshold = tau$1 - 1e-8;
8679
8686
  class BoundsContext {
@@ -9809,10 +9816,12 @@
9809
9816
  wordBreak: "break-all",
9810
9817
  ignoreBuf: !1,
9811
9818
  verticalMode: 0,
9819
+ wrap: !1,
9812
9820
  whiteSpace: "no-wrap",
9813
9821
  heightLimit: 1 / 0,
9814
9822
  lineClamp: 1 / 0,
9815
- suffixPosition: "end"
9823
+ suffixPosition: "end",
9824
+ disableAutoClipedPoptip: void 0
9816
9825
  };
9817
9826
  const DefaultPickStyle = {
9818
9827
  pickStrokeBuffer: 0
@@ -10099,7 +10108,7 @@
10099
10108
  return "number" != typeof measurement.actualBoundingBoxAscent || "number" != typeof measurement.actualBoundingBoxDescent ? (result.width = Math.floor(measurement.width), result.height = character.fontSize || 0, result.ascent = result.height, result.descent = 0) : (result.width = Math.floor(measurement.width), result.height = Math.floor(measurement.actualBoundingBoxAscent + measurement.actualBoundingBoxDescent), result.ascent = Math.floor(measurement.actualBoundingBoxAscent), result.descent = result.height - result.ascent), result;
10100
10109
  }
10101
10110
 
10102
- var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10111
+ var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10103
10112
  var d,
10104
10113
  c = arguments.length,
10105
10114
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10368,9 +10377,9 @@
10368
10377
  return data.str = data.result, data.width += suffixWidth, data;
10369
10378
  }
10370
10379
  };
10371
- ATextMeasure = __decorate$1v([injectable()], ATextMeasure);
10380
+ ATextMeasure = __decorate$1u([injectable()], ATextMeasure);
10372
10381
 
10373
- var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10382
+ var __decorate$1t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10374
10383
  var d,
10375
10384
  c = arguments.length,
10376
10385
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10379,7 +10388,7 @@
10379
10388
  };
10380
10389
  const TextMeasureContribution = Symbol.for("TextMeasureContribution");
10381
10390
  let DefaultTextMeasureContribution = class extends ATextMeasure {};
10382
- DefaultTextMeasureContribution = __decorate$1u([injectable()], DefaultTextMeasureContribution);
10391
+ DefaultTextMeasureContribution = __decorate$1t([injectable()], DefaultTextMeasureContribution);
10383
10392
 
10384
10393
  const container = new Container();
10385
10394
 
@@ -10802,7 +10811,7 @@
10802
10811
  }
10803
10812
  const canvasAllocate = new DefaultCanvasAllocate();
10804
10813
 
10805
- var __decorate$1t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10814
+ var __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10806
10815
  var d,
10807
10816
  c = arguments.length,
10808
10817
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10870,7 +10879,7 @@
10870
10879
  }, null != option ? option : {}), textSpec);
10871
10880
  }
10872
10881
  };
10873
- DefaultGraphicUtil = __decorate$1t([injectable(), __param$L(0, inject(ContributionProvider)), __param$L(0, named(TextMeasureContribution)), __metadata$17("design:paramtypes", [Object])], DefaultGraphicUtil);
10882
+ DefaultGraphicUtil = __decorate$1s([injectable(), __param$L(0, inject(ContributionProvider)), __param$L(0, named(TextMeasureContribution)), __metadata$17("design:paramtypes", [Object])], DefaultGraphicUtil);
10874
10883
  var TransformMode;
10875
10884
  !function (TransformMode) {
10876
10885
  TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
@@ -10928,7 +10937,7 @@
10928
10937
  return this;
10929
10938
  }
10930
10939
  };
10931
- DefaultTransformUtil = __decorate$1t([injectable(), __metadata$17("design:paramtypes", [])], DefaultTransformUtil);
10940
+ DefaultTransformUtil = __decorate$1s([injectable(), __metadata$17("design:paramtypes", [])], DefaultTransformUtil);
10932
10941
 
10933
10942
  const defaultThemeObj = {
10934
10943
  arc: DefaultArcAttribute,
@@ -11547,7 +11556,7 @@
11547
11556
  }
11548
11557
  class EventManager {
11549
11558
  constructor(root, config) {
11550
- this.dispatch = new EventEmitter(), this.mappingState = {
11559
+ this.dispatch = new EventEmitter(), this.cursorTarget = null, this.mappingState = {
11551
11560
  trackingData: {}
11552
11561
  }, this.eventPool = new Map(), this.onPointerDown = (from, target) => {
11553
11562
  if (!(from instanceof FederatedPointerEvent)) return void Logger.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event");
@@ -11587,14 +11596,14 @@
11587
11596
  }
11588
11597
  this.freeEvent(overEvent);
11589
11598
  }
11590
- this.dispatchEvent(e, "pointermove"), "touch" === e.pointerType && this.dispatchEvent(e, "touchmove"), isMouse && (this.dispatchEvent(e, "mousemove"), this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || this.rootTarget.getCursor()), trackingData.overTargets = e.composedPath(), this.freeEvent(e);
11599
+ this.dispatchEvent(e, "pointermove"), "touch" === e.pointerType && this.dispatchEvent(e, "touchmove"), isMouse && (this.dispatchEvent(e, "mousemove"), this.cursorTarget = e.target, this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || this.rootTarget.getCursor()), trackingData.overTargets = e.composedPath(), this.freeEvent(e);
11591
11600
  }, this.onPointerOver = (from, target) => {
11592
11601
  var _a, _b;
11593
11602
  if (!(from instanceof FederatedPointerEvent)) return void Logger.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event");
11594
11603
  const trackingData = this.trackingData(from.pointerId),
11595
11604
  e = this.createPointerEvent(from, from.type, target),
11596
11605
  isMouse = isMouseLike(e.pointerType);
11597
- this.dispatchEvent(e, "pointerover"), isMouse && this.dispatchEvent(e, "mouseover"), "mouse" === e.pointerType && (this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || this.rootTarget.getCursor());
11606
+ this.dispatchEvent(e, "pointerover"), isMouse && this.dispatchEvent(e, "mouseover"), "mouse" === e.pointerType && (this.cursorTarget = e.target, this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || this.rootTarget.getCursor());
11598
11607
  const enterEvent = this.clonePointerEvent(e, "pointerenter");
11599
11608
  for (enterEvent.eventPhase = enterEvent.AT_TARGET; enterEvent.target && enterEvent.target !== this.rootTarget.parent;) enterEvent.currentTarget = enterEvent.target, this.notifyTarget(enterEvent), isMouse && this.notifyTarget(enterEvent, "mouseenter"), enterEvent.target = enterEvent.target.parent;
11600
11609
  trackingData.overTargets = e.composedPath(), this.freeEvent(e), this.freeEvent(enterEvent);
@@ -11610,7 +11619,7 @@
11610
11619
  for (leaveEvent.eventPhase = leaveEvent.AT_TARGET; leaveEvent.target && leaveEvent.target !== this.rootTarget.parent;) leaveEvent.currentTarget = leaveEvent.target, this.notifyTarget(leaveEvent), isMouse && this.notifyTarget(leaveEvent, "mouseleave"), leaveEvent.target = leaveEvent.target.parent;
11611
11620
  trackingData.overTargets = [], this.freeEvent(outEvent), this.freeEvent(leaveEvent);
11612
11621
  }
11613
- this.cursor = "";
11622
+ this.cursorTarget = null, this.cursor = "";
11614
11623
  }, this.onPointerUp = (from, target) => {
11615
11624
  var _a;
11616
11625
  if (!(from instanceof FederatedPointerEvent)) return void Logger.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event");
@@ -11774,7 +11783,7 @@
11774
11783
  pickTarget(x, y, e) {
11775
11784
  let target;
11776
11785
  const pickResult = this.rootTarget.pick(x, y);
11777
- return target = pickResult && pickResult.graphic ? pickResult.graphic : pickResult && pickResult.group ? pickResult.group : x >= 0 && x <= get$1(this.rootTarget, "width") && y >= 0 && y <= get$1(this.rootTarget, "height") ? this.rootTarget : null, e && (e.pickParams = pickResult.params), target;
11786
+ return target = pickResult && pickResult.graphic ? pickResult.graphic : pickResult && pickResult.group ? pickResult.group : this.rootTarget.AABBBounds.contains(x, y) ? this.rootTarget : null, e && (e.pickParams = pickResult.params), target;
11778
11787
  }
11779
11788
  }
11780
11789
 
@@ -11811,7 +11820,7 @@
11811
11820
  federatedEvent = this.bootstrapEvent(this.rootPointerEvent, nativeEvent);
11812
11821
  this.manager.mapEvent(federatedEvent);
11813
11822
  }
11814
- this.setCursor(this.manager.cursor);
11823
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11815
11824
  }, this.onPointerMove = nativeEvent => {
11816
11825
  if (this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
11817
11826
  if (this.isEventOutsideOfTargetElement(nativeEvent)) return;
@@ -11820,7 +11829,7 @@
11820
11829
  const event = this.bootstrapEvent(this.rootPointerEvent, normalizedEvents[i]);
11821
11830
  this.manager.mapEvent(event);
11822
11831
  }
11823
- this.setCursor(this.manager.cursor);
11832
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11824
11833
  }, this.onPointerUp = nativeEvent => {
11825
11834
  if (this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
11826
11835
  const outside = this.isEventOutsideOfTargetElement(nativeEvent) ? "outside" : "",
@@ -11829,7 +11838,7 @@
11829
11838
  const event = this.bootstrapEvent(this.rootPointerEvent, normalizedEvents[i]);
11830
11839
  event.type += outside, this.manager.mapEvent(event);
11831
11840
  }
11832
- this.setCursor(this.manager.cursor);
11841
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11833
11842
  }, this.onPointerOverOut = nativeEvent => {
11834
11843
  if (this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
11835
11844
  const normalizedEvents = this.normalizeToPointerData(nativeEvent);
@@ -11837,7 +11846,7 @@
11837
11846
  const event = this.bootstrapEvent(this.rootPointerEvent, normalizedEvents[i]);
11838
11847
  this.manager.mapEvent(event);
11839
11848
  }
11840
- this.setCursor(this.manager.cursor);
11849
+ this.setCursor(this.manager.cursor, this.manager.cursorTarget);
11841
11850
  }, this.onWheel = nativeEvent => {
11842
11851
  const wheelEvent = this.normalizeWheelEvent(nativeEvent);
11843
11852
  this.manager.mapEvent(wheelEvent);
@@ -11861,8 +11870,9 @@
11861
11870
  release() {
11862
11871
  this.setTargetElement(null);
11863
11872
  }
11864
- setCursor() {
11865
- let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "default";
11873
+ setCursor(mode, target) {
11874
+ if (!target && !this.manager.rootTarget.window._handler.canvas.controled) return;
11875
+ mode || (mode = "default");
11866
11876
  const {
11867
11877
  applyStyles: applyStyles,
11868
11878
  domElement: domElement
@@ -12985,7 +12995,8 @@
12985
12995
  if (null == this.phi || null == this.theta) return;
12986
12996
  const {
12987
12997
  center: center,
12988
- r: r
12998
+ r: r,
12999
+ cb: cb
12989
13000
  } = "function" == typeof this.params ? this.params() : this.params,
12990
13001
  deltaAngle = 2 * Math.PI * ratio,
12991
13002
  theta = this.theta + deltaAngle,
@@ -12994,7 +13005,7 @@
12994
13005
  y = r * Math.cos(phi) + center.y,
12995
13006
  z = r * Math.sin(phi) * Math.sin(theta) + center.z;
12996
13007
  for (out.x = x, out.y = y, out.z = z, out.alpha = theta + pi$1 / 2; out.alpha > pi2;) out.alpha -= pi2;
12997
- out.alpha = pi2 - out.alpha, out.zIndex = -1e4 * out.z;
13008
+ out.alpha = pi2 - out.alpha, out.zIndex = -1e4 * out.z, cb && cb(out);
12998
13009
  }
12999
13010
  }
13000
13011
  class GroupFadeOut extends ACustomAnimate {
@@ -13662,9 +13673,6 @@
13662
13673
  return res;
13663
13674
  };
13664
13675
 
13665
- const {
13666
- Color: Color$1
13667
- } = ColorUtil;
13668
13676
  var ColorType;
13669
13677
  !function (ColorType) {
13670
13678
  ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
@@ -13676,7 +13684,7 @@
13676
13684
  if (size === ColorType.Color1) {
13677
13685
  const color = ColorStore.store1[str];
13678
13686
  if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
13679
- const c = Color$1.parseColorString(str);
13687
+ const c = Color.parseColorString(str);
13680
13688
  if (c) {
13681
13689
  const data = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
13682
13690
  ColorStore.store1[str] = data, ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity], arr[0] = data[0], arr[1] = data[1], arr[2] = data[2], arr[3] = data[3];
@@ -13685,7 +13693,7 @@
13685
13693
  }
13686
13694
  const color = ColorStore.store255[str];
13687
13695
  if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
13688
- const c = Color$1.parseColorString(str);
13696
+ const c = Color.parseColorString(str);
13689
13697
  return c && (ColorStore.store1[str] = [c.r / 255, c.g / 255, c.b / 255, c.opacity], ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity], arr[0] = c.r, arr[1] = c.g, arr[2] = c.b, arr[3] = c.opacity), arr;
13690
13698
  }
13691
13699
  static Set(str, size, arr) {
@@ -15394,7 +15402,7 @@
15394
15402
  const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
15395
15403
 
15396
15404
  var DefaultLayerService_1,
15397
- __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15405
+ __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15398
15406
  var d,
15399
15407
  c = arguments.length,
15400
15408
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15462,9 +15470,9 @@
15462
15470
  return "browser" === this.global.env ? 10 : 0;
15463
15471
  }
15464
15472
  };
15465
- DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = DefaultLayerService_1 = __decorate$1s([injectable(), __metadata$16("design:paramtypes", [])], DefaultLayerService);
15473
+ DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = DefaultLayerService_1 = __decorate$1r([injectable(), __metadata$16("design:paramtypes", [])], DefaultLayerService);
15466
15474
 
15467
- var __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15475
+ var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
15468
15476
  var d,
15469
15477
  c = arguments.length,
15470
15478
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -15572,7 +15580,7 @@
15572
15580
  return this._handler.getTopLeft(baseWindow);
15573
15581
  }
15574
15582
  };
15575
- DefaultWindow = __decorate$1r([injectable(), __metadata$15("design:paramtypes", [])], DefaultWindow);
15583
+ DefaultWindow = __decorate$1q([injectable(), __metadata$15("design:paramtypes", [])], DefaultWindow);
15576
15584
 
15577
15585
  var coreModule = new ContainerModule(bind => {
15578
15586
  bind(VGlobal).to(DefaultGlobal).inSingletonScope(), bind(VWindow).to(DefaultWindow), bind(GraphicUtil).to(DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(DefaultTransformUtil).inSingletonScope(), bind(LayerService).to(DefaultLayerService).inSingletonScope();
@@ -16034,7 +16042,7 @@
16034
16042
  }
16035
16043
  }
16036
16044
 
16037
- const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", ...GRAPHIC_UPDATE_TAG_KEY];
16045
+ const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp", ...GRAPHIC_UPDATE_TAG_KEY];
16038
16046
  let Text$1 = class Text extends Graphic {
16039
16047
  get font() {
16040
16048
  const textTheme = getTheme$1(this).text;
@@ -16044,26 +16052,29 @@
16044
16052
  var _a;
16045
16053
  const attribute = this.attribute,
16046
16054
  textTheme = getTheme$1(this).text;
16047
- if (Array.isArray(attribute.text)) return;
16055
+ if (this.isMultiLine) return;
16048
16056
  const {
16049
16057
  maxLineWidth = textTheme.maxLineWidth
16050
16058
  } = attribute;
16051
16059
  return Number.isFinite(maxLineWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
16052
16060
  }
16053
16061
  get clipedWidth() {
16054
- if (!Array.isArray(this.attribute.text)) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
16062
+ if (!this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
16055
16063
  }
16056
16064
  get cliped() {
16057
16065
  const textTheme = getTheme$1(this).text,
16058
16066
  attribute = this.attribute;
16059
- if (Array.isArray(attribute.text)) return;
16067
+ if (this.isMultiLine) return;
16060
16068
  const {
16061
16069
  maxLineWidth = textTheme.maxLineWidth
16062
16070
  } = attribute;
16063
16071
  return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), this.clipedText !== attribute.text.toString());
16064
16072
  }
16065
16073
  get multilineLayout() {
16066
- if (Array.isArray(this.attribute.text)) return this.tryUpdateAABBBounds(), this.cache.layoutData;
16074
+ if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
16075
+ }
16076
+ get isMultiLine() {
16077
+ return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
16067
16078
  }
16068
16079
  constructor() {
16069
16080
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
@@ -16079,7 +16090,7 @@
16079
16090
  const {
16080
16091
  text: text
16081
16092
  } = this.attribute;
16082
- return null != text && "" !== text;
16093
+ return isArray$1(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
16083
16094
  }
16084
16095
  doUpdateAABBBounds() {
16085
16096
  const textTheme = getTheme$1(this).text;
@@ -16207,7 +16218,11 @@
16207
16218
  updateHorizontalSinglelineAABBBounds(text) {
16208
16219
  var _a, _b;
16209
16220
  const textTheme = getTheme$1(this).text,
16210
- textMeasure = application.graphicUtil.textMeasure;
16221
+ {
16222
+ wrap = textTheme.wrap
16223
+ } = this.attribute;
16224
+ if (wrap) return this.updateWrapAABBBounds([text]);
16225
+ const textMeasure = application.graphicUtil.textMeasure;
16211
16226
  let width, str;
16212
16227
  const attribute = this.attribute,
16213
16228
  {
@@ -16341,7 +16356,11 @@
16341
16356
  updateHorizontalMultilineAABBBounds(text) {
16342
16357
  var _a, _b;
16343
16358
  const textTheme = getTheme$1(this).text,
16344
- attribute = this.attribute,
16359
+ {
16360
+ wrap = textTheme.wrap
16361
+ } = this.attribute;
16362
+ if (wrap) return this.updateWrapAABBBounds(text);
16363
+ const attribute = this.attribute,
16345
16364
  {
16346
16365
  fontFamily = textTheme.fontFamily,
16347
16366
  textAlign = textTheme.textAlign,
@@ -16492,6 +16511,11 @@
16492
16511
 
16493
16512
  const WRAP_TEXT_UPDATE_TAG_KEY = ["heightLimit", "lineClamp"];
16494
16513
  class WrapText extends Text$1 {
16514
+ constructor(params) {
16515
+ super(Object.assign(Object.assign({}, params), {
16516
+ wrap: !0
16517
+ }));
16518
+ }
16495
16519
  _isValid() {
16496
16520
  const {
16497
16521
  text: text
@@ -18756,7 +18780,7 @@
18756
18780
  const matrixAllocate = new DefaultMatrixAllocate();
18757
18781
  const mat4Allocate = new DefaultMat4Allocate();
18758
18782
 
18759
- var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18783
+ var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18760
18784
  var d,
18761
18785
  c = arguments.length,
18762
18786
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19343,7 +19367,7 @@
19343
19367
  return !!visible || (aabbBounds.clear(), !1);
19344
19368
  }
19345
19369
  };
19346
- DefaultGraphicService = __decorate$1q([injectable(), __param$K(0, inject(GraphicCreator$1)), __metadata$14("design:paramtypes", [Object])], DefaultGraphicService);
19370
+ DefaultGraphicService = __decorate$1p([injectable(), __param$K(0, inject(GraphicCreator$1)), __metadata$14("design:paramtypes", [Object])], DefaultGraphicService);
19347
19371
 
19348
19372
  class GraphicCreator {
19349
19373
  constructor() {
@@ -19583,7 +19607,7 @@
19583
19607
  }), canvasGradient.GetPattern(w + x, h + y, undefined);
19584
19608
  }
19585
19609
 
19586
- var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19610
+ var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19587
19611
  var d,
19588
19612
  c = arguments.length,
19589
19613
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -19641,7 +19665,7 @@
19641
19665
  });
19642
19666
  }
19643
19667
  };
19644
- DefaultBaseInteractiveRenderContribution = __decorate$1p([injectable(), __param$J(0, inject(ContributionProvider)), __param$J(0, named(InteractiveSubRenderContribution)), __metadata$13("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
19668
+ DefaultBaseInteractiveRenderContribution = __decorate$1o([injectable(), __param$J(0, inject(ContributionProvider)), __param$J(0, named(InteractiveSubRenderContribution)), __metadata$13("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
19645
19669
  class DefaultBaseTextureRenderContribution {
19646
19670
  constructor() {
19647
19671
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 10;
@@ -20158,7 +20182,7 @@
20158
20182
  const defaultSymbolTextureRenderContribution = defaultBaseTextureRenderContribution;
20159
20183
  const defaultSymbolBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
20160
20184
 
20161
- var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20185
+ var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20162
20186
  var d,
20163
20187
  c = arguments.length,
20164
20188
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -20324,9 +20348,9 @@
20324
20348
  this._draw(arc, arcAttribute, !1, drawContext, params);
20325
20349
  }
20326
20350
  };
20327
- DefaultCanvasArcRender = __decorate$1o([injectable(), __param$I(0, inject(ContributionProvider)), __param$I(0, named(ArcRenderContribution)), __metadata$12("design:paramtypes", [Object])], DefaultCanvasArcRender);
20351
+ DefaultCanvasArcRender = __decorate$1n([injectable(), __param$I(0, inject(ContributionProvider)), __param$I(0, named(ArcRenderContribution)), __metadata$12("design:paramtypes", [Object])], DefaultCanvasArcRender);
20328
20352
 
20329
- var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20353
+ var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20330
20354
  var d,
20331
20355
  c = arguments.length,
20332
20356
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -20369,7 +20393,7 @@
20369
20393
  this._draw(circle, circleAttribute, !1, drawContext, params);
20370
20394
  }
20371
20395
  };
20372
- DefaultCanvasCircleRender = __decorate$1n([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(CircleRenderContribution)), __metadata$11("design:paramtypes", [Object])], DefaultCanvasCircleRender);
20396
+ DefaultCanvasCircleRender = __decorate$1m([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(CircleRenderContribution)), __metadata$11("design:paramtypes", [Object])], DefaultCanvasCircleRender);
20373
20397
 
20374
20398
  function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
20375
20399
  var _a;
@@ -20507,7 +20531,7 @@
20507
20531
  }
20508
20532
  }
20509
20533
 
20510
- var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20534
+ var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20511
20535
  var d,
20512
20536
  c = arguments.length,
20513
20537
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -20664,7 +20688,7 @@
20664
20688
  } else this.drawSegmentItem(context, line.cache, !!fill, !!stroke, fillOpacity, strokeOpacity, line.attribute, lineAttribute, clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb);
20665
20689
  }
20666
20690
  };
20667
- DefaultCanvasLineRender = __decorate$1m([injectable()], DefaultCanvasLineRender);
20691
+ DefaultCanvasLineRender = __decorate$1l([injectable()], DefaultCanvasLineRender);
20668
20692
 
20669
20693
  function drawAreaSegments(path, segPath, percent, params) {
20670
20694
  var _a;
@@ -20854,7 +20878,7 @@
20854
20878
  const defaultAreaTextureRenderContribution = new DefaultAreaTextureRenderContribution();
20855
20879
  const defaultAreaBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
20856
20880
 
20857
- var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20881
+ var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
20858
20882
  var d,
20859
20883
  c = arguments.length,
20860
20884
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21109,12 +21133,12 @@
21109
21133
  return !1;
21110
21134
  }
21111
21135
  };
21112
- DefaultCanvasAreaRender = __decorate$1l([injectable(), __param$G(0, inject(ContributionProvider)), __param$G(0, named(AreaRenderContribution)), __metadata$10("design:paramtypes", [Object])], DefaultCanvasAreaRender);
21136
+ DefaultCanvasAreaRender = __decorate$1k([injectable(), __param$G(0, inject(ContributionProvider)), __param$G(0, named(AreaRenderContribution)), __metadata$10("design:paramtypes", [Object])], DefaultCanvasAreaRender);
21113
21137
 
21114
21138
  const defaultPathTextureRenderContribution = defaultBaseTextureRenderContribution;
21115
21139
  const defaultPathBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
21116
21140
 
21117
- var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21141
+ var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21118
21142
  var d,
21119
21143
  c = arguments.length,
21120
21144
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21160,9 +21184,9 @@
21160
21184
  this.tempTheme = pathAttribute, this._draw(path, pathAttribute, !1, drawContext, params), this.tempTheme = null;
21161
21185
  }
21162
21186
  };
21163
- DefaultCanvasPathRender = __decorate$1k([injectable(), __param$F(0, inject(ContributionProvider)), __param$F(0, named(PathRenderContribution)), __metadata$$("design:paramtypes", [Object])], DefaultCanvasPathRender);
21187
+ DefaultCanvasPathRender = __decorate$1j([injectable(), __param$F(0, inject(ContributionProvider)), __param$F(0, named(PathRenderContribution)), __metadata$$("design:paramtypes", [Object])], DefaultCanvasPathRender);
21164
21188
 
21165
- var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21189
+ var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21166
21190
  var d,
21167
21191
  c = arguments.length,
21168
21192
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21223,9 +21247,9 @@
21223
21247
  this.tempTheme = rectAttribute, this._draw(rect, rectAttribute, !1, drawContext, params), this.tempTheme = null;
21224
21248
  }
21225
21249
  };
21226
- DefaultCanvasRectRender = __decorate$1j([injectable(), __param$E(0, inject(ContributionProvider)), __param$E(0, named(RectRenderContribution)), __metadata$_("design:paramtypes", [Object])], DefaultCanvasRectRender);
21250
+ DefaultCanvasRectRender = __decorate$1i([injectable(), __param$E(0, inject(ContributionProvider)), __param$E(0, named(RectRenderContribution)), __metadata$_("design:paramtypes", [Object])], DefaultCanvasRectRender);
21227
21251
 
21228
- var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21252
+ var __decorate$1h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21229
21253
  var d,
21230
21254
  c = arguments.length,
21231
21255
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21271,7 +21295,7 @@
21271
21295
  if (context.beginPath(), keepDirIn3d && context.camera && context.project) {
21272
21296
  const p = context.project(x, y, z),
21273
21297
  camera = context.camera;
21274
- context.camera = null, !1 === parsedPath.draw(context, size, p.x, p.y, void 0, (p, a) => {
21298
+ context.camera = null, !1 === parsedPath.draw(context, isArray$1(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, p.x, p.y, void 0, (p, a) => {
21275
21299
  var _a, _b, _c;
21276
21300
  if (symbol._parsedPath.svgCache) {
21277
21301
  const obj = Object.assign({}, a);
@@ -21294,7 +21318,7 @@
21294
21318
  this._draw(symbol, symbolAttribute, !1, drawContext, params);
21295
21319
  }
21296
21320
  };
21297
- DefaultCanvasSymbolRender = __decorate$1i([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(SymbolRenderContribution)), __metadata$Z("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
21321
+ DefaultCanvasSymbolRender = __decorate$1h([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(SymbolRenderContribution)), __metadata$Z("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
21298
21322
 
21299
21323
  class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRenderContribution {
21300
21324
  constructor() {
@@ -21316,7 +21340,7 @@
21316
21340
  }
21317
21341
  const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
21318
21342
 
21319
- var __decorate$1h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21343
+ var __decorate$1g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21320
21344
  var d,
21321
21345
  c = arguments.length,
21322
21346
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21344,6 +21368,7 @@
21344
21368
  lineThrough = textAttribute.lineThrough,
21345
21369
  keepDirIn3d = textAttribute.keepDirIn3d,
21346
21370
  direction = textAttribute.direction,
21371
+ whiteSpace = textAttribute.whiteSpace,
21347
21372
  fontSize = textAttribute.fontSize,
21348
21373
  verticalMode = textAttribute.verticalMode,
21349
21374
  x: originX = textAttribute.x,
@@ -21379,7 +21404,7 @@
21379
21404
  }
21380
21405
  doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.strokeText(t, _x, _y, z))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.fillText(t, _x, _y, z), this.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context))), direction && (context.highPerformanceRestore(), context.setTransformForCurrent());
21381
21406
  };
21382
- if (Array.isArray(str)) {
21407
+ if (text.isMultiLine) {
21383
21408
  if (context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z), "horizontal" === direction) {
21384
21409
  const {
21385
21410
  multilineLayout: multilineLayout
@@ -21519,7 +21544,7 @@
21519
21544
  }
21520
21545
  }
21521
21546
  };
21522
- DefaultCanvasTextRender = __decorate$1h([injectable(), __param$C(0, inject(ContributionProvider)), __param$C(0, named(TextRenderContribution)), __metadata$Y("design:paramtypes", [Object])], DefaultCanvasTextRender);
21547
+ DefaultCanvasTextRender = __decorate$1g([injectable(), __param$C(0, inject(ContributionProvider)), __param$C(0, named(TextRenderContribution)), __metadata$Y("design:paramtypes", [Object])], DefaultCanvasTextRender);
21523
21548
 
21524
21549
  function drawPolygon(path, points, x, y) {
21525
21550
  path.moveTo(points[0].x + x, points[0].y + y);
@@ -21575,7 +21600,7 @@
21575
21600
  const defaultPolygonTextureRenderContribution = defaultBaseTextureRenderContribution;
21576
21601
  const defaultPolygonBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
21577
21602
 
21578
- var __decorate$1g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21603
+ var __decorate$1f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21579
21604
  var d,
21580
21605
  c = arguments.length,
21581
21606
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21618,9 +21643,9 @@
21618
21643
  this._draw(polygon, polygonAttribute, !1, drawContext, params);
21619
21644
  }
21620
21645
  };
21621
- DefaultCanvasPolygonRender = __decorate$1g([injectable(), __param$B(0, inject(ContributionProvider)), __param$B(0, named(PolygonRenderContribution)), __metadata$X("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
21646
+ DefaultCanvasPolygonRender = __decorate$1f([injectable(), __param$B(0, inject(ContributionProvider)), __param$B(0, named(PolygonRenderContribution)), __metadata$X("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
21622
21647
 
21623
- var __decorate$1f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21648
+ var __decorate$1e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21624
21649
  var d,
21625
21650
  c = arguments.length,
21626
21651
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21687,7 +21712,7 @@
21687
21712
  this._draw(image, imageAttribute, !1, drawContext);
21688
21713
  }
21689
21714
  };
21690
- DefaultCanvasImageRender = __decorate$1f([injectable(), __param$A(0, inject(ContributionProvider)), __param$A(0, named(ImageRenderContribution)), __metadata$W("design:paramtypes", [Object])], DefaultCanvasImageRender);
21715
+ DefaultCanvasImageRender = __decorate$1e([injectable(), __param$A(0, inject(ContributionProvider)), __param$A(0, named(ImageRenderContribution)), __metadata$W("design:paramtypes", [Object])], DefaultCanvasImageRender);
21691
21716
 
21692
21717
  const IncrementalDrawContribution = Symbol.for("IncrementalDrawContribution");
21693
21718
  const ArcRender = Symbol.for("ArcRender");
@@ -21709,7 +21734,7 @@
21709
21734
  const ImageRender = Symbol.for("ImageRender");
21710
21735
  const DrawContribution = Symbol.for("DrawContribution");
21711
21736
 
21712
- var __decorate$1e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21737
+ var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21713
21738
  var d,
21714
21739
  c = arguments.length,
21715
21740
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21756,7 +21781,7 @@
21756
21781
  this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params);
21757
21782
  }
21758
21783
  };
21759
- DefaultRenderService = __decorate$1e([injectable(), __param$z(0, inject(DrawContribution)), __metadata$V("design:paramtypes", [Object])], DefaultRenderService);
21784
+ DefaultRenderService = __decorate$1d([injectable(), __param$z(0, inject(DrawContribution)), __metadata$V("design:paramtypes", [Object])], DefaultRenderService);
21760
21785
 
21761
21786
  var renderModule$1 = new ContainerModule(bind => {
21762
21787
  bind(RenderService).to(DefaultRenderService).inSingletonScope();
@@ -21765,7 +21790,7 @@
21765
21790
  const PickerService = Symbol.for("PickerService");
21766
21791
  const GlobalPickerService = Symbol.for("GlobalPickerService");
21767
21792
 
21768
- var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21793
+ var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21769
21794
  var d,
21770
21795
  c = arguments.length,
21771
21796
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21798,7 +21823,7 @@
21798
21823
  return context.highPerformanceRestore(), result;
21799
21824
  }
21800
21825
  };
21801
- ShadowRootPickItemInterceptorContribution = __decorate$1d([injectable()], ShadowRootPickItemInterceptorContribution);
21826
+ ShadowRootPickItemInterceptorContribution = __decorate$1c([injectable()], ShadowRootPickItemInterceptorContribution);
21802
21827
  let InteractivePickItemInterceptorContribution = class {
21803
21828
  constructor() {
21804
21829
  this.order = 1;
@@ -21817,7 +21842,7 @@
21817
21842
  return null;
21818
21843
  }
21819
21844
  };
21820
- InteractivePickItemInterceptorContribution = __decorate$1d([injectable()], InteractivePickItemInterceptorContribution);
21845
+ InteractivePickItemInterceptorContribution = __decorate$1c([injectable()], InteractivePickItemInterceptorContribution);
21821
21846
  let Canvas3DPickItemInterceptor = class {
21822
21847
  constructor() {
21823
21848
  this.order = 1;
@@ -21877,7 +21902,7 @@
21877
21902
  context.setTransformForCurrent();
21878
21903
  }
21879
21904
  };
21880
- Canvas3DPickItemInterceptor = __decorate$1d([injectable()], Canvas3DPickItemInterceptor);
21905
+ Canvas3DPickItemInterceptor = __decorate$1c([injectable()], Canvas3DPickItemInterceptor);
21881
21906
 
21882
21907
  var pickModule = new ContainerModule(bind => {
21883
21908
  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);
@@ -21890,7 +21915,7 @@
21890
21915
  const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
21891
21916
  const PluginService = Symbol.for("PluginService");
21892
21917
 
21893
- var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21918
+ var __decorate$1b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21894
21919
  var d,
21895
21920
  c = arguments.length,
21896
21921
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21929,6 +21954,9 @@
21929
21954
  register(plugin) {
21930
21955
  "onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.push(plugin) : "onRegister" === plugin.activeEvent && (this.onRegisterPlugin.push(plugin), plugin.activate(this));
21931
21956
  }
21957
+ unRegister(plugin) {
21958
+ "onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
21959
+ }
21932
21960
  release() {
21933
21961
  this.onStartupFinishedPlugin.forEach(plugin => {
21934
21962
  plugin.deactivate(this);
@@ -21937,7 +21965,7 @@
21937
21965
  }), this.onRegisterPlugin = [];
21938
21966
  }
21939
21967
  };
21940
- DefaultPluginService = __decorate$1c([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(AutoEnablePlugins)), __metadata$U("design:paramtypes", [Object])], DefaultPluginService);
21968
+ DefaultPluginService = __decorate$1b([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(AutoEnablePlugins)), __metadata$U("design:paramtypes", [Object])], DefaultPluginService);
21941
21969
 
21942
21970
  var pluginModule = new ContainerModule(bind => {
21943
21971
  bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
@@ -21951,7 +21979,7 @@
21951
21979
  bind(TextMeasureContribution).to(DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
21952
21980
  });
21953
21981
 
21954
- var __decorate$1b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21982
+ var __decorate$1a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21955
21983
  var d,
21956
21984
  c = arguments.length,
21957
21985
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22028,9 +22056,9 @@
22028
22056
  this.canvas.release();
22029
22057
  }
22030
22058
  };
22031
- CanvasLayerHandlerContribution = __decorate$1b([injectable(), __metadata$T("design:paramtypes", [])], CanvasLayerHandlerContribution);
22059
+ CanvasLayerHandlerContribution = __decorate$1a([injectable(), __metadata$T("design:paramtypes", [])], CanvasLayerHandlerContribution);
22032
22060
 
22033
- var __decorate$1a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22061
+ var __decorate$19 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22034
22062
  var d,
22035
22063
  c = arguments.length,
22036
22064
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22072,9 +22100,9 @@
22072
22100
  }
22073
22101
  release() {}
22074
22102
  };
22075
- EmptyLayerHandlerContribution = __decorate$1a([injectable(), __metadata$S("design:paramtypes", [])], EmptyLayerHandlerContribution);
22103
+ EmptyLayerHandlerContribution = __decorate$19([injectable(), __metadata$S("design:paramtypes", [])], EmptyLayerHandlerContribution);
22076
22104
 
22077
- var __decorate$19 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22105
+ var __decorate$18 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22078
22106
  var d,
22079
22107
  c = arguments.length,
22080
22108
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22143,7 +22171,7 @@
22143
22171
  }
22144
22172
  merge(layerHandlers) {}
22145
22173
  };
22146
- OffscreenLayerHandlerContribution = __decorate$19([injectable(), __metadata$R("design:paramtypes", [])], OffscreenLayerHandlerContribution);
22174
+ OffscreenLayerHandlerContribution = __decorate$18([injectable(), __metadata$R("design:paramtypes", [])], OffscreenLayerHandlerContribution);
22147
22175
 
22148
22176
  var layerHandlerModules = new ContainerModule(bind => {
22149
22177
  bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
@@ -22259,7 +22287,7 @@
22259
22287
  return result;
22260
22288
  }
22261
22289
 
22262
- var __decorate$18 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22290
+ var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22263
22291
  var d,
22264
22292
  c = arguments.length,
22265
22293
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22325,7 +22353,7 @@
22325
22353
  return !1;
22326
22354
  }
22327
22355
  };
22328
- CommonDrawItemInterceptorContribution = __decorate$18([injectable(), __metadata$Q("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
22356
+ CommonDrawItemInterceptorContribution = __decorate$17([injectable(), __metadata$Q("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
22329
22357
  class InteractiveDrawItemInterceptorContribution {
22330
22358
  constructor() {
22331
22359
  this.order = 1;
@@ -22477,7 +22505,7 @@
22477
22505
  }
22478
22506
  const boundsAllocate = new DefaultBoundsAllocate();
22479
22507
 
22480
- var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22508
+ var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22481
22509
  var d,
22482
22510
  c = arguments.length,
22483
22511
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22677,9 +22705,9 @@
22677
22705
  }
22678
22706
  afterDraw(renderService, drawParams) {}
22679
22707
  };
22680
- DefaultDrawContribution = __decorate$17([injectable(), __param$x(0, multiInject(GraphicRender)), __param$x(1, inject(ContributionProvider)), __param$x(1, named(DrawItemInterceptor)), __metadata$P("design:paramtypes", [Array, Object])], DefaultDrawContribution);
22708
+ DefaultDrawContribution = __decorate$16([injectable(), __param$x(0, multiInject(GraphicRender)), __param$x(1, inject(ContributionProvider)), __param$x(1, named(DrawItemInterceptor)), __metadata$P("design:paramtypes", [Array, Object])], DefaultDrawContribution);
22681
22709
 
22682
- var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22710
+ var __decorate$15 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22683
22711
  var d,
22684
22712
  c = arguments.length,
22685
22713
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22770,9 +22798,9 @@
22770
22798
  }) : clip ? context.restore() : context.highPerformanceRestore();
22771
22799
  }
22772
22800
  };
22773
- DefaultCanvasGroupRender = __decorate$16([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(GroupRenderContribution)), __metadata$O("design:paramtypes", [Object])], DefaultCanvasGroupRender);
22801
+ DefaultCanvasGroupRender = __decorate$15([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(GroupRenderContribution)), __metadata$O("design:paramtypes", [Object])], DefaultCanvasGroupRender);
22774
22802
 
22775
- var __decorate$15 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22803
+ var __decorate$14 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22776
22804
  var d,
22777
22805
  c = arguments.length,
22778
22806
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22823,9 +22851,9 @@
22823
22851
  }), context.setShadowBlendStyle && context.setShadowBlendStyle(line, attribute, defaultAttribute), context.setStrokeStyle(line, attribute, offsetX, offsetY, defaultAttribute), context.stroke());
22824
22852
  }
22825
22853
  };
22826
- DefaultIncrementalCanvasLineRender = __decorate$15([injectable()], DefaultIncrementalCanvasLineRender);
22854
+ DefaultIncrementalCanvasLineRender = __decorate$14([injectable()], DefaultIncrementalCanvasLineRender);
22827
22855
 
22828
- var __decorate$14 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22856
+ var __decorate$13 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22829
22857
  var d,
22830
22858
  c = arguments.length,
22831
22859
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22868,10 +22896,10 @@
22868
22896
  }), context.setShadowBlendStyle && context.setShadowBlendStyle(area, attribute, defaultAttribute), context.setCommonStyle(area, attribute, offsetX, offsetY, defaultAttribute), context.fill());
22869
22897
  }
22870
22898
  };
22871
- DefaultIncrementalCanvasAreaRender = __decorate$14([injectable()], DefaultIncrementalCanvasAreaRender);
22899
+ DefaultIncrementalCanvasAreaRender = __decorate$13([injectable()], DefaultIncrementalCanvasAreaRender);
22872
22900
 
22873
22901
  var STATUS,
22874
- __decorate$13 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22902
+ __decorate$12 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22875
22903
  var d,
22876
22904
  c = arguments.length,
22877
22905
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -23015,7 +23043,7 @@
23015
23043
  });
23016
23044
  }
23017
23045
  };
23018
- DefaultIncrementalDrawContribution = __decorate$13([injectable(), __param$v(0, multiInject(GraphicRender)), __param$v(1, inject(DefaultIncrementalCanvasLineRender)), __param$v(2, inject(DefaultIncrementalCanvasAreaRender)), __param$v(3, inject(ContributionProvider)), __param$v(3, named(DrawItemInterceptor)), __metadata$N("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
23046
+ DefaultIncrementalDrawContribution = __decorate$12([injectable(), __param$v(0, multiInject(GraphicRender)), __param$v(1, inject(DefaultIncrementalCanvasLineRender)), __param$v(2, inject(DefaultIncrementalCanvasAreaRender)), __param$v(3, inject(ContributionProvider)), __param$v(3, named(DrawItemInterceptor)), __metadata$N("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
23019
23047
 
23020
23048
  var renderModule = new ContainerModule(bind => {
23021
23049
  bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
@@ -23243,6 +23271,8 @@
23243
23271
  this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds();
23244
23272
  }
23245
23273
  tryLayout(graphic) {
23274
+ if (this.layouting) return;
23275
+ this.layouting = !0;
23246
23276
  const p = graphic.parent;
23247
23277
  if (!p || !graphic.needUpdateLayout()) return;
23248
23278
  const theme = getTheme$1(p).group,
@@ -23365,7 +23395,7 @@
23365
23395
  }
23366
23396
  children.forEach((child, idx) => {
23367
23397
  child.addUpdateBoundTag(), child.addUpdatePositionTag(), child.clearUpdateLayoutTag();
23368
- }), p.addUpdateLayoutTag(), clip || this.tempBounds.equals(p.AABBBounds) || this.tryLayout(p);
23398
+ }), p.addUpdateLayoutTag(), clip || this.tempBounds.equals(p.AABBBounds) || (this.tryLayout(p), this.layouting = !1);
23369
23399
  }
23370
23400
  layoutMain(p, children, justifyContent, main, mianLenArray, lastIdx, currSeg) {
23371
23401
  if ("flex-start" === justifyContent) {
@@ -23384,14 +23414,19 @@
23384
23414
  let pos = padding;
23385
23415
  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;
23386
23416
  }
23387
- } else if ("space-between" === justifyContent) if (currSeg.mainLen >= main.len) {
23388
- let pos = 0;
23417
+ } else if ("space-between" === justifyContent) {
23418
+ if (currSeg.mainLen >= main.len) {
23419
+ let pos = 0;
23420
+ for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen;
23421
+ } else {
23422
+ const size = currSeg.idx - lastIdx + 1,
23423
+ padding = (main.len - currSeg.mainLen) / (2 * size - 2);
23424
+ let pos = 0;
23425
+ 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;
23426
+ }
23427
+ } else if ("center" === justifyContent) {
23428
+ let pos = (main.len - currSeg.mainLen) / 2;
23389
23429
  for (let i = lastIdx; i <= currSeg.idx; i++) children[i].attribute[main.field] = pos + getPadding(children[i], main.field), pos += mianLenArray[i].mainLen;
23390
- } else {
23391
- const size = currSeg.idx - lastIdx + 1,
23392
- padding = (main.len - currSeg.mainLen) / (2 * size - 2);
23393
- let pos = 0;
23394
- 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;
23395
23430
  }
23396
23431
  }
23397
23432
  layoutCross(children, alignItem, cross, anchorPos, lenArray, currSeg, lastIdx) {
@@ -23399,13 +23434,13 @@
23399
23434
  }
23400
23435
  activate(context) {
23401
23436
  this.pluginService = context, application.graphicService.hooks.onAttributeUpdate.tap(this.key, graphic => {
23402
- graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic);
23437
+ graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic), this.layouting = !1;
23403
23438
  }), application.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
23404
- graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && _tempBounds.copy(bounds);
23439
+ graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && _tempBounds.copy(bounds);
23405
23440
  }), application.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
23406
- stage && stage === this.pluginService.stage && stage.renderCount && (_tempBounds.equals(bounds) || this.tryLayout(graphic));
23441
+ stage && stage === this.pluginService.stage && graphic.isContainer && (_tempBounds.equals(bounds) || (this.tryLayout(graphic), this.layouting = !1));
23407
23442
  }), application.graphicService.hooks.onSetStage.tap(this.key, graphic => {
23408
- graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic);
23443
+ graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic), this.layouting = !1;
23409
23444
  });
23410
23445
  }
23411
23446
  deactivate(context) {
@@ -23773,7 +23808,7 @@
23773
23808
  }
23774
23809
  disableView3dTranform() {
23775
23810
  this.view3dTranform && (this.view3dTranform = !1, this.pluginService.findPluginsByName("ViewTransform3dPlugin").forEach(plugin => {
23776
- plugin.deactivate(this.pluginService);
23811
+ this.pluginService.unRegister(plugin);
23777
23812
  }));
23778
23813
  }
23779
23814
  enableAutoRender() {
@@ -23781,7 +23816,7 @@
23781
23816
  }
23782
23817
  disableAutoRender() {
23783
23818
  this.autoRender && (this.autoRender = !1, this.pluginService.findPluginsByName("AutoRenderPlugin").forEach(plugin => {
23784
- plugin.deactivate(this.pluginService);
23819
+ this.pluginService.unRegister(plugin);
23785
23820
  }));
23786
23821
  }
23787
23822
  enableIncrementalAutoRender() {
@@ -23789,7 +23824,7 @@
23789
23824
  }
23790
23825
  disableIncrementalAutoRender() {
23791
23826
  this.increaseAutoRender && (this.increaseAutoRender = !1, this.pluginService.findPluginsByName("IncrementalAutoRenderPlugin").forEach(plugin => {
23792
- plugin.deactivate(this.pluginService);
23827
+ this.pluginService.unRegister(plugin);
23793
23828
  }));
23794
23829
  }
23795
23830
  enableDirtyBounds() {
@@ -23800,7 +23835,7 @@
23800
23835
  }
23801
23836
  disableDirtyBounds() {
23802
23837
  this.dirtyBounds && (this.dirtyBounds = null, this.pluginService.findPluginsByName("DirtyBoundsPlugin").forEach(plugin => {
23803
- plugin.deactivate(this.pluginService);
23838
+ this.pluginService.unRegister(plugin);
23804
23839
  }));
23805
23840
  }
23806
23841
  enableLayout() {
@@ -23808,7 +23843,7 @@
23808
23843
  }
23809
23844
  disableLayout() {
23810
23845
  this._enableLayout && (this._enableLayout = !1, this.pluginService.findPluginsByName("FlexLayoutPlugin").forEach(plugin => {
23811
- plugin.deactivate(this.pluginService);
23846
+ this.pluginService.unRegister(plugin);
23812
23847
  }));
23813
23848
  }
23814
23849
  enableHtmlAttribute(container) {
@@ -23816,7 +23851,7 @@
23816
23851
  }
23817
23852
  disableHtmlAttribute() {
23818
23853
  this.htmlAttribute && (this.htmlAttribute = !1, this.pluginService.findPluginsByName("HtmlAttributePlugin").forEach(plugin => {
23819
- plugin.deactivate(this.pluginService);
23854
+ this.pluginService.unRegister(plugin);
23820
23855
  }));
23821
23856
  }
23822
23857
  tryUpdateAABBBounds() {
@@ -23999,7 +24034,7 @@
23999
24034
  return c.nativeCanvas ? c.nativeCanvas : null;
24000
24035
  }
24001
24036
  setCursor(mode) {
24002
- this._cursor = mode, this.eventSystem.setCursor(mode);
24037
+ this._cursor = mode, this.eventSystem.setCursor(mode, "ignore");
24003
24038
  }
24004
24039
  getCursor() {
24005
24040
  return this._cursor;
@@ -24010,7 +24045,7 @@
24010
24045
  return new Stage(params);
24011
24046
  }
24012
24047
 
24013
- var __decorate$12 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24048
+ var __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24014
24049
  var d,
24015
24050
  c = arguments.length,
24016
24051
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24224,9 +24259,9 @@
24224
24259
  this.stack.forEach(m => matrixAllocate.free(m)), this.stack.length = 0;
24225
24260
  }
24226
24261
  };
24227
- EmptyContext2d = __decorate$12([injectable(), __metadata$M("design:paramtypes", [Object, Number])], EmptyContext2d);
24262
+ EmptyContext2d = __decorate$11([injectable(), __metadata$M("design:paramtypes", [Object, Number])], EmptyContext2d);
24228
24263
 
24229
- var __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24264
+ var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24230
24265
  var d,
24231
24266
  c = arguments.length,
24232
24267
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24331,9 +24366,9 @@
24331
24366
  this.controled && this._nativeCanvas.parentElement && this._nativeCanvas.parentElement.removeChild(this._nativeCanvas);
24332
24367
  }
24333
24368
  };
24334
- BaseCanvas.env = "browser", BaseCanvas = __decorate$11([injectable(), __metadata$L("design:paramtypes", [Object])], BaseCanvas);
24369
+ BaseCanvas.env = "browser", BaseCanvas = __decorate$10([injectable(), __metadata$L("design:paramtypes", [Object])], BaseCanvas);
24335
24370
 
24336
- var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24371
+ var __decorate$$ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24337
24372
  var d,
24338
24373
  c = arguments.length,
24339
24374
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24406,9 +24441,9 @@
24406
24441
  };
24407
24442
  }
24408
24443
  };
24409
- BaseEnvContribution = __decorate$10([injectable()], BaseEnvContribution);
24444
+ BaseEnvContribution = __decorate$$([injectable()], BaseEnvContribution);
24410
24445
 
24411
- var __decorate$$ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24446
+ var __decorate$_ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24412
24447
  var d,
24413
24448
  c = arguments.length,
24414
24449
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24442,9 +24477,9 @@
24442
24477
  };
24443
24478
  }
24444
24479
  };
24445
- BaseWindowHandlerContribution = __decorate$$([injectable(), __metadata$K("design:paramtypes", [])], BaseWindowHandlerContribution);
24480
+ BaseWindowHandlerContribution = __decorate$_([injectable(), __metadata$K("design:paramtypes", [])], BaseWindowHandlerContribution);
24446
24481
 
24447
- var __decorate$_ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24482
+ var __decorate$Z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24448
24483
  var d,
24449
24484
  c = arguments.length,
24450
24485
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24563,7 +24598,7 @@
24563
24598
  return picker || null;
24564
24599
  }
24565
24600
  };
24566
- DefaultPickService = __decorate$_([injectable(), __param$u(0, inject(ContributionProvider)), __param$u(0, named(PickItemInterceptor)), __metadata$J("design:paramtypes", [Object])], DefaultPickService);
24601
+ DefaultPickService = __decorate$Z([injectable(), __param$u(0, inject(ContributionProvider)), __param$u(0, named(PickItemInterceptor)), __metadata$J("design:paramtypes", [Object])], DefaultPickService);
24567
24602
 
24568
24603
  let loadArcModule = !1;
24569
24604
  const arcModule = new ContainerModule(bind => {
@@ -24610,7 +24645,7 @@
24610
24645
  loadPolygonModule || (loadPolygonModule = !0, bind(PolygonRender).to(DefaultCanvasPolygonRender).inSingletonScope(), bind(GraphicRender).toService(PolygonRender), bind(PolygonRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, PolygonRenderContribution));
24611
24646
  });
24612
24647
 
24613
- var __decorate$Z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24648
+ var __decorate$Y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24614
24649
  var d,
24615
24650
  c = arguments.length,
24616
24651
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24642,14 +24677,14 @@
24642
24677
  }), context.highPerformanceRestore();
24643
24678
  }
24644
24679
  };
24645
- DefaultCanvasGlyphRender = __decorate$Z([injectable()], DefaultCanvasGlyphRender);
24680
+ DefaultCanvasGlyphRender = __decorate$Y([injectable()], DefaultCanvasGlyphRender);
24646
24681
 
24647
24682
  let loadGlyphModule = !1;
24648
24683
  const glyphModule = new ContainerModule(bind => {
24649
24684
  loadGlyphModule || (loadGlyphModule = !0, bind(GlyphRender).to(DefaultCanvasGlyphRender).inSingletonScope(), bind(GraphicRender).toService(GlyphRender));
24650
24685
  });
24651
24686
 
24652
- var __decorate$Y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24687
+ var __decorate$X = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24653
24688
  var d,
24654
24689
  c = arguments.length,
24655
24690
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24710,7 +24745,7 @@
24710
24745
  this._draw(richtext, richtextAttribute, !1, drawContext);
24711
24746
  }
24712
24747
  };
24713
- DefaultCanvasRichTextRender = __decorate$Y([injectable(), __metadata$I("design:paramtypes", [])], DefaultCanvasRichTextRender);
24748
+ DefaultCanvasRichTextRender = __decorate$X([injectable(), __metadata$I("design:paramtypes", [])], DefaultCanvasRichTextRender);
24714
24749
 
24715
24750
  let loadRichtextModule = !1;
24716
24751
  const richtextModule = new ContainerModule(bind => {
@@ -24722,7 +24757,7 @@
24722
24757
  loadImageModule || (loadImageModule = !0, bind(ImageRender).to(DefaultCanvasImageRender).inSingletonScope(), bind(GraphicRender).toService(ImageRender), bind(ImageRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, ImageRenderContribution));
24723
24758
  });
24724
24759
 
24725
- var __decorate$X = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24760
+ var __decorate$W = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24726
24761
  var d,
24727
24762
  c = arguments.length,
24728
24763
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24848,14 +24883,14 @@
24848
24883
  this._draw(rect, rectAttribute, !1, drawContext);
24849
24884
  }
24850
24885
  };
24851
- DefaultCanvasRect3dRender = __decorate$X([injectable()], DefaultCanvasRect3dRender);
24886
+ DefaultCanvasRect3dRender = __decorate$W([injectable()], DefaultCanvasRect3dRender);
24852
24887
 
24853
24888
  let loadRect3dModule = !1;
24854
24889
  const rect3dModule = new ContainerModule(bind => {
24855
24890
  loadRect3dModule || (loadRect3dModule = !0, bind(Rect3DRender).to(DefaultCanvasRect3dRender).inSingletonScope(), bind(GraphicRender).toService(Rect3DRender));
24856
24891
  });
24857
24892
 
24858
- var __decorate$W = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24893
+ var __decorate$V = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24859
24894
  var d,
24860
24895
  c = arguments.length,
24861
24896
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24977,14 +25012,14 @@
24977
25012
  this._draw(arc, arcAttribute, !1, drawContext, params);
24978
25013
  }
24979
25014
  };
24980
- DefaultCanvasArc3DRender = __decorate$W([injectable()], DefaultCanvasArc3DRender);
25015
+ DefaultCanvasArc3DRender = __decorate$V([injectable()], DefaultCanvasArc3DRender);
24981
25016
 
24982
25017
  let loadArc3dModule = !1;
24983
25018
  const arc3dModule = new ContainerModule(bind => {
24984
25019
  loadArc3dModule || (loadArc3dModule = !0, bind(Arc3dRender).to(DefaultCanvasArc3DRender).inSingletonScope(), bind(GraphicRender).toService(Arc3dRender));
24985
25020
  });
24986
25021
 
24987
- var __decorate$V = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25022
+ var __decorate$U = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24988
25023
  var d,
24989
25024
  c = arguments.length,
24990
25025
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -25092,7 +25127,7 @@
25092
25127
  this._draw(pyramid3d, pyramid3dAttribute, !1, drawContext);
25093
25128
  }
25094
25129
  };
25095
- DefaultCanvasPyramid3dRender = __decorate$V([injectable()], DefaultCanvasPyramid3dRender);
25130
+ DefaultCanvasPyramid3dRender = __decorate$U([injectable()], DefaultCanvasPyramid3dRender);
25096
25131
 
25097
25132
  let loadPyramid3dModule = !1;
25098
25133
  const pyramid3dModule = new ContainerModule(bind => {
@@ -26128,12 +26163,12 @@
26128
26163
  if ((isNil$1(colorKey.a) && isNil$1(colorKey.l)) || !isString$1(color)) {
26129
26164
  return color;
26130
26165
  }
26131
- let c = new Color$2(color);
26166
+ let c = new Color(color);
26132
26167
  if (isValid$1(colorKey.l)) {
26133
26168
  const { r, g, b } = c.color;
26134
26169
  const { h, s } = rgbToHsl(r, g, b);
26135
26170
  const rgb = hslToRgb(h, s, colorKey.l);
26136
- const newColor = new Color$2(`rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`);
26171
+ const newColor = new Color(`rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`);
26137
26172
  newColor.setOpacity(c.color.opacity);
26138
26173
  c = newColor;
26139
26174
  }
@@ -27148,32 +27183,41 @@
27148
27183
  function getLinePoints(items, includeOnePoint, lastPoints, isArea) {
27149
27184
  if (!items || !items.length || 1 === items.length && includeOnePoint) return [];
27150
27185
  return items.some(item => isValidPointsChannel(Object.keys(item.nextAttrs), "line")) ? items.map((item, index) => {
27151
- var _a, _b, _c, _d, _e;
27152
- const attrs = item.nextAttrs;
27153
- return isNil$1(attrs.x) && (attrs.x = null === (_a = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _a ? void 0 : _a.x), isNil$1(attrs.y) && (attrs.y = null === (_b = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _b ? void 0 : _b.y), isNil$1(attrs.defined) && !1 === (null === (_c = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _c ? void 0 : _c.defined) && (attrs.defined = !1), attrs.context = item.key, isArea && (isNil$1(attrs.x1) && (attrs.x1 = null === (_d = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _d ? void 0 : _d.x1), isNil$1(attrs.y1) && (attrs.y1 = null === (_e = null == lastPoints ? void 0 : lastPoints[index]) || void 0 === _e ? void 0 : _e.y1)), attrs;
27186
+ var _a;
27187
+ const attrs = item.nextAttrs,
27188
+ {
27189
+ x: x,
27190
+ y: y,
27191
+ x1: x1,
27192
+ y1: y1,
27193
+ defined: defined
27194
+ } = null !== (_a = null == lastPoints ? void 0 : lastPoints[index]) && void 0 !== _a ? _a : {};
27195
+ return isNil$1(attrs.x) && (attrs.x = x), isNil$1(attrs.y) && (attrs.y = y), isNil$1(attrs.defined) && !1 === defined && (attrs.defined = !1), attrs.context = item.key, isArea && (isNil$1(attrs.x1) && (attrs.x1 = x1), isNil$1(attrs.y1) && (attrs.y1 = y1)), attrs;
27154
27196
  }) : null != lastPoints ? lastPoints : [];
27155
27197
  }
27156
- function getLargeRectsPoints(items, includeOnePoint, lastPoints) {
27198
+ function getLargeRectsPoints(items, includeOnePoint) {
27199
+ let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
27157
27200
  if (!items || !items.length || 1 === items.length && includeOnePoint) return [];
27158
27201
  const arr = new Float32Array(4 * items.length);
27159
27202
  return items.forEach((item, index) => {
27160
27203
  var _a, _b, _c, _d;
27161
27204
  const attrs = item.nextAttrs,
27162
- x = null !== (_a = attrs.x) && void 0 !== _a ? _a : null == lastPoints ? void 0 : lastPoints[4 * index],
27163
- y = null !== (_b = attrs.y) && void 0 !== _b ? _b : null == lastPoints ? void 0 : lastPoints[4 * index + 1],
27164
- width = null !== (_c = attrs.width) && void 0 !== _c ? _c : null == lastPoints ? void 0 : lastPoints[4 * index + 2],
27165
- y1 = null !== (_d = attrs.y1) && void 0 !== _d ? _d : null == lastPoints ? void 0 : lastPoints[4 * index + 3];
27205
+ x = null !== (_a = attrs.x) && void 0 !== _a ? _a : lastPoints[4 * index],
27206
+ y = null !== (_b = attrs.y) && void 0 !== _b ? _b : lastPoints[4 * index + 1],
27207
+ width = null !== (_c = attrs.width) && void 0 !== _c ? _c : lastPoints[4 * index + 2],
27208
+ y1 = null !== (_d = attrs.y1) && void 0 !== _d ? _d : lastPoints[4 * index + 3];
27166
27209
  arr[4 * index] = x, arr[4 * index + 1] = y, arr[4 * index + 2] = width, arr[4 * index + 3] = y1 - y;
27167
27210
  }), arr;
27168
27211
  }
27169
- function getLargeSymbolsPoints(items, includeOnePoint, lastPoints) {
27212
+ function getLargeSymbolsPoints(items, includeOnePoint) {
27213
+ let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
27170
27214
  if (!items || !items.length || 1 === items.length && includeOnePoint) return [];
27171
27215
  const arr = new Float32Array(2 * items.length);
27172
27216
  return items.forEach((item, index) => {
27173
27217
  var _a, _b;
27174
27218
  const attrs = item.nextAttrs,
27175
- x = null !== (_a = attrs.x) && void 0 !== _a ? _a : null == lastPoints ? void 0 : lastPoints[2 * index],
27176
- y = null !== (_b = attrs.y) && void 0 !== _b ? _b : null == lastPoints ? void 0 : lastPoints[2 * index + 1];
27219
+ x = null !== (_a = attrs.x) && void 0 !== _a ? _a : lastPoints[2 * index],
27220
+ y = null !== (_b = attrs.y) && void 0 !== _b ? _b : lastPoints[2 * index + 1];
27177
27221
  arr[2 * index] = x, arr[2 * index + 1] = y;
27178
27222
  }), arr;
27179
27223
  }
@@ -27516,7 +27560,7 @@
27516
27560
  const graphicAttributes = {},
27517
27561
  changedKeys = nextAttrs ? Object.keys(nextAttrs) : [],
27518
27562
  transforms = isString$1(markType) ? transformsByType[markType] : markType;
27519
- if (null == transforms ? void 0 : transforms.length) {
27563
+ if (transforms && transforms.length) {
27520
27564
  const tags = [];
27521
27565
  changedKeys.forEach(key => {
27522
27566
  let isTransformed = !1;
@@ -27747,7 +27791,7 @@
27747
27791
  var _a, _b, _c, _d;
27748
27792
  const item = items[0];
27749
27793
  if (!item.nextAttrs || 0 === Object.keys(item.nextAttrs).length) return {};
27750
- let nextAttrs = null == item ? void 0 : item.nextAttrs;
27794
+ let nextAttrs = item.nextAttrs;
27751
27795
  if (isPointsMarkType(markType) && items && items.length && isNil$1(null === (_a = item.nextAttrs) || void 0 === _a ? void 0 : _a.points) && (!0 === computePoints || isValidPointsChannel(Object.keys(item.nextAttrs), this.mark.markType))) {
27752
27796
  const lastPoints = this.getGraphicAttribute("points", !1),
27753
27797
  lastSegments = this.getGraphicAttribute("segments", !1),
@@ -27903,174 +27947,6 @@
27903
27947
  }
27904
27948
  }
27905
27949
 
27906
- var ScrollBarPlugin_1,
27907
- __decorate$U = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27908
- var d,
27909
- c = arguments.length,
27910
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
27911
- 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);
27912
- return c > 3 && r && Object.defineProperty(target, key, r), r;
27913
- };
27914
- let ScrollBarPlugin = ScrollBarPlugin_1 = class {
27915
- constructor() {
27916
- this.name = "scrollbar", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.scroll = e => {
27917
- var _a;
27918
- const graphic = e.target,
27919
- data = this.getScrollContainer(graphic),
27920
- {
27921
- g: scrollContainer
27922
- } = data;
27923
- let {
27924
- showH: showH,
27925
- showV: showV
27926
- } = data;
27927
- if (!scrollContainer || 1 === scrollContainer.count) return;
27928
- this.scrollContainerBounds = scrollContainer.AABBBounds.clone(), abs$1(e.deltaX) > abs$1(e.deltaY) ? (showH = showH && !0, showV = showV && !1) : (showH = showH && !1, showV = showV && !0), scrollContainer.setAttributes({
27929
- scrollX: showH ? (scrollContainer.attribute.scrollX || 0) + e.deltaX : scrollContainer.attribute.scrollX || 0,
27930
- scrollY: showV ? (scrollContainer.attribute.scrollY || 0) + e.deltaY : scrollContainer.attribute.scrollY || 0
27931
- });
27932
- const childrenBounds = this.childrenBounds,
27933
- scrollContainerBounds = this.scrollContainerBounds;
27934
- childrenBounds.clear(), scrollContainer.forEachChildren(c => {
27935
- childrenBounds.union(c.AABBBounds);
27936
- }), childrenBounds.transformWithMatrix(scrollContainer.transMatrix), showH && scrollContainerBounds.x1 <= childrenBounds.x1 && scrollContainerBounds.x2 >= childrenBounds.x2 && (showH = !1), showV && scrollContainerBounds.y1 <= childrenBounds.y1 && scrollContainerBounds.y2 >= childrenBounds.y2 && (showV = !1);
27937
- const m = scrollContainer.transMatrix;
27938
- scrollContainerBounds.translate(-m.e, -m.f), childrenBounds.translate(-m.e, -m.f), showH && (childrenBounds.x1 = min$1(childrenBounds.x1, scrollContainerBounds.x1), childrenBounds.x2 = max$1(childrenBounds.x2, scrollContainerBounds.x2)), showV && (childrenBounds.y1 = min$1(childrenBounds.y1, scrollContainerBounds.y1), childrenBounds.y2 = max$1(childrenBounds.y2, scrollContainerBounds.y2)), childrenBounds.translate(scrollContainer.attribute.scrollX, scrollContainer.attribute.scrollY);
27939
- const container = (null !== (_a = scrollContainer.shadowRoot) && void 0 !== _a ? _a : scrollContainer.attachShadow()).createOrUpdateChild("scroll-bar", {}, "group"),
27940
- {
27941
- h: h,
27942
- v: v,
27943
- deltaH: deltaH,
27944
- deltaV: deltaV
27945
- } = this.addOrUpdateScroll(showH, showV, container, scrollContainer);
27946
- scrollContainer.setAttributes({
27947
- scrollX: h ? scrollContainer.attribute.scrollX || 0 : (scrollContainer.attribute.scrollX || 0) + deltaH,
27948
- scrollY: v ? scrollContainer.attribute.scrollY || 0 : (scrollContainer.attribute.scrollY || 0) + deltaV
27949
- });
27950
- };
27951
- }
27952
- activate(context) {
27953
- this.pluginService = context;
27954
- const {
27955
- stage: stage
27956
- } = this.pluginService;
27957
- this.childrenBounds = new AABBBounds(), stage.addEventListener("wheel", this.scroll), this.params = ScrollBarPlugin_1.defaultParams;
27958
- }
27959
- addOrUpdateScroll(showH, showV, container, scrollContainer) {
27960
- const scrollbars = container.children;
27961
- let h = !1,
27962
- v = !1,
27963
- deltaH = 0,
27964
- deltaV = 0;
27965
- if (showH) {
27966
- const hScrollbar = scrollbars.filter(g => "vertical" !== g.attribute.direction)[0],
27967
- d = this.addOrUpdateHScroll(this.scrollContainerBounds, container, hScrollbar);
27968
- h = d.valid, deltaH = d.delta, this.disappearScrollBar(hScrollbar, v);
27969
- }
27970
- if (showV) {
27971
- const vScrollbar = scrollbars.filter(g => "vertical" === g.attribute.direction)[0],
27972
- d = this.addOrUpdateVScroll(this.scrollContainerBounds, container, vScrollbar);
27973
- v = d.valid, deltaV = d.delta, this.disappearScrollBar(vScrollbar, v);
27974
- }
27975
- return {
27976
- h: h,
27977
- deltaH: deltaH,
27978
- v: v,
27979
- deltaV: deltaV
27980
- };
27981
- }
27982
- addOrUpdateHScroll(scrollContainerB, container, scrollBar) {
27983
- scrollBar || (scrollBar = new ScrollBar$1({
27984
- direction: "horizontal",
27985
- x: 0,
27986
- y: 0,
27987
- width: scrollContainerB.width(),
27988
- height: 12,
27989
- padding: [2, 0],
27990
- railStyle: {
27991
- fill: "rgba(0, 0, 0, .1)"
27992
- },
27993
- range: [0, .05]
27994
- }), container.add(scrollBar));
27995
- const b = scrollBar.AABBBounds,
27996
- childrenBounds = this.childrenBounds,
27997
- y = scrollContainerB.y2 - b.height(),
27998
- ratio = Math.min(b.width() / this.childrenBounds.width(), 1);
27999
- let start = (scrollContainerB.x1 - childrenBounds.x1) / (childrenBounds.width() - scrollContainerB.width()) * (1 - ratio),
28000
- valid = !0,
28001
- delta = 0;
28002
- return start < 0 ? (start = 0, valid = !1, delta = scrollContainerB.x1 - childrenBounds.x1) : start + ratio > 1 && (start = 1 - ratio, valid = !1, delta = scrollContainerB.x1 - childrenBounds.x1 - (childrenBounds.width() - scrollContainerB.width())), scrollBar.setAttributes({
28003
- y: y,
28004
- visibleAll: !0,
28005
- range: [start, start + ratio]
28006
- }), {
28007
- valid: valid,
28008
- delta: delta
28009
- };
28010
- }
28011
- addOrUpdateVScroll(scrollContainerB, container, scrollBar) {
28012
- scrollBar || (scrollBar = new ScrollBar$1({
28013
- direction: "vertical",
28014
- x: 0,
28015
- y: 0,
28016
- width: 12,
28017
- height: scrollContainerB.height(),
28018
- padding: [2, 0],
28019
- railStyle: {
28020
- fill: "rgba(0, 0, 0, .1)"
28021
- },
28022
- range: [0, .05]
28023
- }), container.add(scrollBar));
28024
- const b = scrollBar.AABBBounds,
28025
- x = scrollContainerB.x2 - b.width(),
28026
- childrenBounds = this.childrenBounds,
28027
- ratio = Math.min(b.height() / childrenBounds.height(), 1);
28028
- let start = (scrollContainerB.y1 - childrenBounds.y1) / (childrenBounds.height() - scrollContainerB.height()) * (1 - ratio),
28029
- valid = !0,
28030
- delta = 0;
28031
- return start < 0 ? (start = 0, valid = !1, delta = scrollContainerB.y1 - childrenBounds.y1) : start + ratio > 1 && (start = 1 - ratio, valid = !1, delta = scrollContainerB.y1 - childrenBounds.y1 - (childrenBounds.height() - scrollContainerB.height())), scrollBar.setAttributes({
28032
- x: x,
28033
- visibleAll: !0,
28034
- range: [start, start + ratio]
28035
- }), {
28036
- valid: valid,
28037
- delta: delta
28038
- };
28039
- }
28040
- disappearScrollBar(scrollBar, valid) {
28041
- var _a;
28042
- scrollBar._plugin_timeout && clearTimeout(scrollBar._plugin_timeout), scrollBar._plugin_timeout = setTimeout(() => {
28043
- scrollBar.setAttribute("visibleAll", !1);
28044
- }, null !== (_a = this.params.timeout) && void 0 !== _a ? _a : 0);
28045
- }
28046
- getScrollContainer(graphic) {
28047
- let g = graphic;
28048
- for (; g;) {
28049
- if (g.attribute.overflow && "hidden" !== g.attribute.overflow) {
28050
- const overflow = g.attribute.overflow;
28051
- let showH = !1,
28052
- showV = !1;
28053
- return "scroll" === overflow ? (showH = !0, showV = !0) : (showH = "scroll-x" === overflow, showV = !showH), {
28054
- g: g,
28055
- showH: showH,
28056
- showV: showV
28057
- };
28058
- }
28059
- g = g.parent;
28060
- }
28061
- return null;
28062
- }
28063
- deactivate(context) {
28064
- const {
28065
- stage: stage
28066
- } = this.pluginService;
28067
- stage.removeEventListener("wheel", this.scroll);
28068
- }
28069
- };
28070
- ScrollBarPlugin.defaultParams = {
28071
- timeout: 500
28072
- }, ScrollBarPlugin = ScrollBarPlugin_1 = __decorate$U([injectable()], ScrollBarPlugin);
28073
-
28074
27950
  class DragNDrop {
28075
27951
  constructor(rootNode) {
28076
27952
  this.onPointerDown = event => {
@@ -32540,9 +32416,6 @@
32540
32416
  loaded || (loaded = !0, registerWrapTextGraphic());
32541
32417
  }
32542
32418
 
32543
- new ContainerModule((bind, unbind, isBound, rebind) => {
32544
- isBound(ScrollBarPlugin) || (bind(ScrollBarPlugin).toSelf(), bind(AutoEnablePlugins).toService(ScrollBarPlugin));
32545
- });
32546
32419
  function loadScrollbarComponent() {
32547
32420
  registerGroup(), registerRect();
32548
32421
  }
@@ -32584,7 +32457,10 @@
32584
32457
  const {
32585
32458
  direction: direction
32586
32459
  } = this.attribute;
32587
- this._prePos = "horizontal" === direction ? e.clientX : e.clientY, "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onSliderPointerMove, {
32460
+ this._prePos = "horizontal" === direction ? e.clientX : e.clientY, this._dispatchEvent("scrollDown", {
32461
+ pos: this._prePos,
32462
+ event: e
32463
+ }), "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onSliderPointerMove, {
32588
32464
  capture: !0
32589
32465
  }), vglobal.addEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.addEventListener("pointermove", this._onSliderPointerMove, {
32590
32466
  capture: !0
@@ -32803,10 +32679,7 @@
32803
32679
  return group ? group.findAll(node => "group" !== node.type, !0) : [];
32804
32680
  }
32805
32681
 
32806
- const defaultAlternativeColors = ["#ffffff", "#000000"],
32807
- {
32808
- Color: Color
32809
- } = ColorUtil;
32682
+ const defaultAlternativeColors = ["#ffffff", "#000000"];
32810
32683
  function labelSmartInvert(foregroundColorOrigin, backgroundColorOrogin, textType, contrastRatiosThreshold, alternativeColors, mode) {
32811
32684
  if ("string" != typeof foregroundColorOrigin || "string" != typeof backgroundColorOrogin) return foregroundColorOrigin;
32812
32685
  const foregroundColor = new Color(foregroundColorOrigin).toHex(),
@@ -33129,133 +33002,6 @@
33129
33002
  poptip: merge$1({}, DEFAULT_THEME)
33130
33003
  };
33131
33004
 
33132
- var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
33133
- var d,
33134
- c = arguments.length,
33135
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
33136
- 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);
33137
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33138
- };
33139
- function wrapPoptip(target, source) {
33140
- return merge$1(target, theme.poptip, source), target;
33141
- }
33142
- let PopTipRenderContribution = class {
33143
- render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
33144
- var _a;
33145
- if (1 === graphic._showPoptip) {
33146
- const {
33147
- visible: visible,
33148
- visibleCb: visibleCb
33149
- } = graphic.attribute.poptip || {};
33150
- if (!1 === visible || visibleCb && !1 === visibleCb(graphic)) return;
33151
- const attribute = {};
33152
- merge$1(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {}), this.poptipComponent ? this.poptipComponent.initAttributes(attribute) : this.poptipComponent = new PopTip(attribute);
33153
- let poptip = graphic.attribute.poptip || {};
33154
- if ("text" === graphic.type && null == poptip.title && null == poptip.content) {
33155
- const out = {};
33156
- wrapPoptip(out, poptip), poptip = out, poptip.content = null !== (_a = poptip.content) && void 0 !== _a ? _a : graphic.attribute.text;
33157
- }
33158
- const matrix = graphic.globalTransMatrix;
33159
- this.poptipComponent.setAttributes(Object.assign(Object.assign({
33160
- visibleAll: !0,
33161
- pickable: !1,
33162
- childrenPickable: !1
33163
- }, poptip), {
33164
- x: matrix.e,
33165
- y: matrix.f
33166
- })), drawContext.stage.tryInitInteractiveLayer();
33167
- const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
33168
- interactiveLayer && interactiveLayer.add(this.poptipComponent);
33169
- } else 2 === graphic._showPoptip && (graphic._showPoptip = 0, this.poptipComponent && this.poptipComponent.setAttributes({
33170
- visibleAll: !1
33171
- }));
33172
- }
33173
- };
33174
- PopTipRenderContribution = __decorate$1([injectable()], PopTipRenderContribution);
33175
-
33176
- var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
33177
- var d,
33178
- c = arguments.length,
33179
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
33180
- 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);
33181
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33182
- };
33183
- let PopTipPlugin = class {
33184
- constructor() {
33185
- this.name = "poptip", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.poptip = e => {
33186
- const graphic = e.target;
33187
- if (graphic.isContainer || !graphic.attribute) return void this.unpoptip(e);
33188
- if (graphic === this.activeGraphic) return;
33189
- const {
33190
- poptip: poptip
33191
- } = graphic.attribute;
33192
- poptip && (graphic.setAttributes({}), graphic._showPoptip = 1), this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2), this.setActiveGraphic(graphic, !0);
33193
- }, this.unpoptip = e => {
33194
- this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2, this.setActiveGraphic(null, !0));
33195
- };
33196
- }
33197
- activate(context) {
33198
- this.pluginService = context;
33199
- const {
33200
- stage: stage
33201
- } = this.pluginService;
33202
- stage.addEventListener("pointerover", this.poptip);
33203
- }
33204
- setActiveGraphic(graphic, rerender) {
33205
- this.activeGraphic = graphic, this.pluginService.stage.renderNextFrame();
33206
- }
33207
- deactivate(context) {
33208
- const {
33209
- stage: stage
33210
- } = this.pluginService;
33211
- stage.removeEventListener("pointerover", this.poptip);
33212
- }
33213
- };
33214
- PopTipPlugin = __decorate([injectable()], PopTipPlugin);
33215
- let PopTipForClipedTextPlugin = class {
33216
- constructor() {
33217
- this.name = "poptipForText", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.pointerlave = e => {
33218
- const {
33219
- stage: stage
33220
- } = this.pluginService;
33221
- e.target === stage && this.unpoptip(e);
33222
- }, this.poptip = e => {
33223
- const graphic = e.target;
33224
- if ("text" !== graphic.type || !graphic.cliped || graphic.isContainer || !graphic.attribute) return void this.unpoptip(e);
33225
- if (graphic === this.activeGraphic) return;
33226
- const {
33227
- poptip = {}
33228
- } = graphic.attribute;
33229
- poptip && (graphic.setAttributes({}), graphic._showPoptip = 1), this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2), this.setActiveGraphic(graphic, !0);
33230
- }, this.unpoptip = e => {
33231
- this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2, this.setActiveGraphic(null, !0));
33232
- };
33233
- }
33234
- activate(context) {
33235
- this.pluginService = context;
33236
- const {
33237
- stage: stage
33238
- } = this.pluginService;
33239
- stage.addEventListener("pointerover", this.poptip), stage.addEventListener("pointerleave", this.pointerlave);
33240
- }
33241
- setActiveGraphic(graphic, rerender) {
33242
- this.activeGraphic = graphic, this.pluginService.stage.renderNextFrame();
33243
- }
33244
- deactivate(context) {
33245
- const {
33246
- stage: stage
33247
- } = this.pluginService;
33248
- stage.removeEventListener("pointerover", this.poptip), stage.removeEventListener("pointerleave", this.pointerlave);
33249
- }
33250
- };
33251
- PopTipForClipedTextPlugin = __decorate([injectable()], PopTipForClipedTextPlugin);
33252
-
33253
- const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
33254
- isBound(PopTipRenderContribution) || (bind(PopTipRenderContribution).toSelf().inSingletonScope(), bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution)), isBound(PopTipPlugin) || (bind(PopTipPlugin).toSelf(), bind(AutoEnablePlugins).toService(PopTipPlugin)), isBound(PopTipForClipedTextPlugin) || (bind(PopTipForClipedTextPlugin).toSelf(), bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin));
33255
- });
33256
- function loadPoptip() {
33257
- container.load(popTipModule);
33258
- }
33259
33005
  function loadPoptipComponent() {
33260
33006
  registerGroup(), registerWrapText(), registerSymbol(), registerRect();
33261
33007
  }
@@ -33519,6 +33265,134 @@
33519
33265
  padding: 10
33520
33266
  };
33521
33267
 
33268
+ var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
33269
+ var d,
33270
+ c = arguments.length,
33271
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
33272
+ 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);
33273
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33274
+ };
33275
+ function wrapPoptip(target, source) {
33276
+ return merge$1(target, theme.poptip, source), target;
33277
+ }
33278
+ let PopTipRenderContribution = class {
33279
+ render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
33280
+ var _a;
33281
+ if (1 === graphic._showPoptip) {
33282
+ const {
33283
+ visible: visible,
33284
+ visibleCb: visibleCb
33285
+ } = graphic.attribute.poptip || {};
33286
+ if (!1 === visible || visibleCb && !1 === visibleCb(graphic)) return;
33287
+ const attribute = {};
33288
+ merge$1(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {}), this.poptipComponent ? this.poptipComponent.initAttributes(attribute) : this.poptipComponent = new PopTip(attribute);
33289
+ let poptip = graphic.attribute.poptip || {};
33290
+ if ("text" === graphic.type && null == poptip.title && null == poptip.content) {
33291
+ const out = {};
33292
+ wrapPoptip(out, poptip), poptip = out, poptip.content = null !== (_a = poptip.content) && void 0 !== _a ? _a : graphic.attribute.text;
33293
+ }
33294
+ const matrix = graphic.globalTransMatrix;
33295
+ this.poptipComponent.setAttributes(Object.assign(Object.assign({
33296
+ visibleAll: !0,
33297
+ pickable: !1,
33298
+ childrenPickable: !1
33299
+ }, poptip), {
33300
+ x: matrix.e,
33301
+ y: matrix.f
33302
+ })), drawContext.stage.tryInitInteractiveLayer();
33303
+ const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
33304
+ interactiveLayer && interactiveLayer.add(this.poptipComponent);
33305
+ } else 2 === graphic._showPoptip && (graphic._showPoptip = 0, this.poptipComponent && this.poptipComponent.setAttributes({
33306
+ visibleAll: !1
33307
+ }));
33308
+ }
33309
+ };
33310
+ PopTipRenderContribution = __decorate$1([injectable()], PopTipRenderContribution);
33311
+
33312
+ var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
33313
+ var d,
33314
+ c = arguments.length,
33315
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
33316
+ 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);
33317
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33318
+ };
33319
+ let PopTipPlugin = class {
33320
+ constructor() {
33321
+ this.name = "poptip", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.poptip = e => {
33322
+ const graphic = e.target;
33323
+ if (graphic.isContainer || !graphic.attribute) return void this.unpoptip(e);
33324
+ if (graphic === this.activeGraphic) return;
33325
+ const {
33326
+ poptip: poptip
33327
+ } = graphic.attribute;
33328
+ poptip && (graphic.setAttributes({}), graphic._showPoptip = 1), this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2), this.setActiveGraphic(graphic, !0);
33329
+ }, this.unpoptip = e => {
33330
+ this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2, this.setActiveGraphic(null, !0));
33331
+ };
33332
+ }
33333
+ activate(context) {
33334
+ this.pluginService = context;
33335
+ const {
33336
+ stage: stage
33337
+ } = this.pluginService;
33338
+ stage.addEventListener("pointerover", this.poptip);
33339
+ }
33340
+ setActiveGraphic(graphic, rerender) {
33341
+ this.activeGraphic = graphic, this.pluginService.stage.renderNextFrame();
33342
+ }
33343
+ deactivate(context) {
33344
+ const {
33345
+ stage: stage
33346
+ } = this.pluginService;
33347
+ stage.removeEventListener("pointerover", this.poptip);
33348
+ }
33349
+ };
33350
+ PopTipPlugin = __decorate([injectable()], PopTipPlugin);
33351
+ let PopTipForClipedTextPlugin = class {
33352
+ constructor() {
33353
+ this.name = "poptipForText", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.pointerlave = e => {
33354
+ const {
33355
+ stage: stage
33356
+ } = this.pluginService;
33357
+ e.target === stage && this.unpoptip(e);
33358
+ }, this.poptip = e => {
33359
+ const graphic = e.target;
33360
+ if ("text" !== graphic.type || !graphic.cliped || graphic.isContainer || !graphic.attribute || graphic.attribute.disableAutoClipedPoptip) return void this.unpoptip(e);
33361
+ if (graphic === this.activeGraphic) return;
33362
+ const {
33363
+ poptip = {}
33364
+ } = graphic.attribute;
33365
+ poptip && (graphic.setAttributes({}), graphic._showPoptip = 1), this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2), this.setActiveGraphic(graphic, !0);
33366
+ }, this.unpoptip = e => {
33367
+ this.activeGraphic && (this.activeGraphic.setAttributes({}), this.activeGraphic._showPoptip = 2, this.setActiveGraphic(null, !0));
33368
+ };
33369
+ }
33370
+ activate(context) {
33371
+ this.pluginService = context;
33372
+ const {
33373
+ stage: stage
33374
+ } = this.pluginService;
33375
+ stage.addEventListener("pointerover", this.poptip), stage.addEventListener("pointerleave", this.pointerlave);
33376
+ }
33377
+ setActiveGraphic(graphic, rerender) {
33378
+ this.activeGraphic = graphic, this.pluginService.stage.renderNextFrame();
33379
+ }
33380
+ deactivate(context) {
33381
+ const {
33382
+ stage: stage
33383
+ } = this.pluginService;
33384
+ stage.removeEventListener("pointerover", this.poptip), stage.removeEventListener("pointerleave", this.pointerlave);
33385
+ }
33386
+ };
33387
+ PopTipForClipedTextPlugin = __decorate([injectable()], PopTipForClipedTextPlugin);
33388
+
33389
+ const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
33390
+ isBound(PopTipRenderContribution) || (bind(PopTipRenderContribution).toSelf().inSingletonScope(), bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution)), isBound(PopTipPlugin) || (bind(PopTipPlugin).toSelf(), bind(AutoEnablePlugins).toService(PopTipPlugin)), isBound(PopTipForClipedTextPlugin) || (bind(PopTipForClipedTextPlugin).toSelf(), bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin));
33391
+ });
33392
+ function loadPoptip() {
33393
+ container.load(popTipModule);
33394
+ }
33395
+
33522
33396
  class CrosshairBase extends AbstractComponent {
33523
33397
  constructor() {
33524
33398
  super(...arguments), this.name = "crosshair";
@@ -34472,7 +34346,8 @@
34472
34346
  _renderWithAnimation(labels) {
34473
34347
  const currentTextMap = new Map(),
34474
34348
  prevTextMap = this._graphicToText || new Map(),
34475
- texts = [];
34349
+ texts = [],
34350
+ labelLines = [];
34476
34351
  labels.forEach((text, index) => {
34477
34352
  var _a, _b, _c, _d, _e, _f, _g;
34478
34353
  const labelLine = this._labelLine(text),
@@ -34491,9 +34366,9 @@
34491
34366
  from: from,
34492
34367
  to: to
34493
34368
  } = getAnimationAttributes(text.attribute, "fadeIn");
34494
- this.add(text), labelLine && (this._setStatesOfLabelLine(labelLine), this.add(labelLine)), this._syncStateWithRelatedGraphic(relatedGraphic), relatedGraphic.once("animate-bind", a => {
34495
- text.setAttributes(from);
34496
- const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, to, this._animationConfig.enter);
34369
+ this.add(text), labelLine && (this._setStatesOfLabelLine(labelLine), labelLines.push(labelLine), this.add(labelLine)), this._syncStateWithRelatedGraphic(relatedGraphic), this._animationConfig.enter.duration > 0 && relatedGraphic.once("animate-bind", a => {
34370
+ text.setAttributes(from), labelLine && labelLine.setAttributes(from);
34371
+ const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, this._animationConfig.enter);
34497
34372
  relatedGraphic.on("afterAttributeUpdate", listener);
34498
34373
  });
34499
34374
  }
@@ -34544,7 +34419,7 @@
34544
34419
  _syncStateWithRelatedGraphic(relatedGraphic) {
34545
34420
  this.attribute.syncState && relatedGraphic.on("afterAttributeUpdate", this._handleRelatedGraphicSetState);
34546
34421
  }
34547
- _afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, to, _ref) {
34422
+ _afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, _ref) {
34548
34423
  let {
34549
34424
  mode: mode,
34550
34425
  duration: duration,
@@ -34552,38 +34427,41 @@
34552
34427
  delay: delay
34553
34428
  } = _ref;
34554
34429
  const listener = event => {
34555
- var _a, _b;
34430
+ var _a, _b, _c;
34556
34431
  const {
34557
34432
  detail: detail
34558
34433
  } = event;
34559
34434
  if (!detail) return {};
34560
- if (!(detail && detail.type === AttributeUpdateType.ANIMATE_UPDATE && detail.animationState && "wait" !== (null === (_a = detail.animationState.step) || void 0 === _a ? void 0 : _a.type))) return {};
34561
- if (detail.type === AttributeUpdateType.ANIMATE_END) return void text.setAttributes(to);
34435
+ const step = null === (_a = detail.animationState) || void 0 === _a ? void 0 : _a.step;
34436
+ if (!(detail.type === AttributeUpdateType.ANIMATE_UPDATE && step && !("wait" === step.type && null == (null === (_b = step.prev) || void 0 === _b ? void 0 : _b.type)))) return {};
34437
+ if (detail.type === AttributeUpdateType.ANIMATE_END) return text.setAttributes(to), void (labelLine && labelLine.setAttributes(to));
34562
34438
  const onStart = () => {
34563
34439
  relatedGraphic && (relatedGraphic.onAnimateBind = void 0, relatedGraphic.removeEventListener("afterAttributeUpdate", listener));
34564
34440
  };
34565
34441
  switch (mode) {
34566
34442
  case "after":
34567
- detail.animationState.end && text.animate({
34443
+ detail.animationState.end && (text.animate({
34568
34444
  onStart: onStart
34569
- }).wait(delay).to(to, duration, easing);
34445
+ }).wait(delay).to(to, duration, easing), labelLine && labelLine.animate().wait(delay).to(to, duration, easing));
34570
34446
  break;
34571
34447
  case "after-all":
34572
- index === texts.length - 1 && detail.animationState.end && texts.forEach(t => {
34448
+ index === texts.length - 1 && detail.animationState.end && (texts.forEach(t => {
34573
34449
  t.animate({
34574
34450
  onStart: onStart
34575
34451
  }).wait(delay).to(to, duration, easing);
34576
- });
34452
+ }), labelLines.forEach(t => {
34453
+ t.animate().wait(delay).to(to, duration, easing);
34454
+ }));
34577
34455
  break;
34578
34456
  default:
34579
34457
  if (this._isCollectionBase) {
34580
34458
  const point = this._idToPoint.get(text.attribute.id);
34581
- !point || text.animates && text.animates.has("label-animate") || !relatedGraphic.containsPoint(point.x, point.y, IContainPointMode.LOCAL, null === (_b = this.stage) || void 0 === _b ? void 0 : _b.pickerService) || text.animate({
34459
+ !point || text.animates && text.animates.has("label-animate") || !relatedGraphic.containsPoint(point.x, point.y, IContainPointMode.LOCAL, null === (_c = this.stage) || void 0 === _c ? void 0 : _c.pickerService) || (text.animate({
34582
34460
  onStart: onStart
34583
- }).wait(delay).to(to, duration, easing);
34584
- } else detail.animationState.isFirstFrameOfStep && text.animate({
34461
+ }).wait(delay).to(to, duration, easing), labelLine && labelLine.animate().wait(delay).to(to, duration, easing));
34462
+ } else detail.animationState.isFirstFrameOfStep && (text.animate({
34585
34463
  onStart: onStart
34586
- }).wait(delay).to(to, duration, easing);
34464
+ }).wait(delay).to(to, duration, easing), labelLine && labelLine.animate().wait(delay).to(to, duration, easing));
34587
34465
  }
34588
34466
  };
34589
34467
  return listener;
@@ -42762,24 +42640,31 @@
42762
42640
  return (null !== (_a = spec.marks) && void 0 !== _a ? _a : []).forEach(mark => traverse(mark, "root")), spec;
42763
42641
  };
42764
42642
  const normalizeRunningConfig = runningConfig => {
42765
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
42643
+ var _a, _b, _c, _d, _e;
42644
+ const {
42645
+ reuse = DefaultReuse,
42646
+ morph = DefaultMorph,
42647
+ morphAll = DefaultMorphAll,
42648
+ animation = {},
42649
+ enableExitAnimation = DefaultEnableExitAnimation
42650
+ } = null != runningConfig ? runningConfig : {};
42766
42651
  return {
42767
- reuse: null !== (_a = null == runningConfig ? void 0 : runningConfig.reuse) && void 0 !== _a ? _a : DefaultReuse,
42768
- morph: null !== (_b = null == runningConfig ? void 0 : runningConfig.morph) && void 0 !== _b ? _b : DefaultMorph,
42769
- morphAll: null !== (_c = null == runningConfig ? void 0 : runningConfig.morphAll) && void 0 !== _c ? _c : DefaultMorphAll,
42652
+ reuse: reuse,
42653
+ morph: morph,
42654
+ morphAll: morphAll,
42770
42655
  animation: {
42771
- easing: null !== (_e = null === (_d = null == runningConfig ? void 0 : runningConfig.animation) || void 0 === _d ? void 0 : _d.easing) && void 0 !== _e ? _e : DefaultAnimationEasing,
42772
- delay: null !== (_g = null === (_f = null == runningConfig ? void 0 : runningConfig.animation) || void 0 === _f ? void 0 : _f.delay) && void 0 !== _g ? _g : DefaultAnimationDelay,
42773
- duration: null !== (_j = null === (_h = null == runningConfig ? void 0 : runningConfig.animation) || void 0 === _h ? void 0 : _h.duration) && void 0 !== _j ? _j : DefaultAnimationDuration,
42774
- oneByOne: null !== (_l = null === (_k = null == runningConfig ? void 0 : runningConfig.animation) || void 0 === _k ? void 0 : _k.oneByOne) && void 0 !== _l ? _l : DefaultAnimationOneByOne,
42775
- splitPath: null !== (_o = null === (_m = null == runningConfig ? void 0 : runningConfig.animation) || void 0 === _m ? void 0 : _m.splitPath) && void 0 !== _o ? _o : DefaultSplitPath
42656
+ easing: null !== (_a = animation.easing) && void 0 !== _a ? _a : DefaultAnimationEasing,
42657
+ delay: null !== (_b = animation.delay) && void 0 !== _b ? _b : DefaultAnimationDelay,
42658
+ duration: null !== (_c = animation.duration) && void 0 !== _c ? _c : DefaultAnimationDuration,
42659
+ oneByOne: null !== (_d = animation.oneByOne) && void 0 !== _d ? _d : DefaultAnimationOneByOne,
42660
+ splitPath: null !== (_e = animation.splitPath) && void 0 !== _e ? _e : DefaultSplitPath
42776
42661
  },
42777
- enableExitAnimation: null !== (_p = null == runningConfig ? void 0 : runningConfig.enableExitAnimation) && void 0 !== _p ? _p : DefaultEnableExitAnimation
42662
+ enableExitAnimation: enableExitAnimation
42778
42663
  };
42779
42664
  };
42780
42665
 
42781
42666
  const generateFilterByMark = evtSpec => isNil$1(evtSpec.markId) ? el => el && el.mark.id() === evtSpec.markId : isNil$1(evtSpec.markName) ? el => el && el.mark.name() === evtSpec.markName : isNil$1(evtSpec.type) ? el => el && el.mark.markType === evtSpec.type : () => !0;
42782
- const parseHandler = (callback, config) => (null == config ? void 0 : config.debounce) ? debounce(callback, config.debounce) : (null == config ? void 0 : config.throttle) ? throttle(callback, config.throttle) : callback;
42667
+ const parseHandler = (callback, config) => config && config.debounce ? debounce(callback, config.debounce) : config && config.throttle ? throttle(callback, config.throttle) : callback;
42783
42668
  const NAME_PREFIX = "@";
42784
42669
  const ID_PREFIX = "#";
42785
42670
  const parseEventSelector = function (selector) {
@@ -43109,7 +42994,7 @@
43109
42994
 
43110
42995
  const transformAnimationAttributes = (attributes, element) => {
43111
42996
  if (!attributes) return null;
43112
- if (null == attributes ? void 0 : attributes.from) {
42997
+ if (attributes.from) {
43113
42998
  const from = attributes.from,
43114
42999
  fromKeys = Object.keys(from);
43115
43000
  fromKeys.forEach(channel => {
@@ -43123,7 +43008,7 @@
43123
43008
  attributes.from = element.transformElementItems(items, element.mark.markType, computePoints);
43124
43009
  }
43125
43010
  }
43126
- if (null == attributes ? void 0 : attributes.to) {
43011
+ if (attributes.to) {
43127
43012
  const to = attributes.to,
43128
43013
  toKeys = Object.keys(to);
43129
43014
  toKeys.forEach(channel => {
@@ -44038,14 +43923,12 @@
44038
43923
  return this.renderContext && (this.renderContext.progressive && this.renderContext.progressive.currentIndex < this.renderContext.progressive.totalStep || this.renderContext.beforeTransformProgressive && this.renderContext.beforeTransformProgressive.unfinished());
44039
43924
  }
44040
43925
  clearProgressive() {
44041
- var _a, _b;
44042
- (null === (_a = this.renderContext) || void 0 === _a ? void 0 : _a.progressive) && (this.elements = [], this.graphicParent.children.forEach(group => {
43926
+ this.renderContext && this.renderContext.progressive && (this.elements = [], this.graphicParent.children.forEach(group => {
44043
43927
  group.incrementalClearChild();
44044
- }), this.graphicParent.removeAllChild()), (null === (_b = this.renderContext) || void 0 === _b ? void 0 : _b.beforeTransformProgressive) && this.renderContext.beforeTransformProgressive.release(), this.renderContext = null;
43928
+ }), this.graphicParent.removeAllChild()), this.renderContext && this.renderContext.beforeTransformProgressive && this.renderContext.beforeTransformProgressive.release(), this.renderContext = null;
44045
43929
  }
44046
43930
  restartProgressive() {
44047
- var _a;
44048
- (null === (_a = this.renderContext) || void 0 === _a ? void 0 : _a.progressive) && (this.renderContext.progressive.currentIndex = 0);
43931
+ this.renderContext && this.renderContext.progressive && (this.renderContext.progressive.currentIndex = 0);
44049
43932
  }
44050
43933
  evaluateJoinProgressive() {
44051
43934
  var _a, _b, _c;
@@ -44153,12 +44036,11 @@
44153
44036
  });
44154
44037
  }
44155
44038
  getGroupGraphicItem() {
44156
- var _a, _b, _c;
44157
- return null === (_c = null === (_b = null === (_a = this.elements) || void 0 === _a ? void 0 : _a[0]) || void 0 === _b ? void 0 : _b.getGraphicItem) || void 0 === _c ? void 0 : _c.call(_b);
44039
+ if (this.elements && this.elements[0] && this.elements[0].getGraphicItem) return this.elements[0].getGraphicItem();
44158
44040
  }
44159
44041
  getBounds() {
44160
- var _a, _b, _c;
44161
- return this.graphicItem ? this.graphicItem.AABBBounds : null === (_c = null === (_b = null === (_a = this.elements) || void 0 === _a ? void 0 : _a[0]) || void 0 === _b ? void 0 : _b.getGraphicItem()) || void 0 === _c ? void 0 : _c.AABBBounds;
44042
+ var _a;
44043
+ return this.graphicItem ? this.graphicItem.AABBBounds : null === (_a = this.getGroupGraphicItem()) || void 0 === _a ? void 0 : _a.AABBBounds;
44162
44044
  }
44163
44045
  getMorphConfig() {
44164
44046
  var _a;
@@ -44319,7 +44201,7 @@
44319
44201
  }
44320
44202
  const doGridLayout = (group, children, parentLayoutBounds, options) => {
44321
44203
  const grid = computeGrid(group.getSpec().layout, parentLayoutBounds.width(), parentLayoutBounds.height());
44322
- null == children || children.forEach(mark => {
44204
+ children && children.forEach(mark => {
44323
44205
  const markLayout = mark.getSpec().layout;
44324
44206
  mark.layoutBounds = getCellBounds(grid, markLayout.gridRowStart, markLayout.gridRowEnd, markLayout.gridColumnStart, markLayout.gridColumnEnd), mark.commit();
44325
44207
  });
@@ -44788,55 +44670,55 @@
44788
44670
  stop() {
44789
44671
  return this._view.traverseMarkTree(mark => {
44790
44672
  var _a, _b;
44791
- null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.stop) || void 0 === _b || _b.call(_a);
44673
+ mark.animate && (null === (_b = (_a = mark.animate).stop) || void 0 === _b || _b.call(_a));
44792
44674
  }), this._additionalAnimateMarks.forEach(mark => {
44793
44675
  var _a, _b;
44794
- mark.view && (null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.stop) || void 0 === _b || _b.call(_a));
44676
+ mark.view && mark.animate && (null === (_b = (_a = mark.animate).stop) || void 0 === _b || _b.call(_a));
44795
44677
  }), this._additionalAnimateMarks = [], this;
44796
44678
  }
44797
44679
  pause() {
44798
44680
  return this._view.traverseMarkTree(mark => {
44799
44681
  var _a, _b;
44800
- null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.pause) || void 0 === _b || _b.call(_a);
44682
+ mark.animate && (null === (_b = (_a = mark.animate).pause) || void 0 === _b || _b.call(_a));
44801
44683
  }), this._additionalAnimateMarks.forEach(mark => {
44802
44684
  var _a, _b;
44803
- mark.view && (null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.pause) || void 0 === _b || _b.call(_a));
44685
+ mark.view && mark.animate && (null === (_b = (_a = mark.animate).pause) || void 0 === _b || _b.call(_a));
44804
44686
  }), this;
44805
44687
  }
44806
44688
  resume() {
44807
44689
  return this._view.traverseMarkTree(mark => {
44808
44690
  var _a, _b;
44809
- null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.resume) || void 0 === _b || _b.call(_a);
44691
+ mark.animate && (null === (_b = (_a = mark.animate).resume) || void 0 === _b || _b.call(_a));
44810
44692
  }), this._additionalAnimateMarks.forEach(mark => {
44811
44693
  var _a, _b;
44812
- mark.view && (null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.resume) || void 0 === _b || _b.call(_a));
44694
+ mark.view && mark.animate && (null === (_b = (_a = mark.animate).resume) || void 0 === _b || _b.call(_a));
44813
44695
  }), this;
44814
44696
  }
44815
44697
  enable() {
44816
44698
  return this.isEnabled = !0, this._view.traverseMarkTree(mark => {
44817
44699
  var _a, _b;
44818
- null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.enable) || void 0 === _b || _b.call(_a);
44700
+ mark.animate && (null === (_b = (_a = mark.animate).enable) || void 0 === _b || _b.call(_a));
44819
44701
  }), this;
44820
44702
  }
44821
44703
  disable() {
44822
44704
  return this.isEnabled = !1, this._view.traverseMarkTree(mark => {
44823
44705
  var _a, _b;
44824
- null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.disable) || void 0 === _b || _b.call(_a);
44706
+ mark.animate && (null === (_b = (_a = mark.animate).disable) || void 0 === _b || _b.call(_a));
44825
44707
  }), this._additionalAnimateMarks.forEach(mark => {
44826
44708
  var _a, _b;
44827
- mark.view && (null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.stop) || void 0 === _b || _b.call(_a));
44709
+ mark.view && mark.animate && (null === (_b = (_a = mark.animate).stop) || void 0 === _b || _b.call(_a));
44828
44710
  }), this._additionalAnimateMarks = [], this;
44829
44711
  }
44830
44712
  enableAnimationState(state) {
44831
44713
  return this._view.traverseMarkTree(mark => {
44832
44714
  var _a, _b;
44833
- null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.enableAnimationState) || void 0 === _b || _b.call(_a, state);
44715
+ mark.animate && (null === (_b = (_a = mark.animate).enableAnimationState) || void 0 === _b || _b.call(_a, state));
44834
44716
  }), this;
44835
44717
  }
44836
44718
  disableAnimationState(state) {
44837
44719
  return this._view.traverseMarkTree(mark => {
44838
44720
  var _a, _b;
44839
- null === (_b = null === (_a = mark.animate) || void 0 === _a ? void 0 : _a.disableAnimationState) || void 0 === _b || _b.call(_a, state);
44721
+ mark.animate && (null === (_b = (_a = mark.animate).disableAnimationState) || void 0 === _b || _b.call(_a, state));
44840
44722
  }), this;
44841
44723
  }
44842
44724
  isAnimating() {
@@ -45801,7 +45683,7 @@
45801
45683
  }), this;
45802
45684
  }
45803
45685
  parseSpec(spec) {
45804
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45686
+ var _a, _b, _c, _d, _e, _f;
45805
45687
  if (this.emit(exports.VGRAMMAR_HOOK_EVENT.BEFORE_PARSE_VIEW), this._spec = spec, normalizeMarkTree(spec), spec.theme ? this.theme(spec.theme) : this.theme(ThemeManager$1.getDefaultTheme()), spec.width && this.width(spec.width), spec.height && this.height(spec.height), this.padding(null !== (_b = null !== (_a = spec.padding) && void 0 !== _a ? _a : this._options.padding) && void 0 !== _b ? _b : this._theme.padding), !this.width() || !this.height()) {
45806
45688
  const size = this._getContainerSize();
45807
45689
  size && (this.updateSignal(SIGNAL_WIDTH, size.width), this.updateSignal(SIGNAL_HEIGHT, size.height));
@@ -45819,18 +45701,17 @@
45819
45701
  });
45820
45702
  const customizedGrammars = Factory$1.getGrammars();
45821
45703
  return Object.keys(customizedGrammars).forEach(key => {
45822
- var _a;
45823
45704
  const {
45824
45705
  specKey: specKey
45825
45706
  } = customizedGrammars[key];
45826
- (null === (_a = spec[specKey]) || void 0 === _a ? void 0 : _a.length) && spec[specKey].forEach(specValue => {
45707
+ spec[specKey] && spec[specKey].length && spec[specKey].forEach(specValue => {
45827
45708
  this.customized(key, specValue);
45828
45709
  });
45829
- }), (null === (_g = spec.marks) || void 0 === _g ? void 0 : _g.length) && spec.marks.forEach(mark => {
45710
+ }), spec.marks && spec.marks.length && spec.marks.forEach(mark => {
45830
45711
  this.parseMarkSpec(mark);
45831
- }), (null === (_h = spec.events) || void 0 === _h ? void 0 : _h.length) && spec.events.forEach(eventConfig => {
45712
+ }), spec.events && spec.events.length && spec.events.forEach(eventConfig => {
45832
45713
  this.event(eventConfig);
45833
- }), (null === (_j = spec.interactions) || void 0 === _j ? void 0 : _j.length) && spec.interactions.forEach(interaction => {
45714
+ }), spec.interactions && spec.interactions.length && spec.interactions.forEach(interaction => {
45834
45715
  this.interaction(interaction.type, interaction);
45835
45716
  }), !1 === spec.animation ? this.animate.disable() : this.animate.enable(), this.emit(exports.VGRAMMAR_HOOK_EVENT.AFTER_PARSE_VIEW), this._needBuildLayoutTree = !0, this._layoutState = LayoutState.before, this;
45836
45717
  }
@@ -45874,8 +45755,13 @@
45874
45755
  });
45875
45756
  }
45876
45757
  theme(theme) {
45877
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
45878
- return isString$1(theme) ? this._theme = null !== (_a = ThemeManager$1.getTheme(theme)) && void 0 !== _a ? _a : ThemeManager$1.getDefaultTheme() : this._theme = theme, this._theme ? (this.background(null !== (_d = null !== (_c = null === (_b = this._spec) || void 0 === _b ? void 0 : _b.background) && void 0 !== _c ? _c : this._options.background) && void 0 !== _d ? _d : this._theme.background), this.padding(null !== (_g = null !== (_f = null === (_e = this._spec) || void 0 === _e ? void 0 : _e.padding) && void 0 !== _f ? _f : this._options.padding) && void 0 !== _g ? _g : this._theme.padding), null === (_j = null === (_h = this.renderer.stage()) || void 0 === _h ? void 0 : _h.setTheme) || void 0 === _j || _j.call(_h, Object.assign({}, this._theme.marks))) : (this.background(null !== (_l = null === (_k = this._spec) || void 0 === _k ? void 0 : _k.background) && void 0 !== _l ? _l : this._options.background), this.padding(null !== (_o = null === (_m = this._spec) || void 0 === _m ? void 0 : _m.padding) && void 0 !== _o ? _o : this._options.padding)), this;
45758
+ var _a, _b, _c, _d, _e, _f;
45759
+ isString$1(theme) ? this._theme = null !== (_a = ThemeManager$1.getTheme(theme)) && void 0 !== _a ? _a : ThemeManager$1.getDefaultTheme() : this._theme = theme;
45760
+ const {
45761
+ background: background,
45762
+ padding: padding
45763
+ } = null !== (_b = this._spec) && void 0 !== _b ? _b : {};
45764
+ return this._theme ? (this.background(null !== (_c = null != background ? background : this._options.background) && void 0 !== _c ? _c : this._theme.background), this.padding(null !== (_d = null != padding ? padding : this._options.padding) && void 0 !== _d ? _d : this._theme.padding), null === (_f = null === (_e = this.renderer.stage()) || void 0 === _e ? void 0 : _e.setTheme) || void 0 === _f || _f.call(_e, Object.assign({}, this._theme.marks))) : (this.background(null != background ? background : this._options.background), this.padding(null != padding ? padding : this._options.padding)), this;
45879
45765
  }
45880
45766
  getCurrentTheme() {
45881
45767
  return this._theme;
@@ -46348,11 +46234,14 @@
46348
46234
  registerSymbol(), Factory$1.registerGraphic(GrammarMarkType.symbol, createSymbol);
46349
46235
  };
46350
46236
  const registerTextGraphic = () => {
46351
- registerText(), Factory$1.registerGraphic(GrammarMarkType.text, createText);
46237
+ registerText(), registerRichtext(), Factory$1.registerGraphic(GrammarMarkType.text, createText);
46352
46238
  };
46353
46239
  const registerPolygonGraphic = () => {
46354
46240
  registerPolygon(), Factory$1.registerGraphic(GrammarMarkType.polygon, createPolygon);
46355
46241
  };
46242
+ const registerRichTextGraphic = () => {
46243
+ registerRichtext(), Factory$1.registerGraphic(GrammarMarkType.richtext, createRichText);
46244
+ };
46356
46245
  const registerCellGraphic = () => {
46357
46246
  registerSymbol(), Factory$1.registerGraphic(GrammarMarkType.cell, createSymbol);
46358
46247
  };
@@ -46410,9 +46299,9 @@
46410
46299
  },
46411
46300
  computeBoxplotCenter = (glyphElement, direction, options) => {
46412
46301
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
46413
- if (isValidNumber$1(null == options ? void 0 : options.center)) return options.center;
46302
+ if (options && isValidNumber$1(options.center)) return options.center;
46414
46303
  let median, max, min, q1, q3;
46415
- if ("horizontal" === direction) {
46304
+ if (isHorizontal$2(direction)) {
46416
46305
  median = null === (_b = null === (_a = glyphElement.getGraphicAttribute("points", !1, "median")) || void 0 === _a ? void 0 : _a[0]) || void 0 === _b ? void 0 : _b.x, max = null === (_d = null === (_c = glyphElement.getGraphicAttribute("points", !1, "max")) || void 0 === _c ? void 0 : _c[0]) || void 0 === _d ? void 0 : _d.x, min = null === (_f = null === (_e = glyphElement.getGraphicAttribute("points", !1, "min")) || void 0 === _e ? void 0 : _e[0]) || void 0 === _f ? void 0 : _f.x;
46417
46306
  const boxWidth = glyphElement.getGraphicAttribute("width", !1, "box"),
46418
46307
  boxX = glyphElement.getGraphicAttribute("x", !1, "box");
@@ -46442,7 +46331,7 @@
46442
46331
  boxHeight = null !== (_f = encodeValues.boxHeight) && void 0 !== _f ? _f : element.getGraphicAttribute("boxHeight", !1),
46443
46332
  ruleWidth = null !== (_g = encodeValues.ruleWidth) && void 0 !== _g ? _g : element.getGraphicAttribute("ruleWidth", !1),
46444
46333
  ruleHeight = null !== (_h = encodeValues.ruleHeight) && void 0 !== _h ? _h : element.getGraphicAttribute("ruleHeight", !1);
46445
- return "horizontal" === (null == config ? void 0 : config.direction) ? (isValidNumber$1(boxHeight) ? (Object.assign(attributes.box, {
46334
+ return config && isHorizontal$2(config.direction) ? (isValidNumber$1(boxHeight) ? (Object.assign(attributes.box, {
46446
46335
  y: y - boxHeight / 2,
46447
46336
  y1: y + boxHeight / 2
46448
46337
  }), Object.assign(attributes.median, {
@@ -46501,17 +46390,17 @@
46501
46390
  max: "rule",
46502
46391
  min: "rule",
46503
46392
  median: "rule"
46504
- }).registerProgressiveChannels(["x", "y", "q1", "q3", "min", "max", "median", "angle", "width", "height", "boxWidth", "boxHeight", "ruleWidth", "ruleHeight"]).registerFunctionEncoder(encodeBoxplotSize).registerChannelEncoder("x", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? null : {
46393
+ }).registerProgressiveChannels(["x", "y", "q1", "q3", "min", "max", "median", "angle", "width", "height", "boxWidth", "boxHeight", "ruleWidth", "ruleHeight"]).registerFunctionEncoder(encodeBoxplotSize).registerChannelEncoder("x", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? null : {
46505
46394
  shaft: {
46506
46395
  x: encodeValue,
46507
46396
  x1: encodeValue
46508
46397
  }
46509
- }).registerChannelEncoder("y", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" !== (null == config ? void 0 : config.direction) ? null : {
46398
+ }).registerChannelEncoder("y", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46510
46399
  shaft: {
46511
46400
  y: encodeValue,
46512
46401
  y1: encodeValue
46513
46402
  }
46514
- }).registerChannelEncoder("q1", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46403
+ } : null).registerChannelEncoder("q1", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46515
46404
  box: {
46516
46405
  x: encodeValue
46517
46406
  }
@@ -46519,7 +46408,7 @@
46519
46408
  box: {
46520
46409
  y: encodeValue
46521
46410
  }
46522
- }).registerChannelEncoder("q3", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46411
+ }).registerChannelEncoder("q3", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46523
46412
  box: {
46524
46413
  x1: encodeValue
46525
46414
  }
@@ -46527,7 +46416,7 @@
46527
46416
  box: {
46528
46417
  y1: encodeValue
46529
46418
  }
46530
- }).registerChannelEncoder("min", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46419
+ }).registerChannelEncoder("min", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46531
46420
  shaft: {
46532
46421
  x: encodeValue
46533
46422
  },
@@ -46545,7 +46434,7 @@
46545
46434
  y1: encodeValue,
46546
46435
  visible: !0
46547
46436
  }
46548
- }).registerChannelEncoder("max", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46437
+ }).registerChannelEncoder("max", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46549
46438
  shaft: {
46550
46439
  x1: encodeValue
46551
46440
  },
@@ -46563,7 +46452,7 @@
46563
46452
  y1: encodeValue,
46564
46453
  visible: !0
46565
46454
  }
46566
- }).registerChannelEncoder("median", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46455
+ }).registerChannelEncoder("median", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46567
46456
  median: {
46568
46457
  x: encodeValue,
46569
46458
  x1: encodeValue,
@@ -46577,7 +46466,7 @@
46577
46466
  }
46578
46467
  }).registerChannelEncoder("angle", (channel, encodeValue, encodeValues, datum, element, config) => {
46579
46468
  var _a;
46580
- const defaultAnchor = "horizontal" === (null == config ? void 0 : config.direction) ? [(encodeValues.min + encodeValues.max) / 2, encodeValues.y] : [encodeValues.x, (encodeValues.min + encodeValues.max) / 2],
46469
+ const defaultAnchor = config && isHorizontal$2(config.direction) ? [(encodeValues.min + encodeValues.max) / 2, encodeValues.y] : [encodeValues.x, (encodeValues.min + encodeValues.max) / 2],
46581
46470
  anchor = null !== (_a = encodeValues.anchor) && void 0 !== _a ? _a : defaultAnchor;
46582
46471
  return {
46583
46472
  shaft: {
@@ -46611,13 +46500,13 @@
46611
46500
  median: {
46612
46501
  visible: !1
46613
46502
  }
46614
- })), Factory$1.registerAnimationType("boxplotScaleIn", boxplotScaleIn), Factory$1.registerAnimationType("boxplotScaleOut", boxplotScaleOut);
46503
+ })), Factory$1.registerAnimationType("boxplotScaleIn", boxplotScaleIn), Factory$1.registerAnimationType("boxplotScaleOut", boxplotScaleOut), registerGlyphGraphic(), registerRectGraphic(), registerRuleGraphic();
46615
46504
  }
46616
46505
  const computeBarBoxplotCenter = (glyphElement, direction, options) => {
46617
46506
  var _a, _b, _c, _d;
46618
46507
  if (isValidNumber$1(null == options ? void 0 : options.center)) return options.center;
46619
46508
  let median, max, min, q1, q3;
46620
- if ("horizontal" === direction) {
46509
+ if (isHorizontal$2(direction)) {
46621
46510
  median = null === (_b = null === (_a = glyphElement.getGraphicAttribute("points", !1, "median")) || void 0 === _a ? void 0 : _a[0]) || void 0 === _b ? void 0 : _b.x;
46622
46511
  const minMaxBoxWidth = glyphElement.getGraphicAttribute("width", !1, "minMaxBox"),
46623
46512
  minMaxBoxBoxX = glyphElement.getGraphicAttribute("x", !1, "minMaxBox");
@@ -46651,7 +46540,7 @@
46651
46540
  height = null !== (_f = encodeValues.height) && void 0 !== _f ? _f : element.getGraphicAttribute("height", !1),
46652
46541
  minMaxHeight = null !== (_g = encodeValues.minMaxHeight) && void 0 !== _g ? _g : element.getGraphicAttribute("minMaxHeight", !1),
46653
46542
  q1q3Height = null !== (_h = encodeValues.q1q3Height) && void 0 !== _h ? _h : element.getGraphicAttribute("q1q3Height", !1);
46654
- return "horizontal" === (null == config ? void 0 : config.direction) ? (isValidNumber$1(minMaxHeight) ? Object.assign(attributes.minMaxBox, {
46543
+ return config && isHorizontal$2(config.direction) ? (isValidNumber$1(minMaxHeight) ? Object.assign(attributes.minMaxBox, {
46655
46544
  y: y - minMaxHeight / 2,
46656
46545
  y1: y + minMaxHeight / 2
46657
46546
  }) : Object.assign(attributes.minMaxBox, {
@@ -46696,7 +46585,7 @@
46696
46585
  minMaxBox: "rect",
46697
46586
  q1q3Box: "rect",
46698
46587
  median: "rule"
46699
- }).registerProgressiveChannels(["x", "y", "q1", "q3", "min", "max", "median", "angle", "width", "height", "minMaxWidth", "q1q3Width", "minMaxHeight", "q1q3Height"]).registerFunctionEncoder(encodeBarBoxplotSize).registerChannelEncoder("q1", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46588
+ }).registerProgressiveChannels(["x", "y", "q1", "q3", "min", "max", "median", "angle", "width", "height", "minMaxWidth", "q1q3Width", "minMaxHeight", "q1q3Height"]).registerFunctionEncoder(encodeBarBoxplotSize).registerChannelEncoder("q1", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46700
46589
  q1q3Box: {
46701
46590
  x: encodeValue
46702
46591
  }
@@ -46704,7 +46593,7 @@
46704
46593
  q1q3Box: {
46705
46594
  y: encodeValue
46706
46595
  }
46707
- }).registerChannelEncoder("q3", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46596
+ }).registerChannelEncoder("q3", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46708
46597
  q1q3Box: {
46709
46598
  x1: encodeValue
46710
46599
  }
@@ -46712,7 +46601,7 @@
46712
46601
  q1q3Box: {
46713
46602
  y1: encodeValue
46714
46603
  }
46715
- }).registerChannelEncoder("min", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46604
+ }).registerChannelEncoder("min", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46716
46605
  minMaxBox: {
46717
46606
  x: encodeValue
46718
46607
  }
@@ -46720,7 +46609,7 @@
46720
46609
  minMaxBox: {
46721
46610
  y: encodeValue
46722
46611
  }
46723
- }).registerChannelEncoder("max", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46612
+ }).registerChannelEncoder("max", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46724
46613
  minMaxBox: {
46725
46614
  x1: encodeValue
46726
46615
  }
@@ -46728,7 +46617,7 @@
46728
46617
  minMaxBox: {
46729
46618
  y1: encodeValue
46730
46619
  }
46731
- }).registerChannelEncoder("median", (channel, encodeValue, encodeValues, datum, element, config) => "horizontal" === (null == config ? void 0 : config.direction) ? {
46620
+ }).registerChannelEncoder("median", (channel, encodeValue, encodeValues, datum, element, config) => config && isHorizontal$2(config.direction) ? {
46732
46621
  median: {
46733
46622
  x: encodeValue,
46734
46623
  x1: encodeValue,
@@ -47020,7 +46909,7 @@
47020
46909
  const generateCoordinateAxisAttribute = (scale, coordinate, inside, baseValue, layout, isGrid) => {
47021
46910
  var _a;
47022
46911
  const axisPosition = scale.getCoordinateAxisPosition();
47023
- "auto" === (null == layout ? void 0 : layout.position) && (layout.position = inside ? "content" : axisPosition);
46912
+ layout && "auto" === layout.position && (layout.position = inside ? "content" : axisPosition);
47024
46913
  const axisPoints = scale.getCoordinateAxisPoints(baseValue);
47025
46914
  if (axisPoints) {
47026
46915
  const res = {
@@ -47136,42 +47025,46 @@
47136
47025
  Factory$1.registerGraphicComponent(AxisEnum.lineAxis, (attrs, options) => new LineAxis(attrs, options)), Factory$1.registerGraphicComponent(AxisEnum.circleAxis, attrs => new CircleAxis(attrs)), Factory$1.registerComponent(ComponentEnum.axis, Axis);
47137
47026
  };
47138
47027
 
47139
- const generateLabelAttributes = (marks, groupSize, encoder, labelStyle, parameters, theme) => {
47028
+ const generateLabelAttributes = function (marks, groupSize, encoder, labelStyle, parameters) {
47029
+ let theme = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
47140
47030
  var _a;
47141
- const labelTheme = null === (_a = null == theme ? void 0 : theme.components) || void 0 === _a ? void 0 : _a.dataLabel,
47031
+ const labelTheme = null === (_a = theme.components) || void 0 === _a ? void 0 : _a.dataLabel,
47142
47032
  dataLabels = marks.map((mark, index) => {
47143
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
47033
+ var _a, _b, _c, _d, _e;
47144
47034
  const labelParameters = Object.assign(Object.assign({}, parameters), {
47145
47035
  labelIndex: index
47146
47036
  }),
47147
- addition = invokeFunctionType(labelStyle, labelParameters, mark);
47037
+ addition = null !== (_a = invokeFunctionType(labelStyle, labelParameters, mark)) && void 0 !== _a ? _a : {},
47038
+ {
47039
+ components = {}
47040
+ } = theme;
47148
47041
  let currentTheme = {};
47149
47042
  switch (mark.markType) {
47150
47043
  case GrammarMarkType.line:
47151
47044
  case GrammarMarkType.area:
47152
- currentTheme = "line" === (null == addition ? void 0 : addition.type) ? null === (_a = null == theme ? void 0 : theme.components) || void 0 === _a ? void 0 : _a.lineLabel : "area" === (null == addition ? void 0 : addition.type) ? null === (_b = null == theme ? void 0 : theme.components) || void 0 === _b ? void 0 : _b.areaLabel : null === (_c = null == theme ? void 0 : theme.components) || void 0 === _c ? void 0 : _c.lineDataLabel;
47045
+ currentTheme = "line" === addition.type ? components.lineLabel : "area" === addition.type ? components.areaLabel : components.lineDataLabel;
47153
47046
  break;
47154
47047
  case GrammarMarkType.rect:
47155
47048
  case GrammarMarkType.rect3d:
47156
47049
  case GrammarMarkType.interval:
47157
- currentTheme = null === (_d = null == theme ? void 0 : theme.components) || void 0 === _d ? void 0 : _d.rectLabel;
47050
+ currentTheme = components.rectLabel;
47158
47051
  break;
47159
47052
  case GrammarMarkType.symbol:
47160
47053
  case GrammarMarkType.circle:
47161
47054
  case GrammarMarkType.cell:
47162
- currentTheme = null === (_e = null == theme ? void 0 : theme.components) || void 0 === _e ? void 0 : _e.symbolLabel;
47055
+ currentTheme = components.symbolLabel;
47163
47056
  break;
47164
47057
  case GrammarMarkType.arc:
47165
47058
  case GrammarMarkType.arc3d:
47166
- currentTheme = null === (_f = null == theme ? void 0 : theme.components) || void 0 === _f ? void 0 : _f.arcLabel;
47059
+ currentTheme = components.arcLabel;
47167
47060
  break;
47168
47061
  case GrammarMarkType.polygon:
47169
47062
  case GrammarMarkType.path:
47170
47063
  default:
47171
- currentTheme = null === (_g = null == theme ? void 0 : theme.components) || void 0 === _g ? void 0 : _g.pointLabel;
47064
+ currentTheme = components.pointLabel;
47172
47065
  }
47173
- const data = null !== (_h = null == addition ? void 0 : addition.data) && void 0 !== _h ? _h : [],
47174
- themeDatum = null !== (_k = null === (_j = null == currentTheme ? void 0 : currentTheme.data) || void 0 === _j ? void 0 : _j[0]) && void 0 !== _k ? _k : {};
47066
+ const data = null !== (_b = addition.data) && void 0 !== _b ? _b : [],
47067
+ themeDatum = null !== (_d = null === (_c = null == currentTheme ? void 0 : currentTheme.data) || void 0 === _c ? void 0 : _c[0]) && void 0 !== _d ? _d : {};
47175
47068
  data && data.length > 0 ? data.forEach((d, index) => {
47176
47069
  if (mark.elements[index]) {
47177
47070
  const attributes = invokeEncoder(encoder, d, mark.elements[index], labelParameters);
@@ -47189,7 +47082,7 @@
47189
47082
  data.push(datum);
47190
47083
  }
47191
47084
  });
47192
- const graphicItemName = null === (_l = mark.graphicItem) || void 0 === _l ? void 0 : _l.name;
47085
+ const graphicItemName = null === (_e = mark.graphicItem) || void 0 === _e ? void 0 : _e.name;
47193
47086
  return merge$1({}, currentTheme, {
47194
47087
  data: data,
47195
47088
  baseMarkGroupName: graphicItemName,
@@ -47673,7 +47566,7 @@
47673
47566
  var _a;
47674
47567
  const clipDimension = element.getGraphicAttribute("clipRangeByDimension", !1),
47675
47568
  clipRange = null !== (_a = element.getGraphicAttribute("clipRange", !1)) && void 0 !== _a ? _a : 1;
47676
- return (null == options ? void 0 : options.clipDimension) ? {
47569
+ return options && options.clipDimension ? {
47677
47570
  from: {
47678
47571
  clipRange: 0,
47679
47572
  clipRangeByDimension: options.clipDimension
@@ -47695,7 +47588,7 @@
47695
47588
  var _a;
47696
47589
  const clipDimension = element.getGraphicAttribute("clipRangeByDimension", !0),
47697
47590
  clipRange = null !== (_a = element.getGraphicAttribute("clipRange", !0)) && void 0 !== _a ? _a : 1;
47698
- return (null == options ? void 0 : options.clipDimension) ? {
47591
+ return options && options.clipDimension ? {
47699
47592
  from: {
47700
47593
  clipRange: clipRange,
47701
47594
  clipRangeByDimension: options.clipDimension
@@ -47869,7 +47762,7 @@
47869
47762
  const x = element.getGraphicAttribute("x", !1),
47870
47763
  x1 = element.getGraphicAttribute("x1", !1),
47871
47764
  width = element.getGraphicAttribute("width", !1);
47872
- if ("negative" === (null == options ? void 0 : options.orient)) {
47765
+ if (options && "negative" === options.orient) {
47873
47766
  const computedX1 = isValid$1(width) ? Math.max(x, x + width) : Math.max(x, x1);
47874
47767
  return {
47875
47768
  from: {
@@ -47904,7 +47797,7 @@
47904
47797
  x1 = element.getGraphicAttribute("x1", !1),
47905
47798
  width = element.getGraphicAttribute("width", !1);
47906
47799
  let overallValue;
47907
- return "negative" === (null == options ? void 0 : options.orient) ? isNumber$2(null == options ? void 0 : 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, {
47800
+ 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, {
47908
47801
  from: {
47909
47802
  x: overallValue,
47910
47803
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -47925,7 +47818,7 @@
47925
47818
  const x = element.getGraphicAttribute("x", !1),
47926
47819
  x1 = element.getGraphicAttribute("x1", !1),
47927
47820
  width = element.getGraphicAttribute("width", !1);
47928
- if ("negative" === (null == options ? void 0 : options.orient)) {
47821
+ if (options && "negative" === options.orient) {
47929
47822
  const computedX1 = isValid$1(width) ? Math.max(x, x + width) : Math.max(x, x1);
47930
47823
  return {
47931
47824
  to: {
@@ -47949,7 +47842,7 @@
47949
47842
  const x1 = element.getGraphicAttribute("x1", !1),
47950
47843
  width = element.getGraphicAttribute("width", !1);
47951
47844
  let overallValue;
47952
- return "negative" === (null == options ? void 0 : options.orient) ? isNumber$2(null == options ? void 0 : 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, {
47845
+ 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, {
47953
47846
  to: {
47954
47847
  x: overallValue,
47955
47848
  x1: isNil$1(x1) ? void 0 : overallValue,
@@ -47965,7 +47858,7 @@
47965
47858
  const y = element.getGraphicAttribute("y", !1),
47966
47859
  y1 = element.getGraphicAttribute("y1", !1),
47967
47860
  height = element.getGraphicAttribute("height", !1);
47968
- if ("negative" === (null == options ? void 0 : options.orient)) {
47861
+ if (options && "negative" === options.orient) {
47969
47862
  const computedY1 = isValid$1(height) ? Math.max(y, y + height) : Math.max(y, y1);
47970
47863
  return {
47971
47864
  from: {
@@ -48000,7 +47893,7 @@
48000
47893
  y1 = element.getGraphicAttribute("y1", !1),
48001
47894
  height = element.getGraphicAttribute("height", !1);
48002
47895
  let overallValue;
48003
- return "negative" === (null == options ? void 0 : options.orient) ? isNumber$2(null == options ? void 0 : options.overall) ? overallValue = null == options ? void 0 : 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) ? null == options ? void 0 : options.overall : 0, {
47896
+ 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, {
48004
47897
  from: {
48005
47898
  y: overallValue,
48006
47899
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -48021,7 +47914,7 @@
48021
47914
  const y = element.getGraphicAttribute("y", !1),
48022
47915
  y1 = element.getGraphicAttribute("y1", !1),
48023
47916
  height = element.getGraphicAttribute("height", !1);
48024
- if ("negative" === (null == options ? void 0 : options.orient)) {
47917
+ if (options && "negative" === options.orient) {
48025
47918
  const computedY1 = isValid$1(height) ? Math.max(y, y + height) : Math.max(y, y1);
48026
47919
  return {
48027
47920
  to: {
@@ -48045,7 +47938,7 @@
48045
47938
  const y1 = element.getGraphicAttribute("y1", !1),
48046
47939
  height = element.getGraphicAttribute("height", !1);
48047
47940
  let overallValue;
48048
- return "negative" === (null == options ? void 0 : options.orient) ? isNumber$2(null == options ? void 0 : 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) ? null == options ? void 0 : options.overall : 0, {
47941
+ 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, {
48049
47942
  to: {
48050
47943
  y: overallValue,
48051
47944
  y1: isNil$1(y1) ? void 0 : overallValue,
@@ -48058,7 +47951,7 @@
48058
47951
  return !1 !== (null !== (_a = null == options ? void 0 : options.overall) && void 0 !== _a && _a) ? growHeightOutOverall(element, options, animationParameters) : growHeightOutIndividual(element, options);
48059
47952
  };
48060
47953
 
48061
- const growAngleInIndividual = (element, options, animationParameters) => "anticlockwise" === (null == options ? void 0 : options.orient) ? {
47954
+ const growAngleInIndividual = (element, options, animationParameters) => options && "anticlockwise" === options.orient ? {
48062
47955
  from: {
48063
47956
  startAngle: element.getGraphicAttribute("endAngle", !1)
48064
47957
  },
@@ -48074,8 +47967,8 @@
48074
47967
  }
48075
47968
  },
48076
47969
  growAngleInOverall = (element, options, animationParameters) => {
48077
- if ("anticlockwise" === (null == options ? void 0 : options.orient)) {
48078
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 2 * Math.PI;
47970
+ if (options && "anticlockwise" === options.orient) {
47971
+ const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
48079
47972
  return {
48080
47973
  from: {
48081
47974
  startAngle: overallValue,
@@ -48103,7 +47996,7 @@
48103
47996
  var _a;
48104
47997
  return !1 !== (null !== (_a = null == options ? void 0 : options.overall) && void 0 !== _a && _a) ? growAngleInOverall(element, options) : growAngleInIndividual(element, options);
48105
47998
  };
48106
- const growAngleOutIndividual = (element, options, animationParameters) => "anticlockwise" === (null == options ? void 0 : options.orient) ? {
47999
+ const growAngleOutIndividual = (element, options, animationParameters) => options && "anticlockwise" === options.orient ? {
48107
48000
  from: {
48108
48001
  startAngle: element.getGraphicAttribute("startAngle", !0)
48109
48002
  },
@@ -48119,8 +48012,8 @@
48119
48012
  }
48120
48013
  },
48121
48014
  growAngleOutOverall = (element, options, animationParameters) => {
48122
- if ("anticlockwise" === (null == options ? void 0 : options.orient)) {
48123
- const overallValue = isNumber$2(null == options ? void 0 : options.overall) ? options.overall : 2 * Math.PI;
48015
+ if (options && "anticlockwise" === options.orient) {
48016
+ const overallValue = isNumber$2(options.overall) ? options.overall : 2 * Math.PI;
48124
48017
  return {
48125
48018
  from: {
48126
48019
  startAngle: element.getGraphicAttribute("startAngle", !0),
@@ -48148,7 +48041,7 @@
48148
48041
  var _a;
48149
48042
  return !1 !== (null !== (_a = null == options ? void 0 : options.overall) && void 0 !== _a && _a) ? growAngleOutOverall(element, options) : growAngleOutIndividual(element, options);
48150
48043
  };
48151
- const growRadiusInIndividual = (element, options, animationParameters) => "inside" === (null == options ? void 0 : options.orient) ? {
48044
+ const growRadiusInIndividual = (element, options, animationParameters) => options && "inside" === options.orient ? {
48152
48045
  from: {
48153
48046
  innerRadius: element.getGraphicAttribute("outerRadius", !1)
48154
48047
  },
@@ -48180,7 +48073,7 @@
48180
48073
  var _a;
48181
48074
  return !1 !== (null !== (_a = null == options ? void 0 : options.overall) && void 0 !== _a && _a) ? growRadiusInOverall(element, options) : growRadiusInIndividual(element, options);
48182
48075
  };
48183
- const growRadiusOutIndividual = (element, options, animationParameters) => "inside" === (null == options ? void 0 : options.orient) ? {
48076
+ const growRadiusOutIndividual = (element, options, animationParameters) => options && "inside" === options.orient ? {
48184
48077
  from: {
48185
48078
  innerRadius: element.getGraphicAttribute("innerRadius", !0)
48186
48079
  },
@@ -48221,7 +48114,7 @@
48221
48114
  };
48222
48115
  return points.forEach(point => {
48223
48116
  center.x += point.x, center.y += point.y;
48224
- }), center.x /= points.length, center.y /= points.length, (null == options ? void 0 : options.center) && (isValidNumber$1(options.center.x) && (center.x = options.center.x), isValidNumber$1(options.center.y) && (center.y = options.center.y)), points.map(() => Object.assign(center));
48117
+ }), center.x /= points.length, center.y /= points.length, options && options.center && (isValidNumber$1(options.center.x) && (center.x = options.center.x), isValidNumber$1(options.center.y) && (center.y = options.center.y)), points.map(() => Object.assign(center));
48225
48118
  };
48226
48119
  const growPointsIn = (element, options, animationParameters) => ({
48227
48120
  from: {
@@ -48241,7 +48134,7 @@
48241
48134
  });
48242
48135
  const changePointsX = (element, options, animationParameters) => element.getGraphicAttribute("points", !1).map(point => {
48243
48136
  var _a;
48244
- if ("negative" === (null == options ? void 0 : options.orient)) {
48137
+ if (options && "negative" === options.orient) {
48245
48138
  let groupRight = animationParameters.width;
48246
48139
  return animationParameters.group && (groupRight = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = groupRight), {
48247
48140
  x: groupRight,
@@ -48277,7 +48170,7 @@
48277
48170
  });
48278
48171
  const changePointsY = (element, options, animationParameters) => element.getGraphicAttribute("points", !1).map(point => {
48279
48172
  var _a;
48280
- if ("negative" === (null == options ? void 0 : options.orient)) {
48173
+ if (options && "negative" === options.orient) {
48281
48174
  let groupBottom = animationParameters.height;
48282
48175
  return animationParameters.group && (groupBottom = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(), animationParameters.groupHeight = groupBottom), {
48283
48176
  x: point.x,
@@ -48313,15 +48206,20 @@
48313
48206
  });
48314
48207
 
48315
48208
  const moveIn = (element, options, animationParameters) => {
48316
- var _a, _b, _c;
48317
- const offset = null !== (_a = null == options ? void 0 : options.offset) && void 0 !== _a ? _a : 0;
48209
+ var _a, _b;
48210
+ const {
48211
+ offset = 0,
48212
+ orient: orient,
48213
+ direction: direction,
48214
+ point: pointOpt
48215
+ } = null != options ? options : {};
48318
48216
  let changedX = 0,
48319
48217
  changedY = 0;
48320
- "negative" === (null == options ? void 0 : options.orient) && (animationParameters.group ? (changedX = null !== (_b = animationParameters.groupWidth) && void 0 !== _b ? _b : animationParameters.group.getBounds().width(), changedY = null !== (_c = animationParameters.groupHeight) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupWidth = changedX, animationParameters.groupHeight = changedY) : (changedX = animationParameters.width, changedY = animationParameters.height)), changedX += offset, changedY += offset;
48321
- const point = isFunction$1(null == options ? void 0 : options.point) ? options.point.call(null, element.getDatum(), element, animationParameters) : null == options ? void 0 : options.point,
48322
- fromX = isValidNumber$1(null == point ? void 0 : point.x) ? point.x : changedX,
48323
- fromY = isValidNumber$1(null == point ? void 0 : point.y) ? point.y : changedY;
48324
- switch (null == options ? void 0 : options.direction) {
48218
+ "negative" === orient && (animationParameters.group ? (changedX = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), changedY = null !== (_b = animationParameters.groupHeight) && void 0 !== _b ? _b : animationParameters.group.getBounds().height(), animationParameters.groupWidth = changedX, animationParameters.groupHeight = changedY) : (changedX = animationParameters.width, changedY = animationParameters.height)), changedX += offset, changedY += offset;
48219
+ const point = isFunction$1(pointOpt) ? pointOpt.call(null, element.getDatum(), element, animationParameters) : pointOpt,
48220
+ fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
48221
+ fromY = point && isValidNumber$1(point.y) ? point.y : changedY;
48222
+ switch (direction) {
48325
48223
  case "x":
48326
48224
  return {
48327
48225
  from: {
@@ -48354,17 +48252,22 @@
48354
48252
  }
48355
48253
  };
48356
48254
  const moveOut = (element, options, animationParameters) => {
48357
- var _a, _b, _c;
48358
- const offset = null !== (_a = null == options ? void 0 : options.offset) && void 0 !== _a ? _a : 0,
48255
+ var _a, _b;
48256
+ const {
48257
+ offset = 0,
48258
+ orient: orient,
48259
+ direction: direction,
48260
+ point: pointOpt
48261
+ } = null != options ? options : {},
48359
48262
  groupBounds = animationParameters.group ? animationParameters.group.getBounds() : null,
48360
- groupWidth = null !== (_b = null == groupBounds ? void 0 : groupBounds.width()) && void 0 !== _b ? _b : animationParameters.width,
48361
- groupHeight = null !== (_c = null == groupBounds ? void 0 : groupBounds.height()) && void 0 !== _c ? _c : animationParameters.height,
48362
- changedX = ("negative" === (null == options ? void 0 : options.orient) ? groupWidth : 0) + offset,
48363
- changedY = ("negative" === (null == options ? void 0 : options.orient) ? groupHeight : 0) + offset,
48364
- point = isFunction$1(null == options ? void 0 : options.point) ? options.point.call(null, element.getDatum(), element, animationParameters) : null == options ? void 0 : options.point,
48365
- fromX = isValidNumber$1(null == point ? void 0 : point.x) ? point.x : changedX,
48366
- fromY = isValidNumber$1(null == point ? void 0 : point.y) ? point.y : changedY;
48367
- switch (null == options ? void 0 : options.direction) {
48263
+ groupWidth = null !== (_a = null == groupBounds ? void 0 : groupBounds.width()) && void 0 !== _a ? _a : animationParameters.width,
48264
+ groupHeight = null !== (_b = null == groupBounds ? void 0 : groupBounds.height()) && void 0 !== _b ? _b : animationParameters.height,
48265
+ changedX = ("negative" === orient ? groupWidth : 0) + offset,
48266
+ changedY = ("negative" === orient ? groupHeight : 0) + offset,
48267
+ point = isFunction$1(pointOpt) ? pointOpt.call(null, element.getDatum(), element, animationParameters) : pointOpt,
48268
+ fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
48269
+ fromY = point && isValidNumber$1(point.y) ? point.y : changedY;
48270
+ switch (direction) {
48368
48271
  case "x":
48369
48272
  return {
48370
48273
  from: {
@@ -48469,7 +48372,7 @@
48469
48372
  const update = (element, options, animationParameters) => {
48470
48373
  const from = Object.assign({}, element.getPrevGraphicAttributes()),
48471
48374
  to = Object.assign({}, element.getNextGraphicAttributes());
48472
- return array(null == options ? void 0 : options.excludeChannels).forEach(key => {
48375
+ return options && array(options.excludeChannels).forEach(key => {
48473
48376
  delete from[key], delete to[key];
48474
48377
  }), Object.keys(to).forEach(key => {
48475
48378
  isEqual(key, from, to) && (delete from[key], delete to[key]);
@@ -55708,7 +55611,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55708
55611
  computeColor = color(data, this._attributeContext, opt, markData);
55709
55612
  }
55710
55613
  if (isValid$1(opacity)) {
55711
- computeColor = Color$2.SetOpacity(computeColor, opacity);
55614
+ computeColor = Color.SetOpacity(computeColor, opacity);
55712
55615
  }
55713
55616
  return {
55714
55617
  offset: isFunction$1(offset) ? offset(data, this._attributeContext, opt, markData) : offset,
@@ -55830,10 +55733,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55830
55733
  const Appear_ClipIn$1 = {
55831
55734
  type: 'clipIn'
55832
55735
  };
55833
- const Appear_FadeIn$8 = {
55736
+ const Appear_FadeIn$9 = {
55834
55737
  type: 'fadeIn'
55835
55738
  };
55836
- const Appear_Grow$5 = (params) => {
55739
+ const Appear_Grow$6 = (params) => {
55837
55740
  return {
55838
55741
  type: params.direction === Direction.horizontal ? 'growPointsXIn' : 'growPointsYIn',
55839
55742
  options: {
@@ -55844,9 +55747,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55844
55747
  function linePresetAnimation(params, preset) {
55845
55748
  switch (preset) {
55846
55749
  case 'grow':
55847
- return Appear_Grow$5(params);
55750
+ return Appear_Grow$6(params);
55848
55751
  case 'fadeIn':
55849
- return Appear_FadeIn$8;
55752
+ return Appear_FadeIn$9;
55850
55753
  default:
55851
55754
  return Appear_ClipIn$1;
55852
55755
  }
@@ -57670,7 +57573,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
57670
57573
  registerChartPlugin(MediaQuery);
57671
57574
  };
57672
57575
 
57673
- const version = "1.8.0-beta.0";
57576
+ const version = "1.8.0";
57674
57577
 
57675
57578
  var ChartTypeEnum;
57676
57579
  (function (ChartTypeEnum) {
@@ -61970,7 +61873,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61970
61873
  const Appear_ClipIn = {
61971
61874
  type: 'clipIn'
61972
61875
  };
61973
- const Appear_Grow$4 = (params) => {
61876
+ const Appear_Grow$5 = (params) => {
61974
61877
  return {
61975
61878
  type: params.direction === Direction.horizontal ? 'growPointsXIn' : 'growPointsYIn',
61976
61879
  options: {
@@ -61978,7 +61881,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61978
61881
  }
61979
61882
  };
61980
61883
  };
61981
- const Appear_FadeIn$7 = {
61884
+ const Appear_FadeIn$8 = {
61982
61885
  type: 'fadeIn'
61983
61886
  };
61984
61887
  function areaPresetAnimation(params, preset) {
@@ -61987,9 +61890,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
61987
61890
  }
61988
61891
  switch (preset) {
61989
61892
  case 'grow':
61990
- return Appear_Grow$4(params);
61893
+ return Appear_Grow$5(params);
61991
61894
  case 'fadeIn':
61992
- return Appear_FadeIn$7;
61895
+ return Appear_FadeIn$8;
61993
61896
  default:
61994
61897
  return Appear_ClipIn;
61995
61898
  }
@@ -62273,7 +62176,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
62273
62176
  options: barGrowOption(params, isOverall)
62274
62177
  };
62275
62178
  };
62276
- const Appear_FadeIn$6 = {
62179
+ const Appear_FadeIn$7 = {
62277
62180
  type: 'fadeIn'
62278
62181
  };
62279
62182
  const Appear_ScaleIn$1 = {
@@ -62285,7 +62188,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
62285
62188
  }
62286
62189
  switch (preset) {
62287
62190
  case 'fadeIn':
62288
- return Appear_FadeIn$6;
62191
+ return Appear_FadeIn$7;
62289
62192
  case 'scaleIn':
62290
62193
  return Appear_ScaleIn$1;
62291
62194
  default:
@@ -65171,7 +65074,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65171
65074
  return data;
65172
65075
  };
65173
65076
 
65174
- const Appear_FadeIn$5 = {
65077
+ const Appear_FadeIn$6 = {
65175
65078
  type: 'fadeIn'
65176
65079
  };
65177
65080
  const Appear_ScaleIn = {
@@ -65180,7 +65083,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65180
65083
  function waterfallPresetAnimation(params, preset) {
65181
65084
  switch (preset) {
65182
65085
  case 'fadeIn':
65183
- return Appear_FadeIn$5;
65086
+ return Appear_FadeIn$6;
65184
65087
  case 'scaleIn':
65185
65088
  return Appear_ScaleIn;
65186
65089
  default:
@@ -66045,6 +65948,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66045
65948
  const registerTextMark = () => {
66046
65949
  Factory.registerMark(TextMark.type, TextMark);
66047
65950
  registerTextGraphic();
65951
+ registerRichTextGraphic();
66048
65952
  };
66049
65953
 
66050
65954
  function setRectLabelPos(component, labelMark, position, offset, x, x1, y, y1, direction) {
@@ -66225,7 +66129,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66225
66129
  }
66226
66130
  };
66227
66131
  };
66228
- const Appear_FadeIn$4 = {
66132
+ const Appear_FadeIn$5 = {
66229
66133
  type: 'fadeIn'
66230
66134
  };
66231
66135
  const rangeColumnGrowOut = (params) => {
@@ -66239,7 +66143,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66239
66143
  function rangeColumnPresetAnimation(params, preset) {
66240
66144
  switch (preset) {
66241
66145
  case 'fadeIn':
66242
- return Appear_FadeIn$4;
66146
+ return Appear_FadeIn$5;
66243
66147
  case 'grow':
66244
66148
  default:
66245
66149
  return rangeColumnGrowIn(params);
@@ -66879,13 +66783,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66879
66783
  };
66880
66784
  };
66881
66785
  }
66882
- const Appear_Grow$3 = (params) => {
66786
+ const Appear_Grow$4 = (params) => {
66883
66787
  return {
66884
66788
  type: params.growField === 'radius' ? 'growRadiusIn' : 'growAngleIn',
66885
66789
  options: pieGrowOption(params, true, AnimationStateEnum.appear)
66886
66790
  };
66887
66791
  };
66888
- const Appear_FadeIn$3 = {
66792
+ const Appear_FadeIn$4 = {
66889
66793
  type: 'fadeIn'
66890
66794
  };
66891
66795
  const pieEnter = (params) => {
@@ -66914,11 +66818,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
66914
66818
  }
66915
66819
  switch (preset) {
66916
66820
  case 'fadeIn':
66917
- return Appear_FadeIn$3;
66821
+ return Appear_FadeIn$4;
66918
66822
  case 'growRadius':
66919
- return Appear_Grow$3(Object.assign(Object.assign({}, params), { growField: 'radius' }));
66823
+ return Appear_Grow$4(Object.assign(Object.assign({}, params), { growField: 'radius' }));
66920
66824
  default:
66921
- return Appear_Grow$3(Object.assign(Object.assign({}, params), { growField: 'angle' }));
66825
+ return Appear_Grow$4(Object.assign(Object.assign({}, params), { growField: 'angle' }));
66922
66826
  }
66923
66827
  }
66924
66828
  const registerPieAnimation = () => {
@@ -67488,7 +67392,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67488
67392
  Factory.registerSeries(Pie3dSeries.type, Pie3dSeries);
67489
67393
  };
67490
67394
 
67491
- const Appear_Grow$2 = (params) => {
67395
+ const Appear_Grow$3 = (params) => {
67492
67396
  const from = params.growField === 'angle' ? 0 : params.innerRadius;
67493
67397
  return params.growField === 'angle'
67494
67398
  ? {
@@ -67501,7 +67405,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67501
67405
  }
67502
67406
  };
67503
67407
  };
67504
- const Appear_FadeIn$2 = {
67408
+ const Appear_FadeIn$3 = {
67505
67409
  type: 'fadeIn'
67506
67410
  };
67507
67411
  const roseEnter = (params) => {
@@ -67525,11 +67429,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67525
67429
  }
67526
67430
  switch (preset) {
67527
67431
  case 'fadeIn':
67528
- return Appear_FadeIn$2;
67432
+ return Appear_FadeIn$3;
67529
67433
  case 'growAngle':
67530
- return Appear_Grow$2(Object.assign(Object.assign({}, params), { growField: 'angle' }));
67434
+ return Appear_Grow$3(Object.assign(Object.assign({}, params), { growField: 'angle' }));
67531
67435
  default:
67532
- return Appear_Grow$2(Object.assign(Object.assign({}, params), { growField: 'radius' }));
67436
+ return Appear_Grow$3(Object.assign(Object.assign({}, params), { growField: 'radius' }));
67533
67437
  }
67534
67438
  }
67535
67439
  const registerRoseAnimation = () => {
@@ -69138,24 +69042,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
69138
69042
  Factory.registerMark(ProgressArcMark.constructorType, ProgressArcMark);
69139
69043
  };
69140
69044
 
69141
- const Appear_Grow$1 = (params) => ({
69045
+ const Appear_Grow$2 = (params) => ({
69142
69046
  type: 'growAngleIn',
69143
69047
  options: {
69144
69048
  overall: params.startAngle
69145
69049
  }
69146
69050
  });
69147
- const Appear_FadeIn$1 = {
69051
+ const Appear_FadeIn$2 = {
69148
69052
  type: 'fadeIn'
69149
69053
  };
69150
69054
  function progressLikePresetAnimation(params, preset) {
69151
69055
  switch (preset) {
69152
69056
  case 'fadeIn':
69153
- return Appear_FadeIn$1;
69057
+ return Appear_FadeIn$2;
69154
69058
  default:
69155
- return Appear_Grow$1(params);
69059
+ return Appear_Grow$2(params);
69156
69060
  }
69157
69061
  }
69158
- const registerCircularProgressAnimation = () => {
69062
+ const registerProgressLikeAnimation = () => {
69159
69063
  Factory.registerAnimation('circularProgress', (params, preset) => ({
69160
69064
  appear: progressLikePresetAnimation(params, preset),
69161
69065
  enter: { type: 'growAngleIn' },
@@ -69298,7 +69202,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
69298
69202
  const registerCircularProgressSeries = () => {
69299
69203
  registerProgressArcMark();
69300
69204
  registerArcMark();
69301
- registerCircularProgressAnimation();
69205
+ registerProgressLikeAnimation();
69302
69206
  registerFadeInOutAnimation();
69303
69207
  Factory.registerSeries(CircularProgressSeries.type, CircularProgressSeries);
69304
69208
  };
@@ -69315,7 +69219,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
69315
69219
  };
69316
69220
  };
69317
69221
  }
69318
- const Appear_Grow = (params) => {
69222
+ const Appear_Grow$1 = (params) => {
69319
69223
  return {
69320
69224
  type: params.direction === Direction.horizontal ? 'growWidthIn' : 'growHeightIn',
69321
69225
  options: LinearProgressGrowOption(params)
@@ -69327,7 +69231,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
69327
69231
  options: LinearProgressGrowOption(params)
69328
69232
  };
69329
69233
  };
69330
- const Appear_FadeIn = {
69234
+ const Appear_FadeIn$1 = {
69331
69235
  type: 'fadeIn'
69332
69236
  };
69333
69237
  function linearProgressPresetAnimation(params, preset) {
@@ -69336,9 +69240,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
69336
69240
  }
69337
69241
  switch (preset) {
69338
69242
  case 'fadeIn':
69339
- return Appear_FadeIn;
69243
+ return Appear_FadeIn$1;
69340
69244
  default:
69341
- return Appear_Grow(params);
69245
+ return Appear_Grow$1(params);
69342
69246
  }
69343
69247
  }
69344
69248
  const registerLinearProgressAnimation = () => {
@@ -72427,6 +72331,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
72427
72331
  _buildMarkAttributeContext() {
72428
72332
  super._buildMarkAttributeContext();
72429
72333
  this._markAttributeContext.valueToPosition = this.valueToPosition.bind(this);
72334
+ this._markAttributeContext.getPoints = this.getPoints.bind(this);
72335
+ this._markAttributeContext.isTransformLevel = this.isTransformLevel.bind(this);
72430
72336
  }
72431
72337
  valueToPosition(category) {
72432
72338
  var _a, _b, _c;
@@ -73628,7 +73534,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
73628
73534
  } : () => 0, this._maxDepth = -1;
73629
73535
  }
73630
73536
  layout(data, config) {
73631
- var _a, _b, _c, _d, _e;
73537
+ var _a;
73632
73538
  const viewBox = "width" in config ? {
73633
73539
  x0: 0,
73634
73540
  x1: config.width,
@@ -73660,18 +73566,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
73660
73566
  children: nodes,
73661
73567
  x: viewBox.x0 + viewBox.width / 2,
73662
73568
  y: viewBox.y0 + viewBox.height / 2
73663
- };
73664
- if (!1 !== (null === (_a = this.options) || void 0 === _a ? void 0 : _a.nodeSort)) {
73665
- const sort = isFunction$1(null === (_b = this.options) || void 0 === _b ? void 0 : _b.nodeSort) ? this.options.nodeKey : CirclePackingLayout.defaultOpionts.nodeSort;
73569
+ },
73570
+ {
73571
+ nodeSort: nodeSort,
73572
+ setRadius: setRadius,
73573
+ padding: padding,
73574
+ includeRoot: includeRoot
73575
+ } = null !== (_a = this.options) && void 0 !== _a ? _a : {};
73576
+ if (!1 !== nodeSort) {
73577
+ const sort = isFunction$1(nodeSort) ? this.options.nodeKey : CirclePackingLayout.defaultOpionts.nodeSort;
73666
73578
  eachBefore([root], node => {
73667
73579
  node.children && node.children.length && node.children.sort(sort);
73668
73580
  });
73669
73581
  }
73670
- if (null === (_c = this.options) || void 0 === _c ? void 0 : _c.setRadius) eachBefore([root], radiusLeaf(this.options.setRadius)), eachAfter([root], packChildrenRandom(this._getPadding, .5, random)), eachBefore([root], translateChild(1, this._maxDepth));else {
73582
+ if (setRadius) eachBefore([root], radiusLeaf(setRadius)), eachAfter([root], packChildrenRandom(this._getPadding, .5, random)), eachBefore([root], translateChild(1, this._maxDepth));else {
73671
73583
  const size = Math.min(viewBox.width, viewBox.height);
73672
- eachBefore([root], radiusLeaf(CirclePackingLayout.defaultOpionts.setRadius)), eachAfter([root], packChildrenRandom(zero, 1, random)), (null === (_d = this.options) || void 0 === _d ? void 0 : _d.padding) && eachAfter([root], packChildrenRandom(this._getPadding, root.radius / size, random)), eachBefore([root], translateChild(size / (2 * root.radius), this._maxDepth));
73584
+ eachBefore([root], radiusLeaf(CirclePackingLayout.defaultOpionts.setRadius)), eachAfter([root], packChildrenRandom(zero, 1, random)), padding && eachAfter([root], packChildrenRandom(this._getPadding, root.radius / size, random)), eachBefore([root], translateChild(size / (2 * root.radius), this._maxDepth));
73673
73585
  }
73674
- return (null === (_e = this.options) || void 0 === _e ? void 0 : _e.includeRoot) ? [root] : nodes;
73586
+ return includeRoot ? [root] : nodes;
73675
73587
  }
73676
73588
  }
73677
73589
  CirclePackingLayout.defaultOpionts = {
@@ -74432,7 +74344,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74432
74344
  width: Math.abs(config.x1 - config.x0),
74433
74345
  height: Math.abs(config.y1 - config.y0)
74434
74346
  };
74435
- "vertical" === this.options.direction ? this._viewBox = {
74347
+ isVertical$1(this.options.direction) ? this._viewBox = {
74436
74348
  x0: viewBox.y0,
74437
74349
  x1: viewBox.y1,
74438
74350
  y0: viewBox.x0,
@@ -74445,7 +74357,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74445
74357
  links = result.links;
74446
74358
  if (this._nodeMap = result.nodeMap, this.computeNodeValues(nodes), this.computeNodeDepths(nodes), ["right", "end", "justify"].includes(this.options.nodeAlign) && this.computeNodeEndDepths(nodes), this._maxDepth <= 1) return null;
74447
74359
  const columns = this.computeNodeBreadths(nodes);
74448
- return this.computeLinkBreadths(nodes), "vertical" === this.options.direction && (nodes.forEach(node => {
74360
+ return this.computeLinkBreadths(nodes), isVertical$1(this.options.direction) && (nodes.forEach(node => {
74449
74361
  const y0 = node.y0,
74450
74362
  y1 = node.y1;
74451
74363
  node.y0 = node.x0, node.y1 = node.x1, node.x0 = y0, node.x1 = y1;
@@ -76761,6 +76673,35 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
76761
76673
  Factory.registerSeries(TreemapSeries.type, TreemapSeries);
76762
76674
  };
76763
76675
 
76676
+ const Appear_Grow = (params) => ({
76677
+ channel: {
76678
+ angle: {
76679
+ from: params.startAngle + Math.PI / 2
76680
+ }
76681
+ }
76682
+ });
76683
+ const Appear_FadeIn = {
76684
+ type: 'fadeIn'
76685
+ };
76686
+ function gaugePointerPresetAnimation(params, preset) {
76687
+ switch (preset) {
76688
+ case 'fadeIn':
76689
+ return Appear_FadeIn;
76690
+ default:
76691
+ return Appear_Grow(params);
76692
+ }
76693
+ }
76694
+ const registerGaugePointerAnimation = () => {
76695
+ Factory.registerAnimation('gaugePointer', (params, preset) => {
76696
+ const animation = gaugePointerPresetAnimation(params, preset);
76697
+ return {
76698
+ appear: animation,
76699
+ enter: animation,
76700
+ disappear: { type: 'fadeOut' }
76701
+ };
76702
+ });
76703
+ };
76704
+
76764
76705
  class GaugePointerSeries extends ProgressLikeSeries {
76765
76706
  constructor() {
76766
76707
  super(...arguments);
@@ -76908,7 +76849,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
76908
76849
  initAnimation() {
76909
76850
  var _a, _b, _c;
76910
76851
  const appearPreset = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.animationAppear) === null || _b === void 0 ? void 0 : _b.preset;
76911
- this._pointerMark.setAnimationConfig(animationConfig((_c = Factory.getAnimationInKey('circularProgress')) === null || _c === void 0 ? void 0 : _c({
76852
+ this._pointerMark.setAnimationConfig(animationConfig((_c = Factory.getAnimationInKey('gaugePointer')) === null || _c === void 0 ? void 0 : _c({
76912
76853
  startAngle: this._startAngle
76913
76854
  }, appearPreset), userAnimationConfig(exports.SeriesMarkNameEnum.pointer, this._spec, this._markAttributeContext)));
76914
76855
  }
@@ -76924,7 +76865,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
76924
76865
  const registerGaugePointerSeries = () => {
76925
76866
  registerPathMark();
76926
76867
  registerRectMark();
76927
- registerCircularProgressAnimation();
76868
+ registerGaugePointerAnimation();
76928
76869
  Factory.registerSeries(GaugePointerSeries.type, GaugePointerSeries);
76929
76870
  };
76930
76871
 
@@ -77068,7 +77009,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
77068
77009
  GaugeSeries.transformerConstructor = GaugeSeriesSpecTransformer;
77069
77010
  const registerGaugeSeries = () => {
77070
77011
  registerProgressArcMark();
77071
- registerCircularProgressAnimation();
77012
+ registerProgressLikeAnimation();
77072
77013
  Factory.registerSeries(GaugeSeries.type, GaugeSeries);
77073
77014
  };
77074
77015