@obr-fe/utils 1.2.0 → 2.0.1
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.
- package/dist/array.d.mts +98 -3
- package/dist/{array-CiSUhZCW.d.mts → array.d.ts} +8 -9
- package/dist/array.js +1 -0
- package/dist/array.mjs +1 -1
- package/dist/base.d.mts +192 -3
- package/dist/{base-BXKvmcaf.d.cts → base.d.ts} +4 -5
- package/dist/base.js +1 -0
- package/dist/base.mjs +1 -1
- package/dist/chunk-224VP3SO.mjs +1 -0
- package/dist/chunk-34VTCYOF.mjs +1 -0
- package/dist/chunk-3EVCK72A.mjs +1 -0
- package/dist/chunk-3JZFB5CS.mjs +1 -0
- package/dist/chunk-44EYU7QJ.mjs +1 -0
- package/dist/chunk-4JPCGRPU.mjs +1 -0
- package/dist/chunk-6DX7ZFGR.mjs +1 -0
- package/dist/chunk-7YMDSJIW.mjs +1 -0
- package/dist/chunk-A25LR755.mjs +1 -0
- package/dist/chunk-A5BXGBYT.mjs +1 -0
- package/dist/chunk-BEM6E7R7.mjs +1 -0
- package/dist/chunk-BPXO4V4X.mjs +1 -0
- package/dist/chunk-CJW7PR5X.mjs +1 -0
- package/dist/chunk-DDHFJKTT.mjs +1 -0
- package/dist/chunk-DKKF6DRJ.mjs +1 -0
- package/dist/chunk-DVMX6FDA.mjs +1 -0
- package/dist/chunk-E4SEMOGO.mjs +1 -0
- package/dist/chunk-EUDEMS67.mjs +1 -0
- package/dist/chunk-G6NAYP42.mjs +1 -0
- package/dist/chunk-HERHZLBT.mjs +1 -0
- package/dist/chunk-HOXWKSQ2.mjs +1 -0
- package/dist/chunk-INFFTHYR.mjs +1 -0
- package/dist/chunk-IZHCWZIN.mjs +1 -0
- package/dist/chunk-KGXCJWE5.mjs +1 -0
- package/dist/chunk-MQBXN7R5.mjs +1 -0
- package/dist/chunk-MUUIQW2M.mjs +1 -0
- package/dist/chunk-NX2HGAYK.mjs +1 -0
- package/dist/chunk-PE3DNHCL.mjs +1 -0
- package/dist/chunk-PK5CYIDE.mjs +1 -0
- package/dist/chunk-R2AK2OJS.mjs +1 -0
- package/dist/chunk-SAXMBV46.mjs +1 -0
- package/dist/chunk-SZOHVFVZ.mjs +1 -0
- package/dist/chunk-TQ5GXPYB.mjs +1 -0
- package/dist/chunk-UVMLBW6A.mjs +1 -0
- package/dist/chunk-UYN2YSOE.mjs +1 -0
- package/dist/chunk-WN7L4HYY.mjs +1 -0
- package/dist/chunk-X7TUTCBW.mjs +1 -0
- package/dist/chunk-YA66RVVU.mjs +1 -0
- package/dist/clipboard.d.mts +3 -2
- package/dist/clipboard.d.ts +3 -0
- package/dist/clipboard.js +1 -0
- package/dist/clipboard.mjs +1 -1
- package/dist/dayjs.d.mts +29 -2
- package/dist/{dayjs-DgS65bx1.d.cts → dayjs.d.ts} +5 -6
- package/dist/dayjs.js +1 -0
- package/dist/dayjs.mjs +1 -1
- package/dist/dom/base.d.mts +24 -2
- package/dist/{base-Ca2FN16G.d.mts → dom/base.d.ts} +2 -3
- package/dist/dom/base.js +1 -0
- package/dist/dom/base.mjs +1 -1
- package/dist/dom/class.d.mts +26 -2
- package/dist/{class-Bp70Yi1y.d.cts → dom/class.d.ts} +2 -3
- package/dist/dom/class.js +1 -0
- package/dist/dom/class.mjs +1 -1
- package/dist/dom/contains.d.mts +10 -2
- package/dist/{contains-Bj-oQ7KI.d.mts → dom/contains.d.ts} +2 -3
- package/dist/dom/contains.js +1 -0
- package/dist/dom/contains.mjs +1 -1
- package/dist/dom/css.d.mts +22 -2
- package/dist/{css-5xR1zP0f.d.cts → dom/css.d.ts} +10 -11
- package/dist/dom/css.js +1 -0
- package/dist/dom/css.mjs +1 -1
- package/dist/dom/dynamic-css.d.mts +20 -2
- package/dist/{dynamic-css-CIw8ZtwR.d.cts → dom/dynamic-css.d.ts} +8 -9
- package/dist/dom/dynamic-css.js +1 -0
- package/dist/dom/dynamic-css.mjs +1 -1
- package/dist/dom/find-dom-node.d.mts +3 -2
- package/dist/dom/find-dom-node.d.ts +3 -0
- package/dist/dom/find-dom-node.js +1 -0
- package/dist/dom/find-dom-node.mjs +1 -1
- package/dist/dom/focus.d.mts +10 -2
- package/dist/{focus-BBcVAsFx.d.cts → dom/focus.d.ts} +2 -3
- package/dist/dom/focus.js +1 -0
- package/dist/dom/focus.mjs +1 -1
- package/dist/dom/iframe.d.mts +57 -2
- package/dist/{iframe-CBeiHcmx.d.mts → dom/iframe.d.ts} +15 -16
- package/dist/dom/iframe.js +1 -0
- package/dist/dom/iframe.mjs +1 -1
- package/dist/dom/index.d.mts +17 -18
- package/dist/dom/index.d.ts +17 -0
- package/dist/dom/index.js +1 -0
- package/dist/dom/index.mjs +1 -1
- package/dist/dom/is-visible.d.mts +3 -2
- package/dist/dom/is-visible.d.ts +3 -0
- package/dist/dom/is-visible.js +1 -0
- package/dist/dom/is-visible.mjs +1 -1
- package/dist/dom/lib/can-use-dom.d.mts +2 -3
- package/dist/dom/lib/can-use-dom.d.ts +3 -0
- package/dist/dom/lib/can-use-dom.js +1 -0
- package/dist/dom/lib/can-use-dom.mjs +1 -1
- package/dist/dom/scrollbar.d.mts +8 -2
- package/dist/{scrollbar-B0PNF6i2.d.mts → dom/scrollbar.d.ts} +2 -3
- package/dist/dom/scrollbar.js +1 -0
- package/dist/dom/scrollbar.mjs +1 -1
- package/dist/dom/storage.d.mts +20 -3
- package/dist/{storage-DicI9wsP.d.cts → dom/storage.d.ts} +4 -5
- package/dist/dom/storage.js +1 -0
- package/dist/dom/storage.mjs +1 -1
- package/dist/dom/style-checker.d.mts +4 -2
- package/dist/{style-checker-CpyAZJew.d.cts → dom/style-checker.d.ts} +2 -3
- package/dist/dom/style-checker.js +1 -0
- package/dist/dom/style-checker.mjs +1 -1
- package/dist/dom/style-names.d.mts +3 -2
- package/dist/{style-names-ClFu2pk1.d.cts → dom/style-names.d.ts} +2 -3
- package/dist/dom/style-names.js +1 -0
- package/dist/dom/style-names.mjs +1 -1
- package/dist/dom/support.d.mts +8 -2
- package/dist/dom/support.d.ts +8 -0
- package/dist/dom/support.js +1 -0
- package/dist/dom/support.mjs +1 -1
- package/dist/dom/video.d.mts +9 -2
- package/dist/{video-Bp6NaeX6.d.cts → dom/video.d.ts} +2 -3
- package/dist/dom/video.js +1 -0
- package/dist/dom/video.mjs +1 -1
- package/dist/encrypt.d.mts +28 -2
- package/dist/{encrypt-BFDBlSX_.d.cts → encrypt.d.ts} +2 -3
- package/dist/encrypt.js +1 -0
- package/dist/encrypt.mjs +1 -1
- package/dist/file.d.mts +35 -2
- package/dist/{file-CjjpuB5u.d.cts → file.d.ts} +5 -6
- package/dist/file.js +1 -0
- package/dist/file.mjs +1 -1
- package/dist/index.d.mts +36 -44
- package/dist/index.d.ts +36 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -1
- package/dist/lodash.d.mts +1 -2
- package/dist/lodash.d.ts +1 -0
- package/dist/lodash.js +1 -0
- package/dist/lodash.mjs +1 -1
- package/dist/object.d.mts +86 -3
- package/dist/{object-CqyPehTh.d.cts → object.d.ts} +4 -5
- package/dist/object.js +1 -0
- package/dist/object.mjs +1 -1
- package/dist/other.d.mts +49 -3
- package/dist/{other-BzR4DqG0.d.cts → other.d.ts} +4 -5
- package/dist/other.js +1 -0
- package/dist/other.mjs +1 -1
- package/dist/parse.d.mts +21 -3
- package/dist/{parse-DQMRWCdz.d.mts → parse.d.ts} +7 -8
- package/dist/parse.js +1 -0
- package/dist/parse.mjs +1 -1
- package/dist/pinyin.d.mts +18 -2
- package/dist/{pinyin-C2BqrFMq.d.mts → pinyin.d.ts} +3 -5
- package/dist/pinyin.js +1 -0
- package/dist/pinyin.mjs +1 -1
- package/dist/request/constant.d.mts +4 -4
- package/dist/request/{constant.d.cts → constant.d.ts} +4 -4
- package/dist/request/constant.js +1 -0
- package/dist/request/constant.mjs +1 -1
- package/dist/request/handler.d.mts +10 -3
- package/dist/request/handler.d.ts +10 -0
- package/dist/request/handler.js +1 -0
- package/dist/request/handler.mjs +1 -1
- package/dist/request/index.d.mts +4 -6
- package/dist/request/index.d.ts +4 -0
- package/dist/request/index.js +1 -0
- package/dist/request/index.mjs +1 -1
- package/dist/request/request.d.mts +99 -3
- package/dist/request/request.d.ts +99 -0
- package/dist/request/request.js +1 -0
- package/dist/request/request.mjs +1 -1
- package/dist/request/utils/cancel.d.mts +4 -4
- package/dist/request/utils/{cancel.d.cts → cancel.d.ts} +4 -4
- package/dist/request/utils/cancel.js +1 -0
- package/dist/request/utils/cancel.mjs +1 -1
- package/dist/request/utils/file.d.mts +4 -4
- package/dist/request/utils/file.d.ts +6 -0
- package/dist/request/utils/file.js +1 -0
- package/dist/request/utils/file.mjs +1 -1
- package/dist/request/utils/format.d.mts +4 -4
- package/dist/request/utils/{format.d.cts → format.d.ts} +4 -4
- package/dist/request/utils/format.js +1 -0
- package/dist/request/utils/format.mjs +1 -1
- package/dist/request/utils/params.d.mts +4 -4
- package/dist/request/utils/params.d.ts +6 -0
- package/dist/request/utils/params.js +1 -0
- package/dist/request/utils/params.mjs +1 -1
- package/dist/safe-next-tick.d.mts +9 -2
- package/dist/{safe-next-tick-DlJsO1Ha.d.mts → safe-next-tick.d.ts} +4 -5
- package/dist/safe-next-tick.js +1 -0
- package/dist/safe-next-tick.mjs +1 -1
- package/dist/types.d.mts +207 -2
- package/dist/types.d.ts +207 -0
- package/dist/types.js +1 -0
- package/dist/types.mjs +1 -1
- package/dist/vue/hooks/clipboard.d.mts +8 -2
- package/dist/vue/hooks/clipboard.d.ts +8 -0
- package/dist/vue/hooks/clipboard.js +1 -0
- package/dist/vue/hooks/clipboard.mjs +1 -1
- package/dist/vue/index.d.mts +3 -4
- package/dist/vue/index.d.ts +3 -0
- package/dist/vue/index.js +1 -0
- package/dist/vue/index.mjs +1 -1
- package/dist/vue/type-util.d.mts +47 -2
- package/dist/{type-util-BdSpgYN3.d.mts → vue/type-util.d.ts} +21 -22
- package/dist/vue/type-util.js +1 -0
- package/dist/vue/type-util.mjs +1 -1
- package/package.json +5 -13
- package/dist/array-CEhD-Z_e.mjs +0 -1
- package/dist/array-okkZATKz.d.cts +0 -99
- package/dist/array-ri-t3Wsz.cjs +0 -1
- package/dist/array.cjs +0 -1
- package/dist/array.d.cts +0 -3
- package/dist/base-854WVUaj.mjs +0 -1
- package/dist/base-BSg8gJZf.mjs +0 -1
- package/dist/base-DSfexc9G.d.cts +0 -25
- package/dist/base-DUxrUTOr.cjs +0 -1
- package/dist/base-Dl59EolR.d.mts +0 -193
- package/dist/base-DmSU_ydZ.cjs +0 -1
- package/dist/base.cjs +0 -1
- package/dist/base.d.cts +0 -3
- package/dist/can-use-dom-DiyvIP5G.mjs +0 -1
- package/dist/can-use-dom-DvmMdeGa.cjs +0 -1
- package/dist/cancel-BV5B58Lw.mjs +0 -1
- package/dist/cancel-Do0w5I5K.cjs +0 -1
- package/dist/chunk-BcXMmzxH.cjs +0 -1
- package/dist/chunk-Dbq9I6zD.mjs +0 -1
- package/dist/class-C29-Mh-o.mjs +0 -1
- package/dist/class-D5duI9ps.d.mts +0 -27
- package/dist/class-D8a8qnWA.cjs +0 -1
- package/dist/clipboard-BN1iiQLu.d.mts +0 -4
- package/dist/clipboard-C8ZiJE_h.d.cts +0 -9
- package/dist/clipboard-CJ-9sRbH.d.mts +0 -9
- package/dist/clipboard-CWQVWiTk.cjs +0 -1
- package/dist/clipboard-Ci0l5Dtt.d.cts +0 -4
- package/dist/clipboard-CjgXtqbg.mjs +0 -1
- package/dist/clipboard-DqGhq6A4.mjs +0 -1
- package/dist/clipboard-ZMrs6wzK.cjs +0 -1
- package/dist/clipboard.cjs +0 -1
- package/dist/clipboard.d.cts +0 -2
- package/dist/constant-CskvZDUK.cjs +0 -1
- package/dist/constant-Dxt8HuVn.mjs +0 -1
- package/dist/contains-BpG9RIaT.mjs +0 -1
- package/dist/contains-CYQgjY4K.cjs +0 -1
- package/dist/contains-D3q8gHUu.d.cts +0 -11
- package/dist/css-DIpTZrC7.mjs +0 -1
- package/dist/css-DkmknM-7.d.mts +0 -23
- package/dist/css-WYllKaVv.cjs +0 -1
- package/dist/dayjs-00xX6Mts.d.mts +0 -31
- package/dist/dayjs-BBOQ72ow.mjs +0 -1
- package/dist/dayjs-Bvzj_rlD.cjs +0 -1
- package/dist/dayjs.cjs +0 -1
- package/dist/dayjs.d.cts +0 -2
- package/dist/dom/base.cjs +0 -1
- package/dist/dom/base.d.cts +0 -2
- package/dist/dom/class.cjs +0 -1
- package/dist/dom/class.d.cts +0 -2
- package/dist/dom/contains.cjs +0 -1
- package/dist/dom/contains.d.cts +0 -2
- package/dist/dom/css.cjs +0 -1
- package/dist/dom/css.d.cts +0 -2
- package/dist/dom/dynamic-css.cjs +0 -1
- package/dist/dom/dynamic-css.d.cts +0 -2
- package/dist/dom/find-dom-node.cjs +0 -1
- package/dist/dom/find-dom-node.d.cts +0 -2
- package/dist/dom/focus.cjs +0 -1
- package/dist/dom/focus.d.cts +0 -2
- package/dist/dom/iframe.cjs +0 -1
- package/dist/dom/iframe.d.cts +0 -2
- package/dist/dom/index.cjs +0 -1
- package/dist/dom/index.d.cts +0 -18
- package/dist/dom/is-visible.cjs +0 -1
- package/dist/dom/is-visible.d.cts +0 -2
- package/dist/dom/lib/can-use-dom.cjs +0 -1
- package/dist/dom/lib/can-use-dom.d.cts +0 -3
- package/dist/dom/scrollbar.cjs +0 -1
- package/dist/dom/scrollbar.d.cts +0 -2
- package/dist/dom/storage.cjs +0 -1
- package/dist/dom/storage.d.cts +0 -3
- package/dist/dom/style-checker.cjs +0 -1
- package/dist/dom/style-checker.d.cts +0 -2
- package/dist/dom/style-names.cjs +0 -1
- package/dist/dom/style-names.d.cts +0 -2
- package/dist/dom/support.cjs +0 -1
- package/dist/dom/support.d.cts +0 -2
- package/dist/dom/video.cjs +0 -1
- package/dist/dom/video.d.cts +0 -2
- package/dist/dom-D2QfuVth.mjs +0 -1
- package/dist/dynamic-css-CD9eHWzL.d.mts +0 -21
- package/dist/dynamic-css-CP1iFszw.mjs +0 -1
- package/dist/dynamic-css-iSnm5CN6.cjs +0 -1
- package/dist/encrypt-CHxdyuoC.d.mts +0 -29
- package/dist/encrypt-D6oTfiTY.cjs +0 -1
- package/dist/encrypt-Z5CU2r_1.mjs +0 -1
- package/dist/encrypt.cjs +0 -1
- package/dist/encrypt.d.cts +0 -2
- package/dist/file-B9oorXhT.cjs +0 -1
- package/dist/file-D4oBhObv.d.mts +0 -36
- package/dist/file-Dwobl-pF.mjs +0 -1
- package/dist/file-TjtumYrh.mjs +0 -1
- package/dist/file-rmcv99h0.cjs +0 -1
- package/dist/file.cjs +0 -1
- package/dist/file.d.cts +0 -2
- package/dist/find-dom-node-BYO9We8P.d.mts +0 -4
- package/dist/find-dom-node-BkrYW2pm.d.cts +0 -4
- package/dist/find-dom-node-gbroqN2N.mjs +0 -1
- package/dist/find-dom-node-lY7vePVL.cjs +0 -1
- package/dist/focus-ByNB07tt.d.mts +0 -11
- package/dist/focus-DtSCSQEr.cjs +0 -1
- package/dist/focus-REYXIBdQ.mjs +0 -1
- package/dist/format-3CsgkBWg.mjs +0 -1
- package/dist/format-CezZBld9.cjs +0 -1
- package/dist/handler-C40H2JG4.cjs +0 -1
- package/dist/handler-Dk1QWSgF.d.cts +0 -10
- package/dist/handler-N6Akxkpa.mjs +0 -1
- package/dist/handler-bsPUG7U9.d.mts +0 -10
- package/dist/iframe-ByOdqFYr.mjs +0 -1
- package/dist/iframe-CR0bl22C.cjs +0 -1
- package/dist/iframe-QhpkIola.d.cts +0 -58
- package/dist/index-6bSwZ6-V.d.cts +0 -1
- package/dist/index-BYjO2-Dk.d.mts +0 -3
- package/dist/index-CLTQPxoD.d.mts +0 -1
- package/dist/index-CqciuydZ.d.cts +0 -7
- package/dist/index-Ctvuv0vV.d.cts +0 -1
- package/dist/index-D-9tW2r5.d.mts +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -43
- package/dist/is-visible-BXbqt6I2.mjs +0 -1
- package/dist/is-visible-BpFCb4uJ.d.mts +0 -4
- package/dist/is-visible-DT2jLmnp.d.cts +0 -4
- package/dist/is-visible-laJngqtK.cjs +0 -1
- package/dist/lodash-BrrZKPAY.d.cts +0 -10
- package/dist/lodash-DAdPs0O9.d.mts +0 -10
- package/dist/lodash-iHVEJs1z.mjs +0 -1
- package/dist/lodash-kixEH9o9.cjs +0 -1
- package/dist/lodash.cjs +0 -1
- package/dist/lodash.d.cts +0 -2
- package/dist/object-C6qVmoZY.cjs +0 -1
- package/dist/object-j-lK643f.mjs +0 -1
- package/dist/object-l_DvbWqN.d.mts +0 -87
- package/dist/object.cjs +0 -1
- package/dist/object.d.cts +0 -3
- package/dist/other-B2ug3Xof.mjs +0 -1
- package/dist/other-H13CGzY5.d.mts +0 -50
- package/dist/other-c9ZDQ-tY.cjs +0 -1
- package/dist/other.cjs +0 -1
- package/dist/other.d.cts +0 -3
- package/dist/params-CnZhAsve.cjs +0 -1
- package/dist/params-CpjttIDa.mjs +0 -1
- package/dist/parse-BpErok05.cjs +0 -1
- package/dist/parse-C1eaIjot.mjs +0 -1
- package/dist/parse-vp0jh8-x.d.cts +0 -22
- package/dist/parse.cjs +0 -1
- package/dist/parse.d.cts +0 -3
- package/dist/pinyin-BE6Ew65z.cjs +0 -1
- package/dist/pinyin-D11MW4u2.mjs +0 -1
- package/dist/pinyin-Di92101W.d.cts +0 -20
- package/dist/pinyin.cjs +0 -1
- package/dist/pinyin.d.cts +0 -2
- package/dist/request/constant.cjs +0 -1
- package/dist/request/handler.cjs +0 -1
- package/dist/request/handler.d.cts +0 -3
- package/dist/request/index.cjs +0 -1
- package/dist/request/index.d.cts +0 -6
- package/dist/request/request.cjs +0 -1
- package/dist/request/request.d.cts +0 -3
- package/dist/request/utils/cancel.cjs +0 -1
- package/dist/request/utils/file.cjs +0 -1
- package/dist/request/utils/file.d.cts +0 -6
- package/dist/request/utils/format.cjs +0 -1
- package/dist/request/utils/params.cjs +0 -1
- package/dist/request/utils/params.d.cts +0 -6
- package/dist/request-BG5UIh9R.mjs +0 -1
- package/dist/request-C8gChBjl.d.cts +0 -99
- package/dist/request-Cbv8Ih3e.cjs +0 -1
- package/dist/request-CcQHJNao.cjs +0 -1
- package/dist/request-CmsAe99W.mjs +0 -1
- package/dist/request-DGUcKxsQ.d.mts +0 -99
- package/dist/safe-next-tick-1ezZPIPs.d.cts +0 -10
- package/dist/safe-next-tick-Cc30ZlUX.mjs +0 -1
- package/dist/safe-next-tick-DphyaFY6.cjs +0 -1
- package/dist/safe-next-tick.cjs +0 -1
- package/dist/safe-next-tick.d.cts +0 -2
- package/dist/scrollbar-07jqhpVk.d.cts +0 -9
- package/dist/scrollbar-2zQwgB3N.cjs +0 -1
- package/dist/scrollbar-BsVSwcz1.mjs +0 -1
- package/dist/storage-CVE8yo6N.mjs +0 -1
- package/dist/storage-ClTxbIcP.cjs +0 -1
- package/dist/storage-HTBNfA8Q.d.mts +0 -21
- package/dist/style-checker-066o7h7_.mjs +0 -1
- package/dist/style-checker-B5wzcdHi.d.mts +0 -5
- package/dist/style-checker-DAxS0NyJ.cjs +0 -1
- package/dist/style-names-CYvxRARD.cjs +0 -1
- package/dist/style-names-DDdz6-7S.d.mts +0 -4
- package/dist/style-names-cEIIM3cL.mjs +0 -1
- package/dist/support-BKRoxgNc.d.mts +0 -9
- package/dist/support-BZYJpIOE.cjs +0 -1
- package/dist/support-jAYY4GwL.d.cts +0 -9
- package/dist/support-wu9hh5gZ.mjs +0 -1
- package/dist/type-util-BRGMhQFp.d.cts +0 -48
- package/dist/type-util-HyvLYA2w.cjs +0 -1
- package/dist/type-util-Qle7ht7X.mjs +0 -1
- package/dist/types-BEdiy6mb.d.mts +0 -208
- package/dist/types-Bs46AtMe.mjs +0 -1
- package/dist/types-DTtPjrm8.d.cts +0 -208
- package/dist/types.cjs +0 -1
- package/dist/types.d.cts +0 -2
- package/dist/video-BDLauzJm.cjs +0 -1
- package/dist/video-C_sYI0Ht.d.mts +0 -10
- package/dist/video-CtkByFxt.mjs +0 -1
- package/dist/vue/hooks/clipboard.cjs +0 -1
- package/dist/vue/hooks/clipboard.d.cts +0 -2
- package/dist/vue/index.cjs +0 -1
- package/dist/vue/index.d.cts +0 -4
- package/dist/vue/type-util.cjs +0 -1
- package/dist/vue/type-util.d.cts +0 -2
- package/dist/vue-Q8n_JN-R.mjs +0 -1
- /package/dist/{dom-DzrnEGri.cjs → chunk-G27KRYT2.mjs} +0 -0
- /package/dist/{types-DAFnYo8a.cjs → chunk-PM3H3ISM.mjs} +0 -0
- /package/dist/{vue-CGBzFhF4.cjs → chunk-WBQAMGXK.mjs} +0 -0
package/dist/array.d.mts
CHANGED
|
@@ -1,3 +1,98 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { TreeItemType, ObjectDataType, BaseOptionType } from './types.mjs';
|
|
2
|
+
import 'axios';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description: 字符串元组
|
|
6
|
+
* @param {*} args
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @autor: 刘 相卿
|
|
9
|
+
*/
|
|
10
|
+
declare const tuple: <T extends string[]>(...args: T) => T;
|
|
11
|
+
/**
|
|
12
|
+
* @description: 数字元组
|
|
13
|
+
* @param {*} args
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @autor: 刘 相卿
|
|
16
|
+
*/
|
|
17
|
+
declare const tupleNum: <T extends number[]>(...args: T) => T;
|
|
18
|
+
/**
|
|
19
|
+
* @description: 转换为数组
|
|
20
|
+
* @param {*} val
|
|
21
|
+
* @return {*}
|
|
22
|
+
* @autor: 刘 相卿
|
|
23
|
+
*/
|
|
24
|
+
declare function toArray<T>(val: T): T[];
|
|
25
|
+
/**
|
|
26
|
+
* @description: 数组转树型结构数据
|
|
27
|
+
* @param {any[]} data
|
|
28
|
+
* @param {string} id id字段名
|
|
29
|
+
* @param {string} pid pid字段名
|
|
30
|
+
* @param {string} children children字段名
|
|
31
|
+
* @return {TreeItemType[]} 树型数据
|
|
32
|
+
* @autor: 刘 相卿
|
|
33
|
+
*/
|
|
34
|
+
declare function array2tree<T = TreeItemType>(data?: ObjectDataType[], id?: string, pid?: string, children?: string): T[];
|
|
35
|
+
/**
|
|
36
|
+
* @description: 对象数组转换为选项数组
|
|
37
|
+
* @param {ObjectDataType[]} array
|
|
38
|
+
* @param {{ label: string; value: string }} alias
|
|
39
|
+
* @return {BaseOptionType[]}
|
|
40
|
+
* @autor: 刘 相卿
|
|
41
|
+
*/
|
|
42
|
+
declare function array2option(array: ObjectDataType[], alias: {
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}): BaseOptionType[];
|
|
46
|
+
/**
|
|
47
|
+
* @description: 删除数组中的空元素
|
|
48
|
+
* @param {T[]} array
|
|
49
|
+
* @return {*}
|
|
50
|
+
* @autor: 刘 相卿
|
|
51
|
+
*/
|
|
52
|
+
declare function deleteEmptyElement<T>(array: T[]): T[];
|
|
53
|
+
/**
|
|
54
|
+
* @description: 根据给定的值集合,查找树型结构数据中符合条件的元素
|
|
55
|
+
* @param {TreeItemType[]} array 树型数组
|
|
56
|
+
* @param {(string | number)[]} values 值集合
|
|
57
|
+
* @param {{ value?: string; children?: string }} alias
|
|
58
|
+
* @return {*}
|
|
59
|
+
* @autor: 刘 相卿
|
|
60
|
+
*/
|
|
61
|
+
declare function getElementsByValues(array: TreeItemType[] | undefined, values: (string | number)[], alias?: {
|
|
62
|
+
value?: string;
|
|
63
|
+
children?: string;
|
|
64
|
+
}, reserveChildren?: boolean): ObjectDataType[];
|
|
65
|
+
/**
|
|
66
|
+
* @description: 将树型结构数组拉平为一维数组
|
|
67
|
+
* @param {TreeItemType[]} data 树型数组
|
|
68
|
+
* @param {{ value?: string; children?: string }} alias
|
|
69
|
+
* @return {TreeItemType[]}
|
|
70
|
+
* @autor: 刘 相卿
|
|
71
|
+
*/
|
|
72
|
+
declare function tree2array<T extends ObjectDataType = ObjectDataType>(data?: T[], alias?: string, reserveChildren?: boolean): T[];
|
|
73
|
+
/**
|
|
74
|
+
* @description: 根据对象数组中的keys去重
|
|
75
|
+
* @param {ObjectDataType[]} array 原数组
|
|
76
|
+
* @param {string[]} keys 对象key
|
|
77
|
+
* @return {T[]}
|
|
78
|
+
* @autor: 刘 相卿
|
|
79
|
+
*/
|
|
80
|
+
declare function uniqueArrayByKeys<T = ObjectDataType>(array: T[], keys: (keyof T)[]): T[];
|
|
81
|
+
/**
|
|
82
|
+
* @description: 删除简单数组中的符合规则的元素,并返回新数组
|
|
83
|
+
* @param {(number|string|boolean)[]} array 原数组
|
|
84
|
+
* @param {(number|string|boolean)[]} values 符合的元素值
|
|
85
|
+
* @return {*} (number|string|boolean)[]
|
|
86
|
+
* @autor: 刘 相卿
|
|
87
|
+
*/
|
|
88
|
+
declare function deleteElement(array: (number | string | boolean)[], values?: (number | string | boolean)[]): (number | string | boolean)[];
|
|
89
|
+
/**
|
|
90
|
+
* @description: 删除数组中的符合规则的元素,并返回新数组
|
|
91
|
+
* @param {any[]} array 原数组
|
|
92
|
+
* @param {any[]} rules 符合的元素值,如:[1, { name: 'x', age: 12 }, { name: 'z' }]则删除「元素 = 1 或 元素.name = 'x' && 元素.age = 'x' 或 元素.name = 'z'」的元素
|
|
93
|
+
* @return {*}
|
|
94
|
+
* @autor: 刘 相卿
|
|
95
|
+
*/
|
|
96
|
+
declare function deleteElementPro(array: any[], rules?: any[]): any[];
|
|
97
|
+
|
|
98
|
+
export { array2option, array2tree, deleteElement, deleteElementPro, deleteEmptyElement, getElementsByValues, toArray, tree2array, tuple, tupleNum, uniqueArrayByKeys };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/array.d.ts
|
|
1
|
+
import { TreeItemType, ObjectDataType, BaseOptionType } from './types.js';
|
|
2
|
+
import 'axios';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* @description: 字符串元组
|
|
@@ -41,8 +40,8 @@ declare function array2tree<T = TreeItemType>(data?: ObjectDataType[], id?: stri
|
|
|
41
40
|
* @autor: 刘 相卿
|
|
42
41
|
*/
|
|
43
42
|
declare function array2option(array: ObjectDataType[], alias: {
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
46
45
|
}): BaseOptionType[];
|
|
47
46
|
/**
|
|
48
47
|
* @description: 删除数组中的空元素
|
|
@@ -60,8 +59,8 @@ declare function deleteEmptyElement<T>(array: T[]): T[];
|
|
|
60
59
|
* @autor: 刘 相卿
|
|
61
60
|
*/
|
|
62
61
|
declare function getElementsByValues(array: TreeItemType[] | undefined, values: (string | number)[], alias?: {
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
value?: string;
|
|
63
|
+
children?: string;
|
|
65
64
|
}, reserveChildren?: boolean): ObjectDataType[];
|
|
66
65
|
/**
|
|
67
66
|
* @description: 将树型结构数组拉平为一维数组
|
|
@@ -95,5 +94,5 @@ declare function deleteElement(array: (number | string | boolean)[], values?: (n
|
|
|
95
94
|
* @autor: 刘 相卿
|
|
96
95
|
*/
|
|
97
96
|
declare function deleteElementPro(array: any[], rules?: any[]): any[];
|
|
98
|
-
|
|
99
|
-
export {
|
|
97
|
+
|
|
98
|
+
export { array2option, array2tree, deleteElement, deleteElementPro, deleteEmptyElement, getElementsByValues, toArray, tree2array, tuple, tupleNum, uniqueArrayByKeys };
|
package/dist/array.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var D=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})},h=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of x(t))!d.call(e,r)&&r!==n&&f(e,r,{get:()=>t[r],enumerable:!(s=j(t,r))||s.enumerable});return e};var w=e=>h(f({},"__esModule",{value:!0}),e);var F={};D(F,{array2option:()=>A,array2tree:()=>R,deleteElement:()=>P,deleteElementPro:()=>B,deleteEmptyElement:()=>v,getElementsByValues:()=>g,toArray:()=>N,tree2array:()=>S,tuple:()=>k,tupleNum:()=>E,uniqueArrayByKeys:()=>K});module.exports=w(F);var T=e=>typeof e=="number";var b=e=>Object.prototype.toString.call(e)==="[object Object]";function p(e){return e==null||e===""||typeof e=="number"&&Number.isNaN(e)}function l(e){return!e||Object.getOwnPropertyNames(e).length===0}var c=require("es-toolkit/compat");var m=require("es-toolkit/compat");function O(e={}){return Object.entries(e).reduce((t,[n,s])=>(p(s)||(t[n]=s),t),{})}var k=(...e)=>e,E=(...e)=>e;function N(e){return Array.isArray(e)?e:[e]}function R(e=[],t="id",n="pid",s="children"){let r=[],i={},a=(0,c.cloneDeep)(e);for(let o=0;o<a.length;o++)i[a[o][t]]=a[o];for(let o=0;o<a.length;o++)i[a[o][n]]&&a[o][t]!==a[o][n]?(i[a[o][n]][s]||(i[a[o][n]][s]=[]),i[a[o][n]][s].push(a[o])):r.push(a[o]);return r}function A(e,t){return e.map(n=>({label:n[t.label],value:n[t.value]}))}function v(e){return e.filter(t=>!p(t))}function g(e=[],t,n,s=!1){let r={value:"value",children:"children",...O(n)},i=[],[a]=t,o=e.find(u=>u[r.value]===a);if(!p(a)&&!p(o)){let{[r.children]:u,...y}=o;return i.concat(s?{...y,children:u}:y,...g(u??[],t.slice(1),r))}return i}function S(e=[],t="children",n=!1){let s=[],r=(i,a)=>{i.forEach(o=>{let{[a]:u,...y}=o;n?s.push(o):s.push(y),u&&r(u,a)})};return r(e,t),s}function K(e,t){return e.reduce((s,r)=>(s.find(a=>t.every(o=>a[o]===r[o]))||s.push(r),s),[])}function P(e,t=[]){return e.filter(n=>!t.includes(n))}function B(e,t=[]){return e.filter(n=>!t.some(r=>b(r)&&b(n)?l(r)?l(n):Object.entries(r).every(([i,a])=>a===n[i]):T(r)&&Number.isNaN(r)?T(n)&&Number.isNaN(n):n===r))}0&&(module.exports={array2option,array2tree,deleteElement,deleteElementPro,deleteEmptyElement,getElementsByValues,toArray,tree2array,tuple,tupleNum,uniqueArrayByKeys});
|
package/dist/array.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-224VP3SO.mjs";import"./chunk-3JZFB5CS.mjs";import"./chunk-A5BXGBYT.mjs";import"./chunk-HERHZLBT.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.mts
CHANGED
|
@@ -1,3 +1,192 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { ObjectDataType, DataType } from './types.mjs';
|
|
2
|
+
import 'axios';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description: 判断是否为string类型
|
|
6
|
+
* @param {unknown} val
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @autor: 刘 相卿
|
|
9
|
+
*/
|
|
10
|
+
declare const isString: (val: unknown) => val is string;
|
|
11
|
+
/**
|
|
12
|
+
* @description: 判断是否为number类型
|
|
13
|
+
* @param {unknown} val
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @autor: 刘 相卿
|
|
16
|
+
*/
|
|
17
|
+
declare const isNumber: (val: unknown) => val is number;
|
|
18
|
+
/**
|
|
19
|
+
* @description: 判断是否为boolean类型
|
|
20
|
+
* @param {unknown} val
|
|
21
|
+
* @return {*}
|
|
22
|
+
* @autor: 刘 相卿
|
|
23
|
+
*/
|
|
24
|
+
declare function isBoolean(val: unknown): val is boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @description: 判断是否为函数类型
|
|
27
|
+
* @param {unknown} val
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @autor: 刘 相卿
|
|
30
|
+
*/
|
|
31
|
+
declare const isFunction: (val: unknown) => val is Function;
|
|
32
|
+
/**
|
|
33
|
+
* @description: 判断是否为数组类型
|
|
34
|
+
* @param {unknown} val
|
|
35
|
+
* @return {*}
|
|
36
|
+
* @autor: 刘 相卿
|
|
37
|
+
*/
|
|
38
|
+
declare const isArray: <T>(val: unknown) => val is T[];
|
|
39
|
+
/**
|
|
40
|
+
* @description: 判断是否为undefined类型
|
|
41
|
+
* @param {unknown} val
|
|
42
|
+
* @return {*}
|
|
43
|
+
* @autor: 刘 相卿
|
|
44
|
+
*/
|
|
45
|
+
declare function isUndefined(val: unknown): val is undefined;
|
|
46
|
+
/**
|
|
47
|
+
* @description: 判断参数已定义且不为空
|
|
48
|
+
* @param {*} val
|
|
49
|
+
* @return {*}
|
|
50
|
+
* @autor: 刘 相卿
|
|
51
|
+
*/
|
|
52
|
+
declare const isDef: <T = any>(val?: T | undefined) => val is NonNullable<T>;
|
|
53
|
+
/**
|
|
54
|
+
* @description: 是否为null
|
|
55
|
+
* @param {unknown} val
|
|
56
|
+
* @return {*}
|
|
57
|
+
* @autor: 刘 相卿
|
|
58
|
+
*/
|
|
59
|
+
declare const isNull: (val: unknown) => val is null;
|
|
60
|
+
/**
|
|
61
|
+
* @description: 是否为symbol类型
|
|
62
|
+
* @param {unknown} val
|
|
63
|
+
* @return {*}
|
|
64
|
+
* @autor: 刘 相卿
|
|
65
|
+
*/
|
|
66
|
+
declare const isSymbol: (val: unknown) => val is symbol;
|
|
67
|
+
/**
|
|
68
|
+
* @description: 是否为对象类型
|
|
69
|
+
* @param {unknown} val
|
|
70
|
+
* @return {*}
|
|
71
|
+
* @autor: 刘 相卿
|
|
72
|
+
*/
|
|
73
|
+
declare const isObjectDataType: <T extends ObjectDataType<any, string> = ObjectDataType<any, string>>(val: unknown) => val is T;
|
|
74
|
+
declare const isObject: (val: unknown) => val is object;
|
|
75
|
+
/**
|
|
76
|
+
* @description: 是否为日期类型
|
|
77
|
+
* @param {unknown} val
|
|
78
|
+
* @return {*}
|
|
79
|
+
* @autor: 刘 相卿
|
|
80
|
+
*/
|
|
81
|
+
declare function isDate(val: unknown): val is Date;
|
|
82
|
+
/**
|
|
83
|
+
* @description: 是否为原始类型
|
|
84
|
+
* @return {*}
|
|
85
|
+
* @autor: 刘 相卿
|
|
86
|
+
*/
|
|
87
|
+
declare function isBaseType(val: unknown): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* @description: 是否为url
|
|
90
|
+
* @param {string} val
|
|
91
|
+
* @return {*}
|
|
92
|
+
* @autor: 刘 相卿
|
|
93
|
+
*/
|
|
94
|
+
declare function isUrl(val: string): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* @description: 判断是否未null或者undefined
|
|
97
|
+
* @param {unknown} value
|
|
98
|
+
* @return {*}
|
|
99
|
+
* @autor: 刘 相卿
|
|
100
|
+
*/
|
|
101
|
+
declare function isEmpty(value: unknown, undefinedValue?: boolean): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @description: 判断是否为空值
|
|
104
|
+
* @param {unknown} value
|
|
105
|
+
* @return {boolean}
|
|
106
|
+
* @autor: 刘 相卿
|
|
107
|
+
*/
|
|
108
|
+
declare function isEmptyValue(value: unknown): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* @description: 判断是否为空对象
|
|
111
|
+
* @param {ObjectDataType} object
|
|
112
|
+
* @return {*}
|
|
113
|
+
* @autor: 刘 相卿
|
|
114
|
+
*/
|
|
115
|
+
declare function isEmptyObject(object: ObjectDataType): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* @description: 判断是否为空数组
|
|
118
|
+
* @param {any} data
|
|
119
|
+
* @return {boolean}
|
|
120
|
+
* @autor: 刘 相卿
|
|
121
|
+
*/
|
|
122
|
+
declare function isEmptyArray(data?: any[]): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* @description: 判断是否为无意义的数组,即数组的每个元素都是空值
|
|
125
|
+
* @param {any} data
|
|
126
|
+
* @return {boolean}
|
|
127
|
+
* @autor: 刘 相卿
|
|
128
|
+
*/
|
|
129
|
+
declare function isMeaninglessArray(data?: any[]): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* @description: 获取数据类型
|
|
132
|
+
* @param {any} data
|
|
133
|
+
* @return {DataType} 数据类型字符串
|
|
134
|
+
* @autor: 刘 相卿
|
|
135
|
+
*/
|
|
136
|
+
declare function getDataType(data: any): DataType;
|
|
137
|
+
/**
|
|
138
|
+
* @description: 根据url获取文件类型
|
|
139
|
+
* @param {string} fileUrl
|
|
140
|
+
* @return {*}
|
|
141
|
+
* @autor: 刘 相卿
|
|
142
|
+
*/
|
|
143
|
+
declare function getFileType(fileUrl: string): string;
|
|
144
|
+
/**
|
|
145
|
+
* @description: 替换最后一个匹配的字符串
|
|
146
|
+
* @param {string} str
|
|
147
|
+
* @param {string} char
|
|
148
|
+
* @param {string} target
|
|
149
|
+
* @return {*}
|
|
150
|
+
* @autor: 刘 相卿
|
|
151
|
+
*/
|
|
152
|
+
declare function replaceLastMatch(str: string, char: string, target: string): string;
|
|
153
|
+
/**
|
|
154
|
+
* @description: 替换所有匹配的字符串
|
|
155
|
+
* @param {string} str
|
|
156
|
+
* @param {RegExp} reg
|
|
157
|
+
* @param {string} target
|
|
158
|
+
* @return {*}
|
|
159
|
+
* @autor: 刘 相卿
|
|
160
|
+
*/
|
|
161
|
+
declare function replaceMatch(str: string, reg: RegExp, target: string): string;
|
|
162
|
+
/**
|
|
163
|
+
* @description: 将数字转化为正数
|
|
164
|
+
* @param {number} value
|
|
165
|
+
* @return {*}
|
|
166
|
+
* @autor: 刘 相卿
|
|
167
|
+
*/
|
|
168
|
+
declare function formatPositiveNumber(value: number): number;
|
|
169
|
+
/**
|
|
170
|
+
* @description: JSON字符串转换为JSON对象/数组
|
|
171
|
+
* @param {string} str JSON字符串
|
|
172
|
+
* @return {T}
|
|
173
|
+
* @autor: 刘 相卿
|
|
174
|
+
*/
|
|
175
|
+
declare function string2json<T>(str: string, defaultValue?: T): T;
|
|
176
|
+
/**
|
|
177
|
+
* @description: JSON对象转换为JSON字符串
|
|
178
|
+
* @param {any} json
|
|
179
|
+
* @param {string} defaultValue
|
|
180
|
+
* @return {string}
|
|
181
|
+
* @autor: 刘 相卿
|
|
182
|
+
*/
|
|
183
|
+
declare function json2string(json: any, defaultValue?: string): string;
|
|
184
|
+
/**
|
|
185
|
+
* @description: 生成随机字符串
|
|
186
|
+
* @param {number} length 随机字符串长度 默认长度为10
|
|
187
|
+
* @return {*}
|
|
188
|
+
* @autor: 刘 相卿
|
|
189
|
+
*/
|
|
190
|
+
declare function uuid(length?: number): string;
|
|
191
|
+
|
|
192
|
+
export { formatPositiveNumber, getDataType, getFileType, isArray, isBaseType, isBoolean, isDate, isDef, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isFunction, isMeaninglessArray, isNull, isNumber, isObject, isObjectDataType, isString, isSymbol, isUndefined, isUrl, json2string, replaceLastMatch, replaceMatch, string2json, uuid };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/base.d.ts
|
|
1
|
+
import { ObjectDataType, DataType } from './types.js';
|
|
2
|
+
import 'axios';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* @description: 判断是否为string类型
|
|
@@ -189,5 +188,5 @@ declare function json2string(json: any, defaultValue?: string): string;
|
|
|
189
188
|
* @autor: 刘 相卿
|
|
190
189
|
*/
|
|
191
190
|
declare function uuid(length?: number): string;
|
|
192
|
-
|
|
193
|
-
export {
|
|
191
|
+
|
|
192
|
+
export { formatPositiveNumber, getDataType, getFileType, isArray, isBaseType, isBoolean, isDate, isDef, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isFunction, isMeaninglessArray, isNull, isNumber, isObject, isObjectDataType, isString, isSymbol, isUndefined, isUrl, json2string, replaceLastMatch, replaceMatch, string2json, uuid };
|
package/dist/base.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var m=(t,n)=>{for(var e in n)i(t,e,{get:n[e],enumerable:!0})},T=(t,n,e,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of g(n))!x.call(t,r)&&r!==e&&i(t,r,{get:()=>n[r],enumerable:!(o=b(n,r))||o.enumerable});return t};var j=t=>T(i({},"__esModule",{value:!0}),t);var P={};m(P,{formatPositiveNumber:()=>$,getDataType:()=>F,getFileType:()=>L,isArray:()=>O,isBaseType:()=>N,isBoolean:()=>c,isDate:()=>d,isDef:()=>h,isEmpty:()=>S,isEmptyArray:()=>f,isEmptyObject:()=>E,isEmptyValue:()=>y,isFunction:()=>w,isMeaninglessArray:()=>M,isNull:()=>p,isNumber:()=>a,isObject:()=>D,isObjectDataType:()=>k,isString:()=>s,isSymbol:()=>l,isUndefined:()=>u,isUrl:()=>A,json2string:()=>C,replaceLastMatch:()=>R,replaceMatch:()=>U,string2json:()=>B,uuid:()=>J});module.exports=j(P);var s=t=>typeof t=="string",a=t=>typeof t=="number";function c(t){return typeof t=="boolean"}var w=t=>typeof t=="function",O=t=>Array.isArray(t);function u(t){return typeof t>"u"}var h=t=>typeof t<"u",p=t=>t===null,l=t=>typeof t=="symbol",k=t=>Object.prototype.toString.call(t)==="[object Object]",D=t=>Object.prototype.toString.call(t)==="[object Object]";function d(t){return Object.prototype.toString.call(t)==="[object Date]"}function N(t){return s(t)||a(t)||c(t)||l(t)||u(t)||p(t)}function A(t){return/^(?:https?|mailto|tel|file):/.test(t)}function S(t,n=!0){return n&&t===void 0||t===null||t==="null"}function y(t){return t==null||t===""||typeof t=="number"&&Number.isNaN(t)}function E(t){return!t||Object.getOwnPropertyNames(t).length===0}function f(t=[]){return Array.isArray(t)&&!t.length}function M(t=[]){return Array.isArray(t)?f(t)||t.every(n=>y(n)):!1}function F(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function L(t){return(t.match(/\.([^.]+)$/)?.[1]??"\u672A\u77E5").toUpperCase()}function R(t,n,e){return t.replace(new RegExp(`(.*)${n}`),`$1${e}`)}function U(t,n,e){return t.replace(new RegExp(n,"g"),e)}function $(t){return t&&t>0?t:0}function B(t,n){let e=null;try{t&&s(t)&&(e=JSON.parse(t))}finally{p(e)&&(e=n||{})}return e}function C(t,n=""){let e=n;try{e=JSON.stringify(t)}catch{e=n}return e}function J(t=10){let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",o=n.length;for(let r=0;r<t;r++)e+=n.charAt(Math.floor(Math.random()*o));return e}0&&(module.exports={formatPositiveNumber,getDataType,getFileType,isArray,isBaseType,isBoolean,isDate,isDef,isEmpty,isEmptyArray,isEmptyObject,isEmptyValue,isFunction,isMeaninglessArray,isNull,isNumber,isObject,isObjectDataType,isString,isSymbol,isUndefined,isUrl,json2string,replaceLastMatch,replaceMatch,string2json,uuid});
|
package/dist/base.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-A5BXGBYT.mjs";export{x as formatPositiveNumber,t as getDataType,u as getFileType,e as isArray,m as isBaseType,c as isBoolean,l as isDate,g as isDef,o as isEmpty,r as isEmptyArray,q as isEmptyObject,p as isEmptyValue,d as isFunction,s as isMeaninglessArray,h as isNull,b as isNumber,k as isObject,j as isObjectDataType,a as isString,i as isSymbol,f as isUndefined,n as isUrl,z as json2string,v as replaceLastMatch,w as replaceMatch,y as string2json,A as uuid};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as m}from"./chunk-3JZFB5CS.mjs";import{b as p,j as T,p as c,q as y}from"./chunk-A5BXGBYT.mjs";import{c as f}from"./chunk-HERHZLBT.mjs";var x=(...t)=>t,O=(...t)=>t;function j(t){return Array.isArray(t)?t:[t]}function D(t=[],o="id",r="pid",s="children"){let a=[],i={},n=f(t);for(let e=0;e<n.length;e++)i[n[e][o]]=n[e];for(let e=0;e<n.length;e++)i[n[e][r]]&&n[e][o]!==n[e][r]?(i[n[e][r]][s]||(i[n[e][r]][s]=[]),i[n[e][r]][s].push(n[e])):a.push(n[e]);return a}function E(t,o){return t.map(r=>({label:r[o.label],value:r[o.value]}))}function v(t){return t.filter(o=>!c(o))}function b(t=[],o,r,s=!1){let a={value:"value",children:"children",...m(r)},i=[],[n]=o,e=t.find(l=>l[a.value]===n);if(!c(n)&&!c(e)){let{[a.children]:l,...u}=e;return i.concat(s?{...u,children:l}:u,...b(l??[],o.slice(1),a))}return i}function N(t=[],o="children",r=!1){let s=[],a=(i,n)=>{i.forEach(e=>{let{[n]:l,...u}=e;r?s.push(e):s.push(u),l&&a(l,n)})};return a(t,o),s}function A(t,o){return t.reduce((s,a)=>(s.find(n=>o.every(e=>n[e]===a[e]))||s.push(a),s),[])}function B(t,o=[]){return t.filter(r=>!o.includes(r))}function I(t,o=[]){return t.filter(r=>!o.some(a=>T(a)&&T(r)?y(a)?y(r):Object.entries(a).every(([i,n])=>n===r[i]):p(a)&&Number.isNaN(a)?p(r)&&Number.isNaN(r):r===a))}export{x as a,O as b,j as c,D as d,E as e,v as f,b as g,N as h,A as i,B as j,I as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f,e as o,k as u,p as n}from"./chunk-A5BXGBYT.mjs";import{get as s}from"es-toolkit/compat";function l(r,a){return a==="toArray"?o(r)?r:[r].flat().filter(e=>!n(e)):a==="toNumber"?f(r)?Number(r):r:a==="toString"?o(r)?r.join(","):String(r):r}function c(r,a={}){let e;for(let t of r)if(e=(t.path?s(a,t.path):t.defaultValue)??t.defaultValue,t.formatter&&(e=l(e,t.formatter)),!n(e))break;return e}function p(r=[],a={}){let e={};for(let t of r)if(e=e===null?{}:e,t.required&&(!t.key||!t.source.length)){e=null;break}else if(t.key&&t.source.length){let i=c(t.source,a);if(t.required&&n(i)){e=null;break}else if(t.toValue){if(e=i,!u(e))break}else u(e)&&(e[t.key]=i)}return e}export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(d){return new Promise(o=>{let e=document.createElement("video"),n=URL.createObjectURL(d);e.src=n,e.addEventListener("loadedmetadata",()=>{e.currentTime=0}),e.addEventListener("seeked",()=>{let t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight,t.getContext("2d")?.drawImage(e,0,0,t.width,t.height);let a=t.toDataURL("image/png");o(a),URL.revokeObjectURL(n)})})}export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,k as o,p as i,q as p}from"./chunk-A5BXGBYT.mjs";import{cloneDeep as y,merge as f}from"es-toolkit/compat";function d(t,e=[],n){if(t==null)return n||t;let a=Object.getOwnPropertyNames(t).reduce((s,c)=>(e.includes(c)&&(s[c]=t[c]),s),{});return Object.assign(a,n)}function b(t,e=[],n){if(t==null)return n||t;let a=Object.getOwnPropertyNames(t).reduce((s,c)=>(e.includes(c)||(s[c]=t[c]),s),{});return Object.assign(a,n)}function m(t={},e=!0){let n=Object.keys(t).sort();return e||n.reverse(),n.reduce((r,a)=>(r[a]=t[a],r),{})}function D(t={}){return Object.entries(t).reduce((e,[n,r])=>(i(r)||e.push(`${n}=${r}`),e),[]).join("&")}function l(t){if(!u(t))return{};let e=t.trim();if(e[0]==="?")e=e.slice(1);else if(e.indexOf("http")===0)try{let r=new URL(e);e=r.search?r.search.slice(1):""}catch(r){console.error("\u4F20\u5165\u7684[url]\u683C\u5F0F\u9519\u8BEF: ",r)}if(!e)return{};let n=new URLSearchParams(e);return Array.from(n.entries()).reduce((r,[a,s])=>(r[a]=s,r),{})}function x(t={}){let e=new FormData;return Object.entries(t).forEach(([n,r])=>{e.append(n,r)}),e}function g(t){let e={};for(let[n,r]of t.entries())e[n]=r;return e}function R(t={}){return Object.entries(t).reduce((e,[n,r])=>(i(r)||(e[n]=r),e),{})}function h(t,e){return Object.keys(e).reduce((n,r)=>(n[r]=t[r],n),{})}function k(t,e){return e.every(n=>Reflect.has(t,n))}function K(t,e){return Object.entries(e).reduce((n,[r,a])=>(n[r]=t[a],n),{})}function O(t,e={}){let n=f({},t);if(p(e))return n;for(let r in e){let a=r;o(e[r])&&o(n[r])?n[a]=O(n[a],e[r]):n[a]=e[r]}return y(n)}export{d as a,b,m as c,D as d,l as e,x as f,g,R as h,h as i,k as j,K as k,O as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import c from"axios";var t=new Map;function l(e){let{url:o,method:n,params:r,data:s,headers:p}=e,a=s,d=r;typeof s=="string"&&(a=JSON.parse(s)),typeof r=="string"&&(d=JSON.parse(r));let i=[],f=p?.["X-Cancel-Rule"];return f==="path"?i=[`\u8BF7\u6C42\u8DEF\u5F84:${o}`]:f==="method"?i=[`\u8BF7\u6C42\u8DEF\u5F84:${o}`,`\u8BF7\u6C42\u65B9\u6CD5:${n}`]:i=[`\u8BF7\u6C42\u8DEF\u5F84:${o}`,`\u8BF7\u6C42\u65B9\u6CD5:${n}`,`\u8BF7\u6C42PARAMS:${JSON.stringify(d)}`,`\u8BF7\u6C42DATA:${JSON.stringify(a)}`],i.join(";")}function g(e){if(!e.headers?.neverCancel){let o=l(e);e.cancelToken=new c.CancelToken(n=>{t.has(o)||t.set(o,n)})}}function u(e,o=!1){if(!e.headers?.["X-Never-Cancel"]||o){let n=l(e);if(t.has(n)){let r=t.get(n);r&&r(n),t.delete(n)}}}function A(e){u(e),g(e)}function x(){Array.from(t.keys()).forEach(e=>{t.get(e)&&t.get(e)(e),t.delete(e)})}export{t as a,g as b,u as c,A as d,x as e};
|
|
@@ -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
|
+
import{d as o}from"./chunk-A5BXGBYT.mjs";async function n(e=0){return new Promise(i=>{let t=setTimeout(()=>{i(!0),clearTimeout(t)},e)})}async function a(e,i){await n(i?.delay),e&&o(e)&&e()}export{n as a,a as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t}from"./chunk-A5BXGBYT.mjs";function l(e,r={},c){let{prefix:o="#{",suffix:u="}",defaultValue:n=""}=c??{};if(typeof e!="string")return String(e);if(!r||typeof r!="object")return e;let i=p=>p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),g=i(o),s=i(u),a=new RegExp(`${g}([^${s}]+)${s}`,"g");return e.replace(a,(p,x)=>{let f=r[x];return t(f)?String(t(n)?"":n):String(f)})}export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=t=>typeof t=="string",p=t=>typeof t=="number";function a(t){return typeof t=="boolean"}var f=t=>typeof t=="function",b=t=>Array.isArray(t);function c(t){return typeof t>"u"}var g=t=>typeof t<"u",s=t=>t===null,u=t=>typeof t=="symbol",x=t=>Object.prototype.toString.call(t)==="[object Object]",m=t=>Object.prototype.toString.call(t)==="[object Object]";function T(t){return Object.prototype.toString.call(t)==="[object Date]"}function j(t){return i(t)||p(t)||a(t)||u(t)||c(t)||s(t)}function w(t){return/^(?:https?|mailto|tel|file):/.test(t)}function O(t,n=!0){return n&&t===void 0||t===null||t==="null"}function l(t){return t==null||t===""||typeof t=="number"&&Number.isNaN(t)}function h(t){return!t||Object.getOwnPropertyNames(t).length===0}function y(t=[]){return Array.isArray(t)&&!t.length}function k(t=[]){return Array.isArray(t)?y(t)||t.every(n=>l(n)):!1}function D(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function d(t){return(t.match(/\.([^.]+)$/)?.[1]??"\u672A\u77E5").toUpperCase()}function N(t,n,e){return t.replace(new RegExp(`(.*)${n}`),`$1${e}`)}function A(t,n,e){return t.replace(new RegExp(n,"g"),e)}function S(t){return t&&t>0?t:0}function E(t,n){let e=null;try{t&&i(t)&&(e=JSON.parse(t))}finally{s(e)&&(e=n||{})}return e}function M(t,n=""){let e=n;try{e=JSON.stringify(t)}catch{e=n}return e}function F(t=10){let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",r=n.length;for(let o=0;o<t;o++)e+=n.charAt(Math.floor(Math.random()*r));return e}export{i as a,p as b,a as c,f as d,b as e,c as f,g,s as h,u as i,x as j,m as k,T as l,j as m,w as n,O as o,l as p,h as q,y as r,k as s,D as t,d as u,N as v,A as w,S as x,E as y,M as z,F as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a(r,s=4){let n=[],i=1048576*s,e=0;for(;e<r.size;){let t=r.slice(e,e+i);n.push({file:t,size:t.size,index:e/i}),e+=i}return n}function c(r){return new Promise((s,n)=>{let i=new FileReader;i.onload=({target:e})=>{let t=e?.result??"";t?s(t):n(t)},i.onerror=e=>{n(e)},i.readAsDataURL(r)})}function u(r,s){let n=r.split(","),i=n.length>1?n[1]:n[0],e=n[0].match(/:(.*?);/)?.[1]||"application/octet-stream",t=atob(i),l=new Uint8Array(t.length);for(let o=0;o<t.length;o++)l[o]=t.charCodeAt(o);return new File([l],s,{type:e})}export{a,c as b,u as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(e){return new Promise(s=>{let t={code:200,data:e,msg:""};if(e.type!=="application/json")s(t);else{let a=new FileReader;a.readAsText(e),a.onloadend=()=>{t=JSON.parse(a.result),s(t)}}})}export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as P,b as v,c as O}from"./chunk-WN7L4HYY.mjs";import{A as m,k as S}from"./chunk-A5BXGBYT.mjs";import{h as L}from"./chunk-HERHZLBT.mjs";function b(a,u){let l=a,d={timeout:5e3,allowPostOrigins:"",allowReceiveOrigins:""},w=()=>{d=L({},d,u)},e=new Map,o=()=>{if(l&&l?.contentWindow)return!0;throw new Error("iframe content not load!")},i=(t,s="default")=>({uuid:m(10),type:s,content:t}),f=t=>{if((d.allowReceiveOrigins?.split(",")??[]).some(n=>n==="*"||n===t.origin)){let n=t.data;n.uuid&&e.has(n.uuid)&&e.set(n.uuid,n.content)}},F=(t,s)=>{o();let n=s??l.src,g=d.allowPostOrigins?.split(",")??[];if(n&&g.some(c=>c==="*"||n.includes(c)))e.set(t.uuid,null),l.contentWindow?.postMessage(t,n);else throw new Error(`iframe[${n}]\u4E0D\u5728[configs.allowPostOrigins]\u8303\u56F4\u5185!`)},p=(t,s)=>new Promise((g,c)=>{try{let r=S(t)&&t.uuid?t:i(t);if(F(r,s),r.uuid)e.set(r.uuid,null);else throw new Error("\u6D88\u606F\u53D1\u9001\u5931\u8D25");let y=0,M=setInterval(()=>{let I=e.get(r.uuid);if(I!==null){clearInterval(M),e.delete(r.uuid),g(I);return}if(y+=10,y>=d.timeout)throw clearInterval(M),new Error("\u6D88\u606F\u56DE\u4F20\u8D85\u65F6!")},10)}catch(r){c(r)}}),T=async(t,s,n)=>{let g=null;try{let c=i(s,t);g=await p(c,n)}catch{g=null}return g},E=(t="",s)=>T("LocalStorage",t,s),h=(t="",s)=>T("SessionStorage",t,s),C=(t="",s)=>T("Cookie",t,s),D=()=>{o(),window.addEventListener("message",f)};return{load:()=>(w(),new Promise(t=>{l.onload=()=>{t(!0)},D()})),post:p,destory:()=>{window.removeEventListener("message",f)},getLocalStorage:E,getSessionStorage:h,getCookie:C,messageFormat:i}}async function G(a,u,l){if(window.top===window.self)throw new Error(`\u9875\u9762[${location.origin}]\u975Eiframe\u5D4C\u5165\u65B9\u5F0F, \u4E0D\u5141\u8BB8\u63A5\u6536message!`);if((l?.split(",")??[]).some(w=>w==="*"||w===a.origin)){let w=["default","LocalStorage","SessionStorage","Cookie"],e=a.data;if(e&&e.uuid&&w.includes(e.type)){let o=null;try{if(e.type==="LocalStorage"){let i=P(e.content?[e.content]:[]);e.content?o=i?.[e.content]:o=i}else if(e.type==="SessionStorage"){let i=v(e.content?[e.content]:[]);e.content?o=i?.[e.content]:o=i}else if(e.type==="Cookie"){let i=O(e.content?[e.content]:[]);e.content?o=i?.[e.content]:o=i}else u?o=await u(e.content):o=null;o===null&&(o=void 0)}catch{o=null}window.top&&window.top.postMessage({...e,content:o},a.origin)}}}function H(a,u){window.top&&window.top!==window.self&&window.top.postMessage({uuid:m(),content:a},u??window.top.origin)}export{b as a,G as b,H as c};
|
|
@@ -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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function d(l){let e=l?.vnode?.el||l&&(l.$el||l);for(;e&&!e.tagName;)e=e.nextSibling;return e}var o=d;export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{pinyin as i}from"pinyin-pro";function t(n){return i(n,{toneType:"none"}).replaceAll(" ","")}function r(n){return i(n,{pattern:"initial"}).replaceAll(" ","")}export{i as a,t as b,r as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-KGXCJWE5.mjs";function 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}function 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 t from"crypto-js";var{atob:e,btoa:r}=window,g=r("OTc2NWE3ZDFkYjI1MjZkOQ=="),y=r("a2o4ZTYxajhsajM3NTA5NA==");function m(n,c,s){let p=t.enc.Utf8.parse(n),i=t.enc.Utf8.parse(c),d=t.enc.Utf8.parse(s),a=t.AES.encrypt(p,i,{iv:d,mode:t.mode.CBC,padding:t.pad.ZeroPadding});return t.enc.Base64.stringify(a.ciphertext)}var j=n=>m(n,e(e(g)),e(e(y))),o=r("jK2oBORH4mcIPhKymU0e7E=="),E=n=>t.AES.encrypt(n,o).toString(),S=n=>t.AES.decrypt(n,o).toString(t.enc.Utf8);export{m as a,j as b,E as c,S as d};
|
|
@@ -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
|
+
import{camelCase as o,clone as a,cloneDeep as c,debounce as m,get as r,has as s,kebabCase as t,merge as b,set as l}from"es-toolkit/compat";export{o as a,a as b,c,m as d,r as e,s as f,t as g,b as h,l as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"axios";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function i(e){e&&e.parentNode?.removeChild(e)}function s(e,r){let t=e.slice(1);return`rgba(${[Number.parseInt(`0x${t.slice(0,2)}`),Number.parseInt(`0x${t.slice(2,4)}`),Number.parseInt(`0x${t.slice(4,6)}`),r].toString()})`}function u(e,r){return e[r]??e.default}function c(e){return e.toString().replace(/\d+/,r=>r.replace(/(\d)(?=(\d{3})+$)/g,t=>`${t},`))}function a(e,...r){return new Promise((t,n)=>{if(typeof e!="function")return n(new Error("usePromise\u4F20\u5165\u7684\u7B2C\u4E00\u4E2A\u53C2\u6570\u5FC5\u987B\u4E3A\u51FD\u6570!"));try{let o=e(...r);o instanceof Promise?o.then(t,n):t(o)}catch(o){n(o)}})}async function p(e){return new Promise(r=>{fetch(e,{method:"HEAD"}).then(t=>{try{let n=t.headers.get("content-type")||"";r(n)}catch{r("")}}).catch(()=>{r("")})})}export{i as a,s as b,u as c,c as d,a as e,p as f};
|
|
@@ -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
|
+
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
|
+
function i(){let e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.width="100px",e.style.height="100px",document.body.appendChild(e);let t=document.createElement("div");t.style.width="100%",e.appendChild(t);let d=e.offsetWidth-t.offsetWidth;return e.parentNode?.removeChild(e),d}export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,e as o,k as c}from"./chunk-A5BXGBYT.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
|
+
function u(t){document.title=t}function i(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}function d(){let t=document.querySelectorAll("[style*=z-index]"),e=0;return t.forEach(r=>{let o=window.getComputedStyle(r).zIndex;if(o!=="auto"){let n=Number.parseInt(o,10);!Number.isNaN(n)&&n>e&&(e=n)}}),e+1}export{u as a,i as b,d as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as m,p as Y}from"./chunk-A5BXGBYT.mjs";import n from"dayjs";import"dayjs/locale/zh-cn";import"dayjs/locale/en";function c(t){let s=["YYYY","MM","DD","HH","mm","ss"],o=t.replace(/[^a-z\s]/gi,"").split(""),r=s.filter(e=>o.some(i=>e.includes(i)));return(r.length>0?r[r.length-1]:"s")[0]||"s"}function d(t,s="date",o="YYYY-MM-DD"){if(m(t)&&t.some(i=>Y(i)))return t;let[r,a]=t;if(s!=="date")return[n(r).startOf(s).format("YYYY-MM-DD HH:mm:ss"),n(a).endOf(s).format("YYYY-MM-DD HH:mm:ss")];let e=c(o||"YYYY-MM-DD");return[n(r).startOf(e).format("YYYY-MM-DD HH:mm:ss"),n(a).endOf(e).format("YYYY-MM-DD HH:mm:ss")]}function g(t="zh-cn"){n.locale(t)}async function l(t){let s=t.map(o=>()=>import(`dayjs/plugin/${o}`));for(let o of s)try{let r=await o();n.extend(r)}catch(r){console.error("[registryDayjsPlugin]dayjs\u7EC4\u4EF6\u6CE8\u518C\u5931\u8D25:",r)}}export{n as a,d as b,g as c,l as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./chunk-34VTCYOF.mjs";import{c as A,d as P,e as j}from"./chunk-UYN2YSOE.mjs";import{c as C,e as h}from"./chunk-44EYU7QJ.mjs";import{d as O,e as d,f as q}from"./chunk-SZOHVFVZ.mjs";import{d as b}from"./chunk-UVMLBW6A.mjs";import{b as g,f as R}from"./chunk-3JZFB5CS.mjs";import{e as m,k as f}from"./chunk-A5BXGBYT.mjs";import{h as l}from"./chunk-HERHZLBT.mjs";import v,{isCancel as w}from"axios";var D=class{options;instance;constructor(e){this.options=l({},b,e),this.instance=this.setupInterceptors(this.options)}setupInterceptors(e){let s=v.create(g(e,["basePath","allowCancel","allowNullValue","successCode","unauthorizedCode","whiteUrl","alias","token","beforeRequest","afterRequest",401,"cancel","error"]));return s.interceptors.request.use(t=>A(t,this.options)),s.interceptors.response.use(t=>j(t,this.options),t=>P({type:w(t)?"CANCEL":"ERROR",content:t,options:this.options})),s}fetchLocalFile(e){return fetch((this.options.basePath??"")+e)}async get(e,s={},t){let{data:a}=await this.instance.get(e,{...t,params:s});return a}async post(e,s={},t){let{data:a}=await this.instance.post(e,s,t);return a}async postForm(e,s={},t){let a=R(s),{data:o}=await this.instance.post(e,a,l({},{headers:{"Content-Type":"multipart/form-data"},...t}));return o}async getPageRecords(e,s={},t={},a="GET",o,u){let i=a.toUpperCase()==="GET",r={...d(t,o),...s},{data:y}=await this.instance.request({...u,url:e,method:a,params:i?r:{...d(t,o)},data:i?{}:r});return q(y,o)}async getOptions(e,s={},t="GET",a,o,u=!0){let i=t.toUpperCase()==="GET",{data:r=[]}=await this.instance.request({...o,url:e,method:t,params:s,data:i?{}:s});if(m(r))return O(r,a,u);if(f(r)){if(Object.values(r).every(n=>m(n))){let n=Object.values(r).flat();return O(n,a,u)}let c=Object.entries(r).map(([n,T])=>({label:T,value:n}));return O(c,void 0,u)}return[]}async getCascaderOptions(e,s={},t,a=!0){if(!e.length)return[];let o=async(i,r,y={})=>{let c=i[r];if(!c?.url)return[];let n=x(c.params,y)??{},T=(await this.getOptions(c.url,f(n)?l({},s,n):n,c.method,c.alias,t,a)).map(p=>({...p,children:p.json?.children??[]}));for(let p=0;p<T.length;p++)T[p].children=await o(i,r+1,T[p].json);return T};return await o(e,0,s)}cancel(e){C(e,!0)}request(e){return this.instance.request(e)}destory(){h(),this.instance=null}};export{D as a};
|
|
@@ -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]?Number.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 A,b as P,c as y}from"./chunk-UVMLBW6A.mjs";import{a as R}from"./chunk-A25LR755.mjs";import{f as u,h as b,i as D}from"./chunk-224VP3SO.mjs";import{a as d,b as n,c as g,j as p,p as O,r as l}from"./chunk-A5BXGBYT.mjs";import{get as f}from"es-toolkit/compat";function k(e={}){return Object.keys(e).sort().reduce((s,t)=>(s[t]=e[t],s),{})}function I(e={}){return Object.keys(e).reduce((a,s)=>{let t=e[s];return O(t)||(n(t)&&String(t).length>=15?a[s]=String(t):a[s]=t),a},{})}function L(e,a=A){let{code:s="code",data:t="data",msg:i="msg"}=a;return{data:e[t],msg:e[i],code:e[s]}}function N(e,a=P,s=!0){let{label:t="label",value:i="value",json:S="json",disabled:x="disabled",children:m="children"}=a,c=e;e.some(o=>p(o)&&Object.keys(o).includes(m))&&(c=b(e,m));let T=c.reduce((o,r)=>{if(p(r)){let j=t.includes("#{")?t:`#{${t}}`,E={label:R(j,r,{prefix:"#{",suffix:"}"}),value:f(r,i),disabled:f(r,x)??!1,json:f(r,S)??r};o.push(E)}else(n(r)||d(r)||g(r))&&o.push({label:r,value:r,json:{}});return o},[]);return s?D(T,["value"]):T}function z(e={pageSize:10,pageNo:1},a=y){return Object.keys(e).reduce((s,t)=>(s[a[t]]=e[t],s),{})}function q(e,a=y){let{records:s="records",total:t="total"}=a;return{records:e[s]??[],total:e[t]??0}}function K(e){let a=u([e].flat());return l(a)?[200]:a}function U(e){let a=u([e].flat());return l(a)?[401]:a}export{k as a,I as b,L as c,N as d,z as e,q as f,K as g,U as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-6DX7ZFGR.mjs";import{ref as n,unref as p}from"vue";function l(t=3e3){let e=n(!1);return{copied:e,copy:r=>{let i=p(r);o(i).then(()=>{e.value=!0;let f=setTimeout(()=>{e.value=!1,clearTimeout(f)},t)})}}}export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={data:"data",code:"code",msg:"msg"},a={label:"label",value:"value",json:"json",disabled:"disabled",children:"children"},s={pageSize:"pageSize",pageNo:"pageNo",total:"total",records:"records"},o={baseURL:"",timeout:60*1e3,basePath:"",allowCancel:!1,allowNullValue:!0,successCode:[200],unauthorizedCode:[401],whiteUrl:()=>[],alias:()=>e,token:{key:"x-access-token",get:()=>""}};export{e as a,a as b,s as c,o as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as R,c,e as m}from"./chunk-44EYU7QJ.mjs";import{a as g}from"./chunk-BPXO4V4X.mjs";import{a as C,b as T,c as l,g as f,h as d}from"./chunk-SZOHVFVZ.mjs";import{a as y}from"./chunk-UVMLBW6A.mjs";import{h as o}from"./chunk-HERHZLBT.mjs";var E=new Map;function q(e){let t={},a=e.split("?")[1];return a&&a.split("&").forEach(i=>{let[n="",s=""]=i.split("=");t[n]=s}),t}function j(e,t){E.get(401)&&!t.whiteUrl?.().includes(e.url??"")&&c(e,!0);let a=o({},e),[i=""]=(a.url??"").split("?"),n=C(o({},q(a.url??""),a.params));t.allowNullValue||(n=T(n)),a.url=i,a.params=n,a.headers?.["Content-Type"]||o(a.headers,{"Content-Type":"application/json;charset=utf-8"});let{token:s}=t;if(s?.key&&s.get()){let r={[s.key]:s.get()};o(a.headers,r)}else s?.key&&a.headers&&Reflect.deleteProperty(a.headers,s.key);return t.allowCancel&&(c(a),R(a)),t.beforeRequest?t.beforeRequest(a):a}function p(e){if(e.type==="REQUEST"&&d(e.options.unauthorizedCode).includes(e.content.code)){if(m(),e.options[401])return e.options[401](e)}else{if(e.type==="CANCEL"&&e.options.cancel)return e.options.cancel(e);if(e.options.error)return e.options.error(e)}return Promise.reject(e)}async function O(e,t){let{data:a,config:i}=e,n=a,s=i;if(t.afterRequest){let{data:u,config:b}=t.afterRequest(e,t);n=u,s=b}let r=o({},y,t.alias?.());if(c(e.config),d(t.unauthorizedCode).includes(n[r.code]))return p({type:"REQUEST",content:l(n,r),options:t,response:e});if(E.delete(401),s.responseType==="blob"){let u=await g(n);return f(t.successCode).includes(u.code)?l(u):p({type:"REQUEST",content:u,options:t,response:e})}else return f(t.successCode).includes(n[r.code])?Promise.resolve(l(n,r)):p({type:"REQUEST",content:l(n,r),options:t,response:e})}export{E as a,q as b,j as c,p as d,O as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function s(r=[]){return localStorage?r.length?r.reduce((t,e)=>(t[e]=localStorage.getItem(e),t),{}):Object.keys(localStorage).reduce((t,e)=>(t[e]=localStorage.getItem(e),t),{}):r.length===1?null:{}}function l(r=[]){return sessionStorage?sessionStorage?r.length?r.reduce((t,e)=>(t[e]=sessionStorage.getItem(e),t),{}):Object.keys(sessionStorage).reduce((t,e)=>(t[e]=sessionStorage.getItem(e),t),{}):null:r.length===1?null:{}}function c(r=[]){if(document.cookie){let t=document.cookie.split("; ").reduce((e,n)=>{let[o="",a=""]=n.split("=").map(decodeURIComponent);return e[o]=a,e},{});return r.length?r.reduce((e,n)=>(e[n]=t[n],e),{}):t}else return r.length===1?null:{}}export{s as a,l as b,c};
|
|
@@ -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};
|
package/dist/clipboard.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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});
|
package/dist/clipboard.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a}from"./chunk-6DX7ZFGR.mjs";export{a as clipboardCopy};
|