sculp-js 1.19.1 → 1.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/array.cjs +1 -1
- package/dist/cjs/async.cjs +1 -1
- package/dist/cjs/base64.cjs +157 -71
- package/dist/cjs/clipboard.cjs +1 -1
- package/dist/cjs/cloneDeep.cjs +1 -1
- package/dist/cjs/cookie.cjs +1 -1
- package/dist/cjs/date.cjs +130 -70
- package/dist/cjs/dom.cjs +1 -1
- package/dist/cjs/download.cjs +1 -1
- package/dist/cjs/file.cjs +1 -1
- package/dist/cjs/func.cjs +1 -1
- package/dist/cjs/index.cjs +11 -3
- package/dist/cjs/isEqual.cjs +1 -1
- package/dist/cjs/math.cjs +1 -1
- package/dist/cjs/number.cjs +1 -1
- package/dist/cjs/object.cjs +1 -1
- package/dist/cjs/path.cjs +1 -1
- package/dist/cjs/qs.cjs +1 -1
- package/dist/cjs/random.cjs +1 -1
- package/dist/cjs/string.cjs +1 -1
- package/dist/cjs/tooltip.cjs +1 -1
- package/dist/cjs/tree.cjs +1 -1
- package/dist/cjs/type.cjs +71 -3
- package/dist/cjs/unicodeToolkit.cjs +19 -19
- package/dist/cjs/unique.cjs +1 -1
- package/dist/cjs/url.cjs +1 -1
- package/dist/cjs/validator.cjs +1 -1
- package/dist/cjs/variable.cjs +1 -1
- package/dist/cjs/watermark.cjs +1 -1
- package/dist/esm/array.mjs +1 -1
- package/dist/esm/async.mjs +1 -1
- package/dist/esm/base64.mjs +157 -71
- package/dist/esm/clipboard.mjs +1 -1
- package/dist/esm/cloneDeep.mjs +1 -1
- package/dist/esm/cookie.mjs +1 -1
- package/dist/esm/date.mjs +130 -78
- package/dist/esm/dom.mjs +1 -1
- package/dist/esm/download.mjs +1 -1
- package/dist/esm/file.mjs +1 -1
- package/dist/esm/func.mjs +1 -1
- package/dist/esm/index.mjs +11 -10
- package/dist/esm/isEqual.mjs +1 -1
- package/dist/esm/math.mjs +1 -1
- package/dist/esm/number.mjs +1 -1
- package/dist/esm/object.mjs +1 -1
- package/dist/esm/path.mjs +1 -1
- package/dist/esm/qs.mjs +1 -1
- package/dist/esm/random.mjs +1 -1
- package/dist/esm/string.mjs +1 -1
- package/dist/esm/tooltip.mjs +1 -1
- package/dist/esm/tree.mjs +1 -1
- package/dist/esm/type.mjs +71 -3
- package/dist/esm/unicodeToolkit.mjs +19 -19
- package/dist/esm/unique.mjs +1 -1
- package/dist/esm/url.mjs +1 -1
- package/dist/esm/validator.mjs +1 -1
- package/dist/esm/variable.mjs +1 -1
- package/dist/esm/watermark.mjs +1 -1
- package/dist/types/base64.d.ts +6 -6
- package/dist/types/date.d.ts +124 -28
- package/dist/types/type.d.ts +86 -3
- package/dist/umd/index.min.js +2 -2
- package/package.json +1 -1
package/dist/types/date.d.ts
CHANGED
|
@@ -38,46 +38,142 @@ export declare function dateToStart(value: DateValue): Date;
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function dateToEnd(value: DateValue): Date;
|
|
40
40
|
/**
|
|
41
|
-
* 格式化为日期对象(带自定义格式化模板)
|
|
41
|
+
* 格式化为日期对象 (带自定义格式化模板)
|
|
42
42
|
* @param {Date} value - 可以是数值、字符串或 Date 对象
|
|
43
43
|
* @param {string} [format] - 模板,默认是 YYYY-MM-DD HH:mm:ss,模板字符:
|
|
44
|
-
* - YYYY:年
|
|
45
|
-
* -
|
|
46
|
-
* -
|
|
47
|
-
* - DD
|
|
48
|
-
* -
|
|
49
|
-
* - HH:时(24
|
|
50
|
-
* -
|
|
51
|
-
* -
|
|
52
|
-
* -
|
|
53
|
-
* -
|
|
44
|
+
* - YYYY/yyyy:年
|
|
45
|
+
* - MM:月(补零)
|
|
46
|
+
* - M:月(不补零)
|
|
47
|
+
* - DD/dd:日(补零)
|
|
48
|
+
* - D/d:日(不补零)
|
|
49
|
+
* - HH:时(24 小时制,补零)
|
|
50
|
+
* - H:时(24 小时制,不补零)
|
|
51
|
+
* - mm:分(补零)
|
|
52
|
+
* - m:分(不补零)
|
|
53
|
+
* - ss:秒(补零)
|
|
54
|
+
* - s:秒(不补零)
|
|
55
|
+
* - SSS:毫秒(3 位)
|
|
56
|
+
* - SS:毫秒(2 位)
|
|
57
|
+
* - S:毫秒(1 位)
|
|
58
|
+
* - ww:中文完整星期(如:周日)
|
|
59
|
+
* - w:中文星期(如:周日)
|
|
54
60
|
* @returns {string} 格式化后的日期字符串
|
|
55
61
|
*/
|
|
56
62
|
export declare function formatDate(value: DateValue, format?: string): string;
|
|
63
|
+
export interface CalculateDateOptions {
|
|
64
|
+
/**
|
|
65
|
+
* 输出格式模板(传递给 formatDate 函数处理)
|
|
66
|
+
* 支持以下占位符:
|
|
67
|
+
* - YYYY/yyyy: 4 位年份
|
|
68
|
+
* - YY/yy: 2 位年份
|
|
69
|
+
* - MM: 2 位月份
|
|
70
|
+
* - M: 不补零月份
|
|
71
|
+
* - DD/dd: 2 位日期
|
|
72
|
+
* - D/d: 不补零日期
|
|
73
|
+
* - HH: 2 位小时 (24 小时制)
|
|
74
|
+
* - H: 不补零小时
|
|
75
|
+
* - mm: 2 位分钟
|
|
76
|
+
* - m: 不补零分钟
|
|
77
|
+
* - ss: 2 位秒
|
|
78
|
+
* - s: 不补零秒
|
|
79
|
+
* - SSS: 3 位毫秒
|
|
80
|
+
* - SS: 2 位毫秒
|
|
81
|
+
* - S: 1 位毫秒
|
|
82
|
+
* - ww/w: 中文星期
|
|
83
|
+
* @default 'YYYY-MM-DD'
|
|
84
|
+
*/
|
|
85
|
+
format?: string;
|
|
86
|
+
/**
|
|
87
|
+
* 年数(正数表示向后,负数表示向前)
|
|
88
|
+
* @default 0
|
|
89
|
+
*/
|
|
90
|
+
years?: number;
|
|
91
|
+
/**
|
|
92
|
+
* 月数(正数表示向后,负数表示向前)
|
|
93
|
+
* @default 0
|
|
94
|
+
*/
|
|
95
|
+
months?: number;
|
|
96
|
+
/**
|
|
97
|
+
* 周数(正数表示向后,负数表示向前)
|
|
98
|
+
* @default 0
|
|
99
|
+
*/
|
|
100
|
+
weeks?: number;
|
|
101
|
+
/**
|
|
102
|
+
* 天数(正数表示向后,负数表示向前)
|
|
103
|
+
* @default 0
|
|
104
|
+
*/
|
|
105
|
+
days?: number;
|
|
106
|
+
/**
|
|
107
|
+
* 小时数(正数表示向后,负数表示向前)
|
|
108
|
+
* @default 0
|
|
109
|
+
*/
|
|
110
|
+
hours?: number;
|
|
111
|
+
/**
|
|
112
|
+
* 分钟数(正数表示向后,负数表示向前)
|
|
113
|
+
* @default 0
|
|
114
|
+
*/
|
|
115
|
+
minutes?: number;
|
|
116
|
+
/**
|
|
117
|
+
* 秒数(正数表示向后,负数表示向前)
|
|
118
|
+
* @default 0
|
|
119
|
+
*/
|
|
120
|
+
seconds?: number;
|
|
121
|
+
/**
|
|
122
|
+
* 毫秒数(正数表示向后,负数表示向前)
|
|
123
|
+
* @default 0
|
|
124
|
+
*/
|
|
125
|
+
milliseconds?: number;
|
|
126
|
+
/**
|
|
127
|
+
* 是否返回 Date 对象而非字符串
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
returnDate?: boolean;
|
|
131
|
+
}
|
|
57
132
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @param {DateValue} originDate -
|
|
60
|
-
* @param {
|
|
61
|
-
* @
|
|
62
|
-
* @
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
133
|
+
* 调整日期(增加或减少特定时间单位)
|
|
134
|
+
* @param {DateValue} originDate - 参考日期,可以是 Date 对象、时间戳或日期字符串
|
|
135
|
+
* @param {CalculateDateOptions} options - 配置项,支持多种时间单位
|
|
136
|
+
* @returns {string | Date} 计算后的日期/日期时间字符串或 Date 对象
|
|
137
|
+
* @example
|
|
138
|
+
* // 基础用法(向后 2 天)
|
|
139
|
+
* adjustDate('2024-01-01', { days: 2 }) // '2024-01-03'
|
|
140
|
+
*
|
|
141
|
+
* // 向前 2 天
|
|
142
|
+
* adjustDate('2024-01-01', { days: -2 }) // '2023-12-30'
|
|
143
|
+
*
|
|
144
|
+
* // 向后 1 年 2 个月 3 天
|
|
145
|
+
* adjustDate('2024-01-01', { years: 1, months: 2, days: 3 }) // '2025-03-04'
|
|
146
|
+
*
|
|
147
|
+
* // 向后 2 周
|
|
148
|
+
* adjustDate('2024-01-01', { weeks: 2 }) // '2024-01-15'
|
|
149
|
+
*
|
|
150
|
+
* // 包含时间(向后 2 天 3 小时 30 分钟)
|
|
151
|
+
* adjustDate('2024-01-01 10:30:00', { days: 2, hours: 3, minutes: 30 }) // '2024-01-03 14:00'
|
|
152
|
+
*
|
|
153
|
+
* // 自定义格式
|
|
154
|
+
* adjustDate('2024-01-01', { days: 2, format: 'YYYY/MM/DD' }) // '2024/01/03'
|
|
155
|
+
* adjustDate('2024-01-01', { days: 2, format: 'YYYY 年 MM 月 DD 日' }) // '2024 年 01 月 03 日'
|
|
156
|
+
*
|
|
157
|
+
* // 时间戳输入
|
|
158
|
+
* adjustDate(1717330884896, { days: 2 }) // '2024-06-04'
|
|
159
|
+
*
|
|
160
|
+
* // 精确到毫秒
|
|
161
|
+
* adjustDate('2024-01-01 10:30:00', { hours: 1, minutes: 30, seconds: 45, milliseconds: 500 })
|
|
162
|
+
*
|
|
163
|
+
* // 返回 Date 对象
|
|
164
|
+
* adjustDate('2024-01-01', { days: 2, returnDate: true }) // Date 对象
|
|
72
165
|
*/
|
|
73
|
-
export declare function
|
|
166
|
+
export declare function adjustDate(originDate: DateValue, options?: CalculateDateOptions): string | Date;
|
|
74
167
|
declare const _default: {
|
|
75
168
|
isValidDate: (any: unknown) => any is Date;
|
|
76
169
|
dateParse: typeof dateParse;
|
|
77
170
|
dateToStart: typeof dateToStart;
|
|
78
171
|
dateToEnd: typeof dateToEnd;
|
|
79
172
|
formatDate: typeof formatDate;
|
|
80
|
-
|
|
81
|
-
|
|
173
|
+
adjustDate: typeof adjustDate;
|
|
174
|
+
/**
|
|
175
|
+
* @deprecated 已废弃,请使用 adjustDate
|
|
176
|
+
*/
|
|
177
|
+
calculateDate: typeof adjustDate;
|
|
82
178
|
};
|
|
83
179
|
export default _default;
|
package/dist/types/type.d.ts
CHANGED
|
@@ -52,16 +52,75 @@ export declare function objectHas<T extends AnyObject>(obj: T, key: keyof T): bo
|
|
|
52
52
|
* @returns {boolean}
|
|
53
53
|
*/
|
|
54
54
|
export declare function arrayLike(any: unknown): boolean;
|
|
55
|
+
declare const TYPE_TAGS: readonly ["Null", "Undefined", "Symbol", "Boolean", "Number", "String", "BigInt", "Function", "AsyncFunction", "Object", "Array", "Arguments", "Date", "RegExp", "Error", "Promise", "Map", "Set", "ArrayBuffer", "DataView", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array"];
|
|
55
56
|
/**
|
|
56
|
-
*
|
|
57
|
+
* 类型标签类型
|
|
58
|
+
*/
|
|
59
|
+
export type TypeTag = (typeof TYPE_TAGS)[number];
|
|
60
|
+
/**
|
|
61
|
+
* 类型标签到 TypeScript 类型的映射
|
|
62
|
+
*/
|
|
63
|
+
export interface TypeMapping {
|
|
64
|
+
Null: null;
|
|
65
|
+
Undefined: undefined;
|
|
66
|
+
Symbol: symbol;
|
|
67
|
+
Boolean: boolean;
|
|
68
|
+
Number: number;
|
|
69
|
+
String: string;
|
|
70
|
+
BigInt: bigint;
|
|
71
|
+
Function: Function;
|
|
72
|
+
AsyncFunction: Function;
|
|
73
|
+
Object: Record<string, unknown>;
|
|
74
|
+
Array: unknown[];
|
|
75
|
+
Arguments: IArguments;
|
|
76
|
+
Date: Date;
|
|
77
|
+
RegExp: RegExp;
|
|
78
|
+
Error: Error;
|
|
79
|
+
Promise: Promise<unknown>;
|
|
80
|
+
Map: Map<unknown, unknown>;
|
|
81
|
+
Set: Set<unknown>;
|
|
82
|
+
ArrayBuffer: ArrayBuffer;
|
|
83
|
+
DataView: DataView;
|
|
84
|
+
Int8Array: Int8Array;
|
|
85
|
+
Uint8Array: Uint8Array;
|
|
86
|
+
Uint8ClampedArray: Uint8ClampedArray;
|
|
87
|
+
Int16Array: Int16Array;
|
|
88
|
+
Uint16Array: Uint16Array;
|
|
89
|
+
Int32Array: Int32Array;
|
|
90
|
+
Uint32Array: Uint32Array;
|
|
91
|
+
Float32Array: Float32Array;
|
|
92
|
+
Float64Array: Float64Array;
|
|
93
|
+
BigInt64Array: BigInt64Array;
|
|
94
|
+
BigUint64Array: BigUint64Array;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 判断任意值的数据类型,检查非对象时不如 typeof、instanceof 的性能高
|
|
57
98
|
*
|
|
58
99
|
* 当检查类对象时是不可靠的,对象可以通过定义 Symbol.toStringTag 属性来更改检查结果
|
|
59
100
|
*
|
|
60
101
|
* 详见:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/toString
|
|
61
102
|
* @param {unknown} any
|
|
62
|
-
* @returns
|
|
103
|
+
* @returns {TypeTag} 类型标签字符串
|
|
104
|
+
*/
|
|
105
|
+
export declare function typeIs(any: unknown): TypeTag;
|
|
106
|
+
/**
|
|
107
|
+
* 判断值是否为指定类型(带类型守卫)
|
|
108
|
+
* @param {unknown} value - 要检查的值
|
|
109
|
+
* @param {TypeTag} type - 期望的类型
|
|
110
|
+
* @returns {boolean} 如果值是指定类型则返回 true
|
|
111
|
+
* @example
|
|
112
|
+
* is(value, 'String')
|
|
113
|
+
* is(value, 'Array')
|
|
114
|
+
* is(value, 'Date')
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* // 使用类型守卫
|
|
118
|
+
* if (is(value, 'String')) {
|
|
119
|
+
* // value 在这里被推断为 string 类型
|
|
120
|
+
* console.log(value.toUpperCase());
|
|
121
|
+
* }
|
|
63
122
|
*/
|
|
64
|
-
export declare function
|
|
123
|
+
export declare function is<T extends TypeTag>(value: unknown, type: T): value is TypeMapping[T];
|
|
65
124
|
export declare const isString: (any: unknown) => any is string;
|
|
66
125
|
export declare const isBoolean: (any: unknown) => any is boolean;
|
|
67
126
|
export declare const isSymbol: (any: unknown) => any is symbol;
|
|
@@ -84,6 +143,19 @@ export declare const isNaN: (any: unknown) => any is number;
|
|
|
84
143
|
export declare const isDate: (any: unknown) => any is Date;
|
|
85
144
|
export declare const isError: (any: unknown) => any is Error;
|
|
86
145
|
export declare const isRegExp: (any: unknown) => any is RegExp;
|
|
146
|
+
export declare const isPromise: (any: unknown) => any is Promise<unknown>;
|
|
147
|
+
export declare const isMap: (any: unknown) => any is Map<unknown, unknown>;
|
|
148
|
+
export declare const isSet: (any: unknown) => any is Set<unknown>;
|
|
149
|
+
/**
|
|
150
|
+
* 判断是否为 TypedArray
|
|
151
|
+
* @param {unknown} any
|
|
152
|
+
* @returns {boolean}
|
|
153
|
+
*/
|
|
154
|
+
export declare const isTypedArray: (any: unknown) => boolean;
|
|
155
|
+
export declare const isDataView: (any: unknown) => any is DataView;
|
|
156
|
+
export declare const isArrayBuffer: (any: unknown) => any is ArrayBuffer;
|
|
157
|
+
export declare const isArguments: (any: unknown) => any is IArguments;
|
|
158
|
+
export declare const isAsyncFunction: (any: unknown) => any is Function;
|
|
87
159
|
/**
|
|
88
160
|
* 判断一个字符串是否为有效的 JSON, 若有效则返回有效的JSON对象,否则false
|
|
89
161
|
* @param {string} str
|
|
@@ -126,6 +198,9 @@ export declare function isEmpty(value: any): boolean;
|
|
|
126
198
|
export declare function isNodeList(value: any): boolean;
|
|
127
199
|
declare const _default: {
|
|
128
200
|
typeIs: typeof typeIs;
|
|
201
|
+
is: typeof is;
|
|
202
|
+
TypeMapping: TypeMapping;
|
|
203
|
+
TypeTag: "ArrayBuffer" | "Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt" | "BigInt64Array" | "BigUint64Array" | "Null" | "Undefined" | "Symbol" | "Boolean" | "Number" | "String" | "Function" | "AsyncFunction" | "Object" | "Array" | "Arguments" | "Date" | "RegExp" | "Error" | "Promise" | "Map" | "Set" | "DataView";
|
|
129
204
|
objectHas: typeof objectHas;
|
|
130
205
|
arrayLike: typeof arrayLike;
|
|
131
206
|
isString: (any: unknown) => any is string;
|
|
@@ -145,6 +220,14 @@ declare const _default: {
|
|
|
145
220
|
isDate: (any: unknown) => any is Date;
|
|
146
221
|
isError: (any: unknown) => any is Error;
|
|
147
222
|
isRegExp: (any: unknown) => any is RegExp;
|
|
223
|
+
isPromise: (any: unknown) => any is Promise<unknown>;
|
|
224
|
+
isMap: (any: unknown) => any is Map<unknown, unknown>;
|
|
225
|
+
isSet: (any: unknown) => any is Set<unknown>;
|
|
226
|
+
isTypedArray: (any: unknown) => boolean;
|
|
227
|
+
isDataView: (any: unknown) => any is DataView;
|
|
228
|
+
isArrayBuffer: (any: unknown) => any is ArrayBuffer;
|
|
229
|
+
isArguments: (any: unknown) => any is IArguments;
|
|
230
|
+
isAsyncFunction: (any: unknown) => any is Function;
|
|
148
231
|
isJsonString: typeof isJsonString;
|
|
149
232
|
isEmpty: typeof isEmpty;
|
|
150
233
|
isNodeList: typeof isNodeList;
|
package/dist/umd/index.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.19.
|
|
2
|
+
* sculp-js v1.19.3
|
|
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}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={"&":"&","<":"<",">":">",'"':"""};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={"&":"&","<":"<",">":">",'"':""","'":"'"};static NAMED_ENTITIES={""":'"',"&":"&","<":"<",">":">"," ":" ","©":"©","™":"™","®":"®"};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})}));
|
|
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,r=!1){if(r)for(let r=e.length-1;r>=0;r--){const n=t(e[r],r,e);if(!1===n)break}else for(let r=0,n=e.length;r<n;r++){const n=t(e[r],r,e);if(!1===n)break}e=null}async function r(e,t,r=!1){if(r)for(let r=e.length-1;r>=0&&!1!==await t(e[r],r);r--);else for(let r=0,n=e.length;r<n&&!1!==await t(e[r],r);r++);}function n(e,t,r){if(t===r||t+1===r)return;const[n]=e.splice(t,1),o=r<t?r:r-1;e.splice(o,0,n)}function o(e,r){const n=[],o=r;return t(e,((e,t)=>{o(e,t)&&n.push(t)})),n.forEach(((t,r)=>{e.splice(t-r,1)})),e}function i(e,t,r){const n=e=>{if(r)return r(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(n(t),t);for(const e of t)i.set(n(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}}var s={arrayEach:t,arrayEachAsync:r,arrayInsertBefore:n,arrayRemove:o,diffArray:i},a=Object.freeze({__proto__:null,arrayEach:t,arrayEachAsync:r,arrayInsertBefore:n,arrayRemove:o,default:s,diffArray:i});const{toString:l,hasOwnProperty:c}=Object.prototype;function u(e,t){return c.call(e,t)}function d(e){return!!x(e)||(!!h(e)||!!_(e)&&u(e,"length"))}function f(e){return l.call(e).slice(8,-1)}function p(e,t){return f(e)===t}const h=e=>"string"==typeof e,g=e=>"boolean"==typeof e,m=e=>"symbol"==typeof e,y=e=>"bigint"==typeof e,b=e=>"number"==typeof e&&!Number.isNaN(e),A=e=>void 0===e,S=e=>null===e,w=e=>null===e||"object"!=typeof e;function E(e){return A(e)||S(e)}const _=e=>"Object"===f(e),x=e=>Array.isArray(e),v=e=>"function"==typeof e,C=e=>Number.isNaN(e),F=e=>"Date"===f(e),T=e=>"Error"===f(e),j=e=>"RegExp"===f(e),N=e=>"Promise"===f(e),R=e=>"Map"===f(e),O=e=>"Set"===f(e),P=e=>{const t=f(e);return"Int8Array"===t||"Uint8Array"===t||"Uint8ClampedArray"===t||"Int16Array"===t||"Uint16Array"===t||"Int32Array"===t||"Uint32Array"===t||"Float32Array"===t||"Float64Array"===t||"BigInt64Array"===t||"BigUint64Array"===t},I=e=>"DataView"===f(e),D=e=>"ArrayBuffer"===f(e),$=e=>"Arguments"===f(e),M=e=>"AsyncFunction"===f(e);function L(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}}function U(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 k(e){return!A(NodeList)&&NodeList.prototype.isPrototypeOf(e)}var B={typeIs:f,is:p,TypeMapping:void 0,TypeTag:void 0,objectHas:u,arrayLike:d,isString:h,isBoolean:g,isSymbol:m,isBigInt:y,isNumber:b,isUndefined:A,isNull:S,isPrimitive:w,isNullOrUnDef:E,isNullish:E,isObject:_,isArray:x,isFunction:v,isNaN:C,isDate:F,isError:T,isRegExp:j,isPromise:N,isMap:R,isSet:O,isTypedArray:P,isDataView:I,isArrayBuffer:D,isArguments:$,isAsyncFunction:M,isJsonString:L,isEmpty:U,isNodeList:k},z=Object.freeze({__proto__:null,arrayLike:d,default:B,is:p,isArguments:$,isArray:x,isArrayBuffer:D,isAsyncFunction:M,isBigInt:y,isBoolean:g,isDataView:I,isDate:F,isEmpty:U,isError:T,isFunction:v,isJsonString:L,isMap:R,isNaN:C,isNodeList:k,isNull:S,isNullOrUnDef:E,isNullish:E,isNumber:b,isObject:_,isPrimitive:w,isPromise:N,isRegExp:j,isSet:O,isString:h,isSymbol:m,isTypedArray:P,isUndefined:A,objectHas:u,typeIs:f});const H=f,G=e=>{if(!_(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function q(e,t){for(const r in e)if(u(e,r)&&!1===t(e[r],r))break;e=null}async function V(e,t){for(const r in e)if(u(e,r)&&!1===await t(e[r],r))break}function W(e,t){const r={};for(const n in e)u(e,n)&&(r[n]=t(e[n],n));return e=null,r}function X(e,t){const r={};return q(e,((e,n)=>{t.includes(n)&&(r[n]=e)})),e=null,r}function Y(e,t){const r={};return q(e,((e,n)=>{t.includes(n)||(r[n]=e)})),e=null,r}const K=(e,t,r)=>{if(A(r))return t;if(H(t)!==H(r))return x(r)?K(e,[],r):_(r)?K(e,{},r):r;if(G(r)){const n=e.get(r);return n||(e.set(r,t),q(r,((r,n)=>{t[n]=K(e,t[n],r)})),t)}if(x(r)){const n=e.get(r);return n||(e.set(r,t),r.forEach(((r,n)=>{t[n]=K(e,t[n],r)})),t)}return r};function J(e,...t){const r=new Map;for(let n=0,o=t.length;n<o;n++){const o=t[n];e=K(r,e,o)}return r.clear(),e}function Z(e,t,r){const n=r||((e,t,r)=>void 0===e[r]);return q(t,((r,o)=>{n(e,t,o)&&(e[o]=r)})),e}function Q(e,t,r=!1){const n=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");let o=e,i=0;for(let e=n.length;i<e-1;++i){const e=n[i];if(b(Number(e))&&Array.isArray(o))o=o[e];else{if(!_(o)||!u(o,e)){if(o=void 0,r)throw new Error("[Object] objectGet path 路径不正确");break}o=o[e]}}return{p:o,k:o?n[i]:void 0,v:o?o[n[i]]:void 0}}var ee={isPlainObject:G,objectEach:q,objectEachAsync:V,objectMap:W,objectPick:X,objectOmit:Y,objectAssign:J,objectMerge:J,objectFill:Z,objectGet:Q},te=Object.freeze({__proto__:null,default:ee,isPlainObject:G,objectAssign:J,objectEach:q,objectEachAsync:V,objectFill:Z,objectGet:Q,objectMap:W,objectMerge:J,objectOmit:Y,objectPick:X});function re(e,t){let r=e;t&&(r=e.replace(/^./,(e=>e.toUpperCase())));return r.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))}function ne(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const oe="0123456789",ie="abcdefghijklmnopqrstuvwxyz",se="ABCDEFGHIJKLMNOPQRSTUVWXYZ",ae=/%[%sdo]/g;function le(e,...t){let r=0;return[e.replace(ae,(e=>{const n=t[r++];switch(e){case"%%":return r--,"%";default:case"%s":return String(n);case"%d":return String(Number(n));case"%o":return JSON.stringify(n)}})),...t.splice(r).map(String)].join(" ")}const ce=/\${(.*?)}/g,ue=(e,t)=>e.replace(ce,((e,r)=>((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}`)}})(r,t))),de=e=>{const t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,(e=>t[e]))},fe=(e,t=" ")=>new Array(e).fill(t).join("");function pe(e=location.search){const t={};return Array.from(e.matchAll(/[&?]?([^=&]+)=?([^=&]*)/g)).forEach(((e,r)=>{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 he={stringCamelCase:re,stringKebabCase:ne,STRING_ARABIC_NUMERALS:oe,STRING_LOWERCASE_ALPHA:ie,STRING_UPPERCASE_ALPHA:se,stringFormat:le,stringAssign:ue,stringEscapeHtml:de,stringFill:fe,parseQueryParams:pe},ge=Object.freeze({__proto__:null,STRING_ARABIC_NUMERALS:oe,STRING_LOWERCASE_ALPHA:ie,STRING_UPPERCASE_ALPHA:se,default:he,parseQueryParams:pe,stringAssign:ue,stringCamelCase:re,stringEscapeHtml:de,stringFill:fe,stringFormat:le,stringKebabCase:ne});function me(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)}const ye=(e,t)=>{e.split(/\s+/g).forEach(t)};function be(e,t){ye(t,(t=>e.classList.add(t)))}function Ae(e,t){ye(t,(t=>e.classList.remove(t)))}const Se=(e,t,r)=>{_(t)?q(t,((t,r)=>{Se(e,r,t)})):e.style.setProperty(ne(t),r)};function we(e,t){return getComputedStyle(e).getPropertyValue(t)}function Ee(e,t,r=!0){const n=getComputedStyle(e).getPropertyValue(t)??"";return r?Number(n.replace(/([0-9]*)(.*)/g,"$1")):n}function _e(e,t=14,r=!0){let n=0;if(console.assert(h(e),`${e} 不是有效的字符串`),h(e)&&e.length>0){const o="getStrWidth1494304949567";let i=document.querySelector(`#${o}`);if(!i){const r=document.createElement("span");r.id=o,r.style.fontSize=t+"px",r.style.whiteSpace="nowrap",r.style.visibility="hidden",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.textContent=e,document.body.appendChild(r),i=r}i.textContent=e,n=i.offsetWidth,r&&i.remove()}return n}function xe(e){let t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){const r=e.hasAttribute("readonly");r||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),r||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();const r=window.getSelection(),n=document.createRange();n.selectNodeContents(e),r.removeAllRanges(),r.addRange(n),t=r.toString()}return t}var ve={hasClass:me,addClass:be,removeClass:Ae,setStyle:Se,getStyle:we,getComputedCssVal:Ee,getStrWidthPx:_e,select:xe},Ce=Object.freeze({__proto__:null,addClass:be,default:ve,getComputedCssVal:Ee,getStrWidthPx:_e,getStyle:we,hasClass:me,removeClass:Ae,select:xe,setStyle:Se});function Fe(e,t){const{successCallback:r,failCallback:n}=E(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{v(r)&&r()})).catch((r=>{Te(e,t)})):Te(e,t)}function Te(e,t){const{successCallback:r,failCallback:n,container:o=document.body}=E(t)?{}:t;let i=function(e){const t="rtl"===document.documentElement.getAttribute("dir"),r=document.createElement("textarea");r.style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.position="absolute",r.style[t?"right":"left"]="-9999px";const n=window.pageYOffset||document.documentElement.scrollTop;return r.style.top=`${n}px`,r.setAttribute("readonly",""),r.value=e,r}(e);o.appendChild(i),xe(i);try{document.execCommand("copy")&&v(r)&&r()}catch(e){v(n)&&n(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}var je={copyText:Fe,fallbackCopyText:Te},Ne=Object.freeze({__proto__:null,copyText:Fe,default:je,fallbackCopyText:Te});function Re(e){const{cookie:t}=document;if(!t)return"";const r=t.split(";");for(let t=0;t<r.length;t++){const n=r[t],[o,i=""]=n.split("=");if(o===e)return decodeURIComponent(i)}return""}function Oe(e,t,r){const n=[],o="expires";if(n.push([e,encodeURIComponent(t)]),b(r)){const e=new Date;e.setTime(e.getTime()+r),n.push([o,e.toUTCString()])}else F(r)&&n.push([o,r.toUTCString()]);n.push(["path","/"]),document.cookie=n.map((e=>{const[t,r]=e;return`${t}=${r}`})).join(";")}const Pe=e=>Oe(e,"",-1);var Ie={cookieSet:Oe,cookieGet:Re,cookieDel:Pe},De=Object.freeze({__proto__:null,cookieDel:Pe,cookieGet:Re,cookieSet:Oe,default:Ie});const $e=e=>F(e)&&!C(e.getTime()),Me=e=>{if(!h(e))return;const t=e.replace(/-/g,"/");return new Date(t)},Le=e=>{if(!h(e))return;const t=/([+-])(\d\d)(\d\d)$/,r=t.exec(e);if(!r)return;const n=e.replace(t,"Z"),o=new Date(n);if(!$e(o))return;const[,i,s,a]=r,l=parseInt(s,10),c=parseInt(a,10),u=(e,t)=>"+"===i?e-t:e+t;return o.setHours(u(o.getHours(),l)),o.setMinutes(u(o.getMinutes(),c)),o};function Ue(e){const t=new Date(e);if($e(t))return t;const r=Me(e);if($e(r))return r;const n=Le(e);if($e(n))return n;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function ke(e){const t=Ue(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}function Be(e){const t=ke(e);return t.setDate(t.getDate()+1),Ue(t.getTime()-1)}function ze(e,t="YYYY-MM-DD HH:mm:ss"){const r=Ue(e);let n,o=t;const i={"Y+":`${r.getFullYear()}`,"y+":`${r.getFullYear()}`,"M+":`${r.getMonth()+1}`,"D+":`${r.getDate()}`,"d+":`${r.getDate()}`,"H+":`${r.getHours()}`,"m+":`${r.getMinutes()}`,"s+":`${r.getSeconds()}`,"S+":`${r.getMilliseconds()}`,"w+":["周日","周一","周二","周三","周四","周五","周六"][r.getDay()]};for(const e in i)n=new RegExp("("+e+")").exec(o),n&&(o=o.replace(n[1],1===n[1].length?i[e]:i[e].padStart(n[1].length,"0")));return o}function He(e,t={}){const{format:r,returnDate:n=!1,years:o=0,months:i=0,weeks:s=0,days:a=0,hours:l=0,minutes:c=0,seconds:u=0,milliseconds:d=0}=t,f=Ue(e),p=new Date(f),h=f.getDate(),g=h===new Date(f.getFullYear(),f.getMonth()+1,0).getDate();if(p.setFullYear(p.getFullYear()+o),0!==i){const e=p.getMonth()+i,t=new Date(p.getFullYear(),e+1,0).getDate();p.setDate(1),p.setMonth(e),g||h>t?p.setDate(t):p.setDate(h)}if(0===a&&0===s||p.setDate(p.getDate()+a+7*s),p.setHours(p.getHours()+l),p.setMinutes(p.getMinutes()+c),p.setSeconds(p.getSeconds()+u),p.setMilliseconds(p.getMilliseconds()+d),n)return p;if(r)return ze(p,r);const m=p.getFullYear(),y=String(p.getMonth()+1).padStart(2,"0"),b=String(p.getDate()).padStart(2,"0"),A=String(p.getHours()).padStart(2,"0"),S=String(p.getMinutes()).padStart(2,"0"),w=String(p.getSeconds()).padStart(2,"0");if(t.hasOwnProperty("hours")||t.hasOwnProperty("minutes")||t.hasOwnProperty("seconds")||t.hasOwnProperty("milliseconds")){if(t.hasOwnProperty("milliseconds")){return`${m}-${y}-${b} ${A}:${S}:${w}.${String(p.getMilliseconds()).padStart(3,"0")}`}return t.hasOwnProperty("seconds")?`${m}-${y}-${b} ${A}:${S}:${w}`:`${m}-${y}-${b} ${A}:${S}`}return`${m}-${y}-${b}`}var Ge={isValidDate:$e,dateParse:Ue,dateToStart:ke,dateToEnd:Be,formatDate:ze,adjustDate:He,calculateDate:He},qe=Object.freeze({__proto__:null,adjustDate:He,dateParse:Ue,dateToEnd:Be,dateToStart:ke,default:Ge,formatDate:ze,isValidDate:$e});const Ve=e=>{const t=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/\.{3,}/g,"..").replace(/\/\.\//g,"/").split("/").map((e=>e.trim())),r=e=>".."===e,n=[];let o=!1;const i=e=>{n.push(e)};return t.forEach((e=>{const t=(e=>"."===e)(e),s=r(e);return o?t?void 0:s?(()=>{if(0===n.length)return;const e=n[n.length-1];r(e)?n.push(".."):n.pop()})():void i(e):(i(e),void(o=!t&&!s))})),n.join("/")},We=(e,...t)=>Ve([e,...t].join("/"));var Xe={pathJoin:We,pathNormalize:Ve},Ye=Object.freeze({__proto__:null,default:Xe,pathJoin:We,pathNormalize:Ve});function Ke(e){const t=new URLSearchParams(e),r={};for(const[e,n]of t.entries())A(r[e])?r[e]=n:x(r[e])||(r[e]=t.getAll(e));return r}const Je=e=>h(e)?e:b(e)?String(e):g(e)?e?"true":"false":F(e)?e.toISOString():null;function Ze(e,t=Je){const r=new URLSearchParams;return q(e,((e,n)=>{if(x(e))e.forEach((e=>{const o=t(e);null!==o&&r.append(n.toString(),o)}));else{const o=t(e);if(null===o)return;r.set(n.toString(),o)}})),r.toString()}var Qe={qsParse:Ke,qsStringify:Ze},et=Object.freeze({__proto__:null,default:Qe,qsParse:Ke,qsStringify:Ze});const tt=(e,t=!0)=>{let r=null;v(URL)&&t?r=new URL(e):(r=document.createElement("a"),r.href=e);const{protocol:n,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,pathname:d}=r,f=We("/",d),p=o&&i?`${o}:${i}`:"",h=u.replace(/^\?/,"");return r=null,{protocol:n,auth:p,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,searchParams:Ke(h),query:h,pathname:f,path:`${f}${u}`,href:e}},rt=e=>{const{protocol:t,auth:r,host:n,pathname:o,searchParams:i,hash:s}=e,a=r?`${r}@`:"",l=Ze(i),c=l?`?${l}`:"";let u=s.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${a}${n}${o}${c}${u}`},nt=(e,t)=>{const r=tt(e);return Object.assign(r.searchParams,t),rt(r)},ot=(e,t)=>{const r=tt(e);return t.forEach((e=>delete r.searchParams[e])),rt(r)};var it={urlParse:tt,urlStringify:rt,urlSetParams:nt,urlDelParams:ot},st=Object.freeze({__proto__:null,default:it,urlDelParams:ot,urlParse:tt,urlSetParams:nt,urlStringify:rt});function at(e,t){window.open(t?nt(e,t):e)}function lt(e,t,r){let n=document.createElement("a");n.download=t,n.style.display="none",n.href=e,document.body.appendChild(n),n.click(),setTimeout((()=>{document.body.removeChild(n),n=null,v(r)&&r()}))}function ct(e,t,r){const n=URL.createObjectURL(e);lt(n,t),setTimeout((()=>{URL.revokeObjectURL(n),v(r)&&r()}))}function ut(e,t,r){const{successCode:n=200,successCallback:o,failCallback:i}=E(r)?{successCode:200,successCallback:void 0,failCallback:void 0}:r,s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="blob",s.onload=function(){if(s.status===n)ct(s.response,t,o);else if(v(i)){const e=s.status,t=s.getResponseHeader("Content-Type");if(h(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=>{v(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},s.send()}function dt(e,t,r,n){if(r=r.replace(`.${t}`,"")+`.${t}`,"json"===t){ct(new Blob([JSON.stringify(e,null,4)]),r)}else{if(!n||!n.length)throw new Error("未传入表头数据");if(!Array.isArray(e))throw new Error("data error! expected array!");const o=n.join(",")+"\n";let i="";e.forEach((e=>{i+=Object.values(e).join(",\t")+",\n"}));lt("data:"+{csv:"text/csv",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[t]+";charset=utf-8,\ufeff"+encodeURIComponent(o+i),r)}}var ft={downloadURL:at,downloadHref:lt,downloadBlob:ct,crossOriginDownload:ut,downloadData:dt},pt=Object.freeze({__proto__:null,crossOriginDownload:ut,default:ft,downloadBlob:ct,downloadData:dt,downloadHref:lt,downloadURL:at});function ht(e=1){return new Promise((t=>setTimeout(t,e)))}function gt(e,t,r=1/0){return new Promise(((n,o)=>{const i=e[Symbol.iterator](),s=Math.min(e.length,r),a=[];let l,c=0,u=0;const d=()=>{if(l)return o(l);const r=i.next();if(r.done)return void(c===e.length&&n(a));const s=u++;t(r.value,s,e).then((e=>{c++,a[s]=e,d()})).catch((e=>{l=e,d()}))};for(let e=0;e<s;e++)d()}))}function mt(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))}var yt={wait:ht,asyncMap:gt,safeAwait:mt},bt=Object.freeze({__proto__:null,asyncMap:gt,default:yt,safeAwait:mt,wait:ht});function At(){return!!document.createElement("canvas").getContext}function St(e,t){let r=document.createElement("input");r.setAttribute("id",String(Date.now())),r.setAttribute("type","file"),r.setAttribute("style","visibility:hidden"),r.setAttribute("accept",e),document.body.appendChild(r),r.click(),r.onchange=e=>{t(e.target.files),setTimeout((()=>{document.body.removeChild(r),r=null}))}}function wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n}){let o=r,i=n;return(r>e||n>t)&&(r/n>e/t?(o=e,i=Math.round(e*(n/r))):(i=t,o=Math.round(t*(r/n)))),{width:o,height:i}}function Et(e,t={mime:"image/jpeg",minFileSizeKB:50}){if(!(e instanceof File||e instanceof FileList))throw new Error(`${e} require be File or FileList`);if(!At())throw new Error("Current runtime environment not support Canvas");const{quality:r,mime:n="image/jpeg",maxSize:o,minFileSizeKB:i=50}=_(t)?t:{};let s,a=r;if(r)a=r;else if(e instanceof File){const t=+parseInt((e.size/1024).toFixed(2));a=t<i?1:t<1024?.85:t<5120?.8:.75}return b(o)&&(s=o>=1200?o:1200),e instanceof FileList?Promise.all(Array.from(e).map((e=>Et(e,{maxSize:s,mime:n,quality:a})))):e instanceof File?new Promise((t=>{const r=[...e.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[n]].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:h}=function({sizeKB:e,maxSize:t,originWidth:r,originHeight:n}){let o=r,i=n;if(b(t)){const{width:e,height:s}=wt({maxWidth:t,maxHeight:t,originWidth:r,originHeight:n});o=e,i=s}else if(e<500){const e=1200,t=1200,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}else if(e<5120){const e=1400,t=1400,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}else if(e<10240){const e=1600,t=1600,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}else if(10240<=e){const e=r>15e3?8192:r>1e4?4096:2048,t=n>15e3?8192:n>1e4?4096:2048,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}return{width:o,height:i}}({sizeKB:o,maxSize:s,originWidth:d,originHeight:f});c.width=p,c.height=h,u.clearRect(0,0,p,h),u.drawImage(l,0,0,p,h);const g=c.toDataURL(n,a),m=atob(g.split(",")[1]);let y=m.length;const A=new Uint8Array(new ArrayBuffer(y));for(;y--;)A[y]=m.charCodeAt(y);const S=new File([A],r,{type:n});t({file:S,bufferArray:A,origin:e,beforeSrc:i,afterSrc:g,beforeKB:o,afterKB:Number((S.size/1024).toFixed(2))})},l.src=i},i.readAsDataURL(e)}})):Promise.resolve(null)}var _t={supportCanvas:At,chooseLocalFile:St,compressImg:Et},xt=Object.freeze({__proto__:null,chooseLocalFile:St,compressImg:Et,default:_t,supportCanvas:At});function vt(e="请勿外传",t){const{rootContainer:r=document.body,width:n="300px",height:o="150px",textAlign:i="center",textBaseline:s="middle",font:a="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=h(r)?document.querySelector(r):r;if(!f)throw new Error(`${r} is not valid Html Element or element selector`);const p=document.createElement("canvas");p.setAttribute("width",n),p.setAttribute("height",o);const g=p.getContext("2d");g.textAlign=i,g.textBaseline=s,g.font=a,g.fillStyle=l,g.rotate(Math.PI/180*c),g.fillText(e,parseFloat(n)/4,parseFloat(o)/2);const m=p.toDataURL(),y=document.querySelector(`#${d}`),b=y||document.createElement("div"),A=`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}')`;b.setAttribute("style",A),b.setAttribute("id",d),b.classList.add("nav-height"),y||(f.style.position="relative",f.appendChild(b));const S=window.MutationObserver||window.WebKitMutationObserver;if(S){let r=new S((function(){let n=document.querySelector(`#${d}`);if(n){const{opacity:o,zIndex:i,display:s,visibility:a}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(n);(n&&n.getAttribute("style")!==A||!n||"1"!==o||"2147483647"!==i||"block"!==s||"visible"!==a)&&(r.disconnect(),r=null,f.removeChild(n),n=null,vt(e,t))}else r.disconnect(),r=null,vt(e,t)}));r.observe(f,{attributes:!0,subtree:!0,childList:!0})}}var Ct={genCanvasWM:vt},Ft=Object.freeze({__proto__:null,default:Ct,genCanvasWM:vt});const Tt=(e,t)=>{let r,n=!1;const o=function(...o){n||(clearTimeout(r),r=setTimeout((()=>{e.call(this,...o)}),t))};return o.cancel=()=>{clearTimeout(r),n=!0},o},jt=(e,t,r)=>{let n,o=!1,i=0;const s=function(...s){if(o)return;const a=Date.now(),l=()=>{i=a,e.call(this,...s)};if(0===i)return r?l():void(i=a);i+t-a>0?(clearTimeout(n),n=setTimeout((()=>l()),t)):l()};return s.cancel=()=>{clearTimeout(n),o=!0},s},Nt=e=>{let t,r=!1;return function(...n){return r||(r=!0,t=e.call(this,...n)),t}};function Rt(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 Ot(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 Pt={debounce:Tt,throttle:jt,once:Nt,getGlobal:Ot,setGlobal:Rt},It=Object.freeze({__proto__:null,debounce:Tt,default:Pt,getGlobal:Ot,once:Nt,setGlobal:Rt,throttle:jt});const Dt=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),$t=`${oe}${se}${ie}`,Mt=(e,t)=>{let r=0,n=$t;h(t)?(r=e,n=t):b(e)?r=e:h(e)&&(n=e);let o=Math.max(r,1),i="";const s=n.length-1;if(s<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=n[Dt(0,s)]}return i};function Lt(){if("undefined"==typeof URL||!URL.createObjectURL||"undefined"==typeof Blob){const e="0123456789abcdef",t="xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx";let r="";for(let n=0;n<t.length;n++){const o=Dt(0,15);r+="-"==t[n]||"4"==t[n]?t[n]:e[o]}return r}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]}var Ut={STRING_POOL:$t,randomNumber:Dt,randomString:Mt,randomUuid:Lt},kt=Object.freeze({__proto__:null,STRING_POOL:$t,default:Ut,randomNumber:Dt,randomString:Mt,randomUuid:Lt});const Bt=`${oe}${se}${ie}`,zt="undefined"!=typeof BigInt,Ht=()=>Ot("JSBI"),Gt=e=>zt?BigInt(e):Ht().BigInt(e);function qt(e,t=Bt){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!zt)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let r=Gt(e);const n=[],{length:o}=t,i=Gt(o),s=()=>{const e=Number(((e,t)=>zt?e%t:Ht().remainder(e,t))(r,i));r=((e,t)=>zt?e/t:Ht().divide(e,t))(r,i),n.unshift(t[e]),r>0&&s()};return s(),n.join("")}const Vt=(e,t,r={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:n=1e3,decimals:o=0,separator:i=" "}=r,{length:s}=t;if(0===s)throw new Error("At least one unit is required");let a=Number(e),l=0;for(;a>=n&&l<s-1;)a/=n,l++;const c=a.toFixed(o),u=t[l];return String(c)+i+u};function Wt(e,t={decimals:0,si:!1,separator:" "}){const{decimals:r=0,si:n=!1,separator:o=" ",baseUnit:i,maxUnit:s}=t;let a=n?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!E(i)){const e=a.findIndex((e=>e===i));-1!==e&&(a=a.slice(e))}if(!E(s)){const e=a.findIndex((e=>e===s));-1!==e&&a.splice(e+1)}return Vt(e,a,{ratio:n?1e3:1024,decimals:r,separator:o})}function Xt(e,t){if(E(t))return parseInt(String(e)).toLocaleString();let r=0;return t>0&&(r=t),Number(Number(e).toFixed(r)).toLocaleString("en-US")}var Yt={HEX_POOL:Bt,numberToHex:qt,numberAbbr:Vt,humanFileSize:Wt,formatNumber:Xt,formatMoney:Xt},Kt=Object.freeze({__proto__:null,HEX_POOL:Bt,default:Yt,formatMoney:Xt,formatNumber:Xt,humanFileSize:Wt,numberAbbr:Vt,numberToHex:qt});let Jt=0,Zt=0;const Qt=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==Zt&&(Zt=t,Jt=0);const r=`${t}`;let n="";const o=e-5-13;if(o>0){n=`${Dt(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(Jt,5);return Jt++,`${r}${n}${i}`},er=e=>e[Dt(0,e.length-1)],tr=(e,t)=>{let r=0,n=Bt;h(t)?(r=e,n=t):b(e)?r=e:h(e)&&(n=e);let o=qt(Qt(),n),i=r-o.length;if(i<=0)return o;for(;i--;)o+=er(n);return o};var rr={UNIQUE_NUMBER_SAFE_LENGTH:18,uniqueNumber:Qt,uniqueString:tr},nr=Object.freeze({__proto__:null,UNIQUE_NUMBER_SAFE_LENGTH:18,default:rr,uniqueNumber:Qt,uniqueString:tr});function or(e,t,r){let n=250,o=13;const i=e.children[0];_e(t,12)<230?(i.style.maxWidth=_e(t,12)+20+50+"px",n=r.clientX+(_e(t,12)+50)-document.body.offsetWidth):(i.style.maxWidth="250px",n=r.clientX+230-document.body.offsetWidth),i.innerHTML=t,n>0&&(o-=n),e.style.top=r.clientY+23+"px",e.style.left=r.clientX+o+"px",e.style.maxWidth="250px";const s=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;s>0&&(e.style.top=r.clientY-s+"px")}const ir={handleMouseEnter:function({rootContainer:e="#root",title:t,event:r,bgColor:n="#000",color:o="#fff"}){try{const i=h(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let s=null;const a="style-tooltip-inner1494304949567";if(!document.querySelector(`#${a}`)){const e=document.createElement("style");e.type="text/css",e.id=a,e.innerHTML=`\n .tooltip-inner1494304949567 {\n max-width: 250px;\n padding: 3px 8px;\n color: ${o};\n text-decoration: none;\n border-radius: 4px;\n text-align: left;\n background-color: ${n};\n }\n `,document.querySelector("head").appendChild(e)}if(s=document.querySelector("#customTitle1494304949567"),s)or(s,t,r);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&&(or(s,t,r),s.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=h(e)?document.querySelector(e):e;let r=document.querySelector("#customTitle1494304949567");t&&r&&(t.removeChild(r),r=null)}};var sr={tooltipEvent:ir},ar=Object.freeze({__proto__:null,default:sr,tooltipEvent:ir});const lr={keyField:"key",childField:"children",pidField:"pid"},cr={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};function ur(e,t,r={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:n="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:s=!1}=_(r)?r:{};let a=!1;const l=[],c=(r,o,u=0)=>{for(let d=r.length-1;d>=0&&!a;d--){const f=r[d];if(i)l.push({item:f,index:d,array:r,tree:e,parent:o,level:u});else{const i=t(f,d,r,e,o,u);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?k(f[n]):Array.isArray(f[n]))&&c(f[n],f,u+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift(),{item:r,index:o,array:i,tree:u,parent:d,level:f}=e,p=t(r,o,i,u,d,f);if(!1===p){a=!0;break}!0!==p&&(r&&(s?k(r[n]):Array.isArray(r[n]))&&c(r[n],r,f+1))}},u=(r,o,c=0)=>{for(let d=0,f=r.length;d<f&&!a;d++){const f=r[d];if(i)l.push({item:f,index:d,array:r,tree:e,parent:o,level:c});else{const i=t(f,d,r,e,o,c);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?k(f[n]):Array.isArray(f[n]))&&u(f[n],f,c+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift();if(!e)break;const{item:r,index:o,array:i,tree:c,parent:d,level:f}=e,p=t(r,o,i,c,d,f);if(!1===p){a=!0;break}!0!==p&&(r&&(s?k(r[n]):Array.isArray(r[n]))&&u(r[n],r,f+1))}};o?c(e,null,0):u(e,null,0),e=null}function dr(e,t,r={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){let n=null;return ur(e,((...e)=>{if(t(...e))return n=e[0],!1}),r),n}function fr(e,t,r={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const n=[];return ur(e,((...e)=>{t(...e)&&n.push(e[0])}),r),n}function pr(e,t,r={childField:"children",reverse:!1}){const{childField:n="children",reverse:o=!1}=_(r)?r:{};let i=!1;const s=[],a=(r,s,l,c=0)=>{if(o)for(let o=r.length-1;o>=0&&!i;o--){const u=r[o],d=t(u,o,r,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(Y(d,[n])),u&&Array.isArray(u[n])?(l[l.length-1][n]=[],a(u[n],u,l[l.length-1][n],c+1)):delete d[n])}else for(let o=0;o<r.length&&!i;o++){const u=r[o],d=t(u,o,r,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(Y(d,[n])),u&&Array.isArray(u[n])?(l[l.length-1][n]=[],a(u[n],u,l[l.length-1][n],c+1)):delete d[n])}};return a(e,null,s),e=null,s}function hr(e,t,r={childField:"children",keyField:"id"}){const{childField:n="children",keyField:o="id"}=_(r)?r:{},i=(e,t,r)=>e.reduce(((e,s)=>{const a=s[n];return[...e,t?{...s,parentId:t,parent:r}:s,...a&&a.length?i(a,s[o],s):[]]}),[]);return(e=>{let r=e.find((e=>e[o]===t));const{parent:n,parentId:i,...s}=r;let a=[t],l=[s];for(;r&&r.parentId;)a=[r.parentId,...a],l=[r.parent,...l],r=e.find((e=>e[o]===r.parentId));return[a,l]})(i(e))}function gr(e,t=lr){const{keyField:r="key",childField:n="children",pidField:o="pid"}=_(t)?t:{},i=[],s={};for(let t=0,n=e.length;t<n;t++){const n=e[t];s[n[r]]=n}for(let t=0,r=e.length;t<r;t++){const r=e[t],a=s[r[o]];a?(a[n]||(a[n]=[])).push(r):i.push(r)}return e=null,i}function mr(e,t=lr){const{keyField:r="key",childField:n="children",pidField:o="pid"}=_(t)?t:{};let i=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l={...a,[n]:[]};if(u(l,n)&&delete l[n],i.push(l),a[n]){const e=a[n].map((e=>({...e,[o]:a[r]||e.pid})));i=i.concat(mr(e,t))}}return i}function yr(e,t,r=cr){if(!u(t,"filter")&&!t.keyword)return e;const n=[];for(let o=0,i=e.length;o<i;o++){const i=e[o],s=i[r.childField]&&i[r.childField].length>0?yr(i[r.childField]||[],t,r):[];if((u(t,"filter")?t.filter(i):r.ignoreCase?i[r.nameField].toLowerCase().includes(t.keyword.toLowerCase()):i[r.nameField].includes(t.keyword))||s.length>0)if(i[r.childField])if(s.length>0)n.push({...i,[r.childField]:s});else if(r.removeEmptyChild){const{[r.childField]:e,...t}=i;n.push(t)}else n.push({...i,[r.childField]:[]});else{const{[r.childField]:e,...t}=i;n.push(t)}}return n}var br={forEachDeep:ur,findDeep:dr,filterDeep:fr,mapDeep:pr,searchTreeById:hr,formatTree:gr,flatTree:mr,fuzzySearchTree:yr},Ar=Object.freeze({__proto__:null,default:br,filterDeep:fr,findDeep:dr,flatTree:mr,forEachDeep:ur,formatTree:gr,fuzzySearchTree:yr,mapDeep:pr,searchTreeById:hr});const Sr=(e,t)=>{let r=0;const n=e.toString(),o=t.toString();return void 0!==n.split(".")[1]&&(r+=n.split(".")[1].length),void 0!==o.split(".")[1]&&(r+=o.split(".")[1].length),Number(n.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,r)},wr=(e,t)=>{let r=0,n=0,o=0;try{r=e.toString().split(".")[1].length}catch(e){r=0}try{n=t.toString().split(".")[1].length}catch(e){n=0}return o=10**Math.max(r,n),(Sr(e,o)+Sr(t,o))/o},Er=(e,t)=>wr(e,-t),_r=(e,t)=>{let r=0,n=0,o=0,i=0;return void 0!==e.toString().split(".")[1]&&(r=e.toString().split(".")[1].length),void 0!==t.toString().split(".")[1]&&(n=t.toString().split(".")[1].length),o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,n-r)};function xr(e,t=15){return+parseFloat(Number(e).toPrecision(t))}var vr={add:wr,subtract:Er,multiply:Sr,divide:_r,strip:xr},Cr=Object.freeze({__proto__:null,add:wr,default:vr,divide:_r,multiply:Sr,strip:xr,subtract:Er});const Fr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Tr=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function jr(e){const t=e.length;let r="",n=0;for(;n<t-2;n+=3){const t=e.charCodeAt(n)<<16|e.charCodeAt(n+1)<<8|e.charCodeAt(n+2);r+=Fr.charAt(t>>18)+Fr.charAt(t>>12&63)+Fr.charAt(t>>6&63)+Fr.charAt(63&t)}const o=t-n;if(1===o){const t=e.charCodeAt(n);r+=Fr.charAt(t>>2)+Fr.charAt(t<<4&63)+"=="}else if(2===o){const t=e.charCodeAt(n)<<8|e.charCodeAt(n+1);r+=Fr.charAt(t>>10)+Fr.charAt(t>>4&63)+Fr.charAt(t<<2&63)+"="}return r}function Nr(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Tr.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");const t=e.length,r=e.endsWith("==")?2:e.endsWith("=")?1:0,n=new Array(.75*t-r);let o=0;for(let i=0;i<t;i+=4){const s=Fr.indexOf(e.charAt(i))<<18|Fr.indexOf(e.charAt(i+1))<<12|(63&Fr.indexOf(e.charAt(i+2)))<<6|63&Fr.indexOf(e.charAt(i+3));n[o++]=String.fromCharCode(s>>16&255),(i+2<t-r||r<2)&&(n[o++]=String.fromCharCode(s>>8&255)),(i+3<t-r||r<1)&&(n[o++]=String.fromCharCode(255&s))}return n.join("")}function Rr(e){const t=(e=String(e)).length;for(let r=0;r<t;r++)if(e.charCodeAt(r)>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");return jr(e)}function Or(e){return Nr(e)}function Pr(e){if(!E(Ot("atob"))&&!E(Ot("TextDecoder")))try{const t=Ot("atob")(e),r=t.length,n=new Uint8Array(r);for(let e=0;e<r;e++)n[e]=t.charCodeAt(e);return new(Ot("TextDecoder"))("utf-8").decode(n)}catch(e){}const t=Nr(e),r=t.length,n=new Uint8Array(r);for(let e=0;e<r;e++)n[e]=t.charCodeAt(e);return function(e){const t=e.length;let r="",n=0;for(;n<t;){const t=e[n++];if(t<128)r+=String.fromCharCode(t);else if(t<224){const o=63&e[n++];r+=String.fromCharCode((31&t)<<6|o)}else if(t<240){const o=63&e[n++],i=63&e[n++];r+=String.fromCharCode((15&t)<<12|o<<6|i)}else{let o=(7&t)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++];o-=65536,r+=String.fromCharCode(55296+(o>>10&1023),56320+(1023&o))}}return r}(n)}function Ir(e){if(!E(Ot("btoa"))&&!E(Ot("TextEncoder")))try{const t=(new(Ot("TextEncoder"))).encode(e);let r="";const n=t.length;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return Ot("btoa")(r)}catch(e){}const t=function(e){const t=e.length,r=new Uint8Array(3*t);let n=0;for(let o=0;o<t;o++){let t=e.charCodeAt(o);t<128?r[n++]=t:t<2048?(r[n++]=192|t>>6,r[n++]=128|63&t):t<55296||t>=57344?(r[n++]=224|t>>12,r[n++]=128|t>>6&63,r[n++]=128|63&t):(o++,t=65536+((1023&t)<<10|1023&e.charCodeAt(o)),r[n++]=240|t>>18,r[n++]=128|t>>12&63,r[n++]=128|t>>6&63,r[n++]=128|63&t)}return r.subarray(0,n)}(e);let r="";const n=t.length;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return jr(r)}var Dr={weBtoa:Rr,weAtob:Or,b64decode:Pr,b64encode:Ir},$r=Object.freeze({__proto__:null,b64decode:Pr,b64encode:Ir,default:Dr,weAtob:Or,weBtoa:Rr});const Mr=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Lr=e=>Mr.test(e),Ur=/^(?:(?:\+|00)86)?1\d{10}$/,kr=e=>Ur.test(e),Br=/^(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]$/,zr=e=>{if(!Br.test(e))return!1;const t=Number(e.slice(6,10)),r=Number(e.slice(10,12)),n=Number(e.slice(12,14)),o=new Date(t,r-1,n);if(!(o.getFullYear()===t&&o.getMonth()+1===r&&o.getDate()===n))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)},Hr=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,Gr=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,qr=(e,t=!1)=>(t?Hr:Gr).test(e),Vr=/^(?:(?:\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])$/,Wr=/^(([\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,Xr=e=>Vr.test(e),Yr=e=>Wr.test(e),Kr=/^(-?[1-9]\d*|0)$/,Jr=e=>Kr.test(e),Zr=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Qr=e=>Zr.test(e),en=e=>Jr(e)||Qr(e),tn=/^\d+$/,rn=e=>tn.test(e);var nn={EMAIL_REGEX:Mr,HTTP_URL_REGEX:Gr,IPV4_REGEX:Vr,IPV6_REGEX:Wr,PHONE_REGEX:Ur,URL_REGEX:Hr,isDigit:rn,isEmail:Lr,isFloat:Qr,isIdNo:zr,isInteger:Jr,isIpV4:Xr,isIpV6:Yr,isNumerical:en,isPhone:kr,isUrl:qr},on=Object.freeze({__proto__:null,EMAIL_REGEX:Mr,HTTP_URL_REGEX:Gr,IPV4_REGEX:Vr,IPV6_REGEX:Wr,PHONE_REGEX:Ur,URL_REGEX:Hr,default:nn,isDigit:rn,isEmail:Lr,isFloat:Qr,isIdNo:zr,isInteger:Jr,isIpV4:Xr,isIpV6:Yr,isNumerical:en,isPhone:kr,isUrl:qr});function sn(e){return[...new Set(e.trim().split(""))].join("")}function an(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ln(e,t){return new RegExp(`${an(e.trim())}\\s*([^${an(sn(e))}${an(sn(t))}\\s]*)\\s*${t.trim()}`,"g")}function cn(e,t="{",r="}"){return Array.from(e.matchAll(ln(t,r))).map((e=>E(e)?void 0:e[1]))}function un(e,t,r="{",n="}"){return e.replace(new RegExp(ln(r,n)),(function(e,r){return u(t,r)?t[r]:e}))}function dn(e,t={}){const r=Object.keys(t),n=r.map((e=>t[e]));try{return new Function(...r,`return (() => { ${e} })()`)(...n)}catch(e){throw new Error(`代码执行失败: ${e.message}`)}}var fn={escapeRegExp:an,executeInScope:dn,parseVarFromString:cn,replaceVarFromString:un,uniqueSymbol:sn},pn=Object.freeze({__proto__:null,default:fn,escapeRegExp:an,executeInScope:dn,parseVarFromString:cn,replaceVarFromString:un,uniqueSymbol:sn});function hn(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 r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(e)),t.set(e,r),r}if(ArrayBuffer.isView(e)){return new(0,e.constructor)(hn(e.buffer,t),e.byteOffset,e.length)}if(e instanceof Date){const r=new Date(e.getTime());return t.set(e,r),r}if(e instanceof RegExp){const r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,t.set(e,r),r}if(e instanceof Map){const r=new Map;return t.set(e,r),e.forEach(((e,n)=>{r.set(hn(n,t),hn(e,t))})),r}if(e instanceof Set){const r=new Set;return t.set(e,r),e.forEach((e=>{r.add(hn(e,t))})),r}if(Array.isArray(e)){const r=new Array(e.length);t.set(e,r);for(let n=0,o=e.length;n<o;n++)n in e&&(r[n]=hn(e[n],t));const n=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(n))Object.defineProperty(r,e,{...n[e],value:hn(n[e].value,t)});return r}const r=Object.create(Object.getPrototypeOf(e));t.set(e,r);const n=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(n)){const o=n[e];"value"in o?o.value=hn(o.value,t):(o.get&&(o.get=hn(o.get,t)),o.set&&(o.set=hn(o.set,t))),Object.defineProperty(r,e,o)}return r}var gn={cloneDeep:hn},mn=Object.freeze({__proto__:null,cloneDeep:hn,default:gn});const yn={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:bn,hasOwnProperty:An}=Object.prototype,Sn=e=>bn.call(e);function wn(e,t){return En(e,t)}function En(e,t,r=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(r||(r=new WeakMap),r.has(e))return r.get(e)===t;r.set(e,t);const n=Sn(e);if(n!==Sn(t))return!1;let o=!1;switch(n){case yn.DATE:o=+e==+t;break;case yn.REGEXP:o=""+e==""+t;break;case yn.SYMBOL:o=Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t);break;case yn.ARRAY_BUFFER:o=_n(e,t);break;case yn.DATA_VIEW:s=t,o=(i=e).byteLength===s.byteLength&&i.byteOffset===s.byteOffset&&_n(i.buffer,s.buffer);break;case yn.MAP:o=function(e,t,r){if(e.size!==t.size)return!1;for(const[n,o]of e){const e=t.get(n);if(void 0===e&&!t.has(n))return!1;if(!En(o,e,r))return!1}return!0}(e,t,r);break;case yn.SET:o=function(e,t,r){if(e.size!==t.size)return!1;for(const n of e){if(t.has(n))continue;let e=!1;for(const o of t)if(En(n,o,r)){e=!0;break}if(!e)return!1}return!0}(e,t,r);break;case yn.ARGUMENTS:default:o=Array.isArray(e)||ArrayBuffer.isView(e)?function(e,t,r){const n=e.length;if(n!==t.length)return!1;let o=n;for(;o--;)if(!En(e[o],t[o],r))return!1;return!0}(e,t,r):function(e,t,r){const n=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(n.length!==o.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!An.call(t,i)||!En(e[i],t[i],r))return!1}return!0}(e,t,r)}var i,s;return o}function _n(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),n=new Uint8Array(t);let o=e.byteLength;for(;o--;)if(r[o]!==n[o])return!1;return!0}var xn={isEqual:wn},vn=Object.freeze({__proto__:null,default:xn,isEqual:wn});class Cn{static encode(e,t="unicode",r=!1){const n=[];for(const o of e){const e=o.codePointAt(0);"html"===t&&this.ENTITY_MAP[o]?n.push(this.ENTITY_MAP[o]):!r&&e>=32&&e<=126?n.push(o):"unicode"===t?e>65535?n.push(`\\u{${e.toString(16).toUpperCase()}}`):n.push(`\\u${e.toString(16).toUpperCase().padStart(4,"0")}`):n.push(`&#${e};`)}return n.join("")}static decode(e,t=!1){if(!e)return"";let r=e.replace(/\\u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))/g,((e,t,r)=>String.fromCodePoint(parseInt(t||r,16)))).replace(/&#(x?)([0-9a-fA-F]+);/g,((e,t,r)=>String.fromCodePoint(parseInt(r,t?16:10)))).replace(/&[a-z0-9]+;/gi,(e=>this.NAMED_ENTITIES[e]||e));return t&&(r=r.replace(/\u00A0/g," ")),r}}Cn.ENTITY_MAP={"&":"&","<":"<",">":">",'"':""","'":"'"},Cn.NAMED_ENTITIES={""":'"',"&":"&","<":"<",">":">"," ":" ","©":"©","™":"™","®":"®"};var Fn={UnicodeToolkit:Cn},Tn={...a,...Ne,...De,...qe,...Ce,...pt,...te,...Ye,...et,...ge,...z,...st,...bt,...xt,...Ft,...It,...kt,...Kt,...nr,...ar,...Ar,...Cr,...$r,...on,...pn,...mn,...vn,...Object.freeze({__proto__:null,UnicodeToolkit:Cn,default:Fn})};e.EMAIL_REGEX=Mr,e.HEX_POOL=Bt,e.HTTP_URL_REGEX=Gr,e.IPV4_REGEX=Vr,e.IPV6_REGEX=Wr,e.PHONE_REGEX=Ur,e.STRING_ARABIC_NUMERALS=oe,e.STRING_LOWERCASE_ALPHA=ie,e.STRING_POOL=$t,e.STRING_UPPERCASE_ALPHA=se,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=Hr,e.UnicodeToolkit=Cn,e.add=wr,e.addClass=be,e.adjustDate=He,e.arrayEach=t,e.arrayEachAsync=r,e.arrayInsertBefore=n,e.arrayLike=d,e.arrayRemove=o,e.asyncMap=gt,e.b64decode=Pr,e.b64encode=Ir,e.chooseLocalFile=St,e.cloneDeep=hn,e.compressImg=Et,e.cookieDel=Pe,e.cookieGet=Re,e.cookieSet=Oe,e.copyText=Fe,e.crossOriginDownload=ut,e.dateParse=Ue,e.dateToEnd=Be,e.dateToStart=ke,e.debounce=Tt,e.default=Tn,e.diffArray=i,e.divide=_r,e.downloadBlob=ct,e.downloadData=dt,e.downloadHref=lt,e.downloadURL=at,e.escapeRegExp=an,e.executeInScope=dn,e.fallbackCopyText=Te,e.filterDeep=fr,e.findDeep=dr,e.flatTree=mr,e.forEachDeep=ur,e.formatDate=ze,e.formatMoney=Xt,e.formatNumber=Xt,e.formatTree=gr,e.fuzzySearchTree=yr,e.genCanvasWM=vt,e.getComputedCssVal=Ee,e.getGlobal=Ot,e.getStrWidthPx=_e,e.getStyle=we,e.hasClass=me,e.humanFileSize=Wt,e.is=p,e.isArguments=$,e.isArray=x,e.isArrayBuffer=D,e.isAsyncFunction=M,e.isBigInt=y,e.isBoolean=g,e.isDataView=I,e.isDate=F,e.isDigit=rn,e.isEmail=Lr,e.isEmpty=U,e.isEqual=wn,e.isError=T,e.isFloat=Qr,e.isFunction=v,e.isIdNo=zr,e.isInteger=Jr,e.isIpV4=Xr,e.isIpV6=Yr,e.isJsonString=L,e.isMap=R,e.isNaN=C,e.isNodeList=k,e.isNull=S,e.isNullOrUnDef=E,e.isNullish=E,e.isNumber=b,e.isNumerical=en,e.isObject=_,e.isPhone=kr,e.isPlainObject=G,e.isPrimitive=w,e.isPromise=N,e.isRegExp=j,e.isSet=O,e.isString=h,e.isSymbol=m,e.isTypedArray=P,e.isUndefined=A,e.isUrl=qr,e.isValidDate=$e,e.mapDeep=pr,e.multiply=Sr,e.numberAbbr=Vt,e.numberToHex=qt,e.objectAssign=J,e.objectEach=q,e.objectEachAsync=V,e.objectFill=Z,e.objectGet=Q,e.objectHas=u,e.objectMap=W,e.objectMerge=J,e.objectOmit=Y,e.objectPick=X,e.once=Nt,e.parseQueryParams=pe,e.parseVarFromString=cn,e.pathJoin=We,e.pathNormalize=Ve,e.qsParse=Ke,e.qsStringify=Ze,e.randomNumber=Dt,e.randomString=Mt,e.randomUuid=Lt,e.removeClass=Ae,e.replaceVarFromString=un,e.safeAwait=mt,e.searchTreeById=hr,e.select=xe,e.setGlobal=Rt,e.setStyle=Se,e.stringAssign=ue,e.stringCamelCase=re,e.stringEscapeHtml=de,e.stringFill=fe,e.stringFormat=le,e.stringKebabCase=ne,e.strip=xr,e.subtract=Er,e.supportCanvas=At,e.throttle=jt,e.tooltipEvent=ir,e.typeIs=f,e.uniqueNumber=Qt,e.uniqueString=tr,e.uniqueSymbol=sn,e.urlDelParams=ot,e.urlParse=tt,e.urlSetParams=nt,e.urlStringify=rt,e.wait=ht,e.weAtob=Or,e.weBtoa=Rr,Object.defineProperty(e,"__esModule",{value:!0})}));
|