sculp-js 1.18.3 → 1.19.1

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 (90) hide show
  1. package/README.md +83 -6
  2. package/dist/cjs/array.cjs +10 -2
  3. package/dist/cjs/async.cjs +8 -2
  4. package/dist/cjs/base64.cjs +9 -2
  5. package/dist/cjs/clipboard.cjs +7 -2
  6. package/dist/cjs/cloneDeep.cjs +6 -2
  7. package/dist/cjs/cookie.cjs +8 -2
  8. package/dist/cjs/date.cjs +12 -2
  9. package/dist/cjs/dom.cjs +13 -2
  10. package/dist/cjs/download.cjs +10 -2
  11. package/dist/cjs/file.cjs +8 -2
  12. package/dist/cjs/func.cjs +10 -2
  13. package/dist/cjs/index.cjs +36 -3
  14. package/dist/cjs/isEqual.cjs +6 -2
  15. package/dist/cjs/math.cjs +10 -2
  16. package/dist/cjs/number.cjs +13 -4
  17. package/dist/cjs/object.cjs +18 -4
  18. package/dist/cjs/path.cjs +7 -2
  19. package/dist/cjs/qs.cjs +7 -2
  20. package/dist/cjs/random.cjs +9 -2
  21. package/dist/cjs/string.cjs +15 -2
  22. package/dist/cjs/tooltip.cjs +6 -2
  23. package/dist/cjs/tree.cjs +13 -2
  24. package/dist/cjs/type.cjs +27 -2
  25. package/dist/cjs/unicodeToolkit.cjs +6 -2
  26. package/dist/cjs/unique.cjs +8 -2
  27. package/dist/cjs/url.cjs +9 -2
  28. package/dist/cjs/validator.cjs +21 -2
  29. package/dist/cjs/variable.cjs +10 -2
  30. package/dist/cjs/watermark.cjs +6 -2
  31. package/dist/esm/array.mjs +9 -2
  32. package/dist/esm/async.mjs +7 -2
  33. package/dist/esm/base64.mjs +8 -2
  34. package/dist/esm/clipboard.mjs +6 -2
  35. package/dist/esm/cloneDeep.mjs +5 -2
  36. package/dist/esm/cookie.mjs +7 -2
  37. package/dist/esm/date.mjs +20 -2
  38. package/dist/esm/dom.mjs +22 -2
  39. package/dist/esm/download.mjs +9 -2
  40. package/dist/esm/file.mjs +7 -2
  41. package/dist/esm/func.mjs +9 -2
  42. package/dist/esm/index.mjs +64 -2
  43. package/dist/esm/isEqual.mjs +5 -2
  44. package/dist/esm/math.mjs +9 -2
  45. package/dist/esm/number.mjs +20 -4
  46. package/dist/esm/object.mjs +16 -2
  47. package/dist/esm/path.mjs +6 -2
  48. package/dist/esm/qs.mjs +7 -3
  49. package/dist/esm/random.mjs +8 -2
  50. package/dist/esm/string.mjs +14 -1
  51. package/dist/esm/tooltip.mjs +5 -2
  52. package/dist/esm/tree.mjs +23 -3
  53. package/dist/esm/type.mjs +27 -2
  54. package/dist/esm/unicodeToolkit.mjs +5 -2
  55. package/dist/esm/unique.mjs +7 -2
  56. package/dist/esm/url.mjs +9 -3
  57. package/dist/esm/validator.mjs +20 -1
  58. package/dist/esm/variable.mjs +10 -3
  59. package/dist/esm/watermark.mjs +5 -2
  60. package/dist/types/array.d.ts +8 -0
  61. package/dist/types/async.d.ts +6 -0
  62. package/dist/types/base64.d.ts +7 -0
  63. package/dist/types/clipboard.d.ts +5 -1
  64. package/dist/types/cloneDeep.d.ts +4 -0
  65. package/dist/types/cookie.d.ts +6 -0
  66. package/dist/types/date.d.ts +10 -0
  67. package/dist/types/dom.d.ts +11 -0
  68. package/dist/types/download.d.ts +8 -1
  69. package/dist/types/file.d.ts +6 -1
  70. package/dist/types/func.d.ts +8 -0
  71. package/dist/types/index.d.ts +30 -0
  72. package/dist/types/isEqual.d.ts +4 -0
  73. package/dist/types/math.d.ts +8 -1
  74. package/dist/types/number.d.ts +11 -2
  75. package/dist/types/object.d.ts +13 -0
  76. package/dist/types/path.d.ts +5 -0
  77. package/dist/types/qs.d.ts +5 -0
  78. package/dist/types/random.d.ts +7 -0
  79. package/dist/types/string.d.ts +13 -0
  80. package/dist/types/tooltip.d.ts +7 -0
  81. package/dist/types/tree.d.ts +11 -0
  82. package/dist/types/type.d.ts +29 -4
  83. package/dist/types/unicodeToolkit.d.ts +4 -0
  84. package/dist/types/unique.d.ts +6 -0
  85. package/dist/types/url.d.ts +7 -0
  86. package/dist/types/validator.d.ts +19 -0
  87. package/dist/types/variable.d.ts +8 -0
  88. package/dist/types/watermark.d.ts +4 -0
  89. package/dist/umd/index.min.js +2 -2
  90. package/package.json +1 -1
@@ -71,3 +71,13 @@ 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
+ declare const _default: {
75
+ isValidDate: (any: unknown) => any is Date;
76
+ dateParse: typeof dateParse;
77
+ dateToStart: typeof dateToStart;
78
+ dateToEnd: typeof dateToEnd;
79
+ formatDate: typeof formatDate;
80
+ calculateDate: typeof calculateDate;
81
+ calculateDateTime: typeof calculateDateTime;
82
+ };
83
+ export default _default;
@@ -61,3 +61,14 @@ export declare function getStrWidthPx(str: string, fontSize?: number, isRemove?:
61
61
  * @returns
62
62
  */
63
63
  export declare function select(element: HTMLElement): any;
64
+ declare const _default: {
65
+ hasClass: typeof hasClass;
66
+ addClass: typeof addClass;
67
+ removeClass: typeof removeClass;
68
+ setStyle: SetStyle;
69
+ getStyle: typeof getStyle;
70
+ getComputedCssVal: typeof getComputedCssVal;
71
+ getStrWidthPx: typeof getStrWidthPx;
72
+ select: typeof select;
73
+ };
74
+ export default _default;
@@ -43,4 +43,11 @@ export type FileType = 'json' | 'csv' | 'xls' | 'xlsx';
43
43
  * @param {string[]} [headers]
44
44
  */
45
45
  export declare function downloadData(data: AnyObject | AnyObject[], fileType: FileType, filename: string, headers?: string[]): void;
46
- export {};
46
+ declare const _default: {
47
+ downloadURL: typeof downloadURL;
48
+ downloadHref: typeof downloadHref;
49
+ downloadBlob: typeof downloadBlob;
50
+ crossOriginDownload: typeof crossOriginDownload;
51
+ downloadData: typeof downloadData;
52
+ };
53
+ export default _default;
@@ -40,4 +40,9 @@ export interface ICompressImgResult {
40
40
  * @returns {Promise<ICompressImgResult | ICompressImgResult[] | null>}
41
41
  */
42
42
  export declare function compressImg(file: File | FileList, options?: ICompressOptions): Promise<ICompressImgResult | ICompressImgResult[] | null>;
43
- export {};
43
+ declare const _default: {
44
+ supportCanvas: typeof supportCanvas;
45
+ chooseLocalFile: typeof chooseLocalFile;
46
+ compressImg: typeof compressImg;
47
+ };
48
+ export default _default;
@@ -47,3 +47,11 @@ 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
+ declare const _default: {
51
+ debounce: <F extends AnyFunc>(func: F, wait?: number) => DebounceFunc<F>;
52
+ throttle: <F_1 extends AnyFunc>(func: F_1, wait: number, immediate?: boolean) => ThrottleFunc<F_1>;
53
+ once: <F_2 extends AnyFunc = AnyFunc>(func: F_2) => OnceFunc<F_2>;
54
+ getGlobal: typeof getGlobal;
55
+ setGlobal: typeof setGlobal;
56
+ };
57
+ export default _default;
@@ -26,3 +26,33 @@ export * from './variable';
26
26
  export * from './cloneDeep';
27
27
  export * from './isEqual';
28
28
  export * from './unicodeToolkit';
29
+ import * as array from './array';
30
+ import * as clipboard from './clipboard';
31
+ import * as cookie from './cookie';
32
+ import * as date from './date';
33
+ import * as dom from './dom';
34
+ import * as download from './download';
35
+ import * as object from './object';
36
+ import * as path from './path';
37
+ import * as qs from './qs';
38
+ import * as string from './string';
39
+ import * as type from './type';
40
+ import * as url from './url';
41
+ import * as async from './async';
42
+ import * as file from './file';
43
+ import * as watermark from './watermark';
44
+ import * as func from './func';
45
+ import * as random from './random';
46
+ import * as number from './number';
47
+ import * as unique from './unique';
48
+ import * as tooltip from './tooltip';
49
+ import * as tree from './tree';
50
+ import * as math from './math';
51
+ import * as base64 from './base64';
52
+ import * as validator from './validator';
53
+ import * as variable from './variable';
54
+ import * as cloneDeep from './cloneDeep';
55
+ import * as isEqual from './isEqual';
56
+ import * as unicodeToolkit from './unicodeToolkit';
57
+ declare const _default: typeof array & typeof clipboard & typeof cookie & typeof date & typeof dom & typeof download & typeof object & typeof path & typeof qs & typeof string & typeof type & typeof url & typeof async & typeof file & typeof watermark & typeof func & typeof random & typeof number & typeof unique & typeof tooltip & typeof tree & typeof math & typeof base64 & typeof validator & typeof variable & typeof cloneDeep & typeof isEqual & typeof unicodeToolkit;
58
+ export default _default;
@@ -13,3 +13,7 @@
13
13
  * @returns {boolean} 是否深度相等
14
14
  */
15
15
  export declare function isEqual(value: any, other: any): boolean;
16
+ declare const _default: {
17
+ isEqual: typeof isEqual;
18
+ };
19
+ export default _default;
@@ -32,4 +32,11 @@ type NumberType = number | string;
32
32
  * @example strip(0.09999999999999998) === 0.1 // true
33
33
  */
34
34
  export declare function strip(num: NumberType, precision?: number): number;
35
- export {};
35
+ declare const _default: {
36
+ add: (arg1: number, arg2: number) => number;
37
+ subtract: (arg1: number, arg2: number) => number;
38
+ multiply: (arg1: number, arg2: number) => number;
39
+ divide: (arg1: number, arg2: number) => number;
40
+ strip: typeof strip;
41
+ };
42
+ export default _default;
@@ -31,9 +31,9 @@ interface IHumanFileSizeOptions {
31
31
  * reference: https://zh.wikipedia.org/wiki/%E5%8D%83%E5%AD%97%E8%8A%82
32
32
  * @param {number | string} num bytes Number in Bytes
33
33
  * @param {IHumanFileSizeOptions} options default: { decimals = 0, si = false, separator = ' ' }
34
- * si: True to use metric (SI) units, aka powers of 1000, the units is
34
+ * si: True to use metric (SI) units, aka powers of 1000, units is
35
35
  * ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'].
36
- * False to use binary (IEC), aka powers of 1024, the units is
36
+ * False to use binary (IEC), aka powers of 1024, units is
37
37
  * ['Byte', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
38
38
  * @returns
39
39
  */
@@ -46,3 +46,12 @@ 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
+ declare const _default: {
50
+ HEX_POOL: string;
51
+ numberToHex: typeof numberToHex;
52
+ numberAbbr: (num: string | number, units: string[], options?: INumberAbbr) => string;
53
+ humanFileSize: typeof humanFileSize;
54
+ formatNumber: typeof formatNumber;
55
+ formatMoney: typeof formatNumber;
56
+ };
57
+ export default _default;
@@ -67,3 +67,16 @@ export declare function objectGet(obj: AnyObject | AnyArray | undefined, path: s
67
67
  k: string | undefined;
68
68
  v: any | undefined;
69
69
  };
70
+ declare const _default: {
71
+ isPlainObject: (obj: unknown) => boolean;
72
+ objectEach: typeof objectEach;
73
+ objectEachAsync: typeof objectEachAsync;
74
+ objectMap: typeof objectMap;
75
+ objectPick: typeof objectPick;
76
+ objectOmit: typeof objectOmit;
77
+ objectAssign: typeof objectAssign;
78
+ objectMerge: typeof objectAssign;
79
+ objectFill: typeof objectFill;
80
+ objectGet: typeof objectGet;
81
+ };
82
+ export default _default;
@@ -11,3 +11,8 @@ 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
+ declare const _default: {
15
+ pathJoin: (from: string, ...to: string[]) => string;
16
+ pathNormalize: (path: string) => string;
17
+ };
18
+ export default _default;
@@ -19,3 +19,8 @@ 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
+ declare const _default: {
23
+ qsParse: typeof qsParse;
24
+ qsStringify: typeof qsStringify;
25
+ };
26
+ export default _default;
@@ -24,3 +24,10 @@ export declare const randomString: RandomString;
24
24
  * @returns {string}
25
25
  */
26
26
  export declare function randomUuid(): string;
27
+ declare const _default: {
28
+ STRING_POOL: string;
29
+ randomNumber: (min: number, max: number) => number;
30
+ randomString: RandomString;
31
+ randomUuid: typeof randomUuid;
32
+ };
33
+ export default _default;
@@ -64,3 +64,16 @@ 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
+ declare const _default: {
68
+ stringCamelCase: typeof stringCamelCase;
69
+ stringKebabCase: typeof stringKebabCase;
70
+ STRING_ARABIC_NUMERALS: string;
71
+ STRING_LOWERCASE_ALPHA: string;
72
+ STRING_UPPERCASE_ALPHA: string;
73
+ stringFormat: typeof stringFormat;
74
+ stringAssign: (template: string, data: AnyObject) => string;
75
+ stringEscapeHtml: (html: string) => string;
76
+ stringFill: (length: number, value?: string) => string;
77
+ parseQueryParams: typeof parseQueryParams;
78
+ };
79
+ export default _default;
@@ -33,3 +33,10 @@ declare const tooltipEvent: {
33
33
  handleMouseLeave: typeof handleMouseLeave;
34
34
  };
35
35
  export { tooltipEvent };
36
+ declare const _default: {
37
+ tooltipEvent: {
38
+ handleMouseEnter: typeof handleMouseEnter;
39
+ handleMouseLeave: typeof handleMouseLeave;
40
+ };
41
+ };
42
+ export default _default;
@@ -133,3 +133,14 @@ export declare function flatTree(treeList: any[], options?: IFieldOptions): any[
133
133
  * @returns {V[]}
134
134
  */
135
135
  export declare function fuzzySearchTree<V>(nodes: V[], filterCondition: IFilterCondition<V>, options?: ISearchTreeOpts): V[];
136
+ declare const _default: {
137
+ forEachDeep: typeof forEachDeep;
138
+ findDeep: typeof findDeep;
139
+ filterDeep: typeof filterDeep;
140
+ mapDeep: typeof mapDeep;
141
+ searchTreeById: typeof searchTreeById;
142
+ formatTree: typeof formatTree;
143
+ flatTree: typeof flatTree;
144
+ fuzzySearchTree: typeof fuzzySearchTree;
145
+ };
146
+ export default _default;
@@ -20,19 +20,19 @@ export interface PromiseFn<T = any, R = T> {
20
20
  /**
21
21
  * 将除指定属性外的所有属性变为必填
22
22
  *
23
- * Change all properties except the specified properties to required
23
+ * Change all properties except specified properties to required
24
24
  */
25
25
  export type ChangeRequiredExcept<T, K extends keyof T> = Required<Omit<T, K>> & Partial<Pick<T, K>>;
26
26
  /**
27
27
  * 将指定属性变为可选
28
28
  *
29
- * Change the specified properties to optional
29
+ * Change specified properties to optional
30
30
  */
31
31
  export type ChangeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
32
32
  /**
33
33
  * 将指定属性变为必填
34
34
  *
35
- * Change the specified properties to required
35
+ * Change specified properties to required
36
36
  */
37
37
  export type ChangeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
38
38
  export type PartialDeep<T> = {
@@ -124,4 +124,29 @@ export declare function isEmpty(value: any): boolean;
124
124
  * Checks if `value` is an NodeList object
125
125
  */
126
126
  export declare function isNodeList(value: any): boolean;
127
- export default typeIs;
127
+ declare const _default: {
128
+ typeIs: typeof typeIs;
129
+ objectHas: typeof objectHas;
130
+ arrayLike: typeof arrayLike;
131
+ isString: (any: unknown) => any is string;
132
+ isBoolean: (any: unknown) => any is boolean;
133
+ isSymbol: (any: unknown) => any is symbol;
134
+ isBigInt: (any: unknown) => any is bigint;
135
+ isNumber: (any: unknown) => any is number;
136
+ isUndefined: (any: unknown) => any is undefined;
137
+ isNull: (any: unknown) => any is null;
138
+ isPrimitive: (any: unknown) => boolean;
139
+ isNullOrUnDef: typeof isNullOrUnDef;
140
+ isNullish: typeof isNullOrUnDef;
141
+ isObject: (any: unknown) => any is Record<string, unknown>;
142
+ isArray: (any: unknown) => any is unknown[];
143
+ isFunction: (any: unknown) => any is Function;
144
+ isNaN: (any: unknown) => any is number;
145
+ isDate: (any: unknown) => any is Date;
146
+ isError: (any: unknown) => any is Error;
147
+ isRegExp: (any: unknown) => any is RegExp;
148
+ isJsonString: typeof isJsonString;
149
+ isEmpty: typeof isEmpty;
150
+ isNodeList: typeof isNodeList;
151
+ };
152
+ export default _default;
@@ -44,3 +44,7 @@ export declare class UnicodeToolkit {
44
44
  */
45
45
  static decode(str: string, normalizeSpace?: boolean): string;
46
46
  }
47
+ declare const _default: {
48
+ UnicodeToolkit: typeof UnicodeToolkit;
49
+ };
50
+ export default _default;
@@ -18,3 +18,9 @@ export interface UniqueString {
18
18
  * @returns {string}
19
19
  */
20
20
  export declare const uniqueString: UniqueString;
21
+ declare const _default: {
22
+ UNIQUE_NUMBER_SAFE_LENGTH: number;
23
+ uniqueNumber: (length?: number) => string;
24
+ uniqueString: UniqueString;
25
+ };
26
+ export default _default;
@@ -43,3 +43,10 @@ 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
+ declare const _default: {
47
+ urlParse: (url: string, isModernApi?: boolean) => Url;
48
+ urlStringify: (url: Url) => string;
49
+ urlSetParams: (url: string, setter: AnyObject) => string;
50
+ urlDelParams: (url: string, removeKeys: string[]) => string;
51
+ };
52
+ export default _default;
@@ -64,3 +64,22 @@ export declare const isNumerical: (value: string) => boolean;
64
64
  * @returns {boolean}
65
65
  */
66
66
  export declare const isDigit: (value: string) => boolean;
67
+ declare const _default: {
68
+ EMAIL_REGEX: RegExp;
69
+ HTTP_URL_REGEX: RegExp;
70
+ IPV4_REGEX: RegExp;
71
+ IPV6_REGEX: RegExp;
72
+ PHONE_REGEX: RegExp;
73
+ URL_REGEX: RegExp;
74
+ isDigit: (value: string) => boolean;
75
+ isEmail: (value: string) => boolean;
76
+ isFloat: (value: string) => boolean;
77
+ isIdNo: (value: string) => boolean;
78
+ isInteger: (value: string) => boolean;
79
+ isIpV4: (value: string) => boolean;
80
+ isIpV6: (value: string) => boolean;
81
+ isNumerical: (value: string) => boolean;
82
+ isPhone: (value: string) => boolean;
83
+ isUrl: (url: string, includeFtp?: boolean) => boolean;
84
+ };
85
+ export default _default;
@@ -68,3 +68,11 @@ 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
+ declare const _default: {
72
+ escapeRegExp: typeof escapeRegExp;
73
+ executeInScope: typeof executeInScope;
74
+ parseVarFromString: typeof parseVarFromString;
75
+ replaceVarFromString: typeof replaceVarFromString;
76
+ uniqueSymbol: typeof uniqueSymbol;
77
+ };
78
+ export default _default;
@@ -16,3 +16,7 @@ export interface ICanvasWM {
16
16
  * @example genCanvasWM({ content: 'QQMusicFE' })
17
17
  */
18
18
  export declare function genCanvasWM(content?: string, canvasWM?: ICanvasWM): void;
19
+ declare const _default: {
20
+ genCanvasWM: typeof genCanvasWM;
21
+ };
22
+ export default _default;
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
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}const{toString:n,hasOwnProperty:r}=Object.prototype;function o(e,t){return r.call(e,t)}function i(e){return!!p(e)||(!!a(e)||!!h(e)&&o(e,"length"))}function s(e){return n.call(e).slice(8,-1)}const a=e=>"string"==typeof e,c=e=>"boolean"==typeof e,l=e=>"number"==typeof e&&!Number.isNaN(e),u=e=>void 0===e,d=e=>null===e;function f(e){return u(e)||d(e)}const h=e=>"Object"===s(e),p=e=>Array.isArray(e),g=e=>"function"==typeof e,m=e=>Number.isNaN(e),y=e=>"Date"===s(e);function b(e){return!u(NodeList)&&NodeList.prototype.isPrototypeOf(e)}const w=e=>{if(!h(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function S(e,t){for(const n in e)if(o(e,n)&&!1===t(e[n],n))break;e=null}function x(e,t){const n={};return S(e,((e,r)=>{t.includes(r)||(n[r]=e)})),e=null,n}const A=(e,t,n)=>{if(u(n))return t;if(s(t)!==s(n))return p(n)?A(e,[],n):h(n)?A(e,{},n):n;if(w(n)){const r=e.get(n);return r||(e.set(n,t),S(n,((n,r)=>{t[r]=A(e,t[r],n)})),t)}if(p(n)){const r=e.get(n);return r||(e.set(n,t),n.forEach(((n,r)=>{t[r]=A(e,t[r],n)})),t)}return n};function E(e,...t){const n=new Map;for(let r=0,o=t.length;r<o;r++){const o=t[r];e=A(n,e,o)}return n.clear(),e}function v(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const F="0123456789",C="abcdefghijklmnopqrstuvwxyz",T="ABCDEFGHIJKLMNOPQRSTUVWXYZ",$=/%[%sdo]/g;const R=/\${(.*?)}/g;const N=(e,t)=>{e.split(/\s+/g).forEach(t)};const I=(e,t,n)=>{h(t)?S(t,((t,n)=>{I(e,n,t)})):e.style.setProperty(v(t),n)};function D(e,t=14,n=!0){let r=0;if(console.assert(a(e),`${e} 不是有效的字符串`),a(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 j(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 M(e,t){const{successCallback:n,failCallback:r,container:o=document.body}=f(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),j(i);try{document.execCommand("copy")&&g(n)&&n()}catch(e){g(r)&&r(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}function P(e,t,n){const r=[],o="expires";if(r.push([e,encodeURIComponent(t)]),l(n)){const e=new Date;e.setTime(e.getTime()+n),r.push([o,e.toUTCString()])}else y(n)&&r.push([o,n.toUTCString()]);r.push(["path","/"]),document.cookie=r.map((e=>{const[t,n]=e;return`${t}=${n}`})).join(";")}const k=e=>y(e)&&!m(e.getTime()),L=e=>{if(!a(e))return;const t=e.replace(/-/g,"/");return new Date(t)},O=e=>{if(!a(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(!k(o))return;const[,i,s,c]=n,l=parseInt(s,10),u=parseInt(c,10),d=(e,t)=>"+"===i?e-t:e+t;return o.setHours(d(o.getHours(),l)),o.setMinutes(d(o.getMinutes(),u)),o};function B(e){const t=new Date(e);if(k(t))return t;const n=L(e);if(k(n))return n;const r=O(e);if(k(r))return r;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function U(e){const t=B(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}const H=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("/")},z=(e,...t)=>H([e,...t].join("/"));function W(e){const t=new URLSearchParams(e),n={};for(const[e,r]of t.entries())u(n[e])?n[e]=r:p(n[e])||(n[e]=t.getAll(e));return n}const _=e=>a(e)?e:l(e)?String(e):c(e)?e?"true":"false":y(e)?e.toISOString():null;function q(e,t=_){const n=new URLSearchParams;return S(e,((e,r)=>{if(p(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 Y=(e,t=!0)=>{let n=null;g(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:c,hash:l,search:u,pathname:d}=n,f=z("/",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:c,hash:l,search:u,searchParams:W(p),query:p,pathname:f,path:`${f}${u}`,href:e}},G=e=>{const{protocol:t,auth:n,host:r,pathname:o,searchParams:i,hash:s}=e,a=n?`${n}@`:"",c=q(i),l=c?`?${c}`:"";let u=s.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${a}${r}${o}${l}${u}`},V=(e,t)=>{const n=Y(e);return Object.assign(n.searchParams,t),G(n)};function X(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,g(n)&&n()}))}function K(e,t,n){const r=URL.createObjectURL(e);X(r,t),setTimeout((()=>{URL.revokeObjectURL(r),g(n)&&n()}))}function J(){return!!document.createElement("canvas").getContext}function Z({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 Q(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 ee=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),te=`${F}${T}${C}`;const ne=`${F}${T}${C}`,re="undefined"!=typeof BigInt,oe=()=>Q("JSBI"),ie=e=>re?BigInt(e):oe().BigInt(e);function se(e,t=ne){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!re)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let n=ie(e);const r=[],{length:o}=t,i=ie(o),s=()=>{const e=Number(((e,t)=>re?e%t:oe().remainder(e,t))(n,i));n=((e,t)=>re?e/t:oe().divide(e,t))(n,i),r.unshift(t[e]),n>0&&s()};return s(),r.join("")}const ae=(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),c=0;for(;a>=r&&c<s-1;)a/=r,c++;const l=a.toFixed(o),u=t[c];return String(l)+i+u};function ce(e,t){if(f(t))return parseInt(String(e)).toLocaleString();let n=0;return t>0&&(n=t),Number(Number(e).toFixed(n)).toLocaleString("en-US")}let le=0,ue=0;const de=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==ue&&(ue=t,le=0);const n=`${t}`;let r="";const o=e-5-13;if(o>0){r=`${ee(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(le,5);return le++,`${n}${r}${i}`},fe=e=>e[ee(0,e.length-1)];function he(e,t,n){let r=250,o=13;const i=e.children[0];D(t,12)<230?(i.style.maxWidth=D(t,12)+20+50+"px",r=n.clientX+(D(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 pe={handleMouseEnter:function({rootContainer:e="#root",title:t,event:n,bgColor:r="#000",color:o="#fff"}){try{const i=a(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let s=null;const c="style-tooltip-inner1494304949567";if(!document.querySelector(`#${c}`)){const e=document.createElement("style");e.type="text/css",e.id=c,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)he(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&&(he(s,t,n),s.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=a(e)?document.querySelector(e):e;let n=document.querySelector("#customTitle1494304949567");t&&n&&(t.removeChild(n),n=null)}},ge={keyField:"key",childField:"children",pidField:"pid"},me={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};function ye(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:r="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:s=!1}=h(n)?n:{};let a=!1;const c=[],l=(n,o,u=0)=>{for(let d=n.length-1;d>=0&&!a;d--){const f=n[d];if(i)c.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?b(f[r]):Array.isArray(f[r]))&&l(f[r],f,u+1)}}if(i)for(;c.length>0&&!a;){const e=c.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?b(n[r]):Array.isArray(n[r]))&&l(n[r],n,f+1))}},u=(n,o,l=0)=>{for(let d=0,f=n.length;d<f&&!a;d++){const f=n[d];if(i)c.push({item:f,index:d,array:n,tree:e,parent:o,level:l});else{const i=t(f,d,n,e,o,l);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?b(f[r]):Array.isArray(f[r]))&&u(f[r],f,l+1)}}if(i)for(;c.length>0&&!a;){const e=c.shift();if(!e)break;const{item:n,index:o,array:i,tree:l,parent:d,level:f}=e,h=t(n,o,i,l,d,f);if(!1===h){a=!0;break}!0!==h&&(n&&(s?b(n[r]):Array.isArray(n[r]))&&u(n[r],n,f+1))}};o?l(e,null,0):u(e,null,0),e=null}const be=(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)},we=(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),(be(e,o)+be(t,o))/o};const Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",xe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function Ae(e){let t,n,r,o,i="",s=0;const a=(e=String(e)).length,c=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+=Se.charAt(t>>18&63)+Se.charAt(t>>12&63)+Se.charAt(t>>6&63)+Se.charAt(63&t)}return c?i.slice(0,c-3)+"===".substring(c):i}function Ee(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!xe.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=Se.indexOf(e.charAt(i++))<<18|Se.indexOf(e.charAt(i++))<<12|(n=Se.indexOf(e.charAt(i++)))<<6|(r=Se.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 ve=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Fe=/^(?:(?:\+|00)86)?1\d{10}$/,Ce=/^(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]$/,Te=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,$e=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,Re=/^(?:(?:\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])$/,Ne=/^(([\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,Ie=/^(-?[1-9]\d*|0)$/,De=e=>Ie.test(e),je=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Me=e=>je.test(e),Pe=/^\d+$/;function ke(e){return[...new Set(e.trim().split(""))].join("")}function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oe(e,t){return new RegExp(`${Le(e.trim())}\\s*([^${Le(ke(e))}${Le(ke(t))}\\s]*)\\s*${t.trim()}`,"g")}const Be={MAP:"[object Map]",SET:"[object Set]",DATE:"[object Date]",REGEXP:"[object RegExp]",SYMBOL:"[object Symbol]",ARRAY_BUFFER:"[object ArrayBuffer]",DATA_VIEW:"[object DataView]",ARGUMENTS:"[object Arguments]"},{toString:Ue,hasOwnProperty:He}=Object.prototype,ze=e=>Ue.call(e);function We(e,t,n=void 0){if(e===t)return!0;if(e!=e&&t!=t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(n||(n=new WeakMap),n.has(e))return n.get(e)===t;n.set(e,t);const r=ze(e);if(r!==ze(t))return!1;let o=!1;switch(r){case Be.DATE:o=+e==+t;break;case Be.REGEXP:o=""+e==""+t;break;case Be.SYMBOL:o=Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t);break;case Be.ARRAY_BUFFER:o=_e(e,t);break;case Be.DATA_VIEW:s=t,o=(i=e).byteLength===s.byteLength&&i.byteOffset===s.byteOffset&&_e(i.buffer,s.buffer);break;case Be.MAP:o=function(e,t,n){if(e.size!==t.size)return!1;for(const[r,o]of e){const e=t.get(r);if(void 0===e&&!t.has(r))return!1;if(!We(o,e,n))return!1}return!0}(e,t,n);break;case Be.SET:o=function(e,t,n){if(e.size!==t.size)return!1;for(const r of e){if(t.has(r))continue;let e=!1;for(const o of t)if(We(r,o,n)){e=!0;break}if(!e)return!1}return!0}(e,t,n);break;case Be.ARGUMENTS:default:o=Array.isArray(e)||ArrayBuffer.isView(e)?function(e,t,n){const r=e.length;if(r!==t.length)return!1;let o=r;for(;o--;)if(!We(e[o],t[o],n))return!1;return!0}(e,t,n):function(e,t,n){const r=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(r.length!==o.length)return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!He.call(t,i)||!We(e[i],t[i],n))return!1}return!0}(e,t,n)}var i,s;return o}function _e(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);let o=e.byteLength;for(;o--;)if(n[o]!==r[o])return!1;return!0}e.EMAIL_REGEX=ve,e.HEX_POOL=ne,e.HTTP_URL_REGEX=$e,e.IPV4_REGEX=Re,e.IPV6_REGEX=Ne,e.PHONE_REGEX=Fe,e.STRING_ARABIC_NUMERALS=F,e.STRING_LOWERCASE_ALPHA=C,e.STRING_POOL=te,e.STRING_UPPERCASE_ALPHA=T,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=Te,e.UnicodeToolkit=class{static ENTITY_MAP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};static NAMED_ENTITIES={"&quot;":'"',"&amp;":"&","&lt;":"<","&gt;":">","&nbsp;":" ","&copy;":"©","&trade;":"™","&reg;":"®"};static encode(e,t="unicode",n=!1){const r=[];for(const o of e){const e=o.codePointAt(0);"html"===t&&this.ENTITY_MAP[o]?r.push(this.ENTITY_MAP[o]):!n&&e>=32&&e<=126?r.push(o):"unicode"===t?e>65535?r.push(`\\u{${e.toString(16).toUpperCase()}}`):r.push(`\\u${e.toString(16).toUpperCase().padStart(4,"0")}`):r.push(`&#${e};`)}return r.join("")}static decode(e,t=!1){if(!e)return"";let n=e.replace(/\\u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))/g,((e,t,n)=>String.fromCodePoint(parseInt(t||n,16)))).replace(/&#(x?)([0-9a-fA-F]+);/g,((e,t,n)=>String.fromCodePoint(parseInt(n,t?16:10)))).replace(/&[a-z0-9]+;/gi,(e=>this.NAMED_ENTITIES[e]||e));return t&&(n=n.replace(/\u00A0/g," ")),n}},e.add=we,e.addClass=function(e,t){N(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=i,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 c,l=0,u=0;const d=()=>{if(c)return o(c);const n=i.next();if(n.done)return void(l===e.length&&r(a));const s=u++;t(n.value,s,e).then((e=>{l++,a[s]=e,d()})).catch((e=>{c=e,d()}))};for(let e=0;e<s;e++)d()}))},e.b64decode=function(e){const t=f(Q("atob"))?Ee(e):Q("atob")(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return f(Q("TextDecoder"))?function(e){const t=String.fromCharCode.apply(null,e);return decodeURIComponent(t)}(r):new(Q("TextDecoder"))("utf-8").decode(r)},e.b64encode=function(e){const t=f(Q("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(Q("TextEncoder"))).encode(e);let n="";const r=t.length;for(let e=0;e<r;e++)n+=String.fromCharCode(t[e]);return f(Q("btoa"))?Ae(n):Q("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)),c=new Date(a);return c.getFullYear()+i+String(c.getMonth()+1).padStart(2,"0")+i+String(c.getDate()).padStart(2,"0")+" "+String(c.getHours()).padStart(2,"0")+s+String(c.getMinutes()).padStart(2,"0")+s+String(c.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(!J())throw new Error("Current runtime environment not support Canvas");const{quality:r,mime:o="image/jpeg",maxSize:i,minFileSizeKB:s=50}=h(n)?n:{};let a,c=r;if(r)c=r;else if(t instanceof File){const e=+parseInt((t.size/1024).toFixed(2));c=e<s?1:e<1024?.85:e<5120?.8:.75}return l(i)&&(a=i>=1200?i:1200),t instanceof FileList?Promise.all(Array.from(t).map((t=>e(t,{maxSize:a,mime:o,quality:c})))):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 u=document.createElement("canvas"),d=u.getContext("2d"),f=s.width,h=s.height,{width:p,height:g}=function({sizeKB:e,maxSize:t,originWidth:n,originHeight:r}){let o=n,i=r;if(l(t)){const{width:e,height:s}=Z({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}=Z({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}=Z({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}=Z({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}=Z({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}return{width:o,height:i}}({sizeKB:r,maxSize:a,originWidth:f,originHeight:h});u.width=p,u.height=g,d.clearRect(0,0,p,g),d.drawImage(s,0,0,p,g);const m=u.toDataURL(o,c),y=atob(m.split(",")[1]);let b=y.length;const w=new Uint8Array(new ArrayBuffer(b));for(;b--;)w[b]=y.charCodeAt(b);const S=new File([w],n,{type:o});e({file:S,bufferArray:w,origin:t,beforeSrc:i,afterSrc:m,beforeKB:r,afterKB:Number((S.size/1024).toFixed(2))})},s.src=i},i.readAsDataURL(t)}})):Promise.resolve(null)},e.cookieDel=e=>P(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=P,e.copyText=function(e,t){const{successCallback:n,failCallback:r}=f(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{g(n)&&n()})).catch((n=>{M(e,t)})):M(e,t)},e.crossOriginDownload=function(e,t,n){const{successCode:r=200,successCallback:o,failCallback:i}=f(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)K(s.response,t,o);else if(g(i)){const e=s.status,t=s.getResponseHeader("Content-Type");if(a(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=>{g(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},s.send()},e.dateParse=B,e.dateToEnd=function(e){const t=U(e);return t.setDate(t.getDate()+1),B(t.getTime()-1)},e.dateToStart=U,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.diffArray=function(e,t,n){const r=e=>{if(n)return n(e);if("string"==typeof e||"number"==typeof e||"symbol"==typeof e)return e;throw new Error("diffArray: getKey is required when item is not a primitive value")},o=new Map,i=new Map;for(const t of e)o.set(r(t),t);for(const e of t)i.set(r(e),e);const s=[],a=[];for(const[e,t]of i)o.has(e)||s.push(t);for(const[e,t]of o)i.has(e)||a.push(t);return{added:s,removed:a}},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=K,e.downloadData=function(e,t,n,r){if(n=n.replace(`.${t}`,"")+`.${t}`,"json"===t){K(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"}));X("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=X,e.downloadURL=function(e,t){window.open(t?V(e,t):e)},e.escapeRegExp=Le,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=M,e.filterDeep=function(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const r=[];return ye(e,((...e)=>{t(...e)&&r.push(e[0])}),n),r},e.findDeep=function(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){let r=null;return ye(e,((...e)=>{if(t(...e))return r=e[0],!1}),n),r},e.flatTree=function e(t,n=ge){const{keyField:r="key",childField:i="children",pidField:s="pid"}=h(n)?n:{};let a=[];for(let c=0,l=t.length;c<l;c++){const l=t[c],u={...l,[i]:[]};if(o(u,i)&&delete u[i],a.push(u),l[i]){const t=l[i].map((e=>({...e,[s]:l[r]||e.pid})));a=a.concat(e(t,n))}}return a},e.forEachDeep=ye,e.formatDate=function(e,t="YYYY-MM-DD HH:mm:ss"){const n=B(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=ce,e.formatNumber=ce,e.formatTree=function(e,t=ge){const{keyField:n="key",childField:r="children",pidField:o="pid"}=h(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=me){if(!o(n,"filter")&&!n.keyword)return t;const i=[];for(let s=0,a=t.length;s<a;s++){const a=t[s],c=a[r.childField]&&a[r.childField].length>0?e(a[r.childField]||[],n,r):[];if((o(n,"filter")?n.filter(a):r.ignoreCase?a[r.nameField].toLowerCase().includes(n.keyword.toLowerCase()):a[r.nameField].includes(n.keyword))||c.length>0)if(a[r.childField])if(c.length>0)i.push({...a,[r.childField]:c});else if(r.removeEmptyChild){const{[r.childField]:e,...t}=a;i.push(t)}else i.push({...a,[r.childField]:[]});else{const{[r.childField]:e,...t}=a;i.push(t)}}return i},e.genCanvasWM=function e(t="请勿外传",n){const{rootContainer:r=document.body,width:o="300px",height:i="150px",textAlign:s="center",textBaseline:c="middle",font:l="20px PingFangSC-Medium,PingFang SC",fillStyle:u="rgba(189, 177, 167, .3)",rotate:d=-20,zIndex:h=2147483647,watermarkId:p="__wm"}=f(n)?{}:n,g=a(r)?document.querySelector(r):r;if(!g)throw new Error(`${r} is not valid Html Element or element selector`);const m=document.createElement("canvas");m.setAttribute("width",o),m.setAttribute("height",i);const y=m.getContext("2d");y.textAlign=s,y.textBaseline=c,y.font=l,y.fillStyle=u,y.rotate(Math.PI/180*d),y.fillText(t,parseFloat(o)/4,parseFloat(i)/2);const b=m.toDataURL(),w=document.querySelector(`#${p}`),S=w||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:${h}; pointer-events:none; background-repeat:repeat; background-image:url('${b}')`;S.setAttribute("style",x),S.setAttribute("id",p),S.classList.add("nav-height"),w||(g.style.position="relative",g.appendChild(S));const A=window.MutationObserver||window.WebKitMutationObserver;if(A){let r=new A((function(){let o=document.querySelector(`#${p}`);if(o){const{opacity:i,zIndex:s,display:a,visibility:c}=(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"!==c)&&(r.disconnect(),r=null,g.removeChild(o),o=null,e(t,n))}else r.disconnect(),r=null,e(t,n)}));r.observe(g,{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.getGlobal=Q,e.getStrWidthPx=D,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(!f(i)){const e=a.findIndex((e=>e===i));-1!==e&&(a=a.slice(e))}if(!f(s)){const e=a.findIndex((e=>e===s));-1!==e&&a.splice(e+1)}return ae(e,a,{ratio:r?1e3:1024,decimals:n,separator:o})},e.isArray=p,e.isBigInt=e=>"bigint"==typeof e,e.isBoolean=c,e.isDate=y,e.isDigit=e=>Pe.test(e),e.isEmail=e=>ve.test(e),e.isEmpty=function(e){if(f(e)||Number.isNaN(e))return!0;const t=s(e);return i(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length},e.isEqual=function(e,t){return We(e,t)},e.isError=e=>"Error"===s(e),e.isFloat=Me,e.isFunction=g,e.isIdNo=e=>{if(!Ce.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=De,e.isIpV4=e=>Re.test(e),e.isIpV6=e=>Ne.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=m,e.isNodeList=b,e.isNull=d,e.isNullOrUnDef=f,e.isNullish=f,e.isNumber=l,e.isNumerical=e=>De(e)||Me(e),e.isObject=h,e.isPhone=e=>Fe.test(e),e.isPlainObject=w,e.isPrimitive=e=>null===e||"object"!=typeof e,e.isRegExp=e=>"RegExp"===s(e),e.isString=a,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=u,e.isUrl=(e,t=!1)=>(t?Te:$e).test(e),e.isValidDate=k,e.mapDeep=function(e,t,n={childField:"children",reverse:!1}){const{childField:r="children",reverse:o=!1}=h(n)?n:{};let i=!1;const s=[],a=(n,s,c,l=0)=>{if(o)for(let o=n.length-1;o>=0&&!i;o--){const u=n[o],d=t(u,o,n,e,s,l);if(!1===d){i=!0;break}!0!==d&&(c.push(x(d,[r])),u&&Array.isArray(u[r])?(c[c.length-1][r]=[],a(u[r],u,c[c.length-1][r],l+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,l);if(!1===d){i=!0;break}!0!==d&&(c.push(x(d,[r])),u&&Array.isArray(u[r])?(c[c.length-1][r]=[],a(u[r],u,c[c.length-1][r],l+1)):delete d[r])}};return a(e,null,s),e=null,s},e.multiply=be,e.numberAbbr=ae,e.numberToHex=se,e.objectAssign=E,e.objectEach=S,e.objectEachAsync=async function(e,t){for(const n in e)if(o(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 S(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 i=e,s=0;for(let e=r.length;s<e-1;++s){const e=r[s];if(l(Number(e))&&Array.isArray(i))i=i[e];else{if(!h(i)||!o(i,e)){if(i=void 0,n)throw new Error("[Object] objectGet path 路径不正确");break}i=i[e]}}return{p:i,k:i?r[s]:void 0,v:i?i[r[s]]:void 0}},e.objectHas=o,e.objectMap=function(e,t){const n={};for(const r in e)o(e,r)&&(n[r]=t(e[r],r));return e=null,n},e.objectMerge=E,e.objectOmit=x,e.objectPick=function(e,t){const n={};return S(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(Oe(t,n))).map((e=>f(e)?void 0:e[1]))},e.pathJoin=z,e.pathNormalize=H,e.qsParse=W,e.qsStringify=q,e.randomNumber=ee,e.randomString=(e,t)=>{let n=0,r=te;a(t)?(n=e,r=t):l(e)?n=e:a(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[ee(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=ee(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){N(t,(t=>e.classList.remove(t)))},e.replaceVarFromString=function(e,t,n="{",r="}"){return e.replace(new RegExp(Oe(n,r)),(function(e,n){return o(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"}=h(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],c=[s];for(;n&&n.parentId;)a=[n.parentId,...a],c=[n.parent,...c],n=e.find((e=>e[o]===n.parentId));return[a,c]})(i(e))},e.select=j,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=I,e.stringAssign=(e,t)=>e.replace(R,((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($,(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=v,e.strip=function(e,t=15){return+parseFloat(Number(e).toPrecision(t))},e.subtract=(e,t)=>we(e,-t),e.supportCanvas=J,e.throttle=(e,t,n)=>{let r,o=!1,i=0;const s=function(...s){if(o)return;const a=Date.now(),c=()=>{i=a,e.call(this,...s)};if(0===i)return n?c():void(i=a);i+t-a>0?(clearTimeout(r),r=setTimeout((()=>c()),t)):c()};return s.cancel=()=>{clearTimeout(r),o=!0},s},e.tooltipEvent=pe,e.typeIs=s,e.uniqueNumber=de,e.uniqueString=(e,t)=>{let n=0,r=ne;a(t)?(n=e,r=t):l(e)?n=e:a(e)&&(r=e);let o=se(de(),r),i=n-o.length;if(i<=0)return o;for(;i--;)o+=fe(r);return o},e.uniqueSymbol=ke,e.urlDelParams=(e,t)=>{const n=Y(e);return t.forEach((e=>delete n.searchParams[e])),G(n)},e.urlParse=Y,e.urlSetParams=V,e.urlStringify=G,e.wait=function(e=1){return new Promise((t=>setTimeout(t,e)))},e.weAtob=Ee,e.weBtoa=Ae}));
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}async function n(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++);}function r(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)}function o(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}function i(e,t,n){const r=e=>{if(n)return n(e);if("string"==typeof e||"number"==typeof e||"symbol"==typeof e)return e;throw new Error("diffArray: getKey is required when item is not a primitive value")},o=new Map,i=new Map;for(const t of e)o.set(r(t),t);for(const e of t)i.set(r(e),e);const a=[],s=[];for(const[e,t]of i)o.has(e)||a.push(t);for(const[e,t]of o)i.has(e)||s.push(t);return{added:a,removed:s}}var a={arrayEach:t,arrayEachAsync:n,arrayInsertBefore:r,arrayRemove:o,diffArray:i},s=Object.freeze({__proto__:null,arrayEach:t,arrayEachAsync:n,arrayInsertBefore:r,arrayRemove:o,default:a,diffArray:i});const{toString:l,hasOwnProperty:c}=Object.prototype;function u(e,t){return c.call(e,t)}function d(e){return!!_(e)||(!!p(e)||!!A(e)&&u(e,"length"))}function f(e){return l.call(e).slice(8,-1)}const p=e=>"string"==typeof e,g=e=>"boolean"==typeof e,h=e=>"symbol"==typeof e,m=e=>"bigint"==typeof e,b=e=>"number"==typeof e&&!Number.isNaN(e),y=e=>void 0===e,S=e=>null===e,w=e=>null===e||"object"!=typeof e;function E(e){return y(e)||S(e)}const A=e=>"Object"===f(e),_=e=>Array.isArray(e),x=e=>"function"==typeof e,v=e=>Number.isNaN(e),T=e=>"Date"===f(e),F=e=>"Error"===f(e),C=e=>"RegExp"===f(e);function R(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}}function j(e){if(E(e)||Number.isNaN(e))return!0;const t=f(e);return d(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length}function N(e){return!y(NodeList)&&NodeList.prototype.isPrototypeOf(e)}var O={typeIs:f,objectHas:u,arrayLike:d,isString:p,isBoolean:g,isSymbol:h,isBigInt:m,isNumber:b,isUndefined:y,isNull:S,isPrimitive:w,isNullOrUnDef:E,isNullish:E,isObject:A,isArray:_,isFunction:x,isNaN:v,isDate:T,isError:F,isRegExp:C,isJsonString:R,isEmpty:j,isNodeList:N},P=Object.freeze({__proto__:null,arrayLike:d,default:O,isArray:_,isBigInt:m,isBoolean:g,isDate:T,isEmpty:j,isError:F,isFunction:x,isJsonString:R,isNaN:v,isNodeList:N,isNull:S,isNullOrUnDef:E,isNullish:E,isNumber:b,isObject:A,isPrimitive:w,isRegExp:C,isString:p,isSymbol:h,isUndefined:y,objectHas:u,typeIs:f});const I=f,D=e=>{if(!A(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function L(e,t){for(const n in e)if(u(e,n)&&!1===t(e[n],n))break;e=null}async function M(e,t){for(const n in e)if(u(e,n)&&!1===await t(e[n],n))break}function U(e,t){const n={};for(const r in e)u(e,r)&&(n[r]=t(e[r],r));return e=null,n}function $(e,t){const n={};return L(e,((e,r)=>{t.includes(r)&&(n[r]=e)})),e=null,n}function k(e,t){const n={};return L(e,((e,r)=>{t.includes(r)||(n[r]=e)})),e=null,n}const z=(e,t,n)=>{if(y(n))return t;if(I(t)!==I(n))return _(n)?z(e,[],n):A(n)?z(e,{},n):n;if(D(n)){const r=e.get(n);return r||(e.set(n,t),L(n,((n,r)=>{t[r]=z(e,t[r],n)})),t)}if(_(n)){const r=e.get(n);return r||(e.set(n,t),n.forEach(((n,r)=>{t[r]=z(e,t[r],n)})),t)}return n};function B(e,...t){const n=new Map;for(let r=0,o=t.length;r<o;r++){const o=t[r];e=z(n,e,o)}return n.clear(),e}function H(e,t,n){const r=n||((e,t,n)=>void 0===e[n]);return L(t,((n,o)=>{r(e,t,o)&&(e[o]=n)})),e}function G(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(b(Number(e))&&Array.isArray(o))o=o[e];else{if(!A(o)||!u(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}}var q={isPlainObject:D,objectEach:L,objectEachAsync:M,objectMap:U,objectPick:$,objectOmit:k,objectAssign:B,objectMerge:B,objectFill:H,objectGet:G},W=Object.freeze({__proto__:null,default:q,isPlainObject:D,objectAssign:B,objectEach:L,objectEachAsync:M,objectFill:H,objectGet:G,objectMap:U,objectMerge:B,objectOmit:k,objectPick:$});function V(e,t){let n=e;t&&(n=e.replace(/^./,(e=>e.toUpperCase())));return n.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))}function X(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const Y="0123456789",K="abcdefghijklmnopqrstuvwxyz",J="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Z=/%[%sdo]/g;function Q(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(" ")}const ee=/\${(.*?)}/g,te=(e,t)=>e.replace(ee,((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))),ne=e=>{const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return e.replace(/[&<>"]/g,(e=>t[e]))},re=(e,t=" ")=>new Array(e).fill(t).join("");function oe(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}var ie={stringCamelCase:V,stringKebabCase:X,STRING_ARABIC_NUMERALS:Y,STRING_LOWERCASE_ALPHA:K,STRING_UPPERCASE_ALPHA:J,stringFormat:Q,stringAssign:te,stringEscapeHtml:ne,stringFill:re,parseQueryParams:oe},ae=Object.freeze({__proto__:null,STRING_ARABIC_NUMERALS:Y,STRING_LOWERCASE_ALPHA:K,STRING_UPPERCASE_ALPHA:J,default:ie,parseQueryParams:oe,stringAssign:te,stringCamelCase:V,stringEscapeHtml:ne,stringFill:re,stringFormat:Q,stringKebabCase:X});function se(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)}const le=(e,t)=>{e.split(/\s+/g).forEach(t)};function ce(e,t){le(t,(t=>e.classList.add(t)))}function ue(e,t){le(t,(t=>e.classList.remove(t)))}const de=(e,t,n)=>{A(t)?L(t,((t,n)=>{de(e,n,t)})):e.style.setProperty(X(t),n)};function fe(e,t){return getComputedStyle(e).getPropertyValue(t)}function pe(e,t,n=!0){const r=getComputedStyle(e).getPropertyValue(t)??"";return n?Number(r.replace(/([0-9]*)(.*)/g,"$1")):r}function ge(e,t=14,n=!0){let r=0;if(console.assert(p(e),`${e} 不是有效的字符串`),p(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 he(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}var me={hasClass:se,addClass:ce,removeClass:ue,setStyle:de,getStyle:fe,getComputedCssVal:pe,getStrWidthPx:ge,select:he},be=Object.freeze({__proto__:null,addClass:ce,default:me,getComputedCssVal:pe,getStrWidthPx:ge,getStyle:fe,hasClass:se,removeClass:ue,select:he,setStyle:de});function ye(e,t){const{successCallback:n,failCallback:r}=E(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{x(n)&&n()})).catch((n=>{Se(e,t)})):Se(e,t)}function Se(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),he(i);try{document.execCommand("copy")&&x(n)&&n()}catch(e){x(r)&&r(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}var we={copyText:ye,fallbackCopyText:Se},Ee=Object.freeze({__proto__:null,copyText:ye,default:we,fallbackCopyText:Se});function Ae(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""}function _e(e,t,n){const r=[],o="expires";if(r.push([e,encodeURIComponent(t)]),b(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 xe=e=>_e(e,"",-1);var ve={cookieSet:_e,cookieGet:Ae,cookieDel:xe},Te=Object.freeze({__proto__:null,cookieDel:xe,cookieGet:Ae,cookieSet:_e,default:ve});const Fe=e=>T(e)&&!v(e.getTime()),Ce=e=>{if(!p(e))return;const t=e.replace(/-/g,"/");return new Date(t)},Re=e=>{if(!p(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(!Fe(o))return;const[,i,a,s]=n,l=parseInt(a,10),c=parseInt(s,10),u=(e,t)=>"+"===i?e-t:e+t;return o.setHours(u(o.getHours(),l)),o.setMinutes(u(o.getMinutes(),c)),o};function je(e){const t=new Date(e);if(Fe(t))return t;const n=Ce(e);if(Fe(n))return n;const r=Re(e);if(Fe(r))return r;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function Ne(e){const t=je(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}function Oe(e){const t=Ne(e);return t.setDate(t.getDate()+1),je(t.getTime()-1)}function Pe(e,t="YYYY-MM-DD HH:mm:ss"){const n=je(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}function Ie(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")}function De(e,t,n="-",r=":"){const o=new Date(e),i=n,a=r,s=new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()).getTime()+864e5*parseInt(String(t)),l=new Date(s);return l.getFullYear()+i+String(l.getMonth()+1).padStart(2,"0")+i+String(l.getDate()).padStart(2,"0")+" "+String(l.getHours()).padStart(2,"0")+a+String(l.getMinutes()).padStart(2,"0")+a+String(l.getSeconds()).padStart(2,"0")}var Le={isValidDate:Fe,dateParse:je,dateToStart:Ne,dateToEnd:Oe,formatDate:Pe,calculateDate:Ie,calculateDateTime:De},Me=Object.freeze({__proto__:null,calculateDate:Ie,calculateDateTime:De,dateParse:je,dateToEnd:Oe,dateToStart:Ne,default:Le,formatDate:Pe,isValidDate:Fe});const Ue=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),a=n(e);return o?t?void 0:a?(()=>{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&&!a))})),r.join("/")},$e=(e,...t)=>Ue([e,...t].join("/"));var ke={pathJoin:$e,pathNormalize:Ue},ze=Object.freeze({__proto__:null,default:ke,pathJoin:$e,pathNormalize:Ue});function Be(e){const t=new URLSearchParams(e),n={};for(const[e,r]of t.entries())y(n[e])?n[e]=r:_(n[e])||(n[e]=t.getAll(e));return n}const He=e=>p(e)?e:b(e)?String(e):g(e)?e?"true":"false":T(e)?e.toISOString():null;function Ge(e,t=He){const n=new URLSearchParams;return L(e,((e,r)=>{if(_(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()}var qe={qsParse:Be,qsStringify:Ge},We=Object.freeze({__proto__:null,default:qe,qsParse:Be,qsStringify:Ge});const Ve=(e,t=!0)=>{let n=null;x(URL)&&t?n=new URL(e):(n=document.createElement("a"),n.href=e);const{protocol:r,username:o,password:i,host:a,port:s,hostname:l,hash:c,search:u,pathname:d}=n,f=$e("/",d),p=o&&i?`${o}:${i}`:"",g=u.replace(/^\?/,"");return n=null,{protocol:r,auth:p,username:o,password:i,host:a,port:s,hostname:l,hash:c,search:u,searchParams:Be(g),query:g,pathname:f,path:`${f}${u}`,href:e}},Xe=e=>{const{protocol:t,auth:n,host:r,pathname:o,searchParams:i,hash:a}=e,s=n?`${n}@`:"",l=Ge(i),c=l?`?${l}`:"";let u=a.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${s}${r}${o}${c}${u}`},Ye=(e,t)=>{const n=Ve(e);return Object.assign(n.searchParams,t),Xe(n)},Ke=(e,t)=>{const n=Ve(e);return t.forEach((e=>delete n.searchParams[e])),Xe(n)};var Je={urlParse:Ve,urlStringify:Xe,urlSetParams:Ye,urlDelParams:Ke},Ze=Object.freeze({__proto__:null,default:Je,urlDelParams:Ke,urlParse:Ve,urlSetParams:Ye,urlStringify:Xe});function Qe(e,t){window.open(t?Ye(e,t):e)}function et(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,x(n)&&n()}))}function tt(e,t,n){const r=URL.createObjectURL(e);et(r,t),setTimeout((()=>{URL.revokeObjectURL(r),x(n)&&n()}))}function nt(e,t,n){const{successCode:r=200,successCallback:o,failCallback:i}=E(n)?{successCode:200,successCallback:void 0,failCallback:void 0}:n,a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=function(){if(a.status===r)tt(a.response,t,o);else if(x(i)){const e=a.status,t=a.getResponseHeader("Content-Type");if(p(t)&&t.includes("application/json")){const t=new FileReader;t.onload=()=>{i({status:e,response:t.result})},t.readAsText(a.response)}else i(a)}},a.onerror=e=>{x(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},a.send()}function rt(e,t,n,r){if(n=n.replace(`.${t}`,"")+`.${t}`,"json"===t){tt(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"}));et("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)}}var ot={downloadURL:Qe,downloadHref:et,downloadBlob:tt,crossOriginDownload:nt,downloadData:rt},it=Object.freeze({__proto__:null,crossOriginDownload:nt,default:ot,downloadBlob:tt,downloadData:rt,downloadHref:et,downloadURL:Qe});function at(e=1){return new Promise((t=>setTimeout(t,e)))}function st(e,t,n=1/0){return new Promise(((r,o)=>{const i=e[Symbol.iterator](),a=Math.min(e.length,n),s=[];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(s));const a=u++;t(n.value,a,e).then((e=>{c++,s[a]=e,d()})).catch((e=>{l=e,d()}))};for(let e=0;e<a;e++)d()}))}function lt(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))}var ct={wait:at,asyncMap:st,safeAwait:lt},ut=Object.freeze({__proto__:null,asyncMap:st,default:ct,safeAwait:lt,wait:at});function dt(){return!!document.createElement("canvas").getContext}function ft(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}))}}function pt({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 gt(e,t={mime:"image/jpeg",minFileSizeKB:50}){if(!(e instanceof File||e instanceof FileList))throw new Error(`${e} require be File or FileList`);if(!dt())throw new Error("Current runtime environment not support Canvas");const{quality:n,mime:r="image/jpeg",maxSize:o,minFileSizeKB:i=50}=A(t)?t:{};let a,s=n;if(n)s=n;else if(e instanceof File){const t=+parseInt((e.size/1024).toFixed(2));s=t<i?1:t<1024?.85:t<5120?.8:.75}return b(o)&&(a=o>=1200?o:1200),e instanceof FileList?Promise.all(Array.from(e).map((e=>gt(e,{maxSize:a,mime:r,quality:s})))):e instanceof File?new Promise((t=>{const n=[...e.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[r]].join("."),o=+parseInt((e.size/1024).toFixed(2));if(o<i)t({file:e});else{const i=new FileReader;i.onload=({target:{result:i}})=>{const l=new Image;l.onload=()=>{const c=document.createElement("canvas"),u=c.getContext("2d"),d=l.width,f=l.height,{width:p,height:g}=function({sizeKB:e,maxSize:t,originWidth:n,originHeight:r}){let o=n,i=r;if(b(t)){const{width:e,height:a}=pt({maxWidth:t,maxHeight:t,originWidth:n,originHeight:r});o=e,i=a}else if(e<500){const e=1200,t=1200,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}else if(e<5120){const e=1400,t=1400,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}else if(e<10240){const e=1600,t=1600,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}else if(10240<=e){const e=n>15e3?8192:n>1e4?4096:2048,t=r>15e3?8192:r>1e4?4096:2048,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}return{width:o,height:i}}({sizeKB:o,maxSize:a,originWidth:d,originHeight:f});c.width=p,c.height=g,u.clearRect(0,0,p,g),u.drawImage(l,0,0,p,g);const h=c.toDataURL(r,s),m=atob(h.split(",")[1]);let y=m.length;const S=new Uint8Array(new ArrayBuffer(y));for(;y--;)S[y]=m.charCodeAt(y);const w=new File([S],n,{type:r});t({file:w,bufferArray:S,origin:e,beforeSrc:i,afterSrc:h,beforeKB:o,afterKB:Number((w.size/1024).toFixed(2))})},l.src=i},i.readAsDataURL(e)}})):Promise.resolve(null)}var ht={supportCanvas:dt,chooseLocalFile:ft,compressImg:gt},mt=Object.freeze({__proto__:null,chooseLocalFile:ft,compressImg:gt,default:ht,supportCanvas:dt});function bt(e="请勿外传",t){const{rootContainer:n=document.body,width:r="300px",height:o="150px",textAlign:i="center",textBaseline:a="middle",font:s="20px PingFangSC-Medium,PingFang SC",fillStyle:l="rgba(189, 177, 167, .3)",rotate:c=-20,zIndex:u=2147483647,watermarkId:d="__wm"}=E(t)?{}:t,f=p(n)?document.querySelector(n):n;if(!f)throw new Error(`${n} is not valid Html Element or element selector`);const g=document.createElement("canvas");g.setAttribute("width",r),g.setAttribute("height",o);const h=g.getContext("2d");h.textAlign=i,h.textBaseline=a,h.font=s,h.fillStyle=l,h.rotate(Math.PI/180*c),h.fillText(e,parseFloat(r)/4,parseFloat(o)/2);const m=g.toDataURL(),b=document.querySelector(`#${d}`),y=b||document.createElement("div"),S=`opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${u}; pointer-events:none; background-repeat:repeat; background-image:url('${m}')`;y.setAttribute("style",S),y.setAttribute("id",d),y.classList.add("nav-height"),b||(f.style.position="relative",f.appendChild(y));const w=window.MutationObserver||window.WebKitMutationObserver;if(w){let n=new w((function(){let r=document.querySelector(`#${d}`);if(r){const{opacity:o,zIndex:i,display:a,visibility:s}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(r);(r&&r.getAttribute("style")!==S||!r||"1"!==o||"2147483647"!==i||"block"!==a||"visible"!==s)&&(n.disconnect(),n=null,f.removeChild(r),r=null,bt(e,t))}else n.disconnect(),n=null,bt(e,t)}));n.observe(f,{attributes:!0,subtree:!0,childList:!0})}}var yt={genCanvasWM:bt},St=Object.freeze({__proto__:null,default:yt,genCanvasWM:bt});const wt=(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},Et=(e,t,n)=>{let r,o=!1,i=0;const a=function(...a){if(o)return;const s=Date.now(),l=()=>{i=s,e.call(this,...a)};if(0===i)return n?l():void(i=s);i+t-s>0?(clearTimeout(r),r=setTimeout((()=>l()),t)):l()};return a.cancel=()=>{clearTimeout(r),o=!0},a},At=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.call(this,...r)),t}};function _t(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}}function xt(e){return"undefined"!=typeof globalThis?globalThis[e]:"undefined"!=typeof window?window[e]:"undefined"!=typeof global?global[e]:"undefined"!=typeof self?self[e]:void 0}var vt={debounce:wt,throttle:Et,once:At,getGlobal:xt,setGlobal:_t},Tt=Object.freeze({__proto__:null,debounce:wt,default:vt,getGlobal:xt,once:At,setGlobal:_t,throttle:Et});const Ft=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Ct=`${Y}${J}${K}`,Rt=(e,t)=>{let n=0,r=Ct;p(t)?(n=e,r=t):b(e)?n=e:p(e)&&(r=e);let o=Math.max(n,1),i="";const a=r.length-1;if(a<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=r[Ft(0,a)]}return i};function jt(){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=Ft(0,15);n+="-"==t[r]||"4"==t[r]?t[r]:e[o]}return n}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]}var Nt={STRING_POOL:Ct,randomNumber:Ft,randomString:Rt,randomUuid:jt},Ot=Object.freeze({__proto__:null,STRING_POOL:Ct,default:Nt,randomNumber:Ft,randomString:Rt,randomUuid:jt});const Pt=`${Y}${J}${K}`,It="undefined"!=typeof BigInt,Dt=()=>xt("JSBI"),Lt=e=>It?BigInt(e):Dt().BigInt(e);function Mt(e,t=Pt){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!It)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let n=Lt(e);const r=[],{length:o}=t,i=Lt(o),a=()=>{const e=Number(((e,t)=>It?e%t:Dt().remainder(e,t))(n,i));n=((e,t)=>It?e/t:Dt().divide(e,t))(n,i),r.unshift(t[e]),n>0&&a()};return a(),r.join("")}const Ut=(e,t,n={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:r=1e3,decimals:o=0,separator:i=" "}=n,{length:a}=t;if(0===a)throw new Error("At least one unit is required");let s=Number(e),l=0;for(;s>=r&&l<a-1;)s/=r,l++;const c=s.toFixed(o),u=t[l];return String(c)+i+u};function $t(e,t={decimals:0,si:!1,separator:" "}){const{decimals:n=0,si:r=!1,separator:o=" ",baseUnit:i,maxUnit:a}=t;let s=r?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!E(i)){const e=s.findIndex((e=>e===i));-1!==e&&(s=s.slice(e))}if(!E(a)){const e=s.findIndex((e=>e===a));-1!==e&&s.splice(e+1)}return Ut(e,s,{ratio:r?1e3:1024,decimals:n,separator:o})}function kt(e,t){if(E(t))return parseInt(String(e)).toLocaleString();let n=0;return t>0&&(n=t),Number(Number(e).toFixed(n)).toLocaleString("en-US")}var zt={HEX_POOL:Pt,numberToHex:Mt,numberAbbr:Ut,humanFileSize:$t,formatNumber:kt,formatMoney:kt},Bt=Object.freeze({__proto__:null,HEX_POOL:Pt,default:zt,formatMoney:kt,formatNumber:kt,humanFileSize:$t,numberAbbr:Ut,numberToHex:Mt});let Ht=0,Gt=0;const qt=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==Gt&&(Gt=t,Ht=0);const n=`${t}`;let r="";const o=e-5-13;if(o>0){r=`${Ft(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(Ht,5);return Ht++,`${n}${r}${i}`},Wt=e=>e[Ft(0,e.length-1)],Vt=(e,t)=>{let n=0,r=Pt;p(t)?(n=e,r=t):b(e)?n=e:p(e)&&(r=e);let o=Mt(qt(),r),i=n-o.length;if(i<=0)return o;for(;i--;)o+=Wt(r);return o};var Xt={UNIQUE_NUMBER_SAFE_LENGTH:18,uniqueNumber:qt,uniqueString:Vt},Yt=Object.freeze({__proto__:null,UNIQUE_NUMBER_SAFE_LENGTH:18,default:Xt,uniqueNumber:qt,uniqueString:Vt});function Kt(e,t,n){let r=250,o=13;const i=e.children[0];ge(t,12)<230?(i.style.maxWidth=ge(t,12)+20+50+"px",r=n.clientX+(ge(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 a=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;a>0&&(e.style.top=n.clientY-a+"px")}const Jt={handleMouseEnter:function({rootContainer:e="#root",title:t,event:n,bgColor:r="#000",color:o="#fff"}){try{const i=p(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let a=null;const s="style-tooltip-inner1494304949567";if(!document.querySelector(`#${s}`)){const e=document.createElement("style");e.type="text/css",e.id=s,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(a=document.querySelector("#customTitle1494304949567"),a)Kt(a,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),a=document.querySelector("#customTitle1494304949567"),t&&(Kt(a,t,n),a.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=p(e)?document.querySelector(e):e;let n=document.querySelector("#customTitle1494304949567");t&&n&&(t.removeChild(n),n=null)}};var Zt={tooltipEvent:Jt},Qt=Object.freeze({__proto__:null,default:Zt,tooltipEvent:Jt});const en={keyField:"key",childField:"children",pidField:"pid"},tn={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};function nn(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:r="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:a=!1}=A(n)?n:{};let s=!1;const l=[],c=(n,o,u=0)=>{for(let d=n.length-1;d>=0&&!s;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){s=!0;break}if(!0===i)continue;f&&(a?N(f[r]):Array.isArray(f[r]))&&c(f[r],f,u+1)}}if(i)for(;l.length>0&&!s;){const e=l.shift(),{item:n,index:o,array:i,tree:u,parent:d,level:f}=e,p=t(n,o,i,u,d,f);if(!1===p){s=!0;break}!0!==p&&(n&&(a?N(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&&!s;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){s=!0;break}if(!0===i)continue;f&&(a?N(f[r]):Array.isArray(f[r]))&&u(f[r],f,c+1)}}if(i)for(;l.length>0&&!s;){const e=l.shift();if(!e)break;const{item:n,index:o,array:i,tree:c,parent:d,level:f}=e,p=t(n,o,i,c,d,f);if(!1===p){s=!0;break}!0!==p&&(n&&(a?N(n[r]):Array.isArray(n[r]))&&u(n[r],n,f+1))}};o?c(e,null,0):u(e,null,0),e=null}function rn(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){let r=null;return nn(e,((...e)=>{if(t(...e))return r=e[0],!1}),n),r}function on(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const r=[];return nn(e,((...e)=>{t(...e)&&r.push(e[0])}),n),r}function an(e,t,n={childField:"children",reverse:!1}){const{childField:r="children",reverse:o=!1}=A(n)?n:{};let i=!1;const a=[],s=(n,a,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,a,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],s(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,a,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],s(u[r],u,l[l.length-1][r],c+1)):delete d[r])}};return s(e,null,a),e=null,a}function sn(e,t,n={childField:"children",keyField:"id"}){const{childField:r="children",keyField:o="id"}=A(n)?n:{},i=(e,t,n)=>e.reduce(((e,a)=>{const s=a[r];return[...e,t?{...a,parentId:t,parent:n}:a,...s&&s.length?i(s,a[o],a):[]]}),[]);return(e=>{let n=e.find((e=>e[o]===t));const{parent:r,parentId:i,...a}=n;let s=[t],l=[a];for(;n&&n.parentId;)s=[n.parentId,...s],l=[n.parent,...l],n=e.find((e=>e[o]===n.parentId));return[s,l]})(i(e))}function ln(e,t=en){const{keyField:n="key",childField:r="children",pidField:o="pid"}=A(t)?t:{},i=[],a={};for(let t=0,r=e.length;t<r;t++){const r=e[t];a[r[n]]=r}for(let t=0,n=e.length;t<n;t++){const n=e[t],s=a[n[o]];s?(s[r]||(s[r]=[])).push(n):i.push(n)}return e=null,i}function cn(e,t=en){const{keyField:n="key",childField:r="children",pidField:o="pid"}=A(t)?t:{};let i=[];for(let a=0,s=e.length;a<s;a++){const s=e[a],l={...s,[r]:[]};if(u(l,r)&&delete l[r],i.push(l),s[r]){const e=s[r].map((e=>({...e,[o]:s[n]||e.pid})));i=i.concat(cn(e,t))}}return i}function un(e,t,n=tn){if(!u(t,"filter")&&!t.keyword)return e;const r=[];for(let o=0,i=e.length;o<i;o++){const i=e[o],a=i[n.childField]&&i[n.childField].length>0?un(i[n.childField]||[],t,n):[];if((u(t,"filter")?t.filter(i):n.ignoreCase?i[n.nameField].toLowerCase().includes(t.keyword.toLowerCase()):i[n.nameField].includes(t.keyword))||a.length>0)if(i[n.childField])if(a.length>0)r.push({...i,[n.childField]:a});else if(n.removeEmptyChild){const{[n.childField]:e,...t}=i;r.push(t)}else r.push({...i,[n.childField]:[]});else{const{[n.childField]:e,...t}=i;r.push(t)}}return r}var dn={forEachDeep:nn,findDeep:rn,filterDeep:on,mapDeep:an,searchTreeById:sn,formatTree:ln,flatTree:cn,fuzzySearchTree:un},fn=Object.freeze({__proto__:null,default:dn,filterDeep:on,findDeep:rn,flatTree:cn,forEachDeep:nn,formatTree:ln,fuzzySearchTree:un,mapDeep:an,searchTreeById:sn});const pn=(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)},gn=(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),(pn(e,o)+pn(t,o))/o},hn=(e,t)=>gn(e,-t),mn=(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)};function bn(e,t=15){return+parseFloat(Number(e).toPrecision(t))}var yn={add:gn,subtract:hn,multiply:pn,divide:mn,strip:bn},Sn=Object.freeze({__proto__:null,add:gn,default:yn,divide:mn,multiply:pn,strip:bn,subtract:hn});const wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",En=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function An(e){let t,n,r,o,i="",a=0;const s=(e=String(e)).length,l=s%3;for(;a<s;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>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+=wn.charAt(t>>18&63)+wn.charAt(t>>12&63)+wn.charAt(t>>6&63)+wn.charAt(63&t)}return l?i.slice(0,l-3)+"===".substring(l):i}function _n(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!En.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 a=(e+="==".slice(2-(3&e.length))).length;i<a;)t=wn.indexOf(e.charAt(i++))<<18|wn.indexOf(e.charAt(i++))<<12|(n=wn.indexOf(e.charAt(i++)))<<6|(r=wn.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}function xn(e){const t=E(xt("atob"))?_n(e):xt("atob")(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return E(xt("TextDecoder"))?function(e){const t=String.fromCharCode.apply(null,e);return decodeURIComponent(t)}(r):new(xt("TextDecoder"))("utf-8").decode(r)}function vn(e){const t=E(xt("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(xt("TextEncoder"))).encode(e);let n="";const r=t.length;for(let e=0;e<r;e++)n+=String.fromCharCode(t[e]);return E(xt("btoa"))?An(n):xt("btoa")(n)}var Tn={weBtoa:An,weAtob:_n,b64decode:xn,b64encode:vn},Fn=Object.freeze({__proto__:null,b64decode:xn,b64encode:vn,default:Tn,weAtob:_n,weBtoa:An});const Cn=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Rn=e=>Cn.test(e),jn=/^(?:(?:\+|00)86)?1\d{10}$/,Nn=e=>jn.test(e),On=/^(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]$/,Pn=e=>{if(!On.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 a=0;for(let t=0;t<17;t++)a+=Number(e.slice(t,t+1))*i[t];return["1","0","X","9","8","7","6","5","4","3","2"][a%11]===e.slice(-1)},In=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,Dn=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,Ln=(e,t=!1)=>(t?In:Dn).test(e),Mn=/^(?:(?:\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])$/,Un=/^(([\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,$n=e=>Mn.test(e),kn=e=>Un.test(e),zn=/^(-?[1-9]\d*|0)$/,Bn=e=>zn.test(e),Hn=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Gn=e=>Hn.test(e),qn=e=>Bn(e)||Gn(e),Wn=/^\d+$/,Vn=e=>Wn.test(e);var Xn={EMAIL_REGEX:Cn,HTTP_URL_REGEX:Dn,IPV4_REGEX:Mn,IPV6_REGEX:Un,PHONE_REGEX:jn,URL_REGEX:In,isDigit:Vn,isEmail:Rn,isFloat:Gn,isIdNo:Pn,isInteger:Bn,isIpV4:$n,isIpV6:kn,isNumerical:qn,isPhone:Nn,isUrl:Ln},Yn=Object.freeze({__proto__:null,EMAIL_REGEX:Cn,HTTP_URL_REGEX:Dn,IPV4_REGEX:Mn,IPV6_REGEX:Un,PHONE_REGEX:jn,URL_REGEX:In,default:Xn,isDigit:Vn,isEmail:Rn,isFloat:Gn,isIdNo:Pn,isInteger:Bn,isIpV4:$n,isIpV6:kn,isNumerical:qn,isPhone:Nn,isUrl:Ln});function Kn(e){return[...new Set(e.trim().split(""))].join("")}function Jn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zn(e,t){return new RegExp(`${Jn(e.trim())}\\s*([^${Jn(Kn(e))}${Jn(Kn(t))}\\s]*)\\s*${t.trim()}`,"g")}function Qn(e,t="{",n="}"){return Array.from(e.matchAll(Zn(t,n))).map((e=>E(e)?void 0:e[1]))}function er(e,t,n="{",r="}"){return e.replace(new RegExp(Zn(n,r)),(function(e,n){return u(t,n)?t[n]:e}))}function tr(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}`)}}var nr={escapeRegExp:Jn,executeInScope:tr,parseVarFromString:Qn,replaceVarFromString:er,uniqueSymbol:Kn},rr=Object.freeze({__proto__:null,default:nr,escapeRegExp:Jn,executeInScope:tr,parseVarFromString:Qn,replaceVarFromString:er,uniqueSymbol:Kn});function or(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(e instanceof ArrayBuffer){const n=new ArrayBuffer(e.byteLength);return new Uint8Array(n).set(new Uint8Array(e)),t.set(e,n),n}if(ArrayBuffer.isView(e)){return new(0,e.constructor)(or(e.buffer,t),e.byteOffset,e.length)}if(e instanceof Date){const n=new Date(e.getTime());return t.set(e,n),n}if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,t.set(e,n),n}if(e instanceof Map){const n=new Map;return t.set(e,n),e.forEach(((e,r)=>{n.set(or(r,t),or(e,t))})),n}if(e instanceof Set){const n=new Set;return t.set(e,n),e.forEach((e=>{n.add(or(e,t))})),n}if(Array.isArray(e)){const n=new Array(e.length);t.set(e,n);for(let r=0,o=e.length;r<o;r++)r in e&&(n[r]=or(e[r],t));const r=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(r))Object.defineProperty(n,e,{...r[e],value:or(r[e].value,t)});return n}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);const r=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(r)){const o=r[e];"value"in o?o.value=or(o.value,t):(o.get&&(o.get=or(o.get,t)),o.set&&(o.set=or(o.set,t))),Object.defineProperty(n,e,o)}return n}var ir={cloneDeep:or},ar=Object.freeze({__proto__:null,cloneDeep:or,default:ir});const sr={MAP:"[object Map]",SET:"[object Set]",DATE:"[object Date]",REGEXP:"[object RegExp]",SYMBOL:"[object Symbol]",ARRAY_BUFFER:"[object ArrayBuffer]",DATA_VIEW:"[object DataView]",ARGUMENTS:"[object Arguments]"},{toString:lr,hasOwnProperty:cr}=Object.prototype,ur=e=>lr.call(e);function dr(e,t){return fr(e,t)}function fr(e,t,n=void 0){if(e===t)return!0;if(e!=e&&t!=t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(n||(n=new WeakMap),n.has(e))return n.get(e)===t;n.set(e,t);const r=ur(e);if(r!==ur(t))return!1;let o=!1;switch(r){case sr.DATE:o=+e==+t;break;case sr.REGEXP:o=""+e==""+t;break;case sr.SYMBOL:o=Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t);break;case sr.ARRAY_BUFFER:o=pr(e,t);break;case sr.DATA_VIEW:a=t,o=(i=e).byteLength===a.byteLength&&i.byteOffset===a.byteOffset&&pr(i.buffer,a.buffer);break;case sr.MAP:o=function(e,t,n){if(e.size!==t.size)return!1;for(const[r,o]of e){const e=t.get(r);if(void 0===e&&!t.has(r))return!1;if(!fr(o,e,n))return!1}return!0}(e,t,n);break;case sr.SET:o=function(e,t,n){if(e.size!==t.size)return!1;for(const r of e){if(t.has(r))continue;let e=!1;for(const o of t)if(fr(r,o,n)){e=!0;break}if(!e)return!1}return!0}(e,t,n);break;case sr.ARGUMENTS:default:o=Array.isArray(e)||ArrayBuffer.isView(e)?function(e,t,n){const r=e.length;if(r!==t.length)return!1;let o=r;for(;o--;)if(!fr(e[o],t[o],n))return!1;return!0}(e,t,n):function(e,t,n){const r=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(r.length!==o.length)return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!cr.call(t,i)||!fr(e[i],t[i],n))return!1}return!0}(e,t,n)}var i,a;return o}function pr(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);let o=e.byteLength;for(;o--;)if(n[o]!==r[o])return!1;return!0}var gr={isEqual:dr},hr=Object.freeze({__proto__:null,default:gr,isEqual:dr});class mr{static ENTITY_MAP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};static NAMED_ENTITIES={"&quot;":'"',"&amp;":"&","&lt;":"<","&gt;":">","&nbsp;":" ","&copy;":"©","&trade;":"™","&reg;":"®"};static encode(e,t="unicode",n=!1){const r=[];for(const o of e){const e=o.codePointAt(0);"html"===t&&this.ENTITY_MAP[o]?r.push(this.ENTITY_MAP[o]):!n&&e>=32&&e<=126?r.push(o):"unicode"===t?e>65535?r.push(`\\u{${e.toString(16).toUpperCase()}}`):r.push(`\\u${e.toString(16).toUpperCase().padStart(4,"0")}`):r.push(`&#${e};`)}return r.join("")}static decode(e,t=!1){if(!e)return"";let n=e.replace(/\\u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))/g,((e,t,n)=>String.fromCodePoint(parseInt(t||n,16)))).replace(/&#(x?)([0-9a-fA-F]+);/g,((e,t,n)=>String.fromCodePoint(parseInt(n,t?16:10)))).replace(/&[a-z0-9]+;/gi,(e=>this.NAMED_ENTITIES[e]||e));return t&&(n=n.replace(/\u00A0/g," ")),n}}var br={UnicodeToolkit:mr},yr={...s,...Ee,...Te,...Me,...be,...it,...W,...ze,...We,...ae,...P,...Ze,...ut,...mt,...St,...Tt,...Ot,...Bt,...Yt,...Qt,...fn,...Sn,...Fn,...Yn,...rr,...ar,...hr,...Object.freeze({__proto__:null,UnicodeToolkit:mr,default:br})};e.EMAIL_REGEX=Cn,e.HEX_POOL=Pt,e.HTTP_URL_REGEX=Dn,e.IPV4_REGEX=Mn,e.IPV6_REGEX=Un,e.PHONE_REGEX=jn,e.STRING_ARABIC_NUMERALS=Y,e.STRING_LOWERCASE_ALPHA=K,e.STRING_POOL=Ct,e.STRING_UPPERCASE_ALPHA=J,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=In,e.UnicodeToolkit=mr,e.add=gn,e.addClass=ce,e.arrayEach=t,e.arrayEachAsync=n,e.arrayInsertBefore=r,e.arrayLike=d,e.arrayRemove=o,e.asyncMap=st,e.b64decode=xn,e.b64encode=vn,e.calculateDate=Ie,e.calculateDateTime=De,e.chooseLocalFile=ft,e.cloneDeep=or,e.compressImg=gt,e.cookieDel=xe,e.cookieGet=Ae,e.cookieSet=_e,e.copyText=ye,e.crossOriginDownload=nt,e.dateParse=je,e.dateToEnd=Oe,e.dateToStart=Ne,e.debounce=wt,e.default=yr,e.diffArray=i,e.divide=mn,e.downloadBlob=tt,e.downloadData=rt,e.downloadHref=et,e.downloadURL=Qe,e.escapeRegExp=Jn,e.executeInScope=tr,e.fallbackCopyText=Se,e.filterDeep=on,e.findDeep=rn,e.flatTree=cn,e.forEachDeep=nn,e.formatDate=Pe,e.formatMoney=kt,e.formatNumber=kt,e.formatTree=ln,e.fuzzySearchTree=un,e.genCanvasWM=bt,e.getComputedCssVal=pe,e.getGlobal=xt,e.getStrWidthPx=ge,e.getStyle=fe,e.hasClass=se,e.humanFileSize=$t,e.isArray=_,e.isBigInt=m,e.isBoolean=g,e.isDate=T,e.isDigit=Vn,e.isEmail=Rn,e.isEmpty=j,e.isEqual=dr,e.isError=F,e.isFloat=Gn,e.isFunction=x,e.isIdNo=Pn,e.isInteger=Bn,e.isIpV4=$n,e.isIpV6=kn,e.isJsonString=R,e.isNaN=v,e.isNodeList=N,e.isNull=S,e.isNullOrUnDef=E,e.isNullish=E,e.isNumber=b,e.isNumerical=qn,e.isObject=A,e.isPhone=Nn,e.isPlainObject=D,e.isPrimitive=w,e.isRegExp=C,e.isString=p,e.isSymbol=h,e.isUndefined=y,e.isUrl=Ln,e.isValidDate=Fe,e.mapDeep=an,e.multiply=pn,e.numberAbbr=Ut,e.numberToHex=Mt,e.objectAssign=B,e.objectEach=L,e.objectEachAsync=M,e.objectFill=H,e.objectGet=G,e.objectHas=u,e.objectMap=U,e.objectMerge=B,e.objectOmit=k,e.objectPick=$,e.once=At,e.parseQueryParams=oe,e.parseVarFromString=Qn,e.pathJoin=$e,e.pathNormalize=Ue,e.qsParse=Be,e.qsStringify=Ge,e.randomNumber=Ft,e.randomString=Rt,e.randomUuid=jt,e.removeClass=ue,e.replaceVarFromString=er,e.safeAwait=lt,e.searchTreeById=sn,e.select=he,e.setGlobal=_t,e.setStyle=de,e.stringAssign=te,e.stringCamelCase=V,e.stringEscapeHtml=ne,e.stringFill=re,e.stringFormat=Q,e.stringKebabCase=X,e.strip=bn,e.subtract=hn,e.supportCanvas=dt,e.throttle=Et,e.tooltipEvent=Jt,e.typeIs=f,e.uniqueNumber=qt,e.uniqueString=Vt,e.uniqueSymbol=Kn,e.urlDelParams=Ke,e.urlParse=Ve,e.urlSetParams=Ye,e.urlStringify=Xe,e.wait=at,e.weAtob=_n,e.weBtoa=An,Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sculp-js",
3
- "version": "1.18.3",
3
+ "version": "1.19.1",
4
4
  "description": "Utils function library for modern javascript",
5
5
  "scripts": {
6
6
  "prepare": "husky install",