@vunk/form 1.3.0 → 1.4.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.
Files changed (172) hide show
  1. package/components/button/index.d.ts +4 -0
  2. package/components/button/src/ctx.d.ts +96 -0
  3. package/components/button/src/index.vue.d.ts +495 -0
  4. package/components/button/src/types.d.ts +13 -0
  5. package/components/cascader/index.d.ts +6 -0
  6. package/components/cascader/src/ctx.d.ts +120 -0
  7. package/components/cascader/src/index.vue.d.ts +13955 -0
  8. package/components/cascader/src/types.d.ts +7 -0
  9. package/components/cascader/src/use.d.ts +5 -0
  10. package/components/checkbox/index.d.ts +5 -0
  11. package/components/checkbox/src/ctx.d.ts +89 -0
  12. package/components/checkbox/src/index.vue.d.ts +1099 -0
  13. package/components/checkbox/src/types.d.ts +8 -0
  14. package/components/color-picker/index.d.ts +4 -0
  15. package/components/color-picker/src/ctx.d.ts +80 -0
  16. package/components/color-picker/src/index.vue.d.ts +11135 -0
  17. package/components/color-picker/src/types.d.ts +7 -0
  18. package/components/date-picker/index.d.ts +5 -0
  19. package/components/date-picker/src/ctx.d.ts +158 -0
  20. package/components/date-picker/src/index.vue.d.ts +590 -0
  21. package/components/date-picker/src/types.d.ts +20 -0
  22. package/components/date-picker-range/index.d.ts +4 -0
  23. package/components/date-picker-range/src/ctx.d.ts +177 -0
  24. package/components/date-picker-range/src/index.vue.d.ts +410 -0
  25. package/components/date-picker-range/src/types.d.ts +12 -0
  26. package/components/download-plus/index.d.ts +4 -0
  27. package/components/download-plus/src/api.d.ts +13 -0
  28. package/components/download-plus/src/const.d.ts +9 -0
  29. package/components/download-plus/src/ctx.d.ts +84 -0
  30. package/components/download-plus/src/index.vue.d.ts +1020 -0
  31. package/components/download-plus/src/types.d.ts +17 -0
  32. package/components/esri-input-geojson/index.d.ts +6 -0
  33. package/components/esri-input-geojson/src/append.vue.d.ts +2259 -0
  34. package/components/esri-input-geojson/src/const.d.ts +12 -0
  35. package/components/esri-input-geojson/src/ctx.d.ts +223 -0
  36. package/components/esri-input-geojson/src/default-view.vue.d.ts +133 -0
  37. package/components/esri-input-geojson/src/index.vue.d.ts +1249 -0
  38. package/components/esri-input-geojson/src/types.d.ts +22 -0
  39. package/components/esri-input-geojson/src/viewer.vue.d.ts +427 -0
  40. package/components/form/index.d.ts +5 -0
  41. package/components/form/src/ctx.d.ts +84 -0
  42. package/components/form/src/index.vue.d.ts +789 -0
  43. package/components/form/src/types.d.ts +12 -0
  44. package/components/form/src/utils.d.ts +15 -0
  45. package/components/form-item/index.d.ts +5 -0
  46. package/components/form-item/src/ctx.d.ts +62 -0
  47. package/components/form-item/src/index.vue.d.ts +320 -0
  48. package/components/form-item/src/types.d.ts +6 -0
  49. package/components/form-item-renderer/index.cjs +9 -14
  50. package/components/form-item-renderer/index.d.ts +5 -0
  51. package/components/form-item-renderer/index.mjs +10 -16
  52. package/components/form-item-renderer/src/ctx.d.ts +16 -0
  53. package/components/form-item-renderer/src/index.vue.d.ts +38 -0
  54. package/components/form-item-renderer/src/symbols.d.ts +3 -0
  55. package/components/form-item-renderer/src/types.d.ts +7 -0
  56. package/components/form-item-renderer-template/index.d.ts +4 -0
  57. package/components/form-item-renderer-template/src/ctx.d.ts +7 -0
  58. package/components/form-item-renderer-template/src/index.vue.d.ts +16 -0
  59. package/components/form-item-renderer-template/src/types.d.ts +1 -0
  60. package/components/geoinput/index.d.ts +4 -0
  61. package/components/geoinput/src/ctx.d.ts +228 -0
  62. package/components/geoinput/src/index.vue.d.ts +519 -0
  63. package/components/geoinput/src/types.d.ts +12 -0
  64. package/components/geoinput-read/index.d.ts +5 -0
  65. package/components/geoinput-read/src/append.vue.d.ts +383 -0
  66. package/components/geoinput-read/src/core.vue.d.ts +644 -0
  67. package/components/geoinput-read/src/ctx.d.ts +199 -0
  68. package/components/geoinput-read/src/index.vue.d.ts +1169 -0
  69. package/components/geoinput-read/src/types.d.ts +3 -0
  70. package/components/geoinput-update/index.d.ts +5 -0
  71. package/components/geoinput-update/src/append.vue.d.ts +2246 -0
  72. package/components/geoinput-update/src/ctx.d.ts +207 -0
  73. package/components/geoinput-update/src/index.vue.d.ts +1302 -0
  74. package/components/geoinput-update/src/types.d.ts +6 -0
  75. package/components/index2.cjs +38 -0
  76. package/components/index2.mjs +37 -1
  77. package/components/input/index.d.ts +5 -0
  78. package/components/input/src/ctx.d.ts +148 -0
  79. package/components/input/src/index.vue.d.ts +809 -0
  80. package/components/input/src/types.d.ts +13 -0
  81. package/components/input-collection/index.cjs +2214 -0
  82. package/components/input-collection/index.css +11 -0
  83. package/components/input-collection/index.d.ts +4 -0
  84. package/components/input-collection/index.mjs +2208 -0
  85. package/components/input-collection/src/ctx.d.ts +65 -0
  86. package/components/input-collection/src/index.vue.d.ts +1149 -0
  87. package/components/input-collection/src/types.d.ts +3 -0
  88. package/components/input-link/index.d.ts +4 -0
  89. package/components/input-link/src/ctx.d.ts +179 -0
  90. package/components/input-link/src/index.vue.d.ts +385 -0
  91. package/components/input-link/src/types.d.ts +7 -0
  92. package/components/input-number/index.d.ts +4 -0
  93. package/components/input-number/src/ctx.d.ts +90 -0
  94. package/components/input-number/src/index.vue.d.ts +1783 -0
  95. package/components/input-number/src/types.d.ts +8 -0
  96. package/components/monaco-editor/index.css +1 -0
  97. package/components/monaco-editor/index.d.ts +4 -0
  98. package/components/monaco-editor/src/ctx.d.ts +70 -0
  99. package/components/monaco-editor/src/index.vue.d.ts +209 -0
  100. package/components/monaco-editor/src/types.d.ts +7 -0
  101. package/components/radio/index.d.ts +4 -0
  102. package/components/radio/src/ctx.d.ts +82 -0
  103. package/components/radio/src/index.vue.d.ts +629 -0
  104. package/components/radio/src/types.d.ts +8 -0
  105. package/components/select/index.d.ts +4 -0
  106. package/components/select/src/ctx.d.ts +156 -0
  107. package/components/select/src/index.vue.d.ts +13405 -0
  108. package/components/select/src/types.d.ts +11 -0
  109. package/components/slider/index.d.ts +4 -0
  110. package/components/slider/src/ctx.d.ts +127 -0
  111. package/components/slider/src/index.vue.d.ts +341 -0
  112. package/components/slider/src/types.d.ts +7 -0
  113. package/components/switch/index.d.ts +4 -0
  114. package/components/switch/src/ctx.d.ts +114 -0
  115. package/components/switch/src/index.vue.d.ts +584 -0
  116. package/components/switch/src/types.d.ts +8 -0
  117. package/components/template-instances-provider/index.cjs +26 -0
  118. package/components/template-instances-provider/index.d.ts +3 -0
  119. package/components/template-instances-provider/index.mjs +21 -0
  120. package/components/template-instances-provider/src/index.vue.d.ts +4 -0
  121. package/components/templates-default/index.d.ts +4 -0
  122. package/components/templates-default/src/ctx.d.ts +19 -0
  123. package/components/templates-default/src/index.vue.d.ts +198 -0
  124. package/components/templates-default/src/types.d.ts +53 -0
  125. package/components/templates-element-plus/index.d.ts +4 -0
  126. package/components/templates-element-plus/src/ctx.d.ts +9 -0
  127. package/components/templates-element-plus/src/index.vue.d.ts +206 -0
  128. package/components/templates-element-plus/src/types.d.ts +13 -0
  129. package/components/templates-esri/index.d.ts +4 -0
  130. package/components/templates-esri/src/ctx.d.ts +11 -0
  131. package/components/templates-esri/src/index.vue.d.ts +43 -0
  132. package/components/templates-esri/src/types.d.ts +2 -0
  133. package/components/templates-layout/index.d.ts +4 -0
  134. package/components/templates-layout/src/ctx.d.ts +9 -0
  135. package/components/templates-layout/src/index.vue.d.ts +161 -0
  136. package/components/templates-layout/src/types.d.ts +32 -0
  137. package/components/templates-mapbox/index.d.ts +4 -0
  138. package/components/templates-mapbox/src/ctx.d.ts +11 -0
  139. package/components/templates-mapbox/src/index.vue.d.ts +43 -0
  140. package/components/templates-mapbox/src/types.d.ts +3 -0
  141. package/components/templates-variant/index.d.ts +4 -0
  142. package/components/templates-variant/src/ctx.d.ts +11 -0
  143. package/components/templates-variant/src/index.vue.d.ts +43 -0
  144. package/components/templates-variant/src/types.d.ts +2 -0
  145. package/components/upload/index.d.ts +5 -0
  146. package/components/upload/index.mjs +1 -1
  147. package/components/upload/src/ctx.d.ts +180 -0
  148. package/components/upload/src/file.vue.d.ts +363 -0
  149. package/components/upload/src/index.vue.d.ts +2784 -0
  150. package/components/upload/src/types.d.ts +7 -0
  151. package/components/upload-plus/index.d.ts +6 -0
  152. package/components/upload-plus/index.mjs +1 -1
  153. package/components/upload-plus/src/api.d.ts +38 -0
  154. package/components/upload-plus/src/const.d.ts +9 -0
  155. package/components/upload-plus/src/ctx.d.ts +103 -0
  156. package/components/upload-plus/src/index.vue.d.ts +1077 -0
  157. package/components/upload-plus/src/types.d.ts +32 -0
  158. package/components/van-cascader/index.d.ts +4 -0
  159. package/components/van-cascader/src/ctx.d.ts +118 -0
  160. package/components/van-cascader/src/index.vue.d.ts +13312 -0
  161. package/components/van-cascader/src/types.d.ts +1 -0
  162. package/components/var-datetime-picker/index.d.ts +4 -0
  163. package/components/var-datetime-picker/src/const.d.ts +10 -0
  164. package/components/var-datetime-picker/src/ctx.d.ts +67 -0
  165. package/components/var-datetime-picker/src/index.vue.d.ts +771 -0
  166. package/components/var-datetime-picker/src/types.d.ts +22 -0
  167. package/components/vditor/index.d.ts +4 -0
  168. package/components/vditor/src/ctx.d.ts +77 -0
  169. package/components/vditor/src/index.vue.d.ts +324 -0
  170. package/components/vditor/src/types.d.ts +7 -0
  171. package/index.css +13 -0
  172. package/package.json +14 -1
@@ -0,0 +1,2214 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var formItem = require('@vunk/form/components/form-item');
7
+ var tableColumns = require('@vunk/plus/components/table-columns');
8
+ var elementPlus = require('element-plus');
9
+ var composables = require('@vunk/form/composables');
10
+ var templatesDefault = require('@vunk/form/components/templates-default');
11
+ var templateInstancesProvider = require('@vunk/form/components/template-instances-provider');
12
+ var formItemRenderer = require('@vunk/form/components/form-item-renderer');
13
+ var core = require('@vunk/core');
14
+ var index = require('../index2.cjs');
15
+ var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
16
+
17
+ const props = {
18
+ ...formItem._VkfFormItemCtx.props,
19
+ columns: {
20
+ type: Array,
21
+ default: () => []
22
+ },
23
+ modelValue: {
24
+ type: Array,
25
+ default: () => []
26
+ },
27
+ readonly: {
28
+ type: Boolean,
29
+ default: void 0
30
+ }
31
+ };
32
+ const emits = {
33
+ "update:modelValue": null
34
+ };
35
+
36
+ /** Detect free variable `global` from Node.js. */
37
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
38
+
39
+ /** Detect free variable `self`. */
40
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
41
+
42
+ /** Used as a reference to the global object. */
43
+ var root = freeGlobal || freeSelf || Function('return this')();
44
+
45
+ /** Built-in value references. */
46
+ var Symbol = root.Symbol;
47
+
48
+ /** Used for built-in method references. */
49
+ var objectProto$b = Object.prototype;
50
+
51
+ /** Used to check objects for own properties. */
52
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
53
+
54
+ /**
55
+ * Used to resolve the
56
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
57
+ * of values.
58
+ */
59
+ var nativeObjectToString$1 = objectProto$b.toString;
60
+
61
+ /** Built-in value references. */
62
+ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
63
+
64
+ /**
65
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
66
+ *
67
+ * @private
68
+ * @param {*} value The value to query.
69
+ * @returns {string} Returns the raw `toStringTag`.
70
+ */
71
+ function getRawTag(value) {
72
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
73
+ tag = value[symToStringTag$1];
74
+
75
+ try {
76
+ value[symToStringTag$1] = undefined;
77
+ var unmasked = true;
78
+ } catch (e) {}
79
+
80
+ var result = nativeObjectToString$1.call(value);
81
+ if (unmasked) {
82
+ if (isOwn) {
83
+ value[symToStringTag$1] = tag;
84
+ } else {
85
+ delete value[symToStringTag$1];
86
+ }
87
+ }
88
+ return result;
89
+ }
90
+
91
+ /** Used for built-in method references. */
92
+ var objectProto$a = Object.prototype;
93
+
94
+ /**
95
+ * Used to resolve the
96
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
97
+ * of values.
98
+ */
99
+ var nativeObjectToString = objectProto$a.toString;
100
+
101
+ /**
102
+ * Converts `value` to a string using `Object.prototype.toString`.
103
+ *
104
+ * @private
105
+ * @param {*} value The value to convert.
106
+ * @returns {string} Returns the converted string.
107
+ */
108
+ function objectToString(value) {
109
+ return nativeObjectToString.call(value);
110
+ }
111
+
112
+ /** `Object#toString` result references. */
113
+ var nullTag = '[object Null]',
114
+ undefinedTag = '[object Undefined]';
115
+
116
+ /** Built-in value references. */
117
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
118
+
119
+ /**
120
+ * The base implementation of `getTag` without fallbacks for buggy environments.
121
+ *
122
+ * @private
123
+ * @param {*} value The value to query.
124
+ * @returns {string} Returns the `toStringTag`.
125
+ */
126
+ function baseGetTag(value) {
127
+ if (value == null) {
128
+ return value === undefined ? undefinedTag : nullTag;
129
+ }
130
+ return (symToStringTag && symToStringTag in Object(value))
131
+ ? getRawTag(value)
132
+ : objectToString(value);
133
+ }
134
+
135
+ /**
136
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
137
+ * and has a `typeof` result of "object".
138
+ *
139
+ * @static
140
+ * @memberOf _
141
+ * @since 4.0.0
142
+ * @category Lang
143
+ * @param {*} value The value to check.
144
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
145
+ * @example
146
+ *
147
+ * _.isObjectLike({});
148
+ * // => true
149
+ *
150
+ * _.isObjectLike([1, 2, 3]);
151
+ * // => true
152
+ *
153
+ * _.isObjectLike(_.noop);
154
+ * // => false
155
+ *
156
+ * _.isObjectLike(null);
157
+ * // => false
158
+ */
159
+ function isObjectLike(value) {
160
+ return value != null && typeof value == 'object';
161
+ }
162
+
163
+ /**
164
+ * Checks if `value` is classified as an `Array` object.
165
+ *
166
+ * @static
167
+ * @memberOf _
168
+ * @since 0.1.0
169
+ * @category Lang
170
+ * @param {*} value The value to check.
171
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
172
+ * @example
173
+ *
174
+ * _.isArray([1, 2, 3]);
175
+ * // => true
176
+ *
177
+ * _.isArray(document.body.children);
178
+ * // => false
179
+ *
180
+ * _.isArray('abc');
181
+ * // => false
182
+ *
183
+ * _.isArray(_.noop);
184
+ * // => false
185
+ */
186
+ var isArray = Array.isArray;
187
+
188
+ /**
189
+ * Checks if `value` is the
190
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
191
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
192
+ *
193
+ * @static
194
+ * @memberOf _
195
+ * @since 0.1.0
196
+ * @category Lang
197
+ * @param {*} value The value to check.
198
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
199
+ * @example
200
+ *
201
+ * _.isObject({});
202
+ * // => true
203
+ *
204
+ * _.isObject([1, 2, 3]);
205
+ * // => true
206
+ *
207
+ * _.isObject(_.noop);
208
+ * // => true
209
+ *
210
+ * _.isObject(null);
211
+ * // => false
212
+ */
213
+ function isObject(value) {
214
+ var type = typeof value;
215
+ return value != null && (type == 'object' || type == 'function');
216
+ }
217
+
218
+ /** `Object#toString` result references. */
219
+ var asyncTag = '[object AsyncFunction]',
220
+ funcTag$2 = '[object Function]',
221
+ genTag$1 = '[object GeneratorFunction]',
222
+ proxyTag = '[object Proxy]';
223
+
224
+ /**
225
+ * Checks if `value` is classified as a `Function` object.
226
+ *
227
+ * @static
228
+ * @memberOf _
229
+ * @since 0.1.0
230
+ * @category Lang
231
+ * @param {*} value The value to check.
232
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
233
+ * @example
234
+ *
235
+ * _.isFunction(_);
236
+ * // => true
237
+ *
238
+ * _.isFunction(/abc/);
239
+ * // => false
240
+ */
241
+ function isFunction(value) {
242
+ if (!isObject(value)) {
243
+ return false;
244
+ }
245
+ // The use of `Object#toString` avoids issues with the `typeof` operator
246
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
247
+ var tag = baseGetTag(value);
248
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
249
+ }
250
+
251
+ /** Used to detect overreaching core-js shims. */
252
+ var coreJsData = root['__core-js_shared__'];
253
+
254
+ /** Used to detect methods masquerading as native. */
255
+ var maskSrcKey = (function() {
256
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
257
+ return uid ? ('Symbol(src)_1.' + uid) : '';
258
+ }());
259
+
260
+ /**
261
+ * Checks if `func` has its source masked.
262
+ *
263
+ * @private
264
+ * @param {Function} func The function to check.
265
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
266
+ */
267
+ function isMasked(func) {
268
+ return !!maskSrcKey && (maskSrcKey in func);
269
+ }
270
+
271
+ /** Used for built-in method references. */
272
+ var funcProto$1 = Function.prototype;
273
+
274
+ /** Used to resolve the decompiled source of functions. */
275
+ var funcToString$1 = funcProto$1.toString;
276
+
277
+ /**
278
+ * Converts `func` to its source code.
279
+ *
280
+ * @private
281
+ * @param {Function} func The function to convert.
282
+ * @returns {string} Returns the source code.
283
+ */
284
+ function toSource(func) {
285
+ if (func != null) {
286
+ try {
287
+ return funcToString$1.call(func);
288
+ } catch (e) {}
289
+ try {
290
+ return (func + '');
291
+ } catch (e) {}
292
+ }
293
+ return '';
294
+ }
295
+
296
+ /**
297
+ * Used to match `RegExp`
298
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
299
+ */
300
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
301
+
302
+ /** Used to detect host constructors (Safari). */
303
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
304
+
305
+ /** Used for built-in method references. */
306
+ var funcProto = Function.prototype,
307
+ objectProto$9 = Object.prototype;
308
+
309
+ /** Used to resolve the decompiled source of functions. */
310
+ var funcToString = funcProto.toString;
311
+
312
+ /** Used to check objects for own properties. */
313
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
314
+
315
+ /** Used to detect if a method is native. */
316
+ var reIsNative = RegExp('^' +
317
+ funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
318
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
319
+ );
320
+
321
+ /**
322
+ * The base implementation of `_.isNative` without bad shim checks.
323
+ *
324
+ * @private
325
+ * @param {*} value The value to check.
326
+ * @returns {boolean} Returns `true` if `value` is a native function,
327
+ * else `false`.
328
+ */
329
+ function baseIsNative(value) {
330
+ if (!isObject(value) || isMasked(value)) {
331
+ return false;
332
+ }
333
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
334
+ return pattern.test(toSource(value));
335
+ }
336
+
337
+ /**
338
+ * Gets the value at `key` of `object`.
339
+ *
340
+ * @private
341
+ * @param {Object} [object] The object to query.
342
+ * @param {string} key The key of the property to get.
343
+ * @returns {*} Returns the property value.
344
+ */
345
+ function getValue(object, key) {
346
+ return object == null ? undefined : object[key];
347
+ }
348
+
349
+ /**
350
+ * Gets the native function at `key` of `object`.
351
+ *
352
+ * @private
353
+ * @param {Object} object The object to query.
354
+ * @param {string} key The key of the method to get.
355
+ * @returns {*} Returns the function if it's native, else `undefined`.
356
+ */
357
+ function getNative(object, key) {
358
+ var value = getValue(object, key);
359
+ return baseIsNative(value) ? value : undefined;
360
+ }
361
+
362
+ /* Built-in method references that are verified to be native. */
363
+ var WeakMap = getNative(root, 'WeakMap');
364
+
365
+ /** Built-in value references. */
366
+ var objectCreate = Object.create;
367
+
368
+ /**
369
+ * The base implementation of `_.create` without support for assigning
370
+ * properties to the created object.
371
+ *
372
+ * @private
373
+ * @param {Object} proto The object to inherit from.
374
+ * @returns {Object} Returns the new object.
375
+ */
376
+ var baseCreate = (function() {
377
+ function object() {}
378
+ return function(proto) {
379
+ if (!isObject(proto)) {
380
+ return {};
381
+ }
382
+ if (objectCreate) {
383
+ return objectCreate(proto);
384
+ }
385
+ object.prototype = proto;
386
+ var result = new object;
387
+ object.prototype = undefined;
388
+ return result;
389
+ };
390
+ }());
391
+
392
+ var defineProperty = (function() {
393
+ try {
394
+ var func = getNative(Object, 'defineProperty');
395
+ func({}, '', {});
396
+ return func;
397
+ } catch (e) {}
398
+ }());
399
+
400
+ /**
401
+ * A specialized version of `_.forEach` for arrays without support for
402
+ * iteratee shorthands.
403
+ *
404
+ * @private
405
+ * @param {Array} [array] The array to iterate over.
406
+ * @param {Function} iteratee The function invoked per iteration.
407
+ * @returns {Array} Returns `array`.
408
+ */
409
+ function arrayEach(array, iteratee) {
410
+ var index = -1,
411
+ length = array == null ? 0 : array.length;
412
+
413
+ while (++index < length) {
414
+ if (iteratee(array[index], index, array) === false) {
415
+ break;
416
+ }
417
+ }
418
+ return array;
419
+ }
420
+
421
+ /** Used as references for various `Number` constants. */
422
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
423
+
424
+ /** Used to detect unsigned integer values. */
425
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
426
+
427
+ /**
428
+ * Checks if `value` is a valid array-like index.
429
+ *
430
+ * @private
431
+ * @param {*} value The value to check.
432
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
433
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
434
+ */
435
+ function isIndex(value, length) {
436
+ var type = typeof value;
437
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
438
+
439
+ return !!length &&
440
+ (type == 'number' ||
441
+ (type != 'symbol' && reIsUint.test(value))) &&
442
+ (value > -1 && value % 1 == 0 && value < length);
443
+ }
444
+
445
+ /**
446
+ * The base implementation of `assignValue` and `assignMergeValue` without
447
+ * value checks.
448
+ *
449
+ * @private
450
+ * @param {Object} object The object to modify.
451
+ * @param {string} key The key of the property to assign.
452
+ * @param {*} value The value to assign.
453
+ */
454
+ function baseAssignValue(object, key, value) {
455
+ if (key == '__proto__' && defineProperty) {
456
+ defineProperty(object, key, {
457
+ 'configurable': true,
458
+ 'enumerable': true,
459
+ 'value': value,
460
+ 'writable': true
461
+ });
462
+ } else {
463
+ object[key] = value;
464
+ }
465
+ }
466
+
467
+ /**
468
+ * Performs a
469
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
470
+ * comparison between two values to determine if they are equivalent.
471
+ *
472
+ * @static
473
+ * @memberOf _
474
+ * @since 4.0.0
475
+ * @category Lang
476
+ * @param {*} value The value to compare.
477
+ * @param {*} other The other value to compare.
478
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
479
+ * @example
480
+ *
481
+ * var object = { 'a': 1 };
482
+ * var other = { 'a': 1 };
483
+ *
484
+ * _.eq(object, object);
485
+ * // => true
486
+ *
487
+ * _.eq(object, other);
488
+ * // => false
489
+ *
490
+ * _.eq('a', 'a');
491
+ * // => true
492
+ *
493
+ * _.eq('a', Object('a'));
494
+ * // => false
495
+ *
496
+ * _.eq(NaN, NaN);
497
+ * // => true
498
+ */
499
+ function eq(value, other) {
500
+ return value === other || (value !== value && other !== other);
501
+ }
502
+
503
+ /** Used for built-in method references. */
504
+ var objectProto$8 = Object.prototype;
505
+
506
+ /** Used to check objects for own properties. */
507
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
508
+
509
+ /**
510
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
511
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
512
+ * for equality comparisons.
513
+ *
514
+ * @private
515
+ * @param {Object} object The object to modify.
516
+ * @param {string} key The key of the property to assign.
517
+ * @param {*} value The value to assign.
518
+ */
519
+ function assignValue(object, key, value) {
520
+ var objValue = object[key];
521
+ if (!(hasOwnProperty$6.call(object, key) && eq(objValue, value)) ||
522
+ (value === undefined && !(key in object))) {
523
+ baseAssignValue(object, key, value);
524
+ }
525
+ }
526
+
527
+ /** Used as references for various `Number` constants. */
528
+ var MAX_SAFE_INTEGER = 9007199254740991;
529
+
530
+ /**
531
+ * Checks if `value` is a valid array-like length.
532
+ *
533
+ * **Note:** This method is loosely based on
534
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
535
+ *
536
+ * @static
537
+ * @memberOf _
538
+ * @since 4.0.0
539
+ * @category Lang
540
+ * @param {*} value The value to check.
541
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
542
+ * @example
543
+ *
544
+ * _.isLength(3);
545
+ * // => true
546
+ *
547
+ * _.isLength(Number.MIN_VALUE);
548
+ * // => false
549
+ *
550
+ * _.isLength(Infinity);
551
+ * // => false
552
+ *
553
+ * _.isLength('3');
554
+ * // => false
555
+ */
556
+ function isLength(value) {
557
+ return typeof value == 'number' &&
558
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
559
+ }
560
+
561
+ /**
562
+ * Checks if `value` is array-like. A value is considered array-like if it's
563
+ * not a function and has a `value.length` that's an integer greater than or
564
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
565
+ *
566
+ * @static
567
+ * @memberOf _
568
+ * @since 4.0.0
569
+ * @category Lang
570
+ * @param {*} value The value to check.
571
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
572
+ * @example
573
+ *
574
+ * _.isArrayLike([1, 2, 3]);
575
+ * // => true
576
+ *
577
+ * _.isArrayLike(document.body.children);
578
+ * // => true
579
+ *
580
+ * _.isArrayLike('abc');
581
+ * // => true
582
+ *
583
+ * _.isArrayLike(_.noop);
584
+ * // => false
585
+ */
586
+ function isArrayLike(value) {
587
+ return value != null && isLength(value.length) && !isFunction(value);
588
+ }
589
+
590
+ /** Used for built-in method references. */
591
+ var objectProto$7 = Object.prototype;
592
+
593
+ /**
594
+ * Checks if `value` is likely a prototype object.
595
+ *
596
+ * @private
597
+ * @param {*} value The value to check.
598
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
599
+ */
600
+ function isPrototype(value) {
601
+ var Ctor = value && value.constructor,
602
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$7;
603
+
604
+ return value === proto;
605
+ }
606
+
607
+ /**
608
+ * The base implementation of `_.times` without support for iteratee shorthands
609
+ * or max array length checks.
610
+ *
611
+ * @private
612
+ * @param {number} n The number of times to invoke `iteratee`.
613
+ * @param {Function} iteratee The function invoked per iteration.
614
+ * @returns {Array} Returns the array of results.
615
+ */
616
+ function baseTimes(n, iteratee) {
617
+ var index = -1,
618
+ result = Array(n);
619
+
620
+ while (++index < n) {
621
+ result[index] = iteratee(index);
622
+ }
623
+ return result;
624
+ }
625
+
626
+ /** `Object#toString` result references. */
627
+ var argsTag$2 = '[object Arguments]';
628
+
629
+ /**
630
+ * The base implementation of `_.isArguments`.
631
+ *
632
+ * @private
633
+ * @param {*} value The value to check.
634
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
635
+ */
636
+ function baseIsArguments(value) {
637
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
638
+ }
639
+
640
+ /** Used for built-in method references. */
641
+ var objectProto$6 = Object.prototype;
642
+
643
+ /** Used to check objects for own properties. */
644
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
645
+
646
+ /** Built-in value references. */
647
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
648
+
649
+ /**
650
+ * Checks if `value` is likely an `arguments` object.
651
+ *
652
+ * @static
653
+ * @memberOf _
654
+ * @since 0.1.0
655
+ * @category Lang
656
+ * @param {*} value The value to check.
657
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
658
+ * else `false`.
659
+ * @example
660
+ *
661
+ * _.isArguments(function() { return arguments; }());
662
+ * // => true
663
+ *
664
+ * _.isArguments([1, 2, 3]);
665
+ * // => false
666
+ */
667
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
668
+ return isObjectLike(value) && hasOwnProperty$5.call(value, 'callee') &&
669
+ !propertyIsEnumerable$1.call(value, 'callee');
670
+ };
671
+
672
+ /**
673
+ * This method returns `false`.
674
+ *
675
+ * @static
676
+ * @memberOf _
677
+ * @since 4.13.0
678
+ * @category Util
679
+ * @returns {boolean} Returns `false`.
680
+ * @example
681
+ *
682
+ * _.times(2, _.stubFalse);
683
+ * // => [false, false]
684
+ */
685
+ function stubFalse() {
686
+ return false;
687
+ }
688
+
689
+ /** Detect free variable `exports`. */
690
+ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
691
+
692
+ /** Detect free variable `module`. */
693
+ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
694
+
695
+ /** Detect the popular CommonJS extension `module.exports`. */
696
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
697
+
698
+ /** Built-in value references. */
699
+ var Buffer$1 = moduleExports$2 ? root.Buffer : undefined;
700
+
701
+ /* Built-in method references for those with the same name as other `lodash` methods. */
702
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
703
+
704
+ /**
705
+ * Checks if `value` is a buffer.
706
+ *
707
+ * @static
708
+ * @memberOf _
709
+ * @since 4.3.0
710
+ * @category Lang
711
+ * @param {*} value The value to check.
712
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
713
+ * @example
714
+ *
715
+ * _.isBuffer(new Buffer(2));
716
+ * // => true
717
+ *
718
+ * _.isBuffer(new Uint8Array(2));
719
+ * // => false
720
+ */
721
+ var isBuffer = nativeIsBuffer || stubFalse;
722
+
723
+ /** `Object#toString` result references. */
724
+ var argsTag$1 = '[object Arguments]',
725
+ arrayTag$1 = '[object Array]',
726
+ boolTag$2 = '[object Boolean]',
727
+ dateTag$2 = '[object Date]',
728
+ errorTag$1 = '[object Error]',
729
+ funcTag$1 = '[object Function]',
730
+ mapTag$4 = '[object Map]',
731
+ numberTag$2 = '[object Number]',
732
+ objectTag$2 = '[object Object]',
733
+ regexpTag$2 = '[object RegExp]',
734
+ setTag$4 = '[object Set]',
735
+ stringTag$2 = '[object String]',
736
+ weakMapTag$2 = '[object WeakMap]';
737
+
738
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
739
+ dataViewTag$3 = '[object DataView]',
740
+ float32Tag$2 = '[object Float32Array]',
741
+ float64Tag$2 = '[object Float64Array]',
742
+ int8Tag$2 = '[object Int8Array]',
743
+ int16Tag$2 = '[object Int16Array]',
744
+ int32Tag$2 = '[object Int32Array]',
745
+ uint8Tag$2 = '[object Uint8Array]',
746
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
747
+ uint16Tag$2 = '[object Uint16Array]',
748
+ uint32Tag$2 = '[object Uint32Array]';
749
+
750
+ /** Used to identify `toStringTag` values of typed arrays. */
751
+ var typedArrayTags = {};
752
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
753
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
754
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
755
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
756
+ typedArrayTags[uint32Tag$2] = true;
757
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
758
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
759
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
760
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
761
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
762
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
763
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
764
+ typedArrayTags[weakMapTag$2] = false;
765
+
766
+ /**
767
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
768
+ *
769
+ * @private
770
+ * @param {*} value The value to check.
771
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
772
+ */
773
+ function baseIsTypedArray(value) {
774
+ return isObjectLike(value) &&
775
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
776
+ }
777
+
778
+ /**
779
+ * The base implementation of `_.unary` without support for storing metadata.
780
+ *
781
+ * @private
782
+ * @param {Function} func The function to cap arguments for.
783
+ * @returns {Function} Returns the new capped function.
784
+ */
785
+ function baseUnary(func) {
786
+ return function(value) {
787
+ return func(value);
788
+ };
789
+ }
790
+
791
+ /** Detect free variable `exports`. */
792
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
793
+
794
+ /** Detect free variable `module`. */
795
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
796
+
797
+ /** Detect the popular CommonJS extension `module.exports`. */
798
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
799
+
800
+ /** Detect free variable `process` from Node.js. */
801
+ var freeProcess = moduleExports$1 && freeGlobal.process;
802
+
803
+ /** Used to access faster Node.js helpers. */
804
+ var nodeUtil = (function() {
805
+ try {
806
+ // Use `util.types` for Node.js 10+.
807
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
808
+
809
+ if (types) {
810
+ return types;
811
+ }
812
+
813
+ // Legacy `process.binding('util')` for Node.js < 10.
814
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
815
+ } catch (e) {}
816
+ }());
817
+
818
+ /* Node.js helper references. */
819
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
820
+
821
+ /**
822
+ * Checks if `value` is classified as a typed array.
823
+ *
824
+ * @static
825
+ * @memberOf _
826
+ * @since 3.0.0
827
+ * @category Lang
828
+ * @param {*} value The value to check.
829
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
830
+ * @example
831
+ *
832
+ * _.isTypedArray(new Uint8Array);
833
+ * // => true
834
+ *
835
+ * _.isTypedArray([]);
836
+ * // => false
837
+ */
838
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
839
+
840
+ /** Used for built-in method references. */
841
+ var objectProto$5 = Object.prototype;
842
+
843
+ /** Used to check objects for own properties. */
844
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
845
+
846
+ /**
847
+ * Creates an array of the enumerable property names of the array-like `value`.
848
+ *
849
+ * @private
850
+ * @param {*} value The value to query.
851
+ * @param {boolean} inherited Specify returning inherited property names.
852
+ * @returns {Array} Returns the array of property names.
853
+ */
854
+ function arrayLikeKeys(value, inherited) {
855
+ var isArr = isArray(value),
856
+ isArg = !isArr && isArguments(value),
857
+ isBuff = !isArr && !isArg && isBuffer(value),
858
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
859
+ skipIndexes = isArr || isArg || isBuff || isType,
860
+ result = skipIndexes ? baseTimes(value.length, String) : [],
861
+ length = result.length;
862
+
863
+ for (var key in value) {
864
+ if ((hasOwnProperty$4.call(value, key)) &&
865
+ !(skipIndexes && (
866
+ // Safari 9 has enumerable `arguments.length` in strict mode.
867
+ key == 'length' ||
868
+ // Node.js 0.10 has enumerable non-index properties on buffers.
869
+ (isBuff && (key == 'offset' || key == 'parent')) ||
870
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
871
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
872
+ // Skip index properties.
873
+ isIndex(key, length)
874
+ ))) {
875
+ result.push(key);
876
+ }
877
+ }
878
+ return result;
879
+ }
880
+
881
+ /**
882
+ * Creates a unary function that invokes `func` with its argument transformed.
883
+ *
884
+ * @private
885
+ * @param {Function} func The function to wrap.
886
+ * @param {Function} transform The argument transform.
887
+ * @returns {Function} Returns the new function.
888
+ */
889
+ function overArg(func, transform) {
890
+ return function(arg) {
891
+ return func(transform(arg));
892
+ };
893
+ }
894
+
895
+ /* Built-in method references for those with the same name as other `lodash` methods. */
896
+ var nativeKeys = overArg(Object.keys, Object);
897
+
898
+ /** Used for built-in method references. */
899
+ var objectProto$4 = Object.prototype;
900
+
901
+ /** Used to check objects for own properties. */
902
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
903
+
904
+ /**
905
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
906
+ *
907
+ * @private
908
+ * @param {Object} object The object to query.
909
+ * @returns {Array} Returns the array of property names.
910
+ */
911
+ function baseKeys(object) {
912
+ if (!isPrototype(object)) {
913
+ return nativeKeys(object);
914
+ }
915
+ var result = [];
916
+ for (var key in Object(object)) {
917
+ if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
918
+ result.push(key);
919
+ }
920
+ }
921
+ return result;
922
+ }
923
+
924
+ /**
925
+ * Creates an array of the own enumerable property names of `object`.
926
+ *
927
+ * **Note:** Non-object values are coerced to objects. See the
928
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
929
+ * for more details.
930
+ *
931
+ * @static
932
+ * @since 0.1.0
933
+ * @memberOf _
934
+ * @category Object
935
+ * @param {Object} object The object to query.
936
+ * @returns {Array} Returns the array of property names.
937
+ * @example
938
+ *
939
+ * function Foo() {
940
+ * this.a = 1;
941
+ * this.b = 2;
942
+ * }
943
+ *
944
+ * Foo.prototype.c = 3;
945
+ *
946
+ * _.keys(new Foo);
947
+ * // => ['a', 'b'] (iteration order is not guaranteed)
948
+ *
949
+ * _.keys('hi');
950
+ * // => ['0', '1']
951
+ */
952
+ function keys(object) {
953
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
954
+ }
955
+
956
+ /* Built-in method references that are verified to be native. */
957
+ var nativeCreate = getNative(Object, 'create');
958
+
959
+ /**
960
+ * Removes all key-value entries from the hash.
961
+ *
962
+ * @private
963
+ * @name clear
964
+ * @memberOf Hash
965
+ */
966
+ function hashClear() {
967
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
968
+ this.size = 0;
969
+ }
970
+
971
+ /**
972
+ * Removes `key` and its value from the hash.
973
+ *
974
+ * @private
975
+ * @name delete
976
+ * @memberOf Hash
977
+ * @param {Object} hash The hash to modify.
978
+ * @param {string} key The key of the value to remove.
979
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
980
+ */
981
+ function hashDelete(key) {
982
+ var result = this.has(key) && delete this.__data__[key];
983
+ this.size -= result ? 1 : 0;
984
+ return result;
985
+ }
986
+
987
+ /** Used to stand-in for `undefined` hash values. */
988
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
989
+
990
+ /** Used for built-in method references. */
991
+ var objectProto$3 = Object.prototype;
992
+
993
+ /** Used to check objects for own properties. */
994
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
995
+
996
+ /**
997
+ * Gets the hash value for `key`.
998
+ *
999
+ * @private
1000
+ * @name get
1001
+ * @memberOf Hash
1002
+ * @param {string} key The key of the value to get.
1003
+ * @returns {*} Returns the entry value.
1004
+ */
1005
+ function hashGet(key) {
1006
+ var data = this.__data__;
1007
+ if (nativeCreate) {
1008
+ var result = data[key];
1009
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1010
+ }
1011
+ return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
1012
+ }
1013
+
1014
+ /** Used for built-in method references. */
1015
+ var objectProto$2 = Object.prototype;
1016
+
1017
+ /** Used to check objects for own properties. */
1018
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
1019
+
1020
+ /**
1021
+ * Checks if a hash value for `key` exists.
1022
+ *
1023
+ * @private
1024
+ * @name has
1025
+ * @memberOf Hash
1026
+ * @param {string} key The key of the entry to check.
1027
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1028
+ */
1029
+ function hashHas(key) {
1030
+ var data = this.__data__;
1031
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
1032
+ }
1033
+
1034
+ /** Used to stand-in for `undefined` hash values. */
1035
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1036
+
1037
+ /**
1038
+ * Sets the hash `key` to `value`.
1039
+ *
1040
+ * @private
1041
+ * @name set
1042
+ * @memberOf Hash
1043
+ * @param {string} key The key of the value to set.
1044
+ * @param {*} value The value to set.
1045
+ * @returns {Object} Returns the hash instance.
1046
+ */
1047
+ function hashSet(key, value) {
1048
+ var data = this.__data__;
1049
+ this.size += this.has(key) ? 0 : 1;
1050
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1051
+ return this;
1052
+ }
1053
+
1054
+ /**
1055
+ * Creates a hash object.
1056
+ *
1057
+ * @private
1058
+ * @constructor
1059
+ * @param {Array} [entries] The key-value pairs to cache.
1060
+ */
1061
+ function Hash(entries) {
1062
+ var index = -1,
1063
+ length = entries == null ? 0 : entries.length;
1064
+
1065
+ this.clear();
1066
+ while (++index < length) {
1067
+ var entry = entries[index];
1068
+ this.set(entry[0], entry[1]);
1069
+ }
1070
+ }
1071
+
1072
+ // Add methods to `Hash`.
1073
+ Hash.prototype.clear = hashClear;
1074
+ Hash.prototype['delete'] = hashDelete;
1075
+ Hash.prototype.get = hashGet;
1076
+ Hash.prototype.has = hashHas;
1077
+ Hash.prototype.set = hashSet;
1078
+
1079
+ /**
1080
+ * Removes all key-value entries from the list cache.
1081
+ *
1082
+ * @private
1083
+ * @name clear
1084
+ * @memberOf ListCache
1085
+ */
1086
+ function listCacheClear() {
1087
+ this.__data__ = [];
1088
+ this.size = 0;
1089
+ }
1090
+
1091
+ /**
1092
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1093
+ *
1094
+ * @private
1095
+ * @param {Array} array The array to inspect.
1096
+ * @param {*} key The key to search for.
1097
+ * @returns {number} Returns the index of the matched value, else `-1`.
1098
+ */
1099
+ function assocIndexOf(array, key) {
1100
+ var length = array.length;
1101
+ while (length--) {
1102
+ if (eq(array[length][0], key)) {
1103
+ return length;
1104
+ }
1105
+ }
1106
+ return -1;
1107
+ }
1108
+
1109
+ /** Used for built-in method references. */
1110
+ var arrayProto = Array.prototype;
1111
+
1112
+ /** Built-in value references. */
1113
+ var splice = arrayProto.splice;
1114
+
1115
+ /**
1116
+ * Removes `key` and its value from the list cache.
1117
+ *
1118
+ * @private
1119
+ * @name delete
1120
+ * @memberOf ListCache
1121
+ * @param {string} key The key of the value to remove.
1122
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1123
+ */
1124
+ function listCacheDelete(key) {
1125
+ var data = this.__data__,
1126
+ index = assocIndexOf(data, key);
1127
+
1128
+ if (index < 0) {
1129
+ return false;
1130
+ }
1131
+ var lastIndex = data.length - 1;
1132
+ if (index == lastIndex) {
1133
+ data.pop();
1134
+ } else {
1135
+ splice.call(data, index, 1);
1136
+ }
1137
+ --this.size;
1138
+ return true;
1139
+ }
1140
+
1141
+ /**
1142
+ * Gets the list cache value for `key`.
1143
+ *
1144
+ * @private
1145
+ * @name get
1146
+ * @memberOf ListCache
1147
+ * @param {string} key The key of the value to get.
1148
+ * @returns {*} Returns the entry value.
1149
+ */
1150
+ function listCacheGet(key) {
1151
+ var data = this.__data__,
1152
+ index = assocIndexOf(data, key);
1153
+
1154
+ return index < 0 ? undefined : data[index][1];
1155
+ }
1156
+
1157
+ /**
1158
+ * Checks if a list cache value for `key` exists.
1159
+ *
1160
+ * @private
1161
+ * @name has
1162
+ * @memberOf ListCache
1163
+ * @param {string} key The key of the entry to check.
1164
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1165
+ */
1166
+ function listCacheHas(key) {
1167
+ return assocIndexOf(this.__data__, key) > -1;
1168
+ }
1169
+
1170
+ /**
1171
+ * Sets the list cache `key` to `value`.
1172
+ *
1173
+ * @private
1174
+ * @name set
1175
+ * @memberOf ListCache
1176
+ * @param {string} key The key of the value to set.
1177
+ * @param {*} value The value to set.
1178
+ * @returns {Object} Returns the list cache instance.
1179
+ */
1180
+ function listCacheSet(key, value) {
1181
+ var data = this.__data__,
1182
+ index = assocIndexOf(data, key);
1183
+
1184
+ if (index < 0) {
1185
+ ++this.size;
1186
+ data.push([key, value]);
1187
+ } else {
1188
+ data[index][1] = value;
1189
+ }
1190
+ return this;
1191
+ }
1192
+
1193
+ /**
1194
+ * Creates an list cache object.
1195
+ *
1196
+ * @private
1197
+ * @constructor
1198
+ * @param {Array} [entries] The key-value pairs to cache.
1199
+ */
1200
+ function ListCache(entries) {
1201
+ var index = -1,
1202
+ length = entries == null ? 0 : entries.length;
1203
+
1204
+ this.clear();
1205
+ while (++index < length) {
1206
+ var entry = entries[index];
1207
+ this.set(entry[0], entry[1]);
1208
+ }
1209
+ }
1210
+
1211
+ // Add methods to `ListCache`.
1212
+ ListCache.prototype.clear = listCacheClear;
1213
+ ListCache.prototype['delete'] = listCacheDelete;
1214
+ ListCache.prototype.get = listCacheGet;
1215
+ ListCache.prototype.has = listCacheHas;
1216
+ ListCache.prototype.set = listCacheSet;
1217
+
1218
+ /* Built-in method references that are verified to be native. */
1219
+ var Map = getNative(root, 'Map');
1220
+
1221
+ /**
1222
+ * Removes all key-value entries from the map.
1223
+ *
1224
+ * @private
1225
+ * @name clear
1226
+ * @memberOf MapCache
1227
+ */
1228
+ function mapCacheClear() {
1229
+ this.size = 0;
1230
+ this.__data__ = {
1231
+ 'hash': new Hash,
1232
+ 'map': new (Map || ListCache),
1233
+ 'string': new Hash
1234
+ };
1235
+ }
1236
+
1237
+ /**
1238
+ * Checks if `value` is suitable for use as unique object key.
1239
+ *
1240
+ * @private
1241
+ * @param {*} value The value to check.
1242
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1243
+ */
1244
+ function isKeyable(value) {
1245
+ var type = typeof value;
1246
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1247
+ ? (value !== '__proto__')
1248
+ : (value === null);
1249
+ }
1250
+
1251
+ /**
1252
+ * Gets the data for `map`.
1253
+ *
1254
+ * @private
1255
+ * @param {Object} map The map to query.
1256
+ * @param {string} key The reference key.
1257
+ * @returns {*} Returns the map data.
1258
+ */
1259
+ function getMapData(map, key) {
1260
+ var data = map.__data__;
1261
+ return isKeyable(key)
1262
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1263
+ : data.map;
1264
+ }
1265
+
1266
+ /**
1267
+ * Removes `key` and its value from the map.
1268
+ *
1269
+ * @private
1270
+ * @name delete
1271
+ * @memberOf MapCache
1272
+ * @param {string} key The key of the value to remove.
1273
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1274
+ */
1275
+ function mapCacheDelete(key) {
1276
+ var result = getMapData(this, key)['delete'](key);
1277
+ this.size -= result ? 1 : 0;
1278
+ return result;
1279
+ }
1280
+
1281
+ /**
1282
+ * Gets the map value for `key`.
1283
+ *
1284
+ * @private
1285
+ * @name get
1286
+ * @memberOf MapCache
1287
+ * @param {string} key The key of the value to get.
1288
+ * @returns {*} Returns the entry value.
1289
+ */
1290
+ function mapCacheGet(key) {
1291
+ return getMapData(this, key).get(key);
1292
+ }
1293
+
1294
+ /**
1295
+ * Checks if a map value for `key` exists.
1296
+ *
1297
+ * @private
1298
+ * @name has
1299
+ * @memberOf MapCache
1300
+ * @param {string} key The key of the entry to check.
1301
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1302
+ */
1303
+ function mapCacheHas(key) {
1304
+ return getMapData(this, key).has(key);
1305
+ }
1306
+
1307
+ /**
1308
+ * Sets the map `key` to `value`.
1309
+ *
1310
+ * @private
1311
+ * @name set
1312
+ * @memberOf MapCache
1313
+ * @param {string} key The key of the value to set.
1314
+ * @param {*} value The value to set.
1315
+ * @returns {Object} Returns the map cache instance.
1316
+ */
1317
+ function mapCacheSet(key, value) {
1318
+ var data = getMapData(this, key),
1319
+ size = data.size;
1320
+
1321
+ data.set(key, value);
1322
+ this.size += data.size == size ? 0 : 1;
1323
+ return this;
1324
+ }
1325
+
1326
+ /**
1327
+ * Creates a map cache object to store key-value pairs.
1328
+ *
1329
+ * @private
1330
+ * @constructor
1331
+ * @param {Array} [entries] The key-value pairs to cache.
1332
+ */
1333
+ function MapCache(entries) {
1334
+ var index = -1,
1335
+ length = entries == null ? 0 : entries.length;
1336
+
1337
+ this.clear();
1338
+ while (++index < length) {
1339
+ var entry = entries[index];
1340
+ this.set(entry[0], entry[1]);
1341
+ }
1342
+ }
1343
+
1344
+ // Add methods to `MapCache`.
1345
+ MapCache.prototype.clear = mapCacheClear;
1346
+ MapCache.prototype['delete'] = mapCacheDelete;
1347
+ MapCache.prototype.get = mapCacheGet;
1348
+ MapCache.prototype.has = mapCacheHas;
1349
+ MapCache.prototype.set = mapCacheSet;
1350
+
1351
+ /**
1352
+ * Appends the elements of `values` to `array`.
1353
+ *
1354
+ * @private
1355
+ * @param {Array} array The array to modify.
1356
+ * @param {Array} values The values to append.
1357
+ * @returns {Array} Returns `array`.
1358
+ */
1359
+ function arrayPush(array, values) {
1360
+ var index = -1,
1361
+ length = values.length,
1362
+ offset = array.length;
1363
+
1364
+ while (++index < length) {
1365
+ array[offset + index] = values[index];
1366
+ }
1367
+ return array;
1368
+ }
1369
+
1370
+ /** Built-in value references. */
1371
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
1372
+
1373
+ /**
1374
+ * Removes all key-value entries from the stack.
1375
+ *
1376
+ * @private
1377
+ * @name clear
1378
+ * @memberOf Stack
1379
+ */
1380
+ function stackClear() {
1381
+ this.__data__ = new ListCache;
1382
+ this.size = 0;
1383
+ }
1384
+
1385
+ /**
1386
+ * Removes `key` and its value from the stack.
1387
+ *
1388
+ * @private
1389
+ * @name delete
1390
+ * @memberOf Stack
1391
+ * @param {string} key The key of the value to remove.
1392
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1393
+ */
1394
+ function stackDelete(key) {
1395
+ var data = this.__data__,
1396
+ result = data['delete'](key);
1397
+
1398
+ this.size = data.size;
1399
+ return result;
1400
+ }
1401
+
1402
+ /**
1403
+ * Gets the stack value for `key`.
1404
+ *
1405
+ * @private
1406
+ * @name get
1407
+ * @memberOf Stack
1408
+ * @param {string} key The key of the value to get.
1409
+ * @returns {*} Returns the entry value.
1410
+ */
1411
+ function stackGet(key) {
1412
+ return this.__data__.get(key);
1413
+ }
1414
+
1415
+ /**
1416
+ * Checks if a stack value for `key` exists.
1417
+ *
1418
+ * @private
1419
+ * @name has
1420
+ * @memberOf Stack
1421
+ * @param {string} key The key of the entry to check.
1422
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1423
+ */
1424
+ function stackHas(key) {
1425
+ return this.__data__.has(key);
1426
+ }
1427
+
1428
+ /** Used as the size to enable large array optimizations. */
1429
+ var LARGE_ARRAY_SIZE = 200;
1430
+
1431
+ /**
1432
+ * Sets the stack `key` to `value`.
1433
+ *
1434
+ * @private
1435
+ * @name set
1436
+ * @memberOf Stack
1437
+ * @param {string} key The key of the value to set.
1438
+ * @param {*} value The value to set.
1439
+ * @returns {Object} Returns the stack cache instance.
1440
+ */
1441
+ function stackSet(key, value) {
1442
+ var data = this.__data__;
1443
+ if (data instanceof ListCache) {
1444
+ var pairs = data.__data__;
1445
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1446
+ pairs.push([key, value]);
1447
+ this.size = ++data.size;
1448
+ return this;
1449
+ }
1450
+ data = this.__data__ = new MapCache(pairs);
1451
+ }
1452
+ data.set(key, value);
1453
+ this.size = data.size;
1454
+ return this;
1455
+ }
1456
+
1457
+ /**
1458
+ * Creates a stack cache object to store key-value pairs.
1459
+ *
1460
+ * @private
1461
+ * @constructor
1462
+ * @param {Array} [entries] The key-value pairs to cache.
1463
+ */
1464
+ function Stack(entries) {
1465
+ var data = this.__data__ = new ListCache(entries);
1466
+ this.size = data.size;
1467
+ }
1468
+
1469
+ // Add methods to `Stack`.
1470
+ Stack.prototype.clear = stackClear;
1471
+ Stack.prototype['delete'] = stackDelete;
1472
+ Stack.prototype.get = stackGet;
1473
+ Stack.prototype.has = stackHas;
1474
+ Stack.prototype.set = stackSet;
1475
+
1476
+ /** Detect free variable `exports`. */
1477
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1478
+
1479
+ /** Detect free variable `module`. */
1480
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1481
+
1482
+ /** Detect the popular CommonJS extension `module.exports`. */
1483
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1484
+
1485
+ /** Built-in value references. */
1486
+ var Buffer = moduleExports ? root.Buffer : undefined;
1487
+ Buffer ? Buffer.allocUnsafe : undefined;
1488
+
1489
+ /**
1490
+ * Creates a clone of `buffer`.
1491
+ *
1492
+ * @private
1493
+ * @param {Buffer} buffer The buffer to clone.
1494
+ * @param {boolean} [isDeep] Specify a deep clone.
1495
+ * @returns {Buffer} Returns the cloned buffer.
1496
+ */
1497
+ function cloneBuffer(buffer, isDeep) {
1498
+ {
1499
+ return buffer.slice();
1500
+ }
1501
+ }
1502
+
1503
+ /**
1504
+ * A specialized version of `_.filter` for arrays without support for
1505
+ * iteratee shorthands.
1506
+ *
1507
+ * @private
1508
+ * @param {Array} [array] The array to iterate over.
1509
+ * @param {Function} predicate The function invoked per iteration.
1510
+ * @returns {Array} Returns the new filtered array.
1511
+ */
1512
+ function arrayFilter(array, predicate) {
1513
+ var index = -1,
1514
+ length = array == null ? 0 : array.length,
1515
+ resIndex = 0,
1516
+ result = [];
1517
+
1518
+ while (++index < length) {
1519
+ var value = array[index];
1520
+ if (predicate(value, index, array)) {
1521
+ result[resIndex++] = value;
1522
+ }
1523
+ }
1524
+ return result;
1525
+ }
1526
+
1527
+ /**
1528
+ * This method returns a new empty array.
1529
+ *
1530
+ * @static
1531
+ * @memberOf _
1532
+ * @since 4.13.0
1533
+ * @category Util
1534
+ * @returns {Array} Returns the new empty array.
1535
+ * @example
1536
+ *
1537
+ * var arrays = _.times(2, _.stubArray);
1538
+ *
1539
+ * console.log(arrays);
1540
+ * // => [[], []]
1541
+ *
1542
+ * console.log(arrays[0] === arrays[1]);
1543
+ * // => false
1544
+ */
1545
+ function stubArray() {
1546
+ return [];
1547
+ }
1548
+
1549
+ /** Used for built-in method references. */
1550
+ var objectProto$1 = Object.prototype;
1551
+
1552
+ /** Built-in value references. */
1553
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
1554
+
1555
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1556
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1557
+
1558
+ /**
1559
+ * Creates an array of the own enumerable symbols of `object`.
1560
+ *
1561
+ * @private
1562
+ * @param {Object} object The object to query.
1563
+ * @returns {Array} Returns the array of symbols.
1564
+ */
1565
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
1566
+ if (object == null) {
1567
+ return [];
1568
+ }
1569
+ object = Object(object);
1570
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
1571
+ return propertyIsEnumerable.call(object, symbol);
1572
+ });
1573
+ };
1574
+
1575
+ /**
1576
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1577
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1578
+ * symbols of `object`.
1579
+ *
1580
+ * @private
1581
+ * @param {Object} object The object to query.
1582
+ * @param {Function} keysFunc The function to get the keys of `object`.
1583
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1584
+ * @returns {Array} Returns the array of property names and symbols.
1585
+ */
1586
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1587
+ var result = keysFunc(object);
1588
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
1589
+ }
1590
+
1591
+ /**
1592
+ * Creates an array of own enumerable property names and symbols of `object`.
1593
+ *
1594
+ * @private
1595
+ * @param {Object} object The object to query.
1596
+ * @returns {Array} Returns the array of property names and symbols.
1597
+ */
1598
+ function getAllKeys(object) {
1599
+ return baseGetAllKeys(object, keys, getSymbols);
1600
+ }
1601
+
1602
+ /* Built-in method references that are verified to be native. */
1603
+ var DataView = getNative(root, 'DataView');
1604
+
1605
+ /* Built-in method references that are verified to be native. */
1606
+ var Promise$1 = getNative(root, 'Promise');
1607
+
1608
+ /* Built-in method references that are verified to be native. */
1609
+ var Set = getNative(root, 'Set');
1610
+
1611
+ /** `Object#toString` result references. */
1612
+ var mapTag$3 = '[object Map]',
1613
+ objectTag$1 = '[object Object]',
1614
+ promiseTag = '[object Promise]',
1615
+ setTag$3 = '[object Set]',
1616
+ weakMapTag$1 = '[object WeakMap]';
1617
+
1618
+ var dataViewTag$2 = '[object DataView]';
1619
+
1620
+ /** Used to detect maps, sets, and weakmaps. */
1621
+ var dataViewCtorString = toSource(DataView),
1622
+ mapCtorString = toSource(Map),
1623
+ promiseCtorString = toSource(Promise$1),
1624
+ setCtorString = toSource(Set),
1625
+ weakMapCtorString = toSource(WeakMap);
1626
+
1627
+ /**
1628
+ * Gets the `toStringTag` of `value`.
1629
+ *
1630
+ * @private
1631
+ * @param {*} value The value to query.
1632
+ * @returns {string} Returns the `toStringTag`.
1633
+ */
1634
+ var getTag = baseGetTag;
1635
+
1636
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
1637
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
1638
+ (Map && getTag(new Map) != mapTag$3) ||
1639
+ (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
1640
+ (Set && getTag(new Set) != setTag$3) ||
1641
+ (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
1642
+ getTag = function(value) {
1643
+ var result = baseGetTag(value),
1644
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
1645
+ ctorString = Ctor ? toSource(Ctor) : '';
1646
+
1647
+ if (ctorString) {
1648
+ switch (ctorString) {
1649
+ case dataViewCtorString: return dataViewTag$2;
1650
+ case mapCtorString: return mapTag$3;
1651
+ case promiseCtorString: return promiseTag;
1652
+ case setCtorString: return setTag$3;
1653
+ case weakMapCtorString: return weakMapTag$1;
1654
+ }
1655
+ }
1656
+ return result;
1657
+ };
1658
+ }
1659
+
1660
+ var getTag$1 = getTag;
1661
+
1662
+ /** Used for built-in method references. */
1663
+ var objectProto = Object.prototype;
1664
+
1665
+ /** Used to check objects for own properties. */
1666
+ var hasOwnProperty = objectProto.hasOwnProperty;
1667
+
1668
+ /**
1669
+ * Initializes an array clone.
1670
+ *
1671
+ * @private
1672
+ * @param {Array} array The array to clone.
1673
+ * @returns {Array} Returns the initialized clone.
1674
+ */
1675
+ function initCloneArray(array) {
1676
+ var length = array.length,
1677
+ result = new array.constructor(length);
1678
+
1679
+ // Add properties assigned by `RegExp#exec`.
1680
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
1681
+ result.index = array.index;
1682
+ result.input = array.input;
1683
+ }
1684
+ return result;
1685
+ }
1686
+
1687
+ /** Built-in value references. */
1688
+ var Uint8Array = root.Uint8Array;
1689
+
1690
+ /**
1691
+ * Creates a clone of `arrayBuffer`.
1692
+ *
1693
+ * @private
1694
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
1695
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
1696
+ */
1697
+ function cloneArrayBuffer(arrayBuffer) {
1698
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1699
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
1700
+ return result;
1701
+ }
1702
+
1703
+ /**
1704
+ * Creates a clone of `dataView`.
1705
+ *
1706
+ * @private
1707
+ * @param {Object} dataView The data view to clone.
1708
+ * @param {boolean} [isDeep] Specify a deep clone.
1709
+ * @returns {Object} Returns the cloned data view.
1710
+ */
1711
+ function cloneDataView(dataView, isDeep) {
1712
+ var buffer = cloneArrayBuffer(dataView.buffer) ;
1713
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
1714
+ }
1715
+
1716
+ /** Used to match `RegExp` flags from their coerced string values. */
1717
+ var reFlags = /\w*$/;
1718
+
1719
+ /**
1720
+ * Creates a clone of `regexp`.
1721
+ *
1722
+ * @private
1723
+ * @param {Object} regexp The regexp to clone.
1724
+ * @returns {Object} Returns the cloned regexp.
1725
+ */
1726
+ function cloneRegExp(regexp) {
1727
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
1728
+ result.lastIndex = regexp.lastIndex;
1729
+ return result;
1730
+ }
1731
+
1732
+ /** Used to convert symbols to primitives and strings. */
1733
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
1734
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
1735
+
1736
+ /**
1737
+ * Creates a clone of the `symbol` object.
1738
+ *
1739
+ * @private
1740
+ * @param {Object} symbol The symbol object to clone.
1741
+ * @returns {Object} Returns the cloned symbol object.
1742
+ */
1743
+ function cloneSymbol(symbol) {
1744
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
1745
+ }
1746
+
1747
+ /**
1748
+ * Creates a clone of `typedArray`.
1749
+ *
1750
+ * @private
1751
+ * @param {Object} typedArray The typed array to clone.
1752
+ * @param {boolean} [isDeep] Specify a deep clone.
1753
+ * @returns {Object} Returns the cloned typed array.
1754
+ */
1755
+ function cloneTypedArray(typedArray, isDeep) {
1756
+ var buffer = cloneArrayBuffer(typedArray.buffer) ;
1757
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1758
+ }
1759
+
1760
+ /** `Object#toString` result references. */
1761
+ var boolTag$1 = '[object Boolean]',
1762
+ dateTag$1 = '[object Date]',
1763
+ mapTag$2 = '[object Map]',
1764
+ numberTag$1 = '[object Number]',
1765
+ regexpTag$1 = '[object RegExp]',
1766
+ setTag$2 = '[object Set]',
1767
+ stringTag$1 = '[object String]',
1768
+ symbolTag$1 = '[object Symbol]';
1769
+
1770
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1771
+ dataViewTag$1 = '[object DataView]',
1772
+ float32Tag$1 = '[object Float32Array]',
1773
+ float64Tag$1 = '[object Float64Array]',
1774
+ int8Tag$1 = '[object Int8Array]',
1775
+ int16Tag$1 = '[object Int16Array]',
1776
+ int32Tag$1 = '[object Int32Array]',
1777
+ uint8Tag$1 = '[object Uint8Array]',
1778
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
1779
+ uint16Tag$1 = '[object Uint16Array]',
1780
+ uint32Tag$1 = '[object Uint32Array]';
1781
+
1782
+ /**
1783
+ * Initializes an object clone based on its `toStringTag`.
1784
+ *
1785
+ * **Note:** This function only supports cloning values with tags of
1786
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
1787
+ *
1788
+ * @private
1789
+ * @param {Object} object The object to clone.
1790
+ * @param {string} tag The `toStringTag` of the object to clone.
1791
+ * @param {boolean} [isDeep] Specify a deep clone.
1792
+ * @returns {Object} Returns the initialized clone.
1793
+ */
1794
+ function initCloneByTag(object, tag, isDeep) {
1795
+ var Ctor = object.constructor;
1796
+ switch (tag) {
1797
+ case arrayBufferTag$1:
1798
+ return cloneArrayBuffer(object);
1799
+
1800
+ case boolTag$1:
1801
+ case dateTag$1:
1802
+ return new Ctor(+object);
1803
+
1804
+ case dataViewTag$1:
1805
+ return cloneDataView(object);
1806
+
1807
+ case float32Tag$1: case float64Tag$1:
1808
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
1809
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
1810
+ return cloneTypedArray(object);
1811
+
1812
+ case mapTag$2:
1813
+ return new Ctor;
1814
+
1815
+ case numberTag$1:
1816
+ case stringTag$1:
1817
+ return new Ctor(object);
1818
+
1819
+ case regexpTag$1:
1820
+ return cloneRegExp(object);
1821
+
1822
+ case setTag$2:
1823
+ return new Ctor;
1824
+
1825
+ case symbolTag$1:
1826
+ return cloneSymbol(object);
1827
+ }
1828
+ }
1829
+
1830
+ /**
1831
+ * Initializes an object clone.
1832
+ *
1833
+ * @private
1834
+ * @param {Object} object The object to clone.
1835
+ * @returns {Object} Returns the initialized clone.
1836
+ */
1837
+ function initCloneObject(object) {
1838
+ return (typeof object.constructor == 'function' && !isPrototype(object))
1839
+ ? baseCreate(getPrototype(object))
1840
+ : {};
1841
+ }
1842
+
1843
+ /** `Object#toString` result references. */
1844
+ var mapTag$1 = '[object Map]';
1845
+
1846
+ /**
1847
+ * The base implementation of `_.isMap` without Node.js optimizations.
1848
+ *
1849
+ * @private
1850
+ * @param {*} value The value to check.
1851
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
1852
+ */
1853
+ function baseIsMap(value) {
1854
+ return isObjectLike(value) && getTag$1(value) == mapTag$1;
1855
+ }
1856
+
1857
+ /* Node.js helper references. */
1858
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
1859
+
1860
+ /**
1861
+ * Checks if `value` is classified as a `Map` object.
1862
+ *
1863
+ * @static
1864
+ * @memberOf _
1865
+ * @since 4.3.0
1866
+ * @category Lang
1867
+ * @param {*} value The value to check.
1868
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
1869
+ * @example
1870
+ *
1871
+ * _.isMap(new Map);
1872
+ * // => true
1873
+ *
1874
+ * _.isMap(new WeakMap);
1875
+ * // => false
1876
+ */
1877
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1878
+
1879
+ /** `Object#toString` result references. */
1880
+ var setTag$1 = '[object Set]';
1881
+
1882
+ /**
1883
+ * The base implementation of `_.isSet` without Node.js optimizations.
1884
+ *
1885
+ * @private
1886
+ * @param {*} value The value to check.
1887
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
1888
+ */
1889
+ function baseIsSet(value) {
1890
+ return isObjectLike(value) && getTag$1(value) == setTag$1;
1891
+ }
1892
+
1893
+ /* Node.js helper references. */
1894
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
1895
+
1896
+ /**
1897
+ * Checks if `value` is classified as a `Set` object.
1898
+ *
1899
+ * @static
1900
+ * @memberOf _
1901
+ * @since 4.3.0
1902
+ * @category Lang
1903
+ * @param {*} value The value to check.
1904
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
1905
+ * @example
1906
+ *
1907
+ * _.isSet(new Set);
1908
+ * // => true
1909
+ *
1910
+ * _.isSet(new WeakSet);
1911
+ * // => false
1912
+ */
1913
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
1914
+
1915
+ /** `Object#toString` result references. */
1916
+ var argsTag = '[object Arguments]',
1917
+ arrayTag = '[object Array]',
1918
+ boolTag = '[object Boolean]',
1919
+ dateTag = '[object Date]',
1920
+ errorTag = '[object Error]',
1921
+ funcTag = '[object Function]',
1922
+ genTag = '[object GeneratorFunction]',
1923
+ mapTag = '[object Map]',
1924
+ numberTag = '[object Number]',
1925
+ objectTag = '[object Object]',
1926
+ regexpTag = '[object RegExp]',
1927
+ setTag = '[object Set]',
1928
+ stringTag = '[object String]',
1929
+ symbolTag = '[object Symbol]',
1930
+ weakMapTag = '[object WeakMap]';
1931
+
1932
+ var arrayBufferTag = '[object ArrayBuffer]',
1933
+ dataViewTag = '[object DataView]',
1934
+ float32Tag = '[object Float32Array]',
1935
+ float64Tag = '[object Float64Array]',
1936
+ int8Tag = '[object Int8Array]',
1937
+ int16Tag = '[object Int16Array]',
1938
+ int32Tag = '[object Int32Array]',
1939
+ uint8Tag = '[object Uint8Array]',
1940
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1941
+ uint16Tag = '[object Uint16Array]',
1942
+ uint32Tag = '[object Uint32Array]';
1943
+
1944
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
1945
+ var cloneableTags = {};
1946
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
1947
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
1948
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
1949
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
1950
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
1951
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
1952
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
1953
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
1954
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
1955
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1956
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1957
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
1958
+ cloneableTags[weakMapTag] = false;
1959
+
1960
+ /**
1961
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
1962
+ * traversed objects.
1963
+ *
1964
+ * @private
1965
+ * @param {*} value The value to clone.
1966
+ * @param {boolean} bitmask The bitmask flags.
1967
+ * 1 - Deep clone
1968
+ * 2 - Flatten inherited properties
1969
+ * 4 - Clone symbols
1970
+ * @param {Function} [customizer] The function to customize cloning.
1971
+ * @param {string} [key] The key of `value`.
1972
+ * @param {Object} [object] The parent object of `value`.
1973
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
1974
+ * @returns {*} Returns the cloned value.
1975
+ */
1976
+ function baseClone(value, bitmask, customizer, key, object, stack) {
1977
+ var result;
1978
+ if (result !== undefined) {
1979
+ return result;
1980
+ }
1981
+ if (!isObject(value)) {
1982
+ return value;
1983
+ }
1984
+ var isArr = isArray(value);
1985
+ if (isArr) {
1986
+ result = initCloneArray(value);
1987
+ } else {
1988
+ var tag = getTag$1(value),
1989
+ isFunc = tag == funcTag || tag == genTag;
1990
+
1991
+ if (isBuffer(value)) {
1992
+ return cloneBuffer(value);
1993
+ }
1994
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
1995
+ result = (isFunc) ? {} : initCloneObject(value);
1996
+ } else {
1997
+ if (!cloneableTags[tag]) {
1998
+ return object ? value : {};
1999
+ }
2000
+ result = initCloneByTag(value, tag);
2001
+ }
2002
+ }
2003
+ // Check for circular references and return its corresponding clone.
2004
+ stack || (stack = new Stack);
2005
+ var stacked = stack.get(value);
2006
+ if (stacked) {
2007
+ return stacked;
2008
+ }
2009
+ stack.set(value, result);
2010
+
2011
+ if (isSet(value)) {
2012
+ value.forEach(function(subValue) {
2013
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2014
+ });
2015
+ } else if (isMap(value)) {
2016
+ value.forEach(function(subValue, key) {
2017
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2018
+ });
2019
+ }
2020
+
2021
+ var keysFunc = (getAllKeys)
2022
+ ;
2023
+
2024
+ var props = isArr ? undefined : keysFunc(value);
2025
+ arrayEach(props || value, function(subValue, key) {
2026
+ if (props) {
2027
+ key = subValue;
2028
+ subValue = value[key];
2029
+ }
2030
+ // Recursively populate clone (susceptible to call stack limits).
2031
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2032
+ });
2033
+ return result;
2034
+ }
2035
+
2036
+ /** Used to compose bitmasks for cloning. */
2037
+ var CLONE_DEEP_FLAG = 1,
2038
+ CLONE_SYMBOLS_FLAG = 4;
2039
+
2040
+ /**
2041
+ * This method is like `_.clone` except that it recursively clones `value`.
2042
+ *
2043
+ * @static
2044
+ * @memberOf _
2045
+ * @since 1.0.0
2046
+ * @category Lang
2047
+ * @param {*} value The value to recursively clone.
2048
+ * @returns {*} Returns the deep cloned value.
2049
+ * @see _.clone
2050
+ * @example
2051
+ *
2052
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
2053
+ *
2054
+ * var deep = _.cloneDeep(objects);
2055
+ * console.log(deep[0] === objects[0]);
2056
+ * // => false
2057
+ */
2058
+ function cloneDeep(value) {
2059
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2060
+ }
2061
+
2062
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
2063
+ name: "VkfInputCollection",
2064
+ components: {
2065
+ ElTable: elementPlus.ElTable,
2066
+ ElButton: elementPlus.ElButton,
2067
+ VkTableColumns: tableColumns.VkTableColumns,
2068
+ VkfFormItem: formItem.VkfFormItem,
2069
+ VkfTemplateInstancesProvider: templateInstancesProvider.VkfTemplateInstancesProvider,
2070
+ VkfTemplatesDefault: templatesDefault.VkfTemplatesDefault
2071
+ },
2072
+ props,
2073
+ emits,
2074
+ setup(props2, {
2075
+ emit
2076
+ }) {
2077
+ const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
2078
+ const readonly = composables.useComputedReadonly(props2);
2079
+ const fullColumns = vue.computed(() => {
2080
+ return props2.columns.map(column => {
2081
+ return {
2082
+ ...column,
2083
+ slots: ({
2084
+ $index
2085
+ }) => vue.createVNode(formItemRenderer.VkfFormItemRenderer, {
2086
+ "source": [{
2087
+ prop: [$index, column.prop].flat(),
2088
+ templateType: column.templateType,
2089
+ readonly: readonly.value
2090
+ }]
2091
+ }, null)
2092
+ };
2093
+ });
2094
+ });
2095
+ const buttonsColumn = vue.computed(() => ({
2096
+ label: "\u64CD\u4F5C",
2097
+ align: "center",
2098
+ width: "120px",
2099
+ hidden: readonly.value,
2100
+ slots: ({
2101
+ $index
2102
+ }) => vue.createVNode(vue.Fragment, null, [vue.createVNode(elementPlus.ElButton, {
2103
+ "size": "small",
2104
+ "icon": index.plus_default,
2105
+ "onClick": () => handlePlus($index)
2106
+ }, null), vue.createVNode(elementPlus.ElButton, {
2107
+ "size": "small",
2108
+ "icon": index.minus_default,
2109
+ "onClick": () => handleMinus($index)
2110
+ }, null)])
2111
+ }));
2112
+ function handlePlus(index) {
2113
+ const data = cloneDeep(props2.modelValue);
2114
+ data.splice(index + 1, 0, {});
2115
+ emit("update:modelValue", data);
2116
+ }
2117
+ function handleMinus(index) {
2118
+ const data = cloneDeep(props2.modelValue);
2119
+ data.splice(index, 1);
2120
+ emit("update:modelValue", data);
2121
+ }
2122
+ const addToFirst = () => {
2123
+ emit("update:modelValue", [{}, ...props2.modelValue]);
2124
+ };
2125
+ const handleFormSetData = e => {
2126
+ const data = cloneDeep(props2.modelValue);
2127
+ core.ensetData(data, e);
2128
+ emit("update:modelValue", data);
2129
+ };
2130
+ return {
2131
+ addToFirst,
2132
+ formItemBindProps,
2133
+ readonly,
2134
+ fullColumns,
2135
+ buttonsColumn,
2136
+ handleFormSetData
2137
+ };
2138
+ }
2139
+ });
2140
+
2141
+ const _hoisted_1 = {
2142
+ key: 0,
2143
+ class: "vkf-input-collection-options"
2144
+ };
2145
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2146
+ const _component_VkfTemplatesDefault = vue.resolveComponent("VkfTemplatesDefault");
2147
+ const _component_ElButton = vue.resolveComponent("ElButton");
2148
+ const _component_VkTableColumns = vue.resolveComponent("VkTableColumns");
2149
+ const _component_ElTable = vue.resolveComponent("ElTable");
2150
+ const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
2151
+ const _component_VkfTemplateInstancesProvider = vue.resolveComponent("VkfTemplateInstancesProvider");
2152
+ return vue.openBlock(), vue.createBlock(_component_VkfTemplateInstancesProvider, null, {
2153
+ default: vue.withCtx(() => [
2154
+ vue.createVNode(_component_VkfTemplatesDefault, {
2155
+ data: _ctx.modelValue,
2156
+ onSetData: _ctx.handleFormSetData
2157
+ }, null, 8, ["data", "onSetData"]),
2158
+ vue.createVNode(
2159
+ _component_VkfFormItem,
2160
+ vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
2161
+ {
2162
+ default: vue.withCtx(() => [
2163
+ !_ctx.readonly ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
2164
+ vue.createVNode(_component_ElButton, {
2165
+ type: "primary",
2166
+ onClick: _ctx.addToFirst
2167
+ }, {
2168
+ default: vue.withCtx(() => _cache[0] || (_cache[0] = [
2169
+ vue.createTextVNode(" \u6DFB\u52A0 ")
2170
+ ])),
2171
+ _: 1
2172
+ /* STABLE */
2173
+ }, 8, ["onClick"])
2174
+ ])) : vue.createCommentVNode("v-if", true),
2175
+ vue.createVNode(_component_ElTable, {
2176
+ data: _ctx.modelValue,
2177
+ class: "vkf-input-collection-table"
2178
+ }, {
2179
+ default: vue.withCtx(() => [
2180
+ vue.createVNode(_component_VkTableColumns, {
2181
+ source: [
2182
+ ..._ctx.fullColumns,
2183
+ _ctx.buttonsColumn
2184
+ ]
2185
+ }, null, 8, ["source"])
2186
+ ]),
2187
+ _: 1
2188
+ /* STABLE */
2189
+ }, 8, ["data"])
2190
+ ]),
2191
+ _: 1
2192
+ /* STABLE */
2193
+ },
2194
+ 16
2195
+ /* FULL_PROPS */
2196
+ )
2197
+ ]),
2198
+ _: 1
2199
+ /* STABLE */
2200
+ });
2201
+ }
2202
+ var VkfInputCollection = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-collection/src/index.vue"]]);
2203
+
2204
+ var types = /*#__PURE__*/Object.freeze({
2205
+ __proto__: null
2206
+ });
2207
+
2208
+ VkfInputCollection.install = (app) => {
2209
+ app.component(VkfInputCollection.name || "VkfInputCollection", VkfInputCollection);
2210
+ };
2211
+
2212
+ exports.VkfInputCollection = VkfInputCollection;
2213
+ exports.__VkfInputCollection = types;
2214
+ exports.default = VkfInputCollection;