@obr-fe/utils 0.0.4

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 (104) hide show
  1. package/README.MD +1 -0
  2. package/dist/array.d.ts +115 -0
  3. package/dist/array.js +1 -0
  4. package/dist/array.mjs +1 -0
  5. package/dist/base.d.ts +177 -0
  6. package/dist/base.js +1 -0
  7. package/dist/base.mjs +1 -0
  8. package/dist/chunk-4CSXS5HE.mjs +1 -0
  9. package/dist/chunk-4JPCGRPU.mjs +1 -0
  10. package/dist/chunk-6DX7ZFGR.mjs +1 -0
  11. package/dist/chunk-AHENZTBD.mjs +1 -0
  12. package/dist/chunk-BM65Z3BA.mjs +1 -0
  13. package/dist/chunk-BTRFNTUR.mjs +1 -0
  14. package/dist/chunk-CV5ABO6S.mjs +1 -0
  15. package/dist/chunk-DDHFJKTT.mjs +1 -0
  16. package/dist/chunk-G27KRYT2.mjs +0 -0
  17. package/dist/chunk-G6NAYP42.mjs +1 -0
  18. package/dist/chunk-GQNODP36.mjs +1 -0
  19. package/dist/chunk-IZHCWZIN.mjs +1 -0
  20. package/dist/chunk-KGXCJWE5.mjs +1 -0
  21. package/dist/chunk-LHBVJBCG.mjs +1 -0
  22. package/dist/chunk-LZM3K4ZI.mjs +1 -0
  23. package/dist/chunk-MQBXN7R5.mjs +1 -0
  24. package/dist/chunk-OTVWATFI.mjs +1 -0
  25. package/dist/chunk-PPOXYBWE.mjs +1 -0
  26. package/dist/chunk-PWYR6CSX.mjs +1 -0
  27. package/dist/chunk-QWDRQX5J.mjs +0 -0
  28. package/dist/chunk-SO3V4S32.mjs +1 -0
  29. package/dist/chunk-UOQ77YOD.mjs +1 -0
  30. package/dist/chunk-X7TUTCBW.mjs +1 -0
  31. package/dist/chunk-YA66RVVU.mjs +1 -0
  32. package/dist/clipboard.d.ts +3 -0
  33. package/dist/clipboard.js +1 -0
  34. package/dist/clipboard.mjs +1 -0
  35. package/dist/document.d.ts +24 -0
  36. package/dist/document.js +1 -0
  37. package/dist/document.mjs +1 -0
  38. package/dist/dom/base.d.ts +24 -0
  39. package/dist/dom/base.js +1 -0
  40. package/dist/dom/base.mjs +1 -0
  41. package/dist/dom/class.d.ts +26 -0
  42. package/dist/dom/class.js +1 -0
  43. package/dist/dom/class.mjs +1 -0
  44. package/dist/dom/contains.d.ts +10 -0
  45. package/dist/dom/contains.js +1 -0
  46. package/dist/dom/contains.mjs +1 -0
  47. package/dist/dom/css.d.ts +22 -0
  48. package/dist/dom/css.js +1 -0
  49. package/dist/dom/css.mjs +1 -0
  50. package/dist/dom/dynamic-css.d.ts +20 -0
  51. package/dist/dom/dynamic-css.js +1 -0
  52. package/dist/dom/dynamic-css.mjs +1 -0
  53. package/dist/dom/find-dom-node.d.ts +3 -0
  54. package/dist/dom/find-dom-node.js +1 -0
  55. package/dist/dom/find-dom-node.mjs +1 -0
  56. package/dist/dom/focus.d.ts +10 -0
  57. package/dist/dom/focus.js +1 -0
  58. package/dist/dom/focus.mjs +1 -0
  59. package/dist/dom/index.d.ts +10 -0
  60. package/dist/dom/index.js +1 -0
  61. package/dist/dom/index.mjs +1 -0
  62. package/dist/dom/is-visible.d.ts +3 -0
  63. package/dist/dom/is-visible.js +1 -0
  64. package/dist/dom/is-visible.mjs +1 -0
  65. package/dist/dom/lib/can-use-dom.d.ts +3 -0
  66. package/dist/dom/lib/can-use-dom.js +1 -0
  67. package/dist/dom/lib/can-use-dom.mjs +1 -0
  68. package/dist/dom/style-checker.d.ts +4 -0
  69. package/dist/dom/style-checker.js +1 -0
  70. package/dist/dom/style-checker.mjs +1 -0
  71. package/dist/dom/style-names.d.ts +3 -0
  72. package/dist/dom/style-names.js +1 -0
  73. package/dist/dom/style-names.mjs +1 -0
  74. package/dist/dom/support.d.ts +8 -0
  75. package/dist/dom/support.js +1 -0
  76. package/dist/dom/support.mjs +1 -0
  77. package/dist/file.d.ts +20 -0
  78. package/dist/file.js +1 -0
  79. package/dist/file.mjs +1 -0
  80. package/dist/index.d.ts +25 -0
  81. package/dist/index.js +1 -0
  82. package/dist/index.mjs +1 -0
  83. package/dist/lodash.d.ts +4 -0
  84. package/dist/lodash.js +1 -0
  85. package/dist/lodash.mjs +1 -0
  86. package/dist/object.d.ts +77 -0
  87. package/dist/object.js +1 -0
  88. package/dist/object.mjs +1 -0
  89. package/dist/other.d.ts +40 -0
  90. package/dist/other.js +1 -0
  91. package/dist/other.mjs +1 -0
  92. package/dist/safe-next-tick.d.ts +9 -0
  93. package/dist/safe-next-tick.js +1 -0
  94. package/dist/safe-next-tick.mjs +1 -0
  95. package/dist/vue/hooks/clipboard.d.ts +8 -0
  96. package/dist/vue/hooks/clipboard.js +1 -0
  97. package/dist/vue/hooks/clipboard.mjs +1 -0
  98. package/dist/vue/index.d.ts +3 -0
  99. package/dist/vue/index.js +1 -0
  100. package/dist/vue/index.mjs +1 -0
  101. package/dist/vue/type-util.d.ts +47 -0
  102. package/dist/vue/type-util.js +1 -0
  103. package/dist/vue/type-util.mjs +1 -0
  104. package/package.json +68 -0
package/README.MD ADDED
@@ -0,0 +1 @@
1
+ [文档地址](http://192.168.2.45:10010/fe-docs/obr-utils/)
@@ -0,0 +1,115 @@
1
+ import { ObjectDataType } from './base.js';
2
+
3
+ /**
4
+ * @description: 字符串元组
5
+ * @param {*} T
6
+ * @return {*}
7
+ * @autor: 刘 相卿
8
+ */
9
+ declare const tuple: <T extends string[]>(...args: T) => T;
10
+ /**
11
+ * @description: 数字元组
12
+ * @param {*} T
13
+ * @return {*}
14
+ * @autor: 刘 相卿
15
+ */
16
+ declare const tupleNum: <T extends number[]>(...args: T) => T;
17
+ /**
18
+ * @description: 转换为数组
19
+ * @param {*} T
20
+ * @return {*}
21
+ * @autor: 刘 相卿
22
+ */
23
+ declare const toArray: <T>(val: T) => T[];
24
+ /**
25
+ * @description: 选项类型
26
+ * @return {*}
27
+ * @autor: 刘 相卿
28
+ */
29
+ interface BaseOptionType extends ObjectDataType {
30
+ label: string;
31
+ value: string | number;
32
+ }
33
+ /**
34
+ * @description: 树形结构数据类型
35
+ * @autor: 刘 相卿
36
+ */
37
+ interface TreeItemType extends ObjectDataType {
38
+ label?: string;
39
+ children?: TreeItemType[];
40
+ }
41
+ /**
42
+ * @description: 数组转树型结构数据
43
+ * @param {any[]} data
44
+ * @param {string} id id字段名
45
+ * @param {string} pid pid字段名
46
+ * @param {string} children children字段名
47
+ * @return {TreeItemType[]} 树型数据
48
+ * @autor: 刘 相卿
49
+ */
50
+ declare const array2tree: <T = TreeItemType>(data?: ObjectDataType[], id?: string, pid?: string, children?: string) => T[];
51
+ /**
52
+ * @description: 对象数组转换为选项数组
53
+ * @param {ObjectDataType[]} array
54
+ * @param {{ label: string; value: string }} alias
55
+ * @return {BaseOptionType[]}
56
+ * @autor: 刘 相卿
57
+ */
58
+ declare const array2option: (array: ObjectDataType[], alias: {
59
+ label: string;
60
+ value: string;
61
+ }) => BaseOptionType[];
62
+ /**
63
+ * @description: 删除数组中的空元素
64
+ * @param {T[]} array
65
+ * @return {*}
66
+ * @autor: 刘 相卿
67
+ */
68
+ declare const deleteEmptyElement: <T>(array: T[]) => T[];
69
+ /**
70
+ * @description: 根据给定的值集合,查找树型结构数据中符合条件的元素
71
+ * @param {TreeItemType[]} array 树型数组
72
+ * @param {(string | number)[]} values 值集合
73
+ * @param {{ value?: string; children?: string }} alias
74
+ * @return {*}
75
+ * @autor: 刘 相卿
76
+ */
77
+ declare const getElementsByValues: (array: TreeItemType[] | undefined, values: (string | number)[], alias?: {
78
+ value?: string;
79
+ children?: string;
80
+ }) => ObjectDataType[];
81
+ /**
82
+ * @description: 将树型结构数组拉平为一维数组
83
+ * @param {TreeItemType[]} data 树型数组
84
+ * @param {(string | number)[]} parent 父级对象
85
+ * @param {{ value?: string; children?: string }} alias
86
+ * @return {TreeItemType[]}
87
+ * @autor: 刘 相卿
88
+ */
89
+ declare const tree2array: (data?: TreeItemType[], alias?: string) => ObjectDataType[];
90
+ /**
91
+ * @description: 根据对象数组中的keys去重
92
+ * @param {ObjectDataType[]} array 原数组
93
+ * @param {string[]} keys 对象key
94
+ * @return {T[]}
95
+ * @autor: 刘 相卿
96
+ */
97
+ declare const uniqueArrayByKeys: <T = ObjectDataType>(array: T[], keys: (keyof T)[]) => T[];
98
+ /**
99
+ * @description: 删除简单数组中的符合规则的元素,并返回新数组
100
+ * @param {(number|string|boolean)[]} array 原数组
101
+ * @param {(number|string|boolean)[]} values 符合的元素值
102
+ * @return {*} (number|string|boolean)[]
103
+ * @autor: 刘 相卿
104
+ */
105
+ declare const deleteElement: (array: (number | string | boolean)[], values?: (number | string | boolean)[]) => (number | string | boolean)[];
106
+ /**
107
+ * @description: 删除数组中的符合规则的元素,并返回新数组
108
+ * @param {any[]} array 原数组
109
+ * @param {any[]} rules 符合的元素值,如:[1, { name: 'x', age: 12 }, { name: 'z' }]则删除「元素 = 1 或 元素.name = 'x' && 元素.age = 'x' 或 元素.name = 'z'」的元素
110
+ * @return {*}
111
+ * @autor: 刘 相卿
112
+ */
113
+ declare const deleteElementPro: (array: any[], rules?: any[]) => any[];
114
+
115
+ export { array2option, array2tree, deleteElement, deleteElementPro, deleteEmptyElement, getElementsByValues, toArray, tree2array, tuple, tupleNum, uniqueArrayByKeys };
package/dist/array.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var x=Object.create;var p=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var E=(e,n)=>{for(var t in n)p(e,t,{get:n[t],enumerable:!0})},f=(e,n,t,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of j(n))!h.call(e,o)&&o!==t&&p(e,o,{get:()=>n[o],enumerable:!(s=O(n,o))||s.enumerable});return e};var u=(e,n,t)=>(t=e!=null?x(D(e)):{},f(n||!e||!e.__esModule?p(t,"default",{value:e,enumerable:!0}):t,e)),w=e=>f(p({},"__esModule",{value:!0}),e);var M={};E(M,{array2option:()=>S,array2tree:()=>K,deleteElement:()=>V,deleteElementPro:()=>$,deleteEmptyElement:()=>F,getElementsByValues:()=>g,toArray:()=>B,tree2array:()=>I,tuple:()=>A,tupleNum:()=>N,uniqueArrayByKeys:()=>P});module.exports=w(M);var l=e=>typeof e=="number";var b=e=>Object.prototype.toString.call(e)==="[object Object]";var c=e=>e==null||e===""||typeof e=="number"&&isNaN(e),m=e=>!e||Object.getOwnPropertyNames(e).length===0;var T=u(require("lodash.clonedeep")),k=u(require("lodash.debounce")),R=u(require("lodash.merge")),v=u(require("lodash.clone"));var d=(e={})=>Object.entries(e).reduce((n,[t,s])=>(c(s)||(n[t]=s),n),{});var A=(...e)=>e,N=(...e)=>e,B=e=>Array.isArray(e)?e:[e],K=(e=[],n="id",t="pid",s="children")=>{let o=[],i={},a=(0,T.default)(e);for(let r=0;r<a.length;r++)i[a[r][n]]=a[r];for(let r=0;r<a.length;r++)i[a[r][t]]&&a[r][n]!==a[r][t]?(i[a[r][t]][s]||(i[a[r][t]][s]=[]),i[a[r][t]][s].push(a[r])):o.push(a[r]);return o},S=(e,n)=>e.map(t=>({label:t[n.label],value:t[n.value]})),F=e=>e.filter(n=>!c(n)),g=(e=[],n,t)=>{let s={value:"value",children:"children",...d(t)},o=[],[i]=n,a=e.find(r=>r[s.value]===i);if(!c(i)&&!c(a)){let{[s.children]:r,...y}=a;return o.concat(y,...g(r??[],n.slice(1),s))}return o},I=(e=[],n="children")=>{let t=[],s=(o,i)=>{o.forEach(a=>{let{[i]:r,...y}=a;t.push(y),r&&s(r,i)})};return s(e,n),t},P=(e,n)=>e.reduce((s,o)=>(s.find(a=>n.every(r=>a[r]===o[r]))||s.push(o),s),[]),V=(e,n=[])=>e.filter(t=>!n.includes(t)),$=(e,n=[])=>e.filter(t=>!n.some(o=>b(o)&&b(t)?m(o)?m(t):Object.entries(o).every(([i,a])=>a===t[i]):l(o)&&isNaN(o)?l(t)&&isNaN(t):t===o));0&&(module.exports={array2option,array2tree,deleteElement,deleteElementPro,deleteEmptyElement,getElementsByValues,toArray,tree2array,tuple,tupleNum,uniqueArrayByKeys});
package/dist/array.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-LHBVJBCG.mjs";import"./chunk-SO3V4S32.mjs";import"./chunk-LZM3K4ZI.mjs";import"./chunk-PWYR6CSX.mjs";export{e as array2option,d as array2tree,j as deleteElement,k as deleteElementPro,f as deleteEmptyElement,g as getElementsByValues,c as toArray,h as tree2array,a as tuple,b as tupleNum,i as uniqueArrayByKeys};
package/dist/base.d.ts ADDED
@@ -0,0 +1,177 @@
1
+ /**
2
+ * @description: 判断是否为string类型
3
+ * @param {unknown} val
4
+ * @return {*}
5
+ * @autor: 刘 相卿
6
+ */
7
+ declare const isString: (val: unknown) => val is string;
8
+ /**
9
+ * @description: 判断是否为number类型
10
+ * @param {unknown} val
11
+ * @return {*}
12
+ * @autor: 刘 相卿
13
+ */
14
+ declare const isNumber: (val: unknown) => val is number;
15
+ /**
16
+ * @description: 判断是否为boolean类型
17
+ * @param {unknown} val
18
+ * @return {*}
19
+ * @autor: 刘 相卿
20
+ */
21
+ declare const isBoolean: (val: unknown) => val is boolean;
22
+ /**
23
+ * @description: 判断是否为函数类型
24
+ * @param {unknown} val
25
+ * @return {*}
26
+ * @autor: 刘 相卿
27
+ */
28
+ declare const isFunction: (val: unknown) => val is Function;
29
+ /**
30
+ * @description: 判断是否为数组类型
31
+ * @param {unknown} val
32
+ * @return {*}
33
+ * @autor: 刘 相卿
34
+ */
35
+ declare const isArray: (val: unknown) => val is any[];
36
+ /**
37
+ * @description: 判断是否为undefined类型
38
+ * @param {unknown} val
39
+ * @return {*}
40
+ * @autor: 刘 相卿
41
+ */
42
+ declare const isUndefined: (val: unknown) => val is undefined;
43
+ /**
44
+ * @description: 判断参数已定义且不为空
45
+ * @param {*} T
46
+ * @return {*}
47
+ * @autor: 刘 相卿
48
+ */
49
+ declare const isDef: <T = any>(val?: T | undefined) => val is T;
50
+ /**
51
+ * @description: 是否为null
52
+ * @param {unknown} val
53
+ * @return {*}
54
+ * @autor: 刘 相卿
55
+ */
56
+ declare const isNull: (val: unknown) => val is null;
57
+ /**
58
+ * @description: 是否为symbol类型
59
+ * @param {unknown} val
60
+ * @return {*}
61
+ * @autor: 刘 相卿
62
+ */
63
+ declare const isSymbol: (val: unknown) => val is symbol;
64
+ /**
65
+ * @description: 是否为对象类型
66
+ * @param {unknown} val
67
+ * @param {*} any
68
+ * @return {*}
69
+ * @autor: 刘 相卿
70
+ */
71
+ declare const isObject: (val: unknown) => val is Record<any, any>;
72
+ /**
73
+ * @description: 是否为日期类型
74
+ * @param {unknown} val
75
+ * @return {*}
76
+ * @autor: 刘 相卿
77
+ */
78
+ declare const isDate: (val: unknown) => val is Date;
79
+ /**
80
+ * @description: 是否为原始类型
81
+ * @return {*}
82
+ * @autor: 刘 相卿
83
+ */
84
+ declare const isBaseType: (val: unknown) => val is string | number | boolean | symbol | null | undefined;
85
+ /**
86
+ * @description: 是否为url
87
+ * @param {string} val
88
+ * @return {*}
89
+ * @autor: 刘 相卿
90
+ */
91
+ declare const isUrl: (val: string) => boolean;
92
+ /**
93
+ * @description: 数据类型
94
+ * @autor: 刘 相卿
95
+ */
96
+ type DataType = 'set' | 'map' | 'function' | 'object' | 'array' | 'undefined' | 'null' | 'number' | 'symbol' | 'string' | 'boolean' | 'regexp' | 'date' | 'bigint' | 'blob' | 'formdata';
97
+ /**
98
+ * @description: 基础对象类型
99
+ * @autor: 刘 相卿
100
+ */
101
+ type ObjectDataType = Record<string, any>;
102
+ /**
103
+ * @description: 判断是否未null或者undefined
104
+ * @param {unknown} value
105
+ * @return {*}
106
+ * @autor: 刘 相卿
107
+ */
108
+ declare const isEmpty: (value: unknown, undefinedValue?: boolean) => boolean;
109
+ /**
110
+ * @description: 判断是否为空值
111
+ * @param {unknown} value
112
+ * @return {boolean}
113
+ * @autor: 刘 相卿
114
+ */
115
+ declare const isEmptyValue: (value: unknown) => boolean;
116
+ /**
117
+ * @description: 判断是否为空对象
118
+ * @param {ObjectDataType} object
119
+ * @return {*}
120
+ * @autor: 刘 相卿
121
+ */
122
+ declare const isEmptyObject: (object: ObjectDataType) => boolean;
123
+ /**
124
+ * @description: 判断是否为空数组
125
+ * @param {any} data
126
+ * @return {boolean}
127
+ * @autor: 刘 相卿
128
+ */
129
+ declare function isEmptyArray(data?: any[]): boolean;
130
+ /**
131
+ * @description: 判断是否为无意义的数组,即数组的每个元素都是空值
132
+ * @param {any} data
133
+ * @return {boolean}
134
+ * @autor: 刘 相卿
135
+ */
136
+ declare const isMeaninglessArray: (data?: any[]) => boolean;
137
+ /**
138
+ * @description: 获取数据类型
139
+ * @param {any} data
140
+ * @return {DataType} 数据类型字符串
141
+ * @autor: 刘 相卿
142
+ */
143
+ declare const getDataType: (data: any) => DataType;
144
+ /**
145
+ * @description: 根据url获取文件类型
146
+ * @param {string} fileUrl
147
+ * @return {*}
148
+ * @autor: 刘 相卿
149
+ */
150
+ declare const getFileType: (fileUrl: string) => string;
151
+ /**
152
+ * @description: 替换最后一个匹配的字符串
153
+ * @param {string} str
154
+ * @param {string} char
155
+ * @param {string} target
156
+ * @return {*}
157
+ * @autor: 刘 相卿
158
+ */
159
+ declare const replaceLastMatch: (str: string, char: string, target: string) => string;
160
+ /**
161
+ * @description: 替换所有匹配的字符串
162
+ * @param {string} str
163
+ * @param {RegExp} reg
164
+ * @param {string} target
165
+ * @return {*}
166
+ * @autor: 刘 相卿
167
+ */
168
+ declare const replaceMatch: (str: string, reg: RegExp, target: string) => string;
169
+ /**
170
+ * @description: 将数字转化为正数
171
+ * @param {number} value
172
+ * @return {*}
173
+ * @autor: 刘 相卿
174
+ */
175
+ declare const formatPositiveNumber: (value: number) => number;
176
+
177
+ export { ObjectDataType, formatPositiveNumber, getDataType, getFileType, isArray, isBaseType, isBoolean, isDate, isDef, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isFunction, isMeaninglessArray, isNull, isNumber, isObject, isString, isSymbol, isUndefined, isUrl, replaceLastMatch, replaceMatch };
package/dist/base.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var r=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var f=(n,t)=>{for(var e in t)r(n,e,{get:t[e],enumerable:!0})},d=(n,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of x(t))!m.call(n,o)&&o!==e&&r(n,o,{get:()=>t[o],enumerable:!(s=g(t,o))||s.enumerable});return n};var w=n=>d(r({},"__esModule",{value:!0}),n);var B={};f(B,{formatPositiveNumber:()=>$,getDataType:()=>S,getFileType:()=>F,isArray:()=>j,isBaseType:()=>A,isBoolean:()=>a,isDate:()=>O,isDef:()=>T,isEmpty:()=>E,isEmptyArray:()=>b,isEmptyObject:()=>N,isEmptyValue:()=>u,isFunction:()=>k,isMeaninglessArray:()=>R,isNull:()=>l,isNumber:()=>p,isObject:()=>D,isString:()=>i,isSymbol:()=>y,isUndefined:()=>c,isUrl:()=>h,replaceLastMatch:()=>M,replaceMatch:()=>U});module.exports=w(B);var i=n=>typeof n=="string",p=n=>typeof n=="number",a=n=>typeof n=="boolean",k=n=>typeof n=="function",j=n=>Array.isArray(n),c=n=>typeof n>"u",T=n=>typeof n<"u",l=n=>n===null,y=n=>typeof n=="symbol",D=n=>Object.prototype.toString.call(n)==="[object Object]",O=n=>Object.prototype.toString.call(n)==="[object Date]",A=n=>i(n)||p(n)||a(n)||y(n)||c(n)||l(n),h=n=>/^(https?|mailto|tel|file):/.test(n),E=(n,t=!0)=>t&&n===void 0||n===null||n==="null",u=n=>n==null||n===""||typeof n=="number"&&isNaN(n),N=n=>!n||Object.getOwnPropertyNames(n).length===0;function b(n=[]){return Array.isArray(n)&&!n.length}var R=(n=[])=>Array.isArray(n)?b(n)||n.every(t=>u(t)):!1,S=n=>Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),F=n=>(n.match(/\.([^.]+)$/)?.[1]??"\u672A\u77E5").toUpperCase(),M=(n,t,e)=>n.replace(new RegExp("(.*)"+t),`$1${e}`),U=(n,t,e)=>n.replace(new RegExp(t,"g"),e),$=n=>n&&n>0?n:0;0&&(module.exports={formatPositiveNumber,getDataType,getFileType,isArray,isBaseType,isBoolean,isDate,isDef,isEmpty,isEmptyArray,isEmptyObject,isEmptyValue,isFunction,isMeaninglessArray,isNull,isNumber,isObject,isString,isSymbol,isUndefined,isUrl,replaceLastMatch,replaceMatch});
package/dist/base.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-PWYR6CSX.mjs";export{w as formatPositiveNumber,s as getDataType,t as getFileType,e as isArray,l as isBaseType,c as isBoolean,k as isDate,g as isDef,n as isEmpty,q as isEmptyArray,p as isEmptyObject,o as isEmptyValue,d as isFunction,r as isMeaninglessArray,h as isNull,b as isNumber,j as isObject,a as isString,i as isSymbol,f as isUndefined,m as isUrl,u as replaceLastMatch,v as replaceMatch};
@@ -0,0 +1 @@
1
+ var a=e=>{e&&e.parentNode?.removeChild(e)},s=(e,r)=>{let n=e.slice(1);return"rgba("+[parseInt("0x"+n.slice(0,2)),parseInt("0x"+n.slice(2,4)),parseInt("0x"+n.slice(4,6)),r].toString()+")"},o=(e,r)=>e[r]??e.default,i=e=>e.toString().replace(/\d+/,r=>r.replace(/(\d)(?=(\d{3})+$)/g,n=>n+","));export{a,s as b,o as c,i as d};
@@ -0,0 +1 @@
1
+ import{a as d}from"./chunk-KGXCJWE5.mjs";import{a as p}from"./chunk-IZHCWZIN.mjs";var u="data-vc-order",m="vc-util-key",c=new Map;function f({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:m}function a(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function T(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function l(e){return Array.from((c.get(e)||e).children).filter(r=>r.tagName==="STYLE")}function y(e,r={}){if(!d())return null;let{csp:n,prepend:o}=r,t=document.createElement("style");t.setAttribute(u,T(o)),n?.nonce&&(t.nonce=n?.nonce),t.innerHTML=e;let i=a(r),{firstChild:g}=i;if(o){if(o==="queue"){let s=l(i).filter(C=>["prepend","prependQueue"].includes(C.getAttribute(u)));if(s.length)return i.insertBefore(t,s[s.length-1].nextSibling),t}i.insertBefore(t,g)}else i.appendChild(t);return t}function h(e,r={}){let n=a(r);return l(n).find(o=>o.getAttribute(f(r))===e)}function O(e,r={}){let n=h(e,r);n&&a(r).removeChild(n)}function S(e,r){let n=c.get(e);if(!n||!p(document,n)){let o=y("",r),{parentNode:t}=o;c.set(e,t),e.removeChild(o)}}function A(){c.clear()}function E(e,r,n={}){let o=a(n);S(o,n);let t=h(r,n);if(t)return n.csp?.nonce&&t.nonce!==n.csp?.nonce&&(t.nonce=n.csp?.nonce),t.innerHTML!==e&&(t.innerHTML=e),t;let i=y(e,n);return i.setAttribute(f(n),r),i}export{y as a,O as b,A as c,E as d};
@@ -0,0 +1 @@
1
+ function o(){return new DOMException("The request is not allowed","NotAllowedError")}async function c(t){if(!navigator.clipboard)throw o();return navigator.clipboard.writeText(t)}async function i(t){let e=document.createElement("span");e.textContent=t,e.style.whiteSpace="pre",e.style.webkitUserSelect="auto",e.style.userSelect="all",document.body.appendChild(e);let n=window.getSelection(),r=window.document.createRange();n.removeAllRanges(),r.selectNode(e),n.addRange(r);let a=!1;try{a=window.document.execCommand("copy")}finally{n.removeAllRanges(),window.document.body.removeChild(e)}if(!a)throw o()}async function l(t){try{await c(t)}catch(e){try{await i(t)}catch(n){throw n||e||o()}}}export{l as a};
@@ -0,0 +1 @@
1
+ var d=l=>{let e=l?.vnode?.el||l&&(l.$el||l);for(;e&&!e.tagName;)e=e.nextSibling;return e},o=d;export{o as a};
@@ -0,0 +1 @@
1
+ var d=t=>{document.title=t},u=(t,e=1920,r=1080)=>{let o=document.documentElement.clientWidth||document.body.clientWidth||e,n=window.screen.height||document.body.clientHeight||e,c=e/r;return o/n/c*t},i=()=>{let t=document.querySelectorAll("[style*=z-index]"),e=0;return t.forEach(r=>{let o=window.getComputedStyle(r).zIndex;if(o!=="auto"){let n=parseInt(o,10);!isNaN(n)&&n>e&&(e=n)}}),e+1};export{d as a,u as b,i as c};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-6DX7ZFGR.mjs";import{ref as p,unref as f}from"vue";var m=(t=3e3)=>{let e=p(!1);return{copied:e,copy:r=>{let s=f(r);o(s).then(()=>{e.value=!0;let i=setTimeout(()=>{e.value=!1,clearTimeout(i)},t)})}}};export{m as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-KGXCJWE5.mjs";var i=n=>{if(o()&&window.document.documentElement){let t=Array.isArray(n)?n:[n],{documentElement:r}=window.document;return t.some(e=>e in r.style)}return!1},s=(n,t)=>{if(!i(n))return!1;let r=document.createElement("div"),e=r.style[n];return r.style[n]=t,r.style[n]!==e};function a(n,t){return!Array.isArray(n)&&t!==void 0?s(n,t):i(n)}export{a};
@@ -0,0 +1 @@
1
+ import{a as i}from"./chunk-KGXCJWE5.mjs";var e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd",animation:"animationend"},r={WebkitTransition:"webkitTransitionEnd",OTransition:"oTransitionEnd",transition:"transitionend"};function o(n){let a=document.createElement("div");for(let t in n)if(n.hasOwnProperty(t)&&a.style[t]!==void 0)return{end:n[t]};return!1}var d=i()&&o(e),m=i()&&o(r);export{d as a,m as b};
File without changes
@@ -0,0 +1 @@
1
+ var r=t=>{if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){let{width:e,height:i}=t.getBBox();if(e||i)return!0}if(t.getBoundingClientRect){let{width:e,height:i}=t.getBoundingClientRect();if(e||i)return!0}}return!1};export{r as a};
@@ -0,0 +1 @@
1
+ var l=(n,c=4)=>{let s=[],i=1048576*c,e=0;for(;e<n.size;){let u=n.slice(e,e+i);s.push({file:u,size:u.size,index:e/i}),e+=i}return s};export{l as a};
@@ -0,0 +1 @@
1
+ function t(e,a){if(!e)return!1;if(e.contains)return e.contains(a);let n=a;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}export{t as a};
@@ -0,0 +1 @@
1
+ function e(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var n=e;export{n as a};
@@ -0,0 +1 @@
1
+ import{a as y}from"./chunk-SO3V4S32.mjs";import{h as m}from"./chunk-LZM3K4ZI.mjs";import{b as p,j as T,o as l,p as u}from"./chunk-PWYR6CSX.mjs";var j=(...t)=>t,D=(...t)=>t,E=t=>Array.isArray(t)?t:[t],v=(t=[],s="id",r="pid",o="children")=>{let a=[],i={},n=y(t);for(let e=0;e<n.length;e++)i[n[e][s]]=n[e];for(let e=0;e<n.length;e++)i[n[e][r]]&&n[e][s]!==n[e][r]?(i[n[e][r]][o]||(i[n[e][r]][o]=[]),i[n[e][r]][o].push(n[e])):a.push(n[e]);return a},I=(t,s)=>t.map(r=>({label:r[s.label],value:r[s.value]})),N=t=>t.filter(s=>!l(s)),b=(t=[],s,r)=>{let o={value:"value",children:"children",...m(r)},a=[],[i]=s,n=t.find(e=>e[o.value]===i);if(!l(i)&&!l(n)){let{[o.children]:e,...c}=n;return a.concat(c,...b(e??[],s.slice(1),o))}return a},A=(t=[],s="children")=>{let r=[],o=(a,i)=>{a.forEach(n=>{let{[i]:e,...c}=n;r.push(c),e&&o(e,i)})};return o(t,s),r},B=(t,s)=>t.reduce((o,a)=>(o.find(n=>s.every(e=>n[e]===a[e]))||o.push(a),o),[]),V=(t,s=[])=>t.filter(r=>!s.includes(r)),q=(t,s=[])=>t.filter(r=>!s.some(a=>T(a)&&T(r)?u(a)?u(r):Object.entries(a).every(([i,n])=>n===r[i]):p(a)&&isNaN(a)?p(r)&&isNaN(r):r===a));export{j as a,D as b,E as c,v as d,I as e,N as f,b as g,A as h,B as i,V as j,q as k};
@@ -0,0 +1 @@
1
+ import{o}from"./chunk-PWYR6CSX.mjs";function i(e,n=[],t){if(e==null)return t||e;let r=Object.getOwnPropertyNames(e).reduce((s,c)=>(n.includes(c)&&(s[c]=e[c]),s),{});return Object.assign(r,t)}function u(e,n=[],t){if(e==null)return t||e;let r=Object.getOwnPropertyNames(e).reduce((s,c)=>(n.includes(c)||(s[c]=e[c]),s),{});return Object.assign(r,t)}var y=(e={},n=!0)=>{let t=Object.keys(e).sort();return n||t.reverse(),t.reduce((a,r)=>(a[r]=e[r],a),{})},O=(e={})=>Object.entries(e).reduce((n,[t,a])=>(o(a)||n.push(`${t}=${a}`),n),[]).join("&"),d=e=>{let n={},t=e.split("?")[1];return t&&t.split("&").forEach(a=>{let[r="",s=""]=a.split("=");n[r]=s}),n},j=(e={})=>{let n=new FormData;return Object.entries(e).forEach(([t,a])=>{n.append(t,a)}),n},T=e=>{let n={};for(let[t,a]of e.entries())n[t]=a;return n},b=(e={})=>Object.entries(e).reduce((n,[t,a])=>(o(a)||(n[t]=a),n),{}),f=(e,n)=>Object.keys(n).reduce((t,a)=>(t[a]=e[a],t),{}),D=(e,n)=>n.every(t=>Reflect.has(e,t)),m=(e,n)=>Object.entries(n).reduce((t,[a,r])=>(t[a]=e[r],t),{});export{i as a,u as b,y as c,O as d,d as e,j as f,T as g,b as h,f as i,D as j,m as k};
@@ -0,0 +1 @@
1
+ function l(s,i){return s.classList?s.classList.contains(i):` ${s.className} `.includes(` ${i} `)}function a(s,i){s.classList?s.classList.add(i):l(s,i)||(s.className=`${s.className} ${i}`)}function r(s,i){if(s.classList)s.classList.remove(i);else if(l(s,i)){let t=s.className;s.className=` ${t} `.replace(` ${i} `," ")}}export{l as a,a as b,r as c};
@@ -0,0 +1 @@
1
+ import{a as r,e as o,j as c}from"./chunk-PWYR6CSX.mjs";function f(s){let n={},t=s.split(";");for(let e of t){if(!e)continue;let i=e.split(":");i[0]&&(n[i[0]]=i[1])}return n}function y(...s){if(s.length<1)return;let n={};for(let t of s)if(t)if(r(t))Object.assign(n,f(t));else if(o(t)){let e=y(...t);e&&Object.assign(n,e)}else c(t)&&Object.assign(n,t);return n}export{y as a};
@@ -0,0 +1 @@
1
+ import{d as i}from"./chunk-PWYR6CSX.mjs";var n=async(e=0)=>new Promise(o=>{let t=setTimeout(()=>{o(!0),clearTimeout(t)},e)});async function a(e,o){await n(o?.delay),e&&i(e)&&e()}export{n as a,a as b};
@@ -0,0 +1 @@
1
+ var o=n=>typeof n=="string",r=n=>typeof n=="number",s=n=>typeof n=="boolean",y=n=>typeof n=="function",u=n=>Array.isArray(n),i=n=>typeof n>"u",b=n=>typeof n<"u",p=n=>n===null,a=n=>typeof n=="symbol",g=n=>Object.prototype.toString.call(n)==="[object Object]",x=n=>Object.prototype.toString.call(n)==="[object Date]",m=n=>o(n)||r(n)||s(n)||a(n)||i(n)||p(n),f=n=>/^(https?|mailto|tel|file):/.test(n),d=(n,t=!0)=>t&&n===void 0||n===null||n==="null",c=n=>n==null||n===""||typeof n=="number"&&isNaN(n),w=n=>!n||Object.getOwnPropertyNames(n).length===0;function l(n=[]){return Array.isArray(n)&&!n.length}var k=(n=[])=>Array.isArray(n)?l(n)||n.every(t=>c(t)):!1,j=n=>Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),T=n=>(n.match(/\.([^.]+)$/)?.[1]??"\u672A\u77E5").toUpperCase(),D=(n,t,e)=>n.replace(new RegExp("(.*)"+t),`$1${e}`),O=(n,t,e)=>n.replace(new RegExp(t,"g"),e),A=n=>n&&n>0?n:0;export{o as a,r as b,s as c,y as d,u as e,i as f,b as g,p as h,a as i,g as j,x as k,m as l,f as m,d as n,c as o,w as p,l as q,k as r,j as s,T as t,D as u,O as v,A as w};
File without changes
@@ -0,0 +1 @@
1
+ import r from"lodash.clonedeep";import m from"lodash.debounce";import t from"lodash.merge";import i from"lodash.clone";export{r as a,m as b,t as c,i as d};
@@ -0,0 +1 @@
1
+ var i=/margin|padding|width|height|max|min|offset/,l={left:!0,top:!0},r={cssFloat:1,styleFloat:1,float:1};function s(e){return e.nodeType===1?e.ownerDocument.defaultView.getComputedStyle(e,null):{}}function u(e,t,n){if(t=t.toLowerCase(),n==="auto"){if(t==="height")return e.offsetHeight;if(t==="width")return e.offsetWidth}return t in l||(l[t]=i.test(t)),l[t]?parseFloat(n)||0:n}function f(e,t){let n=arguments.length,o=s(e);return t=r[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,n===1?o:u(e,t,o[t]||e.style[t])}function d(e,t,n){let o=arguments.length;if(t=r[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,o===3)return typeof n=="number"&&i.test(t)&&(n=`${n}px`),e.style[t]=n,n;for(let c in t)t.hasOwnProperty(c)&&d(e,c,t[c]);return s(e)}function m(e){return e===document.body?document.documentElement.clientWidth:e.offsetWidth}function g(e){return e===document.body?window.innerHeight||document.documentElement.clientHeight:e.offsetHeight}function h(){let e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:e,height:t}}function a(){let e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function y(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(e){let t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}export{f as a,d as b,m as c,g as d,h as e,a as f,y as g,p as h};
@@ -0,0 +1 @@
1
+ import{a as u}from"./chunk-G6NAYP42.mjs";function c(e,n=!1){if(u(e)){let t=e.nodeName.toLowerCase(),a=["input","select","textarea","button"].includes(t)||e.isContentEditable||t==="a"&&!!e.getAttribute("href"),s=e.getAttribute("tabindex"),i=Number(s),l=null;return s&&!Number.isNaN(i)?l=i:a&&l===null&&(l=0),a&&e.disabled&&(l=null),l!==null&&(l>=0||n&&l<0)}return!1}function r(e,n=!1){let t=[...e.querySelectorAll("*")].filter(a=>c(a,n));return c(e,n)&&t.unshift(e),t}var o=null;function f(){o=document.activeElement}function b(){o=null}function E(){if(o)try{o.focus()}catch{}}function L(e,n){if(n.keyCode===9){let t=r(e);(t[n.shiftKey?0:t.length-1]===document.activeElement||e===document.activeElement)&&(t[n.shiftKey?t.length-1:0].focus(),n.preventDefault())}}export{r as a,f as b,b as c,E as d,L as e};
@@ -0,0 +1 @@
1
+ function o(e){return{type:String,default:e}}function a(e){return{type:Number,default:e}}function T(e){return{type:Boolean,default:e}}function p(e){return{type:Array,default:e}}function u(e){return{type:Object,default:e}}function y(e){return{type:Function,default:e}}function t(e,n){let r={validator:()=>!0,default:e};return r}function s(){return{validator:()=>!0}}function i(e,n){return e?{type:e,default:n}:t(n)}function f(){return{type:[Function,Array]}}function d(e,...n){if(typeof e=="function")return e(...n);if(Array.isArray(e))return e.map(r=>r(...n))}async function c(e,...n){if(typeof e=="function")return await e(...n);if(Array.isArray(e))return await Promise.all(e.map(r=>r(...n)))}function l(e,n=0){return Array.isArray(e)?e[n]:e}export{o as a,a as b,T as c,p as d,u as e,y as f,t as g,s as h,i,f as j,d as k,c as l,l as m};
@@ -0,0 +1,3 @@
1
+ declare function clipboardCopy(text: string): Promise<void>;
2
+
3
+ export { clipboardCopy };
@@ -0,0 +1 @@
1
+ "use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)a(t,n,{get:e[n],enumerable:!0})},w=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of l(e))!s.call(t,o)&&o!==n&&a(t,o,{get:()=>e[o],enumerable:!(r=i(e,o))||r.enumerable});return t};var p=t=>w(a({},"__esModule",{value:!0}),t);var g={};d(g,{clipboardCopy:()=>m});module.exports=p(g);function c(){return new DOMException("The request is not allowed","NotAllowedError")}async function y(t){if(!navigator.clipboard)throw c();return navigator.clipboard.writeText(t)}async function u(t){let e=document.createElement("span");e.textContent=t,e.style.whiteSpace="pre",e.style.webkitUserSelect="auto",e.style.userSelect="all",document.body.appendChild(e);let n=window.getSelection(),r=window.document.createRange();n.removeAllRanges(),r.selectNode(e),n.addRange(r);let o=!1;try{o=window.document.execCommand("copy")}finally{n.removeAllRanges(),window.document.body.removeChild(e)}if(!o)throw c()}async function m(t){try{await y(t)}catch(e){try{await u(t)}catch(n){throw n||e||c()}}}0&&(module.exports={clipboardCopy});
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-6DX7ZFGR.mjs";export{a as clipboardCopy};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @description: 设置文档标题
3
+ * @param {string} title
4
+ * @return {*}
5
+ * @autor: 刘 相卿
6
+ */
7
+ declare const setDocumentTitle: (title: string) => void;
8
+ /**
9
+ * @description: 动态计算px
10
+ * @param {number} px 原始px数值
11
+ * @param {number} width 设计稿宽度 默认1920
12
+ * @param {number} height 设计稿高度 默认1080
13
+ * @return {*}
14
+ * @autor: 刘 相卿
15
+ */
16
+ declare const getPx: (px: number, width?: number, height?: number) => number;
17
+ /**
18
+ * @description: 获取页面中最大的z-index并+1
19
+ * @return {number} zIndex 最大的index
20
+ * @autor: 刘 相卿
21
+ */
22
+ declare const getMaxZIndex: () => number;
23
+
24
+ export { getMaxZIndex, getPx, setDocumentTitle };
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var o in e)c(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i(e))!s.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(r=u(e,n))||r.enumerable});return t};var x=t=>l(c({},"__esModule",{value:!0}),t);var p={};m(p,{getMaxZIndex:()=>g,getPx:()=>b,setDocumentTitle:()=>a});module.exports=x(p);var a=t=>{document.title=t},b=(t,e=1920,o=1080)=>{let r=document.documentElement.clientWidth||document.body.clientWidth||e,n=window.screen.height||document.body.clientHeight||e,d=e/o;return r/n/d*t},g=()=>{let t=document.querySelectorAll("[style*=z-index]"),e=0;return t.forEach(o=>{let r=window.getComputedStyle(o).zIndex;if(r!=="auto"){let n=parseInt(r,10);!isNaN(n)&&n>e&&(e=n)}}),e+1};0&&(module.exports={getMaxZIndex,getPx,setDocumentTitle});
@@ -0,0 +1 @@
1
+ import{a,b,c}from"./chunk-BM65Z3BA.mjs";export{c as getMaxZIndex,b as getPx,a as setDocumentTitle};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @description: 设置文档标题
3
+ * @param {string} title
4
+ * @return {*}
5
+ * @autor: 刘 相卿
6
+ */
7
+ declare const setDocumentTitle: (title: string) => void;
8
+ /**
9
+ * @description: 动态计算px
10
+ * @param {number} px 原始px数值
11
+ * @param {number} width 设计稿宽度 默认1920
12
+ * @param {number} height 设计稿高度 默认1080
13
+ * @return {*}
14
+ * @autor: 刘 相卿
15
+ */
16
+ declare const getPx: (px: number, width?: number, height?: number) => number;
17
+ /**
18
+ * @description: 获取页面中最大的z-index并+1
19
+ * @return {number} zIndex 最大的index
20
+ * @autor: 刘 相卿
21
+ */
22
+ declare const getMaxZIndex: () => number;
23
+
24
+ export { getMaxZIndex, getPx, setDocumentTitle };
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var o in e)c(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i(e))!s.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(r=u(e,n))||r.enumerable});return t};var x=t=>l(c({},"__esModule",{value:!0}),t);var p={};m(p,{getMaxZIndex:()=>g,getPx:()=>b,setDocumentTitle:()=>a});module.exports=x(p);var a=t=>{document.title=t},b=(t,e=1920,o=1080)=>{let r=document.documentElement.clientWidth||document.body.clientWidth||e,n=window.screen.height||document.body.clientHeight||e,d=e/o;return r/n/d*t},g=()=>{let t=document.querySelectorAll("[style*=z-index]"),e=0;return t.forEach(o=>{let r=window.getComputedStyle(o).zIndex;if(r!=="auto"){let n=parseInt(r,10);!isNaN(n)&&n>e&&(e=n)}}),e+1};0&&(module.exports={getMaxZIndex,getPx,setDocumentTitle});
@@ -0,0 +1 @@
1
+ var d=t=>{document.title=t},u=(t,e=1920,r=1080)=>{let o=document.documentElement.clientWidth||document.body.clientWidth||e,n=window.screen.height||document.body.clientHeight||e,c=e/r;return o/n/c*t},i=()=>{let t=document.querySelectorAll("[style*=z-index]"),e=0;return t.forEach(r=>{let o=window.getComputedStyle(r).zIndex;if(o!=="auto"){let n=parseInt(o,10);!isNaN(n)&&n>e&&(e=n)}}),e+1};export{i as getMaxZIndex,u as getPx,d as setDocumentTitle};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @description: 节点是否存在某个class
3
+ * @param {HTMLElement} node
4
+ * @param {string} className
5
+ * @return {*}
6
+ * @autor: 刘 相卿
7
+ */
8
+ declare function hasClass(node: HTMLElement, className: string): boolean;
9
+ /**
10
+ * @description: 给节点添加class
11
+ * @param {HTMLElement} node
12
+ * @param {string} className
13
+ * @return {*}
14
+ * @autor: 刘 相卿
15
+ */
16
+ declare function addClass(node: HTMLElement, className: string): void;
17
+ /**
18
+ * @description: 移除class
19
+ * @param {HTMLElement} node
20
+ * @param {string} className
21
+ * @return {*}
22
+ * @autor: 刘 相卿
23
+ */
24
+ declare function removeClass(node: HTMLElement, className: string): void;
25
+
26
+ export { addClass, hasClass, removeClass };
@@ -0,0 +1 @@
1
+ "use strict";var a=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var f=(s,i)=>{for(var t in i)a(s,t,{get:i[t],enumerable:!0})},g=(s,i,t,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let l of n(i))!L.call(s,l)&&l!==t&&a(s,l,{get:()=>i[l],enumerable:!(c=e(i,l))||c.enumerable});return s};var u=s=>g(a({},"__esModule",{value:!0}),s);var m={};f(m,{addClass:()=>C,hasClass:()=>r,removeClass:()=>$});module.exports=u(m);function r(s,i){return s.classList?s.classList.contains(i):` ${s.className} `.includes(` ${i} `)}function C(s,i){s.classList?s.classList.add(i):r(s,i)||(s.className=`${s.className} ${i}`)}function $(s,i){if(s.classList)s.classList.remove(i);else if(r(s,i)){let t=s.className;s.className=` ${t} `.replace(` ${i} `," ")}}0&&(module.exports={addClass,hasClass,removeClass});
@@ -0,0 +1 @@
1
+ import{a,b,c}from"../chunk-MQBXN7R5.mjs";export{b as addClass,a as hasClass,c as removeClass};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @description: 是否包含节点
3
+ * @param {Node} root
4
+ * @param {Node} n
5
+ * @return {*}
6
+ * @autor: 刘 相卿
7
+ */
8
+ declare function contains(root: Node | null | undefined, n?: Node): boolean;
9
+
10
+ export { contains as default };
@@ -0,0 +1 @@
1
+ "use strict";var i=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var s=(e,n)=>{for(var a in n)i(e,a,{get:n[a],enumerable:!0})},c=(e,n,a,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of d(n))!l.call(e,t)&&t!==a&&i(e,t,{get:()=>n[t],enumerable:!(u=r(n,t))||u.enumerable});return e};var o=e=>c(i({},"__esModule",{value:!0}),e);var N={};s(N,{default:()=>f});module.exports=o(N);function f(e,n){if(!e)return!1;if(e.contains)return e.contains(n);let a=n;for(;a;){if(a===e)return!0;a=a.parentNode}return!1}
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-IZHCWZIN.mjs";export{a as default};
@@ -0,0 +1,22 @@
1
+ declare function getCss(node: any, name: any): any;
2
+ declare function setCss(node: any, name: any, value: any): any;
3
+ declare function getOuterWidth(el: any): any;
4
+ declare function getOuterHeight(el: HTMLElement): number;
5
+ declare function getDocSize(): {
6
+ width: number;
7
+ height: number;
8
+ };
9
+ declare function getClientSize(): {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ declare function getScroll(): {
14
+ scrollLeft: number;
15
+ scrollTop: number;
16
+ };
17
+ declare function getOffset(node: HTMLElement): {
18
+ left: number;
19
+ top: number;
20
+ };
21
+
22
+ export { getClientSize, getCss, getDocSize, getOffset, getOuterHeight, getOuterWidth, getScroll, setCss };
@@ -0,0 +1 @@
1
+ "use strict";var l=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var h=(e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})},a=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!g.call(e,o)&&o!==n&&l(e,o,{get:()=>t[o],enumerable:!(c=f(t,o))||c.enumerable});return e};var y=e=>a(l({},"__esModule",{value:!0}),e);var F={};h(F,{getClientSize:()=>T,getCss:()=>x,getDocSize:()=>H,getOffset:()=>L,getOuterHeight:()=>E,getOuterWidth:()=>w,getScroll:()=>b,setCss:()=>d});module.exports=y(F);var r=/margin|padding|width|height|max|min|offset/,i={left:!0,top:!0},s={cssFloat:1,styleFloat:1,float:1};function u(e){return e.nodeType===1?e.ownerDocument.defaultView.getComputedStyle(e,null):{}}function p(e,t,n){if(t=t.toLowerCase(),n==="auto"){if(t==="height")return e.offsetHeight;if(t==="width")return e.offsetWidth}return t in i||(i[t]=r.test(t)),i[t]?parseFloat(n)||0:n}function x(e,t){let n=arguments.length,c=u(e);return t=s[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,n===1?c:p(e,t,c[t]||e.style[t])}function d(e,t,n){let c=arguments.length;if(t=s[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,c===3)return typeof n=="number"&&r.test(t)&&(n=`${n}px`),e.style[t]=n,n;for(let o in t)t.hasOwnProperty(o)&&d(e,o,t[o]);return u(e)}function w(e){return e===document.body?document.documentElement.clientWidth:e.offsetWidth}function E(e){return e===document.body?window.innerHeight||document.documentElement.clientHeight:e.offsetHeight}function H(){let e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:e,height:t}}function T(){let e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function b(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function L(e){let t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}0&&(module.exports={getClientSize,getCss,getDocSize,getOffset,getOuterHeight,getOuterWidth,getScroll,setCss});
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e,f,g,h}from"../chunk-UOQ77YOD.mjs";export{f as getClientSize,a as getCss,e as getDocSize,h as getOffset,d as getOuterHeight,c as getOuterWidth,g as getScroll,b as setCss};
@@ -0,0 +1,20 @@
1
+ type ContainerType = Element | ShadowRoot;
2
+ type Prepend = boolean | 'queue';
3
+ type AppendType = 'prependQueue' | 'append' | 'prepend';
4
+ interface Options {
5
+ attachTo?: ContainerType;
6
+ csp?: {
7
+ nonce?: string;
8
+ };
9
+ prepend?: Prepend;
10
+ mark?: string;
11
+ }
12
+ declare function injectCSS(css: string, option?: Options): HTMLStyleElement | null;
13
+ declare function removeCSS(key: string, option?: Options): void;
14
+ /**
15
+ * manually clear container cache to avoid global cache in unit testes
16
+ */
17
+ declare function clearContainerCache(): void;
18
+ declare function updateCSS(css: string, key: string, option?: Options): any;
19
+
20
+ export { AppendType, ContainerType, Prepend, clearContainerCache, injectCSS, removeCSS, updateCSS };
@@ -0,0 +1 @@
1
+ "use strict";var d=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var N=(e,n)=>{for(var t in n)d(e,t,{get:n[t],enumerable:!0})},w=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of x(n))!S.call(e,r)&&r!==t&&d(e,r,{get:()=>n[r],enumerable:!(o=T(n,r))||o.enumerable});return e};var O=e=>w(d({},"__esModule",{value:!0}),e);var L={};N(L,{clearContainerCache:()=>R,injectCSS:()=>p,removeCSS:()=>M,updateCSS:()=>v});module.exports=O(L);function A(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var f=A;function u(e,n){if(!e)return!1;if(e.contains)return e.contains(n);let t=n;for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var l="data-vc-order",E="vc-util-key",c=new Map;function y({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:E}function a(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function b(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function h(e){return Array.from((c.get(e)||e).children).filter(n=>n.tagName==="STYLE")}function p(e,n={}){if(!f())return null;let{csp:t,prepend:o}=n,r=document.createElement("style");r.setAttribute(l,b(o)),t?.nonce&&(r.nonce=t?.nonce),r.innerHTML=e;let i=a(n),{firstChild:g}=i;if(o){if(o==="queue"){let s=h(i).filter(C=>["prepend","prependQueue"].includes(C.getAttribute(l)));if(s.length)return i.insertBefore(r,s[s.length-1].nextSibling),r}i.insertBefore(r,g)}else i.appendChild(r);return r}function m(e,n={}){let t=a(n);return h(t).find(o=>o.getAttribute(y(n))===e)}function M(e,n={}){let t=m(e,n);t&&a(n).removeChild(t)}function P(e,n){let t=c.get(e);if(!t||!u(document,t)){let o=p("",n),{parentNode:r}=o;c.set(e,r),e.removeChild(o)}}function R(){c.clear()}function v(e,n,t={}){let o=a(t);P(o,t);let r=m(n,t);if(r)return t.csp?.nonce&&r.nonce!==t.csp?.nonce&&(r.nonce=t.csp?.nonce),r.innerHTML!==e&&(r.innerHTML=e),r;let i=p(e,t);return i.setAttribute(y(t),n),i}0&&(module.exports={clearContainerCache,injectCSS,removeCSS,updateCSS});
@@ -0,0 +1 @@
1
+ import{a,b,c,d}from"../chunk-4JPCGRPU.mjs";import"../chunk-KGXCJWE5.mjs";import"../chunk-IZHCWZIN.mjs";export{c as clearContainerCache,a as injectCSS,b as removeCSS,d as updateCSS};
@@ -0,0 +1,3 @@
1
+ declare const findDOMNode: (instance: any) => any;
2
+
3
+ export { findDOMNode as default };
@@ -0,0 +1 @@
1
+ "use strict";var t=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var u=(l,e)=>{for(var o in e)t(l,o,{get:e[o],enumerable:!0})},x=(l,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let d of g(e))!n.call(l,d)&&d!==o&&t(l,d,{get:()=>e[d],enumerable:!(r=f(e,d))||r.enumerable});return l};var N=l=>x(t({},"__esModule",{value:!0}),l);var h={};u(h,{default:()=>b});module.exports=N(h);var a=l=>{let e=l?.vnode?.el||l&&(l.$el||l);for(;e&&!e.tagName;)e=e.nextSibling;return e},b=a;
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-AHENZTBD.mjs";export{a as default};