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