@wfrog/vc-ui 1.0.0
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/README.md +95 -0
- package/dist/es/chunk/-EkpfdcW.mjs +1100 -0
- package/dist/es/chunk/8rLUmOVR.mjs +29 -0
- package/dist/es/chunk/B-rxnVJv.mjs +3 -0
- package/dist/es/chunk/BAGoDD49.mjs +36 -0
- package/dist/es/chunk/BAtns-Mc.mjs +96 -0
- package/dist/es/chunk/BJS5Pdfp.mjs +55 -0
- package/dist/es/chunk/BMzd-IS6.mjs +900 -0
- package/dist/es/chunk/BWcCXRRK.mjs +229 -0
- package/dist/es/chunk/BX-Ogf7p.mjs +3743 -0
- package/dist/es/chunk/B_tU9Nax.mjs +49 -0
- package/dist/es/chunk/BdDihk0t.mjs +3420 -0
- package/dist/es/chunk/C2LgraHx.mjs +489 -0
- package/dist/es/chunk/C5hWsUfD.mjs +64 -0
- package/dist/es/chunk/C7iSSBUr.mjs +303 -0
- package/dist/es/chunk/CD98REcR.mjs +666 -0
- package/dist/es/chunk/CEClY-_T.mjs +445 -0
- package/dist/es/chunk/CEm0brzD.mjs +35 -0
- package/dist/es/chunk/CMABHk8B.mjs +1942 -0
- package/dist/es/chunk/CS4VKsqy.mjs +19 -0
- package/dist/es/chunk/CVlj9F0I.mjs +291 -0
- package/dist/es/chunk/CZ4ggqDE.mjs +140 -0
- package/dist/es/chunk/CaTfZePA.mjs +533 -0
- package/dist/es/chunk/Ce9ApjrT.mjs +201 -0
- package/dist/es/chunk/ClZGuAIb.mjs +10 -0
- package/dist/es/chunk/Coex0GxM.mjs +450 -0
- package/dist/es/chunk/Ct6q2FXg.mjs +5 -0
- package/dist/es/chunk/CyxEcbcy.mjs +29 -0
- package/dist/es/chunk/D389hx_T.mjs +35 -0
- package/dist/es/chunk/D3DXeVfC.mjs +1171 -0
- package/dist/es/chunk/D3uV7vm-.mjs +45 -0
- package/dist/es/chunk/D5259bwd.mjs +50 -0
- package/dist/es/chunk/DMHNh_tw.mjs +49 -0
- package/dist/es/chunk/DVNTpOBR.mjs +4 -0
- package/dist/es/chunk/DZACQ9LT.mjs +95 -0
- package/dist/es/chunk/De_EXLIy.mjs +22 -0
- package/dist/es/chunk/Dh4jaUSg.mjs +89 -0
- package/dist/es/chunk/DhhdKtyu.mjs +439 -0
- package/dist/es/chunk/DqUIKX7f.mjs +2039 -0
- package/dist/es/chunk/Dqz1zvKN.mjs +59 -0
- package/dist/es/chunk/Dvi7RsXg.mjs +727 -0
- package/dist/es/chunk/DyDMGLoF.mjs +123 -0
- package/dist/es/chunk/E_WRn0OP.mjs +449 -0
- package/dist/es/chunk/Fo0dZYnz.mjs +128 -0
- package/dist/es/chunk/HSv8BL8o.mjs +72 -0
- package/dist/es/chunk/JCIyOUEY.mjs +105 -0
- package/dist/es/chunk/O-uhUKF4.mjs +43 -0
- package/dist/es/chunk/Spa-JKB4.mjs +1046 -0
- package/dist/es/chunk/VAdRxe-1.mjs +16 -0
- package/dist/es/chunk/VCrtRnxt.mjs +1477 -0
- package/dist/es/chunk/ViP2SEY4.mjs +211 -0
- package/dist/es/chunk/aibQ9WSZ.mjs +249 -0
- package/dist/es/chunk/nWBcrYxV.mjs +690 -0
- package/dist/es/chunk/pcqpp-6-.mjs +9 -0
- package/dist/es/chunk/qY9OvNHY.mjs +283 -0
- package/dist/es/chunk/su2Zrql0.mjs +53 -0
- package/dist/es/chunk/zfg5SOj1.mjs +138 -0
- package/dist/es/components/awesome-icon/awesome-icon.d.ts +6 -0
- package/dist/es/components/awesome-icon/awesome-icon.mjs +41 -0
- package/dist/es/components/awesome-icon/awesome-icon.vue.d.ts +5 -0
- package/dist/es/components/awesome-icon/index.d.ts +4 -0
- package/dist/es/components/awesome-icon/index.mjs +6 -0
- package/dist/es/components/backbottom/backbottom.d.ts +7 -0
- package/dist/es/components/backbottom/backbottom.mjs +172 -0
- package/dist/es/components/backbottom/backbottom.vue.d.ts +7 -0
- package/dist/es/components/backbottom/components/child.vue.d.ts +30 -0
- package/dist/es/components/backbottom/index.d.ts +4 -0
- package/dist/es/components/backbottom/index.mjs +6 -0
- package/dist/es/components/button/button.d.ts +18 -0
- package/dist/es/components/button/button.mjs +313 -0
- package/dist/es/components/button/button.vue.d.ts +33 -0
- package/dist/es/components/button/index.css +9 -0
- package/dist/es/components/button/index.d.ts +4 -0
- package/dist/es/components/button/index.mjs +6 -0
- package/dist/es/components/cdn-tag.vue.d.ts +5 -0
- package/dist/es/components/chat-container/chat-container.d.ts +9 -0
- package/dist/es/components/chat-container/chat-container.mjs +77 -0
- package/dist/es/components/chat-container/chat-container.vue.d.ts +29 -0
- package/dist/es/components/chat-container/index.css +9 -0
- package/dist/es/components/chat-container/index.d.ts +4 -0
- package/dist/es/components/chat-container/index.mjs +6 -0
- package/dist/es/components/choice/choice.d.ts +6 -0
- package/dist/es/components/choice/choice.mjs +53 -0
- package/dist/es/components/choice/choice.vue.d.ts +5 -0
- package/dist/es/components/choice/index.css +7 -0
- package/dist/es/components/choice/index.d.ts +4 -0
- package/dist/es/components/choice/index.mjs +6 -0
- package/dist/es/components/choice-boolean/choice-boolean.d.ts +5 -0
- package/dist/es/components/choice-boolean/choice-boolean.mjs +32 -0
- package/dist/es/components/choice-boolean/choice-boolean.vue.d.ts +10 -0
- package/dist/es/components/choice-boolean/index.d.ts +4 -0
- package/dist/es/components/choice-boolean/index.mjs +6 -0
- package/dist/es/components/config-provider/config-provider.d.ts +16 -0
- package/dist/es/components/config-provider/config-provider.mjs +29 -0
- package/dist/es/components/config-provider/config-provider.vue.d.ts +18 -0
- package/dist/es/components/config-provider/config-provider2.mjs +6 -0
- package/dist/es/components/config-provider/index.d.ts +4 -0
- package/dist/es/components/config-provider/index.mjs +6 -0
- package/dist/es/components/cropper/cropper.d.ts +12 -0
- package/dist/es/components/cropper/cropper.mjs +333 -0
- package/dist/es/components/cropper/cropper.vue.d.ts +32 -0
- package/dist/es/components/cropper/index.css +4 -0
- package/dist/es/components/cropper/index.d.ts +4 -0
- package/dist/es/components/cropper/index.mjs +6 -0
- package/dist/es/components/currency/currency.d.ts +21 -0
- package/dist/es/components/currency/currency.mjs +185 -0
- package/dist/es/components/currency/currency.vue.d.ts +14 -0
- package/dist/es/components/currency/index.css +8 -0
- package/dist/es/components/currency/index.d.ts +4 -0
- package/dist/es/components/currency/index.mjs +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.d.ts +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.mjs +5550 -0
- package/dist/es/components/daterange-picker/daterange-picker.vue.d.ts +13 -0
- package/dist/es/components/daterange-picker/index.d.ts +4 -0
- package/dist/es/components/daterange-picker/index.mjs +6 -0
- package/dist/es/components/dialog/dialog.d.ts +13 -0
- package/dist/es/components/dialog/dialog.mjs +537 -0
- package/dist/es/components/dialog/dialog.vue.d.ts +38 -0
- package/dist/es/components/dialog/index.css +87 -0
- package/dist/es/components/dialog/index.d.ts +4 -0
- package/dist/es/components/dialog/index.mjs +6 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.d.ts +33 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +412 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.vue.d.ts +23 -0
- package/dist/es/components/dialog-camera-upload/index.css +66 -0
- package/dist/es/components/dialog-camera-upload/index.d.ts +4 -0
- package/dist/es/components/dialog-camera-upload/index.mjs +6 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.d.ts +9 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +183 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.vue.d.ts +22 -0
- package/dist/es/components/dialog-map-point/index.css +11 -0
- package/dist/es/components/dialog-map-point/index.d.ts +4 -0
- package/dist/es/components/dialog-map-point/index.mjs +6 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.d.ts +16 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +1391 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.vue.d.ts +19 -0
- package/dist/es/components/dialog-upload-images/index.css +62 -0
- package/dist/es/components/dialog-upload-images/index.d.ts +4 -0
- package/dist/es/components/dialog-upload-images/index.mjs +6 -0
- package/dist/es/components/document.vue.d.ts +14 -0
- package/dist/es/components/drawer/drawer.d.ts +7 -0
- package/dist/es/components/drawer/drawer.mjs +412 -0
- package/dist/es/components/drawer/drawer.vue.d.ts +31 -0
- package/dist/es/components/drawer/index.css +56 -0
- package/dist/es/components/drawer/index.d.ts +4 -0
- package/dist/es/components/drawer/index.mjs +6 -0
- package/dist/es/components/easy-pagination/easy-pagination.d.ts +8 -0
- package/dist/es/components/easy-pagination/easy-pagination.mjs +74 -0
- package/dist/es/components/easy-pagination/easy-pagination.vue.d.ts +19 -0
- package/dist/es/components/easy-pagination/index.css +10 -0
- package/dist/es/components/easy-pagination/index.d.ts +4 -0
- package/dist/es/components/easy-pagination/index.mjs +6 -0
- package/dist/es/components/el-icon/el-icon.d.ts +6 -0
- package/dist/es/components/el-icon/el-icon.mjs +46 -0
- package/dist/es/components/el-icon/el-icon.vue.d.ts +6 -0
- package/dist/es/components/el-icon/index.css +7 -0
- package/dist/es/components/el-icon/index.d.ts +4 -0
- package/dist/es/components/el-icon/index.mjs +6 -0
- package/dist/es/components/example-wrapper.vue.d.ts +19 -0
- package/dist/es/components/flag/flag.mjs +44 -0
- package/dist/es/components/flag/flag.vue.d.ts +5 -0
- package/dist/es/components/flag/flags.d.ts +8 -0
- package/dist/es/components/flag/index.d.ts +4 -0
- package/dist/es/components/flag/index.mjs +6 -0
- package/dist/es/components/icon/icon.d.ts +6 -0
- package/dist/es/components/icon/icon.mjs +54 -0
- package/dist/es/components/icon/icon.vue.d.ts +3 -0
- package/dist/es/components/icon/icon2.mjs +27 -0
- package/dist/es/components/icon/index.css +9 -0
- package/dist/es/components/icon/index.d.ts +4 -0
- package/dist/es/components/icon/index.mjs +6 -0
- package/dist/es/components/image/image.d.ts +16 -0
- package/dist/es/components/image/image.mjs +167 -0
- package/dist/es/components/image/image.vue.d.ts +206 -0
- package/dist/es/components/image/index.css +20 -0
- package/dist/es/components/image/index.d.ts +4 -0
- package/dist/es/components/image/index.mjs +6 -0
- package/dist/es/components/input/index.css +9 -0
- package/dist/es/components/input/index.d.ts +4 -0
- package/dist/es/components/input/index.mjs +6 -0
- package/dist/es/components/input/input.d.ts +4 -0
- package/dist/es/components/input/input.mjs +85 -0
- package/dist/es/components/input/input.vue.d.ts +1232 -0
- package/dist/es/components/input-number/index.css +24 -0
- package/dist/es/components/input-number/index.d.ts +4 -0
- package/dist/es/components/input-number/index.mjs +6 -0
- package/dist/es/components/input-number/input-number.d.ts +8 -0
- package/dist/es/components/input-number/input-number.mjs +137 -0
- package/dist/es/components/input-number/input-number.vue.d.ts +35 -0
- package/dist/es/components/pca-picker/components/c.vue.d.ts +123 -0
- package/dist/es/components/pca-picker/components/elevator-item.vue.d.ts +7 -0
- package/dist/es/components/pca-picker/components/filter.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/history.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/hot.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/p.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/pca.vue.d.ts +9 -0
- package/dist/es/components/pca-picker/index.css +107 -0
- package/dist/es/components/pca-picker/index.d.ts +4 -0
- package/dist/es/components/pca-picker/index.mjs +6 -0
- package/dist/es/components/pca-picker/pca-picker.d.ts +78 -0
- package/dist/es/components/pca-picker/pca-picker.mjs +1667 -0
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +583 -0
- package/dist/es/components/qr-code/index.d.ts +4 -0
- package/dist/es/components/qr-code/index.mjs +6 -0
- package/dist/es/components/qr-code/qr-code.d.ts +9 -0
- package/dist/es/components/qr-code/qr-code.mjs +69 -0
- package/dist/es/components/qr-code/qr-code.vue.d.ts +13 -0
- package/dist/es/components/screenfull/index.css +14 -0
- package/dist/es/components/screenfull/index.d.ts +4 -0
- package/dist/es/components/screenfull/index.mjs +6 -0
- package/dist/es/components/screenfull/screenfull.d.ts +4 -0
- package/dist/es/components/screenfull/screenfull.mjs +91 -0
- package/dist/es/components/screenfull/screenfull.vue.d.ts +20 -0
- package/dist/es/components/select/index.css +9 -0
- package/dist/es/components/select/index.d.ts +4 -0
- package/dist/es/components/select/index.mjs +6 -0
- package/dist/es/components/select/select.d.ts +6 -0
- package/dist/es/components/select/select.mjs +63 -0
- package/dist/es/components/select/select.vue.d.ts +6 -0
- package/dist/es/components/single-player/index.css +45 -0
- package/dist/es/components/single-player/index.d.ts +4 -0
- package/dist/es/components/single-player/index.mjs +6 -0
- package/dist/es/components/single-player/single-player.d.ts +4 -0
- package/dist/es/components/single-player/single-player.mjs +1172 -0
- package/dist/es/components/single-player/single-player.vue.d.ts +13 -0
- package/dist/es/components/svg-icon/index.css +9 -0
- package/dist/es/components/svg-icon/index.d.ts +4 -0
- package/dist/es/components/svg-icon/index.mjs +6 -0
- package/dist/es/components/svg-icon/svg-icon.d.ts +5 -0
- package/dist/es/components/svg-icon/svg-icon.mjs +46 -0
- package/dist/es/components/svg-icon/svg-icon.vue.d.ts +18 -0
- package/dist/es/components/switch/index.css +15 -0
- package/dist/es/components/switch/index.d.ts +4 -0
- package/dist/es/components/switch/index.mjs +6 -0
- package/dist/es/components/switch/switch.d.ts +9 -0
- package/dist/es/components/switch/switch.mjs +82 -0
- package/dist/es/components/switch/switch.vue.d.ts +14 -0
- package/dist/es/components/sync-scroll-container/index.css +82 -0
- package/dist/es/components/sync-scroll-container/index.d.ts +4 -0
- package/dist/es/components/sync-scroll-container/index.mjs +6 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.d.ts +6 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +157 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.vue.d.ts +36 -0
- package/dist/es/components/tags/index.css +17 -0
- package/dist/es/components/tags/index.d.ts +4 -0
- package/dist/es/components/tags/index.mjs +6 -0
- package/dist/es/components/tags/tags.d.ts +9 -0
- package/dist/es/components/tags/tags.mjs +296 -0
- package/dist/es/components/tags/tags.vue.d.ts +20 -0
- package/dist/es/components/text-ellipsis/index.css +15 -0
- package/dist/es/components/text-ellipsis/index.d.ts +4 -0
- package/dist/es/components/text-ellipsis/index.mjs +6 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.d.ts +12 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +137 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.vue.d.ts +41 -0
- package/dist/es/components/thousand-input/index.css +4 -0
- package/dist/es/components/thousand-input/index.d.ts +4 -0
- package/dist/es/components/thousand-input/index.mjs +6 -0
- package/dist/es/components/thousand-input/thousand-input.d.ts +11 -0
- package/dist/es/components/thousand-input/thousand-input.mjs +159 -0
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +2558 -0
- package/dist/es/components/tinymce/config.d.ts +25 -0
- package/dist/es/components/tinymce/index.css +9 -0
- package/dist/es/components/tinymce/index.d.ts +4 -0
- package/dist/es/components/tinymce/index.mjs +6 -0
- package/dist/es/components/tinymce/tinymce.d.ts +9 -0
- package/dist/es/components/tinymce/tinymce.mjs +176 -0
- package/dist/es/components/tinymce/tinymce.vue.d.ts +20 -0
- package/dist/es/components/tree-picker/components/popover-cascader.d.ts +8 -0
- package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +1361 -0
- package/dist/es/components/tree-picker/docs/data.d.ts +2 -0
- package/dist/es/components/tree-picker/index.css +41 -0
- package/dist/es/components/tree-picker/index.d.ts +4 -0
- package/dist/es/components/tree-picker/index.mjs +6 -0
- package/dist/es/components/tree-picker/popover-cascader.css +23 -0
- package/dist/es/components/tree-picker/tree-picker.d.ts +14 -0
- package/dist/es/components/tree-picker/tree-picker.mjs +173 -0
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +575 -0
- package/dist/es/components/upload-file/index.css +30 -0
- package/dist/es/components/upload-file/index.d.ts +4 -0
- package/dist/es/components/upload-file/index.mjs +6 -0
- package/dist/es/components/upload-file/upload-file.d.ts +39 -0
- package/dist/es/components/upload-file/upload-file.mjs +202 -0
- package/dist/es/components/upload-file/upload-file.vue.d.ts +30 -0
- package/dist/es/directives/cleave/index.d.ts +3 -0
- package/dist/es/directives/focus/index.d.ts +4 -0
- package/dist/es/directives/index.d.ts +3 -0
- package/dist/es/directives/thousand/index.d.ts +3 -0
- package/dist/es/index.d.ts +42 -0
- package/dist/es/index.mjs +122 -0
- package/dist/es/use/useSmallScreen/index.d.ts +4 -0
- package/dist/es/use/useSmallScreen/index.mjs +10 -0
- package/dist/es/use/useStore/index.d.ts +3 -0
- package/dist/es/use/useStore/index.mjs +22 -0
- package/dist/es/utils/index.d.ts +6 -0
- package/dist/es/utils/resolver.d.ts +3 -0
- package/dist/es/utils/resolver.mjs +24 -0
- package/dist/es/utils/typescript.d.ts +6 -0
- package/dist/global.d.ts +42 -0
- package/dist/index.css +869 -0
- package/package.json +58 -0
|
@@ -0,0 +1,690 @@
|
|
|
1
|
+
import { c as isPrototype, d as arrayLikeKeys, a as isArrayLike, o as overArg, k as keys, g as getSymbols, s as stubArray, e as baseGetAllKeys, U as Uint8Array, f as getTag, h as isBuffer, S as Stack, j as getAllKeys } from './-EkpfdcW.mjs';
|
|
2
|
+
import { c as baseAssignValue, d as assignValue } from './C2LgraHx.mjs';
|
|
3
|
+
import { i as isObject, m as arrayPush, b as isArray } from './Spa-JKB4.mjs';
|
|
4
|
+
import { r as root, S as Symbol$1, i as isObjectLike } from './Fo0dZYnz.mjs';
|
|
5
|
+
import { b as baseUnary, n as nodeUtil } from './O-uhUKF4.mjs';
|
|
6
|
+
|
|
7
|
+
/** Built-in value references. */
|
|
8
|
+
var objectCreate = Object.create;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The base implementation of `_.create` without support for assigning
|
|
12
|
+
* properties to the created object.
|
|
13
|
+
*
|
|
14
|
+
* @private
|
|
15
|
+
* @param {Object} proto The object to inherit from.
|
|
16
|
+
* @returns {Object} Returns the new object.
|
|
17
|
+
*/
|
|
18
|
+
var baseCreate = (function() {
|
|
19
|
+
function object() {}
|
|
20
|
+
return function(proto) {
|
|
21
|
+
if (!isObject(proto)) {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
if (objectCreate) {
|
|
25
|
+
return objectCreate(proto);
|
|
26
|
+
}
|
|
27
|
+
object.prototype = proto;
|
|
28
|
+
var result = new object;
|
|
29
|
+
object.prototype = undefined;
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
}());
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Copies the values of `source` to `array`.
|
|
36
|
+
*
|
|
37
|
+
* @private
|
|
38
|
+
* @param {Array} source The array to copy values from.
|
|
39
|
+
* @param {Array} [array=[]] The array to copy values to.
|
|
40
|
+
* @returns {Array} Returns `array`.
|
|
41
|
+
*/
|
|
42
|
+
function copyArray(source, array) {
|
|
43
|
+
var index = -1,
|
|
44
|
+
length = source.length;
|
|
45
|
+
|
|
46
|
+
array || (array = Array(length));
|
|
47
|
+
while (++index < length) {
|
|
48
|
+
array[index] = source[index];
|
|
49
|
+
}
|
|
50
|
+
return array;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A specialized version of `_.forEach` for arrays without support for
|
|
55
|
+
* iteratee shorthands.
|
|
56
|
+
*
|
|
57
|
+
* @private
|
|
58
|
+
* @param {Array} [array] The array to iterate over.
|
|
59
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
60
|
+
* @returns {Array} Returns `array`.
|
|
61
|
+
*/
|
|
62
|
+
function arrayEach(array, iteratee) {
|
|
63
|
+
var index = -1,
|
|
64
|
+
length = array == null ? 0 : array.length;
|
|
65
|
+
|
|
66
|
+
while (++index < length) {
|
|
67
|
+
if (iteratee(array[index], index, array) === false) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return array;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Copies properties of `source` to `object`.
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
* @param {Object} source The object to copy properties from.
|
|
79
|
+
* @param {Array} props The property identifiers to copy.
|
|
80
|
+
* @param {Object} [object={}] The object to copy properties to.
|
|
81
|
+
* @param {Function} [customizer] The function to customize copied values.
|
|
82
|
+
* @returns {Object} Returns `object`.
|
|
83
|
+
*/
|
|
84
|
+
function copyObject(source, props, object, customizer) {
|
|
85
|
+
var isNew = !object;
|
|
86
|
+
object || (object = {});
|
|
87
|
+
|
|
88
|
+
var index = -1,
|
|
89
|
+
length = props.length;
|
|
90
|
+
|
|
91
|
+
while (++index < length) {
|
|
92
|
+
var key = props[index];
|
|
93
|
+
|
|
94
|
+
var newValue = undefined;
|
|
95
|
+
|
|
96
|
+
if (newValue === undefined) {
|
|
97
|
+
newValue = source[key];
|
|
98
|
+
}
|
|
99
|
+
if (isNew) {
|
|
100
|
+
baseAssignValue(object, key, newValue);
|
|
101
|
+
} else {
|
|
102
|
+
assignValue(object, key, newValue);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return object;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* This function is like
|
|
110
|
+
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
111
|
+
* except that it includes inherited enumerable properties.
|
|
112
|
+
*
|
|
113
|
+
* @private
|
|
114
|
+
* @param {Object} object The object to query.
|
|
115
|
+
* @returns {Array} Returns the array of property names.
|
|
116
|
+
*/
|
|
117
|
+
function nativeKeysIn(object) {
|
|
118
|
+
var result = [];
|
|
119
|
+
if (object != null) {
|
|
120
|
+
for (var key in Object(object)) {
|
|
121
|
+
result.push(key);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Used for built-in method references. */
|
|
128
|
+
var objectProto$1 = Object.prototype;
|
|
129
|
+
|
|
130
|
+
/** Used to check objects for own properties. */
|
|
131
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
135
|
+
*
|
|
136
|
+
* @private
|
|
137
|
+
* @param {Object} object The object to query.
|
|
138
|
+
* @returns {Array} Returns the array of property names.
|
|
139
|
+
*/
|
|
140
|
+
function baseKeysIn(object) {
|
|
141
|
+
if (!isObject(object)) {
|
|
142
|
+
return nativeKeysIn(object);
|
|
143
|
+
}
|
|
144
|
+
var isProto = isPrototype(object),
|
|
145
|
+
result = [];
|
|
146
|
+
|
|
147
|
+
for (var key in object) {
|
|
148
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
|
|
149
|
+
result.push(key);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return result;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
157
|
+
*
|
|
158
|
+
* **Note:** Non-object values are coerced to objects.
|
|
159
|
+
*
|
|
160
|
+
* @static
|
|
161
|
+
* @memberOf _
|
|
162
|
+
* @since 3.0.0
|
|
163
|
+
* @category Object
|
|
164
|
+
* @param {Object} object The object to query.
|
|
165
|
+
* @returns {Array} Returns the array of property names.
|
|
166
|
+
* @example
|
|
167
|
+
*
|
|
168
|
+
* function Foo() {
|
|
169
|
+
* this.a = 1;
|
|
170
|
+
* this.b = 2;
|
|
171
|
+
* }
|
|
172
|
+
*
|
|
173
|
+
* Foo.prototype.c = 3;
|
|
174
|
+
*
|
|
175
|
+
* _.keysIn(new Foo);
|
|
176
|
+
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
177
|
+
*/
|
|
178
|
+
function keysIn(object) {
|
|
179
|
+
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** Built-in value references. */
|
|
183
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The base implementation of `_.assign` without support for multiple sources
|
|
187
|
+
* or `customizer` functions.
|
|
188
|
+
*
|
|
189
|
+
* @private
|
|
190
|
+
* @param {Object} object The destination object.
|
|
191
|
+
* @param {Object} source The source object.
|
|
192
|
+
* @returns {Object} Returns `object`.
|
|
193
|
+
*/
|
|
194
|
+
function baseAssign(object, source) {
|
|
195
|
+
return object && copyObject(source, keys(source), object);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The base implementation of `_.assignIn` without support for multiple sources
|
|
200
|
+
* or `customizer` functions.
|
|
201
|
+
*
|
|
202
|
+
* @private
|
|
203
|
+
* @param {Object} object The destination object.
|
|
204
|
+
* @param {Object} source The source object.
|
|
205
|
+
* @returns {Object} Returns `object`.
|
|
206
|
+
*/
|
|
207
|
+
function baseAssignIn(object, source) {
|
|
208
|
+
return object && copyObject(source, keysIn(source), object);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Detect free variable `exports`. */
|
|
212
|
+
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
213
|
+
|
|
214
|
+
/** Detect free variable `module`. */
|
|
215
|
+
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
216
|
+
|
|
217
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
218
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
219
|
+
|
|
220
|
+
/** Built-in value references. */
|
|
221
|
+
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
222
|
+
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Creates a clone of `buffer`.
|
|
226
|
+
*
|
|
227
|
+
* @private
|
|
228
|
+
* @param {Buffer} buffer The buffer to clone.
|
|
229
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
230
|
+
* @returns {Buffer} Returns the cloned buffer.
|
|
231
|
+
*/
|
|
232
|
+
function cloneBuffer(buffer, isDeep) {
|
|
233
|
+
if (isDeep) {
|
|
234
|
+
return buffer.slice();
|
|
235
|
+
}
|
|
236
|
+
var length = buffer.length,
|
|
237
|
+
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
238
|
+
|
|
239
|
+
buffer.copy(result);
|
|
240
|
+
return result;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Copies own symbols of `source` to `object`.
|
|
245
|
+
*
|
|
246
|
+
* @private
|
|
247
|
+
* @param {Object} source The object to copy symbols from.
|
|
248
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
249
|
+
* @returns {Object} Returns `object`.
|
|
250
|
+
*/
|
|
251
|
+
function copySymbols(source, object) {
|
|
252
|
+
return copyObject(source, getSymbols(source), object);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
256
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Creates an array of the own and inherited enumerable symbols of `object`.
|
|
260
|
+
*
|
|
261
|
+
* @private
|
|
262
|
+
* @param {Object} object The object to query.
|
|
263
|
+
* @returns {Array} Returns the array of symbols.
|
|
264
|
+
*/
|
|
265
|
+
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
266
|
+
var result = [];
|
|
267
|
+
while (object) {
|
|
268
|
+
arrayPush(result, getSymbols(object));
|
|
269
|
+
object = getPrototype(object);
|
|
270
|
+
}
|
|
271
|
+
return result;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Copies own and inherited symbols of `source` to `object`.
|
|
276
|
+
*
|
|
277
|
+
* @private
|
|
278
|
+
* @param {Object} source The object to copy symbols from.
|
|
279
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
280
|
+
* @returns {Object} Returns `object`.
|
|
281
|
+
*/
|
|
282
|
+
function copySymbolsIn(source, object) {
|
|
283
|
+
return copyObject(source, getSymbolsIn(source), object);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Creates an array of own and inherited enumerable property names and
|
|
288
|
+
* symbols of `object`.
|
|
289
|
+
*
|
|
290
|
+
* @private
|
|
291
|
+
* @param {Object} object The object to query.
|
|
292
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
293
|
+
*/
|
|
294
|
+
function getAllKeysIn(object) {
|
|
295
|
+
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** Used for built-in method references. */
|
|
299
|
+
var objectProto = Object.prototype;
|
|
300
|
+
|
|
301
|
+
/** Used to check objects for own properties. */
|
|
302
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Initializes an array clone.
|
|
306
|
+
*
|
|
307
|
+
* @private
|
|
308
|
+
* @param {Array} array The array to clone.
|
|
309
|
+
* @returns {Array} Returns the initialized clone.
|
|
310
|
+
*/
|
|
311
|
+
function initCloneArray(array) {
|
|
312
|
+
var length = array.length,
|
|
313
|
+
result = new array.constructor(length);
|
|
314
|
+
|
|
315
|
+
// Add properties assigned by `RegExp#exec`.
|
|
316
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
317
|
+
result.index = array.index;
|
|
318
|
+
result.input = array.input;
|
|
319
|
+
}
|
|
320
|
+
return result;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Creates a clone of `arrayBuffer`.
|
|
325
|
+
*
|
|
326
|
+
* @private
|
|
327
|
+
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
328
|
+
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
329
|
+
*/
|
|
330
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
331
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
332
|
+
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
333
|
+
return result;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Creates a clone of `dataView`.
|
|
338
|
+
*
|
|
339
|
+
* @private
|
|
340
|
+
* @param {Object} dataView The data view to clone.
|
|
341
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
342
|
+
* @returns {Object} Returns the cloned data view.
|
|
343
|
+
*/
|
|
344
|
+
function cloneDataView(dataView, isDeep) {
|
|
345
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
346
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/** Used to match `RegExp` flags from their coerced string values. */
|
|
350
|
+
var reFlags = /\w*$/;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Creates a clone of `regexp`.
|
|
354
|
+
*
|
|
355
|
+
* @private
|
|
356
|
+
* @param {Object} regexp The regexp to clone.
|
|
357
|
+
* @returns {Object} Returns the cloned regexp.
|
|
358
|
+
*/
|
|
359
|
+
function cloneRegExp(regexp) {
|
|
360
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
361
|
+
result.lastIndex = regexp.lastIndex;
|
|
362
|
+
return result;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/** Used to convert symbols to primitives and strings. */
|
|
366
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
|
|
367
|
+
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Creates a clone of the `symbol` object.
|
|
371
|
+
*
|
|
372
|
+
* @private
|
|
373
|
+
* @param {Object} symbol The symbol object to clone.
|
|
374
|
+
* @returns {Object} Returns the cloned symbol object.
|
|
375
|
+
*/
|
|
376
|
+
function cloneSymbol(symbol) {
|
|
377
|
+
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Creates a clone of `typedArray`.
|
|
382
|
+
*
|
|
383
|
+
* @private
|
|
384
|
+
* @param {Object} typedArray The typed array to clone.
|
|
385
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
386
|
+
* @returns {Object} Returns the cloned typed array.
|
|
387
|
+
*/
|
|
388
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
389
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
390
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/** `Object#toString` result references. */
|
|
394
|
+
var boolTag$1 = '[object Boolean]',
|
|
395
|
+
dateTag$1 = '[object Date]',
|
|
396
|
+
mapTag$2 = '[object Map]',
|
|
397
|
+
numberTag$1 = '[object Number]',
|
|
398
|
+
regexpTag$1 = '[object RegExp]',
|
|
399
|
+
setTag$2 = '[object Set]',
|
|
400
|
+
stringTag$1 = '[object String]',
|
|
401
|
+
symbolTag$1 = '[object Symbol]';
|
|
402
|
+
|
|
403
|
+
var arrayBufferTag$1 = '[object ArrayBuffer]',
|
|
404
|
+
dataViewTag$1 = '[object DataView]',
|
|
405
|
+
float32Tag$1 = '[object Float32Array]',
|
|
406
|
+
float64Tag$1 = '[object Float64Array]',
|
|
407
|
+
int8Tag$1 = '[object Int8Array]',
|
|
408
|
+
int16Tag$1 = '[object Int16Array]',
|
|
409
|
+
int32Tag$1 = '[object Int32Array]',
|
|
410
|
+
uint8Tag$1 = '[object Uint8Array]',
|
|
411
|
+
uint8ClampedTag$1 = '[object Uint8ClampedArray]',
|
|
412
|
+
uint16Tag$1 = '[object Uint16Array]',
|
|
413
|
+
uint32Tag$1 = '[object Uint32Array]';
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Initializes an object clone based on its `toStringTag`.
|
|
417
|
+
*
|
|
418
|
+
* **Note:** This function only supports cloning values with tags of
|
|
419
|
+
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
420
|
+
*
|
|
421
|
+
* @private
|
|
422
|
+
* @param {Object} object The object to clone.
|
|
423
|
+
* @param {string} tag The `toStringTag` of the object to clone.
|
|
424
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
425
|
+
* @returns {Object} Returns the initialized clone.
|
|
426
|
+
*/
|
|
427
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
428
|
+
var Ctor = object.constructor;
|
|
429
|
+
switch (tag) {
|
|
430
|
+
case arrayBufferTag$1:
|
|
431
|
+
return cloneArrayBuffer(object);
|
|
432
|
+
|
|
433
|
+
case boolTag$1:
|
|
434
|
+
case dateTag$1:
|
|
435
|
+
return new Ctor(+object);
|
|
436
|
+
|
|
437
|
+
case dataViewTag$1:
|
|
438
|
+
return cloneDataView(object, isDeep);
|
|
439
|
+
|
|
440
|
+
case float32Tag$1: case float64Tag$1:
|
|
441
|
+
case int8Tag$1: case int16Tag$1: case int32Tag$1:
|
|
442
|
+
case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
|
|
443
|
+
return cloneTypedArray(object, isDeep);
|
|
444
|
+
|
|
445
|
+
case mapTag$2:
|
|
446
|
+
return new Ctor;
|
|
447
|
+
|
|
448
|
+
case numberTag$1:
|
|
449
|
+
case stringTag$1:
|
|
450
|
+
return new Ctor(object);
|
|
451
|
+
|
|
452
|
+
case regexpTag$1:
|
|
453
|
+
return cloneRegExp(object);
|
|
454
|
+
|
|
455
|
+
case setTag$2:
|
|
456
|
+
return new Ctor;
|
|
457
|
+
|
|
458
|
+
case symbolTag$1:
|
|
459
|
+
return cloneSymbol(object);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Initializes an object clone.
|
|
465
|
+
*
|
|
466
|
+
* @private
|
|
467
|
+
* @param {Object} object The object to clone.
|
|
468
|
+
* @returns {Object} Returns the initialized clone.
|
|
469
|
+
*/
|
|
470
|
+
function initCloneObject(object) {
|
|
471
|
+
return (typeof object.constructor == 'function' && !isPrototype(object))
|
|
472
|
+
? baseCreate(getPrototype(object))
|
|
473
|
+
: {};
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/** `Object#toString` result references. */
|
|
477
|
+
var mapTag$1 = '[object Map]';
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* The base implementation of `_.isMap` without Node.js optimizations.
|
|
481
|
+
*
|
|
482
|
+
* @private
|
|
483
|
+
* @param {*} value The value to check.
|
|
484
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
485
|
+
*/
|
|
486
|
+
function baseIsMap(value) {
|
|
487
|
+
return isObjectLike(value) && getTag(value) == mapTag$1;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* Node.js helper references. */
|
|
491
|
+
var nodeIsMap = nodeUtil && nodeUtil.isMap;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Checks if `value` is classified as a `Map` object.
|
|
495
|
+
*
|
|
496
|
+
* @static
|
|
497
|
+
* @memberOf _
|
|
498
|
+
* @since 4.3.0
|
|
499
|
+
* @category Lang
|
|
500
|
+
* @param {*} value The value to check.
|
|
501
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
502
|
+
* @example
|
|
503
|
+
*
|
|
504
|
+
* _.isMap(new Map);
|
|
505
|
+
* // => true
|
|
506
|
+
*
|
|
507
|
+
* _.isMap(new WeakMap);
|
|
508
|
+
* // => false
|
|
509
|
+
*/
|
|
510
|
+
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
511
|
+
|
|
512
|
+
/** `Object#toString` result references. */
|
|
513
|
+
var setTag$1 = '[object Set]';
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* The base implementation of `_.isSet` without Node.js optimizations.
|
|
517
|
+
*
|
|
518
|
+
* @private
|
|
519
|
+
* @param {*} value The value to check.
|
|
520
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
521
|
+
*/
|
|
522
|
+
function baseIsSet(value) {
|
|
523
|
+
return isObjectLike(value) && getTag(value) == setTag$1;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/* Node.js helper references. */
|
|
527
|
+
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Checks if `value` is classified as a `Set` object.
|
|
531
|
+
*
|
|
532
|
+
* @static
|
|
533
|
+
* @memberOf _
|
|
534
|
+
* @since 4.3.0
|
|
535
|
+
* @category Lang
|
|
536
|
+
* @param {*} value The value to check.
|
|
537
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
538
|
+
* @example
|
|
539
|
+
*
|
|
540
|
+
* _.isSet(new Set);
|
|
541
|
+
* // => true
|
|
542
|
+
*
|
|
543
|
+
* _.isSet(new WeakSet);
|
|
544
|
+
* // => false
|
|
545
|
+
*/
|
|
546
|
+
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
547
|
+
|
|
548
|
+
/** Used to compose bitmasks for cloning. */
|
|
549
|
+
var CLONE_DEEP_FLAG = 1,
|
|
550
|
+
CLONE_FLAT_FLAG = 2,
|
|
551
|
+
CLONE_SYMBOLS_FLAG = 4;
|
|
552
|
+
|
|
553
|
+
/** `Object#toString` result references. */
|
|
554
|
+
var argsTag = '[object Arguments]',
|
|
555
|
+
arrayTag = '[object Array]',
|
|
556
|
+
boolTag = '[object Boolean]',
|
|
557
|
+
dateTag = '[object Date]',
|
|
558
|
+
errorTag = '[object Error]',
|
|
559
|
+
funcTag = '[object Function]',
|
|
560
|
+
genTag = '[object GeneratorFunction]',
|
|
561
|
+
mapTag = '[object Map]',
|
|
562
|
+
numberTag = '[object Number]',
|
|
563
|
+
objectTag = '[object Object]',
|
|
564
|
+
regexpTag = '[object RegExp]',
|
|
565
|
+
setTag = '[object Set]',
|
|
566
|
+
stringTag = '[object String]',
|
|
567
|
+
symbolTag = '[object Symbol]',
|
|
568
|
+
weakMapTag = '[object WeakMap]';
|
|
569
|
+
|
|
570
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
571
|
+
dataViewTag = '[object DataView]',
|
|
572
|
+
float32Tag = '[object Float32Array]',
|
|
573
|
+
float64Tag = '[object Float64Array]',
|
|
574
|
+
int8Tag = '[object Int8Array]',
|
|
575
|
+
int16Tag = '[object Int16Array]',
|
|
576
|
+
int32Tag = '[object Int32Array]',
|
|
577
|
+
uint8Tag = '[object Uint8Array]',
|
|
578
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
579
|
+
uint16Tag = '[object Uint16Array]',
|
|
580
|
+
uint32Tag = '[object Uint32Array]';
|
|
581
|
+
|
|
582
|
+
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
|
583
|
+
var cloneableTags = {};
|
|
584
|
+
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
|
585
|
+
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
|
586
|
+
cloneableTags[boolTag] = cloneableTags[dateTag] =
|
|
587
|
+
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
|
588
|
+
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
|
589
|
+
cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
|
590
|
+
cloneableTags[numberTag] = cloneableTags[objectTag] =
|
|
591
|
+
cloneableTags[regexpTag] = cloneableTags[setTag] =
|
|
592
|
+
cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
|
593
|
+
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
|
594
|
+
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
595
|
+
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
|
596
|
+
cloneableTags[weakMapTag] = false;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
600
|
+
* traversed objects.
|
|
601
|
+
*
|
|
602
|
+
* @private
|
|
603
|
+
* @param {*} value The value to clone.
|
|
604
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
605
|
+
* 1 - Deep clone
|
|
606
|
+
* 2 - Flatten inherited properties
|
|
607
|
+
* 4 - Clone symbols
|
|
608
|
+
* @param {Function} [customizer] The function to customize cloning.
|
|
609
|
+
* @param {string} [key] The key of `value`.
|
|
610
|
+
* @param {Object} [object] The parent object of `value`.
|
|
611
|
+
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
612
|
+
* @returns {*} Returns the cloned value.
|
|
613
|
+
*/
|
|
614
|
+
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
615
|
+
var result,
|
|
616
|
+
isDeep = bitmask & CLONE_DEEP_FLAG,
|
|
617
|
+
isFlat = bitmask & CLONE_FLAT_FLAG,
|
|
618
|
+
isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
619
|
+
|
|
620
|
+
if (customizer) {
|
|
621
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
622
|
+
}
|
|
623
|
+
if (result !== undefined) {
|
|
624
|
+
return result;
|
|
625
|
+
}
|
|
626
|
+
if (!isObject(value)) {
|
|
627
|
+
return value;
|
|
628
|
+
}
|
|
629
|
+
var isArr = isArray(value);
|
|
630
|
+
if (isArr) {
|
|
631
|
+
result = initCloneArray(value);
|
|
632
|
+
if (!isDeep) {
|
|
633
|
+
return copyArray(value, result);
|
|
634
|
+
}
|
|
635
|
+
} else {
|
|
636
|
+
var tag = getTag(value),
|
|
637
|
+
isFunc = tag == funcTag || tag == genTag;
|
|
638
|
+
|
|
639
|
+
if (isBuffer(value)) {
|
|
640
|
+
return cloneBuffer(value, isDeep);
|
|
641
|
+
}
|
|
642
|
+
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
|
643
|
+
result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
|
644
|
+
if (!isDeep) {
|
|
645
|
+
return isFlat
|
|
646
|
+
? copySymbolsIn(value, baseAssignIn(result, value))
|
|
647
|
+
: copySymbols(value, baseAssign(result, value));
|
|
648
|
+
}
|
|
649
|
+
} else {
|
|
650
|
+
if (!cloneableTags[tag]) {
|
|
651
|
+
return object ? value : {};
|
|
652
|
+
}
|
|
653
|
+
result = initCloneByTag(value, tag, isDeep);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
// Check for circular references and return its corresponding clone.
|
|
657
|
+
stack || (stack = new Stack);
|
|
658
|
+
var stacked = stack.get(value);
|
|
659
|
+
if (stacked) {
|
|
660
|
+
return stacked;
|
|
661
|
+
}
|
|
662
|
+
stack.set(value, result);
|
|
663
|
+
|
|
664
|
+
if (isSet(value)) {
|
|
665
|
+
value.forEach(function(subValue) {
|
|
666
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
667
|
+
});
|
|
668
|
+
} else if (isMap(value)) {
|
|
669
|
+
value.forEach(function(subValue, key) {
|
|
670
|
+
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
var keysFunc = isFull
|
|
675
|
+
? (isFlat ? getAllKeysIn : getAllKeys)
|
|
676
|
+
: (isFlat ? keysIn : keys);
|
|
677
|
+
|
|
678
|
+
var props = isArr ? undefined : keysFunc(value);
|
|
679
|
+
arrayEach(props || value, function(subValue, key) {
|
|
680
|
+
if (props) {
|
|
681
|
+
key = subValue;
|
|
682
|
+
subValue = value[key];
|
|
683
|
+
}
|
|
684
|
+
// Recursively populate clone (susceptible to call stack limits).
|
|
685
|
+
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
686
|
+
});
|
|
687
|
+
return result;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export { getAllKeysIn as a, baseClone as b, copyObject as c, getPrototype as g };
|