@fangzhongya/utils 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/basic/index.cjs +12 -12
  2. package/dist/basic/index.js +11 -11
  3. package/dist/basic/object/index.cjs +11 -11
  4. package/dist/basic/object/index.js +13 -13
  5. package/dist/basic/string/index.cjs +7 -7
  6. package/dist/basic/string/index.js +10 -10
  7. package/dist/chunk-3NJLVCIH.js +16 -0
  8. package/dist/chunk-6TH2K7LE.cjs +30 -0
  9. package/dist/chunk-6ZPCYCOL.js +57 -0
  10. package/dist/chunk-FVQTU3A7.cjs +16 -0
  11. package/dist/{chunk-DUFESFXN.cjs → chunk-GT3LK2TS.cjs} +4 -4
  12. package/dist/{chunk-7ZEZ3JJ7.cjs → chunk-IFVVMDAW.cjs} +15 -6
  13. package/dist/chunk-KE77GEY2.js +24 -0
  14. package/dist/{chunk-VCU5XI2U.js → chunk-M7CA6X7T.js} +2 -2
  15. package/dist/chunk-QDQ6QSZM.cjs +57 -0
  16. package/dist/{chunk-LILSUNWL.js → chunk-SWFEVYEZ.js} +2 -2
  17. package/dist/chunk-VNY5UA2Q.js +30 -0
  18. package/dist/{chunk-TKIKGW45.cjs → chunk-XDTLZL44.cjs} +4 -4
  19. package/dist/css/getPrentClass.cjs +3 -3
  20. package/dist/css/getPrentClass.d.cts +1 -1
  21. package/dist/css/getPrentClass.d.ts +1 -1
  22. package/dist/css/getPrentClass.js +2 -2
  23. package/dist/css/getPrentCorres.cjs +2 -2
  24. package/dist/css/getPrentCorres.d.cts +1 -1
  25. package/dist/css/getPrentCorres.d.ts +1 -1
  26. package/dist/css/getPrentCorres.js +1 -1
  27. package/dist/css/index.cjs +4 -4
  28. package/dist/css/index.js +3 -3
  29. package/dist/date/format.cjs +7 -0
  30. package/dist/date/format.d.cts +3 -0
  31. package/dist/date/format.d.ts +3 -0
  32. package/dist/date/format.js +7 -0
  33. package/dist/date/index.cjs +8 -0
  34. package/dist/date/index.d.cts +1 -0
  35. package/dist/date/index.d.ts +1 -0
  36. package/dist/date/index.js +8 -0
  37. package/dist/html/index.cjs +5 -5
  38. package/dist/html/index.js +7 -7
  39. package/dist/index-C1rfQdS-.d.ts +8 -0
  40. package/dist/index-CsYVH5m1.d.cts +8 -0
  41. package/dist/index.cjs +47 -42
  42. package/dist/index.d.cts +2 -0
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.js +46 -41
  45. package/dist/load/index.cjs +3 -3
  46. package/dist/load/index.js +4 -4
  47. package/dist/urls/index.cjs +10 -10
  48. package/dist/urls/index.js +10 -10
  49. package/package.json +6 -1
  50. package/dist/chunk-D6UA6SZW.js +0 -15
  51. package/dist/chunk-OJFV3426.js +0 -17
  52. package/dist/chunk-PTLVJ5OL.cjs +0 -17
  53. package/dist/{chunk-IEQHKLEL.js → chunk-5AAUEW6L.js} +12 -12
  54. package/dist/{chunk-UGT4QBTM.cjs → chunk-6N2DOMCK.cjs} +10 -10
  55. package/dist/{chunk-7REYWTQZ.js → chunk-72A77L7G.js} +9 -9
  56. package/dist/{chunk-6K32ZUJG.js → chunk-EJZIISBA.js} +6 -6
  57. package/dist/{chunk-IAKHOOY7.js → chunk-F4P3HMNK.js} +3 -3
  58. package/dist/{chunk-2G5WAYII.cjs → chunk-NESEMFYX.cjs} +6 -6
  59. package/dist/{chunk-SGYFZFWD.cjs → chunk-QN6KZWKM.cjs} +4 -4
  60. package/dist/{chunk-GCVQ4KN2.cjs → chunk-T4SE6BE6.cjs} +9 -9
  61. package/dist/{chunk-NYRG5SN2.js → chunk-TAWTCLBM.js} +9 -9
  62. package/dist/{chunk-BD6DK4QK.cjs → chunk-XXS5G6S6.cjs} +2 -2
@@ -1,32 +1,32 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-DUFESFXN.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-GT3LK2TS.cjs');
2
2
 
3
3
 
4
- var _chunk2G5WAYIIcjs = require('../chunk-2G5WAYII.cjs');
4
+ var _chunkNESEMFYXcjs = require('../chunk-NESEMFYX.cjs');
5
+ require('../chunk-ETMYYVQJ.cjs');
6
+ require('../chunk-J7S3KBHL.cjs');
5
7
  require('../chunk-L7FSHU27.cjs');
6
8
  require('../chunk-JHV27P2Q.cjs');
7
- require('../chunk-ETMYYVQJ.cjs');
8
9
  require('../chunk-QXK4IUBI.cjs');
9
10
  require('../chunk-XTEDEB5P.cjs');
10
11
  require('../chunk-XWCRGY54.cjs');
11
- require('../chunk-J7S3KBHL.cjs');
12
12
 
13
13
 
14
- var _chunkUGT4QBTMcjs = require('../chunk-UGT4QBTM.cjs');
15
- require('../chunk-NRJPCN4J.cjs');
16
- require('../chunk-E4WBX6J5.cjs');
17
- require('../chunk-SLXKYTEU.cjs');
14
+ var _chunk6N2DOMCKcjs = require('../chunk-6N2DOMCK.cjs');
18
15
  require('../chunk-IIKQHLKT.cjs');
19
16
  require('../chunk-3VYRYSWK.cjs');
20
- require('../chunk-UFYLVZNU.cjs');
21
- require('../chunk-CDQONLGU.cjs');
22
- require('../chunk-D3SX7OUV.cjs');
23
17
  require('../chunk-7AIT4XSD.cjs');
24
18
  require('../chunk-GOUC2DFA.cjs');
19
+ require('../chunk-NRJPCN4J.cjs');
20
+ require('../chunk-E4WBX6J5.cjs');
21
+ require('../chunk-SLXKYTEU.cjs');
25
22
 
26
23
 
27
24
  var _chunkS5SLR7ILcjs = require('../chunk-S5SLR7IL.cjs');
28
25
  require('../chunk-MHHMXDHD.cjs');
29
26
  require('../chunk-SOAKYJIG.cjs');
27
+ require('../chunk-UFYLVZNU.cjs');
28
+ require('../chunk-CDQONLGU.cjs');
29
+ require('../chunk-D3SX7OUV.cjs');
30
30
  require('../chunk-TCMJPIRM.cjs');
31
31
  require('../chunk-XSQOJWXL.cjs');
32
32
  require('../chunk-GD3OA7GU.cjs');
@@ -46,4 +46,4 @@ require('../chunk-75ZPJI57.cjs');
46
46
 
47
47
 
48
48
 
49
- exports.array = _chunkS5SLR7ILcjs.array_exports; exports.object = _chunkUGT4QBTMcjs.object_exports; exports.string = _chunk2G5WAYIIcjs.string_exports;
49
+ exports.array = _chunkS5SLR7ILcjs.array_exports; exports.object = _chunk6N2DOMCKcjs.object_exports; exports.string = _chunkNESEMFYXcjs.string_exports;
@@ -1,32 +1,32 @@
1
- import "../chunk-LILSUNWL.js";
1
+ import "../chunk-SWFEVYEZ.js";
2
2
  import {
3
3
  string_exports
4
- } from "../chunk-7REYWTQZ.js";
4
+ } from "../chunk-72A77L7G.js";
5
+ import "../chunk-5HC662VK.js";
6
+ import "../chunk-7DTHADVK.js";
5
7
  import "../chunk-VKE5JARB.js";
6
8
  import "../chunk-U3PZBQ6G.js";
7
- import "../chunk-5HC662VK.js";
8
9
  import "../chunk-7O4MJOHM.js";
9
10
  import "../chunk-I4VBDCIM.js";
10
11
  import "../chunk-FS4JPT23.js";
11
- import "../chunk-7DTHADVK.js";
12
12
  import {
13
13
  object_exports
14
- } from "../chunk-IEQHKLEL.js";
15
- import "../chunk-RD4EP3M5.js";
16
- import "../chunk-754Z5VW6.js";
17
- import "../chunk-B3IGSYZT.js";
14
+ } from "../chunk-5AAUEW6L.js";
18
15
  import "../chunk-3LWFUVER.js";
19
16
  import "../chunk-A6J46LQK.js";
20
- import "../chunk-T4BAVDTH.js";
21
- import "../chunk-PHKZER72.js";
22
- import "../chunk-S42NGJ5W.js";
23
17
  import "../chunk-ZEAT23CI.js";
24
18
  import "../chunk-3IR2ABRO.js";
19
+ import "../chunk-RD4EP3M5.js";
20
+ import "../chunk-754Z5VW6.js";
21
+ import "../chunk-B3IGSYZT.js";
25
22
  import {
26
23
  array_exports
27
24
  } from "../chunk-EGM54DV6.js";
28
25
  import "../chunk-K33LOE73.js";
29
26
  import "../chunk-APKFW4LU.js";
27
+ import "../chunk-T4BAVDTH.js";
28
+ import "../chunk-PHKZER72.js";
29
+ import "../chunk-S42NGJ5W.js";
30
30
  import "../chunk-Q6FMBSK4.js";
31
31
  import "../chunk-DBSRZCFK.js";
32
32
  import "../chunk-ZVBCHJA5.js";
@@ -1,35 +1,35 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-UGT4QBTM.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-6N2DOMCK.cjs');
2
2
 
3
3
 
4
- var _chunkNRJPCN4Jcjs = require('../../chunk-NRJPCN4J.cjs');
4
+ var _chunkIIKQHLKTcjs = require('../../chunk-IIKQHLKT.cjs');
5
5
 
6
6
 
7
+ var _chunk3VYRYSWKcjs = require('../../chunk-3VYRYSWK.cjs');
7
8
 
8
- var _chunkE4WBX6J5cjs = require('../../chunk-E4WBX6J5.cjs');
9
9
 
10
+ var _chunk7AIT4XSDcjs = require('../../chunk-7AIT4XSD.cjs');
10
11
 
11
- var _chunkSLXKYTEUcjs = require('../../chunk-SLXKYTEU.cjs');
12
12
 
13
+ var _chunkGOUC2DFAcjs = require('../../chunk-GOUC2DFA.cjs');
13
14
 
14
- var _chunkIIKQHLKTcjs = require('../../chunk-IIKQHLKT.cjs');
15
15
 
16
+ var _chunkNRJPCN4Jcjs = require('../../chunk-NRJPCN4J.cjs');
16
17
 
17
- var _chunk3VYRYSWKcjs = require('../../chunk-3VYRYSWK.cjs');
18
18
 
19
19
 
20
- var _chunkUFYLVZNUcjs = require('../../chunk-UFYLVZNU.cjs');
20
+ var _chunkE4WBX6J5cjs = require('../../chunk-E4WBX6J5.cjs');
21
21
 
22
22
 
23
- var _chunkCDQONLGUcjs = require('../../chunk-CDQONLGU.cjs');
23
+ var _chunkSLXKYTEUcjs = require('../../chunk-SLXKYTEU.cjs');
24
24
 
25
25
 
26
- var _chunkD3SX7OUVcjs = require('../../chunk-D3SX7OUV.cjs');
26
+ var _chunkUFYLVZNUcjs = require('../../chunk-UFYLVZNU.cjs');
27
27
 
28
28
 
29
- var _chunk7AIT4XSDcjs = require('../../chunk-7AIT4XSD.cjs');
29
+ var _chunkCDQONLGUcjs = require('../../chunk-CDQONLGU.cjs');
30
30
 
31
31
 
32
- var _chunkGOUC2DFAcjs = require('../../chunk-GOUC2DFA.cjs');
32
+ var _chunkD3SX7OUVcjs = require('../../chunk-D3SX7OUV.cjs');
33
33
 
34
34
 
35
35
  var _chunkA5LHXE5Xcjs = require('../../chunk-A5LHXE5X.cjs');
@@ -1,4 +1,16 @@
1
- import "../../chunk-IEQHKLEL.js";
1
+ import "../../chunk-5AAUEW6L.js";
2
+ import {
3
+ setSort
4
+ } from "../../chunk-3LWFUVER.js";
5
+ import {
6
+ unmergeObject
7
+ } from "../../chunk-A6J46LQK.js";
8
+ import {
9
+ getSort
10
+ } from "../../chunk-ZEAT23CI.js";
11
+ import {
12
+ hasOwn
13
+ } from "../../chunk-3IR2ABRO.js";
2
14
  import {
3
15
  mergeObject
4
16
  } from "../../chunk-RD4EP3M5.js";
@@ -9,12 +21,6 @@ import {
9
21
  import {
10
22
  reverseObj
11
23
  } from "../../chunk-B3IGSYZT.js";
12
- import {
13
- setSort
14
- } from "../../chunk-3LWFUVER.js";
15
- import {
16
- unmergeObject
17
- } from "../../chunk-A6J46LQK.js";
18
24
  import {
19
25
  attrValueSort
20
26
  } from "../../chunk-T4BAVDTH.js";
@@ -24,12 +30,6 @@ import {
24
30
  import {
25
31
  filterObject
26
32
  } from "../../chunk-S42NGJ5W.js";
27
- import {
28
- getSort
29
- } from "../../chunk-ZEAT23CI.js";
30
- import {
31
- hasOwn
32
- } from "../../chunk-3IR2ABRO.js";
33
33
  import {
34
34
  isObjectArray
35
35
  } from "../../chunk-GYE23WAN.js";
@@ -1,17 +1,20 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-2G5WAYII.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-NESEMFYX.cjs');
2
2
 
3
3
 
4
- var _chunkL7FSHU27cjs = require('../../chunk-L7FSHU27.cjs');
5
4
 
6
5
 
7
6
 
8
- var _chunkJHV27P2Qcjs = require('../../chunk-JHV27P2Q.cjs');
7
+ var _chunkETMYYVQJcjs = require('../../chunk-ETMYYVQJ.cjs');
9
8
 
10
9
 
10
+ var _chunkJ7S3KBHLcjs = require('../../chunk-J7S3KBHL.cjs');
11
11
 
12
12
 
13
+ var _chunkL7FSHU27cjs = require('../../chunk-L7FSHU27.cjs');
13
14
 
14
- var _chunkETMYYVQJcjs = require('../../chunk-ETMYYVQJ.cjs');
15
+
16
+
17
+ var _chunkJHV27P2Qcjs = require('../../chunk-JHV27P2Q.cjs');
15
18
 
16
19
 
17
20
 
@@ -22,9 +25,6 @@ var _chunkXTEDEB5Pcjs = require('../../chunk-XTEDEB5P.cjs');
22
25
 
23
26
 
24
27
  var _chunkXWCRGY54cjs = require('../../chunk-XWCRGY54.cjs');
25
-
26
-
27
- var _chunkJ7S3KBHLcjs = require('../../chunk-J7S3KBHL.cjs');
28
28
  require('../../chunk-E4WBX6J5.cjs');
29
29
 
30
30
 
@@ -1,4 +1,13 @@
1
- import "../../chunk-7REYWTQZ.js";
1
+ import "../../chunk-72A77L7G.js";
2
+ import {
3
+ serializeCodeBlock,
4
+ serializeFunctionRef,
5
+ toJSONSParse,
6
+ toJSONSStringify
7
+ } from "../../chunk-5HC662VK.js";
8
+ import {
9
+ getStartSame
10
+ } from "../../chunk-7DTHADVK.js";
2
11
  import {
3
12
  splitUpper
4
13
  } from "../../chunk-VKE5JARB.js";
@@ -6,12 +15,6 @@ import {
6
15
  toJSONParse,
7
16
  toJSONStringify
8
17
  } from "../../chunk-U3PZBQ6G.js";
9
- import {
10
- serializeCodeBlock,
11
- serializeFunctionRef,
12
- toJSONSParse,
13
- toJSONSStringify
14
- } from "../../chunk-5HC662VK.js";
15
18
  import {
16
19
  getFunctionFormat,
17
20
  toFunction
@@ -22,9 +25,6 @@ import {
22
25
  import {
23
26
  deComment
24
27
  } from "../../chunk-FS4JPT23.js";
25
- import {
26
- getStartSame
27
- } from "../../chunk-7DTHADVK.js";
28
28
  import "../../chunk-754Z5VW6.js";
29
29
  import {
30
30
  getStrNunPosit
@@ -0,0 +1,16 @@
1
+ import {
2
+ format
3
+ } from "./chunk-6ZPCYCOL.js";
4
+ import {
5
+ __export
6
+ } from "./chunk-MLKGABMK.js";
7
+
8
+ // packages/date/index.ts
9
+ var date_exports = {};
10
+ __export(date_exports, {
11
+ format: () => format
12
+ });
13
+
14
+ export {
15
+ date_exports
16
+ };
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/getPrentCorres.ts
2
+ function getPrentCorres(el, is, depth) {
3
+ if (is(el)) {
4
+ return el;
5
+ } else {
6
+ if (typeof depth === "undefined") {
7
+ const fel = el.parentElement;
8
+ if (fel) {
9
+ return getPrentCorres(fel, is);
10
+ } else {
11
+ return;
12
+ }
13
+ } else {
14
+ if (depth > 0) {
15
+ const fel = el.parentElement;
16
+ if (fel) {
17
+ return getPrentCorres(fel, is, depth--);
18
+ } else {
19
+ return;
20
+ }
21
+ } else {
22
+ return;
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
+
29
+
30
+ exports.getPrentCorres = getPrentCorres;
@@ -0,0 +1,57 @@
1
+ // packages/date/format.ts
2
+ var arr = [
3
+ "\u661F\u671F\u65E5",
4
+ "\u661F\u671F\u4E00",
5
+ "\u661F\u671F\u4E8C",
6
+ "\u661F\u671F\u4E09",
7
+ "\u661F\u671F\u56DB",
8
+ "\u661F\u671F\u4E94",
9
+ "\u661F\u671F\u516D"
10
+ ];
11
+ function format(date, fmt) {
12
+ if (!date) {
13
+ return "";
14
+ } else if (typeof date == "string") {
15
+ let d = new Date(date);
16
+ date = d;
17
+ }
18
+ let o = {
19
+ "M+": date.getMonth() + 1,
20
+ //月份
21
+ "d+": date.getDate(),
22
+ //日
23
+ "H+": date.getHours(),
24
+ //小时
25
+ "m+": date.getMinutes(),
26
+ //分
27
+ "s+": date.getSeconds(),
28
+ //秒
29
+ "q+": Math.floor((date.getMonth() + 3) / 3),
30
+ //季度
31
+ S: date.getMilliseconds()
32
+ //毫秒
33
+ };
34
+ let xq = date.getDay();
35
+ if (/(y+)/.test(fmt))
36
+ fmt = fmt.replace(
37
+ RegExp.$1,
38
+ (date.getFullYear() + "").substring(4 - RegExp.$1.length)
39
+ );
40
+ for (var k in o) {
41
+ if (new RegExp("(" + k + ")").test(fmt)) {
42
+ const val = o[k];
43
+ fmt = fmt.replace(
44
+ RegExp.$1,
45
+ RegExp.$1.length == 1 ? val.toString() : ("00" + val).substring(val.toString().length)
46
+ );
47
+ }
48
+ }
49
+ if (fmt.includes("XXX")) {
50
+ fmt = fmt.replace("XXX", arr[xq]);
51
+ }
52
+ return fmt;
53
+ }
54
+
55
+ export {
56
+ format
57
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkQDQ6QSZMcjs = require('./chunk-QDQ6QSZM.cjs');
4
+
5
+
6
+ var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
7
+
8
+ // packages/date/index.ts
9
+ var date_exports = {};
10
+ _chunk75ZPJI57cjs.__export.call(void 0, date_exports, {
11
+ format: () => _chunkQDQ6QSZMcjs.format
12
+ });
13
+
14
+
15
+
16
+ exports.date_exports = date_exports;
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk2G5WAYIIcjs = require('./chunk-2G5WAYII.cjs');
3
+ var _chunkNESEMFYXcjs = require('./chunk-NESEMFYX.cjs');
4
4
 
5
5
 
6
- var _chunkUGT4QBTMcjs = require('./chunk-UGT4QBTM.cjs');
6
+ var _chunk6N2DOMCKcjs = require('./chunk-6N2DOMCK.cjs');
7
7
 
8
8
 
9
9
  var _chunkS5SLR7ILcjs = require('./chunk-S5SLR7IL.cjs');
@@ -15,8 +15,8 @@ var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
15
15
  var basic_exports = {};
16
16
  _chunk75ZPJI57cjs.__export.call(void 0, basic_exports, {
17
17
  array: () => _chunkS5SLR7ILcjs.array_exports,
18
- object: () => _chunkUGT4QBTMcjs.object_exports,
19
- string: () => _chunk2G5WAYIIcjs.string_exports
18
+ object: () => _chunk6N2DOMCKcjs.object_exports,
19
+ string: () => _chunkNESEMFYXcjs.string_exports
20
20
  });
21
21
 
22
22
 
@@ -1,13 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkPTLVJ5OLcjs = require('./chunk-PTLVJ5OL.cjs');
3
+ var _chunk6TH2K7LEcjs = require('./chunk-6TH2K7LE.cjs');
4
4
 
5
5
  // packages/css/getPrentClass.ts
6
- function getPrentClass(el, cs) {
7
- return _chunkPTLVJ5OLcjs.getPrentCorres.call(void 0, el, (ve) => {
8
- const vs = (_optionalChain([ve, 'optionalAccess', _ => _.className]) || "").split(" ");
9
- return vs.includes(cs);
10
- });
6
+ function getPrentClass(el, cs, depth) {
7
+ return _chunk6TH2K7LEcjs.getPrentCorres.call(void 0,
8
+ el,
9
+ (ve) => {
10
+ const m = _optionalChain([ve, 'optionalAccess', _ => _.className]) || "";
11
+ if (m && typeof m === "string") {
12
+ const vs = m.split(" ");
13
+ return vs.includes(cs);
14
+ } else {
15
+ return false;
16
+ }
17
+ },
18
+ depth
19
+ );
11
20
  }
12
21
 
13
22
 
@@ -0,0 +1,24 @@
1
+ import {
2
+ getPrentCorres
3
+ } from "./chunk-VNY5UA2Q.js";
4
+
5
+ // packages/css/getPrentClass.ts
6
+ function getPrentClass(el, cs, depth) {
7
+ return getPrentCorres(
8
+ el,
9
+ (ve) => {
10
+ const m = ve?.className || "";
11
+ if (m && typeof m === "string") {
12
+ const vs = m.split(" ");
13
+ return vs.includes(cs);
14
+ } else {
15
+ return false;
16
+ }
17
+ },
18
+ depth
19
+ );
20
+ }
21
+
22
+ export {
23
+ getPrentClass
24
+ };
@@ -28,10 +28,10 @@ import {
28
28
  } from "./chunk-5RZYHE3X.js";
29
29
  import {
30
30
  getPrentClass
31
- } from "./chunk-D6UA6SZW.js";
31
+ } from "./chunk-KE77GEY2.js";
32
32
  import {
33
33
  getPrentCorres
34
- } from "./chunk-OJFV3426.js";
34
+ } from "./chunk-VNY5UA2Q.js";
35
35
  import {
36
36
  __export
37
37
  } from "./chunk-MLKGABMK.js";
@@ -0,0 +1,57 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/date/format.ts
2
+ var arr = [
3
+ "\u661F\u671F\u65E5",
4
+ "\u661F\u671F\u4E00",
5
+ "\u661F\u671F\u4E8C",
6
+ "\u661F\u671F\u4E09",
7
+ "\u661F\u671F\u56DB",
8
+ "\u661F\u671F\u4E94",
9
+ "\u661F\u671F\u516D"
10
+ ];
11
+ function format(date, fmt) {
12
+ if (!date) {
13
+ return "";
14
+ } else if (typeof date == "string") {
15
+ let d = new Date(date);
16
+ date = d;
17
+ }
18
+ let o = {
19
+ "M+": date.getMonth() + 1,
20
+ //月份
21
+ "d+": date.getDate(),
22
+ //日
23
+ "H+": date.getHours(),
24
+ //小时
25
+ "m+": date.getMinutes(),
26
+ //分
27
+ "s+": date.getSeconds(),
28
+ //秒
29
+ "q+": Math.floor((date.getMonth() + 3) / 3),
30
+ //季度
31
+ S: date.getMilliseconds()
32
+ //毫秒
33
+ };
34
+ let xq = date.getDay();
35
+ if (/(y+)/.test(fmt))
36
+ fmt = fmt.replace(
37
+ RegExp.$1,
38
+ (date.getFullYear() + "").substring(4 - RegExp.$1.length)
39
+ );
40
+ for (var k in o) {
41
+ if (new RegExp("(" + k + ")").test(fmt)) {
42
+ const val = o[k];
43
+ fmt = fmt.replace(
44
+ RegExp.$1,
45
+ RegExp.$1.length == 1 ? val.toString() : ("00" + val).substring(val.toString().length)
46
+ );
47
+ }
48
+ }
49
+ if (fmt.includes("XXX")) {
50
+ fmt = fmt.replace("XXX", arr[xq]);
51
+ }
52
+ return fmt;
53
+ }
54
+
55
+
56
+
57
+ exports.format = format;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  string_exports
3
- } from "./chunk-7REYWTQZ.js";
3
+ } from "./chunk-72A77L7G.js";
4
4
  import {
5
5
  object_exports
6
- } from "./chunk-IEQHKLEL.js";
6
+ } from "./chunk-5AAUEW6L.js";
7
7
  import {
8
8
  array_exports
9
9
  } from "./chunk-EGM54DV6.js";
@@ -0,0 +1,30 @@
1
+ // packages/css/getPrentCorres.ts
2
+ function getPrentCorres(el, is, depth) {
3
+ if (is(el)) {
4
+ return el;
5
+ } else {
6
+ if (typeof depth === "undefined") {
7
+ const fel = el.parentElement;
8
+ if (fel) {
9
+ return getPrentCorres(fel, is);
10
+ } else {
11
+ return;
12
+ }
13
+ } else {
14
+ if (depth > 0) {
15
+ const fel = el.parentElement;
16
+ if (fel) {
17
+ return getPrentCorres(fel, is, depth--);
18
+ } else {
19
+ return;
20
+ }
21
+ } else {
22
+ return;
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
+ export {
29
+ getPrentCorres
30
+ };
@@ -28,10 +28,10 @@ var _chunkVY5VQ7WEcjs = require('./chunk-VY5VQ7WE.cjs');
28
28
  var _chunkUGS2F6DKcjs = require('./chunk-UGS2F6DK.cjs');
29
29
 
30
30
 
31
- var _chunk7ZEZ3JJ7cjs = require('./chunk-7ZEZ3JJ7.cjs');
31
+ var _chunkIFVVMDAWcjs = require('./chunk-IFVVMDAW.cjs');
32
32
 
33
33
 
34
- var _chunkPTLVJ5OLcjs = require('./chunk-PTLVJ5OL.cjs');
34
+ var _chunk6TH2K7LEcjs = require('./chunk-6TH2K7LE.cjs');
35
35
 
36
36
 
37
37
  var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
@@ -43,8 +43,8 @@ _chunk75ZPJI57cjs.__export.call(void 0, css_exports, {
43
43
  getAttrObj: () => _chunkTE3XNGF4cjs.getAttrObj,
44
44
  getCss: () => _chunkUGS2F6DKcjs.getCss,
45
45
  getPositionRelative: () => _chunkVY5VQ7WEcjs.getPositionRelative,
46
- getPrentClass: () => _chunk7ZEZ3JJ7cjs.getPrentClass,
47
- getPrentCorres: () => _chunkPTLVJ5OLcjs.getPrentCorres,
46
+ getPrentClass: () => _chunkIFVVMDAWcjs.getPrentClass,
47
+ getPrentCorres: () => _chunk6TH2K7LEcjs.getPrentCorres,
48
48
  getSVG: () => _chunkGFAUQTB2cjs.getSVG,
49
49
  getScssImports: () => _chunkSJPWB2OHcjs.getScssImports,
50
50
  setClassName: () => _chunkCTLBHJGFcjs.setClassName,
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk7ZEZ3JJ7cjs = require('../chunk-7ZEZ3JJ7.cjs');
4
- require('../chunk-PTLVJ5OL.cjs');
3
+ var _chunkIFVVMDAWcjs = require('../chunk-IFVVMDAW.cjs');
4
+ require('../chunk-6TH2K7LE.cjs');
5
5
  require('../chunk-75ZPJI57.cjs');
6
6
 
7
7
 
8
- exports.getPrentClass = _chunk7ZEZ3JJ7cjs.getPrentClass;
8
+ exports.getPrentClass = _chunkIFVVMDAWcjs.getPrentClass;
@@ -2,6 +2,6 @@
2
2
  * 获取当前元素或者匹配父类元素的对应样式
3
3
  * @param el
4
4
  */
5
- declare function getPrentClass(el: HTMLElement, cs: string): HTMLElement | undefined;
5
+ declare function getPrentClass(el: HTMLElement, cs: string, depth?: number): HTMLElement | undefined;
6
6
 
7
7
  export { getPrentClass };
@@ -2,6 +2,6 @@
2
2
  * 获取当前元素或者匹配父类元素的对应样式
3
3
  * @param el
4
4
  */
5
- declare function getPrentClass(el: HTMLElement, cs: string): HTMLElement | undefined;
5
+ declare function getPrentClass(el: HTMLElement, cs: string, depth?: number): HTMLElement | undefined;
6
6
 
7
7
  export { getPrentClass };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getPrentClass
3
- } from "../chunk-D6UA6SZW.js";
4
- import "../chunk-OJFV3426.js";
3
+ } from "../chunk-KE77GEY2.js";
4
+ import "../chunk-VNY5UA2Q.js";
5
5
  import "../chunk-MLKGABMK.js";
6
6
  export {
7
7
  getPrentClass
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkPTLVJ5OLcjs = require('../chunk-PTLVJ5OL.cjs');
3
+ var _chunk6TH2K7LEcjs = require('../chunk-6TH2K7LE.cjs');
4
4
  require('../chunk-75ZPJI57.cjs');
5
5
 
6
6
 
7
- exports.getPrentCorres = _chunkPTLVJ5OLcjs.getPrentCorres;
7
+ exports.getPrentCorres = _chunk6TH2K7LEcjs.getPrentCorres;
@@ -2,6 +2,6 @@
2
2
  * 获取当前元素或者匹配父类元素
3
3
  * @param el
4
4
  */
5
- declare function getPrentCorres(el: HTMLElement, is: (el: HTMLElement) => boolean): HTMLElement | undefined;
5
+ declare function getPrentCorres(el: HTMLElement, is: (el: HTMLElement) => boolean, depth?: number): HTMLElement | undefined;
6
6
 
7
7
  export { getPrentCorres };
@@ -2,6 +2,6 @@
2
2
  * 获取当前元素或者匹配父类元素
3
3
  * @param el
4
4
  */
5
- declare function getPrentCorres(el: HTMLElement, is: (el: HTMLElement) => boolean): HTMLElement | undefined;
5
+ declare function getPrentCorres(el: HTMLElement, is: (el: HTMLElement) => boolean, depth?: number): HTMLElement | undefined;
6
6
 
7
7
  export { getPrentCorres };