@visactor/vrender 1.0.37 → 1.0.39
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +418 -391
- package/dist/index.js +418 -391
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -24729,7 +24729,7 @@
|
|
|
24729
24729
|
return !!this._inuse;
|
|
24730
24730
|
}
|
|
24731
24731
|
set inuse(use) {
|
|
24732
|
-
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
|
|
24732
|
+
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : (this.nativeContext.restore(), this._font = ""));
|
|
24733
24733
|
}
|
|
24734
24734
|
constructor(canvas, dpr) {
|
|
24735
24735
|
this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), {
|
|
@@ -29923,6 +29923,343 @@
|
|
|
29923
29923
|
loadGifImageModule || (loadGifImageModule = !0, bind(DefaultCanvasGifImageRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasGifImageRender));
|
|
29924
29924
|
});
|
|
29925
29925
|
|
|
29926
|
+
const browser = isBrowserEnv();
|
|
29927
|
+
|
|
29928
|
+
function _registerArc() {
|
|
29929
|
+
_registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
|
|
29930
|
+
}
|
|
29931
|
+
_registerArc.__loaded = !1;
|
|
29932
|
+
const registerArc = _registerArc;
|
|
29933
|
+
|
|
29934
|
+
function _registerArc3d() {
|
|
29935
|
+
_registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
29936
|
+
}
|
|
29937
|
+
_registerArc3d.__loaded = !1;
|
|
29938
|
+
const registerArc3d = _registerArc3d;
|
|
29939
|
+
|
|
29940
|
+
function _registerArea() {
|
|
29941
|
+
_registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
29942
|
+
}
|
|
29943
|
+
_registerArea.__loaded = !1;
|
|
29944
|
+
const registerArea = _registerArea;
|
|
29945
|
+
|
|
29946
|
+
function _registerCircle() {
|
|
29947
|
+
_registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
|
|
29948
|
+
}
|
|
29949
|
+
_registerCircle.__loaded = !1;
|
|
29950
|
+
const registerCircle = _registerCircle;
|
|
29951
|
+
|
|
29952
|
+
function _registerGlyph() {
|
|
29953
|
+
_registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
|
|
29954
|
+
}
|
|
29955
|
+
_registerGlyph.__loaded = !1;
|
|
29956
|
+
const registerGlyph = _registerGlyph;
|
|
29957
|
+
|
|
29958
|
+
function _registerGroup() {
|
|
29959
|
+
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
29960
|
+
}
|
|
29961
|
+
_registerGroup.__loaded = !1;
|
|
29962
|
+
const registerGroup = _registerGroup;
|
|
29963
|
+
|
|
29964
|
+
function _registerImage() {
|
|
29965
|
+
_registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
|
|
29966
|
+
}
|
|
29967
|
+
_registerImage.__loaded = !1;
|
|
29968
|
+
const registerImage = _registerImage;
|
|
29969
|
+
|
|
29970
|
+
function _registerLine() {
|
|
29971
|
+
_registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
|
|
29972
|
+
}
|
|
29973
|
+
_registerLine.__loaded = !1;
|
|
29974
|
+
const registerLine = _registerLine;
|
|
29975
|
+
|
|
29976
|
+
function _registerPath() {
|
|
29977
|
+
_registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
|
|
29978
|
+
}
|
|
29979
|
+
_registerPath.__loaded = !1;
|
|
29980
|
+
const registerPath = _registerPath;
|
|
29981
|
+
|
|
29982
|
+
function _registerPolygon() {
|
|
29983
|
+
_registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
|
|
29984
|
+
}
|
|
29985
|
+
_registerPolygon.__loaded = !1;
|
|
29986
|
+
const registerPolygon = _registerPolygon;
|
|
29987
|
+
|
|
29988
|
+
function _registerPyramid3d() {
|
|
29989
|
+
_registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
29990
|
+
}
|
|
29991
|
+
_registerPyramid3d.__loaded = !1;
|
|
29992
|
+
const registerPyramid3d = _registerPyramid3d;
|
|
29993
|
+
|
|
29994
|
+
function _registerRect() {
|
|
29995
|
+
_registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
|
|
29996
|
+
}
|
|
29997
|
+
_registerRect.__loaded = !1;
|
|
29998
|
+
const registerRect = _registerRect;
|
|
29999
|
+
|
|
30000
|
+
function _registerRect3d() {
|
|
30001
|
+
_registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
30002
|
+
}
|
|
30003
|
+
_registerRect3d.__loaded = !1;
|
|
30004
|
+
const registerRect3d = _registerRect3d;
|
|
30005
|
+
|
|
30006
|
+
function _registerRichtext() {
|
|
30007
|
+
_registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
|
|
30008
|
+
}
|
|
30009
|
+
_registerRichtext.__loaded = !1;
|
|
30010
|
+
const registerRichtext = _registerRichtext;
|
|
30011
|
+
|
|
30012
|
+
function _registerShadowRoot() {
|
|
30013
|
+
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
30014
|
+
}
|
|
30015
|
+
_registerShadowRoot.__loaded = !1;
|
|
30016
|
+
const registerShadowRoot = _registerShadowRoot;
|
|
30017
|
+
|
|
30018
|
+
function _registerSymbol() {
|
|
30019
|
+
_registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
|
|
30020
|
+
}
|
|
30021
|
+
_registerSymbol.__loaded = !1;
|
|
30022
|
+
const registerSymbol = _registerSymbol;
|
|
30023
|
+
|
|
30024
|
+
function _registerText() {
|
|
30025
|
+
_registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
|
|
30026
|
+
}
|
|
30027
|
+
_registerText.__loaded = !1;
|
|
30028
|
+
const registerText = _registerText;
|
|
30029
|
+
|
|
30030
|
+
var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30031
|
+
var d,
|
|
30032
|
+
c = arguments.length,
|
|
30033
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
30034
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
30035
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30036
|
+
},
|
|
30037
|
+
__metadata$1 = undefined && undefined.__metadata || function (k, v) {
|
|
30038
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
30039
|
+
},
|
|
30040
|
+
__param$1 = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
30041
|
+
return function (target, key) {
|
|
30042
|
+
decorator(target, key, paramIndex);
|
|
30043
|
+
};
|
|
30044
|
+
};
|
|
30045
|
+
let DefaultCanvasStarPicker = class extends PickerBase {
|
|
30046
|
+
constructor(canvasRenderer) {
|
|
30047
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "star", this.numberType = STAR_NUMBER_TYPE;
|
|
30048
|
+
}
|
|
30049
|
+
};
|
|
30050
|
+
DefaultCanvasStarPicker = __decorate$5([injectable(), __param$1(0, inject(StarRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasStarPicker);
|
|
30051
|
+
|
|
30052
|
+
let loadStarPick = !1;
|
|
30053
|
+
const starCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30054
|
+
loadStarPick || (loadStarPick = !0, bind(CanvasStarPicker).to(DefaultCanvasStarPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasStarPicker));
|
|
30055
|
+
});
|
|
30056
|
+
|
|
30057
|
+
function _registerStar() {
|
|
30058
|
+
_registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
|
|
30059
|
+
}
|
|
30060
|
+
_registerStar.__loaded = !1;
|
|
30061
|
+
const registerStar = _registerStar;
|
|
30062
|
+
|
|
30063
|
+
function _registerWrapText() {
|
|
30064
|
+
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
30065
|
+
}
|
|
30066
|
+
_registerWrapText.__loaded = !1;
|
|
30067
|
+
const registerWrapText = _registerWrapText;
|
|
30068
|
+
|
|
30069
|
+
function registerGifGraphic() {
|
|
30070
|
+
graphicCreator.RegisterGraphicCreator("gif", createGifImage);
|
|
30071
|
+
}
|
|
30072
|
+
function _registerGifImage() {
|
|
30073
|
+
_registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
|
|
30074
|
+
}
|
|
30075
|
+
_registerGifImage.__loaded = !1;
|
|
30076
|
+
const registerGifImage = _registerGifImage;
|
|
30077
|
+
|
|
30078
|
+
function pseudoRandom(n) {
|
|
30079
|
+
let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
30080
|
+
let hash = 3735928559 ^ seed;
|
|
30081
|
+
return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
|
|
30082
|
+
}
|
|
30083
|
+
function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30084
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30085
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30086
|
+
const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
|
|
30087
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
|
|
30088
|
+
return Math.min(1, Math.max(0, _r));
|
|
30089
|
+
}
|
|
30090
|
+
function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30091
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30092
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30093
|
+
const delay = column / columnCount,
|
|
30094
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30095
|
+
return Math.min(1, Math.max(0, _r));
|
|
30096
|
+
}
|
|
30097
|
+
function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30098
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30099
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30100
|
+
const delay = (columnCount - 1 - column) / columnCount,
|
|
30101
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30102
|
+
return Math.min(1, Math.max(0, _r));
|
|
30103
|
+
}
|
|
30104
|
+
function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30105
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30106
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30107
|
+
const delay = row / rowCount,
|
|
30108
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30109
|
+
return Math.min(1, Math.max(0, _r));
|
|
30110
|
+
}
|
|
30111
|
+
function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30112
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30113
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30114
|
+
const delay = (rowCount - 1 - row) / rowCount,
|
|
30115
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30116
|
+
return Math.min(1, Math.max(0, _r));
|
|
30117
|
+
}
|
|
30118
|
+
function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30119
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30120
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30121
|
+
const centerRow = rowCount / 2,
|
|
30122
|
+
centerCol = columnCount / 2,
|
|
30123
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
|
|
30124
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30125
|
+
return Math.min(1, Math.max(0, _r));
|
|
30126
|
+
}
|
|
30127
|
+
function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30128
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30129
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30130
|
+
const delay = (row / rowCount + column / columnCount) / 2,
|
|
30131
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30132
|
+
return Math.min(1, Math.max(0, _r));
|
|
30133
|
+
}
|
|
30134
|
+
function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30135
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30136
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30137
|
+
const centerRow = rowCount / 2,
|
|
30138
|
+
centerCol = columnCount / 2,
|
|
30139
|
+
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30140
|
+
delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
|
|
30141
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30142
|
+
return Math.min(1, Math.max(0, _r));
|
|
30143
|
+
}
|
|
30144
|
+
function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30145
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30146
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30147
|
+
const centerRow = rowCount / 2,
|
|
30148
|
+
centerCol = columnCount / 2,
|
|
30149
|
+
normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
|
|
30150
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30151
|
+
return Math.min(1, Math.max(0, _r));
|
|
30152
|
+
}
|
|
30153
|
+
function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30154
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30155
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30156
|
+
const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
|
|
30157
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30158
|
+
return Math.min(1, Math.max(0, _r));
|
|
30159
|
+
}
|
|
30160
|
+
function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30161
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30162
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30163
|
+
const rowPhase = row / rowCount,
|
|
30164
|
+
colPhase = column / columnCount,
|
|
30165
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
|
|
30166
|
+
return Math.min(1, Math.max(0, _r));
|
|
30167
|
+
}
|
|
30168
|
+
function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30169
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30170
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30171
|
+
const centerRow = rowCount / 2,
|
|
30172
|
+
centerCol = columnCount / 2,
|
|
30173
|
+
distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
|
|
30174
|
+
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30175
|
+
delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
|
|
30176
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30177
|
+
return Math.min(1, Math.max(0, _r));
|
|
30178
|
+
}
|
|
30179
|
+
function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30180
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30181
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30182
|
+
const centerCol = columnCount / 2,
|
|
30183
|
+
distance = Math.abs(column - centerCol) / centerCol,
|
|
30184
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30185
|
+
return Math.min(1, Math.max(0, _r));
|
|
30186
|
+
}
|
|
30187
|
+
function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30188
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30189
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30190
|
+
const centerCol = columnCount / 2,
|
|
30191
|
+
distance = 1 - Math.abs(column - centerCol) / centerCol,
|
|
30192
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30193
|
+
return Math.min(1, Math.max(0, _r));
|
|
30194
|
+
}
|
|
30195
|
+
function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30196
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30197
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30198
|
+
const centerRow = rowCount / 2,
|
|
30199
|
+
distance = Math.abs(row - centerRow) / centerRow,
|
|
30200
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30201
|
+
return Math.min(1, Math.max(0, _r));
|
|
30202
|
+
}
|
|
30203
|
+
function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30204
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30205
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30206
|
+
const centerRow = rowCount / 2,
|
|
30207
|
+
distance = 1 - Math.abs(row - centerRow) / centerRow,
|
|
30208
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30209
|
+
return Math.min(1, Math.max(0, _r));
|
|
30210
|
+
}
|
|
30211
|
+
function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30212
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30213
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30214
|
+
const centerRow = rowCount / 2,
|
|
30215
|
+
centerCol = columnCount / 2,
|
|
30216
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30217
|
+
normalizedDistance = Math.min(distance, 1),
|
|
30218
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30219
|
+
return Math.min(1, Math.max(0, _r));
|
|
30220
|
+
}
|
|
30221
|
+
function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30222
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30223
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30224
|
+
const centerRow = rowCount / 2,
|
|
30225
|
+
centerCol = columnCount / 2,
|
|
30226
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30227
|
+
normalizedDistance = 1 - Math.min(distance, 1),
|
|
30228
|
+
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30229
|
+
return Math.min(1, Math.max(0, _r));
|
|
30230
|
+
}
|
|
30231
|
+
function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30232
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30233
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30234
|
+
const centerRow = rowCount / 2,
|
|
30235
|
+
centerCol = columnCount / 2,
|
|
30236
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30237
|
+
normalizedDistance = Math.min(distance, 1),
|
|
30238
|
+
wavePhase = 2 * ratio * Math.PI * 3,
|
|
30239
|
+
decay = Math.max(0, 1 - normalizedDistance),
|
|
30240
|
+
_r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
|
|
30241
|
+
return Math.min(1, Math.max(0, _r));
|
|
30242
|
+
}
|
|
30243
|
+
function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30244
|
+
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30245
|
+
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30246
|
+
const index = row * columnCount + column,
|
|
30247
|
+
phase = 2 * pseudoRandom(index, 0) * Math.PI,
|
|
30248
|
+
speed = .5 * pseudoRandom(index, 1) + .5,
|
|
30249
|
+
direction = 2 * pseudoRandom(index, 2) * Math.PI,
|
|
30250
|
+
centerRow = rowCount / 2,
|
|
30251
|
+
centerCol = columnCount / 2,
|
|
30252
|
+
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
30253
|
+
normalizedDistance = Math.min(distance, 1),
|
|
30254
|
+
scatterRatio = (ratio - .4) / .6,
|
|
30255
|
+
movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
|
|
30256
|
+
distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
|
|
30257
|
+
_r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
|
|
30258
|
+
return Math.min(1, Math.max(0, _r));
|
|
30259
|
+
}
|
|
30260
|
+
|
|
30261
|
+
const roughModule = _roughModule;
|
|
30262
|
+
|
|
29926
30263
|
var lottie = {exports: {}};
|
|
29927
30264
|
|
|
29928
30265
|
(function(module,exports){typeof navigator!=="undefined"&&function(global,factory){module.exports=factory();}(commonjsGlobal,function(){var svgNS='http://www.w3.org/2000/svg';var locationHref='';var _useWebWorker=false;var initialDefaultFrame=-999999;var setWebWorker=function setWebWorker(flag){_useWebWorker=!!flag;};var getWebWorker=function getWebWorker(){return _useWebWorker;};var setLocationHref=function setLocationHref(value){locationHref=value;};var getLocationHref=function getLocationHref(){return locationHref;};function createTag(type){// return {appendChild:function(){},setAttribute:function(){},style:{}}
|
|
@@ -30646,17 +30983,17 @@
|
|
|
30646
30983
|
return new Lottie(attributes);
|
|
30647
30984
|
}
|
|
30648
30985
|
|
|
30649
|
-
var __decorate$
|
|
30986
|
+
var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30650
30987
|
var d,
|
|
30651
30988
|
c = arguments.length,
|
|
30652
30989
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
30653
30990
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
30654
30991
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30655
30992
|
},
|
|
30656
|
-
__metadata
|
|
30993
|
+
__metadata = undefined && undefined.__metadata || function (k, v) {
|
|
30657
30994
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
30658
30995
|
},
|
|
30659
|
-
__param
|
|
30996
|
+
__param = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
30660
30997
|
return function (target, key) {
|
|
30661
30998
|
decorator(target, key, paramIndex);
|
|
30662
30999
|
};
|
|
@@ -30666,389 +31003,52 @@
|
|
|
30666
31003
|
super(), this.canvasRenderer = canvasRenderer;
|
|
30667
31004
|
}
|
|
30668
31005
|
};
|
|
30669
|
-
DefaultCanvasLottiePicker = __decorate$
|
|
31006
|
+
DefaultCanvasLottiePicker = __decorate$4([injectable(), __param(0, inject(RectRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasLottiePicker);
|
|
30670
31007
|
|
|
30671
31008
|
let loadLottiePick = !1;
|
|
30672
31009
|
const lottieCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30673
31010
|
loadLottiePick || (loadLottiePick = !0, bind(CanvasLottiePicker).to(DefaultCanvasLottiePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLottiePicker));
|
|
30674
31011
|
});
|
|
30675
31012
|
|
|
30676
|
-
var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30677
|
-
var d,
|
|
30678
|
-
c = arguments.length,
|
|
30679
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
30680
|
-
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);
|
|
30681
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30682
|
-
};
|
|
30683
|
-
let DefaultCanvasLottieRender = class extends exports.DefaultCanvasRectRender {
|
|
30684
|
-
constructor() {
|
|
30685
|
-
super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
|
|
30686
|
-
}
|
|
30687
|
-
drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
30688
|
-
const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
|
|
30689
|
-
super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
|
|
30690
|
-
}
|
|
30691
|
-
_drawShape(lottie, context, x, y, drawContext, params) {
|
|
30692
|
-
var _a;
|
|
30693
|
-
const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
|
|
30694
|
-
{
|
|
30695
|
-
x: originX = lottieAttribute.x,
|
|
30696
|
-
y: originY = lottieAttribute.y
|
|
30697
|
-
} = lottie.attribute;
|
|
30698
|
-
context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
|
|
30699
|
-
const canvas = lottie.canvas;
|
|
30700
|
-
if (canvas) {
|
|
30701
|
-
const pattern = context.createPattern(canvas, "no-repeat"),
|
|
30702
|
-
dpr = context.dpr;
|
|
30703
|
-
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
|
|
30704
|
-
}
|
|
30705
|
-
context.fill();
|
|
30706
|
-
}
|
|
30707
|
-
};
|
|
30708
|
-
DefaultCanvasLottieRender = __decorate$4([injectable()], DefaultCanvasLottieRender);
|
|
30709
|
-
|
|
30710
|
-
let loadLottieModule = !1;
|
|
30711
|
-
const lottieModule = new ContainerModule(bind => {
|
|
30712
|
-
loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
|
|
30713
|
-
});
|
|
30714
|
-
|
|
30715
|
-
const browser = isBrowserEnv();
|
|
30716
|
-
|
|
30717
|
-
function _registerArc() {
|
|
30718
|
-
_registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
|
|
30719
|
-
}
|
|
30720
|
-
_registerArc.__loaded = !1;
|
|
30721
|
-
const registerArc = _registerArc;
|
|
30722
|
-
|
|
30723
|
-
function _registerArc3d() {
|
|
30724
|
-
_registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
30725
|
-
}
|
|
30726
|
-
_registerArc3d.__loaded = !1;
|
|
30727
|
-
const registerArc3d = _registerArc3d;
|
|
30728
|
-
|
|
30729
|
-
function _registerArea() {
|
|
30730
|
-
_registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
30731
|
-
}
|
|
30732
|
-
_registerArea.__loaded = !1;
|
|
30733
|
-
const registerArea = _registerArea;
|
|
30734
|
-
|
|
30735
|
-
function _registerCircle() {
|
|
30736
|
-
_registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
|
|
30737
|
-
}
|
|
30738
|
-
_registerCircle.__loaded = !1;
|
|
30739
|
-
const registerCircle = _registerCircle;
|
|
30740
|
-
|
|
30741
|
-
function _registerGlyph() {
|
|
30742
|
-
_registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
|
|
30743
|
-
}
|
|
30744
|
-
_registerGlyph.__loaded = !1;
|
|
30745
|
-
const registerGlyph = _registerGlyph;
|
|
30746
|
-
|
|
30747
|
-
function _registerGroup() {
|
|
30748
|
-
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
30749
|
-
}
|
|
30750
|
-
_registerGroup.__loaded = !1;
|
|
30751
|
-
const registerGroup = _registerGroup;
|
|
30752
|
-
|
|
30753
|
-
function _registerImage() {
|
|
30754
|
-
_registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
|
|
30755
|
-
}
|
|
30756
|
-
_registerImage.__loaded = !1;
|
|
30757
|
-
const registerImage = _registerImage;
|
|
30758
|
-
|
|
30759
|
-
function _registerLine() {
|
|
30760
|
-
_registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
|
|
30761
|
-
}
|
|
30762
|
-
_registerLine.__loaded = !1;
|
|
30763
|
-
const registerLine = _registerLine;
|
|
30764
|
-
|
|
30765
|
-
function _registerPath() {
|
|
30766
|
-
_registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
|
|
30767
|
-
}
|
|
30768
|
-
_registerPath.__loaded = !1;
|
|
30769
|
-
const registerPath = _registerPath;
|
|
30770
|
-
|
|
30771
|
-
function _registerPolygon() {
|
|
30772
|
-
_registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
|
|
30773
|
-
}
|
|
30774
|
-
_registerPolygon.__loaded = !1;
|
|
30775
|
-
const registerPolygon = _registerPolygon;
|
|
30776
|
-
|
|
30777
|
-
function _registerPyramid3d() {
|
|
30778
|
-
_registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
30779
|
-
}
|
|
30780
|
-
_registerPyramid3d.__loaded = !1;
|
|
30781
|
-
const registerPyramid3d = _registerPyramid3d;
|
|
30782
|
-
|
|
30783
|
-
function _registerRect() {
|
|
30784
|
-
_registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
|
|
30785
|
-
}
|
|
30786
|
-
_registerRect.__loaded = !1;
|
|
30787
|
-
const registerRect = _registerRect;
|
|
30788
|
-
|
|
30789
|
-
function _registerRect3d() {
|
|
30790
|
-
_registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
30791
|
-
}
|
|
30792
|
-
_registerRect3d.__loaded = !1;
|
|
30793
|
-
const registerRect3d = _registerRect3d;
|
|
30794
|
-
|
|
30795
|
-
function _registerRichtext() {
|
|
30796
|
-
_registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
|
|
30797
|
-
}
|
|
30798
|
-
_registerRichtext.__loaded = !1;
|
|
30799
|
-
const registerRichtext = _registerRichtext;
|
|
30800
|
-
|
|
30801
|
-
function _registerShadowRoot() {
|
|
30802
|
-
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
30803
|
-
}
|
|
30804
|
-
_registerShadowRoot.__loaded = !1;
|
|
30805
|
-
const registerShadowRoot = _registerShadowRoot;
|
|
30806
|
-
|
|
30807
|
-
function _registerSymbol() {
|
|
30808
|
-
_registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
|
|
30809
|
-
}
|
|
30810
|
-
_registerSymbol.__loaded = !1;
|
|
30811
|
-
const registerSymbol = _registerSymbol;
|
|
30812
|
-
|
|
30813
|
-
function _registerText() {
|
|
30814
|
-
_registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
|
|
30815
|
-
}
|
|
30816
|
-
_registerText.__loaded = !1;
|
|
30817
|
-
const registerText = _registerText;
|
|
30818
|
-
|
|
30819
31013
|
var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
30820
|
-
|
|
30821
|
-
|
|
30822
|
-
|
|
30823
|
-
|
|
30824
|
-
|
|
30825
|
-
|
|
30826
|
-
|
|
30827
|
-
|
|
30828
|
-
|
|
30829
|
-
|
|
30830
|
-
|
|
30831
|
-
|
|
30832
|
-
|
|
30833
|
-
}
|
|
30834
|
-
|
|
30835
|
-
|
|
30836
|
-
|
|
31014
|
+
var d,
|
|
31015
|
+
c = arguments.length,
|
|
31016
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
31017
|
+
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);
|
|
31018
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31019
|
+
};
|
|
31020
|
+
let DefaultCanvasLottieRender = class extends exports.DefaultCanvasRectRender {
|
|
31021
|
+
constructor() {
|
|
31022
|
+
super(...arguments), this.numberType = LOTTIE_NUMBER_TYPE;
|
|
31023
|
+
}
|
|
31024
|
+
drawShape(lottie, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
31025
|
+
const _fillCb = fillCb || (() => this._drawShape.call(this, lottie, context, x, y, drawContext, params));
|
|
31026
|
+
super.drawShape(lottie, context, x, y, drawContext, params, _fillCb, strokeCb);
|
|
31027
|
+
}
|
|
31028
|
+
_drawShape(lottie, context, x, y, drawContext, params) {
|
|
31029
|
+
var _a;
|
|
31030
|
+
const lottieAttribute = null !== (_a = this.tempTheme) && void 0 !== _a ? _a : getTheme(lottie, null == params ? void 0 : params.theme).rect,
|
|
31031
|
+
{
|
|
31032
|
+
x: originX = lottieAttribute.x,
|
|
31033
|
+
y: originY = lottieAttribute.y
|
|
31034
|
+
} = lottie.attribute;
|
|
31035
|
+
context.setCommonStyle(lottie, lottie.attribute, originX - x, originY - y, lottieAttribute);
|
|
31036
|
+
const canvas = lottie.canvas;
|
|
31037
|
+
if (canvas) {
|
|
31038
|
+
const pattern = context.createPattern(canvas, "no-repeat"),
|
|
31039
|
+
dpr = context.dpr;
|
|
31040
|
+
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, x, y])), context.fillStyle = pattern;
|
|
31041
|
+
}
|
|
31042
|
+
context.fill();
|
|
30837
31043
|
}
|
|
30838
31044
|
};
|
|
30839
|
-
|
|
31045
|
+
DefaultCanvasLottieRender = __decorate$3([injectable()], DefaultCanvasLottieRender);
|
|
30840
31046
|
|
|
30841
|
-
let
|
|
30842
|
-
const
|
|
30843
|
-
|
|
31047
|
+
let loadLottieModule = !1;
|
|
31048
|
+
const lottieModule = new ContainerModule(bind => {
|
|
31049
|
+
loadLottieModule || (loadLottieModule = !0, bind(DefaultCanvasLottieRender).toSelf().inSingletonScope(), bind(GraphicRender).toService(DefaultCanvasLottieRender));
|
|
30844
31050
|
});
|
|
30845
31051
|
|
|
30846
|
-
function _registerStar() {
|
|
30847
|
-
_registerStar.__loaded || (_registerStar.__loaded = !0, registerStarGraphic(), container.load(starModule), container.load(starCanvasPickModule));
|
|
30848
|
-
}
|
|
30849
|
-
_registerStar.__loaded = !1;
|
|
30850
|
-
const registerStar = _registerStar;
|
|
30851
|
-
|
|
30852
|
-
function _registerWrapText() {
|
|
30853
|
-
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
30854
|
-
}
|
|
30855
|
-
_registerWrapText.__loaded = !1;
|
|
30856
|
-
const registerWrapText = _registerWrapText;
|
|
30857
|
-
|
|
30858
|
-
function registerGifGraphic() {
|
|
30859
|
-
graphicCreator.RegisterGraphicCreator("gif", createGifImage);
|
|
30860
|
-
}
|
|
30861
|
-
function _registerGifImage() {
|
|
30862
|
-
_registerGifImage.__loaded || (_registerGifImage.__loaded = !0, registerGifGraphic(), container.load(gifImageModule), container.load(gifImageCanvasPickModule));
|
|
30863
|
-
}
|
|
30864
|
-
_registerGifImage.__loaded = !1;
|
|
30865
|
-
const registerGifImage = _registerGifImage;
|
|
30866
|
-
|
|
30867
|
-
function pseudoRandom(n) {
|
|
30868
|
-
let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
30869
|
-
let hash = 3735928559 ^ seed;
|
|
30870
|
-
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;
|
|
30871
|
-
}
|
|
30872
|
-
function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30873
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30874
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30875
|
-
const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
|
|
30876
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
|
|
30877
|
-
return Math.min(1, Math.max(0, _r));
|
|
30878
|
-
}
|
|
30879
|
-
function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30880
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30881
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30882
|
-
const delay = column / columnCount,
|
|
30883
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30884
|
-
return Math.min(1, Math.max(0, _r));
|
|
30885
|
-
}
|
|
30886
|
-
function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30887
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30888
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30889
|
-
const delay = (columnCount - 1 - column) / columnCount,
|
|
30890
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30891
|
-
return Math.min(1, Math.max(0, _r));
|
|
30892
|
-
}
|
|
30893
|
-
function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30894
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30895
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30896
|
-
const delay = row / rowCount,
|
|
30897
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30898
|
-
return Math.min(1, Math.max(0, _r));
|
|
30899
|
-
}
|
|
30900
|
-
function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30901
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30902
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30903
|
-
const delay = (rowCount - 1 - row) / rowCount,
|
|
30904
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30905
|
-
return Math.min(1, Math.max(0, _r));
|
|
30906
|
-
}
|
|
30907
|
-
function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30908
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30909
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30910
|
-
const centerRow = rowCount / 2,
|
|
30911
|
-
centerCol = columnCount / 2,
|
|
30912
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
|
|
30913
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30914
|
-
return Math.min(1, Math.max(0, _r));
|
|
30915
|
-
}
|
|
30916
|
-
function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30917
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30918
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30919
|
-
const delay = (row / rowCount + column / columnCount) / 2,
|
|
30920
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30921
|
-
return Math.min(1, Math.max(0, _r));
|
|
30922
|
-
}
|
|
30923
|
-
function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30924
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30925
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30926
|
-
const centerRow = rowCount / 2,
|
|
30927
|
-
centerCol = columnCount / 2,
|
|
30928
|
-
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30929
|
-
delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
|
|
30930
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
30931
|
-
return Math.min(1, Math.max(0, _r));
|
|
30932
|
-
}
|
|
30933
|
-
function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30934
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30935
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30936
|
-
const centerRow = rowCount / 2,
|
|
30937
|
-
centerCol = columnCount / 2,
|
|
30938
|
-
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)),
|
|
30939
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
30940
|
-
return Math.min(1, Math.max(0, _r));
|
|
30941
|
-
}
|
|
30942
|
-
function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30943
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30944
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30945
|
-
const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
|
|
30946
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30947
|
-
return Math.min(1, Math.max(0, _r));
|
|
30948
|
-
}
|
|
30949
|
-
function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30950
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30951
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30952
|
-
const rowPhase = row / rowCount,
|
|
30953
|
-
colPhase = column / columnCount,
|
|
30954
|
-
_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;
|
|
30955
|
-
return Math.min(1, Math.max(0, _r));
|
|
30956
|
-
}
|
|
30957
|
-
function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30958
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30959
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30960
|
-
const centerRow = rowCount / 2,
|
|
30961
|
-
centerCol = columnCount / 2,
|
|
30962
|
-
distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
|
|
30963
|
-
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
30964
|
-
delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
|
|
30965
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
30966
|
-
return Math.min(1, Math.max(0, _r));
|
|
30967
|
-
}
|
|
30968
|
-
function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30969
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30970
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30971
|
-
const centerCol = columnCount / 2,
|
|
30972
|
-
distance = Math.abs(column - centerCol) / centerCol,
|
|
30973
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30974
|
-
return Math.min(1, Math.max(0, _r));
|
|
30975
|
-
}
|
|
30976
|
-
function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30977
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30978
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30979
|
-
const centerCol = columnCount / 2,
|
|
30980
|
-
distance = 1 - Math.abs(column - centerCol) / centerCol,
|
|
30981
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30982
|
-
return Math.min(1, Math.max(0, _r));
|
|
30983
|
-
}
|
|
30984
|
-
function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30985
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30986
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30987
|
-
const centerRow = rowCount / 2,
|
|
30988
|
-
distance = Math.abs(row - centerRow) / centerRow,
|
|
30989
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30990
|
-
return Math.min(1, Math.max(0, _r));
|
|
30991
|
-
}
|
|
30992
|
-
function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
30993
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
30994
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
30995
|
-
const centerRow = rowCount / 2,
|
|
30996
|
-
distance = 1 - Math.abs(row - centerRow) / centerRow,
|
|
30997
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
30998
|
-
return Math.min(1, Math.max(0, _r));
|
|
30999
|
-
}
|
|
31000
|
-
function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31001
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31002
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31003
|
-
const centerRow = rowCount / 2,
|
|
31004
|
-
centerCol = columnCount / 2,
|
|
31005
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
31006
|
-
normalizedDistance = Math.min(distance, 1),
|
|
31007
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
31008
|
-
return Math.min(1, Math.max(0, _r));
|
|
31009
|
-
}
|
|
31010
|
-
function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31011
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31012
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31013
|
-
const centerRow = rowCount / 2,
|
|
31014
|
-
centerCol = columnCount / 2,
|
|
31015
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
31016
|
-
normalizedDistance = 1 - Math.min(distance, 1),
|
|
31017
|
-
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
31018
|
-
return Math.min(1, Math.max(0, _r));
|
|
31019
|
-
}
|
|
31020
|
-
function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31021
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31022
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31023
|
-
const centerRow = rowCount / 2,
|
|
31024
|
-
centerCol = columnCount / 2,
|
|
31025
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
31026
|
-
normalizedDistance = Math.min(distance, 1),
|
|
31027
|
-
wavePhase = 2 * ratio * Math.PI * 3,
|
|
31028
|
-
decay = Math.max(0, 1 - normalizedDistance),
|
|
31029
|
-
_r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
|
|
31030
|
-
return Math.min(1, Math.max(0, _r));
|
|
31031
|
-
}
|
|
31032
|
-
function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31033
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31034
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31035
|
-
const index = row * columnCount + column,
|
|
31036
|
-
phase = 2 * pseudoRandom(index, 0) * Math.PI,
|
|
31037
|
-
speed = .5 * pseudoRandom(index, 1) + .5,
|
|
31038
|
-
direction = 2 * pseudoRandom(index, 2) * Math.PI,
|
|
31039
|
-
centerRow = rowCount / 2,
|
|
31040
|
-
centerCol = columnCount / 2,
|
|
31041
|
-
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
31042
|
-
normalizedDistance = Math.min(distance, 1),
|
|
31043
|
-
scatterRatio = (ratio - .4) / .6,
|
|
31044
|
-
movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
|
|
31045
|
-
distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
|
|
31046
|
-
_r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
|
|
31047
|
-
return Math.min(1, Math.max(0, _r));
|
|
31048
|
-
}
|
|
31049
|
-
|
|
31050
|
-
const roughModule = _roughModule;
|
|
31051
|
-
|
|
31052
31052
|
class Easing {
|
|
31053
31053
|
constructor() {}
|
|
31054
31054
|
static linear(t) {
|
|
@@ -32500,7 +32500,7 @@
|
|
|
32500
32500
|
}
|
|
32501
32501
|
class AStageAnimate extends ACustomAnimate {
|
|
32502
32502
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
32503
|
-
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this._beforeStageRender = () => {
|
|
32503
|
+
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this.checkStatusAfterRender = !0, this._beforeStageRender = () => {
|
|
32504
32504
|
if (!this.willCallBeforeStageRender) return;
|
|
32505
32505
|
this.willCallBeforeStageRender = !1;
|
|
32506
32506
|
const stage = this.target.stage,
|
|
@@ -32513,7 +32513,7 @@
|
|
|
32513
32513
|
const stage = this.target.stage,
|
|
32514
32514
|
canvas = stage.window.getContext().canvas.nativeCanvas,
|
|
32515
32515
|
outputCanvas = this.afterStageRender(stage, canvas);
|
|
32516
|
-
outputCanvas && this.renderToStage(stage, outputCanvas);
|
|
32516
|
+
outputCanvas && this.renderToStage(stage, outputCanvas), this.checkStatusAfterRender && this.animate.status === exports.AnimateStatus.END && this.animate.timeline.removeAnimate(this.animate);
|
|
32517
32517
|
}, this.props = {};
|
|
32518
32518
|
}
|
|
32519
32519
|
beforeStageRender(stage, canvas) {
|
|
@@ -37485,14 +37485,20 @@
|
|
|
37485
37485
|
x: x,
|
|
37486
37486
|
y: y
|
|
37487
37487
|
} = this.stage.eventPointTransform(e);
|
|
37488
|
-
let
|
|
37489
|
-
|
|
37488
|
+
let currentPos,
|
|
37489
|
+
currentScrollValue = 0,
|
|
37490
37490
|
delta = 0;
|
|
37491
37491
|
const {
|
|
37492
|
-
|
|
37493
|
-
|
|
37494
|
-
|
|
37495
|
-
|
|
37492
|
+
width: width,
|
|
37493
|
+
height: height
|
|
37494
|
+
} = this.getSliderRenderBounds(),
|
|
37495
|
+
track = "vertical" === direction ? height : width,
|
|
37496
|
+
travel = Math.max(track - this._sliderSize, 0),
|
|
37497
|
+
{
|
|
37498
|
+
range: range
|
|
37499
|
+
} = this.attribute,
|
|
37500
|
+
ratio = clamp$1(range[1] - range[0], 0, 1);
|
|
37501
|
+
return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos) : (currentPos = x, delta = currentPos - this._prePos), currentScrollValue = travel > 0 && ratio < 1 ? delta / travel * (1 - ratio) : 0, [currentPos, currentScrollValue];
|
|
37496
37502
|
}, this._onSliderPointerMove = e => {
|
|
37497
37503
|
const {
|
|
37498
37504
|
stopSliderMovePropagation = !0
|
|
@@ -37637,15 +37643,24 @@
|
|
|
37637
37643
|
}
|
|
37638
37644
|
_getSliderPos(range) {
|
|
37639
37645
|
const {
|
|
37640
|
-
direction: direction
|
|
37646
|
+
direction: direction,
|
|
37647
|
+
minSliderSize = 0
|
|
37641
37648
|
} = this.attribute,
|
|
37642
37649
|
{
|
|
37643
37650
|
width: width,
|
|
37644
37651
|
height: height,
|
|
37645
37652
|
x1: x1,
|
|
37646
37653
|
y1: y1
|
|
37647
|
-
} = this.getSliderRenderBounds()
|
|
37648
|
-
|
|
37654
|
+
} = this.getSliderRenderBounds(),
|
|
37655
|
+
track = "horizontal" === direction ? width : height,
|
|
37656
|
+
origin = "horizontal" === direction ? x1 : y1,
|
|
37657
|
+
start = clamp$1(range[0], 0, 1),
|
|
37658
|
+
end = clamp$1(range[1], 0, 1),
|
|
37659
|
+
ratio = clamp$1(end - start, 0, 1),
|
|
37660
|
+
L = Math.max(ratio * track, minSliderSize),
|
|
37661
|
+
T = Math.max(track - L, 0),
|
|
37662
|
+
pStart = origin + start / Math.max(1 - ratio, 1e-12) * T;
|
|
37663
|
+
return [pStart, pStart + L];
|
|
37649
37664
|
}
|
|
37650
37665
|
_getScrollRange() {
|
|
37651
37666
|
if (this._sliderLimitRange) return this._sliderLimitRange;
|
|
@@ -37685,6 +37700,7 @@
|
|
|
37685
37700
|
direction: "horizontal",
|
|
37686
37701
|
round: !0,
|
|
37687
37702
|
sliderSize: 20,
|
|
37703
|
+
minSliderSize: 0,
|
|
37688
37704
|
sliderStyle: {
|
|
37689
37705
|
fill: "rgba(0, 0, 0, .5)"
|
|
37690
37706
|
},
|
|
@@ -50690,6 +50706,8 @@
|
|
|
50690
50706
|
class Brush extends AbstractComponent {
|
|
50691
50707
|
constructor(attributes, options) {
|
|
50692
50708
|
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 => {
|
|
50709
|
+
if (!1 === this.attribute.interactive) return;
|
|
50710
|
+
if (!1 === this._beforeBrushEvent(e)) return;
|
|
50693
50711
|
const {
|
|
50694
50712
|
updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
|
|
50695
50713
|
endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
|
|
@@ -50697,11 +50715,11 @@
|
|
|
50697
50715
|
} = this.attribute;
|
|
50698
50716
|
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];
|
|
50699
50717
|
}, this._onBrushing = e => {
|
|
50700
|
-
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)));
|
|
50718
|
+
!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))));
|
|
50701
50719
|
}, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
|
|
50702
|
-
this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1;
|
|
50720
|
+
!1 !== this.attribute.interactive && (this._releaseBrushUpdateEvents(), e.preventDefault(), this._activeDrawState && this._drawEnd(e), this._activeMoveState && this._moveEnd(e), this._activeDrawState = !1, this._activeMoveState = !1);
|
|
50703
50721
|
}, this._onBrushClear = e => {
|
|
50704
|
-
e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(exports.IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1;
|
|
50722
|
+
!1 !== this.attribute.interactive && !1 !== this._beforeBrushEvent(e) && (e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(exports.IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1);
|
|
50705
50723
|
};
|
|
50706
50724
|
}
|
|
50707
50725
|
_bindBrushEvents() {
|
|
@@ -50713,6 +50731,7 @@
|
|
|
50713
50731
|
array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
|
|
50714
50732
|
}
|
|
50715
50733
|
_initDraw(e) {
|
|
50734
|
+
if (!1 === this.attribute.interactive) return;
|
|
50716
50735
|
const {
|
|
50717
50736
|
brushMode: brushMode
|
|
50718
50737
|
} = this.attribute,
|
|
@@ -50721,6 +50740,7 @@
|
|
|
50721
50740
|
}
|
|
50722
50741
|
_initMove(e) {
|
|
50723
50742
|
var _a, _b;
|
|
50743
|
+
if (!1 === this.attribute.interactive) return;
|
|
50724
50744
|
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;
|
|
50725
50745
|
const {
|
|
50726
50746
|
interactiveRange: interactiveRange
|
|
@@ -50745,6 +50765,7 @@
|
|
|
50745
50765
|
}
|
|
50746
50766
|
_drawing(e) {
|
|
50747
50767
|
var _a;
|
|
50768
|
+
if (!1 === this.attribute.interactive) return;
|
|
50748
50769
|
const pos = this.eventPosToStagePos(e),
|
|
50749
50770
|
{
|
|
50750
50771
|
brushType: brushType,
|
|
@@ -50769,6 +50790,7 @@
|
|
|
50769
50790
|
(Math.abs(x2 - x1) > sizeThreshold || Math.abs(y1 - y2) > sizeThreshold) && (1 !== Object.keys(this._brushMaskAABBBoundsDict).length || this._activeBrushState ? this._dispatchBrushEvent(exports.IOperateType.drawing, e) : (this._activeBrushState = !0, this._dispatchBrushEvent(exports.IOperateType.brushActive, e)));
|
|
50770
50791
|
}
|
|
50771
50792
|
_moving(e) {
|
|
50793
|
+
if (!1 === this.attribute.interactive) return;
|
|
50772
50794
|
const startPos = this._cacheMovePoint,
|
|
50773
50795
|
pos = this.eventPosToStagePos(e);
|
|
50774
50796
|
if (pos.x === (null == startPos ? void 0 : startPos.x) && pos.y === (null == startPos ? void 0 : startPos.y)) return;
|
|
@@ -50782,6 +50804,7 @@
|
|
|
50782
50804
|
}), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(exports.IOperateType.moving, e);
|
|
50783
50805
|
}
|
|
50784
50806
|
_drawEnd(e) {
|
|
50807
|
+
if (!1 === this.attribute.interactive) return;
|
|
50785
50808
|
const {
|
|
50786
50809
|
removeOnClick = !0,
|
|
50787
50810
|
sizeThreshold = DEFAULT_SIZE_THRESHOLD
|
|
@@ -50799,7 +50822,7 @@
|
|
|
50799
50822
|
}
|
|
50800
50823
|
}
|
|
50801
50824
|
_moveEnd(e) {
|
|
50802
|
-
this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(exports.IOperateType.moveEnd, e);
|
|
50825
|
+
!1 !== this.attribute.interactive && (this._operatingMask && this._operatingMask.setAttribute("pickable", !1), this._dispatchBrushEvent(exports.IOperateType.moveEnd, e));
|
|
50803
50826
|
}
|
|
50804
50827
|
render() {
|
|
50805
50828
|
this._bindBrushEvents();
|
|
@@ -50906,6 +50929,10 @@
|
|
|
50906
50929
|
pos = this.eventPosToStagePos(e);
|
|
50907
50930
|
return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
|
|
50908
50931
|
}
|
|
50932
|
+
_beforeBrushEvent(e) {
|
|
50933
|
+
var _a, _b;
|
|
50934
|
+
return null === (_b = (_a = this.attribute).beforeBrushChange) || void 0 === _b ? void 0 : _b.call(_a, e);
|
|
50935
|
+
}
|
|
50909
50936
|
_dispatchBrushEvent(operateType, e) {
|
|
50910
50937
|
this._dispatchEvent(operateType, {
|
|
50911
50938
|
operateMask: this._operatingMask,
|
|
@@ -53023,7 +53050,7 @@
|
|
|
53023
53050
|
select: !0
|
|
53024
53051
|
};
|
|
53025
53052
|
|
|
53026
|
-
const version = "1.0.
|
|
53053
|
+
const version = "1.0.39";
|
|
53027
53054
|
preLoadAllModule();
|
|
53028
53055
|
if (isBrowserEnv()) {
|
|
53029
53056
|
loadBrowserEnv(container);
|