@pawover/kit 0.1.1 → 0.2.0

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.
@@ -11,41 +11,55 @@ function useLatest(value) {
11
11
  return ref;
12
12
  }
13
13
  //#endregion
14
- //#region ../utils/dist/string-p6hZ1Mjb.js
15
- function _typeof(o) {
16
- "@babel/helpers - typeof";
17
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
18
- return typeof o;
19
- } : function(o) {
20
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
21
- }, _typeof(o);
22
- }
23
- function toPrimitive(t, r) {
24
- if ("object" != _typeof(t) || !t) return t;
25
- var e = t[Symbol.toPrimitive];
26
- if (void 0 !== e) {
27
- var i = e.call(t, r || "default");
28
- if ("object" != _typeof(i)) return i;
29
- throw new TypeError("@@toPrimitive must return a primitive value.");
30
- }
31
- return ("string" === r ? String : Number)(t);
32
- }
33
- function toPropertyKey(t) {
34
- var i = toPrimitive(t, "string");
35
- return "symbol" == _typeof(i) ? i : i + "";
36
- }
37
- function _defineProperty(e, r, t) {
38
- return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
39
- value: t,
40
- enumerable: !0,
41
- configurable: !0,
42
- writable: !0
43
- }) : e[r] = t, e;
44
- }
14
+ //#region ../utils/dist/stringUtil-CaY_wCS-.js
45
15
  /**
46
16
  * 类型工具类
47
17
  */
48
18
  var TypeUtil = class {
19
+ static PROTOTYPE_TAGS = {
20
+ STRING: "[object String]",
21
+ NUMBER: "[object Number]",
22
+ BOOLEAN: "[object Boolean]",
23
+ BIGINT: "[object BigInt]",
24
+ SYMBOL: "[object Symbol]",
25
+ UNDEFINED: "[object Undefined]",
26
+ NULL: "[object Null]",
27
+ OBJECT: "[object Object]",
28
+ FUNCTION: "[object Function]",
29
+ GENERATOR_FUNCTION: "[object GeneratorFunction]",
30
+ ASYNC_FUNCTION: "[object AsyncFunction]",
31
+ ASYNC_GENERATOR_FUNCTION: "[object AsyncGeneratorFunction]",
32
+ PROMISE: "[object Promise]",
33
+ MAP: "[object Map]",
34
+ SET: "[object Set]",
35
+ WEAK_MAP: "[object WeakMap]",
36
+ WEAK_SET: "[object WeakSet]",
37
+ BLOB: "[object Blob]",
38
+ FILE: "[object File]",
39
+ READABLE_STREAM: "[object ReadableStream]",
40
+ GLOBAL: "[object global]",
41
+ WINDOW: "[object Window]",
42
+ IFRAME: "[object HTMLIFrameElement]",
43
+ DATE: "[object Date]",
44
+ ERROR: "[object Error]",
45
+ REG_EXP: "[object RegExp]",
46
+ WEB_SOCKET: "[object WebSocket]",
47
+ URL_SEARCH_PARAMS: "[object URLSearchParams]",
48
+ ABORT_SIGNAL: "[object AbortSignal]"
49
+ };
50
+ static TYPED_ARRAY_TAGS = /* @__PURE__ */ new Set([
51
+ "[object Int8Array]",
52
+ "[object Uint8Array]",
53
+ "[object Uint8ClampedArray]",
54
+ "[object Int16Array]",
55
+ "[object Uint16Array]",
56
+ "[object Int32Array]",
57
+ "[object Uint32Array]",
58
+ "[object Float32Array]",
59
+ "[object Float64Array]",
60
+ "[object BigInt64Array]",
61
+ "[object BigUint64Array]"
62
+ ]);
49
63
  /**
50
64
  * 获取值的 [[Prototype]] 标签
51
65
  *
@@ -329,7 +343,7 @@ var TypeUtil = class {
329
343
  * ```
330
344
  */
331
345
  static isPromiseLike(value) {
332
- return this.isPromise(value) || this.isObject(value, false) && this.isFunction(value["then"]);
346
+ return this.isPromise(value) || this.isPlainObject(value, false) && this.isFunction(value["then"]);
333
347
  }
334
348
  /**
335
349
  * 判断是否为普通对象类型
@@ -337,18 +351,19 @@ var TypeUtil = class {
337
351
  *
338
352
  * @param value 待检查值
339
353
  * @param prototypeCheck 是否进行原型检查,默认 `true`
340
- * @returns 是否为 Plain Object (当 checkPrototype=true) 或 object
354
+ * @returns 是否为 Plain Object (当 prototypeCheck=true) 或 object
341
355
  * @example
342
356
  * ```ts
343
- * TypeUtil.isObject({}); // true
344
- * TypeUtil.isObject([]); // false
345
- * TypeUtil.isObject(new Date()); // false
346
- * TypeUtil.isObject(new Date(), false); // true
347
- * TypeUtil.isObject(Object.create(null)) // false
348
- * TypeUtil.isObject(Object.create(null), false) // true
357
+ * TypeUtil.isPlainObject({}); // true
358
+ * TypeUtil.isPlainObject([]); // false
359
+ * TypeUtil.isPlainObject(new Date()); // false
360
+ * TypeUtil.isPlainObject(new (class {})()); // false
361
+ * TypeUtil.isPlainObject(new (class {})(), false); // true
362
+ * TypeUtil.isPlainObject(Object.create(null)) // false
363
+ * TypeUtil.isPlainObject(Object.create(null), false) // true
349
364
  * ```
350
365
  */
351
- static isObject(value, prototypeCheck = true) {
366
+ static isPlainObject(value, prototypeCheck = true) {
352
367
  const check = this.getPrototypeString(value) === this.PROTOTYPE_TAGS.OBJECT;
353
368
  return prototypeCheck ? check && Object.getPrototypeOf(value) === Object.prototype : check;
354
369
  }
@@ -532,7 +547,7 @@ var TypeUtil = class {
532
547
  */
533
548
  static isReadableStream(value) {
534
549
  if (this.getPrototypeString(value) === this.PROTOTYPE_TAGS.READABLE_STREAM) return true;
535
- return this.isObject(value) && this.isFunction(value["getReader"]) && this.isFunction(value["pipeThrough"]);
550
+ return this.isPlainObject(value) && this.isFunction(value["getReader"]) && this.isFunction(value["pipeThrough"]);
536
551
  }
537
552
  /**
538
553
  * 检查 value 是否为 Window
@@ -696,50 +711,6 @@ var TypeUtil = class {
696
711
  return typeof value === "string" && (value === "null" || value === "undefined" || value === "NaN" || value === "false" || value === "0" || value === "-0" || value === "0n");
697
712
  }
698
713
  };
699
- _defineProperty(TypeUtil, "PROTOTYPE_TAGS", {
700
- STRING: "[object String]",
701
- NUMBER: "[object Number]",
702
- BOOLEAN: "[object Boolean]",
703
- BIGINT: "[object BigInt]",
704
- SYMBOL: "[object Symbol]",
705
- UNDEFINED: "[object Undefined]",
706
- NULL: "[object Null]",
707
- OBJECT: "[object Object]",
708
- FUNCTION: "[object Function]",
709
- GENERATOR_FUNCTION: "[object GeneratorFunction]",
710
- ASYNC_FUNCTION: "[object AsyncFunction]",
711
- ASYNC_GENERATOR_FUNCTION: "[object AsyncGeneratorFunction]",
712
- PROMISE: "[object Promise]",
713
- MAP: "[object Map]",
714
- SET: "[object Set]",
715
- WEAK_MAP: "[object WeakMap]",
716
- WEAK_SET: "[object WeakSet]",
717
- BLOB: "[object Blob]",
718
- FILE: "[object File]",
719
- READABLE_STREAM: "[object ReadableStream]",
720
- GLOBAL: "[object global]",
721
- WINDOW: "[object Window]",
722
- IFRAME: "[object HTMLIFrameElement]",
723
- DATE: "[object Date]",
724
- ERROR: "[object Error]",
725
- REG_EXP: "[object RegExp]",
726
- WEB_SOCKET: "[object WebSocket]",
727
- URL_SEARCH_PARAMS: "[object URLSearchParams]",
728
- ABORT_SIGNAL: "[object AbortSignal]"
729
- });
730
- _defineProperty(TypeUtil, "TYPED_ARRAY_TAGS", new Set([
731
- "[object Int8Array]",
732
- "[object Uint8Array]",
733
- "[object Uint8ClampedArray]",
734
- "[object Int16Array]",
735
- "[object Uint16Array]",
736
- "[object Int32Array]",
737
- "[object Uint32Array]",
738
- "[object Float32Array]",
739
- "[object Float64Array]",
740
- "[object BigInt64Array]",
741
- "[object BigUint64Array]"
742
- ]));
743
714
  /**
744
715
  * 字符串工具类
745
716
  */
@@ -851,8 +822,8 @@ var StringUtil = class {
851
822
  let normalized = input.replace(/^[A-Za-z]:([\\/])?/, (_, separator) => {
852
823
  return separator ? "/" : "";
853
824
  });
854
- normalized = normalized.replace(/\\/g, "/");
855
- normalized = normalized.replace(/\/+/g, "/");
825
+ normalized = normalized.replaceAll("\\", "/");
826
+ normalized = normalized.replaceAll(/\/+/g, "/");
856
827
  if (removeLeadingSlash && normalized.startsWith("/")) normalized = normalized.substring(1);
857
828
  return normalized;
858
829
  }
@@ -1060,7 +1031,7 @@ var ArrayUtil = class {
1060
1031
  static merge(initialList, mergeList, match) {
1061
1032
  if (!TypeUtil.isArray(initialList)) return [];
1062
1033
  if (!TypeUtil.isArray(mergeList)) return [...initialList];
1063
- if (!TypeUtil.isFunction(match)) return Array.from(new Set([...initialList, ...mergeList]));
1034
+ if (!TypeUtil.isFunction(match)) return Array.from(/* @__PURE__ */ new Set([...initialList, ...mergeList]));
1064
1035
  const keys = /* @__PURE__ */ new Map();
1065
1036
  mergeList.forEach((item, index) => {
1066
1037
  keys.set(match(item, index), item);
@@ -1196,11 +1167,145 @@ var ArrayUtil = class {
1196
1167
  }, result);
1197
1168
  }
1198
1169
  };
1199
- var _DateTimeUtil;
1200
- /**
1201
- * 日期工具类
1202
- */
1203
- var DateTimeUtil = class {
1170
+ (class {
1171
+ /**
1172
+ * 每秒的毫秒数
1173
+ * @example
1174
+ * ```ts
1175
+ * DateTimeUtil.MILLISECONDS_PER_SECOND; // 1000
1176
+ * ```
1177
+ */
1178
+ static MILLISECONDS_PER_SECOND = 1e3;
1179
+ /**
1180
+ * 每分钟的秒数
1181
+ * @example
1182
+ * ```ts
1183
+ * DateTimeUtil.SECOND_PER_MINUTE; // 60
1184
+ * ```
1185
+ */
1186
+ static SECOND_PER_MINUTE = 60;
1187
+ /**
1188
+ * 每小时的分钟数
1189
+ * @example
1190
+ * ```ts
1191
+ * DateTimeUtil.MINUTE_PER_HOUR; // 60
1192
+ * ```
1193
+ */
1194
+ static MINUTE_PER_HOUR = 60;
1195
+ /**
1196
+ * 每小时的秒数
1197
+ * @example
1198
+ * ```ts
1199
+ * DateTimeUtil.SECOND_PER_HOUR; // 3600
1200
+ * ```
1201
+ */
1202
+ static SECOND_PER_HOUR = this.SECOND_PER_MINUTE ** 2;
1203
+ /**
1204
+ * 每天小时数
1205
+ * @example
1206
+ * ```ts
1207
+ * DateTimeUtil.HOUR_PER_DAY; // 24
1208
+ * ```
1209
+ */
1210
+ static HOUR_PER_DAY = 24;
1211
+ /**
1212
+ * 每天秒数
1213
+ * @example
1214
+ * ```ts
1215
+ * DateTimeUtil.SECOND_PER_DAY; // 86400
1216
+ * ```
1217
+ */
1218
+ static SECOND_PER_DAY = this.SECOND_PER_HOUR * this.HOUR_PER_DAY;
1219
+ /**
1220
+ * 每周天数
1221
+ * @example
1222
+ * ```ts
1223
+ * DateTimeUtil.DAY_PER_WEEK; // 7
1224
+ * ```
1225
+ */
1226
+ static DAY_PER_WEEK = 7;
1227
+ /**
1228
+ * 每月天数
1229
+ * @example
1230
+ * ```ts
1231
+ * DateTimeUtil.DAY_PER_MONTH; // 30
1232
+ * ```
1233
+ */
1234
+ static DAY_PER_MONTH = 30;
1235
+ /**
1236
+ * 每年天数
1237
+ * @example
1238
+ * ```ts
1239
+ * DateTimeUtil.DAY_PER_YEAR; // 365
1240
+ * ```
1241
+ */
1242
+ static DAY_PER_YEAR = 365;
1243
+ /**
1244
+ * 每年月数
1245
+ * @example
1246
+ * ```ts
1247
+ * DateTimeUtil.MONTH_PER_YEAR; // 12
1248
+ * ```
1249
+ */
1250
+ static MONTH_PER_YEAR = 12;
1251
+ /**
1252
+ * 每年平均周
1253
+ * @example
1254
+ * ```ts
1255
+ * DateTimeUtil.WEEK_PER_YEAR; // 52
1256
+ * ```
1257
+ */
1258
+ static WEEK_PER_YEAR = 52;
1259
+ /**
1260
+ * 每月平均周
1261
+ * @example
1262
+ * ```ts
1263
+ * DateTimeUtil.WEEK_PER_MONTH; // 4
1264
+ * ```
1265
+ */
1266
+ static WEEK_PER_MONTH = 4;
1267
+ /**
1268
+ * 常用时间格式模板集合
1269
+ *
1270
+ * @example
1271
+ * ```ts
1272
+ * DateTimeUtil.FORMAT.ISO_DATE; // "yyyy-MM-dd"
1273
+ * DateTimeUtil.FORMAT.CN_DATE_TIME; // "yyyy年MM月dd日 HH时mm分ss秒"
1274
+ * ```
1275
+ */
1276
+ static FORMAT = {
1277
+ ISO_DATE: "yyyy-MM-dd",
1278
+ ISO_TIME: "HH:mm:ss",
1279
+ ISO_DATE_TIME: "yyyy-MM-dd HH:mm:ss",
1280
+ ISO_DATE_TIME_MS: "yyyy-MM-dd HH:mm:ss.SSS",
1281
+ ISO_DATETIME_TZ: "yyyy-MM-dd'T'HH:mm:ssXXX",
1282
+ ISO_DATETIME_TZ_MS: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
1283
+ US_DATE: "MM/dd/yyyy",
1284
+ US_DATE_TIME: "MM/dd/yyyy HH:mm:ss",
1285
+ US_DATE_SHORT_YEAR: "MM/dd/yy",
1286
+ EU_DATE: "dd/MM/yyyy",
1287
+ EU_DATE_TIME: "dd/MM/yyyy HH:mm:ss",
1288
+ CN_DATE: "yyyy年MM月dd日",
1289
+ CN_DATE_TIME: "yyyy年MM月dd日 HH时mm分ss秒",
1290
+ CN_DATE_WEEKDAY: "yyyy年MM月dd日 EEE",
1291
+ CN_WEEKDAY_FULL: "EEEE",
1292
+ SHORT_DATE: "yy-MM-dd",
1293
+ SHORT_DATE_SLASH: "yy/MM/dd",
1294
+ MONTH_DAY: "MM-dd",
1295
+ MONTH_DAY_CN: "MM月dd日",
1296
+ DATE_WITH_WEEKDAY_SHORT: "yyyy-MM-dd (EEE)",
1297
+ DATE_WITH_WEEKDAY_FULL: "yyyy-MM-dd (EEEE)",
1298
+ TIME_24: "HH:mm:ss",
1299
+ TIME_24_NO_SEC: "HH:mm",
1300
+ TIME_12: "hh:mm:ss a",
1301
+ TIME_12_NO_SEC: "hh:mm a",
1302
+ TIMESTAMP: "yyyyMMddHHmmss",
1303
+ TIMESTAMP_MS: "yyyyMMddHHmmssSSS",
1304
+ RFC2822: "EEE, dd MMM yyyy HH:mm:ss xxx",
1305
+ READABLE_DATE: "MMM dd, yyyy",
1306
+ READABLE_DATE_TIME: "MMM dd, yyyy HH:mm",
1307
+ COMPACT_DATETIME: "yyyyMMdd_HHmmss"
1308
+ };
1204
1309
  /**
1205
1310
  * 获取当前时区信息
1206
1311
  *
@@ -1217,57 +1322,14 @@ var DateTimeUtil = class {
1217
1322
  timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
1218
1323
  };
1219
1324
  }
1220
- };
1221
- _DateTimeUtil = DateTimeUtil;
1222
- _defineProperty(DateTimeUtil, "MILLISECONDS_PER_SECOND", 1e3);
1223
- _defineProperty(DateTimeUtil, "SECOND_PER_MINUTE", 60);
1224
- _defineProperty(DateTimeUtil, "MINUTE_PER_HOUR", 60);
1225
- _defineProperty(DateTimeUtil, "SECOND_PER_HOUR", _DateTimeUtil.SECOND_PER_MINUTE ** 2);
1226
- _defineProperty(DateTimeUtil, "HOUR_PER_DAY", 24);
1227
- _defineProperty(DateTimeUtil, "SECOND_PER_DAY", _DateTimeUtil.SECOND_PER_HOUR * _DateTimeUtil.HOUR_PER_DAY);
1228
- _defineProperty(DateTimeUtil, "DAY_PER_WEEK", 7);
1229
- _defineProperty(DateTimeUtil, "DAY_PER_MONTH", 30);
1230
- _defineProperty(DateTimeUtil, "DAY_PER_YEAR", 365);
1231
- _defineProperty(DateTimeUtil, "MONTH_PER_YEAR", 12);
1232
- _defineProperty(DateTimeUtil, "WEEK_PER_YEAR", 52);
1233
- _defineProperty(DateTimeUtil, "WEEK_PER_MONTH", 4);
1234
- _defineProperty(DateTimeUtil, "FORMAT", {
1235
- ISO_DATE: "yyyy-MM-dd",
1236
- ISO_TIME: "HH:mm:ss",
1237
- ISO_DATE_TIME: "yyyy-MM-dd HH:mm:ss",
1238
- ISO_DATE_TIME_MS: "yyyy-MM-dd HH:mm:ss.SSS",
1239
- ISO_DATETIME_TZ: "yyyy-MM-dd'T'HH:mm:ssXXX",
1240
- ISO_DATETIME_TZ_MS: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
1241
- US_DATE: "MM/dd/yyyy",
1242
- US_DATE_TIME: "MM/dd/yyyy HH:mm:ss",
1243
- US_DATE_SHORT_YEAR: "MM/dd/yy",
1244
- EU_DATE: "dd/MM/yyyy",
1245
- EU_DATE_TIME: "dd/MM/yyyy HH:mm:ss",
1246
- CN_DATE: "yyyy年MM月dd日",
1247
- CN_DATE_TIME: "yyyy年MM月dd日 HH时mm分ss秒",
1248
- CN_DATE_WEEKDAY: "yyyy年MM月dd日 EEE",
1249
- CN_WEEKDAY_FULL: "EEEE",
1250
- SHORT_DATE: "yy-MM-dd",
1251
- SHORT_DATE_SLASH: "yy/MM/dd",
1252
- MONTH_DAY: "MM-dd",
1253
- MONTH_DAY_CN: "MM月dd日",
1254
- DATE_WITH_WEEKDAY_SHORT: "yyyy-MM-dd (EEE)",
1255
- DATE_WITH_WEEKDAY_FULL: "yyyy-MM-dd (EEEE)",
1256
- TIME_24: "HH:mm:ss",
1257
- TIME_24_NO_SEC: "HH:mm",
1258
- TIME_12: "hh:mm:ss a",
1259
- TIME_12_NO_SEC: "hh:mm a",
1260
- TIMESTAMP: "yyyyMMddHHmmss",
1261
- TIMESTAMP_MS: "yyyyMMddHHmmssSSS",
1262
- RFC2822: "EEE, dd MMM yyyy HH:mm:ss xxx",
1263
- READABLE_DATE: "MMM dd, yyyy",
1264
- READABLE_DATE_TIME: "MMM dd, yyyy HH:mm",
1265
- COMPACT_DATETIME: "yyyyMMdd_HHmmss"
1266
1325
  });
1267
1326
  /**
1268
1327
  * 环境检查工具类
1269
1328
  */
1270
1329
  var EnvUtil = class {
1330
+ static _isBrowser = typeof window !== "undefined" && TypeUtil.isFunction(window?.document?.createElement);
1331
+ static _isWebWorker = typeof window === "undefined" && typeof self !== "undefined" && "importScripts" in self;
1332
+ static _isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
1271
1333
  /**
1272
1334
  * 检测是否处于浏览器环境
1273
1335
  *
@@ -1458,187 +1520,6 @@ var EnvUtil = class {
1458
1520
  }
1459
1521
  }
1460
1522
  };
1461
- _defineProperty(EnvUtil, "_isBrowser", typeof window !== "undefined" && TypeUtil.isFunction(window?.document?.createElement));
1462
- _defineProperty(EnvUtil, "_isWebWorker", typeof window === "undefined" && typeof self !== "undefined" && "importScripts" in self);
1463
- _defineProperty(EnvUtil, "_isReactNative", typeof navigator !== "undefined" && navigator.product === "ReactNative");
1464
- /**
1465
- * MIME 工具类
1466
- */
1467
- var MimeUtil = class {};
1468
- _defineProperty(MimeUtil, "MIME", {
1469
- /** 普通文本文件 */
1470
- TEXT: "text/plain",
1471
- /** 超文本标记语言文档 */
1472
- HTML: "text/html",
1473
- /** 层叠样式表文件 */
1474
- CSS: "text/css",
1475
- /** 逗号分隔值文件(表格数据) */
1476
- CSV: "text/csv",
1477
- /** 制表符分隔值文件 */
1478
- TSV: "text/tab-separated-values",
1479
- /** XML 文档 */
1480
- XML: "text/xml",
1481
- /** XHTML 文档(XML 严格格式的 HTML) */
1482
- XHTML: "application/xhtml+xml",
1483
- /** JavaScript 文件 */
1484
- JS: "text/javascript",
1485
- /** TypeScript 文件 */
1486
- TS: "text/typescript",
1487
- /** Python 文件 */
1488
- PY: "text/x-python",
1489
- /** Shell 脚本 (.sh) */
1490
- SH: "text/x-sh",
1491
- /** C 语言源文件 */
1492
- C: "text/x-c",
1493
- /** C++ 源文件 */
1494
- CPP: "text/x-c++",
1495
- /** C# 源文件 */
1496
- CSHARP: "text/x-csharp",
1497
- /** Java 源文件 */
1498
- JAVA: "text/x-java",
1499
- /** Go 源文件 */
1500
- GO: "text/x-go",
1501
- /** Rust 源文件 */
1502
- RUST: "text/x-rust",
1503
- /** PHP 文件 */
1504
- PHP: "text/x-php",
1505
- /** Ruby 文件 */
1506
- RUBY: "text/x-ruby",
1507
- /** Swift 源文件 */
1508
- SWIFT: "text/x-swift",
1509
- /** YAML 文档 */
1510
- YAML: "text/vnd.yaml",
1511
- /** TOML 文档 */
1512
- TOML: "text/x-toml",
1513
- /** SQL 脚本 */
1514
- SQL: "text/x-sql",
1515
- /** Markdown 格式文档 */
1516
- MARKDOWN: "text/markdown",
1517
- /** 富文本格式文档(.rtf) */
1518
- RTF: "application/rtf",
1519
- /** iCalendar 日历格式(.ics) */
1520
- CALENDAR: "text/calendar",
1521
- /** JPEG 图像(.jpg/.jpeg) */
1522
- JPEG: "image/jpeg",
1523
- /** PNG 图像(无损压缩,支持透明) */
1524
- PNG: "image/png",
1525
- /** GIF 图像(支持动画) */
1526
- GIF: "image/gif",
1527
- /** Windows 位图(.bmp) */
1528
- BMP: "image/bmp",
1529
- /** SVG 向量图形(.svg) */
1530
- SVG: "image/svg+xml",
1531
- /** APNG 动态图像(.apng) */
1532
- APNG: "image/apng",
1533
- /** AVIF 图像(高效压缩) */
1534
- AVIF: "image/avif",
1535
- /** 图标文件格式(.ico) */
1536
- ICO: "image/vnd.microsoft.icon",
1537
- /** WebP 图像(高效压缩) */
1538
- WEBP: "image/webp",
1539
- /** TIFF 图像(.tif/.tiff) */
1540
- TIFF: "image/tiff",
1541
- /** HEIC 图像(高效编码) */
1542
- HEIC: "image/heic",
1543
- /** Adobe Photoshop 文件(.psd) */
1544
- PSD: "image/vnd.adobe.photoshop",
1545
- /** MP3 音频(.mp3) */
1546
- MP3: "audio/mpeg",
1547
- /** AAC 音频(.aac) */
1548
- AAC: "audio/aac",
1549
- /** MIDI 音乐文件(.mid/.midi) */
1550
- MIDI: "audio/midi",
1551
- /** OGG 音频(.oga) */
1552
- OGG_AUDIO: "audio/ogg",
1553
- /** Opus 音频(.opus) */
1554
- OPUS: "audio/opus",
1555
- /** WAV 音频(.wav) */
1556
- WAV: "audio/wav",
1557
- /** RealAudio 音频(.ra/.ram) */
1558
- REAL_AUDIO: "audio/x-pn-realaudio",
1559
- /** MP4 视频(.mp4) */
1560
- MP4: "video/mp4",
1561
- /** MPEG 视频(.mpeg/.mpg) */
1562
- MPEG: "video/mpeg",
1563
- /** OGG 视频(.ogv) */
1564
- OGG_VIDEO: "video/ogg",
1565
- /** AVI 视频(.avi) */
1566
- AVI: "video/x-msvideo",
1567
- /** 3GPP 视频(.3gp) */
1568
- THREE_GPP: "video/3gpp",
1569
- /** 3GPP2 视频(.3g2) */
1570
- THREE_GPP2: "video/3gpp2",
1571
- /** WebM 视频(.webm) */
1572
- WEBM: "video/webm",
1573
- /** PDF 文档 */
1574
- PDF: "application/pdf",
1575
- /** Word 97-2003 文档(.doc) */
1576
- DOC: "application/msword",
1577
- /** Word 2007+ 文档(.docx) */
1578
- DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1579
- /** Excel 2007+ 工作簿(.xlsx) */
1580
- XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1581
- /** 启用宏的Excel工作簿(.xlsm) */
1582
- XLSM: "application/vnd.ms-excel.sheet.macroEnabled.12",
1583
- /** Excel模板文件(.xltx) */
1584
- XLTX: "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
1585
- /** PowerPoint 2007+ 演示文稿(.pptx) */
1586
- PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
1587
- /** PowerPoint 97-2003 演示文稿(.ppt) */
1588
- PPT: "application/vnd.ms-powerpoint",
1589
- /** OpenDocument 文本文档(.odt) */
1590
- ODT: "application/vnd.oasis.opendocument.text",
1591
- /** OpenDocument 表格文档(.ods) */
1592
- ODS: "application/vnd.oasis.opendocument.spreadsheet",
1593
- /** OpenDocument 演示文稿(.odp) */
1594
- ODP: "application/vnd.oasis.opendocument.presentation",
1595
- /** EPUB 电子书(.epub) */
1596
- EPUB: "application/epub+zip",
1597
- /** Kindle 电子书(.azw) */
1598
- AZW: "application/vnd.amazon.ebook",
1599
- /** ZIP 压缩文件(.zip) */
1600
- ZIP: "application/zip",
1601
- /** GZIP 压缩文件(.gz) */
1602
- GZIP: "application/gzip",
1603
- /** GZIP 压缩文件(旧格式) */
1604
- X_GZIP: "application/x-gzip",
1605
- /** TAR 归档文件(.tar) */
1606
- TAR: "application/x-tar",
1607
- /** BZip 归档(.bz) */
1608
- BZIP: "application/x-bzip",
1609
- /** BZip2 归档(.bz2) */
1610
- BZIP2: "application/x-bzip2",
1611
- /** 7-Zip 压缩文件(.7z) */
1612
- SEVEN_Z: "application/x-7z-compressed",
1613
- /** RAR 压缩文件(.rar) */
1614
- RAR: "application/vnd.rar",
1615
- /** 通用二进制数据(默认类型) */
1616
- OCTET_STREAM: "application/octet-stream",
1617
- /** JSON 数据格式(.json) */
1618
- JSON: "application/json",
1619
- /** JSON-LD 格式(.jsonld) */
1620
- LD_JSON: "application/ld+json",
1621
- /** Java 归档文件(.jar) */
1622
- JAR: "application/java-archive",
1623
- /** WebAssembly 二进制指令格式(.wasm) */
1624
- WASM: "application/wasm",
1625
- /** MS 嵌入式 OpenType 字体(.eot) */
1626
- EOT: "application/vnd.ms-fontobject",
1627
- /** OpenType 字体(.otf) */
1628
- OTF: "font/otf",
1629
- /** WOFF 字体(.woff) */
1630
- WOFF: "font/woff",
1631
- /** WOFF2 字体(.woff2) */
1632
- WOFF2: "font/woff2",
1633
- /** TrueType 字体(.ttf) */
1634
- TTF: "font/ttf",
1635
- /** Excel 97-2003 工作簿(.xls) */
1636
- XLS: "application/vnd.ms-excel",
1637
- /** Microsoft XPS 文档(.xps) */
1638
- XPS: "application/vnd.ms-xpsdocument",
1639
- /** Word 启用宏文档(.docm) */
1640
- DOCM: "application/vnd.ms-word.document.macroEnabled.12"
1641
- });
1642
1523
  /**
1643
1524
  * 对象工具类
1644
1525
  */
@@ -1670,7 +1551,7 @@ var ObjectUtil = class {
1670
1551
  */
1671
1552
  static entriesMap(plainObject, toEntry) {
1672
1553
  const defaultResult = {};
1673
- if (!TypeUtil.isObject(plainObject)) return defaultResult;
1554
+ if (!TypeUtil.isPlainObject(plainObject)) return defaultResult;
1674
1555
  return this.entries(plainObject).reduce((acc, [key, value]) => {
1675
1556
  const [newKey, newValue] = toEntry(key, value);
1676
1557
  acc[newKey] = newValue;
@@ -1679,7 +1560,7 @@ var ObjectUtil = class {
1679
1560
  }
1680
1561
  static pick(obj, keys) {
1681
1562
  const result = {};
1682
- if (!TypeUtil.isObject(obj)) return result;
1563
+ if (!TypeUtil.isPlainObject(obj)) return result;
1683
1564
  if (!TypeUtil.isArray(keys)) return obj;
1684
1565
  return keys.reduce((acc, key) => {
1685
1566
  if (key in obj) acc[key] = obj[key];
@@ -1688,7 +1569,7 @@ var ObjectUtil = class {
1688
1569
  }
1689
1570
  static omit(obj, keys) {
1690
1571
  const result = {};
1691
- if (!TypeUtil.isObject(obj)) return result;
1572
+ if (!TypeUtil.isPlainObject(obj)) return result;
1692
1573
  if (!TypeUtil.isArray(keys)) return obj;
1693
1574
  const keysToOmit = new Set(keys);
1694
1575
  return Object.keys(obj).reduce((acc, key) => {
@@ -1698,14 +1579,14 @@ var ObjectUtil = class {
1698
1579
  }
1699
1580
  static invert(obj) {
1700
1581
  const result = {};
1701
- if (!TypeUtil.isObject(obj)) return result;
1582
+ if (!TypeUtil.isPlainObject(obj)) return result;
1702
1583
  for (const [k, v] of this.entries(obj)) if (TypeUtil.isString(v) || TypeUtil.isNumber(v) || TypeUtil.isSymbol(v)) result[v] = k;
1703
1584
  return result;
1704
1585
  }
1705
1586
  static crush(obj) {
1706
1587
  if (!obj) return {};
1707
1588
  function crushReducer(crushed, value, path) {
1708
- if (TypeUtil.isObject(value) || TypeUtil.isArray(value)) for (const [prop, propValue] of Object.entries(value)) crushReducer(crushed, propValue, path ? `${path}.${prop}` : prop);
1589
+ if (TypeUtil.isPlainObject(value) || TypeUtil.isArray(value)) for (const [prop, propValue] of Object.entries(value)) crushReducer(crushed, propValue, path ? `${path}.${prop}` : prop);
1709
1590
  else crushed[path] = value;
1710
1591
  return crushed;
1711
1592
  }
@@ -1733,375 +1614,6 @@ var ObjectUtil = class {
1733
1614
  return entries;
1734
1615
  }
1735
1616
  };
1736
- /**
1737
- * 主题工具类
1738
- */
1739
- var ThemeUtil = class {};
1740
- _defineProperty(ThemeUtil, "THEME", {
1741
- LIGHT: "light",
1742
- DARK: "dark"
1743
- });
1744
- _defineProperty(ThemeUtil, "THEME_MODE", {
1745
- LIGHT: "light",
1746
- DARK: "dark",
1747
- SYSTEM: "system"
1748
- });
1749
- /**
1750
- * 验证工具类
1751
- */
1752
- var ValidateUtil = class {
1753
- /**
1754
- * 验证是否为手机号码
1755
- * @example
1756
- * ```ts
1757
- * ValidateUtil.isPhone("13800138000"); // true
1758
- * ```
1759
- */
1760
- static isPhone(input) {
1761
- return this._phone.test(input.toString());
1762
- }
1763
- /**
1764
- * 验证是否为固定电话
1765
- * @example
1766
- * ```ts
1767
- * ValidateUtil.isTelephone("010-12345678"); // true
1768
- * ```
1769
- */
1770
- static isTelephone(input) {
1771
- return this._telephone.test(input.toString());
1772
- }
1773
- /**
1774
- * 验证是否为移动设备识别码
1775
- * @example
1776
- * ```ts
1777
- * ValidateUtil.isIMEI("490154203237518"); // true
1778
- * ```
1779
- */
1780
- static isIMEI(input) {
1781
- return this._IMEI.test(input.toString());
1782
- }
1783
- /**
1784
- * 验证是否为电子邮箱
1785
- * @example
1786
- * ```ts
1787
- * ValidateUtil.isEmail("dev@example.com"); // true
1788
- * ```
1789
- */
1790
- static isEmail(input) {
1791
- return this._email.test(input.toString());
1792
- }
1793
- /**
1794
- * 验证是否为 http(s) 链接
1795
- * @example
1796
- * ```ts
1797
- * ValidateUtil.isHttpLink("https://example.com/path"); // true
1798
- * ```
1799
- */
1800
- static isHttpLink(input) {
1801
- return this._link.test(input.toString());
1802
- }
1803
- /**
1804
- * 验证是否为端口号链接
1805
- * @example
1806
- * ```ts
1807
- * ValidateUtil.isPortLink("http://example.com:8080"); // true
1808
- * ```
1809
- */
1810
- static isPortLink(input) {
1811
- return this._portLink.test(input.toString());
1812
- }
1813
- /**
1814
- * 验证是否为迅雷链接
1815
- * @example
1816
- * ```ts
1817
- * ValidateUtil.isThunderLink("thunder://QUFodHRwOi8vZXhhbXBsZS5jb20vZmlsZQ=="); // true
1818
- * ```
1819
- */
1820
- static isThunderLink(input) {
1821
- return this._thunderLink.test(input.toString());
1822
- }
1823
- /**
1824
- * 验证是否为统一社会信用代码
1825
- * @example
1826
- * ```ts
1827
- * ValidateUtil.isUSCC("91350100M000100Y43"); // true
1828
- * ```
1829
- */
1830
- static isUSCC(input) {
1831
- return this._uscc.test(input.toString());
1832
- }
1833
- /**
1834
- * 验证是否为统一社会信用代码 - 15位/18位/20位数字/字母
1835
- * @example
1836
- * ```ts
1837
- * ValidateUtil.isUSCCS("91350100M000100Y43"); // true
1838
- * ```
1839
- */
1840
- static isUSCCS(input) {
1841
- return this._usccs.test(input.toString());
1842
- }
1843
- /**
1844
- * 验证是否为 Windows 系统文件夹路径
1845
- * @example
1846
- * ```ts
1847
- * ValidateUtil.isDirPathWindows("C:\\Users\\pawover\\"); // true
1848
- * ```
1849
- */
1850
- static isDirPathWindows(input) {
1851
- return this._dirPathWindows.test(input.toString());
1852
- }
1853
- /**
1854
- * 验证是否为 Windows 系统文件路径
1855
- * @example
1856
- * ```ts
1857
- * ValidateUtil.isFilePathWindows("C:\\Users\\pawover\\a.txt"); // true
1858
- * ```
1859
- */
1860
- static isFilePathWindows(input) {
1861
- return this._filePathWindows.test(input.toString());
1862
- }
1863
- /**
1864
- * 验证是否为 Linux 系统文件夹路径
1865
- * @example
1866
- * ```ts
1867
- * ValidateUtil.isDirPathLinux("/usr/local/"); // true
1868
- * ```
1869
- */
1870
- static isDirPathLinux(input) {
1871
- return this._dirPathLinux.test(input.toString());
1872
- }
1873
- /**
1874
- * 验证是否为 Linux 系统文件路径
1875
- * @example
1876
- * ```ts
1877
- * ValidateUtil.isFilePathLinux("/usr/local/bin/node"); // true
1878
- * ```
1879
- */
1880
- static isFilePathLinux(input) {
1881
- return this._filePathLinux.test(input.toString());
1882
- }
1883
- /**
1884
- * 验证是否为新能源车牌号
1885
- * @example
1886
- * ```ts
1887
- * ValidateUtil.isEVCarNumber("粤AD12345"); // true
1888
- * ```
1889
- */
1890
- static isEVCarNumber(input) {
1891
- return this._EVCarNumber.test(input.toString());
1892
- }
1893
- /**
1894
- * 验证是否为燃油车车牌号
1895
- * @example
1896
- * ```ts
1897
- * ValidateUtil.isGVCarNumber("粤B12345"); // true
1898
- * ```
1899
- */
1900
- static isGVCarNumber(input) {
1901
- return this._GVCarNumber.test(input.toString());
1902
- }
1903
- /**
1904
- * 验证是否为中文姓名
1905
- * @example
1906
- * ```ts
1907
- * ValidateUtil.isChineseName("张三"); // true
1908
- * ```
1909
- */
1910
- static isChineseName(input) {
1911
- return this._chineseName.test(input.toString());
1912
- }
1913
- /**
1914
- * 验证是否为中国身份证号
1915
- * @example
1916
- * ```ts
1917
- * ValidateUtil.isChineseID("11010519491231002X"); // true
1918
- * ```
1919
- */
1920
- static isChineseID(input) {
1921
- return this._chineseId.test(input.toString());
1922
- }
1923
- /**
1924
- * 验证是否为中国省份
1925
- * @example
1926
- * ```ts
1927
- * ValidateUtil.isChineseProvince("浙江"); // true
1928
- * ```
1929
- */
1930
- static isChineseProvince(input) {
1931
- return this._chineseProvince.test(input.toString());
1932
- }
1933
- /**
1934
- * 验证是否为中华民族
1935
- * @example
1936
- * ```ts
1937
- * ValidateUtil.isChineseNation("汉族"); // true
1938
- * ```
1939
- */
1940
- static isChineseNation(input) {
1941
- return this._chineseNation.test(input.toString());
1942
- }
1943
- /**
1944
- * 验证是否只包含字母
1945
- * @example
1946
- * ```ts
1947
- * ValidateUtil.isLetter("abcDEF"); // true
1948
- * ```
1949
- */
1950
- static isLetter(input) {
1951
- return this._letter.test(input.toString());
1952
- }
1953
- /**
1954
- * 验证是否只包含小写字母
1955
- * @example
1956
- * ```ts
1957
- * ValidateUtil.isLetterLowercase("abc"); // true
1958
- * ```
1959
- */
1960
- static isLetterLowercase(input) {
1961
- return this._letterLowercase.test(input.toString());
1962
- }
1963
- /**
1964
- * 验证是否只包含大写字母
1965
- * @example
1966
- * ```ts
1967
- * ValidateUtil.isLetterUppercase("ABC"); // true
1968
- * ```
1969
- */
1970
- static isLetterUppercase(input) {
1971
- return this._letterUppercase.test(input.toString());
1972
- }
1973
- /**
1974
- * 验证是否不包含字母
1975
- * @example
1976
- * ```ts
1977
- * ValidateUtil.isLetterOmit("123_-"); // true
1978
- * ```
1979
- */
1980
- static isLetterOmit(input) {
1981
- return this._letterOmit.test(input.toString());
1982
- }
1983
- /**
1984
- * 验证是否为数字和字母组合
1985
- * @example
1986
- * ```ts
1987
- * ValidateUtil.isLetterAndNumber("A1B2"); // true
1988
- * ```
1989
- */
1990
- static isLetterAndNumber(input) {
1991
- return this._LetterAndNumber.test(input.toString());
1992
- }
1993
- /**
1994
- * 验证是否为有符号浮点数
1995
- * @example
1996
- * ```ts
1997
- * ValidateUtil.isSignedFloat("-12.34"); // true
1998
- * ```
1999
- */
2000
- static isSignedFloat(input) {
2001
- return this._signedFloat.test(input.toString());
2002
- }
2003
- /**
2004
- * 验证是否为无符号浮点数
2005
- * @example
2006
- * ```ts
2007
- * ValidateUtil.isUnsignedFloat("12.34"); // true
2008
- * ```
2009
- */
2010
- static isUnsignedFloat(input) {
2011
- return this._unsignedFloat.test(input.toString());
2012
- }
2013
- /**
2014
- * 验证是否为有符号整数
2015
- * @example
2016
- * ```ts
2017
- * ValidateUtil.isSignedInteger("-12"); // true
2018
- * ```
2019
- */
2020
- static isSignedInteger(input) {
2021
- return this._signedInteger.test(input.toString());
2022
- }
2023
- /**
2024
- * 验证是否为无符号整数
2025
- * @example
2026
- * ```ts
2027
- * ValidateUtil.isUnsignedInteger("12"); // true
2028
- * ```
2029
- */
2030
- static isUnsignedInteger(input) {
2031
- return this._unsignedInteger.test(input.toString());
2032
- }
2033
- /**
2034
- * 验证是否包含空格
2035
- * @example
2036
- * ```ts
2037
- * ValidateUtil.isSpaceInclude("a b"); // true
2038
- * ```
2039
- */
2040
- static isSpaceInclude(input) {
2041
- return this._spaceInclude.test(input.toString());
2042
- }
2043
- /**
2044
- * 验证是否以空格开头
2045
- * @example
2046
- * ```ts
2047
- * ValidateUtil.isSpaceStart(" abc"); // true
2048
- * ```
2049
- */
2050
- static isSpaceStart(input) {
2051
- return this._spaceStart.test(input.toString());
2052
- }
2053
- /**
2054
- * 验证是否以空格结尾
2055
- * @example
2056
- * ```ts
2057
- * ValidateUtil.isSpaceEnd("abc "); // true
2058
- * ```
2059
- */
2060
- static isSpaceEnd(input) {
2061
- return this._spaceEnd.test(input.toString());
2062
- }
2063
- /**
2064
- * 验证是否以空格开头或结尾
2065
- * @example
2066
- * ```ts
2067
- * ValidateUtil.isSpaceStartOrEnd(" abc"); // true
2068
- * ```
2069
- */
2070
- static isSpaceStartOrEnd(input) {
2071
- return this.isSpaceStart(input) || this.isSpaceEnd(input);
2072
- }
2073
- };
2074
- _defineProperty(ValidateUtil, "_phone", /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/);
2075
- _defineProperty(ValidateUtil, "_telephone", /^(((0\d{2,3})-)?((\d{7,8})|(400\d{7})|(800\d{7}))(-(\d{1,4}))?)$/);
2076
- _defineProperty(ValidateUtil, "_IMEI", /^\d{15,17}$/);
2077
- _defineProperty(ValidateUtil, "_email", /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-0-9]+\.)+[a-z]{2,}))$/i);
2078
- _defineProperty(ValidateUtil, "_link", /^(https?:\/\/)?(([\w-]+(\.[\w-]+)*\.[a-z]{2,6})|((\d{1,3}\.){3}\d{1,3}))(:\d+)?(\/\S*)?$/i);
2079
- _defineProperty(ValidateUtil, "_portLink", /^(https?:\/\/)?[\w-]+(\.[\w-]+)+:\d{1,5}\/?$/i);
2080
- _defineProperty(ValidateUtil, "_thunderLink", /^thunderx?:\/\/[a-zA-Z\d]+=$/i);
2081
- _defineProperty(ValidateUtil, "_uscc", /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/);
2082
- _defineProperty(ValidateUtil, "_usccs", /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/);
2083
- _defineProperty(ValidateUtil, "_dirPathWindows", /^[a-z]:\\(?:\w+\\?)*$/i);
2084
- _defineProperty(ValidateUtil, "_filePathWindows", /^[a-z]:\\(?:\w+\\)*\w+\.\w+$/i);
2085
- _defineProperty(ValidateUtil, "_dirPathLinux", /^\/(?:[^\\/\s]+\/)*$/);
2086
- _defineProperty(ValidateUtil, "_filePathLinux", /^(\/$|\/(?:[^\\/\s]+\/)*[^\\/\s]+$)/);
2087
- _defineProperty(ValidateUtil, "_EVCarNumber", /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](([DF]((?![IO])[a-zA-Z0-9](?![IO]))\d{4})|(\d{5}[DF]))$/);
2088
- _defineProperty(ValidateUtil, "_GVCarNumber", /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/);
2089
- _defineProperty(ValidateUtil, "_chineseName", /^[一-龢][一·-龢]*$/);
2090
- _defineProperty(ValidateUtil, "_chineseId", /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))([\dX])$/i);
2091
- _defineProperty(ValidateUtil, "_chineseProvince", /^安徽|澳门|北京|重庆|福建|甘肃|广东|广西|贵州|海南|河北|河南|黑龙江|湖北|湖南|吉林|江苏|江西|辽宁|内蒙古|宁夏|青海|山东|山西|陕西|上海|四川|台湾|天津|西藏|香港|新疆|云南|浙江$/);
2092
- _defineProperty(ValidateUtil, "_chineseNation", /^汉族|蒙古族|回族|藏族|维吾尔族|苗族|彝族|壮族|布依族|朝鲜族|满族|侗族|瑶族|白族|土家族|哈尼族|哈萨克族|傣族|黎族|傈僳族|佤族|畲族|高山族|拉祜族|水族|东乡族|纳西族|景颇族|柯尔克孜族|土族|达斡尔族|仫佬族|羌族|布朗族|撒拉族|毛南族|仡佬族|锡伯族|阿昌族|普米族|塔吉克族|怒族|乌孜别克族|俄罗斯族|鄂温克族|德昂族|保安族|裕固族|京族|塔塔尔族|独龙族|鄂伦春族|赫哲族|门巴族|珞巴族|基诺族|其它未识别民族|外国人入中国籍$/);
2093
- _defineProperty(ValidateUtil, "_letter", /^[a-z]+$/i);
2094
- _defineProperty(ValidateUtil, "_letterLowercase", /^[a-z]+$/);
2095
- _defineProperty(ValidateUtil, "_letterUppercase", /^[A-Z]+$/);
2096
- _defineProperty(ValidateUtil, "_letterOmit", /^[^A-Z]*$/i);
2097
- _defineProperty(ValidateUtil, "_LetterAndNumber", /^[A-Z0-9]+$/i);
2098
- _defineProperty(ValidateUtil, "_signedFloat", /^[+-]?(\d+(\.\d+)?|\.\d+)$/);
2099
- _defineProperty(ValidateUtil, "_unsignedFloat", /^\+?(\d+(\.\d+)?|\.\d+)$/);
2100
- _defineProperty(ValidateUtil, "_signedInteger", /^[+-]?\d+$/);
2101
- _defineProperty(ValidateUtil, "_unsignedInteger", /^\+?\d+$/);
2102
- _defineProperty(ValidateUtil, "_spaceInclude", /\s/);
2103
- _defineProperty(ValidateUtil, "_spaceStart", /^\s/);
2104
- _defineProperty(ValidateUtil, "_spaceEnd", /\s$/);
2105
1617
  //#endregion
2106
1618
  //#region src/react/useMount.ts
2107
1619
  /**
@@ -2137,37 +1649,13 @@ function useMount(effect) {
2137
1649
  }, [effectRef]);
2138
1650
  }
2139
1651
  //#endregion
2140
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/_internal/globalThis.mjs
2141
- const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
2142
- return this;
2143
- })() || Function("return this")();
2144
- //#endregion
2145
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/function/noop.mjs
2146
- /**
2147
- * A no-operation function that does nothing.
2148
- * This can be used as a placeholder or default function.
2149
- *
2150
- * @example
2151
- * noop(); // Does nothing
2152
- *
2153
- * @returns {void} This function does not return anything.
2154
- */
2155
- function noop() {}
2156
- //#endregion
2157
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
1652
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
2158
1653
  /**
2159
1654
  * Checks whether a value is a JavaScript primitive.
2160
1655
  * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
2161
1656
  *
2162
- * @param {unknown} value The value to check.
2163
- * @returns {value is
2164
- * null
2165
- * | undefined
2166
- * | string
2167
- * | number
2168
- * | boolean
2169
- * | symbol
2170
- * | bigint} Returns true if `value` is a primitive, false otherwise.
1657
+ * @param value The value to check.
1658
+ * @returns Returns true if `value` is a primitive, false otherwise.
2171
1659
  *
2172
1660
  * @example
2173
1661
  * isPrimitive(null); // true
@@ -2187,22 +1675,11 @@ function isPrimitive(value) {
2187
1675
  return value == null || typeof value !== "object" && typeof value !== "function";
2188
1676
  }
2189
1677
  //#endregion
2190
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
1678
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
2191
1679
  /**
2192
1680
  * Checks if a value is a TypedArray.
2193
- * @param {unknown} x The value to check.
2194
- * @returns {x is
2195
- * Uint8Array
2196
- * | Uint8ClampedArray
2197
- * | Uint16Array
2198
- * | Uint32Array
2199
- * | BigUint64Array
2200
- * | Int8Array
2201
- * | Int16Array
2202
- * | Int32Array
2203
- * | BigInt64Array
2204
- * | Float32Array
2205
- * | Float64Array} Returns true if `x` is a TypedArray, false otherwise.
1681
+ * @param x The value to check.
1682
+ * @returns Returns true if `x` is a TypedArray, false otherwise.
2206
1683
  *
2207
1684
  * @example
2208
1685
  * const arr = new Uint8Array([1, 2, 3]);
@@ -2218,16 +1695,16 @@ function isTypedArray(x) {
2218
1695
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
2219
1696
  }
2220
1697
  //#endregion
2221
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/object/clone.mjs
1698
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/object/clone.mjs
2222
1699
  /**
2223
1700
  * Creates a shallow clone of the given object.
2224
1701
  *
2225
1702
  * @template T - The type of the object.
2226
- * @param {T} obj - The object to clone.
2227
- * @returns {T} - A shallow clone of the given object.
1703
+ * @param obj - The object to clone.
1704
+ * @returns A shallow clone of the given object.
2228
1705
  *
2229
1706
  * @example
2230
- * // Clone a primitive values
1707
+ * // Clone a primitive value
2231
1708
  * const num = 29;
2232
1709
  * const clonedNum = clone(num);
2233
1710
  * console.log(clonedNum); // 29
@@ -2276,35 +1753,24 @@ function clone(obj) {
2276
1753
  return obj;
2277
1754
  }
2278
1755
  //#endregion
2279
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
1756
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/function/noop.mjs
2280
1757
  /**
2281
- * Checks if the given value is a Buffer instance.
2282
- *
2283
- * This function tests whether the provided value is an instance of Buffer.
2284
- * It returns `true` if the value is a Buffer, and `false` otherwise.
2285
- *
2286
- * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.
2287
- *
2288
- * @param {unknown} x - The value to check if it is a Buffer.
2289
- * @returns {boolean} Returns `true` if `x` is a Buffer, else `false`.
1758
+ * A no-operation function that does nothing.
1759
+ * This can be used as a placeholder or default function.
2290
1760
  *
2291
1761
  * @example
2292
- * const buffer = Buffer.from("test");
2293
- * console.log(isBuffer(buffer)); // true
1762
+ * noop(); // Does nothing
2294
1763
  *
2295
- * const notBuffer = "not a buffer";
2296
- * console.log(isBuffer(notBuffer)); // false
1764
+ * @returns This function does not return anything.
2297
1765
  */
2298
- function isBuffer(x) {
2299
- return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x);
2300
- }
1766
+ function noop() {}
2301
1767
  //#endregion
2302
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
1768
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
2303
1769
  function getSymbols(object) {
2304
1770
  return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
2305
1771
  }
2306
1772
  //#endregion
2307
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
1773
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
2308
1774
  /**
2309
1775
  * Gets the `toStringTag` of `value`.
2310
1776
  *
@@ -2317,7 +1783,7 @@ function getTag(value) {
2317
1783
  return Object.prototype.toString.call(value);
2318
1784
  }
2319
1785
  //#endregion
2320
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
1786
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
2321
1787
  const regexpTag = "[object RegExp]";
2322
1788
  const stringTag = "[object String]";
2323
1789
  const numberTag = "[object Number]";
@@ -2344,12 +1810,40 @@ const bigInt64ArrayTag = "[object BigInt64Array]";
2344
1810
  const float32ArrayTag = "[object Float32Array]";
2345
1811
  const float64ArrayTag = "[object Float64Array]";
2346
1812
  //#endregion
2347
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
1813
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/_internal/globalThis.mjs
1814
+ const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
1815
+ return this;
1816
+ })();
1817
+ //#endregion
1818
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
1819
+ /**
1820
+ * Checks if the given value is a Buffer instance.
1821
+ *
1822
+ * This function tests whether the provided value is an instance of Buffer.
1823
+ * It returns `true` if the value is a Buffer, and `false` otherwise.
1824
+ *
1825
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.
1826
+ *
1827
+ * @param x - The value to check if it is a Buffer.
1828
+ * @returns Returns `true` if `x` is a Buffer, else `false`.
1829
+ *
1830
+ * @example
1831
+ * const buffer = Buffer.from("test");
1832
+ * console.log(isBuffer(buffer)); // true
1833
+ *
1834
+ * const notBuffer = "not a buffer";
1835
+ * console.log(isBuffer(notBuffer)); // false
1836
+ */
1837
+ function isBuffer(x) {
1838
+ return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x);
1839
+ }
1840
+ //#endregion
1841
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
2348
1842
  /**
2349
1843
  * Checks if a given value is a plain object.
2350
1844
  *
2351
- * @param {object} value - The value to check.
2352
- * @returns {value is Record<PropertyKey, any>} - True if the value is a plain object, otherwise false.
1845
+ * @param value - The value to check.
1846
+ * @returns True if the value is a plain object, otherwise false.
2353
1847
  *
2354
1848
  * @example
2355
1849
  * ```typescript
@@ -2394,7 +1888,7 @@ function isPlainObject(value) {
2394
1888
  return Object.prototype.toString.call(value) === "[object Object]";
2395
1889
  }
2396
1890
  //#endregion
2397
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
1891
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
2398
1892
  /**
2399
1893
  * Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
2400
1894
  *
@@ -2412,7 +1906,7 @@ function isEqualsSameValueZero(value, other) {
2412
1906
  return value === other || Number.isNaN(value) && Number.isNaN(other);
2413
1907
  }
2414
1908
  //#endregion
2415
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
1909
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
2416
1910
  /**
2417
1911
  * Compares two values for equality using a custom comparison function.
2418
1912
  *
@@ -2431,12 +1925,12 @@ function isEqualsSameValueZero(value, other) {
2431
1925
  * - `yParent`: The parent of the second value `y`.
2432
1926
  * - `stack`: An internal stack (Map) to handle circular references.
2433
1927
  *
2434
- * @param {unknown} a - The first value to compare.
2435
- * @param {unknown} b - The second value to compare.
2436
- * @param {(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void} areValuesEqual - A function to customize the comparison.
1928
+ * @param a - The first value to compare.
1929
+ * @param b - The second value to compare.
1930
+ * @param areValuesEqual - A function to customize the comparison.
2437
1931
  * If it returns a boolean, that result will be used. If it returns undefined,
2438
1932
  * the default equality comparison will be used.
2439
- * @returns {boolean} `true` if the values are equal according to the customizer, otherwise `false`.
1933
+ * @returns `true` if the values are equal according to the customizer, otherwise `false`.
2440
1934
  *
2441
1935
  * @example
2442
1936
  * const customizer = (a, b) => {
@@ -2553,13 +2047,13 @@ function areObjectsEqual(a, b, stack, areValuesEqual) {
2553
2047
  }
2554
2048
  }
2555
2049
  //#endregion
2556
- //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
2050
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
2557
2051
  /**
2558
2052
  * Checks if two values are equal, including support for `Date`, `RegExp`, and deep object comparison.
2559
2053
  *
2560
- * @param {unknown} a - The first value to compare.
2561
- * @param {unknown} b - The second value to compare.
2562
- * @returns {boolean} `true` if the values are equal, otherwise `false`.
2054
+ * @param a - The first value to compare.
2055
+ * @param b - The second value to compare.
2056
+ * @returns `true` if the values are equal, otherwise `false`.
2563
2057
  *
2564
2058
  * @example
2565
2059
  * isEqual(1, 1); // true