mixlea-utils-js 0.1.17 → 0.1.19

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.
@@ -23,7 +23,7 @@ function ae(e, t) {
23
23
  const { leafField: n = "children" } = t ?? {};
24
24
  return !(N(e) && Array.isArray(e[`${n}`]) && e[`${n}`].length > 0);
25
25
  }
26
- function J(e, t) {
26
+ function z(e, t) {
27
27
  const { leafField: n = "children" } = t ?? {};
28
28
  return e && Array.isArray(e[n]) && e[n].length > 0;
29
29
  }
@@ -42,11 +42,11 @@ function P(e) {
42
42
  function Kt(e, t) {
43
43
  return e === t;
44
44
  }
45
- function z(e) {
45
+ function J(e) {
46
46
  return Array.isArray(e) ? e.length === 0 : e == null || e === "";
47
47
  }
48
48
  function j(e) {
49
- return Array.isArray(e) || typeof e == "string" ? e.length === 0 : typeof e == "object" && e !== null && Object.prototype.toString.call(e) === "[object Object]" ? Object.keys(e).length === 0 : e == null;
49
+ return Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : typeof e == "string" ? e.length === 0 : typeof e == "object" && e !== null && Object.prototype.toString.call(e) === "[object Object]" ? Object.keys(e).length === 0 : e == null;
50
50
  }
51
51
  function T(e) {
52
52
  return !j(e);
@@ -54,8 +54,8 @@ function T(e) {
54
54
  function _e(e, t, n) {
55
55
  return Array.isArray(e) && e.length > 0 && typeof t == "function" ? e.every(t) : (n == null ? void 0 : n.emptyResult) ?? !1;
56
56
  }
57
- function Jt(...e) {
58
- return _e(e, z);
57
+ function zt(...e) {
58
+ return _e(e, J);
59
59
  }
60
60
  function Me(e) {
61
61
  return Array.isArray(e) ? e.length > 0 : e != null && e !== "";
@@ -63,7 +63,7 @@ function Me(e) {
63
63
  function He(e) {
64
64
  return Array.isArray(e) && e.length > 0;
65
65
  }
66
- function zt() {
66
+ function Jt() {
67
67
  return /MicroMessenger/i.test(window.navigator.userAgent);
68
68
  }
69
69
  function Zt() {
@@ -97,7 +97,7 @@ function $e(e, t, n) {
97
97
  return Array.isArray(e) && e.length > 0 && typeof t == "function" ? e.some(t) : (n == null ? void 0 : n.emptyResult) ?? !1;
98
98
  }
99
99
  function un(...e) {
100
- return $e(e, z, { emptyResult: !0 });
100
+ return $e(e, J, { emptyResult: !0 });
101
101
  }
102
102
  function cn(...e) {
103
103
  return $e(e, Me, { emptyResult: !1 });
@@ -150,8 +150,8 @@ function bn(e) {
150
150
  const h = s(n, t[0], 0);
151
151
  return Object.assign(t[0], h), t;
152
152
  }
153
- const c = t.map(r), a = c.reduce((h, p) => h + p, 0);
154
- if (a === 0) {
153
+ const c = t.map(r), f = c.reduce((h, p) => h + p, 0);
154
+ if (f === 0) {
155
155
  const h = Math.round(n / u * o) / o;
156
156
  let p = 0;
157
157
  for (let d = 0; d < u; d++) {
@@ -160,10 +160,10 @@ function bn(e) {
160
160
  }
161
161
  return t;
162
162
  }
163
- const f = c.map((h) => h / a * n);
163
+ const a = c.map((h) => h / f * n);
164
164
  let l = 0;
165
165
  for (let h = 0; h < u - 1; h++) {
166
- const p = Math.round(f[h] * o) / o, d = s(p, t[h], h);
166
+ const p = Math.round(a[h] * o) / o, d = s(p, t[h], h);
167
167
  Object.assign(t[h], d), l += p;
168
168
  }
169
169
  const m = n - l, g = s(m, t[u - 1], u - 1);
@@ -432,10 +432,10 @@ function We(e, t) {
432
432
  function Kn(e, t, n) {
433
433
  return Array.isArray(e) ? e.map(n ?? ((r) => r)).join(t) : "";
434
434
  }
435
- function Jn(e, t) {
435
+ function zn(e, t) {
436
436
  return Array.isArray(e) ? e.includes(t) : !1;
437
437
  }
438
- function zn(e, t, n) {
438
+ function Jn(e, t, n) {
439
439
  return Array.isArray(e) && Array.isArray(t) && U(n) ? t.length === 0 ? e : Ve(e, (r) => !Xe(t, (i) => n(r, i))) : [];
440
440
  }
441
441
  function Zn(e, t) {
@@ -601,8 +601,8 @@ function I(e, t = "yyyy/MM/dd", n) {
601
601
  const r = L(e) ? new Date(Number.parseInt(e, 10)) : Y(e) ? new Date(e) : e;
602
602
  if (r.toString() === "Invalid Date")
603
603
  return n ?? r.toString();
604
- const i = r.getFullYear(), s = r.getMonth() + 1, o = r.getDate(), u = r.getHours(), c = r.getMinutes(), a = r.getSeconds(), f = [...Array(10)].map((m, g) => `0${g}`);
605
- return t.replace(/yyyy/g, String(i)).replace(/yy/g, String(i).substring(2)).replace(/MM/g, String(f[s] || s)).replace(/dd/g, String(f[o] || o)).replace(/HH/g, String(f[u] || u)).replace(/mm/g, String(f[c] || c)).replace(/ss/g, String(f[a] || a));
604
+ const i = r.getFullYear(), s = r.getMonth() + 1, o = r.getDate(), u = r.getHours(), c = r.getMinutes(), f = r.getSeconds(), a = [...Array(10)].map((m, g) => `0${g}`);
605
+ return t.replace(/yyyy/g, String(i)).replace(/yy/g, String(i).substring(2)).replace(/MM/g, String(a[s] || s)).replace(/dd/g, String(a[o] || o)).replace(/HH/g, String(a[u] || u)).replace(/mm/g, String(a[c] || c)).replace(/ss/g, String(a[f] || f));
606
606
  }
607
607
  return "";
608
608
  }
@@ -753,18 +753,18 @@ function Ir(e, t, n) {
753
753
  return Array.isArray(e) && s(e), i;
754
754
  function s(o) {
755
755
  o.forEach((u) => {
756
- t(u, { flatSubNodes: Q(u[r]) }) && i.push(u), J(u) && s(u[r]);
756
+ t(u, { flatSubNodes: Q(u[r]) }) && i.push(u), z(u) && s(u[r]);
757
757
  });
758
758
  }
759
759
  }
760
- function Je(e, t, n) {
760
+ function ze(e, t, n) {
761
761
  const { leafField: r = "children" } = n ?? {};
762
- return Array.isArray(e) ? e.filter((i) => t(i, { flatSubNodes: Q(i[r]) })).map((i) => ae(i) ? i : { ...i, [r]: Je(i[r], t, { leafField: r }) }) : [];
762
+ return Array.isArray(e) ? e.filter((i) => t(i, { flatSubNodes: Q(i[r]) })).map((i) => ae(i) ? i : { ...i, [r]: ze(i[r], t, { leafField: r }) }) : [];
763
763
  }
764
764
  function Pr(e, t) {
765
765
  return n(e);
766
766
  function n(r) {
767
- return Array.isArray(r) ? r.map((i) => J(i) ? { ...i, children: n(i.children) } : i).sort(t) : r;
767
+ return Array.isArray(r) ? r.map((i) => z(i) ? { ...i, children: n(i.children) } : i).sort(t) : r;
768
768
  }
769
769
  }
770
770
  function jr(e, t, n) {
@@ -772,7 +772,7 @@ function jr(e, t, n) {
772
772
  Array.isArray(e) && i(e);
773
773
  function i(s) {
774
774
  s.forEach((o) => {
775
- t(o, { flatSubNodes: Q(o[r]) }), J(o, n) && i(o[r]);
775
+ t(o, { flatSubNodes: Q(o[r]) }), z(o, n) && i(o[r]);
776
776
  });
777
777
  }
778
778
  }
@@ -790,8 +790,8 @@ function kr(e, t, n) {
790
790
  return i(R(e), []);
791
791
  function i(s, o) {
792
792
  return s.map((u, c) => {
793
- const a = [...o, c], f = t(u, a);
794
- return Array.isArray(f[r]) && f[r].length > 0 ? { ...f, [r]: i(f[r], a) } : f;
793
+ const f = [...o, c], a = t(u, f);
794
+ return Array.isArray(a[r]) && a[r].length > 0 ? { ...a, [r]: i(a[r], f) } : a;
795
795
  });
796
796
  }
797
797
  }
@@ -805,25 +805,25 @@ function Cr(e, t, n) {
805
805
  i = u;
806
806
  return;
807
807
  }
808
- J(u) && s(u[r]);
808
+ z(u) && s(u[r]);
809
809
  }
810
810
  }
811
811
  }
812
- function ze(e, t) {
813
- return e.map((n) => t(n) ? null : (n.children && n.children.length > 0 && (n.children = ze(n.children, t)), n)).filter((n) => n !== null);
812
+ function Je(e, t) {
813
+ return e.map((n) => t(n) ? null : (n.children && n.children.length > 0 && (n.children = Je(n.children, t)), n)).filter((n) => n !== null);
814
814
  }
815
815
  function Fr(e, t, n) {
816
816
  const r = (n == null ? void 0 : n.leafField) ?? "children";
817
817
  return i(e, []);
818
818
  function i(s, o) {
819
819
  for (let u = 0; u < s.length; u++) {
820
- const c = s[u], a = [...o, u];
821
- if (t(c, a))
822
- return a;
820
+ const c = s[u], f = [...o, u];
821
+ if (t(c, f))
822
+ return f;
823
823
  if (Array.isArray(c[r]) && c[r].length > 0) {
824
- const f = i(c[r], a);
825
- if (f.length > 0)
826
- return f;
824
+ const a = i(c[r], f);
825
+ if (a.length > 0)
826
+ return a;
827
827
  }
828
828
  }
829
829
  return [];
@@ -833,9 +833,9 @@ function vr(e, t, n, r) {
833
833
  const { leafField: i = "children" } = r ?? {};
834
834
  return s(R(e));
835
835
  function s(o, u = []) {
836
- return o.map((c, a) => {
837
- const f = [...u, a];
838
- return t(c, f) ? { ...c, [i]: [...R(c[i]), ...n] } : Array.isArray(c[i]) && c[i].length > 0 ? { ...c, [i]: s(c[i], f) } : c;
836
+ return o.map((c, f) => {
837
+ const a = [...u, f];
838
+ return t(c, a) ? { ...c, [i]: [...R(c[i]), ...n] } : Array.isArray(c[i]) && c[i].length > 0 ? { ...c, [i]: s(c[i], a) } : c;
839
839
  });
840
840
  }
841
841
  }
@@ -844,11 +844,11 @@ function Tr(e, t, n) {
844
844
  return i(R(e), []);
845
845
  function i(s, o) {
846
846
  const u = [];
847
- return s.forEach((c, a) => {
848
- const f = [...o, a];
849
- if (!t(c, f)) {
847
+ return s.forEach((c, f) => {
848
+ const a = [...o, f];
849
+ if (!t(c, a)) {
850
850
  const l = c[r];
851
- Array.isArray(l) && l.length > 0 ? u.push({ ...c, [r]: i(l, f) }) : u.push(c);
851
+ Array.isArray(l) && l.length > 0 ? u.push({ ...c, [r]: i(l, a) }) : u.push(c);
852
852
  }
853
853
  }), u;
854
854
  }
@@ -860,9 +860,9 @@ function xr(e, t, n, r) {
860
860
  const s = t.join("-");
861
861
  return o(R(e));
862
862
  function o(u, c = []) {
863
- return u.map((a, f) => {
864
- const l = [...c, f];
865
- return l.join("-") === s ? { ...a, [i]: [...R(a[i]), ...n] } : Array.isArray(a[i]) && a[i].length > 0 ? { ...a, [i]: o(a[i], l) } : a;
863
+ return u.map((f, a) => {
864
+ const l = [...c, a];
865
+ return l.join("-") === s ? { ...f, [i]: [...R(f[i]), ...n] } : Array.isArray(f[i]) && f[i].length > 0 ? { ...f, [i]: o(f[i], l) } : f;
866
866
  });
867
867
  }
868
868
  }
@@ -873,9 +873,9 @@ function Br(e, t, n) {
873
873
  return s(R(e), []);
874
874
  function s(o, u) {
875
875
  const c = [];
876
- return o.forEach((a, f) => {
877
- const l = R(a[r]), m = [...u, f];
878
- m.join("-") !== i && (l.length > 0 ? c.push({ ...a, [r]: s(l, m) }) : c.push(a));
876
+ return o.forEach((f, a) => {
877
+ const l = R(f[r]), m = [...u, a];
878
+ m.join("-") !== i && (l.length > 0 ? c.push({ ...f, [r]: s(l, m) }) : c.push(f));
879
879
  }), c;
880
880
  }
881
881
  }
@@ -886,13 +886,13 @@ function Ur(e, t, n, r) {
886
886
  const s = t.slice(0, Math.max(t.length - 1, 1)).join("-");
887
887
  return o(R(e));
888
888
  function o(u, c = []) {
889
- return u.map((a, f) => {
890
- const l = [...c, f], m = [...R(a[i])];
889
+ return u.map((f, a) => {
890
+ const l = [...c, a], m = [...R(f[i])];
891
891
  if (l.join("-") === s) {
892
892
  const [g] = t.slice(-1);
893
- return m.splice(g, 0, ...n), { ...a, [i]: m };
893
+ return m.splice(g, 0, ...n), { ...f, [i]: m };
894
894
  }
895
- return Array.isArray(m) && m.length > 0 ? { ...a, [i]: o(m, l) } : a;
895
+ return Array.isArray(m) && m.length > 0 ? { ...f, [i]: o(m, l) } : f;
896
896
  });
897
897
  }
898
898
  }
@@ -969,10 +969,10 @@ function Wr(e, t, n) {
969
969
  function Kr(e, ...t) {
970
970
  P(e) && e.classList.add(...t);
971
971
  }
972
- function Jr(e, ...t) {
972
+ function zr(e, ...t) {
973
973
  P(e) && e.classList.remove(...t);
974
974
  }
975
- function zr(e, t) {
975
+ function Jr(e, t) {
976
976
  P(e) && N(t) && je(t, (n, r) => {
977
977
  e.style.setProperty(n, r);
978
978
  });
@@ -1036,7 +1036,7 @@ function ye(e, t, n, r) {
1036
1036
  "g"
1037
1037
  ), s = e.match(i), o = s ? s.length : 0;
1038
1038
  let u = 0;
1039
- return e.replace(i, (c, a) => (u++, (r == null ? void 0 : r({ matchStr: c, matchStrIndex: a, matchCount: u, matchTotal: o })) ?? !0 ? n : c));
1039
+ return e.replace(i, (c, f) => (u++, (r == null ? void 0 : r({ matchStr: c, matchStrIndex: f, matchCount: u, matchTotal: o })) ?? !0 ? n : c));
1040
1040
  }
1041
1041
  function ai(e) {
1042
1042
  return D(e) || typeof e == "function" ? "" : String(e);
@@ -1171,17 +1171,18 @@ function fe(e, t) {
1171
1171
  const {
1172
1172
  thousandth: n = !0,
1173
1173
  percent: r,
1174
- allowRound: i = !0,
1175
- allowDecimal: s = !0,
1176
- precision: o = 2,
1177
- precisionPad: u = !0
1178
- } = t ?? {}, c = s ? o : 0;
1179
- let a = E(e, r ? { multiply: 100 } : void 0);
1174
+ multiply: i = 1,
1175
+ allowRound: s = !0,
1176
+ allowDecimal: o = !0,
1177
+ precision: u = 2,
1178
+ precisionPad: c = !0
1179
+ } = t ?? {}, f = o ? u : 0;
1180
+ let a = E(e, r ? { multiply: 100 * i } : { multiply: i });
1180
1181
  if (Number.isNaN(a))
1181
1182
  return "";
1182
- if (c > 0) {
1183
- const f = ue(a);
1184
- f > 0 ? i && f > c ? (a = `${v(a, c)}`, ue(a) < c && u && (a = H(a, c))) : f > c ? a = `${H(a, c, { mode: "truncate" })}` : u && f < c && (a = H(a, c)) : u && (a = H(a, c));
1183
+ if (f > 0) {
1184
+ const l = ue(a);
1185
+ l > 0 ? s && l > f ? (a = `${v(a, f)}`, ue(a) < f && c && (a = H(a, f))) : l > f ? a = `${H(a, f, { mode: "truncate" })}` : c && l < f && (a = H(a, f)) : c && (a = H(a, f));
1185
1186
  } else
1186
1187
  a = `${Number.parseInt(a, 10)}`;
1187
1188
  return n && (a = Le(a)), r && (a = `${a} %`), a;
@@ -1235,7 +1236,7 @@ function Mi(e, t) {
1235
1236
  const { replaceNaNItem: n = Number.NaN, replaceNaNResult: r = 0 } = t ?? {};
1236
1237
  if (Array.isArray(e) && e.length >= 2) {
1237
1238
  const i = Number(e[0]), s = Number.isNaN(i) ? n : i, o = e.slice(1).reduce((u, c) => {
1238
- const a = Number(c), f = Number.isNaN(a) ? n : a, l = u / f;
1239
+ const f = Number(c), a = Number.isNaN(f) ? n : f, l = u / a;
1239
1240
  return Number.isFinite(l) ? l : Number.NaN;
1240
1241
  }, s);
1241
1242
  return Number.isNaN(o) ? r : o;
@@ -1247,8 +1248,8 @@ function $i(e, t, n) {
1247
1248
  if (t.length === 0)
1248
1249
  return i;
1249
1250
  if (Array.isArray(t) && t.length >= 2) {
1250
- const s = Number(O(e, t[0])), o = Number.isNaN(s) ? r : s, u = t.slice(1).reduce((c, a) => {
1251
- const f = Number(O(e, a)), l = Number.isNaN(f) ? r : f, m = c / l;
1251
+ const s = Number(O(e, t[0])), o = Number.isNaN(s) ? r : s, u = t.slice(1).reduce((c, f) => {
1252
+ const a = Number(O(e, f)), l = Number.isNaN(a) ? r : a, m = c / l;
1252
1253
  return Number.isFinite(m) ? m : Number.NaN;
1253
1254
  }, o);
1254
1255
  return Number.isNaN(u) ? i : u;
@@ -1322,28 +1323,28 @@ function ut(e, t, n) {
1322
1323
  const o = e[s];
1323
1324
  if (le(o))
1324
1325
  if (o === "^") {
1325
- const u = i.pop(), a = i.pop() ** u;
1326
- i.push(a);
1326
+ const u = i.pop(), f = i.pop() ** u;
1327
+ i.push(f);
1327
1328
  } else {
1328
1329
  const u = i.pop(), c = i.pop();
1329
- let a;
1330
+ let f;
1330
1331
  switch (o) {
1331
1332
  case "+":
1332
- a = c + u;
1333
+ f = c + u;
1333
1334
  break;
1334
1335
  case "-":
1335
- a = c - u;
1336
+ f = c - u;
1336
1337
  break;
1337
1338
  case "*":
1338
- a = c * u;
1339
+ f = c * u;
1339
1340
  break;
1340
1341
  case "/":
1341
- a = c / u, Number.isFinite(a) || (a = 0);
1342
+ f = c / u, Number.isFinite(f) || (f = 0);
1342
1343
  break;
1343
1344
  default:
1344
1345
  throw new Error("Invalid operator");
1345
1346
  }
1346
- i.push(a);
1347
+ i.push(f);
1347
1348
  }
1348
1349
  else o.includes(".") ? i.push(E(x(t, o, void 0), { nanReplace: r })) : o in t ? i.push(E(t[o], { nanReplace: r })) : i.push(E(o, { nanReplace: r }));
1349
1350
  }
@@ -1376,17 +1377,17 @@ function F(e) {
1376
1377
  function Ii(e, t) {
1377
1378
  if (t.items.length === 0)
1378
1379
  return [];
1379
- const n = F(t.items), r = E(e, { nanReplace: 0 }), i = be(n.map((f) => t.itemPercentage(f))), s = n.map((f) => {
1380
- const l = t.itemPercentage(f) / i, m = e * l;
1381
- return { ratio: l, sharedAmount: m, item: f };
1382
- }), o = t.itemShare ?? ((f) => f), u = s.slice(0, s.length - 1), c = s.slice(-1)[0], a = be(u.map(({ sharedAmount: f }) => f));
1383
- return u.forEach(({ sharedAmount: f, item: l }) => {
1384
- $(l, t.itemField, o(l, f));
1380
+ const n = F(t.items), r = E(e, { nanReplace: 0 }), i = be(n.map((a) => t.itemPercentage(a))), s = n.map((a) => {
1381
+ const l = t.itemPercentage(a) / i, m = e * l;
1382
+ return { ratio: l, sharedAmount: m, item: a };
1383
+ }), o = t.itemShare ?? ((a) => a), u = s.slice(0, s.length - 1), c = s.slice(-1)[0], f = be(u.map(({ sharedAmount: a }) => a));
1384
+ return u.forEach(({ sharedAmount: a, item: l }) => {
1385
+ $(l, t.itemField, o(l, a));
1385
1386
  }), $(
1386
1387
  c.item,
1387
1388
  t.itemField,
1388
- o(c.item, r - a)
1389
- ), [...u.map(({ item: f }) => f), c.item];
1389
+ o(c.item, r - f)
1390
+ ), [...u.map(({ item: a }) => a), c.item];
1390
1391
  }
1391
1392
  function Pi(e) {
1392
1393
  return typeof e == "number" ? `${e}px` : void 0;
@@ -1402,8 +1403,8 @@ function ki(e, t) {
1402
1403
  const { replaceNaNItem: n = 0, replaceNaNResult: r = 0 } = t ?? {};
1403
1404
  if (Array.isArray(e) && e.length > 1) {
1404
1405
  const i = E(e[0]), s = Number.isNaN(i) ? n : i, o = e.slice(1).reduce((u, c) => {
1405
- const a = E(c), f = Number.isNaN(a) ? n : a;
1406
- return u * f;
1406
+ const f = E(c), a = Number.isNaN(f) ? n : f;
1407
+ return u * a;
1407
1408
  }, s);
1408
1409
  return Number.isNaN(o) ? r : o;
1409
1410
  }
@@ -1424,8 +1425,8 @@ function Fi(e, t) {
1424
1425
  const { replaceNaNResult: n = Number.NaN, replaceNaNItem: r = Number.NaN } = t ?? {};
1425
1426
  if (Array.isArray(e) && e.length > 0) {
1426
1427
  const i = E(e[0]), s = Number.isNaN(i) ? r : i, o = e.slice(1).reduce((u, c) => {
1427
- const a = E(c), f = Number.isNaN(a) ? r : a;
1428
- return u - f;
1428
+ const f = E(c), a = Number.isNaN(f) ? r : f;
1429
+ return u - a;
1429
1430
  }, s);
1430
1431
  return Number.isNaN(o) ? n : o;
1431
1432
  }
@@ -1453,23 +1454,23 @@ function Ti(e, t) {
1453
1454
  }
1454
1455
  const at = "Expected a function", ft = Math.max, lt = Math.min;
1455
1456
  function xi(e, t, n) {
1456
- let r, i, s, o, u, c, a = 0, f = !1, l = !1, m = !0;
1457
+ let r, i, s, o, u, c, f = 0, a = !1, l = !1, m = !0;
1457
1458
  if (n = n || {}, t = t || 0, typeof e != "function")
1458
1459
  throw new TypeError(at);
1459
- t = Number(t) || 0, typeof n == "object" && (f = !!n.leading, l = "maxWait" in n, s = l ? ft(Number(n.maxWait) || 0, t) : s, m = "trailing" in n ? !!n.trailing : m);
1460
+ t = Number(t) || 0, typeof n == "object" && (a = !!n.leading, l = "maxWait" in n, s = l ? ft(Number(n.maxWait) || 0, t) : s, m = "trailing" in n ? !!n.trailing : m);
1460
1461
  function g(S) {
1461
1462
  const C = r, _ = i;
1462
- return r = i = void 0, a = S, o = e.apply(_, C), o;
1463
+ return r = i = void 0, f = S, o = e.apply(_, C), o;
1463
1464
  }
1464
1465
  function h(S) {
1465
- return a = S, u = setTimeout(b, t), f ? g(S) : o;
1466
+ return f = S, u = setTimeout(b, t), a ? g(S) : o;
1466
1467
  }
1467
1468
  function p(S) {
1468
- const C = S - c, _ = S - a, me = t - C;
1469
+ const C = S - c, _ = S - f, me = t - C;
1469
1470
  return l ? lt(me, s - _) : me;
1470
1471
  }
1471
1472
  function d(S) {
1472
- const C = S - c, _ = S - a;
1473
+ const C = S - c, _ = S - f;
1473
1474
  return c === void 0 || C >= t || C < 0 || l && _ >= s;
1474
1475
  }
1475
1476
  function b() {
@@ -1482,7 +1483,7 @@ function xi(e, t, n) {
1482
1483
  return u = void 0, m && r ? g(S) : (r = i = void 0, o);
1483
1484
  }
1484
1485
  function w() {
1485
- u !== void 0 && clearTimeout(u), a = 0, r = c = i = u = void 0;
1486
+ u !== void 0 && clearTimeout(u), f = 0, r = c = i = u = void 0;
1486
1487
  }
1487
1488
  function M() {
1488
1489
  return u === void 0 ? o : y(Date.now());
@@ -1561,13 +1562,13 @@ function Ki(e, t) {
1561
1562
  if (!(D(t) || t === ""))
1562
1563
  return { [e]: t };
1563
1564
  }
1564
- function Ji(...e) {
1565
+ function zi(...e) {
1565
1566
  for (const t of e)
1566
1567
  if (!j(t))
1567
1568
  return t;
1568
1569
  return e[e.length - 1];
1569
1570
  }
1570
- function zi(e, t, n) {
1571
+ function Ji(e, t, n) {
1571
1572
  return t(e) ? n : e;
1572
1573
  }
1573
1574
  function Zi(e, t) {
@@ -1631,7 +1632,7 @@ function is(e) {
1631
1632
  }), t;
1632
1633
  }
1633
1634
  function ss(e, t = "", n = {}) {
1634
- const { encode: r = !0, delimiter: i = "&" } = n, s = (c) => r ? encodeURIComponent(c) : c, o = (c, a) => t ? `${t}[${a}]` : c, u = (c, a) => a == null ? `${s(c)}=` : Array.isArray(a) ? a.map((f, l) => u(o(c, l.toString()), f)).join(i) : typeof a == "object" ? Object.keys(a).map((f) => u(o(c, f), a[f])).join(i) : `${s(c)}=${s(String(a))}`;
1635
+ const { encode: r = !0, delimiter: i = "&" } = n, s = (c) => r ? encodeURIComponent(c) : c, o = (c, f) => t ? `${t}[${f}]` : c, u = (c, f) => f == null ? `${s(c)}=` : Array.isArray(f) ? f.map((a, l) => u(o(c, l.toString()), a)).join(i) : typeof f == "object" ? Object.keys(f).map((a) => u(o(c, a), f[a])).join(i) : `${s(c)}=${s(String(f))}`;
1635
1636
  return Object.keys(e).map((c) => u(c, e[c])).join(i);
1636
1637
  }
1637
1638
  function os(e, t) {
@@ -1699,7 +1700,7 @@ function ds(e, t, n) {
1699
1700
  return t.map((i) => [i, r(O(e, i))]);
1700
1701
  }
1701
1702
  function gs(e, t) {
1702
- return t.filter((n) => z(O(e, n)));
1703
+ return t.filter((n) => J(O(e, n)));
1703
1704
  }
1704
1705
  function ps(e, t, n) {
1705
1706
  return t.reduce((i, s) => [...i, `${O(e, s)}`], []).join(n ?? ", ");
@@ -1938,11 +1939,11 @@ function Ks() {
1938
1939
  const e = /* @__PURE__ */ new Date();
1939
1940
  return e.setHours(0, 0, 0, 0), e.getTime();
1940
1941
  }
1941
- function Js() {
1942
+ function zs() {
1942
1943
  const e = /* @__PURE__ */ new Date();
1943
1944
  return e.setHours(23, 59, 59), e.getTime();
1944
1945
  }
1945
- function zs() {
1946
+ function Js() {
1946
1947
  return /* @__PURE__ */ new Date();
1947
1948
  }
1948
1949
  function Zs() {
@@ -1975,7 +1976,7 @@ function so(e, t) {
1975
1976
  function oo(e) {
1976
1977
  try {
1977
1978
  const t = localStorage.getItem(e);
1978
- return z(t) ? null : JSON.parse(t);
1979
+ return J(t) ? null : JSON.parse(t);
1979
1980
  } catch {
1980
1981
  return null;
1981
1982
  }
@@ -2360,13 +2361,13 @@ function Ho(e = [], t = {
2360
2361
  }) {
2361
2362
  const { keyField: n, childField: r, parentField: i } = t, s = [], o = {};
2362
2363
  for (let u = 0, c = e.length; u < c; u++) {
2363
- const a = e[u], f = a[n];
2364
- if (f)
2365
- if (o[f] ? a[r] = o[f] : a[r] = o[f] = [], a[i]) {
2366
- const l = a[i];
2367
- o[l] || (o[l] = []), o[l].push(a);
2364
+ const f = e[u], a = f[n];
2365
+ if (a)
2366
+ if (o[a] ? f[r] = o[a] : f[r] = o[a] = [], f[i]) {
2367
+ const l = f[i];
2368
+ o[l] || (o[l] = []), o[l].push(f);
2368
2369
  } else
2369
- s.push(a);
2370
+ s.push(f);
2370
2371
  }
2371
2372
  return s;
2372
2373
  }
@@ -2490,25 +2491,25 @@ function Yo(e) {
2490
2491
  t = String(t.toFixed(2));
2491
2492
  const r = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], i = ["", "拾", "佰", "仟"], s = ["", "万", "亿"], o = ["角", "分"], u = t.split(".");
2492
2493
  let c = u[0];
2493
- const a = u[1];
2494
+ const f = u[1];
2494
2495
  if (c !== "0") {
2495
2496
  c = c.split("").map(Number);
2496
- const f = c.reverse().reduce((l, m, g) => {
2497
+ const a = c.reverse().reduce((l, m, g) => {
2497
2498
  var d;
2498
2499
  const h = ((d = l == null ? void 0 : l[0]) == null ? void 0 : d.length) < 4 ? l[0] : [], p = m ? r[m] + i[g % 4] : r[m];
2499
2500
  return h.unshift(p), h.length === 1 ? l.unshift(h) : l[0] = h, l;
2500
2501
  }, []);
2501
- n += f.reduce((l, m, g) => {
2502
- let h = s[f.length - g - 1], p = m.join("").replace(/(零)\1+/g, "$1");
2502
+ n += a.reduce((l, m, g) => {
2503
+ let h = s[a.length - g - 1], p = m.join("").replace(/(零)\1+/g, "$1");
2503
2504
  return p === "零" ? (h = "", p = "") : p.endsWith("零") && (p = p.slice(0, p.length - 1)), l + p + h;
2504
2505
  }, "");
2505
2506
  } else
2506
2507
  n += "零";
2507
- if (n += "元", a !== "00") {
2508
+ if (n += "元", f !== "00") {
2508
2509
  n === "零元" && (n = "");
2509
- for (let f = 0; f < a.length; f++) {
2510
- const l = Number.parseInt(a[f], 10);
2511
- l !== 0 && (n += r[l] + o[f]);
2510
+ for (let a = 0; a < f.length; a++) {
2511
+ const l = Number.parseInt(f[a], 10);
2512
+ l !== 0 && (n += r[l] + o[a]);
2512
2513
  }
2513
2514
  } else
2514
2515
  n += "整";
@@ -2526,7 +2527,7 @@ function Ko(e, t) {
2526
2527
  function Dt(...e) {
2527
2528
  return (...t) => e.reduce((n, r, i) => r(...i === 0 ? n : [n]), t);
2528
2529
  }
2529
- function Jo(e, ...t) {
2530
+ function zo(e, ...t) {
2530
2531
  return Dt(
2531
2532
  ...t
2532
2533
  )(e);
@@ -2536,7 +2537,7 @@ function It(e, t) {
2536
2537
  e(n), t(n);
2537
2538
  };
2538
2539
  }
2539
- function zo(e, t) {
2540
+ function Jo(e, t) {
2540
2541
  if (D(e))
2541
2542
  return t;
2542
2543
  if (D(t))
@@ -2740,9 +2741,9 @@ function ru(e, t) {
2740
2741
  };
2741
2742
  }
2742
2743
  function Tt(e, t, n, r = 1) {
2743
- const i = [], s = r / 2, o = Math.min(...e.map((f) => f[t])), u = Math.max(...e.map((f) => f[t])), c = Math.min(...e.map((f) => f[n])), a = Math.max(...e.map((f) => f[n]));
2744
- for (let f = o; f <= u; f++) {
2745
- const l = e.filter((h) => h[t] === f), m = l.reduce(
2744
+ const i = [], s = r / 2, o = Math.min(...e.map((a) => a[t])), u = Math.max(...e.map((a) => a[t])), c = Math.min(...e.map((a) => a[n])), f = Math.max(...e.map((a) => a[n]));
2745
+ for (let a = o; a <= u; a++) {
2746
+ const l = e.filter((h) => h[t] === a), m = l.reduce(
2746
2747
  (h, p) => h[n] < p[n] ? h : p,
2747
2748
  l[0]
2748
2749
  ), g = l.reduce(
@@ -2770,8 +2771,8 @@ function Tt(e, t, n, r = 1) {
2770
2771
  }
2771
2772
  }
2772
2773
  }
2773
- for (let f = c; f <= a; f++) {
2774
- const l = e.filter((h) => h[n] === f), m = l.reduce(
2774
+ for (let a = c; a <= f; a++) {
2775
+ const l = e.filter((h) => h[n] === a), m = l.reduce(
2775
2776
  (h, p) => h[t] < p[t] ? h : p,
2776
2777
  l[0]
2777
2778
  ), g = l.reduce(
@@ -2799,17 +2800,17 @@ function Tt(e, t, n, r = 1) {
2799
2800
  }
2800
2801
  }
2801
2802
  }
2802
- if (i.map((f) => [
2803
- { [t]: f[0][t], [n]: f[0][n] },
2804
- { [t]: f[1][t], [n]: f[1][n] }
2803
+ if (i.map((a) => [
2804
+ { [t]: a[0][t], [n]: a[0][n] },
2805
+ { [t]: a[1][t], [n]: a[1][n] }
2805
2806
  ]), i.length > 1) {
2806
- let f = i[0];
2807
- const l = i.slice(1), m = [f];
2808
- for (; f; ) {
2807
+ let a = i[0];
2808
+ const l = i.slice(1), m = [a];
2809
+ for (; a; ) {
2809
2810
  const g = l.find(
2810
- (h) => f[1][t] === h[0][t] && f[1][n] === h[0][n] && !(h[1][t] === f[0][t] && h[1][n] === f[0][n])
2811
+ (h) => a[1][t] === h[0][t] && a[1][n] === h[0][n] && !(h[1][t] === a[0][t] && h[1][n] === a[0][n])
2811
2812
  );
2812
- g && m.push(g), f = g;
2813
+ g && m.push(g), a = g;
2813
2814
  }
2814
2815
  return m;
2815
2816
  }
@@ -3023,7 +3024,7 @@ export {
3023
3024
  Dn as arrayGroupMap,
3024
3025
  Xe as arrayHas,
3025
3026
  lr as arrayIncludeIndexes,
3026
- Jn as arrayIncludes,
3027
+ zn as arrayIncludes,
3027
3028
  Mn as arrayInsert,
3028
3029
  Rn as arrayInsertInterval,
3029
3030
  In as arrayIsDuplicate,
@@ -3036,7 +3037,7 @@ export {
3036
3037
  vn as arrayMap,
3037
3038
  ir as arrayMapToObject,
3038
3039
  Xn as arrayMerge,
3039
- zn as arrayNotIn,
3040
+ Jn as arrayNotIn,
3040
3041
  Dr as arrayObjectFieldNotEmptySame,
3041
3042
  Or as arrayObjectFieldSame,
3042
3043
  cr as arrayObjectMultiSort,
@@ -3096,12 +3097,12 @@ export {
3096
3097
  $i as divideBy,
3097
3098
  Kr as domAddClassNames,
3098
3099
  Yr as domContains,
3099
- Jr as domRemoveClassNames,
3100
+ zr as domRemoveClassNames,
3100
3101
  $o as downloadBuffer,
3101
3102
  Ro as downloadFile,
3102
3103
  Mo as downloadURL,
3103
3104
  cu as emptyCoalesce,
3104
- Ji as emptyCoalescing,
3105
+ zi as emptyCoalescing,
3105
3106
  Er as emptyFunction,
3106
3107
  R as ensureArray,
3107
3108
  Zo as ensureArrayJoin,
@@ -3162,8 +3163,8 @@ export {
3162
3163
  Cs as getPrevYearDate,
3163
3164
  Gs as getRangeDateMonthSegments,
3164
3165
  qs as getRangeDateYearSegments,
3165
- zs as getToday,
3166
- Js as getTodayEndTimestamp,
3166
+ Js as getToday,
3167
+ zs as getTodayEndTimestamp,
3167
3168
  Ks as getTodayStartTimestamp,
3168
3169
  ou as h5,
3169
3170
  qo as hexToArgb,
@@ -3173,7 +3174,7 @@ export {
3173
3174
  ri as htmlElementRemoveChild,
3174
3175
  Qi as ifElse,
3175
3176
  K as ifNaNReplace,
3176
- zi as ifReplace,
3177
+ Ji as ifReplace,
3177
3178
  Zi as ifReturn,
3178
3179
  fu as iif,
3179
3180
  Ni as inputNumberMask,
@@ -3191,7 +3192,7 @@ export {
3191
3192
  Wt as isEmptyString,
3192
3193
  Kt as isEqual,
3193
3194
  hn as isEqualZero,
3194
- Jt as isEveryVoid,
3195
+ zt as isEveryVoid,
3195
3196
  rn as isFalse,
3196
3197
  tn as isFasly,
3197
3198
  au as isFormData,
@@ -3217,7 +3218,7 @@ export {
3217
3218
  cn as isSomeNotVoid,
3218
3219
  un as isSomeVoid,
3219
3220
  L as isString,
3220
- J as isTreeBranch,
3221
+ z as isTreeBranch,
3221
3222
  ae as isTreeLeaf,
3222
3223
  sn as isTrue,
3223
3224
  nn as isTruly,
@@ -3225,9 +3226,9 @@ export {
3225
3226
  Xt as isUndefined,
3226
3227
  k as isValidDate,
3227
3228
  an as isValidNumber,
3228
- z as isVoid,
3229
+ J as isVoid,
3229
3230
  en as isWebViewBrowser,
3230
- zt as isWeixinBrowser,
3231
+ Jt as isWeixinBrowser,
3231
3232
  Xo as jsonParser,
3232
3233
  co as localStorageDelete,
3233
3234
  oo as localStorageGet,
@@ -3239,7 +3240,7 @@ export {
3239
3240
  po as memoStore,
3240
3241
  Mr as mergeArray,
3241
3242
  Ms as mergeObject,
3242
- zo as mergeProps,
3243
+ Jo as mergeProps,
3243
3244
  ki as multiply,
3244
3245
  Ci as multiplyBy,
3245
3246
  uu as nullishCoalesce,
@@ -3283,7 +3284,7 @@ export {
3283
3284
  Pt as parseURL,
3284
3285
  yi as percentFormatter,
3285
3286
  Dt as pipe,
3286
- Jo as pipeWith,
3287
+ zo as pipeWith,
3287
3288
  Do as promiseQueue,
3288
3289
  pe as qs,
3289
3290
  ns as queryStructure,
@@ -3304,7 +3305,7 @@ export {
3304
3305
  ho as safeGet,
3305
3306
  Ao as selectFile,
3306
3307
  _r as setDOMStyle,
3307
- zr as setDOMStylePropertys,
3308
+ Jr as setDOMStylePropertys,
3308
3309
  Wr as setHtmlInputValue,
3309
3310
  Ii as shareAmount,
3310
3311
  ht as smartCompare,
@@ -3335,8 +3336,8 @@ export {
3335
3336
  Q as treeCollect,
3336
3337
  Tr as treeDelete,
3337
3338
  Lr as treeDepth,
3338
- ze as treeExcludeNodes,
3339
- Je as treeFilter,
3339
+ Je as treeExcludeNodes,
3340
+ ze as treeFilter,
3340
3341
  Cr as treeFind,
3341
3342
  Fr as treeFindNodePath,
3342
3343
  jr as treeForeach,