@visactor/vrender 1.0.37-alpha.1 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10083,6 +10083,7 @@
10083
10083
  var _a;
10084
10084
  if (!states.length) return void this.clearStates(hasAnimation);
10085
10085
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
10086
+ this.stateSort && (states = states.sort(this.stateSort));
10086
10087
  const stateAttrs = {};
10087
10088
  states.forEach(stateName => {
10088
10089
  var _a;
@@ -12315,7 +12316,7 @@
12315
12316
  var _a;
12316
12317
  if (!states.length) return void this.clearStates(hasAnimation);
12317
12318
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
12318
- this.stopStateAnimates();
12319
+ this.stopStateAnimates(), this.stateSort && (states = states.sort(this.stateSort));
12319
12320
  const stateAttrs = {},
12320
12321
  subAttrs = this.subGraphic.map(() => ({}));
12321
12322
  states.forEach(stateName => {
@@ -24728,7 +24729,7 @@
24728
24729
  return !!this._inuse;
24729
24730
  }
24730
24731
  set inuse(use) {
24731
- use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
24732
+ use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : (this.nativeContext.restore(), this._font = ""));
24732
24733
  }
24733
24734
  constructor(canvas, dpr) {
24734
24735
  this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), {
@@ -29922,6 +29923,343 @@
29922
29923
  loadGifImageModule || (loadGifImageModule = !0, bind(DefaultCanvasGifImageRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasGifImageRender));
29923
29924
  });
29924
29925
 
29926
+ const browser = isBrowserEnv();
29927
+
29928
+ function _registerArc() {
29929
+ _registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
29930
+ }
29931
+ _registerArc.__loaded = !1;
29932
+ const registerArc = _registerArc;
29933
+
29934
+ function _registerArc3d() {
29935
+ _registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
29936
+ }
29937
+ _registerArc3d.__loaded = !1;
29938
+ const registerArc3d = _registerArc3d;
29939
+
29940
+ function _registerArea() {
29941
+ _registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
29942
+ }
29943
+ _registerArea.__loaded = !1;
29944
+ const registerArea = _registerArea;
29945
+
29946
+ function _registerCircle() {
29947
+ _registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
29948
+ }
29949
+ _registerCircle.__loaded = !1;
29950
+ const registerCircle = _registerCircle;
29951
+
29952
+ function _registerGlyph() {
29953
+ _registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
29954
+ }
29955
+ _registerGlyph.__loaded = !1;
29956
+ const registerGlyph = _registerGlyph;
29957
+
29958
+ function _registerGroup() {
29959
+ _registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
29960
+ }
29961
+ _registerGroup.__loaded = !1;
29962
+ const registerGroup = _registerGroup;
29963
+
29964
+ function _registerImage() {
29965
+ _registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
29966
+ }
29967
+ _registerImage.__loaded = !1;
29968
+ const registerImage = _registerImage;
29969
+
29970
+ function _registerLine() {
29971
+ _registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
29972
+ }
29973
+ _registerLine.__loaded = !1;
29974
+ const registerLine = _registerLine;
29975
+
29976
+ function _registerPath() {
29977
+ _registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
29978
+ }
29979
+ _registerPath.__loaded = !1;
29980
+ const registerPath = _registerPath;
29981
+
29982
+ function _registerPolygon() {
29983
+ _registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
29984
+ }
29985
+ _registerPolygon.__loaded = !1;
29986
+ const registerPolygon = _registerPolygon;
29987
+
29988
+ function _registerPyramid3d() {
29989
+ _registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
29990
+ }
29991
+ _registerPyramid3d.__loaded = !1;
29992
+ const registerPyramid3d = _registerPyramid3d;
29993
+
29994
+ function _registerRect() {
29995
+ _registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
29996
+ }
29997
+ _registerRect.__loaded = !1;
29998
+ const registerRect = _registerRect;
29999
+
30000
+ function _registerRect3d() {
30001
+ _registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
30002
+ }
30003
+ _registerRect3d.__loaded = !1;
30004
+ const registerRect3d = _registerRect3d;
30005
+
30006
+ function _registerRichtext() {
30007
+ _registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
30008
+ }
30009
+ _registerRichtext.__loaded = !1;
30010
+ const registerRichtext = _registerRichtext;
30011
+
30012
+ function _registerShadowRoot() {
30013
+ _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
30014
+ }
30015
+ _registerShadowRoot.__loaded = !1;
30016
+ const registerShadowRoot = _registerShadowRoot;
30017
+
30018
+ function _registerSymbol() {
30019
+ _registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
30020
+ }
30021
+ _registerSymbol.__loaded = !1;
30022
+ const registerSymbol = _registerSymbol;
30023
+
30024
+ function _registerText() {
30025
+ _registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
30026
+ }
30027
+ _registerText.__loaded = !1;
30028
+ const registerText = _registerText;
30029
+
30030
+ var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30031
+ var d,
30032
+ c = arguments.length,
30033
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
30034
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
30035
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
30036
+ },
30037
+ __metadata$1 = undefined && undefined.__metadata || function (k, v) {
30038
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
30039
+ },
30040
+ __param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
30041
+ return function (target, key) {
30042
+ decorator(target, key, paramIndex);
30043
+ };
30044
+ };
30045
+ let DefaultCanvasStarPicker = class extends PickerBase {
30046
+ constructor(canvasRenderer) {
30047
+ super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
30048
+ }
30049
+ };
30050
+ DefaultCanvasStarPicker = __decorate$5([injectable(), __param$1(0, inject(StarRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasStarPicker);
30051
+
30052
+ let loadStarPick = !1;
30053
+ const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
30054
+ loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
30055
+ });
30056
+
30057
+ function _registerStar() {
30058
+ _registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
30059
+ }
30060
+ _registerStar.__loaded = !1;
30061
+ const registerStar = _registerStar;
30062
+
30063
+ function _registerWrapText() {
30064
+ _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
30065
+ }
30066
+ _registerWrapText.__loaded = !1;
30067
+ const registerWrapText = _registerWrapText;
30068
+
30069
+ function registerGifGraphic() {
30070
+ graphicCreator.RegisterGraphicCreator("gif", createGifImage);
30071
+ }
30072
+ function _registerGifImage() {
30073
+ _registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
30074
+ }
30075
+ _registerGifImage.__loaded = !1;
30076
+ const registerGifImage = _registerGifImage;
30077
+
30078
+ function pseudoRandom(n) {
30079
+ let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
30080
+ let hash = 3735928559 ^ seed;
30081
+ return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
30082
+ }
30083
+ function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30084
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30085
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30086
+ const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
30087
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
30088
+ return Math.min(1, Math.max(0, _r));
30089
+ }
30090
+ function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30091
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30092
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30093
+ const delay = column / columnCount,
30094
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30095
+ return Math.min(1, Math.max(0, _r));
30096
+ }
30097
+ function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30098
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30099
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30100
+ const delay = (columnCount - 1 - column) / columnCount,
30101
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30102
+ return Math.min(1, Math.max(0, _r));
30103
+ }
30104
+ function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30105
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30106
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30107
+ const delay = row / rowCount,
30108
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30109
+ return Math.min(1, Math.max(0, _r));
30110
+ }
30111
+ function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30112
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30113
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30114
+ const delay = (rowCount - 1 - row) / rowCount,
30115
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30116
+ return Math.min(1, Math.max(0, _r));
30117
+ }
30118
+ function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30119
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30120
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30121
+ const centerRow = rowCount / 2,
30122
+ centerCol = columnCount / 2,
30123
+ distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
30124
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30125
+ return Math.min(1, Math.max(0, _r));
30126
+ }
30127
+ function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30128
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30129
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30130
+ const delay = (row / rowCount + column / columnCount) / 2,
30131
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30132
+ return Math.min(1, Math.max(0, _r));
30133
+ }
30134
+ function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30135
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30136
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30137
+ const centerRow = rowCount / 2,
30138
+ centerCol = columnCount / 2,
30139
+ angle = Math.atan2(row - centerRow, column - centerCol),
30140
+ delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
30141
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30142
+ return Math.min(1, Math.max(0, _r));
30143
+ }
30144
+ function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30145
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30146
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30147
+ const centerRow = rowCount / 2,
30148
+ centerCol = columnCount / 2,
30149
+ normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
30150
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
30151
+ return Math.min(1, Math.max(0, _r));
30152
+ }
30153
+ function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30154
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30155
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30156
+ const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
30157
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30158
+ return Math.min(1, Math.max(0, _r));
30159
+ }
30160
+ function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30161
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30162
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30163
+ const rowPhase = row / rowCount,
30164
+ colPhase = column / columnCount,
30165
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
30166
+ return Math.min(1, Math.max(0, _r));
30167
+ }
30168
+ function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30169
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30170
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30171
+ const centerRow = rowCount / 2,
30172
+ centerCol = columnCount / 2,
30173
+ distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
30174
+ angle = Math.atan2(row - centerRow, column - centerCol),
30175
+ delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
30176
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30177
+ return Math.min(1, Math.max(0, _r));
30178
+ }
30179
+ function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30180
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30181
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30182
+ const centerCol = columnCount / 2,
30183
+ distance = Math.abs(column - centerCol) / centerCol,
30184
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30185
+ return Math.min(1, Math.max(0, _r));
30186
+ }
30187
+ function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30188
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30189
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30190
+ const centerCol = columnCount / 2,
30191
+ distance = 1 - Math.abs(column - centerCol) / centerCol,
30192
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30193
+ return Math.min(1, Math.max(0, _r));
30194
+ }
30195
+ function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30196
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30197
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30198
+ const centerRow = rowCount / 2,
30199
+ distance = Math.abs(row - centerRow) / centerRow,
30200
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30201
+ return Math.min(1, Math.max(0, _r));
30202
+ }
30203
+ function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30204
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30205
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30206
+ const centerRow = rowCount / 2,
30207
+ distance = 1 - Math.abs(row - centerRow) / centerRow,
30208
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30209
+ return Math.min(1, Math.max(0, _r));
30210
+ }
30211
+ function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30212
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30213
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30214
+ const centerRow = rowCount / 2,
30215
+ centerCol = columnCount / 2,
30216
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30217
+ normalizedDistance = Math.min(distance, 1),
30218
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
30219
+ return Math.min(1, Math.max(0, _r));
30220
+ }
30221
+ function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30222
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30223
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30224
+ const centerRow = rowCount / 2,
30225
+ centerCol = columnCount / 2,
30226
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30227
+ normalizedDistance = 1 - Math.min(distance, 1),
30228
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
30229
+ return Math.min(1, Math.max(0, _r));
30230
+ }
30231
+ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30232
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30233
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30234
+ const centerRow = rowCount / 2,
30235
+ centerCol = columnCount / 2,
30236
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30237
+ normalizedDistance = Math.min(distance, 1),
30238
+ wavePhase = 2 * ratio * Math.PI * 3,
30239
+ decay = Math.max(0, 1 - normalizedDistance),
30240
+ _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
30241
+ return Math.min(1, Math.max(0, _r));
30242
+ }
30243
+ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30244
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30245
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30246
+ const index = row * columnCount + column,
30247
+ phase = 2 * pseudoRandom(index, 0) * Math.PI,
30248
+ speed = .5 * pseudoRandom(index, 1) + .5,
30249
+ direction = 2 * pseudoRandom(index, 2) * Math.PI,
30250
+ centerRow = rowCount / 2,
30251
+ centerCol = columnCount / 2,
30252
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30253
+ normalizedDistance = Math.min(distance, 1),
30254
+ scatterRatio = (ratio - .4) / .6,
30255
+ movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
30256
+ distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
30257
+ _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
30258
+ return Math.min(1, Math.max(0, _r));
30259
+ }
30260
+
30261
+ const roughModule = _roughModule;
30262
+
29925
30263
  var lottie = {exports: {}};
29926
30264
 
29927
30265
  (function(module,exports){typeof navigator!=="undefined"&&function(global,factory){module.exports=factory();}(commonjsGlobal,function(){var svgNS='http://www.w3.org/2000/svg';var locationHref='';var _useWebWorker=false;var initialDefaultFrame=-999999;var setWebWorker=function setWebWorker(flag){_useWebWorker=!!flag;};var getWebWorker=function getWebWorker(){return _useWebWorker;};var setLocationHref=function setLocationHref(value){locationHref=value;};var getLocationHref=function getLocationHref(){return locationHref;};function createTag(type){// return {appendChild:function(){},setAttribute:function(){},style:{}}
@@ -30645,17 +30983,17 @@
30645
30983
  return new Lottie(attributes);
30646
30984
  }
30647
30985
 
30648
- var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30986
+ var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30649
30987
  var d,
30650
30988
  c = arguments.length,
30651
30989
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
30652
30990
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
30653
30991
  return c > 3 && r && Object.defineProperty(target, key, r), r;
30654
30992
  },
30655
- __metadata$1 = undefined && undefined.__metadata || function (k, v) {
30993
+ __metadata = undefined && undefined.__metadata || function (k, v) {
30656
30994
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
30657
30995
  },
30658
- __param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
30996
+ __param = undefined && undefined.__param || function (paramIndex, decorator) {
30659
30997
  return function (target, key) {
30660
30998
  decorator(target, key, paramIndex);
30661
30999
  };
@@ -30665,14 +31003,14 @@
30665
31003
  super(), this.canvasRenderer = canvasRenderer;
30666
31004
  }
30667
31005
  };
30668
- DefaultCanvasLottiePicker = __decorate$5([injectable(), __param$1(0, inject(RectRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
31006
+ DefaultCanvasLottiePicker = __decorate$4([injectable(), __param(0, inject(RectRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
30669
31007
 
30670
31008
  let loadLottiePick = !1;
30671
31009
  const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
30672
31010
  loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
30673
31011
  });
30674
31012
 
30675
- var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
31013
+ var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30676
31014
  var d,
30677
31015
  c = arguments.length,
30678
31016
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -30704,350 +31042,13 @@
30704
31042
  context.fill();
30705
31043
  }
30706
31044
  };
30707
- DefaultCanvasLottieRender = __decorate$4([injectable()], DefaultCanvasLottieRender);
31045
+ DefaultCanvasLottieRender = __decorate$3([injectable()], DefaultCanvasLottieRender);
30708
31046
 
30709
31047
  let loadLottieModule = !1;
30710
31048
  const lottieModule = new ContainerModule(bind => {
30711
31049
  loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
30712
31050
  });
30713
31051
 
30714
- const browser = isBrowserEnv();
30715
-
30716
- function _registerArc() {
30717
- _registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
30718
- }
30719
- _registerArc.__loaded = !1;
30720
- const registerArc = _registerArc;
30721
-
30722
- function _registerArc3d() {
30723
- _registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
30724
- }
30725
- _registerArc3d.__loaded = !1;
30726
- const registerArc3d = _registerArc3d;
30727
-
30728
- function _registerArea() {
30729
- _registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
30730
- }
30731
- _registerArea.__loaded = !1;
30732
- const registerArea = _registerArea;
30733
-
30734
- function _registerCircle() {
30735
- _registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
30736
- }
30737
- _registerCircle.__loaded = !1;
30738
- const registerCircle = _registerCircle;
30739
-
30740
- function _registerGlyph() {
30741
- _registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
30742
- }
30743
- _registerGlyph.__loaded = !1;
30744
- const registerGlyph = _registerGlyph;
30745
-
30746
- function _registerGroup() {
30747
- _registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
30748
- }
30749
- _registerGroup.__loaded = !1;
30750
- const registerGroup = _registerGroup;
30751
-
30752
- function _registerImage() {
30753
- _registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
30754
- }
30755
- _registerImage.__loaded = !1;
30756
- const registerImage = _registerImage;
30757
-
30758
- function _registerLine() {
30759
- _registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
30760
- }
30761
- _registerLine.__loaded = !1;
30762
- const registerLine = _registerLine;
30763
-
30764
- function _registerPath() {
30765
- _registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
30766
- }
30767
- _registerPath.__loaded = !1;
30768
- const registerPath = _registerPath;
30769
-
30770
- function _registerPolygon() {
30771
- _registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
30772
- }
30773
- _registerPolygon.__loaded = !1;
30774
- const registerPolygon = _registerPolygon;
30775
-
30776
- function _registerPyramid3d() {
30777
- _registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
30778
- }
30779
- _registerPyramid3d.__loaded = !1;
30780
- const registerPyramid3d = _registerPyramid3d;
30781
-
30782
- function _registerRect() {
30783
- _registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
30784
- }
30785
- _registerRect.__loaded = !1;
30786
- const registerRect = _registerRect;
30787
-
30788
- function _registerRect3d() {
30789
- _registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
30790
- }
30791
- _registerRect3d.__loaded = !1;
30792
- const registerRect3d = _registerRect3d;
30793
-
30794
- function _registerRichtext() {
30795
- _registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
30796
- }
30797
- _registerRichtext.__loaded = !1;
30798
- const registerRichtext = _registerRichtext;
30799
-
30800
- function _registerShadowRoot() {
30801
- _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
30802
- }
30803
- _registerShadowRoot.__loaded = !1;
30804
- const registerShadowRoot = _registerShadowRoot;
30805
-
30806
- function _registerSymbol() {
30807
- _registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
30808
- }
30809
- _registerSymbol.__loaded = !1;
30810
- const registerSymbol = _registerSymbol;
30811
-
30812
- function _registerText() {
30813
- _registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
30814
- }
30815
- _registerText.__loaded = !1;
30816
- const registerText = _registerText;
30817
-
30818
- var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30819
- var d,
30820
- c = arguments.length,
30821
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
30822
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
30823
- return c > 3 && r && Object.defineProperty(target, key, r), r;
30824
- },
30825
- __metadata = undefined && undefined.__metadata || function (k, v) {
30826
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
30827
- },
30828
- __param = undefined && undefined.__param || function (paramIndex, decorator) {
30829
- return function (target, key) {
30830
- decorator(target, key, paramIndex);
30831
- };
30832
- };
30833
- let DefaultCanvasStarPicker = class extends PickerBase {
30834
- constructor(canvasRenderer) {
30835
- super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
30836
- }
30837
- };
30838
- DefaultCanvasStarPicker = __decorate$3([injectable(), __param(0, inject(StarRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasStarPicker);
30839
-
30840
- let loadStarPick = !1;
30841
- const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
30842
- loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
30843
- });
30844
-
30845
- function _registerStar() {
30846
- _registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
30847
- }
30848
- _registerStar.__loaded = !1;
30849
- const registerStar = _registerStar;
30850
-
30851
- function _registerWrapText() {
30852
- _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
30853
- }
30854
- _registerWrapText.__loaded = !1;
30855
- const registerWrapText = _registerWrapText;
30856
-
30857
- function registerGifGraphic() {
30858
- graphicCreator.RegisterGraphicCreator("gif", createGifImage);
30859
- }
30860
- function _registerGifImage() {
30861
- _registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
30862
- }
30863
- _registerGifImage.__loaded = !1;
30864
- const registerGifImage = _registerGifImage;
30865
-
30866
- function pseudoRandom(n) {
30867
- let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
30868
- let hash = 3735928559 ^ seed;
30869
- return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
30870
- }
30871
- function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30872
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30873
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30874
- const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
30875
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
30876
- return Math.min(1, Math.max(0, _r));
30877
- }
30878
- function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30879
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30880
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30881
- const delay = column / columnCount,
30882
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30883
- return Math.min(1, Math.max(0, _r));
30884
- }
30885
- function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30886
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30887
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30888
- const delay = (columnCount - 1 - column) / columnCount,
30889
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30890
- return Math.min(1, Math.max(0, _r));
30891
- }
30892
- function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30893
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30894
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30895
- const delay = row / rowCount,
30896
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30897
- return Math.min(1, Math.max(0, _r));
30898
- }
30899
- function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30900
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30901
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30902
- const delay = (rowCount - 1 - row) / rowCount,
30903
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30904
- return Math.min(1, Math.max(0, _r));
30905
- }
30906
- function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30907
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30908
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30909
- const centerRow = rowCount / 2,
30910
- centerCol = columnCount / 2,
30911
- distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
30912
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30913
- return Math.min(1, Math.max(0, _r));
30914
- }
30915
- function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30916
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30917
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30918
- const delay = (row / rowCount + column / columnCount) / 2,
30919
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30920
- return Math.min(1, Math.max(0, _r));
30921
- }
30922
- function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30923
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30924
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30925
- const centerRow = rowCount / 2,
30926
- centerCol = columnCount / 2,
30927
- angle = Math.atan2(row - centerRow, column - centerCol),
30928
- delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
30929
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30930
- return Math.min(1, Math.max(0, _r));
30931
- }
30932
- function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30933
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30934
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30935
- const centerRow = rowCount / 2,
30936
- centerCol = columnCount / 2,
30937
- normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
30938
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
30939
- return Math.min(1, Math.max(0, _r));
30940
- }
30941
- function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30942
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30943
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30944
- const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
30945
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30946
- return Math.min(1, Math.max(0, _r));
30947
- }
30948
- function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30949
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30950
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30951
- const rowPhase = row / rowCount,
30952
- colPhase = column / columnCount,
30953
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
30954
- return Math.min(1, Math.max(0, _r));
30955
- }
30956
- function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30957
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30958
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30959
- const centerRow = rowCount / 2,
30960
- centerCol = columnCount / 2,
30961
- distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
30962
- angle = Math.atan2(row - centerRow, column - centerCol),
30963
- delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
30964
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30965
- return Math.min(1, Math.max(0, _r));
30966
- }
30967
- function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30968
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30969
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30970
- const centerCol = columnCount / 2,
30971
- distance = Math.abs(column - centerCol) / centerCol,
30972
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30973
- return Math.min(1, Math.max(0, _r));
30974
- }
30975
- function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30976
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30977
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30978
- const centerCol = columnCount / 2,
30979
- distance = 1 - Math.abs(column - centerCol) / centerCol,
30980
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30981
- return Math.min(1, Math.max(0, _r));
30982
- }
30983
- function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30984
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30985
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30986
- const centerRow = rowCount / 2,
30987
- distance = Math.abs(row - centerRow) / centerRow,
30988
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30989
- return Math.min(1, Math.max(0, _r));
30990
- }
30991
- function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30992
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30993
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30994
- const centerRow = rowCount / 2,
30995
- distance = 1 - Math.abs(row - centerRow) / centerRow,
30996
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30997
- return Math.min(1, Math.max(0, _r));
30998
- }
30999
- function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31000
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31001
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31002
- const centerRow = rowCount / 2,
31003
- centerCol = columnCount / 2,
31004
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31005
- normalizedDistance = Math.min(distance, 1),
31006
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
31007
- return Math.min(1, Math.max(0, _r));
31008
- }
31009
- function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31010
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31011
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31012
- const centerRow = rowCount / 2,
31013
- centerCol = columnCount / 2,
31014
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31015
- normalizedDistance = 1 - Math.min(distance, 1),
31016
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
31017
- return Math.min(1, Math.max(0, _r));
31018
- }
31019
- function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31020
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31021
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31022
- const centerRow = rowCount / 2,
31023
- centerCol = columnCount / 2,
31024
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31025
- normalizedDistance = Math.min(distance, 1),
31026
- wavePhase = 2 * ratio * Math.PI * 3,
31027
- decay = Math.max(0, 1 - normalizedDistance),
31028
- _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
31029
- return Math.min(1, Math.max(0, _r));
31030
- }
31031
- function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31032
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31033
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31034
- const index = row * columnCount + column,
31035
- phase = 2 * pseudoRandom(index, 0) * Math.PI,
31036
- speed = .5 * pseudoRandom(index, 1) + .5,
31037
- direction = 2 * pseudoRandom(index, 2) * Math.PI,
31038
- centerRow = rowCount / 2,
31039
- centerCol = columnCount / 2,
31040
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31041
- normalizedDistance = Math.min(distance, 1),
31042
- scatterRatio = (ratio - .4) / .6,
31043
- movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
31044
- distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
31045
- _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
31046
- return Math.min(1, Math.max(0, _r));
31047
- }
31048
-
31049
- const roughModule = _roughModule;
31050
-
31051
31052
  class Easing {
31052
31053
  constructor() {}
31053
31054
  static linear(t) {
@@ -31993,8 +31994,8 @@
31993
31994
  }
31994
31995
  parseParams(params, isTimeline, child) {
31995
31996
  var _a, _b;
31996
- const totalTime = this.resolveValue(params.totalTime, void 0, void 0),
31997
- startTime = this.resolveValue(params.startTime, void 0, 0),
31997
+ const totalTime = this.resolveValue(params.totalTime, child, void 0),
31998
+ startTime = this.resolveValue(params.startTime, child, 0),
31998
31999
  parsedParams = Object.assign({}, params);
31999
32000
  parsedParams.oneByOneDelay = 0, parsedParams.startTime = startTime, parsedParams.totalTime = totalTime;
32000
32001
  const oneByOne = this.resolveValue(params.oneByOne, child, !1);
@@ -32043,11 +32044,10 @@
32043
32044
  let oneByOneDelay = 0;
32044
32045
  oneByOne && (oneByOneDelay = "number" == typeof oneByOne ? oneByOne : oneByOne ? delay + delayAfter + duration : 0), parsedParams.oneByOneDelay = oneByOneDelay, parsedParams.custom = null !== (_a = params.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = params.type) && void 0 !== _b ? _b : "fromTo"];
32045
32046
  const customType = getCustomType(parsedParams.custom);
32046
- if (parsedParams.customType = customType, totalTime) {
32047
- const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
32048
- scale = totalTime ? totalTime / _totalTime : 1;
32049
- parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
32050
- }
32047
+ parsedParams.customType = customType;
32048
+ const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
32049
+ scale = isValidNumber$1(totalTime) ? totalTime / _totalTime : 1;
32050
+ parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
32051
32051
  }
32052
32052
  return parsedParams;
32053
32053
  }
@@ -32500,7 +32500,7 @@
32500
32500
  }
32501
32501
  class AStageAnimate extends ACustomAnimate {
32502
32502
  constructor(customFrom, customTo, duration, easing, params) {
32503
- super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this._beforeStageRender = () => {
32503
+ super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this.checkStatusAfterRender = !0, this._beforeStageRender = () => {
32504
32504
  if (!this.willCallBeforeStageRender) return;
32505
32505
  this.willCallBeforeStageRender = !1;
32506
32506
  const stage = this.target.stage,
@@ -32513,7 +32513,7 @@
32513
32513
  const stage = this.target.stage,
32514
32514
  canvas = stage.window.getContext().canvas.nativeCanvas,
32515
32515
  outputCanvas = this.afterStageRender(stage, canvas);
32516
- outputCanvas && this.renderToStage(stage, outputCanvas);
32516
+ outputCanvas && this.renderToStage(stage, outputCanvas), this.checkStatusAfterRender && this.animate.status === exports.AnimateStatus.END && this.animate.timeline.removeAnimate(this.animate);
32517
32517
  }, this.props = {};
32518
32518
  }
32519
32519
  beforeStageRender(stage, canvas) {
@@ -53034,7 +53034,7 @@
53034
53034
  select: !0
53035
53035
  };
53036
53036
 
53037
- const version = "1.0.37-alpha.1";
53037
+ const version = "1.0.38";
53038
53038
  preLoadAllModule();
53039
53039
  if (isBrowserEnv()) {
53040
53040
  loadBrowserEnv(container);