jk-vue-comps 0.1.8 → 0.1.10

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.
@@ -0,0 +1,175 @@
1
+ import { nextTick as S, createVNode as N } from "vue";
2
+ import { isString as u, isHtmlStr as m, isObject as l, isNumber as p, is as $, isArray as b, isBoolean as x, isClient as O, isDate as v, isDef as P, isEdgeBrowser as T, isElement as U, isEmail as y, isEmpty as E, isFunction as B, isInMobileBrowser as I, isIp as L, isMap as D, isNull as k, isNullAndUnDef as q, isNullOrUnDef as F, isPromise as M, isPromiseLink as R, isRegExp as _, isServer as W, isUnDef as j, isUrl as z, isValidPhoneNumber as H, isWindow as V, isZhLang as A } from "../utils/is.js";
3
+ import { isNanValue as d, toNum as g, BigNumber as C, DOWN as G, UP as Z, add as J, divide as K, formatRate as Q, helper as X, isBigNum as Y, isBool as ee, isEqualTo as ie, isGreaterThan as te, isGreaterThanOrEqualTo as ne, isInt as re, isLessThan as oe, isLessThanOrEqualTo as se, isNum as ue, multiply as ae, power as le, subtract as fe, toBigNum as ce, toDecimalPlaces as me, toInt as pe, toLocaleString as de, toString as ge, unFormatRate as he } from "../utils/math.js";
4
+ import { propTypes as we } from "../utils/vuePropTypes.js";
5
+ import { timeZoneOptions as Se } from "../utils/timeZone.js";
6
+ import { withInstall as Ne } from "../utils/withInstall.js";
7
+ function a(i) {
8
+ try {
9
+ return new Function(`'use strict'; return (${i});`)();
10
+ } catch {
11
+ return null;
12
+ }
13
+ }
14
+ function h(i, n = "float", t = 6) {
15
+ let e = String(i);
16
+ if (e = e.replace(/(^\s*)|(\s*$)/g, ""), e !== "") {
17
+ const r = e.indexOf("0") === 0 && e.length > 1 && e.indexOf(".") !== 1, o = n === "int" ? /[^\d]/g : /[^\d.]/g;
18
+ if (e = e.replace(o, ""), r)
19
+ return "0";
20
+ if (n === "int")
21
+ e = e.indexOf("0") === 0 && e.length > 1 ? e.substring(0, e.length - 1) : e;
22
+ else {
23
+ const s = a(`/\\.{${t},}/g`), f = a(`/^(\\d?)+(\\.\\d{0,${t}})?$/`);
24
+ e.indexOf(".") === 0 ? (e = "", e = e.replace(/[^$#$]/g, "0."), e = e.replace(s, ".")) : f.test(e) || (e = e.substring(0, e.length - 1));
25
+ }
26
+ }
27
+ return e;
28
+ }
29
+ function $e(i, n, t, e = "int", r = 6) {
30
+ return (o) => {
31
+ S().then(() => {
32
+ var s;
33
+ i[n] = h((s = o == null ? void 0 : o.target) == null ? void 0 : s.value, e, r), t == null || t();
34
+ });
35
+ };
36
+ }
37
+ function be(i) {
38
+ return !u(i) || !m(i) ? i : N("div", { innerHTML: i });
39
+ }
40
+ function xe() {
41
+ return window ? `${window.location.protocol}//${window.location.hostname}` : "";
42
+ }
43
+ function Oe() {
44
+ const i = new URLSearchParams(window.location.search);
45
+ if (!i.size)
46
+ return;
47
+ const n = {};
48
+ for (const [t, e] of i.entries())
49
+ n[t] = e;
50
+ return n;
51
+ }
52
+ function ve(i) {
53
+ return u(i) ? i.replace(/\s+/g, "") : "";
54
+ }
55
+ function w(i = {}, n = {}) {
56
+ let t;
57
+ for (t in n)
58
+ i[t] = l(i[t]) ? w(i[t], n[t]) : i[t] = n[t];
59
+ return i;
60
+ }
61
+ function Pe(i, n = 6, t = {
62
+ showPrefix: !0,
63
+ showSuffix: !0,
64
+ middleStr: "****"
65
+ }) {
66
+ if (!u(i) && !p(i))
67
+ return i;
68
+ const e = String(i), r = (e == null ? void 0 : e.length) ?? 0;
69
+ if (!e || !r || n <= 0)
70
+ return e;
71
+ const o = t.showPrefix ? e.substring(0, n) : "", s = t.showSuffix ? e.substring(r - n) : "";
72
+ return `${o}${t.middleStr}${s}`;
73
+ }
74
+ function Te(i, n = "px") {
75
+ if (!(i === null || i === "" || i === void 0))
76
+ return d(i) ? String(i) : `${g(i)}${n}`;
77
+ }
78
+ function Ue(i) {
79
+ return i ? l(i) ? i : i.split(";").reduce((n, t) => {
80
+ const [e, r] = t.trim().split(":");
81
+ if (e) {
82
+ const s = e.trim().replace(/-(\w)/g, (f, c) => c ? c.toUpperCase() : "");
83
+ n[s] = r.trim();
84
+ }
85
+ return n;
86
+ }, {}) : {};
87
+ }
88
+ const ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
89
+ __proto__: null,
90
+ BigNumber: C,
91
+ DOWN: G,
92
+ UP: Z,
93
+ add: J,
94
+ deepMerge: w,
95
+ desensitization: Pe,
96
+ divide: K,
97
+ evalPro: a,
98
+ filterInputNum: h,
99
+ formatRate: Q,
100
+ generateFilterInputNumFn: $e,
101
+ getRouterParams: Oe,
102
+ getWebsiteUrl: xe,
103
+ helper: X,
104
+ is: $,
105
+ isArray: b,
106
+ isBigNum: Y,
107
+ isBool: ee,
108
+ isBoolean: x,
109
+ isClient: O,
110
+ isDate: v,
111
+ isDef: P,
112
+ isEdgeBrowser: T,
113
+ isElement: U,
114
+ isEmail: y,
115
+ isEmpty: E,
116
+ isEqualTo: ie,
117
+ isFunction: B,
118
+ isGreaterThan: te,
119
+ isGreaterThanOrEqualTo: ne,
120
+ isHtmlStr: m,
121
+ isInMobileBrowser: I,
122
+ isInt: re,
123
+ isIp: L,
124
+ isLessThan: oe,
125
+ isLessThanOrEqualTo: se,
126
+ isMap: D,
127
+ isNanValue: d,
128
+ isNull: k,
129
+ isNullAndUnDef: q,
130
+ isNullOrUnDef: F,
131
+ isNum: ue,
132
+ isNumber: p,
133
+ isObject: l,
134
+ isPromise: M,
135
+ isPromiseLink: R,
136
+ isRegExp: _,
137
+ isServer: W,
138
+ isString: u,
139
+ isUnDef: j,
140
+ isUrl: z,
141
+ isValidPhoneNumber: H,
142
+ isWindow: V,
143
+ isZhLang: A,
144
+ multiply: ae,
145
+ power: le,
146
+ propTypes: we,
147
+ removeWhitespace: ve,
148
+ renderHtmlStr: be,
149
+ subtract: fe,
150
+ timeZoneOptions: Se,
151
+ toBigNum: ce,
152
+ toDecimalPlaces: me,
153
+ toInt: pe,
154
+ toLocaleString: de,
155
+ toNum: g,
156
+ toString: ge,
157
+ toStyleObject: Ue,
158
+ toStyleUnit: Te,
159
+ unFormatRate: he,
160
+ withInstall: Ne
161
+ }, Symbol.toStringTag, { value: "Module" }));
162
+ export {
163
+ ke as U,
164
+ xe as a,
165
+ Oe as b,
166
+ ve as c,
167
+ w as d,
168
+ a as e,
169
+ h as f,
170
+ $e as g,
171
+ Pe as h,
172
+ Ue as i,
173
+ be as r,
174
+ Te as t
175
+ };
@@ -9,5 +9,5 @@ const g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9
9
  toTelegramAuth: l
10
10
  }, Symbol.toStringTag, { value: "Module" }));
11
11
  export {
12
- g as c
12
+ g as C
13
13
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as h, ref as g, onMounted as w, createVNode as b } from "vue";
2
2
  import { propTypes as m } from "../utils/vuePropTypes.js";
3
- import { a as _ } from "../chunks/index-BPap5bmS.js";
3
+ import { a as _ } from "../chunks/index-BE5vnR2C.js";
4
4
  import { withInstall as A } from "../utils/withInstall.js";
5
5
  import { isEdgeBrowser as C, isInMobileBrowser as p } from "../utils/is.js";
6
6
  function d(r, o) {
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import * as comps from './components';
2
- import * as utils from './utils';
1
+ import * as Comps from './components';
2
+ import * as Utils from './utils';
3
3
  export * from './components';
4
4
  export * from './utils';
5
5
  declare const JKVUEComps: {
6
- Utils: typeof utils;
7
- Comps: typeof comps;
6
+ Utils: typeof Utils;
7
+ Comps: typeof Comps;
8
8
  evalPro(str: string): any;
9
9
  filterInputNum(eventVal: string | number, type?: "int" | "float", maxDecimal?: number): string;
10
- generateFilterInputNumFn<T extends Record<string, any>, K extends keyof T>(obj: T, key: K, fn?: (() => void) | undefined, type?: "int" | "float", maxDecimal?: number): (e: ChangeEvent) => void;
10
+ generateFilterInputNumFn<T extends Recordable<any>, K extends keyof T>(obj: T, key: K, fn?: (() => void) | undefined, type?: "int" | "float", maxDecimal?: number): (e: ChangeEvent) => void;
11
11
  renderHtmlStr(html: string): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
12
  [key: string]: any;
13
13
  }>;
@@ -20,6 +20,8 @@ declare const JKVUEComps: {
20
20
  showSuffix?: boolean | undefined;
21
21
  middleStr?: string | undefined;
22
22
  }): string | undefined;
23
+ toStyleUnit(str?: string | number | null | undefined, unit?: string): string | undefined;
24
+ toStyleObject(style?: string | Recordable<any> | null | undefined): Recordable<any>;
23
25
  is(val: unknown, type: string): boolean;
24
26
  isDef<T_2 = unknown>(val?: T_2 | undefined): val is T_2;
25
27
  isUnDef<T_3 = unknown>(val?: T_3 | undefined): val is T_3;
@@ -50,7 +52,7 @@ declare const JKVUEComps: {
50
52
  isIp: (ip: string) => boolean;
51
53
  isEmail: (email: string) => boolean;
52
54
  isHtmlStr: (str: string) => boolean;
53
- helper(val: utils.BigNumValType): import("bignumber.js").BigNumber;
55
+ helper(val: Utils.BigNumValType): import("bignumber.js").BigNumber;
54
56
  isBool(val: any): val is boolean;
55
57
  isBigNum(val: any): val is import("bignumber.js").BigNumber;
56
58
  isNum(val: any): val is number;
@@ -61,21 +63,24 @@ declare const JKVUEComps: {
61
63
  isEqualTo(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
62
64
  isGreaterThanOrEqualTo(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
63
65
  isLessThanOrEqualTo(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
64
- toBigNum(val: utils.BigNumValType): import("bignumber.js").BigNumber;
65
- toNum(val: utils.BigNumValType): number;
66
- toInt(val: utils.BigNumValType, isUp?: boolean): number;
67
- toString(val: utils.BigNumValType): string;
68
- toDecimalPlaces(val: utils.BigNumValType, decimal?: number | undefined, isUp?: boolean): number;
69
- toLocaleString(val: utils.BigNumValType): string;
70
- add(...vals: utils.BigNumValType[]): number;
71
- subtract(...vals: utils.BigNumValType[]): number;
72
- multiply(...vals: utils.BigNumValType[]): number;
73
- divide(...vals: utils.BigNumValType[]): number;
74
- power(base: utils.BigNumValType, exponent: utils.BigNumValType): number;
75
- formatRate(val: utils.BigNumValType, unit?: string): string;
76
- unFormatRate(val: utils.BigNumValType): number;
66
+ toBigNum(val: Utils.BigNumValType): import("bignumber.js").BigNumber;
67
+ toNum(val: Utils.BigNumValType): number;
68
+ toInt(val: Utils.BigNumValType, isUp?: boolean): number;
69
+ toString(val: Utils.BigNumValType): string;
70
+ toDecimalPlaces(val: Utils.BigNumValType, decimal?: number | undefined, isUp?: boolean): number;
71
+ toLocaleString(val: Utils.BigNumValType): string;
72
+ add(...vals: Utils.BigNumValType[]): number;
73
+ subtract(...vals: Utils.BigNumValType[]): number;
74
+ multiply(...vals: Utils.BigNumValType[]): number;
75
+ divide(...vals: Utils.BigNumValType[]): number;
76
+ power(base: Utils.BigNumValType, exponent: Utils.BigNumValType): number;
77
+ formatRate(val: Utils.BigNumValType, unit?: string): string;
78
+ unFormatRate(val: Utils.BigNumValType): number;
79
+ DOWN: 1;
80
+ UP: 0;
81
+ BigNumber: typeof import("bignumber.js").BigNumber;
77
82
  propTypes: typeof import("./utils/vuePropTypes").default;
78
- timeZoneOptions: utils.TimeZoneItem[];
83
+ timeZoneOptions: Utils.TimeZoneItem[];
79
84
  withInstall<T_7>(component: T_7, alias?: string | undefined): T_7 & import("vue").Plugin;
80
85
  toGoogleAuth(clientId: string, redirectUri: string): void;
81
86
  GoogleAuth: {
@@ -166,10 +171,10 @@ declare const JKVUEComps: {
166
171
  startCheck: () => void;
167
172
  };
168
173
  }>> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & ({
169
- readonly toGoogleAuth: typeof comps.toGoogleAuth;
174
+ readonly toGoogleAuth: typeof Comps.toGoogleAuth;
170
175
  } & import("vue").Plugin)));
171
176
  toTelegramAuth(botId: number, toPath: string): void;
172
- getTelegramAuthUrlParams(): comps.TgUserData | null;
177
+ getTelegramAuthUrlParams(): Comps.TgUserData | null;
173
178
  TelegramAuth: {
174
179
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
175
180
  botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").ValidatorFunction<number>> & {
@@ -179,10 +184,10 @@ declare const JKVUEComps: {
179
184
  default: string;
180
185
  };
181
186
  }>> & {
182
- onCallback?: ((_user: comps.TgUserData) => any) | undefined;
187
+ onCallback?: ((_user: Comps.TgUserData) => any) | undefined;
183
188
  onRejectCallback?: (() => any) | undefined;
184
189
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
185
- callback: (_user: comps.TgUserData) => true;
190
+ callback: (_user: Comps.TgUserData) => true;
186
191
  rejectCallback: () => true;
187
192
  }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
188
193
  botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").ValidatorFunction<number>> & {
@@ -192,7 +197,7 @@ declare const JKVUEComps: {
192
197
  default: string;
193
198
  };
194
199
  }>> & {
195
- onCallback?: ((_user: comps.TgUserData) => any) | undefined;
200
+ onCallback?: ((_user: Comps.TgUserData) => any) | undefined;
196
201
  onRejectCallback?: (() => any) | undefined;
197
202
  }, {
198
203
  botId: number;
@@ -216,7 +221,7 @@ declare const JKVUEComps: {
216
221
  default: string;
217
222
  };
218
223
  }>> & {
219
- onCallback?: ((_user: comps.TgUserData) => any) | undefined;
224
+ onCallback?: ((_user: Comps.TgUserData) => any) | undefined;
220
225
  onRejectCallback?: (() => any) | undefined;
221
226
  }, () => JSX.Element, {}, {}, {}, {
222
227
  botId: number;
@@ -233,10 +238,10 @@ declare const JKVUEComps: {
233
238
  default: string;
234
239
  };
235
240
  }>> & {
236
- onCallback?: ((_user: comps.TgUserData) => any) | undefined;
241
+ onCallback?: ((_user: Comps.TgUserData) => any) | undefined;
237
242
  onRejectCallback?: (() => any) | undefined;
238
243
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
239
- callback: (_user: comps.TgUserData) => true;
244
+ callback: (_user: Comps.TgUserData) => true;
240
245
  rejectCallback: () => true;
241
246
  }, string, {
242
247
  botId: number;
@@ -246,8 +251,8 @@ declare const JKVUEComps: {
246
251
  startCheck: () => void;
247
252
  };
248
253
  }>> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & ({
249
- readonly toTelegramAuth: typeof comps.toTelegramAuth;
250
- readonly getTelegramAuthUrlParams: typeof comps.getTelegramAuthUrlParams;
254
+ readonly toTelegramAuth: typeof Comps.toTelegramAuth;
255
+ readonly getTelegramAuthUrlParams: typeof Comps.getTelegramAuthUrlParams;
251
256
  } & import("vue").Plugin)));
252
257
  };
253
258
  export default JKVUEComps;
package/dist/index.js CHANGED
@@ -1,90 +1,95 @@
1
- import { c as e } from "./chunks/index-BP9Q78TM.js";
2
- import { u as s } from "./chunks/index-BPap5bmS.js";
3
- import { d as l, h as m, e as n, f as u, g as p, b as g, a as f, c as h, r as d } from "./chunks/index-BPap5bmS.js";
4
- import { GoogleAuth as c, toGoogleAuth as T } from "./components/GoogleAuth.js";
5
- import { TelegramAuth as E, getTelegramAuthUrlParams as U, toTelegramAuth as b } from "./components/TelegramAuth.js";
6
- import { is as I, isArray as P, isBoolean as B, isClient as D, isDate as S, isDef as w, isEdgeBrowser as L, isElement as O, isEmail as v, isEmpty as y, isFunction as F, isHtmlStr as G, isInMobileBrowser as R, isIp as q, isMap as C, isNull as M, isNullAndUnDef as V, isNullOrUnDef as W, isNumber as H, isObject as Z, isPromise as j, isPromiseLink as k, isRegExp as z, isServer as J, isString as K, isUnDef as Q, isUrl as X, isValidPhoneNumber as Y, isWindow as _, isZhLang as $ } from "./utils/is.js";
7
- import { add as se, divide as ie, formatRate as re, helper as te, isBigNum as oe, isBool as ae, isEqualTo as le, isGreaterThan as me, isGreaterThanOrEqualTo as ne, isInt as ue, isLessThan as pe, isLessThanOrEqualTo as ge, isNanValue as fe, isNum as he, multiply as de, power as Ne, subtract as ce, toBigNum as Te, toDecimalPlaces as xe, toInt as Ee, toLocaleString as Ue, toNum as be, toString as Ae, unFormatRate as Ie } from "./utils/math.js";
8
- import { propTypes as Be } from "./utils/vuePropTypes.js";
9
- import { timeZoneOptions as Se } from "./utils/timeZone.js";
10
- import { withInstall as Le } from "./utils/withInstall.js";
11
- const t = {
1
+ import { C as e } from "./chunks/index-DyiqKziC.js";
2
+ import { U as s } from "./chunks/index-BE5vnR2C.js";
3
+ import { d as l, h as m, e as n, f as u, g as p, b as g, a as f, c as h, r as N, i as d, t as T } from "./chunks/index-BE5vnR2C.js";
4
+ import { GoogleAuth as c, toGoogleAuth as x } from "./components/GoogleAuth.js";
5
+ import { TelegramAuth as E, getTelegramAuthUrlParams as P, toTelegramAuth as S } from "./components/TelegramAuth.js";
6
+ import { is as B, isArray as D, isBoolean as I, isClient as O, isDate as y, isDef as w, isEdgeBrowser as L, isElement as v, isEmail as C, isEmpty as F, isFunction as G, isHtmlStr as R, isInMobileBrowser as W, isIp as q, isMap as M, isNull as V, isNullAndUnDef as j, isNullOrUnDef as H, isNumber as Z, isObject as k, isPromise as z, isPromiseLink as J, isRegExp as K, isServer as Q, isString as X, isUnDef as Y, isUrl as _, isValidPhoneNumber as $, isWindow as ee, isZhLang as se } from "./utils/is.js";
7
+ import { BigNumber as ie, DOWN as re, UP as oe, add as ae, divide as le, formatRate as me, helper as ne, isBigNum as ue, isBool as pe, isEqualTo as ge, isGreaterThan as fe, isGreaterThanOrEqualTo as he, isInt as Ne, isLessThan as de, isLessThanOrEqualTo as Te, isNanValue as Ue, isNum as ce, multiply as xe, power as be, subtract as Ee, toBigNum as Pe, toDecimalPlaces as Se, toInt as Ae, toLocaleString as Be, toNum as De, toString as Ie, unFormatRate as Oe } from "./utils/math.js";
8
+ import { propTypes as we } from "./utils/vuePropTypes.js";
9
+ import { timeZoneOptions as ve } from "./utils/timeZone.js";
10
+ import { withInstall as Fe } from "./utils/withInstall.js";
11
+ const r = {
12
12
  ...e,
13
13
  ...s,
14
14
  Utils: s,
15
15
  Comps: e
16
16
  };
17
17
  export {
18
+ ie as BigNumber,
19
+ re as DOWN,
18
20
  c as GoogleAuth,
19
21
  E as TelegramAuth,
20
- se as add,
22
+ oe as UP,
23
+ ae as add,
21
24
  l as deepMerge,
22
- t as default,
25
+ r as default,
23
26
  m as desensitization,
24
- ie as divide,
27
+ le as divide,
25
28
  n as evalPro,
26
29
  u as filterInputNum,
27
- re as formatRate,
30
+ me as formatRate,
28
31
  p as generateFilterInputNumFn,
29
32
  g as getRouterParams,
30
- U as getTelegramAuthUrlParams,
33
+ P as getTelegramAuthUrlParams,
31
34
  f as getWebsiteUrl,
32
- te as helper,
33
- I as is,
34
- P as isArray,
35
- oe as isBigNum,
36
- ae as isBool,
37
- B as isBoolean,
38
- D as isClient,
39
- S as isDate,
35
+ ne as helper,
36
+ B as is,
37
+ D as isArray,
38
+ ue as isBigNum,
39
+ pe as isBool,
40
+ I as isBoolean,
41
+ O as isClient,
42
+ y as isDate,
40
43
  w as isDef,
41
44
  L as isEdgeBrowser,
42
- O as isElement,
43
- v as isEmail,
44
- y as isEmpty,
45
- le as isEqualTo,
46
- F as isFunction,
47
- me as isGreaterThan,
48
- ne as isGreaterThanOrEqualTo,
49
- G as isHtmlStr,
50
- R as isInMobileBrowser,
51
- ue as isInt,
45
+ v as isElement,
46
+ C as isEmail,
47
+ F as isEmpty,
48
+ ge as isEqualTo,
49
+ G as isFunction,
50
+ fe as isGreaterThan,
51
+ he as isGreaterThanOrEqualTo,
52
+ R as isHtmlStr,
53
+ W as isInMobileBrowser,
54
+ Ne as isInt,
52
55
  q as isIp,
53
- pe as isLessThan,
54
- ge as isLessThanOrEqualTo,
55
- C as isMap,
56
- fe as isNanValue,
57
- M as isNull,
58
- V as isNullAndUnDef,
59
- W as isNullOrUnDef,
60
- he as isNum,
61
- H as isNumber,
62
- Z as isObject,
63
- j as isPromise,
64
- k as isPromiseLink,
65
- z as isRegExp,
66
- J as isServer,
67
- K as isString,
68
- Q as isUnDef,
69
- X as isUrl,
70
- Y as isValidPhoneNumber,
71
- _ as isWindow,
72
- $ as isZhLang,
73
- de as multiply,
74
- Ne as power,
75
- Be as propTypes,
56
+ de as isLessThan,
57
+ Te as isLessThanOrEqualTo,
58
+ M as isMap,
59
+ Ue as isNanValue,
60
+ V as isNull,
61
+ j as isNullAndUnDef,
62
+ H as isNullOrUnDef,
63
+ ce as isNum,
64
+ Z as isNumber,
65
+ k as isObject,
66
+ z as isPromise,
67
+ J as isPromiseLink,
68
+ K as isRegExp,
69
+ Q as isServer,
70
+ X as isString,
71
+ Y as isUnDef,
72
+ _ as isUrl,
73
+ $ as isValidPhoneNumber,
74
+ ee as isWindow,
75
+ se as isZhLang,
76
+ xe as multiply,
77
+ be as power,
78
+ we as propTypes,
76
79
  h as removeWhitespace,
77
- d as renderHtmlStr,
78
- ce as subtract,
79
- Se as timeZoneOptions,
80
- Te as toBigNum,
81
- xe as toDecimalPlaces,
82
- T as toGoogleAuth,
83
- Ee as toInt,
84
- Ue as toLocaleString,
85
- be as toNum,
86
- Ae as toString,
87
- b as toTelegramAuth,
88
- Ie as unFormatRate,
89
- Le as withInstall
80
+ N as renderHtmlStr,
81
+ Ee as subtract,
82
+ ve as timeZoneOptions,
83
+ Pe as toBigNum,
84
+ Se as toDecimalPlaces,
85
+ x as toGoogleAuth,
86
+ Ae as toInt,
87
+ Be as toLocaleString,
88
+ De as toNum,
89
+ Ie as toString,
90
+ d as toStyleObject,
91
+ T as toStyleUnit,
92
+ S as toTelegramAuth,
93
+ Oe as unFormatRate,
94
+ Fe as withInstall
90
95
  };
@@ -18,7 +18,7 @@ export declare function filterInputNum(eventVal: string | number, type?: 'int' |
18
18
  * @param type 输入类型,int整数,float,default: 'int'
19
19
  * @param maxDecimal 最大小数位,default: 6
20
20
  */
21
- export declare function generateFilterInputNumFn<T extends Record<string, any>, K extends keyof T>(obj: T, key: K, fn?: () => void, type?: 'float' | 'int', maxDecimal?: number): (e: ChangeEvent) => void;
21
+ export declare function generateFilterInputNumFn<T extends Recordable, K extends keyof T>(obj: T, key: K, fn?: () => void, type?: 'float' | 'int', maxDecimal?: number): (e: ChangeEvent) => void;
22
22
  /** 渲染Html字符串片段 */
23
23
  export declare function renderHtmlStr(html: string): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
24
24
  [key: string]: any;
@@ -45,3 +45,10 @@ export declare function desensitization(str?: string | number, number?: number,
45
45
  showSuffix?: boolean;
46
46
  middleStr?: string;
47
47
  }): string | undefined;
48
+ /** 数字转为样式单位
49
+ * @param str 值
50
+ * @param unit 单位,default: 'px'
51
+ */
52
+ export declare function toStyleUnit(str?: string | number | null, unit?: string): string | undefined;
53
+ /** 数字转为样式对象 */
54
+ export declare function toStyleObject(style?: string | Recordable | null): Recordable<any>;
@@ -1,75 +1,80 @@
1
1
  import "vue";
2
- import { is as r, isArray as t, isBoolean as o, isClient as a, isDate as n, isDef as l, isEdgeBrowser as m, isElement as p, isEmail as u, isEmpty as f, isFunction as g, isHtmlStr as d, isInMobileBrowser as N, isIp as h, isMap as c, isNull as E, isNullAndUnDef as T, isNullOrUnDef as b, isNumber as x, isObject as I, isPromise as B, isPromiseLink as D, isRegExp as P, isServer as S, isString as w, isUnDef as L, isUrl as O, isValidPhoneNumber as U, isWindow as v, isZhLang as y } from "./is.js";
3
- import { add as R, divide as q, formatRate as M, helper as W, isBigNum as A, isBool as G, isEqualTo as H, isGreaterThan as V, isGreaterThanOrEqualTo as Z, isInt as j, isLessThan as k, isLessThanOrEqualTo as z, isNanValue as C, isNum as J, multiply as K, power as Q, subtract as X, toBigNum as Y, toDecimalPlaces as _, toInt as $, toLocaleString as ee, toNum as ie, toString as se, unFormatRate as re } from "./math.js";
4
- import { propTypes as oe } from "./vuePropTypes.js";
5
- import { timeZoneOptions as ne } from "./timeZone.js";
6
- import { withInstall as me } from "./withInstall.js";
7
- import { d as ue, h as fe, e as ge, f as de, g as Ne, b as he, a as ce, c as Ee, r as Te } from "../chunks/index-BPap5bmS.js";
2
+ import { is as t, isArray as r, isBoolean as o, isClient as a, isDate as n, isDef as l, isEdgeBrowser as m, isElement as u, isEmail as p, isEmpty as g, isFunction as N, isHtmlStr as f, isInMobileBrowser as d, isIp as h, isMap as b, isNull as c, isNullAndUnDef as E, isNullOrUnDef as S, isNumber as T, isObject as x, isPromise as B, isPromiseLink as D, isRegExp as I, isServer as O, isString as P, isUnDef as U, isUrl as y, isValidPhoneNumber as w, isWindow as L, isZhLang as v } from "./is.js";
3
+ import { BigNumber as R, DOWN as W, UP as q, add as M, divide as j, formatRate as A, helper as G, isBigNum as H, isBool as V, isEqualTo as Z, isGreaterThan as k, isGreaterThanOrEqualTo as z, isInt as C, isLessThan as J, isLessThanOrEqualTo as K, isNanValue as Q, isNum as X, multiply as Y, power as _, subtract as $, toBigNum as ee, toDecimalPlaces as ie, toInt as se, toLocaleString as te, toNum as re, toString as oe, unFormatRate as ae } from "./math.js";
4
+ import { propTypes as le } from "./vuePropTypes.js";
5
+ import { timeZoneOptions as ue } from "./timeZone.js";
6
+ import { withInstall as ge } from "./withInstall.js";
7
+ import { d as fe, h as de, e as he, f as be, g as ce, b as Ee, a as Se, c as Te, r as xe, i as Be, t as De } from "../chunks/index-BE5vnR2C.js";
8
8
  export {
9
- R as add,
10
- ue as deepMerge,
11
- fe as desensitization,
12
- q as divide,
13
- ge as evalPro,
14
- de as filterInputNum,
15
- M as formatRate,
16
- Ne as generateFilterInputNumFn,
17
- he as getRouterParams,
18
- ce as getWebsiteUrl,
19
- W as helper,
20
- r as is,
21
- t as isArray,
22
- A as isBigNum,
23
- G as isBool,
9
+ R as BigNumber,
10
+ W as DOWN,
11
+ q as UP,
12
+ M as add,
13
+ fe as deepMerge,
14
+ de as desensitization,
15
+ j as divide,
16
+ he as evalPro,
17
+ be as filterInputNum,
18
+ A as formatRate,
19
+ ce as generateFilterInputNumFn,
20
+ Ee as getRouterParams,
21
+ Se as getWebsiteUrl,
22
+ G as helper,
23
+ t as is,
24
+ r as isArray,
25
+ H as isBigNum,
26
+ V as isBool,
24
27
  o as isBoolean,
25
28
  a as isClient,
26
29
  n as isDate,
27
30
  l as isDef,
28
31
  m as isEdgeBrowser,
29
- p as isElement,
30
- u as isEmail,
31
- f as isEmpty,
32
- H as isEqualTo,
33
- g as isFunction,
34
- V as isGreaterThan,
35
- Z as isGreaterThanOrEqualTo,
36
- d as isHtmlStr,
37
- N as isInMobileBrowser,
38
- j as isInt,
32
+ u as isElement,
33
+ p as isEmail,
34
+ g as isEmpty,
35
+ Z as isEqualTo,
36
+ N as isFunction,
37
+ k as isGreaterThan,
38
+ z as isGreaterThanOrEqualTo,
39
+ f as isHtmlStr,
40
+ d as isInMobileBrowser,
41
+ C as isInt,
39
42
  h as isIp,
40
- k as isLessThan,
41
- z as isLessThanOrEqualTo,
42
- c as isMap,
43
- C as isNanValue,
44
- E as isNull,
45
- T as isNullAndUnDef,
46
- b as isNullOrUnDef,
47
- J as isNum,
48
- x as isNumber,
49
- I as isObject,
43
+ J as isLessThan,
44
+ K as isLessThanOrEqualTo,
45
+ b as isMap,
46
+ Q as isNanValue,
47
+ c as isNull,
48
+ E as isNullAndUnDef,
49
+ S as isNullOrUnDef,
50
+ X as isNum,
51
+ T as isNumber,
52
+ x as isObject,
50
53
  B as isPromise,
51
54
  D as isPromiseLink,
52
- P as isRegExp,
53
- S as isServer,
54
- w as isString,
55
- L as isUnDef,
56
- O as isUrl,
57
- U as isValidPhoneNumber,
58
- v as isWindow,
59
- y as isZhLang,
60
- K as multiply,
61
- Q as power,
62
- oe as propTypes,
63
- Ee as removeWhitespace,
64
- Te as renderHtmlStr,
65
- X as subtract,
66
- ne as timeZoneOptions,
67
- Y as toBigNum,
68
- _ as toDecimalPlaces,
69
- $ as toInt,
70
- ee as toLocaleString,
71
- ie as toNum,
72
- se as toString,
73
- re as unFormatRate,
74
- me as withInstall
55
+ I as isRegExp,
56
+ O as isServer,
57
+ P as isString,
58
+ U as isUnDef,
59
+ y as isUrl,
60
+ w as isValidPhoneNumber,
61
+ L as isWindow,
62
+ v as isZhLang,
63
+ Y as multiply,
64
+ _ as power,
65
+ le as propTypes,
66
+ Te as removeWhitespace,
67
+ xe as renderHtmlStr,
68
+ $ as subtract,
69
+ ue as timeZoneOptions,
70
+ ee as toBigNum,
71
+ ie as toDecimalPlaces,
72
+ se as toInt,
73
+ te as toLocaleString,
74
+ re as toNum,
75
+ oe as toString,
76
+ Be as toStyleObject,
77
+ De as toStyleUnit,
78
+ ae as unFormatRate,
79
+ ge as withInstall
75
80
  };
@@ -2,6 +2,9 @@ import BJS from 'bignumber.js';
2
2
  export type BigNumVal = Parameters<typeof BJS>[0];
3
3
  export type BigNumValType = BigNumVal | undefined | null | boolean;
4
4
  export type BigNumObj = BJS;
5
+ export declare const DOWN: 1;
6
+ export declare const UP: 0;
7
+ export declare const BigNumber: typeof BJS;
5
8
  export declare function helper(val: BigNumValType): BigNumObj;
6
9
  /** 是否为boolean值 */
7
10
  export declare function isBool(val: any): val is boolean;
@@ -259,7 +259,7 @@ function Ee(a) {
259
259
  ;
260
260
  }
261
261
  return function(s, t, u, c, i) {
262
- var f, l, o, h, N, m, T, D, L, A, _, v, te, ae, he, X, ie, F = s.s == t.s ? 1 : -1, U = s.c, I = t.c;
262
+ var f, l, o, h, N, m, T, D, L, A, _, v, te, ae, he, W, ie, F = s.s == t.s ? 1 : -1, U = s.c, I = t.c;
263
263
  if (!U || !U[0] || !I || !I[0])
264
264
  return new g(
265
265
  // Return NaN if either NaN, or both Infinity or 0.
@@ -273,19 +273,19 @@ function Ee(a) {
273
273
  if (I[o] > (U[o] || 0) && l--, F < 0)
274
274
  L.push(1), h = !0;
275
275
  else {
276
- for (ae = U.length, X = I.length, o = 0, F += 2, N = $(i / (I[0] + 1)), N > 1 && (I = e(I, N, i), U = e(U, N, i), X = I.length, ae = U.length), te = X, A = U.slice(0, X), _ = A.length; _ < X; A[_++] = 0)
276
+ for (ae = U.length, W = I.length, o = 0, F += 2, N = $(i / (I[0] + 1)), N > 1 && (I = e(I, N, i), U = e(U, N, i), W = I.length, ae = U.length), te = W, A = U.slice(0, W), _ = A.length; _ < W; A[_++] = 0)
277
277
  ;
278
278
  ie = I.slice(), ie = [0].concat(ie), he = I[0], I[1] >= i / 2 && he++;
279
279
  do {
280
- if (N = 0, f = r(I, A, X, _), f < 0) {
281
- if (v = A[0], X != _ && (v = v * i + (A[1] || 0)), N = $(v / he), N > 1)
280
+ if (N = 0, f = r(I, A, W, _), f < 0) {
281
+ if (v = A[0], W != _ && (v = v * i + (A[1] || 0)), N = $(v / he), N > 1)
282
282
  for (N >= i && (N = i - 1), m = e(I, N, i), T = m.length, _ = A.length; r(m, A, T, _) == 1; )
283
- N--, n(m, X < T ? ie : I, T, i), T = m.length, f = 1;
283
+ N--, n(m, W < T ? ie : I, T, i), T = m.length, f = 1;
284
284
  else
285
285
  N == 0 && (f = N = 1), m = I.slice(), T = m.length;
286
286
  if (T < _ && (m = [0].concat(m)), n(A, m, _, i), _ = A.length, f == -1)
287
- for (; r(I, A, X, _) < 1; )
288
- N++, n(A, X < _ ? ie : I, _, i), _ = A.length;
287
+ for (; r(I, A, W, _) < 1; )
288
+ N++, n(A, W < _ ? ie : I, _, i), _ = A.length;
289
289
  } else
290
290
  f === 0 && (N++, A = [0]);
291
291
  L[o++] = N, A[0] ? A[_++] = U[te] || 0 : (A = [U[te]], _ = 1);
@@ -694,125 +694,128 @@ function Z(a, p, d) {
694
694
  p < O && (a = a.slice(0, p) + "." + a.slice(p));
695
695
  return a;
696
696
  }
697
- var W = Ee();
697
+ var X = Ee();
698
+ const Oe = X.ROUND_DOWN, de = X.ROUND_UP, De = X;
698
699
  function x(a) {
699
700
  if (xe(a))
700
- return W(~~a);
701
+ return X(~~a);
701
702
  if (!a)
702
- return W(0);
703
+ return X(0);
703
704
  if (Se(a))
704
- return a.isNaN() ? W(0) : a;
705
- const p = W(a);
706
- return p.isNaN() ? W(0) : p;
705
+ return a.isNaN() ? X(0) : a;
706
+ const p = X(a);
707
+ return p.isNaN() ? X(0) : p;
707
708
  }
708
709
  function xe(a) {
709
710
  return typeof a == "boolean";
710
711
  }
711
712
  function Se(a) {
712
- return W.isBigNumber(a);
713
+ return X.isBigNumber(a);
713
714
  }
714
- function De(a) {
715
+ function Ie(a) {
715
716
  return typeof a == "number" && !Be(a);
716
717
  }
717
718
  function Be(a) {
718
- return a == null || a == null ? !1 : W(a).isNaN();
719
+ return a == null || a == null ? !1 : X(a).isNaN();
719
720
  }
720
- function Ie(a) {
721
- return a == null || a == null ? !1 : W(a).isInteger();
721
+ function Pe(a) {
722
+ return a == null || a == null ? !1 : X(a).isInteger();
722
723
  }
723
- function Oe(a, p) {
724
+ function Ae(a, p) {
724
725
  return x(a).isGreaterThan(x(p));
725
726
  }
726
- function Pe(a, p) {
727
+ function Le(a, p) {
727
728
  return x(a).isLessThan(x(p));
728
729
  }
729
- function Le(a, p) {
730
+ function Me(a, p) {
730
731
  return x(a).isEqualTo(x(p));
731
732
  }
732
- function Me(a, p) {
733
+ function ve(a, p) {
733
734
  return x(a).isGreaterThanOrEqualTo(x(p));
734
735
  }
735
- function ve(a, p) {
736
+ function Ue(a, p) {
736
737
  return x(a).isLessThanOrEqualTo(x(p));
737
738
  }
738
- const de = W.ROUND_DOWN, Ae = W.ROUND_UP;
739
739
  function Re(a) {
740
740
  return x(a);
741
741
  }
742
742
  function re(a) {
743
743
  return x(a).toNumber();
744
744
  }
745
- function Ue(a, p = !1) {
746
- return re(x(a).integerValue(p ? Ae : de));
745
+ function Ce(a, p = !1) {
746
+ return re(x(a).integerValue(p ? de : Oe));
747
747
  }
748
- function Ce(a) {
748
+ function Ge(a) {
749
749
  return x(a).toString();
750
750
  }
751
751
  function Te(a, p, d = !1) {
752
752
  const O = x(a);
753
- return re(p !== void 0 ? O.decimalPlaces(p, d ? Ae : de) : O);
753
+ return re(p !== void 0 ? O.decimalPlaces(p, d ? de : Oe) : O);
754
754
  }
755
- function Ge(a) {
755
+ function ke(a) {
756
756
  return x(a).toFormat();
757
757
  }
758
- function ke(...a) {
758
+ function qe(...a) {
759
759
  if (a.length === 0)
760
760
  return 0;
761
761
  const p = a.reduce((d, O) => x(d).plus(x(O)), 0);
762
762
  return re(p);
763
763
  }
764
- function qe(...a) {
764
+ function Fe(...a) {
765
765
  if (a.length === 0)
766
766
  return 0;
767
767
  const p = a.reduce((d, O) => x(d).minus(x(O)));
768
768
  return re(p);
769
769
  }
770
- function Fe(...a) {
770
+ function ye(...a) {
771
771
  if (a.length === 0)
772
772
  return 0;
773
773
  const p = a.reduce((d, O) => x(d).times(x(O)), 1);
774
774
  return re(p);
775
775
  }
776
- function ye(...a) {
776
+ function $e(...a) {
777
777
  if (a.length === 0)
778
778
  return 0;
779
779
  const p = a.map((O) => Re(O));
780
780
  return p.some((O) => O.isZero()) ? 0 : p.reduce((O, w) => O.dividedBy(w)).toNumber();
781
781
  }
782
- function $e(a, p) {
782
+ function ze(a, p) {
783
783
  return re(x(a).pow(x(p)));
784
784
  }
785
- function ze(a, p = "%") {
785
+ function He(a, p = "%") {
786
786
  const d = x(a).times(100);
787
- return `${Oe(d, 0) ? Te(d, 2) : 0}${p}`;
787
+ return `${Ae(d, 0) ? Te(d, 2) : 0}${p}`;
788
788
  }
789
- function He(a) {
789
+ function Ve(a) {
790
790
  const p = x(a).div(100);
791
- return Oe(p, 0) ? Te(p, 4) : 0;
791
+ return Ae(p, 0) ? Te(p, 4) : 0;
792
792
  }
793
793
  export {
794
- ke as add,
795
- ye as divide,
796
- ze as formatRate,
794
+ De as BigNumber,
795
+ Oe as DOWN,
796
+ de as UP,
797
+ qe as add,
798
+ $e as divide,
799
+ He as formatRate,
797
800
  x as helper,
798
801
  Se as isBigNum,
799
802
  xe as isBool,
800
- Le as isEqualTo,
801
- Oe as isGreaterThan,
802
- Me as isGreaterThanOrEqualTo,
803
- Ie as isInt,
804
- Pe as isLessThan,
805
- ve as isLessThanOrEqualTo,
803
+ Me as isEqualTo,
804
+ Ae as isGreaterThan,
805
+ ve as isGreaterThanOrEqualTo,
806
+ Pe as isInt,
807
+ Le as isLessThan,
808
+ Ue as isLessThanOrEqualTo,
806
809
  Be as isNanValue,
807
- De as isNum,
808
- Fe as multiply,
809
- $e as power,
810
- qe as subtract,
810
+ Ie as isNum,
811
+ ye as multiply,
812
+ ze as power,
813
+ Fe as subtract,
811
814
  Re as toBigNum,
812
815
  Te as toDecimalPlaces,
813
- Ue as toInt,
814
- Ge as toLocaleString,
816
+ Ce as toInt,
817
+ ke as toLocaleString,
815
818
  re as toNum,
816
- Ce as toString,
817
- He as unFormatRate
819
+ Ge as toString,
820
+ Ve as unFormatRate
818
821
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jk-vue-comps",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "jk-vue-comps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,154 +0,0 @@
1
- import { nextTick as p, createVNode as h } from "vue";
2
- import { isString as u, isHtmlStr as l, isObject as f, isNumber as c, is as w, isArray as S, isBoolean as N, isClient as b, isDate as x, isDef as $, isEdgeBrowser as O, isElement as T, isEmail as P, isEmpty as v, isFunction as y, isInMobileBrowser as E, isIp as I, isMap as L, isNull as B, isNullAndUnDef as U, isNullOrUnDef as q, isPromise as D, isPromiseLink as F, isRegExp as M, isServer as R, isUnDef as k, isUrl as _, isValidPhoneNumber as j, isWindow as z, isZhLang as H } from "../utils/is.js";
3
- import { add as V, divide as W, formatRate as A, helper as G, isBigNum as Z, isBool as C, isEqualTo as J, isGreaterThan as K, isGreaterThanOrEqualTo as Q, isInt as X, isLessThan as Y, isLessThanOrEqualTo as ee, isNanValue as ie, isNum as te, multiply as re, power as ne, subtract as se, toBigNum as oe, toDecimalPlaces as ue, toInt as ae, toLocaleString as le, toNum as fe, toString as ce, unFormatRate as me } from "../utils/math.js";
4
- import { propTypes as de } from "../utils/vuePropTypes.js";
5
- import { timeZoneOptions as ge } from "../utils/timeZone.js";
6
- import { withInstall as pe } from "../utils/withInstall.js";
7
- function a(i) {
8
- try {
9
- return new Function(`'use strict'; return (${i});`)();
10
- } catch {
11
- return null;
12
- }
13
- }
14
- function m(i, r = "float", t = 6) {
15
- let e = String(i);
16
- if (e = e.replace(/(^\s*)|(\s*$)/g, ""), e !== "") {
17
- const s = e.indexOf("0") === 0 && e.length > 1 && e.indexOf(".") !== 1, n = r === "int" ? /[^\d]/g : /[^\d.]/g;
18
- if (e = e.replace(n, ""), s)
19
- return "0";
20
- if (r === "int")
21
- e = e.indexOf("0") === 0 && e.length > 1 ? e.substring(0, e.length - 1) : e;
22
- else {
23
- const o = a(`/\\.{${t},}/g`), g = a(`/^(\\d?)+(\\.\\d{0,${t}})?$/`);
24
- e.indexOf(".") === 0 ? (e = "", e = e.replace(/[^$#$]/g, "0."), e = e.replace(o, ".")) : g.test(e) || (e = e.substring(0, e.length - 1));
25
- }
26
- }
27
- return e;
28
- }
29
- function he(i, r, t, e = "int", s = 6) {
30
- return (n) => {
31
- p().then(() => {
32
- var o;
33
- i[r] = m((o = n == null ? void 0 : n.target) == null ? void 0 : o.value, e, s), t == null || t();
34
- });
35
- };
36
- }
37
- function we(i) {
38
- return !u(i) || !l(i) ? i : h("div", { innerHTML: i });
39
- }
40
- function Se() {
41
- return window ? `${window.location.protocol}//${window.location.hostname}` : "";
42
- }
43
- function Ne() {
44
- const i = new URLSearchParams(window.location.search);
45
- if (!i.size)
46
- return;
47
- const r = {};
48
- for (const [t, e] of i.entries())
49
- r[t] = e;
50
- return r;
51
- }
52
- function be(i) {
53
- return u(i) ? i.replace(/\s+/g, "") : "";
54
- }
55
- function d(i = {}, r = {}) {
56
- let t;
57
- for (t in r)
58
- i[t] = f(i[t]) ? d(i[t], r[t]) : i[t] = r[t];
59
- return i;
60
- }
61
- function xe(i, r = 6, t = {
62
- showPrefix: !0,
63
- showSuffix: !0,
64
- middleStr: "****"
65
- }) {
66
- if (!u(i) && !c(i))
67
- return i;
68
- const e = String(i), s = (e == null ? void 0 : e.length) ?? 0;
69
- if (!e || !s || r <= 0)
70
- return e;
71
- const n = t.showPrefix ? e.substring(0, r) : "", o = t.showSuffix ? e.substring(s - r) : "";
72
- return `${n}${t.middleStr}${o}`;
73
- }
74
- const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
- __proto__: null,
76
- add: V,
77
- deepMerge: d,
78
- desensitization: xe,
79
- divide: W,
80
- evalPro: a,
81
- filterInputNum: m,
82
- formatRate: A,
83
- generateFilterInputNumFn: he,
84
- getRouterParams: Ne,
85
- getWebsiteUrl: Se,
86
- helper: G,
87
- is: w,
88
- isArray: S,
89
- isBigNum: Z,
90
- isBool: C,
91
- isBoolean: N,
92
- isClient: b,
93
- isDate: x,
94
- isDef: $,
95
- isEdgeBrowser: O,
96
- isElement: T,
97
- isEmail: P,
98
- isEmpty: v,
99
- isEqualTo: J,
100
- isFunction: y,
101
- isGreaterThan: K,
102
- isGreaterThanOrEqualTo: Q,
103
- isHtmlStr: l,
104
- isInMobileBrowser: E,
105
- isInt: X,
106
- isIp: I,
107
- isLessThan: Y,
108
- isLessThanOrEqualTo: ee,
109
- isMap: L,
110
- isNanValue: ie,
111
- isNull: B,
112
- isNullAndUnDef: U,
113
- isNullOrUnDef: q,
114
- isNum: te,
115
- isNumber: c,
116
- isObject: f,
117
- isPromise: D,
118
- isPromiseLink: F,
119
- isRegExp: M,
120
- isServer: R,
121
- isString: u,
122
- isUnDef: k,
123
- isUrl: _,
124
- isValidPhoneNumber: j,
125
- isWindow: z,
126
- isZhLang: H,
127
- multiply: re,
128
- power: ne,
129
- propTypes: de,
130
- removeWhitespace: be,
131
- renderHtmlStr: we,
132
- subtract: se,
133
- timeZoneOptions: ge,
134
- toBigNum: oe,
135
- toDecimalPlaces: ue,
136
- toInt: ae,
137
- toLocaleString: le,
138
- toNum: fe,
139
- toString: ce,
140
- unFormatRate: me,
141
- withInstall: pe
142
- }, Symbol.toStringTag, { value: "Module" }));
143
- export {
144
- Se as a,
145
- Ne as b,
146
- be as c,
147
- d,
148
- a as e,
149
- m as f,
150
- he as g,
151
- xe as h,
152
- we as r,
153
- Ee as u
154
- };