@visactor/vchart 1.0.0-alpha.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1003,6 +1003,10 @@
1003
1003
  return new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
1004
1004
  };
1005
1005
 
1006
+ var isRegExp = function isRegExp(value) {
1007
+ return isType$1(value, "RegExp");
1008
+ };
1009
+
1006
1010
  var isBase64 = function isBase64(value) {
1007
1011
  return new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
1008
1012
  };
@@ -1039,6 +1043,31 @@
1039
1043
  return null != object && hasOwnProperty$1.call(object, key);
1040
1044
  };
1041
1045
 
1046
+ function getRegExpFlags(re) {
1047
+ var flags = "";
1048
+ return re.global && (flags += "g"), re.ignoreCase && (flags += "i"), re.multiline && (flags += "m"), flags;
1049
+ }
1050
+ function clone$1(parent) {
1051
+ var circular = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1052
+ var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1053
+ var prototype = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : void 0;
1054
+ var allParents = [],
1055
+ allChildren = [];
1056
+ return void 0 === circular && (circular = !0), void 0 === depth && (depth = 1 / 0), function _clone(parent, depth) {
1057
+ if (null === parent) return null;
1058
+ if (0 === depth) return parent;
1059
+ var child;
1060
+ if ("object" != _typeof(parent)) return parent;
1061
+ if (isArray$1(parent) ? child = [] : isRegExp(parent) ? (child = new RegExp(parent.source, getRegExpFlags(parent)), parent.lastIndex && (child.lastIndex = parent.lastIndex)) : child = isDate$1(parent) ? new Date(parent.getTime()) : void 0 === prototype ? Object.create(Object.getPrototypeOf(parent)) : Object.create(prototype), circular) {
1062
+ var index = allParents.indexOf(parent);
1063
+ if (-1 !== index) return allChildren[index];
1064
+ allParents.push(parent), allChildren.push(child);
1065
+ }
1066
+ for (var i in parent) child[i] = _clone(parent[i], depth - 1);
1067
+ return child;
1068
+ }(parent, depth);
1069
+ }
1070
+
1042
1071
  function cloneDeep$1(value) {
1043
1072
  var result;
1044
1073
  if (!isValid$1(value) || "object" != _typeof(value)) return value;
@@ -10206,17 +10235,17 @@
10206
10235
  }).inSingletonScope().whenTargetNamed(id);
10207
10236
  }
10208
10237
 
10209
- var __decorate$1A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10238
+ var __decorate$1E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10210
10239
  var d,
10211
10240
  c = arguments.length,
10212
10241
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
10213
10242
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
10214
10243
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10215
10244
  },
10216
- __metadata$Z = undefined && undefined.__metadata || function (k, v) {
10245
+ __metadata$10 = undefined && undefined.__metadata || function (k, v) {
10217
10246
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
10218
10247
  },
10219
- __param$N = undefined && undefined.__param || function (paramIndex, decorator) {
10248
+ __param$O = undefined && undefined.__param || function (paramIndex, decorator) {
10220
10249
  return function (target, key) {
10221
10250
  decorator(target, key, paramIndex);
10222
10251
  };
@@ -10349,8 +10378,8 @@
10349
10378
  }
10350
10379
  }, {
10351
10380
  key: "mapToCanvasPoint",
10352
- value: function mapToCanvasPoint(event) {
10353
- return this._env || this.setEnv("browser"), this.envContribution.mapToCanvasPoint ? this.envContribution.mapToCanvasPoint(event) : null;
10381
+ value: function mapToCanvasPoint(event, domElement) {
10382
+ return this._env || this.setEnv("browser"), this.envContribution.mapToCanvasPoint ? this.envContribution.mapToCanvasPoint(event, domElement) : null;
10354
10383
  }
10355
10384
  }, {
10356
10385
  key: "loadImage",
@@ -10380,7 +10409,7 @@
10380
10409
  }]);
10381
10410
  return DefaultGlobal;
10382
10411
  }();
10383
- DefaultGlobal = __decorate$1A([injectable(), __param$N(0, inject(ContributionProvider)), __param$N(0, named(EnvContribution)), __metadata$Z("design:paramtypes", [Object])], DefaultGlobal);
10412
+ DefaultGlobal = __decorate$1E([injectable(), __param$O(0, inject(ContributionProvider)), __param$O(0, named(EnvContribution)), __metadata$10("design:paramtypes", [Object])], DefaultGlobal);
10384
10413
 
10385
10414
  var circleThreshold = tau$2 - 1e-8;
10386
10415
  var BoundsContext = /*#__PURE__*/function () {
@@ -11062,7 +11091,7 @@
11062
11091
  }, {
11063
11092
  key: "lineEnd",
11064
11093
  value: function lineEnd() {
11065
- if (2 === this._point) _point$1(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined);
11094
+ if (2 === this._point) _point$1(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
11066
11095
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
11067
11096
  }
11068
11097
  }, {
@@ -11072,15 +11101,15 @@
11072
11101
  y = p.y;
11073
11102
  switch (this._point) {
11074
11103
  case 0:
11075
- this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined) : this.context.moveTo(x, y);
11104
+ this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2) : this.context.moveTo(x, y);
11076
11105
  break;
11077
11106
  case 1:
11078
11107
  this._point = 2;
11079
11108
  break;
11080
11109
  default:
11081
- _point$1(this, x, y, !1 !== this._lastDefined && !1 !== p.defined);
11110
+ _point$1(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
11082
11111
  }
11083
- this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._lastDefined = p.defined;
11112
+ this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined;
11084
11113
  }
11085
11114
  }, {
11086
11115
  key: "tryUpdateLength",
@@ -11151,10 +11180,10 @@
11151
11180
  value: function lineEnd() {
11152
11181
  switch (this._point) {
11153
11182
  case 2:
11154
- this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined);
11183
+ this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined2);
11155
11184
  break;
11156
11185
  case 3:
11157
- _point(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined);
11186
+ _point(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined2);
11158
11187
  }
11159
11188
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
11160
11189
  }
@@ -11167,18 +11196,18 @@
11167
11196
  if (x !== this._x1 || y !== this._y1) {
11168
11197
  switch (this._point) {
11169
11198
  case 0:
11170
- this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined) : this.context.moveTo(x, y);
11199
+ this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2) : this.context.moveTo(x, y);
11171
11200
  break;
11172
11201
  case 1:
11173
11202
  this._point = 2;
11174
11203
  break;
11175
11204
  case 2:
11176
- this._point = 3, _point(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined && !1 !== p.defined);
11205
+ this._point = 3, _point(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
11177
11206
  break;
11178
11207
  default:
11179
- _point(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined && !1 !== p.defined);
11208
+ _point(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
11180
11209
  }
11181
- this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._t0 = t1, this._lastDefined = !1 !== p.defined;
11210
+ this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._t0 = t1, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = !1 !== p.defined;
11182
11211
  }
11183
11212
  }
11184
11213
  }, {
@@ -11944,7 +11973,7 @@
11944
11973
  opacity: 1
11945
11974
  });
11946
11975
 
11947
- var __decorate$1z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11976
+ var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11948
11977
  var d,
11949
11978
  c = arguments.length,
11950
11979
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12078,9 +12107,9 @@
12078
12107
  }]);
12079
12108
  return ATextMeasure;
12080
12109
  }();
12081
- ATextMeasure = __decorate$1z([injectable()], ATextMeasure);
12110
+ ATextMeasure = __decorate$1D([injectable()], ATextMeasure);
12082
12111
 
12083
- var __decorate$1y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12112
+ var __decorate$1C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12084
12113
  var d,
12085
12114
  c = arguments.length,
12086
12115
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12097,7 +12126,7 @@
12097
12126
  }
12098
12127
  return _createClass(DefaultTextMeasureContribution);
12099
12128
  }(ATextMeasure);
12100
- DefaultTextMeasureContribution = __decorate$1y([injectable()], DefaultTextMeasureContribution);
12129
+ DefaultTextMeasureContribution = __decorate$1C([injectable()], DefaultTextMeasureContribution);
12101
12130
 
12102
12131
  var container = new Container();
12103
12132
 
@@ -12471,17 +12500,17 @@
12471
12500
  return containPath(commands, lineWidth, !0, x, y);
12472
12501
  }
12473
12502
 
12474
- var __decorate$1x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12503
+ var __decorate$1B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12475
12504
  var d,
12476
12505
  c = arguments.length,
12477
12506
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12478
12507
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
12479
12508
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12480
12509
  },
12481
- __metadata$Y = undefined && undefined.__metadata || function (k, v) {
12510
+ __metadata$$ = undefined && undefined.__metadata || function (k, v) {
12482
12511
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12483
12512
  },
12484
- __param$M = undefined && undefined.__param || function (paramIndex, decorator) {
12513
+ __param$N = undefined && undefined.__param || function (paramIndex, decorator) {
12485
12514
  return function (target, key) {
12486
12515
  decorator(target, key, paramIndex);
12487
12516
  };
@@ -12552,7 +12581,7 @@
12552
12581
  }]);
12553
12582
  return DefaultGraphicUtil;
12554
12583
  }();
12555
- DefaultGraphicUtil = __decorate$1x([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(TextMeasureContribution)), __param$M(1, inject(Global)), __metadata$Y("design:paramtypes", [Object, Object])], DefaultGraphicUtil);
12584
+ DefaultGraphicUtil = __decorate$1B([injectable(), __param$N(0, inject(ContributionProvider)), __param$N(0, named(TextMeasureContribution)), __param$N(1, inject(Global)), __metadata$$("design:paramtypes", [Object, Object])], DefaultGraphicUtil);
12556
12585
  var TransformMode;
12557
12586
  !function (TransformMode) {
12558
12587
  TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
@@ -12613,7 +12642,7 @@
12613
12642
  }]);
12614
12643
  return DefaultTransformUtil;
12615
12644
  }();
12616
- DefaultTransformUtil = __decorate$1x([injectable(), __metadata$Y("design:paramtypes", [])], DefaultTransformUtil);
12645
+ DefaultTransformUtil = __decorate$1B([injectable(), __metadata$$("design:paramtypes", [])], DefaultTransformUtil);
12617
12646
 
12618
12647
  var defaultThemeObj = {
12619
12648
  arc: DefaultArcAttribute,
@@ -12653,9 +12682,18 @@
12653
12682
  };
12654
12683
  }
12655
12684
  function combineTheme(out, t) {
12656
- t && Object.keys(t).forEach(function (k) {
12685
+ var rewrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
12686
+ t && (rewrite ? Object.keys(t).forEach(function (k) {
12657
12687
  out[k] ? Object.assign(out[k], t[k]) : out[k] = t[k];
12658
- });
12688
+ }) : Object.keys(t).forEach(function (k) {
12689
+ if (out[k]) {
12690
+ var outItem = out[k],
12691
+ tItem = t[k];
12692
+ Object.keys(t[k]).forEach(function (kItem) {
12693
+ void 0 === outItem[kItem] && (outItem[kItem] = tItem[kItem]);
12694
+ });
12695
+ } else out[k] = t[k];
12696
+ }));
12659
12697
  }
12660
12698
  var staticThemePools = new Array(60).fill(0).map(function () {
12661
12699
  return newThemeObj();
@@ -12683,11 +12721,12 @@
12683
12721
  }, {
12684
12722
  key: "applyTheme",
12685
12723
  value: function applyTheme(group, pt) {
12724
+ var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
12686
12725
  if (this.dirty) {
12687
12726
  var parentGroup = this.getParentWithTheme(group);
12688
12727
  if (parentGroup) {
12689
12728
  var parentTheme = parentGroup.theme;
12690
- parentTheme.dirty && parentTheme.applyTheme(parentGroup, pt), combineTheme(pt, parentTheme.userTheme);
12729
+ (parentTheme.dirty || force) && parentTheme.applyTheme(parentGroup, pt, !0), this.userTheme ? combineTheme(this.userTheme, parentTheme.userTheme, !1) : this.userTheme = clone$1(parentTheme.userTheme), combineTheme(pt, parentTheme.userTheme);
12691
12730
  }
12692
12731
  this.userTheme ? this.doCombine(pt) : (parentGroup ? this.combinedTheme = parentGroup.theme.combinedTheme : (this.combinedTheme = this._defaultTheme, console.warn("未知错误,走到不应该走的区域里")), this.dirty = !1);
12693
12732
  }
@@ -13919,7 +13958,7 @@
13919
13958
  key: "mapToCanvasPoint",
13920
13959
  value: function mapToCanvasPoint(nativeEvent) {
13921
13960
  var _a;
13922
- var point = null === (_a = this.globalObj) || void 0 === _a ? void 0 : _a.mapToCanvasPoint(nativeEvent);
13961
+ var point = null === (_a = this.globalObj) || void 0 === _a ? void 0 : _a.mapToCanvasPoint(nativeEvent, this.domElement);
13923
13962
  if (point) return point;
13924
13963
  var x = nativeEvent.clientX,
13925
13964
  y = nativeEvent.clientY,
@@ -16663,12 +16702,28 @@
16663
16702
  }();
16664
16703
  ColorStore.store255 = {}, ColorStore.store1 = {};
16665
16704
 
16705
+ function colorArrayToString(color) {
16706
+ var alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
16707
+ return Array.isArray(color) ? alphaChannel ? "rgb(".concat(Math.round(color[0]), ",").concat(Math.round(color[1]), ",").concat(Math.round(color[2]), ",").concat(color[3].toFixed(2), ")") : "rgb(".concat(Math.round(color[0]), ",").concat(Math.round(color[1]), ",").concat(Math.round(color[2]), ")") : color;
16708
+ }
16666
16709
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
16710
+ if (!from || !to) return from && colorArrayToString(from) || to && colorArrayToString(to) || !1;
16667
16711
  var fromArray,
16668
16712
  toArray,
16669
16713
  fromGradient = !1,
16670
16714
  toGradient = !1;
16671
- if (Array.isArray(from) ? fromArray = from : "string" == typeof from ? fromArray = ColorStore.Get(from, ColorType.Color255) : fromGradient = !0, Array.isArray(to) ? toArray = to : "string" == typeof to ? toArray = ColorStore.Get(to, ColorType.Color255) : toGradient = !0, fromGradient !== toGradient) return !1;
16715
+ if (Array.isArray(from) ? fromArray = from : "string" == typeof from ? fromArray = ColorStore.Get(from, ColorType.Color255) : fromGradient = !0, Array.isArray(to) ? toArray = to : "string" == typeof to ? toArray = ColorStore.Get(to, ColorType.Color255) : toGradient = !0, fromGradient !== toGradient) {
16716
+ var gradient = fromGradient ? from : to,
16717
+ pure = fromGradient ? to : from,
16718
+ gradientFromPure = Object.assign(Object.assign({}, gradient), {
16719
+ stops: gradient.stops.map(function (v) {
16720
+ return Object.assign(Object.assign({}, v), {
16721
+ color: colorArrayToString(pure)
16722
+ });
16723
+ })
16724
+ });
16725
+ return fromGradient ? interpolateColor(gradient, gradientFromPure, ratio, alphaChannel, cb) : interpolateColor(gradientFromPure, gradient, ratio, alphaChannel, cb);
16726
+ }
16672
16727
  if (fromGradient) {
16673
16728
  if (from.gradient === to.gradient) {
16674
16729
  var fc = from,
@@ -16683,8 +16738,7 @@
16683
16738
  return !1;
16684
16739
  }
16685
16740
  cb && cb(fromArray, toArray);
16686
- var result = interpolatePureColorArray(fromArray, toArray, ratio);
16687
- return alphaChannel ? "rgb(".concat(Math.round(result[0]), ",").concat(Math.round(result[1]), ",").concat(Math.round(result[2]), ",").concat(result[3].toFixed(2), ")") : "rgb(".concat(Math.round(result[0]), ",").concat(Math.round(result[1]), ",").concat(Math.round(result[2]), ")");
16741
+ return colorArrayToString(interpolatePureColorArray(fromArray, toArray, ratio), alphaChannel);
16688
16742
  }
16689
16743
  function interpolateGradientLinearColor(fc, tc, ratio) {
16690
16744
  var fStops = fc.stops,
@@ -18357,17 +18411,17 @@
18357
18411
  return Layer;
18358
18412
  }(Group$1);
18359
18413
 
18360
- var __decorate$1w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18414
+ var __decorate$1A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18361
18415
  var d,
18362
18416
  c = arguments.length,
18363
18417
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
18364
18418
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
18365
18419
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18366
18420
  },
18367
- __metadata$X = undefined && undefined.__metadata || function (k, v) {
18421
+ __metadata$_ = undefined && undefined.__metadata || function (k, v) {
18368
18422
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
18369
18423
  },
18370
- __param$L = undefined && undefined.__param || function (paramIndex, decorator) {
18424
+ __param$M = undefined && undefined.__param || function (paramIndex, decorator) {
18371
18425
  return function (target, key) {
18372
18426
  decorator(target, key, paramIndex);
18373
18427
  };
@@ -18413,19 +18467,19 @@
18413
18467
  }]);
18414
18468
  return DefaultLayerService;
18415
18469
  }();
18416
- DefaultLayerService = __decorate$1w([injectable(), __param$L(0, inject(Global)), __metadata$X("design:paramtypes", [Object])], DefaultLayerService);
18470
+ DefaultLayerService = __decorate$1A([injectable(), __param$M(0, inject(Global)), __metadata$_("design:paramtypes", [Object])], DefaultLayerService);
18417
18471
 
18418
- var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18472
+ var __decorate$1z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18419
18473
  var d,
18420
18474
  c = arguments.length,
18421
18475
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
18422
18476
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
18423
18477
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18424
18478
  },
18425
- __metadata$W = undefined && undefined.__metadata || function (k, v) {
18479
+ __metadata$Z = undefined && undefined.__metadata || function (k, v) {
18426
18480
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
18427
18481
  },
18428
- __param$K = undefined && undefined.__param || function (paramIndex, decorator) {
18482
+ __param$L = undefined && undefined.__param || function (paramIndex, decorator) {
18429
18483
  return function (target, key) {
18430
18484
  decorator(target, key, paramIndex);
18431
18485
  };
@@ -18565,7 +18619,7 @@
18565
18619
  }]);
18566
18620
  return DefaultWindow;
18567
18621
  }();
18568
- __decorate$1v([postConstruct(), __metadata$W("design:type", Function), __metadata$W("design:paramtypes", []), __metadata$W("design:returntype", void 0)], DefaultWindow.prototype, "postInit", null), DefaultWindow = __decorate$1v([injectable(), __param$K(0, inject(Global)), __metadata$W("design:paramtypes", [Object])], DefaultWindow);
18622
+ __decorate$1z([postConstruct(), __metadata$Z("design:type", Function), __metadata$Z("design:paramtypes", []), __metadata$Z("design:returntype", void 0)], DefaultWindow.prototype, "postInit", null), DefaultWindow = __decorate$1z([injectable(), __param$L(0, inject(Global)), __metadata$Z("design:paramtypes", [Object])], DefaultWindow);
18569
18623
 
18570
18624
  var TransformUtil = Symbol["for"]("TransformUtil");
18571
18625
  var GraphicUtil = Symbol["for"]("GraphicUtil");
@@ -18901,35 +18955,73 @@
18901
18955
  if (!c || !0 === c) return "black";
18902
18956
  var result, color;
18903
18957
  if (isArray$1(c)) for (var i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
18904
- return "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params.AABBBounds) : "conical" === color.gradient ? result = createConicGradient(context, color, params.AABBBounds) : "radial" === color.gradient && (result = createRadialGradient(context, color, params.AABBBounds)), result || "orange");
18958
+ return "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
18905
18959
  }
18906
- function createLinearGradient(context, color, bounds, offsetX, offsetY) {
18960
+ function createLinearGradient(context, color, params) {
18961
+ var offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
18962
+ var offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
18963
+ var bounds = params.AABBBounds;
18964
+ if (!bounds) return;
18907
18965
  var w = bounds.x2 - bounds.x1,
18908
18966
  h = bounds.y2 - bounds.y1,
18909
- x = bounds.x1,
18910
- y = bounds.y1,
18911
- canvasGradient = context.createLinearGradient(x + (color.x0 || 0) * w, y + (color.y0 || 0) * h, x + (color.x1 || 1) * w, y + (color.y1 || 0) * h);
18967
+ x = bounds.x1 - offsetX,
18968
+ y = bounds.y1 - offsetY;
18969
+ if (params.attribute) {
18970
+ var _params$attribute = params.attribute,
18971
+ _params$attribute$sca = _params$attribute.scaleX,
18972
+ scaleX = _params$attribute$sca === void 0 ? 1 : _params$attribute$sca,
18973
+ _params$attribute$sca2 = _params$attribute.scaleY,
18974
+ scaleY = _params$attribute$sca2 === void 0 ? 1 : _params$attribute$sca2;
18975
+ if (scaleX * scaleY == 0) return;
18976
+ w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY;
18977
+ }
18978
+ var canvasGradient = context.createLinearGradient(x + (color.x0 || 0) * w, y + (color.y0 || 0) * h, x + (color.x1 || 1) * w, y + (color.y1 || 0) * h);
18912
18979
  return color.stops.forEach(function (stop) {
18913
18980
  canvasGradient.addColorStop(stop.offset, stop.color);
18914
18981
  }), canvasGradient;
18915
18982
  }
18916
- function createRadialGradient(context, color, bounds, offsetX, offsetY) {
18983
+ function createRadialGradient(context, color, params) {
18984
+ var offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
18985
+ var offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
18986
+ var bounds = params.AABBBounds;
18987
+ if (!bounds) return;
18917
18988
  var w = bounds.x2 - bounds.x1,
18918
18989
  h = bounds.y2 - bounds.y1,
18919
- x = bounds.x1,
18920
- y = bounds.y1,
18921
- canvasGradient = context.createRadialGradient(x + (color.x0 || .5) * w, y + (color.y0 || .5) * h, Math.max(w, h) * (color.r0 || 0), x + (color.x1 || .5) * w, y + (color.y1 || .5) * h, Math.max(w, h) * (color.r1 || .5));
18990
+ x = bounds.x1 - offsetX,
18991
+ y = bounds.y1 - offsetY;
18992
+ if (params.attribute) {
18993
+ var _params$attribute2 = params.attribute,
18994
+ _params$attribute2$sc = _params$attribute2.scaleX,
18995
+ scaleX = _params$attribute2$sc === void 0 ? 1 : _params$attribute2$sc,
18996
+ _params$attribute2$sc2 = _params$attribute2.scaleY,
18997
+ scaleY = _params$attribute2$sc2 === void 0 ? 1 : _params$attribute2$sc2;
18998
+ if (scaleX * scaleY == 0) return;
18999
+ x /= scaleX, y /= scaleY, w /= scaleX, h /= scaleY;
19000
+ }
19001
+ var canvasGradient = context.createRadialGradient(x + (color.x0 || .5) * w, y + (color.y0 || .5) * h, Math.max(w, h) * (color.r0 || 0), x + (color.x1 || .5) * w, y + (color.y1 || .5) * h, Math.max(w, h) * (color.r1 || .5));
18922
19002
  return color.stops.forEach(function (stop) {
18923
19003
  canvasGradient.addColorStop(stop.offset, stop.color);
18924
19004
  }), canvasGradient;
18925
19005
  }
18926
- function createConicGradient(context, color, bounds, offsetX, offsetY) {
19006
+ function createConicGradient(context, color, params) {
19007
+ var offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
19008
+ var offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
19009
+ var bounds = params.AABBBounds;
18927
19010
  if (!bounds) return;
18928
19011
  var w = bounds.x2 - bounds.x1,
18929
19012
  h = bounds.y2 - bounds.y1,
18930
- x = bounds.x1 || 0,
18931
- y = bounds.y1 || 0,
18932
- canvasGradient = context.createConicGradient(x + (color.x || 0) * w, y + (color.y || 0) * h, color.startAngle, color.endAngle);
19013
+ x = bounds.x1 - offsetX,
19014
+ y = bounds.y1 - offsetY;
19015
+ if (params.attribute) {
19016
+ var _params$attribute3 = params.attribute,
19017
+ _params$attribute3$sc = _params$attribute3.scaleX,
19018
+ scaleX = _params$attribute3$sc === void 0 ? 1 : _params$attribute3$sc,
19019
+ _params$attribute3$sc2 = _params$attribute3.scaleY,
19020
+ scaleY = _params$attribute3$sc2 === void 0 ? 1 : _params$attribute3$sc2;
19021
+ if (scaleX * scaleY == 0) return;
19022
+ w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY;
19023
+ }
19024
+ var canvasGradient = context.createConicGradient(x + (color.x || 0) * w, y + (color.y || 0) * h, color.startAngle, color.endAngle);
18933
19025
  return color.stops.forEach(function (stop) {
18934
19026
  canvasGradient.addColorStop(stop.offset, stop.color);
18935
19027
  }), canvasGradient.GetPattern(w + x, h + y, undefined);
@@ -21904,7 +21996,7 @@
21904
21996
  return Pyramid3d;
21905
21997
  }(Polygon);
21906
21998
 
21907
- var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21999
+ var __decorate$1y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21908
22000
  var d,
21909
22001
  c = arguments.length,
21910
22002
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21934,9 +22026,9 @@
21934
22026
  }]);
21935
22027
  return DefaultOuterBorderBoundsContribution;
21936
22028
  }();
21937
- DefaultOuterBorderBoundsContribution = __decorate$1u([injectable()], DefaultOuterBorderBoundsContribution);
22029
+ DefaultOuterBorderBoundsContribution = __decorate$1y([injectable()], DefaultOuterBorderBoundsContribution);
21938
22030
 
21939
- var __decorate$1t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22031
+ var __decorate$1x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21940
22032
  var d,
21941
22033
  c = arguments.length,
21942
22034
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21953,9 +22045,9 @@
21953
22045
  }
21954
22046
  return _createClass(DefaultRectOuterBorderBoundsContribution);
21955
22047
  }(DefaultOuterBorderBoundsContribution);
21956
- DefaultRectOuterBorderBoundsContribution = __decorate$1t([injectable()], DefaultRectOuterBorderBoundsContribution);
22048
+ DefaultRectOuterBorderBoundsContribution = __decorate$1x([injectable()], DefaultRectOuterBorderBoundsContribution);
21957
22049
 
21958
- var __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22050
+ var __decorate$1w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21959
22051
  var d,
21960
22052
  c = arguments.length,
21961
22053
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21991,9 +22083,9 @@
21991
22083
  }]);
21992
22084
  return DefaultSymbolOuterBorderBoundsContribution;
21993
22085
  }(DefaultOuterBorderBoundsContribution);
21994
- DefaultSymbolOuterBorderBoundsContribution = __decorate$1s([injectable()], DefaultSymbolOuterBorderBoundsContribution);
22086
+ DefaultSymbolOuterBorderBoundsContribution = __decorate$1w([injectable()], DefaultSymbolOuterBorderBoundsContribution);
21995
22087
 
21996
- var __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22088
+ var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21997
22089
  var d,
21998
22090
  c = arguments.length,
21999
22091
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22010,9 +22102,9 @@
22010
22102
  }
22011
22103
  return _createClass(DefaultCircleOuterBorderBoundsContribution);
22012
22104
  }(DefaultOuterBorderBoundsContribution);
22013
- DefaultCircleOuterBorderBoundsContribution = __decorate$1r([injectable()], DefaultCircleOuterBorderBoundsContribution);
22105
+ DefaultCircleOuterBorderBoundsContribution = __decorate$1v([injectable()], DefaultCircleOuterBorderBoundsContribution);
22014
22106
 
22015
- var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22107
+ var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22016
22108
  var d,
22017
22109
  c = arguments.length,
22018
22110
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22029,9 +22121,9 @@
22029
22121
  }
22030
22122
  return _createClass(DefaultArcOuterBorderBoundsContribution);
22031
22123
  }(DefaultOuterBorderBoundsContribution);
22032
- DefaultArcOuterBorderBoundsContribution = __decorate$1q([injectable()], DefaultArcOuterBorderBoundsContribution);
22124
+ DefaultArcOuterBorderBoundsContribution = __decorate$1u([injectable()], DefaultArcOuterBorderBoundsContribution);
22033
22125
 
22034
- var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22126
+ var __decorate$1t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22035
22127
  var d,
22036
22128
  c = arguments.length,
22037
22129
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -22048,7 +22140,7 @@
22048
22140
  }
22049
22141
  return _createClass(DefaultPathOuterBorderBoundsContribution);
22050
22142
  }(DefaultOuterBorderBoundsContribution);
22051
- DefaultPathOuterBorderBoundsContribution = __decorate$1p([injectable()], DefaultPathOuterBorderBoundsContribution);
22143
+ DefaultPathOuterBorderBoundsContribution = __decorate$1t([injectable()], DefaultPathOuterBorderBoundsContribution);
22052
22144
 
22053
22145
  function createMat4() {
22054
22146
  return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
@@ -22136,17 +22228,17 @@
22136
22228
  var matrixAllocate = new DefaultMatrixAllocate();
22137
22229
  var mat4Allocate = new DefaultMat4Allocate();
22138
22230
 
22139
- var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22231
+ var __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22140
22232
  var d,
22141
22233
  c = arguments.length,
22142
22234
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
22143
22235
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
22144
22236
  return c > 3 && r && Object.defineProperty(target, key, r), r;
22145
22237
  },
22146
- __metadata$V = undefined && undefined.__metadata || function (k, v) {
22238
+ __metadata$Y = undefined && undefined.__metadata || function (k, v) {
22147
22239
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
22148
22240
  },
22149
- __param$J = undefined && undefined.__param || function (paramIndex, decorator) {
22241
+ __param$K = undefined && undefined.__param || function (paramIndex, decorator) {
22150
22242
  return function (target, key) {
22151
22243
  decorator(target, key, paramIndex);
22152
22244
  };
@@ -22727,7 +22819,7 @@
22727
22819
  }]);
22728
22820
  return DefaultGraphicService;
22729
22821
  }();
22730
- DefaultGraphicService = __decorate$1o([injectable(), __param$J(0, inject(GraphicCreator)), __param$J(1, inject(ContributionProvider)), __param$J(1, named(RectBoundsContribution)), __param$J(2, inject(ContributionProvider)), __param$J(2, named(SymbolBoundsContribution)), __param$J(3, inject(ContributionProvider)), __param$J(3, named(CircleBoundsContribution)), __param$J(4, inject(ContributionProvider)), __param$J(4, named(ArcBoundsContribution)), __param$J(5, inject(ContributionProvider)), __param$J(5, named(PathBoundsContribution)), __metadata$V("design:paramtypes", [Object, Object, Object, Object, Object, Object])], DefaultGraphicService);
22822
+ DefaultGraphicService = __decorate$1s([injectable(), __param$K(0, inject(GraphicCreator)), __param$K(1, inject(ContributionProvider)), __param$K(1, named(RectBoundsContribution)), __param$K(2, inject(ContributionProvider)), __param$K(2, named(SymbolBoundsContribution)), __param$K(3, inject(ContributionProvider)), __param$K(3, named(CircleBoundsContribution)), __param$K(4, inject(ContributionProvider)), __param$K(4, named(ArcBoundsContribution)), __param$K(5, inject(ContributionProvider)), __param$K(5, named(PathBoundsContribution)), __metadata$Y("design:paramtypes", [Object, Object, Object, Object, Object, Object])], DefaultGraphicService);
22731
22823
 
22732
22824
  var ShadowRoot = /*#__PURE__*/function (_Group) {
22733
22825
  _inherits(ShadowRoot, _Group);
@@ -23039,7 +23131,7 @@
23039
23131
  }();
23040
23132
  var canvasAllocate = new DefaultCanvasAllocate();
23041
23133
 
23042
- var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23134
+ var __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23043
23135
  var d,
23044
23136
  c = arguments.length,
23045
23137
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -23079,7 +23171,7 @@
23079
23171
  }]);
23080
23172
  return DefaultBaseBackgroundRenderContribution;
23081
23173
  }();
23082
- DefaultBaseBackgroundRenderContribution = __decorate$1n([injectable()], DefaultBaseBackgroundRenderContribution);
23174
+ DefaultBaseBackgroundRenderContribution = __decorate$1r([injectable()], DefaultBaseBackgroundRenderContribution);
23083
23175
  var DefaultBaseTextureRenderContribution = /*#__PURE__*/function () {
23084
23176
  function DefaultBaseTextureRenderContribution() {
23085
23177
  _classCallCheck(this, DefaultBaseTextureRenderContribution);
@@ -23220,9 +23312,9 @@
23220
23312
  }]);
23221
23313
  return DefaultBaseTextureRenderContribution;
23222
23314
  }();
23223
- DefaultBaseTextureRenderContribution = __decorate$1n([injectable()], DefaultBaseTextureRenderContribution);
23315
+ DefaultBaseTextureRenderContribution = __decorate$1r([injectable()], DefaultBaseTextureRenderContribution);
23224
23316
 
23225
- var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23317
+ var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23226
23318
  var d,
23227
23319
  c = arguments.length,
23228
23320
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -23291,7 +23383,7 @@
23291
23383
  }]);
23292
23384
  return DefaultArcRenderContribution;
23293
23385
  }();
23294
- DefaultArcRenderContribution = __decorate$1m([injectable()], DefaultArcRenderContribution);
23386
+ DefaultArcRenderContribution = __decorate$1q([injectable()], DefaultArcRenderContribution);
23295
23387
  var DefaultArcBackgroundRenderContribution = /*#__PURE__*/function (_DefaultBaseBackgroun) {
23296
23388
  _inherits(DefaultArcBackgroundRenderContribution, _DefaultBaseBackgroun);
23297
23389
  var _super = _createSuper(DefaultArcBackgroundRenderContribution);
@@ -23303,7 +23395,7 @@
23303
23395
  }
23304
23396
  return _createClass(DefaultArcBackgroundRenderContribution);
23305
23397
  }(DefaultBaseBackgroundRenderContribution);
23306
- DefaultArcBackgroundRenderContribution = __decorate$1m([injectable()], DefaultArcBackgroundRenderContribution);
23398
+ DefaultArcBackgroundRenderContribution = __decorate$1q([injectable()], DefaultArcBackgroundRenderContribution);
23307
23399
  var DefaultArcTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
23308
23400
  _inherits(DefaultArcTextureRenderContribution, _DefaultBaseTextureRe);
23309
23401
  var _super2 = _createSuper(DefaultArcTextureRenderContribution);
@@ -23315,19 +23407,19 @@
23315
23407
  }
23316
23408
  return _createClass(DefaultArcTextureRenderContribution);
23317
23409
  }(DefaultBaseTextureRenderContribution);
23318
- DefaultArcTextureRenderContribution = __decorate$1m([injectable()], DefaultArcTextureRenderContribution);
23410
+ DefaultArcTextureRenderContribution = __decorate$1q([injectable()], DefaultArcTextureRenderContribution);
23319
23411
 
23320
- var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23412
+ var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23321
23413
  var d,
23322
23414
  c = arguments.length,
23323
23415
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
23324
23416
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
23325
23417
  return c > 3 && r && Object.defineProperty(target, key, r), r;
23326
23418
  },
23327
- __metadata$U = undefined && undefined.__metadata || function (k, v) {
23419
+ __metadata$X = undefined && undefined.__metadata || function (k, v) {
23328
23420
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
23329
23421
  },
23330
- __param$I = undefined && undefined.__param || function (paramIndex, decorator) {
23422
+ __param$J = undefined && undefined.__param || function (paramIndex, decorator) {
23331
23423
  return function (target, key) {
23332
23424
  decorator(target, key, paramIndex);
23333
23425
  };
@@ -23509,9 +23601,9 @@
23509
23601
  }]);
23510
23602
  return DefaultCanvasArcRender;
23511
23603
  }();
23512
- DefaultCanvasArcRender = __decorate$1l([injectable(), __param$I(0, inject(ContributionProvider)), __param$I(0, named(ArcRenderContribution)), __metadata$U("design:paramtypes", [Object])], DefaultCanvasArcRender);
23604
+ DefaultCanvasArcRender = __decorate$1p([injectable(), __param$J(0, inject(ContributionProvider)), __param$J(0, named(ArcRenderContribution)), __metadata$X("design:paramtypes", [Object])], DefaultCanvasArcRender);
23513
23605
 
23514
- var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23606
+ var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23515
23607
  var d,
23516
23608
  c = arguments.length,
23517
23609
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -23560,7 +23652,7 @@
23560
23652
  }]);
23561
23653
  return DefaultCircleRenderContribution;
23562
23654
  }();
23563
- DefaultCircleRenderContribution = __decorate$1k([injectable()], DefaultCircleRenderContribution);
23655
+ DefaultCircleRenderContribution = __decorate$1o([injectable()], DefaultCircleRenderContribution);
23564
23656
  var DefaultCircleBackgroundRenderContribution = /*#__PURE__*/function (_DefaultBaseBackgroun) {
23565
23657
  _inherits(DefaultCircleBackgroundRenderContribution, _DefaultBaseBackgroun);
23566
23658
  var _super = _createSuper(DefaultCircleBackgroundRenderContribution);
@@ -23572,7 +23664,7 @@
23572
23664
  }
23573
23665
  return _createClass(DefaultCircleBackgroundRenderContribution);
23574
23666
  }(DefaultBaseBackgroundRenderContribution);
23575
- DefaultCircleBackgroundRenderContribution = __decorate$1k([injectable()], DefaultCircleBackgroundRenderContribution);
23667
+ DefaultCircleBackgroundRenderContribution = __decorate$1o([injectable()], DefaultCircleBackgroundRenderContribution);
23576
23668
  var DefaultCircleTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
23577
23669
  _inherits(DefaultCircleTextureRenderContribution, _DefaultBaseTextureRe);
23578
23670
  var _super2 = _createSuper(DefaultCircleTextureRenderContribution);
@@ -23584,19 +23676,19 @@
23584
23676
  }
23585
23677
  return _createClass(DefaultCircleTextureRenderContribution);
23586
23678
  }(DefaultBaseTextureRenderContribution);
23587
- DefaultCircleTextureRenderContribution = __decorate$1k([injectable()], DefaultCircleTextureRenderContribution);
23679
+ DefaultCircleTextureRenderContribution = __decorate$1o([injectable()], DefaultCircleTextureRenderContribution);
23588
23680
 
23589
- var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23681
+ var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23590
23682
  var d,
23591
23683
  c = arguments.length,
23592
23684
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
23593
23685
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
23594
23686
  return c > 3 && r && Object.defineProperty(target, key, r), r;
23595
23687
  },
23596
- __metadata$T = undefined && undefined.__metadata || function (k, v) {
23688
+ __metadata$W = undefined && undefined.__metadata || function (k, v) {
23597
23689
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
23598
23690
  },
23599
- __param$H = undefined && undefined.__param || function (paramIndex, decorator) {
23691
+ __param$I = undefined && undefined.__param || function (paramIndex, decorator) {
23600
23692
  return function (target, key) {
23601
23693
  decorator(target, key, paramIndex);
23602
23694
  };
@@ -23665,9 +23757,9 @@
23665
23757
  }]);
23666
23758
  return DefaultCanvasCircleRender;
23667
23759
  }();
23668
- DefaultCanvasCircleRender = __decorate$1j([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(CircleRenderContribution)), __metadata$T("design:paramtypes", [Object])], DefaultCanvasCircleRender);
23760
+ DefaultCanvasCircleRender = __decorate$1n([injectable(), __param$I(0, inject(ContributionProvider)), __param$I(0, named(CircleRenderContribution)), __metadata$W("design:paramtypes", [Object])], DefaultCanvasCircleRender);
23669
23761
 
23670
- var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23762
+ var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23671
23763
  var d,
23672
23764
  c = arguments.length,
23673
23765
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -23767,7 +23859,7 @@
23767
23859
  }]);
23768
23860
  return BaseRender;
23769
23861
  }();
23770
- BaseRender = __decorate$1i([injectable()], BaseRender);
23862
+ BaseRender = __decorate$1m([injectable()], BaseRender);
23771
23863
 
23772
23864
  function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
23773
23865
  var _ref = params || {},
@@ -23848,7 +23940,7 @@
23848
23940
  }
23849
23941
  }
23850
23942
 
23851
- var __decorate$1h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23943
+ var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23852
23944
  var d,
23853
23945
  c = arguments.length,
23854
23946
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -23971,9 +24063,9 @@
23971
24063
  }]);
23972
24064
  return DefaultCanvasLineRender;
23973
24065
  }(BaseRender);
23974
- DefaultCanvasLineRender = __decorate$1h([injectable()], DefaultCanvasLineRender);
24066
+ DefaultCanvasLineRender = __decorate$1l([injectable()], DefaultCanvasLineRender);
23975
24067
 
23976
- var __decorate$1g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24068
+ var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
23977
24069
  var d,
23978
24070
  c = arguments.length,
23979
24071
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -23992,7 +24084,7 @@
23992
24084
  }
23993
24085
  return _createClass(DefaultAreaBackgroundRenderContribution);
23994
24086
  }(DefaultBaseBackgroundRenderContribution);
23995
- DefaultAreaBackgroundRenderContribution = __decorate$1g([injectable()], DefaultAreaBackgroundRenderContribution);
24087
+ DefaultAreaBackgroundRenderContribution = __decorate$1k([injectable()], DefaultAreaBackgroundRenderContribution);
23996
24088
  var DefaultAreaTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
23997
24089
  _inherits(DefaultAreaTextureRenderContribution, _DefaultBaseTextureRe);
23998
24090
  var _super2 = _createSuper(DefaultAreaTextureRenderContribution);
@@ -24050,9 +24142,9 @@
24050
24142
  }]);
24051
24143
  return DefaultAreaTextureRenderContribution;
24052
24144
  }(DefaultBaseTextureRenderContribution);
24053
- DefaultAreaTextureRenderContribution = __decorate$1g([injectable()], DefaultAreaTextureRenderContribution);
24145
+ DefaultAreaTextureRenderContribution = __decorate$1k([injectable()], DefaultAreaTextureRenderContribution);
24054
24146
 
24055
- var __decorate$1f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24147
+ var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24056
24148
  var d,
24057
24149
  c = arguments.length,
24058
24150
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24084,9 +24176,9 @@
24084
24176
  }]);
24085
24177
  return DefaultGroupBackgroundRenderContribution;
24086
24178
  }(DefaultBaseBackgroundRenderContribution);
24087
- DefaultGroupBackgroundRenderContribution = __decorate$1f([injectable()], DefaultGroupBackgroundRenderContribution);
24179
+ DefaultGroupBackgroundRenderContribution = __decorate$1j([injectable()], DefaultGroupBackgroundRenderContribution);
24088
24180
 
24089
- var __decorate$1e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24181
+ var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24090
24182
  var d,
24091
24183
  c = arguments.length,
24092
24184
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24133,7 +24225,7 @@
24133
24225
  }]);
24134
24226
  return DefaultImageBackgroundRenderContribution;
24135
24227
  }(DefaultBaseBackgroundRenderContribution);
24136
- DefaultImageBackgroundRenderContribution = __decorate$1e([injectable()], DefaultImageBackgroundRenderContribution);
24228
+ DefaultImageBackgroundRenderContribution = __decorate$1i([injectable()], DefaultImageBackgroundRenderContribution);
24137
24229
 
24138
24230
  function createRectPath(path, x, y, width, height, rectBorderRadius) {
24139
24231
  var borderRadius;
@@ -24192,7 +24284,7 @@
24192
24284
  return path.closePath(), path;
24193
24285
  }
24194
24286
 
24195
- var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24287
+ var __decorate$1h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24196
24288
  var d,
24197
24289
  c = arguments.length,
24198
24290
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24251,7 +24343,7 @@
24251
24343
  }]);
24252
24344
  return DefaultRectRenderContribution;
24253
24345
  }();
24254
- DefaultRectRenderContribution = __decorate$1d([injectable()], DefaultRectRenderContribution);
24346
+ DefaultRectRenderContribution = __decorate$1h([injectable()], DefaultRectRenderContribution);
24255
24347
  var DefaultRectBackgroundRenderContribution = /*#__PURE__*/function (_DefaultBaseBackgroun) {
24256
24348
  _inherits(DefaultRectBackgroundRenderContribution, _DefaultBaseBackgroun);
24257
24349
  var _super = _createSuper(DefaultRectBackgroundRenderContribution);
@@ -24263,7 +24355,7 @@
24263
24355
  }
24264
24356
  return _createClass(DefaultRectBackgroundRenderContribution);
24265
24357
  }(DefaultBaseBackgroundRenderContribution);
24266
- DefaultRectBackgroundRenderContribution = __decorate$1d([injectable()], DefaultRectBackgroundRenderContribution);
24358
+ DefaultRectBackgroundRenderContribution = __decorate$1h([injectable()], DefaultRectBackgroundRenderContribution);
24267
24359
  var DefaultRectTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
24268
24360
  _inherits(DefaultRectTextureRenderContribution, _DefaultBaseTextureRe);
24269
24361
  var _super2 = _createSuper(DefaultRectTextureRenderContribution);
@@ -24275,7 +24367,7 @@
24275
24367
  }
24276
24368
  return _createClass(DefaultRectTextureRenderContribution);
24277
24369
  }(DefaultBaseTextureRenderContribution);
24278
- DefaultRectTextureRenderContribution = __decorate$1d([injectable()], DefaultRectTextureRenderContribution);
24370
+ DefaultRectTextureRenderContribution = __decorate$1h([injectable()], DefaultRectTextureRenderContribution);
24279
24371
  var SplitRectBeforeRenderContribution = /*#__PURE__*/function () {
24280
24372
  function SplitRectBeforeRenderContribution() {
24281
24373
  _classCallCheck(this, SplitRectBeforeRenderContribution);
@@ -24293,7 +24385,7 @@
24293
24385
  }]);
24294
24386
  return SplitRectBeforeRenderContribution;
24295
24387
  }();
24296
- SplitRectBeforeRenderContribution = __decorate$1d([injectable()], SplitRectBeforeRenderContribution);
24388
+ SplitRectBeforeRenderContribution = __decorate$1h([injectable()], SplitRectBeforeRenderContribution);
24297
24389
  var SplitRectAfterRenderContribution = /*#__PURE__*/function () {
24298
24390
  function SplitRectAfterRenderContribution() {
24299
24391
  _classCallCheck(this, SplitRectAfterRenderContribution);
@@ -24322,9 +24414,9 @@
24322
24414
  }]);
24323
24415
  return SplitRectAfterRenderContribution;
24324
24416
  }();
24325
- SplitRectAfterRenderContribution = __decorate$1d([injectable()], SplitRectAfterRenderContribution);
24417
+ SplitRectAfterRenderContribution = __decorate$1h([injectable()], SplitRectAfterRenderContribution);
24326
24418
 
24327
- var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24419
+ var __decorate$1g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24328
24420
  var d,
24329
24421
  c = arguments.length,
24330
24422
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24372,7 +24464,7 @@
24372
24464
  }]);
24373
24465
  return DefaultSymbolRenderContribution;
24374
24466
  }();
24375
- DefaultSymbolRenderContribution = __decorate$1c([injectable()], DefaultSymbolRenderContribution);
24467
+ DefaultSymbolRenderContribution = __decorate$1g([injectable()], DefaultSymbolRenderContribution);
24376
24468
  var DefaultSymbolBackgroundRenderContribution = /*#__PURE__*/function (_DefaultBaseBackgroun) {
24377
24469
  _inherits(DefaultSymbolBackgroundRenderContribution, _DefaultBaseBackgroun);
24378
24470
  var _super = _createSuper(DefaultSymbolBackgroundRenderContribution);
@@ -24472,17 +24564,17 @@
24472
24564
  }
24473
24565
  }
24474
24566
 
24475
- var __decorate$1b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24567
+ var __decorate$1f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24476
24568
  var d,
24477
24569
  c = arguments.length,
24478
24570
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
24479
24571
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
24480
24572
  return c > 3 && r && Object.defineProperty(target, key, r), r;
24481
24573
  },
24482
- __metadata$S = undefined && undefined.__metadata || function (k, v) {
24574
+ __metadata$V = undefined && undefined.__metadata || function (k, v) {
24483
24575
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
24484
24576
  },
24485
- __param$G = undefined && undefined.__param || function (paramIndex, decorator) {
24577
+ __param$H = undefined && undefined.__param || function (paramIndex, decorator) {
24486
24578
  return function (target, key) {
24487
24579
  decorator(target, key, paramIndex);
24488
24580
  };
@@ -24666,9 +24758,9 @@
24666
24758
  }]);
24667
24759
  return DefaultCanvasAreaRender;
24668
24760
  }();
24669
- DefaultCanvasAreaRender = __decorate$1b([injectable(), __param$G(0, inject(ContributionProvider)), __param$G(0, named(AreaRenderContribution)), __metadata$S("design:paramtypes", [Object])], DefaultCanvasAreaRender);
24761
+ DefaultCanvasAreaRender = __decorate$1f([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(AreaRenderContribution)), __metadata$V("design:paramtypes", [Object])], DefaultCanvasAreaRender);
24670
24762
 
24671
- var __decorate$1a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24763
+ var __decorate$1e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24672
24764
  var d,
24673
24765
  c = arguments.length,
24674
24766
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -24687,7 +24779,7 @@
24687
24779
  }
24688
24780
  return _createClass(DefaultPathBackgroundRenderContribution);
24689
24781
  }(DefaultBaseBackgroundRenderContribution);
24690
- DefaultPathBackgroundRenderContribution = __decorate$1a([injectable()], DefaultPathBackgroundRenderContribution);
24782
+ DefaultPathBackgroundRenderContribution = __decorate$1e([injectable()], DefaultPathBackgroundRenderContribution);
24691
24783
  var DefaultPathTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
24692
24784
  _inherits(DefaultPathTextureRenderContribution, _DefaultBaseTextureRe);
24693
24785
  var _super2 = _createSuper(DefaultPathTextureRenderContribution);
@@ -24699,19 +24791,19 @@
24699
24791
  }
24700
24792
  return _createClass(DefaultPathTextureRenderContribution);
24701
24793
  }(DefaultBaseTextureRenderContribution);
24702
- DefaultPathTextureRenderContribution = __decorate$1a([injectable()], DefaultPathTextureRenderContribution);
24794
+ DefaultPathTextureRenderContribution = __decorate$1e([injectable()], DefaultPathTextureRenderContribution);
24703
24795
 
24704
- var __decorate$19 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24796
+ var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24705
24797
  var d,
24706
24798
  c = arguments.length,
24707
24799
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
24708
24800
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
24709
24801
  return c > 3 && r && Object.defineProperty(target, key, r), r;
24710
24802
  },
24711
- __metadata$R = undefined && undefined.__metadata || function (k, v) {
24803
+ __metadata$U = undefined && undefined.__metadata || function (k, v) {
24712
24804
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
24713
24805
  },
24714
- __param$F = undefined && undefined.__param || function (paramIndex, decorator) {
24806
+ __param$G = undefined && undefined.__param || function (paramIndex, decorator) {
24715
24807
  return function (target, key) {
24716
24808
  decorator(target, key, paramIndex);
24717
24809
  };
@@ -24746,6 +24838,10 @@
24746
24838
  lineWidth = _path$attribute$lineW === void 0 ? pathAttribute.lineWidth : _path$attribute$lineW,
24747
24839
  _path$attribute$visib = _path$attribute.visible,
24748
24840
  visible = _path$attribute$visib === void 0 ? pathAttribute.visible : _path$attribute$visib,
24841
+ _path$attribute$x = _path$attribute.x,
24842
+ originX = _path$attribute$x === void 0 ? pathAttribute.x : _path$attribute$x,
24843
+ _path$attribute$y = _path$attribute.y,
24844
+ originY = _path$attribute$y === void 0 ? pathAttribute.y : _path$attribute$y,
24749
24845
  z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
24750
24846
  fVisible = fillVisible(opacity, fillOpacity),
24751
24847
  sVisible = strokeVisible(opacity, strokeOpacity),
@@ -24760,7 +24856,7 @@
24760
24856
  return b.order - a.order;
24761
24857
  })), this._pathRenderContribitions.forEach(function (c) {
24762
24858
  c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(path, context, x, y, doFill, doStroke, fVisible, sVisible, pathAttribute, fillCb, strokeCb);
24763
- }), context.setShadowStyle && context.setShadowStyle(path, path.attribute, pathAttribute), doStroke && (strokeCb ? strokeCb(context, path.attribute, pathAttribute) : sVisible && (context.setStrokeStyle(path, path.attribute, x, y, pathAttribute), context.stroke())), doFill && (fillCb ? fillCb(context, path.attribute, pathAttribute) : fVisible && (context.setCommonStyle(path, path.attribute, x, y, pathAttribute), context.fill())), this._pathRenderContribitions.forEach(function (c) {
24859
+ }), context.setShadowStyle && context.setShadowStyle(path, path.attribute, pathAttribute), doStroke && (strokeCb ? strokeCb(context, path.attribute, pathAttribute) : sVisible && (context.setStrokeStyle(path, path.attribute, originX - x, originY - y, pathAttribute), context.stroke())), doFill && (fillCb ? fillCb(context, path.attribute, pathAttribute) : fVisible && (context.setCommonStyle(path, path.attribute, originX - x, originY - y, pathAttribute), context.fill())), this._pathRenderContribitions.forEach(function (c) {
24764
24860
  c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(path, context, x, y, doFill, doStroke, fVisible, sVisible, pathAttribute, fillCb, strokeCb);
24765
24861
  });
24766
24862
  }
@@ -24782,19 +24878,19 @@
24782
24878
  }]);
24783
24879
  return DefaultCanvasPathRender;
24784
24880
  }(BaseRender);
24785
- DefaultCanvasPathRender = __decorate$19([injectable(), __param$F(0, inject(ContributionProvider)), __param$F(0, named(PathRenderContribution)), __metadata$R("design:paramtypes", [Object])], DefaultCanvasPathRender);
24881
+ DefaultCanvasPathRender = __decorate$1d([injectable(), __param$G(0, inject(ContributionProvider)), __param$G(0, named(PathRenderContribution)), __metadata$U("design:paramtypes", [Object])], DefaultCanvasPathRender);
24786
24882
 
24787
- var __decorate$18 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24883
+ var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24788
24884
  var d,
24789
24885
  c = arguments.length,
24790
24886
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
24791
24887
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
24792
24888
  return c > 3 && r && Object.defineProperty(target, key, r), r;
24793
24889
  },
24794
- __metadata$Q = undefined && undefined.__metadata || function (k, v) {
24890
+ __metadata$T = undefined && undefined.__metadata || function (k, v) {
24795
24891
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
24796
24892
  },
24797
- __param$E = undefined && undefined.__param || function (paramIndex, decorator) {
24893
+ __param$F = undefined && undefined.__param || function (paramIndex, decorator) {
24798
24894
  return function (target, key) {
24799
24895
  decorator(target, key, paramIndex);
24800
24896
  };
@@ -24873,19 +24969,19 @@
24873
24969
  }]);
24874
24970
  return DefaultCanvasRectRender;
24875
24971
  }();
24876
- DefaultCanvasRectRender = __decorate$18([injectable(), __param$E(0, inject(ContributionProvider)), __param$E(0, named(RectRenderContribution)), __metadata$Q("design:paramtypes", [Object])], DefaultCanvasRectRender);
24972
+ DefaultCanvasRectRender = __decorate$1c([injectable(), __param$F(0, inject(ContributionProvider)), __param$F(0, named(RectRenderContribution)), __metadata$T("design:paramtypes", [Object])], DefaultCanvasRectRender);
24877
24973
 
24878
- var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24974
+ var __decorate$1b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24879
24975
  var d,
24880
24976
  c = arguments.length,
24881
24977
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
24882
24978
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
24883
24979
  return c > 3 && r && Object.defineProperty(target, key, r), r;
24884
24980
  },
24885
- __metadata$P = undefined && undefined.__metadata || function (k, v) {
24981
+ __metadata$S = undefined && undefined.__metadata || function (k, v) {
24886
24982
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
24887
24983
  },
24888
- __param$D = undefined && undefined.__param || function (paramIndex, decorator) {
24984
+ __param$E = undefined && undefined.__param || function (paramIndex, decorator) {
24889
24985
  return function (target, key) {
24890
24986
  decorator(target, key, paramIndex);
24891
24987
  };
@@ -24922,6 +25018,14 @@
24922
25018
  stroke = _symbol$attribute$str2 === void 0 ? symbolAttribute.stroke : _symbol$attribute$str2,
24923
25019
  _symbol$attribute$vis = _symbol$attribute.visible,
24924
25020
  visible = _symbol$attribute$vis === void 0 ? symbolAttribute.visible : _symbol$attribute$vis,
25021
+ _symbol$attribute$x = _symbol$attribute.x,
25022
+ originX = _symbol$attribute$x === void 0 ? symbolAttribute.x : _symbol$attribute$x,
25023
+ _symbol$attribute$y = _symbol$attribute.y,
25024
+ originY = _symbol$attribute$y === void 0 ? symbolAttribute.y : _symbol$attribute$y,
25025
+ _symbol$attribute$sca = _symbol$attribute.scaleX,
25026
+ scaleX = _symbol$attribute$sca === void 0 ? symbolAttribute.scaleX : _symbol$attribute$sca,
25027
+ _symbol$attribute$sca2 = _symbol$attribute.scaleY,
25028
+ scaleY = _symbol$attribute$sca2 === void 0 ? symbolAttribute.scaleY : _symbol$attribute$sca2,
24925
25029
  fVisible = fillVisible(opacity, fillOpacity),
24926
25030
  sVisible = strokeVisible(opacity, strokeOpacity),
24927
25031
  doFill = runFill(fill),
@@ -24943,7 +25047,7 @@
24943
25047
  return b.order - a.order;
24944
25048
  })), this._symbolRenderContribitions.forEach(function (c) {
24945
25049
  c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, fillCb, strokeCb);
24946
- }), context.setShadowStyle && context.setShadowStyle(symbol, symbol.attribute, symbolAttribute), doFill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, x, y, symbolAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, x, y, symbolAttribute), context.stroke())), this._symbolRenderContribitions.forEach(function (c) {
25050
+ }), context.setShadowStyle && context.setShadowStyle(symbol, symbol.attribute, symbolAttribute), doFill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke())), this._symbolRenderContribitions.forEach(function (c) {
24947
25051
  c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, fillCb, strokeCb);
24948
25052
  });
24949
25053
  }
@@ -24964,9 +25068,9 @@
24964
25068
  }]);
24965
25069
  return DefaultCanvasSymbolRender;
24966
25070
  }(BaseRender);
24967
- DefaultCanvasSymbolRender = __decorate$17([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(SymbolRenderContribution)), __metadata$P("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
25071
+ DefaultCanvasSymbolRender = __decorate$1b([injectable(), __param$E(0, inject(ContributionProvider)), __param$E(0, named(SymbolRenderContribution)), __metadata$S("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
24968
25072
 
24969
- var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25073
+ var __decorate$1a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
24970
25074
  var d,
24971
25075
  c = arguments.length,
24972
25076
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -25128,9 +25232,9 @@
25128
25232
  }]);
25129
25233
  return DefaultCanvasTextRender;
25130
25234
  }(BaseRender);
25131
- DefaultCanvasTextRender = __decorate$16([injectable()], DefaultCanvasTextRender);
25235
+ DefaultCanvasTextRender = __decorate$1a([injectable()], DefaultCanvasTextRender);
25132
25236
 
25133
- var __decorate$15 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25237
+ var __decorate$19 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25134
25238
  var d,
25135
25239
  c = arguments.length,
25136
25240
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -25140,7 +25244,7 @@
25140
25244
  var AbstractGraphicRender = /*#__PURE__*/_createClass(function AbstractGraphicRender() {
25141
25245
  _classCallCheck(this, AbstractGraphicRender);
25142
25246
  });
25143
- AbstractGraphicRender = __decorate$15([injectable()], AbstractGraphicRender);
25247
+ AbstractGraphicRender = __decorate$19([injectable()], AbstractGraphicRender);
25144
25248
 
25145
25249
  function drawPolygon(path, points, x, y) {
25146
25250
  path.moveTo(points[0].x + x, points[0].y + y);
@@ -25187,7 +25291,7 @@
25187
25291
  };
25188
25292
  }
25189
25293
 
25190
- var __decorate$14 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25294
+ var __decorate$18 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25191
25295
  var d,
25192
25296
  c = arguments.length,
25193
25297
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -25206,7 +25310,7 @@
25206
25310
  }
25207
25311
  return _createClass(DefaultPolygonBackgroundRenderContribution);
25208
25312
  }(DefaultBaseBackgroundRenderContribution);
25209
- DefaultPolygonBackgroundRenderContribution = __decorate$14([injectable()], DefaultPolygonBackgroundRenderContribution);
25313
+ DefaultPolygonBackgroundRenderContribution = __decorate$18([injectable()], DefaultPolygonBackgroundRenderContribution);
25210
25314
  var DefaultPolygonTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
25211
25315
  _inherits(DefaultPolygonTextureRenderContribution, _DefaultBaseTextureRe);
25212
25316
  var _super2 = _createSuper(DefaultPolygonTextureRenderContribution);
@@ -25218,19 +25322,19 @@
25218
25322
  }
25219
25323
  return _createClass(DefaultPolygonTextureRenderContribution);
25220
25324
  }(DefaultBaseTextureRenderContribution);
25221
- DefaultPolygonTextureRenderContribution = __decorate$14([injectable()], DefaultPolygonTextureRenderContribution);
25325
+ DefaultPolygonTextureRenderContribution = __decorate$18([injectable()], DefaultPolygonTextureRenderContribution);
25222
25326
 
25223
- var __decorate$13 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25327
+ var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25224
25328
  var d,
25225
25329
  c = arguments.length,
25226
25330
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
25227
25331
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
25228
25332
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25229
25333
  },
25230
- __metadata$O = undefined && undefined.__metadata || function (k, v) {
25334
+ __metadata$R = undefined && undefined.__metadata || function (k, v) {
25231
25335
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
25232
25336
  },
25233
- __param$C = undefined && undefined.__param || function (paramIndex, decorator) {
25337
+ __param$D = undefined && undefined.__param || function (paramIndex, decorator) {
25234
25338
  return function (target, key) {
25235
25339
  decorator(target, key, paramIndex);
25236
25340
  };
@@ -25299,19 +25403,19 @@
25299
25403
  }]);
25300
25404
  return DefaultCanvasPolygonRender;
25301
25405
  }();
25302
- DefaultCanvasPolygonRender = __decorate$13([injectable(), __param$C(0, inject(ContributionProvider)), __param$C(0, named(PolygonRenderContribution)), __metadata$O("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
25406
+ DefaultCanvasPolygonRender = __decorate$17([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(PolygonRenderContribution)), __metadata$R("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
25303
25407
 
25304
- var __decorate$12 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25408
+ var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25305
25409
  var d,
25306
25410
  c = arguments.length,
25307
25411
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
25308
25412
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
25309
25413
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25310
25414
  },
25311
- __metadata$N = undefined && undefined.__metadata || function (k, v) {
25415
+ __metadata$Q = undefined && undefined.__metadata || function (k, v) {
25312
25416
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
25313
25417
  },
25314
- __param$B = undefined && undefined.__param || function (paramIndex, decorator) {
25418
+ __param$C = undefined && undefined.__param || function (paramIndex, decorator) {
25315
25419
  return function (target, key) {
25316
25420
  decorator(target, key, paramIndex);
25317
25421
  };
@@ -25379,7 +25483,7 @@
25379
25483
  }]);
25380
25484
  return DefaultCanvasImageRender;
25381
25485
  }();
25382
- DefaultCanvasImageRender = __decorate$12([injectable(), __param$B(0, inject(ContributionProvider)), __param$B(0, named(ImageRenderContribution)), __metadata$N("design:paramtypes", [Object])], DefaultCanvasImageRender);
25486
+ DefaultCanvasImageRender = __decorate$16([injectable(), __param$C(0, inject(ContributionProvider)), __param$C(0, named(ImageRenderContribution)), __metadata$Q("design:paramtypes", [Object])], DefaultCanvasImageRender);
25383
25487
 
25384
25488
  var IncrementalDrawContribution = Symbol["for"]("IncrementalDrawContribution");
25385
25489
  var ArcRender = Symbol["for"]("ArcRender");
@@ -25402,17 +25506,17 @@
25402
25506
  var RenderSelector = Symbol["for"]("RenderSelector");
25403
25507
  var DrawContribution = Symbol["for"]("DrawContribution");
25404
25508
 
25405
- var __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25509
+ var __decorate$15 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25406
25510
  var d,
25407
25511
  c = arguments.length,
25408
25512
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
25409
25513
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
25410
25514
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25411
25515
  },
25412
- __metadata$M = undefined && undefined.__metadata || function (k, v) {
25516
+ __metadata$P = undefined && undefined.__metadata || function (k, v) {
25413
25517
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
25414
25518
  },
25415
- __param$A = undefined && undefined.__param || function (paramIndex, decorator) {
25519
+ __param$B = undefined && undefined.__param || function (paramIndex, decorator) {
25416
25520
  return function (target, key) {
25417
25521
  decorator(target, key, paramIndex);
25418
25522
  };
@@ -25466,7 +25570,7 @@
25466
25570
  }]);
25467
25571
  return DefaultRenderService;
25468
25572
  }();
25469
- DefaultRenderService = __decorate$11([injectable(), __param$A(0, inject(DrawContribution)), __metadata$M("design:paramtypes", [Object])], DefaultRenderService);
25573
+ DefaultRenderService = __decorate$15([injectable(), __param$B(0, inject(DrawContribution)), __metadata$P("design:paramtypes", [Object])], DefaultRenderService);
25470
25574
 
25471
25575
  var renderModule$1 = new ContainerModule(function (bind) {
25472
25576
  bind(DefaultRenderService).toSelf(), bind(RenderService).toService(DefaultRenderService);
@@ -25589,7 +25693,7 @@
25589
25693
  return result;
25590
25694
  }
25591
25695
 
25592
- var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25696
+ var __decorate$14 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25593
25697
  var d,
25594
25698
  c = arguments.length,
25595
25699
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -25673,19 +25777,19 @@
25673
25777
  }]);
25674
25778
  return Canvas3DPickItemInterceptor;
25675
25779
  }();
25676
- Canvas3DPickItemInterceptor = __decorate$10([injectable()], Canvas3DPickItemInterceptor);
25780
+ Canvas3DPickItemInterceptor = __decorate$14([injectable()], Canvas3DPickItemInterceptor);
25677
25781
 
25678
- var __decorate$$ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25782
+ var __decorate$13 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25679
25783
  var d,
25680
25784
  c = arguments.length,
25681
25785
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
25682
25786
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
25683
25787
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25684
25788
  },
25685
- __metadata$L = undefined && undefined.__metadata || function (k, v) {
25789
+ __metadata$O = undefined && undefined.__metadata || function (k, v) {
25686
25790
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
25687
25791
  },
25688
- __param$z = undefined && undefined.__param || function (paramIndex, decorator) {
25792
+ __param$A = undefined && undefined.__param || function (paramIndex, decorator) {
25689
25793
  return function (target, key) {
25690
25794
  decorator(target, key, paramIndex);
25691
25795
  };
@@ -25800,19 +25904,19 @@
25800
25904
  }]);
25801
25905
  return DefaultPickService;
25802
25906
  }();
25803
- DefaultPickService = __decorate$$([injectable(), __param$z(0, inject(Global)), __param$z(1, inject(ContributionProvider)), __param$z(1, named(PickItemInterceptor)), __metadata$L("design:paramtypes", [Object, Object])], DefaultPickService);
25907
+ DefaultPickService = __decorate$13([injectable(), __param$A(0, inject(Global)), __param$A(1, inject(ContributionProvider)), __param$A(1, named(PickItemInterceptor)), __metadata$O("design:paramtypes", [Object, Object])], DefaultPickService);
25804
25908
 
25805
- var __decorate$_ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25909
+ var __decorate$12 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
25806
25910
  var d,
25807
25911
  c = arguments.length,
25808
25912
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
25809
25913
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
25810
25914
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25811
25915
  },
25812
- __metadata$K = undefined && undefined.__metadata || function (k, v) {
25916
+ __metadata$N = undefined && undefined.__metadata || function (k, v) {
25813
25917
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
25814
25918
  },
25815
- __param$y = undefined && undefined.__param || function (paramIndex, decorator) {
25919
+ __param$z = undefined && undefined.__param || function (paramIndex, decorator) {
25816
25920
  return function (target, key) {
25817
25921
  decorator(target, key, paramIndex);
25818
25922
  };
@@ -25877,7 +25981,7 @@
25877
25981
  }]);
25878
25982
  return DefaultGlobalPickerService;
25879
25983
  }();
25880
- DefaultGlobalPickerService = __decorate$_([injectable(), __param$y(0, inject(Global)), __metadata$K("design:paramtypes", [Object])], DefaultGlobalPickerService);
25984
+ DefaultGlobalPickerService = __decorate$12([injectable(), __param$z(0, inject(Global)), __metadata$N("design:paramtypes", [Object])], DefaultGlobalPickerService);
25881
25985
 
25882
25986
  function lookAt(out, eye, center, up) {
25883
25987
  var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;
@@ -26011,14 +26115,14 @@
26011
26115
  return OrthoCamera;
26012
26116
  }();
26013
26117
 
26014
- var __decorate$Z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
26118
+ var __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
26015
26119
  var d,
26016
26120
  c = arguments.length,
26017
26121
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
26018
26122
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
26019
26123
  return c > 3 && r && Object.defineProperty(target, key, r), r;
26020
26124
  },
26021
- __metadata$J = undefined && undefined.__metadata || function (k, v) {
26125
+ __metadata$M = undefined && undefined.__metadata || function (k, v) {
26022
26126
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
26023
26127
  };
26024
26128
  var outP = [0, 0, 0],
@@ -26583,7 +26687,7 @@
26583
26687
  opacity = _attribute$opacity === void 0 ? defaultParams.opacity : _attribute$opacity,
26584
26688
  _attribute$fill = attribute.fill,
26585
26689
  fill = _attribute$fill === void 0 ? defaultParams.fill : _attribute$fill;
26586
- fillOpacity > 1e-12 && opacity > 1e-12 ? (_context.globalAlpha = fillOpacity * opacity, _context.fillStyle = createColor(this, fill, params)) : _context.globalAlpha = fillOpacity * opacity;
26690
+ fillOpacity > 1e-12 && opacity > 1e-12 ? (_context.globalAlpha = fillOpacity * opacity, _context.fillStyle = createColor(this, fill, params, offsetX, offsetY)) : _context.globalAlpha = fillOpacity * opacity;
26587
26691
  }
26588
26692
  }, {
26589
26693
  key: "setShadowStyle",
@@ -26650,7 +26754,7 @@
26650
26754
  lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
26651
26755
  _attribute$miterLimit = attribute.miterLimit,
26652
26756
  miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
26653
- _context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params), _context.lineJoin = lineJoin, _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
26757
+ _context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
26654
26758
  }
26655
26759
  }
26656
26760
  }, {
@@ -26702,19 +26806,19 @@
26702
26806
  }]);
26703
26807
  return BrowserContext2d;
26704
26808
  }();
26705
- BrowserContext2d.env = "browser", BrowserContext2d = __decorate$Z([injectable(), __metadata$J("design:paramtypes", [Object, Number])], BrowserContext2d);
26809
+ BrowserContext2d.env = "browser", BrowserContext2d = __decorate$11([injectable(), __metadata$M("design:paramtypes", [Object, Number])], BrowserContext2d);
26706
26810
 
26707
- var __decorate$Y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
26811
+ var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
26708
26812
  var d,
26709
26813
  c = arguments.length,
26710
26814
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
26711
26815
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
26712
26816
  return c > 3 && r && Object.defineProperty(target, key, r), r;
26713
26817
  },
26714
- __metadata$I = undefined && undefined.__metadata || function (k, v) {
26818
+ __metadata$L = undefined && undefined.__metadata || function (k, v) {
26715
26819
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
26716
26820
  };
26717
- var DefaultConfig$4 = {
26821
+ var DefaultConfig$5 = {
26718
26822
  WIDTH: 500,
26719
26823
  HEIGHT: 500,
26720
26824
  DPR: 1
@@ -26724,11 +26828,11 @@
26724
26828
  _classCallCheck(this, BrowserCanvas);
26725
26829
  var nativeCanvas = params.nativeCanvas,
26726
26830
  _params$width = params.width,
26727
- width = _params$width === void 0 ? DefaultConfig$4.WIDTH : _params$width,
26831
+ width = _params$width === void 0 ? DefaultConfig$5.WIDTH : _params$width,
26728
26832
  _params$height = params.height,
26729
- height = _params$height === void 0 ? DefaultConfig$4.HEIGHT : _params$height,
26833
+ height = _params$height === void 0 ? DefaultConfig$5.HEIGHT : _params$height,
26730
26834
  _params$dpr = params.dpr,
26731
- dpr = _params$dpr === void 0 ? DefaultConfig$4.DPR : _params$dpr,
26835
+ dpr = _params$dpr === void 0 ? DefaultConfig$5.DPR : _params$dpr,
26732
26836
  container = params.container,
26733
26837
  x = params.x,
26734
26838
  y = params.y,
@@ -26894,7 +26998,7 @@
26894
26998
  }]);
26895
26999
  return BrowserCanvas;
26896
27000
  }();
26897
- BrowserCanvas.env = "browser", BrowserCanvas = __decorate$Y([injectable(), __metadata$I("design:paramtypes", [Object])], BrowserCanvas);
27001
+ BrowserCanvas.env = "browser", BrowserCanvas = __decorate$10([injectable(), __metadata$L("design:paramtypes", [Object])], BrowserCanvas);
26898
27002
 
26899
27003
  var CanvasArcPicker = Symbol["for"]("CanvasArcPicker");
26900
27004
  var CanvasArc3dPicker = Symbol["for"]("CanvasArc3dPicker");
@@ -26924,17 +27028,17 @@
26924
27028
  var MathGlyphPicker = Symbol["for"]("MathGlyphPicker");
26925
27029
  var MathPickerContribution = Symbol["for"]("MathPickerContribution");
26926
27030
 
26927
- var __decorate$X = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27031
+ var __decorate$$ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
26928
27032
  var d,
26929
27033
  c = arguments.length,
26930
27034
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
26931
27035
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
26932
27036
  return c > 3 && r && Object.defineProperty(target, key, r), r;
26933
27037
  },
26934
- __metadata$H = undefined && undefined.__metadata || function (k, v) {
27038
+ __metadata$K = undefined && undefined.__metadata || function (k, v) {
26935
27039
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
26936
27040
  },
26937
- __param$x = undefined && undefined.__param || function (paramIndex, decorator) {
27041
+ __param$y = undefined && undefined.__param || function (paramIndex, decorator) {
26938
27042
  return function (target, key) {
26939
27043
  decorator(target, key, paramIndex);
26940
27044
  };
@@ -26986,16 +27090,16 @@
26986
27090
  }]);
26987
27091
  return DefaultCanvasPickerService;
26988
27092
  }(DefaultPickService);
26989
- __decorate$X([postConstruct(), __metadata$H("design:type", Function), __metadata$H("design:paramtypes", []), __metadata$H("design:returntype", void 0)], DefaultCanvasPickerService.prototype, "init", null), DefaultCanvasPickerService = __decorate$X([injectable(), __param$x(0, inject(ContributionProvider)), __param$x(0, named(CanvasPickerContribution)), __param$x(1, inject(CanvasCirclePicker)), __param$x(2, inject(CanvasRectPicker)), __param$x(3, inject(CanvasArcPicker)), __param$x(4, inject(CanvasAreaPicker)), __param$x(5, inject(CanvasImagePicker)), __param$x(6, inject(CanvasLinePicker)), __param$x(7, inject(CanvasPathPicker)), __param$x(8, inject(CanvasSymbolPicker)), __param$x(9, inject(CanvasTextPicker)), __param$x(10, inject(CanvasPolygonPicker)), __param$x(11, inject(CanvasRichTextPicker)), __param$x(12, inject(DrawContribution)), __param$x(13, inject(Global)), __param$x(14, inject(ContributionProvider)), __param$x(14, named(PickItemInterceptor)), __metadata$H("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])], DefaultCanvasPickerService);
27093
+ __decorate$$([postConstruct(), __metadata$K("design:type", Function), __metadata$K("design:paramtypes", []), __metadata$K("design:returntype", void 0)], DefaultCanvasPickerService.prototype, "init", null), DefaultCanvasPickerService = __decorate$$([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(CanvasPickerContribution)), __param$y(1, inject(CanvasCirclePicker)), __param$y(2, inject(CanvasRectPicker)), __param$y(3, inject(CanvasArcPicker)), __param$y(4, inject(CanvasAreaPicker)), __param$y(5, inject(CanvasImagePicker)), __param$y(6, inject(CanvasLinePicker)), __param$y(7, inject(CanvasPathPicker)), __param$y(8, inject(CanvasSymbolPicker)), __param$y(9, inject(CanvasTextPicker)), __param$y(10, inject(CanvasPolygonPicker)), __param$y(11, inject(CanvasRichTextPicker)), __param$y(12, inject(DrawContribution)), __param$y(13, inject(Global)), __param$y(14, inject(ContributionProvider)), __param$y(14, named(PickItemInterceptor)), __metadata$K("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])], DefaultCanvasPickerService);
26990
27094
 
26991
- var __decorate$W = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27095
+ var __decorate$_ = undefined && undefined.__decorate || function (decorators, target, key, desc) {
26992
27096
  var d,
26993
27097
  c = arguments.length,
26994
27098
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
26995
27099
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
26996
27100
  return c > 3 && r && Object.defineProperty(target, key, r), r;
26997
27101
  },
26998
- __metadata$G = undefined && undefined.__metadata || function (k, v) {
27102
+ __metadata$J = undefined && undefined.__metadata || function (k, v) {
26999
27103
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
27000
27104
  };
27001
27105
  var initMatrix = new Matrix(1, 0, 0, 1, 0, 0),
@@ -27337,19 +27441,19 @@
27337
27441
  }]);
27338
27442
  return EmptyContext2d;
27339
27443
  }();
27340
- EmptyContext2d = __decorate$W([injectable(), __metadata$G("design:paramtypes", [Object, Number])], EmptyContext2d);
27444
+ EmptyContext2d = __decorate$_([injectable(), __metadata$J("design:paramtypes", [Object, Number])], EmptyContext2d);
27341
27445
 
27342
- var __decorate$V = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27446
+ var __decorate$Z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27343
27447
  var d,
27344
27448
  c = arguments.length,
27345
27449
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
27346
27450
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
27347
27451
  return c > 3 && r && Object.defineProperty(target, key, r), r;
27348
27452
  },
27349
- __metadata$F = undefined && undefined.__metadata || function (k, v) {
27453
+ __metadata$I = undefined && undefined.__metadata || function (k, v) {
27350
27454
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
27351
27455
  },
27352
- __param$w = undefined && undefined.__param || function (paramIndex, decorator) {
27456
+ __param$x = undefined && undefined.__param || function (paramIndex, decorator) {
27353
27457
  return function (target, key) {
27354
27458
  decorator(target, key, paramIndex);
27355
27459
  };
@@ -27388,7 +27492,7 @@
27388
27492
  }]);
27389
27493
  return DefaultMathPickerService;
27390
27494
  }(DefaultPickService);
27391
- __decorate$V([postConstruct(), __metadata$F("design:type", Function), __metadata$F("design:paramtypes", []), __metadata$F("design:returntype", void 0)], DefaultMathPickerService.prototype, "init", null), DefaultMathPickerService = __decorate$V([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(MathPickerContribution)), __param$w(1, inject(Global)), __param$w(2, inject(ContributionProvider)), __param$w(2, named(PickItemInterceptor)), __metadata$F("design:paramtypes", [Object, Object, Object])], DefaultMathPickerService);
27495
+ __decorate$Z([postConstruct(), __metadata$I("design:type", Function), __metadata$I("design:paramtypes", []), __metadata$I("design:returntype", void 0)], DefaultMathPickerService.prototype, "init", null), DefaultMathPickerService = __decorate$Z([injectable(), __param$x(0, inject(ContributionProvider)), __param$x(0, named(MathPickerContribution)), __param$x(1, inject(Global)), __param$x(2, inject(ContributionProvider)), __param$x(2, named(PickItemInterceptor)), __metadata$I("design:paramtypes", [Object, Object, Object])], DefaultMathPickerService);
27392
27496
 
27393
27497
  var pickModule = new ContainerModule(function (bind) {
27394
27498
  bind(DefaultCanvasPickerService).toSelf().inSingletonScope(), bind(DefaultMathPickerService).toSelf().inSingletonScope(), bind(PickerService).toService(DefaultCanvasPickerService), bind(DefaultGlobalPickerService).toSelf().inSingletonScope(), bind(GlobalPickerService).toService(DefaultGlobalPickerService), bind(Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(Canvas3DPickItemInterceptor), bindContributionProvider(bind, PickItemInterceptor);
@@ -27398,14 +27502,14 @@
27398
27502
  bind(DefaultGraphicService).toSelf().inSingletonScope(), bind(GraphicService).toService(DefaultGraphicService), bind(DefaultRectOuterBorderBoundsContribution).toSelf().inSingletonScope(), bind(RectBoundsContribution).toService(DefaultRectOuterBorderBoundsContribution), bindContributionProvider(bind, RectBoundsContribution), bind(DefaultSymbolOuterBorderBoundsContribution).toSelf().inSingletonScope(), bind(SymbolBoundsContribution).toService(DefaultSymbolOuterBorderBoundsContribution), bindContributionProvider(bind, SymbolBoundsContribution), bind(DefaultCircleOuterBorderBoundsContribution).toSelf().inSingletonScope(), bind(CircleBoundsContribution).toService(DefaultCircleOuterBorderBoundsContribution), bindContributionProvider(bind, CircleBoundsContribution), bind(DefaultArcOuterBorderBoundsContribution).toSelf().inSingletonScope(), bind(ArcBoundsContribution).toService(DefaultArcOuterBorderBoundsContribution), bindContributionProvider(bind, ArcBoundsContribution), bind(DefaultPathOuterBorderBoundsContribution).toSelf().inSingletonScope(), bind(PathBoundsContribution).toService(DefaultPathOuterBorderBoundsContribution), bindContributionProvider(bind, PathBoundsContribution), bind(GraphicCreator).toConstantValue(graphicCreator);
27399
27503
  });
27400
27504
 
27401
- var __decorate$U = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27505
+ var __decorate$Y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27402
27506
  var d,
27403
27507
  c = arguments.length,
27404
27508
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
27405
27509
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
27406
27510
  return c > 3 && r && Object.defineProperty(target, key, r), r;
27407
27511
  },
27408
- __metadata$E = undefined && undefined.__metadata || function (k, v) {
27512
+ __metadata$H = undefined && undefined.__metadata || function (k, v) {
27409
27513
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
27410
27514
  };
27411
27515
  var PluginService = Symbol["for"]("PluginService");
@@ -27447,13 +27551,13 @@
27447
27551
  }]);
27448
27552
  return DefaultPluginService;
27449
27553
  }();
27450
- DefaultPluginService = __decorate$U([injectable(), __metadata$E("design:paramtypes", [])], DefaultPluginService);
27554
+ DefaultPluginService = __decorate$Y([injectable(), __metadata$H("design:paramtypes", [])], DefaultPluginService);
27451
27555
 
27452
27556
  var pluginModule = new ContainerModule(function (bind) {
27453
27557
  bind(DefaultPluginService).toSelf(), bind(PluginService).toService(DefaultPluginService);
27454
27558
  });
27455
27559
 
27456
- var __decorate$T = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27560
+ var __decorate$X = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27457
27561
  var d,
27458
27562
  c = arguments.length,
27459
27563
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -27534,16 +27638,16 @@
27534
27638
  }]);
27535
27639
  return BaseEnvContribution;
27536
27640
  }();
27537
- BaseEnvContribution = __decorate$T([injectable()], BaseEnvContribution);
27641
+ BaseEnvContribution = __decorate$X([injectable()], BaseEnvContribution);
27538
27642
 
27539
- var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27643
+ var __decorate$W = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27540
27644
  var d,
27541
27645
  c = arguments.length,
27542
27646
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
27543
27647
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
27544
27648
  return c > 3 && r && Object.defineProperty(target, key, r), r;
27545
27649
  },
27546
- __metadata$D = undefined && undefined.__metadata || function (k, v) {
27650
+ __metadata$G = undefined && undefined.__metadata || function (k, v) {
27547
27651
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
27548
27652
  };
27549
27653
  function createImageElement(src) {
@@ -27580,6 +27684,26 @@
27580
27684
  return _this;
27581
27685
  }
27582
27686
  _createClass(BrowserEnvContribution, [{
27687
+ key: "mapToCanvasPoint",
27688
+ value: function mapToCanvasPoint(nativeEvent, domElement) {
27689
+ var _a;
27690
+ if (domElement) {
27691
+ var x = nativeEvent.clientX,
27692
+ y = nativeEvent.clientY,
27693
+ rect = domElement.getBoundingClientRect(),
27694
+ nativeCanvas = null === (_a = domElement.getNativeHandler) || void 0 === _a ? void 0 : _a.call(domElement).nativeCanvas;
27695
+ var scaleX, scaleY;
27696
+ return nativeCanvas && (scaleX = rect.width / nativeCanvas.offsetWidth, scaleY = rect.height / nativeCanvas.offsetHeight), {
27697
+ x: (x - rect.left) / (isValidNumber(scaleX) ? scaleX : 1),
27698
+ y: (y - rect.top) / (isValidNumber(scaleY) ? scaleX : 1)
27699
+ };
27700
+ }
27701
+ return {
27702
+ x: nativeEvent.offsetX,
27703
+ y: nativeEvent.offsetY
27704
+ };
27705
+ }
27706
+ }, {
27583
27707
  key: "loadImage",
27584
27708
  value: function loadImage(url) {
27585
27709
  return createImageElement(url, !1).then(function (img) {
@@ -27682,7 +27806,7 @@
27682
27806
  }]);
27683
27807
  return BrowserEnvContribution;
27684
27808
  }(BaseEnvContribution);
27685
- BrowserEnvContribution = __decorate$S([injectable(), __metadata$D("design:paramtypes", [])], BrowserEnvContribution);
27809
+ BrowserEnvContribution = __decorate$W([injectable(), __metadata$G("design:paramtypes", [])], BrowserEnvContribution);
27686
27810
 
27687
27811
  function loadFeishuContributions() {
27688
27812
  container.rebind(PickerService).toService(DefaultMathPickerService);
@@ -27691,14 +27815,14 @@
27691
27815
  container.rebind(PickerService).toService(DefaultMathPickerService);
27692
27816
  }
27693
27817
 
27694
- var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27818
+ var __decorate$V = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27695
27819
  var d,
27696
27820
  c = arguments.length,
27697
27821
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
27698
27822
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
27699
27823
  return c > 3 && r && Object.defineProperty(target, key, r), r;
27700
27824
  },
27701
- __metadata$C = undefined && undefined.__metadata || function (k, v) {
27825
+ __metadata$F = undefined && undefined.__metadata || function (k, v) {
27702
27826
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
27703
27827
  };
27704
27828
  function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList) {
@@ -27782,7 +27906,7 @@
27782
27906
  key: "getRequestAnimationFrame",
27783
27907
  value: function getRequestAnimationFrame() {
27784
27908
  return function (callback) {
27785
- setTimeout(callback, 1e3 / 60, !0);
27909
+ return setTimeout(callback, 1e3 / 60, !0);
27786
27910
  };
27787
27911
  }
27788
27912
  }, {
@@ -27834,16 +27958,16 @@
27834
27958
  }]);
27835
27959
  return FeishuEnvContribution;
27836
27960
  }(BaseEnvContribution);
27837
- FeishuEnvContribution = __decorate$R([injectable(), __metadata$C("design:paramtypes", [])], FeishuEnvContribution);
27961
+ FeishuEnvContribution = __decorate$V([injectable(), __metadata$F("design:paramtypes", [])], FeishuEnvContribution);
27838
27962
 
27839
- var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27963
+ var __decorate$U = undefined && undefined.__decorate || function (decorators, target, key, desc) {
27840
27964
  var d,
27841
27965
  c = arguments.length,
27842
27966
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
27843
27967
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
27844
27968
  return c > 3 && r && Object.defineProperty(target, key, r), r;
27845
27969
  },
27846
- __metadata$B = undefined && undefined.__metadata || function (k, v) {
27970
+ __metadata$E = undefined && undefined.__metadata || function (k, v) {
27847
27971
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
27848
27972
  };
27849
27973
  function makeUpCanvas$1(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, taro, dpr) {
@@ -28007,16 +28131,16 @@
28007
28131
  }]);
28008
28132
  return TaroEnvContribution;
28009
28133
  }(BaseEnvContribution);
28010
- TaroEnvContribution = __decorate$Q([injectable(), __metadata$B("design:paramtypes", [])], TaroEnvContribution);
28134
+ TaroEnvContribution = __decorate$U([injectable(), __metadata$E("design:paramtypes", [])], TaroEnvContribution);
28011
28135
 
28012
- var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28136
+ var __decorate$T = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28013
28137
  var d,
28014
28138
  c = arguments.length,
28015
28139
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
28016
28140
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28017
28141
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28018
28142
  },
28019
- __metadata$A = undefined && undefined.__metadata || function (k, v) {
28143
+ __metadata$D = undefined && undefined.__metadata || function (k, v) {
28020
28144
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28021
28145
  };
28022
28146
  function makeUpCanvas(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList) {
@@ -28145,20 +28269,157 @@
28145
28269
  }]);
28146
28270
  return LynxEnvContribution;
28147
28271
  }(BaseEnvContribution);
28148
- LynxEnvContribution = __decorate$P([injectable(), __metadata$A("design:paramtypes", [])], LynxEnvContribution);
28272
+ LynxEnvContribution = __decorate$T([injectable(), __metadata$D("design:paramtypes", [])], LynxEnvContribution);
28273
+
28274
+ var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28275
+ var d,
28276
+ c = arguments.length,
28277
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
28278
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28279
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
28280
+ };
28281
+ var NodeEnvContribution = /*#__PURE__*/function (_BaseEnvContribution) {
28282
+ _inherits(NodeEnvContribution, _BaseEnvContribution);
28283
+ var _super = _createSuper(NodeEnvContribution);
28284
+ function NodeEnvContribution() {
28285
+ var _this;
28286
+ _classCallCheck(this, NodeEnvContribution);
28287
+ _this = _super.apply(this, arguments), _this.type = "node", _this._lastTime = 0, _this.supportEvent = !1;
28288
+ return _this;
28289
+ }
28290
+ _createClass(NodeEnvContribution, [{
28291
+ key: "configure",
28292
+ value: function configure(service, pkg) {
28293
+ service.env === this.type && (service.setActiveEnvContribution(this), this.pkg = pkg);
28294
+ }
28295
+ }, {
28296
+ key: "loadJson",
28297
+ value: function loadJson(url) {
28298
+ var jsonPromise = fetch(url).then(function (data) {
28299
+ return data.json();
28300
+ });
28301
+ return jsonPromise.then(function (json) {
28302
+ return {
28303
+ data: json,
28304
+ state: "success"
28305
+ };
28306
+ })["catch"](function () {
28307
+ return {
28308
+ data: null,
28309
+ state: "fail"
28310
+ };
28311
+ }), jsonPromise;
28312
+ }
28313
+ }, {
28314
+ key: "loadArrayBuffer",
28315
+ value: function loadArrayBuffer(url) {
28316
+ return fetch(url).then(function (data) {
28317
+ return data.arrayBuffer();
28318
+ }).then(function (arrayBuffer) {
28319
+ return {
28320
+ data: arrayBuffer,
28321
+ loadState: "success"
28322
+ };
28323
+ })["catch"](function () {
28324
+ return {
28325
+ data: null,
28326
+ loadState: "fail"
28327
+ };
28328
+ });
28329
+ }
28330
+ }, {
28331
+ key: "loadImage",
28332
+ value: function loadImage(url) {
28333
+ var loadImage = this.pkg.loadImage;
28334
+ return loadImage ? loadImage(url).then(function (image) {
28335
+ return {
28336
+ loadState: image ? "success" : "fail",
28337
+ data: image
28338
+ };
28339
+ })["catch"](function () {
28340
+ return {
28341
+ loadState: "fail",
28342
+ data: null
28343
+ };
28344
+ }) : Promise.reject(new Error("node-canvas loadImage could not be found!"));
28345
+ }
28346
+ }, {
28347
+ key: "loadSvg",
28348
+ value: function loadSvg(svgStr) {
28349
+ var Resvg = this.pkg.Resvg;
28350
+ if (!Resvg) return Promise.reject(new Error("@resvg/resvg-js svgParser could not be found!"));
28351
+ var pngData = new Resvg(svgStr).render().asPng();
28352
+ return this.loadImage(pngData);
28353
+ }
28354
+ }, {
28355
+ key: "createCanvas",
28356
+ value: function createCanvas(params) {
28357
+ return this.pkg.createCanvas(params.width, params.height);
28358
+ }
28359
+ }, {
28360
+ key: "releaseCanvas",
28361
+ value: function releaseCanvas(canvas) {}
28362
+ }, {
28363
+ key: "getDevicePixelRatio",
28364
+ value: function getDevicePixelRatio() {
28365
+ return 0;
28366
+ }
28367
+ }, {
28368
+ key: "getRequestAnimationFrame",
28369
+ value: function getRequestAnimationFrame() {
28370
+ return function (callback) {
28371
+ return setTimeout(callback, 1e3 / 60, !0);
28372
+ };
28373
+ }
28374
+ }, {
28375
+ key: "getCancelAnimationFrame",
28376
+ value: function getCancelAnimationFrame() {
28377
+ return function (h) {
28378
+ clearTimeout(h);
28379
+ };
28380
+ }
28381
+ }, {
28382
+ key: "addEventListener",
28383
+ value: function addEventListener(type, listener, options) {}
28384
+ }, {
28385
+ key: "removeEventListener",
28386
+ value: function removeEventListener(type, listener, options) {}
28387
+ }, {
28388
+ key: "getElementById",
28389
+ value: function getElementById(str) {
28390
+ return null;
28391
+ }
28392
+ }, {
28393
+ key: "getRootElement",
28394
+ value: function getRootElement() {
28395
+ return null;
28396
+ }
28397
+ }, {
28398
+ key: "dispatchEvent",
28399
+ value: function dispatchEvent(event) {}
28400
+ }, {
28401
+ key: "release",
28402
+ value: function release() {}
28403
+ }, {
28404
+ key: "createOffscreenCanvas",
28405
+ value: function createOffscreenCanvas(params) {}
28406
+ }]);
28407
+ return NodeEnvContribution;
28408
+ }(BaseEnvContribution);
28409
+ NodeEnvContribution = __decorate$S([injectable()], NodeEnvContribution);
28149
28410
 
28150
28411
  var envModules = new ContainerModule(function (bind) {
28151
- bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution), bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution), bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution), bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution), bindContributionProvider(bind, EnvContribution);
28412
+ bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution), bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution), bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution), bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution), bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution), bindContributionProvider(bind, EnvContribution);
28152
28413
  });
28153
28414
 
28154
- var __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28415
+ var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28155
28416
  var d,
28156
28417
  c = arguments.length,
28157
28418
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
28158
28419
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28159
28420
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28160
28421
  },
28161
- __metadata$z = undefined && undefined.__metadata || function (k, v) {
28422
+ __metadata$C = undefined && undefined.__metadata || function (k, v) {
28162
28423
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28163
28424
  };
28164
28425
  var BaseWindowHandlerContribution = /*#__PURE__*/function () {
@@ -28179,19 +28440,19 @@
28179
28440
  }]);
28180
28441
  return BaseWindowHandlerContribution;
28181
28442
  }();
28182
- BaseWindowHandlerContribution = __decorate$O([injectable(), __metadata$z("design:paramtypes", [])], BaseWindowHandlerContribution);
28443
+ BaseWindowHandlerContribution = __decorate$R([injectable(), __metadata$C("design:paramtypes", [])], BaseWindowHandlerContribution);
28183
28444
 
28184
- var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28445
+ var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28185
28446
  var d,
28186
28447
  c = arguments.length,
28187
28448
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
28188
28449
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28189
28450
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28190
28451
  },
28191
- __metadata$y = undefined && undefined.__metadata || function (k, v) {
28452
+ __metadata$B = undefined && undefined.__metadata || function (k, v) {
28192
28453
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28193
28454
  },
28194
- __param$v = undefined && undefined.__param || function (paramIndex, decorator) {
28455
+ __param$w = undefined && undefined.__param || function (paramIndex, decorator) {
28195
28456
  return function (target, key) {
28196
28457
  decorator(target, key, paramIndex);
28197
28458
  };
@@ -28313,35 +28574,446 @@
28313
28574
  }
28314
28575
  }, {
28315
28576
  key: "addEventListener",
28316
- value: function addEventListener(type, listener, options) {
28317
- return this.canvas.nativeCanvas.addEventListener(type, listener, options);
28577
+ value: function addEventListener(type, listener, options) {
28578
+ return this.canvas.nativeCanvas.addEventListener(type, listener, options);
28579
+ }
28580
+ }, {
28581
+ key: "removeEventListener",
28582
+ value: function removeEventListener(type, listener, options) {
28583
+ return this.canvas.nativeCanvas.removeEventListener(type, listener, options);
28584
+ }
28585
+ }, {
28586
+ key: "dispatchEvent",
28587
+ value: function dispatchEvent(event) {
28588
+ return this.canvas.nativeCanvas.dispatchEvent(event);
28589
+ }
28590
+ }, {
28591
+ key: "getStyle",
28592
+ value: function getStyle() {
28593
+ return this.canvas.nativeCanvas.style;
28594
+ }
28595
+ }, {
28596
+ key: "setStyle",
28597
+ value: function setStyle(style) {
28598
+ this.canvas.nativeCanvas.style = style;
28599
+ }
28600
+ }, {
28601
+ key: "getBoundingClientRect",
28602
+ value: function getBoundingClientRect() {
28603
+ var c = this.canvas.nativeCanvas,
28604
+ wh = this.getWH();
28605
+ return c.parentElement ? this.canvas.nativeCanvas.getBoundingClientRect() : {
28606
+ x: 0,
28607
+ y: 0,
28608
+ width: wh.width,
28609
+ height: wh.height,
28610
+ left: 0,
28611
+ top: 0,
28612
+ right: 0,
28613
+ bottom: 0
28614
+ };
28615
+ }
28616
+ }, {
28617
+ key: "clearViewBox",
28618
+ value: function clearViewBox(vb, color) {
28619
+ var context = this.getContext(),
28620
+ dpr = this.getDpr();
28621
+ context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
28622
+ }
28623
+ }]);
28624
+ return BrowserWindowHandlerContribution;
28625
+ }(BaseWindowHandlerContribution);
28626
+ BrowserWindowHandlerContribution.env = "browser", BrowserWindowHandlerContribution = __decorate$Q([injectable(), __param$w(0, inject(Global)), __metadata$B("design:paramtypes", [Object])], BrowserWindowHandlerContribution);
28627
+
28628
+ var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28629
+ var d,
28630
+ c = arguments.length,
28631
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
28632
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28633
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
28634
+ };
28635
+ var FeishuContext2d = /*#__PURE__*/function (_BrowserContext2d) {
28636
+ _inherits(FeishuContext2d, _BrowserContext2d);
28637
+ var _super = _createSuper(FeishuContext2d);
28638
+ function FeishuContext2d() {
28639
+ _classCallCheck(this, FeishuContext2d);
28640
+ return _super.apply(this, arguments);
28641
+ }
28642
+ _createClass(FeishuContext2d, [{
28643
+ key: "globalAlpha",
28644
+ get: function get() {
28645
+ return this._globalAlpha;
28646
+ },
28647
+ set: function set(ga) {
28648
+ this.nativeContext.globalAlpha = ga, this._globalAlpha = ga;
28649
+ }
28650
+ }, {
28651
+ key: "getImageData",
28652
+ value: function getImageData(sx, sy, sw, sh) {
28653
+ var _this = this;
28654
+ return new Promise(function (resolve, reject) {
28655
+ var _a;
28656
+ try {
28657
+ tt.canvasGetImageData({
28658
+ canvasId: null !== (_a = _this.canvas.nativeCanvas.id) && void 0 !== _a ? _a : _this.canvas.id,
28659
+ x: sx,
28660
+ y: sy,
28661
+ width: sw,
28662
+ height: sh,
28663
+ success: function success(res) {
28664
+ resolve(res);
28665
+ }
28666
+ });
28667
+ } catch (err) {
28668
+ reject(err);
28669
+ }
28670
+ });
28671
+ }
28672
+ }, {
28673
+ key: "draw",
28674
+ value: function draw() {
28675
+ var _this2 = this;
28676
+ var _context = this.nativeContext;
28677
+ this.drawPromise = new Promise(function (resolve) {
28678
+ _context.draw(!0, function () {
28679
+ _this2.drawPromise = null, resolve(null);
28680
+ });
28681
+ });
28682
+ }
28683
+ }]);
28684
+ return FeishuContext2d;
28685
+ }(BrowserContext2d);
28686
+ FeishuContext2d.env = "feishu", FeishuContext2d = __decorate$P([injectable()], FeishuContext2d);
28687
+
28688
+ var __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28689
+ var d,
28690
+ c = arguments.length,
28691
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
28692
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28693
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
28694
+ },
28695
+ __metadata$A = undefined && undefined.__metadata || function (k, v) {
28696
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28697
+ };
28698
+ var DefaultConfig$4 = {
28699
+ WIDTH: 500,
28700
+ HEIGHT: 500,
28701
+ DPR: 1
28702
+ };
28703
+ var FeishuCanvas = /*#__PURE__*/function () {
28704
+ function FeishuCanvas(params) {
28705
+ _classCallCheck(this, FeishuCanvas);
28706
+ var nativeCanvas = params.nativeCanvas,
28707
+ _params$width = params.width,
28708
+ width = _params$width === void 0 ? DefaultConfig$4.WIDTH : _params$width,
28709
+ _params$height = params.height,
28710
+ height = _params$height === void 0 ? DefaultConfig$4.HEIGHT : _params$height,
28711
+ _params$dpr = params.dpr,
28712
+ dpr = _params$dpr === void 0 ? DefaultConfig$4.DPR : _params$dpr,
28713
+ _ref = nativeCanvas.getBoundingClientRect ? nativeCanvas.getBoundingClientRect() : {
28714
+ x: 0,
28715
+ y: 0
28716
+ },
28717
+ x = _ref.x,
28718
+ y = _ref.y;
28719
+ this._x = x, this._y = y, this._pixelWidth = width * dpr, this._pixelHeight = height * dpr, this._visiable = !1 !== params.visiable, this._displayWidth = width, this._displayHeight = height, this._dpr = dpr, this._nativeCanvas = nativeCanvas, this._context = new FeishuContext2d(this, this._dpr), this._id = nativeCanvas.id;
28720
+ }
28721
+ _createClass(FeishuCanvas, [{
28722
+ key: "id",
28723
+ get: function get() {
28724
+ return this._id;
28725
+ }
28726
+ }, {
28727
+ key: "x",
28728
+ get: function get() {
28729
+ return this._x;
28730
+ }
28731
+ }, {
28732
+ key: "y",
28733
+ get: function get() {
28734
+ return this._y;
28735
+ }
28736
+ }, {
28737
+ key: "nativeCanvas",
28738
+ get: function get() {
28739
+ return this._nativeCanvas;
28740
+ }
28741
+ }, {
28742
+ key: "width",
28743
+ get: function get() {
28744
+ return this._pixelWidth;
28745
+ },
28746
+ set: function set(width) {
28747
+ this._pixelWidth = width, this._displayWidth = width / (this._dpr || 1);
28748
+ }
28749
+ }, {
28750
+ key: "height",
28751
+ get: function get() {
28752
+ return this._pixelHeight;
28753
+ },
28754
+ set: function set(height) {
28755
+ this._pixelHeight = height, this._displayHeight = height / (this._dpr || 1);
28756
+ }
28757
+ }, {
28758
+ key: "displayWidth",
28759
+ get: function get() {
28760
+ return this._displayWidth;
28761
+ }
28762
+ }, {
28763
+ key: "displayHeight",
28764
+ get: function get() {
28765
+ return this._displayHeight;
28766
+ }
28767
+ }, {
28768
+ key: "getContext",
28769
+ value: function getContext(str) {
28770
+ return this._context;
28771
+ }
28772
+ }, {
28773
+ key: "visiable",
28774
+ get: function get() {
28775
+ return this._visiable;
28776
+ },
28777
+ set: function set(visiable) {
28778
+ this._visiable = visiable, visiable ? this.show() : this.hide();
28779
+ }
28780
+ }, {
28781
+ key: "dpr",
28782
+ get: function get() {
28783
+ return this._dpr;
28784
+ },
28785
+ set: function set(dpr) {
28786
+ this._dpr = dpr;
28787
+ }
28788
+ }, {
28789
+ key: "getNativeCanvas",
28790
+ value: function getNativeCanvas() {
28791
+ return this._nativeCanvas;
28792
+ }
28793
+ }, {
28794
+ key: "resetStyle",
28795
+ value: function resetStyle(params) {}
28796
+ }, {
28797
+ key: "applyPosition",
28798
+ value: function applyPosition() {}
28799
+ }, {
28800
+ key: "hide",
28801
+ value: function hide() {}
28802
+ }, {
28803
+ key: "show",
28804
+ value: function show() {}
28805
+ }, {
28806
+ key: "resize",
28807
+ value: function resize(width, height) {}
28808
+ }, {
28809
+ key: "toDataURL",
28810
+ value: function toDataURL(mimeType, quality) {
28811
+ return "";
28812
+ }
28813
+ }, {
28814
+ key: "readPixels",
28815
+ value: function readPixels(x, y, w, h) {
28816
+ throw new Error("暂未实现");
28817
+ }
28818
+ }, {
28819
+ key: "convertToBlob",
28820
+ value: function convertToBlob(options) {
28821
+ throw new Error("暂未实现");
28822
+ }
28823
+ }, {
28824
+ key: "transferToImageBitmap",
28825
+ value: function transferToImageBitmap() {
28826
+ throw new Error("暂未实现");
28827
+ }
28828
+ }, {
28829
+ key: "release",
28830
+ value: function release() {}
28831
+ }]);
28832
+ return FeishuCanvas;
28833
+ }();
28834
+ FeishuCanvas.env = "feishu", FeishuCanvas = __decorate$O([injectable(), __metadata$A("design:paramtypes", [Object])], FeishuCanvas);
28835
+
28836
+ var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28837
+ var d,
28838
+ c = arguments.length,
28839
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
28840
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28841
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
28842
+ },
28843
+ __metadata$z = undefined && undefined.__metadata || function (k, v) {
28844
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28845
+ },
28846
+ __param$v = undefined && undefined.__param || function (paramIndex, decorator) {
28847
+ return function (target, key) {
28848
+ decorator(target, key, paramIndex);
28849
+ };
28850
+ };
28851
+ var MiniAppEventManager$2 = /*#__PURE__*/function () {
28852
+ function MiniAppEventManager() {
28853
+ _classCallCheck(this, MiniAppEventManager);
28854
+ this.cache = {};
28855
+ }
28856
+ _createClass(MiniAppEventManager, [{
28857
+ key: "addEventListener",
28858
+ value: function addEventListener(type, func) {
28859
+ type && func && (this.cache[type] = this.cache[type] || {
28860
+ listener: []
28861
+ }, this.cache[type].listener.push(func));
28862
+ }
28863
+ }, {
28864
+ key: "removeEventListener",
28865
+ value: function removeEventListener(type, func) {
28866
+ if (!type || !func) return;
28867
+ if (!this.cache[type]) return;
28868
+ var index = this.cache[type].listener.findIndex(function (f) {
28869
+ return f === func;
28870
+ });
28871
+ index >= 0 && this.cache[type].listener.splice(index, 1);
28872
+ }
28873
+ }, {
28874
+ key: "cleanEvent",
28875
+ value: function cleanEvent() {
28876
+ this.cache = {};
28877
+ }
28878
+ }]);
28879
+ return MiniAppEventManager;
28880
+ }();
28881
+ var FeishuWindowHandlerContribution = /*#__PURE__*/function (_BaseWindowHandlerCon) {
28882
+ _inherits(FeishuWindowHandlerContribution, _BaseWindowHandlerCon);
28883
+ var _super = _createSuper(FeishuWindowHandlerContribution);
28884
+ function FeishuWindowHandlerContribution(global) {
28885
+ var _this;
28886
+ _classCallCheck(this, FeishuWindowHandlerContribution);
28887
+ _this = _super.call(this), _this.global = global, _this.type = "feishu", _this.eventManager = new MiniAppEventManager$2();
28888
+ return _this;
28889
+ }
28890
+ _createClass(FeishuWindowHandlerContribution, [{
28891
+ key: "container",
28892
+ get: function get() {
28893
+ return null;
28894
+ }
28895
+ }, {
28896
+ key: "getTitle",
28897
+ value: function getTitle() {
28898
+ return this.canvas.id.toString();
28899
+ }
28900
+ }, {
28901
+ key: "getWH",
28902
+ value: function getWH() {
28903
+ return {
28904
+ width: this.canvas.width / (this.canvas.dpr || 1),
28905
+ height: this.canvas.height / (this.canvas.dpr || 1)
28906
+ };
28907
+ }
28908
+ }, {
28909
+ key: "getXY",
28910
+ value: function getXY() {
28911
+ return {
28912
+ x: 0,
28913
+ y: 0
28914
+ };
28915
+ }
28916
+ }, {
28917
+ key: "createWindow",
28918
+ value: function createWindow(params) {
28919
+ params.canvas ? this.createWindowByCanvas(params) : this.createWindowByConfig(params);
28920
+ }
28921
+ }, {
28922
+ key: "createWindowByConfig",
28923
+ value: function createWindowByConfig(params) {
28924
+ var nativeCanvas = this.global.createCanvas({
28925
+ width: params.width,
28926
+ height: params.height
28927
+ }),
28928
+ options = {
28929
+ width: params.width,
28930
+ height: params.height,
28931
+ dpr: params.dpr,
28932
+ nativeCanvas: nativeCanvas,
28933
+ id: Generator.GenAutoIncrementId().toString(),
28934
+ canvasControled: !1
28935
+ };
28936
+ this.canvas = new FeishuCanvas(options);
28937
+ }
28938
+ }, {
28939
+ key: "createWindowByCanvas",
28940
+ value: function createWindowByCanvas(params) {
28941
+ var canvas;
28942
+ if ("string" == typeof params.canvas) {
28943
+ if (canvas = this.global.getElementById(params.canvas), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
28944
+ } else canvas = params.canvas;
28945
+ var width = params.width,
28946
+ height = params.height;
28947
+ if (null == width || null == height || !params.canvasControled) {
28948
+ var data = canvas.getBoundingClientRect();
28949
+ width = data.width, height = data.height;
28950
+ }
28951
+ var dpr = params.dpr;
28952
+ null == dpr && (dpr = canvas.width / width), this.canvas = new FeishuCanvas({
28953
+ width: width,
28954
+ height: height,
28955
+ dpr: dpr,
28956
+ nativeCanvas: canvas,
28957
+ canvasControled: params.canvasControled
28958
+ });
28959
+ }
28960
+ }, {
28961
+ key: "releaseWindow",
28962
+ value: function releaseWindow() {}
28963
+ }, {
28964
+ key: "resizeWindow",
28965
+ value: function resizeWindow(width, height) {}
28966
+ }, {
28967
+ key: "setDpr",
28968
+ value: function setDpr(dpr) {
28969
+ this.canvas.dpr = dpr;
28970
+ }
28971
+ }, {
28972
+ key: "getContext",
28973
+ value: function getContext() {
28974
+ return this.canvas.getContext();
28975
+ }
28976
+ }, {
28977
+ key: "getNativeHandler",
28978
+ value: function getNativeHandler() {
28979
+ return this.canvas;
28980
+ }
28981
+ }, {
28982
+ key: "getDpr",
28983
+ value: function getDpr() {
28984
+ return this.canvas.dpr;
28985
+ }
28986
+ }, {
28987
+ key: "addEventListener",
28988
+ value: function addEventListener(type, listener) {
28989
+ this.eventManager.addEventListener(type, listener);
28318
28990
  }
28319
28991
  }, {
28320
28992
  key: "removeEventListener",
28321
- value: function removeEventListener(type, listener, options) {
28322
- return this.canvas.nativeCanvas.removeEventListener(type, listener, options);
28993
+ value: function removeEventListener(type, listener) {
28994
+ this.eventManager.removeEventListener(type, listener);
28323
28995
  }
28324
28996
  }, {
28325
28997
  key: "dispatchEvent",
28326
28998
  value: function dispatchEvent(event) {
28327
- return this.canvas.nativeCanvas.dispatchEvent(event);
28999
+ var type = event.type;
29000
+ return !!this.eventManager.cache[type] && (event.changedTouches && event.changedTouches[0] && (event.offsetX = event.changedTouches[0].x, event.changedTouches[0].offsetX = event.changedTouches[0].x, event.changedTouches[0].clientX = event.changedTouches[0].x, event.offsetY = event.changedTouches[0].y, event.changedTouches[0].offsetY = event.changedTouches[0].y, event.changedTouches[0].clientY = event.changedTouches[0].y), event.preventDefault = function () {}, event.stopPropagation = function () {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(function (f) {
29001
+ f(event);
29002
+ }), !0);
28328
29003
  }
28329
29004
  }, {
28330
29005
  key: "getStyle",
28331
29006
  value: function getStyle() {
28332
- return this.canvas.nativeCanvas.style;
29007
+ return {};
28333
29008
  }
28334
29009
  }, {
28335
29010
  key: "setStyle",
28336
- value: function setStyle(style) {
28337
- this.canvas.nativeCanvas.style = style;
28338
- }
29011
+ value: function setStyle(style) {}
28339
29012
  }, {
28340
29013
  key: "getBoundingClientRect",
28341
29014
  value: function getBoundingClientRect() {
28342
- var c = this.canvas.nativeCanvas,
28343
- wh = this.getWH();
28344
- return c.parentElement ? this.canvas.nativeCanvas.getBoundingClientRect() : {
29015
+ var wh = this.getWH();
29016
+ return {
28345
29017
  x: 0,
28346
29018
  y: 0,
28347
29019
  width: wh.width,
@@ -28360,9 +29032,9 @@
28360
29032
  context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
28361
29033
  }
28362
29034
  }]);
28363
- return BrowserWindowHandlerContribution;
29035
+ return FeishuWindowHandlerContribution;
28364
29036
  }(BaseWindowHandlerContribution);
28365
- BrowserWindowHandlerContribution.env = "browser", BrowserWindowHandlerContribution = __decorate$N([injectable(), __param$v(0, inject(Global)), __metadata$y("design:paramtypes", [Object])], BrowserWindowHandlerContribution);
29037
+ FeishuWindowHandlerContribution.env = "feishu", FeishuWindowHandlerContribution = __decorate$N([injectable(), __param$v(0, inject(Global)), __metadata$z("design:paramtypes", [Object])], FeishuWindowHandlerContribution);
28366
29038
 
28367
29039
  var __decorate$M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28368
29040
  var d,
@@ -28371,58 +29043,90 @@
28371
29043
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28372
29044
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28373
29045
  };
28374
- var FeishuContext2d = /*#__PURE__*/function (_BrowserContext2d) {
28375
- _inherits(FeishuContext2d, _BrowserContext2d);
28376
- var _super = _createSuper(FeishuContext2d);
28377
- function FeishuContext2d() {
28378
- _classCallCheck(this, FeishuContext2d);
29046
+ var TaroContext2d = /*#__PURE__*/function (_BrowserContext2d) {
29047
+ _inherits(TaroContext2d, _BrowserContext2d);
29048
+ var _super = _createSuper(TaroContext2d);
29049
+ function TaroContext2d() {
29050
+ _classCallCheck(this, TaroContext2d);
28379
29051
  return _super.apply(this, arguments);
28380
29052
  }
28381
- _createClass(FeishuContext2d, [{
29053
+ _createClass(TaroContext2d, [{
28382
29054
  key: "globalAlpha",
28383
29055
  get: function get() {
28384
29056
  return this._globalAlpha;
28385
29057
  },
28386
29058
  set: function set(ga) {
28387
- this.nativeContext.globalAlpha = ga, this._globalAlpha = ga;
28388
- }
28389
- }, {
28390
- key: "getImageData",
28391
- value: function getImageData(sx, sy, sw, sh) {
28392
- var _this = this;
28393
- return new Promise(function (resolve, reject) {
28394
- var _a;
28395
- try {
28396
- tt.canvasGetImageData({
28397
- canvasId: null !== (_a = _this.canvas.nativeCanvas.id) && void 0 !== _a ? _a : _this.canvas.id,
28398
- x: sx,
28399
- y: sy,
28400
- width: sw,
28401
- height: sh,
28402
- success: function success(res) {
28403
- resolve(res);
28404
- }
28405
- });
28406
- } catch (err) {
28407
- reject(err);
28408
- }
28409
- });
29059
+ this.nativeContext.setGlobalAlpha(ga), this._globalAlpha = ga;
28410
29060
  }
28411
29061
  }, {
28412
29062
  key: "draw",
28413
29063
  value: function draw() {
28414
- var _this2 = this;
29064
+ this.nativeContext.draw();
29065
+ }
29066
+ }, {
29067
+ key: "strokeText",
29068
+ value: function strokeText(text, x, y) {}
29069
+ }, {
29070
+ key: "_setCommonStyle",
29071
+ value: function _setCommonStyle(params, attribute, offsetX, offsetY, defaultParams) {
28415
29072
  var _context = this.nativeContext;
28416
- this.drawPromise = new Promise(function (resolve) {
28417
- _context.draw(!0, function () {
28418
- _this2.drawPromise = null, resolve(null);
28419
- });
28420
- });
29073
+ defaultParams || (defaultParams = this.fillAttributes);
29074
+ var _attribute$fillOpacit = attribute.fillOpacity,
29075
+ fillOpacity = _attribute$fillOpacit === void 0 ? defaultParams.fillOpacity : _attribute$fillOpacit,
29076
+ _attribute$opacity = attribute.opacity,
29077
+ opacity = _attribute$opacity === void 0 ? defaultParams.opacity : _attribute$opacity,
29078
+ _attribute$fill = attribute.fill,
29079
+ fill = _attribute$fill === void 0 ? defaultParams.fill : _attribute$fill;
29080
+ fillOpacity > 1e-12 && opacity > 1e-12 && (_context.setGlobalAlpha(fillOpacity * opacity), _context.setFillStyle(createColor(this, fill, params, offsetX, offsetY)));
29081
+ }
29082
+ }, {
29083
+ key: "_setStrokeStyle",
29084
+ value: function _setStrokeStyle(params, attribute, offsetX, offsetY, defaultParams) {
29085
+ var _context = this.nativeContext;
29086
+ defaultParams || (defaultParams = this.strokeAttributes);
29087
+ var _attribute$strokeOpac = attribute.strokeOpacity,
29088
+ strokeOpacity = _attribute$strokeOpac === void 0 ? defaultParams.strokeOpacity : _attribute$strokeOpac,
29089
+ _attribute$opacity2 = attribute.opacity,
29090
+ opacity = _attribute$opacity2 === void 0 ? defaultParams.opacity : _attribute$opacity2;
29091
+ if (strokeOpacity > 1e-12 && opacity > 1e-12) {
29092
+ var _attribute$lineWidth = attribute.lineWidth,
29093
+ lineWidth = _attribute$lineWidth === void 0 ? defaultParams.lineWidth : _attribute$lineWidth,
29094
+ _attribute$stroke = attribute.stroke,
29095
+ stroke = _attribute$stroke === void 0 ? defaultParams.stroke : _attribute$stroke,
29096
+ _attribute$lineJoin = attribute.lineJoin,
29097
+ lineJoin = _attribute$lineJoin === void 0 ? defaultParams.lineJoin : _attribute$lineJoin,
29098
+ _attribute$lineDash = attribute.lineDash,
29099
+ lineDash = _attribute$lineDash === void 0 ? defaultParams.lineDash : _attribute$lineDash,
29100
+ _attribute$lineCap = attribute.lineCap,
29101
+ lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
29102
+ _attribute$miterLimit = attribute.miterLimit,
29103
+ miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
29104
+ _context.setGlobalAlpha(strokeOpacity * opacity), _context.setLineWidth(getScaledStroke(this, lineWidth, this.dpr)), _context.setStrokeStyle(createColor(this, stroke, params, offsetX, offsetY)), _context.setLineJoin(lineJoin), _context.setLineDash(lineDash), _context.setLineCap(lineCap), _context.setMiterLimit(miterLimit);
29105
+ }
29106
+ }
29107
+ }, {
29108
+ key: "setTextStyleWithoutAlignBaseline",
29109
+ value: function setTextStyleWithoutAlignBaseline(params, defaultParams) {
29110
+ var _a;
29111
+ var _context = this.nativeContext;
29112
+ defaultParams || (defaultParams = this.textAttributes), params.font ? _context.font = params.font : _context.font = getContextFont(params, defaultParams), _context.setFontSize(null !== (_a = params.fontSize) && void 0 !== _a ? _a : defaultParams.fontSize);
29113
+ }
29114
+ }, {
29115
+ key: "setTextStyle",
29116
+ value: function setTextStyle(params, defaultParams) {
29117
+ var _a, _b;
29118
+ var _context = this.nativeContext;
29119
+ defaultParams || (defaultParams = this.textAttributes), params.font ? _context.font = params.font : _context.font = getContextFont(params, defaultParams), _context.setTextAlign(null !== (_a = params.textAlign) && void 0 !== _a ? _a : defaultParams.textAlign), _context.setTextBaseline(null !== (_b = params.textBaseline) && void 0 !== _b ? _b : defaultParams.textBaseline);
29120
+ }
29121
+ }, {
29122
+ key: "createConicGradient",
29123
+ value: function createConicGradient(x, y, startAngle, endAngle) {
29124
+ return null;
28421
29125
  }
28422
29126
  }]);
28423
- return FeishuContext2d;
29127
+ return TaroContext2d;
28424
29128
  }(BrowserContext2d);
28425
- FeishuContext2d.env = "feishu", FeishuContext2d = __decorate$M([injectable()], FeishuContext2d);
29129
+ TaroContext2d.env = "taro", TaroContext2d = __decorate$M([injectable()], TaroContext2d);
28426
29130
 
28427
29131
  var __decorate$L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28428
29132
  var d,
@@ -28431,7 +29135,7 @@
28431
29135
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28432
29136
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28433
29137
  },
28434
- __metadata$x = undefined && undefined.__metadata || function (k, v) {
29138
+ __metadata$y = undefined && undefined.__metadata || function (k, v) {
28435
29139
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28436
29140
  };
28437
29141
  var DefaultConfig$3 = {
@@ -28439,9 +29143,9 @@
28439
29143
  HEIGHT: 500,
28440
29144
  DPR: 1
28441
29145
  };
28442
- var FeishuCanvas = /*#__PURE__*/function () {
28443
- function FeishuCanvas(params) {
28444
- _classCallCheck(this, FeishuCanvas);
29146
+ var TaroCanvas = /*#__PURE__*/function () {
29147
+ function TaroCanvas(params) {
29148
+ _classCallCheck(this, TaroCanvas);
28445
29149
  var nativeCanvas = params.nativeCanvas,
28446
29150
  _params$width = params.width,
28447
29151
  width = _params$width === void 0 ? DefaultConfig$3.WIDTH : _params$width,
@@ -28455,9 +29159,9 @@
28455
29159
  },
28456
29160
  x = _ref.x,
28457
29161
  y = _ref.y;
28458
- this._x = x, this._y = y, this._pixelWidth = width * dpr, this._pixelHeight = height * dpr, this._visiable = !1 !== params.visiable, this._displayWidth = width, this._displayHeight = height, this._dpr = dpr, this._nativeCanvas = nativeCanvas, this._context = new FeishuContext2d(this, this._dpr), this._id = nativeCanvas.id;
29162
+ this._x = x, this._y = y, this._pixelWidth = width * dpr, this._pixelHeight = height * dpr, this._visiable = !1 !== params.visiable, this._displayWidth = width, this._displayHeight = height, this._dpr = dpr, this._nativeCanvas = nativeCanvas, this._context = new TaroContext2d(this, this._dpr), this._id = nativeCanvas.id;
28459
29163
  }
28460
- _createClass(FeishuCanvas, [{
29164
+ _createClass(TaroCanvas, [{
28461
29165
  key: "id",
28462
29166
  get: function get() {
28463
29167
  return this._id;
@@ -28568,9 +29272,9 @@
28568
29272
  key: "release",
28569
29273
  value: function release() {}
28570
29274
  }]);
28571
- return FeishuCanvas;
29275
+ return TaroCanvas;
28572
29276
  }();
28573
- FeishuCanvas.env = "feishu", FeishuCanvas = __decorate$L([injectable(), __metadata$x("design:paramtypes", [Object])], FeishuCanvas);
29277
+ TaroCanvas.env = "taro", TaroCanvas = __decorate$L([injectable(), __metadata$y("design:paramtypes", [Object])], TaroCanvas);
28574
29278
 
28575
29279
  var __decorate$K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28576
29280
  var d,
@@ -28579,7 +29283,7 @@
28579
29283
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28580
29284
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28581
29285
  },
28582
- __metadata$w = undefined && undefined.__metadata || function (k, v) {
29286
+ __metadata$x = undefined && undefined.__metadata || function (k, v) {
28583
29287
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28584
29288
  },
28585
29289
  __param$u = undefined && undefined.__param || function (paramIndex, decorator) {
@@ -28587,7 +29291,7 @@
28587
29291
  decorator(target, key, paramIndex);
28588
29292
  };
28589
29293
  };
28590
- var MiniAppEventManager$2 = /*#__PURE__*/function () {
29294
+ var MiniAppEventManager$1 = /*#__PURE__*/function () {
28591
29295
  function MiniAppEventManager() {
28592
29296
  _classCallCheck(this, MiniAppEventManager);
28593
29297
  this.cache = {};
@@ -28617,16 +29321,16 @@
28617
29321
  }]);
28618
29322
  return MiniAppEventManager;
28619
29323
  }();
28620
- var FeishuWindowHandlerContribution = /*#__PURE__*/function (_BaseWindowHandlerCon) {
28621
- _inherits(FeishuWindowHandlerContribution, _BaseWindowHandlerCon);
28622
- var _super = _createSuper(FeishuWindowHandlerContribution);
28623
- function FeishuWindowHandlerContribution(global) {
29324
+ var TaroWindowHandlerContribution = /*#__PURE__*/function (_BaseWindowHandlerCon) {
29325
+ _inherits(TaroWindowHandlerContribution, _BaseWindowHandlerCon);
29326
+ var _super = _createSuper(TaroWindowHandlerContribution);
29327
+ function TaroWindowHandlerContribution(global) {
28624
29328
  var _this;
28625
- _classCallCheck(this, FeishuWindowHandlerContribution);
28626
- _this = _super.call(this), _this.global = global, _this.type = "feishu", _this.eventManager = new MiniAppEventManager$2();
29329
+ _classCallCheck(this, TaroWindowHandlerContribution);
29330
+ _this = _super.call(this), _this.global = global, _this.type = "taro", _this.eventManager = new MiniAppEventManager$1();
28627
29331
  return _this;
28628
29332
  }
28629
- _createClass(FeishuWindowHandlerContribution, [{
29333
+ _createClass(TaroWindowHandlerContribution, [{
28630
29334
  key: "container",
28631
29335
  get: function get() {
28632
29336
  return null;
@@ -28672,7 +29376,7 @@
28672
29376
  id: Generator.GenAutoIncrementId().toString(),
28673
29377
  canvasControled: !1
28674
29378
  };
28675
- this.canvas = new FeishuCanvas(options);
29379
+ this.canvas = new TaroCanvas(options);
28676
29380
  }
28677
29381
  }, {
28678
29382
  key: "createWindowByCanvas",
@@ -28688,7 +29392,7 @@
28688
29392
  width = data.width, height = data.height;
28689
29393
  }
28690
29394
  var dpr = params.dpr;
28691
- null == dpr && (dpr = canvas.width / width), this.canvas = new FeishuCanvas({
29395
+ null == dpr && (dpr = canvas.width / width), this.canvas = new TaroCanvas({
28692
29396
  width: width,
28693
29397
  height: height,
28694
29398
  dpr: dpr,
@@ -28736,7 +29440,17 @@
28736
29440
  key: "dispatchEvent",
28737
29441
  value: function dispatchEvent(event) {
28738
29442
  var type = event.type;
28739
- return !!this.eventManager.cache[type] && (event.changedTouches && event.changedTouches[0] && (event.offsetX = event.changedTouches[0].x, event.changedTouches[0].offsetX = event.changedTouches[0].x, event.changedTouches[0].clientX = event.changedTouches[0].x, event.offsetY = event.changedTouches[0].y, event.changedTouches[0].offsetY = event.changedTouches[0].y, event.changedTouches[0].clientY = event.changedTouches[0].y), event.preventDefault = function () {}, event.stopPropagation = function () {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(function (f) {
29443
+ return !!this.eventManager.cache[type] && (event.changedTouches.length > 0 && (event.changedTouches.forEach(function (d, i) {
29444
+ event.changedTouches[i] = Object.assign(Object.assign({}, event.changedTouches[i]), {
29445
+ offsetX: d.x,
29446
+ offsetY: d.y
29447
+ });
29448
+ }), event.offsetX = event.changedTouches[0].offsetX, event.offsetY = event.changedTouches[0].offsetY), event.touches.length > 0 && event.touches.forEach(function (d, i) {
29449
+ event.touches[i] = Object.assign(Object.assign({}, event.touches[i]), {
29450
+ offsetX: d.x,
29451
+ offsetY: d.y
29452
+ });
29453
+ }), event.preventDefault = function () {}, event.stopPropagation = function () {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(function (f) {
28740
29454
  f(event);
28741
29455
  }), !0);
28742
29456
  }
@@ -28771,9 +29485,9 @@
28771
29485
  context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
28772
29486
  }
28773
29487
  }]);
28774
- return FeishuWindowHandlerContribution;
29488
+ return TaroWindowHandlerContribution;
28775
29489
  }(BaseWindowHandlerContribution);
28776
- FeishuWindowHandlerContribution.env = "feishu", FeishuWindowHandlerContribution = __decorate$K([injectable(), __param$u(0, inject(Global)), __metadata$w("design:paramtypes", [Object])], FeishuWindowHandlerContribution);
29490
+ TaroWindowHandlerContribution.env = "taro", TaroWindowHandlerContribution = __decorate$K([injectable(), __param$u(0, inject(Global)), __metadata$x("design:paramtypes", [Object])], TaroWindowHandlerContribution);
28777
29491
 
28778
29492
  var __decorate$J = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28779
29493
  var d,
@@ -28782,90 +29496,36 @@
28782
29496
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28783
29497
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28784
29498
  };
28785
- var TaroContext2d = /*#__PURE__*/function (_BrowserContext2d) {
28786
- _inherits(TaroContext2d, _BrowserContext2d);
28787
- var _super = _createSuper(TaroContext2d);
28788
- function TaroContext2d() {
28789
- _classCallCheck(this, TaroContext2d);
29499
+ var LynxContext2d = /*#__PURE__*/function (_BrowserContext2d) {
29500
+ _inherits(LynxContext2d, _BrowserContext2d);
29501
+ var _super = _createSuper(LynxContext2d);
29502
+ function LynxContext2d() {
29503
+ _classCallCheck(this, LynxContext2d);
28790
29504
  return _super.apply(this, arguments);
28791
29505
  }
28792
- _createClass(TaroContext2d, [{
29506
+ _createClass(LynxContext2d, [{
28793
29507
  key: "globalAlpha",
28794
29508
  get: function get() {
28795
29509
  return this._globalAlpha;
28796
29510
  },
28797
29511
  set: function set(ga) {
28798
- this.nativeContext.setGlobalAlpha(ga), this._globalAlpha = ga;
29512
+ this.nativeContext.globalAlpha = ga, this._globalAlpha = ga;
28799
29513
  }
28800
29514
  }, {
28801
29515
  key: "draw",
28802
29516
  value: function draw() {
28803
- this.nativeContext.draw();
28804
- }
28805
- }, {
28806
- key: "strokeText",
28807
- value: function strokeText(text, x, y) {}
28808
- }, {
28809
- key: "_setCommonStyle",
28810
- value: function _setCommonStyle(params, attribute, offsetX, offsetY, defaultParams) {
28811
- var _context = this.nativeContext;
28812
- defaultParams || (defaultParams = this.fillAttributes);
28813
- var _attribute$fillOpacit = attribute.fillOpacity,
28814
- fillOpacity = _attribute$fillOpacit === void 0 ? defaultParams.fillOpacity : _attribute$fillOpacit,
28815
- _attribute$opacity = attribute.opacity,
28816
- opacity = _attribute$opacity === void 0 ? defaultParams.opacity : _attribute$opacity,
28817
- _attribute$fill = attribute.fill,
28818
- fill = _attribute$fill === void 0 ? defaultParams.fill : _attribute$fill;
28819
- fillOpacity > 1e-12 && opacity > 1e-12 && (_context.setGlobalAlpha(fillOpacity * opacity), _context.setFillStyle(createColor(this, fill, params)));
28820
- }
28821
- }, {
28822
- key: "_setStrokeStyle",
28823
- value: function _setStrokeStyle(params, attribute, offsetX, offsetY, defaultParams) {
28824
- var _context = this.nativeContext;
28825
- defaultParams || (defaultParams = this.strokeAttributes);
28826
- var _attribute$strokeOpac = attribute.strokeOpacity,
28827
- strokeOpacity = _attribute$strokeOpac === void 0 ? defaultParams.strokeOpacity : _attribute$strokeOpac,
28828
- _attribute$opacity2 = attribute.opacity,
28829
- opacity = _attribute$opacity2 === void 0 ? defaultParams.opacity : _attribute$opacity2;
28830
- if (strokeOpacity > 1e-12 && opacity > 1e-12) {
28831
- var _attribute$lineWidth = attribute.lineWidth,
28832
- lineWidth = _attribute$lineWidth === void 0 ? defaultParams.lineWidth : _attribute$lineWidth,
28833
- _attribute$stroke = attribute.stroke,
28834
- stroke = _attribute$stroke === void 0 ? defaultParams.stroke : _attribute$stroke,
28835
- _attribute$lineJoin = attribute.lineJoin,
28836
- lineJoin = _attribute$lineJoin === void 0 ? defaultParams.lineJoin : _attribute$lineJoin,
28837
- _attribute$lineDash = attribute.lineDash,
28838
- lineDash = _attribute$lineDash === void 0 ? defaultParams.lineDash : _attribute$lineDash,
28839
- _attribute$lineCap = attribute.lineCap,
28840
- lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
28841
- _attribute$miterLimit = attribute.miterLimit,
28842
- miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
28843
- _context.setGlobalAlpha(strokeOpacity * opacity), _context.setLineWidth(getScaledStroke(this, lineWidth, this.dpr)), _context.setStrokeStyle(createColor(this, stroke, params)), _context.setLineJoin(lineJoin), _context.setLineDash(lineDash), _context.setLineCap(lineCap), _context.setMiterLimit(miterLimit);
28844
- }
28845
- }
28846
- }, {
28847
- key: "setTextStyleWithoutAlignBaseline",
28848
- value: function setTextStyleWithoutAlignBaseline(params, defaultParams) {
28849
- var _a;
28850
- var _context = this.nativeContext;
28851
- defaultParams || (defaultParams = this.textAttributes), params.font ? _context.font = params.font : _context.font = getContextFont(params, defaultParams), _context.setFontSize(null !== (_a = params.fontSize) && void 0 !== _a ? _a : defaultParams.fontSize);
28852
- }
28853
- }, {
28854
- key: "setTextStyle",
28855
- value: function setTextStyle(params, defaultParams) {
28856
- var _a, _b;
29517
+ var _this = this;
28857
29518
  var _context = this.nativeContext;
28858
- defaultParams || (defaultParams = this.textAttributes), params.font ? _context.font = params.font : _context.font = getContextFont(params, defaultParams), _context.setTextAlign(null !== (_a = params.textAlign) && void 0 !== _a ? _a : defaultParams.textAlign), _context.setTextBaseline(null !== (_b = params.textBaseline) && void 0 !== _b ? _b : defaultParams.textBaseline);
28859
- }
28860
- }, {
28861
- key: "createConicGradient",
28862
- value: function createConicGradient(x, y, startAngle, endAngle) {
28863
- return null;
29519
+ this.drawPromise = new Promise(function (resolve) {
29520
+ _context.draw(!0, function () {
29521
+ _this.drawPromise = null, resolve(null);
29522
+ });
29523
+ });
28864
29524
  }
28865
29525
  }]);
28866
- return TaroContext2d;
29526
+ return LynxContext2d;
28867
29527
  }(BrowserContext2d);
28868
- TaroContext2d.env = "taro", TaroContext2d = __decorate$J([injectable()], TaroContext2d);
29528
+ LynxContext2d.env = "lynx", LynxContext2d = __decorate$J([injectable()], LynxContext2d);
28869
29529
 
28870
29530
  var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28871
29531
  var d,
@@ -28874,7 +29534,7 @@
28874
29534
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
28875
29535
  return c > 3 && r && Object.defineProperty(target, key, r), r;
28876
29536
  },
28877
- __metadata$v = undefined && undefined.__metadata || function (k, v) {
29537
+ __metadata$w = undefined && undefined.__metadata || function (k, v) {
28878
29538
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
28879
29539
  };
28880
29540
  var DefaultConfig$2 = {
@@ -28882,9 +29542,9 @@
28882
29542
  HEIGHT: 500,
28883
29543
  DPR: 1
28884
29544
  };
28885
- var TaroCanvas = /*#__PURE__*/function () {
28886
- function TaroCanvas(params) {
28887
- _classCallCheck(this, TaroCanvas);
29545
+ var LynxCanvas = /*#__PURE__*/function () {
29546
+ function LynxCanvas(params) {
29547
+ _classCallCheck(this, LynxCanvas);
28888
29548
  var nativeCanvas = params.nativeCanvas,
28889
29549
  _params$width = params.width,
28890
29550
  width = _params$width === void 0 ? DefaultConfig$2.WIDTH : _params$width,
@@ -28898,9 +29558,9 @@
28898
29558
  },
28899
29559
  x = _ref.x,
28900
29560
  y = _ref.y;
28901
- this._x = x, this._y = y, this._pixelWidth = width * dpr, this._pixelHeight = height * dpr, this._visiable = !1 !== params.visiable, this._displayWidth = width, this._displayHeight = height, this._dpr = dpr, this._nativeCanvas = nativeCanvas, this._context = new TaroContext2d(this, this._dpr), this._id = nativeCanvas.id;
29561
+ this._x = x, this._y = y, this._pixelWidth = width * dpr, this._pixelHeight = height * dpr, this._visiable = !1 !== params.visiable, this._displayWidth = width, this._displayHeight = height, this._dpr = dpr, this._nativeCanvas = nativeCanvas, this._context = new LynxContext2d(this, this._dpr), this._id = nativeCanvas.id;
28902
29562
  }
28903
- _createClass(TaroCanvas, [{
29563
+ _createClass(LynxCanvas, [{
28904
29564
  key: "id",
28905
29565
  get: function get() {
28906
29566
  return this._id;
@@ -29011,9 +29671,9 @@
29011
29671
  key: "release",
29012
29672
  value: function release() {}
29013
29673
  }]);
29014
- return TaroCanvas;
29674
+ return LynxCanvas;
29015
29675
  }();
29016
- TaroCanvas.env = "taro", TaroCanvas = __decorate$I([injectable(), __metadata$v("design:paramtypes", [Object])], TaroCanvas);
29676
+ LynxCanvas.env = "lynx", LynxCanvas = __decorate$I([injectable(), __metadata$w("design:paramtypes", [Object])], LynxCanvas);
29017
29677
 
29018
29678
  var __decorate$H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29019
29679
  var d,
@@ -29022,7 +29682,7 @@
29022
29682
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
29023
29683
  return c > 3 && r && Object.defineProperty(target, key, r), r;
29024
29684
  },
29025
- __metadata$u = undefined && undefined.__metadata || function (k, v) {
29685
+ __metadata$v = undefined && undefined.__metadata || function (k, v) {
29026
29686
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
29027
29687
  },
29028
29688
  __param$t = undefined && undefined.__param || function (paramIndex, decorator) {
@@ -29030,7 +29690,7 @@
29030
29690
  decorator(target, key, paramIndex);
29031
29691
  };
29032
29692
  };
29033
- var MiniAppEventManager$1 = /*#__PURE__*/function () {
29693
+ var MiniAppEventManager = /*#__PURE__*/function () {
29034
29694
  function MiniAppEventManager() {
29035
29695
  _classCallCheck(this, MiniAppEventManager);
29036
29696
  this.cache = {};
@@ -29060,16 +29720,16 @@
29060
29720
  }]);
29061
29721
  return MiniAppEventManager;
29062
29722
  }();
29063
- var TaroWindowHandlerContribution = /*#__PURE__*/function (_BaseWindowHandlerCon) {
29064
- _inherits(TaroWindowHandlerContribution, _BaseWindowHandlerCon);
29065
- var _super = _createSuper(TaroWindowHandlerContribution);
29066
- function TaroWindowHandlerContribution(global) {
29723
+ var LynxWindowHandlerContribution = /*#__PURE__*/function (_BaseWindowHandlerCon) {
29724
+ _inherits(LynxWindowHandlerContribution, _BaseWindowHandlerCon);
29725
+ var _super = _createSuper(LynxWindowHandlerContribution);
29726
+ function LynxWindowHandlerContribution(global) {
29067
29727
  var _this;
29068
- _classCallCheck(this, TaroWindowHandlerContribution);
29069
- _this = _super.call(this), _this.global = global, _this.type = "taro", _this.eventManager = new MiniAppEventManager$1();
29728
+ _classCallCheck(this, LynxWindowHandlerContribution);
29729
+ _this = _super.call(this), _this.global = global, _this.type = "lynx", _this.eventManager = new MiniAppEventManager();
29070
29730
  return _this;
29071
29731
  }
29072
- _createClass(TaroWindowHandlerContribution, [{
29732
+ _createClass(LynxWindowHandlerContribution, [{
29073
29733
  key: "container",
29074
29734
  get: function get() {
29075
29735
  return null;
@@ -29115,7 +29775,7 @@
29115
29775
  id: Generator.GenAutoIncrementId().toString(),
29116
29776
  canvasControled: !1
29117
29777
  };
29118
- this.canvas = new TaroCanvas(options);
29778
+ this.canvas = new LynxCanvas(options);
29119
29779
  }
29120
29780
  }, {
29121
29781
  key: "createWindowByCanvas",
@@ -29131,7 +29791,7 @@
29131
29791
  width = data.width, height = data.height;
29132
29792
  }
29133
29793
  var dpr = params.dpr;
29134
- null == dpr && (dpr = canvas.width / width), this.canvas = new TaroCanvas({
29794
+ null == dpr && (dpr = canvas.width / width), this.canvas = new LynxCanvas({
29135
29795
  width: width,
29136
29796
  height: height,
29137
29797
  dpr: dpr,
@@ -29179,17 +29839,7 @@
29179
29839
  key: "dispatchEvent",
29180
29840
  value: function dispatchEvent(event) {
29181
29841
  var type = event.type;
29182
- return !!this.eventManager.cache[type] && (event.changedTouches.length > 0 && (event.changedTouches.forEach(function (d, i) {
29183
- event.changedTouches[i] = Object.assign(Object.assign({}, event.changedTouches[i]), {
29184
- offsetX: d.x,
29185
- offsetY: d.y
29186
- });
29187
- }), event.offsetX = event.changedTouches[0].offsetX, event.offsetY = event.changedTouches[0].offsetY), event.touches.length > 0 && event.touches.forEach(function (d, i) {
29188
- event.touches[i] = Object.assign(Object.assign({}, event.touches[i]), {
29189
- offsetX: d.x,
29190
- offsetY: d.y
29191
- });
29192
- }), event.preventDefault = function () {}, event.stopPropagation = function () {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(function (f) {
29842
+ return !!this.eventManager.cache[type] && (event.changedTouches && event.changedTouches[0] && (event.offsetX = event.changedTouches[0].x, event.changedTouches[0].offsetX = event.changedTouches[0].x, event.changedTouches[0].clientX = event.changedTouches[0].x, event.offsetY = event.changedTouches[0].y, event.changedTouches[0].offsetY = event.changedTouches[0].y, event.changedTouches[0].clientY = event.changedTouches[0].y), event.preventDefault = function () {}, event.stopPropagation = function () {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(function (f) {
29193
29843
  f(event);
29194
29844
  }), !0);
29195
29845
  }
@@ -29224,47 +29874,40 @@
29224
29874
  context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
29225
29875
  }
29226
29876
  }]);
29227
- return TaroWindowHandlerContribution;
29877
+ return LynxWindowHandlerContribution;
29228
29878
  }(BaseWindowHandlerContribution);
29229
- TaroWindowHandlerContribution.env = "taro", TaroWindowHandlerContribution = __decorate$H([injectable(), __param$t(0, inject(Global)), __metadata$u("design:paramtypes", [Object])], TaroWindowHandlerContribution);
29879
+ LynxWindowHandlerContribution.env = "lynx", LynxWindowHandlerContribution = __decorate$H([injectable(), __param$t(0, inject(Global)), __metadata$v("design:paramtypes", [Object])], LynxWindowHandlerContribution);
29230
29880
 
29231
29881
  var __decorate$G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29232
- var d,
29233
- c = arguments.length,
29234
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
29235
- if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
29236
- return c > 3 && r && Object.defineProperty(target, key, r), r;
29237
- };
29238
- var LynxContext2d = /*#__PURE__*/function (_BrowserContext2d) {
29239
- _inherits(LynxContext2d, _BrowserContext2d);
29240
- var _super = _createSuper(LynxContext2d);
29241
- function LynxContext2d() {
29242
- _classCallCheck(this, LynxContext2d);
29243
- return _super.apply(this, arguments);
29882
+ var d,
29883
+ c = arguments.length,
29884
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
29885
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _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);
29886
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
29887
+ },
29888
+ __metadata$u = undefined && undefined.__metadata || function (k, v) {
29889
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
29890
+ };
29891
+ new Matrix(1, 0, 0, 1, 0, 0);
29892
+ var NodeContext2d = /*#__PURE__*/function (_BrowserContext2d) {
29893
+ _inherits(NodeContext2d, _BrowserContext2d);
29894
+ var _super = _createSuper(NodeContext2d);
29895
+ function NodeContext2d(canvas, dpr) {
29896
+ var _this;
29897
+ _classCallCheck(this, NodeContext2d);
29898
+ _this = _super.call(this, canvas, dpr);
29899
+ var context = canvas.nativeCanvas.getContext("2d");
29900
+ if (!context) throw new Error("发生错误,获取2d上下文失败");
29901
+ _this.nativeContext = context, _this.canvas = canvas, _this.matrix = new Matrix(1, 0, 0, 1, 0, 0), _this.stack = [], _this.dpr = null != dpr ? dpr : 1;
29902
+ return _this;
29244
29903
  }
29245
- _createClass(LynxContext2d, [{
29246
- key: "globalAlpha",
29247
- get: function get() {
29248
- return this._globalAlpha;
29249
- },
29250
- set: function set(ga) {
29251
- this.nativeContext.globalAlpha = ga, this._globalAlpha = ga;
29252
- }
29253
- }, {
29254
- key: "draw",
29255
- value: function draw() {
29256
- var _this = this;
29257
- var _context = this.nativeContext;
29258
- this.drawPromise = new Promise(function (resolve) {
29259
- _context.draw(!0, function () {
29260
- _this.drawPromise = null, resolve(null);
29261
- });
29262
- });
29263
- }
29904
+ _createClass(NodeContext2d, [{
29905
+ key: "release",
29906
+ value: function release() {}
29264
29907
  }]);
29265
- return LynxContext2d;
29908
+ return NodeContext2d;
29266
29909
  }(BrowserContext2d);
29267
- LynxContext2d.env = "lynx", LynxContext2d = __decorate$G([injectable()], LynxContext2d);
29910
+ NodeContext2d.env = "node", NodeContext2d = __decorate$G([injectable(), __metadata$u("design:paramtypes", [Object, Number])], NodeContext2d);
29268
29911
 
29269
29912
  var __decorate$F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29270
29913
  var d,
@@ -29281,25 +29924,21 @@
29281
29924
  HEIGHT: 500,
29282
29925
  DPR: 1
29283
29926
  };
29284
- var LynxCanvas = /*#__PURE__*/function () {
29285
- function LynxCanvas(params) {
29286
- _classCallCheck(this, LynxCanvas);
29927
+ var NodeCanvas = /*#__PURE__*/function () {
29928
+ function NodeCanvas(params) {
29929
+ _classCallCheck(this, NodeCanvas);
29287
29930
  var nativeCanvas = params.nativeCanvas,
29288
29931
  _params$width = params.width,
29289
29932
  width = _params$width === void 0 ? DefaultConfig$1.WIDTH : _params$width,
29290
29933
  _params$height = params.height,
29291
29934
  height = _params$height === void 0 ? DefaultConfig$1.HEIGHT : _params$height,
29935
+ _params$canvasControl = params.canvasControled,
29936
+ canvasControled = _params$canvasControl === void 0 ? !0 : _params$canvasControl,
29292
29937
  _params$dpr = params.dpr,
29293
- dpr = _params$dpr === void 0 ? DefaultConfig$1.DPR : _params$dpr,
29294
- _ref = nativeCanvas.getBoundingClientRect ? nativeCanvas.getBoundingClientRect() : {
29295
- x: 0,
29296
- y: 0
29297
- },
29298
- x = _ref.x,
29299
- y = _ref.y;
29300
- this._x = x, this._y = y, this._pixelWidth = width * dpr, this._pixelHeight = height * dpr, this._visiable = !1 !== params.visiable, this._displayWidth = width, this._displayHeight = height, this._dpr = dpr, this._nativeCanvas = nativeCanvas, this._context = new LynxContext2d(this, this._dpr), this._id = nativeCanvas.id;
29938
+ dpr = _params$dpr === void 0 ? DefaultConfig$1.DPR : _params$dpr;
29939
+ this._visiable = !1 !== params.visiable, this.controled = canvasControled, this._pixelWidth = width * dpr, this._pixelHeight = height * dpr, this._displayWidth = width, this._displayHeight = height, this._nativeCanvas = nativeCanvas, this._context = new NodeContext2d(this, params.dpr), this._id = nativeCanvas.id, this._dpr = dpr;
29301
29940
  }
29302
- _createClass(LynxCanvas, [{
29941
+ _createClass(NodeCanvas, [{
29303
29942
  key: "id",
29304
29943
  get: function get() {
29305
29944
  return this._id;
@@ -29307,12 +29946,12 @@
29307
29946
  }, {
29308
29947
  key: "x",
29309
29948
  get: function get() {
29310
- return this._x;
29949
+ return 0;
29311
29950
  }
29312
29951
  }, {
29313
29952
  key: "y",
29314
29953
  get: function get() {
29315
- return this._y;
29954
+ return 0;
29316
29955
  }
29317
29956
  }, {
29318
29957
  key: "nativeCanvas",
@@ -29328,22 +29967,22 @@
29328
29967
  this._pixelWidth = width, this._displayWidth = width / (this._dpr || 1);
29329
29968
  }
29330
29969
  }, {
29331
- key: "height",
29970
+ key: "displayWidth",
29332
29971
  get: function get() {
29333
- return this._pixelHeight;
29334
- },
29335
- set: function set(height) {
29336
- this._pixelHeight = height, this._displayHeight = height / (this._dpr || 1);
29972
+ return this._pixelWidth / this._dpr;
29337
29973
  }
29338
29974
  }, {
29339
- key: "displayWidth",
29975
+ key: "displayHeight",
29340
29976
  get: function get() {
29341
- return this._displayWidth;
29977
+ return this._pixelHeight / this._dpr;
29342
29978
  }
29343
29979
  }, {
29344
- key: "displayHeight",
29980
+ key: "height",
29345
29981
  get: function get() {
29346
- return this._displayHeight;
29982
+ return this._pixelHeight;
29983
+ },
29984
+ set: function set(height) {
29985
+ this._pixelHeight = height, this._displayHeight = height / (this._dpr || 1);
29347
29986
  }
29348
29987
  }, {
29349
29988
  key: "getContext",
@@ -29364,8 +30003,11 @@
29364
30003
  return this._dpr;
29365
30004
  },
29366
30005
  set: function set(dpr) {
29367
- this._dpr = dpr;
30006
+ this._dpr = dpr, this.resize(this.width, this.height);
29368
30007
  }
30008
+ }, {
30009
+ key: "applyPosition",
30010
+ value: function applyPosition() {}
29369
30011
  }, {
29370
30012
  key: "getNativeCanvas",
29371
30013
  value: function getNativeCanvas() {
@@ -29374,9 +30016,6 @@
29374
30016
  }, {
29375
30017
  key: "resetStyle",
29376
30018
  value: function resetStyle(params) {}
29377
- }, {
29378
- key: "applyPosition",
29379
- value: function applyPosition() {}
29380
30019
  }, {
29381
30020
  key: "hide",
29382
30021
  value: function hide() {}
@@ -29385,7 +30024,9 @@
29385
30024
  value: function show() {}
29386
30025
  }, {
29387
30026
  key: "resize",
29388
- value: function resize(width, height) {}
30027
+ value: function resize(width, height) {
30028
+ this._pixelWidth = width * this._dpr, this._pixelHeight = height * this._dpr, this._displayWidth = width, this._displayHeight = height, this._nativeCanvas && (this._nativeCanvas.width = this._pixelWidth, this._nativeCanvas.height = this._pixelHeight);
30029
+ }
29389
30030
  }, {
29390
30031
  key: "toDataURL",
29391
30032
  value: function toDataURL(mimeType, quality) {
@@ -29394,7 +30035,7 @@
29394
30035
  }, {
29395
30036
  key: "readPixels",
29396
30037
  value: function readPixels(x, y, w, h) {
29397
- throw new Error("暂未实现");
30038
+ return this._context.getImageData(x, y, w, h);
29398
30039
  }
29399
30040
  }, {
29400
30041
  key: "convertToBlob",
@@ -29408,11 +30049,13 @@
29408
30049
  }
29409
30050
  }, {
29410
30051
  key: "release",
29411
- value: function release() {}
30052
+ value: function release() {
30053
+ throw new Error("暂不支持release");
30054
+ }
29412
30055
  }]);
29413
- return LynxCanvas;
30056
+ return NodeCanvas;
29414
30057
  }();
29415
- LynxCanvas.env = "lynx", LynxCanvas = __decorate$F([injectable(), __metadata$t("design:paramtypes", [Object])], LynxCanvas);
30058
+ NodeCanvas.env = "node", NodeCanvas = __decorate$F([injectable(), __metadata$t("design:paramtypes", [Object])], NodeCanvas);
29416
30059
 
29417
30060
  var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29418
30061
  var d,
@@ -29429,46 +30072,16 @@
29429
30072
  decorator(target, key, paramIndex);
29430
30073
  };
29431
30074
  };
29432
- var MiniAppEventManager = /*#__PURE__*/function () {
29433
- function MiniAppEventManager() {
29434
- _classCallCheck(this, MiniAppEventManager);
29435
- this.cache = {};
29436
- }
29437
- _createClass(MiniAppEventManager, [{
29438
- key: "addEventListener",
29439
- value: function addEventListener(type, func) {
29440
- type && func && (this.cache[type] = this.cache[type] || {
29441
- listener: []
29442
- }, this.cache[type].listener.push(func));
29443
- }
29444
- }, {
29445
- key: "removeEventListener",
29446
- value: function removeEventListener(type, func) {
29447
- if (!type || !func) return;
29448
- if (!this.cache[type]) return;
29449
- var index = this.cache[type].listener.findIndex(function (f) {
29450
- return f === func;
29451
- });
29452
- index >= 0 && this.cache[type].listener.splice(index, 1);
29453
- }
29454
- }, {
29455
- key: "cleanEvent",
29456
- value: function cleanEvent() {
29457
- this.cache = {};
29458
- }
29459
- }]);
29460
- return MiniAppEventManager;
29461
- }();
29462
- var LynxWindowHandlerContribution = /*#__PURE__*/function (_BaseWindowHandlerCon) {
29463
- _inherits(LynxWindowHandlerContribution, _BaseWindowHandlerCon);
29464
- var _super = _createSuper(LynxWindowHandlerContribution);
29465
- function LynxWindowHandlerContribution(global) {
30075
+ var NodeWindowHandlerContribution = /*#__PURE__*/function (_BaseWindowHandlerCon) {
30076
+ _inherits(NodeWindowHandlerContribution, _BaseWindowHandlerCon);
30077
+ var _super = _createSuper(NodeWindowHandlerContribution);
30078
+ function NodeWindowHandlerContribution(global) {
29466
30079
  var _this;
29467
- _classCallCheck(this, LynxWindowHandlerContribution);
29468
- _this = _super.call(this), _this.global = global, _this.type = "lynx", _this.eventManager = new MiniAppEventManager();
30080
+ _classCallCheck(this, NodeWindowHandlerContribution);
30081
+ _this = _super.call(this), _this.global = global, _this.type = "node";
29469
30082
  return _this;
29470
30083
  }
29471
- _createClass(LynxWindowHandlerContribution, [{
30084
+ _createClass(NodeWindowHandlerContribution, [{
29472
30085
  key: "container",
29473
30086
  get: function get() {
29474
30087
  return null;
@@ -29476,14 +30089,14 @@
29476
30089
  }, {
29477
30090
  key: "getTitle",
29478
30091
  value: function getTitle() {
29479
- return this.canvas.id.toString();
30092
+ return "";
29480
30093
  }
29481
30094
  }, {
29482
30095
  key: "getWH",
29483
30096
  value: function getWH() {
29484
30097
  return {
29485
- width: this.canvas.width / (this.canvas.dpr || 1),
29486
- height: this.canvas.height / (this.canvas.dpr || 1)
30098
+ width: this.canvas.displayWidth,
30099
+ height: this.canvas.displayHeight
29487
30100
  };
29488
30101
  }
29489
30102
  }, {
@@ -29512,38 +30125,34 @@
29512
30125
  dpr: params.dpr,
29513
30126
  nativeCanvas: nativeCanvas,
29514
30127
  id: Generator.GenAutoIncrementId().toString(),
29515
- canvasControled: !1
30128
+ canvasControled: !0
29516
30129
  };
29517
- this.canvas = new LynxCanvas(options);
30130
+ this.canvas = new NodeCanvas(options);
29518
30131
  }
29519
30132
  }, {
29520
30133
  key: "createWindowByCanvas",
29521
30134
  value: function createWindowByCanvas(params) {
29522
- var canvas;
29523
- if ("string" == typeof params.canvas) {
29524
- if (canvas = this.global.getElementById(params.canvas), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
29525
- } else canvas = params.canvas;
30135
+ var canvas = params.canvas;
29526
30136
  var width = params.width,
29527
30137
  height = params.height;
29528
- if (null == width || null == height || !params.canvasControled) {
29529
- var data = canvas.getBoundingClientRect();
29530
- width = data.width, height = data.height;
29531
- }
29532
- var dpr = params.dpr;
29533
- null == dpr && (dpr = canvas.width / width), this.canvas = new LynxCanvas({
30138
+ null != width && null != height && params.canvasControled || (width = canvas.width, height = canvas.height), this.canvas = new NodeCanvas({
29534
30139
  width: width,
29535
30140
  height: height,
29536
- dpr: dpr,
30141
+ dpr: 1,
29537
30142
  nativeCanvas: canvas,
29538
30143
  canvasControled: params.canvasControled
29539
30144
  });
29540
30145
  }
29541
30146
  }, {
29542
30147
  key: "releaseWindow",
29543
- value: function releaseWindow() {}
30148
+ value: function releaseWindow() {
30149
+ this.canvas.release();
30150
+ }
29544
30151
  }, {
29545
30152
  key: "resizeWindow",
29546
- value: function resizeWindow(width, height) {}
30153
+ value: function resizeWindow(width, height) {
30154
+ this.canvas.resize(width, height);
30155
+ }
29547
30156
  }, {
29548
30157
  key: "setDpr",
29549
30158
  value: function setDpr(dpr) {
@@ -29565,57 +30174,40 @@
29565
30174
  return this.canvas.dpr;
29566
30175
  }
29567
30176
  }, {
29568
- key: "addEventListener",
29569
- value: function addEventListener(type, listener) {
29570
- this.eventManager.addEventListener(type, listener);
30177
+ key: "getImageBuffer",
30178
+ value: function getImageBuffer() {
30179
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "image/png";
30180
+ return this.canvas.nativeCanvas.toBuffer(type);
29571
30181
  }
29572
30182
  }, {
29573
- key: "removeEventListener",
29574
- value: function removeEventListener(type, listener) {
29575
- this.eventManager.removeEventListener(type, listener);
29576
- }
30183
+ key: "addEventListener",
30184
+ value: function addEventListener(type, listener, options) {}
29577
30185
  }, {
29578
30186
  key: "dispatchEvent",
29579
30187
  value: function dispatchEvent(event) {
29580
- var type = event.type;
29581
- return !!this.eventManager.cache[type] && (event.changedTouches && event.changedTouches[0] && (event.offsetX = event.changedTouches[0].x, event.changedTouches[0].offsetX = event.changedTouches[0].x, event.changedTouches[0].clientX = event.changedTouches[0].x, event.offsetY = event.changedTouches[0].y, event.changedTouches[0].offsetY = event.changedTouches[0].y, event.changedTouches[0].clientY = event.changedTouches[0].y), event.preventDefault = function () {}, event.stopPropagation = function () {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(function (f) {
29582
- f(event);
29583
- }), !0);
30188
+ return !0;
29584
30189
  }
30190
+ }, {
30191
+ key: "removeEventListener",
30192
+ value: function removeEventListener(type, listener, options) {}
29585
30193
  }, {
29586
30194
  key: "getStyle",
29587
- value: function getStyle() {
29588
- return {};
29589
- }
30195
+ value: function getStyle() {}
29590
30196
  }, {
29591
30197
  key: "setStyle",
29592
30198
  value: function setStyle(style) {}
29593
30199
  }, {
29594
30200
  key: "getBoundingClientRect",
29595
30201
  value: function getBoundingClientRect() {
29596
- var wh = this.getWH();
29597
- return {
29598
- x: 0,
29599
- y: 0,
29600
- width: wh.width,
29601
- height: wh.height,
29602
- left: 0,
29603
- top: 0,
29604
- right: 0,
29605
- bottom: 0
29606
- };
30202
+ return null;
29607
30203
  }
29608
30204
  }, {
29609
30205
  key: "clearViewBox",
29610
- value: function clearViewBox(vb, color) {
29611
- var context = this.getContext(),
29612
- dpr = this.getDpr();
29613
- context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
29614
- }
30206
+ value: function clearViewBox(vb, color) {}
29615
30207
  }]);
29616
- return LynxWindowHandlerContribution;
30208
+ return NodeWindowHandlerContribution;
29617
30209
  }(BaseWindowHandlerContribution);
29618
- LynxWindowHandlerContribution.env = "lynx", LynxWindowHandlerContribution = __decorate$E([injectable(), __param$s(0, inject(Global)), __metadata$s("design:paramtypes", [Object])], LynxWindowHandlerContribution);
30210
+ NodeWindowHandlerContribution.env = "node", NodeWindowHandlerContribution = __decorate$E([injectable(), __param$s(0, inject(Global)), __metadata$s("design:paramtypes", [Object])], NodeWindowHandlerContribution);
29619
30211
 
29620
30212
  var windowModules = new ContainerModule(function (bind) {
29621
30213
  bind(BrowserWindowHandlerContribution).toSelf(), bind(WindowHandlerContribution).toDynamicValue(function (ctx) {
@@ -29626,7 +30218,9 @@
29626
30218
  return ctx.container.get(TaroWindowHandlerContribution);
29627
30219
  }).whenTargetNamed(TaroWindowHandlerContribution.env), bind(LynxWindowHandlerContribution).toSelf(), bind(WindowHandlerContribution).toDynamicValue(function (ctx) {
29628
30220
  return ctx.container.get(LynxWindowHandlerContribution);
29629
- }).whenTargetNamed(LynxWindowHandlerContribution.env);
30221
+ }).whenTargetNamed(LynxWindowHandlerContribution.env), bind(NodeWindowHandlerContribution).toSelf(), bind(WindowHandlerContribution).toDynamicValue(function (ctx) {
30222
+ return ctx.container.get(NodeWindowHandlerContribution);
30223
+ }).whenTargetNamed(NodeWindowHandlerContribution.env);
29630
30224
  });
29631
30225
 
29632
30226
  var textMeasureModules = new ContainerModule(function (bind) {
@@ -30142,7 +30736,7 @@
30142
30736
  x2: x + width,
30143
30737
  y2: y + height
30144
30738
  }
30145
- }), context.fillRect(x, y, width, height);
30739
+ }, 0, 0), context.fillRect(x, y, width, height);
30146
30740
  }
30147
30741
  }
30148
30742
  }]);
@@ -32738,8 +33332,20 @@
32738
33332
  }).whenTargetNamed(LynxContext2d.env);
32739
33333
  });
32740
33334
 
33335
+ var nodeModule = new ContainerModule(function (bind) {
33336
+ bind(CanvasFactory).toDynamicValue(function () {
33337
+ return function (params) {
33338
+ return new NodeCanvas(params);
33339
+ };
33340
+ }).whenTargetNamed(NodeCanvas.env), bind(Context2dFactory).toDynamicValue(function () {
33341
+ return function (params, dpr) {
33342
+ return new NodeContext2d(params, dpr);
33343
+ };
33344
+ }).whenTargetNamed(NodeContext2d.env);
33345
+ });
33346
+
32741
33347
  function load(container) {
32742
- container.load(browserModule), container.load(feishuModule), container.load(taroModule), container.load(lynxModule);
33348
+ container.load(browserModule), container.load(feishuModule), container.load(taroModule), container.load(lynxModule), container.load(nodeModule);
32743
33349
  }
32744
33350
 
32745
33351
  container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$3(container), load$2(container), load$1(container), load(container);
@@ -33243,7 +33849,7 @@
33243
33849
  }, Object.assign({
33244
33850
  renderStyle: _this6.renderStyle
33245
33851
  }, params));
33246
- }), this.combineLayersToWindow(), this.hooks.afterRender.call(this);
33852
+ }), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear(), this.hooks.afterRender.call(this);
33247
33853
  }
33248
33854
  }, {
33249
33855
  key: "combineLayersToWindow",
@@ -38870,6 +39476,23 @@
38870
39476
  }, scale.ratio = ratio, scale.padding = padding, scale.width = width, scale.height = height, scale;
38871
39477
  }
38872
39478
  function boundToRange($, bound) {
39479
+ var clamp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
39480
+ if (clamp) {
39481
+ var x1 = bound.x1,
39482
+ x2 = bound.x2,
39483
+ y1 = bound.y1,
39484
+ y2 = bound.y2,
39485
+ _x1 = clamp$1(x1, 0, $.width),
39486
+ _x2 = clamp$1(x2, 0, $.width),
39487
+ _y1 = clamp$1(y1, 0, $.height),
39488
+ _y2 = clamp$1(y2, 0, $.height);
39489
+ return {
39490
+ x1: $(_x1),
39491
+ x2: $(_x2),
39492
+ y1: $(_y1),
39493
+ y2: $(_y2)
39494
+ };
39495
+ }
38873
39496
  return {
38874
39497
  x1: $(bound.x1),
38875
39498
  x2: $(bound.x2),
@@ -38890,9 +39513,10 @@
38890
39513
  var candidates = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
38891
39514
  var clampForce = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
38892
39515
  for (var i = 0; i < candidates.length; i++) {
38893
- var tempText = createText(text.attribute);
38894
- if (tempText.setAttributes(candidates[i]), tempText.update(), canPlace($, bitmap, boundToRange($, tempText.AABBBounds), clampForce)) return bitmap.setRange(boundToRange($, tempText.AABBBounds)), text.setAttributes(candidates[i]), !0;
39516
+ var tempText = text.clone();
39517
+ if (tempText.setAttributes(candidates[i]), tempText.update(), canPlace($, bitmap, boundToRange($, tempText.AABBBounds), clampForce)) return bitmap.setRange(boundToRange($, tempText.AABBBounds, !0)), candidates[i];
38895
39518
  }
39519
+ return !1;
38896
39520
  }
38897
39521
  function place$2($, bitmap, s, attrs, text, bounds, labeling) {
38898
39522
  var _a, _b, _c;
@@ -38901,7 +39525,7 @@
38901
39525
  var candidates = ((isFunction(s.position) ? s.position(text.attribute) : s.position) || defaultLabelPosition(attrs.type)).map(function (p) {
38902
39526
  return labeling(text.AABBBounds, bounds, p, attrs.offset);
38903
39527
  });
38904
- return !!placeToCandidates($, bitmap, text, candidates, null === (_a = attrs.overlap) || void 0 === _a ? void 0 : _a.clampForce);
39528
+ return placeToCandidates($, bitmap, text, candidates, null === (_a = attrs.overlap) || void 0 === _a ? void 0 : _a.clampForce);
38905
39529
  }
38906
39530
  return !1;
38907
39531
  }
@@ -38912,7 +39536,7 @@
38912
39536
  y: text.attribute.y + dy
38913
39537
  };
38914
39538
  });
38915
- return !!placeToCandidates($, bitmap, text, _candidates, null === (_b = attrs.overlap) || void 0 === _b ? void 0 : _b.clampForce);
39539
+ return placeToCandidates($, bitmap, text, _candidates, null === (_b = attrs.overlap) || void 0 === _b ? void 0 : _b.clampForce);
38916
39540
  }
38917
39541
  if ("moveX" === s.type) {
38918
39542
  var _candidates2 = (s.offset ? isFunction(s.offset) ? s.offset(text.attribute) : s.offset : []).map(function (dx) {
@@ -38921,7 +39545,7 @@
38921
39545
  y: text.attribute.y
38922
39546
  };
38923
39547
  });
38924
- return !!placeToCandidates($, bitmap, text, _candidates2, null === (_c = attrs.overlap) || void 0 === _c ? void 0 : _c.clampForce);
39548
+ return placeToCandidates($, bitmap, text, _candidates2, null === (_c = attrs.overlap) || void 0 === _c ? void 0 : _c.clampForce);
38925
39549
  }
38926
39550
  return !1;
38927
39551
  }
@@ -39113,7 +39737,7 @@
39113
39737
  return "bound" === s.type;
39114
39738
  });
39115
39739
  avoidBaseMark && (null === (_d = this._baseMarks) || void 0 === _d || _d.forEach(function (mark) {
39116
- mark.AABBBounds && bitmap.setRange(boundToRange(bmpTool, mark.AABBBounds));
39740
+ mark.AABBBounds && bitmap.setRange(boundToRange(bmpTool, mark.AABBBounds, !0));
39117
39741
  }));
39118
39742
  for (var i = 0; i < labels.length; i++) {
39119
39743
  if (!1 === labels[i].visible) continue;
@@ -39121,30 +39745,29 @@
39121
39745
  baseMark = null === (_e = this._baseMarks) || void 0 === _e ? void 0 : _e[i];
39122
39746
  if (text.update(), canPlace(bmpTool, bitmap, text.AABBBounds, clampForce)) {
39123
39747
  if (!checkBounds) {
39124
- bitmap.setRange(boundToRange(bmpTool, text.AABBBounds)), result.push(Object.assign(Object.assign({}, text.attribute), {
39125
- _insideGraphic: canPlaceInside(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds),
39126
- _computedBound: text.AABBBounds
39748
+ bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(Object.assign(Object.assign({}, text.attribute), {
39749
+ _insideGraphic: canPlaceInside(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds)
39127
39750
  }));
39128
39751
  continue;
39129
39752
  }
39130
39753
  if (checkBounds && (null == baseMark ? void 0 : baseMark.AABBBounds) && canPlaceInside(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds)) {
39131
- bitmap.setRange(boundToRange(bmpTool, text.AABBBounds)), result.push(Object.assign(Object.assign({}, text.attribute), {
39754
+ bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(Object.assign(Object.assign({}, text.attribute), {
39132
39755
  _insideGraphic: !0,
39133
39756
  _computedBound: text.AABBBounds
39134
39757
  }));
39135
39758
  continue;
39136
39759
  }
39137
39760
  }
39138
- for (var j = 0; j < strategy.length; j++) {
39139
- if (place$2(bmpTool, bitmap, strategy[j], this.attribute, text, this.getGraphicBounds(baseMark, labels[i]), this.labeling)) {
39140
- result.push(Object.assign(Object.assign({}, text.attribute), {
39141
- _insideGraphic: canPlaceInside(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds),
39142
- _computedBound: text.AABBBounds
39143
- }));
39144
- break;
39145
- }
39761
+ var hasPlace = !1;
39762
+ for (var j = 0; j < strategy.length; j++) if (hasPlace = place$2(bmpTool, bitmap, strategy[j], this.attribute, text, this.getGraphicBounds(baseMark, labels[i]), this.labeling), !1 !== hasPlace) {
39763
+ result.push(Object.assign(Object.assign({}, text.attribute), {
39764
+ x: hasPlace.x,
39765
+ y: hasPlace.y,
39766
+ _insideGraphic: canPlaceInside(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds)
39767
+ }));
39768
+ break;
39146
39769
  }
39147
- !hideOnHit && result.push(Object.assign(Object.assign({}, text.attribute), {
39770
+ !hasPlace && !hideOnHit && result.push(Object.assign(Object.assign({}, text.attribute), {
39148
39771
  _insideGraphic: canPlaceInside(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds),
39149
39772
  _computedBound: text.AABBBounds
39150
39773
  }));
@@ -41040,7 +41663,7 @@
41040
41663
  attPos = _this$_layoutCache.attPos,
41041
41664
  max = _this$_layoutCache.max,
41042
41665
  dis = (pos[attPos] - _this._activeCache.lastPos[attPos]) / max;
41043
- _this._activeState && (_this._activeTag === DataZoomActiveTag.middleHandler ? _this.moveZoomWithMiddle((_this.state.start + _this.state.end) / 2 + dis) : _this._activeTag === DataZoomActiveTag.startHandler ? _this.state.start + dis > _this.state.end ? (_this.state.start = _this.state.end, _this.state.end = _this.state.start + dis, _this._activeTag = DataZoomActiveTag.endHandler) : _this.state.start = _this.state.start + dis : _this._activeTag === DataZoomActiveTag.endHandler && (_this.state.end + dis < _this.state.start ? (_this.state.end = _this.state.start, _this.state.start = _this.state.end + dis, _this._activeTag = DataZoomActiveTag.startHandler) : _this.state.end = _this.state.end + dis), _this._activeCache.lastPos = pos), _this.state.start = Math.min(Math.max(_this.state.start, 0), 1), _this.state.end = Math.min(Math.max(_this.state.end, 0), 1), brushSelect && _this.renderDragMask(), start === _this.state.start && end === _this.state.end || (_this.setAttributes({
41666
+ _this._activeState && (_this._activeTag === DataZoomActiveTag.middleHandler ? _this.moveZoomWithMiddle((_this.state.start + _this.state.end) / 2 + dis) : _this._activeTag === DataZoomActiveTag.startHandler ? _this.state.start + dis > _this.state.end ? (_this.state.start = _this.state.end, _this.state.end = _this.state.start + dis, _this._activeTag = DataZoomActiveTag.endHandler) : _this.state.start = _this.state.start + dis : _this._activeTag === DataZoomActiveTag.endHandler && (_this.state.end + dis < _this.state.start ? (_this.state.end = _this.state.start, _this.state.start = _this.state.end + dis, _this._activeTag = DataZoomActiveTag.startHandler) : _this.state.end = _this.state.end + dis), _this._activeCache.lastPos = pos, brushSelect && _this.renderDragMask()), _this.state.start = Math.min(Math.max(_this.state.start, 0), 1), _this.state.end = Math.min(Math.max(_this.state.end, 0), 1), start === _this.state.start && end === _this.state.end || (_this.setAttributes({
41044
41667
  start: _this.state.start,
41045
41668
  end: _this.state.end
41046
41669
  }), _this._updateStateCallback && _this._updateStateCallback(_this.state.start, _this.state.end));
@@ -41087,7 +41710,7 @@
41087
41710
  return _this2._onHandlerPointerDown(e, "background");
41088
41711
  }), this._selectedPreviewGroup && this._selectedPreviewGroup.addEventListener("pointerdown", function (e) {
41089
41712
  return _this2._onHandlerPointerDown(e, selectedTag);
41090
- }), "browser" === global$1.env && (global$1.addEventListener("pointermove", this._onHandlerPointerMove.bind(this)), global$1.addEventListener("pointerup", this._onHandlerPointerUp.bind(this))), this.addEventListener("pointermove", this._onHandlerPointerMove), this.addEventListener("pointerup", this._onHandlerPointerUp), this.addEventListener("pointerside", this._onHandlerPointerUp), "auto" === showDetail && (this.addEventListener("pointerenter", this._onHandlerPointerEnter), this.addEventListener("pointerleave", this._onHandlerPointerLeave));
41713
+ }), "browser" === global$1.env && (global$1.addEventListener("pointermove", this._onHandlerPointerMove.bind(this)), global$1.addEventListener("pointerup", this._onHandlerPointerUp.bind(this))), this.addEventListener("pointermove", this._onHandlerPointerMove), this.addEventListener("pointerup", this._onHandlerPointerUp), this.addEventListener("pointerupoutside", this._onHandlerPointerUp), "auto" === showDetail && (this.addEventListener("pointerenter", this._onHandlerPointerEnter), this.addEventListener("pointerleave", this._onHandlerPointerLeave));
41091
41714
  }
41092
41715
  }, {
41093
41716
  key: "dragMaskSize",
@@ -41162,13 +41785,13 @@
41162
41785
  width = _this$getLayoutAttrFr.width,
41163
41786
  height = _this$getLayoutAttrFr.height;
41164
41787
  this._isHorizontal ? this._dragMask = this._container.createOrUpdateChild("dragMask", Object.assign({
41165
- x: this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x,
41788
+ x: clamp$1(this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x, position.x, position.x + width),
41166
41789
  y: position.y,
41167
41790
  width: this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize()) || 0,
41168
41791
  height: height
41169
41792
  }, dragMaskStyle), "rect") : this._dragMask = this._container.createOrUpdateChild("dragMask", Object.assign({
41170
41793
  x: position.x,
41171
- y: this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y,
41794
+ y: clamp$1(this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y, position.y, position.y + height),
41172
41795
  width: width,
41173
41796
  height: this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize()) || 0
41174
41797
  }, dragMaskStyle), "rect");
@@ -41240,31 +41863,34 @@
41240
41863
  }, {
41241
41864
  key: "getLayoutAttrFromConfig",
41242
41865
  value: function getLayoutAttrFromConfig() {
41243
- var _a, _b, _c, _d, _e, _f, _g, _h;
41866
+ var _a, _b;
41867
+ if (this._layoutAttrFromConfig) return this._layoutAttrFromConfig;
41244
41868
  var _this$attribute6 = this.attribute,
41245
41869
  positionConfig = _this$attribute6.position,
41246
41870
  size = _this$attribute6.size,
41247
41871
  orient = _this$attribute6.orient,
41248
41872
  middleHandlerStyle = _this$attribute6.middleHandlerStyle,
41249
41873
  widthConfig = size.width,
41250
- heightConfig = size.height;
41874
+ heightConfig = size.height,
41875
+ middleHandlerSize = null !== (_b = null === (_a = null == middleHandlerStyle ? void 0 : middleHandlerStyle.background) || void 0 === _a ? void 0 : _a.size) && void 0 !== _b ? _b : 10;
41251
41876
  var width, height, position;
41252
- return (null == middleHandlerStyle ? void 0 : middleHandlerStyle.visible) ? this._isHorizontal ? (width = widthConfig, height = heightConfig - (null !== (_b = null === (_a = middleHandlerStyle.background) || void 0 === _a ? void 0 : _a.size) && void 0 !== _b ? _b : 10), position = {
41877
+ return (null == middleHandlerStyle ? void 0 : middleHandlerStyle.visible) ? this._isHorizontal ? (width = widthConfig, height = heightConfig - middleHandlerSize, position = {
41253
41878
  x: positionConfig.x,
41254
- y: positionConfig.y + (null !== (_d = null === (_c = middleHandlerStyle.background) || void 0 === _c ? void 0 : _c.size) && void 0 !== _d ? _d : 10)
41255
- }) : (width = widthConfig - (null !== (_f = null === (_e = middleHandlerStyle.background) || void 0 === _e ? void 0 : _e.size) && void 0 !== _f ? _f : 10), height = heightConfig, position = {
41256
- x: positionConfig.x + ("left" === orient ? null !== (_h = null === (_g = middleHandlerStyle.background) || void 0 === _g ? void 0 : _g.size) && void 0 !== _h ? _h : 10 : 0),
41879
+ y: positionConfig.y + middleHandlerSize
41880
+ }) : (width = widthConfig - middleHandlerSize, height = heightConfig, position = {
41881
+ x: positionConfig.x + ("left" === orient ? middleHandlerSize : 0),
41257
41882
  y: positionConfig.y
41258
- }) : (width = widthConfig, height = heightConfig, position = positionConfig), {
41883
+ }) : (width = widthConfig, height = heightConfig, position = positionConfig), this._layoutAttrFromConfig = {
41259
41884
  position: position,
41260
41885
  width: width,
41261
41886
  height: height
41262
- };
41887
+ }, this._layoutAttrFromConfig;
41263
41888
  }
41264
41889
  }, {
41265
41890
  key: "render",
41266
41891
  value: function render() {
41267
41892
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
41893
+ this._layoutAttrFromConfig = null;
41268
41894
  var _this$attribute7 = this.attribute,
41269
41895
  orient = _this$attribute7.orient,
41270
41896
  backgroundStyle = _this$attribute7.backgroundStyle,
@@ -67425,9 +68051,10 @@
67425
68051
  const layoutRect = zItems[0].getLayoutRect();
67426
68052
  extraWH = layoutRect;
67427
68053
  }
67428
- this._rightCurrent -= extraWH.width;
67429
- this._topCurrent += (extraWH.height / 4) * 3;
67430
- this._bottomCurrent -= extraWH.height / 4;
68054
+ this._leftCurrent += extraWH.width / 8;
68055
+ this._rightCurrent -= extraWH.width / 8;
68056
+ this._topCurrent += extraWH.height / 8;
68057
+ this._bottomCurrent -= extraWH.height / 8;
67431
68058
  const offsetWH = {
67432
68059
  offsetBottom: 0,
67433
68060
  offsetTop: 0,
@@ -73442,13 +74069,13 @@
73442
74069
  if (isZ) {
73443
74070
  const directionStr = this.directionStr ?? 'r2l';
73444
74071
  const depthZ = this.layout3dBox ? this.layout3dBox.width : 0;
73445
- let anchor3d = this._spec.depth ? [0, 0] : undefined;
73446
- let alpha = this._spec.depth ? -Math.PI / 2 : 0;
74072
+ let anchor3d = [0, 0];
74073
+ let alpha = -Math.PI / 2;
73447
74074
  let z = 0;
73448
74075
  if (directionStr === 'l2r') {
73449
74076
  z = this.layout3dBox.length;
73450
- anchor3d = this._spec.depth ? [0, 0, 0] : undefined;
73451
- alpha = this._spec.depth ? Math.PI / 2 : 0;
74077
+ anchor3d = [0, 0, 0];
74078
+ alpha = Math.PI / 2;
73452
74079
  }
73453
74080
  return {
73454
74081
  start: { x: 0, y: 0 },
@@ -95913,7 +96540,7 @@
95913
96540
  Factory.registerLayout('grid', GridLayout$1);
95914
96541
  Factory.registerLayout('layout3d', Layout3d);
95915
96542
 
95916
- const version = "0.2.0";
96543
+ const version = "1.0.0";
95917
96544
 
95918
96545
  exports.AreaChart = AreaChart;
95919
96546
  exports.AreaSeries = AreaSeries;