sculp-js 1.13.3-beta.0 → 1.13.6

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.
Files changed (119) hide show
  1. package/dist/cjs/_virtual/_commonjsHelpers.js +3 -3
  2. package/dist/cjs/array.js +36 -46
  3. package/dist/cjs/async.js +41 -43
  4. package/dist/cjs/base64.js +77 -66
  5. package/dist/cjs/clipboard.js +54 -53
  6. package/dist/cjs/cloneDeep.js +90 -91
  7. package/dist/cjs/cookie.js +27 -30
  8. package/dist/cjs/date.js +101 -98
  9. package/dist/cjs/dom.js +114 -121
  10. package/dist/cjs/download.js +77 -78
  11. package/dist/cjs/easing.js +29 -32
  12. package/dist/cjs/file.js +147 -152
  13. package/dist/cjs/func.js +64 -78
  14. package/dist/cjs/index.js +1 -3
  15. package/dist/cjs/math.js +32 -38
  16. package/dist/cjs/node_modules/bezier-easing/src/index.js +35 -23
  17. package/dist/cjs/number.js +58 -61
  18. package/dist/cjs/object.js +112 -126
  19. package/dist/cjs/path.js +39 -43
  20. package/dist/cjs/qs.js +34 -41
  21. package/dist/cjs/random.js +31 -34
  22. package/dist/cjs/string.js +62 -63
  23. package/dist/cjs/tooltip.js +66 -69
  24. package/dist/cjs/tree.js +265 -263
  25. package/dist/cjs/type.js +42 -46
  26. package/dist/cjs/unique.js +39 -42
  27. package/dist/cjs/url.js +47 -48
  28. package/dist/cjs/validator.js +38 -38
  29. package/dist/cjs/variable.js +27 -21
  30. package/dist/cjs/watermark.js +78 -67
  31. package/dist/esm/array.js +36 -46
  32. package/dist/esm/async.js +41 -43
  33. package/dist/esm/base64.js +77 -66
  34. package/dist/esm/clipboard.js +55 -54
  35. package/dist/esm/cloneDeep.js +90 -91
  36. package/dist/esm/cookie.js +27 -30
  37. package/dist/esm/date.js +101 -98
  38. package/dist/esm/dom.js +114 -121
  39. package/dist/esm/download.js +78 -79
  40. package/dist/esm/easing.js +29 -32
  41. package/dist/esm/file.js +147 -152
  42. package/dist/esm/func.js +64 -78
  43. package/dist/esm/index.js +96 -8
  44. package/dist/esm/math.js +32 -38
  45. package/dist/esm/number.js +58 -61
  46. package/dist/esm/object.js +124 -127
  47. package/dist/esm/path.js +39 -43
  48. package/dist/esm/qs.js +34 -41
  49. package/dist/esm/random.js +31 -34
  50. package/dist/esm/string.js +74 -64
  51. package/dist/esm/tooltip.js +66 -69
  52. package/dist/esm/tree.js +265 -263
  53. package/dist/esm/type.js +68 -47
  54. package/dist/esm/unique.js +39 -42
  55. package/dist/esm/url.js +47 -48
  56. package/dist/esm/validator.js +56 -39
  57. package/dist/esm/variable.js +27 -21
  58. package/dist/esm/watermark.js +79 -68
  59. package/dist/types/array.d.ts +0 -1
  60. package/dist/types/async.d.ts +0 -1
  61. package/dist/types/base64.d.ts +0 -1
  62. package/dist/types/clipboard.d.ts +0 -1
  63. package/dist/types/cloneDeep.d.ts +0 -1
  64. package/dist/types/cookie.d.ts +0 -1
  65. package/dist/types/date.d.ts +0 -1
  66. package/dist/types/dom.d.ts +0 -1
  67. package/dist/types/download.d.ts +0 -1
  68. package/dist/types/easing.d.ts +0 -1
  69. package/dist/types/file.d.ts +0 -1
  70. package/dist/types/func.d.ts +0 -1
  71. package/dist/types/index.d.ts +0 -1
  72. package/dist/types/math.d.ts +0 -1
  73. package/dist/types/number.d.ts +0 -1
  74. package/dist/types/object.d.ts +0 -1
  75. package/dist/types/path.d.ts +0 -1
  76. package/dist/types/qs.d.ts +0 -1
  77. package/dist/types/random.d.ts +0 -1
  78. package/dist/types/string.d.ts +0 -1
  79. package/dist/types/tooltip.d.ts +0 -1
  80. package/dist/types/tree.d.ts +2 -2
  81. package/dist/types/type.d.ts +0 -1
  82. package/dist/types/unique.d.ts +0 -1
  83. package/dist/types/url.d.ts +0 -1
  84. package/dist/types/validator.d.ts +0 -1
  85. package/dist/types/variable.d.ts +0 -1
  86. package/dist/types/watermark.d.ts +0 -1
  87. package/dist/umd/index.min.js +2 -2
  88. package/package.json +12 -6
  89. package/dist/types/array.d.ts.map +0 -1
  90. package/dist/types/async.d.ts.map +0 -1
  91. package/dist/types/base64.d.ts.map +0 -1
  92. package/dist/types/clipboard.d.ts.map +0 -1
  93. package/dist/types/cloneDeep.d.ts.map +0 -1
  94. package/dist/types/cookie.d.ts.map +0 -1
  95. package/dist/types/core-index.d.ts +0 -17
  96. package/dist/types/core-index.d.ts.map +0 -1
  97. package/dist/types/date.d.ts.map +0 -1
  98. package/dist/types/dom.d.ts.map +0 -1
  99. package/dist/types/download.d.ts.map +0 -1
  100. package/dist/types/easing.d.ts.map +0 -1
  101. package/dist/types/file.d.ts.map +0 -1
  102. package/dist/types/func.d.ts.map +0 -1
  103. package/dist/types/index.d.ts.map +0 -1
  104. package/dist/types/index.js +0 -3278
  105. package/dist/types/math.d.ts.map +0 -1
  106. package/dist/types/number.d.ts.map +0 -1
  107. package/dist/types/object.d.ts.map +0 -1
  108. package/dist/types/path.d.ts.map +0 -1
  109. package/dist/types/qs.d.ts.map +0 -1
  110. package/dist/types/random.d.ts.map +0 -1
  111. package/dist/types/string.d.ts.map +0 -1
  112. package/dist/types/tooltip.d.ts.map +0 -1
  113. package/dist/types/tree.d.ts.map +0 -1
  114. package/dist/types/type.d.ts.map +0 -1
  115. package/dist/types/unique.d.ts.map +0 -1
  116. package/dist/types/url.d.ts.map +0 -1
  117. package/dist/types/validator.d.ts.map +0 -1
  118. package/dist/types/variable.d.ts.map +0 -1
  119. package/dist/types/watermark.d.ts.map +0 -1
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * sculp-js v1.13.3-beta.0
2
+ * sculp-js v1.13.6
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import { isString, isNullOrUnDef } from './type.js';
7
+ import { isNullOrUnDef, isString } from './type.js';
8
8
 
9
9
  /*
10
10
  * @created: Saturday, 2020-04-18 14:38:23
@@ -18,74 +18,85 @@ import { isString, isNullOrUnDef } from './type.js';
18
18
  * @example genCanvasWM({ content: 'QQMusicFE' })
19
19
  */
20
20
  function genCanvasWM(content = '请勿外传', canvasWM) {
21
- const { rootContainer = document.body, width = '300px', height = '150px', textAlign = 'center', textBaseline = 'middle', font = '20px PingFangSC-Medium,PingFang SC',
21
+ const {
22
+ rootContainer = document.body,
23
+ width = '300px',
24
+ height = '150px',
25
+ textAlign = 'center',
26
+ textBaseline = 'middle',
27
+ font = '20px PingFangSC-Medium,PingFang SC',
22
28
  // fontWeight = 500,
23
- fillStyle = 'rgba(189, 177, 167, .3)', rotate = -20, zIndex = 2147483647, watermarkId = '__wm' } = isNullOrUnDef(canvasWM) ? {} : canvasWM;
24
- const container = isString(rootContainer) ? document.querySelector(rootContainer) : rootContainer;
25
- if (!container) {
26
- throw new Error(`${rootContainer} is not valid Html Element or element selector`);
27
- }
28
- const canvas = document.createElement('canvas');
29
- canvas.setAttribute('width', width);
30
- canvas.setAttribute('height', height);
31
- const ctx = canvas.getContext('2d');
32
- ctx.textAlign = textAlign;
33
- ctx.textBaseline = textBaseline;
34
- ctx.font = font;
35
- // ctx!.fontWeight = fontWeight;
36
- ctx.fillStyle = fillStyle;
37
- ctx.rotate((Math.PI / 180) * rotate);
38
- ctx.fillText(content, parseFloat(width) / 4, parseFloat(height) / 2);
39
- const base64Url = canvas.toDataURL();
40
- const __wm = document.querySelector(`#${watermarkId}`);
41
- const watermarkDiv = __wm || document.createElement('div');
42
- const styleStr = `opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${zIndex}; pointer-events:none; background-repeat:repeat; background-image:url('${base64Url}')`;
43
- watermarkDiv.setAttribute('style', styleStr);
44
- watermarkDiv.setAttribute('id', watermarkId);
45
- watermarkDiv.classList.add('nav-height');
46
- if (!__wm) {
47
- container.style.position = 'relative';
48
- container.appendChild(watermarkDiv);
49
- }
50
- const getMutableStyle = (ele) => {
51
- const computedStyle = getComputedStyle(ele);
52
- return {
53
- opacity: computedStyle.getPropertyValue('opacity'),
54
- zIndex: computedStyle.getPropertyValue('z-index'),
55
- display: computedStyle.getPropertyValue('display'),
56
- visibility: computedStyle.getPropertyValue('visibility')
57
- };
29
+ fillStyle = 'rgba(189, 177, 167, .3)',
30
+ rotate = -20,
31
+ zIndex = 2147483647,
32
+ watermarkId = '__wm'
33
+ } = isNullOrUnDef(canvasWM) ? {} : canvasWM;
34
+ const container = isString(rootContainer) ? document.querySelector(rootContainer) : rootContainer;
35
+ if (!container) {
36
+ throw new Error(`${rootContainer} is not valid Html Element or element selector`);
37
+ }
38
+ const canvas = document.createElement('canvas');
39
+ canvas.setAttribute('width', width);
40
+ canvas.setAttribute('height', height);
41
+ const ctx = canvas.getContext('2d');
42
+ ctx.textAlign = textAlign;
43
+ ctx.textBaseline = textBaseline;
44
+ ctx.font = font;
45
+ // ctx!.fontWeight = fontWeight;
46
+ ctx.fillStyle = fillStyle;
47
+ ctx.rotate((Math.PI / 180) * rotate);
48
+ ctx.fillText(content, parseFloat(width) / 4, parseFloat(height) / 2);
49
+ const base64Url = canvas.toDataURL();
50
+ const __wm = document.querySelector(`#${watermarkId}`);
51
+ const watermarkDiv = __wm || document.createElement('div');
52
+ const styleStr = `opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${zIndex}; pointer-events:none; background-repeat:repeat; background-image:url('${base64Url}')`;
53
+ watermarkDiv.setAttribute('style', styleStr);
54
+ watermarkDiv.setAttribute('id', watermarkId);
55
+ watermarkDiv.classList.add('nav-height');
56
+ if (!__wm) {
57
+ container.style.position = 'relative';
58
+ container.appendChild(watermarkDiv);
59
+ }
60
+ const getMutableStyle = ele => {
61
+ const computedStyle = getComputedStyle(ele);
62
+ return {
63
+ opacity: computedStyle.getPropertyValue('opacity'),
64
+ zIndex: computedStyle.getPropertyValue('z-index'),
65
+ display: computedStyle.getPropertyValue('display'),
66
+ visibility: computedStyle.getPropertyValue('visibility')
58
67
  };
59
- //@ts-ignore
60
- const MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
61
- if (MutationObserver) {
62
- let mo = new MutationObserver(function () {
63
- let __wm = document.querySelector(`#${watermarkId}`); // 只在__wm元素变动才重新调用 __canvasWM
64
- if (!__wm) {
65
- // 避免一直触发
66
- // console.log('regenerate watermark by delete::')
67
- mo.disconnect();
68
- mo = null;
69
- genCanvasWM(content, canvasWM);
70
- }
71
- else {
72
- const { opacity, zIndex, display, visibility } = getMutableStyle(__wm);
73
- if ((__wm && __wm.getAttribute('style') !== styleStr) ||
74
- !__wm ||
75
- !(opacity === '1' && zIndex === '2147483647' && display === 'block' && visibility === 'visible')) {
76
- // 避免一直触发
77
- // console.log('regenerate watermark by inline style changed ::')
78
- mo.disconnect();
79
- mo = null;
80
- container.removeChild(__wm);
81
- // @ts-ignore
82
- __wm = null;
83
- genCanvasWM(content, canvasWM);
84
- }
85
- }
86
- });
87
- mo.observe(container, { attributes: true, subtree: true, childList: true });
88
- }
68
+ };
69
+ //@ts-ignore
70
+ const MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
71
+ if (MutationObserver) {
72
+ let mo = new MutationObserver(function () {
73
+ let __wm = document.querySelector(`#${watermarkId}`); // 只在__wm元素变动才重新调用 __canvasWM
74
+ if (!__wm) {
75
+ // 避免一直触发
76
+ // console.log('regenerate watermark by delete::')
77
+ mo.disconnect();
78
+ mo = null;
79
+ genCanvasWM(content, canvasWM);
80
+ } else {
81
+ const { opacity, zIndex, display, visibility } = getMutableStyle(__wm);
82
+ if (
83
+ (__wm && __wm.getAttribute('style') !== styleStr) ||
84
+ !__wm ||
85
+ !(opacity === '1' && zIndex === '2147483647' && display === 'block' && visibility === 'visible')
86
+ ) {
87
+ // 避免一直触发
88
+ // console.log('regenerate watermark by inline style changed ::')
89
+ mo.disconnect();
90
+ mo = null;
91
+ container.removeChild(__wm);
92
+ // @ts-ignore
93
+ __wm = null;
94
+ genCanvasWM(content, canvasWM);
95
+ }
96
+ }
97
+ });
98
+ mo.observe(container, { attributes: true, subtree: true, childList: true });
99
+ }
89
100
  }
90
101
 
91
102
  export { genCanvasWM };
@@ -47,4 +47,3 @@ export declare function arrayInsertBefore(array: AnyArray, start: number, to: nu
47
47
  * @returns {V[]}
48
48
  */
49
49
  export declare function arrayRemove<V>(array: V[], expect: (val: V, idx: number) => boolean): V[];
50
- //# sourceMappingURL=array.d.ts.map
@@ -34,4 +34,3 @@ export declare function asyncMap<T, R>(list: Array<T>, mapper: (val: T, idx: num
34
34
  }
35
35
  */
36
36
  export declare function safeAwait<T, U = Error>(promise: Promise<T>, errorExt?: object): Promise<[U, undefined] | [null, T]>;
37
- //# sourceMappingURL=async.d.ts.map
@@ -22,4 +22,3 @@ export declare function b64decode(base64: string): string;
22
22
  * @returns base64编码的字符串
23
23
  */
24
24
  export declare function b64encode(rawStr: string): string;
25
- //# sourceMappingURL=base64.d.ts.map
@@ -17,4 +17,3 @@ export declare function copyText(text: string, options?: CopyTextOptions): void;
17
17
  */
18
18
  export declare function fallbackCopyText(text: string, options?: CopyTextOptions): void;
19
19
  export {};
20
- //# sourceMappingURL=clipboard.d.ts.map
@@ -9,4 +9,3 @@
9
9
  * @returns {T}
10
10
  */
11
11
  export declare function cloneDeep<T>(source: T, map?: WeakMap<any, any>): T;
12
- //# sourceMappingURL=cloneDeep.d.ts.map
@@ -16,4 +16,3 @@ export declare function cookieSet(name: string, value: string, maxAge?: number |
16
16
  * @param name cookie 名称
17
17
  */
18
18
  export declare const cookieDel: (name: string) => void;
19
- //# sourceMappingURL=cookie.d.ts.map
@@ -71,4 +71,3 @@ export declare function calculateDate(originDate: DateValue, n: number, sep?: st
71
71
  * @returns {string} 转换后的目标日期时间
72
72
  */
73
73
  export declare function calculateDateTime(originDateTime: DateValue, n: number, dateSep?: string, timeSep?: string): string;
74
- //# sourceMappingURL=date.d.ts.map
@@ -71,4 +71,3 @@ export declare function getStrWidthPx(str: string, fontSize?: number, isRemove?:
71
71
  */
72
72
  export declare function select(element: HTMLElement): any;
73
73
  export {};
74
- //# sourceMappingURL=dom.d.ts.map
@@ -44,4 +44,3 @@ export type FileType = 'json' | 'csv' | 'xls' | 'xlsx';
44
44
  */
45
45
  export declare function downloadData(data: AnyObject | AnyObject[], fileType: FileType, filename: string, headers?: string[]): void;
46
46
  export {};
47
- //# sourceMappingURL=download.d.ts.map
@@ -29,4 +29,3 @@ export declare function easingFunctional(name: EasingNameOrDefine): EasingFuncti
29
29
  * @returns {string}
30
30
  */
31
31
  export declare function easingStringify(name: EasingNameOrDefine): string;
32
- //# sourceMappingURL=easing.d.ts.map
@@ -41,4 +41,3 @@ export interface ICompressImgResult {
41
41
  */
42
42
  export declare function compressImg(file: File | FileList, options?: ICompressOptions): Promise<ICompressImgResult | ICompressImgResult[] | null>;
43
43
  export {};
44
- //# sourceMappingURL=file.d.ts.map
@@ -47,4 +47,3 @@ export declare function setGlobal(key: string | number | symbol, val?: any): voi
47
47
  * @param val
48
48
  */
49
49
  export declare function getGlobal<T>(key: string | number | symbol): T | void;
50
- //# sourceMappingURL=func.d.ts.map
@@ -25,4 +25,3 @@ export * from './validator';
25
25
  export * from './variable';
26
26
  export * from './cloneDeep';
27
27
  export * from './easing';
28
- //# sourceMappingURL=index.d.ts.map
@@ -33,4 +33,3 @@ type NumberType = number | string;
33
33
  */
34
34
  export declare function strip(num: NumberType, precision?: number): number;
35
35
  export {};
36
- //# sourceMappingURL=math.d.ts.map
@@ -46,4 +46,3 @@ export declare function humanFileSize(num: number | string, options?: IHumanFile
46
46
  */
47
47
  export declare function formatNumber(num: number | string, decimals?: number): string;
48
48
  export { formatNumber as formatMoney };
49
- //# sourceMappingURL=number.d.ts.map
@@ -67,4 +67,3 @@ export declare function objectGet(obj: AnyObject | AnyArray | undefined, path: s
67
67
  k: string | undefined;
68
68
  v: any | undefined;
69
69
  };
70
- //# sourceMappingURL=object.d.ts.map
@@ -11,4 +11,3 @@ export declare const pathNormalize: (path: string) => string;
11
11
  * @returns {string}
12
12
  */
13
13
  export declare const pathJoin: (from: string, ...to: string[]) => string;
14
- //# sourceMappingURL=path.d.ts.map
@@ -19,4 +19,3 @@ export type Replacer = (value: LooseParamValue) => string | null;
19
19
  * @returns {string}
20
20
  */
21
21
  export declare function qsStringify(query: LooseParams, replacer?: Replacer): string;
22
- //# sourceMappingURL=qs.d.ts.map
@@ -24,4 +24,3 @@ export declare const randomString: RandomString;
24
24
  * @returns {string}
25
25
  */
26
26
  export declare function randomUuid(): string;
27
- //# sourceMappingURL=random.d.ts.map
@@ -64,4 +64,3 @@ export declare const stringFill: (length: number, value?: string) => string;
64
64
  * @returns {Record<string, string | string[]>}
65
65
  */
66
66
  export declare function parseQueryParams(searchStr?: string): Record<string, string | string[]>;
67
- //# sourceMappingURL=string.d.ts.map
@@ -33,4 +33,3 @@ declare const tooltipEvent: {
33
33
  handleMouseLeave: typeof handleMouseLeave;
34
34
  };
35
35
  export { tooltipEvent };
36
- //# sourceMappingURL=tooltip.d.ts.map
@@ -20,7 +20,8 @@ export interface IFilterCondition<V> {
20
20
  * @param {options} options 支持定制子元素名称、反向遍历、广度优先遍历,默认{
21
21
  childField: 'children',
22
22
  reverse: false,
23
- breadthFirst: false
23
+ breadthFirst: false,
24
+ isDomNode: false,
24
25
  }
25
26
  * @returns {*}
26
27
  */
@@ -96,4 +97,3 @@ export declare function flatTree(treeList: any[], options?: IFieldOptions): any[
96
97
  * @returns {V[]}
97
98
  */
98
99
  export declare function fuzzySearchTree<V>(nodes: V[], filterCondition: IFilterCondition<V>, options?: ISearchTreeOpts): V[];
99
- //# sourceMappingURL=tree.d.ts.map
@@ -125,4 +125,3 @@ export declare function isEmpty(value: any): boolean;
125
125
  */
126
126
  export declare function isNodeList(value: any): boolean;
127
127
  export default typeIs;
128
- //# sourceMappingURL=type.d.ts.map
@@ -18,4 +18,3 @@ export interface UniqueString {
18
18
  * @returns {string}
19
19
  */
20
20
  export declare const uniqueString: UniqueString;
21
- //# sourceMappingURL=unique.d.ts.map
@@ -43,4 +43,3 @@ export declare const urlSetParams: (url: string, setter: AnyObject) => string;
43
43
  * @returns {string}
44
44
  */
45
45
  export declare const urlDelParams: (url: string, removeKeys: string[]) => string;
46
- //# sourceMappingURL=url.d.ts.map
@@ -64,4 +64,3 @@ export declare const isNumerical: (value: string) => boolean;
64
64
  * @returns {boolean}
65
65
  */
66
66
  export declare const isDigit: (value: string) => boolean;
67
- //# sourceMappingURL=validator.d.ts.map
@@ -68,4 +68,3 @@ export declare function replaceVarFromString(sourceStr: string, targetObj: Recor
68
68
  * executeInScope("return $.fun.time.now()", scope)
69
69
  */
70
70
  export declare function executeInScope(code: string, scope?: Record<string, any>): any;
71
- //# sourceMappingURL=variable.d.ts.map
@@ -16,4 +16,3 @@ export interface ICanvasWM {
16
16
  * @example genCanvasWM({ content: 'QQMusicFE' })
17
17
  */
18
18
  export declare function genCanvasWM(content?: string, canvasWM?: ICanvasWM): void;
19
- //# sourceMappingURL=watermark.d.ts.map
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * sculp-js v1.13.3-beta.0
2
+ * sculp-js v1.13.6
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sculpJs={})}(this,(function(e){"use strict";function t(e,t,n=!1){if(n)for(let n=e.length-1;n>=0;n--){const r=t(e[n],n,e);if(!1===r)break}else for(let n=0,r=e.length;n<r;n++){const r=t(e[n],n,e);if(!1===r)break}e=null}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r=.1,o="function"==typeof Float32Array;function i(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function a(e){return 3*e}function l(e,t,n){return((i(t,n)*e+s(t,n))*e+a(t))*e}function c(e,t,n){return 3*i(t,n)*e*e+2*s(t,n)*e+a(t)}function u(e){return e}var d=n((function(e,t,n,i){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&n===i)return u;for(var s=o?new Float32Array(11):new Array(11),a=0;a<11;++a)s[a]=l(a*r,e,n);function d(t){for(var o=0,i=1;10!==i&&s[i]<=t;++i)o+=r;--i;var a=o+(t-s[i])/(s[i+1]-s[i])*r,u=c(a,e,n);return u>=.001?function(e,t,n,r){for(var o=0;o<4;++o){var i=c(t,n,r);if(0===i)return t;t-=(l(t,n,r)-e)/i}return t}(t,a,e,n):0===u?a:function(e,t,n,r,o){var i,s,a=0;do{(i=l(s=t+(n-t)/2,r,o)-e)>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<10);return s}(t,o,o+r,e,n)}return function(e){return 0===e?0:1===e?1:l(d(e),t,i)}}));const{toString:f,hasOwnProperty:h,propertyIsEnumerable:p}=Object.prototype;function g(e,t){return h.call(e,t)}function m(e){return!!F(e)||(!!b(e)||!!v(e)&&g(e,"length"))}function y(e){return f.call(e).slice(8,-1)}const b=e=>"string"==typeof e,w=e=>"boolean"==typeof e,x=e=>"number"==typeof e&&!Number.isNaN(e),S=e=>void 0===e,A=e=>null===e;function E(e){return S(e)||A(e)}const v=e=>"Object"===y(e),F=e=>Array.isArray(e),C=e=>"function"==typeof e,$=e=>Number.isNaN(e),T=e=>"Date"===y(e);function R(e){if(E(e)||Number.isNaN(e))return!0;const t=y(e);return m(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length}function N(e){return!S(NodeList)&&NodeList.prototype.isPrototypeOf(e)}const I={linear:[0,0,1,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]};function j(e){let t;if(F(e))t=d(...e);else{const n=I[e];if(!n)throw new Error(`${e} 缓冲函数未定义`);t=d(...n)}return e=>t(Math.max(0,Math.min(e,1)))}const D=e=>{if(!v(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function P(e,t){for(const n in e)if(g(e,n)&&!1===t(e[n],n))break;e=null}function k(e,t){const n={};return P(e,((e,r)=>{t.includes(r)||(n[r]=e)})),e=null,n}const M=(e,t,n)=>{if(S(n))return t;if(y(t)!==y(n))return F(n)?M(e,[],n):v(n)?M(e,{},n):n;if(D(n)){const r=e.get(n);return r||(e.set(n,t),P(n,((n,r)=>{t[r]=M(e,t[r],n)})),t)}if(F(n)){const r=e.get(n);return r||(e.set(n,t),n.forEach(((n,r)=>{t[r]=M(e,t[r],n)})),t)}return n};function O(e,...t){const n=new Map;for(let r=0,o=t.length;r<o;r++){const o=t[r];e=M(n,e,o)}return n.clear(),e}function L(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const B="0123456789",U="abcdefghijklmnopqrstuvwxyz",H="ABCDEFGHIJKLMNOPQRSTUVWXYZ",z=/%[%sdo]/g;const W=/\${(.*?)}/g;const q=(e,t)=>{e.split(/\s+/g).forEach(t)};const _=(e,t,n)=>{v(t)?P(t,((t,n)=>{_(e,n,t)})):e.style.setProperty(L(t),n)};function G(e,t=14,n=!0){let r=0;if(console.assert(b(e),`${e} 不是有效的字符串`),b(e)&&e.length>0){const o="getStrWidth1494304949567";let i=document.querySelector(`#${o}`);if(!i){const n=document.createElement("span");n.id=o,n.style.fontSize=t+"px",n.style.whiteSpace="nowrap",n.style.visibility="hidden",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.textContent=e,document.body.appendChild(n),i=n}i.textContent=e,r=i.offsetWidth,n&&i.remove()}return r}function Y(e){let t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){const n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();const n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r),t=n.toString()}return t}function V(e,t){const{successCallback:n,failCallback:r,container:o=document.body}=E(t)?{}:t;let i=function(e){const t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";const r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute("readonly",""),n.value=e,n}(e);o.appendChild(i),Y(i);try{document.execCommand("copy")&&C(n)&&n()}catch(e){C(r)&&r(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}function X(e,t,n){const r=[],o="expires";if(r.push([e,encodeURIComponent(t)]),x(n)){const e=new Date;e.setTime(e.getTime()+n),r.push([o,e.toUTCString()])}else T(n)&&r.push([o,n.toUTCString()]);r.push(["path","/"]),document.cookie=r.map((e=>{const[t,n]=e;return`${t}=${n}`})).join(";")}const J=e=>T(e)&&!$(e.getTime()),K=e=>{if(!b(e))return;const t=e.replace(/-/g,"/");return new Date(t)},Z=e=>{if(!b(e))return;const t=/([+-])(\d\d)(\d\d)$/,n=t.exec(e);if(!n)return;const r=e.replace(t,"Z"),o=new Date(r);if(!J(o))return;const[,i,s,a]=n,l=parseInt(s,10),c=parseInt(a,10),u=(e,t)=>"+"===i?e-t:e+t;return o.setHours(u(o.getHours(),l)),o.setMinutes(u(o.getMinutes(),c)),o};function Q(e){const t=new Date(e);if(J(t))return t;const n=K(e);if(J(n))return n;const r=Z(e);if(J(r))return r;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function ee(e){const t=Q(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}const te=e=>{const t=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/\.{3,}/g,"..").replace(/\/\.\//g,"/").split("/").map((e=>e.trim())),n=e=>".."===e,r=[];let o=!1;const i=e=>{r.push(e)};return t.forEach((e=>{const t=(e=>"."===e)(e),s=n(e);return o?t?void 0:s?(()=>{if(0===r.length)return;const e=r[r.length-1];n(e)?r.push(".."):r.pop()})():void i(e):(i(e),void(o=!t&&!s))})),r.join("/")},ne=(e,...t)=>te([e,...t].join("/"));function re(e){const t=new URLSearchParams(e),n={};for(const[e,r]of t.entries())S(n[e])?n[e]=r:F(n[e])||(n[e]=t.getAll(e));return n}const oe=e=>b(e)?e:x(e)?String(e):w(e)?e?"true":"false":T(e)?e.toISOString():null;function ie(e,t=oe){const n=new URLSearchParams;return P(e,((e,r)=>{if(F(e))e.forEach((e=>{const o=t(e);null!==o&&n.append(r.toString(),o)}));else{const o=t(e);if(null===o)return;n.set(r.toString(),o)}})),n.toString()}const se=(e,t=!0)=>{let n=null;C(URL)&&t?n=new URL(e):(n=document.createElement("a"),n.href=e);const{protocol:r,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,pathname:d}=n,f=ne("/",d),h=o&&i?`${o}:${i}`:"",p=u.replace(/^\?/,"");return n=null,{protocol:r,auth:h,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,searchParams:re(p),query:p,pathname:f,path:`${f}${u}`,href:e}},ae=e=>{const{protocol:t,auth:n,host:r,pathname:o,searchParams:i,hash:s}=e,a=n?`${n}@`:"",l=ie(i),c=l?`?${l}`:"";let u=s.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${a}${r}${o}${c}${u}`},le=(e,t)=>{const n=se(e);return Object.assign(n.searchParams,t),ae(n)};function ce(e,t,n){let r=document.createElement("a");r.download=t,r.style.display="none",r.href=e,document.body.appendChild(r),r.click(),setTimeout((()=>{document.body.removeChild(r),r=null,C(n)&&n()}))}function ue(e,t,n){const r=URL.createObjectURL(e);ce(r,t),setTimeout((()=>{URL.revokeObjectURL(r),C(n)&&n()}))}function de(){return!!document.createElement("canvas").getContext}function fe({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r}){let o=n,i=r;return(n>e||r>t)&&(n/r>e/t?(o=e,i=Math.round(e*(r/n))):(i=t,o=Math.round(t*(n/r)))),{width:o,height:i}}function he(e){return"undefined"!=typeof globalThis?globalThis[e]:"undefined"!=typeof window?window[e]:"undefined"!=typeof global?global[e]:"undefined"!=typeof self?self[e]:void 0}const pe=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),ge=`${B}${H}${U}`;const me=`${B}${H}${U}`,ye="undefined"!=typeof BigInt,be=()=>he("JSBI"),we=e=>ye?BigInt(e):be().BigInt(e);function xe(e,t=me){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!ye)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let n=we(e);const r=[],{length:o}=t,i=we(o),s=()=>{const e=Number(((e,t)=>ye?e%t:be().remainder(e,t))(n,i));n=((e,t)=>ye?e/t:be().divide(e,t))(n,i),r.unshift(t[e]),n>0&&s()};return s(),r.join("")}const Se=(e,t,n={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:r=1e3,decimals:o=0,separator:i=" "}=n,{length:s}=t;if(0===s)throw new Error("At least one unit is required");let a=Number(e),l=0;for(;a>=r&&l<s-1;)a/=r,l++;const c=a.toFixed(o),u=t[l];return String(c)+i+u};function Ae(e,t){if(E(t))return parseInt(String(e)).toLocaleString();let n=0;if(!x(t))throw new Error("Decimals must be a positive number not less than zero");return t>0&&(n=t),Number(Number(e).toFixed(n)).toLocaleString("en-US")}let Ee=0,ve=0;const Fe=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==ve&&(ve=t,Ee=0);const n=`${t}`;let r="";const o=e-5-13;if(o>0){r=`${pe(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(Ee,5);return Ee++,`${n}${r}${i}`},Ce=e=>e[pe(0,e.length-1)];function $e(e,t,n){let r=250,o=13;const i=e.children[0];G(t,12)<230?(i.style.maxWidth=G(t,12)+20+50+"px",r=n.clientX+(G(t,12)+50)-document.body.offsetWidth):(i.style.maxWidth="250px",r=n.clientX+230-document.body.offsetWidth),i.innerHTML=t,r>0&&(o-=r),e.style.top=n.clientY+23+"px",e.style.left=n.clientX+o+"px",e.style.maxWidth="250px";const s=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;s>0&&(e.style.top=n.clientY-s+"px")}const Te={handleMouseEnter:function({rootContainer:e="#root",title:t,event:n,bgColor:r="#000",color:o="#fff"}){try{const i=b(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let s=null;const a="style-tooltip-inner1494304949567";if(!document.querySelector(`#${a}`)){const e=document.createElement("style");e.type="text/css",e.id=a,e.innerHTML=`\n .tooltip-inner1494304949567 {\n max-width: 250px;\n padding: 3px 8px;\n color: ${o};\n text-decoration: none;\n border-radius: 4px;\n text-align: left;\n background-color: ${r};\n }\n `,document.querySelector("head").appendChild(e)}if(s=document.querySelector("#customTitle1494304949567"),s)$e(s,t,n);else{const e=document.createElement("div");e.id="customTitle1494304949567",e.style.cssText="z-index: 99999999; visibility: hidden; position: absolute;",e.innerHTML='<div class="tooltip-inner1494304949567" style="word-wrap: break-word; max-width: 44px;">皮肤</div>',i.appendChild(e),s=document.querySelector("#customTitle1494304949567"),t&&($e(s,t,n),s.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=b(e)?document.querySelector(e):e;let n=document.querySelector("#customTitle1494304949567");t&&n&&(t.removeChild(n),n=null)}},Re={keyField:"key",childField:"children",pidField:"pid"},Ne={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};const Ie=(e,t)=>{let n=0;const r=e.toString(),o=t.toString();return void 0!==r.split(".")[1]&&(n+=r.split(".")[1].length),void 0!==o.split(".")[1]&&(n+=o.split(".")[1].length),Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,n)},je=(e,t)=>{let n=0,r=0,o=0;try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}return o=10**Math.max(n,r),(Ie(e,o)+Ie(t,o))/o};const De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Pe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function ke(e){let t,n,r,o,i="",s=0;const a=(e=String(e)).length,l=a%3;for(;s<a;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");t=n<<16|r<<8|o,i+=De.charAt(t>>18&63)+De.charAt(t>>12&63)+De.charAt(t>>6&63)+De.charAt(63&t)}return l?i.slice(0,l-3)+"===".substring(l):i}function Me(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Pe.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");let t,n,r,o="",i=0;for(const s=(e+="==".slice(2-(3&e.length))).length;i<s;)t=De.indexOf(e.charAt(i++))<<18|De.indexOf(e.charAt(i++))<<12|(n=De.indexOf(e.charAt(i++)))<<6|(r=De.indexOf(e.charAt(i++))),o+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}const Oe=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Le=/^(?:(?:\+|00)86)?1\d{10}$/,Be=/^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1]|8[1-2]|9[1])\d{4}(18|19|20)\d{2}[01]\d[0123]\d{4}[\dxX]$/,Ue=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,He=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,ze=/^(?:(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/,We=/^(([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,7}:|([\da-fA-F]{1,4}:){1,6}:[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,5}(:[\da-fA-F]{1,4}){1,2}|([\da-fA-F]{1,4}:){1,4}(:[\da-fA-F]{1,4}){1,3}|([\da-fA-F]{1,4}:){1,3}(:[\da-fA-F]{1,4}){1,4}|([\da-fA-F]{1,4}:){1,2}(:[\da-fA-F]{1,4}){1,5}|[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,6})|:((:[\da-fA-F]{1,4}){1,7}|:)|fe80:(:[\da-fA-F]{0,4}){0,4}%[\da-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d)|([\da-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d))$/i,qe=/^(-?[1-9]\d*|0)$/,_e=e=>qe.test(e),Ge=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Ye=e=>Ge.test(e),Ve=/^\d+$/;function Xe(e){return[...new Set(e.trim().split(""))].join("")}function Je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ke(e,t){return new RegExp(`${Je(e.trim())}\\s*([^${Je(Xe(e))}${Je(Xe(t))}\\s]*)\\s*${t.trim()}`,"g")}e.EMAIL_REGEX=Oe,e.HEX_POOL=me,e.HTTP_URL_REGEX=He,e.IPV4_REGEX=ze,e.IPV6_REGEX=We,e.PHONE_REGEX=Le,e.STRING_ARABIC_NUMERALS=B,e.STRING_LOWERCASE_ALPHA=U,e.STRING_POOL=ge,e.STRING_UPPERCASE_ALPHA=H,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=Ue,e.add=je,e.addClass=function(e,t){q(t,(t=>e.classList.add(t)))},e.arrayEach=t,e.arrayEachAsync=async function(e,t,n=!1){if(n)for(let n=e.length-1;n>=0&&!1!==await t(e[n],n);n--);else for(let n=0,r=e.length;n<r&&!1!==await t(e[n],n);n++);},e.arrayInsertBefore=function(e,t,n){if(t===n||t+1===n)return;const[r]=e.splice(t,1),o=n<t?n:n-1;e.splice(o,0,r)},e.arrayLike=m,e.arrayRemove=function(e,n){const r=[],o=n;return t(e,((e,t)=>{o(e,t)&&r.push(t)})),r.forEach(((t,n)=>{e.splice(t-n,1)})),e},e.asyncMap=function(e,t,n=1/0){return new Promise(((r,o)=>{const i=e[Symbol.iterator](),s=Math.min(e.length,n),a=[];let l,c=0,u=0;const d=()=>{if(l)return o(l);const n=i.next();if(n.done)return void(c===e.length&&r(a));const s=u++;t(n.value,s,e).then((e=>{c++,a[s]=e,d()})).catch((e=>{l=e,d()}))};for(let e=0;e<s;e++)d()}))},e.b64decode=function(e){const t=E(he("atob"))?Me(e):he("atob")(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return E(he("TextDecoder"))?function(e){const t=String.fromCharCode.apply(null,e);return decodeURIComponent(t)}(r):new(he("TextDecoder"))("utf-8").decode(r)},e.b64encode=function(e){const t=E(he("TextEncoder"))?function(e){const t=encodeURIComponent(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e):(new(he("TextEncoder"))).encode(e);let n="";const r=t.length;for(let e=0;e<r;e++)n+=String.fromCharCode(t[e]);return E(he("btoa"))?ke(n):he("btoa")(n)},e.calculateDate=function(e,t,n="-"){const r=new Date(e),o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime()+864e5*parseInt(String(t)),i=new Date(o);return i.getFullYear()+n+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0")},e.calculateDateTime=function(e,t,n="-",r=":"){const o=new Date(e),i=n,s=r,a=new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()).getTime()+864e5*parseInt(String(t)),l=new Date(a);return l.getFullYear()+i+String(l.getMonth()+1).padStart(2,"0")+i+String(l.getDate()).padStart(2,"0")+" "+String(l.getHours()).padStart(2,"0")+s+String(l.getMinutes()).padStart(2,"0")+s+String(l.getSeconds()).padStart(2,"0")},e.chooseLocalFile=function(e,t){let n=document.createElement("input");n.setAttribute("id",String(Date.now())),n.setAttribute("type","file"),n.setAttribute("style","visibility:hidden"),n.setAttribute("accept",e),document.body.appendChild(n),n.click(),n.onchange=e=>{t(e.target.files),setTimeout((()=>{document.body.removeChild(n),n=null}))}},e.cloneDeep=function e(t,n=new WeakMap){if(null===t||"object"!=typeof t)return t;if(n.has(t))return n.get(t);if(t instanceof ArrayBuffer){const e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),n.set(t,e),e}if(ArrayBuffer.isView(t)){return new(0,t.constructor)(e(t.buffer,n),t.byteOffset,t.length)}if(t instanceof Date){const e=new Date(t.getTime());return n.set(t,e),e}if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,n.set(t,e),e}if(t instanceof Map){const r=new Map;return n.set(t,r),t.forEach(((t,o)=>{r.set(e(o,n),e(t,n))})),r}if(t instanceof Set){const r=new Set;return n.set(t,r),t.forEach((t=>{r.add(e(t,n))})),r}if(Array.isArray(t)){const r=new Array(t.length);n.set(t,r);for(let o=0,i=t.length;o<i;o++)o in t&&(r[o]=e(t[o],n));const o=Object.getOwnPropertyDescriptors(t);for(const t of Reflect.ownKeys(o))Object.defineProperty(r,t,{...o[t],value:e(o[t].value,n)});return r}const r=Object.create(Object.getPrototypeOf(t));n.set(t,r);const o=Object.getOwnPropertyDescriptors(t);for(const t of Reflect.ownKeys(o)){const i=o[t];"value"in i?i.value=e(i.value,n):(i.get&&(i.get=e(i.get,n)),i.set&&(i.set=e(i.set,n))),Object.defineProperty(r,t,i)}return r},e.compressImg=function e(t,n={mime:"image/jpeg",minFileSizeKB:50}){if(!(t instanceof File||t instanceof FileList))throw new Error(`${t} require be File or FileList`);if(!de())throw new Error("Current runtime environment not support Canvas");const{quality:r,mime:o="image/jpeg",maxSize:i,minFileSizeKB:s=50}=v(n)?n:{};let a,l=r;if(r)l=r;else if(t instanceof File){const e=+parseInt((t.size/1024).toFixed(2));l=e<s?1:e<1024?.85:e<5120?.8:.75}return x(i)&&(a=i>=1200?i:1200),t instanceof FileList?Promise.all(Array.from(t).map((t=>e(t,{maxSize:a,mime:o,quality:l})))):t instanceof File?new Promise((e=>{const n=[...t.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[o]].join("."),r=+parseInt((t.size/1024).toFixed(2));if(r<s)e({file:t});else{const i=new FileReader;i.onload=({target:{result:i}})=>{const s=new Image;s.onload=()=>{const c=document.createElement("canvas"),u=c.getContext("2d"),d=s.width,f=s.height,{width:h,height:p}=function({sizeKB:e,maxSize:t,originWidth:n,originHeight:r}){let o=n,i=r;if(x(t)){const{width:e,height:s}=fe({maxWidth:t,maxHeight:t,originWidth:n,originHeight:r});o=e,i=s}else if(e<500){const e=1200,t=1200,{width:s,height:a}=fe({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<5120){const e=1400,t=1400,{width:s,height:a}=fe({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<10240){const e=1600,t=1600,{width:s,height:a}=fe({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(10240<=e){const e=n>15e3?8192:n>1e4?4096:2048,t=r>15e3?8192:r>1e4?4096:2048,{width:s,height:a}=fe({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}return{width:o,height:i}}({sizeKB:r,maxSize:a,originWidth:d,originHeight:f});c.width=h,c.height=p,u.clearRect(0,0,h,p),u.drawImage(s,0,0,h,p);const g=c.toDataURL(o,l),m=atob(g.split(",")[1]);let y=m.length;const b=new Uint8Array(new ArrayBuffer(y));for(;y--;)b[y]=m.charCodeAt(y);const w=new File([b],n,{type:o});e({file:w,bufferArray:b,origin:t,beforeSrc:i,afterSrc:g,beforeKB:r,afterKB:Number((w.size/1024).toFixed(2))})},s.src=i},i.readAsDataURL(t)}})):Promise.resolve(null)},e.cookieDel=e=>X(e,"",-1),e.cookieGet=function(e){const{cookie:t}=document;if(!t)return"";const n=t.split(";");for(let t=0;t<n.length;t++){const r=n[t],[o,i=""]=r.split("=");if(o===e)return decodeURIComponent(i)}return""},e.cookieSet=X,e.copyText=function(e,t){const{successCallback:n,failCallback:r}=E(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{C(n)&&n()})).catch((n=>{V(e,t)})):V(e,t)},e.crossOriginDownload=function(e,t,n){const{successCode:r=200,successCallback:o,failCallback:i}=E(n)?{successCode:200,successCallback:void 0,failCallback:void 0}:n,s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="blob",s.onload=function(){if(s.status===r)ue(s.response,t,o);else if(C(i)){const e=s.status,t=s.getResponseHeader("Content-Type");if(b(t)&&t.includes("application/json")){const t=new FileReader;t.onload=()=>{i({status:e,response:t.result})},t.readAsText(s.response)}else i(s)}},s.onerror=e=>{C(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},s.send()},e.dateParse=Q,e.dateToEnd=function(e){const t=ee(e);return t.setDate(t.getDate()+1),Q(t.getTime()-1)},e.dateToStart=ee,e.debounce=(e,t)=>{let n,r=!1;const o=function(...o){r||(clearTimeout(n),n=setTimeout((()=>{e.call(this,...o)}),t))};return o.cancel=()=>{clearTimeout(n),r=!0},o},e.divide=(e,t)=>{let n=0,r=0,o=0,i=0;return void 0!==e.toString().split(".")[1]&&(n=e.toString().split(".")[1].length),void 0!==t.toString().split(".")[1]&&(r=t.toString().split(".")[1].length),o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,r-n)},e.downloadBlob=ue,e.downloadData=function(e,t,n,r){if(n=n.replace(`.${t}`,"")+`.${t}`,"json"===t){ue(new Blob([JSON.stringify(e,null,4)]),n)}else{if(!r||!r.length)throw new Error("未传入表头数据");if(!Array.isArray(e))throw new Error("data error! expected array!");const o=r.join(",")+"\n";let i="";e.forEach((e=>{i+=Object.values(e).join(",\t")+",\n"}));ce("data:"+{csv:"text/csv",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[t]+";charset=utf-8,\ufeff"+encodeURIComponent(o+i),n)}},e.downloadHref=ce,e.downloadURL=function(e,t){window.open(t?le(e,t):e)},e.easingFunctional=j,e.easingStringify=function(e){let t;if(F(e))t=e;else{const n=I[e];if(!n)throw new Error(`${e} 缓冲函数未定义`);t=n}return`cubic-bezier(${t.join(",")})`},e.escapeRegExp=Je,e.executeInScope=function(e,t={}){const n=Object.keys(t),r=n.map((e=>t[e]));try{return new Function(...n,`return (() => { ${e} })()`)(...r)}catch(e){throw new Error(`代码执行失败: ${e.message}`)}},e.fallbackCopyText=V,e.flatTree=function e(t,n=Re){const{keyField:r="key",childField:o="children",pidField:i="pid"}=v(n)?n:{};let s=[];for(let a=0,l=t.length;a<l;a++){const l=t[a],c={...l,[o]:[]};if(g(c,o)&&delete c[o],s.push(c),l[o]){const t=l[o].map((e=>({...e,[i]:l[r]||e.pid})));s=s.concat(e(t,n))}}return s},e.forEachDeep=function(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:r="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:s=!1}=v(n)?n:{};let a=!1;const l=[],c=(n,u,d=0)=>{if(o){for(let o=n.length-1;o>=0&&!a;o--){const f=n[o];if(i)l.push({item:f,index:o,array:n,tree:e,parent:u,level:d});else{const i=t(f,o,n,e,u,d);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?N(f[r]):Array.isArray(f[r]))&&c(f[r],f,d+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift(),{item:n,index:o,array:i,tree:u,parent:d,level:f}=e,h=t(n,o,i,u,d,f);if(!1===h){a=!0;break}!0!==h&&(n&&(s?N(n[r]):Array.isArray(n[r]))&&c(n[r],n,f+1))}}else{for(let o=0,f=n.length;o<f&&!a;o++){const f=n[o];if(i)l.push({item:f,index:o,array:n,tree:e,parent:u,level:d});else{const i=t(f,o,n,e,u,d);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?N(f[r]):Array.isArray(f[r]))&&c(f[r],f,d+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift();if(!e)break;const{item:n,index:o,array:i,tree:u,parent:d,level:f}=e,h=t(n,o,i,u,d,f);if(!1===h){a=!0;break}!0!==h&&(n&&(s?N(n[r]):Array.isArray(n[r]))&&c(n[r],n,f+1))}}};c(e,null,0),e=null},e.formatDate=function(e,t="YYYY-MM-DD HH:mm:ss"){const n=Q(e);let r,o=t;const i={"Y+":`${n.getFullYear()}`,"y+":`${n.getFullYear()}`,"M+":`${n.getMonth()+1}`,"D+":`${n.getDate()}`,"d+":`${n.getDate()}`,"H+":`${n.getHours()}`,"m+":`${n.getMinutes()}`,"s+":`${n.getSeconds()}`,"S+":`${n.getMilliseconds()}`,"w+":["周日","周一","周二","周三","周四","周五","周六"][n.getDay()]};for(const e in i)r=new RegExp("("+e+")").exec(o),r&&(o=o.replace(r[1],1===r[1].length?i[e]:i[e].padStart(r[1].length,"0")));return o},e.formatMoney=Ae,e.formatNumber=Ae,e.formatTree=function(e,t=Re){const{keyField:n="key",childField:r="children",pidField:o="pid"}=v(t)?t:{},i=[],s={};for(let t=0,r=e.length;t<r;t++){const r=e[t];s[r[n]]=r}for(let t=0,n=e.length;t<n;t++){const n=e[t],a=s[n[o]];a?(a[r]||(a[r]=[])).push(n):i.push(n)}return e=null,i},e.fuzzySearchTree=function e(t,n,r=Ne){if(!g(n,"filter")&&(!g(n,"keyword")||R(n.keyword)))return t;const o=[];for(let i=0,s=t.length;i<s;i++){const s=t[i],a=s[r.childField]&&s[r.childField].length>0?e(s[r.childField]||[],n,r):[];if((g(n,"filter")?n.filter(s):r.ignoreCase?s[r.nameField].toLowerCase().includes(n.keyword.toLowerCase()):s[r.nameField].includes(n.keyword))||a.length>0)if(s[r.childField])if(a.length>0)o.push({...s,[r.childField]:a});else if(r.removeEmptyChild){const{[r.childField]:e,...t}=s;o.push(t)}else o.push({...s,[r.childField]:[]});else{const{[r.childField]:e,...t}=s;o.push(t)}}return o},e.genCanvasWM=function e(t="请勿外传",n){const{rootContainer:r=document.body,width:o="300px",height:i="150px",textAlign:s="center",textBaseline:a="middle",font:l="20px PingFangSC-Medium,PingFang SC",fillStyle:c="rgba(189, 177, 167, .3)",rotate:u=-20,zIndex:d=2147483647,watermarkId:f="__wm"}=E(n)?{}:n,h=b(r)?document.querySelector(r):r;if(!h)throw new Error(`${r} is not valid Html Element or element selector`);const p=document.createElement("canvas");p.setAttribute("width",o),p.setAttribute("height",i);const g=p.getContext("2d");g.textAlign=s,g.textBaseline=a,g.font=l,g.fillStyle=c,g.rotate(Math.PI/180*u),g.fillText(t,parseFloat(o)/4,parseFloat(i)/2);const m=p.toDataURL(),y=document.querySelector(`#${f}`),w=y||document.createElement("div"),x=`opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${d}; pointer-events:none; background-repeat:repeat; background-image:url('${m}')`;w.setAttribute("style",x),w.setAttribute("id",f),w.classList.add("nav-height"),y||(h.style.position="relative",h.appendChild(w));const S=window.MutationObserver||window.WebKitMutationObserver;if(S){let r=new S((function(){let o=document.querySelector(`#${f}`);if(o){const{opacity:i,zIndex:s,display:a,visibility:l}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(o);(o&&o.getAttribute("style")!==x||!o||"1"!==i||"2147483647"!==s||"block"!==a||"visible"!==l)&&(r.disconnect(),r=null,h.removeChild(o),o=null,e(t,n))}else r.disconnect(),r=null,e(t,n)}));r.observe(h,{attributes:!0,subtree:!0,childList:!0})}},e.getComputedCssVal=function(e,t,n=!0){const r=getComputedStyle(e).getPropertyValue(t)??"";return n?Number(r.replace(/([0-9]*)(.*)/g,"$1")):r},e.getEasing=function(e){return e?I[e]:I},e.getGlobal=he,e.getStrWidthPx=G,e.getStyle=function(e,t){return getComputedStyle(e).getPropertyValue(t)},e.hasClass=function(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},e.humanFileSize=function(e,t={decimals:0,si:!1,separator:" "}){const{decimals:n=0,si:r=!1,separator:o=" ",baseUnit:i,maxUnit:s}=t;let a=r?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!E(i)){const e=a.findIndex((e=>e===i));-1!==e&&(a=a.slice(e))}if(!E(s)){const e=a.findIndex((e=>e===s));-1!==e&&a.splice(e+1)}return Se(e,a,{ratio:r?1e3:1024,decimals:n,separator:o})},e.isArray=F,e.isBigInt=e=>"bigint"==typeof e,e.isBoolean=w,e.isDate=T,e.isDigit=e=>Ve.test(e),e.isEmail=e=>Oe.test(e),e.isEmpty=R,e.isError=e=>"Error"===y(e),e.isFloat=Ye,e.isFunction=C,e.isIdNo=e=>{if(!Be.test(e))return!1;const t=Number(e.slice(6,10)),n=Number(e.slice(10,12)),r=Number(e.slice(12,14)),o=new Date(t,n-1,r);if(!(o.getFullYear()===t&&o.getMonth()+1===n&&o.getDate()===r))return!1;const i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let s=0;for(let t=0;t<17;t++)s+=Number(e.slice(t,t+1))*i[t];return["1","0","X","9","8","7","6","5","4","3","2"][s%11]===e.slice(-1)},e.isInteger=_e,e.isIpV4=e=>ze.test(e),e.isIpV6=e=>We.test(e),e.isJsonString=function(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}},e.isNaN=$,e.isNodeList=N,e.isNull=A,e.isNullOrUnDef=E,e.isNullish=E,e.isNumber=x,e.isNumerical=e=>_e(e)||Ye(e),e.isObject=v,e.isPhone=e=>Le.test(e),e.isPlainObject=D,e.isPrimitive=e=>null===e||"object"!=typeof e,e.isRegExp=e=>"RegExp"===y(e),e.isString=b,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=S,e.isUrl=(e,t=!1)=>(t?Ue:He).test(e),e.isValidDate=J,e.mapDeep=function(e,t,n={childField:"children",reverse:!1}){const{childField:r="children",reverse:o=!1}=v(n)?n:{};let i=!1;const s=[],a=(n,s,l,c=0)=>{if(o)for(let o=n.length-1;o>=0&&!i;o--){const u=n[o],d=t(u,o,n,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],a(u[r],u,l[l.length-1][r],c+1)):delete d[r])}else for(let o=0;o<n.length&&!i;o++){const u=n[o],d=t(u,o,n,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],a(u[r],u,l[l.length-1][r],c+1)):delete d[r])}};return a(e,null,s),e=null,s},e.multiply=Ie,e.numberAbbr=Se,e.numberToHex=xe,e.objectAssign=O,e.objectEach=P,e.objectEachAsync=async function(e,t){for(const n in e)if(g(e,n)&&!1===await t(e[n],n))break},e.objectFill=function(e,t,n){const r=n||((e,t,n)=>void 0===e[n]);return P(t,((n,o)=>{r(e,t,o)&&(e[o]=n)})),e},e.objectGet=function(e,t,n=!1){const r=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");let o=e,i=0;for(let e=r.length;i<e-1;++i){const e=r[i];if(x(Number(e))&&Array.isArray(o))o=o[e];else{if(!v(o)||!g(o,e)){if(o=void 0,n)throw new Error("[Object] objectGet path 路径不正确");break}o=o[e]}}return{p:o,k:o?r[i]:void 0,v:o?o[r[i]]:void 0}},e.objectHas=g,e.objectMap=function(e,t){const n={};for(const r in e)g(e,r)&&(n[r]=t(e[r],r));return e=null,n},e.objectMerge=O,e.objectOmit=k,e.objectPick=function(e,t){const n={};return P(e,((e,r)=>{t.includes(r)&&(n[r]=e)})),e=null,n},e.once=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.call(this,...r)),t}},e.parseQueryParams=function(e=location.search){const t={};return Array.from(e.matchAll(/[&?]?([^=&]+)=?([^=&]*)/g)).forEach(((e,n)=>{t[e[1]]?"string"==typeof t[e[1]]?t[e[1]]=[t[e[1]],e[2]]:t[e[1]].push(e[2]):t[e[1]]=e[2]})),t},e.parseVarFromString=function(e,t="{",n="}"){return Array.from(e.matchAll(Ke(t,n))).map((e=>E(e)?void 0:e[1]))},e.pathJoin=ne,e.pathNormalize=te,e.qsParse=re,e.qsStringify=ie,e.randomNumber=pe,e.randomString=(e,t)=>{let n=0,r=ge;b(t)?(n=e,r=t):x(e)?n=e:b(e)&&(r=e);let o=Math.max(n,1),i="";const s=r.length-1;if(s<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=r[pe(0,s)]}return i},e.randomUuid=function(){if("undefined"==typeof URL||!URL.createObjectURL||"undefined"==typeof Blob){const e="0123456789abcdef",t="xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx";let n="";for(let r=0;r<t.length;r++){const o=pe(0,15);n+="-"==t[r]||"4"==t[r]?t[r]:e[o]}return n}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]},e.removeClass=function(e,t){q(t,(t=>e.classList.remove(t)))},e.replaceVarFromString=function(e,t,n="{",r="}"){return e.replace(new RegExp(Ke(n,r)),(function(e,n){return g(t,n)?t[n]:e}))},e.safeAwait=function(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))},e.searchTreeById=function(e,t,n={childField:"children",keyField:"id"}){const{childField:r="children",keyField:o="id"}=v(n)?n:{},i=(e,t,n)=>e.reduce(((e,s)=>{const a=s[r];return[...e,t?{...s,parentId:t,parent:n}:s,...a&&a.length?i(a,s[o],s):[]]}),[]);return(e=>{let n=e.find((e=>e[o]===t));const{parent:r,parentId:i,...s}=n;let a=[t],l=[s];for(;n&&n.parentId;)a=[n.parentId,...a],l=[n.parent,...l],n=e.find((e=>e[o]===n.parentId));return[a,l]})(i(e))},e.select=Y,e.setEasing=function(e,t){I[e]=t},e.setGlobal=function(e,t){if("undefined"!=typeof globalThis)globalThis[e]=t;else if("undefined"!=typeof window)window[e]=t;else if("undefined"!=typeof global)global[e]=t;else{if("undefined"==typeof self)throw new SyntaxError("当前环境下无法设置全局属性");self[e]=t}},e.setStyle=_,e.smoothScroll=function(e){return new Promise((n=>{const r={el:document,to:0,duration:567,easing:"ease"},{el:o,to:i,duration:s,easing:a}=O(r,e),l=document.documentElement,c=document.body,u=o===window||o===document||o===l||o===c?[l,c]:[o];let d;const f=(()=>{let e=0;return t(u,(t=>{if("scrollTop"in t)return e=t.scrollTop,!1})),e})(),h=i-f,p=j(a),g=()=>{const e=performance.now(),t=(d?e-d:0)/s,r=p(t);var o;d||(d=e),o=f+h*r,u.forEach((e=>{"scrollTop"in e&&(e.scrollTop=o)})),t>=1?n():requestAnimationFrame(g)};g()}))},e.stringAssign=(e,t)=>e.replace(W,((e,n)=>((e,t)=>{try{return new Function(`with(arguments[0]){if(arguments[0].${e} === undefined)throw "";return String(arguments[0].${e})}`)(t)}catch(t){throw new SyntaxError(`无法执行表达式:${e}`)}})(n,t))),e.stringCamelCase=function(e,t){let n=e;return t&&(n=e.replace(/^./,(e=>e.toUpperCase()))),n.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))},e.stringEscapeHtml=e=>{const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return e.replace(/[&<>"]/g,(e=>t[e]))},e.stringFill=(e,t=" ")=>new Array(e).fill(t).join(""),e.stringFormat=function(e,...t){let n=0;return[e.replace(z,(e=>{const r=t[n++];switch(e){case"%%":return n--,"%";default:case"%s":return String(r);case"%d":return String(Number(r));case"%o":return JSON.stringify(r)}})),...t.splice(n).map(String)].join(" ")},e.stringKebabCase=L,e.strip=function(e,t=15){return+parseFloat(Number(e).toPrecision(t))},e.subtract=(e,t)=>je(e,-t),e.supportCanvas=de,e.throttle=(e,t,n)=>{let r,o=!1,i=0;const s=function(...s){if(o)return;const a=Date.now(),l=()=>{i=a,e.call(this,...s)};if(0===i)return n?l():void(i=a);i+t-a>0?(clearTimeout(r),r=setTimeout((()=>l()),t)):l()};return s.cancel=()=>{clearTimeout(r),o=!0},s},e.tooltipEvent=Te,e.typeIs=y,e.uniqueNumber=Fe,e.uniqueString=(e,t)=>{let n=0,r=me;b(t)?(n=e,r=t):x(e)?n=e:b(e)&&(r=e);let o=xe(Fe(),r),i=n-o.length;if(i<=0)return o;for(;i--;)o+=Ce(r);return o},e.uniqueSymbol=Xe,e.urlDelParams=(e,t)=>{const n=se(e);return t.forEach((e=>delete n.searchParams[e])),ae(n)},e.urlParse=se,e.urlSetParams=le,e.urlStringify=ae,e.wait=function(e=1){return new Promise((t=>setTimeout(t,e)))},e.weAtob=Me,e.weBtoa=ke}));
6
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sculpJs={})}(this,(function(e){"use strict";function t(e,t,n=!1){if(n)for(let n=e.length-1;n>=0;n--){const r=t(e[n],n,e);if(!1===r)break}else for(let n=0,r=e.length;n<r;n++){const r=t(e[n],n,e);if(!1===r)break}e=null}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r=.1,o="function"==typeof Float32Array;function i(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function a(e){return 3*e}function l(e,t,n){return((i(t,n)*e+s(t,n))*e+a(t))*e}function c(e,t,n){return 3*i(t,n)*e*e+2*s(t,n)*e+a(t)}function u(e){return e}var d=n((function(e,t,n,i){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&n===i)return u;for(var s=o?new Float32Array(11):new Array(11),a=0;a<11;++a)s[a]=l(a*r,e,n);function d(t){for(var o=0,i=1;10!==i&&s[i]<=t;++i)o+=r;--i;var a=o+(t-s[i])/(s[i+1]-s[i])*r,u=c(a,e,n);return u>=.001?function(e,t,n,r){for(var o=0;o<4;++o){var i=c(t,n,r);if(0===i)return t;t-=(l(t,n,r)-e)/i}return t}(t,a,e,n):0===u?a:function(e,t,n,r,o){var i,s,a=0;do{(i=l(s=t+(n-t)/2,r,o)-e)>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<10);return s}(t,o,o+r,e,n)}return function(e){return 0===e?0:1===e?1:l(d(e),t,i)}}));const{toString:f,hasOwnProperty:h}=Object.prototype;function p(e,t){return h.call(e,t)}function g(e){return!!v(e)||(!!y(e)||!!E(e)&&p(e,"length"))}function m(e){return f.call(e).slice(8,-1)}const y=e=>"string"==typeof e,b=e=>"boolean"==typeof e,w=e=>"number"==typeof e&&!Number.isNaN(e),x=e=>void 0===e,S=e=>null===e;function A(e){return x(e)||S(e)}const E=e=>"Object"===m(e),v=e=>Array.isArray(e),F=e=>"function"==typeof e,C=e=>Number.isNaN(e),$=e=>"Date"===m(e);function T(e){if(A(e)||Number.isNaN(e))return!0;const t=m(e);return g(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length}function R(e){return!x(NodeList)&&NodeList.prototype.isPrototypeOf(e)}const N={linear:[0,0,1,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]};function I(e){let t;if(v(e))t=d(...e);else{const n=N[e];if(!n)throw new Error(`${e} 缓冲函数未定义`);t=d(...n)}return e=>t(Math.max(0,Math.min(e,1)))}const j=e=>{if(!E(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function D(e,t){for(const n in e)if(p(e,n)&&!1===t(e[n],n))break;e=null}function P(e,t){const n={};return D(e,((e,r)=>{t.includes(r)||(n[r]=e)})),e=null,n}const k=(e,t,n)=>{if(x(n))return t;if(m(t)!==m(n))return v(n)?k(e,[],n):E(n)?k(e,{},n):n;if(j(n)){const r=e.get(n);return r||(e.set(n,t),D(n,((n,r)=>{t[r]=k(e,t[r],n)})),t)}if(v(n)){const r=e.get(n);return r||(e.set(n,t),n.forEach(((n,r)=>{t[r]=k(e,t[r],n)})),t)}return n};function M(e,...t){const n=new Map;for(let r=0,o=t.length;r<o;r++){const o=t[r];e=k(n,e,o)}return n.clear(),e}function O(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const L="0123456789",B="abcdefghijklmnopqrstuvwxyz",U="ABCDEFGHIJKLMNOPQRSTUVWXYZ",H=/%[%sdo]/g;const z=/\${(.*?)}/g;const W=(e,t)=>{e.split(/\s+/g).forEach(t)};const q=(e,t,n)=>{E(t)?D(t,((t,n)=>{q(e,n,t)})):e.style.setProperty(O(t),n)};function _(e,t=14,n=!0){let r=0;if(console.assert(y(e),`${e} 不是有效的字符串`),y(e)&&e.length>0){const o="getStrWidth1494304949567";let i=document.querySelector(`#${o}`);if(!i){const n=document.createElement("span");n.id=o,n.style.fontSize=t+"px",n.style.whiteSpace="nowrap",n.style.visibility="hidden",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.textContent=e,document.body.appendChild(n),i=n}i.textContent=e,r=i.offsetWidth,n&&i.remove()}return r}function G(e){let t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){const n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();const n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r),t=n.toString()}return t}function Y(e,t){const{successCallback:n,failCallback:r,container:o=document.body}=A(t)?{}:t;let i=function(e){const t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";const r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute("readonly",""),n.value=e,n}(e);o.appendChild(i),G(i);try{document.execCommand("copy")&&F(n)&&n()}catch(e){F(r)&&r(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}function V(e,t,n){const r=[],o="expires";if(r.push([e,encodeURIComponent(t)]),w(n)){const e=new Date;e.setTime(e.getTime()+n),r.push([o,e.toUTCString()])}else $(n)&&r.push([o,n.toUTCString()]);r.push(["path","/"]),document.cookie=r.map((e=>{const[t,n]=e;return`${t}=${n}`})).join(";")}const X=e=>$(e)&&!C(e.getTime()),J=e=>{if(!y(e))return;const t=e.replace(/-/g,"/");return new Date(t)},K=e=>{if(!y(e))return;const t=/([+-])(\d\d)(\d\d)$/,n=t.exec(e);if(!n)return;const r=e.replace(t,"Z"),o=new Date(r);if(!X(o))return;const[,i,s,a]=n,l=parseInt(s,10),c=parseInt(a,10),u=(e,t)=>"+"===i?e-t:e+t;return o.setHours(u(o.getHours(),l)),o.setMinutes(u(o.getMinutes(),c)),o};function Z(e){const t=new Date(e);if(X(t))return t;const n=J(e);if(X(n))return n;const r=K(e);if(X(r))return r;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function Q(e){const t=Z(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}const ee=e=>{const t=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/\.{3,}/g,"..").replace(/\/\.\//g,"/").split("/").map((e=>e.trim())),n=e=>".."===e,r=[];let o=!1;const i=e=>{r.push(e)};return t.forEach((e=>{const t=(e=>"."===e)(e),s=n(e);return o?t?void 0:s?(()=>{if(0===r.length)return;const e=r[r.length-1];n(e)?r.push(".."):r.pop()})():void i(e):(i(e),void(o=!t&&!s))})),r.join("/")},te=(e,...t)=>ee([e,...t].join("/"));function ne(e){const t=new URLSearchParams(e),n={};for(const[e,r]of t.entries())x(n[e])?n[e]=r:v(n[e])||(n[e]=t.getAll(e));return n}const re=e=>y(e)?e:w(e)?String(e):b(e)?e?"true":"false":$(e)?e.toISOString():null;function oe(e,t=re){const n=new URLSearchParams;return D(e,((e,r)=>{if(v(e))e.forEach((e=>{const o=t(e);null!==o&&n.append(r.toString(),o)}));else{const o=t(e);if(null===o)return;n.set(r.toString(),o)}})),n.toString()}const ie=(e,t=!0)=>{let n=null;F(URL)&&t?n=new URL(e):(n=document.createElement("a"),n.href=e);const{protocol:r,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,pathname:d}=n,f=te("/",d),h=o&&i?`${o}:${i}`:"",p=u.replace(/^\?/,"");return n=null,{protocol:r,auth:h,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,searchParams:ne(p),query:p,pathname:f,path:`${f}${u}`,href:e}},se=e=>{const{protocol:t,auth:n,host:r,pathname:o,searchParams:i,hash:s}=e,a=n?`${n}@`:"",l=oe(i),c=l?`?${l}`:"";let u=s.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${a}${r}${o}${c}${u}`},ae=(e,t)=>{const n=ie(e);return Object.assign(n.searchParams,t),se(n)};function le(e,t,n){let r=document.createElement("a");r.download=t,r.style.display="none",r.href=e,document.body.appendChild(r),r.click(),setTimeout((()=>{document.body.removeChild(r),r=null,F(n)&&n()}))}function ce(e,t,n){const r=URL.createObjectURL(e);le(r,t),setTimeout((()=>{URL.revokeObjectURL(r),F(n)&&n()}))}function ue(){return!!document.createElement("canvas").getContext}function de({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r}){let o=n,i=r;return(n>e||r>t)&&(n/r>e/t?(o=e,i=Math.round(e*(r/n))):(i=t,o=Math.round(t*(n/r)))),{width:o,height:i}}function fe(e){return"undefined"!=typeof globalThis?globalThis[e]:"undefined"!=typeof window?window[e]:"undefined"!=typeof global?global[e]:"undefined"!=typeof self?self[e]:void 0}const he=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),pe=`${L}${U}${B}`;const ge=`${L}${U}${B}`,me="undefined"!=typeof BigInt,ye=()=>fe("JSBI"),be=e=>me?BigInt(e):ye().BigInt(e);function we(e,t=ge){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!me)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let n=be(e);const r=[],{length:o}=t,i=be(o),s=()=>{const e=Number(((e,t)=>me?e%t:ye().remainder(e,t))(n,i));n=((e,t)=>me?e/t:ye().divide(e,t))(n,i),r.unshift(t[e]),n>0&&s()};return s(),r.join("")}const xe=(e,t,n={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:r=1e3,decimals:o=0,separator:i=" "}=n,{length:s}=t;if(0===s)throw new Error("At least one unit is required");let a=Number(e),l=0;for(;a>=r&&l<s-1;)a/=r,l++;const c=a.toFixed(o),u=t[l];return String(c)+i+u};function Se(e,t){if(A(t))return parseInt(String(e)).toLocaleString();let n=0;if(!w(t))throw new Error("Decimals must be a positive number not less than zero");return t>0&&(n=t),Number(Number(e).toFixed(n)).toLocaleString("en-US")}let Ae=0,Ee=0;const ve=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==Ee&&(Ee=t,Ae=0);const n=`${t}`;let r="";const o=e-5-13;if(o>0){r=`${he(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(Ae,5);return Ae++,`${n}${r}${i}`},Fe=e=>e[he(0,e.length-1)];function Ce(e,t,n){let r=250,o=13;const i=e.children[0];_(t,12)<230?(i.style.maxWidth=_(t,12)+20+50+"px",r=n.clientX+(_(t,12)+50)-document.body.offsetWidth):(i.style.maxWidth="250px",r=n.clientX+230-document.body.offsetWidth),i.innerHTML=t,r>0&&(o-=r),e.style.top=n.clientY+23+"px",e.style.left=n.clientX+o+"px",e.style.maxWidth="250px";const s=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;s>0&&(e.style.top=n.clientY-s+"px")}const $e={handleMouseEnter:function({rootContainer:e="#root",title:t,event:n,bgColor:r="#000",color:o="#fff"}){try{const i=y(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let s=null;const a="style-tooltip-inner1494304949567";if(!document.querySelector(`#${a}`)){const e=document.createElement("style");e.type="text/css",e.id=a,e.innerHTML=`\n .tooltip-inner1494304949567 {\n max-width: 250px;\n padding: 3px 8px;\n color: ${o};\n text-decoration: none;\n border-radius: 4px;\n text-align: left;\n background-color: ${r};\n }\n `,document.querySelector("head").appendChild(e)}if(s=document.querySelector("#customTitle1494304949567"),s)Ce(s,t,n);else{const e=document.createElement("div");e.id="customTitle1494304949567",e.style.cssText="z-index: 99999999; visibility: hidden; position: absolute;",e.innerHTML='<div class="tooltip-inner1494304949567" style="word-wrap: break-word; max-width: 44px;">皮肤</div>',i.appendChild(e),s=document.querySelector("#customTitle1494304949567"),t&&(Ce(s,t,n),s.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=y(e)?document.querySelector(e):e;let n=document.querySelector("#customTitle1494304949567");t&&n&&(t.removeChild(n),n=null)}},Te={keyField:"key",childField:"children",pidField:"pid"},Re={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};const Ne=(e,t)=>{let n=0;const r=e.toString(),o=t.toString();return void 0!==r.split(".")[1]&&(n+=r.split(".")[1].length),void 0!==o.split(".")[1]&&(n+=o.split(".")[1].length),Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,n)},Ie=(e,t)=>{let n=0,r=0,o=0;try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}return o=10**Math.max(n,r),(Ne(e,o)+Ne(t,o))/o};const je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",De=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function Pe(e){let t,n,r,o,i="",s=0;const a=(e=String(e)).length,l=a%3;for(;s<a;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");t=n<<16|r<<8|o,i+=je.charAt(t>>18&63)+je.charAt(t>>12&63)+je.charAt(t>>6&63)+je.charAt(63&t)}return l?i.slice(0,l-3)+"===".substring(l):i}function ke(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!De.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");let t,n,r,o="",i=0;for(const s=(e+="==".slice(2-(3&e.length))).length;i<s;)t=je.indexOf(e.charAt(i++))<<18|je.indexOf(e.charAt(i++))<<12|(n=je.indexOf(e.charAt(i++)))<<6|(r=je.indexOf(e.charAt(i++))),o+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}const Me=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Oe=/^(?:(?:\+|00)86)?1\d{10}$/,Le=/^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1]|8[1-2]|9[1])\d{4}(18|19|20)\d{2}[01]\d[0123]\d{4}[\dxX]$/,Be=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,Ue=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,He=/^(?:(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/,ze=/^(([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,7}:|([\da-fA-F]{1,4}:){1,6}:[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,5}(:[\da-fA-F]{1,4}){1,2}|([\da-fA-F]{1,4}:){1,4}(:[\da-fA-F]{1,4}){1,3}|([\da-fA-F]{1,4}:){1,3}(:[\da-fA-F]{1,4}){1,4}|([\da-fA-F]{1,4}:){1,2}(:[\da-fA-F]{1,4}){1,5}|[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,6})|:((:[\da-fA-F]{1,4}){1,7}|:)|fe80:(:[\da-fA-F]{0,4}){0,4}%[\da-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d)|([\da-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d))$/i,We=/^(-?[1-9]\d*|0)$/,qe=e=>We.test(e),_e=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Ge=e=>_e.test(e),Ye=/^\d+$/;function Ve(e){return[...new Set(e.trim().split(""))].join("")}function Xe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Je(e,t){return new RegExp(`${Xe(e.trim())}\\s*([^${Xe(Ve(e))}${Xe(Ve(t))}\\s]*)\\s*${t.trim()}`,"g")}e.EMAIL_REGEX=Me,e.HEX_POOL=ge,e.HTTP_URL_REGEX=Ue,e.IPV4_REGEX=He,e.IPV6_REGEX=ze,e.PHONE_REGEX=Oe,e.STRING_ARABIC_NUMERALS=L,e.STRING_LOWERCASE_ALPHA=B,e.STRING_POOL=pe,e.STRING_UPPERCASE_ALPHA=U,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=Be,e.add=Ie,e.addClass=function(e,t){W(t,(t=>e.classList.add(t)))},e.arrayEach=t,e.arrayEachAsync=async function(e,t,n=!1){if(n)for(let n=e.length-1;n>=0&&!1!==await t(e[n],n);n--);else for(let n=0,r=e.length;n<r&&!1!==await t(e[n],n);n++);},e.arrayInsertBefore=function(e,t,n){if(t===n||t+1===n)return;const[r]=e.splice(t,1),o=n<t?n:n-1;e.splice(o,0,r)},e.arrayLike=g,e.arrayRemove=function(e,n){const r=[],o=n;return t(e,((e,t)=>{o(e,t)&&r.push(t)})),r.forEach(((t,n)=>{e.splice(t-n,1)})),e},e.asyncMap=function(e,t,n=1/0){return new Promise(((r,o)=>{const i=e[Symbol.iterator](),s=Math.min(e.length,n),a=[];let l,c=0,u=0;const d=()=>{if(l)return o(l);const n=i.next();if(n.done)return void(c===e.length&&r(a));const s=u++;t(n.value,s,e).then((e=>{c++,a[s]=e,d()})).catch((e=>{l=e,d()}))};for(let e=0;e<s;e++)d()}))},e.b64decode=function(e){const t=A(fe("atob"))?ke(e):fe("atob")(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return A(fe("TextDecoder"))?function(e){const t=String.fromCharCode.apply(null,e);return decodeURIComponent(t)}(r):new(fe("TextDecoder"))("utf-8").decode(r)},e.b64encode=function(e){const t=A(fe("TextEncoder"))?function(e){const t=encodeURIComponent(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e):(new(fe("TextEncoder"))).encode(e);let n="";const r=t.length;for(let e=0;e<r;e++)n+=String.fromCharCode(t[e]);return A(fe("btoa"))?Pe(n):fe("btoa")(n)},e.calculateDate=function(e,t,n="-"){const r=new Date(e),o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime()+864e5*parseInt(String(t)),i=new Date(o);return i.getFullYear()+n+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0")},e.calculateDateTime=function(e,t,n="-",r=":"){const o=new Date(e),i=n,s=r,a=new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()).getTime()+864e5*parseInt(String(t)),l=new Date(a);return l.getFullYear()+i+String(l.getMonth()+1).padStart(2,"0")+i+String(l.getDate()).padStart(2,"0")+" "+String(l.getHours()).padStart(2,"0")+s+String(l.getMinutes()).padStart(2,"0")+s+String(l.getSeconds()).padStart(2,"0")},e.chooseLocalFile=function(e,t){let n=document.createElement("input");n.setAttribute("id",String(Date.now())),n.setAttribute("type","file"),n.setAttribute("style","visibility:hidden"),n.setAttribute("accept",e),document.body.appendChild(n),n.click(),n.onchange=e=>{t(e.target.files),setTimeout((()=>{document.body.removeChild(n),n=null}))}},e.cloneDeep=function e(t,n=new WeakMap){if(null===t||"object"!=typeof t)return t;if(n.has(t))return n.get(t);if(t instanceof ArrayBuffer){const e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),n.set(t,e),e}if(ArrayBuffer.isView(t)){return new(0,t.constructor)(e(t.buffer,n),t.byteOffset,t.length)}if(t instanceof Date){const e=new Date(t.getTime());return n.set(t,e),e}if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,n.set(t,e),e}if(t instanceof Map){const r=new Map;return n.set(t,r),t.forEach(((t,o)=>{r.set(e(o,n),e(t,n))})),r}if(t instanceof Set){const r=new Set;return n.set(t,r),t.forEach((t=>{r.add(e(t,n))})),r}if(Array.isArray(t)){const r=new Array(t.length);n.set(t,r);for(let o=0,i=t.length;o<i;o++)o in t&&(r[o]=e(t[o],n));const o=Object.getOwnPropertyDescriptors(t);for(const t of Reflect.ownKeys(o))Object.defineProperty(r,t,{...o[t],value:e(o[t].value,n)});return r}const r=Object.create(Object.getPrototypeOf(t));n.set(t,r);const o=Object.getOwnPropertyDescriptors(t);for(const t of Reflect.ownKeys(o)){const i=o[t];"value"in i?i.value=e(i.value,n):(i.get&&(i.get=e(i.get,n)),i.set&&(i.set=e(i.set,n))),Object.defineProperty(r,t,i)}return r},e.compressImg=function e(t,n={mime:"image/jpeg",minFileSizeKB:50}){if(!(t instanceof File||t instanceof FileList))throw new Error(`${t} require be File or FileList`);if(!ue())throw new Error("Current runtime environment not support Canvas");const{quality:r,mime:o="image/jpeg",maxSize:i,minFileSizeKB:s=50}=E(n)?n:{};let a,l=r;if(r)l=r;else if(t instanceof File){const e=+parseInt((t.size/1024).toFixed(2));l=e<s?1:e<1024?.85:e<5120?.8:.75}return w(i)&&(a=i>=1200?i:1200),t instanceof FileList?Promise.all(Array.from(t).map((t=>e(t,{maxSize:a,mime:o,quality:l})))):t instanceof File?new Promise((e=>{const n=[...t.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[o]].join("."),r=+parseInt((t.size/1024).toFixed(2));if(r<s)e({file:t});else{const i=new FileReader;i.onload=({target:{result:i}})=>{const s=new Image;s.onload=()=>{const c=document.createElement("canvas"),u=c.getContext("2d"),d=s.width,f=s.height,{width:h,height:p}=function({sizeKB:e,maxSize:t,originWidth:n,originHeight:r}){let o=n,i=r;if(w(t)){const{width:e,height:s}=de({maxWidth:t,maxHeight:t,originWidth:n,originHeight:r});o=e,i=s}else if(e<500){const e=1200,t=1200,{width:s,height:a}=de({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<5120){const e=1400,t=1400,{width:s,height:a}=de({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<10240){const e=1600,t=1600,{width:s,height:a}=de({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(10240<=e){const e=n>15e3?8192:n>1e4?4096:2048,t=r>15e3?8192:r>1e4?4096:2048,{width:s,height:a}=de({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}return{width:o,height:i}}({sizeKB:r,maxSize:a,originWidth:d,originHeight:f});c.width=h,c.height=p,u.clearRect(0,0,h,p),u.drawImage(s,0,0,h,p);const g=c.toDataURL(o,l),m=atob(g.split(",")[1]);let y=m.length;const b=new Uint8Array(new ArrayBuffer(y));for(;y--;)b[y]=m.charCodeAt(y);const x=new File([b],n,{type:o});e({file:x,bufferArray:b,origin:t,beforeSrc:i,afterSrc:g,beforeKB:r,afterKB:Number((x.size/1024).toFixed(2))})},s.src=i},i.readAsDataURL(t)}})):Promise.resolve(null)},e.cookieDel=e=>V(e,"",-1),e.cookieGet=function(e){const{cookie:t}=document;if(!t)return"";const n=t.split(";");for(let t=0;t<n.length;t++){const r=n[t],[o,i=""]=r.split("=");if(o===e)return decodeURIComponent(i)}return""},e.cookieSet=V,e.copyText=function(e,t){const{successCallback:n,failCallback:r}=A(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{F(n)&&n()})).catch((n=>{Y(e,t)})):Y(e,t)},e.crossOriginDownload=function(e,t,n){const{successCode:r=200,successCallback:o,failCallback:i}=A(n)?{successCode:200,successCallback:void 0,failCallback:void 0}:n,s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="blob",s.onload=function(){if(s.status===r)ce(s.response,t,o);else if(F(i)){const e=s.status,t=s.getResponseHeader("Content-Type");if(y(t)&&t.includes("application/json")){const t=new FileReader;t.onload=()=>{i({status:e,response:t.result})},t.readAsText(s.response)}else i(s)}},s.onerror=e=>{F(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},s.send()},e.dateParse=Z,e.dateToEnd=function(e){const t=Q(e);return t.setDate(t.getDate()+1),Z(t.getTime()-1)},e.dateToStart=Q,e.debounce=(e,t)=>{let n,r=!1;const o=function(...o){r||(clearTimeout(n),n=setTimeout((()=>{e.call(this,...o)}),t))};return o.cancel=()=>{clearTimeout(n),r=!0},o},e.divide=(e,t)=>{let n=0,r=0,o=0,i=0;return void 0!==e.toString().split(".")[1]&&(n=e.toString().split(".")[1].length),void 0!==t.toString().split(".")[1]&&(r=t.toString().split(".")[1].length),o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,r-n)},e.downloadBlob=ce,e.downloadData=function(e,t,n,r){if(n=n.replace(`.${t}`,"")+`.${t}`,"json"===t){ce(new Blob([JSON.stringify(e,null,4)]),n)}else{if(!r||!r.length)throw new Error("未传入表头数据");if(!Array.isArray(e))throw new Error("data error! expected array!");const o=r.join(",")+"\n";let i="";e.forEach((e=>{i+=Object.values(e).join(",\t")+",\n"}));le("data:"+{csv:"text/csv",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[t]+";charset=utf-8,\ufeff"+encodeURIComponent(o+i),n)}},e.downloadHref=le,e.downloadURL=function(e,t){window.open(t?ae(e,t):e)},e.easingFunctional=I,e.easingStringify=function(e){let t;if(v(e))t=e;else{const n=N[e];if(!n)throw new Error(`${e} 缓冲函数未定义`);t=n}return`cubic-bezier(${t.join(",")})`},e.escapeRegExp=Xe,e.executeInScope=function(e,t={}){const n=Object.keys(t),r=n.map((e=>t[e]));try{return new Function(...n,`return (() => { ${e} })()`)(...r)}catch(e){throw new Error(`代码执行失败: ${e.message}`)}},e.fallbackCopyText=Y,e.flatTree=function e(t,n=Te){const{keyField:r="key",childField:o="children",pidField:i="pid"}=E(n)?n:{};let s=[];for(let a=0,l=t.length;a<l;a++){const l=t[a],c={...l,[o]:[]};if(p(c,o)&&delete c[o],s.push(c),l[o]){const t=l[o].map((e=>({...e,[i]:l[r]||e.pid})));s=s.concat(e(t,n))}}return s},e.forEachDeep=function(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:r="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:s=!1}=E(n)?n:{};let a=!1;const l=[],c=(n,o,u=0)=>{for(let d=n.length-1;d>=0&&!a;d--){const f=n[d];if(i)l.push({item:f,index:d,array:n,tree:e,parent:o,level:u});else{const i=t(f,d,n,e,o,u);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?R(f[r]):Array.isArray(f[r]))&&c(f[r],f,u+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift(),{item:n,index:o,array:i,tree:u,parent:d,level:f}=e,h=t(n,o,i,u,d,f);if(!1===h){a=!0;break}!0!==h&&(n&&(s?R(n[r]):Array.isArray(n[r]))&&c(n[r],n,f+1))}},u=(n,o,c=0)=>{for(let d=0,f=n.length;d<f&&!a;d++){const f=n[d];if(i)l.push({item:f,index:d,array:n,tree:e,parent:o,level:c});else{const i=t(f,d,n,e,o,c);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?R(f[r]):Array.isArray(f[r]))&&u(f[r],f,c+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift();if(!e)break;const{item:n,index:o,array:i,tree:c,parent:d,level:f}=e,h=t(n,o,i,c,d,f);if(!1===h){a=!0;break}!0!==h&&(n&&(s?R(n[r]):Array.isArray(n[r]))&&u(n[r],n,f+1))}};o?c(e,null,0):u(e,null,0),e=null},e.formatDate=function(e,t="YYYY-MM-DD HH:mm:ss"){const n=Z(e);let r,o=t;const i={"Y+":`${n.getFullYear()}`,"y+":`${n.getFullYear()}`,"M+":`${n.getMonth()+1}`,"D+":`${n.getDate()}`,"d+":`${n.getDate()}`,"H+":`${n.getHours()}`,"m+":`${n.getMinutes()}`,"s+":`${n.getSeconds()}`,"S+":`${n.getMilliseconds()}`,"w+":["周日","周一","周二","周三","周四","周五","周六"][n.getDay()]};for(const e in i)r=new RegExp("("+e+")").exec(o),r&&(o=o.replace(r[1],1===r[1].length?i[e]:i[e].padStart(r[1].length,"0")));return o},e.formatMoney=Se,e.formatNumber=Se,e.formatTree=function(e,t=Te){const{keyField:n="key",childField:r="children",pidField:o="pid"}=E(t)?t:{},i=[],s={};for(let t=0,r=e.length;t<r;t++){const r=e[t];s[r[n]]=r}for(let t=0,n=e.length;t<n;t++){const n=e[t],a=s[n[o]];a?(a[r]||(a[r]=[])).push(n):i.push(n)}return e=null,i},e.fuzzySearchTree=function e(t,n,r=Re){if(!p(n,"filter")&&(!p(n,"keyword")||T(n.keyword)))return t;const o=[];for(let i=0,s=t.length;i<s;i++){const s=t[i],a=s[r.childField]&&s[r.childField].length>0?e(s[r.childField]||[],n,r):[];if((p(n,"filter")?n.filter(s):r.ignoreCase?s[r.nameField].toLowerCase().includes(n.keyword.toLowerCase()):s[r.nameField].includes(n.keyword))||a.length>0)if(s[r.childField])if(a.length>0)o.push({...s,[r.childField]:a});else if(r.removeEmptyChild){const{[r.childField]:e,...t}=s;o.push(t)}else o.push({...s,[r.childField]:[]});else{const{[r.childField]:e,...t}=s;o.push(t)}}return o},e.genCanvasWM=function e(t="请勿外传",n){const{rootContainer:r=document.body,width:o="300px",height:i="150px",textAlign:s="center",textBaseline:a="middle",font:l="20px PingFangSC-Medium,PingFang SC",fillStyle:c="rgba(189, 177, 167, .3)",rotate:u=-20,zIndex:d=2147483647,watermarkId:f="__wm"}=A(n)?{}:n,h=y(r)?document.querySelector(r):r;if(!h)throw new Error(`${r} is not valid Html Element or element selector`);const p=document.createElement("canvas");p.setAttribute("width",o),p.setAttribute("height",i);const g=p.getContext("2d");g.textAlign=s,g.textBaseline=a,g.font=l,g.fillStyle=c,g.rotate(Math.PI/180*u),g.fillText(t,parseFloat(o)/4,parseFloat(i)/2);const m=p.toDataURL(),b=document.querySelector(`#${f}`),w=b||document.createElement("div"),x=`opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${d}; pointer-events:none; background-repeat:repeat; background-image:url('${m}')`;w.setAttribute("style",x),w.setAttribute("id",f),w.classList.add("nav-height"),b||(h.style.position="relative",h.appendChild(w));const S=window.MutationObserver||window.WebKitMutationObserver;if(S){let r=new S((function(){let o=document.querySelector(`#${f}`);if(o){const{opacity:i,zIndex:s,display:a,visibility:l}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(o);(o&&o.getAttribute("style")!==x||!o||"1"!==i||"2147483647"!==s||"block"!==a||"visible"!==l)&&(r.disconnect(),r=null,h.removeChild(o),o=null,e(t,n))}else r.disconnect(),r=null,e(t,n)}));r.observe(h,{attributes:!0,subtree:!0,childList:!0})}},e.getComputedCssVal=function(e,t,n=!0){const r=getComputedStyle(e).getPropertyValue(t)??"";return n?Number(r.replace(/([0-9]*)(.*)/g,"$1")):r},e.getEasing=function(e){return e?N[e]:N},e.getGlobal=fe,e.getStrWidthPx=_,e.getStyle=function(e,t){return getComputedStyle(e).getPropertyValue(t)},e.hasClass=function(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},e.humanFileSize=function(e,t={decimals:0,si:!1,separator:" "}){const{decimals:n=0,si:r=!1,separator:o=" ",baseUnit:i,maxUnit:s}=t;let a=r?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!A(i)){const e=a.findIndex((e=>e===i));-1!==e&&(a=a.slice(e))}if(!A(s)){const e=a.findIndex((e=>e===s));-1!==e&&a.splice(e+1)}return xe(e,a,{ratio:r?1e3:1024,decimals:n,separator:o})},e.isArray=v,e.isBigInt=e=>"bigint"==typeof e,e.isBoolean=b,e.isDate=$,e.isDigit=e=>Ye.test(e),e.isEmail=e=>Me.test(e),e.isEmpty=T,e.isError=e=>"Error"===m(e),e.isFloat=Ge,e.isFunction=F,e.isIdNo=e=>{if(!Le.test(e))return!1;const t=Number(e.slice(6,10)),n=Number(e.slice(10,12)),r=Number(e.slice(12,14)),o=new Date(t,n-1,r);if(!(o.getFullYear()===t&&o.getMonth()+1===n&&o.getDate()===r))return!1;const i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let s=0;for(let t=0;t<17;t++)s+=Number(e.slice(t,t+1))*i[t];return["1","0","X","9","8","7","6","5","4","3","2"][s%11]===e.slice(-1)},e.isInteger=qe,e.isIpV4=e=>He.test(e),e.isIpV6=e=>ze.test(e),e.isJsonString=function(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}},e.isNaN=C,e.isNodeList=R,e.isNull=S,e.isNullOrUnDef=A,e.isNullish=A,e.isNumber=w,e.isNumerical=e=>qe(e)||Ge(e),e.isObject=E,e.isPhone=e=>Oe.test(e),e.isPlainObject=j,e.isPrimitive=e=>null===e||"object"!=typeof e,e.isRegExp=e=>"RegExp"===m(e),e.isString=y,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=x,e.isUrl=(e,t=!1)=>(t?Be:Ue).test(e),e.isValidDate=X,e.mapDeep=function(e,t,n={childField:"children",reverse:!1}){const{childField:r="children",reverse:o=!1}=E(n)?n:{};let i=!1;const s=[],a=(n,s,l,c=0)=>{if(o)for(let o=n.length-1;o>=0&&!i;o--){const u=n[o],d=t(u,o,n,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(P(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],a(u[r],u,l[l.length-1][r],c+1)):delete d[r])}else for(let o=0;o<n.length&&!i;o++){const u=n[o],d=t(u,o,n,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(P(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],a(u[r],u,l[l.length-1][r],c+1)):delete d[r])}};return a(e,null,s),e=null,s},e.multiply=Ne,e.numberAbbr=xe,e.numberToHex=we,e.objectAssign=M,e.objectEach=D,e.objectEachAsync=async function(e,t){for(const n in e)if(p(e,n)&&!1===await t(e[n],n))break},e.objectFill=function(e,t,n){const r=n||((e,t,n)=>void 0===e[n]);return D(t,((n,o)=>{r(e,t,o)&&(e[o]=n)})),e},e.objectGet=function(e,t,n=!1){const r=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");let o=e,i=0;for(let e=r.length;i<e-1;++i){const e=r[i];if(w(Number(e))&&Array.isArray(o))o=o[e];else{if(!E(o)||!p(o,e)){if(o=void 0,n)throw new Error("[Object] objectGet path 路径不正确");break}o=o[e]}}return{p:o,k:o?r[i]:void 0,v:o?o[r[i]]:void 0}},e.objectHas=p,e.objectMap=function(e,t){const n={};for(const r in e)p(e,r)&&(n[r]=t(e[r],r));return e=null,n},e.objectMerge=M,e.objectOmit=P,e.objectPick=function(e,t){const n={};return D(e,((e,r)=>{t.includes(r)&&(n[r]=e)})),e=null,n},e.once=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.call(this,...r)),t}},e.parseQueryParams=function(e=location.search){const t={};return Array.from(e.matchAll(/[&?]?([^=&]+)=?([^=&]*)/g)).forEach(((e,n)=>{t[e[1]]?"string"==typeof t[e[1]]?t[e[1]]=[t[e[1]],e[2]]:t[e[1]].push(e[2]):t[e[1]]=e[2]})),t},e.parseVarFromString=function(e,t="{",n="}"){return Array.from(e.matchAll(Je(t,n))).map((e=>A(e)?void 0:e[1]))},e.pathJoin=te,e.pathNormalize=ee,e.qsParse=ne,e.qsStringify=oe,e.randomNumber=he,e.randomString=(e,t)=>{let n=0,r=pe;y(t)?(n=e,r=t):w(e)?n=e:y(e)&&(r=e);let o=Math.max(n,1),i="";const s=r.length-1;if(s<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=r[he(0,s)]}return i},e.randomUuid=function(){if("undefined"==typeof URL||!URL.createObjectURL||"undefined"==typeof Blob){const e="0123456789abcdef",t="xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx";let n="";for(let r=0;r<t.length;r++){const o=he(0,15);n+="-"==t[r]||"4"==t[r]?t[r]:e[o]}return n}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]},e.removeClass=function(e,t){W(t,(t=>e.classList.remove(t)))},e.replaceVarFromString=function(e,t,n="{",r="}"){return e.replace(new RegExp(Je(n,r)),(function(e,n){return p(t,n)?t[n]:e}))},e.safeAwait=function(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))},e.searchTreeById=function(e,t,n={childField:"children",keyField:"id"}){const{childField:r="children",keyField:o="id"}=E(n)?n:{},i=(e,t,n)=>e.reduce(((e,s)=>{const a=s[r];return[...e,t?{...s,parentId:t,parent:n}:s,...a&&a.length?i(a,s[o],s):[]]}),[]);return(e=>{let n=e.find((e=>e[o]===t));const{parent:r,parentId:i,...s}=n;let a=[t],l=[s];for(;n&&n.parentId;)a=[n.parentId,...a],l=[n.parent,...l],n=e.find((e=>e[o]===n.parentId));return[a,l]})(i(e))},e.select=G,e.setEasing=function(e,t){N[e]=t},e.setGlobal=function(e,t){if("undefined"!=typeof globalThis)globalThis[e]=t;else if("undefined"!=typeof window)window[e]=t;else if("undefined"!=typeof global)global[e]=t;else{if("undefined"==typeof self)throw new SyntaxError("当前环境下无法设置全局属性");self[e]=t}},e.setStyle=q,e.smoothScroll=function(e){return new Promise((n=>{const r={el:document,to:0,duration:567,easing:"ease"},{el:o,to:i,duration:s,easing:a}=M(r,e),l=document.documentElement,c=document.body,u=o===window||o===document||o===l||o===c?[l,c]:[o];let d;const f=(()=>{let e=0;return t(u,(t=>{if("scrollTop"in t)return e=t.scrollTop,!1})),e})(),h=i-f,p=I(a),g=()=>{const e=performance.now(),t=(d?e-d:0)/s,r=p(t);var o;d||(d=e),o=f+h*r,u.forEach((e=>{"scrollTop"in e&&(e.scrollTop=o)})),t>=1?n():requestAnimationFrame(g)};g()}))},e.stringAssign=(e,t)=>e.replace(z,((e,n)=>((e,t)=>{try{return new Function(`with(arguments[0]){if(arguments[0].${e} === undefined)throw "";return String(arguments[0].${e})}`)(t)}catch(t){throw new SyntaxError(`无法执行表达式:${e}`)}})(n,t))),e.stringCamelCase=function(e,t){let n=e;return t&&(n=e.replace(/^./,(e=>e.toUpperCase()))),n.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))},e.stringEscapeHtml=e=>{const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return e.replace(/[&<>"]/g,(e=>t[e]))},e.stringFill=(e,t=" ")=>new Array(e).fill(t).join(""),e.stringFormat=function(e,...t){let n=0;return[e.replace(H,(e=>{const r=t[n++];switch(e){case"%%":return n--,"%";default:case"%s":return String(r);case"%d":return String(Number(r));case"%o":return JSON.stringify(r)}})),...t.splice(n).map(String)].join(" ")},e.stringKebabCase=O,e.strip=function(e,t=15){return+parseFloat(Number(e).toPrecision(t))},e.subtract=(e,t)=>Ie(e,-t),e.supportCanvas=ue,e.throttle=(e,t,n)=>{let r,o=!1,i=0;const s=function(...s){if(o)return;const a=Date.now(),l=()=>{i=a,e.call(this,...s)};if(0===i)return n?l():void(i=a);i+t-a>0?(clearTimeout(r),r=setTimeout((()=>l()),t)):l()};return s.cancel=()=>{clearTimeout(r),o=!0},s},e.tooltipEvent=$e,e.typeIs=m,e.uniqueNumber=ve,e.uniqueString=(e,t)=>{let n=0,r=ge;y(t)?(n=e,r=t):w(e)?n=e:y(e)&&(r=e);let o=we(ve(),r),i=n-o.length;if(i<=0)return o;for(;i--;)o+=Fe(r);return o},e.uniqueSymbol=Ve,e.urlDelParams=(e,t)=>{const n=ie(e);return t.forEach((e=>delete n.searchParams[e])),se(n)},e.urlParse=ie,e.urlSetParams=ae,e.urlStringify=se,e.wait=function(e=1){return new Promise((t=>setTimeout(t,e)))},e.weAtob=ke,e.weBtoa=Pe}));
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "sculp-js",
3
- "version": "1.13.3-beta.0",
3
+ "version": "1.13.6",
4
4
  "description": "Utils function library for modern javascript",
5
5
  "scripts": {
6
6
  "prepare": "husky install",
7
7
  "build": "rollup --bundleConfigAsCjs --config rollup.config.js",
8
+ "build:types": "tsc --emitDeclarationOnly --declaration --outDir dist/types src/index.ts",
8
9
  "build:core": "BUILD_TARGET=core rollup --bundleConfigAsCjs --config rollup.config.js",
9
10
  "build:terser": "node scripts/build.js",
10
11
  "test:unit": "jest",
@@ -16,9 +17,10 @@
16
17
  },
17
18
  "main": "dist/cjs/index.js",
18
19
  "module": "dist/esm/index.js",
20
+ "types": "dist/types/index.d.ts",
19
21
  "browser": "dist/umd/index.min.js",
20
22
  "unpkg": "dist/umd/index.min.js",
21
- "types": "dist/types/index.d.ts",
23
+ "jsdelivr": "dist/umd/index.min.js",
22
24
  "typesVersions": {
23
25
  "*": {
24
26
  "./array": [
@@ -257,11 +259,14 @@
257
259
  "es6",
258
260
  "util"
259
261
  ],
260
- "engines": {
261
- "node": ">=16"
262
+ "repository": {
263
+ "type": "git",
264
+ "url": "git+https://github.com/chandq/sculp-js.git"
262
265
  },
263
- "repository": "git@github.com:chandq/sculp-js.git",
264
266
  "license": "MIT",
267
+ "bugs": {
268
+ "url": "https://github.com/chandq/sculp-js/issues"
269
+ },
265
270
  "homepage": "https://github.com/chandq/sculp-js#readme",
266
271
  "dependencies": {
267
272
  "bezier-easing": "^2.1.0"
@@ -300,9 +305,10 @@
300
305
  "jest-environment-jsdom": "^29.7.0",
301
306
  "lint-staged": "^13.2.2",
302
307
  "prettier": "^3.0.3",
303
- "rollup": "^3.29.4",
308
+ "rollup": "^4.52.5",
304
309
  "rollup-plugin-clear": "^2.0.7",
305
310
  "rollup-plugin-dts": "^6.1.0",
311
+ "rollup-plugin-prettier": "^4.1.2",
306
312
  "rollup-plugin-subpath-externals": "^3.4.0",
307
313
  "standard-version": "^9.5.0",
308
314
  "typescript": "5.0.4"
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,QAAQ,CAAC;AAErD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,IAAI,EACpE,OAAO,UAAQ,GACd,IAAI,CAgBN;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,EACrD,OAAO,UAAQ,GACd,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAOlF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,CAAC,EAAE,CAexF"}