@visactor/vrender 1.0.37 → 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.es.js CHANGED
@@ -24723,7 +24723,7 @@ let BrowserContext2d = class {
24723
24723
  return !!this._inuse;
24724
24724
  }
24725
24725
  set inuse(use) {
24726
- use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
24726
+ use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : (this.nativeContext.restore(), this._font = ""));
24727
24727
  }
24728
24728
  constructor(canvas, dpr) {
24729
24729
  this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), {
@@ -29917,6 +29917,343 @@ const gifImageModule = new ContainerModule(bind => {
29917
29917
  loadGifImageModule || (loadGifImageModule = !0, bind(DefaultCanvasGifImageRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasGifImageRender));
29918
29918
  });
29919
29919
 
29920
+ const browser = isBrowserEnv();
29921
+
29922
+ function _registerArc() {
29923
+ _registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
29924
+ }
29925
+ _registerArc.__loaded = !1;
29926
+ const registerArc = _registerArc;
29927
+
29928
+ function _registerArc3d() {
29929
+ _registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
29930
+ }
29931
+ _registerArc3d.__loaded = !1;
29932
+ const registerArc3d = _registerArc3d;
29933
+
29934
+ function _registerArea() {
29935
+ _registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
29936
+ }
29937
+ _registerArea.__loaded = !1;
29938
+ const registerArea = _registerArea;
29939
+
29940
+ function _registerCircle() {
29941
+ _registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
29942
+ }
29943
+ _registerCircle.__loaded = !1;
29944
+ const registerCircle = _registerCircle;
29945
+
29946
+ function _registerGlyph() {
29947
+ _registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
29948
+ }
29949
+ _registerGlyph.__loaded = !1;
29950
+ const registerGlyph = _registerGlyph;
29951
+
29952
+ function _registerGroup() {
29953
+ _registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
29954
+ }
29955
+ _registerGroup.__loaded = !1;
29956
+ const registerGroup = _registerGroup;
29957
+
29958
+ function _registerImage() {
29959
+ _registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
29960
+ }
29961
+ _registerImage.__loaded = !1;
29962
+ const registerImage = _registerImage;
29963
+
29964
+ function _registerLine() {
29965
+ _registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
29966
+ }
29967
+ _registerLine.__loaded = !1;
29968
+ const registerLine = _registerLine;
29969
+
29970
+ function _registerPath() {
29971
+ _registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
29972
+ }
29973
+ _registerPath.__loaded = !1;
29974
+ const registerPath = _registerPath;
29975
+
29976
+ function _registerPolygon() {
29977
+ _registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
29978
+ }
29979
+ _registerPolygon.__loaded = !1;
29980
+ const registerPolygon = _registerPolygon;
29981
+
29982
+ function _registerPyramid3d() {
29983
+ _registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
29984
+ }
29985
+ _registerPyramid3d.__loaded = !1;
29986
+ const registerPyramid3d = _registerPyramid3d;
29987
+
29988
+ function _registerRect() {
29989
+ _registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
29990
+ }
29991
+ _registerRect.__loaded = !1;
29992
+ const registerRect = _registerRect;
29993
+
29994
+ function _registerRect3d() {
29995
+ _registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
29996
+ }
29997
+ _registerRect3d.__loaded = !1;
29998
+ const registerRect3d = _registerRect3d;
29999
+
30000
+ function _registerRichtext() {
30001
+ _registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
30002
+ }
30003
+ _registerRichtext.__loaded = !1;
30004
+ const registerRichtext = _registerRichtext;
30005
+
30006
+ function _registerShadowRoot() {
30007
+ _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
30008
+ }
30009
+ _registerShadowRoot.__loaded = !1;
30010
+ const registerShadowRoot = _registerShadowRoot;
30011
+
30012
+ function _registerSymbol() {
30013
+ _registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
30014
+ }
30015
+ _registerSymbol.__loaded = !1;
30016
+ const registerSymbol = _registerSymbol;
30017
+
30018
+ function _registerText() {
30019
+ _registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
30020
+ }
30021
+ _registerText.__loaded = !1;
30022
+ const registerText = _registerText;
30023
+
30024
+ var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30025
+ var d,
30026
+ c = arguments.length,
30027
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
30028
+ 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);
30029
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
30030
+ },
30031
+ __metadata$1 = undefined && undefined.__metadata || function (k, v) {
30032
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
30033
+ },
30034
+ __param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
30035
+ return function (target, key) {
30036
+ decorator(target, key, paramIndex);
30037
+ };
30038
+ };
30039
+ let DefaultCanvasStarPicker = class extends PickerBase {
30040
+ constructor(canvasRenderer) {
30041
+ super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
30042
+ }
30043
+ };
30044
+ DefaultCanvasStarPicker = __decorate$5([injectable(), __param$1(0, inject(StarRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasStarPicker);
30045
+
30046
+ let loadStarPick = !1;
30047
+ const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
30048
+ loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
30049
+ });
30050
+
30051
+ function _registerStar() {
30052
+ _registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
30053
+ }
30054
+ _registerStar.__loaded = !1;
30055
+ const registerStar = _registerStar;
30056
+
30057
+ function _registerWrapText() {
30058
+ _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
30059
+ }
30060
+ _registerWrapText.__loaded = !1;
30061
+ const registerWrapText = _registerWrapText;
30062
+
30063
+ function registerGifGraphic() {
30064
+ graphicCreator.RegisterGraphicCreator("gif", createGifImage);
30065
+ }
30066
+ function _registerGifImage() {
30067
+ _registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
30068
+ }
30069
+ _registerGifImage.__loaded = !1;
30070
+ const registerGifImage = _registerGifImage;
30071
+
30072
+ function pseudoRandom(n) {
30073
+ let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
30074
+ let hash = 3735928559 ^ seed;
30075
+ 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;
30076
+ }
30077
+ function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30078
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30079
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30080
+ const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
30081
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
30082
+ return Math.min(1, Math.max(0, _r));
30083
+ }
30084
+ function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30085
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30086
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30087
+ const delay = column / columnCount,
30088
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30089
+ return Math.min(1, Math.max(0, _r));
30090
+ }
30091
+ function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30092
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30093
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30094
+ const delay = (columnCount - 1 - column) / columnCount,
30095
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30096
+ return Math.min(1, Math.max(0, _r));
30097
+ }
30098
+ function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30099
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30100
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30101
+ const delay = row / rowCount,
30102
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30103
+ return Math.min(1, Math.max(0, _r));
30104
+ }
30105
+ function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30106
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30107
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30108
+ const delay = (rowCount - 1 - row) / rowCount,
30109
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30110
+ return Math.min(1, Math.max(0, _r));
30111
+ }
30112
+ function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30113
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30114
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30115
+ const centerRow = rowCount / 2,
30116
+ centerCol = columnCount / 2,
30117
+ distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
30118
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30119
+ return Math.min(1, Math.max(0, _r));
30120
+ }
30121
+ function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30122
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30123
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30124
+ const delay = (row / rowCount + column / columnCount) / 2,
30125
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30126
+ return Math.min(1, Math.max(0, _r));
30127
+ }
30128
+ function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30129
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30130
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30131
+ const centerRow = rowCount / 2,
30132
+ centerCol = columnCount / 2,
30133
+ angle = Math.atan2(row - centerRow, column - centerCol),
30134
+ delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
30135
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30136
+ return Math.min(1, Math.max(0, _r));
30137
+ }
30138
+ function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30139
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30140
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30141
+ const centerRow = rowCount / 2,
30142
+ centerCol = columnCount / 2,
30143
+ 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)),
30144
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
30145
+ return Math.min(1, Math.max(0, _r));
30146
+ }
30147
+ function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30148
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30149
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30150
+ const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
30151
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30152
+ return Math.min(1, Math.max(0, _r));
30153
+ }
30154
+ function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30155
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30156
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30157
+ const rowPhase = row / rowCount,
30158
+ colPhase = column / columnCount,
30159
+ _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;
30160
+ return Math.min(1, Math.max(0, _r));
30161
+ }
30162
+ function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30163
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30164
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30165
+ const centerRow = rowCount / 2,
30166
+ centerCol = columnCount / 2,
30167
+ distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
30168
+ angle = Math.atan2(row - centerRow, column - centerCol),
30169
+ delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
30170
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30171
+ return Math.min(1, Math.max(0, _r));
30172
+ }
30173
+ function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30174
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30175
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30176
+ const centerCol = columnCount / 2,
30177
+ distance = Math.abs(column - centerCol) / centerCol,
30178
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30179
+ return Math.min(1, Math.max(0, _r));
30180
+ }
30181
+ function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30182
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30183
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30184
+ const centerCol = columnCount / 2,
30185
+ distance = 1 - Math.abs(column - centerCol) / centerCol,
30186
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30187
+ return Math.min(1, Math.max(0, _r));
30188
+ }
30189
+ function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30190
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30191
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30192
+ const centerRow = rowCount / 2,
30193
+ distance = Math.abs(row - centerRow) / centerRow,
30194
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30195
+ return Math.min(1, Math.max(0, _r));
30196
+ }
30197
+ function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30198
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30199
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30200
+ const centerRow = rowCount / 2,
30201
+ distance = 1 - Math.abs(row - centerRow) / centerRow,
30202
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30203
+ return Math.min(1, Math.max(0, _r));
30204
+ }
30205
+ function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30206
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30207
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30208
+ const centerRow = rowCount / 2,
30209
+ centerCol = columnCount / 2,
30210
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30211
+ normalizedDistance = Math.min(distance, 1),
30212
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
30213
+ return Math.min(1, Math.max(0, _r));
30214
+ }
30215
+ function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30216
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30217
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30218
+ const centerRow = rowCount / 2,
30219
+ centerCol = columnCount / 2,
30220
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30221
+ normalizedDistance = 1 - Math.min(distance, 1),
30222
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
30223
+ return Math.min(1, Math.max(0, _r));
30224
+ }
30225
+ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30226
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30227
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30228
+ const centerRow = rowCount / 2,
30229
+ centerCol = columnCount / 2,
30230
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30231
+ normalizedDistance = Math.min(distance, 1),
30232
+ wavePhase = 2 * ratio * Math.PI * 3,
30233
+ decay = Math.max(0, 1 - normalizedDistance),
30234
+ _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
30235
+ return Math.min(1, Math.max(0, _r));
30236
+ }
30237
+ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30238
+ let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30239
+ let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30240
+ const index = row * columnCount + column,
30241
+ phase = 2 * pseudoRandom(index, 0) * Math.PI,
30242
+ speed = .5 * pseudoRandom(index, 1) + .5,
30243
+ direction = 2 * pseudoRandom(index, 2) * Math.PI,
30244
+ centerRow = rowCount / 2,
30245
+ centerCol = columnCount / 2,
30246
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30247
+ normalizedDistance = Math.min(distance, 1),
30248
+ scatterRatio = (ratio - .4) / .6,
30249
+ movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
30250
+ distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
30251
+ _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
30252
+ return Math.min(1, Math.max(0, _r));
30253
+ }
30254
+
30255
+ const roughModule = _roughModule;
30256
+
29920
30257
  var lottie = {exports: {}};
29921
30258
 
29922
30259
  (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:{}}
@@ -30638,179 +30975,9 @@ class Lottie extends Rect {
30638
30975
  Lottie.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
30639
30976
  function createLottie(attributes) {
30640
30977
  return new Lottie(attributes);
30641
- }
30642
-
30643
- var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30644
- var d,
30645
- c = arguments.length,
30646
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
30647
- 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);
30648
- return c > 3 && r && Object.defineProperty(target, key, r), r;
30649
- },
30650
- __metadata$1 = undefined && undefined.__metadata || function (k, v) {
30651
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
30652
- },
30653
- __param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
30654
- return function (target, key) {
30655
- decorator(target, key, paramIndex);
30656
- };
30657
- };
30658
- let DefaultCanvasLottiePicker = class extends RectPickerBase {
30659
- constructor(canvasRenderer) {
30660
- super(), this.canvasRenderer = canvasRenderer;
30661
- }
30662
- };
30663
- DefaultCanvasLottiePicker = __decorate$5([injectable(), __param$1(0, inject(RectRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
30664
-
30665
- let loadLottiePick = !1;
30666
- const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
30667
- loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
30668
- });
30669
-
30670
- var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30671
- var d,
30672
- c = arguments.length,
30673
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
30674
- 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);
30675
- return c > 3 && r && Object.defineProperty(target, key, r), r;
30676
- };
30677
- let DefaultCanvasLottieRender = class extends DefaultCanvasRectRender {
30678
- constructor() {
30679
- super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
30680
- }
30681
- drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
30682
- const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
30683
- super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
30684
- }
30685
- _drawShape(lottie, context, x, y, drawContext, params) {
30686
- var _a;
30687
- const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
30688
- {
30689
- x: originX = lottieAttribute.x,
30690
- y: originY = lottieAttribute.y
30691
- } = lottie.attribute;
30692
- context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
30693
- const canvas = lottie.canvas;
30694
- if (canvas) {
30695
- const pattern = context.createPattern(canvas, "no-repeat"),
30696
- dpr = context.dpr;
30697
- pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
30698
- }
30699
- context.fill();
30700
- }
30701
- };
30702
- DefaultCanvasLottieRender = __decorate$4([injectable()], DefaultCanvasLottieRender);
30703
-
30704
- let loadLottieModule = !1;
30705
- const lottieModule = new ContainerModule(bind => {
30706
- loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
30707
- });
30708
-
30709
- const browser = isBrowserEnv();
30710
-
30711
- function _registerArc() {
30712
- _registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
30713
- }
30714
- _registerArc.__loaded = !1;
30715
- const registerArc = _registerArc;
30716
-
30717
- function _registerArc3d() {
30718
- _registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
30719
- }
30720
- _registerArc3d.__loaded = !1;
30721
- const registerArc3d = _registerArc3d;
30722
-
30723
- function _registerArea() {
30724
- _registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
30725
- }
30726
- _registerArea.__loaded = !1;
30727
- const registerArea = _registerArea;
30728
-
30729
- function _registerCircle() {
30730
- _registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
30731
- }
30732
- _registerCircle.__loaded = !1;
30733
- const registerCircle = _registerCircle;
30734
-
30735
- function _registerGlyph() {
30736
- _registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
30737
- }
30738
- _registerGlyph.__loaded = !1;
30739
- const registerGlyph = _registerGlyph;
30740
-
30741
- function _registerGroup() {
30742
- _registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
30743
- }
30744
- _registerGroup.__loaded = !1;
30745
- const registerGroup = _registerGroup;
30746
-
30747
- function _registerImage() {
30748
- _registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
30749
- }
30750
- _registerImage.__loaded = !1;
30751
- const registerImage = _registerImage;
30752
-
30753
- function _registerLine() {
30754
- _registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
30755
- }
30756
- _registerLine.__loaded = !1;
30757
- const registerLine = _registerLine;
30758
-
30759
- function _registerPath() {
30760
- _registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
30761
- }
30762
- _registerPath.__loaded = !1;
30763
- const registerPath = _registerPath;
30764
-
30765
- function _registerPolygon() {
30766
- _registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
30767
- }
30768
- _registerPolygon.__loaded = !1;
30769
- const registerPolygon = _registerPolygon;
30770
-
30771
- function _registerPyramid3d() {
30772
- _registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
30773
- }
30774
- _registerPyramid3d.__loaded = !1;
30775
- const registerPyramid3d = _registerPyramid3d;
30776
-
30777
- function _registerRect() {
30778
- _registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
30779
- }
30780
- _registerRect.__loaded = !1;
30781
- const registerRect = _registerRect;
30782
-
30783
- function _registerRect3d() {
30784
- _registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
30785
- }
30786
- _registerRect3d.__loaded = !1;
30787
- const registerRect3d = _registerRect3d;
30788
-
30789
- function _registerRichtext() {
30790
- _registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
30791
- }
30792
- _registerRichtext.__loaded = !1;
30793
- const registerRichtext = _registerRichtext;
30794
-
30795
- function _registerShadowRoot() {
30796
- _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
30797
- }
30798
- _registerShadowRoot.__loaded = !1;
30799
- const registerShadowRoot = _registerShadowRoot;
30800
-
30801
- function _registerSymbol() {
30802
- _registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
30803
- }
30804
- _registerSymbol.__loaded = !1;
30805
- const registerSymbol = _registerSymbol;
30806
-
30807
- function _registerText() {
30808
- _registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
30809
- }
30810
- _registerText.__loaded = !1;
30811
- const registerText = _registerText;
30978
+ }
30812
30979
 
30813
- var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30980
+ var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30814
30981
  var d,
30815
30982
  c = arguments.length,
30816
30983
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -30825,223 +30992,56 @@ var __decorate$3 = undefined && undefined.__decorate || function (decorators, ta
30825
30992
  decorator(target, key, paramIndex);
30826
30993
  };
30827
30994
  };
30828
- let DefaultCanvasStarPicker = class extends PickerBase {
30995
+ let DefaultCanvasLottiePicker = class extends RectPickerBase {
30829
30996
  constructor(canvasRenderer) {
30830
- super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
30997
+ super(), this.canvasRenderer = canvasRenderer;
30831
30998
  }
30832
30999
  };
30833
- DefaultCanvasStarPicker = __decorate$3([injectable(), __param(0, inject(StarRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasStarPicker);
31000
+ DefaultCanvasLottiePicker = __decorate$4([injectable(), __param(0, inject(RectRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
30834
31001
 
30835
- let loadStarPick = !1;
30836
- const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
30837
- loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
31002
+ let loadLottiePick = !1;
31003
+ const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
31004
+ loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
30838
31005
  });
30839
31006
 
30840
- function _registerStar() {
30841
- _registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
30842
- }
30843
- _registerStar.__loaded = !1;
30844
- const registerStar = _registerStar;
30845
-
30846
- function _registerWrapText() {
30847
- _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
30848
- }
30849
- _registerWrapText.__loaded = !1;
30850
- const registerWrapText = _registerWrapText;
30851
-
30852
- function registerGifGraphic() {
30853
- graphicCreator.RegisterGraphicCreator("gif", createGifImage);
30854
- }
30855
- function _registerGifImage() {
30856
- _registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
30857
- }
30858
- _registerGifImage.__loaded = !1;
30859
- const registerGifImage = _registerGifImage;
30860
-
30861
- function pseudoRandom(n) {
30862
- let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
30863
- let hash = 3735928559 ^ seed;
30864
- 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;
30865
- }
30866
- function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30867
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30868
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30869
- const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
30870
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
30871
- return Math.min(1, Math.max(0, _r));
30872
- }
30873
- function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30874
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30875
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30876
- const delay = column / columnCount,
30877
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30878
- return Math.min(1, Math.max(0, _r));
30879
- }
30880
- function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30881
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30882
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30883
- const delay = (columnCount - 1 - column) / columnCount,
30884
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30885
- return Math.min(1, Math.max(0, _r));
30886
- }
30887
- function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30888
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30889
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30890
- const delay = row / rowCount,
30891
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30892
- return Math.min(1, Math.max(0, _r));
30893
- }
30894
- function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30895
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30896
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30897
- const delay = (rowCount - 1 - row) / rowCount,
30898
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30899
- return Math.min(1, Math.max(0, _r));
30900
- }
30901
- function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30902
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30903
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30904
- const centerRow = rowCount / 2,
30905
- centerCol = columnCount / 2,
30906
- distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
30907
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30908
- return Math.min(1, Math.max(0, _r));
30909
- }
30910
- function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30911
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30912
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30913
- const delay = (row / rowCount + column / columnCount) / 2,
30914
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30915
- return Math.min(1, Math.max(0, _r));
30916
- }
30917
- function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30918
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30919
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30920
- const centerRow = rowCount / 2,
30921
- centerCol = columnCount / 2,
30922
- angle = Math.atan2(row - centerRow, column - centerCol),
30923
- delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
30924
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30925
- return Math.min(1, Math.max(0, _r));
30926
- }
30927
- function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30928
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30929
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30930
- const centerRow = rowCount / 2,
30931
- centerCol = columnCount / 2,
30932
- 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)),
30933
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
30934
- return Math.min(1, Math.max(0, _r));
30935
- }
30936
- function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30937
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30938
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30939
- const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
30940
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30941
- return Math.min(1, Math.max(0, _r));
30942
- }
30943
- function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30944
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30945
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30946
- const rowPhase = row / rowCount,
30947
- colPhase = column / columnCount,
30948
- _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;
30949
- return Math.min(1, Math.max(0, _r));
30950
- }
30951
- function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30952
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30953
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30954
- const centerRow = rowCount / 2,
30955
- centerCol = columnCount / 2,
30956
- distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
30957
- angle = Math.atan2(row - centerRow, column - centerCol),
30958
- delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
30959
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30960
- return Math.min(1, Math.max(0, _r));
30961
- }
30962
- function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30963
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30964
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30965
- const centerCol = columnCount / 2,
30966
- distance = Math.abs(column - centerCol) / centerCol,
30967
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30968
- return Math.min(1, Math.max(0, _r));
30969
- }
30970
- function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30971
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30972
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30973
- const centerCol = columnCount / 2,
30974
- distance = 1 - Math.abs(column - centerCol) / centerCol,
30975
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30976
- return Math.min(1, Math.max(0, _r));
30977
- }
30978
- function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30979
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30980
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30981
- const centerRow = rowCount / 2,
30982
- distance = Math.abs(row - centerRow) / centerRow,
30983
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30984
- return Math.min(1, Math.max(0, _r));
30985
- }
30986
- function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30987
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30988
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30989
- const centerRow = rowCount / 2,
30990
- distance = 1 - Math.abs(row - centerRow) / centerRow,
30991
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30992
- return Math.min(1, Math.max(0, _r));
30993
- }
30994
- function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
30995
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
30996
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
30997
- const centerRow = rowCount / 2,
30998
- centerCol = columnCount / 2,
30999
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31000
- normalizedDistance = Math.min(distance, 1),
31001
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
31002
- return Math.min(1, Math.max(0, _r));
31003
- }
31004
- function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31005
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31006
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31007
- const centerRow = rowCount / 2,
31008
- centerCol = columnCount / 2,
31009
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31010
- normalizedDistance = 1 - Math.min(distance, 1),
31011
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
31012
- return Math.min(1, Math.max(0, _r));
31013
- }
31014
- function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31015
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31016
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31017
- const centerRow = rowCount / 2,
31018
- centerCol = columnCount / 2,
31019
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31020
- normalizedDistance = Math.min(distance, 1),
31021
- wavePhase = 2 * ratio * Math.PI * 3,
31022
- decay = Math.max(0, 1 - normalizedDistance),
31023
- _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
31024
- return Math.min(1, Math.max(0, _r));
31025
- }
31026
- function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31027
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31028
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31029
- const index = row * columnCount + column,
31030
- phase = 2 * pseudoRandom(index, 0) * Math.PI,
31031
- speed = .5 * pseudoRandom(index, 1) + .5,
31032
- direction = 2 * pseudoRandom(index, 2) * Math.PI,
31033
- centerRow = rowCount / 2,
31034
- centerCol = columnCount / 2,
31035
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
31036
- normalizedDistance = Math.min(distance, 1),
31037
- scatterRatio = (ratio - .4) / .6,
31038
- movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
31039
- distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
31040
- _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
31041
- return Math.min(1, Math.max(0, _r));
31042
- }
31007
+ var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
31008
+ var d,
31009
+ c = arguments.length,
31010
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
31011
+ 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);
31012
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31013
+ };
31014
+ let DefaultCanvasLottieRender = class extends DefaultCanvasRectRender {
31015
+ constructor() {
31016
+ super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
31017
+ }
31018
+ drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
31019
+ const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
31020
+ super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
31021
+ }
31022
+ _drawShape(lottie, context, x, y, drawContext, params) {
31023
+ var _a;
31024
+ const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
31025
+ {
31026
+ x: originX = lottieAttribute.x,
31027
+ y: originY = lottieAttribute.y
31028
+ } = lottie.attribute;
31029
+ context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
31030
+ const canvas = lottie.canvas;
31031
+ if (canvas) {
31032
+ const pattern = context.createPattern(canvas, "no-repeat"),
31033
+ dpr = context.dpr;
31034
+ pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
31035
+ }
31036
+ context.fill();
31037
+ }
31038
+ };
31039
+ DefaultCanvasLottieRender = __decorate$3([injectable()], DefaultCanvasLottieRender);
31043
31040
 
31044
- const roughModule = _roughModule;
31041
+ let loadLottieModule = !1;
31042
+ const lottieModule = new ContainerModule(bind => {
31043
+ loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
31044
+ });
31045
31045
 
31046
31046
  class Easing {
31047
31047
  constructor() {}
@@ -32494,7 +32494,7 @@ class AComponentAnimate extends ACustomAnimate {
32494
32494
  }
32495
32495
  class AStageAnimate extends ACustomAnimate {
32496
32496
  constructor(customFrom, customTo, duration, easing, params) {
32497
- super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this._beforeStageRender = () => {
32497
+ super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this.checkStatusAfterRender = !0, this._beforeStageRender = () => {
32498
32498
  if (!this.willCallBeforeStageRender) return;
32499
32499
  this.willCallBeforeStageRender = !1;
32500
32500
  const stage = this.target.stage,
@@ -32507,7 +32507,7 @@ class AStageAnimate extends ACustomAnimate {
32507
32507
  const stage = this.target.stage,
32508
32508
  canvas = stage.window.getContext().canvas.nativeCanvas,
32509
32509
  outputCanvas = this.afterStageRender(stage, canvas);
32510
- outputCanvas && this.renderToStage(stage, outputCanvas);
32510
+ outputCanvas && this.renderToStage(stage, outputCanvas), this.checkStatusAfterRender && this.animate.status === AnimateStatus.END && this.animate.timeline.removeAnimate(this.animate);
32511
32511
  }, this.props = {};
32512
32512
  }
32513
32513
  beforeStageRender(stage, canvas) {
@@ -50684,6 +50684,8 @@ loadBrushComponent();
50684
50684
  class Brush extends AbstractComponent {
50685
50685
  constructor(attributes, options) {
50686
50686
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, Brush.defaultAttributes, attributes)), this.name = "brush", this._activeBrushState = !1, this._activeDrawState = !1, this._cacheDrawPoints = [], this._activeMoveState = !1, this._operatingMaskMoveDx = 0, this._operatingMaskMoveDy = 0, this._operatingMaskMoveRangeX = [-1 / 0, 1 / 0], this._operatingMaskMoveRangeY = [-1 / 0, 1 / 0], this._brushMaskAABBBoundsDict = {}, this._firstUpdate = !0, this._onBrushStart = e => {
50687
+ if (!1 === this.attribute.interactive) return;
50688
+ if (!1 === this._beforeBrushEvent(e)) return;
50687
50689
  const {
50688
50690
  updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
50689
50691
  endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
@@ -50691,11 +50693,11 @@ class Brush extends AbstractComponent {
50691
50693
  } = this.attribute;
50692
50694
  array(updateTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushingWithDelay)), array(endTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushEnd)), e.stopPropagation(), this._firstUpdate = !0, this._activeMoveState = brushMoved && this._isPosInBrushMask(e), this._activeDrawState = !this._activeMoveState, this._startPos = this.eventPosToStagePos(e), this._cacheDrawPoints = [this._startPos];
50693
50695
  }, this._onBrushing = e => {
50694
- this._outOfInteractiveRange(e) || (e.stopPropagation(), this._firstUpdate ? (this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e), this._firstUpdate = !1) : (this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e)));
50696
+ !1 !== this.attribute.interactive && !1 !== this._beforeBrushEvent(e) && (this._outOfInteractiveRange(e) || (e.stopPropagation(), this._firstUpdate ? (this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e), this._firstUpdate = !1) : (this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e))));
50695
50697
  }, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
50696
- this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
50698
+ !1 !== this.attribute.interactive && (this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1);
50697
50699
  }, this._onBrushClear = e => {
50698
- e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1;
50700
+ !1 !== this.attribute.interactive && !1 !== this._beforeBrushEvent(e) && (e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1);
50699
50701
  };
50700
50702
  }
50701
50703
  _bindBrushEvents() {
@@ -50707,6 +50709,7 @@ class Brush extends AbstractComponent {
50707
50709
  array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
50708
50710
  }
50709
50711
  _initDraw(e) {
50712
+ if (!1 === this.attribute.interactive) return;
50710
50713
  const {
50711
50714
  brushMode: brushMode
50712
50715
  } = this.attribute,
@@ -50715,6 +50718,7 @@ class Brush extends AbstractComponent {
50715
50718
  }
50716
50719
  _initMove(e) {
50717
50720
  var _a, _b;
50721
+ if (!1 === this.attribute.interactive) return;
50718
50722
  this._cacheMovePoint = this.eventPosToStagePos(e), this._operatingMaskMoveDx = null !== (_a = this._operatingMask.attribute.dx) && void 0 !== _a ? _a : 0, this._operatingMaskMoveDy = null !== (_b = this._operatingMask.attribute.dy) && void 0 !== _b ? _b : 0;
50719
50723
  const {
50720
50724
  interactiveRange: interactiveRange
@@ -50739,6 +50743,7 @@ class Brush extends AbstractComponent {
50739
50743
  }
50740
50744
  _drawing(e) {
50741
50745
  var _a;
50746
+ if (!1 === this.attribute.interactive) return;
50742
50747
  const pos = this.eventPosToStagePos(e),
50743
50748
  {
50744
50749
  brushType: brushType,
@@ -50763,6 +50768,7 @@ class Brush extends AbstractComponent {
50763
50768
  (Math.abs(x2 - x1) > sizeThreshold || Math.abs(y1 - y2) > sizeThreshold) && (1 !== Object.keys(this._brushMaskAABBBoundsDict).length || this._activeBrushState ? this._dispatchBrushEvent(IOperateType.drawing, e) : (this._activeBrushState = !0, this._dispatchBrushEvent(IOperateType.brushActive, e)));
50764
50769
  }
50765
50770
  _moving(e) {
50771
+ if (!1 === this.attribute.interactive) return;
50766
50772
  const startPos = this._cacheMovePoint,
50767
50773
  pos = this.eventPosToStagePos(e);
50768
50774
  if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
@@ -50776,6 +50782,7 @@ class Brush extends AbstractComponent {
50776
50782
  }), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
50777
50783
  }
50778
50784
  _drawEnd(e) {
50785
+ if (!1 === this.attribute.interactive) return;
50779
50786
  const {
50780
50787
  removeOnClick = !0,
50781
50788
  sizeThreshold = DEFAULT_SIZE_THRESHOLD
@@ -50793,7 +50800,7 @@ class Brush extends AbstractComponent {
50793
50800
  }
50794
50801
  }
50795
50802
  _moveEnd(e) {
50796
- this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e);
50803
+ !1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(IOperateType.moveEnd, e));
50797
50804
  }
50798
50805
  render() {
50799
50806
  this._bindBrushEvents();
@@ -50900,6 +50907,10 @@ class Brush extends AbstractComponent {
50900
50907
  pos = this.eventPosToStagePos(e);
50901
50908
  return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
50902
50909
  }
50910
+ _beforeBrushEvent(e) {
50911
+ var _a, _b;
50912
+ return null === (_b = (_a = this.attribute).beforeBrushChange) || void 0 === _b ? void 0 : _b.call(_a, e);
50913
+ }
50903
50914
  _dispatchBrushEvent(operateType, e) {
50904
50915
  this._dispatchEvent(operateType, {
50905
50916
  operateMask: this._operatingMask,
@@ -53017,7 +53028,7 @@ TableSeriesNumber.defaultAttributes = {
53017
53028
  select: !0
53018
53029
  };
53019
53030
 
53020
- const version = "1.0.37";
53031
+ const version = "1.0.38";
53021
53032
  preLoadAllModule();
53022
53033
  if (isBrowserEnv()) {
53023
53034
  loadBrowserEnv(container);