@visactor/vutils-extension 1.4.0-alpha.2 → 1.4.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -328,53 +328,69 @@
328
328
  var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
329
329
 
330
330
  const isType = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
331
+ var isType$1 = isType;
331
332
 
332
333
  const isBoolean = function (value) {
333
334
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
334
- return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType(value, "Boolean");
335
+ return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
335
336
  };
337
+ var isBoolean$1 = isBoolean;
336
338
 
337
339
  const isFunction = value => "function" == typeof value;
340
+ var isFunction$1 = isFunction;
338
341
 
339
342
  const isNil = value => null == value;
343
+ var isNil$1 = isNil;
340
344
 
341
345
  const isValid = value => null != value;
346
+ var isValid$1 = isValid;
342
347
 
343
348
  const isObject$e = value => {
344
349
  const type = typeof value;
345
350
  return null !== value && "object" === type || "function" === type;
346
351
  };
352
+ var isObject$f = isObject$e;
347
353
 
348
354
  const isString = function (value) {
349
355
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
350
356
  const type = typeof value;
351
- return fuzzy ? "string" === type : "string" === type || isType(value, "String");
357
+ return fuzzy ? "string" === type : "string" === type || isType$1(value, "String");
352
358
  };
359
+ var isString$1 = isString;
353
360
 
354
- const isArray$3 = value => Array.isArray ? Array.isArray(value) : isType(value, "Array");
361
+ const isArray$3 = value => Array.isArray ? Array.isArray(value) : isType$1(value, "Array");
362
+ var isArray$4 = isArray$3;
355
363
 
356
364
  const isArrayLike = function (value) {
357
365
  return null !== value && "function" != typeof value && Number.isFinite(value.length);
358
366
  };
367
+ var isArrayLike$1 = isArrayLike;
359
368
 
360
- const isDate = value => isType(value, "Date");
369
+ const isDate = value => isType$1(value, "Date");
370
+ var isDate$1 = isDate;
361
371
 
362
372
  const isNumber = function (value) {
363
373
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
364
374
  const type = typeof value;
365
- return fuzzy ? "number" === type : "number" === type || isType(value, "Number");
375
+ return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
366
376
  };
377
+ var isNumber$1 = isNumber;
367
378
 
368
- const isValidNumber = value => isNumber(value) && Number.isFinite(value);
379
+ const isValidNumber = value => isNumber$1(value) && Number.isFinite(value);
380
+ var isValidNumber$1 = isValidNumber;
369
381
 
370
382
  const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
383
+ var isValidUrl$1 = isValidUrl;
371
384
 
372
- const isRegExp = value => isType(value, "RegExp");
385
+ const isRegExp = value => isType$1(value, "RegExp");
386
+ var isRegExp$1 = isRegExp;
373
387
 
374
388
  const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
389
+ var isBase64$1 = isBase64;
375
390
 
376
391
  const hasOwnProperty$1 = Object.prototype.hasOwnProperty,
377
392
  has$1 = (object, key) => null != object && hasOwnProperty$1.call(object, key);
393
+ var has$2 = has$1;
378
394
 
379
395
  function getRegExpFlags(re) {
380
396
  let flags = "";
@@ -391,7 +407,7 @@
391
407
  if (0 === depth) return parent;
392
408
  let child;
393
409
  if ("object" != typeof parent) return parent;
394
- if (isArray$3(parent) ? child = [] : isRegExp(parent) ? (child = new RegExp(parent.source, getRegExpFlags(parent)), parent.lastIndex && (child.lastIndex = parent.lastIndex)) : child = isDate(parent) ? new Date(parent.getTime()) : void 0 === prototype ? Object.create(Object.getPrototypeOf(parent)) : Object.create(prototype), circular) {
410
+ if (isArray$4(parent) ? child = [] : isRegExp$1(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) {
395
411
  const index = allParents.indexOf(parent);
396
412
  if (-1 !== index) return allChildren[index];
397
413
  allParents.push(parent), allChildren.push(child);
@@ -402,25 +418,17 @@
402
418
  }
403
419
 
404
420
  function last(val) {
405
- if (isArrayLike(val)) {
421
+ if (isArrayLike$1(val)) {
406
422
  return val[val.length - 1];
407
423
  }
408
424
  }
409
425
  function arrayEqual(a, b) {
410
- if (!isArray$3(a) || !isArray$3(b)) return !1;
426
+ if (!isArray$4(a) || !isArray$4(b)) return !1;
411
427
  if (a.length !== b.length) return !1;
412
428
  for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return !1;
413
429
  return !0;
414
430
  }
415
431
 
416
- let hasRaf = !1;
417
- try {
418
- hasRaf = "function" == typeof requestAnimationFrame && "function" == typeof cancelAnimationFrame;
419
- } catch (err) {
420
- hasRaf = !1;
421
- }
422
- hasRaf = !1;
423
-
424
432
  const epsilon = 1e-12;
425
433
  const pi = Math.PI;
426
434
  const halfPi$1 = pi / 2;
@@ -466,10 +474,10 @@
466
474
  return this.x = x, this.y = y, this;
467
475
  }
468
476
  add(point) {
469
- return isNumber(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
477
+ return isNumber$1(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
470
478
  }
471
479
  sub(point) {
472
- return isNumber(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
480
+ return isNumber$1(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
473
481
  }
474
482
  multi(point) {
475
483
  throw new Error("暂不支持");
@@ -539,7 +547,7 @@
539
547
  }
540
548
  expand() {
541
549
  let d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
542
- return isArray$3(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
550
+ return isArray$4(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
543
551
  }
544
552
  round() {
545
553
  return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
@@ -863,15 +871,15 @@
863
871
 
864
872
  class TextMeasure {
865
873
  constructor(option, textSpec) {
866
- this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
874
+ this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$1(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$1(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
867
875
  }
868
876
  initContext() {
869
877
  if (this._notSupportCanvas) return !1;
870
- if (isNil(this._canvas) && (isValid(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil(this._canvas) && "undefined" != typeof window && void 0 !== window.document && isValid(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil(this._context) && isValid(this._canvas)) {
878
+ if (isNil$1(this._canvas) && (isValid$1(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$1(this._canvas) && "undefined" != typeof window && void 0 !== window.document && isValid$1(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$1(this._context) && isValid$1(this._canvas)) {
871
879
  const context = this._canvas.getContext("2d");
872
- isValid(context) && (context.save(), context.font = getContextFont$1(this.textSpec), this._contextSaved = !0, this._context = context);
880
+ isValid$1(context) && (context.save(), context.font = getContextFont$1(this.textSpec), this._contextSaved = !0, this._context = context);
873
881
  }
874
- return !isNil(this._context) || (this._notSupportCanvas = !0, !1);
882
+ return !isNil$1(this._context) || (this._notSupportCanvas = !0, !1);
875
883
  }
876
884
  _initSpec() {
877
885
  var _a, _b, _c;
@@ -919,11 +927,11 @@
919
927
  }
920
928
  }
921
929
  fullMeasure(text) {
922
- if (isNil(text)) return {
930
+ if (isNil$1(text)) return {
923
931
  width: 0,
924
932
  height: 0
925
933
  };
926
- if (isNil(this._option.getTextBounds) || !this._notSupportVRender) return this.measureWithNaiveCanvas(text);
934
+ if (isNil$1(this._option.getTextBounds) || !this._notSupportVRender) return this.measureWithNaiveCanvas(text);
927
935
  const {
928
936
  fontFamily: fontFamily,
929
937
  fontSize: fontSize,
@@ -982,7 +990,7 @@
982
990
  for (let i = 0; i < text.length; i++) {
983
991
  const char = text[i];
984
992
  let size = this._measureSpecialChar(char);
985
- isNil(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height);
993
+ isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height);
986
994
  }
987
995
  return totalSize;
988
996
  }
@@ -1014,9 +1022,9 @@
1014
1022
  width: 0,
1015
1023
  height: 0
1016
1024
  };
1017
- if (isNil(text)) return defaultResult;
1018
- if (isArray$3(text)) {
1019
- const textArr = text.filter(isValid).map(s => s.toString());
1025
+ if (isNil$1(text)) return defaultResult;
1026
+ if (isArray$4(text)) {
1027
+ const textArr = text.filter(isValid$1).map(s => s.toString());
1020
1028
  return 0 === textArr.length ? defaultResult : 1 === textArr.length ? processor(textArr[0]) : {
1021
1029
  width: textArr.reduce((maxWidth, cur) => Math.max(maxWidth, processor(cur).width), 0),
1022
1030
  height: textArr.length * ((null != lineHeight ? lineHeight : fontSize) + 1) + 1
@@ -1025,7 +1033,7 @@
1025
1033
  return processor(text.toString());
1026
1034
  }
1027
1035
  _measureNumberChar() {
1028
- if (isNil(this._numberCharSize)) {
1036
+ if (isNil$1(this._numberCharSize)) {
1029
1037
  const numberBounds = this._standardMethod(TextMeasure.NUMBERS_CHAR_SET);
1030
1038
  this._numberCharSize = {
1031
1039
  width: numberBounds.width / TextMeasure.NUMBERS_CHAR_SET.length,
@@ -1035,10 +1043,10 @@
1035
1043
  return this._numberCharSize;
1036
1044
  }
1037
1045
  _measureFullSizeChar() {
1038
- return isNil(this._fullCharSize) && (this._fullCharSize = this._standardMethod(TextMeasure.FULL_SIZE_CHAR)), this._fullCharSize;
1046
+ return isNil$1(this._fullCharSize) && (this._fullCharSize = this._standardMethod(TextMeasure.FULL_SIZE_CHAR)), this._fullCharSize;
1039
1047
  }
1040
1048
  _measureLetterChar() {
1041
- if (isNil(this._letterCharSize)) {
1049
+ if (isNil$1(this._letterCharSize)) {
1042
1050
  const alphabetBounds = this._standardMethod(TextMeasure.ALPHABET_CHAR_SET);
1043
1051
  this._letterCharSize = {
1044
1052
  width: alphabetBounds.width / TextMeasure.ALPHABET_CHAR_SET.length,
@@ -1048,19 +1056,14 @@
1048
1056
  return this._letterCharSize;
1049
1057
  }
1050
1058
  _measureSpecialChar(char) {
1051
- return isValid(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
1059
+ return isValid$1(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
1052
1060
  }
1053
1061
  release() {
1054
- isValid(this._canvas) && (this._canvas = null), isValid(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
1062
+ isValid$1(this._canvas) && (this._canvas = null), isValid$1(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
1055
1063
  }
1056
1064
  }
1057
1065
  TextMeasure.ALPHABET_CHAR_SET = "abcdefghijklmnopqrstuvwxyz", TextMeasure.NUMBERS_CHAR_SET = "0123456789", TextMeasure.FULL_SIZE_CHAR = "字";
1058
1066
 
1059
- var LoggerLevel;
1060
- !function (LoggerLevel) {
1061
- LoggerLevel[LoggerLevel.None = 0] = "None", LoggerLevel[LoggerLevel.Error = 1] = "Error", LoggerLevel[LoggerLevel.Warn = 2] = "Warn", LoggerLevel[LoggerLevel.Info = 3] = "Info", LoggerLevel[LoggerLevel.Debug = 4] = "Debug";
1062
- }(LoggerLevel || (LoggerLevel = {}));
1063
-
1064
1067
  var ScaleEnum;
1065
1068
  !function (ScaleEnum) {
1066
1069
  ScaleEnum.Identity = "identity", ScaleEnum.Linear = "linear", ScaleEnum.Log = "log", ScaleEnum.Pow = "pow", ScaleEnum.Sqrt = "sqrt", ScaleEnum.Symlog = "symlog", ScaleEnum.Time = "time", ScaleEnum.Quantile = "quantile", ScaleEnum.Quantize = "quantize", ScaleEnum.Threshold = "threshold", ScaleEnum.Ordinal = "ordinal", ScaleEnum.Point = "point", ScaleEnum.Band = "band";
@@ -8190,6 +8193,7 @@
8190
8193
  angle: 0,
8191
8194
  alpha: 0,
8192
8195
  beta: 0,
8196
+ scaleCenter: [0, 0],
8193
8197
  anchor: [0, 0],
8194
8198
  anchor3d: [0, 0],
8195
8199
  postMatrix: new Matrix()
@@ -8320,7 +8324,8 @@
8320
8324
  segments: [],
8321
8325
  curveType: "linear",
8322
8326
  clipRange: 1,
8323
- clipRangeByDimension: "default"
8327
+ clipRangeByDimension: "default",
8328
+ closePath: !1
8324
8329
  });
8325
8330
  const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
8326
8331
  path: new CustomPath2D(),
@@ -9611,26 +9616,26 @@
9611
9616
  return this.removeChild(child);
9612
9617
  }
9613
9618
  addEventListener(type, listener, options) {
9614
- const capture = isBoolean(options, !0) && options || isObject$e(options) && options.capture,
9615
- once = isObject$e(options) && options.once,
9616
- context = isFunction(listener) ? void 0 : listener;
9617
- return type = capture ? `${type}capture` : type, listener = isFunction(listener) ? listener : listener.handleEvent, once ? super.once(type, listener, context) : super.on(type, listener, context), this;
9619
+ const capture = isBoolean$1(options, !0) && options || isObject$f(options) && options.capture,
9620
+ once = isObject$f(options) && options.once,
9621
+ context = isFunction$1(listener) ? void 0 : listener;
9622
+ return type = capture ? `${type}capture` : type, listener = isFunction$1(listener) ? listener : listener.handleEvent, once ? super.once(type, listener, context) : super.on(type, listener, context), this;
9618
9623
  }
9619
9624
  on(type, listener, options) {
9620
9625
  return this.addEventListener(type, listener, options);
9621
9626
  }
9622
9627
  removeEventListener(type, listener, options) {
9623
- const capture = isBoolean(options, !0) && options || isObject$e(options) && options.capture,
9624
- context = isFunction(listener) ? void 0 : listener;
9625
- type = capture ? `${type}capture` : type, listener = isFunction(listener) ? listener : listener.handleEvent;
9626
- const once = isObject$e(options) && options.once;
9628
+ const capture = isBoolean$1(options, !0) && options || isObject$f(options) && options.capture,
9629
+ context = isFunction$1(listener) ? void 0 : listener;
9630
+ type = capture ? `${type}capture` : type, listener = isFunction$1(listener) ? listener : listener.handleEvent;
9631
+ const once = isObject$f(options) && options.once;
9627
9632
  return super.off(type, listener, context, once), this;
9628
9633
  }
9629
9634
  off(type, listener, options) {
9630
9635
  return this.removeEventListener(type, listener, options);
9631
9636
  }
9632
9637
  once(type, listener, options) {
9633
- return isObject$e(options) ? (options.once = !0, this.addEventListener(type, listener, options)) : this.addEventListener(type, listener, {
9638
+ return isObject$f(options) ? (options.once = !0, this.addEventListener(type, listener, options)) : this.addEventListener(type, listener, {
9634
9639
  once: !0
9635
9640
  });
9636
9641
  }
@@ -10477,7 +10482,7 @@
10477
10482
  const parseStroke = stroke => {
10478
10483
  var _a;
10479
10484
  let isFullStroke = !0;
10480
- if (isBoolean(stroke, !0)) {
10485
+ if (isBoolean$1(stroke, !0)) {
10481
10486
  for (let i = 0; i < 4; i++) _strokeVec4[i] = stroke, isFullStroke && (isFullStroke = !(null !== (_a = _strokeVec4[i]) && void 0 !== _a && !_a));
10482
10487
  isFullStroke = stroke;
10483
10488
  } else if (Array.isArray(stroke)) for (let i = 0; i < 4; i++) _strokeVec4[i] = !!stroke[i], isFullStroke && (isFullStroke = !!_strokeVec4[i]);else _strokeVec4[0] = !1, _strokeVec4[1] = !1, _strokeVec4[2] = !1, _strokeVec4[3] = !1;
@@ -10487,7 +10492,7 @@
10487
10492
  };
10488
10493
  };
10489
10494
  const _paddingVec4 = [0, 0, 0, 0];
10490
- const parsePadding = padding => padding ? isArray$3(padding) ? 0 === padding.length ? 0 : 1 === padding.length ? padding[0] : 2 === padding.length ? (_paddingVec4[0] = padding[0], _paddingVec4[2] = padding[0], _paddingVec4[1] = padding[1], _paddingVec4[3] = padding[1], _paddingVec4) : padding : padding : 0;
10495
+ const parsePadding = padding => padding ? isArray$4(padding) ? 0 === padding.length ? 0 : 1 === padding.length ? padding[0] : 2 === padding.length ? (_paddingVec4[0] = padding[0], _paddingVec4[2] = padding[0], _paddingVec4[1] = padding[1], _paddingVec4[3] = padding[1], _paddingVec4) : padding : padding : 0;
10491
10496
  const _coords = [{
10492
10497
  x: 0,
10493
10498
  y: 0
@@ -10556,7 +10561,7 @@
10556
10561
  return points;
10557
10562
  }
10558
10563
  function getAttributeFromDefaultAttrList(attr, key) {
10559
- if (isArray$3(attr)) {
10564
+ if (isArray$4(attr)) {
10560
10565
  let val;
10561
10566
  for (let i = 0; i < attr.length && void 0 === val; i++) val = attr[i][key];
10562
10567
  return val;
@@ -10739,7 +10744,7 @@
10739
10744
  };
10740
10745
 
10741
10746
  const reverseNames = {};
10742
- for (const name in colorNames) has$1(colorNames, name) && (reverseNames[colorNames[name]] = name);
10747
+ for (const name in colorNames) has$2(colorNames, name) && (reverseNames[colorNames[name]] = name);
10743
10748
  const cs = {
10744
10749
  to: {},
10745
10750
  get: {}
@@ -11177,7 +11182,7 @@
11177
11182
  const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({
11178
11183
  [key]: value
11179
11184
  }, this.attribute, key, context);
11180
- params ? this._setAttributes(params, forceUpdateTag, context) : isNil(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key && this.loadImage(value, !0);
11185
+ params ? this._setAttributes(params, forceUpdateTag, context) : isNil$1(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key && this.loadImage(value, !0);
11181
11186
  }
11182
11187
  needUpdateTags(keys) {
11183
11188
  for (let i = 0; i < GRAPHIC_UPDATE_TAG_KEY.length; i++) {
@@ -11313,7 +11318,7 @@
11313
11318
  d ? (d.bounds && this.tryUpdateAABBBounds("imprecise" === this.attribute.boundsMode), d.trans && this.tryUpdateLocalTransMatrix()) : (this.tryUpdateAABBBounds("imprecise" === this.attribute.boundsMode), this.tryUpdateLocalTransMatrix());
11314
11319
  }
11315
11320
  hasState(stateName) {
11316
- return !(!this.currentStates || !this.currentStates.length) && (!!isNil(stateName) || this.currentStates.includes(stateName));
11321
+ return !(!this.currentStates || !this.currentStates.length) && (!!isNil$1(stateName) || this.currentStates.includes(stateName));
11317
11322
  }
11318
11323
  getState(stateName) {
11319
11324
  var _a;
@@ -11345,7 +11350,7 @@
11345
11350
  return this.animates && this.animates.forEach(animate => {
11346
11351
  if (animate.stateNames) {
11347
11352
  const endProps = animate.getEndProps();
11348
- has$1(endProps, key) && (value = endProps[key]);
11353
+ has$2(endProps, key) && (value = endProps[key]);
11349
11354
  }
11350
11355
  }), value;
11351
11356
  }
@@ -11426,6 +11431,7 @@
11426
11431
  scaleX = DefaultTransform.scaleX,
11427
11432
  scaleY = DefaultTransform.scaleY,
11428
11433
  angle = DefaultTransform.angle,
11434
+ scaleCenter: scaleCenter,
11429
11435
  anchor: anchor,
11430
11436
  postMatrix: postMatrix
11431
11437
  } = this.attribute,
@@ -11442,7 +11448,13 @@
11442
11448
  _anchor[1] = bounds.x1 + (bounds.x2 - bounds.x1) * ratio;
11443
11449
  } else _anchor[1] = anchor[1];
11444
11450
  }
11445
- normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor);
11451
+ if (!scaleCenter || 1 === scaleX && 1 === scaleY) normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor);else {
11452
+ const m = this._transMatrix;
11453
+ m.reset(), m.translate(_anchor[0], _anchor[1]), m.rotate(angle), m.translate(-_anchor[0], -_anchor[1]), m.translate(x, y), application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, {
11454
+ x: scaleCenter[0],
11455
+ y: scaleCenter[1]
11456
+ });
11457
+ }
11446
11458
  const p = this.getOffsetXY(DefaultTransform);
11447
11459
  if (this._transMatrix.e += p.x, this._transMatrix.f += p.y, postMatrix) {
11448
11460
  const m1 = tempMatrix.setValue(postMatrix.a, postMatrix.b, postMatrix.c, postMatrix.d, postMatrix.e, postMatrix.f),
@@ -11566,7 +11578,7 @@
11566
11578
  };
11567
11579
  }
11568
11580
  createPathProxy(path) {
11569
- return isString(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
11581
+ return isString$1(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
11570
11582
  }
11571
11583
  loadImage(image) {
11572
11584
  let background = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
@@ -11577,7 +11589,7 @@
11577
11589
  data: "init",
11578
11590
  state: null
11579
11591
  };
11580
- this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", isValidUrl(image) || isBase64(image) ? (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background) : image.startsWith("<svg") && (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
11592
+ this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", isValidUrl$1(image) || isBase64$1(image) ? (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background) : image.startsWith("<svg") && (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
11581
11593
  }
11582
11594
  imageLoadSuccess(url, image, cb) {
11583
11595
  if (!this.resources) return;
@@ -14037,7 +14049,7 @@
14037
14049
  }
14038
14050
  function runStroke(stroke, lineWidth) {
14039
14051
  let s;
14040
- return s = isArray$3(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
14052
+ return s = isArray$4(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
14041
14053
  }
14042
14054
  function fillVisible(opacity, fillOpacity, fill) {
14043
14055
  return fill && opacity * fillOpacity > 0;
@@ -14439,7 +14451,7 @@
14439
14451
  forceShowCap = arcAttribute.forceShowCap
14440
14452
  } = arc.attribute;
14441
14453
  let conicalOffset = 0;
14442
- const tempChangeConicalColor = (isBoolean(cap) && cap || cap[0]) && "conical" === fill.gradient;
14454
+ const tempChangeConicalColor = (isBoolean$1(cap) && cap || cap[0]) && "conical" === fill.gradient;
14443
14455
  if (tempChangeConicalColor) {
14444
14456
  const {
14445
14457
  sc: sc,
@@ -14482,7 +14494,7 @@
14482
14494
  }
14483
14495
  strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke());
14484
14496
  }
14485
- if ((isBoolean(cap) && cap || cap[1]) && forceShowCap) {
14497
+ if ((isBoolean$1(cap) && cap || cap[1]) && forceShowCap) {
14486
14498
  const {
14487
14499
  startAngle: sa,
14488
14500
  endAngle: ea
@@ -15100,7 +15112,7 @@
15100
15112
  const {
15101
15113
  text: text
15102
15114
  } = this.attribute;
15103
- return isArray$3(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
15115
+ return isArray$4(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
15104
15116
  }
15105
15117
  updateMultilineAABBBounds(text) {
15106
15118
  var _a, _b, _c;
@@ -15717,13 +15729,13 @@
15717
15729
  this.type = "rect", this.pathStr = "M-0.5,-0.5h1v1h-1Z";
15718
15730
  }
15719
15731
  draw(ctx, size, x, y) {
15720
- return rect(ctx, isNumber(size) ? [size, size] : size, x, y);
15732
+ return rect(ctx, isNumber$1(size) ? [size, size] : size, x, y);
15721
15733
  }
15722
15734
  drawOffset(ctx, size, x, y, offset) {
15723
- return rect(ctx, isNumber(size) ? [size + 2 * offset, size + 2 * offset] : [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
15735
+ return rect(ctx, isNumber$1(size) ? [size + 2 * offset, size + 2 * offset] : [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
15724
15736
  }
15725
15737
  bounds(size, bounds) {
15726
- const rectSize = isNumber(size) ? [size, size] : size;
15738
+ const rectSize = isNumber$1(size) ? [size, size] : size;
15727
15739
  bounds.x1 = -rectSize[0] / 2, bounds.x2 = rectSize[0] / 2, bounds.y1 = -rectSize[1] / 2, bounds.y2 = rectSize[1] / 2;
15728
15740
  }
15729
15741
  }
@@ -15733,7 +15745,7 @@
15733
15745
  class CustomSymbolClass {
15734
15746
  constructor(type, path) {
15735
15747
  let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
15736
- this.pathStr = "", this.type = type, isArray$3(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
15748
+ this.pathStr = "", this.type = type, isArray$4(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
15737
15749
  }
15738
15750
  drawOffset(ctx, size, x, y, offset, z, cb) {
15739
15751
  return this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
@@ -15783,7 +15795,7 @@
15783
15795
  const {
15784
15796
  size: size
15785
15797
  } = this.attribute;
15786
- return isArray$3(size) ? 2 === size.length && size.every(this._validNumber) : this._validNumber(size);
15798
+ return isArray$4(size) ? 2 === size.length && size.every(this._validNumber) : this._validNumber(size);
15787
15799
  }
15788
15800
  doUpdateParsedPath() {
15789
15801
  const symbolTheme = getTheme(this).symbol,
@@ -15803,7 +15815,7 @@
15803
15815
  svg: svg
15804
15816
  } = parser.parse(symbolType);
15805
15817
  if (!svg) return null;
15806
- const path = isArray$3(svg.path) ? svg.path : [svg.path],
15818
+ const path = isArray$4(svg.path) ? svg.path : [svg.path],
15807
15819
  b = new AABBBounds(),
15808
15820
  cacheList = [];
15809
15821
  path.forEach(item => {
@@ -15862,7 +15874,7 @@
15862
15874
  toCustomPath() {
15863
15875
  const symbolInstance = this.getParsedPath(),
15864
15876
  size = this.attribute.size,
15865
- formattedSize = isArray$3(size) ? size : [size, size];
15877
+ formattedSize = isArray$4(size) ? size : [size, size];
15866
15878
  return symbolInstance.path ? new CustomPath2D().fromCustomPath2D(symbolInstance.path, 0, 0, formattedSize[0], formattedSize[1]) : new CustomPath2D().fromString(symbolInstance.pathStr, 0, 0, formattedSize[0], formattedSize[1]);
15867
15879
  }
15868
15880
  clone() {
@@ -16353,7 +16365,7 @@
16353
16365
  this._marginArray = "number" == typeof marginArray ? [marginArray, marginArray, marginArray, marginArray] : marginArray;
16354
16366
  }
16355
16367
  this.onBeforeAttributeUpdate = (val, attributes, key) => {
16356
- if (isArray$3(key) && -1 !== key.indexOf("margin") || "margin" === key) if (attributes.margin) {
16368
+ if (isArray$4(key) && -1 !== key.indexOf("margin") || "margin" === key) if (attributes.margin) {
16357
16369
  const marginArray = parsePadding(attributes.margin);
16358
16370
  this._marginArray = "number" == typeof marginArray ? [marginArray, marginArray, marginArray, marginArray] : marginArray;
16359
16371
  } else this._marginArray = [0, 0, 0, 0];
@@ -16707,7 +16719,7 @@
16707
16719
  const pathTheme = getTheme(this).path;
16708
16720
  if (!this.valid) return pathTheme.path;
16709
16721
  const attribute = this.attribute;
16710
- return attribute.path instanceof CustomPath2D ? attribute.path : (isNil(this.cache) && this.doUpdatePathShape(), this.cache instanceof CustomPath2D ? this.cache : pathTheme.path);
16722
+ return attribute.path instanceof CustomPath2D ? attribute.path : (isNil$1(this.cache) && this.doUpdatePathShape(), this.cache instanceof CustomPath2D ? this.cache : pathTheme.path);
16711
16723
  }
16712
16724
  doUpdateAABBBounds() {
16713
16725
  const pathTheme = getTheme(this).path;
@@ -16722,7 +16734,7 @@
16722
16734
  }
16723
16735
  doUpdatePathShape() {
16724
16736
  const attribute = this.attribute;
16725
- isString(attribute.path, !0) ? this.cache = new CustomPath2D().fromString(attribute.path) : attribute.customPath && (this.cache = new CustomPath2D(), attribute.customPath(this.cache, this));
16737
+ isString$1(attribute.path, !0) ? this.cache = new CustomPath2D().fromString(attribute.path) : attribute.customPath && (this.cache = new CustomPath2D(), attribute.customPath(this.cache, this));
16726
16738
  }
16727
16739
  tryUpdateOBBBounds() {
16728
16740
  throw new Error("暂不支持");
@@ -16854,7 +16866,7 @@
16854
16866
  } = this.attribute;
16855
16867
  if (0 === cornerRadius || "0%" === cornerRadius) return 0;
16856
16868
  const deltaRadius = Math.abs(outerRadius - innerRadius);
16857
- return Math.min(isNumber(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
16869
+ return Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
16858
16870
  }
16859
16871
  getParsedAngle() {
16860
16872
  const arcTheme = getTheme(this).arc;
@@ -17697,7 +17709,7 @@
17697
17709
  const {
17698
17710
  size = symbolTheme.size
17699
17711
  } = attribute;
17700
- if (isArray$3(size)) aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);else {
17712
+ if (isArray$4(size)) aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);else {
17701
17713
  const halfWH = size / 2;
17702
17714
  aabbBounds.set(-halfWH, -halfWH, halfWH, halfWH);
17703
17715
  }
@@ -18112,7 +18124,7 @@
18112
18124
  offsetX: offsetX,
18113
18125
  offsetY: offsetY,
18114
18126
  offsetZ: z
18115
- }), line.cache && !isArray$3(line.cache) && line.attribute.curveType && line.attribute.curveType.includes("Closed") && context.closePath(), context.setShadowStyle && context.setShadowStyle(line, attribute, defaultAttribute);
18127
+ }), line.cache && !isArray$4(line.cache) && line.attribute.curveType && line.attribute.curveType.includes("Closed") && context.closePath(), context.setShadowStyle && context.setShadowStyle(line, attribute, defaultAttribute);
18116
18128
  const {
18117
18129
  x: originX = 0,
18118
18130
  x: originY = 0
@@ -18124,7 +18136,7 @@
18124
18136
  connectedY: connectedY,
18125
18137
  connectedStyle: connectedStyle
18126
18138
  } = attribute;
18127
- if (isArray$3(defaultAttribute) ? (connectedType = null !== (_b = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _b ? _b : defaultAttribute[1].connectedType, connectedX = null !== (_c = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _c ? _c : defaultAttribute[1].connectedX, connectedY = null !== (_d = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _d ? _d : defaultAttribute[1].connectedY, connectedStyle = null !== (_e = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _e ? _e : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), "none" !== connectedType) {
18139
+ if (isArray$4(defaultAttribute) ? (connectedType = null !== (_b = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _b ? _b : defaultAttribute[1].connectedType, connectedX = null !== (_c = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _c ? _c : defaultAttribute[1].connectedX, connectedY = null !== (_d = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _d ? _d : defaultAttribute[1].connectedY, connectedStyle = null !== (_e = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _e ? _e : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), "none" !== connectedType) {
18128
18140
  context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
18129
18141
  offsetX: offsetX,
18130
18142
  offsetY: offsetY,
@@ -18135,7 +18147,7 @@
18135
18147
  zeroY: connectedY
18136
18148
  });
18137
18149
  const da = [];
18138
- isArray$3(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute), !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.stroke()));
18150
+ isArray$4(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute), !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.stroke()));
18139
18151
  }
18140
18152
  return !1;
18141
18153
  }
@@ -18159,20 +18171,46 @@
18159
18171
  if (!(fVisible || sVisible || fillCb || strokeCb)) return;
18160
18172
  if (line.shouldUpdateShape()) {
18161
18173
  const {
18162
- points: points,
18163
- segments: segments,
18164
- curveType = lineAttribute.curveType
18165
- } = line.attribute,
18166
- _points = points;
18174
+ points: points,
18175
+ segments: segments,
18176
+ closePath: closePath
18177
+ } = line.attribute;
18178
+ let {
18179
+ curveType = lineAttribute.curveType
18180
+ } = line.attribute;
18181
+ closePath && "linear" === curveType && (curveType = "linearClosed");
18182
+ const _points = points;
18167
18183
  if (segments && segments.length) {
18168
18184
  let startPoint, lastSeg;
18169
- line.cache = segments.map((seg, index) => (1 === index ? startPoint = {
18170
- x: lastSeg.endX,
18171
- y: lastSeg.endY,
18172
- defined: lastSeg.curves[lastSeg.curves.length - 1].defined
18173
- } : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined), lastSeg = calcLineCache$1(seg.points, curveType, {
18174
- startPoint: startPoint
18175
- }), lastSeg));
18185
+ if (line.cache = segments.map((seg, index) => {
18186
+ if (seg.points.length <= 1 && 0 === index) return seg.points[0] && (lastSeg = {
18187
+ endX: seg.points[0].x,
18188
+ endY: seg.points[0].y,
18189
+ curves: [{
18190
+ defined: !1 !== seg.points[0].defined
18191
+ }]
18192
+ }), null;
18193
+ 1 === index ? startPoint = {
18194
+ x: lastSeg.endX,
18195
+ y: lastSeg.endY,
18196
+ defined: lastSeg.curves[lastSeg.curves.length - 1].defined
18197
+ } : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined);
18198
+ const data = calcLineCache$1(seg.points, curveType, {
18199
+ startPoint: startPoint
18200
+ });
18201
+ return lastSeg = data, data;
18202
+ }).filter(item => !!item), "linearClosed" === curveType) {
18203
+ let startP;
18204
+ for (let i = 0; i < line.cache.length; i++) {
18205
+ const cacheItem = line.cache[i];
18206
+ for (let i = 0; i < cacheItem.curves.length; i++) if (cacheItem.curves[i].defined) {
18207
+ startP = cacheItem.curves[i].p0;
18208
+ break;
18209
+ }
18210
+ if (startP) break;
18211
+ }
18212
+ line.cache[line.cache.length - 1] && line.cache[line.cache.length - 1].lineTo(startP.x, startP.y, !0);
18213
+ }
18176
18214
  } else {
18177
18215
  if (!points || !points.length) return line.cache = null, void line.clearUpdateShapeTag();
18178
18216
  line.cache = calcLineCache$1(_points, curveType);
@@ -18184,10 +18222,11 @@
18184
18222
  clipRangeByDimension = lineAttribute.clipRangeByDimension
18185
18223
  } = line.attribute;
18186
18224
  if (Array.isArray(line.cache)) {
18187
- if (1 === clipRange) {
18225
+ const segments = line.attribute.segments.filter(item => item.points.length);
18226
+ if (1 === segments[0].points.length && segments.shift(), 1 === clipRange) {
18188
18227
  let skip = !1;
18189
18228
  line.cache.forEach((cache, index) => {
18190
- skip || (skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity, line.attribute.segments[index], [lineAttribute, line.attribute], clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb));
18229
+ skip || (skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity, segments[index], [lineAttribute, line.attribute], clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb));
18191
18230
  });
18192
18231
  } else {
18193
18232
  const totalLength = line.cache.reduce((l, c) => l + c.getLength(), 0),
@@ -18198,7 +18237,7 @@
18198
18237
  if (skip) return;
18199
18238
  const curSegLength = cache.getLength(),
18200
18239
  _cr = (totalDrawLength - drawedLengthUntilLast) / curSegLength;
18201
- drawedLengthUntilLast += curSegLength, _cr > 0 && (skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity, line.attribute.segments[index], [lineAttribute, line.attribute], min$2(_cr, 1), clipRangeByDimension, x, y, line, fillCb, strokeCb));
18240
+ drawedLengthUntilLast += curSegLength, _cr > 0 && (skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity, segments[index], [lineAttribute, line.attribute], min$2(_cr, 1), clipRangeByDimension, x, y, line, fillCb, strokeCb));
18202
18241
  });
18203
18242
  }
18204
18243
  } else this.drawSegmentItem(context, line.cache, !!fill, !!stroke, fillOpacity, strokeOpacity, line.attribute, lineAttribute, clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb);
@@ -18416,12 +18455,20 @@
18416
18455
  } = area.attribute;
18417
18456
  if (segments && segments.length) {
18418
18457
  let startPoint, lastTopSeg;
18419
- const topCaches = segments.map((seg, index) => (1 === index ? startPoint = {
18420
- x: lastTopSeg.endX,
18421
- y: lastTopSeg.endY
18422
- } : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY), lastTopSeg = calcLineCache(seg.points, curveType, {
18423
- startPoint: startPoint
18424
- }), lastTopSeg));
18458
+ const topCaches = segments.map((seg, index) => {
18459
+ if (seg.points.length <= 1 && 0 === index) return seg.points[0] && (lastTopSeg = {
18460
+ endX: seg.points[0].x,
18461
+ endY: seg.points[0].y
18462
+ }), null;
18463
+ 1 === index ? startPoint = {
18464
+ x: lastTopSeg.endX,
18465
+ y: lastTopSeg.endY
18466
+ } : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY);
18467
+ const data = calcLineCache(seg.points, curveType, {
18468
+ startPoint: startPoint
18469
+ });
18470
+ return lastTopSeg = data, data;
18471
+ }).filter(item => !!item);
18425
18472
  let lastBottomSeg;
18426
18473
  const bottomCaches = [];
18427
18474
  for (let i = segments.length - 1; i >= 0; i--) {
@@ -18465,10 +18512,11 @@
18465
18512
  area.clearUpdateShapeTag();
18466
18513
  }
18467
18514
  if (Array.isArray(area.cacheArea)) {
18468
- if (1 === clipRange) {
18515
+ const segments = area.attribute.segments.filter(item => item.points.length);
18516
+ if (1 === segments[0].points.length && segments.shift(), 1 === clipRange) {
18469
18517
  let skip = !1;
18470
18518
  area.cacheArea.forEach((cache, index) => {
18471
- skip || (skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity, area.attribute.segments[index], [areaAttribute, area.attribute], clipRange, x, y, z, area, drawContext, fillCb, strokeCb));
18519
+ skip || (skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity, segments[index], [areaAttribute, area.attribute], clipRange, x, y, z, area, drawContext, fillCb, strokeCb));
18472
18520
  });
18473
18521
  } else {
18474
18522
  const totalLength = area.cacheArea.reduce((l, c) => l + c.top.getLength(), 0),
@@ -18479,7 +18527,7 @@
18479
18527
  if (skip) return;
18480
18528
  const curSegLength = cache.top.getLength(),
18481
18529
  _cr = (totalDrawLength - drawedLengthUntilLast) / curSegLength;
18482
- drawedLengthUntilLast += curSegLength, _cr > 0 && (skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity, area.attribute.segments[index], [areaAttribute, area.attribute], min$2(_cr, 1), x, y, z, area, drawContext, fillCb, strokeCb));
18530
+ drawedLengthUntilLast += curSegLength, _cr > 0 && (skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity, segments[index], [areaAttribute, area.attribute], min$2(_cr, 1), x, y, z, area, drawContext, fillCb, strokeCb));
18483
18531
  });
18484
18532
  }
18485
18533
  } else this.drawSegmentItem(context, area.cacheArea, doFill, fillOpacity, doStroke, strokeOpacity, area.attribute, areaAttribute, clipRange, x, y, z, area, drawContext, fillCb, strokeCb);
@@ -18512,7 +18560,7 @@
18512
18560
  connectedStyle: connectedStyle
18513
18561
  } = attribute;
18514
18562
  const da = [];
18515
- if (connect && (isArray$3(defaultAttribute) ? (connectedType = null !== (_a = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _a ? _a : defaultAttribute[1].connectedType, connectedX = null !== (_b = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _b ? _b : defaultAttribute[1].connectedX, connectedY = null !== (_c = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _c ? _c : defaultAttribute[1].connectedY, connectedStyle = null !== (_d = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _d ? _d : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), isArray$3(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
18563
+ if (connect && (isArray$4(defaultAttribute) ? (connectedType = null !== (_a = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _a ? _a : defaultAttribute[1].connectedType, connectedX = null !== (_b = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _b ? _b : defaultAttribute[1].connectedX, connectedY = null !== (_c = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _c ? _c : defaultAttribute[1].connectedY, connectedStyle = null !== (_d = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _d ? _d : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), isArray$4(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
18516
18564
  if (!cache) return;
18517
18565
  context.beginPath();
18518
18566
  const {
@@ -18552,7 +18600,7 @@
18552
18600
  const {
18553
18601
  stroke = defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke
18554
18602
  } = attribute;
18555
- isArray$3(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
18603
+ isArray$4(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
18556
18604
  offsetX: offsetX,
18557
18605
  offsetY: offsetY,
18558
18606
  offsetZ: offsetZ,
@@ -18640,7 +18688,7 @@
18640
18688
  const halfPi = pi / 2;
18641
18689
  function createRectPath(path, x, y, width, height, rectCornerRadius) {
18642
18690
  let cornerRadius;
18643
- if (isNumber(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius, rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
18691
+ if (isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius, rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
18644
18692
  const cornerRadiusArr = rectCornerRadius;
18645
18693
  switch (cornerRadiusArr.length) {
18646
18694
  case 0:
@@ -18735,7 +18783,7 @@
18735
18783
  if (!rect.valid || !visible) return;
18736
18784
  if (!doFill && !doStroke) return;
18737
18785
  if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
18738
- 0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius)), this._rectRenderContribitions || (this._rectRenderContribitions = this.rectRenderContribitions.getContributions() || [], this._rectRenderContribitions.sort((a, b) => b.order - a.order));
18786
+ 0 === cornerRadius || isArray$4(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius)), this._rectRenderContribitions || (this._rectRenderContribitions = this.rectRenderContribitions.getContributions() || [], this._rectRenderContribitions.sort((a, b) => b.order - a.order));
18739
18787
  const doFillOrStroke = {
18740
18788
  doFill: doFill,
18741
18789
  doStroke: doStroke
@@ -19167,7 +19215,7 @@
19167
19215
  sVisible = strokeVisible(opacity, strokeOpacity),
19168
19216
  doFill = runFill(fill, background),
19169
19217
  doStroke = runStroke(stroke, lineWidth);
19170
- polygon.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), cornerRadius <= 0 || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius), context.closePath(), this._polygonRenderContribitions || (this._polygonRenderContribitions = this.polygonRenderContribitions.getContributions() || [], this._polygonRenderContribitions.sort((a, b) => b.order - a.order)), this._polygonRenderContribitions.forEach(c => {
19218
+ polygon.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), cornerRadius <= 0 || isArray$4(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius), context.closePath(), this._polygonRenderContribitions || (this._polygonRenderContribitions = this.polygonRenderContribitions.getContributions() || [], this._polygonRenderContribitions.sort((a, b) => b.order - a.order)), this._polygonRenderContribitions.forEach(c => {
19171
19219
  c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
19172
19220
  }), context.setShadowStyle && context.setShadowStyle(polygon, polygon.attribute, polygonAttribute), doFill && (fillCb ? fillCb(context, polygon.attribute, polygonAttribute) : fillOpacity && (context.setCommonStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, polygon.attribute, polygonAttribute) : strokeOpacity && (context.setStrokeStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.stroke())), this._polygonRenderContribitions.forEach(c => {
19173
19221
  c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
@@ -19237,7 +19285,7 @@
19237
19285
  const res = image.resources.get(url);
19238
19286
  if ("success" !== res.state) return;
19239
19287
  let needRestore = !1;
19240
- 0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
19288
+ 0 === cornerRadius || isArray$4(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
19241
19289
  let repeat = 0;
19242
19290
  if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
19243
19291
  const pattern = context.createPattern(res.data, repeatStr[repeat]);
@@ -19311,7 +19359,7 @@
19311
19359
  function createColor(context, c, params, offsetX, offsetY) {
19312
19360
  if (!c || !0 === c) return "black";
19313
19361
  let result, color;
19314
- if (isArray$3(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
19362
+ if (isArray$4(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
19315
19363
  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");
19316
19364
  }
19317
19365
  function createLinearGradient(context, color, params) {
@@ -19796,7 +19844,7 @@
19796
19844
  }
19797
19845
  const b = graphic.AABBBounds;
19798
19846
  context.drawImage(res.data, b.x1, b.y1, b.width(), b.height()), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
19799
- } else if (isObject$e(background)) {
19847
+ } else if (isObject$f(background)) {
19800
19848
  const {
19801
19849
  stroke: stroke,
19802
19850
  fill: fill,
@@ -19829,7 +19877,7 @@
19829
19877
  y = bounds.y1,
19830
19878
  width = bounds.width(),
19831
19879
  height = bounds.height();
19832
- return isNumber(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
19880
+ return isNumber$1(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
19833
19881
  x: x,
19834
19882
  y: y,
19835
19883
  width: width,
@@ -19876,7 +19924,7 @@
19876
19924
  nextX = x - d,
19877
19925
  nextY = y - d,
19878
19926
  dw = 2 * d;
19879
- if (0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, width + dw, height + dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width + dw, height + dw, cornerRadius)), context.setShadowStyle && context.setShadowStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, outerBorder, rectAttribute.outerBorder);else if (doStrokeOuter) {
19927
+ if (0 === cornerRadius || isArray$4(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, width + dw, height + dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width + dw, height + dw, cornerRadius)), context.setShadowStyle && context.setShadowStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, outerBorder, rectAttribute.outerBorder);else if (doStrokeOuter) {
19880
19928
  const lastOpacity = rectAttribute.outerBorder.opacity;
19881
19929
  rectAttribute.outerBorder.opacity = opacity, context.setStrokeStyle(rect, outerBorder, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute.outerBorder), rectAttribute.outerBorder.opacity = lastOpacity, context.stroke();
19882
19930
  }
@@ -19889,7 +19937,7 @@
19889
19937
  nextX = x + d,
19890
19938
  nextY = y + d,
19891
19939
  dw = 2 * d;
19892
- if (0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, width - dw, height - dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width - dw, height - dw, cornerRadius)), context.setShadowStyle && context.setShadowStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, innerBorder, rectAttribute.innerBorder);else if (doStrokeInner) {
19940
+ if (0 === cornerRadius || isArray$4(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, width - dw, height - dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width - dw, height - dw, cornerRadius)), context.setShadowStyle && context.setShadowStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, innerBorder, rectAttribute.innerBorder);else if (doStrokeInner) {
19893
19941
  const lastOpacity = rectAttribute.innerBorder.opacity;
19894
19942
  rectAttribute.innerBorder.opacity = opacity, context.setStrokeStyle(rect, innerBorder, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute.innerBorder), rectAttribute.innerBorder.opacity = lastOpacity, context.stroke();
19895
19943
  }
@@ -21676,8 +21724,8 @@
21676
21724
  nativeCanvas = null === (_a = domElement.getNativeHandler) || void 0 === _a ? void 0 : _a.call(domElement).nativeCanvas;
21677
21725
  let scaleX, scaleY;
21678
21726
  return nativeCanvas && (scaleX = rect.width / nativeCanvas.offsetWidth, scaleY = rect.height / nativeCanvas.offsetHeight), {
21679
- x: (x - rect.left) / (isValidNumber(scaleX) ? scaleX : 1),
21680
- y: (y - rect.top) / (isValidNumber(scaleY) ? scaleX : 1)
21727
+ x: (x - rect.left) / (isValidNumber$1(scaleX) ? scaleX : 1),
21728
+ y: (y - rect.top) / (isValidNumber$1(scaleY) ? scaleX : 1)
21681
21729
  };
21682
21730
  }
21683
21731
  return {
@@ -21705,10 +21753,10 @@
21705
21753
  parent: parent
21706
21754
  } = params,
21707
21755
  element = document.createElement(tagName);
21708
- if (style && (isString(style) ? element.setAttribute("style", style) : Object.keys(style).forEach(k => {
21756
+ if (style && (isString$1(style) ? element.setAttribute("style", style) : Object.keys(style).forEach(k => {
21709
21757
  element.setAttribute(k, style[k]);
21710
21758
  })), null != width && (element.style.width = `${width}px`), null != height && (element.style.height = `${height}px`), parent) {
21711
- const pd = isString(parent) ? this.getElementById(parent) : parent;
21759
+ const pd = isString$1(parent) ? this.getElementById(parent) : parent;
21712
21760
  pd && pd.appendChild && pd.appendChild(element);
21713
21761
  }
21714
21762
  return element;
@@ -23647,7 +23695,7 @@
23647
23695
  throw new Error("暂未实现");
23648
23696
  }
23649
23697
  release() {
23650
- this._nativeCanvas.release && isFunction(this._nativeCanvas.release) && this._nativeCanvas.release();
23698
+ this._nativeCanvas.release && isFunction$1(this._nativeCanvas.release) && this._nativeCanvas.release();
23651
23699
  }
23652
23700
  };
23653
23701
  NodeCanvas.env = "node", NodeCanvas = __decorate$M([injectable(), __metadata$v("design:paramtypes", [Object])], NodeCanvas);
@@ -24547,7 +24595,7 @@
24547
24595
  context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
24548
24596
  drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
24549
24597
  }), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
24550
- } else 0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
24598
+ } else 0 === cornerRadius || isArray$4(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
24551
24599
  this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || []);
24552
24600
  const doFillOrStroke = {
24553
24601
  doFill: doFill,
@@ -25544,7 +25592,7 @@
25544
25592
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
25545
25593
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
25546
25594
  let picked = !0;
25547
- if (!onlyTranslate || isNumber(cornerRadius, !0) && 0 !== cornerRadius || isArray$3(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
25595
+ if (!onlyTranslate || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$4(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
25548
25596
  if (picked) return !0;
25549
25597
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth;
25550
25598
  return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
@@ -26308,7 +26356,7 @@
26308
26356
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
26309
26357
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
26310
26358
  let picked = !0;
26311
- if (!onlyTranslate || isNumber(cornerRadius, !0) && 0 !== cornerRadius || isArray$3(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
26359
+ if (!onlyTranslate || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$4(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
26312
26360
  if (picked) return !0;
26313
26361
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth;
26314
26362
  return pickContext.lineWidth = lineWidth, picked = context.isPointInStroke(point.x, point.y), picked;
@@ -26855,10 +26903,10 @@
26855
26903
  }
26856
26904
  const { tickCount, forceTickCount, tickStep, noDecimals = false } = op;
26857
26905
  let scaleTicks;
26858
- if (isValid(tickStep)) {
26906
+ if (isValid$1(tickStep)) {
26859
26907
  scaleTicks = scale.stepTicks(tickStep);
26860
26908
  }
26861
- else if (isValid(forceTickCount)) {
26909
+ else if (isValid$1(forceTickCount)) {
26862
26910
  scaleTicks = scale.forceTicks(forceTickCount);
26863
26911
  }
26864
26912
  else if (op.tickMode === 'd3') {
@@ -26924,13 +26972,13 @@
26924
26972
  return convertDomainToTickData([domain[0]]);
26925
26973
  }
26926
26974
  let scaleTicks;
26927
- if (isValid(tickStep)) {
26975
+ if (isValid$1(tickStep)) {
26928
26976
  scaleTicks = scale.stepTicks(tickStep);
26929
26977
  }
26930
- else if (isValid(forceTickCount)) {
26978
+ else if (isValid$1(forceTickCount)) {
26931
26979
  scaleTicks = scale.forceTicks(forceTickCount);
26932
26980
  }
26933
- else if (isValid(tickCount)) {
26981
+ else if (isValid$1(tickCount)) {
26934
26982
  scaleTicks = scale.ticks(tickCount);
26935
26983
  }
26936
26984
  else if (op.sampling) {
@@ -27068,13 +27116,13 @@
27068
27116
  return convertDomainToTickData(scale.domain());
27069
27117
  }
27070
27118
  let scaleTicks;
27071
- if (isValid(tickStep)) {
27119
+ if (isValid$1(tickStep)) {
27072
27120
  scaleTicks = scale.stepTicks(tickStep);
27073
27121
  }
27074
- else if (isValid(forceTickCount)) {
27122
+ else if (isValid$1(forceTickCount)) {
27075
27123
  scaleTicks = scale.forceTicks(forceTickCount);
27076
27124
  }
27077
- else if (isValid(tickCount)) {
27125
+ else if (isValid$1(tickCount)) {
27078
27126
  scaleTicks = scale.ticks(tickCount);
27079
27127
  }
27080
27128
  else if (op.sampling) {