@visactor/vrender 1.0.16 → 1.0.17-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -29133,6 +29133,302 @@ const gifImageModule = new ContainerModule(bind => {
29133
29133
  loadGifImageModule || (loadGifImageModule = !0, bind(DefaultCanvasGifImageRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasGifImageRender));
29134
29134
  });
29135
29135
 
29136
+ const browser = isBrowserEnv();
29137
+
29138
+ function _registerArc() {
29139
+ _registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
29140
+ }
29141
+ _registerArc.__loaded = !1;
29142
+ const registerArc = _registerArc;
29143
+
29144
+ function _registerArc3d() {
29145
+ _registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
29146
+ }
29147
+ _registerArc3d.__loaded = !1;
29148
+ const registerArc3d = _registerArc3d;
29149
+
29150
+ function _registerArea() {
29151
+ _registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
29152
+ }
29153
+ _registerArea.__loaded = !1;
29154
+ const registerArea = _registerArea;
29155
+
29156
+ function _registerCircle() {
29157
+ _registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
29158
+ }
29159
+ _registerCircle.__loaded = !1;
29160
+ const registerCircle = _registerCircle;
29161
+
29162
+ function _registerGlyph() {
29163
+ _registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
29164
+ }
29165
+ _registerGlyph.__loaded = !1;
29166
+ const registerGlyph = _registerGlyph;
29167
+
29168
+ function _registerGroup() {
29169
+ _registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
29170
+ }
29171
+ _registerGroup.__loaded = !1;
29172
+ const registerGroup = _registerGroup;
29173
+
29174
+ function _registerImage() {
29175
+ _registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
29176
+ }
29177
+ _registerImage.__loaded = !1;
29178
+ const registerImage = _registerImage;
29179
+
29180
+ function _registerLine() {
29181
+ _registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
29182
+ }
29183
+ _registerLine.__loaded = !1;
29184
+ const registerLine = _registerLine;
29185
+
29186
+ function _registerPath() {
29187
+ _registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
29188
+ }
29189
+ _registerPath.__loaded = !1;
29190
+ const registerPath = _registerPath;
29191
+
29192
+ function _registerPolygon() {
29193
+ _registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
29194
+ }
29195
+ _registerPolygon.__loaded = !1;
29196
+ const registerPolygon = _registerPolygon;
29197
+
29198
+ function _registerPyramid3d() {
29199
+ _registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
29200
+ }
29201
+ _registerPyramid3d.__loaded = !1;
29202
+ const registerPyramid3d = _registerPyramid3d;
29203
+
29204
+ function _registerRect() {
29205
+ _registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
29206
+ }
29207
+ _registerRect.__loaded = !1;
29208
+ const registerRect = _registerRect;
29209
+
29210
+ function _registerRect3d() {
29211
+ _registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
29212
+ }
29213
+ _registerRect3d.__loaded = !1;
29214
+ const registerRect3d = _registerRect3d;
29215
+
29216
+ function _registerRichtext() {
29217
+ _registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
29218
+ }
29219
+ _registerRichtext.__loaded = !1;
29220
+ const registerRichtext = _registerRichtext;
29221
+
29222
+ function _registerShadowRoot() {
29223
+ _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
29224
+ }
29225
+ _registerShadowRoot.__loaded = !1;
29226
+ const registerShadowRoot = _registerShadowRoot;
29227
+
29228
+ function _registerSymbol() {
29229
+ _registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
29230
+ }
29231
+ _registerSymbol.__loaded = !1;
29232
+ const registerSymbol = _registerSymbol;
29233
+
29234
+ function _registerText() {
29235
+ _registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
29236
+ }
29237
+ _registerText.__loaded = !1;
29238
+ const registerText = _registerText;
29239
+
29240
+ var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29241
+ var d,
29242
+ c = arguments.length,
29243
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
29244
+ 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);
29245
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
29246
+ },
29247
+ __metadata$1 = undefined && undefined.__metadata || function (k, v) {
29248
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
29249
+ },
29250
+ __param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
29251
+ return function (target, key) {
29252
+ decorator(target, key, paramIndex);
29253
+ };
29254
+ };
29255
+ let DefaultCanvasStarPicker = class extends PickerBase {
29256
+ constructor(canvasRenderer) {
29257
+ super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
29258
+ }
29259
+ };
29260
+ DefaultCanvasStarPicker = __decorate$2([injectable(), __param$1(0, inject(StarRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasStarPicker);
29261
+
29262
+ let loadStarPick = !1;
29263
+ const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
29264
+ loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
29265
+ });
29266
+
29267
+ function _registerStar() {
29268
+ _registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
29269
+ }
29270
+ _registerStar.__loaded = !1;
29271
+ const registerStar = _registerStar;
29272
+
29273
+ function _registerWrapText() {
29274
+ _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
29275
+ }
29276
+ _registerWrapText.__loaded = !1;
29277
+ const registerWrapText = _registerWrapText;
29278
+
29279
+ function registerGifGraphic() {
29280
+ graphicCreator.RegisterGraphicCreator("gif", createGifImage);
29281
+ }
29282
+ function _registerGifImage() {
29283
+ _registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
29284
+ }
29285
+ _registerGifImage.__loaded = !1;
29286
+ const registerGifImage = _registerGifImage;
29287
+
29288
+ function pseudoRandom(n, seed = 0) {
29289
+ let hash = 3735928559 ^ seed;
29290
+ 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;
29291
+ }
29292
+ function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29293
+ const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
29294
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
29295
+ return Math.min(1, Math.max(0, _r));
29296
+ }
29297
+ function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29298
+ const delay = column / columnCount,
29299
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
29300
+ return Math.min(1, Math.max(0, _r));
29301
+ }
29302
+ function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29303
+ const delay = (columnCount - 1 - column) / columnCount,
29304
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
29305
+ return Math.min(1, Math.max(0, _r));
29306
+ }
29307
+ function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29308
+ const delay = row / rowCount,
29309
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
29310
+ return Math.min(1, Math.max(0, _r));
29311
+ }
29312
+ function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29313
+ const delay = (rowCount - 1 - row) / rowCount,
29314
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
29315
+ return Math.min(1, Math.max(0, _r));
29316
+ }
29317
+ function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29318
+ const centerRow = rowCount / 2,
29319
+ centerCol = columnCount / 2,
29320
+ distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
29321
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
29322
+ return Math.min(1, Math.max(0, _r));
29323
+ }
29324
+ function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29325
+ const delay = (row / rowCount + column / columnCount) / 2,
29326
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
29327
+ return Math.min(1, Math.max(0, _r));
29328
+ }
29329
+ function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29330
+ const centerRow = rowCount / 2,
29331
+ centerCol = columnCount / 2,
29332
+ angle = Math.atan2(row - centerRow, column - centerCol),
29333
+ delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
29334
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
29335
+ return Math.min(1, Math.max(0, _r));
29336
+ }
29337
+ function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29338
+ const centerRow = rowCount / 2,
29339
+ centerCol = columnCount / 2,
29340
+ 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)),
29341
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
29342
+ return Math.min(1, Math.max(0, _r));
29343
+ }
29344
+ function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29345
+ const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
29346
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
29347
+ return Math.min(1, Math.max(0, _r));
29348
+ }
29349
+ function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29350
+ const rowPhase = row / rowCount,
29351
+ colPhase = column / columnCount,
29352
+ _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;
29353
+ return Math.min(1, Math.max(0, _r));
29354
+ }
29355
+ function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29356
+ const centerRow = rowCount / 2,
29357
+ centerCol = columnCount / 2,
29358
+ distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
29359
+ angle = Math.atan2(row - centerRow, column - centerCol),
29360
+ delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
29361
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
29362
+ return Math.min(1, Math.max(0, _r));
29363
+ }
29364
+ function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29365
+ const centerCol = columnCount / 2,
29366
+ distance = Math.abs(column - centerCol) / centerCol,
29367
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
29368
+ return Math.min(1, Math.max(0, _r));
29369
+ }
29370
+ function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29371
+ const centerCol = columnCount / 2,
29372
+ distance = 1 - Math.abs(column - centerCol) / centerCol,
29373
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
29374
+ return Math.min(1, Math.max(0, _r));
29375
+ }
29376
+ function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29377
+ const centerRow = rowCount / 2,
29378
+ distance = Math.abs(row - centerRow) / centerRow,
29379
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
29380
+ return Math.min(1, Math.max(0, _r));
29381
+ }
29382
+ function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29383
+ const centerRow = rowCount / 2,
29384
+ distance = 1 - Math.abs(row - centerRow) / centerRow,
29385
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
29386
+ return Math.min(1, Math.max(0, _r));
29387
+ }
29388
+ function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29389
+ const centerRow = rowCount / 2,
29390
+ centerCol = columnCount / 2,
29391
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
29392
+ normalizedDistance = Math.min(distance, 1),
29393
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
29394
+ return Math.min(1, Math.max(0, _r));
29395
+ }
29396
+ function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29397
+ const centerRow = rowCount / 2,
29398
+ centerCol = columnCount / 2,
29399
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
29400
+ normalizedDistance = 1 - Math.min(distance, 1),
29401
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
29402
+ return Math.min(1, Math.max(0, _r));
29403
+ }
29404
+ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29405
+ const centerRow = rowCount / 2,
29406
+ centerCol = columnCount / 2,
29407
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
29408
+ normalizedDistance = Math.min(distance, 1),
29409
+ wavePhase = 2 * ratio * Math.PI * 3,
29410
+ decay = Math.max(0, 1 - normalizedDistance),
29411
+ _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
29412
+ return Math.min(1, Math.max(0, _r));
29413
+ }
29414
+ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
29415
+ const index = row * columnCount + column,
29416
+ phase = 2 * pseudoRandom(index, 0) * Math.PI,
29417
+ speed = .5 * pseudoRandom(index, 1) + .5,
29418
+ direction = 2 * pseudoRandom(index, 2) * Math.PI,
29419
+ centerRow = rowCount / 2,
29420
+ centerCol = columnCount / 2,
29421
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
29422
+ normalizedDistance = Math.min(distance, 1),
29423
+ scatterRatio = (ratio - .4) / .6,
29424
+ movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
29425
+ distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
29426
+ _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
29427
+ return Math.min(1, Math.max(0, _r));
29428
+ }
29429
+
29430
+ const roughModule = _roughModule;
29431
+
29136
29432
  var lottie = {exports: {}};
29137
29433
 
29138
29434
  (function(module,exports){typeof document!=="undefined"&&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:{}}
@@ -29816,218 +30112,48 @@ class Lottie extends Rect {
29816
30112
  }
29817
30113
  setAttributes(params, forceUpdateTag, context) {
29818
30114
  return params.data && this.initLottieWeb(params.data), super.setAttributes(params, forceUpdateTag, context);
29819
- }
29820
- setAttribute(key, value, forceUpdateTag, context) {
29821
- return "data" === key && this.initLottieWeb(value), super.setAttribute(key, value, forceUpdateTag, context);
29822
- }
29823
- getGraphicTheme() {
29824
- return getTheme(this).rect;
29825
- }
29826
- initLottieWeb(data) {
29827
- if ("browser" !== vglobal.env) return;
29828
- this.lottieInstance && this.releaseLottieInstance();
29829
- const theme = this.getGraphicTheme(),
29830
- {
29831
- width = theme.width,
29832
- height = theme.height
29833
- } = this.attribute,
29834
- canvas = vglobal.createCanvas({
29835
- width: width,
29836
- height: height,
29837
- dpr: vglobal.devicePixelRatio
29838
- }),
29839
- params = {
29840
- rendererSettings: {
29841
- context: canvas.getContext("2d")
29842
- },
29843
- animType: "canvas",
29844
- loop: !0
29845
- };
29846
- "string" == typeof data ? params.path = data : params.animationData = data, this.lottieInstance = bodymovin.loadAnimation(params), this.canvas = canvas, this.lottieInstance.addEventListener("drawnFrame", this.renderNextFrame);
29847
- }
29848
- release() {
29849
- super.release(), this.releaseLottieInstance();
29850
- }
29851
- releaseLottieInstance() {
29852
- this.lottieInstance.removeEventListener("drawnFrame", this.renderNextFrame), this.lottieInstance.destroy(), this.lottieInstance = null;
29853
- }
29854
- }
29855
- Lottie.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
29856
- function createLottie(attributes) {
29857
- return new Lottie(attributes);
29858
- }
29859
-
29860
- var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29861
- var d,
29862
- c = arguments.length,
29863
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
29864
- 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);
29865
- return c > 3 && r && Object.defineProperty(target, key, r), r;
29866
- },
29867
- __metadata$1 = undefined && undefined.__metadata || function (k, v) {
29868
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
29869
- },
29870
- __param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
29871
- return function (target, key) {
29872
- decorator(target, key, paramIndex);
29873
- };
29874
- };
29875
- let DefaultCanvasLottiePicker = class extends RectPickerBase {
29876
- constructor(canvasRenderer) {
29877
- super(), this.canvasRenderer = canvasRenderer;
29878
- }
29879
- };
29880
- DefaultCanvasLottiePicker = __decorate$2([injectable(), __param$1(0, inject(RectRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
29881
-
29882
- let loadLottiePick = !1;
29883
- const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
29884
- loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
29885
- });
29886
-
29887
- var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29888
- var d,
29889
- c = arguments.length,
29890
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
29891
- 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);
29892
- return c > 3 && r && Object.defineProperty(target, key, r), r;
29893
- };
29894
- let DefaultCanvasLottieRender = class extends DefaultCanvasRectRender {
29895
- constructor() {
29896
- super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
29897
- }
29898
- drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
29899
- const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
29900
- super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
29901
- }
29902
- _drawShape(lottie, context, x, y, drawContext, params) {
29903
- var _a;
29904
- const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
29905
- {
29906
- x: originX = lottieAttribute.x,
29907
- y: originY = lottieAttribute.y
29908
- } = lottie.attribute;
29909
- context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
29910
- const canvas = lottie.canvas;
29911
- if (canvas) {
29912
- const pattern = context.createPattern(canvas, "no-repeat"),
29913
- dpr = context.dpr;
29914
- pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
29915
- }
29916
- context.fill();
29917
- }
29918
- };
29919
- DefaultCanvasLottieRender = __decorate$1([injectable()], DefaultCanvasLottieRender);
29920
-
29921
- let loadLottieModule = !1;
29922
- const lottieModule = new ContainerModule(bind => {
29923
- loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
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));
30115
+ }
30116
+ setAttribute(key, value, forceUpdateTag, context) {
30117
+ return "data" === key && this.initLottieWeb(value), super.setAttribute(key, value, forceUpdateTag, context);
30118
+ }
30119
+ getGraphicTheme() {
30120
+ return getTheme(this).rect;
30121
+ }
30122
+ initLottieWeb(data) {
30123
+ if ("browser" !== vglobal.env) return;
30124
+ this.lottieInstance && this.releaseLottieInstance();
30125
+ const theme = this.getGraphicTheme(),
30126
+ {
30127
+ width = theme.width,
30128
+ height = theme.height
30129
+ } = this.attribute,
30130
+ canvas = vglobal.createCanvas({
30131
+ width: width,
30132
+ height: height,
30133
+ dpr: vglobal.devicePixelRatio
30134
+ }),
30135
+ params = {
30136
+ rendererSettings: {
30137
+ context: canvas.getContext("2d")
30138
+ },
30139
+ animType: "canvas",
30140
+ loop: !0
30141
+ };
30142
+ "string" == typeof data ? params.path = data : params.animationData = data, this.lottieInstance = bodymovin.loadAnimation(params), this.canvas = canvas, this.lottieInstance.addEventListener("drawnFrame", this.renderNextFrame);
30143
+ }
30144
+ release() {
30145
+ super.release(), this.releaseLottieInstance();
30146
+ }
30147
+ releaseLottieInstance() {
30148
+ this.lottieInstance.removeEventListener("drawnFrame", this.renderNextFrame), this.lottieInstance.destroy(), this.lottieInstance = null;
30149
+ }
30020
30150
  }
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));
30151
+ Lottie.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
30152
+ function createLottie(attributes) {
30153
+ return new Lottie(attributes);
30026
30154
  }
30027
- _registerText.__loaded = !1;
30028
- const registerText = _registerText;
30029
30155
 
30030
- var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30156
+ var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30031
30157
  var d,
30032
30158
  c = arguments.length,
30033
30159
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -30042,182 +30168,56 @@ var __decorate = undefined && undefined.__decorate || function (decorators, targ
30042
30168
  decorator(target, key, paramIndex);
30043
30169
  };
30044
30170
  };
30045
- let DefaultCanvasStarPicker = class extends PickerBase {
30171
+ let DefaultCanvasLottiePicker = class extends RectPickerBase {
30046
30172
  constructor(canvasRenderer) {
30047
- super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
30173
+ super(), this.canvasRenderer = canvasRenderer;
30048
30174
  }
30049
30175
  };
30050
- DefaultCanvasStarPicker = __decorate([injectable(), __param(0, inject(StarRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasStarPicker);
30176
+ DefaultCanvasLottiePicker = __decorate$1([injectable(), __param(0, inject(RectRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
30051
30177
 
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));
30178
+ let loadLottiePick = !1;
30179
+ const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
30180
+ loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
30055
30181
  });
30056
30182
 
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, seed = 0) {
30079
- let hash = 3735928559 ^ seed;
30080
- 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;
30081
- }
30082
- function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30083
- const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
30084
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
30085
- return Math.min(1, Math.max(0, _r));
30086
- }
30087
- function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30088
- const delay = column / columnCount,
30089
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30090
- return Math.min(1, Math.max(0, _r));
30091
- }
30092
- function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30093
- const delay = (columnCount - 1 - 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 rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30098
- const delay = row / rowCount,
30099
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30100
- return Math.min(1, Math.max(0, _r));
30101
- }
30102
- function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30103
- const delay = (rowCount - 1 - row) / rowCount,
30104
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30105
- return Math.min(1, Math.max(0, _r));
30106
- }
30107
- function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30108
- const centerRow = rowCount / 2,
30109
- centerCol = columnCount / 2,
30110
- distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
30111
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30112
- return Math.min(1, Math.max(0, _r));
30113
- }
30114
- function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30115
- const delay = (row / rowCount + column / columnCount) / 2,
30116
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30117
- return Math.min(1, Math.max(0, _r));
30118
- }
30119
- function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30120
- const centerRow = rowCount / 2,
30121
- centerCol = columnCount / 2,
30122
- angle = Math.atan2(row - centerRow, column - centerCol),
30123
- delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
30124
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
30125
- return Math.min(1, Math.max(0, _r));
30126
- }
30127
- function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30128
- const centerRow = rowCount / 2,
30129
- centerCol = columnCount / 2,
30130
- 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)),
30131
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
30132
- return Math.min(1, Math.max(0, _r));
30133
- }
30134
- function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30135
- const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
30136
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
30137
- return Math.min(1, Math.max(0, _r));
30138
- }
30139
- function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30140
- const rowPhase = row / rowCount,
30141
- colPhase = column / columnCount,
30142
- _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;
30143
- return Math.min(1, Math.max(0, _r));
30144
- }
30145
- function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30146
- const centerRow = rowCount / 2,
30147
- centerCol = columnCount / 2,
30148
- distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
30149
- angle = Math.atan2(row - centerRow, column - centerCol),
30150
- delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
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 columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30155
- const centerCol = columnCount / 2,
30156
- distance = Math.abs(column - centerCol) / centerCol,
30157
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30158
- return Math.min(1, Math.max(0, _r));
30159
- }
30160
- function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30161
- const centerCol = columnCount / 2,
30162
- distance = 1 - Math.abs(column - centerCol) / centerCol,
30163
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30164
- return Math.min(1, Math.max(0, _r));
30165
- }
30166
- function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30167
- const centerRow = rowCount / 2,
30168
- distance = Math.abs(row - centerRow) / centerRow,
30169
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30170
- return Math.min(1, Math.max(0, _r));
30171
- }
30172
- function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30173
- const centerRow = rowCount / 2,
30174
- distance = 1 - Math.abs(row - centerRow) / centerRow,
30175
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
30176
- return Math.min(1, Math.max(0, _r));
30177
- }
30178
- function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30179
- const centerRow = rowCount / 2,
30180
- centerCol = columnCount / 2,
30181
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30182
- normalizedDistance = Math.min(distance, 1),
30183
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
30184
- return Math.min(1, Math.max(0, _r));
30185
- }
30186
- function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30187
- const centerRow = rowCount / 2,
30188
- centerCol = columnCount / 2,
30189
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30190
- normalizedDistance = 1 - Math.min(distance, 1),
30191
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
30192
- return Math.min(1, Math.max(0, _r));
30193
- }
30194
- function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30195
- const centerRow = rowCount / 2,
30196
- centerCol = columnCount / 2,
30197
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30198
- normalizedDistance = Math.min(distance, 1),
30199
- wavePhase = 2 * ratio * Math.PI * 3,
30200
- decay = Math.max(0, 1 - normalizedDistance),
30201
- _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
30202
- return Math.min(1, Math.max(0, _r));
30203
- }
30204
- function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
30205
- const index = row * columnCount + column,
30206
- phase = 2 * pseudoRandom(index, 0) * Math.PI,
30207
- speed = .5 * pseudoRandom(index, 1) + .5,
30208
- direction = 2 * pseudoRandom(index, 2) * Math.PI,
30209
- centerRow = rowCount / 2,
30210
- centerCol = columnCount / 2,
30211
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
30212
- normalizedDistance = Math.min(distance, 1),
30213
- scatterRatio = (ratio - .4) / .6,
30214
- movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
30215
- distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
30216
- _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
30217
- return Math.min(1, Math.max(0, _r));
30218
- }
30183
+ var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
30184
+ var d,
30185
+ c = arguments.length,
30186
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
30187
+ 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);
30188
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
30189
+ };
30190
+ let DefaultCanvasLottieRender = class extends DefaultCanvasRectRender {
30191
+ constructor() {
30192
+ super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
30193
+ }
30194
+ drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
30195
+ const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
30196
+ super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
30197
+ }
30198
+ _drawShape(lottie, context, x, y, drawContext, params) {
30199
+ var _a;
30200
+ const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
30201
+ {
30202
+ x: originX = lottieAttribute.x,
30203
+ y: originY = lottieAttribute.y
30204
+ } = lottie.attribute;
30205
+ context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
30206
+ const canvas = lottie.canvas;
30207
+ if (canvas) {
30208
+ const pattern = context.createPattern(canvas, "no-repeat"),
30209
+ dpr = context.dpr;
30210
+ pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
30211
+ }
30212
+ context.fill();
30213
+ }
30214
+ };
30215
+ DefaultCanvasLottieRender = __decorate([injectable()], DefaultCanvasLottieRender);
30219
30216
 
30220
- const roughModule = _roughModule;
30217
+ let loadLottieModule = !1;
30218
+ const lottieModule = new ContainerModule(bind => {
30219
+ loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
30220
+ });
30221
30221
 
30222
30222
  class Easing {
30223
30223
  constructor() {}
@@ -36461,7 +36461,7 @@ const registerCustomAnimate = () => {
36461
36461
  AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight), AnimateExecutor.registerBuiltInAnimate("dissolve", Dissolve), AnimateExecutor.registerBuiltInAnimate("grayscale", Grayscale), AnimateExecutor.registerBuiltInAnimate("distortion", Distortion), AnimateExecutor.registerBuiltInAnimate("particle", Particle), AnimateExecutor.registerBuiltInAnimate("glitch", Glitch), AnimateExecutor.registerBuiltInAnimate("gaussianBlur", GaussianBlur), AnimateExecutor.registerBuiltInAnimate("pixelation", Pixelation);
36462
36462
  };
36463
36463
 
36464
- const version = "1.0.16";
36464
+ const version = "1.0.17-alpha.0";
36465
36465
  preLoadAllModule();
36466
36466
  if (isBrowserEnv()) {
36467
36467
  loadBrowserEnv(container);