@visactor/vrender 1.1.0-alpha.2 → 1.1.0-alpha.20

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.es.js CHANGED
@@ -8208,6 +8208,12 @@ function ensureStageStatePerfMonitor(stage) {
8208
8208
  function getStageStatePerfMonitor(stage) {
8209
8209
  if (stage) return stage[STAGE_PERF_MONITOR];
8210
8210
  }
8211
+ function getActiveStageStatePerfMonitor(stage) {
8212
+ var _a;
8213
+ if (!stage) return;
8214
+ const current = getStageStatePerfMonitor(stage);
8215
+ return current || (!0 === (null === (_a = stage.statePerfConfig) || void 0 === _a ? void 0 : _a.enabled) ? ensureStageStatePerfMonitor(stage) : void 0);
8216
+ }
8211
8217
 
8212
8218
  function isPlainObject$1(value) {
8213
8219
  return null != value && "object" == typeof value && !Array.isArray(value);
@@ -8303,7 +8309,7 @@ class StateEngine {
8303
8309
  }
8304
8310
  invalidateResolverCache() {
8305
8311
  var _a, _b;
8306
- this.resolverPatchCache.clear(), this.resolverCacheKey = "", this.resolverCacheValid = !1, null === (_b = getStageStatePerfMonitor(null === (_a = this.graphic) || void 0 === _a ? void 0 : _a.stage)) || void 0 === _b || _b.recordResolver("invalidations");
8312
+ this.resolverPatchCache.clear(), this.resolverCacheKey = "", this.resolverCacheValid = !1, null === (_b = getActiveStageStatePerfMonitor(null === (_a = this.graphic) || void 0 === _a ? void 0 : _a.stage)) || void 0 === _b || _b.recordResolver("invalidations");
8307
8313
  }
8308
8314
  hasState(stateName) {
8309
8315
  return !!this._activeStates.length && (null == stateName || this._activeStates.includes(stateName));
@@ -8350,7 +8356,7 @@ class StateEngine {
8350
8356
  }
8351
8357
  recomputePatch(effectiveStates) {
8352
8358
  var _a;
8353
- const perfMonitor = getStageStatePerfMonitor(null === (_a = this.graphic) || void 0 === _a ? void 0 : _a.stage),
8359
+ const perfMonitor = getActiveStageStatePerfMonitor(null === (_a = this.graphic) || void 0 === _a ? void 0 : _a.stage),
8354
8360
  patchStart = perfMonitor ? performance.now() : 0;
8355
8361
  let resolverCost = 0;
8356
8362
  const cacheKey = effectiveStates.join(","),
@@ -8598,32 +8604,6 @@ class StateStyleResolver {
8598
8604
  }
8599
8605
  }), resolvedAttrs;
8600
8606
  }
8601
- resolveWithCompiled(normalAttrs, compiledDefinitions, stateProxy, effectiveStates, resolvedPatch) {
8602
- var _a, _b;
8603
- const mergeMode = null !== (_a = this.options.mergeMode) && void 0 !== _a ? _a : "shallow",
8604
- resolvedAttrs = null !== (_b = cloneValue(resolvedPatch)) && void 0 !== _b ? _b : {};
8605
- return effectiveStates.forEach(stateName => {
8606
- const proxyPatch = null == stateProxy ? void 0 : stateProxy(stateName, effectiveStates);
8607
- null != proxyPatch && Object.keys(proxyPatch).forEach(key => {
8608
- const nextValue = proxyPatch[key],
8609
- hasCompiledDefinition = compiledDefinitions.has(stateName);
8610
- if ("deep" === mergeMode && isPlainObject(nextValue) && (isPlainObject(resolvedAttrs[key]) || !hasCompiledDefinition && isPlainObject(normalAttrs[key]))) {
8611
- const baseValue = isPlainObject(resolvedAttrs[key]) ? resolvedAttrs[key] : isPlainObject(normalAttrs[key]) ? normalAttrs[key] : {};
8612
- resolvedAttrs[key] = deepMerge(baseValue, nextValue);
8613
- } else resolvedAttrs[key] = cloneValue(nextValue);
8614
- });
8615
- }), resolvedAttrs;
8616
- }
8617
- computeNormalAttrsBackup(normalAttrs, targetAttrs, finalAttribute) {
8618
- const nextNormalAttrs = {},
8619
- nextTargetAttrs = Object.assign({}, targetAttrs);
8620
- for (const key in targetAttrs) Object.prototype.hasOwnProperty.call(targetAttrs, key) && (nextNormalAttrs[key] = cloneValue(normalAttrs && key in normalAttrs ? normalAttrs[key] : finalAttribute[key]));
8621
- if (normalAttrs) for (const key in normalAttrs) Object.prototype.hasOwnProperty.call(normalAttrs, key) && !(key in targetAttrs) && (nextTargetAttrs[key] = cloneValue(normalAttrs[key]));
8622
- return {
8623
- attrs: nextTargetAttrs,
8624
- normalAttrs: nextNormalAttrs
8625
- };
8626
- }
8627
8607
  }
8628
8608
 
8629
8609
  function hasOwnKeys(value) {
@@ -8645,11 +8625,23 @@ class StateTransitionOrchestrator {
8645
8625
  if (!hasAnimation) return plan;
8646
8626
  const noWorkAnimateAttr = Object.assign(Object.assign({}, null !== (_a = options.noWorkAnimateAttr) && void 0 !== _a ? _a : {}), normalizeNoAnimateAttrConfig(null === (_b = options.animateConfig) || void 0 === _b ? void 0 : _b.noAnimateAttrs)),
8647
8627
  isClear = !0 === options.isClear,
8648
- getDefaultAttribute = options.getDefaultAttribute;
8628
+ getDefaultAttribute = options.getDefaultAttribute,
8629
+ shouldSkipDefaultAttribute = options.shouldSkipDefaultAttribute,
8630
+ assignTransitionAttr = (key, value) => {
8631
+ if (noWorkAnimateAttr[key]) return plan.jumpAttrs[key] = value, void (plan.noAnimateAttrs[key] = value);
8632
+ if (isClear && void 0 === value) {
8633
+ if (null == shouldSkipDefaultAttribute ? void 0 : shouldSkipDefaultAttribute(key, targetAttrs)) return;
8634
+ plan.animateAttrs[key] = getDefaultAttribute ? getDefaultAttribute(key) : value;
8635
+ } else plan.animateAttrs[key] = value;
8636
+ };
8649
8637
  for (const key in targetAttrs) {
8650
8638
  if (!Object.prototype.hasOwnProperty.call(targetAttrs, key)) continue;
8651
- const value = targetAttrs[key];
8652
- noWorkAnimateAttr[key] ? (plan.jumpAttrs[key] = value, plan.noAnimateAttrs[key] = value) : plan.animateAttrs[key] = isClear && void 0 === value && getDefaultAttribute ? getDefaultAttribute(key) : value;
8639
+ assignTransitionAttr(key, targetAttrs[key]);
8640
+ }
8641
+ const extraAnimateAttrs = options.extraAnimateAttrs;
8642
+ if (extraAnimateAttrs) for (const key in extraAnimateAttrs) {
8643
+ const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetAttrs, key);
8644
+ !Object.prototype.hasOwnProperty.call(extraAnimateAttrs, key) || hasTargetAttr && void 0 !== targetAttrs[key] || assignTransitionAttr(key, extraAnimateAttrs[key]);
8653
8645
  }
8654
8646
  return plan;
8655
8647
  }
@@ -8676,12 +8668,14 @@ class StateTransitionOrchestrator {
8676
8668
  }), plan;
8677
8669
  }
8678
8670
  applyClearTransition(graphic, targetAttrs, hasAnimation, stateNames, options = {}) {
8679
- var _a, _b;
8671
+ var _a, _b, _c, _d;
8680
8672
  const plan = this.analyzeTransition({}, targetAttrs, stateNames, hasAnimation, {
8681
8673
  noWorkAnimateAttr: null === (_a = graphic.getNoWorkAnimateAttr) || void 0 === _a ? void 0 : _a.call(graphic),
8682
8674
  isClear: !0,
8683
8675
  getDefaultAttribute: null === (_b = graphic.getDefaultAttribute) || void 0 === _b ? void 0 : _b.bind(graphic),
8684
- animateConfig: options.animateConfig
8676
+ shouldSkipDefaultAttribute: null !== (_c = options.shouldSkipDefaultAttribute) && void 0 !== _c ? _c : null === (_d = graphic.shouldSkipStateTransitionDefaultAttribute) || void 0 === _d ? void 0 : _d.bind(graphic),
8677
+ animateConfig: options.animateConfig,
8678
+ extraAnimateAttrs: options.extraAnimateAttrs
8685
8679
  });
8686
8680
  return this.applyTransition(graphic, plan, hasAnimation, options);
8687
8681
  }
@@ -8744,7 +8738,7 @@ function rebuildSharedStateScope(scope) {
8744
8738
  }
8745
8739
  function ensureSharedStateScopeFresh(scope) {
8746
8740
  var _a;
8747
- if (scope) return null === (_a = getStageStatePerfMonitor(scope.ownerStage)) || void 0 === _a || _a.recordRefresh("ensureFreshCalls"), scope.parentScope && ensureSharedStateScopeFresh(scope.parentScope), (scope.dirty || scope.parentScope && scope.parentRevisionAtBuild !== scope.parentScope.revision) && rebuildSharedStateScope(scope), scope;
8741
+ if (scope) return null === (_a = getActiveStageStatePerfMonitor(scope.ownerStage)) || void 0 === _a || _a.recordRefresh("ensureFreshCalls"), scope.parentScope && ensureSharedStateScopeFresh(scope.parentScope), (scope.dirty || scope.parentScope && scope.parentRevisionAtBuild !== scope.parentScope.revision) && rebuildSharedStateScope(scope), scope;
8748
8742
  }
8749
8743
  function collectSharedStateScopeChain(scope) {
8750
8744
  const chain = [];
@@ -8755,7 +8749,7 @@ function collectSharedStateScopeChain(scope) {
8755
8749
 
8756
8750
  function scheduleStageSharedStateRefresh(stage) {
8757
8751
  var _a;
8758
- stage && "released" !== stage.releaseStatus && (null === (_a = getStageStatePerfMonitor(stage)) || void 0 === _a || _a.recordRefresh("renderScheduled"), stage.renderNextFrame());
8752
+ stage && "released" !== stage.releaseStatus && (null === (_a = getActiveStageStatePerfMonitor(stage)) || void 0 === _a || _a.recordRefresh("renderScheduled"), stage.renderNextFrame());
8759
8753
  }
8760
8754
  function enqueueGraphicSharedStateRefresh(stage, graphic) {
8761
8755
  var _a;
@@ -8763,7 +8757,7 @@ function enqueueGraphicSharedStateRefresh(stage, graphic) {
8763
8757
  const pending = null !== (_a = stage._pendingSharedStateRefreshGraphics) && void 0 !== _a ? _a : stage._pendingSharedStateRefreshGraphics = new Set();
8764
8758
  if (!pending.has(graphic)) {
8765
8759
  pending.add(graphic);
8766
- const perfMonitor = getStageStatePerfMonitor(stage);
8760
+ const perfMonitor = getActiveStageStatePerfMonitor(stage);
8767
8761
  null == perfMonitor || perfMonitor.recordRefresh("queuedGraphics"), null == perfMonitor || perfMonitor.recordAllocation("refreshQueuePushes");
8768
8762
  }
8769
8763
  }
@@ -8778,12 +8772,13 @@ function markScopeActiveDescendantsDirty(scope, stage) {
8778
8772
  function flushStageSharedStateRefresh(stage) {
8779
8773
  const pending = stage._pendingSharedStateRefreshGraphics;
8780
8774
  if (!pending || !pending.size) return;
8781
- const perfMonitor = getStageStatePerfMonitor(stage),
8775
+ const perfMonitor = getActiveStageStatePerfMonitor(stage),
8782
8776
  start = perfMonitor ? performance.now() : 0,
8783
8777
  graphics = Array.from(pending.values());
8784
8778
  pending.clear(), null == perfMonitor || perfMonitor.recordRefresh("flushedGraphics", graphics.length), graphics.forEach(graphic => {
8785
8779
  if ("released" === graphic.releaseStatus) return;
8786
8780
  if (graphic.stage !== stage) return;
8781
+ if (!graphic.sharedStateDirty) return;
8787
8782
  const refresh = graphic.refreshSharedStateBeforeRender;
8788
8783
  "function" == typeof refresh && (refresh.call(graphic), null == perfMonitor || perfMonitor.incrementCounter("sharedRefreshCommits"));
8789
8784
  }), perfMonitor && (perfMonitor.recordCost("sharedRefresh", performance.now() - start), perfMonitor.recordEvent("shared-refresh-flush", {
@@ -8800,9 +8795,12 @@ const tempConstantXYKey = ["x", "y"],
8800
8795
  tempConstantScaleXYKey = ["scaleX", "scaleY"],
8801
8796
  tempConstantAngleKey = ["angle"],
8802
8797
  builtinTextureTypes = new Set(["circle", "diamond", "rect", "vertical-line", "horizontal-line", "bias-lr", "bias-rl", "grid", "wave"]),
8803
- point = new Point();
8798
+ FULL_STATE_DEFINITION_KEYS = new Set(["name", "patch", "priority", "exclude", "suppress", "resolver", "declaredAffectedKeys"]),
8799
+ point = new Point(),
8800
+ EMPTY_STATE_NAMES = [],
8801
+ BROAD_UPDATE_CATEGORY = UpdateCategory.PAINT | UpdateCategory.SHAPE | UpdateCategory.BOUNDS | UpdateCategory.TRANSFORM | UpdateCategory.LAYOUT;
8804
8802
  function isPlainObjectValue(value) {
8805
- return "object" == typeof value && null != value && !isArray$1(value);
8803
+ return "object" == typeof value && null != value && !Array.isArray(value);
8806
8804
  }
8807
8805
  function cloneAttributeValue(value) {
8808
8806
  if (!isPlainObjectValue(value)) return value;
@@ -8813,12 +8811,6 @@ function cloneAttributeValue(value) {
8813
8811
  clone[key] = isPlainObjectValue(nextValue) ? cloneAttributeValue(nextValue) : nextValue;
8814
8812
  }), clone;
8815
8813
  }
8816
- function cloneSimpleAttributeRecord(value) {
8817
- return isPlainObjectValue(value) ? Object.assign({}, value) : value;
8818
- }
8819
- function shouldUseSimpleAttributeFastPath(value) {
8820
- return !!isPlainObjectValue(value) && !Object.keys(value).some(key => isPlainObjectValue(value[key]));
8821
- }
8822
8814
  function cloneAttributeSurface(value) {
8823
8815
  if (!isPlainObjectValue(value)) return value;
8824
8816
  const source = value,
@@ -8828,6 +8820,9 @@ function cloneAttributeSurface(value) {
8828
8820
  clone[key] = isPlainObjectValue(nextValue) ? Object.assign({}, nextValue) : nextValue;
8829
8821
  }), clone;
8830
8822
  }
8823
+ function areAttributeValuesEqual(left, right) {
8824
+ return left === right || !!(isPlainObjectValue(left) || isPlainObjectValue(right) || Array.isArray(left) || Array.isArray(right)) && isEqual(left, right);
8825
+ }
8831
8826
  function deepMergeAttributeValue(base, value) {
8832
8827
  var _a;
8833
8828
  const result = null !== (_a = cloneAttributeValue(base)) && void 0 !== _a ? _a : {};
@@ -8890,18 +8885,24 @@ class Graphic extends Node {
8890
8885
  get globalTransMatrix() {
8891
8886
  return this.tryUpdateGlobalTransMatrix(!0);
8892
8887
  }
8888
+ get baseAttributes() {
8889
+ var _a;
8890
+ return null !== (_a = this._baseAttributes) && void 0 !== _a ? _a : this.attribute;
8891
+ }
8892
+ set baseAttributes(value) {
8893
+ value !== this.attribute ? this._baseAttributes = value : this._baseAttributes = void 0;
8894
+ }
8893
8895
  constructor(params = {}) {
8894
8896
  var _a;
8895
- super(), this.resolverEpoch = 0, this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT;
8896
- const useSimpleAttributeFastPath = shouldUseSimpleAttributeFastPath(params),
8897
- initialBaseAttributes = useSimpleAttributeFastPath ? cloneSimpleAttributeRecord(params) : cloneAttributeValue(params);
8898
- this.baseAttributes = initialBaseAttributes, this.attribute = useSimpleAttributeFastPath ? cloneSimpleAttributeRecord(initialBaseAttributes) : cloneAttributeSurface(initialBaseAttributes), this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background && this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0), isExternalTexture(params.texture) && this.loadImage(params.texture, !1), params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
8897
+ super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background && this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0), params.texture && isExternalTexture(params.texture) && this.loadImage(params.texture, !1), params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
8899
8898
  }
8900
8899
  get normalAttrs() {
8901
8900
  return this.baseAttributes;
8902
8901
  }
8903
- set normalAttrs(value) {
8904
- this._deprecatedNormalAttrsView = null != value ? value : void 0;
8902
+ set normalAttrs(_value) {}
8903
+ getBaseAttributesStorage() {
8904
+ var _a;
8905
+ return null !== (_a = this._baseAttributes) && void 0 !== _a ? _a : this.attribute;
8905
8906
  }
8906
8907
  getGraphicService() {
8907
8908
  var _a, _b;
@@ -8932,10 +8933,18 @@ class Graphic extends Node {
8932
8933
  const nextScope = this.resolveBoundSharedStateScope();
8933
8934
  return this.boundSharedStateScope === nextScope ? (this.syncSharedStateActiveRegistrations(), !1) : (this.boundSharedStateScope = nextScope, this.boundSharedStateRevision = void 0, this.localFallbackCompiledDefinitions = void 0, this.compiledStateDefinitions = void 0, this.compiledStateDefinitionsCacheKey = void 0, this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.stateEngineStateProxyModeKey = void 0, this.syncSharedStateActiveRegistrations(), markDirty && (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && this.markSharedStateDirty(), !0);
8934
8935
  }
8935
- syncSharedStateActiveRegistrations() {
8936
+ syncSharedStateScopeBindingOnTreeChange(markDirty = !0) {
8936
8937
  var _a, _b;
8937
- const nextScopes = (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && this.boundSharedStateScope ? new Set(collectSharedStateScopeChain(this.boundSharedStateScope)) : new Set();
8938
- (null !== (_b = this.registeredActiveScopes) && void 0 !== _b ? _b : new Set()).forEach(scope => {
8938
+ return !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.boundSharedStateScope || (null === (_b = this.registeredActiveScopes) || void 0 === _b ? void 0 : _b.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingFromTree(markDirty);
8939
+ }
8940
+ syncSharedStateActiveRegistrations() {
8941
+ var _a;
8942
+ const previousScopes = this.registeredActiveScopes;
8943
+ if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.boundSharedStateScope) return (null == previousScopes ? void 0 : previousScopes.size) && (previousScopes.forEach(scope => {
8944
+ scope.subtreeActiveDescendants.delete(this);
8945
+ }), previousScopes.clear()), void (this.registeredActiveScopes = void 0);
8946
+ const nextScopes = new Set(collectSharedStateScopeChain(this.boundSharedStateScope));
8947
+ null == previousScopes || previousScopes.forEach(scope => {
8939
8948
  nextScopes.has(scope) || scope.subtreeActiveDescendants.delete(this);
8940
8949
  }), nextScopes.forEach(scope => {
8941
8950
  scope.subtreeActiveDescendants.add(this);
@@ -8951,15 +8960,13 @@ class Graphic extends Node {
8951
8960
  this.sharedStateDirty = !0, enqueueGraphicSharedStateRefresh(this.stage, this), scheduleStageSharedStateRefresh(this.stage);
8952
8961
  }
8953
8962
  onParentSharedStateTreeChanged(stage, layer) {
8954
- this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingFromTree() : this.setStage(stage, layer);
8963
+ this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange() : this.setStage(stage, layer);
8955
8964
  }
8956
8965
  refreshSharedStateBeforeRender() {
8957
8966
  var _a;
8958
8967
  (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) ? (this.syncSharedStateScopeBindingFromTree(!1), this.boundSharedStateScope && ensureSharedStateScopeFresh(this.boundSharedStateScope), this.recomputeCurrentStatePatch(), this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
8959
8968
  type: AttributeUpdateType.STATE
8960
- }), this._emitCustomEvent("afterStateUpdate", {
8961
- type: AttributeUpdateType.STATE
8962
- }), this.sharedStateDirty = !1) : this.sharedStateDirty = !1;
8969
+ }), this.emitStateUpdateEvent(), this.sharedStateDirty = !1) : this.sharedStateDirty = !1;
8963
8970
  }
8964
8971
  getLocalStatesVersion() {
8965
8972
  var _a, _b;
@@ -9009,15 +9016,13 @@ class Graphic extends Node {
9009
9016
  };
9010
9017
  }
9011
9018
  recomputeCurrentStatePatch() {
9012
- var _a, _b, _c, _d;
9019
+ var _a, _b;
9013
9020
  if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)) return this.effectiveStates = [], this.resolvedStatePatch = void 0, void this.syncSharedStateActiveRegistrations();
9014
- const stateResolveBaseAttrs = null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : this.attribute,
9015
- stateModel = this.createStateModel();
9016
- null === (_c = this.stateEngine) || void 0 === _c || _c.setResolveContext(this, stateResolveBaseAttrs);
9017
- const transition = stateModel.useStates(this.currentStates),
9018
- effectiveStates = null !== (_d = transition.effectiveStates) && void 0 !== _d ? _d : transition.states,
9021
+ const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
9022
+ transition = this.createStateModel(stateResolveBaseAttrs).useStates(this.currentStates),
9023
+ effectiveStates = null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
9019
9024
  resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
9020
- this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = Object.assign({}, resolvedStateAttrs), this.syncSharedStateActiveRegistrations();
9025
+ this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.syncSharedStateActiveRegistrations();
9021
9026
  }
9022
9027
  buildStaticAttributeSnapshot() {
9023
9028
  var _a;
@@ -9029,6 +9034,23 @@ class Graphic extends Node {
9029
9034
  "deep" === this.stateMergeMode && isPlainObjectValue(previousValue) && isPlainObjectValue(nextValue) ? snapshot[key] = deepMergeAttributeValue(previousValue, nextValue) : snapshot[key] = cloneAttributeValue(nextValue);
9030
9035
  }), snapshot) : snapshot;
9031
9036
  }
9037
+ buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
9038
+ const extraAttrs = {};
9039
+ if (!previousResolvedStatePatch) return extraAttrs;
9040
+ const snapshot = this.buildStaticAttributeSnapshot(),
9041
+ staticTargetAttrs = snapshot;
9042
+ return Object.keys(previousResolvedStatePatch).forEach(key => {
9043
+ const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetStateAttrs, key);
9044
+ if (hasTargetAttr && void 0 !== targetStateAttrs[key]) return;
9045
+ const assignFallbackAttr = value => {
9046
+ void 0 === value && this.shouldSkipStateTransitionDefaultAttribute(key, staticTargetAttrs) || (extraAttrs[key] = void 0 === value ? value : cloneAttributeValue(value));
9047
+ };
9048
+ if (hasTargetAttr) assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));else if (Object.prototype.hasOwnProperty.call(snapshot, key)) {
9049
+ const snapshotValue = snapshot[key];
9050
+ assignFallbackAttr(void 0 === snapshotValue ? this.getStateTransitionDefaultAttribute(key, staticTargetAttrs) : snapshotValue);
9051
+ } else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
9052
+ }), extraAttrs;
9053
+ }
9032
9054
  syncObjectToSnapshot(target, snapshot) {
9033
9055
  const delta = new Map();
9034
9056
  return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
@@ -9039,16 +9061,17 @@ class Graphic extends Node {
9039
9061
  next: void 0
9040
9062
  }), delete target[key]));
9041
9063
  const nextValue = snapshot[key];
9042
- isEqual(previousValue, nextValue) || (delta.set(key, {
9064
+ areAttributeValuesEqual(previousValue, nextValue) || (delta.set(key, {
9043
9065
  prev: previousValue,
9044
9066
  next: nextValue
9045
9067
  }), target[key] = cloneAttributeValue(nextValue));
9046
9068
  }), delta;
9047
9069
  }
9048
9070
  _syncAttribute() {
9071
+ this.attribute === this.baseAttributes && this.resolvedStatePatch && this.detachAttributeFromBaseAttributes();
9049
9072
  const snapshot = this.buildStaticAttributeSnapshot(),
9050
9073
  delta = this.syncObjectToSnapshot(this.attribute, snapshot);
9051
- return this.valid = this.isValid(), delta;
9074
+ return this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !1, delta;
9052
9075
  }
9053
9076
  _syncFinalAttributeFromStaticTruth() {
9054
9077
  const target = this.finalAttribute;
@@ -9056,47 +9079,146 @@ class Graphic extends Node {
9056
9079
  const snapshot = this.buildStaticAttributeSnapshot();
9057
9080
  this.syncObjectToSnapshot(target, snapshot);
9058
9081
  }
9059
- submitUpdateByDelta(delta, forceUpdateTag = !1) {
9082
+ mergeAttributeDeltaCategory(category, key, prev, next) {
9083
+ var _a;
9084
+ let nextCategory = "stroke" === key || "shadowBlur" === key ? classifyAttributeDelta(key, prev, next) : null !== (_a = ATTRIBUTE_CATEGORY[key]) && void 0 !== _a ? _a : UpdateCategory.PAINT;
9085
+ return nextCategory & UpdateCategory.PICK && (nextCategory |= UpdateCategory.BOUNDS), nextCategory === UpdateCategory.PAINT && this.needUpdateTag(key) && (nextCategory = UpdateCategory.SHAPE | UpdateCategory.BOUNDS), category | nextCategory;
9086
+ }
9087
+ submitUpdateByCategory(category, forceUpdateTag = !1) {
9060
9088
  var _a;
9061
9089
  if (forceUpdateTag) return this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), void this.addUpdateLayoutTag();
9090
+ if (category !== UpdateCategory.NONE) {
9091
+ const stage = this.stage;
9092
+ stage && (null === (_a = getActiveStageStatePerfMonitor(stage)) || void 0 === _a || _a.recordCategory(category));
9093
+ }
9094
+ (category & BROAD_UPDATE_CATEGORY) !== BROAD_UPDATE_CATEGORY ? (category & UpdateCategory.SHAPE ? this.addUpdateShapeAndBoundsTag() : category & UpdateCategory.BOUNDS && this.addUpdateBoundTag(), category & UpdateCategory.PAINT && this.addUpdatePaintTag(), category & UpdateCategory.TRANSFORM && this.addUpdatePositionTag(), category & UpdateCategory.LAYOUT && this.addUpdateLayoutTag()) : this.addBroadUpdateTag();
9095
+ }
9096
+ submitUpdateByDelta(delta, forceUpdateTag = !1) {
9062
9097
  let category = UpdateCategory.NONE;
9063
9098
  delta.forEach((entry, key) => {
9064
- let nextCategory = classifyAttributeDelta(key, entry.prev, entry.next);
9065
- nextCategory & UpdateCategory.PICK && (nextCategory |= UpdateCategory.BOUNDS), nextCategory === UpdateCategory.PAINT && this.needUpdateTag(key) && (nextCategory = UpdateCategory.SHAPE | UpdateCategory.BOUNDS), category |= nextCategory;
9066
- }), category !== UpdateCategory.NONE && (null === (_a = getStageStatePerfMonitor(this.stage)) || void 0 === _a || _a.recordCategory(category)), category & UpdateCategory.SHAPE ? this.addUpdateShapeAndBoundsTag() : category & UpdateCategory.BOUNDS && this.addUpdateBoundTag(), category & UpdateCategory.PAINT && this.addUpdatePaintTag(), category & UpdateCategory.TRANSFORM && this.addUpdatePositionTag(), category & UpdateCategory.LAYOUT && this.addUpdateLayoutTag();
9099
+ category = this.mergeAttributeDeltaCategory(category, key, entry.prev, entry.next);
9100
+ }), this.submitUpdateByCategory(category, forceUpdateTag);
9101
+ }
9102
+ submitTouchedKeyUpdate(keys, forceUpdateTag = !1) {
9103
+ this.submitTouchedUpdate(forceUpdateTag || this.needUpdateTags(keys));
9104
+ }
9105
+ submitTouchedUpdate(needsShapeAndBounds) {
9106
+ !this.updateShapeAndBoundsTagSetted() && needsShapeAndBounds ? this.addUpdateShapeAndBoundsTag() : this.addUpdateBoundTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag();
9067
9107
  }
9068
9108
  commitBaseAttributeMutation(forceUpdateTag = !1, context) {
9069
- var _a, _b;
9070
- (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && (this.resolverEpoch += 1, null === (_b = this.stateEngine) || void 0 === _b || _b.invalidateResolverCache(), this.recomputeCurrentStatePatch());
9109
+ var _a, _b, _c;
9110
+ (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && (this.resolverEpoch = (null !== (_b = this.resolverEpoch) && void 0 !== _b ? _b : 0) + 1, null === (_c = this.stateEngine) || void 0 === _c || _c.invalidateResolverCache(), this.recomputeCurrentStatePatch());
9071
9111
  const delta = this._syncAttribute();
9072
9112
  this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
9073
9113
  }
9114
+ canCommitBaseAttributesByTouchedKeys() {
9115
+ var _a, _b;
9116
+ return !((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.resolvedStatePatch || this.attributeMayContainTransientAttrs) && (!(null === (_b = this.animates) || void 0 === _b ? void 0 : _b.size) && !this._animationStateManager || !this.hasAnyTrackedAnimate());
9117
+ }
9118
+ detachAttributeFromBaseAttributes() {
9119
+ this.attribute === this.baseAttributes && (this._baseAttributes = this.attribute, this.attribute = cloneAttributeSurface(this.attribute));
9120
+ }
9121
+ commitInternalBaseAttributes(params, context) {
9122
+ params && Object.keys(params).length && (this.canCommitBaseAttributesByTouchedKeys() ? this.commitBaseAttributesByTouchedKeys(params, !1, context) : (this.detachAttributeFromBaseAttributes(), this.applyBaseAttributes(params), this.commitBaseAttributeMutation(!1, context)));
9123
+ }
9124
+ commitBaseAttributesByTouchedKeys(params, forceUpdateTag = !1, context) {
9125
+ const source = params,
9126
+ baseAttributes = this.getBaseAttributesStorage();
9127
+ let hasKeys = !1,
9128
+ needsShapeAndBounds = forceUpdateTag;
9129
+ for (const key in source) Object.prototype.hasOwnProperty.call(source, key) && (hasKeys = !0, baseAttributes[key] = source[key], !needsShapeAndBounds && this.needUpdateTag(key) && (needsShapeAndBounds = !0));
9130
+ hasKeys && (this.attribute = baseAttributes, this._baseAttributes = void 0, this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !1, this.submitTouchedUpdate(needsShapeAndBounds), this.onAttributeUpdate(context));
9131
+ }
9132
+ commitBaseAttributeBySingleKey(key, value, forceUpdateTag = !1, context) {
9133
+ this.getBaseAttributesStorage()[key] = value, this.attribute = this.getBaseAttributesStorage(), this._baseAttributes = void 0, this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !1, this.submitTouchedUpdate(forceUpdateTag || this.needUpdateTag(key)), this.onAttributeUpdate(context);
9134
+ }
9074
9135
  applyBaseAttributes(params) {
9075
9136
  const keys = Object.keys(params);
9076
9137
  for (let i = 0; i < keys.length; i++) {
9077
9138
  const key = keys[i];
9078
- this.baseAttributes[key] = cloneAttributeValue(params[key]);
9139
+ this.getBaseAttributesStorage()[key] = params[key];
9079
9140
  }
9080
9141
  }
9142
+ applyAnimationTransientAttributes(params, forceUpdateTag = !1, context) {
9143
+ const source = params;
9144
+ let target,
9145
+ needsShapeAndBounds = forceUpdateTag;
9146
+ for (const key in source) Object.prototype.hasOwnProperty.call(source, key) && (target || (this.detachAttributeFromBaseAttributes(), target = this.attribute), target[key] = source[key], !needsShapeAndBounds && this.needUpdateTag(key) && (needsShapeAndBounds = !0));
9147
+ target && (this.attributeMayContainTransientAttrs = !0, this.valid = this.isValid(), this.submitTouchedUpdate(needsShapeAndBounds), this.onAttributeUpdate(context));
9148
+ }
9081
9149
  applyTransientAttributes(params, forceUpdateTag = !1, context) {
9150
+ this.detachAttributeFromBaseAttributes();
9082
9151
  const delta = new Map(),
9083
9152
  keys = Object.keys(params);
9084
9153
  for (let i = 0; i < keys.length; i++) {
9085
9154
  const key = keys[i],
9086
9155
  previousValue = this.attribute[key],
9087
9156
  nextValue = params[key];
9088
- isEqual(previousValue, nextValue) || (delta.set(key, {
9157
+ areAttributeValuesEqual(previousValue, nextValue) || (delta.set(key, {
9089
9158
  prev: previousValue,
9090
9159
  next: nextValue
9091
- }), this.attribute[key] = cloneAttributeValue(nextValue));
9160
+ }), this.attribute[key] = nextValue);
9092
9161
  }
9093
- this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
9162
+ delta.size && (this.attributeMayContainTransientAttrs = !0), this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
9094
9163
  }
9095
9164
  _restoreAttributeFromStaticTruth(context) {
9096
9165
  this._syncFinalAttributeFromStaticTruth();
9097
9166
  const delta = this._syncAttribute();
9098
9167
  this.submitUpdateByDelta(delta), this.onAttributeUpdate(context);
9099
9168
  }
9169
+ collectStatePatchDeltaKeys(previousPatch, nextPatch) {
9170
+ const keys = previousPatch ? Object.keys(previousPatch) : [];
9171
+ if (!nextPatch) return keys;
9172
+ for (const key in nextPatch) Object.prototype.hasOwnProperty.call(nextPatch, key) && !Object.prototype.hasOwnProperty.call(null != previousPatch ? previousPatch : {}, key) && keys.push(key);
9173
+ return keys;
9174
+ }
9175
+ getStaticTruthValueForStateKey(key, nextPatch) {
9176
+ var _a;
9177
+ const baseAttributes = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : {},
9178
+ patch = nextPatch;
9179
+ if (patch && Object.prototype.hasOwnProperty.call(patch, key)) {
9180
+ const patchValue = patch[key],
9181
+ baseValue = baseAttributes[key];
9182
+ return "deep" === this.stateMergeMode && isPlainObjectValue(baseValue) && isPlainObjectValue(patchValue) ? {
9183
+ hasValue: !0,
9184
+ value: deepMergeAttributeValue(baseValue, patchValue)
9185
+ } : {
9186
+ hasValue: !0,
9187
+ value: patchValue
9188
+ };
9189
+ }
9190
+ return Object.prototype.hasOwnProperty.call(baseAttributes, key) ? {
9191
+ hasValue: !0,
9192
+ value: baseAttributes[key]
9193
+ } : {
9194
+ hasValue: !1,
9195
+ value: void 0
9196
+ };
9197
+ }
9198
+ syncStatePatchDeltaToTarget(target, keys, nextPatch, collectCategory = !1) {
9199
+ let category = UpdateCategory.NONE;
9200
+ for (let i = 0; i < keys.length; i++) {
9201
+ const key = keys[i],
9202
+ previousValue = target[key],
9203
+ next = this.getStaticTruthValueForStateKey(key, nextPatch);
9204
+ if (!next.hasValue) {
9205
+ Object.prototype.hasOwnProperty.call(target, key) && (delete target[key], collectCategory && (category = this.mergeAttributeDeltaCategory(category, key, previousValue, void 0)));
9206
+ continue;
9207
+ }
9208
+ if (areAttributeValuesEqual(previousValue, next.value)) continue;
9209
+ const nextValue = cloneAttributeValue(next.value);
9210
+ target[key] = nextValue, collectCategory && (category = this.mergeAttributeDeltaCategory(category, key, previousValue, nextValue));
9211
+ }
9212
+ return category;
9213
+ }
9214
+ restoreAttributeFromStatePatchDelta(previousPatch, nextPatch, context) {
9215
+ this.detachAttributeFromBaseAttributes();
9216
+ const keys = this.collectStatePatchDeltaKeys(previousPatch, nextPatch),
9217
+ finalAttribute = this.finalAttribute;
9218
+ finalAttribute && this.syncStatePatchDeltaToTarget(finalAttribute, keys, nextPatch, !1);
9219
+ const category = this.syncStatePatchDeltaToTarget(this.attribute, keys, nextPatch, !0);
9220
+ this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !1, this.submitUpdateByCategory(category), this.onAttributeUpdate(context);
9221
+ }
9100
9222
  setMode(mode) {
9101
9223
  "3d" === mode ? this.set3dMode() : this.set2dMode();
9102
9224
  }
@@ -9119,7 +9241,7 @@ class Graphic extends Node {
9119
9241
  return point;
9120
9242
  }
9121
9243
  onAnimateBind(animate) {
9122
- this._emitCustomEvent("animate-bind", animate);
9244
+ this.detachAttributeFromBaseAttributes(), this._emitCustomEvent("animate-bind", animate);
9123
9245
  }
9124
9246
  visitTrackedAnimates(cb) {
9125
9247
  const hook = this.forEachTrackedAnimate;
@@ -9132,8 +9254,22 @@ class Graphic extends Node {
9132
9254
  const getTrackedAnimates = this.getTrackedAnimates;
9133
9255
  return "function" == typeof getTrackedAnimates ? getTrackedAnimates.call(this).size > 0 : !!(null === (_a = this.animates) || void 0 === _a ? void 0 : _a.size);
9134
9256
  }
9257
+ mayHaveTrackedAnimates() {
9258
+ var _a;
9259
+ return !!(null === (_a = this.animates) || void 0 === _a ? void 0 : _a.size) || !!this._animationStateManager;
9260
+ }
9135
9261
  tryUpdateAABBBounds() {
9262
+ if (!(this.shadowRoot || this._updateTag & UpdateTag.UPDATE_BOUNDS)) return this._AABBBounds;
9136
9263
  const full = "imprecise" === this.attribute.boundsMode;
9264
+ if (!this.shadowRoot) {
9265
+ const graphicService = this.getGraphicService(),
9266
+ graphicTheme = this.getGraphicTheme();
9267
+ if (!graphicService.validCheck(this.attribute, graphicTheme, this._AABBBounds, this)) return this._AABBBounds;
9268
+ if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
9269
+ graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
9270
+ const bounds = this.doUpdateAABBBounds(full, graphicTheme);
9271
+ return graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
9272
+ }
9137
9273
  if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
9138
9274
  if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
9139
9275
  this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
@@ -9206,14 +9342,14 @@ class Graphic extends Node {
9206
9342
  const _parsedPath = new CustomSymbolClass(symbolType, cache);
9207
9343
  return Graphic.userSymbolMap[symbolType] = _parsedPath, _parsedPath;
9208
9344
  }
9209
- doUpdateAABBBounds(full) {
9345
+ doUpdateAABBBounds(full, graphicTheme) {
9210
9346
  this.updateAABBBoundsStamp++;
9211
- const graphicTheme = this.getGraphicTheme();
9347
+ const resolvedGraphicTheme = null != graphicTheme ? graphicTheme : this.getGraphicTheme();
9212
9348
  this._AABBBounds.clear();
9213
9349
  const attribute = this.attribute,
9214
- bounds = this.updateAABBBounds(attribute, graphicTheme, this._AABBBounds, full),
9350
+ bounds = this.updateAABBBounds(attribute, resolvedGraphicTheme, this._AABBBounds, full),
9215
9351
  {
9216
- boundsPadding = graphicTheme.boundsPadding
9352
+ boundsPadding = resolvedGraphicTheme.boundsPadding
9217
9353
  } = attribute,
9218
9354
  paddingArray = parsePadding(boundsPadding);
9219
9355
  return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), bounds;
@@ -9281,25 +9417,63 @@ class Graphic extends Node {
9281
9417
  this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
9282
9418
  }
9283
9419
  setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context, ignorePriority) {
9284
- this.visitTrackedAnimates(animate => {
9285
- (animate.priority !== 1 / 0 || ignorePriority) && Object.keys(params).forEach(key => {
9286
- animate.preventAttr(key);
9287
- });
9420
+ if (!params) return;
9421
+ const keys = Object.keys(params);
9422
+ this.captureTransientFromAttrsBeforePreventAnimate(params, keys, context), this.visitTrackedAnimates(animate => {
9423
+ (animate.priority !== 1 / 0 || ignorePriority) && animate.preventAttrs(keys);
9288
9424
  }), this.applyTransientAttributes(params, forceUpdateTag, context);
9289
9425
  }
9426
+ captureTransientFromAttrsBeforePreventAnimate(params, keys, context) {
9427
+ var _a, _b;
9428
+ const graphicContext = this.context,
9429
+ diffAttrs = null !== (_a = null == graphicContext ? void 0 : graphicContext.diffAttrs) && void 0 !== _a ? _a : params,
9430
+ updateType = null == context ? void 0 : context.type;
9431
+ if (!keys.length || !diffAttrs || updateType === AttributeUpdateType.STATE || null != updateType && updateType >= AttributeUpdateType.ANIMATE_BIND && updateType <= AttributeUpdateType.ANIMATE_END) return;
9432
+ const sameDiffAttrs = this.transientFromAttrsBeforePreventAnimateDiffAttrs === diffAttrs;
9433
+ let fromAttrs = sameDiffAttrs && null !== (_b = this.transientFromAttrsBeforePreventAnimate) && void 0 !== _b ? _b : null;
9434
+ sameDiffAttrs || (this.transientFromAttrsBeforePreventAnimate = null, this.transientFromAttrsBeforePreventAnimateDiffAttrs = null);
9435
+ let captured = !1;
9436
+ for (let i = 0; i < keys.length; i++) {
9437
+ const key = keys[i];
9438
+ if (!Object.prototype.hasOwnProperty.call(diffAttrs, key)) continue;
9439
+ const previousValue = this.attribute[key],
9440
+ nextValue = params[key];
9441
+ isEqual(previousValue, nextValue) || (null != fromAttrs || (fromAttrs = {}), fromAttrs[key] = cloneAttributeValue(previousValue), captured = !0);
9442
+ }
9443
+ captured && (this.transientFromAttrsBeforePreventAnimate = fromAttrs, this.transientFromAttrsBeforePreventAnimateDiffAttrs = diffAttrs);
9444
+ }
9445
+ consumeTransientFromAttrsBeforePreventAnimate(diffAttrs) {
9446
+ const transientFromAttrs = this.transientFromAttrsBeforePreventAnimate,
9447
+ sourceDiffAttrs = this.transientFromAttrsBeforePreventAnimateDiffAttrs;
9448
+ if (!transientFromAttrs || !sourceDiffAttrs) return null;
9449
+ for (const key in diffAttrs) if (Object.prototype.hasOwnProperty.call(diffAttrs, key) && (!Object.prototype.hasOwnProperty.call(sourceDiffAttrs, key) || !isEqual(sourceDiffAttrs[key], diffAttrs[key]))) return null;
9450
+ let fromAttrs = null,
9451
+ remaining = !1;
9452
+ for (const key in transientFromAttrs) Object.prototype.hasOwnProperty.call(transientFromAttrs, key) && (Object.prototype.hasOwnProperty.call(diffAttrs, key) ? (null != fromAttrs || (fromAttrs = {}), fromAttrs[key] = transientFromAttrs[key]) : remaining = !0);
9453
+ if (remaining) {
9454
+ const nextTransientFromAttrs = {};
9455
+ for (const key in transientFromAttrs) Object.prototype.hasOwnProperty.call(transientFromAttrs, key) && !Object.prototype.hasOwnProperty.call(diffAttrs, key) && (nextTransientFromAttrs[key] = transientFromAttrs[key]);
9456
+ this.transientFromAttrsBeforePreventAnimate = nextTransientFromAttrs;
9457
+ } else this.transientFromAttrsBeforePreventAnimate = null, this.transientFromAttrsBeforePreventAnimateDiffAttrs = null;
9458
+ return fromAttrs;
9459
+ }
9290
9460
  setAttributes(params, forceUpdateTag = !1, context) {
9291
- params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background && this.loadImage(params.background, !0), isExternalTexture(params.texture) && this.loadImage(params.texture, !1), params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
9461
+ params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background && this.loadImage(params.background, !0), params.texture && isExternalTexture(params.texture) && this.loadImage(params.texture, !1), params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
9292
9462
  }
9293
9463
  _setAttributes(params, forceUpdateTag = !1, context) {
9294
- this.applyBaseAttributes(params), this.commitBaseAttributeMutation(forceUpdateTag, context);
9464
+ this.canCommitBaseAttributesByTouchedKeys() ? this.commitBaseAttributesByTouchedKeys(params, forceUpdateTag, context) : (this.detachAttributeFromBaseAttributes(), this.applyBaseAttributes(params), this.commitBaseAttributeMutation(forceUpdateTag, context));
9295
9465
  }
9296
9466
  setAttribute(key, value, forceUpdateTag, context) {
9297
9467
  const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({
9298
9468
  [key]: value
9299
9469
  }, this.attribute, key, context);
9300
- params ? this._setAttributes(params, forceUpdateTag, context) : (this.applyBaseAttributes({
9301
- [key]: value
9302
- }), this.commitBaseAttributeMutation(!!forceUpdateTag, context)), "background" === key ? this.loadImage(value, !0) : "texture" === key && isExternalTexture(value) ? this.loadImage(value, !1) : "shadowGraphic" === key && this.setShadowGraphic(value);
9470
+ if (params) this._setAttributes(params, forceUpdateTag, context);else if (this.canCommitBaseAttributesByTouchedKeys()) this.commitBaseAttributeBySingleKey(key, value, !!forceUpdateTag, context);else {
9471
+ const nextAttrs = {
9472
+ [key]: value
9473
+ };
9474
+ this.applyBaseAttributes(nextAttrs), this.commitBaseAttributeMutation(!!forceUpdateTag, context);
9475
+ }
9476
+ "background" === key ? this.loadImage(value, !0) : "texture" === key && isExternalTexture(value) ? this.loadImage(value, !1) : "shadowGraphic" === key && this.setShadowGraphic(value);
9303
9477
  }
9304
9478
  needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
9305
9479
  for (let i = 0; i < k.length; i++) {
@@ -9318,7 +9492,7 @@ class Graphic extends Node {
9318
9492
  const context = {
9319
9493
  type: AttributeUpdateType.INIT
9320
9494
  };
9321
- params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.baseAttributes = cloneAttributeValue(params), this.attribute || (this.attribute = {}), this.resolvedStatePatch = void 0, this._syncAttribute(), params.background && this.loadImage(params.background, !0), isExternalTexture(params.texture) && this.loadImage(params.texture, !1), params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._updateTag = UpdateTag.INIT, this.valid = this.isValid(), this.onAttributeUpdate(context);
9495
+ params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, this._baseAttributes = void 0, this.resolvedStatePatch = void 0, this.attributeMayContainTransientAttrs = !1, this.valid = this.isValid(), params.background && this.loadImage(params.background, !0), params.texture && isExternalTexture(params.texture) && this.loadImage(params.texture, !1), params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._updateTag = UpdateTag.INIT, this.valid = this.isValid(), this.onAttributeUpdate(context);
9322
9496
  }
9323
9497
  translate(x, y) {
9324
9498
  var _a, _b;
@@ -9330,10 +9504,15 @@ class Graphic extends Node {
9330
9504
  x: x,
9331
9505
  y: y
9332
9506
  }, this.attribute, tempConstantXYKey, context);
9333
- params && (x = params.x, y = params.y, delete params.x, delete params.y, this.applyBaseAttributes(params));
9507
+ params && (x = params.x, y = params.y, delete params.x, delete params.y);
9334
9508
  const attribute = this.baseAttributes,
9335
- postMatrix = attribute.postMatrix;
9336
- return postMatrix ? application.transformUtil.fromMatrix(postMatrix, postMatrix).translate(x, y) : (attribute.x = (null !== (_a = attribute.x) && void 0 !== _a ? _a : DefaultTransform.x) + x, attribute.y = (null !== (_b = attribute.y) && void 0 !== _b ? _b : DefaultTransform.y) + y), this.commitBaseAttributeMutation(!1, context), this;
9509
+ postMatrix = attribute.postMatrix,
9510
+ nextAttrs = params || {};
9511
+ if (postMatrix) {
9512
+ const nextPostMatrix = postMatrix.clone();
9513
+ application.transformUtil.fromMatrix(nextPostMatrix, nextPostMatrix).translate(x, y), nextAttrs.postMatrix = nextPostMatrix;
9514
+ } else nextAttrs.x = (null !== (_a = attribute.x) && void 0 !== _a ? _a : DefaultTransform.x) + x, nextAttrs.y = (null !== (_b = attribute.y) && void 0 !== _b ? _b : DefaultTransform.y) + y;
9515
+ return this.commitInternalBaseAttributes(nextAttrs, context), this;
9337
9516
  }
9338
9517
  translateTo(x, y) {
9339
9518
  const attribute = this.baseAttributes;
@@ -9345,7 +9524,10 @@ class Graphic extends Node {
9345
9524
  x: x,
9346
9525
  y: y
9347
9526
  }, this.attribute, tempConstantXYKey, context);
9348
- return params ? (this.applyBaseAttributes(params), this.commitBaseAttributeMutation(!1, context), this) : (attribute.x = x, attribute.y = y, this.commitBaseAttributeMutation(!1, context), this);
9527
+ return params ? (this.commitInternalBaseAttributes(params, context), this) : (this.commitInternalBaseAttributes({
9528
+ x: x,
9529
+ y: y
9530
+ }, context), this);
9349
9531
  }
9350
9532
  scale(scaleX, scaleY, scaleCenter) {
9351
9533
  var _a, _b;
@@ -9358,15 +9540,16 @@ class Graphic extends Node {
9358
9540
  scaleY: scaleY,
9359
9541
  scaleCenter: scaleCenter
9360
9542
  }, this.attribute, tempConstantScaleXYKey, context);
9361
- params && (scaleX = params.scaleX, scaleY = params.scaleY, delete params.scaleX, delete params.scaleY, this.applyBaseAttributes(params));
9362
- const attribute = this.baseAttributes;
9543
+ params && (scaleX = params.scaleX, scaleY = params.scaleY, delete params.scaleX, delete params.scaleY);
9544
+ const attribute = this.baseAttributes,
9545
+ nextAttrs = params || {};
9363
9546
  if (scaleCenter) {
9364
9547
  let {
9365
9548
  postMatrix: postMatrix
9366
- } = this.attribute;
9367
- postMatrix || (postMatrix = new Matrix(), attribute.postMatrix = postMatrix), application.transformUtil.fromMatrix(postMatrix, postMatrix).scale(scaleX, scaleY, scaleCenter);
9368
- } else attribute.scaleX = (null !== (_a = attribute.scaleX) && void 0 !== _a ? _a : DefaultTransform.scaleX) * scaleX, attribute.scaleY = (null !== (_b = attribute.scaleY) && void 0 !== _b ? _b : DefaultTransform.scaleY) * scaleY;
9369
- return this.commitBaseAttributeMutation(!1, context), this;
9549
+ } = this.baseAttributes;
9550
+ postMatrix = postMatrix ? postMatrix.clone() : new Matrix(), application.transformUtil.fromMatrix(postMatrix, postMatrix).scale(scaleX, scaleY, scaleCenter), nextAttrs.postMatrix = postMatrix;
9551
+ } else nextAttrs.scaleX = (null !== (_a = attribute.scaleX) && void 0 !== _a ? _a : DefaultTransform.scaleX) * scaleX, nextAttrs.scaleY = (null !== (_b = attribute.scaleY) && void 0 !== _b ? _b : DefaultTransform.scaleY) * scaleY;
9552
+ return this.commitInternalBaseAttributes(nextAttrs, context), this;
9370
9553
  }
9371
9554
  scaleTo(scaleX, scaleY) {
9372
9555
  const attribute = this.baseAttributes;
@@ -9378,7 +9561,10 @@ class Graphic extends Node {
9378
9561
  scaleX: scaleX,
9379
9562
  scaleY: scaleY
9380
9563
  }, this.attribute, tempConstantScaleXYKey, context);
9381
- return params ? (this.applyBaseAttributes(params), this.commitBaseAttributeMutation(!1, context), this) : (attribute.scaleX = scaleX, attribute.scaleY = scaleY, this.commitBaseAttributeMutation(!1, context), this);
9564
+ return params ? (this.commitInternalBaseAttributes(params, context), this) : (this.commitInternalBaseAttributes({
9565
+ scaleX: scaleX,
9566
+ scaleY: scaleY
9567
+ }, context), this);
9382
9568
  }
9383
9569
  rotate(angle, rotateCenter) {
9384
9570
  var _a;
@@ -9390,24 +9576,26 @@ class Graphic extends Node {
9390
9576
  angle: angle,
9391
9577
  rotateCenter: rotateCenter
9392
9578
  }, this.attribute, tempConstantAngleKey, context);
9393
- params && (delete params.angle, this.applyBaseAttributes(params));
9394
- const attribute = this.baseAttributes;
9579
+ params && delete params.angle;
9580
+ const attribute = this.baseAttributes,
9581
+ nextAttrs = params || {};
9395
9582
  if (rotateCenter) {
9396
9583
  let {
9397
9584
  postMatrix: postMatrix
9398
9585
  } = this.baseAttributes;
9399
- postMatrix || (postMatrix = new Matrix(), this.baseAttributes.postMatrix = postMatrix), application.transformUtil.fromMatrix(postMatrix, postMatrix).rotate(angle, rotateCenter);
9400
- } else attribute.angle = (null !== (_a = attribute.angle) && void 0 !== _a ? _a : DefaultTransform.angle) + angle;
9401
- return this.commitBaseAttributeMutation(!1, context), this;
9586
+ postMatrix = postMatrix ? postMatrix.clone() : new Matrix(), application.transformUtil.fromMatrix(postMatrix, postMatrix).rotate(angle, rotateCenter), nextAttrs.postMatrix = postMatrix;
9587
+ } else nextAttrs.angle = (null !== (_a = attribute.angle) && void 0 !== _a ? _a : DefaultTransform.angle) + angle;
9588
+ return this.commitInternalBaseAttributes(nextAttrs, context), this;
9402
9589
  }
9403
9590
  rotateTo(angle) {
9404
- const attribute = this.baseAttributes;
9405
- if (attribute.angle === angle) return this;
9591
+ if (this.baseAttributes.angle === angle) return this;
9406
9592
  const context = {
9407
9593
  type: AttributeUpdateType.ROTATE_TO
9408
9594
  },
9409
9595
  params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(angle, this.attribute, tempConstantAngleKey, context);
9410
- return params ? (this.applyBaseAttributes(params), this.commitBaseAttributeMutation(!1, context), this) : (attribute.angle = angle, this.commitBaseAttributeMutation(!1, context), this);
9596
+ return params ? (this.commitInternalBaseAttributes(params, context), this) : (this.commitInternalBaseAttributes({
9597
+ angle: angle
9598
+ }, context), this);
9411
9599
  }
9412
9600
  skewTo(b, c) {
9413
9601
  return this;
@@ -9425,7 +9613,15 @@ class Graphic extends Node {
9425
9613
  var _a;
9426
9614
  return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
9427
9615
  }
9428
- createStateModel() {
9616
+ getStateResolveBaseAttrs() {
9617
+ var _a;
9618
+ return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
9619
+ }
9620
+ syncStateResolveContext(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
9621
+ var _a;
9622
+ return null === (_a = this.stateEngine) || void 0 === _a || _a.setResolveContext(this, stateResolveBaseAttrs), stateResolveBaseAttrs;
9623
+ }
9624
+ createStateModel(stateResolveBaseAttrs = this.getStateResolveBaseAttrs()) {
9429
9625
  const {
9430
9626
  compiledDefinitions: compiledDefinitions,
9431
9627
  stateProxyEligibility: stateProxyEligibility,
@@ -9438,7 +9634,7 @@ class Graphic extends Node {
9438
9634
  stateProxyEligibility: stateProxyEligibility,
9439
9635
  states: this.states,
9440
9636
  mergeMode: this.stateMergeMode
9441
- }), this.stateEngineCompiledDefinitions = compiledDefinitions, this.stateEngineStateProxy = this.stateProxy, this.stateEngineStateSort = this.stateSort, this.stateEngineMergeMode = this.stateMergeMode, this.stateEngineStateProxyModeKey = stateProxyModeKey) : (this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.stateEngineStateProxyModeKey = void 0), new StateModel({
9637
+ }), this.stateEngineCompiledDefinitions = compiledDefinitions, this.stateEngineStateProxy = this.stateProxy, this.stateEngineStateSort = this.stateSort, this.stateEngineMergeMode = this.stateMergeMode, this.stateEngineStateProxyModeKey = stateProxyModeKey) : (this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.stateEngineStateProxyModeKey = void 0), this.syncStateResolveContext(stateResolveBaseAttrs), new StateModel({
9442
9638
  states: this.states,
9443
9639
  currentStates: this.currentStates,
9444
9640
  stateSort: this.stateSort,
@@ -9446,28 +9642,162 @@ class Graphic extends Node {
9446
9642
  stateEngine: this.stateEngine
9447
9643
  });
9448
9644
  }
9645
+ resolveSimpleLocalStateTransition(states, previousStates) {
9646
+ var _a;
9647
+ if (!this.states || this.stateProxy || this.stateSort || "deep" === this.stateMergeMode || this.parent || (null === (_a = this.stage) || void 0 === _a ? void 0 : _a.rootSharedStateScope) || this.boundSharedStateScope) return null;
9648
+ if (1 === states.length) {
9649
+ const stateName = states[0],
9650
+ hasDefinition = Object.prototype.hasOwnProperty.call(this.states, stateName),
9651
+ nextStates = [stateName],
9652
+ changed = !this.sameStateNames(previousStates, nextStates),
9653
+ resolvedStateAttrs = {};
9654
+ if (hasDefinition) {
9655
+ const attrs = this.states[stateName];
9656
+ if (null != attrs) {
9657
+ if (!isPlainObjectValue(attrs)) return null;
9658
+ const keys = Object.keys(attrs);
9659
+ for (let keyIndex = 0; keyIndex < keys.length; keyIndex++) {
9660
+ const key = keys[keyIndex];
9661
+ if (FULL_STATE_DEFINITION_KEYS.has(key)) return null;
9662
+ const attrValue = attrs[key];
9663
+ resolvedStateAttrs[key] = isPlainObjectValue(attrValue) ? cloneAttributeValue(attrValue) : attrValue;
9664
+ }
9665
+ }
9666
+ }
9667
+ return {
9668
+ changed: changed,
9669
+ states: nextStates,
9670
+ effectiveStates: nextStates,
9671
+ resolvedStateAttrs: resolvedStateAttrs
9672
+ };
9673
+ }
9674
+ const uniqueStates = Array.from(new Set(states)),
9675
+ withDefinition = [],
9676
+ withoutDefinition = [];
9677
+ for (let i = 0; i < uniqueStates.length; i++) {
9678
+ const stateName = uniqueStates[i];
9679
+ Object.prototype.hasOwnProperty.call(this.states, stateName) ? withDefinition.push(stateName) : withoutDefinition.push(stateName);
9680
+ }
9681
+ withDefinition.sort((left, right) => left.localeCompare(right));
9682
+ const nextStates = withDefinition.concat(withoutDefinition),
9683
+ changed = !this.sameStateNames(previousStates, nextStates),
9684
+ resolvedStateAttrs = {};
9685
+ for (let i = 0; i < nextStates.length; i++) {
9686
+ const stateName = nextStates[i];
9687
+ if (!Object.prototype.hasOwnProperty.call(this.states, stateName)) continue;
9688
+ const attrs = this.states[stateName];
9689
+ if (null == attrs) continue;
9690
+ if (!isPlainObjectValue(attrs)) return null;
9691
+ const keys = Object.keys(attrs);
9692
+ for (let keyIndex = 0; keyIndex < keys.length; keyIndex++) {
9693
+ const key = keys[keyIndex];
9694
+ if (FULL_STATE_DEFINITION_KEYS.has(key)) return null;
9695
+ const attrValue = attrs[key];
9696
+ resolvedStateAttrs[key] = isPlainObjectValue(attrValue) ? cloneAttributeValue(attrValue) : attrValue;
9697
+ }
9698
+ }
9699
+ return {
9700
+ changed: changed,
9701
+ states: nextStates,
9702
+ effectiveStates: nextStates,
9703
+ resolvedStateAttrs: resolvedStateAttrs
9704
+ };
9705
+ }
9706
+ resolveGraphicStateTransition(states, previousStates, forceResolverRefresh = !1) {
9707
+ var _a, _b;
9708
+ let transition = this.resolveSimpleLocalStateTransition(states, previousStates);
9709
+ const isSimpleLocalTransition = !!transition;
9710
+ let resolvedStateAttrs;
9711
+ if (transition) resolvedStateAttrs = transition.resolvedStateAttrs;else {
9712
+ const stateResolveBaseAttrs = this.getStateResolveBaseAttrs(),
9713
+ stateModel = this.createStateModel(stateResolveBaseAttrs);
9714
+ forceResolverRefresh && (null === (_a = this.stateEngine) || void 0 === _a || _a.invalidateResolverCache()), transition = stateModel.useStates(states), resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
9715
+ }
9716
+ return {
9717
+ transition: transition,
9718
+ effectiveStates: null !== (_b = transition.effectiveStates) && void 0 !== _b ? _b : transition.states,
9719
+ resolvedStateAttrs: resolvedStateAttrs,
9720
+ isSimpleLocalTransition: isSimpleLocalTransition
9721
+ };
9722
+ }
9723
+ normalizeSetStatesOptions(options) {
9724
+ return options && "object" == typeof options ? {
9725
+ hasAnimation: options.animate,
9726
+ animateSameStatePatchChange: !0 === options.animateSameStatePatchChange,
9727
+ shouldRefreshSameStatePatch: !0
9728
+ } : {
9729
+ hasAnimation: "boolean" == typeof options ? options : void 0,
9730
+ animateSameStatePatchChange: !1,
9731
+ shouldRefreshSameStatePatch: !1
9732
+ };
9733
+ }
9734
+ sameStatePatches(left, right) {
9735
+ const leftRecord = null != left ? left : {},
9736
+ rightRecord = null != right ? right : {},
9737
+ keys = new Set([...Object.keys(leftRecord), ...Object.keys(rightRecord)]);
9738
+ for (const key of keys) {
9739
+ if (Object.prototype.hasOwnProperty.call(leftRecord, key) !== Object.prototype.hasOwnProperty.call(rightRecord, key)) return !1;
9740
+ if (!areAttributeValuesEqual(leftRecord[key], rightRecord[key])) return !1;
9741
+ }
9742
+ return !0;
9743
+ }
9744
+ commitSameStatePatchRefresh(states, hasAnimation, animateSameStatePatchChange = !1) {
9745
+ var _a;
9746
+ const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES,
9747
+ previousResolvedStatePatch = this.resolvedStatePatch,
9748
+ {
9749
+ transition: transition,
9750
+ effectiveStates: effectiveStates,
9751
+ resolvedStateAttrs: resolvedStateAttrs,
9752
+ isSimpleLocalTransition: isSimpleLocalTransition
9753
+ } = this.resolveGraphicStateTransition(states, previousStates, !0),
9754
+ patchChanged = !this.sameStatePatches(previousResolvedStatePatch, resolvedStateAttrs);
9755
+ if ((!patchChanged || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) && (this.currentStates = transition.states, this.effectiveStates = isSimpleLocalTransition ? effectiveStates : [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), patchChanged)) {
9756
+ if (this.stage) {
9757
+ const perfMonitor = getActiveStageStatePerfMonitor(this.stage);
9758
+ null == perfMonitor || perfMonitor.incrementCounter("stateCommits"), null == perfMonitor || perfMonitor.recordEvent("state-commit", {
9759
+ graphicId: this._uid,
9760
+ targetStates: [...transition.states]
9761
+ });
9762
+ }
9763
+ hasAnimation && animateSameStatePatchChange ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
9764
+ type: AttributeUpdateType.STATE
9765
+ }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
9766
+ type: AttributeUpdateType.STATE
9767
+ }), this.emitStateUpdateEvent());
9768
+ }
9769
+ }
9449
9770
  resolveStateAnimateConfig(animateConfig) {
9450
9771
  var _a, _b, _c;
9451
9772
  return null !== (_c = null !== (_a = null != animateConfig ? animateConfig : this.stateAnimateConfig) && void 0 !== _a ? _a : null === (_b = this.context) || void 0 === _b ? void 0 : _b.stateAnimateConfig) && void 0 !== _c ? _c : DefaultStateAnimateConfig;
9452
9773
  }
9453
- applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig) {
9774
+ applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
9454
9775
  const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0,
9455
9776
  transitionOptions = resolvedAnimateConfig ? {
9456
- animateConfig: resolvedAnimateConfig
9777
+ animateConfig: resolvedAnimateConfig,
9778
+ extraAnimateAttrs: extraAnimateAttrs,
9779
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9457
9780
  } : void 0;
9458
9781
  if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, stateNames, transitionOptions);
9459
9782
  const plan = this.getStateTransitionOrchestrator().analyzeTransition({}, attrs, stateNames, hasAnimation, {
9460
9783
  noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
9461
- animateConfig: resolvedAnimateConfig
9784
+ animateConfig: resolvedAnimateConfig,
9785
+ extraAnimateAttrs: extraAnimateAttrs,
9786
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9462
9787
  });
9463
9788
  this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
9464
9789
  }
9465
- updateNormalAttrs(stateAttrs) {
9466
- this._deprecatedNormalAttrsView = cloneAttributeValue(this.baseAttributes);
9790
+ updateNormalAttrs(_stateAttrs) {}
9791
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
9792
+ return this.getDefaultAttribute(key);
9793
+ }
9794
+ shouldSkipStateTransitionDefaultAttribute(_key, _targetAttrs) {
9795
+ return !1;
9467
9796
  }
9468
9797
  stopStateAnimates(type = "end") {
9469
9798
  const stopAnimationState = this.stopAnimationState;
9470
9799
  if ("function" == typeof stopAnimationState) return void stopAnimationState.call(this, "state", type);
9800
+ if (!this.mayHaveTrackedAnimates()) return;
9471
9801
  const stateAnimates = [];
9472
9802
  this.visitTrackedAnimates(animate => {
9473
9803
  animate.stateNames && stateAnimates.push(animate);
@@ -9480,18 +9810,25 @@ class Graphic extends Node {
9480
9810
  }
9481
9811
  clearStates(hasAnimation) {
9482
9812
  var _a, _b, _c;
9483
- const previousStates = this.currentStates ? this.currentStates.slice() : [],
9813
+ const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES,
9814
+ previousResolvedStatePatch = this.resolvedStatePatch,
9484
9815
  transition = this.createStateModel().clearStates();
9485
9816
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
9486
- const resolvedStateAttrs = cloneAttributeValue(null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : {});
9487
- transition.changed && !this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0) || (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), null === (_b = getStageStatePerfMonitor(this.stage)) || void 0 === _b || _b.incrementCounter("stateCommits"), null === (_c = getStageStatePerfMonitor(this.stage)) || void 0 === _c || _c.recordEvent("state-commit", {
9488
- graphicId: this._uid,
9489
- targetStates: []
9490
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9491
- type: AttributeUpdateType.STATE
9492
- }), this._emitCustomEvent("afterStateUpdate", {
9493
- type: AttributeUpdateType.STATE
9494
- })));
9817
+ const resolvedStateAttrs = hasAnimation || this.hasCustomEvent("beforeStateUpdate") ? cloneAttributeValue(null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : {}) : null !== (_c = this.baseAttributes) && void 0 !== _c ? _c : {};
9818
+ if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) {
9819
+ if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), this.stage) {
9820
+ const perfMonitor = getActiveStageStatePerfMonitor(this.stage);
9821
+ null == perfMonitor || perfMonitor.incrementCounter("stateCommits"), null == perfMonitor || perfMonitor.recordEvent("state-commit", {
9822
+ graphicId: this._uid,
9823
+ targetStates: []
9824
+ });
9825
+ }
9826
+ hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
9827
+ type: AttributeUpdateType.STATE
9828
+ }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
9829
+ type: AttributeUpdateType.STATE
9830
+ }), this.emitStateUpdateEvent());
9831
+ }
9495
9832
  }
9496
9833
  removeState(stateName, hasAnimation) {
9497
9834
  const transition = this.createStateModel().removeState(stateName);
@@ -9505,38 +9842,59 @@ class Graphic extends Node {
9505
9842
  const transition = this.createStateModel().addState(stateName, keepCurrentStates);
9506
9843
  transition.changed && this.useStates(transition.states, hasAnimation);
9507
9844
  }
9845
+ setStates(states, options) {
9846
+ var _a, _b, _c;
9847
+ const {
9848
+ hasAnimation: hasAnimation,
9849
+ animateSameStatePatchChange: animateSameStatePatchChange,
9850
+ shouldRefreshSameStatePatch: shouldRefreshSameStatePatch
9851
+ } = this.normalizeSetStatesOptions(options),
9852
+ nextStates = (null == states ? void 0 : states.length) ? states : EMPTY_STATE_NAMES,
9853
+ hasCurrentState = !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || (null === (_b = this.effectiveStates) || void 0 === _b ? void 0 : _b.length) || this.resolvedStatePatch || (null === (_c = this.registeredActiveScopes) || void 0 === _c ? void 0 : _c.size));
9854
+ if (nextStates.length) {
9855
+ if (this.sameStateNames(this.currentStates, nextStates)) return shouldRefreshSameStatePatch ? void this.commitSameStatePatchRefresh(nextStates, hasAnimation, animateSameStatePatchChange) : void (this.sharedStateDirty && this.refreshSharedStateBeforeRender());
9856
+ this.useStates(nextStates, hasAnimation);
9857
+ } else {
9858
+ if (!hasCurrentState && !this.sharedStateDirty) return;
9859
+ this.clearStates(hasAnimation);
9860
+ }
9861
+ }
9508
9862
  useStates(states, hasAnimation) {
9509
- var _a, _b, _c, _d, _e;
9863
+ var _a;
9510
9864
  if (!states.length) return void this.clearStates(hasAnimation);
9511
- const previousStates = this.currentStates ? this.currentStates.slice() : [],
9512
- stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
9513
- stateModel = this.createStateModel();
9514
- null === (_b = this.stateEngine) || void 0 === _b || _b.setResolveContext(this, stateResolveBaseAttrs);
9515
- const transition = stateModel.useStates(states);
9516
- if (!transition.changed && this.sameStateNames(previousStates, transition.states)) return;
9517
- const effectiveStates = null !== (_c = transition.effectiveStates) && void 0 !== _c ? _c : transition.states,
9518
- resolvedStateAttrs = this.stateEngine && this.compiledStateDefinitions ? Object.assign({}, this.stateEngine.resolvedPatch) : this.getStateStyleResolver(this.stateMergeMode).resolve(stateResolveBaseAttrs, this.states, this.stateProxy, transition.states, this.stateSort);
9519
- this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1) && (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = Object.assign({}, resolvedStateAttrs), this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), null === (_d = getStageStatePerfMonitor(this.stage)) || void 0 === _d || _d.incrementCounter("stateCommits"), null === (_e = getStageStatePerfMonitor(this.stage)) || void 0 === _e || _e.recordEvent("state-commit", {
9520
- graphicId: this._uid,
9521
- targetStates: [...transition.states]
9522
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9523
- type: AttributeUpdateType.STATE
9524
- }), this._emitCustomEvent("afterStateUpdate", {
9525
- type: AttributeUpdateType.STATE
9526
- })));
9865
+ const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES,
9866
+ previousResolvedStatePatch = this.resolvedStatePatch,
9867
+ {
9868
+ transition: transition,
9869
+ effectiveStates: effectiveStates,
9870
+ resolvedStateAttrs: resolvedStateAttrs,
9871
+ isSimpleLocalTransition: isSimpleLocalTransition
9872
+ } = this.resolveGraphicStateTransition(states, previousStates);
9873
+ if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) {
9874
+ if (this.currentStates = transition.states, this.effectiveStates = isSimpleLocalTransition ? effectiveStates : [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.stage) {
9875
+ const perfMonitor = getActiveStageStatePerfMonitor(this.stage);
9876
+ null == perfMonitor || perfMonitor.incrementCounter("stateCommits"), null == perfMonitor || perfMonitor.recordEvent("state-commit", {
9877
+ graphicId: this._uid,
9878
+ targetStates: [...transition.states]
9879
+ });
9880
+ }
9881
+ hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
9882
+ type: AttributeUpdateType.STATE
9883
+ }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
9884
+ type: AttributeUpdateType.STATE
9885
+ }), this.emitStateUpdateEvent());
9886
+ }
9527
9887
  }
9528
9888
  invalidateResolver() {
9529
9889
  var _a, _b;
9530
9890
  if (!this.stateEngine || !(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.compiledStateDefinitions) return;
9531
- const stateResolveBaseAttrs = null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : this.attribute;
9532
- this.stateEngine.setResolveContext(this, stateResolveBaseAttrs), this.resolverEpoch += 1, this.stateEngine.invalidateResolverCache();
9891
+ this.syncStateResolveContext();
9892
+ this.resolverEpoch = (null !== (_b = this.resolverEpoch) && void 0 !== _b ? _b : 0) + 1, this.stateEngine.invalidateResolverCache();
9533
9893
  const transition = this.stateEngine.applyStates(this.currentStates),
9534
9894
  resolvedStateAttrs = Object.assign({}, this.stateEngine.resolvedPatch);
9535
- this.effectiveStates = [...transition.effectiveStates], this.resolvedStatePatch = Object.assign({}, resolvedStateAttrs), this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9895
+ this.effectiveStates = [...transition.effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9536
9896
  type: AttributeUpdateType.STATE
9537
- }), this._emitCustomEvent("afterStateUpdate", {
9538
- type: AttributeUpdateType.STATE
9539
- });
9897
+ }), this.emitStateUpdateEvent();
9540
9898
  }
9541
9899
  sameStateNames(left, right) {
9542
9900
  const normalizedLeft = null != left ? left : [],
@@ -9557,6 +9915,9 @@ class Graphic extends Node {
9557
9915
  addUpdateShapeAndBoundsTag() {
9558
9916
  this._updateTag |= UpdateTag.UPDATE_SHAPE_AND_BOUNDS, this.parent && this.parent.addChildUpdateBoundTag(), this.glyphHost && this.glyphHost.addUpdateBoundTag();
9559
9917
  }
9918
+ addBroadUpdateTag() {
9919
+ this.shadowRoot && this.shadowRoot.addUpdateGlobalPositionTag(), this._updateTag |= UpdateTag.UPDATE_SHAPE_AND_BOUNDS | UpdateTag.UPDATE_PAINT | UpdateTag.UPDATE_GLOBAL_LOCAL_MATRIX | UpdateTag.UPDATE_LAYOUT, this.parent && this.parent.addChildUpdateBoundTag(), this.glyphHost && this.glyphHost.addUpdateBoundTag();
9920
+ }
9560
9921
  updateShapeAndBoundsTagSetted() {
9561
9922
  return (this._updateTag & UpdateTag.UPDATE_SHAPE_AND_BOUNDS) === UpdateTag.UPDATE_SHAPE_AND_BOUNDS;
9562
9923
  }
@@ -9644,13 +10005,13 @@ class Graphic extends Node {
9644
10005
  }
9645
10006
  }
9646
10007
  setStage(stage, layer) {
9647
- var _a, _b, _c, _d, _e, _f, _g, _h;
10008
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
9648
10009
  const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService,
9649
10010
  previousStage = this.stage;
9650
10011
  if (this.stage !== stage || this.layer !== layer) {
9651
- if (this.stage = stage, this.layer = layer, this.syncSharedStateScopeBindingFromTree(!!(null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length)), this.setStageToShadowRoot(stage, layer), this.hasAnyTrackedAnimate()) {
9652
- const previousTimeline = null === (_e = null == previousStage ? void 0 : previousStage.getTimeline) || void 0 === _e ? void 0 : _e.call(previousStage),
9653
- nextTimeline = null === (_f = null == stage ? void 0 : stage.getTimeline) || void 0 === _f ? void 0 : _f.call(stage),
10012
+ if (this.stage = stage, this.layer = layer, ((null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0), this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
10013
+ const previousTimeline = null === (_f = null == previousStage ? void 0 : previousStage.getTimeline) || void 0 === _f ? void 0 : _f.call(previousStage),
10014
+ nextTimeline = null === (_g = null == stage ? void 0 : stage.getTimeline) || void 0 === _g ? void 0 : _g.call(stage),
9654
10015
  detachedStageAnimates = [];
9655
10016
  this.visitTrackedAnimates(a => {
9656
10017
  (!!previousTimeline && a.timeline === previousTimeline || a.timeline.isGlobal) && (nextTimeline ? a.timeline !== nextTimeline && (previousTimeline && a.timeline === previousTimeline && previousTimeline.removeAnimate(a, !1), a.setTimeline(nextTimeline), nextTimeline.addAnimate(a)) : previousTimeline && a.timeline === previousTimeline && (previousTimeline.removeAnimate(a, !1), detachedStageAnimates.push(a)));
@@ -9663,9 +10024,13 @@ class Graphic extends Node {
9663
10024
  type: AttributeUpdateType.ANIMATE_END
9664
10025
  }));
9665
10026
  }
9666
- return this._onSetStage && this._onSetStage(this, stage, layer), void (null === (_g = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _g || _g.call(graphicService, this, stage));
10027
+ return this._onSetStage && this._onSetStage(this, stage, layer), void (null === (_h = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _h || _h.call(graphicService, this, stage));
9667
10028
  }
9668
- this.syncSharedStateScopeBindingFromTree(!!(null === (_h = this.currentStates) || void 0 === _h ? void 0 : _h.length));
10029
+ ((null === (_j = this.currentStates) || void 0 === _j ? void 0 : _j.length) || this.boundSharedStateScope || (null === (_k = this.registeredActiveScopes) || void 0 === _k ? void 0 : _k.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0);
10030
+ }
10031
+ detachStageForRelease() {
10032
+ var _a, _b, _c;
10033
+ (null === (_a = this.registeredActiveScopes) || void 0 === _a ? void 0 : _a.size) && this.clearSharedStateActiveRegistrations(), (this.mayHaveTrackedAnimates() || this.shadowRoot) && this.stopAnimates(), this.boundSharedStateScope = void 0, this.boundSharedStateRevision = void 0, this.localFallbackCompiledDefinitions = void 0, this.compiledStateDefinitions = void 0, this.compiledStateDefinitionsCacheKey = void 0, this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.stateEngineStateProxyModeKey = void 0, this.sharedStateDirty = !1, this.stage = null, this.layer = null, this.shadowRoot && (null === (_c = (_b = this.shadowRoot).detachStageForRelease) || void 0 === _c || _c.call(_b));
9669
10034
  }
9670
10035
  setStageToShadowRoot(stage, layer) {
9671
10036
  this.shadowRoot && this.shadowRoot.setStage(stage, layer);
@@ -9732,6 +10097,7 @@ class Graphic extends Node {
9732
10097
  res && (res.state = "fail", cb && cb());
9733
10098
  }
9734
10099
  _stopAnimates() {
10100
+ if (!this.mayHaveTrackedAnimates()) return;
9735
10101
  const animates = [];
9736
10102
  this.visitTrackedAnimates(animate => {
9737
10103
  animates.push(animate);
@@ -9745,14 +10111,17 @@ class Graphic extends Node {
9745
10111
  });
9746
10112
  }
9747
10113
  release() {
9748
- var _a, _b, _c;
9749
- this.releaseStatus = "released", this.clearSharedStateActiveRegistrations(), this.stopAnimates();
9750
- const graphicService = null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.graphicService) && void 0 !== _b ? _b : application.graphicService;
9751
- null === (_c = null == graphicService ? void 0 : graphicService.onRelease) || void 0 === _c || _c.call(graphicService, this), super.release();
10114
+ var _a, _b, _c, _d;
10115
+ this.releaseStatus = "released", (null === (_a = this.registeredActiveScopes) || void 0 === _a ? void 0 : _a.size) && this.clearSharedStateActiveRegistrations(), (this.mayHaveTrackedAnimates() || this.shadowRoot) && this.stopAnimates();
10116
+ const graphicService = null !== (_c = null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService;
10117
+ null === (_d = null == graphicService ? void 0 : graphicService.onRelease) || void 0 === _d || _d.call(graphicService, this), super.release();
10118
+ }
10119
+ hasCustomEvent(type) {
10120
+ return !!this._events && type in this._events;
9752
10121
  }
9753
10122
  _dispatchCustomEvent(type, context) {
9754
10123
  var _a, _b;
9755
- if (this._events && type in this._events) {
10124
+ if (this.hasCustomEvent(type)) {
9756
10125
  const changeEvent = new CustomEvent(type, context);
9757
10126
  changeEvent.bubbles = !1;
9758
10127
  const manager = null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventSystem) || void 0 === _b ? void 0 : _b.manager;
@@ -9761,7 +10130,7 @@ class Graphic extends Node {
9761
10130
  return !0;
9762
10131
  }
9763
10132
  beforeStateUpdate(attrs, prevStates, nextStates, hasAnimation, isClear) {
9764
- return this._dispatchCustomEvent("beforeStateUpdate", {
10133
+ return !this.hasCustomEvent("beforeStateUpdate") || this._dispatchCustomEvent("beforeStateUpdate", {
9765
10134
  type: AttributeUpdateType.STATE,
9766
10135
  attrs: Object.assign({}, attrs),
9767
10136
  prevStates: prevStates.slice(),
@@ -9770,6 +10139,11 @@ class Graphic extends Node {
9770
10139
  isClear: !!isClear
9771
10140
  });
9772
10141
  }
10142
+ emitStateUpdateEvent() {
10143
+ this.hasCustomEvent("afterStateUpdate") && this._emitCustomEvent("afterStateUpdate", {
10144
+ type: AttributeUpdateType.STATE
10145
+ });
10146
+ }
9773
10147
  _emitCustomEvent(type, context) {
9774
10148
  this._dispatchCustomEvent(type, context);
9775
10149
  }
@@ -10951,6 +11325,52 @@ class Rect extends Graphic {
10951
11325
  needUpdateTag(key) {
10952
11326
  return super.needUpdateTag(key, RECT_UPDATE_TAG_KEY);
10953
11327
  }
11328
+ shouldSkipStateTransitionDefaultAttribute(key, targetAttrs) {
11329
+ var _a;
11330
+ const attrs = null !== (_a = null != targetAttrs ? targetAttrs : this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
11331
+ hasValue = attrKey => null != attrs[attrKey],
11332
+ isNilValue = attrKey => null == attrs[attrKey];
11333
+ switch (key) {
11334
+ case "width":
11335
+ return isNilValue("width") && hasValue("x") && hasValue("x1");
11336
+ case "height":
11337
+ return isNilValue("height") && hasValue("y") && hasValue("y1");
11338
+ case "x1":
11339
+ return isNilValue("x1") && hasValue("x") && hasValue("width");
11340
+ case "y1":
11341
+ return isNilValue("y1") && hasValue("y") && hasValue("height");
11342
+ default:
11343
+ return !1;
11344
+ }
11345
+ }
11346
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
11347
+ var _a;
11348
+ const attrs = null !== (_a = null != targetAttrs ? targetAttrs : this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
11349
+ getNumber = attrKey => {
11350
+ const value = attrs[attrKey];
11351
+ return "number" == typeof value && Number.isFinite(value) ? value : void 0;
11352
+ },
11353
+ x = getNumber("x"),
11354
+ y = getNumber("y"),
11355
+ x1 = getNumber("x1"),
11356
+ y1 = getNumber("y1"),
11357
+ width = getNumber("width"),
11358
+ height = getNumber("height");
11359
+ switch (key) {
11360
+ case "width":
11361
+ if (null == width && null != x && null != x1) return x1 - x;
11362
+ break;
11363
+ case "height":
11364
+ if (null == height && null != y && null != y1) return y1 - y;
11365
+ break;
11366
+ case "x1":
11367
+ if (null == x1 && null != x && null != width) return x + width;
11368
+ break;
11369
+ case "y1":
11370
+ if (null == y1 && null != y && null != height) return y + height;
11371
+ }
11372
+ return super.getStateTransitionDefaultAttribute(key, targetAttrs);
11373
+ }
10954
11374
  toCustomPath() {
10955
11375
  let path = super.toCustomPath();
10956
11376
  if (path) return path;
@@ -12730,13 +13150,15 @@ var GroupUpdateAABBBoundsMode;
12730
13150
  }(GroupUpdateAABBBoundsMode || (GroupUpdateAABBBoundsMode = {}));
12731
13151
  class Group extends Graphic {
12732
13152
  constructor(params) {
12733
- super(params), this.type = "group", this.parent = null, this.isContainer = !0, this.numberType = GROUP_NUMBER_TYPE, this._childUpdateTag = UpdateTag.UPDATE_BOUNDS;
13153
+ super(params), this.type = "group", this.parent = null, this.isContainer = !0, this._hasSharedStateDefinitions = !1, this.numberType = GROUP_NUMBER_TYPE, this._childUpdateTag = UpdateTag.UPDATE_BOUNDS;
12734
13154
  }
12735
13155
  get sharedStateDefinitions() {
12736
13156
  return this._sharedStateDefinitions;
12737
13157
  }
12738
13158
  set sharedStateDefinitions(value) {
12739
- this._sharedStateDefinitions !== value && (this._sharedStateDefinitions = value, this.ensureSharedStateScopeBound(), this.sharedStateScope && (setSharedStateScopeLocalDefinitions(this.sharedStateScope, value), markScopeActiveDescendantsDirty(this.sharedStateScope, this.stage)));
13159
+ if (this._sharedStateDefinitions === value) return;
13160
+ const previousScope = this.sharedStateScope;
13161
+ this._sharedStateDefinitions = value, this._hasSharedStateDefinitions = !!value && Object.keys(value).length > 0, this.ensureSharedStateScopeBound(), this.sharedStateScope && (setSharedStateScopeLocalDefinitions(this.sharedStateScope, value), markScopeActiveDescendantsDirty(this.sharedStateScope, this.stage)), previousScope !== this.sharedStateScope && this.notifyChildrenSharedStateTreeChanged();
12740
13162
  }
12741
13163
  setMode(mode) {
12742
13164
  "3d" === mode ? this.set3dMode() : this.set2dMode();
@@ -12861,9 +13283,10 @@ class Group extends Graphic {
12861
13283
  insertInto(newNode, idx) {
12862
13284
  return this._updateChildToStage(super.insertInto(newNode, idx));
12863
13285
  }
12864
- removeChild(child) {
13286
+ removeChild(child, highPerformance = !1) {
13287
+ var _a;
12865
13288
  const data = super.removeChild(child);
12866
- return this.getGraphicService().onRemove(child), child.setStage(null, null), this.addUpdateBoundTag(), data;
13289
+ return data ? highPerformance ? (null === (_a = child.detachStageForRelease) || void 0 === _a || _a.call(child), data) : (this.getGraphicService().onRemove(child), child.setStage(null, null), this.addUpdateBoundTag(), data) : data;
12867
13290
  }
12868
13291
  removeAllChild(deep = !1) {
12869
13292
  const children = this.children.slice();
@@ -12875,11 +13298,13 @@ class Group extends Graphic {
12875
13298
  }
12876
13299
  setStage(stage, layer) {
12877
13300
  var _a, _b, _c, _d, _e, _f;
12878
- const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService;
12879
- if (this.stage !== stage) return this.stage = stage, this.layer = layer, this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingFromTree(!!(null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_e = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _e || _e.call(graphicService, this, stage), void this.forEachChildren(item => {
13301
+ const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService,
13302
+ needsSharedStateTreeSync = this._hasSharedStateDefinitions || this.sharedStateScope || (null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty;
13303
+ if (this.stage !== stage) return this.stage = stage, this.layer = layer, needsSharedStateTreeSync && (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_f = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _f || _f.call(graphicService, this, stage), void this.forEachChildren(item => {
12880
13304
  item.setStage(stage, this.layer);
12881
13305
  });
12882
- this.layer !== layer && (this.layer = layer), this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingFromTree(!!(null === (_f = this.currentStates) || void 0 === _f ? void 0 : _f.length)), this.forEachChildren(item => {
13306
+ const layerChanged = this.layer !== layer;
13307
+ layerChanged && (this.layer = layer), needsSharedStateTreeSync ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0), this.notifyChildrenSharedStateTreeChanged()) : layerChanged && this.forEachChildren(item => {
12883
13308
  item.onParentSharedStateTreeChanged && item.onParentSharedStateTreeChanged(stage, this.layer);
12884
13309
  });
12885
13310
  }
@@ -12926,15 +13351,29 @@ class Group extends Graphic {
12926
13351
  g.release(all);
12927
13352
  }), super.release();
12928
13353
  }
13354
+ detachStageForRelease() {
13355
+ super.detachStageForRelease(), this.sharedStateScope = void 0, this.forEachChildren(item => {
13356
+ var _a;
13357
+ null === (_a = item.detachStageForRelease) || void 0 === _a || _a.call(item);
13358
+ });
13359
+ }
12929
13360
  ensureSharedStateScopeBound() {
12930
13361
  var _a, _b, _c;
13362
+ if (!this.hasSharedStateDefinitions()) return void (this.sharedStateScope = void 0);
12931
13363
  const parentScope = null !== (_b = null === (_a = this.parent) || void 0 === _a ? void 0 : _a.sharedStateScope) && void 0 !== _b ? _b : null === (_c = this.stage) || void 0 === _c ? void 0 : _c.rootSharedStateScope;
12932
13364
  this.sharedStateScope ? (this.sharedStateScope.ownerGroup = this, this.sharedStateScope.ownerStage = this.stage, setSharedStateScopeParent(this.sharedStateScope, parentScope), this.sharedStateScope.localStateDefinitions !== this._sharedStateDefinitions && setSharedStateScopeLocalDefinitions(this.sharedStateScope, this._sharedStateDefinitions)) : this.sharedStateScope = createGroupSharedStateScope(this, parentScope, this._sharedStateDefinitions);
12933
13365
  }
13366
+ hasSharedStateDefinitions() {
13367
+ return this._hasSharedStateDefinitions;
13368
+ }
13369
+ notifyChildrenSharedStateTreeChanged() {
13370
+ this.forEachChildren(item => {
13371
+ item.onParentSharedStateTreeChanged && item.onParentSharedStateTreeChanged(this.stage, this.layer);
13372
+ });
13373
+ }
12934
13374
  onParentSharedStateTreeChanged(stage, layer) {
12935
- this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingFromTree(), this.forEachChildren(item => {
12936
- item.onParentSharedStateTreeChanged && item.onParentSharedStateTreeChanged(stage, this.layer);
12937
- })) : this.setStage(stage, layer);
13375
+ var _a;
13376
+ this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)), this.notifyChildrenSharedStateTreeChanged()) : this.setStage(stage, layer);
12938
13377
  }
12939
13378
  }
12940
13379
  Group.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
@@ -13282,7 +13721,10 @@ class DefaultGraphicService {
13282
13721
  beforeUpdateAABBBounds: new SyncHook(["graphic", "stage", "willUpdate", "aabbBounds"]),
13283
13722
  afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"]),
13284
13723
  clearAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds"])
13285
- }, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds();
13724
+ }, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds(), this.tempAABBBoundsResult = {
13725
+ tb1: this.tempAABBBounds1,
13726
+ tb2: this.tempAABBBounds2
13727
+ };
13286
13728
  }
13287
13729
  onAttributeUpdate(graphic) {
13288
13730
  this.hooks.onAttributeUpdate.taps.length && this.hooks.onAttributeUpdate.call(graphic);
@@ -13382,10 +13824,7 @@ class DefaultGraphicService {
13382
13824
  updateTempAABBBounds(aabbBounds) {
13383
13825
  const tb1 = this.tempAABBBounds1,
13384
13826
  tb2 = this.tempAABBBounds2;
13385
- return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), {
13386
- tb1: tb1,
13387
- tb2: tb2
13388
- };
13827
+ return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.tempAABBBoundsResult;
13389
13828
  }
13390
13829
  }
13391
13830
 
@@ -14727,7 +15166,7 @@ class IncrementalAutoRenderPlugin {
14727
15166
  const globalBounds = new AABBBounds();
14728
15167
  class DirtyBoundsPlugin {
14729
15168
  constructor() {
14730
- this.name = "DirtyBoundsPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.handlePaintOnlyUpdate = graphic => {
15169
+ this.name = "DirtyBoundsPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.dirtyBoundsHooksRegistered = !1, this.handlePaintOnlyUpdate = graphic => {
14731
15170
  var _a, _b, _c, _d;
14732
15171
  const stage = this.pluginService.stage;
14733
15172
  if (!stage || stage !== graphic.stage || !stage.renderCount) return;
@@ -14747,12 +15186,13 @@ class DirtyBoundsPlugin {
14747
15186
  owner._AABBBounds && "function" == typeof owner._AABBBounds.empty && !owner._AABBBounds.empty() || "function" != typeof owner.doUpdateAABBBounds || owner.doUpdateAABBBounds("imprecise" === (null === (_a = owner.attribute) || void 0 === _a ? void 0 : _a.boundsMode));
14748
15187
  return owner._globalAABBBounds && "function" == typeof owner._globalAABBBounds.empty && !owner._globalAABBBounds.empty() || "function" != typeof owner.tryUpdateGlobalAABBBounds || owner.tryUpdateGlobalAABBBounds(), null !== (_b = owner._globalAABBBounds) && void 0 !== _b ? _b : owner.globalAABBBounds;
14749
15188
  }
14750
- activate(context) {
14751
- this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, stage => {
14752
- stage && stage === this.pluginService.stage && stage.dirtyBounds.clear();
14753
- });
14754
- const stage = this.pluginService.stage;
14755
- stage && (stage.graphicService.hooks.onAttributeUpdate.tap(this.key, this.handlePaintOnlyUpdate), stage.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
15189
+ getRemoveDirtyBounds(graphic) {
15190
+ var _a;
15191
+ const cachedBounds = (null !== (_a = graphic.glyphHost) && void 0 !== _a ? _a : graphic)._globalAABBBounds;
15192
+ if (cachedBounds && "function" == typeof cachedBounds.empty && !cachedBounds.empty()) return cachedBounds;
15193
+ }
15194
+ registerDirtyBoundsHooks(stage) {
15195
+ this.dirtyBoundsHooksRegistered || (stage.graphicService.hooks.onAttributeUpdate.tap(this.key, this.handlePaintOnlyUpdate), stage.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
14756
15196
  graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !graphic.shouldSelfChangeUpdateAABBBounds() || willUpdate && (globalBounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), stage.dirty(globalBounds, graphic.parent && graphic.parent.globalTransMatrix)));
14757
15197
  }), stage.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
14758
15198
  stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !selfChange || stage.dirty(params.globalAABBBounds));
@@ -14760,12 +15200,21 @@ class DirtyBoundsPlugin {
14760
15200
  stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(bounds);
14761
15201
  }), stage.graphicService.hooks.onRemove.tap(this.key, graphic => {
14762
15202
  const stage = graphic.stage;
14763
- stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(graphic.globalAABBBounds);
14764
- }));
15203
+ if (!stage || stage !== this.pluginService.stage || !stage.renderCount) return;
15204
+ const bounds = this.getRemoveDirtyBounds(graphic);
15205
+ bounds && !bounds.empty() && stage.dirty(bounds);
15206
+ }), this.dirtyBoundsHooksRegistered = !0);
15207
+ }
15208
+ activate(context) {
15209
+ this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, stage => {
15210
+ stage && stage === this.pluginService.stage && (stage.dirtyBounds.clear(), this.registerDirtyBoundsHooks(stage));
15211
+ });
15212
+ const stage = this.pluginService.stage;
15213
+ stage && stage.renderCount && this.registerDirtyBoundsHooks(stage);
14765
15214
  }
14766
15215
  deactivate(context) {
14767
15216
  const stage = this.pluginService.stage;
14768
- stage && (stage.graphicService.hooks.onAttributeUpdate.taps = stage.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.beforeUpdateAABBBounds.taps = stage.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.afterUpdateAABBBounds.taps = stage.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.clearAABBBounds.taps = stage.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), stage.hooks.afterRender.taps = stage.hooks.afterRender.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onRemove.taps = stage.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key));
15217
+ stage && (stage.graphicService.hooks.onAttributeUpdate.taps = stage.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), this.dirtyBoundsHooksRegistered = !1, stage.graphicService.hooks.beforeUpdateAABBBounds.taps = stage.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.afterUpdateAABBBounds.taps = stage.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.clearAABBBounds.taps = stage.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), stage.hooks.afterRender.taps = stage.hooks.afterRender.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onRemove.taps = stage.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key));
14769
15218
  }
14770
15219
  }
14771
15220
 
@@ -15121,7 +15570,7 @@ class Stage extends Group {
15121
15570
  ticker.bindStage(this), this._ticker && this._ticker.removeListener("tick", this.afterTickCb), ticker.addTimeline(this.timeline), this._ticker = ticker, this._ticker.on("tick", this.afterTickCb);
15122
15571
  }
15123
15572
  constructor(params = {}, deps = {}) {
15124
- var _a, _b, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
15573
+ var _a, _b, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
15125
15574
  super({}), this.tickedBeforeRender = !0, this._onVisibleChange = visible => {
15126
15575
  if (!(this._skipRender < 0)) if (visible) {
15127
15576
  if (this.dirtyBounds) {
@@ -15131,7 +15580,8 @@ class Stage extends Group {
15131
15580
  this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0;
15132
15581
  } else this._skipRender = 1;
15133
15582
  }, this.beforeRender = stage => {
15134
- flushStageSharedStateRefresh(this), this._beforeRenderList.forEach(cb => cb(stage));
15583
+ const pendingSharedRefresh = this._pendingSharedStateRefreshGraphics;
15584
+ (null == pendingSharedRefresh ? void 0 : pendingSharedRefresh.size) && flushStageSharedStateRefresh(this), this._beforeRenderList.forEach(cb => cb(stage));
15135
15585
  }, this.afterClearScreen = drawParams => {
15136
15586
  this._afterClearScreen && this._afterClearScreen(drawParams);
15137
15587
  }, this.afterClearRect = drawParams => {
@@ -15156,14 +15606,17 @@ class Stage extends Group {
15156
15606
  canvas: params.canvas
15157
15607
  }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_w = params.background) && void 0 !== _w ? _w : DefaultConfig.BACKGROUND, this.stage = this, this.appendChild(this.layerService.createLayer(this, {
15158
15608
  main: !0
15159
- })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, ensureStageStatePerfMonitor(this), this._stateBatchScheduler = new StateBatchScheduler(this, ensureStageStatePerfMonitor(this)), this.rootSharedStateScope = createRootSharedStateScope(this, null === (_x = this.theme) || void 0 === _x ? void 0 : _x.stateDefinitions), this.theme.onStateDefinitionsChange = () => {
15609
+ })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.theme.onStateDefinitionsChange = () => {
15160
15610
  var _a;
15161
- this.rootSharedStateScope && (setRootSharedStateScopeThemeDefinitions(this.rootSharedStateScope, null === (_a = this.theme) || void 0 === _a ? void 0 : _a.stateDefinitions), markScopeActiveDescendantsDirty(this.rootSharedStateScope, this));
15611
+ const definitions = null === (_a = this.theme) || void 0 === _a ? void 0 : _a.stateDefinitions;
15612
+ if (!definitions || !Object.keys(definitions).length) return void (this.rootSharedStateScope && (setRootSharedStateScopeThemeDefinitions(this.rootSharedStateScope, definitions), markScopeActiveDescendantsDirty(this.rootSharedStateScope, this)));
15613
+ const rootScope = this.ensureRootSharedStateScope(definitions);
15614
+ setRootSharedStateScopeThemeDefinitions(rootScope, definitions), markScopeActiveDescendantsDirty(rootScope, this);
15162
15615
  }, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), params.beforeRender && this._beforeRenderList.push(params.beforeRender), params.afterRender && this._afterRenderList.push(params.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
15163
15616
  tickRenderMode: "effect"
15164
15617
  }), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
15165
15618
  background: this._background
15166
- }), this.initAnimate(params), this.rafId = null !== (_y = params.rafId) && void 0 !== _y ? _y : Math.floor(6 * Math.random());
15619
+ }), this.initAnimate(params), this.rafId = null !== (_x = params.rafId) && void 0 !== _x ? _x : Math.floor(6 * Math.random());
15167
15620
  }
15168
15621
  initAnimate(params) {
15169
15622
  var _a;
@@ -15423,8 +15876,14 @@ class Stage extends Group {
15423
15876
  this._doRenderInThisFrame(), this.willNextFrameRender = !1;
15424
15877
  }));
15425
15878
  }
15879
+ ensureRootSharedStateScope(themeStateDefinitions) {
15880
+ return this.rootSharedStateScope ? (this.rootSharedStateScope.ownerStage = this, this.rootSharedStateScope) : (this.rootSharedStateScope = createRootSharedStateScope(this, themeStateDefinitions), this.rootSharedStateScope);
15881
+ }
15882
+ getStateBatchScheduler() {
15883
+ return this._stateBatchScheduler || (this._stateBatchScheduler = new StateBatchScheduler(this, ensureStageStatePerfMonitor(this))), this._stateBatchScheduler;
15884
+ }
15426
15885
  scheduleStateBatch(graphics, targetStates) {
15427
- this._stateBatchScheduler.schedule(graphics, targetStates);
15886
+ this.getStateBatchScheduler().schedule(graphics, targetStates);
15428
15887
  }
15429
15888
  getStatePerfSnapshot() {
15430
15889
  return ensureStageStatePerfMonitor(this).getSnapshot();
@@ -17925,7 +18384,11 @@ const result = {
17925
18384
  };
17926
18385
  class BaseRender {
17927
18386
  init(contributions) {
17928
- contributions && (this._renderContribitions = contributions.getContributions()), this._renderContribitions || (this._renderContribitions = []), this.builtinContributions || (this.builtinContributions = []), this.builtinContributions.push(defaultBaseClipRenderBeforeContribution), this.builtinContributions.push(defaultBaseClipRenderAfterContribution), this.builtinContributions.forEach(item => this._renderContribitions.push(item)), this._renderContribitions.length && (this._renderContribitions.sort((a, b) => b.order - a.order), this._beforeRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.beforeFillStroke), this._afterRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.afterFillStroke));
18387
+ this.builtinContributions || (this.builtinContributions = []), this._renderContribitions = contributions ? contributions.getContributions().slice() : [];
18388
+ const addContribution = item => {
18389
+ this._renderContribitions.includes(item) || this._renderContribitions.push(item);
18390
+ };
18391
+ this.builtinContributions.forEach(addContribution), addContribution(defaultBaseClipRenderBeforeContribution), addContribution(defaultBaseClipRenderAfterContribution), this._renderContribitions.length ? (this._renderContribitions.sort((a, b) => b.order - a.order), this._beforeRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.beforeFillStroke), this._afterRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.afterFillStroke)) : (this._beforeRenderContribitions = [], this._afterRenderContribitions = []);
17929
18392
  }
17930
18393
  reInit() {
17931
18394
  this.init(this.graphicRenderContributions);
@@ -22974,8 +23437,8 @@ class FlexLayoutPlugin {
22974
23437
  graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && _tempBounds.copy(bounds);
22975
23438
  }), stage.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
22976
23439
  stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && (_tempBounds.equals(bounds) || this.tryLayout(graphic, !1));
22977
- }), stage.graphicService.hooks.onSetStage.tap(this.key, graphic => {
22978
- graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic, !1);
23440
+ }), stage.graphicService.hooks.onSetStage.tap(this.key, (graphic, nextStage) => {
23441
+ nextStage && nextStage === this.pluginService.stage && (graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic, !1));
22979
23442
  }));
22980
23443
  }
22981
23444
  deactivate(context) {
@@ -23538,7 +24001,6 @@ var VRenderCore = /*#__PURE__*/Object.freeze({
23538
24001
  segments: segments,
23539
24002
  shouldClipImageByLayout: shouldClipImageByLayout,
23540
24003
  shouldUseMat4: shouldUseMat4,
23541
- shouldUseSimpleAttributeFastPath: shouldUseSimpleAttributeFastPath,
23542
24004
  snapLength: snapLength,
23543
24005
  splitArc: splitArc,
23544
24006
  splitArea: splitArea,
@@ -32337,7 +32799,67 @@ function commonInterpolateUpdate(key, from, to, ratio, step, target) {
32337
32799
  return !1;
32338
32800
  }
32339
32801
 
32802
+ const animateUpdateContext = {
32803
+ type: AttributeUpdateType.ANIMATE_UPDATE
32804
+ },
32805
+ animateBindContext = {
32806
+ type: AttributeUpdateType.ANIMATE_BIND
32807
+ },
32808
+ animateStartContext = {
32809
+ type: AttributeUpdateType.ANIMATE_START
32810
+ };
32811
+ function getAnimationContext(type) {
32812
+ switch (type) {
32813
+ case AttributeUpdateType.ANIMATE_UPDATE:
32814
+ return animateUpdateContext;
32815
+ case AttributeUpdateType.ANIMATE_BIND:
32816
+ return animateBindContext;
32817
+ case AttributeUpdateType.ANIMATE_START:
32818
+ return animateStartContext;
32819
+ default:
32820
+ return {
32821
+ type: type
32822
+ };
32823
+ }
32824
+ }
32825
+ function prepareAnimationFrameAttribute(target) {
32826
+ const transientTarget = target;
32827
+ return transientTarget.attribute || (transientTarget.attribute = {}), transientTarget.attribute === transientTarget.baseAttributes && "function" == typeof transientTarget.detachAttributeFromBaseAttributes && transientTarget.detachAttributeFromBaseAttributes(), transientTarget.attributeMayContainTransientAttrs = !0, transientTarget.attribute;
32828
+ }
32829
+ function commitAnimationFrameAttribute(target) {
32830
+ var _a, _b;
32831
+ null === (_b = (_a = target).onAttributeUpdate) || void 0 === _b || _b.call(_a, animateUpdateContext);
32832
+ }
32833
+ function applyAnimationFrameAttributes(target, attributes) {
32834
+ if (!attributes) return;
32835
+ const targetAttribute = prepareAnimationFrameAttribute(target);
32836
+ for (const key in attributes) Object.prototype.hasOwnProperty.call(attributes, key) && (targetAttribute[key] = attributes[key]);
32837
+ commitAnimationFrameAttribute(target);
32838
+ }
32839
+ function applyAnimationFrameNumberAttributes(target, keys, from, to, ratio) {
32840
+ const targetAttribute = prepareAnimationFrameAttribute(target);
32841
+ for (let i = 0; i < keys.length; i++) {
32842
+ const key = keys[i];
32843
+ targetAttribute[key] = from[key] + (to[key] - from[key]) * ratio;
32844
+ }
32845
+ commitAnimationFrameAttribute(target);
32846
+ }
32847
+ function applyAnimationTransientAttributes(target, attributes, type = AttributeUpdateType.ANIMATE_UPDATE) {
32848
+ var _a;
32849
+ if (!attributes) return;
32850
+ const context = getAnimationContext(type),
32851
+ transientTarget = target;
32852
+ "function" != typeof transientTarget.applyAnimationTransientAttributes ? "function" != typeof transientTarget.applyTransientAttributes ? "function" != typeof transientTarget.setAttributesAndPreventAnimate ? (transientTarget.attribute || (transientTarget.attribute = {}), Object.assign(transientTarget.attribute, attributes), null === (_a = transientTarget.onAttributeUpdate) || void 0 === _a || _a.call(transientTarget, context)) : transientTarget.setAttributesAndPreventAnimate(attributes, !1, context) : transientTarget.applyTransientAttributes(attributes, !1, context) : transientTarget.applyAnimationTransientAttributes(attributes, !1, context);
32853
+ }
32854
+ function applyAppearStartAttributes(target, attributes) {
32855
+ applyAnimationTransientAttributes(target, attributes, AttributeUpdateType.ANIMATE_BIND);
32856
+ }
32857
+
32340
32858
  function noop() {}
32859
+ function includesKey$1(keys, key) {
32860
+ for (let i = 0; i < keys.length; i++) if (keys[i] === key) return !0;
32861
+ return !1;
32862
+ }
32341
32863
  class Step {
32342
32864
  constructor(type, props, duration, easing) {
32343
32865
  var _a;
@@ -32393,6 +32915,17 @@ class Step {
32393
32915
  onBind() {
32394
32916
  "glyph" === this.target.type && (this.syncAttributeUpdate = this._syncAttributeUpdate);
32395
32917
  }
32918
+ runInterpolateUpdate(fromProps, toProps, ratio) {
32919
+ if (this.animate.interpolateUpdateFunction) return void this.animate.interpolateUpdateFunction(fromProps, toProps, ratio, this, this.target);
32920
+ const funcs = this.interpolateUpdateFunctions,
32921
+ propKeys = this.propKeys;
32922
+ if (funcs && propKeys) for (let index = 0; index < funcs.length; index++) {
32923
+ const key = propKeys[index],
32924
+ fromValue = fromProps[key],
32925
+ toValue = toProps[key];
32926
+ funcs[index](key, fromValue, toValue, ratio, this, this.target);
32927
+ }
32928
+ }
32396
32929
  onFirstRun() {}
32397
32930
  onStart() {
32398
32931
  if (!this._hasFirstRun) {
@@ -32407,23 +32940,49 @@ class Step {
32407
32940
  tryPreventConflict() {
32408
32941
  var _a, _b;
32409
32942
  const animate = this.animate,
32410
- target = this.target;
32411
- (null !== (_b = null === (_a = target.forEachTrackedAnimate) || void 0 === _a ? void 0 : _a.bind(target)) && void 0 !== _b ? _b : cb => {
32412
- var _a;
32413
- null === (_a = target.animates) || void 0 === _a || _a.forEach(cb);
32414
- })(a => {
32943
+ target = this.target,
32944
+ forEachTrackedAnimate = null !== (_b = null === (_a = target.forEachTrackedAnimate) || void 0 === _a ? void 0 : _a.bind(target)) && void 0 !== _b ? _b : cb => {
32945
+ var _a;
32946
+ null === (_a = target.animates) || void 0 === _a || _a.forEach(cb);
32947
+ },
32948
+ propKeys = this.propKeys;
32949
+ forEachTrackedAnimate(a => {
32415
32950
  if (a === animate || a.priority > animate.priority || a.priority === 1 / 0) return;
32416
32951
  const fromProps = a.getStartProps();
32417
- this.propKeys.forEach(key => {
32418
- null != fromProps[key] && a.preventAttr(key);
32419
- });
32952
+ let conflictKeys = null;
32953
+ for (let i = 0; i < propKeys.length; i++) {
32954
+ const key = propKeys[i];
32955
+ null != fromProps[key] && (null != conflictKeys ? conflictKeys : conflictKeys = []).push(key);
32956
+ }
32957
+ conflictKeys && a.preventAttrs(conflictKeys);
32420
32958
  });
32421
32959
  }
32960
+ removeKeysFromRecord(record, keys) {
32961
+ if (!record) return record;
32962
+ let hasBlockedKey = !1;
32963
+ for (const key in record) if (Object.prototype.hasOwnProperty.call(record, key) && includesKey$1(keys, key)) {
32964
+ hasBlockedKey = !0;
32965
+ break;
32966
+ }
32967
+ if (!hasBlockedKey) return record;
32968
+ const nextRecord = {};
32969
+ for (const key in record) Object.prototype.hasOwnProperty.call(record, key) && !includesKey$1(keys, key) && (nextRecord[key] = record[key]);
32970
+ return nextRecord;
32971
+ }
32422
32972
  deleteSelfAttr(key) {
32973
+ this.deleteSelfAttrs([key]);
32974
+ }
32975
+ deleteSelfAttrs(keys) {
32423
32976
  var _a;
32424
- delete this.props[key], this.fromProps && delete this.fromProps[key];
32425
- const index = this.propKeys.indexOf(key);
32426
- -1 !== index && (this.propKeys.splice(index, 1), null === (_a = this.interpolateUpdateFunctions) || void 0 === _a || _a.splice(index, 1));
32977
+ if ((null == keys ? void 0 : keys.length) && (this.props = this.removeKeysFromRecord(this.props, keys), this.fromProps = this.removeKeysFromRecord(this.fromProps, keys), this.fromParsedProps = this.removeKeysFromRecord(this.fromParsedProps, keys), this.toParsedProps = this.removeKeysFromRecord(this.toParsedProps, keys), null === (_a = this.propKeys) || void 0 === _a ? void 0 : _a.length)) {
32978
+ const funcs = this.interpolateUpdateFunctions;
32979
+ let writeIndex = 0;
32980
+ for (let readIndex = 0; readIndex < this.propKeys.length; readIndex++) {
32981
+ const propKey = this.propKeys[readIndex];
32982
+ includesKey$1(keys, propKey) || (writeIndex !== readIndex && (this.propKeys[writeIndex] = propKey, funcs && (funcs[writeIndex] = funcs[readIndex])), writeIndex++);
32983
+ }
32984
+ this.propKeys.length = writeIndex, funcs && (funcs.length = writeIndex);
32985
+ }
32427
32986
  }
32428
32987
  trySyncStartProps() {
32429
32988
  this.propKeys.forEach(key => {
@@ -32433,11 +32992,7 @@ class Step {
32433
32992
  update(end, ratio, out) {
32434
32993
  if (this.onStart(), !this.props || !this.propKeys) return;
32435
32994
  const easedRatio = this.easing(ratio);
32436
- this.animate.interpolateUpdateFunction ? this.animate.interpolateUpdateFunction(this.fromProps, this.props, easedRatio, this, this.target) : this.interpolateUpdateFunctions.forEach((func, index) => {
32437
- if (!this.animate.validAttr(this.propKeys[index])) return;
32438
- const key = this.propKeys[index];
32439
- func(key, this.fromProps[key], this.props[key], easedRatio, this, this.target);
32440
- }), this.onUpdate(end, easedRatio, out), this.syncAttributeUpdate();
32995
+ this.runInterpolateUpdate(this.fromProps, this.props, easedRatio), this.onUpdate(end, easedRatio, out), this.syncAttributeUpdate();
32441
32996
  }
32442
32997
  onUpdate(end, ratio, out) {}
32443
32998
  onEnd(cb) {
@@ -32462,7 +33017,7 @@ class WaitStep extends Step {
32462
33017
  onStart() {
32463
33018
  super.onStart();
32464
33019
  const fromProps = this.getFromProps();
32465
- this.target.setAttributes(fromProps);
33020
+ applyAnimationTransientAttributes(this.target, fromProps, AttributeUpdateType.ANIMATE_START);
32466
33021
  }
32467
33022
  update(end, ratio, out) {
32468
33023
  this.onStart();
@@ -32641,19 +33196,34 @@ class FromTo extends ACustomAnimate {
32641
33196
  }), this.applyTransientFromAttributes();
32642
33197
  }
32643
33198
  deleteSelfAttr(key) {
32644
- super.deleteSelfAttr(key), delete this.from[key];
33199
+ this.deleteSelfAttrs([key]);
33200
+ }
33201
+ deleteSelfAttrs(keys) {
33202
+ super.deleteSelfAttrs(keys), this.from = this.removeKeysFromRecord(this.from, keys);
32645
33203
  }
32646
33204
  update(end, ratio, out) {
32647
33205
  if (this.onStart(), !this.props || !this.propKeys) return;
32648
33206
  const easedRatio = this.easing(ratio);
32649
- this.animate.interpolateUpdateFunction ? this.animate.interpolateUpdateFunction(this.from, this.props, easedRatio, this, this.target) : this.interpolateUpdateFunctions.forEach((func, index) => {
32650
- if (!this.animate.validAttr(this.propKeys[index])) return;
32651
- const key = this.propKeys[index];
32652
- func(key, this.from[key], this.props[key], easedRatio, this, this.target);
32653
- }), this.onUpdate(end, easedRatio, out), this.syncAttributeUpdate();
33207
+ this.runInterpolateUpdate(this.from, this.props, easedRatio), this.onUpdate(end, easedRatio, out), this.syncAttributeUpdate();
32654
33208
  }
32655
33209
  }
32656
33210
 
33211
+ function includesKey(keys, key) {
33212
+ for (let i = 0; i < keys.length; i++) if (keys[i] === key) return !0;
33213
+ return !1;
33214
+ }
33215
+ function removeKeysFromRecord(record, keys) {
33216
+ if (!record) return record;
33217
+ let hasBlockedKey = !1;
33218
+ for (const key in record) if (Object.prototype.hasOwnProperty.call(record, key) && includesKey(keys, key)) {
33219
+ hasBlockedKey = !0;
33220
+ break;
33221
+ }
33222
+ if (!hasBlockedKey) return record;
33223
+ const nextRecord = {};
33224
+ for (const key in record) Object.prototype.hasOwnProperty.call(record, key) && !includesKey(keys, key) && (nextRecord[key] = record[key]);
33225
+ return nextRecord;
33226
+ }
32657
33227
  class Animate {
32658
33228
  constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
32659
33229
  this.id = id, this.status = AnimateStatus.INITIAL, this._timeline = timeline, timeline.addAnimate(this), this.slience = slience, this._startTime = 0, this._duration = 0, this._totalDuration = 0, this._loopCount = 0, this._currentLoop = 0, this._bounce = !1, this._firstStep = null, this._lastStep = null, this._startProps = {}, this._endProps = {}, this._preventAttrs = new Set(), this.currentTime = 0, this.interpolateUpdateFunction = null, this.priority = 0;
@@ -32676,8 +33246,8 @@ class Animate {
32676
33246
  bind(target) {
32677
33247
  this.target = target;
32678
33248
  const trackerTarget = this.target;
32679
- return "function" == typeof trackerTarget.trackAnimate ? trackerTarget.trackAnimate(this) : (this.target.animates || (this.target.animates = new Map()), this.target.animates.set(this.id, this)), this.onRemove(() => {
32680
- this.stop(), "function" == typeof trackerTarget.restoreStaticAttribute && trackerTarget.restoreStaticAttribute(), "function" == typeof trackerTarget.untrackAnimate ? trackerTarget.untrackAnimate(this.id) : this.target.animates.delete(this.id);
33249
+ return "function" == typeof trackerTarget.detachAttributeFromBaseAttributes && trackerTarget.detachAttributeFromBaseAttributes(), "function" == typeof trackerTarget.trackAnimate ? trackerTarget.trackAnimate(this) : (this.target.animates || (this.target.animates = new Map()), this.target.animates.set(this.id, this)), this.onRemove(() => {
33250
+ this.stop(), this.__skipRestoreStaticAttributeOnRemove || "function" != typeof trackerTarget.restoreStaticAttribute || trackerTarget.restoreStaticAttribute(), "function" == typeof trackerTarget.untrackAnimate ? trackerTarget.untrackAnimate(this.id) : this.target.animates.delete(this.id);
32681
33251
  }), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
32682
33252
  }
32683
33253
  to(props, duration = 300, easing = "linear") {
@@ -32741,12 +33311,14 @@ class Animate {
32741
33311
  cb ? (this._onRemove || (this._onRemove = []), this._onRemove.push(cb)) : null === (_a = this._onRemove) || void 0 === _a || _a.forEach(cb => cb());
32742
33312
  }
32743
33313
  preventAttr(key) {
32744
- this._preventAttrs.add(key), delete this._startProps[key], delete this._endProps[key];
32745
- let step = this._firstStep;
32746
- for (; step;) step.deleteSelfAttr(key), step = step.next;
33314
+ this.preventAttrs([key]);
32747
33315
  }
32748
33316
  preventAttrs(keys) {
32749
- keys.forEach(key => this._preventAttrs.add(key));
33317
+ if (!(null == keys ? void 0 : keys.length)) return;
33318
+ for (let i = 0; i < keys.length; i++) this._preventAttrs.add(keys[i]);
33319
+ this._startProps = removeKeysFromRecord(this._startProps, keys), this._endProps = removeKeysFromRecord(this._endProps, keys);
33320
+ let step = this._firstStep;
33321
+ for (; step;) step.deleteSelfAttrs(keys), step = step.next;
32750
33322
  }
32751
33323
  validAttr(key) {
32752
33324
  return !this._preventAttrs.has(key);
@@ -32813,7 +33385,7 @@ class Animate {
32813
33385
  if (nextTime >= this._startTime + this._totalDuration) {
32814
33386
  null === (_a = this._lastStep) || void 0 === _a || _a.onUpdate(!0, 1, {}), null === (_b = this._lastStep) || void 0 === _b || _b.onEnd(), this.onEnd(), this.status = AnimateStatus.END;
32815
33387
  const trackerTarget = this.target;
32816
- return void ("function" == typeof (null == trackerTarget ? void 0 : trackerTarget.restoreStaticAttribute) && trackerTarget.restoreStaticAttribute());
33388
+ return "function" == typeof (null == trackerTarget ? void 0 : trackerTarget.restoreStaticAttribute) && trackerTarget.restoreStaticAttribute(), void (this.__skipRestoreStaticAttributeOnRemove = !0);
32817
33389
  }
32818
33390
  this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
32819
33391
  let cycleTime = nextTime - this._startTime,
@@ -32824,7 +33396,7 @@ class Animate {
32824
33396
  const currentLoop = Math.floor((nextTime - this._startTime) / this._duration);
32825
33397
  newLoop = currentLoop > this._currentLoop, this._currentLoop = currentLoop, bounceTime = this._bounce && currentLoop % 2 == 1, bounceTime && (cycleTime = this._duration - cycleTime);
32826
33398
  }
32827
- newLoop && !bounceTime && this.target.setAttributes(this._startProps);
33399
+ newLoop && !bounceTime && applyAnimationTransientAttributes(this.target, this._startProps, AttributeUpdateType.ANIMATE_START);
32828
33400
  let targetStep = null;
32829
33401
  if (this._lastStep === this._firstStep) targetStep = this._firstStep;else {
32830
33402
  let currentStep = this._firstStep;
@@ -33111,6 +33683,9 @@ class AnimationTransitionRegistry {
33111
33683
  })), this.registerTransition("state", "*", () => ({
33112
33684
  allowTransition: !0,
33113
33685
  stopOriginalTransition: !1
33686
+ })), this.registerTransition("state", "state", () => ({
33687
+ allowTransition: !0,
33688
+ stopOriginalTransition: !0
33114
33689
  })), this.registerTransition("state", "disappear", () => ({
33115
33690
  allowTransition: !0,
33116
33691
  stopOriginalTransition: !0
@@ -33167,6 +33742,33 @@ class AnimateExecutor {
33167
33742
  cb();
33168
33743
  });
33169
33744
  }
33745
+ getActiveAttrKeys() {
33746
+ const keys = [];
33747
+ for (let i = 0; i < this._animates.length; i++) {
33748
+ const animate = this._animates[i];
33749
+ if (animate.status === AnimateStatus.END) continue;
33750
+ const endProps = animate.getEndProps();
33751
+ if (endProps) for (const key in endProps) Object.prototype.hasOwnProperty.call(endProps, key) && keys.indexOf(key) < 0 && keys.push(key);
33752
+ }
33753
+ return keys;
33754
+ }
33755
+ hasActiveAttrs() {
33756
+ for (let i = 0; i < this._animates.length; i++) {
33757
+ const animate = this._animates[i];
33758
+ if (animate.status === AnimateStatus.END) continue;
33759
+ const endProps = animate.getEndProps();
33760
+ if (endProps) for (const key in endProps) if (Object.prototype.hasOwnProperty.call(endProps, key)) return !0;
33761
+ }
33762
+ return !1;
33763
+ }
33764
+ preventAttrs(keys) {
33765
+ if (!(null == keys ? void 0 : keys.length)) return this.hasActiveAttrs();
33766
+ for (let i = 0; i < this._animates.length; i++) {
33767
+ const animate = this._animates[i];
33768
+ animate.status !== AnimateStatus.END && animate.preventAttrs(keys);
33769
+ }
33770
+ return this.hasActiveAttrs();
33771
+ }
33170
33772
  _trackAnimation(animate) {
33171
33773
  this._animates.push(animate), this._activeCount++, 1 !== this._activeCount || this._started || (this._started = !0, this.onStart()), animate.onEnd(() => {
33172
33774
  this._activeCount--;
@@ -33289,7 +33891,8 @@ class AnimateExecutor {
33289
33891
  let parsedFromProps = null,
33290
33892
  props = params.to,
33291
33893
  from = params.from;
33292
- props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
33894
+ const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
33895
+ props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
33293
33896
  let totalDelay = 0;
33294
33897
  oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
33295
33898
  const delayAfterValue = isFunction$1(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
@@ -33352,7 +33955,8 @@ class AnimateExecutor {
33352
33955
  let parsedFromProps = null,
33353
33956
  props = effect.to,
33354
33957
  from = effect.from;
33355
- props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel);
33958
+ const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
33959
+ props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel);
33356
33960
  const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
33357
33961
  customType = effect.custom ? effect.customType : getCustomType(custom);
33358
33962
  this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
@@ -33366,11 +33970,14 @@ class AnimateExecutor {
33366
33970
  interpolator(ratio, from, to, step, target, animate.target, customParams);
33367
33971
  }, animate.to(props, duration, easing);
33368
33972
  }
33973
+ shouldCommitAttrOutChannel(type) {
33974
+ return "update" !== type;
33975
+ }
33369
33976
  createCustomAnimation(animate, CustomAnimateConstructor, from, props, duration, easing, customParams) {
33370
33977
  const customAnimate = new CustomAnimateConstructor(from, props, duration, easing, customParams);
33371
33978
  animate.play(customAnimate);
33372
33979
  }
33373
- createPropsFromChannel(channel, graphic) {
33980
+ createPropsFromChannel(channel, graphic, includeAttrOutChannel = !0) {
33374
33981
  var _a;
33375
33982
  const props = {};
33376
33983
  let from = null;
@@ -33379,7 +33986,7 @@ class AnimateExecutor {
33379
33986
  props: props,
33380
33987
  attrOutChannel: null
33381
33988
  };
33382
- const attrOutChannel = {};
33989
+ const attrOutChannel = includeAttrOutChannel ? {} : null;
33383
33990
  let hasAttrs = !1;
33384
33991
  const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
33385
33992
  if (Array.isArray(channel) && (channel = channel.reduce((res, key) => (void 0 === diffAttrs[key] || (res[key] = {
@@ -33388,9 +33995,10 @@ class AnimateExecutor {
33388
33995
  var _a, _b, _c, _d;
33389
33996
  const config = channel[key];
33390
33997
  void 0 !== config.to && ("function" == typeof config.to ? props[key] = config.to(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : props[key] = config.to), void 0 !== config.from && (from || (from = {}), "function" == typeof config.from ? from[key] = config.from(null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, {}) : from[key] = config.from);
33391
- }), diffAttrs) for (const key in diffAttrs) {
33998
+ }), diffAttrs && attrOutChannel) for (const key in diffAttrs) {
33392
33999
  const value = diffAttrs[key];
33393
- void 0 !== value && (props.hasOwnProperty(key) || (attrOutChannel[key] = value, hasAttrs = !0));
34000
+ if (void 0 === value) continue;
34001
+ props.hasOwnProperty(key) || !!(null == from ? void 0 : from.hasOwnProperty(key)) || (attrOutChannel[key] = value, hasAttrs = !0);
33394
34002
  }
33395
34003
  return {
33396
34004
  from: from,
@@ -33415,7 +34023,7 @@ class AnimateExecutor {
33415
34023
  stop(type, callEnd = !0) {
33416
34024
  for (; this._animates.length > 0;) {
33417
34025
  const animate = this._animates.pop();
33418
- !1 === callEnd && (animate.status = AnimateStatus.END), null == animate || animate.stop(type);
34026
+ !1 === callEnd && (animate.status = AnimateStatus.END, animate.__skipRestoreStaticAttributeOnRemove = !0), null == animate || animate.stop(type);
33419
34027
  }
33420
34028
  this._animates = [], this._activeCount = 0, this._started && (this._started = !1, callEnd && this.onEnd());
33421
34029
  }
@@ -33466,8 +34074,22 @@ class AnimationStateManager {
33466
34074
  hasTrackedAnimate() {
33467
34075
  return this.trackedAnimates.size > 0;
33468
34076
  }
34077
+ hasStateInfo(list, target) {
34078
+ for (let i = 0; i < list.length; i++) if (list[i] === target) return !0;
34079
+ return !1;
34080
+ }
34081
+ takeOverUpdateAttrs(nextState, currentStates, shouldStopState) {
34082
+ if (nextState.state !== AnimationStates.UPDATE || !currentStates.length) return;
34083
+ const nextKeys = nextState.executor.getActiveAttrKeys();
34084
+ if (nextKeys.length) for (let i = 0; i < currentStates.length; i++) {
34085
+ const currentState = currentStates[i];
34086
+ currentState.state !== AnimationStates.UPDATE || currentState === nextState || this.hasStateInfo(shouldStopState, currentState) || currentState.executor.preventAttrs(nextKeys) || (currentState.executor.stop(null, !1), shouldStopState.push(currentState));
34087
+ }
34088
+ }
33469
34089
  applyState(nextState, animationConfig, callback) {
34090
+ var _a;
33470
34091
  const registry = AnimationTransitionRegistry.getInstance(),
34092
+ currentStateList = null !== (_a = this.stateList) && void 0 !== _a ? _a : [],
33471
34093
  shouldStopState = [],
33472
34094
  shouldApplyState = [];
33473
34095
  if (this.stateList && this.stateList.length ? nextState.forEach((state, index) => {
@@ -33475,14 +34097,14 @@ class AnimationStateManager {
33475
34097
  allowTransition: !0,
33476
34098
  stopOriginalTransition: !0
33477
34099
  };
33478
- this.stateList.forEach(currState => {
34100
+ currentStateList.forEach(currState => {
33479
34101
  const _result = registry.isTransitionAllowed(currState.state, state, this.graphic);
33480
34102
  result.allowTransition = result.allowTransition && _result.allowTransition;
33481
34103
  }), result.allowTransition && (shouldApplyState.push({
33482
34104
  state: state,
33483
34105
  animationConfig: isArray$1(animationConfig[index]) ? animationConfig[index].map(item => item.animation) : animationConfig[index].animation,
33484
34106
  executor: new AnimateExecutor(this.graphic)
33485
- }), this.stateList.forEach(currState => {
34107
+ }), currentStateList.forEach(currState => {
33486
34108
  registry.isTransitionAllowed(currState.state, state, this.graphic).stopOriginalTransition && shouldStopState.push(currState);
33487
34109
  }));
33488
34110
  }) : nextState.forEach((state, index) => {
@@ -33494,12 +34116,18 @@ class AnimationStateManager {
33494
34116
  }), shouldStopState.forEach(state => {
33495
34117
  state.executor.stop(null, !1);
33496
34118
  }), shouldApplyState.length) {
33497
- shouldApplyState[0].executor.execute(shouldApplyState[0].animationConfig);
34119
+ shouldApplyState[0].executor.execute(shouldApplyState[0].animationConfig), this.takeOverUpdateAttrs(shouldApplyState[0], currentStateList, shouldStopState);
33498
34120
  for (let i = 0; i < shouldApplyState.length; i++) {
33499
34121
  const nextState = shouldApplyState[i + 1],
33500
34122
  currentState = shouldApplyState[i];
33501
34123
  currentState.executor.onEnd(() => {
33502
- nextState && nextState.executor.execute(nextState.animationConfig), this.stateList = this.stateList.filter(state => state !== currentState), i === shouldApplyState.length - 1 && callback && callback(!1);
34124
+ var _a;
34125
+ if (nextState) {
34126
+ nextState.executor.execute(nextState.animationConfig);
34127
+ const stoppedStates = [];
34128
+ this.takeOverUpdateAttrs(nextState, null !== (_a = this.stateList) && void 0 !== _a ? _a : [], stoppedStates), stoppedStates.length && this.stateList && (this.stateList = this.stateList.filter(state => !this.hasStateInfo(stoppedStates, state)));
34129
+ }
34130
+ this.stateList = this.stateList.filter(state => state !== currentState), i === shouldApplyState.length - 1 && callback && callback(!1);
33503
34131
  });
33504
34132
  }
33505
34133
  } else callback && callback(!0);
@@ -33742,8 +34370,11 @@ class ComponentAnimator {
33742
34370
  }), this));
33743
34371
  }
33744
34372
  deleteSelfAttr(key) {
34373
+ this.deleteSelfAttrs([key]);
34374
+ }
34375
+ deleteSelfAttrs(keys) {
33745
34376
  this.tasks.forEach(task => {
33746
- task.animate && task.animate.forEach(animate => animate.preventAttr(key));
34377
+ task.animate && task.animate.forEach(animate => animate.preventAttrs(keys));
33747
34378
  });
33748
34379
  }
33749
34380
  stop(type) {
@@ -33848,7 +34479,9 @@ class IncreaseCount extends ACustomAnimate {
33848
34479
  const parts = formattedNumber.toString().split(".");
33849
34480
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), formattedWithBasicFormat = parts.join(".");
33850
34481
  } else formattedWithBasicFormat = formattedNumber;
33851
- formattedText = this.formatTemplate ? this.formatTemplate.replace("{{var}}", formattedWithBasicFormat.toString()) : formattedWithBasicFormat, this.target.setAttribute("text", formattedText);
34482
+ formattedText = this.formatTemplate ? this.formatTemplate.replace("{{var}}", formattedWithBasicFormat.toString()) : formattedWithBasicFormat, applyAnimationTransientAttributes(this.target, {
34483
+ text: formattedText
34484
+ });
33852
34485
  }
33853
34486
  }
33854
34487
 
@@ -33955,7 +34588,7 @@ class MorphingPath extends ACustomAnimate {
33955
34588
  onUpdate(end, ratio, out) {
33956
34589
  const target = this.target,
33957
34590
  pathProxy = "function" == typeof target.pathProxy ? target.pathProxy(target.attribute) : target.pathProxy;
33958
- interpolateMorphingData(this.morphingData, pathProxy, ratio), this.otherAttrs && this.otherAttrs.length && interpolateOtherAttrs(this.otherAttrs, out, ratio), this.target.setAttributes(out), end && !this.saveOnEnd && (this.target.pathProxy = null);
34591
+ interpolateMorphingData(this.morphingData, pathProxy, ratio), this.otherAttrs && this.otherAttrs.length && interpolateOtherAttrs(this.otherAttrs, out, ratio), end && this.saveOnEnd ? this.target.setAttributes(out) : applyAnimationTransientAttributes(this.target, out), end && !this.saveOnEnd && (this.target.pathProxy = null);
33959
34592
  }
33960
34593
  }
33961
34594
  const morphPath = (fromGraphic, toGraphic, animationConfig, fromGraphicTransform) => {
@@ -34186,7 +34819,9 @@ class InputText extends ACustomAnimate {
34186
34819
  const blinkRate = .1;
34187
34820
  Math.floor(ratio / blinkRate) % 2 == 0 && (displayText = this.beforeText + currentText + this.cursorChar + this.afterText);
34188
34821
  } else displayText = this.beforeText + currentText + this.cursorChar + this.afterText;
34189
- this.target.setAttribute("text", displayText);
34822
+ applyAnimationTransientAttributes(this.target, {
34823
+ text: displayText
34824
+ });
34190
34825
  }
34191
34826
  }
34192
34827
 
@@ -34195,11 +34830,9 @@ class ClipGraphicAnimate extends ACustomAnimate {
34195
34830
  super(null, {}, duration, easing, params), this.clipFromAttribute = from, this.clipToAttribute = to, this._group = null == params ? void 0 : params.group, this._clipGraphic = null == params ? void 0 : params.clipGraphic;
34196
34831
  }
34197
34832
  onBind() {
34198
- super.onBind(), this._group && this._clipGraphic && (this._lastClip = this._group.attribute.clip, this._lastPath = this._group.attribute.path, this._group.setAttributes({
34833
+ super.onBind(), this._group && this._clipGraphic && (this._lastClip = this._group.attribute.clip, this._lastPath = this._group.attribute.path, applyAppearStartAttributes(this._group, {
34199
34834
  clip: !0,
34200
34835
  path: [this._clipGraphic]
34201
- }, !1, {
34202
- type: AttributeUpdateType.ANIMATE_BIND
34203
34836
  }));
34204
34837
  }
34205
34838
  onEnd() {
@@ -34335,6 +34968,25 @@ class ClipDirectionAnimate extends ClipGraphicAnimate {
34335
34968
  }
34336
34969
  }
34337
34970
 
34971
+ function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
34972
+ var _a;
34973
+ const commitTarget = target,
34974
+ contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
34975
+ finalAttribute = "function" == typeof commitTarget.getFinalAttribute ? commitTarget.getFinalAttribute() : commitTarget.finalAttribute;
34976
+ let commitAttrs = null;
34977
+ for (let i = 0; i < keys.length; i++) {
34978
+ const key = keys[i];
34979
+ animate && !animate.validAttr(key) || (contextFinalAttrs && Object.prototype.hasOwnProperty.call(contextFinalAttrs, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = contextFinalAttrs[key]) : finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = finalAttribute[key]) : fallbackAttrs && Object.prototype.hasOwnProperty.call(fallbackAttrs, key) && (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = fallbackAttrs[key]));
34980
+ }
34981
+ return commitAttrs;
34982
+ }
34983
+ function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
34984
+ const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
34985
+ return !!commitAttrs && (target.setAttributes(commitAttrs, !1, {
34986
+ type: AttributeUpdateType.ANIMATE_END
34987
+ }), !0);
34988
+ }
34989
+
34338
34990
  class TagPointsUpdate extends ACustomAnimate {
34339
34991
  constructor(from, to, duration, easing, params) {
34340
34992
  var _a, _b;
@@ -34353,21 +35005,9 @@ class TagPointsUpdate extends ACustomAnimate {
34353
35005
  }
34354
35006
  onBind() {
34355
35007
  super.onBind();
34356
- const {
34357
- points: points,
34358
- segments: segments
34359
- } = this.target.attribute,
34360
- {
34361
- points: pointsTo,
34362
- segments: segmentsTo
34363
- } = this.target.getFinalAttribute();
34364
- this.from = {
34365
- points: points,
34366
- segments: segments
34367
- }, this.to = {
34368
- points: pointsTo,
34369
- segments: segmentsTo
34370
- }, this.props = this.to;
35008
+ const currentAttribute = this.target.attribute,
35009
+ finalAttribute = this.target.getFinalAttribute();
35010
+ this.from = {}, this.to = {}, Object.prototype.hasOwnProperty.call(currentAttribute, "points") && (this.from.points = currentAttribute.points), Object.prototype.hasOwnProperty.call(currentAttribute, "segments") && (this.from.segments = currentAttribute.segments), finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, "points") && (this.to.points = finalAttribute.points), finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, "segments") && (this.to.segments = finalAttribute.segments), this.props = this.to;
34371
35011
  const originFromPoints = this.getPoints(this.from),
34372
35012
  originToPoints = this.getPoints(this.to, !0);
34373
35013
  this.fromPoints = originFromPoints ? Array.isArray(originFromPoints) ? originFromPoints : [originFromPoints] : [], this.toPoints = originToPoints ? Array.isArray(originToPoints) ? originToPoints : [originToPoints] : [];
@@ -34403,31 +35043,42 @@ class TagPointsUpdate extends ACustomAnimate {
34403
35043
  const lastClipRange = this.target.attribute.clipRange;
34404
35044
  isValidNumber$1(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
34405
35045
  }
35046
+ onEnd(cb) {
35047
+ cb ? super.onEnd(cb) : (this.to && commitAnimationStaticAttrs(this.target, Object.keys(this.to), this.animate, this.to), super.onEnd());
35048
+ }
35049
+ applyPointTransientAttributes(attributes) {
35050
+ const validAttrs = {};
35051
+ Object.keys(attributes).forEach(key => {
35052
+ this.animate.validAttr(key) && (validAttrs[key] = attributes[key]);
35053
+ }), Object.keys(validAttrs).length && (applyAnimationFrameAttributes(this.target, validAttrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag());
35054
+ }
34406
35055
  onUpdate(end, ratio, out) {
34407
- if (end) return Object.keys(this.to).forEach(k => {
34408
- this.target.attribute[k] = this.to[k];
34409
- }), this.target.addUpdatePositionTag(), void this.target.addUpdateShapeAndBoundsTag();
34410
- if (this.points = this.points.map((point, index) => {
34411
- const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
34412
- return newPoint.context = point.context, newPoint;
34413
- }), this.clipRange) {
34414
- if (this.shrinkClipRange) return void (end ? (out.points = this.toPoints, out.clipRange = 1) : (out.points = this.fromPoints, out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio));
34415
- this.target.setAttributes({
34416
- clipRange: this.clipRange + (1 - this.clipRange) * ratio
34417
- });
34418
- }
34419
- if (this.segmentsCache && this.to.segments) {
34420
- let start = 0;
34421
- const segments = this.to.segments.map((segment, index) => {
34422
- const end = start + this.segmentsCache[index],
34423
- points = this.points.slice(start, end);
34424
- return start = end, Object.assign(Object.assign({}, segment), {
34425
- points: points
35056
+ if (end) this.applyPointTransientAttributes(this.to);else {
35057
+ if (this.points = this.points.map((point, index) => {
35058
+ const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
35059
+ return newPoint.context = point.context, newPoint;
35060
+ }), this.clipRange) {
35061
+ if (this.shrinkClipRange) return void (end ? (out.points = this.toPoints, out.clipRange = 1) : (out.points = this.fromPoints, out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio));
35062
+ applyAnimationTransientAttributes(this.target, {
35063
+ clipRange: this.clipRange + (1 - this.clipRange) * ratio
34426
35064
  });
35065
+ }
35066
+ if (this.segmentsCache && this.to.segments) {
35067
+ let start = 0;
35068
+ const segments = this.to.segments.map((segment, index) => {
35069
+ const end = start + this.segmentsCache[index],
35070
+ points = this.points.slice(start, end);
35071
+ return start = end, Object.assign(Object.assign({}, segment), {
35072
+ points: points
35073
+ });
35074
+ });
35075
+ this.applyPointTransientAttributes({
35076
+ segments: segments
35077
+ });
35078
+ } else this.applyPointTransientAttributes({
35079
+ points: this.points
34427
35080
  });
34428
- this.target.attribute.segments = segments;
34429
- } else this.target.attribute.points = this.points;
34430
- this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35081
+ }
34431
35082
  }
34432
35083
  }
34433
35084
 
@@ -34445,13 +35096,13 @@ class CommonIn extends ACustomAnimate {
34445
35096
  this.keys.forEach(key => {
34446
35097
  var _a, _b, _c;
34447
35098
  to[key] = null !== (_a = null == attrs ? void 0 : attrs[key]) && void 0 !== _a ? _a : 1, from[key] = null !== (_c = null !== (_b = from[key]) && void 0 !== _b ? _b : fromAttrs[key]) && void 0 !== _c ? _c : 0;
34448
- }), null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), this.props = to, this.propKeys = this.keys, this.from = from, this.to = to, !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && this.target.setAttributes(from);
35099
+ }), null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), this.props = to, this.propKeys = this.keys, this.from = from, this.to = to, !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && applyAppearStartAttributes(this.target, from);
34449
35100
  }
34450
35101
  onUpdate(end, ratio, out) {
34451
- const attribute = this.target.attribute;
35102
+ const attrs = {};
34452
35103
  this.propKeys.forEach(key => {
34453
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
34454
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35104
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35105
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
34455
35106
  }
34456
35107
  }
34457
35108
  class CommonOut extends ACustomAnimate {
@@ -34466,16 +35117,16 @@ class CommonOut extends ACustomAnimate {
34466
35117
  this.keys.forEach(key => {
34467
35118
  var _a;
34468
35119
  to[key] = 0, from[key] = null !== (_a = attrs[key]) && void 0 !== _a ? _a : 1;
34469
- }), this.props = to, this.propKeys = this.keys, this.from = from, this.to = to, Object.assign(this.target.attribute, from), this.target.addUpdatePositionTag(), this.target.addUpdateBoundTag();
35120
+ }), this.props = to, this.propKeys = this.keys, this.from = from, this.to = to, applyAnimationTransientAttributes(this.target, from, AttributeUpdateType.ANIMATE_BIND), this.target.addUpdatePositionTag(), this.target.addUpdateBoundTag();
34470
35121
  }
34471
35122
  onEnd(cb) {
34472
35123
  super.onEnd(cb);
34473
35124
  }
34474
35125
  onUpdate(end, ratio, out) {
34475
- const attribute = this.target.attribute;
35126
+ const attrs = {};
34476
35127
  this.propKeys.forEach(key => {
34477
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
34478
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35128
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35129
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
34479
35130
  }
34480
35131
  }
34481
35132
 
@@ -34518,8 +35169,7 @@ class RotateBySphereAnimate extends ACustomAnimate {
34518
35169
  onEnd() {}
34519
35170
  onUpdate(end, ratio, out) {
34520
35171
  if (null == this.phi || null == this.theta) return;
34521
- const target = this.target,
34522
- {
35172
+ const {
34523
35173
  center: center,
34524
35174
  r: r,
34525
35175
  cb: cb
@@ -34530,8 +35180,15 @@ class RotateBySphereAnimate extends ACustomAnimate {
34530
35180
  x = r * Math.sin(phi) * Math.cos(theta) + center.x,
34531
35181
  y = r * Math.cos(phi) + center.y,
34532
35182
  z = r * Math.sin(phi) * Math.sin(theta) + center.z;
34533
- for (target.attribute.x = x, target.attribute.y = y, target.attribute.z = z, target.attribute.alpha = theta + pi / 2; target.attribute.alpha > pi2;) target.attribute.alpha -= pi2;
34534
- target.attribute.alpha = pi2 - target.attribute.alpha, target.attribute.zIndex = -1e4 * target.attribute.z, cb && cb(out);
35183
+ let alpha = theta + pi / 2;
35184
+ for (; alpha > pi2;) alpha -= pi2;
35185
+ alpha = pi2 - alpha, applyAnimationFrameAttributes(this.target, {
35186
+ x: x,
35187
+ y: y,
35188
+ z: z,
35189
+ alpha: alpha,
35190
+ zIndex: -1e4 * z
35191
+ }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag(), cb && cb(out);
34535
35192
  }
34536
35193
  }
34537
35194
 
@@ -34673,15 +35330,23 @@ class GrowAngleBase extends ACustomAnimate {
34673
35330
  this.propKeys ? this.propKeys && this.propKeys.length > 1 ? this._updateFunction = this.updateAngle : "startAngle" === this.propKeys[0] ? this._updateFunction = this.updateStartAngle : "endAngle" === this.propKeys[0] ? this._updateFunction = this.updateEndAngle : this.valid = !1 : this.valid = !1;
34674
35331
  }
34675
35332
  deleteSelfAttr(key) {
34676
- delete this.props[key], this.fromProps && delete this.fromProps[key];
34677
- const index = this.propKeys.indexOf(key);
34678
- -1 !== index && this.propKeys.splice(index, 1), this.propKeys && this.propKeys.length > 1 ? this._updateFunction = this.updateAngle : "startAngle" === this.propKeys[0] ? this._updateFunction = this.updateStartAngle : "endAngle" === this.propKeys[0] ? this._updateFunction = this.updateEndAngle : this._updateFunction = null;
35333
+ this.deleteSelfAttrs([key]);
35334
+ }
35335
+ deleteSelfAttrs(keys) {
35336
+ var _a;
35337
+ super.deleteSelfAttrs(keys);
35338
+ const firstKey = null === (_a = this.propKeys) || void 0 === _a ? void 0 : _a[0];
35339
+ this.propKeys && this.propKeys.length > 1 ? this._updateFunction = this.updateAngle : this._updateFunction = "startAngle" === firstKey ? this.updateStartAngle : "endAngle" === firstKey ? this.updateEndAngle : null;
34679
35340
  }
34680
35341
  updateStartAngle(ratio) {
34681
- this.target.attribute.startAngle = this.from.startAngle + (this.to.startAngle - this.from.startAngle) * ratio;
35342
+ applyAnimationFrameAttributes(this.target, {
35343
+ startAngle: this.from.startAngle + (this.to.startAngle - this.from.startAngle) * ratio
35344
+ });
34682
35345
  }
34683
35346
  updateEndAngle(ratio) {
34684
- this.target.attribute.endAngle = this.from.endAngle + (this.to.endAngle - this.from.endAngle) * ratio;
35347
+ applyAnimationFrameAttributes(this.target, {
35348
+ endAngle: this.from.endAngle + (this.to.endAngle - this.from.endAngle) * ratio
35349
+ });
34685
35350
  }
34686
35351
  updateAngle(ratio) {
34687
35352
  this.updateStartAngle(ratio), this.updateEndAngle(ratio);
@@ -34699,7 +35364,7 @@ class GrowAngleIn extends GrowAngleBase {
34699
35364
  to: to
34700
35365
  } = growAngleIn(this.target, this.params.options, this.params),
34701
35366
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34702
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
35367
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && applyAppearStartAttributes(this.target, fromAttrs), this.determineUpdateFunction();
34703
35368
  }
34704
35369
  }
34705
35370
  class GrowAngleOut extends GrowAngleBase {
@@ -34849,16 +35514,16 @@ class GrowCenterIn extends ACustomAnimate {
34849
35514
  to: to
34850
35515
  } = growCenterIn(this.target, this.params.options, this.params),
34851
35516
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34852
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && this.target.setAttributes(fromAttrs);
35517
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && applyAppearStartAttributes(this.target, fromAttrs);
34853
35518
  }
34854
35519
  onEnd(cb) {
34855
35520
  super.onEnd(cb);
34856
35521
  }
34857
35522
  onUpdate(end, ratio, out) {
34858
- const attribute = this.target.attribute;
35523
+ const attrs = {};
34859
35524
  this.propKeys.forEach(key => {
34860
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
34861
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35525
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35526
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
34862
35527
  }
34863
35528
  }
34864
35529
  class GrowCenterOut extends ACustomAnimate {
@@ -34877,10 +35542,10 @@ class GrowCenterOut extends ACustomAnimate {
34877
35542
  super.onEnd(cb);
34878
35543
  }
34879
35544
  onUpdate(end, ratio, out) {
34880
- const attribute = this.target.attribute;
35545
+ const attrs = {};
34881
35546
  this.propKeys.forEach(key => {
34882
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
34883
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35547
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35548
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
34884
35549
  }
34885
35550
  }
34886
35551
 
@@ -34954,16 +35619,13 @@ class GrowHeightIn extends ACustomAnimate {
34954
35619
  to: to
34955
35620
  } = growHeightIn(this.target, this.params.options, this.params),
34956
35621
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
34957
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && this.target.setAttributes(fromAttrs);
35622
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && applyAppearStartAttributes(this.target, fromAttrs);
34958
35623
  }
34959
35624
  onEnd(cb) {
34960
35625
  super.onEnd(cb);
34961
35626
  }
34962
35627
  onUpdate(end, ratio, out) {
34963
- const attribute = this.target.attribute;
34964
- this.propKeys.forEach(key => {
34965
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
34966
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35628
+ applyAnimationFrameNumberAttributes(this.target, this.propKeys, this.from, this.to, ratio), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
34967
35629
  }
34968
35630
  }
34969
35631
  function growHeightOutIndividual(graphic, options, animationParameters) {
@@ -35021,10 +35683,7 @@ class GrowHeightOut extends ACustomAnimate {
35021
35683
  super.onEnd(cb);
35022
35684
  }
35023
35685
  onUpdate(end, ratio, out) {
35024
- const attribute = this.target.attribute;
35025
- this.propKeys.forEach(key => {
35026
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35027
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35686
+ applyAnimationFrameNumberAttributes(this.target, this.propKeys, this.from, this.to, ratio), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35028
35687
  }
35029
35688
  }
35030
35689
 
@@ -35057,7 +35716,9 @@ class GworPointsBase extends ACustomAnimate {
35057
35716
  var _a, _b;
35058
35717
  const fromPoints = null === (_a = this.from) || void 0 === _a ? void 0 : _a.points,
35059
35718
  toPoints = null === (_b = this.to) || void 0 === _b ? void 0 : _b.points;
35060
- fromPoints && toPoints && (this.target.attribute.points = fromPoints.map((point, index) => pointInterpolation(fromPoints[index], toPoints[index], ratio)), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag());
35719
+ fromPoints && toPoints && (applyAnimationFrameAttributes(this.target, {
35720
+ points: fromPoints.map((point, index) => pointInterpolation(fromPoints[index], toPoints[index], ratio))
35721
+ }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag());
35061
35722
  }
35062
35723
  }
35063
35724
  class GrowPointsIn extends GworPointsBase {
@@ -35068,7 +35729,7 @@ class GrowPointsIn extends GworPointsBase {
35068
35729
  from: from,
35069
35730
  to: to
35070
35731
  } = growPointsIn(this.target, this.params.options, this.params);
35071
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(from);
35732
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && applyAppearStartAttributes(this.target, from);
35072
35733
  } else this.valid = !1;
35073
35734
  }
35074
35735
  }
@@ -35130,7 +35791,7 @@ class GrowPointsXIn extends GworPointsBase {
35130
35791
  from: from,
35131
35792
  to: to
35132
35793
  } = growPointsXIn(this.target, this.params.options, this.params);
35133
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(from);
35794
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && applyAppearStartAttributes(this.target, from);
35134
35795
  } else this.valid = !1;
35135
35796
  }
35136
35797
  }
@@ -35192,7 +35853,7 @@ class GrowPointsYIn extends GworPointsBase {
35192
35853
  from: from,
35193
35854
  to: to
35194
35855
  } = growPointsYIn(this.target, this.params.options, this.params);
35195
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(from);
35856
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && applyAppearStartAttributes(this.target, from);
35196
35857
  } else this.valid = !1;
35197
35858
  }
35198
35859
  }
@@ -35289,10 +35950,10 @@ class GrowPointsBase extends ACustomAnimate {
35289
35950
  super(from, to, duration, easing, params);
35290
35951
  }
35291
35952
  onUpdate(end, ratio, out) {
35292
- const attribute = this.target.attribute;
35953
+ const attrs = {};
35293
35954
  this.propKeys.forEach(key => {
35294
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35295
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35955
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35956
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35296
35957
  }
35297
35958
  }
35298
35959
  class GrowRadiusIn extends GrowPointsBase {
@@ -35304,7 +35965,7 @@ class GrowRadiusIn extends GrowPointsBase {
35304
35965
  to: to
35305
35966
  } = growRadiusIn(this.target, this.params.options, this.params),
35306
35967
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
35307
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && this.target.setAttributes(fromAttrs);
35968
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && applyAppearStartAttributes(this.target, fromAttrs);
35308
35969
  }
35309
35970
  }
35310
35971
  class GrowRadiusOut extends GrowPointsBase {
@@ -35426,16 +36087,13 @@ class GrowWidthIn extends ACustomAnimate {
35426
36087
  to: to
35427
36088
  } = growWidthIn(this.target, this.params.options, this.params),
35428
36089
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
35429
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && this.target.setAttributes(fromAttrs);
36090
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to, null === (_d = (_c = this.target).applyFinalAttributeToAttribute) || void 0 === _d || _d.call(_c), !1 !== (null === (_e = this.params.controlOptions) || void 0 === _e ? void 0 : _e.immediatelyApply) && applyAppearStartAttributes(this.target, fromAttrs);
35430
36091
  }
35431
36092
  onEnd(cb) {
35432
36093
  super.onEnd(cb);
35433
36094
  }
35434
36095
  onUpdate(end, ratio, out) {
35435
- const attribute = this.target.attribute;
35436
- this.propKeys.forEach(key => {
35437
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35438
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
36096
+ applyAnimationFrameNumberAttributes(this.target, this.propKeys, this.from, this.to, ratio), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35439
36097
  }
35440
36098
  }
35441
36099
  class GrowWidthOut extends ACustomAnimate {
@@ -35455,10 +36113,7 @@ class GrowWidthOut extends ACustomAnimate {
35455
36113
  super.onEnd(cb);
35456
36114
  }
35457
36115
  onUpdate(end, ratio, out) {
35458
- const attribute = this.target.attribute;
35459
- this.propKeys.forEach(key => {
35460
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
35461
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
36116
+ applyAnimationFrameNumberAttributes(this.target, this.propKeys, this.from, this.to, ratio), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
35462
36117
  }
35463
36118
  }
35464
36119
 
@@ -35477,7 +36132,7 @@ class LabelItemAppear extends AComponentAnimate {
35477
36132
  } = this.params,
35478
36133
  symbolTime = duration / 10;
35479
36134
  let symbolStartOuterFrom, symbolStartOuterTo;
35480
- if (target._symbolStart.setAttributes({
36135
+ if (applyAppearStartAttributes(target._symbolStart, {
35481
36136
  scaleX: 0,
35482
36137
  scaleY: 0
35483
36138
  }), animator.animate(target._symbolStart, {
@@ -35498,12 +36153,12 @@ class LabelItemAppear extends AComponentAnimate {
35498
36153
  clipRange: 0
35499
36154
  }, symbolStartOuterTo = {
35500
36155
  clipRange: 1
35501
- }), target._symbolStartOuter.setAttributes(symbolStartOuterFrom), animator.animate(target._symbolStartOuter, {
36156
+ }), applyAppearStartAttributes(target._symbolStartOuter, symbolStartOuterFrom), animator.animate(target._symbolStartOuter, {
35502
36157
  type: "to",
35503
36158
  to: symbolStartOuterTo,
35504
36159
  duration: 5 * symbolTime,
35505
36160
  easing: easing
35506
- }), target._symbolEnd.setAttributes({
36161
+ }), applyAppearStartAttributes(target._symbolEnd, {
35507
36162
  scaleX: 0,
35508
36163
  scaleY: 0
35509
36164
  }), animator.animate(target._symbolEnd, {
@@ -35515,7 +36170,7 @@ class LabelItemAppear extends AComponentAnimate {
35515
36170
  duration: 2 * symbolTime,
35516
36171
  delay: 8 * symbolTime,
35517
36172
  easing: easing
35518
- }), target._line.setAttributes({
36173
+ }), applyAppearStartAttributes(target._line, {
35519
36174
  clipRange: 0
35520
36175
  }), animator.animate(target._line, {
35521
36176
  type: "to",
@@ -35526,7 +36181,7 @@ class LabelItemAppear extends AComponentAnimate {
35526
36181
  easing: easing
35527
36182
  }), "typewriter" === titleType) {
35528
36183
  const titleTopText = target._titleTop.attribute.text;
35529
- target._titleTop.setAttributes({
36184
+ applyAppearStartAttributes(target._titleTop, {
35530
36185
  text: ""
35531
36186
  }), animator.animate(target._titleTop, {
35532
36187
  type: "custom",
@@ -35539,7 +36194,7 @@ class LabelItemAppear extends AComponentAnimate {
35539
36194
  custom: InputText
35540
36195
  });
35541
36196
  const titleBottomText = target._titleBottom.attribute.text;
35542
- target._titleBottom.setAttributes({
36197
+ applyAppearStartAttributes(target._titleBottom, {
35543
36198
  text: ""
35544
36199
  }), animator.animate(target._titleBottom, {
35545
36200
  type: "custom",
@@ -35551,7 +36206,7 @@ class LabelItemAppear extends AComponentAnimate {
35551
36206
  },
35552
36207
  custom: InputText
35553
36208
  });
35554
- } else target._titleTop.setAttributes({
36209
+ } else applyAppearStartAttributes(target._titleTop, {
35555
36210
  dy: target._titleTop.AABBBounds.height() + 10
35556
36211
  }), animator.animate(target._titleTop, {
35557
36212
  type: "to",
@@ -35561,7 +36216,7 @@ class LabelItemAppear extends AComponentAnimate {
35561
36216
  delay: 5 * symbolTime,
35562
36217
  duration: 4 * symbolTime,
35563
36218
  easing: "linear"
35564
- }), target._titleBottom.setAttributes({
36219
+ }), applyAppearStartAttributes(target._titleBottom, {
35565
36220
  dy: -(10 + target._titleBottom.AABBBounds.height())
35566
36221
  }), animator.animate(target._titleBottom, {
35567
36222
  type: "to",
@@ -35575,7 +36230,7 @@ class LabelItemAppear extends AComponentAnimate {
35575
36230
  "scale" === titlePanelType ? [target._titleTopPanel, target._titleBottomPanel].forEach(panel => {
35576
36231
  var _a;
35577
36232
  const scaleX = null !== (_a = panel.attribute.scaleX) && void 0 !== _a ? _a : 1;
35578
- panel.setAttributes({
36233
+ applyAppearStartAttributes(panel, {
35579
36234
  scaleX: 0
35580
36235
  }), animator.animate(panel, {
35581
36236
  type: "to",
@@ -35588,7 +36243,7 @@ class LabelItemAppear extends AComponentAnimate {
35588
36243
  }) : "stroke" === titlePanelType && [target._titleTopPanel, target._titleBottomPanel].forEach(panel => {
35589
36244
  const b = panel.AABBBounds,
35590
36245
  totalLen = 2 * (b.width() + b.height());
35591
- panel.setAttributes({
36246
+ applyAppearStartAttributes(panel, {
35592
36247
  lineDash: [0, 10 * totalLen]
35593
36248
  }), animator.animate(panel, {
35594
36249
  type: "to",
@@ -35695,7 +36350,7 @@ class PoptipAppear extends AComponentAnimate {
35695
36350
  {
35696
36351
  wave: wave
35697
36352
  } = this.params;
35698
- if (target.setAttributes({
36353
+ if (applyAppearStartAttributes(target, {
35699
36354
  scaleX: 0,
35700
36355
  scaleY: 0
35701
36356
  }), animator.animate(target, {
@@ -35848,7 +36503,9 @@ class InputRichText extends ACustomAnimate {
35848
36503
  }
35849
36504
  }
35850
36505
  }
35851
- this.target.setAttribute("textConfig", currentTextConfig);
36506
+ applyAnimationTransientAttributes(this.target, {
36507
+ textConfig: currentTextConfig
36508
+ });
35852
36509
  }
35853
36510
  }
35854
36511
 
@@ -35875,18 +36532,21 @@ class OutputRichText extends ACustomAnimate {
35875
36532
  displayedLength = Math.round(fromItems * (1 - adjustedRatio));
35876
36533
  } else displayedLength = Math.round(fromItems * (1 - ratio));
35877
36534
  let currentTextConfig = "forward" === this.direction ? this.fromTextConfig.slice(fromItems - displayedLength) : this.fromTextConfig.slice(0, displayedLength);
35878
- this.fadeOutChars && (currentTextConfig = this.applyFadeEffect(currentTextConfig, ratio, fromItems, displayedLength)), this.showCursor && displayedLength > 0 && (currentTextConfig = this.addCursor(currentTextConfig, ratio)), this.target.setAttribute("textConfig", currentTextConfig);
36535
+ this.fadeOutChars && (currentTextConfig = this.applyFadeEffect(currentTextConfig, ratio, fromItems, displayedLength)), this.showCursor && displayedLength > 0 && (currentTextConfig = this.addCursor(currentTextConfig, ratio)), applyAnimationTransientAttributes(this.target, {
36536
+ textConfig: currentTextConfig
36537
+ });
35879
36538
  } else {
35880
36539
  if (this.fadeOutChars) {
35881
36540
  const adjustedRatio = Math.min(1, ratio / maxTextHideRatio);
35882
36541
  displayedLength = Math.round(fromItems * (1 - adjustedRatio));
35883
36542
  } else displayedLength = Math.round(fromItems * (1 - ratio));
35884
36543
  let currentTextConfig = this.fromTextConfig.slice(0, displayedLength);
35885
- this.fadeOutChars && (currentTextConfig = this.applyFadeEffect(currentTextConfig, ratio, fromItems, displayedLength)), this.showCursor && displayedLength > 0 && (currentTextConfig = this.addCursor(currentTextConfig, ratio)), this.target.setAttribute("textConfig", currentTextConfig);
36544
+ this.fadeOutChars && (currentTextConfig = this.applyFadeEffect(currentTextConfig, ratio, fromItems, displayedLength)), this.showCursor && displayedLength > 0 && (currentTextConfig = this.addCursor(currentTextConfig, ratio)), applyAnimationTransientAttributes(this.target, {
36545
+ textConfig: currentTextConfig
36546
+ });
35886
36547
  }
35887
36548
  }
35888
36549
  applyFadeEffect(textConfig, ratio, totalItems, displayedLength) {
35889
- "forward" === this.direction ? totalItems - displayedLength : displayedLength;
35890
36550
  const fadeProgress = (ratio - (1 - this.fadeOutDuration)) / this.fadeOutDuration,
35891
36551
  fadeOpacity = Math.max(0, 1 - Math.min(1, fadeProgress));
35892
36552
  return textConfig.map((item, index) => {
@@ -35988,7 +36648,9 @@ class SlideRichText extends ACustomAnimate {
35988
36648
  if (!this.valid) return;
35989
36649
  const maxTextShowRatio = 1 - this.fadeInDuration;
35990
36650
  let updatedTextConfig;
35991
- updatedTextConfig = this.wordByWord && this.wordGroups.length > 0 ? this.updateByWord(ratio, maxTextShowRatio) : this.updateByCharacter(ratio, maxTextShowRatio), this.target.setAttribute("textConfig", updatedTextConfig);
36651
+ updatedTextConfig = this.wordByWord && this.wordGroups.length > 0 ? this.updateByWord(ratio, maxTextShowRatio) : this.updateByCharacter(ratio, maxTextShowRatio), applyAnimationTransientAttributes(this.target, {
36652
+ textConfig: updatedTextConfig
36653
+ });
35992
36654
  }
35993
36655
  updateByWord(ratio, maxTextShowRatio) {
35994
36656
  const totalGroups = this.wordGroups.length,
@@ -36117,7 +36779,9 @@ class SlideOutRichText extends ACustomAnimate {
36117
36779
  if (!this.valid) return;
36118
36780
  const maxTextShowRatio = 1 - this.fadeOutDuration;
36119
36781
  let updatedTextConfig;
36120
- updatedTextConfig = this.wordByWord && this.wordGroups.length > 0 ? this.updateByWord(ratio, maxTextShowRatio) : this.updateByCharacter(ratio, maxTextShowRatio), this.target.setAttribute("textConfig", updatedTextConfig);
36782
+ updatedTextConfig = this.wordByWord && this.wordGroups.length > 0 ? this.updateByWord(ratio, maxTextShowRatio) : this.updateByCharacter(ratio, maxTextShowRatio), applyAnimationTransientAttributes(this.target, {
36783
+ textConfig: updatedTextConfig
36784
+ });
36121
36785
  }
36122
36786
  updateByWord(ratio, maxTextShowRatio) {
36123
36787
  const totalGroups = this.wordGroups.length,
@@ -36216,24 +36880,32 @@ class ScaleIn extends ACustomAnimate {
36216
36880
  scaleY: null !== (_k = null == attrs ? void 0 : attrs.scaleY) && void 0 !== _k ? _k : 1
36217
36881
  }, this._updateFunction = this.updateXY;
36218
36882
  }
36219
- null === (_m = (_l = this.target).applyFinalAttributeToAttribute) || void 0 === _m || _m.call(_l), this.props = to, this.from = from, this.to = to, !1 !== (null === (_o = this.params.controlOptions) || void 0 === _o ? void 0 : _o.immediatelyApply) && this.target.setAttributes(from);
36883
+ null === (_m = (_l = this.target).applyFinalAttributeToAttribute) || void 0 === _m || _m.call(_l), this.props = to, this.from = from, this.to = to, !1 !== (null === (_o = this.params.controlOptions) || void 0 === _o ? void 0 : _o.immediatelyApply) && applyAppearStartAttributes(this.target, from);
36220
36884
  }
36221
36885
  onEnd(cb) {
36222
36886
  super.onEnd(cb);
36223
36887
  }
36224
36888
  updateX(ratio) {
36225
- this.target.attribute.scaleX = this.from.scaleX + (this.to.scaleX - this.from.scaleX) * ratio;
36889
+ this.applyScaleTransientAttrs(ratio, !0, !1);
36226
36890
  }
36227
36891
  updateY(ratio) {
36228
- this.target.attribute.scaleY = this.from.scaleY + (this.to.scaleY - this.from.scaleY) * ratio;
36892
+ this.applyScaleTransientAttrs(ratio, !1, !0);
36229
36893
  }
36230
36894
  updateXY(ratio) {
36231
- this.updateX(ratio), this.updateY(ratio);
36895
+ this.applyScaleTransientAttrs(ratio, !0, !0);
36896
+ }
36897
+ applyScaleTransientAttrs(ratio, scaleX, scaleY) {
36898
+ const attrs = {};
36899
+ scaleX && (attrs.scaleX = this.from.scaleX + (this.to.scaleX - this.from.scaleX) * ratio), scaleY && (attrs.scaleY = this.from.scaleY + (this.to.scaleY - this.from.scaleY) * ratio), applyAnimationFrameAttributes(this.target, attrs);
36232
36900
  }
36233
36901
  deleteSelfAttr(key) {
36234
- delete this.props[key], this.fromProps && delete this.fromProps[key];
36235
- const index = this.propKeys.indexOf(key);
36236
- -1 !== index && this.propKeys.splice(index, 1), this.propKeys && this.propKeys.length > 1 ? this._updateFunction = this.updateXY : "scaleX" === this.propKeys[0] ? this._updateFunction = this.updateX : "scaleY" === this.propKeys[0] ? this._updateFunction = this.updateY : this._updateFunction = null;
36902
+ this.deleteSelfAttrs([key]);
36903
+ }
36904
+ deleteSelfAttrs(keys) {
36905
+ var _a;
36906
+ super.deleteSelfAttrs(keys);
36907
+ const firstKey = null === (_a = this.propKeys) || void 0 === _a ? void 0 : _a[0];
36908
+ this.propKeys && this.propKeys.length > 1 ? this._updateFunction = this.updateXY : this._updateFunction = "scaleX" === firstKey ? this.updateX : "scaleY" === firstKey ? this.updateY : null;
36237
36909
  }
36238
36910
  onUpdate(end, ratio, out) {
36239
36911
  this._updateFunction && (this._updateFunction(ratio), this.target.addUpdatePositionTag(), this.target.addUpdateBoundTag());
@@ -36278,10 +36950,10 @@ class ScaleOut extends ACustomAnimate {
36278
36950
  super.onEnd(cb);
36279
36951
  }
36280
36952
  onUpdate(end, ratio, out) {
36281
- const attribute = this.target.attribute;
36953
+ const attrs = {};
36282
36954
  this.propKeys.forEach(key => {
36283
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36284
- }), this.target.addUpdatePositionTag(), this.target.addUpdateBoundTag();
36955
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36956
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateBoundTag();
36285
36957
  }
36286
36958
  }
36287
36959
 
@@ -36292,14 +36964,19 @@ class State extends ACustomAnimate {
36292
36964
  update(end, ratio, out) {
36293
36965
  if (this.onStart(), !this.props || !this.propKeys) return;
36294
36966
  const easedRatio = this.easing(ratio);
36295
- this.animate.interpolateUpdateFunction ? this.animate.interpolateUpdateFunction(this.fromProps, this.props, easedRatio, this, this.target) : this.interpolateUpdateFunctions.forEach((func, index) => {
36296
- if (!this.animate.validAttr(this.propKeys[index])) return;
36297
- const key = this.propKeys[index];
36298
- func(key, this.fromProps[key], this.props[key], easedRatio, this, this.target);
36299
- }), this.onUpdate(end, easedRatio, out), this.syncAttributeUpdate();
36967
+ this.runInterpolateUpdate(this.fromProps, this.props, easedRatio), this.onUpdate(end, easedRatio, out), this.syncAttributeUpdate();
36300
36968
  }
36301
36969
  }
36302
36970
 
36971
+ function buildInterpolatedAttrs(keys, from, to, ratio) {
36972
+ const attrs = {};
36973
+ return keys.forEach(key => {
36974
+ attrs[key] = from[key] + (to[key] - from[key]) * ratio;
36975
+ }), attrs;
36976
+ }
36977
+ function applyStoryFrame(target, attrs) {
36978
+ applyAnimationFrameAttributes(target, attrs), target.addUpdatePositionTag(), target.addUpdateShapeAndBoundsTag();
36979
+ }
36303
36980
  class SlideIn extends ACustomAnimate {
36304
36981
  constructor(from, to, duration, easing, params) {
36305
36982
  super(from, to, duration, easing, params);
@@ -36319,13 +36996,10 @@ class SlideIn extends ACustomAnimate {
36319
36996
  opacity: 1,
36320
36997
  baseOpacity: 1
36321
36998
  };
36322
- "top" === direction ? (from.y = (null !== (_e = attrs.y) && void 0 !== _e ? _e : 0) - distance, to.y = null !== (_f = attrs.y) && void 0 !== _f ? _f : 0, this.propKeys = ["opacity", "baseOpacity", "y"]) : "bottom" === direction ? (from.y = (null !== (_g = attrs.y) && void 0 !== _g ? _g : 0) + distance, to.y = null !== (_h = attrs.y) && void 0 !== _h ? _h : 0, this.propKeys = ["opacity", "baseOpacity", "y"]) : "left" === direction ? (from.x = (null !== (_j = attrs.x) && void 0 !== _j ? _j : 0) - distance, to.x = null !== (_k = attrs.x) && void 0 !== _k ? _k : 0, this.propKeys = ["opacity", "baseOpacity", "x"]) : (from.x = (null !== (_l = attrs.x) && void 0 !== _l ? _l : 0) + distance, to.x = null !== (_m = attrs.x) && void 0 !== _m ? _m : 0, this.propKeys = ["opacity", "baseOpacity", "x"]), this.from = from, this.to = to, this.props = to, this.target.setAttributes(from);
36999
+ "top" === direction ? (from.y = (null !== (_e = attrs.y) && void 0 !== _e ? _e : 0) - distance, to.y = null !== (_f = attrs.y) && void 0 !== _f ? _f : 0, this.propKeys = ["opacity", "baseOpacity", "y"]) : "bottom" === direction ? (from.y = (null !== (_g = attrs.y) && void 0 !== _g ? _g : 0) + distance, to.y = null !== (_h = attrs.y) && void 0 !== _h ? _h : 0, this.propKeys = ["opacity", "baseOpacity", "y"]) : "left" === direction ? (from.x = (null !== (_j = attrs.x) && void 0 !== _j ? _j : 0) - distance, to.x = null !== (_k = attrs.x) && void 0 !== _k ? _k : 0, this.propKeys = ["opacity", "baseOpacity", "x"]) : (from.x = (null !== (_l = attrs.x) && void 0 !== _l ? _l : 0) + distance, to.x = null !== (_m = attrs.x) && void 0 !== _m ? _m : 0, this.propKeys = ["opacity", "baseOpacity", "x"]), this.from = from, this.to = to, this.props = to, applyAppearStartAttributes(this.target, from);
36323
37000
  }
36324
37001
  onUpdate(end, ratio, out) {
36325
- const attribute = this.target.attribute;
36326
- this.propKeys.forEach(key => {
36327
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36328
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37002
+ applyStoryFrame(this.target, buildInterpolatedAttrs(this.propKeys, this.from, this.to, ratio));
36329
37003
  }
36330
37004
  }
36331
37005
  class GrowIn extends ACustomAnimate {
@@ -36347,13 +37021,10 @@ class GrowIn extends ACustomAnimate {
36347
37021
  opacity: 1,
36348
37022
  baseOpacity: 1
36349
37023
  };
36350
- this.propKeys = ["opacity", "baseOpacity"], "x" !== direction && "xy" !== direction || (from.scaleX = fromScale, to.scaleX = null !== (_f = attrs.scaleX) && void 0 !== _f ? _f : 1, this.propKeys.push("scaleX")), "y" !== direction && "xy" !== direction || (from.scaleY = fromScale, to.scaleY = null !== (_g = attrs.scaleY) && void 0 !== _g ? _g : 1, this.propKeys.push("scaleY")), this.from = from, this.to = to, this.props = to, this.target.setAttributes(from);
37024
+ this.propKeys = ["opacity", "baseOpacity"], "x" !== direction && "xy" !== direction || (from.scaleX = fromScale, to.scaleX = null !== (_f = attrs.scaleX) && void 0 !== _f ? _f : 1, this.propKeys.push("scaleX")), "y" !== direction && "xy" !== direction || (from.scaleY = fromScale, to.scaleY = null !== (_g = attrs.scaleY) && void 0 !== _g ? _g : 1, this.propKeys.push("scaleY")), this.from = from, this.to = to, this.props = to, applyAppearStartAttributes(this.target, from);
36351
37025
  }
36352
37026
  onUpdate(end, ratio, out) {
36353
- const attribute = this.target.attribute;
36354
- this.propKeys.forEach(key => {
36355
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36356
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37027
+ applyStoryFrame(this.target, buildInterpolatedAttrs(this.propKeys, this.from, this.to, ratio));
36357
37028
  }
36358
37029
  }
36359
37030
  class SpinIn extends ACustomAnimate {
@@ -36381,13 +37052,10 @@ class SpinIn extends ACustomAnimate {
36381
37052
  scaleX: null !== (_h = attrs.scaleX) && void 0 !== _h ? _h : 1,
36382
37053
  scaleY: null !== (_j = attrs.scaleY) && void 0 !== _j ? _j : 1
36383
37054
  };
36384
- this.propKeys = ["opacity", "baseOpacity", "angle", "scaleX", "scaleY"], this.from = from, this.to = to, this.props = to, this.target.setAttributes(from);
37055
+ this.propKeys = ["opacity", "baseOpacity", "angle", "scaleX", "scaleY"], this.from = from, this.to = to, this.props = to, applyAppearStartAttributes(this.target, from);
36385
37056
  }
36386
37057
  onUpdate(end, ratio, out) {
36387
- const attribute = this.target.attribute;
36388
- this.propKeys.forEach(key => {
36389
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36390
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37058
+ applyStoryFrame(this.target, buildInterpolatedAttrs(this.propKeys, this.from, this.to, ratio));
36391
37059
  }
36392
37060
  }
36393
37061
  class StrokeIn extends ACustomAnimate {
@@ -36428,12 +37096,14 @@ class StrokeIn extends ACustomAnimate {
36428
37096
  lineWidth: lineWidth,
36429
37097
  stroke: strokeColor,
36430
37098
  strokeOpacity: fromOpacity
36431
- }, showFill ? (this.from.fillOpacity = fillOpacity, this.to.fillOpacity = null !== (_t = this.originalAttributes.fillOpacity) && void 0 !== _t ? _t : 1) : (this.from.fillOpacity = 0, this.to.fillOpacity = 0), this.propKeys = ["lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity"], this.props = this.to, this.target.setAttributes(this.from);
37099
+ }, showFill ? (this.from.fillOpacity = fillOpacity, this.to.fillOpacity = null !== (_t = this.originalAttributes.fillOpacity) && void 0 !== _t ? _t : 1) : (this.from.fillOpacity = 0, this.to.fillOpacity = 0), this.propKeys = ["lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity"], this.props = this.to, applyAppearStartAttributes(this.target, this.from);
36432
37100
  }
36433
37101
  onUpdate(end, ratio, out) {
36434
37102
  var _a;
36435
- const attribute = this.target.attribute;
36436
- attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio, (null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio);
37103
+ const attrs = {
37104
+ lineDashOffset: this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio
37105
+ };
37106
+ (null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attrs.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio), applyAnimationTransientAttributes(this.target, attrs);
36437
37107
  }
36438
37108
  onEnd() {
36439
37109
  var _a;
@@ -36480,12 +37150,14 @@ class StrokeOut extends ACustomAnimate {
36480
37150
  lineWidth: lineWidth,
36481
37151
  stroke: strokeColor,
36482
37152
  strokeOpacity: fromOpacity
36483
- }, showFill ? (this.from.fillOpacity = null !== (_r = this.originalAttributes.fillOpacity) && void 0 !== _r ? _r : 1, this.to.fillOpacity = 0) : (this.from.fillOpacity = 0, this.to.fillOpacity = 0), this.propKeys = ["lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity"], this.props = this.to, this.target.setAttributes(this.from);
37153
+ }, showFill ? (this.from.fillOpacity = null !== (_r = this.originalAttributes.fillOpacity) && void 0 !== _r ? _r : 1, this.to.fillOpacity = 0) : (this.from.fillOpacity = 0, this.to.fillOpacity = 0), this.propKeys = ["lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity"], this.props = this.to, applyAppearStartAttributes(this.target, this.from);
36484
37154
  }
36485
37155
  onUpdate(end, ratio, out) {
36486
37156
  var _a;
36487
- const attribute = this.target.attribute;
36488
- attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio, (null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio);
37157
+ const attrs = {
37158
+ lineDashOffset: this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio
37159
+ };
37160
+ (null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attrs.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio), applyAnimationTransientAttributes(this.target, attrs);
36489
37161
  }
36490
37162
  }
36491
37163
  class MoveScaleIn extends ACustomAnimate {
@@ -36582,10 +37254,7 @@ class SlideOut extends ACustomAnimate {
36582
37254
  "top" === direction ? (from.y = null !== (_g = attrs.y) && void 0 !== _g ? _g : 0, to.y = (null !== (_h = attrs.y) && void 0 !== _h ? _h : 0) - distance, this.propKeys = ["opacity", "baseOpacity", "y"]) : "bottom" === direction ? (from.y = null !== (_j = attrs.y) && void 0 !== _j ? _j : 0, to.y = (null !== (_k = attrs.y) && void 0 !== _k ? _k : 0) + distance, this.propKeys = ["opacity", "baseOpacity", "y"]) : "left" === direction ? (from.x = null !== (_l = attrs.x) && void 0 !== _l ? _l : 0, to.x = (null !== (_m = attrs.x) && void 0 !== _m ? _m : 0) - distance, this.propKeys = ["opacity", "baseOpacity", "x"]) : (from.x = null !== (_o = attrs.x) && void 0 !== _o ? _o : 0, to.x = (null !== (_p = attrs.x) && void 0 !== _p ? _p : 0) + distance, this.propKeys = ["opacity", "baseOpacity", "x"]), this.from = from, this.to = to, this.props = to;
36583
37255
  }
36584
37256
  onUpdate(end, ratio, out) {
36585
- const attribute = this.target.attribute;
36586
- this.propKeys.forEach(key => {
36587
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36588
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37257
+ applyStoryFrame(this.target, buildInterpolatedAttrs(this.propKeys, this.from, this.to, ratio));
36589
37258
  }
36590
37259
  }
36591
37260
  class GrowOut extends ACustomAnimate {
@@ -36610,10 +37279,7 @@ class GrowOut extends ACustomAnimate {
36610
37279
  this.propKeys = ["opacity", "baseOpacity"], "x" !== direction && "xy" !== direction || (from.scaleX = null !== (_h = attrs.scaleX) && void 0 !== _h ? _h : 1, to.scaleX = toScale, this.propKeys.push("scaleX")), "y" !== direction && "xy" !== direction || (from.scaleY = null !== (_j = attrs.scaleY) && void 0 !== _j ? _j : 1, to.scaleY = toScale, this.propKeys.push("scaleY")), this.from = from, this.to = to, this.props = to;
36611
37280
  }
36612
37281
  onUpdate(end, ratio, out) {
36613
- const attribute = this.target.attribute;
36614
- this.propKeys.forEach(key => {
36615
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36616
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37282
+ applyStoryFrame(this.target, buildInterpolatedAttrs(this.propKeys, this.from, this.to, ratio));
36617
37283
  }
36618
37284
  }
36619
37285
  class SpinOut extends ACustomAnimate {
@@ -36644,10 +37310,7 @@ class SpinOut extends ACustomAnimate {
36644
37310
  this.propKeys = ["opacity", "baseOpacity", "angle", "scaleX", "scaleY"], this.from = from, this.to = to, this.props = to;
36645
37311
  }
36646
37312
  onUpdate(end, ratio, out) {
36647
- const attribute = this.target.attribute;
36648
- this.propKeys.forEach(key => {
36649
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36650
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37313
+ applyStoryFrame(this.target, buildInterpolatedAttrs(this.propKeys, this.from, this.to, ratio));
36651
37314
  }
36652
37315
  }
36653
37316
  class MoveScaleOut extends ACustomAnimate {
@@ -36732,51 +37395,127 @@ class PulseAnimate extends ACustomAnimate {
36732
37395
  onUpdate(end, ratio, out) {
36733
37396
  const angle = ratio * Math.PI * this.pulseCount,
36734
37397
  pulseValue = Math.abs(Math.sin(angle)),
36735
- attribute = this.target.attribute;
37398
+ attrs = {};
36736
37399
  if (this.useOpacity) {
36737
37400
  const opacity = 1 + (this.pulseOpacity - 1) * pulseValue;
36738
- this.useStroke && (attribute.strokeOpacity = (this.originalAttributes.strokeOpacity || 1) * opacity), this.useFill && (attribute.fillOpacity = (this.originalAttributes.fillOpacity || 1) * opacity);
37401
+ this.useStroke && (attrs.strokeOpacity = (this.originalAttributes.strokeOpacity || 1) * opacity), this.useFill && (attrs.fillOpacity = (this.originalAttributes.fillOpacity || 1) * opacity);
36739
37402
  }
36740
37403
  if (this.useScale) {
36741
37404
  const scale = 1 + (this.pulseScale - 1) * pulseValue;
36742
- attribute.scaleX = (this.originalAttributes.scaleX || 1) * scale, attribute.scaleY = (this.originalAttributes.scaleY || 1) * scale;
37405
+ attrs.scaleX = (this.originalAttributes.scaleX || 1) * scale, attrs.scaleY = (this.originalAttributes.scaleY || 1) * scale;
36743
37406
  }
36744
- this.useColor && this.pulseColor && this.applyColorPulse(attribute, pulseValue), this.target.addUpdateShapeAndBoundsTag(), this.target.addUpdatePositionTag();
37407
+ this.useColor && this.pulseColor && this.applyColorPulse(attrs, pulseValue), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdateShapeAndBoundsTag(), this.target.addUpdatePositionTag();
36745
37408
  }
36746
- applyColorPulse(attribute, pulseValue) {
37409
+ applyColorPulse(attrs, pulseValue) {
36747
37410
  const colorRatio = this.pulseColorIntensity * pulseValue;
36748
- this.useFill && this.originalFill && this.pulseColor && (attribute.fill = interpolateColor(this.originalFill, this.pulseColor, colorRatio, !0)), this.useStroke && this.originalStroke && this.pulseColor && (attribute.stroke = interpolateColor(this.originalStroke, this.pulseColor, colorRatio, !0));
37411
+ this.useFill && this.originalFill && this.pulseColor && (attrs.fill = interpolateColor(this.originalFill, this.pulseColor, colorRatio, !0)), this.useStroke && this.originalStroke && this.pulseColor && (attrs.stroke = interpolateColor(this.originalStroke, this.pulseColor, colorRatio, !0));
36749
37412
  }
36750
37413
  onEnd() {
36751
37414
  super.onEnd(), this.target.setAttributes(this.originalAttributes);
36752
37415
  }
36753
37416
  }
36754
37417
 
37418
+ const clipPathGeometryAttrs = {
37419
+ x: !0,
37420
+ y: !0,
37421
+ x1: !0,
37422
+ y1: !0,
37423
+ width: !0,
37424
+ height: !0
37425
+ };
37426
+ function includesChannel(channels, key) {
37427
+ for (let i = 0; i < channels.length; i++) if (channels[i] === key) return !0;
37428
+ return !1;
37429
+ }
37430
+ function filterExcludedChannels(diffAttrs, excludeChannels) {
37431
+ if (!(null == excludeChannels ? void 0 : excludeChannels.length)) return diffAttrs;
37432
+ const nextAttrs = {};
37433
+ for (const key in diffAttrs) Object.prototype.hasOwnProperty.call(diffAttrs, key) && !includesChannel(excludeChannels, key) && (nextAttrs[key] = diffAttrs[key]);
37434
+ return nextAttrs;
37435
+ }
36755
37436
  class Update extends ACustomAnimate {
36756
37437
  constructor(from, to, duration, easing, params) {
36757
- super(from, to, duration, easing, params);
37438
+ super(from, to, duration, easing, params), this.updateFromAttrs = null, this.clipPathSyncKeys = null, this.clipPathSyncParent = null, this.clipPathSyncChildIndex = -1, this.clipPathSyncDisabled = !1;
36758
37439
  }
36759
37440
  onBind() {
36760
- var _a, _b;
37441
+ var _a;
36761
37442
  super.onBind();
37443
+ const targetContext = null !== (_a = this.target.context) && void 0 !== _a ? _a : {};
36762
37444
  let {
36763
37445
  diffAttrs = {}
36764
- } = null !== (_a = this.target.context) && void 0 !== _a ? _a : {};
37446
+ } = targetContext;
36765
37447
  const {
36766
37448
  options: options
36767
37449
  } = this.params;
36768
- diffAttrs = Object.assign({}, diffAttrs), (null === (_b = null == options ? void 0 : options.excludeChannels) || void 0 === _b ? void 0 : _b.length) && options.excludeChannels.forEach(channel => {
36769
- delete diffAttrs[channel];
36770
- }), this.props = diffAttrs;
37450
+ diffAttrs = filterExcludedChannels(diffAttrs, null == options ? void 0 : options.excludeChannels), this.props = diffAttrs;
37451
+ const consumeTransientFromAttrs = this.target.consumeTransientFromAttrsBeforePreventAnimate;
37452
+ this.updateFromAttrs = "function" == typeof consumeTransientFromAttrs ? consumeTransientFromAttrs.call(this.target, diffAttrs) : null, this.clipPathSyncKeys = Object.keys(diffAttrs).filter(key => clipPathGeometryAttrs[key]), this.clipPathSyncDisabled = !this.clipPathSyncKeys.length, this.syncParentClipPathToTarget();
37453
+ }
37454
+ trySyncStartProps() {
37455
+ const updateFromAttrs = this.updateFromAttrs;
37456
+ this.propKeys.forEach(key => {
37457
+ this.fromProps[key] = updateFromAttrs && Object.prototype.hasOwnProperty.call(updateFromAttrs, key) ? updateFromAttrs[key] : this.animate.target.getComputedAttribute(key);
37458
+ });
37459
+ }
37460
+ onEnd(cb) {
37461
+ var _a;
37462
+ cb ? super.onEnd(cb) : (this.props && commitAnimationStaticAttrs(this.target, null !== (_a = this.propKeys) && void 0 !== _a ? _a : Object.keys(this.props), this.animate, this.props), this.syncParentClipPathToTarget(), super.onEnd());
36771
37463
  }
36772
37464
  update(end, ratio, out) {
36773
37465
  if (this.onStart(), !this.props || !this.propKeys) return;
36774
37466
  const easedRatio = this.easing(ratio);
36775
- this.animate.interpolateUpdateFunction ? this.animate.interpolateUpdateFunction(this.fromProps, this.props, easedRatio, this, this.target) : this.interpolateUpdateFunctions.forEach((func, index) => {
36776
- if (!this.animate.validAttr(this.propKeys[index])) return;
36777
- const key = this.propKeys[index];
36778
- func(key, this.fromProps[key], this.props[key], easedRatio, this, this.target);
36779
- }), this.onUpdate(end, easedRatio, out);
37467
+ this.runInterpolateUpdate(this.fromProps, this.props, easedRatio), this.syncParentClipPathToTarget(), this.onUpdate(end, easedRatio, out);
37468
+ }
37469
+ syncParentClipPathToTarget() {
37470
+ var _a, _b, _c, _d;
37471
+ if (this.clipPathSyncDisabled) return;
37472
+ const target = this.target,
37473
+ parent = target.parent,
37474
+ path = null === (_a = null == parent ? void 0 : parent.attribute) || void 0 === _a ? void 0 : _a.path;
37475
+ if (!(null === (_b = null == parent ? void 0 : parent.attribute) || void 0 === _b ? void 0 : _b.clip) || !Array.isArray(path) || !path.length) return;
37476
+ const childIndex = this.getClipPathSyncChildIndex(parent);
37477
+ if (childIndex < 0 || childIndex >= path.length) return;
37478
+ const clipGraphic = path[childIndex];
37479
+ if (!(null == clipGraphic ? void 0 : clipGraphic.attribute) || clipGraphic.type !== target.type || !this.isClipPathStaticTarget(clipGraphic)) return;
37480
+ const syncAttrs = this.buildClipPathTransientAttrs(clipGraphic);
37481
+ syncAttrs && (applyAnimationFrameAttributes(clipGraphic, syncAttrs), null === (_c = clipGraphic.addUpdatePositionTag) || void 0 === _c || _c.call(clipGraphic), null === (_d = clipGraphic.addUpdateShapeAndBoundsTag) || void 0 === _d || _d.call(clipGraphic));
37482
+ }
37483
+ getClipPathSyncChildIndex(parent) {
37484
+ var _a;
37485
+ if (this.clipPathSyncParent === parent && this.clipPathSyncChildIndex >= 0) return this.clipPathSyncChildIndex;
37486
+ const target = this.target;
37487
+ let childIndex = -1;
37488
+ return null === (_a = parent.forEachChildren) || void 0 === _a || _a.call(parent, (child, index) => child === target && (childIndex = index, !0)), this.clipPathSyncParent = parent, this.clipPathSyncChildIndex = childIndex, childIndex;
37489
+ }
37490
+ isClipPathStaticTarget(clipGraphic) {
37491
+ var _a, _b;
37492
+ const target = this.target,
37493
+ targetFinalAttrs = this.getTargetFinalAttrs(),
37494
+ clipGraphicFinalAttrs = "function" == typeof clipGraphic.getFinalAttribute ? clipGraphic.getFinalAttribute() : clipGraphic.finalAttribute,
37495
+ clipFinalAttrs = null !== (_a = null != clipGraphicFinalAttrs ? clipGraphicFinalAttrs : clipGraphic.baseAttributes) && void 0 !== _a ? _a : clipGraphic.attribute,
37496
+ keys = null !== (_b = this.clipPathSyncKeys) && void 0 !== _b ? _b : [];
37497
+ return !!(keys.length && targetFinalAttrs && clipFinalAttrs) && keys.every(key => {
37498
+ var _a, _b;
37499
+ return this.isSameClipPathValue(clipFinalAttrs[key], null !== (_a = targetFinalAttrs[key]) && void 0 !== _a ? _a : null === (_b = target.attribute) || void 0 === _b ? void 0 : _b[key]);
37500
+ });
37501
+ }
37502
+ getTargetFinalAttrs() {
37503
+ var _a, _b, _c;
37504
+ const target = this.target;
37505
+ return null !== (_c = null !== (_b = null === (_a = target.context) || void 0 === _a ? void 0 : _a.finalAttrs) && void 0 !== _b ? _b : "function" == typeof target.getFinalAttribute ? target.getFinalAttribute() : target.finalAttribute) && void 0 !== _c ? _c : null;
37506
+ }
37507
+ isSameClipPathValue(a, b) {
37508
+ return "number" == typeof a && "number" == typeof b ? Math.abs(a - b) < 1e-8 : a === b;
37509
+ }
37510
+ buildClipPathTransientAttrs(clipGraphic) {
37511
+ var _a;
37512
+ const target = this.target,
37513
+ attrs = {};
37514
+ return (null !== (_a = this.clipPathSyncKeys) && void 0 !== _a ? _a : []).forEach(key => {
37515
+ var _a;
37516
+ const nextValue = null === (_a = target.attribute) || void 0 === _a ? void 0 : _a[key];
37517
+ Object.prototype.hasOwnProperty.call(clipGraphic.attribute, key) && void 0 !== nextValue && !this.isSameClipPathValue(clipGraphic.attribute[key], nextValue) && (attrs[key] = nextValue);
37518
+ }), Object.keys(attrs).length ? attrs : null;
36780
37519
  }
36781
37520
  }
36782
37521
 
@@ -36883,10 +37622,10 @@ class MoveBase extends ACustomAnimate {
36883
37622
  super(from, to, duration, easing, params);
36884
37623
  }
36885
37624
  onUpdate(end, ratio, out) {
36886
- const attribute = this.target.attribute;
37625
+ const attrs = {};
36887
37626
  this.propKeys.forEach(key => {
36888
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36889
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37627
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
37628
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
36890
37629
  }
36891
37630
  }
36892
37631
  class MoveIn extends MoveBase {
@@ -36897,7 +37636,7 @@ class MoveIn extends MoveBase {
36897
37636
  from: from,
36898
37637
  to: to
36899
37638
  } = moveIn(this.target, this.params.options, this.params);
36900
- this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(from);
37639
+ this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && applyAppearStartAttributes(this.target, from);
36901
37640
  }
36902
37641
  }
36903
37642
  class MoveOut extends MoveBase {
@@ -36942,10 +37681,10 @@ class RotateBase extends ACustomAnimate {
36942
37681
  super(from, to, duration, easing, params);
36943
37682
  }
36944
37683
  onUpdate(end, ratio, out) {
36945
- const attribute = this.target.attribute;
37684
+ const attrs = {};
36946
37685
  this.propKeys.forEach(key => {
36947
- attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36948
- }), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37686
+ attrs[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
37687
+ }), applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
36949
37688
  }
36950
37689
  }
36951
37690
  class RotateIn extends RotateBase {
@@ -36956,7 +37695,7 @@ class RotateIn extends RotateBase {
36956
37695
  from: from,
36957
37696
  to: to
36958
37697
  } = rotateIn(this.target, this.params.options);
36959
- this.props = to, this.propKeys = ["angle"], this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(from);
37698
+ this.props = to, this.propKeys = ["angle"], this.from = from, this.to = to, null === (_b = (_a = this.target).applyFinalAttributeToAttribute) || void 0 === _b || _b.call(_a), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && applyAppearStartAttributes(this.target, from);
36960
37699
  }
36961
37700
  }
36962
37701
  class RotateOut extends RotateBase {
@@ -36972,8 +37711,8 @@ class RotateOut extends RotateBase {
36972
37711
 
36973
37712
  class MotionPath extends ACustomAnimate {
36974
37713
  constructor(from, to, duration, easing, params) {
36975
- var _a;
36976
- super(from, to, duration, easing, params), params && (this.pathLength = params.path.getLength(), this.path = params.path, this.distance = params.distance, this.totalLength = this.distance * this.pathLength, this.initAngle = null !== (_a = params.initAngle) && void 0 !== _a ? _a : 0, this.changeAngle = !!params.changeAngle, this.cb = params.cb);
37714
+ var _a, _b, _c;
37715
+ super(from, to, duration, easing, params), params && (this.pathLength = params.path.getLength(), this.path = params.path, this.distance = params.distance, this.totalLength = this.distance * this.pathLength, this.initAngle = null !== (_a = params.initAngle) && void 0 !== _a ? _a : 0, this.changeAngle = !!params.changeAngle, this.commitOnEnd = null === (_c = null !== (_b = params.commitOnEnd) && void 0 !== _b ? _b : params.saveOnEnd) || void 0 === _c || _c, this.cb = params.cb);
36977
37716
  }
36978
37717
  onBind() {
36979
37718
  this.from = {
@@ -36988,7 +37727,7 @@ class MotionPath extends ACustomAnimate {
36988
37727
  pos: pos,
36989
37728
  angle: angle
36990
37729
  } = this.path.getAttrAt(at);
36991
- attrs.x = pos.x, attrs.y = pos.y, this.changeAngle && (attrs.angle = angle + this.initAngle), this.cb && this.cb(this.from, this.to, ratio, this.target), this.target.setAttributes(attrs);
37730
+ attrs.x = pos.x, attrs.y = pos.y, this.changeAngle && (attrs.angle = angle + this.initAngle), this.cb && this.cb(this.from, this.to, ratio, this.target), end && this.commitOnEnd ? this.target.setAttributes(attrs) : (applyAnimationFrameAttributes(this.target, attrs), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag());
36992
37731
  }
36993
37732
  }
36994
37733
 
@@ -40736,6 +41475,43 @@ class AnimateComponent extends AbstractComponent {
40736
41475
  }
40737
41476
  }
40738
41477
 
41478
+ function commitUpdateAnimationTarget(graphic, targetAttrs, startAttrs) {
41479
+ var _a, _b, _c, _d;
41480
+ if (!graphic || !targetAttrs) return;
41481
+ const committedTargetAttrs = cloneDeep(targetAttrs),
41482
+ transientStartAttrs = cloneDeep(null != startAttrs ? startAttrs : graphic.attribute);
41483
+ graphic.setAttributes(committedTargetAttrs), null === (_b = (_a = graphic).setFinalAttributes) || void 0 === _b || _b.call(_a, committedTargetAttrs), null === (_d = (_c = graphic).setAttributesAndPreventAnimate) || void 0 === _d || _d.call(_c, transientStartAttrs, !1, {
41484
+ type: AttributeUpdateType.ANIMATE_BIND
41485
+ });
41486
+ }
41487
+
41488
+ function collectTrackedAnimates(graphic, animates = [], visited = new Set()) {
41489
+ var _a, _b, _c, _d, _e;
41490
+ const trackedAnimates = null !== (_c = null === (_b = (_a = graphic).getTrackedAnimates) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : graphic.animates;
41491
+ return null == trackedAnimates || trackedAnimates.forEach(animate => {
41492
+ animate && !visited.has(animate) && (visited.add(animate), animates.push(animate));
41493
+ }), null === (_e = (_d = graphic).forEachChildren) || void 0 === _e || _e.call(_d, child => {
41494
+ collectTrackedAnimates(child, animates, visited);
41495
+ }), animates;
41496
+ }
41497
+ function appendExitReleaseCallback(state, callback) {
41498
+ callback && (null == state || state.onComplete.push(callback));
41499
+ }
41500
+ function runExitReleaseCallbacks(callbacks) {
41501
+ callbacks.forEach(callback => {
41502
+ callback();
41503
+ });
41504
+ }
41505
+ function bindExitReleaseAnimates(exitAnimates, getState, finalize) {
41506
+ const finish = animate => {
41507
+ const state = getState();
41508
+ state && !state.finalized && state.pendingAnimates.has(animate) && (state.pendingAnimates.delete(animate), state.pendingAnimates.size || finalize());
41509
+ };
41510
+ exitAnimates.forEach(animate => {
41511
+ animate.onEnd(() => finish(animate)), animate.onRemove(() => finish(animate));
41512
+ });
41513
+ }
41514
+
40739
41515
  const DefaultAxisAnimation = {
40740
41516
  type: "default",
40741
41517
  duration: 300,
@@ -40767,12 +41543,65 @@ class AxisBase extends AnimateComponent {
40767
41543
  });
40768
41544
  return this.add(offscreenGroup), this._renderInner(offscreenGroup), this.removeChild(offscreenGroup), this.attribute = currentAttribute, offscreenGroup.AABBBounds;
40769
41545
  }
41546
+ _finalizeExitRelease() {
41547
+ var _a, _b;
41548
+ const state = this._exitReleaseState;
41549
+ if (null == state ? void 0 : state.finalized) return;
41550
+ state && (state.finalized = !0);
41551
+ const parent = this.parent,
41552
+ removeFromParent = !!(null == state ? void 0 : state.removeFromParent),
41553
+ callbacks = null !== (_a = null == state ? void 0 : state.onComplete) && void 0 !== _a ? _a : [];
41554
+ this._exitReleaseState = void 0, this._prevInnerView = null, this._innerView = null, this.axisLabelsContainer = null, this.axisContainer = null, this.removeAllChild(!0), super.release(!0), removeFromParent && (null === (_b = null != parent ? parent : this.parent) || void 0 === _b || _b.removeChild(this)), runExitReleaseCallbacks(callbacks);
41555
+ }
41556
+ _runExitAnimationBeforeRelease(options = {}) {
41557
+ var _a, _b, _c;
41558
+ if (this._exitReleaseState && !this._exitReleaseState.finalized) return this._exitReleaseState.removeFromParent = this._exitReleaseState.removeFromParent || !!options.removeFromParent, appendExitReleaseCallback(this._exitReleaseState, options.onComplete), !0;
41559
+ if (!this.stage || !1 === this.attribute.animation || !1 === this.attribute.animationExit || !this._innerView) return !1;
41560
+ if (this._prepare(), !(null === (_a = this._animationConfig) || void 0 === _a ? void 0 : _a.exit)) return !1;
41561
+ const exitTargets = new Set();
41562
+ if (traverseGroup(this._innerView, el => {
41563
+ "group" !== el.type && exitTargets.add(el);
41564
+ }), !exitTargets.size) return !1;
41565
+ const existingAnimates = collectTrackedAnimates(this),
41566
+ {
41567
+ delay = 0,
41568
+ duration = DefaultAxisAnimation.duration,
41569
+ easing = DefaultAxisAnimation.easing
41570
+ } = this._animationConfig.exit;
41571
+ exitTargets.forEach(target => {
41572
+ var _a, _b, _c;
41573
+ const startAttrs = {
41574
+ opacity: null !== (_a = target.attribute.opacity) && void 0 !== _a ? _a : 1,
41575
+ fillOpacity: null !== (_b = target.attribute.fillOpacity) && void 0 !== _b ? _b : 1,
41576
+ strokeOpacity: null !== (_c = target.attribute.strokeOpacity) && void 0 !== _c ? _c : 1
41577
+ },
41578
+ endAttrs = {
41579
+ opacity: 0,
41580
+ fillOpacity: 0,
41581
+ strokeOpacity: 0
41582
+ };
41583
+ commitUpdateAnimationTarget(target, endAttrs, startAttrs), target.animate().wait(delay).to(endAttrs, duration, easing);
41584
+ });
41585
+ const exitAnimates = collectTrackedAnimates(this).filter(animate => !existingAnimates.includes(animate));
41586
+ if (!exitAnimates.length) return !1;
41587
+ this.setAttribute("childrenPickable", !1), null === (_c = (_b = this._innerView).removeAllEventListeners) || void 0 === _c || _c.call(_b), this.releaseStatus = "willRelease";
41588
+ const pendingAnimates = new Set(exitAnimates);
41589
+ return this._exitReleaseState = {
41590
+ pendingAnimates: pendingAnimates,
41591
+ finalized: !1,
41592
+ removeFromParent: !!options.removeFromParent,
41593
+ onComplete: options.onComplete ? [options.onComplete] : []
41594
+ }, bindExitReleaseAnimates(exitAnimates, () => this._exitReleaseState, () => this._finalizeExitRelease()), !0;
41595
+ }
41596
+ releaseWithExitAnimation(options = {}) {
41597
+ return "released" !== this.releaseStatus && this._runExitAnimationBeforeRelease(options);
41598
+ }
40770
41599
  render() {
40771
- this._prepare(), this._prevInnerView = this._innerView && getElMap(this._innerView), this.removeAllChild(!0), this._innerView = graphicCreator.group({
41600
+ this._exitReleaseState || (this._prepare(), this._prevInnerView = this._innerView && getElMap(this._innerView), this.removeAllChild(!0), this._innerView = graphicCreator.group({
40772
41601
  x: 0,
40773
41602
  y: 0,
40774
41603
  pickable: !1
40775
- }), this.add(this._innerView), this._renderInner(this._innerView), this._bindEvent(), this.runAnimation();
41604
+ }), this.add(this._innerView), this._renderInner(this._innerView), this._bindEvent(), this.runAnimation());
40776
41605
  }
40777
41606
  _prepare() {
40778
41607
  this._prepareAnimate(DefaultAxisAnimation);
@@ -41061,33 +41890,29 @@ class AxisBase extends AnimateComponent {
41061
41890
  var _a;
41062
41891
  if ("group" !== el.type && el.id) {
41063
41892
  const oldEl = prevInnerView[el.id];
41064
- if (el.setFinalAttributes(el.attribute), oldEl) {
41893
+ if (oldEl) {
41065
41894
  oldEl.release();
41066
- const oldAttrs = oldEl.attribute,
41067
- finalAttrs = el.getFinalAttribute(),
41895
+ const oldAttrs = cloneDeep(oldEl.attribute),
41896
+ finalAttrs = cloneDeep(el.attribute),
41068
41897
  diffAttrs = diff(oldAttrs, finalAttrs);
41069
41898
  let hasDiff = Object.keys(diffAttrs).length > 0;
41070
- if ("opacity" in oldAttrs && finalAttrs.opacity !== oldAttrs.opacity && (diffAttrs.opacity = null !== (_a = finalAttrs.opacity) && void 0 !== _a ? _a : 1, hasDiff = !0), animationConfig.update && hasDiff) {
41071
- this._newElementAttrMap[el.id] = {
41072
- state: "update",
41073
- node: el,
41074
- attrs: el.attribute
41075
- };
41076
- const oldAttrs = oldEl.attribute;
41077
- el.setAttributes(oldAttrs), el.applyAnimationState(["update"], [{
41078
- name: "update",
41079
- animation: Object.assign(Object.assign({
41080
- selfOnly: !0
41081
- }, animationConfig.update), {
41082
- type: "axisUpdate",
41083
- customParameters: {
41084
- config: animationConfig.update,
41085
- diffAttrs: diffAttrs,
41086
- lastScale: lastScale
41087
- }
41088
- })
41089
- }]);
41090
- }
41899
+ "opacity" in oldAttrs && finalAttrs.opacity !== oldAttrs.opacity && (diffAttrs.opacity = null !== (_a = finalAttrs.opacity) && void 0 !== _a ? _a : 1, hasDiff = !0), animationConfig.update && hasDiff && (this._newElementAttrMap[el.id] = {
41900
+ state: "update",
41901
+ node: el,
41902
+ attrs: finalAttrs
41903
+ }, commitUpdateAnimationTarget(el, finalAttrs, oldAttrs), el.applyAnimationState(["update"], [{
41904
+ name: "update",
41905
+ animation: Object.assign(Object.assign({
41906
+ selfOnly: !0
41907
+ }, animationConfig.update), {
41908
+ type: "axisUpdate",
41909
+ customParameters: {
41910
+ config: animationConfig.update,
41911
+ diffAttrs: diffAttrs,
41912
+ lastScale: lastScale
41913
+ }
41914
+ })
41915
+ }]));
41091
41916
  } else animationConfig.enter && (this._newElementAttrMap[el.id] = {
41092
41917
  state: "enter",
41093
41918
  node: el,
@@ -41108,8 +41933,8 @@ class AxisBase extends AnimateComponent {
41108
41933
  });
41109
41934
  }
41110
41935
  }
41111
- release() {
41112
- super.release(), this._prevInnerView = null, this._innerView = null;
41936
+ release(all) {
41937
+ this._exitReleaseState ? this._finalizeExitRelease() : (all && this.removeAllChild(!0), super.release(all), all && this.removeAllChild(!0), this._prevInnerView = null, this._innerView = null);
41113
41938
  }
41114
41939
  }
41115
41940
 
@@ -41431,7 +42256,10 @@ class AxisEnter extends AComponentAnimate {
41431
42256
  const point = getTickCoord(lastScale.scale(currData.rawValue)),
41432
42257
  newX = this.target.attribute.x,
41433
42258
  newY = this.target.attribute.y;
41434
- this.target.setAttributes({
42259
+ commitUpdateAnimationTarget(this.target, {
42260
+ x: newX,
42261
+ y: newY
42262
+ }, {
41435
42263
  x: point.x,
41436
42264
  y: point.y
41437
42265
  }), animator.animate(this.target, {
@@ -41459,10 +42287,9 @@ class AxisUpdate extends AComponentAnimate {
41459
42287
  const duration = this.duration,
41460
42288
  easing = this.easing,
41461
42289
  {
41462
- config: config,
41463
42290
  diffAttrs: diffAttrs
41464
42291
  } = this.params;
41465
- animator.animate(this.target, {
42292
+ commitUpdateAnimationTarget(this.target, Object.assign({}, diffAttrs)), animator.animate(this.target, {
41466
42293
  type: "to",
41467
42294
  to: Object.assign({}, diffAttrs),
41468
42295
  duration: duration,
@@ -41473,7 +42300,10 @@ class AxisUpdate extends AComponentAnimate {
41473
42300
  }), this.completeBind(animator);
41474
42301
  }
41475
42302
  deleteSelfAttr(key) {
41476
- super.deleteSelfAttr(key), this._animator.deleteSelfAttr(key);
42303
+ this.deleteSelfAttrs([key]);
42304
+ }
42305
+ deleteSelfAttrs(keys) {
42306
+ super.deleteSelfAttrs(keys), this._animator.deleteSelfAttrs(keys);
41477
42307
  }
41478
42308
  tryPreventConflict() {}
41479
42309
  }
@@ -42019,8 +42849,8 @@ class LineAxis extends AxisBase {
42019
42849
  const orient = this.attribute.orient;
42020
42850
  return "left" === orient || "right" === orient ? this.attribute.width ? this.attribute.width : (this.attribute.maxWidth && (offset = Math.min(offset, this.attribute.maxWidth)), this.attribute.minWidth && (offset = Math.max(offset, this.attribute.minWidth)), offset) : offset;
42021
42851
  }
42022
- release() {
42023
- super.release(), this._breaks = null;
42852
+ release(all) {
42853
+ super.release(all), this._breaks = null;
42024
42854
  }
42025
42855
  }
42026
42856
  LineAxis.defaultAttributes = DEFAULT_AXIS_THEME, mixin(LineAxis, LineAxisMixin);
@@ -42347,6 +43177,7 @@ class GroupTransition extends ACustomAnimate {
42347
43177
  super(...arguments), this.mode = AnimateMode.NORMAL;
42348
43178
  }
42349
43179
  onBind() {
43180
+ this._started = !1;
42350
43181
  const currentInnerView = this.target.getInnerView(),
42351
43182
  prevInnerView = this.target.getPrevInnerView();
42352
43183
  prevInnerView && (this._newElementAttrMap = {}, traverseGroup(currentInnerView, el => {
@@ -42364,7 +43195,7 @@ class GroupTransition extends ACustomAnimate {
42364
43195
  fillOpacity: null !== (_b = newProps.fillOpacity) && void 0 !== _b ? _b : 1,
42365
43196
  strokeOpacity: null !== (_c = newProps.strokeOpacity) && void 0 !== _c ? _c : 1
42366
43197
  })
42367
- }, el.setAttributes(oldEl.attribute);
43198
+ }, commitUpdateAnimationTarget(el, this._newElementAttrMap[el.id].attrs, cloneDeep(oldEl.attribute));
42368
43199
  }
42369
43200
  } else {
42370
43201
  const finalOpacityAttrs = {
@@ -42376,7 +43207,7 @@ class GroupTransition extends ACustomAnimate {
42376
43207
  state: "enter",
42377
43208
  node: el,
42378
43209
  attrs: finalOpacityAttrs
42379
- }, el.setAttributes({
43210
+ }, commitUpdateAnimationTarget(el, finalOpacityAttrs, {
42380
43211
  opacity: 0,
42381
43212
  fillOpacity: 0,
42382
43213
  strokeOpacity: 0
@@ -42386,6 +43217,8 @@ class GroupTransition extends ACustomAnimate {
42386
43217
  }));
42387
43218
  }
42388
43219
  onStart() {
43220
+ if (this._started) return;
43221
+ this._started = !0;
42389
43222
  let duration = this.duration,
42390
43223
  easing = this.easing;
42391
43224
  this._newElementAttrMap && Object.keys(this._newElementAttrMap).forEach(id => {
@@ -43989,6 +44822,14 @@ var __rest$8 = undefined && undefined.__rest || function (s, e) {
43989
44822
  }
43990
44823
  return t;
43991
44824
  };
44825
+ function cloneAttributeSnapshot(value) {
44826
+ if (!isObject$1(value) || isArray$1(value)) return value;
44827
+ const snapshot = {};
44828
+ return Object.keys(value).forEach(key => {
44829
+ const nextValue = value[key];
44830
+ snapshot[key] = isObject$1(nextValue) && !isArray$1(nextValue) ? cloneAttributeSnapshot(nextValue) : nextValue;
44831
+ }), snapshot;
44832
+ }
43992
44833
  loadLabelComponent();
43993
44834
  class LabelBase extends AnimateComponent {
43994
44835
  setBitmap(bitmap) {
@@ -44053,11 +44894,56 @@ class LabelBase extends AnimateComponent {
44053
44894
  return baseMark && baseMark.getAttributes(!0).fill && lineGraphic.setAttribute("stroke", baseMark.getAttributes(!0).fill), this.attribute.line && !isEmpty(this.attribute.line.style) && lineGraphic.setAttributes(this.attribute.line.style), this._setStatesOfLabelLine(lineGraphic), lineGraphic;
44054
44895
  }
44055
44896
  }
44897
+ _finalizeExitRelease() {
44898
+ var _a, _b, _c, _d;
44899
+ const state = this._exitReleaseState;
44900
+ if (null == state ? void 0 : state.finalized) return;
44901
+ state && (state.finalized = !0);
44902
+ const parent = this.parent,
44903
+ removeFromParent = !!(null == state ? void 0 : state.removeFromParent),
44904
+ callbacks = null !== (_a = null == state ? void 0 : state.onComplete) && void 0 !== _a ? _a : [];
44905
+ this._exitReleaseState = void 0, this._graphicToText = new Map(), null === (_b = this._idToGraphic) || void 0 === _b || _b.clear(), null === (_c = this._idToPoint) || void 0 === _c || _c.clear(), this._baseMarks = void 0, this.removeAllChild(!0), super.release(!0), removeFromParent && (null === (_d = null != parent ? parent : this.parent) || void 0 === _d || _d.removeChild(this)), runExitReleaseCallbacks(callbacks);
44906
+ }
44907
+ _runExitAnimationBeforeRelease(options = {}) {
44908
+ var _a, _b;
44909
+ if (this._exitReleaseState && !this._exitReleaseState.finalized) return this._exitReleaseState.removeFromParent = this._exitReleaseState.removeFromParent || !!options.removeFromParent, appendExitReleaseCallback(this._exitReleaseState, options.onComplete), !0;
44910
+ if (!this.stage || !1 === this.attribute.animation || !1 === this.attribute.animationExit || !(null === (_a = this._graphicToText) || void 0 === _a ? void 0 : _a.size)) return !1;
44911
+ if (this._prepareAnimate(DefaultLabelAnimation), !(null === (_b = this._animationConfig) || void 0 === _b ? void 0 : _b.exit)) return !1;
44912
+ const exitTargets = new Set();
44913
+ if (this._graphicToText.forEach(label => {
44914
+ (null == label ? void 0 : label.text) && exitTargets.add(label.text), (null == label ? void 0 : label.labelLine) && exitTargets.add(label.labelLine);
44915
+ }), !exitTargets.size) return !1;
44916
+ const existingAnimates = collectTrackedAnimates(this);
44917
+ exitTargets.forEach(target => {
44918
+ var _a;
44919
+ target.applyAnimationState(["exit"], [{
44920
+ name: "exit",
44921
+ animation: Object.assign(Object.assign({}, this._animationConfig.exit), {
44922
+ type: null !== (_a = this._animationConfig.exit.type) && void 0 !== _a ? _a : "fadeOut",
44923
+ selfOnly: !0
44924
+ })
44925
+ }]);
44926
+ });
44927
+ const exitAnimates = collectTrackedAnimates(this).filter(animate => !existingAnimates.includes(animate));
44928
+ if (!exitAnimates.length) return !1;
44929
+ this.setAttribute("childrenPickable", !1), this.releaseStatus = "willRelease";
44930
+ const pendingAnimates = new Set(exitAnimates);
44931
+ return this._exitReleaseState = {
44932
+ pendingAnimates: pendingAnimates,
44933
+ finalized: !1,
44934
+ removeFromParent: !!options.removeFromParent,
44935
+ onComplete: options.onComplete ? [options.onComplete] : []
44936
+ }, bindExitReleaseAnimates(exitAnimates, () => this._exitReleaseState, () => this._finalizeExitRelease()), !0;
44937
+ }
44938
+ releaseWithExitAnimation(options = {}) {
44939
+ return "released" !== this.releaseStatus && this._runExitAnimationBeforeRelease(options);
44940
+ }
44056
44941
  render() {
44942
+ if (this._exitReleaseState) return;
44057
44943
  if (this._prepare(), isNil$1(this._idToGraphic) || this._isCollectionBase && isNil$1(this._idToPoint)) return;
44058
44944
  const markAttributeList = [];
44059
44945
  !1 !== this._enableAnimation && this._baseMarks.forEach(mark => {
44060
- markAttributeList.push(mark.attribute), mark.initAttributes(mark.getAttributes(!0));
44946
+ markAttributeList.push(cloneAttributeSnapshot(mark.attribute)), mark.initAttributes(mark.getAttributes(!0));
44061
44947
  });
44062
44948
  const {
44063
44949
  overlap: overlap,
@@ -44482,7 +45368,7 @@ class LabelBase extends AnimateComponent {
44482
45368
  text: curText,
44483
45369
  labelLine: curLabelLine
44484
45370
  } = currentLabel;
44485
- prevText.applyAnimationState(["update"], [{
45371
+ commitUpdateAnimationTarget(prevText, null == curText ? void 0 : curText.attribute), commitUpdateAnimationTarget(prevLabelLine, null == curLabelLine ? void 0 : curLabelLine.attribute), prevText.applyAnimationState(["update"], [{
44486
45372
  name: "update",
44487
45373
  animation: {
44488
45374
  type: "labelUpdate",
@@ -44508,7 +45394,6 @@ class LabelBase extends AnimateComponent {
44508
45394
  }
44509
45395
  _updateLabel(prevLabel, currentLabel) {
44510
45396
  const {
44511
- text: prevText,
44512
45397
  labelLine: prevLabelLine
44513
45398
  } = prevLabel,
44514
45399
  {
@@ -44624,6 +45509,10 @@ class LabelBase extends AnimateComponent {
44624
45509
  _canPlaceInside(textBound, shapeBound) {
44625
45510
  return !(!textBound || !shapeBound) && shapeBound.encloses(textBound);
44626
45511
  }
45512
+ release(all) {
45513
+ var _a, _b;
45514
+ this._exitReleaseState ? this._finalizeExitRelease() : (all && this.removeAllChild(!0), super.release(all), this._graphicToText = new Map(), null === (_a = this._idToGraphic) || void 0 === _a || _a.clear(), null === (_b = this._idToPoint) || void 0 === _b || _b.clear(), this._baseMarks = void 0);
45515
+ }
44627
45516
  setLocation(point) {
44628
45517
  this.translateTo(point.x, point.y);
44629
45518
  }
@@ -45393,6 +46282,7 @@ class DataLabel extends AbstractComponent {
45393
46282
  }
45394
46283
  render() {
45395
46284
  var _a;
46285
+ if (this._exitReleaseState) return;
45396
46286
  const {
45397
46287
  dataLabels: dataLabels,
45398
46288
  size: size
@@ -45427,6 +46317,47 @@ class DataLabel extends AbstractComponent {
45427
46317
  currentComponentMap.get(key) || this.removeChild(cp);
45428
46318
  }), this._componentMap = currentComponentMap;
45429
46319
  }
46320
+ _finalizeExitRelease() {
46321
+ var _a, _b, _c;
46322
+ const state = this._exitReleaseState;
46323
+ if (null == state ? void 0 : state.finalized) return;
46324
+ state && (state.finalized = !0);
46325
+ const parent = this.parent,
46326
+ removeFromParent = !!(null == state ? void 0 : state.removeFromParent),
46327
+ callbacks = null !== (_a = null == state ? void 0 : state.onComplete) && void 0 !== _a ? _a : [];
46328
+ this._exitReleaseState = void 0, null === (_b = this._componentMap) || void 0 === _b || _b.clear(), this.removeAllChild(!0), super.release(!0), removeFromParent && (null === (_c = null != parent ? parent : this.parent) || void 0 === _c || _c.removeChild(this)), runExitReleaseCallbacks(callbacks);
46329
+ }
46330
+ releaseWithExitAnimation(options = {}) {
46331
+ var _a;
46332
+ if ("released" === this.releaseStatus) return !1;
46333
+ if (this._exitReleaseState && !this._exitReleaseState.finalized) return this._exitReleaseState.removeFromParent = this._exitReleaseState.removeFromParent || !!options.removeFromParent, appendExitReleaseCallback(this._exitReleaseState, options.onComplete), !0;
46334
+ if (!this.stage || !(null === (_a = this._componentMap) || void 0 === _a ? void 0 : _a.size)) return !1;
46335
+ const state = {
46336
+ pendingCount: 0,
46337
+ finalized: !1,
46338
+ removeFromParent: !!options.removeFromParent,
46339
+ onComplete: options.onComplete ? [options.onComplete] : []
46340
+ },
46341
+ exitingComponents = [],
46342
+ fallbackComponents = [];
46343
+ let initializing = !0;
46344
+ const finish = () => {
46345
+ state.finalized || (state.pendingCount -= 1, state.pendingCount <= 0 && !initializing && this._finalizeExitRelease());
46346
+ };
46347
+ return this._exitReleaseState = state, this._componentMap.forEach(component => {
46348
+ state.pendingCount += 1;
46349
+ component.releaseWithExitAnimation({
46350
+ removeFromParent: !1,
46351
+ onComplete: finish
46352
+ }) ? exitingComponents.push(component) : (state.pendingCount -= 1, fallbackComponents.push(component));
46353
+ }), exitingComponents.length ? (fallbackComponents.forEach(component => {
46354
+ component.release(!0), this.removeChild(component);
46355
+ }), this.setAttribute("childrenPickable", !1), this.releaseStatus = "willRelease", initializing = !1, state.pendingCount <= 0 && this._finalizeExitRelease(), !0) : (this._exitReleaseState = void 0, !1);
46356
+ }
46357
+ release(all) {
46358
+ var _a;
46359
+ this._exitReleaseState ? this._finalizeExitRelease() : (all && this.removeAllChild(!0), super.release(all), null === (_a = this._componentMap) || void 0 === _a || _a.clear());
46360
+ }
45430
46361
  setLocation(point) {
45431
46362
  this.translateTo(point.x, point.y);
45432
46363
  }
@@ -47060,14 +47991,51 @@ class Marker extends AbstractComponent {
47060
47991
  y: clipInRange ? -(null !== (_b = limitRect.y) && void 0 !== _b ? _b : 0) : 0
47061
47992
  });
47062
47993
  }
47063
- render() {
47994
+ _finalizeExitRelease() {
47995
+ var _a, _b;
47996
+ const state = this._exitReleaseState;
47997
+ if (null == state ? void 0 : state.finalized) return;
47998
+ state && (state.finalized = !0);
47999
+ const parent = this.parent,
48000
+ removeFromParent = !!(null == state ? void 0 : state.removeFromParent),
48001
+ releaseSelf = !!(null == state ? void 0 : state.releaseSelf),
48002
+ callbacks = null !== (_a = null == state ? void 0 : state.onComplete) && void 0 !== _a ? _a : [];
48003
+ this._exitReleaseState = void 0, this._releaseEvent(), this._container = null, this._containerClip = null, this.removeAllChild(!0), releaseSelf && (super.release(!0), removeFromParent && (null === (_b = null != parent ? parent : this.parent) || void 0 === _b || _b.removeChild(this))), runExitReleaseCallbacks(callbacks);
48004
+ }
48005
+ _runExitAnimationBeforeCleanup(options = {}) {
47064
48006
  var _a;
48007
+ const releaseSelf = !!options.releaseSelf;
48008
+ if (this._exitReleaseState && !this._exitReleaseState.finalized) return this._exitReleaseState.releaseSelf = this._exitReleaseState.releaseSelf || releaseSelf, this._exitReleaseState.removeFromParent = this._exitReleaseState.removeFromParent || !!options.removeFromParent, appendExitReleaseCallback(this._exitReleaseState, options.onComplete), !0;
48009
+ if (!this.stage || !1 === this.attribute.animation || !1 === this.attribute.animationExit || !this._container) return !1;
48010
+ if (this.transAnimationConfig(), !(null === (_a = this._animationConfig) || void 0 === _a ? void 0 : _a.exit)) return !1;
48011
+ const existingAnimates = collectTrackedAnimates(this);
48012
+ this.markerAnimate("exit");
48013
+ const exitAnimates = collectTrackedAnimates(this).filter(animate => !existingAnimates.includes(animate));
48014
+ if (!exitAnimates.length) return !1;
48015
+ this._releaseEvent(), this.setAttribute("childrenPickable", !1), releaseSelf && (this.releaseStatus = "willRelease");
48016
+ const pendingAnimates = new Set(exitAnimates);
48017
+ return this._exitReleaseState = {
48018
+ pendingAnimates: pendingAnimates,
48019
+ finalized: !1,
48020
+ releaseSelf: releaseSelf,
48021
+ removeFromParent: !!options.removeFromParent,
48022
+ onComplete: options.onComplete ? [options.onComplete] : []
48023
+ }, bindExitReleaseAnimates(exitAnimates, () => this._exitReleaseState, () => this._finalizeExitRelease()), !0;
48024
+ }
48025
+ releaseWithExitAnimation(options = {}) {
48026
+ return "released" !== this.releaseStatus && this._runExitAnimationBeforeCleanup(Object.assign(Object.assign({}, options), {
48027
+ releaseSelf: !0
48028
+ }));
48029
+ }
48030
+ render() {
48031
+ var _a, _b;
48032
+ if (null === (_a = this._exitReleaseState) || void 0 === _a ? void 0 : _a.releaseSelf) return;
47065
48033
  this.transAnimationConfig(), this.setAttribute("pickable", !1);
47066
- const markerVisible = null === (_a = this.attribute.visible) || void 0 === _a || _a;
47067
- !1 === this.attribute.interactive && this.setAttribute("childrenPickable", !1), markerVisible && this.isValidPoints() ? this._container ? (this._updateContainer(), this.updateMarker(), this.markerAnimate("update")) : (this._initContainer(), this.initMarker(this._container), this.markerAnimate("enter")) : (this.markerAnimate("exit"), this._container = null, this.removeAllChild(!0)), this._releaseEvent(), this._bindEvent();
48034
+ const markerVisible = null === (_b = this.attribute.visible) || void 0 === _b || _b;
48035
+ !1 === this.attribute.interactive && this.setAttribute("childrenPickable", !1), markerVisible && this.isValidPoints() ? (this._exitReleaseState && this._finalizeExitRelease(), this._container ? (this._updateContainer(), this.updateMarker(), this.markerAnimate("update")) : (this._initContainer(), this.initMarker(this._container), this.markerAnimate("enter"))) : this._runExitAnimationBeforeCleanup() || (this._container = null, this._containerClip = null, this.removeAllChild(!0)), this._releaseEvent(), this._bindEvent();
47068
48036
  }
47069
- release() {
47070
- this.markerAnimate("exit"), super.release(), this._releaseEvent(), this._container = null;
48037
+ release(all) {
48038
+ this._exitReleaseState ? this._finalizeExitRelease() : (!1 !== this.attribute.animation && !1 !== this.attribute.animationExit && this.markerAnimate("exit"), all && this.removeAllChild(!0), super.release(all), this._releaseEvent(), this._container = null, this._containerClip = null);
47071
48039
  }
47072
48040
  }
47073
48041
 
@@ -47077,7 +48045,10 @@ function graphicFadeIn(graphic, delay, duration, easing) {
47077
48045
  null === (_a = null == graphic ? void 0 : graphic.animates) || void 0 === _a || _a.forEach(a => a.stop("end"));
47078
48046
  const fillOpacityConfig = null !== (_c = null === (_b = graphic.attribute) || void 0 === _b ? void 0 : _b.fillOpacity) && void 0 !== _c ? _c : 1,
47079
48047
  strokeOpacityConfig = null !== (_e = null === (_d = graphic.attribute) || void 0 === _d ? void 0 : _d.strokeOpacity) && void 0 !== _e ? _e : 1;
47080
- graphic.setAttributes({
48048
+ commitUpdateAnimationTarget(graphic, {
48049
+ fillOpacity: fillOpacityConfig,
48050
+ strokeOpacity: strokeOpacityConfig
48051
+ }, {
47081
48052
  fillOpacity: 0,
47082
48053
  strokeOpacity: 0
47083
48054
  }), graphic.animate().wait(delay).to({
@@ -47093,7 +48064,10 @@ function tagFadeIn(tag, delay, duration, easing) {
47093
48064
  }
47094
48065
  function graphicFadeOut(graphic, delay, duration, easing) {
47095
48066
  var _a, _b, _c, _d;
47096
- graphic && (graphic.setAttributes({
48067
+ graphic && (commitUpdateAnimationTarget(graphic, {
48068
+ fillOpacity: 0,
48069
+ strokeOpacity: 0
48070
+ }, {
47097
48071
  fillOpacity: null !== (_b = null === (_a = graphic.attribute) || void 0 === _a ? void 0 : _a.fillOpacity) && void 0 !== _b ? _b : 1,
47098
48072
  strokeOpacity: null !== (_d = null === (_c = graphic.attribute) || void 0 === _c ? void 0 : _c.strokeOpacity) && void 0 !== _d ? _d : 1
47099
48073
  }), graphic.animate().wait(delay).to({
@@ -47113,7 +48087,11 @@ function commonLineClipIn(line, label, duration, delay, easing) {
47113
48087
  lineDuration = .7 * duration,
47114
48088
  endSymbolDuration = .1 * duration,
47115
48089
  labelDuration = .1 * duration;
47116
- graphicFadeIn(line.startSymbol, delay, startSymbolDuration, easing), line.lines.forEach(line => line.setAttribute("clipRange", 0)), line.lines.forEach((l, index) => {
48090
+ graphicFadeIn(line.startSymbol, delay, startSymbolDuration, easing), line.lines.forEach(line => commitUpdateAnimationTarget(line, {
48091
+ clipRange: 1
48092
+ }, {
48093
+ clipRange: 0
48094
+ })), line.lines.forEach((l, index) => {
47117
48095
  const stepDuration = lineDuration / line.lines.length;
47118
48096
  l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
47119
48097
  clipRange: 1
@@ -47171,7 +48149,11 @@ function pointCallIn(itemLine, decorativeLine, item, duration, delay, easing) {
47171
48149
  decorativeDuration = .05 * duration,
47172
48150
  endSymbolDuration = .1 * duration,
47173
48151
  labelDuration = .1 * duration;
47174
- graphicFadeIn(itemLine.startSymbol, delay, startSymbolDuration, easing), itemLine.lines.forEach(line => line.setAttribute("clipRange", 0)), itemLine.lines.forEach((l, index) => {
48152
+ graphicFadeIn(itemLine.startSymbol, delay, startSymbolDuration, easing), itemLine.lines.forEach(line => commitUpdateAnimationTarget(line, {
48153
+ clipRange: 1
48154
+ }, {
48155
+ clipRange: 0
48156
+ })), itemLine.lines.forEach((l, index) => {
47175
48157
  const stepDuration = lineDuration / itemLine.lines.length;
47176
48158
  l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
47177
48159
  clipRange: 1
@@ -49316,7 +50298,10 @@ class DiscreteLegend extends LegendBase {
49316
50298
  const innerGroupHeight = innerGroupBounds.height(),
49317
50299
  itemGroupWidth = isValid$1(this.attribute.item.width) ? this.attribute.item.width : innerGroupWidth + parsedPadding[1] + parsedPadding[3],
49318
50300
  itemGroupHeight = this._itemHeightByUser || innerGroupHeight + parsedPadding[0] + parsedPadding[2];
49319
- return itemGroup.attribute.width = itemGroupWidth, itemGroup.attribute.height = itemGroupHeight, focusShape && focusShape.setAttribute("visible", !1), innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]), itemGroup;
50301
+ return itemGroup.setAttributes({
50302
+ width: itemGroupWidth,
50303
+ height: itemGroupHeight
50304
+ }), focusShape && focusShape.setAttribute("visible", !1), innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]), itemGroup;
49320
50305
  }
49321
50306
  _createPager(compStyle) {
49322
50307
  var _a, _b;
@@ -49455,12 +50440,18 @@ class DiscreteLegend extends LegendBase {
49455
50440
  let containerSize;
49456
50441
  containerSize = this._itemContext.isHorizontal ? this._itemsContainer.AABBBounds.width() : this._itemsContainer.AABBBounds.height();
49457
50442
  const startOffset = containerSize * start;
49458
- this.updateScrollMask(), animation ? this._itemsContainer.animate().to({
49459
- [channel]: -startOffset
49460
- }, animationDuration, animationEasing) : this._itemsContainer.setAttribute(channel, -startOffset);
49461
- } else animation ? this._itemsContainer.animate().to({
49462
- [channel]: -(newPage - 1) * pageSize
49463
- }, animationDuration, animationEasing) : this._itemsContainer.setAttribute(channel, -(newPage - 1) * pageSize);
50443
+ if (this.updateScrollMask(), animation) {
50444
+ const attrs = {
50445
+ [channel]: -startOffset
50446
+ };
50447
+ commitUpdateAnimationTarget(this._itemsContainer, attrs), this._itemsContainer.animate().to(attrs, animationDuration, animationEasing);
50448
+ } else this._itemsContainer.setAttribute(channel, -startOffset);
50449
+ } else if (animation) {
50450
+ const attrs = {
50451
+ [channel]: -(newPage - 1) * pageSize
50452
+ };
50453
+ commitUpdateAnimationTarget(this._itemsContainer, attrs), this._itemsContainer.animate().to(attrs, animationDuration, animationEasing);
50454
+ } else this._itemsContainer.setAttribute(channel, -(newPage - 1) * pageSize);
49464
50455
  }
49465
50456
  };
49466
50457
  if (this._itemContext.isScrollbar) {
@@ -50947,7 +51938,11 @@ class Title extends AbstractComponent {
50947
51938
  subTextBoundsWidth = this._subTitle ? this._subTitle.AABBBounds.width() : 0;
50948
51939
  let totalWidth = Math.max(mainTextBoundsWidth, subTextBoundsWidth),
50949
51940
  totalHeight = mainTextBoundsHeight + (null !== (_q = subtextStyle.height) && void 0 !== _q ? _q : subTextBoundsHeight);
50950
- if (isValid$1(width) && (totalWidth = width), isValid$1(height) && (totalHeight = height), isValid$1(minWidth) && totalWidth < minWidth && (totalWidth = minWidth), isValid$1(maxWidth) && totalWidth > maxWidth && (totalWidth = maxWidth), isValid$1(minHeight) && totalHeight < minHeight && (totalHeight = minHeight), isValid$1(maxHeight) && totalHeight > maxHeight && (totalHeight = maxHeight), group.attribute.width = totalWidth, group.attribute.height = totalHeight, group.attribute.boundsPadding = parsedPadding, this._mainTitle) {
51941
+ if (isValid$1(width) && (totalWidth = width), isValid$1(height) && (totalHeight = height), isValid$1(minWidth) && totalWidth < minWidth && (totalWidth = minWidth), isValid$1(maxWidth) && totalWidth > maxWidth && (totalWidth = maxWidth), isValid$1(minHeight) && totalHeight < minHeight && (totalHeight = minHeight), isValid$1(maxHeight) && totalHeight > maxHeight && (totalHeight = maxHeight), group.setAttributes({
51942
+ width: totalWidth,
51943
+ height: totalHeight,
51944
+ boundsPadding: parsedPadding
51945
+ }), this._mainTitle) {
50951
51946
  if (isValid$1(align) || isValid$1(textStyle.align)) {
50952
51947
  const mainTitleAlign = textStyle.align ? textStyle.align : align,
50953
51948
  mainTitleWidth = null !== (_r = textStyle.width) && void 0 !== _r ? _r : totalWidth;
@@ -52484,6 +53479,7 @@ class Timeline extends AbstractComponent {
52484
53479
  setActive(labelGroup, activeLabelStyle), setActive(symbolGroup, activeSymbolStyle);
52485
53480
  }
52486
53481
  appearAnimate(animateConfig) {
53482
+ var _a;
52487
53483
  const {
52488
53484
  duration = 1e3,
52489
53485
  easing = "quadOut"
@@ -52499,26 +53495,39 @@ class Timeline extends AbstractComponent {
52499
53495
  perSymbolNormalDuration = 90 * percent,
52500
53496
  symbolDelay = 100 * percent,
52501
53497
  symbolNormalDelay = 600 * percent;
52502
- if (this._line && (this._line.setAttributes({
53498
+ if (this._line && (commitUpdateAnimationTarget(this._line, {
53499
+ clipRange: 1
53500
+ }, {
52503
53501
  clipRange: 0
52504
53502
  }), this._line.animate().to({
52505
53503
  clipRange: 1
52506
- }, lineDuration, easing)), this._activeLine && (this._activeLine.setAttributes({
52507
- opacity: 0
52508
- }), this._activeLine.animate().wait(500).to({
52509
- opacity: 1
52510
- }, activeLineDuration, easing)), this._symbolGroup) {
53504
+ }, lineDuration, easing)), this._activeLine) {
53505
+ const opacity = null !== (_a = this._activeLine.attribute.opacity) && void 0 !== _a ? _a : 1;
53506
+ commitUpdateAnimationTarget(this._activeLine, {
53507
+ opacity: opacity
53508
+ }, {
53509
+ opacity: 0
53510
+ }), this._activeLine.animate().wait(500).to({
53511
+ opacity: opacity
53512
+ }, activeLineDuration, easing);
53513
+ }
53514
+ if (this._symbolGroup) {
52511
53515
  const size = this._symbolGroup.count - 1,
52512
53516
  delay = percent * (1 === size ? 0 : 400 / (size - 1)),
52513
53517
  delayNormal = percent * (1 === size ? 0 : 240 / (size - 1));
52514
53518
  this._symbolGroup.forEachChildren((symbol, i) => {
53519
+ var _a;
52515
53520
  const originAttrs = {};
52516
53521
  Object.keys(activeSymbolStyle).forEach(k => {
52517
53522
  originAttrs[k] = symbol.attribute[k];
52518
- }), symbol.setAttributes({
53523
+ });
53524
+ const opacity = null !== (_a = symbol.attribute.opacity) && void 0 !== _a ? _a : 1;
53525
+ commitUpdateAnimationTarget(symbol, {
53526
+ opacity: opacity
53527
+ }, {
52519
53528
  opacity: 0
52520
53529
  }), symbol.animate().wait(symbolDelay + delay * i).to({
52521
- opacity: 1
53530
+ opacity: opacity
52522
53531
  }, perSymbolDuration, easing), symbol.animate().wait(symbolNormalDelay + delayNormal * i).to(Object.assign({}, activeSymbolStyle), perSymbolNormalDuration, easing).to(Object.assign({}, originAttrs), perSymbolNormalDuration, easing);
52523
53532
  });
52524
53533
  }
@@ -52527,13 +53536,18 @@ class Timeline extends AbstractComponent {
52527
53536
  delay = percent * (1 === size ? 0 : 400 / (size - 1)),
52528
53537
  delayNormal = percent * (1 === size ? 0 : 240 / (size - 1));
52529
53538
  this._labelGroup.forEachChildren((label, i) => {
53539
+ var _a;
52530
53540
  const originAttrs = {};
52531
53541
  Object.keys(activeLabelStyle).forEach(k => {
52532
53542
  originAttrs[k] = label.attribute[k];
52533
- }), label.setAttributes({
53543
+ });
53544
+ const opacity = null !== (_a = label.attribute.opacity) && void 0 !== _a ? _a : 1;
53545
+ commitUpdateAnimationTarget(label, {
53546
+ opacity: opacity
53547
+ }, {
52534
53548
  opacity: 0
52535
53549
  }), label.animate().wait(symbolDelay + delay * i).to({
52536
- opacity: 1
53550
+ opacity: opacity
52537
53551
  }, perSymbolDuration, easing), label.animate().wait(symbolNormalDelay + delayNormal * i).to(Object.assign({
52538
53552
  dy: 10
52539
53553
  }, activeLabelStyle), perSymbolNormalDuration, easing).to(Object.assign({
@@ -52567,7 +53581,11 @@ class Timeline extends AbstractComponent {
52567
53581
  duration = 1e3,
52568
53582
  easing = "quadOut"
52569
53583
  } = animateConfig;
52570
- this.animate().to({
53584
+ commitUpdateAnimationTarget(this, {
53585
+ clipRange: nextClipRange
53586
+ }, {
53587
+ clipRange: clipRange
53588
+ }), this.animate().to({
52571
53589
  clipRange: nextClipRange
52572
53590
  }, duration, easing);
52573
53591
  } else this.setAttributes({
@@ -54286,6 +55304,6 @@ function createStage(params) {
54286
55304
  return resolveLegacyApp().createStage(params);
54287
55305
  }
54288
55306
 
54289
- const version = "1.1.0-alpha.2";
55307
+ const version = "1.1.0-alpha.20";
54290
55308
 
54291
- export { AComponentAnimate, ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AStageAnimate, AXIS_ELEMENT_NAME, AbstractComponent, AbstractGraphicRender, Animate, AnimateExecutor, AnimateMode, AnimateStatus, Step as AnimateStep, AnimateStepType, AnimationStateManager, AnimationStateStore, AnimationStates, AnimationTransitionRegistry, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcInfo, ArcLabel, ArcRender, ArcRenderContribution, ArcSegment, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, AxisStateValue, BaseCanvas, BaseEnvContribution, BasePlayer, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, BrowserEnvContribution, Brush, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGifImagePicker, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasLottiePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasStarPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, CheckBox, Circle, CircleAxis, CircleAxisGrid, CircleCrosshair, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipIn, ClipOut, ClipRadiusAnimate, ColorContinuousLegend, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, ComponentAnimator, Context2dFactory, ContinuousPlayer, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TEXT_FONT_FAMILY$1 as DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionEnum, DirectionalLight, DiscreteLegend, DiscretePlayer, Dissolve, Distortion, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EmptyTip, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeIn, FadeOut, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, FromTo, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, GaussianBlur, Generator, Gesture, GifImage, Glitch, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicStateExtension, GraphicUtil, Grayscale, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupTransition, GroupUpdateAABBBoundsMode, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowIn, GrowOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, HtmlAttributePlugin, IContainPointMode, IDataZoomEvent, IDataZoomInteractiveEvent, IMAGE_NUMBER_TYPE, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Image$1 as Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, Indicator, InputRichText, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LEGEND_ELEMENT_NAME, LINE_NUMBER_TYPE, LabelBase, LabelItemAppear, LabelItemDisappear, Layer, LayerFactory, LayerService, LegendEvent, LegendStateValue, Line$1 as Line, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LineRender, Linear, LinearClosed, LinkPath, Lottie, ManualTicker, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Mat4Allocate, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathRichTextPicker, MathSymbolPicker, MathTextPicker, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, MorphingPath, MotionPath, MoveIn, MoveOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, OutputRichText, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Pager, Particle, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, Pixelation, PlayerEventEnum, PluginRegistry, PluginService, Polygon, PolygonCrosshair, PolygonRender, PolygonRenderContribution, PolygonSectorCrosshair, PopTip, PoptipAppear, PoptipDisappear, PulseAnimate, Pyramid3d, Pyramid3dRender, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, Radio, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectCrosshair, RectLabel, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, RotateIn, RotateOut, SLIDER_ELEMENT_NAME, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, ScaleIn, ScaleOut, ScrollBar, SectorCrosshair, SegContext, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SizeContinuousLegend, SlideIn, SlideOut, SlideOutRichText, SlideRichText, Slider, SpinIn, SpinOut, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, State, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step$1 as Step, StepClosed, StoryLabelItem, StreamLight, StrokeIn, StrokeOut, Switch, Symbol$1 as Symbol, SymbolLabel, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TableSeriesNumber, Tag, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, Timeline, Title, Tooltip, TopZIndex, TransformUtil, Update, UpdateTag, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VTag, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WeatherBox, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, alignTextInLine, alternatingWave, angle, angleLabelOrientAttribute, angleTo, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dCanvasPickerContribution, bindArc3dRenderModule, bindArcCanvasPickerContribution, bindArcMathPickerContribution, bindArcRenderModule, bindAreaCanvasPickerContribution, bindAreaMathPickerContribution, bindAreaRenderModule, bindBrowserEnv, bindCircleCanvasPickerContribution, bindCircleMathPickerContribution, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindFeishuEnv, bindGifImageCanvasPickerContribution, bindGifImageRenderContribution, bindGlyphCanvasPickerContribution, bindGlyphMathPickerContribution, bindGlyphRenderModule, bindHarmonyEnv, bindImageCanvasPickerContribution, bindImageMathPickerContribution, bindImageRenderModule, bindLineCanvasPickerContribution, bindLineMathPickerContribution, bindLineRenderModule, bindLottieCanvasPickerContribution, bindLottieRenderContribution, bindLynxEnv, bindMathPicker, bindNodeEnv, bindPathCanvasPickerContribution, bindPathMathPickerContribution, bindPathRenderModule, bindPolygonCanvasPickerContribution, bindPolygonMathPickerContribution, bindPolygonRenderModule, bindPyramid3dCanvasPickerContribution, bindPyramid3dRenderModule, bindRect3dCanvasPickerContribution, bindRect3dRenderModule, bindRectCanvasPickerContribution, bindRectMathPickerContribution, bindRectRenderModule, bindRichTextMathPickerContribution, bindRichtextCanvasPickerContribution, bindRichtextRenderModule, bindStarRenderModule, bindSymbolCanvasPickerContribution, bindSymbolMathPickerContribution, bindSymbolRenderModule, bindTTEnv, bindTaroEnv, bindTextCanvasPickerContribution, bindTextMathPickerContribution, bindTextRenderModule, bindWxEnv, bootstrapLegacyVRenderRuntime, bootstrapVRenderBrowserApp, bootstrapVRenderNodeApp, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, cartesianTicks, centerToCorner, centroidOfSubpath, circleBounds, circleModule, clampRadian, clock, colorEqual, colorStringInterpolationToStr, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeOffsetForlimit, configureRuntimeApplicationForApp, container, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, cornerTangents, cornerToCenter, createBrowserApp$1 as createApp, createArc, createArc3d, createArea, createBrowserApp$1 as createBrowserApp, createBrowserVRenderApp, createCanvasEventTransformer, createCircle, createColor, createComponentAnimator, createConicalGradient, createContributionProvider$1 as createContributionProvider, createEventTransformer, createGifImage, createGlyph, createGraphic$1 as createGraphic, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createLottie, createMat4, createMiniappApp, createNodeApp$1 as createNodeApp, createNodeVRenderApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createTextGraphicByType, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, deltaXYToAngle, diagonalCenterToEdge, diagonalTopLeftToBottomRight, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, fuzzyEqualNumber, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getAxisBreakSymbolAttrs, getBackgroundImage, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getElMap, getExtraModelMatrix, getHorizontalPath, getLegacyBindingContext, getMarksByName, getModelMatrix, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getScaledStroke, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextBounds, getTextType, getTheme, getThemeFromGroup, getVerticalCoord, getVerticalPath, globalTheme, glyphModule, graphicCreator$1 as graphicCreator, graphicService, graphicUtil, hasOverlap, htmlAttributeTransform, identityMat4, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initTextMeasure, initWxEnv, installBrowserEnvToApp, installBrowserPickersToApp, installDefaultGraphicsToApp, installNodeEnvToApp, installNodePickersToApp, installPoptipToApp, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, installScrollbarToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isInRange, isNoRepeatSizingMode, isNodeEnv, isPostiveXAxis, isRichText, isSvg, isVisible, isXML, jsx, labelSmartInvert, layerService, length, limitShapeInBounds, lineModule, linearDiscreteTicks, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadMathPicker, loadNodeEnv, loadPoptip, loadScrollbar, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, measureTextSize, morphPath, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, normalize$1 as normalize, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, particleEffect, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polarAngleAxisDiscreteTicks, polarTicks, polygonModule, preLoadAllModule, pulseWave, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, randomOpacity, reactAttributeTransform, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerAnimate, registerArc, registerArc3d, registerArc3dGraphic, registerArcDataLabel, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerCustomAnimate, registerDirectionalLight, registerFlexLayoutPlugin, registerGifGraphic, registerGifImage, registerGlobalEventTransformer, registerGlyph, registerGlyphGraphic, registerGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineDataLabel, registerLineGraphic, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectDataLabel, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerStar, registerStarGraphic, registerSymbol, registerSymbolDataLabel, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapText, registerWrapTextGraphic, removeRepeatPoint, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding$1 as resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richTextAttributeTransform, richtextModule, rippleEffect, rotateX, rotateY, rotateZ, rotationScan, roughModule, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, runFill, runStroke, scale, scaleMat4, segments, setPoptipTheme, shouldClipImageByLayout, shouldUseMat4, shouldUseSimpleAttributeFastPath, smartInvertStrategy, snakeWave, snapLength, spiralEffect, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, tan2AngleToAngle, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textIntersect, textLayoutOffsetY, textModule, ticks, transformMat4, transformPointForCanvas, transformUtil, transitionRegistry, translate, traverseGroup, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
55309
+ export { AComponentAnimate, ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AStageAnimate, AXIS_ELEMENT_NAME, AbstractComponent, AbstractGraphicRender, Animate, AnimateExecutor, AnimateMode, AnimateStatus, Step as AnimateStep, AnimateStepType, AnimationStateManager, AnimationStateStore, AnimationStates, AnimationTransitionRegistry, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcInfo, ArcLabel, ArcRender, ArcRenderContribution, ArcSegment, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, AxisStateValue, BaseCanvas, BaseEnvContribution, BasePlayer, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, BrowserEnvContribution, Brush, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGifImagePicker, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasLottiePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasStarPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, CheckBox, Circle, CircleAxis, CircleAxisGrid, CircleCrosshair, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipIn, ClipOut, ClipRadiusAnimate, ColorContinuousLegend, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, ComponentAnimator, Context2dFactory, ContinuousPlayer, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TEXT_FONT_FAMILY$1 as DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionEnum, DirectionalLight, DiscreteLegend, DiscretePlayer, Dissolve, Distortion, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EmptyTip, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeIn, FadeOut, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, FromTo, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, GaussianBlur, Generator, Gesture, GifImage, Glitch, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicStateExtension, GraphicUtil, Grayscale, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupTransition, GroupUpdateAABBBoundsMode, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowIn, GrowOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, HtmlAttributePlugin, IContainPointMode, IDataZoomEvent, IDataZoomInteractiveEvent, IMAGE_NUMBER_TYPE, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Image$1 as Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, Indicator, InputRichText, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LEGEND_ELEMENT_NAME, LINE_NUMBER_TYPE, LabelBase, LabelItemAppear, LabelItemDisappear, Layer, LayerFactory, LayerService, LegendEvent, LegendStateValue, Line$1 as Line, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LineRender, Linear, LinearClosed, LinkPath, Lottie, ManualTicker, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Mat4Allocate, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathRichTextPicker, MathSymbolPicker, MathTextPicker, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, MorphingPath, MotionPath, MoveIn, MoveOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, OutputRichText, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Pager, Particle, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, Pixelation, PlayerEventEnum, PluginRegistry, PluginService, Polygon, PolygonCrosshair, PolygonRender, PolygonRenderContribution, PolygonSectorCrosshair, PopTip, PoptipAppear, PoptipDisappear, PulseAnimate, Pyramid3d, Pyramid3dRender, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, Radio, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectCrosshair, RectLabel, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, RotateIn, RotateOut, SLIDER_ELEMENT_NAME, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, ScaleIn, ScaleOut, ScrollBar, SectorCrosshair, SegContext, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SizeContinuousLegend, SlideIn, SlideOut, SlideOutRichText, SlideRichText, Slider, SpinIn, SpinOut, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, State, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step$1 as Step, StepClosed, StoryLabelItem, StreamLight, StrokeIn, StrokeOut, Switch, Symbol$1 as Symbol, SymbolLabel, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TableSeriesNumber, Tag, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, Timeline, Title, Tooltip, TopZIndex, TransformUtil, Update, UpdateTag, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VTag, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WeatherBox, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, alignTextInLine, alternatingWave, angle, angleLabelOrientAttribute, angleTo, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dCanvasPickerContribution, bindArc3dRenderModule, bindArcCanvasPickerContribution, bindArcMathPickerContribution, bindArcRenderModule, bindAreaCanvasPickerContribution, bindAreaMathPickerContribution, bindAreaRenderModule, bindBrowserEnv, bindCircleCanvasPickerContribution, bindCircleMathPickerContribution, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindFeishuEnv, bindGifImageCanvasPickerContribution, bindGifImageRenderContribution, bindGlyphCanvasPickerContribution, bindGlyphMathPickerContribution, bindGlyphRenderModule, bindHarmonyEnv, bindImageCanvasPickerContribution, bindImageMathPickerContribution, bindImageRenderModule, bindLineCanvasPickerContribution, bindLineMathPickerContribution, bindLineRenderModule, bindLottieCanvasPickerContribution, bindLottieRenderContribution, bindLynxEnv, bindMathPicker, bindNodeEnv, bindPathCanvasPickerContribution, bindPathMathPickerContribution, bindPathRenderModule, bindPolygonCanvasPickerContribution, bindPolygonMathPickerContribution, bindPolygonRenderModule, bindPyramid3dCanvasPickerContribution, bindPyramid3dRenderModule, bindRect3dCanvasPickerContribution, bindRect3dRenderModule, bindRectCanvasPickerContribution, bindRectMathPickerContribution, bindRectRenderModule, bindRichTextMathPickerContribution, bindRichtextCanvasPickerContribution, bindRichtextRenderModule, bindStarRenderModule, bindSymbolCanvasPickerContribution, bindSymbolMathPickerContribution, bindSymbolRenderModule, bindTTEnv, bindTaroEnv, bindTextCanvasPickerContribution, bindTextMathPickerContribution, bindTextRenderModule, bindWxEnv, bootstrapLegacyVRenderRuntime, bootstrapVRenderBrowserApp, bootstrapVRenderNodeApp, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, cartesianTicks, centerToCorner, centroidOfSubpath, circleBounds, circleModule, clampRadian, clock, colorEqual, colorStringInterpolationToStr, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeOffsetForlimit, configureRuntimeApplicationForApp, container, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, cornerTangents, cornerToCenter, createBrowserApp$1 as createApp, createArc, createArc3d, createArea, createBrowserApp$1 as createBrowserApp, createBrowserVRenderApp, createCanvasEventTransformer, createCircle, createColor, createComponentAnimator, createConicalGradient, createContributionProvider$1 as createContributionProvider, createEventTransformer, createGifImage, createGlyph, createGraphic$1 as createGraphic, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createLottie, createMat4, createMiniappApp, createNodeApp$1 as createNodeApp, createNodeVRenderApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createTextGraphicByType, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, deltaXYToAngle, diagonalCenterToEdge, diagonalTopLeftToBottomRight, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, fuzzyEqualNumber, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getAxisBreakSymbolAttrs, getBackgroundImage, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getElMap, getExtraModelMatrix, getHorizontalPath, getLegacyBindingContext, getMarksByName, getModelMatrix, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getScaledStroke, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextBounds, getTextType, getTheme, getThemeFromGroup, getVerticalCoord, getVerticalPath, globalTheme, glyphModule, graphicCreator$1 as graphicCreator, graphicService, graphicUtil, hasOverlap, htmlAttributeTransform, identityMat4, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initTextMeasure, initWxEnv, installBrowserEnvToApp, installBrowserPickersToApp, installDefaultGraphicsToApp, installNodeEnvToApp, installNodePickersToApp, installPoptipToApp, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, installScrollbarToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isInRange, isNoRepeatSizingMode, isNodeEnv, isPostiveXAxis, isRichText, isSvg, isVisible, isXML, jsx, labelSmartInvert, layerService, length, limitShapeInBounds, lineModule, linearDiscreteTicks, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadMathPicker, loadNodeEnv, loadPoptip, loadScrollbar, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, measureTextSize, morphPath, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, normalize$1 as normalize, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, particleEffect, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polarAngleAxisDiscreteTicks, polarTicks, polygonModule, preLoadAllModule, pulseWave, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, randomOpacity, reactAttributeTransform, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerAnimate, registerArc, registerArc3d, registerArc3dGraphic, registerArcDataLabel, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerCustomAnimate, registerDirectionalLight, registerFlexLayoutPlugin, registerGifGraphic, registerGifImage, registerGlobalEventTransformer, registerGlyph, registerGlyphGraphic, registerGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineDataLabel, registerLineGraphic, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectDataLabel, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerStar, registerStarGraphic, registerSymbol, registerSymbolDataLabel, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapText, registerWrapTextGraphic, removeRepeatPoint, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding$1 as resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richTextAttributeTransform, richtextModule, rippleEffect, rotateX, rotateY, rotateZ, rotationScan, roughModule, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, runFill, runStroke, scale, scaleMat4, segments, setPoptipTheme, shouldClipImageByLayout, shouldUseMat4, smartInvertStrategy, snakeWave, snapLength, spiralEffect, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, tan2AngleToAngle, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textIntersect, textLayoutOffsetY, textModule, ticks, transformMat4, transformPointForCanvas, transformUtil, transitionRegistry, translate, traverseGroup, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };