@kne/super-select 0.1.0 → 0.1.2

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.
@@ -1,9 +1,9 @@
1
- import React, { useState } from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import { createContext } from '@kne/global-context';
3
3
  import useResize from '@kne/use-resize';
4
4
  import useControlValue from '@kne/use-control-value';
5
5
  import classnames from 'classnames';
6
- import { App, Popover, Modal, Flex, Tag, Checkbox, List } from 'antd';
6
+ import { Modal, App, Popover, Flex, Tag, Checkbox, List } from 'antd';
7
7
  import { CloseCircleFilled, DownOutlined, CheckOutlined } from '@ant-design/icons';
8
8
  import SimpleBar from 'simplebar-react';
9
9
  import 'simplebar-react/dist/simplebar.min.css';
@@ -35,267 +35,265 @@ const {
35
35
  useContext
36
36
  } = context;
37
37
 
38
- var style$3 = {"select-input":"_d8lGc","disabled":"_3kjwO","wrap":"_dsTM2","select-input-inner":"_NQoX9","large":"_T8ZX8","small":"_1B72H","select-input-icon":"_g8QC-","placeholder":"_r3q69","overlay-content":"_zEqGe","overlay":"_ybN30"};
38
+ /**
39
+ * Removes all key-value entries from the list cache.
40
+ *
41
+ * @private
42
+ * @name clear
43
+ * @memberOf ListCache
44
+ */
45
+ function listCacheClear() {
46
+ this.__data__ = [];
47
+ this.size = 0;
48
+ }
39
49
 
40
- const _excluded$1 = ["children"];
41
- const numberToPx = val => {
42
- return typeof val === 'number' ? `${val}px` : val;
43
- };
44
- const pxToNumber = value => {
45
- if (!value) return 0;
46
- const match = value.match(/^\d*(\.\d*)?/);
47
- return match ? Number(match[0]) : 0;
48
- };
49
- const ModalContent = _ref => {
50
- let {
51
- children
52
- } = _ref,
53
- others = _objectWithoutPropertiesLoose(_ref, _excluded$1);
54
- const [value, setValue] = useState(others.value);
55
- const {
56
- placeholder
57
- } = others.props;
58
- const {
59
- open,
60
- onOpenChange
61
- } = others;
62
- const contextProps = Object.assign({}, others, {
63
- value,
64
- setValue,
65
- onAdd: item => others.onAdd(item, setValue),
66
- onSelect: item => others.onSelect(item, setValue),
67
- onRemove: item => others.onRemove(item, setValue),
68
- children
69
- });
70
- return /*#__PURE__*/React.createElement(Modal, {
71
- width: 1000,
72
- open: open,
73
- title: placeholder,
74
- onCancel: () => {
75
- onOpenChange(false);
76
- },
77
- onOk: () => {
78
- others.setValue(value);
79
- onOpenChange(false);
80
- }
81
- }, /*#__PURE__*/React.createElement(Provider, {
82
- value: contextProps
83
- }, children(contextProps)));
84
- };
85
- const SelectInput = p => {
86
- const locale = Object.assign({}, {
87
- placeholder: '请选择',
88
- selectAll: '全选',
89
- selected: '已选',
90
- search: '搜索',
91
- numberOf: '%s个',
92
- maxLengthError: '最大数量不能超过%s',
93
- defaultChildren: '下拉内容,需要调用方实现'
94
- }, p.locale);
95
- const props = Object.assign({}, {
96
- children: () => locale.defaultChildren,
97
- maxLength: null,
98
- single: false,
99
- disabled: false,
100
- isPopup: true,
101
- defaultValue: [],
102
- placeholder: locale.placeholder,
103
- searchPlaceholder: locale.search,
104
- allowSelectedAll: false,
105
- selectedAllValue: {
106
- value: 'all',
107
- label: locale.selectAll
108
- },
109
- placement: 'bottomLeft',
110
- labelWrap: true,
111
- showSelectedTag: true,
112
- allowClear: true,
113
- extra: null,
114
- renderModal: props => /*#__PURE__*/React.createElement(ModalContent, props)
115
- }, p, {
116
- locale
117
- });
118
- const [value, setValue] = useControlValue(props);
119
- const [searchText, setSearchText] = useState('');
120
- const [open, setOpen] = useState(false);
121
- const [hover, setHover] = useState(false);
122
- const [inputWidth, setInputWidth] = useState(0);
123
- const inputRef = useResize(el => {
124
- setInputWidth(el.clientWidth);
125
- });
126
- const {
127
- children,
128
- className,
129
- maxLength,
130
- overlayClassName,
131
- single,
132
- labelWrap,
133
- isPopup,
134
- allowClear,
135
- disabled,
136
- placeholder,
137
- selectedAllValue,
138
- overlayWidth,
139
- placement,
140
- renderModal
141
- } = props;
142
- const popupOverlayWidth = numberToPx(Math.max(inputWidth, pxToNumber(overlayWidth)));
143
- const {
144
- message
145
- } = App.useApp();
146
- const checkMaxLength = (value, maxLength) => {
147
- if (Number.isInteger(maxLength) && maxLength > 0 && value.length >= maxLength) {
148
- message.error(locale.maxLengthError.replace('%s', maxLength));
149
- return false;
150
- }
151
- return true;
152
- };
153
- const onRemove = (item, currentSetValue) => {
154
- (currentSetValue || setValue)(value => {
155
- const newValue = value.slice(0);
156
- const index = value.findIndex(currentItem => currentItem.value === item.value);
157
- if (index > -1) {
158
- newValue.splice(index, 1);
159
- }
160
- return newValue;
161
- });
162
- };
163
- const onAdd = (item, currentSetValue) => {
164
- (currentSetValue || setValue)(value => {
165
- if (checkMaxLength(value, maxLength)) {
166
- return value;
167
- }
168
- const newValue = value.slice(0);
169
- const index = value.findIndex(currentItem => currentItem.value === item.value);
170
- if (index === -1) {
171
- newValue.push(item);
172
- }
173
- return newValue;
174
- });
175
- };
176
- const onSelect = (item, currentSetValue) => {
177
- (currentSetValue || setValue)(value => {
178
- const newValue = value.slice(0);
179
- const index = value.findIndex(currentItem => currentItem.value === item.value);
180
- if (index === -1 && !checkMaxLength(value, maxLength)) {
181
- return value;
182
- }
183
- if (index === -1) {
184
- newValue.push(item);
185
- } else {
186
- newValue.splice(index, 1);
187
- }
188
- return newValue;
189
- });
190
- };
191
- const inputInnerRender = (props = {}) => /*#__PURE__*/React.createElement(Flex, _extends({}, props, {
192
- ref: inputRef,
193
- className: classnames(className, style$3['select-input'], {
194
- [style$3['wrap']]: labelWrap,
195
- [style$3['disabled']]: disabled
196
- }),
197
- justify: "space-between",
198
- onMouseOver: () => {
199
- setHover(true);
200
- },
201
- onMouseOut: () => {
202
- setHover(false);
203
- }
204
- }), /*#__PURE__*/React.createElement("div", {
205
- className: style$3['select-input-inner']
206
- }, (value || []).length > 0 ? single || value[0].value === selectedAllValue.value ? value[0].label : value.map(item => {
207
- return /*#__PURE__*/React.createElement(Tag, {
208
- key: item.value,
209
- closable: true,
210
- bordered: false,
211
- onClose: e => {
212
- e.preventDefault();
213
- onRemove(item);
214
- }
215
- }, item.label);
216
- }) : /*#__PURE__*/React.createElement("span", {
217
- className: style$3['placeholder']
218
- }, placeholder)), /*#__PURE__*/React.createElement("div", {
219
- className: style$3['select-input-icon']
220
- }, !disabled && allowClear && hover && (value || []).length > 0 ? /*#__PURE__*/React.createElement(CloseCircleFilled, {
221
- onClick: e => {
222
- e.stopPropagation();
223
- setValue([]);
224
- }
225
- }) : /*#__PURE__*/React.createElement(DownOutlined, null)));
226
- const contextProps = {
227
- props,
228
- value,
229
- setValue,
230
- searchText,
231
- setSearchText,
232
- hover,
233
- inputWidth,
234
- onAdd,
235
- onRemove,
236
- onSelect,
237
- open: !disabled && open,
238
- onOpenChange: setOpen,
239
- children
240
- };
241
- return /*#__PURE__*/React.createElement(Provider, {
242
- value: contextProps
243
- }, isPopup ? /*#__PURE__*/React.createElement(Popover, {
244
- open: !disabled && open,
245
- onOpenChange: setOpen,
246
- placement: placement,
247
- arrow: false,
248
- transitionName: "",
249
- overlayClassName: classnames(style$3['overlay'], overlayClassName),
250
- trigger: "click",
251
- content: /*#__PURE__*/React.createElement("div", {
252
- style: {
253
- '--overlay-width': popupOverlayWidth
254
- },
255
- className: classnames(style$3['overlay-content'], 'over-content'),
256
- onClick: e => {
257
- e.stopPropagation();
258
- }
259
- }, children(contextProps))
260
- }, /*#__PURE__*/React.createElement("span", null, inputInnerRender())) : /*#__PURE__*/React.createElement(React.Fragment, null, inputInnerRender({
261
- onClick: () => {
262
- setOpen(true);
263
- }
264
- }), renderModal(contextProps)));
265
- };
50
+ var _listCacheClear = listCacheClear;
266
51
 
267
52
  /**
268
- * Checks if `value` is classified as an `Array` object.
53
+ * Performs a
54
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
55
+ * comparison between two values to determine if they are equivalent.
269
56
  *
270
57
  * @static
271
58
  * @memberOf _
272
- * @since 0.1.0
59
+ * @since 4.0.0
273
60
  * @category Lang
274
- * @param {*} value The value to check.
275
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
61
+ * @param {*} value The value to compare.
62
+ * @param {*} other The other value to compare.
63
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
276
64
  * @example
277
65
  *
278
- * _.isArray([1, 2, 3]);
66
+ * var object = { 'a': 1 };
67
+ * var other = { 'a': 1 };
68
+ *
69
+ * _.eq(object, object);
279
70
  * // => true
280
71
  *
281
- * _.isArray(document.body.children);
72
+ * _.eq(object, other);
282
73
  * // => false
283
74
  *
284
- * _.isArray('abc');
285
- * // => false
75
+ * _.eq('a', 'a');
76
+ * // => true
286
77
  *
287
- * _.isArray(_.noop);
78
+ * _.eq('a', Object('a'));
288
79
  * // => false
80
+ *
81
+ * _.eq(NaN, NaN);
82
+ * // => true
289
83
  */
290
- var isArray = Array.isArray;
291
-
292
- var isArray_1 = isArray;
293
-
294
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
295
-
296
- function createCommonjsModule(fn) {
297
- var module = { exports: {} };
298
- return fn(module, module.exports), module.exports;
84
+ function eq(value, other) {
85
+ return value === other || (value !== value && other !== other);
86
+ }
87
+
88
+ var eq_1 = eq;
89
+
90
+ /**
91
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
92
+ *
93
+ * @private
94
+ * @param {Array} array The array to inspect.
95
+ * @param {*} key The key to search for.
96
+ * @returns {number} Returns the index of the matched value, else `-1`.
97
+ */
98
+ function assocIndexOf(array, key) {
99
+ var length = array.length;
100
+ while (length--) {
101
+ if (eq_1(array[length][0], key)) {
102
+ return length;
103
+ }
104
+ }
105
+ return -1;
106
+ }
107
+
108
+ var _assocIndexOf = assocIndexOf;
109
+
110
+ /** Used for built-in method references. */
111
+ var arrayProto = Array.prototype;
112
+
113
+ /** Built-in value references. */
114
+ var splice = arrayProto.splice;
115
+
116
+ /**
117
+ * Removes `key` and its value from the list cache.
118
+ *
119
+ * @private
120
+ * @name delete
121
+ * @memberOf ListCache
122
+ * @param {string} key The key of the value to remove.
123
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
124
+ */
125
+ function listCacheDelete(key) {
126
+ var data = this.__data__,
127
+ index = _assocIndexOf(data, key);
128
+
129
+ if (index < 0) {
130
+ return false;
131
+ }
132
+ var lastIndex = data.length - 1;
133
+ if (index == lastIndex) {
134
+ data.pop();
135
+ } else {
136
+ splice.call(data, index, 1);
137
+ }
138
+ --this.size;
139
+ return true;
140
+ }
141
+
142
+ var _listCacheDelete = listCacheDelete;
143
+
144
+ /**
145
+ * Gets the list cache value for `key`.
146
+ *
147
+ * @private
148
+ * @name get
149
+ * @memberOf ListCache
150
+ * @param {string} key The key of the value to get.
151
+ * @returns {*} Returns the entry value.
152
+ */
153
+ function listCacheGet(key) {
154
+ var data = this.__data__,
155
+ index = _assocIndexOf(data, key);
156
+
157
+ return index < 0 ? undefined : data[index][1];
158
+ }
159
+
160
+ var _listCacheGet = listCacheGet;
161
+
162
+ /**
163
+ * Checks if a list cache value for `key` exists.
164
+ *
165
+ * @private
166
+ * @name has
167
+ * @memberOf ListCache
168
+ * @param {string} key The key of the entry to check.
169
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
170
+ */
171
+ function listCacheHas(key) {
172
+ return _assocIndexOf(this.__data__, key) > -1;
173
+ }
174
+
175
+ var _listCacheHas = listCacheHas;
176
+
177
+ /**
178
+ * Sets the list cache `key` to `value`.
179
+ *
180
+ * @private
181
+ * @name set
182
+ * @memberOf ListCache
183
+ * @param {string} key The key of the value to set.
184
+ * @param {*} value The value to set.
185
+ * @returns {Object} Returns the list cache instance.
186
+ */
187
+ function listCacheSet(key, value) {
188
+ var data = this.__data__,
189
+ index = _assocIndexOf(data, key);
190
+
191
+ if (index < 0) {
192
+ ++this.size;
193
+ data.push([key, value]);
194
+ } else {
195
+ data[index][1] = value;
196
+ }
197
+ return this;
198
+ }
199
+
200
+ var _listCacheSet = listCacheSet;
201
+
202
+ /**
203
+ * Creates an list cache object.
204
+ *
205
+ * @private
206
+ * @constructor
207
+ * @param {Array} [entries] The key-value pairs to cache.
208
+ */
209
+ function ListCache(entries) {
210
+ var index = -1,
211
+ length = entries == null ? 0 : entries.length;
212
+
213
+ this.clear();
214
+ while (++index < length) {
215
+ var entry = entries[index];
216
+ this.set(entry[0], entry[1]);
217
+ }
218
+ }
219
+
220
+ // Add methods to `ListCache`.
221
+ ListCache.prototype.clear = _listCacheClear;
222
+ ListCache.prototype['delete'] = _listCacheDelete;
223
+ ListCache.prototype.get = _listCacheGet;
224
+ ListCache.prototype.has = _listCacheHas;
225
+ ListCache.prototype.set = _listCacheSet;
226
+
227
+ var _ListCache = ListCache;
228
+
229
+ /**
230
+ * Removes all key-value entries from the stack.
231
+ *
232
+ * @private
233
+ * @name clear
234
+ * @memberOf Stack
235
+ */
236
+ function stackClear() {
237
+ this.__data__ = new _ListCache;
238
+ this.size = 0;
239
+ }
240
+
241
+ var _stackClear = stackClear;
242
+
243
+ /**
244
+ * Removes `key` and its value from the stack.
245
+ *
246
+ * @private
247
+ * @name delete
248
+ * @memberOf Stack
249
+ * @param {string} key The key of the value to remove.
250
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
251
+ */
252
+ function stackDelete(key) {
253
+ var data = this.__data__,
254
+ result = data['delete'](key);
255
+
256
+ this.size = data.size;
257
+ return result;
258
+ }
259
+
260
+ var _stackDelete = stackDelete;
261
+
262
+ /**
263
+ * Gets the stack value for `key`.
264
+ *
265
+ * @private
266
+ * @name get
267
+ * @memberOf Stack
268
+ * @param {string} key The key of the value to get.
269
+ * @returns {*} Returns the entry value.
270
+ */
271
+ function stackGet(key) {
272
+ return this.__data__.get(key);
273
+ }
274
+
275
+ var _stackGet = stackGet;
276
+
277
+ /**
278
+ * Checks if a stack value for `key` exists.
279
+ *
280
+ * @private
281
+ * @name has
282
+ * @memberOf Stack
283
+ * @param {string} key The key of the entry to check.
284
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
285
+ */
286
+ function stackHas(key) {
287
+ return this.__data__.has(key);
288
+ }
289
+
290
+ var _stackHas = stackHas;
291
+
292
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
293
+
294
+ function createCommonjsModule(fn) {
295
+ var module = { exports: {} };
296
+ return fn(module, module.exports), module.exports;
299
297
  }
300
298
 
301
299
  /** Detect free variable `global` from Node.js. */
@@ -318,17 +316,17 @@ var Symbol = _root.Symbol;
318
316
  var _Symbol = Symbol;
319
317
 
320
318
  /** Used for built-in method references. */
321
- var objectProto$a = Object.prototype;
319
+ var objectProto$e = Object.prototype;
322
320
 
323
321
  /** Used to check objects for own properties. */
324
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
322
+ var hasOwnProperty$b = objectProto$e.hasOwnProperty;
325
323
 
326
324
  /**
327
325
  * Used to resolve the
328
326
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
329
327
  * of values.
330
328
  */
331
- var nativeObjectToString$1 = objectProto$a.toString;
329
+ var nativeObjectToString$1 = objectProto$e.toString;
332
330
 
333
331
  /** Built-in value references. */
334
332
  var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
@@ -341,7 +339,7 @@ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
341
339
  * @returns {string} Returns the raw `toStringTag`.
342
340
  */
343
341
  function getRawTag(value) {
344
- var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
342
+ var isOwn = hasOwnProperty$b.call(value, symToStringTag$1),
345
343
  tag = value[symToStringTag$1];
346
344
 
347
345
  try {
@@ -363,14 +361,14 @@ function getRawTag(value) {
363
361
  var _getRawTag = getRawTag;
364
362
 
365
363
  /** Used for built-in method references. */
366
- var objectProto$9 = Object.prototype;
364
+ var objectProto$d = Object.prototype;
367
365
 
368
366
  /**
369
367
  * Used to resolve the
370
368
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
371
369
  * of values.
372
370
  */
373
- var nativeObjectToString = objectProto$9.toString;
371
+ var nativeObjectToString = objectProto$d.toString;
374
372
 
375
373
  /**
376
374
  * Converts `value` to a string using `Object.prototype.toString`.
@@ -411,142 +409,58 @@ function baseGetTag(value) {
411
409
  var _baseGetTag = baseGetTag;
412
410
 
413
411
  /**
414
- * Checks if `value` is object-like. A value is object-like if it's not `null`
415
- * and has a `typeof` result of "object".
412
+ * Checks if `value` is the
413
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
414
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
416
415
  *
417
416
  * @static
418
417
  * @memberOf _
419
- * @since 4.0.0
418
+ * @since 0.1.0
420
419
  * @category Lang
421
420
  * @param {*} value The value to check.
422
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
421
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
423
422
  * @example
424
423
  *
425
- * _.isObjectLike({});
424
+ * _.isObject({});
426
425
  * // => true
427
426
  *
428
- * _.isObjectLike([1, 2, 3]);
427
+ * _.isObject([1, 2, 3]);
429
428
  * // => true
430
429
  *
431
- * _.isObjectLike(_.noop);
432
- * // => false
430
+ * _.isObject(_.noop);
431
+ * // => true
433
432
  *
434
- * _.isObjectLike(null);
433
+ * _.isObject(null);
435
434
  * // => false
436
435
  */
437
- function isObjectLike(value) {
438
- return value != null && typeof value == 'object';
436
+ function isObject(value) {
437
+ var type = typeof value;
438
+ return value != null && (type == 'object' || type == 'function');
439
439
  }
440
440
 
441
- var isObjectLike_1 = isObjectLike;
441
+ var isObject_1 = isObject;
442
442
 
443
443
  /** `Object#toString` result references. */
444
- var symbolTag = '[object Symbol]';
444
+ var asyncTag = '[object AsyncFunction]',
445
+ funcTag$1 = '[object Function]',
446
+ genTag = '[object GeneratorFunction]',
447
+ proxyTag = '[object Proxy]';
445
448
 
446
449
  /**
447
- * Checks if `value` is classified as a `Symbol` primitive or object.
450
+ * Checks if `value` is classified as a `Function` object.
448
451
  *
449
452
  * @static
450
453
  * @memberOf _
451
- * @since 4.0.0
454
+ * @since 0.1.0
452
455
  * @category Lang
453
456
  * @param {*} value The value to check.
454
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
457
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
455
458
  * @example
456
459
  *
457
- * _.isSymbol(Symbol.iterator);
460
+ * _.isFunction(_);
458
461
  * // => true
459
462
  *
460
- * _.isSymbol('abc');
461
- * // => false
462
- */
463
- function isSymbol(value) {
464
- return typeof value == 'symbol' ||
465
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
466
- }
467
-
468
- var isSymbol_1 = isSymbol;
469
-
470
- /** Used to match property names within property paths. */
471
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
472
- reIsPlainProp = /^\w*$/;
473
-
474
- /**
475
- * Checks if `value` is a property name and not a property path.
476
- *
477
- * @private
478
- * @param {*} value The value to check.
479
- * @param {Object} [object] The object to query keys on.
480
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
481
- */
482
- function isKey(value, object) {
483
- if (isArray_1(value)) {
484
- return false;
485
- }
486
- var type = typeof value;
487
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
488
- value == null || isSymbol_1(value)) {
489
- return true;
490
- }
491
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
492
- (object != null && value in Object(object));
493
- }
494
-
495
- var _isKey = isKey;
496
-
497
- /**
498
- * Checks if `value` is the
499
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
500
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
501
- *
502
- * @static
503
- * @memberOf _
504
- * @since 0.1.0
505
- * @category Lang
506
- * @param {*} value The value to check.
507
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
508
- * @example
509
- *
510
- * _.isObject({});
511
- * // => true
512
- *
513
- * _.isObject([1, 2, 3]);
514
- * // => true
515
- *
516
- * _.isObject(_.noop);
517
- * // => true
518
- *
519
- * _.isObject(null);
520
- * // => false
521
- */
522
- function isObject(value) {
523
- var type = typeof value;
524
- return value != null && (type == 'object' || type == 'function');
525
- }
526
-
527
- var isObject_1 = isObject;
528
-
529
- /** `Object#toString` result references. */
530
- var asyncTag = '[object AsyncFunction]',
531
- funcTag$1 = '[object Function]',
532
- genTag = '[object GeneratorFunction]',
533
- proxyTag = '[object Proxy]';
534
-
535
- /**
536
- * Checks if `value` is classified as a `Function` object.
537
- *
538
- * @static
539
- * @memberOf _
540
- * @since 0.1.0
541
- * @category Lang
542
- * @param {*} value The value to check.
543
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
544
- * @example
545
- *
546
- * _.isFunction(_);
547
- * // => true
548
- *
549
- * _.isFunction(/abc/);
463
+ * _.isFunction(/abc/);
550
464
  * // => false
551
465
  */
552
466
  function isFunction(value) {
@@ -623,17 +537,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
623
537
 
624
538
  /** Used for built-in method references. */
625
539
  var funcProto$1 = Function.prototype,
626
- objectProto$8 = Object.prototype;
540
+ objectProto$c = Object.prototype;
627
541
 
628
542
  /** Used to resolve the decompiled source of functions. */
629
543
  var funcToString$1 = funcProto$1.toString;
630
544
 
631
545
  /** Used to check objects for own properties. */
632
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
546
+ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
633
547
 
634
548
  /** Used to detect if a method is native. */
635
549
  var reIsNative = RegExp('^' +
636
- funcToString$1.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
550
+ funcToString$1.call(hasOwnProperty$a).replace(reRegExpChar, '\\$&')
637
551
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
638
552
  );
639
553
 
@@ -684,6 +598,11 @@ function getNative(object, key) {
684
598
 
685
599
  var _getNative = getNative;
686
600
 
601
+ /* Built-in method references that are verified to be native. */
602
+ var Map = _getNative(_root, 'Map');
603
+
604
+ var _Map = Map;
605
+
687
606
  /* Built-in method references that are verified to be native. */
688
607
  var nativeCreate = _getNative(Object, 'create');
689
608
 
@@ -722,13 +641,13 @@ function hashDelete(key) {
722
641
  var _hashDelete = hashDelete;
723
642
 
724
643
  /** Used to stand-in for `undefined` hash values. */
725
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
644
+ var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
726
645
 
727
646
  /** Used for built-in method references. */
728
- var objectProto$7 = Object.prototype;
647
+ var objectProto$b = Object.prototype;
729
648
 
730
649
  /** Used to check objects for own properties. */
731
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
650
+ var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
732
651
 
733
652
  /**
734
653
  * Gets the hash value for `key`.
@@ -743,18 +662,18 @@ function hashGet(key) {
743
662
  var data = this.__data__;
744
663
  if (_nativeCreate) {
745
664
  var result = data[key];
746
- return result === HASH_UNDEFINED$1 ? undefined : result;
665
+ return result === HASH_UNDEFINED$2 ? undefined : result;
747
666
  }
748
- return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
667
+ return hasOwnProperty$9.call(data, key) ? data[key] : undefined;
749
668
  }
750
669
 
751
670
  var _hashGet = hashGet;
752
671
 
753
672
  /** Used for built-in method references. */
754
- var objectProto$6 = Object.prototype;
673
+ var objectProto$a = Object.prototype;
755
674
 
756
675
  /** Used to check objects for own properties. */
757
- var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
676
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
758
677
 
759
678
  /**
760
679
  * Checks if a hash value for `key` exists.
@@ -767,13 +686,13 @@ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
767
686
  */
768
687
  function hashHas(key) {
769
688
  var data = this.__data__;
770
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$5.call(data, key);
689
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$8.call(data, key);
771
690
  }
772
691
 
773
692
  var _hashHas = hashHas;
774
693
 
775
694
  /** Used to stand-in for `undefined` hash values. */
776
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
695
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
777
696
 
778
697
  /**
779
698
  * Sets the hash `key` to `value`.
@@ -788,7 +707,7 @@ var HASH_UNDEFINED = '__lodash_hash_undefined__';
788
707
  function hashSet(key, value) {
789
708
  var data = this.__data__;
790
709
  this.size += this.has(key) ? 0 : 1;
791
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
710
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
792
711
  return this;
793
712
  }
794
713
 
@@ -822,177 +741,132 @@ Hash.prototype.set = _hashSet;
822
741
  var _Hash = Hash;
823
742
 
824
743
  /**
825
- * Removes all key-value entries from the list cache.
744
+ * Removes all key-value entries from the map.
826
745
  *
827
746
  * @private
828
747
  * @name clear
829
- * @memberOf ListCache
748
+ * @memberOf MapCache
830
749
  */
831
- function listCacheClear() {
832
- this.__data__ = [];
750
+ function mapCacheClear() {
833
751
  this.size = 0;
752
+ this.__data__ = {
753
+ 'hash': new _Hash,
754
+ 'map': new (_Map || _ListCache),
755
+ 'string': new _Hash
756
+ };
834
757
  }
835
758
 
836
- var _listCacheClear = listCacheClear;
759
+ var _mapCacheClear = mapCacheClear;
837
760
 
838
761
  /**
839
- * Performs a
840
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
841
- * comparison between two values to determine if they are equivalent.
842
- *
843
- * @static
844
- * @memberOf _
845
- * @since 4.0.0
846
- * @category Lang
847
- * @param {*} value The value to compare.
848
- * @param {*} other The other value to compare.
849
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
850
- * @example
851
- *
852
- * var object = { 'a': 1 };
853
- * var other = { 'a': 1 };
854
- *
855
- * _.eq(object, object);
856
- * // => true
857
- *
858
- * _.eq(object, other);
859
- * // => false
860
- *
861
- * _.eq('a', 'a');
862
- * // => true
863
- *
864
- * _.eq('a', Object('a'));
865
- * // => false
762
+ * Checks if `value` is suitable for use as unique object key.
866
763
  *
867
- * _.eq(NaN, NaN);
868
- * // => true
764
+ * @private
765
+ * @param {*} value The value to check.
766
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
869
767
  */
870
- function eq(value, other) {
871
- return value === other || (value !== value && other !== other);
768
+ function isKeyable(value) {
769
+ var type = typeof value;
770
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
771
+ ? (value !== '__proto__')
772
+ : (value === null);
872
773
  }
873
774
 
874
- var eq_1 = eq;
775
+ var _isKeyable = isKeyable;
875
776
 
876
777
  /**
877
- * Gets the index at which the `key` is found in `array` of key-value pairs.
778
+ * Gets the data for `map`.
878
779
  *
879
780
  * @private
880
- * @param {Array} array The array to inspect.
881
- * @param {*} key The key to search for.
882
- * @returns {number} Returns the index of the matched value, else `-1`.
781
+ * @param {Object} map The map to query.
782
+ * @param {string} key The reference key.
783
+ * @returns {*} Returns the map data.
883
784
  */
884
- function assocIndexOf(array, key) {
885
- var length = array.length;
886
- while (length--) {
887
- if (eq_1(array[length][0], key)) {
888
- return length;
889
- }
890
- }
891
- return -1;
785
+ function getMapData(map, key) {
786
+ var data = map.__data__;
787
+ return _isKeyable(key)
788
+ ? data[typeof key == 'string' ? 'string' : 'hash']
789
+ : data.map;
892
790
  }
893
791
 
894
- var _assocIndexOf = assocIndexOf;
895
-
896
- /** Used for built-in method references. */
897
- var arrayProto = Array.prototype;
898
-
899
- /** Built-in value references. */
900
- var splice = arrayProto.splice;
792
+ var _getMapData = getMapData;
901
793
 
902
794
  /**
903
- * Removes `key` and its value from the list cache.
795
+ * Removes `key` and its value from the map.
904
796
  *
905
797
  * @private
906
798
  * @name delete
907
- * @memberOf ListCache
799
+ * @memberOf MapCache
908
800
  * @param {string} key The key of the value to remove.
909
801
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
910
802
  */
911
- function listCacheDelete(key) {
912
- var data = this.__data__,
913
- index = _assocIndexOf(data, key);
914
-
915
- if (index < 0) {
916
- return false;
917
- }
918
- var lastIndex = data.length - 1;
919
- if (index == lastIndex) {
920
- data.pop();
921
- } else {
922
- splice.call(data, index, 1);
923
- }
924
- --this.size;
925
- return true;
803
+ function mapCacheDelete(key) {
804
+ var result = _getMapData(this, key)['delete'](key);
805
+ this.size -= result ? 1 : 0;
806
+ return result;
926
807
  }
927
808
 
928
- var _listCacheDelete = listCacheDelete;
809
+ var _mapCacheDelete = mapCacheDelete;
929
810
 
930
811
  /**
931
- * Gets the list cache value for `key`.
812
+ * Gets the map value for `key`.
932
813
  *
933
814
  * @private
934
815
  * @name get
935
- * @memberOf ListCache
816
+ * @memberOf MapCache
936
817
  * @param {string} key The key of the value to get.
937
818
  * @returns {*} Returns the entry value.
938
819
  */
939
- function listCacheGet(key) {
940
- var data = this.__data__,
941
- index = _assocIndexOf(data, key);
942
-
943
- return index < 0 ? undefined : data[index][1];
820
+ function mapCacheGet(key) {
821
+ return _getMapData(this, key).get(key);
944
822
  }
945
823
 
946
- var _listCacheGet = listCacheGet;
824
+ var _mapCacheGet = mapCacheGet;
947
825
 
948
826
  /**
949
- * Checks if a list cache value for `key` exists.
827
+ * Checks if a map value for `key` exists.
950
828
  *
951
829
  * @private
952
830
  * @name has
953
- * @memberOf ListCache
831
+ * @memberOf MapCache
954
832
  * @param {string} key The key of the entry to check.
955
833
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
956
834
  */
957
- function listCacheHas(key) {
958
- return _assocIndexOf(this.__data__, key) > -1;
835
+ function mapCacheHas(key) {
836
+ return _getMapData(this, key).has(key);
959
837
  }
960
838
 
961
- var _listCacheHas = listCacheHas;
839
+ var _mapCacheHas = mapCacheHas;
962
840
 
963
841
  /**
964
- * Sets the list cache `key` to `value`.
842
+ * Sets the map `key` to `value`.
965
843
  *
966
844
  * @private
967
845
  * @name set
968
- * @memberOf ListCache
846
+ * @memberOf MapCache
969
847
  * @param {string} key The key of the value to set.
970
848
  * @param {*} value The value to set.
971
- * @returns {Object} Returns the list cache instance.
849
+ * @returns {Object} Returns the map cache instance.
972
850
  */
973
- function listCacheSet(key, value) {
974
- var data = this.__data__,
975
- index = _assocIndexOf(data, key);
851
+ function mapCacheSet(key, value) {
852
+ var data = _getMapData(this, key),
853
+ size = data.size;
976
854
 
977
- if (index < 0) {
978
- ++this.size;
979
- data.push([key, value]);
980
- } else {
981
- data[index][1] = value;
982
- }
855
+ data.set(key, value);
856
+ this.size += data.size == size ? 0 : 1;
983
857
  return this;
984
858
  }
985
859
 
986
- var _listCacheSet = listCacheSet;
860
+ var _mapCacheSet = mapCacheSet;
987
861
 
988
862
  /**
989
- * Creates an list cache object.
863
+ * Creates a map cache object to store key-value pairs.
990
864
  *
991
865
  * @private
992
866
  * @constructor
993
867
  * @param {Array} [entries] The key-value pairs to cache.
994
868
  */
995
- function ListCache(entries) {
869
+ function MapCache(entries) {
996
870
  var index = -1,
997
871
  length = entries == null ? 0 : entries.length;
998
872
 
@@ -1003,165 +877,1666 @@ function ListCache(entries) {
1003
877
  }
1004
878
  }
1005
879
 
1006
- // Add methods to `ListCache`.
1007
- ListCache.prototype.clear = _listCacheClear;
1008
- ListCache.prototype['delete'] = _listCacheDelete;
1009
- ListCache.prototype.get = _listCacheGet;
1010
- ListCache.prototype.has = _listCacheHas;
1011
- ListCache.prototype.set = _listCacheSet;
880
+ // Add methods to `MapCache`.
881
+ MapCache.prototype.clear = _mapCacheClear;
882
+ MapCache.prototype['delete'] = _mapCacheDelete;
883
+ MapCache.prototype.get = _mapCacheGet;
884
+ MapCache.prototype.has = _mapCacheHas;
885
+ MapCache.prototype.set = _mapCacheSet;
1012
886
 
1013
- var _ListCache = ListCache;
887
+ var _MapCache = MapCache;
1014
888
 
1015
- /* Built-in method references that are verified to be native. */
1016
- var Map = _getNative(_root, 'Map');
889
+ /** Used as the size to enable large array optimizations. */
890
+ var LARGE_ARRAY_SIZE = 200;
1017
891
 
1018
- var _Map = Map;
892
+ /**
893
+ * Sets the stack `key` to `value`.
894
+ *
895
+ * @private
896
+ * @name set
897
+ * @memberOf Stack
898
+ * @param {string} key The key of the value to set.
899
+ * @param {*} value The value to set.
900
+ * @returns {Object} Returns the stack cache instance.
901
+ */
902
+ function stackSet(key, value) {
903
+ var data = this.__data__;
904
+ if (data instanceof _ListCache) {
905
+ var pairs = data.__data__;
906
+ if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
907
+ pairs.push([key, value]);
908
+ this.size = ++data.size;
909
+ return this;
910
+ }
911
+ data = this.__data__ = new _MapCache(pairs);
912
+ }
913
+ data.set(key, value);
914
+ this.size = data.size;
915
+ return this;
916
+ }
917
+
918
+ var _stackSet = stackSet;
1019
919
 
1020
920
  /**
1021
- * Removes all key-value entries from the map.
921
+ * Creates a stack cache object to store key-value pairs.
1022
922
  *
1023
923
  * @private
1024
- * @name clear
1025
- * @memberOf MapCache
924
+ * @constructor
925
+ * @param {Array} [entries] The key-value pairs to cache.
1026
926
  */
1027
- function mapCacheClear() {
1028
- this.size = 0;
1029
- this.__data__ = {
1030
- 'hash': new _Hash,
1031
- 'map': new (_Map || _ListCache),
1032
- 'string': new _Hash
1033
- };
927
+ function Stack(entries) {
928
+ var data = this.__data__ = new _ListCache(entries);
929
+ this.size = data.size;
1034
930
  }
1035
931
 
1036
- var _mapCacheClear = mapCacheClear;
932
+ // Add methods to `Stack`.
933
+ Stack.prototype.clear = _stackClear;
934
+ Stack.prototype['delete'] = _stackDelete;
935
+ Stack.prototype.get = _stackGet;
936
+ Stack.prototype.has = _stackHas;
937
+ Stack.prototype.set = _stackSet;
938
+
939
+ var _Stack = Stack;
940
+
941
+ /** Used to stand-in for `undefined` hash values. */
942
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1037
943
 
1038
944
  /**
1039
- * Checks if `value` is suitable for use as unique object key.
945
+ * Adds `value` to the array cache.
1040
946
  *
1041
947
  * @private
1042
- * @param {*} value The value to check.
1043
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
948
+ * @name add
949
+ * @memberOf SetCache
950
+ * @alias push
951
+ * @param {*} value The value to cache.
952
+ * @returns {Object} Returns the cache instance.
1044
953
  */
1045
- function isKeyable(value) {
1046
- var type = typeof value;
1047
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1048
- ? (value !== '__proto__')
1049
- : (value === null);
954
+ function setCacheAdd(value) {
955
+ this.__data__.set(value, HASH_UNDEFINED);
956
+ return this;
1050
957
  }
1051
958
 
1052
- var _isKeyable = isKeyable;
959
+ var _setCacheAdd = setCacheAdd;
1053
960
 
1054
961
  /**
1055
- * Gets the data for `map`.
962
+ * Checks if `value` is in the array cache.
1056
963
  *
1057
964
  * @private
1058
- * @param {Object} map The map to query.
1059
- * @param {string} key The reference key.
1060
- * @returns {*} Returns the map data.
965
+ * @name has
966
+ * @memberOf SetCache
967
+ * @param {*} value The value to search for.
968
+ * @returns {number} Returns `true` if `value` is found, else `false`.
1061
969
  */
1062
- function getMapData(map, key) {
1063
- var data = map.__data__;
1064
- return _isKeyable(key)
1065
- ? data[typeof key == 'string' ? 'string' : 'hash']
1066
- : data.map;
970
+ function setCacheHas(value) {
971
+ return this.__data__.has(value);
972
+ }
973
+
974
+ var _setCacheHas = setCacheHas;
975
+
976
+ /**
977
+ *
978
+ * Creates an array cache object to store unique values.
979
+ *
980
+ * @private
981
+ * @constructor
982
+ * @param {Array} [values] The values to cache.
983
+ */
984
+ function SetCache(values) {
985
+ var index = -1,
986
+ length = values == null ? 0 : values.length;
987
+
988
+ this.__data__ = new _MapCache;
989
+ while (++index < length) {
990
+ this.add(values[index]);
991
+ }
992
+ }
993
+
994
+ // Add methods to `SetCache`.
995
+ SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
996
+ SetCache.prototype.has = _setCacheHas;
997
+
998
+ var _SetCache = SetCache;
999
+
1000
+ /**
1001
+ * A specialized version of `_.some` for arrays without support for iteratee
1002
+ * shorthands.
1003
+ *
1004
+ * @private
1005
+ * @param {Array} [array] The array to iterate over.
1006
+ * @param {Function} predicate The function invoked per iteration.
1007
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
1008
+ * else `false`.
1009
+ */
1010
+ function arraySome(array, predicate) {
1011
+ var index = -1,
1012
+ length = array == null ? 0 : array.length;
1013
+
1014
+ while (++index < length) {
1015
+ if (predicate(array[index], index, array)) {
1016
+ return true;
1017
+ }
1018
+ }
1019
+ return false;
1020
+ }
1021
+
1022
+ var _arraySome = arraySome;
1023
+
1024
+ /**
1025
+ * Checks if a `cache` value for `key` exists.
1026
+ *
1027
+ * @private
1028
+ * @param {Object} cache The cache to query.
1029
+ * @param {string} key The key of the entry to check.
1030
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1031
+ */
1032
+ function cacheHas(cache, key) {
1033
+ return cache.has(key);
1034
+ }
1035
+
1036
+ var _cacheHas = cacheHas;
1037
+
1038
+ /** Used to compose bitmasks for value comparisons. */
1039
+ var COMPARE_PARTIAL_FLAG$3 = 1,
1040
+ COMPARE_UNORDERED_FLAG$1 = 2;
1041
+
1042
+ /**
1043
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
1044
+ * partial deep comparisons.
1045
+ *
1046
+ * @private
1047
+ * @param {Array} array The array to compare.
1048
+ * @param {Array} other The other array to compare.
1049
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1050
+ * @param {Function} customizer The function to customize comparisons.
1051
+ * @param {Function} equalFunc The function to determine equivalents of values.
1052
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
1053
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1054
+ */
1055
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
1056
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
1057
+ arrLength = array.length,
1058
+ othLength = other.length;
1059
+
1060
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1061
+ return false;
1062
+ }
1063
+ // Check that cyclic values are equal.
1064
+ var arrStacked = stack.get(array);
1065
+ var othStacked = stack.get(other);
1066
+ if (arrStacked && othStacked) {
1067
+ return arrStacked == other && othStacked == array;
1068
+ }
1069
+ var index = -1,
1070
+ result = true,
1071
+ seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new _SetCache : undefined;
1072
+
1073
+ stack.set(array, other);
1074
+ stack.set(other, array);
1075
+
1076
+ // Ignore non-index properties.
1077
+ while (++index < arrLength) {
1078
+ var arrValue = array[index],
1079
+ othValue = other[index];
1080
+
1081
+ if (customizer) {
1082
+ var compared = isPartial
1083
+ ? customizer(othValue, arrValue, index, other, array, stack)
1084
+ : customizer(arrValue, othValue, index, array, other, stack);
1085
+ }
1086
+ if (compared !== undefined) {
1087
+ if (compared) {
1088
+ continue;
1089
+ }
1090
+ result = false;
1091
+ break;
1092
+ }
1093
+ // Recursively compare arrays (susceptible to call stack limits).
1094
+ if (seen) {
1095
+ if (!_arraySome(other, function(othValue, othIndex) {
1096
+ if (!_cacheHas(seen, othIndex) &&
1097
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
1098
+ return seen.push(othIndex);
1099
+ }
1100
+ })) {
1101
+ result = false;
1102
+ break;
1103
+ }
1104
+ } else if (!(
1105
+ arrValue === othValue ||
1106
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
1107
+ )) {
1108
+ result = false;
1109
+ break;
1110
+ }
1111
+ }
1112
+ stack['delete'](array);
1113
+ stack['delete'](other);
1114
+ return result;
1115
+ }
1116
+
1117
+ var _equalArrays = equalArrays;
1118
+
1119
+ /** Built-in value references. */
1120
+ var Uint8Array = _root.Uint8Array;
1121
+
1122
+ var _Uint8Array = Uint8Array;
1123
+
1124
+ /**
1125
+ * Converts `map` to its key-value pairs.
1126
+ *
1127
+ * @private
1128
+ * @param {Object} map The map to convert.
1129
+ * @returns {Array} Returns the key-value pairs.
1130
+ */
1131
+ function mapToArray(map) {
1132
+ var index = -1,
1133
+ result = Array(map.size);
1134
+
1135
+ map.forEach(function(value, key) {
1136
+ result[++index] = [key, value];
1137
+ });
1138
+ return result;
1139
+ }
1140
+
1141
+ var _mapToArray = mapToArray;
1142
+
1143
+ /**
1144
+ * Converts `set` to an array of its values.
1145
+ *
1146
+ * @private
1147
+ * @param {Object} set The set to convert.
1148
+ * @returns {Array} Returns the values.
1149
+ */
1150
+ function setToArray(set) {
1151
+ var index = -1,
1152
+ result = Array(set.size);
1153
+
1154
+ set.forEach(function(value) {
1155
+ result[++index] = value;
1156
+ });
1157
+ return result;
1158
+ }
1159
+
1160
+ var _setToArray = setToArray;
1161
+
1162
+ /** Used to compose bitmasks for value comparisons. */
1163
+ var COMPARE_PARTIAL_FLAG$2 = 1,
1164
+ COMPARE_UNORDERED_FLAG = 2;
1165
+
1166
+ /** `Object#toString` result references. */
1167
+ var boolTag$1 = '[object Boolean]',
1168
+ dateTag$1 = '[object Date]',
1169
+ errorTag$1 = '[object Error]',
1170
+ mapTag$2 = '[object Map]',
1171
+ numberTag$1 = '[object Number]',
1172
+ regexpTag$1 = '[object RegExp]',
1173
+ setTag$2 = '[object Set]',
1174
+ stringTag$1 = '[object String]',
1175
+ symbolTag$1 = '[object Symbol]';
1176
+
1177
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1178
+ dataViewTag$2 = '[object DataView]';
1179
+
1180
+ /** Used to convert symbols to primitives and strings. */
1181
+ var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
1182
+ symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
1183
+
1184
+ /**
1185
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
1186
+ * the same `toStringTag`.
1187
+ *
1188
+ * **Note:** This function only supports comparing values with tags of
1189
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
1190
+ *
1191
+ * @private
1192
+ * @param {Object} object The object to compare.
1193
+ * @param {Object} other The other object to compare.
1194
+ * @param {string} tag The `toStringTag` of the objects to compare.
1195
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1196
+ * @param {Function} customizer The function to customize comparisons.
1197
+ * @param {Function} equalFunc The function to determine equivalents of values.
1198
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
1199
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1200
+ */
1201
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1202
+ switch (tag) {
1203
+ case dataViewTag$2:
1204
+ if ((object.byteLength != other.byteLength) ||
1205
+ (object.byteOffset != other.byteOffset)) {
1206
+ return false;
1207
+ }
1208
+ object = object.buffer;
1209
+ other = other.buffer;
1210
+
1211
+ case arrayBufferTag$1:
1212
+ if ((object.byteLength != other.byteLength) ||
1213
+ !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
1214
+ return false;
1215
+ }
1216
+ return true;
1217
+
1218
+ case boolTag$1:
1219
+ case dateTag$1:
1220
+ case numberTag$1:
1221
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
1222
+ // Invalid dates are coerced to `NaN`.
1223
+ return eq_1(+object, +other);
1224
+
1225
+ case errorTag$1:
1226
+ return object.name == other.name && object.message == other.message;
1227
+
1228
+ case regexpTag$1:
1229
+ case stringTag$1:
1230
+ // Coerce regexes to strings and treat strings, primitives and objects,
1231
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
1232
+ // for more details.
1233
+ return object == (other + '');
1234
+
1235
+ case mapTag$2:
1236
+ var convert = _mapToArray;
1237
+
1238
+ case setTag$2:
1239
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
1240
+ convert || (convert = _setToArray);
1241
+
1242
+ if (object.size != other.size && !isPartial) {
1243
+ return false;
1244
+ }
1245
+ // Assume cyclic values are equal.
1246
+ var stacked = stack.get(object);
1247
+ if (stacked) {
1248
+ return stacked == other;
1249
+ }
1250
+ bitmask |= COMPARE_UNORDERED_FLAG;
1251
+
1252
+ // Recursively compare objects (susceptible to call stack limits).
1253
+ stack.set(object, other);
1254
+ var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1255
+ stack['delete'](object);
1256
+ return result;
1257
+
1258
+ case symbolTag$1:
1259
+ if (symbolValueOf) {
1260
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
1261
+ }
1262
+ }
1263
+ return false;
1264
+ }
1265
+
1266
+ var _equalByTag = equalByTag;
1267
+
1268
+ /**
1269
+ * Appends the elements of `values` to `array`.
1270
+ *
1271
+ * @private
1272
+ * @param {Array} array The array to modify.
1273
+ * @param {Array} values The values to append.
1274
+ * @returns {Array} Returns `array`.
1275
+ */
1276
+ function arrayPush(array, values) {
1277
+ var index = -1,
1278
+ length = values.length,
1279
+ offset = array.length;
1280
+
1281
+ while (++index < length) {
1282
+ array[offset + index] = values[index];
1283
+ }
1284
+ return array;
1067
1285
  }
1068
1286
 
1069
- var _getMapData = getMapData;
1287
+ var _arrayPush = arrayPush;
1288
+
1289
+ /**
1290
+ * Checks if `value` is classified as an `Array` object.
1291
+ *
1292
+ * @static
1293
+ * @memberOf _
1294
+ * @since 0.1.0
1295
+ * @category Lang
1296
+ * @param {*} value The value to check.
1297
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1298
+ * @example
1299
+ *
1300
+ * _.isArray([1, 2, 3]);
1301
+ * // => true
1302
+ *
1303
+ * _.isArray(document.body.children);
1304
+ * // => false
1305
+ *
1306
+ * _.isArray('abc');
1307
+ * // => false
1308
+ *
1309
+ * _.isArray(_.noop);
1310
+ * // => false
1311
+ */
1312
+ var isArray = Array.isArray;
1313
+
1314
+ var isArray_1 = isArray;
1315
+
1316
+ /**
1317
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1318
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1319
+ * symbols of `object`.
1320
+ *
1321
+ * @private
1322
+ * @param {Object} object The object to query.
1323
+ * @param {Function} keysFunc The function to get the keys of `object`.
1324
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1325
+ * @returns {Array} Returns the array of property names and symbols.
1326
+ */
1327
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1328
+ var result = keysFunc(object);
1329
+ return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
1330
+ }
1331
+
1332
+ var _baseGetAllKeys = baseGetAllKeys;
1333
+
1334
+ /**
1335
+ * A specialized version of `_.filter` for arrays without support for
1336
+ * iteratee shorthands.
1337
+ *
1338
+ * @private
1339
+ * @param {Array} [array] The array to iterate over.
1340
+ * @param {Function} predicate The function invoked per iteration.
1341
+ * @returns {Array} Returns the new filtered array.
1342
+ */
1343
+ function arrayFilter(array, predicate) {
1344
+ var index = -1,
1345
+ length = array == null ? 0 : array.length,
1346
+ resIndex = 0,
1347
+ result = [];
1348
+
1349
+ while (++index < length) {
1350
+ var value = array[index];
1351
+ if (predicate(value, index, array)) {
1352
+ result[resIndex++] = value;
1353
+ }
1354
+ }
1355
+ return result;
1356
+ }
1357
+
1358
+ var _arrayFilter = arrayFilter;
1359
+
1360
+ /**
1361
+ * This method returns a new empty array.
1362
+ *
1363
+ * @static
1364
+ * @memberOf _
1365
+ * @since 4.13.0
1366
+ * @category Util
1367
+ * @returns {Array} Returns the new empty array.
1368
+ * @example
1369
+ *
1370
+ * var arrays = _.times(2, _.stubArray);
1371
+ *
1372
+ * console.log(arrays);
1373
+ * // => [[], []]
1374
+ *
1375
+ * console.log(arrays[0] === arrays[1]);
1376
+ * // => false
1377
+ */
1378
+ function stubArray() {
1379
+ return [];
1380
+ }
1381
+
1382
+ var stubArray_1 = stubArray;
1383
+
1384
+ /** Used for built-in method references. */
1385
+ var objectProto$9 = Object.prototype;
1386
+
1387
+ /** Built-in value references. */
1388
+ var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
1389
+
1390
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1391
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1392
+
1393
+ /**
1394
+ * Creates an array of the own enumerable symbols of `object`.
1395
+ *
1396
+ * @private
1397
+ * @param {Object} object The object to query.
1398
+ * @returns {Array} Returns the array of symbols.
1399
+ */
1400
+ var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
1401
+ if (object == null) {
1402
+ return [];
1403
+ }
1404
+ object = Object(object);
1405
+ return _arrayFilter(nativeGetSymbols(object), function(symbol) {
1406
+ return propertyIsEnumerable$1.call(object, symbol);
1407
+ });
1408
+ };
1409
+
1410
+ var _getSymbols = getSymbols;
1411
+
1412
+ /**
1413
+ * The base implementation of `_.times` without support for iteratee shorthands
1414
+ * or max array length checks.
1415
+ *
1416
+ * @private
1417
+ * @param {number} n The number of times to invoke `iteratee`.
1418
+ * @param {Function} iteratee The function invoked per iteration.
1419
+ * @returns {Array} Returns the array of results.
1420
+ */
1421
+ function baseTimes(n, iteratee) {
1422
+ var index = -1,
1423
+ result = Array(n);
1424
+
1425
+ while (++index < n) {
1426
+ result[index] = iteratee(index);
1427
+ }
1428
+ return result;
1429
+ }
1430
+
1431
+ var _baseTimes = baseTimes;
1432
+
1433
+ /**
1434
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1435
+ * and has a `typeof` result of "object".
1436
+ *
1437
+ * @static
1438
+ * @memberOf _
1439
+ * @since 4.0.0
1440
+ * @category Lang
1441
+ * @param {*} value The value to check.
1442
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1443
+ * @example
1444
+ *
1445
+ * _.isObjectLike({});
1446
+ * // => true
1447
+ *
1448
+ * _.isObjectLike([1, 2, 3]);
1449
+ * // => true
1450
+ *
1451
+ * _.isObjectLike(_.noop);
1452
+ * // => false
1453
+ *
1454
+ * _.isObjectLike(null);
1455
+ * // => false
1456
+ */
1457
+ function isObjectLike(value) {
1458
+ return value != null && typeof value == 'object';
1459
+ }
1460
+
1461
+ var isObjectLike_1 = isObjectLike;
1462
+
1463
+ /** `Object#toString` result references. */
1464
+ var argsTag$2 = '[object Arguments]';
1465
+
1466
+ /**
1467
+ * The base implementation of `_.isArguments`.
1468
+ *
1469
+ * @private
1470
+ * @param {*} value The value to check.
1471
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1472
+ */
1473
+ function baseIsArguments(value) {
1474
+ return isObjectLike_1(value) && _baseGetTag(value) == argsTag$2;
1475
+ }
1476
+
1477
+ var _baseIsArguments = baseIsArguments;
1478
+
1479
+ /** Used for built-in method references. */
1480
+ var objectProto$8 = Object.prototype;
1481
+
1482
+ /** Used to check objects for own properties. */
1483
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
1484
+
1485
+ /** Built-in value references. */
1486
+ var propertyIsEnumerable = objectProto$8.propertyIsEnumerable;
1487
+
1488
+ /**
1489
+ * Checks if `value` is likely an `arguments` object.
1490
+ *
1491
+ * @static
1492
+ * @memberOf _
1493
+ * @since 0.1.0
1494
+ * @category Lang
1495
+ * @param {*} value The value to check.
1496
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1497
+ * else `false`.
1498
+ * @example
1499
+ *
1500
+ * _.isArguments(function() { return arguments; }());
1501
+ * // => true
1502
+ *
1503
+ * _.isArguments([1, 2, 3]);
1504
+ * // => false
1505
+ */
1506
+ var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
1507
+ return isObjectLike_1(value) && hasOwnProperty$7.call(value, 'callee') &&
1508
+ !propertyIsEnumerable.call(value, 'callee');
1509
+ };
1510
+
1511
+ var isArguments_1 = isArguments;
1512
+
1513
+ /**
1514
+ * This method returns `false`.
1515
+ *
1516
+ * @static
1517
+ * @memberOf _
1518
+ * @since 4.13.0
1519
+ * @category Util
1520
+ * @returns {boolean} Returns `false`.
1521
+ * @example
1522
+ *
1523
+ * _.times(2, _.stubFalse);
1524
+ * // => [false, false]
1525
+ */
1526
+ function stubFalse() {
1527
+ return false;
1528
+ }
1529
+
1530
+ var stubFalse_1 = stubFalse;
1531
+
1532
+ var isBuffer_1 = createCommonjsModule(function (module, exports) {
1533
+ /** Detect free variable `exports`. */
1534
+ var freeExports = exports && !exports.nodeType && exports;
1535
+
1536
+ /** Detect free variable `module`. */
1537
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1538
+
1539
+ /** Detect the popular CommonJS extension `module.exports`. */
1540
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1541
+
1542
+ /** Built-in value references. */
1543
+ var Buffer = moduleExports ? _root.Buffer : undefined;
1544
+
1545
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1546
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1547
+
1548
+ /**
1549
+ * Checks if `value` is a buffer.
1550
+ *
1551
+ * @static
1552
+ * @memberOf _
1553
+ * @since 4.3.0
1554
+ * @category Lang
1555
+ * @param {*} value The value to check.
1556
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1557
+ * @example
1558
+ *
1559
+ * _.isBuffer(new Buffer(2));
1560
+ * // => true
1561
+ *
1562
+ * _.isBuffer(new Uint8Array(2));
1563
+ * // => false
1564
+ */
1565
+ var isBuffer = nativeIsBuffer || stubFalse_1;
1566
+
1567
+ module.exports = isBuffer;
1568
+ });
1569
+
1570
+ /** Used as references for various `Number` constants. */
1571
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
1572
+
1573
+ /** Used to detect unsigned integer values. */
1574
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1575
+
1576
+ /**
1577
+ * Checks if `value` is a valid array-like index.
1578
+ *
1579
+ * @private
1580
+ * @param {*} value The value to check.
1581
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1582
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1583
+ */
1584
+ function isIndex(value, length) {
1585
+ var type = typeof value;
1586
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
1587
+
1588
+ return !!length &&
1589
+ (type == 'number' ||
1590
+ (type != 'symbol' && reIsUint.test(value))) &&
1591
+ (value > -1 && value % 1 == 0 && value < length);
1592
+ }
1593
+
1594
+ var _isIndex = isIndex;
1595
+
1596
+ /** Used as references for various `Number` constants. */
1597
+ var MAX_SAFE_INTEGER = 9007199254740991;
1598
+
1599
+ /**
1600
+ * Checks if `value` is a valid array-like length.
1601
+ *
1602
+ * **Note:** This method is loosely based on
1603
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1604
+ *
1605
+ * @static
1606
+ * @memberOf _
1607
+ * @since 4.0.0
1608
+ * @category Lang
1609
+ * @param {*} value The value to check.
1610
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1611
+ * @example
1612
+ *
1613
+ * _.isLength(3);
1614
+ * // => true
1615
+ *
1616
+ * _.isLength(Number.MIN_VALUE);
1617
+ * // => false
1618
+ *
1619
+ * _.isLength(Infinity);
1620
+ * // => false
1621
+ *
1622
+ * _.isLength('3');
1623
+ * // => false
1624
+ */
1625
+ function isLength(value) {
1626
+ return typeof value == 'number' &&
1627
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1628
+ }
1629
+
1630
+ var isLength_1 = isLength;
1631
+
1632
+ /** `Object#toString` result references. */
1633
+ var argsTag$1 = '[object Arguments]',
1634
+ arrayTag$1 = '[object Array]',
1635
+ boolTag = '[object Boolean]',
1636
+ dateTag = '[object Date]',
1637
+ errorTag = '[object Error]',
1638
+ funcTag = '[object Function]',
1639
+ mapTag$1 = '[object Map]',
1640
+ numberTag = '[object Number]',
1641
+ objectTag$3 = '[object Object]',
1642
+ regexpTag = '[object RegExp]',
1643
+ setTag$1 = '[object Set]',
1644
+ stringTag = '[object String]',
1645
+ weakMapTag$1 = '[object WeakMap]';
1646
+
1647
+ var arrayBufferTag = '[object ArrayBuffer]',
1648
+ dataViewTag$1 = '[object DataView]',
1649
+ float32Tag = '[object Float32Array]',
1650
+ float64Tag = '[object Float64Array]',
1651
+ int8Tag = '[object Int8Array]',
1652
+ int16Tag = '[object Int16Array]',
1653
+ int32Tag = '[object Int32Array]',
1654
+ uint8Tag = '[object Uint8Array]',
1655
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1656
+ uint16Tag = '[object Uint16Array]',
1657
+ uint32Tag = '[object Uint32Array]';
1658
+
1659
+ /** Used to identify `toStringTag` values of typed arrays. */
1660
+ var typedArrayTags = {};
1661
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1662
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1663
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1664
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1665
+ typedArrayTags[uint32Tag] = true;
1666
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1667
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1668
+ typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
1669
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1670
+ typedArrayTags[mapTag$1] = typedArrayTags[numberTag] =
1671
+ typedArrayTags[objectTag$3] = typedArrayTags[regexpTag] =
1672
+ typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
1673
+ typedArrayTags[weakMapTag$1] = false;
1674
+
1675
+ /**
1676
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1677
+ *
1678
+ * @private
1679
+ * @param {*} value The value to check.
1680
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1681
+ */
1682
+ function baseIsTypedArray(value) {
1683
+ return isObjectLike_1(value) &&
1684
+ isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
1685
+ }
1686
+
1687
+ var _baseIsTypedArray = baseIsTypedArray;
1688
+
1689
+ /**
1690
+ * The base implementation of `_.unary` without support for storing metadata.
1691
+ *
1692
+ * @private
1693
+ * @param {Function} func The function to cap arguments for.
1694
+ * @returns {Function} Returns the new capped function.
1695
+ */
1696
+ function baseUnary(func) {
1697
+ return function(value) {
1698
+ return func(value);
1699
+ };
1700
+ }
1701
+
1702
+ var _baseUnary = baseUnary;
1703
+
1704
+ var _nodeUtil = createCommonjsModule(function (module, exports) {
1705
+ /** Detect free variable `exports`. */
1706
+ var freeExports = exports && !exports.nodeType && exports;
1707
+
1708
+ /** Detect free variable `module`. */
1709
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1710
+
1711
+ /** Detect the popular CommonJS extension `module.exports`. */
1712
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1713
+
1714
+ /** Detect free variable `process` from Node.js. */
1715
+ var freeProcess = moduleExports && _freeGlobal.process;
1716
+
1717
+ /** Used to access faster Node.js helpers. */
1718
+ var nodeUtil = (function() {
1719
+ try {
1720
+ // Use `util.types` for Node.js 10+.
1721
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
1722
+
1723
+ if (types) {
1724
+ return types;
1725
+ }
1726
+
1727
+ // Legacy `process.binding('util')` for Node.js < 10.
1728
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1729
+ } catch (e) {}
1730
+ }());
1731
+
1732
+ module.exports = nodeUtil;
1733
+ });
1734
+
1735
+ /* Node.js helper references. */
1736
+ var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
1737
+
1738
+ /**
1739
+ * Checks if `value` is classified as a typed array.
1740
+ *
1741
+ * @static
1742
+ * @memberOf _
1743
+ * @since 3.0.0
1744
+ * @category Lang
1745
+ * @param {*} value The value to check.
1746
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1747
+ * @example
1748
+ *
1749
+ * _.isTypedArray(new Uint8Array);
1750
+ * // => true
1751
+ *
1752
+ * _.isTypedArray([]);
1753
+ * // => false
1754
+ */
1755
+ var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
1756
+
1757
+ var isTypedArray_1 = isTypedArray;
1758
+
1759
+ /** Used for built-in method references. */
1760
+ var objectProto$7 = Object.prototype;
1761
+
1762
+ /** Used to check objects for own properties. */
1763
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
1764
+
1765
+ /**
1766
+ * Creates an array of the enumerable property names of the array-like `value`.
1767
+ *
1768
+ * @private
1769
+ * @param {*} value The value to query.
1770
+ * @param {boolean} inherited Specify returning inherited property names.
1771
+ * @returns {Array} Returns the array of property names.
1772
+ */
1773
+ function arrayLikeKeys(value, inherited) {
1774
+ var isArr = isArray_1(value),
1775
+ isArg = !isArr && isArguments_1(value),
1776
+ isBuff = !isArr && !isArg && isBuffer_1(value),
1777
+ isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
1778
+ skipIndexes = isArr || isArg || isBuff || isType,
1779
+ result = skipIndexes ? _baseTimes(value.length, String) : [],
1780
+ length = result.length;
1781
+
1782
+ for (var key in value) {
1783
+ if ((inherited || hasOwnProperty$6.call(value, key)) &&
1784
+ !(skipIndexes && (
1785
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1786
+ key == 'length' ||
1787
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1788
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1789
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1790
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1791
+ // Skip index properties.
1792
+ _isIndex(key, length)
1793
+ ))) {
1794
+ result.push(key);
1795
+ }
1796
+ }
1797
+ return result;
1798
+ }
1799
+
1800
+ var _arrayLikeKeys = arrayLikeKeys;
1801
+
1802
+ /** Used for built-in method references. */
1803
+ var objectProto$6 = Object.prototype;
1804
+
1805
+ /**
1806
+ * Checks if `value` is likely a prototype object.
1807
+ *
1808
+ * @private
1809
+ * @param {*} value The value to check.
1810
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1811
+ */
1812
+ function isPrototype(value) {
1813
+ var Ctor = value && value.constructor,
1814
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$6;
1815
+
1816
+ return value === proto;
1817
+ }
1818
+
1819
+ var _isPrototype = isPrototype;
1820
+
1821
+ /**
1822
+ * Creates a unary function that invokes `func` with its argument transformed.
1823
+ *
1824
+ * @private
1825
+ * @param {Function} func The function to wrap.
1826
+ * @param {Function} transform The argument transform.
1827
+ * @returns {Function} Returns the new function.
1828
+ */
1829
+ function overArg(func, transform) {
1830
+ return function(arg) {
1831
+ return func(transform(arg));
1832
+ };
1833
+ }
1834
+
1835
+ var _overArg = overArg;
1836
+
1837
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1838
+ var nativeKeys = _overArg(Object.keys, Object);
1839
+
1840
+ var _nativeKeys = nativeKeys;
1841
+
1842
+ /** Used for built-in method references. */
1843
+ var objectProto$5 = Object.prototype;
1844
+
1845
+ /** Used to check objects for own properties. */
1846
+ var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
1847
+
1848
+ /**
1849
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1850
+ *
1851
+ * @private
1852
+ * @param {Object} object The object to query.
1853
+ * @returns {Array} Returns the array of property names.
1854
+ */
1855
+ function baseKeys(object) {
1856
+ if (!_isPrototype(object)) {
1857
+ return _nativeKeys(object);
1858
+ }
1859
+ var result = [];
1860
+ for (var key in Object(object)) {
1861
+ if (hasOwnProperty$5.call(object, key) && key != 'constructor') {
1862
+ result.push(key);
1863
+ }
1864
+ }
1865
+ return result;
1866
+ }
1867
+
1868
+ var _baseKeys = baseKeys;
1869
+
1870
+ /**
1871
+ * Checks if `value` is array-like. A value is considered array-like if it's
1872
+ * not a function and has a `value.length` that's an integer greater than or
1873
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1874
+ *
1875
+ * @static
1876
+ * @memberOf _
1877
+ * @since 4.0.0
1878
+ * @category Lang
1879
+ * @param {*} value The value to check.
1880
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1881
+ * @example
1882
+ *
1883
+ * _.isArrayLike([1, 2, 3]);
1884
+ * // => true
1885
+ *
1886
+ * _.isArrayLike(document.body.children);
1887
+ * // => true
1888
+ *
1889
+ * _.isArrayLike('abc');
1890
+ * // => true
1891
+ *
1892
+ * _.isArrayLike(_.noop);
1893
+ * // => false
1894
+ */
1895
+ function isArrayLike(value) {
1896
+ return value != null && isLength_1(value.length) && !isFunction_1(value);
1897
+ }
1898
+
1899
+ var isArrayLike_1 = isArrayLike;
1900
+
1901
+ /**
1902
+ * Creates an array of the own enumerable property names of `object`.
1903
+ *
1904
+ * **Note:** Non-object values are coerced to objects. See the
1905
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1906
+ * for more details.
1907
+ *
1908
+ * @static
1909
+ * @since 0.1.0
1910
+ * @memberOf _
1911
+ * @category Object
1912
+ * @param {Object} object The object to query.
1913
+ * @returns {Array} Returns the array of property names.
1914
+ * @example
1915
+ *
1916
+ * function Foo() {
1917
+ * this.a = 1;
1918
+ * this.b = 2;
1919
+ * }
1920
+ *
1921
+ * Foo.prototype.c = 3;
1922
+ *
1923
+ * _.keys(new Foo);
1924
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1925
+ *
1926
+ * _.keys('hi');
1927
+ * // => ['0', '1']
1928
+ */
1929
+ function keys(object) {
1930
+ return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
1931
+ }
1932
+
1933
+ var keys_1 = keys;
1934
+
1935
+ /**
1936
+ * Creates an array of own enumerable property names and symbols of `object`.
1937
+ *
1938
+ * @private
1939
+ * @param {Object} object The object to query.
1940
+ * @returns {Array} Returns the array of property names and symbols.
1941
+ */
1942
+ function getAllKeys(object) {
1943
+ return _baseGetAllKeys(object, keys_1, _getSymbols);
1944
+ }
1945
+
1946
+ var _getAllKeys = getAllKeys;
1947
+
1948
+ /** Used to compose bitmasks for value comparisons. */
1949
+ var COMPARE_PARTIAL_FLAG$1 = 1;
1950
+
1951
+ /** Used for built-in method references. */
1952
+ var objectProto$4 = Object.prototype;
1953
+
1954
+ /** Used to check objects for own properties. */
1955
+ var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
1956
+
1957
+ /**
1958
+ * A specialized version of `baseIsEqualDeep` for objects with support for
1959
+ * partial deep comparisons.
1960
+ *
1961
+ * @private
1962
+ * @param {Object} object The object to compare.
1963
+ * @param {Object} other The other object to compare.
1964
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1965
+ * @param {Function} customizer The function to customize comparisons.
1966
+ * @param {Function} equalFunc The function to determine equivalents of values.
1967
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
1968
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1969
+ */
1970
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
1971
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
1972
+ objProps = _getAllKeys(object),
1973
+ objLength = objProps.length,
1974
+ othProps = _getAllKeys(other),
1975
+ othLength = othProps.length;
1976
+
1977
+ if (objLength != othLength && !isPartial) {
1978
+ return false;
1979
+ }
1980
+ var index = objLength;
1981
+ while (index--) {
1982
+ var key = objProps[index];
1983
+ if (!(isPartial ? key in other : hasOwnProperty$4.call(other, key))) {
1984
+ return false;
1985
+ }
1986
+ }
1987
+ // Check that cyclic values are equal.
1988
+ var objStacked = stack.get(object);
1989
+ var othStacked = stack.get(other);
1990
+ if (objStacked && othStacked) {
1991
+ return objStacked == other && othStacked == object;
1992
+ }
1993
+ var result = true;
1994
+ stack.set(object, other);
1995
+ stack.set(other, object);
1996
+
1997
+ var skipCtor = isPartial;
1998
+ while (++index < objLength) {
1999
+ key = objProps[index];
2000
+ var objValue = object[key],
2001
+ othValue = other[key];
2002
+
2003
+ if (customizer) {
2004
+ var compared = isPartial
2005
+ ? customizer(othValue, objValue, key, other, object, stack)
2006
+ : customizer(objValue, othValue, key, object, other, stack);
2007
+ }
2008
+ // Recursively compare objects (susceptible to call stack limits).
2009
+ if (!(compared === undefined
2010
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
2011
+ : compared
2012
+ )) {
2013
+ result = false;
2014
+ break;
2015
+ }
2016
+ skipCtor || (skipCtor = key == 'constructor');
2017
+ }
2018
+ if (result && !skipCtor) {
2019
+ var objCtor = object.constructor,
2020
+ othCtor = other.constructor;
2021
+
2022
+ // Non `Object` object instances with different constructors are not equal.
2023
+ if (objCtor != othCtor &&
2024
+ ('constructor' in object && 'constructor' in other) &&
2025
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2026
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2027
+ result = false;
2028
+ }
2029
+ }
2030
+ stack['delete'](object);
2031
+ stack['delete'](other);
2032
+ return result;
2033
+ }
2034
+
2035
+ var _equalObjects = equalObjects;
2036
+
2037
+ /* Built-in method references that are verified to be native. */
2038
+ var DataView = _getNative(_root, 'DataView');
2039
+
2040
+ var _DataView = DataView;
2041
+
2042
+ /* Built-in method references that are verified to be native. */
2043
+ var Promise$1 = _getNative(_root, 'Promise');
2044
+
2045
+ var _Promise = Promise$1;
2046
+
2047
+ /* Built-in method references that are verified to be native. */
2048
+ var Set = _getNative(_root, 'Set');
2049
+
2050
+ var _Set = Set;
2051
+
2052
+ /* Built-in method references that are verified to be native. */
2053
+ var WeakMap = _getNative(_root, 'WeakMap');
2054
+
2055
+ var _WeakMap = WeakMap;
2056
+
2057
+ /** `Object#toString` result references. */
2058
+ var mapTag = '[object Map]',
2059
+ objectTag$2 = '[object Object]',
2060
+ promiseTag = '[object Promise]',
2061
+ setTag = '[object Set]',
2062
+ weakMapTag = '[object WeakMap]';
2063
+
2064
+ var dataViewTag = '[object DataView]';
2065
+
2066
+ /** Used to detect maps, sets, and weakmaps. */
2067
+ var dataViewCtorString = _toSource(_DataView),
2068
+ mapCtorString = _toSource(_Map),
2069
+ promiseCtorString = _toSource(_Promise),
2070
+ setCtorString = _toSource(_Set),
2071
+ weakMapCtorString = _toSource(_WeakMap);
2072
+
2073
+ /**
2074
+ * Gets the `toStringTag` of `value`.
2075
+ *
2076
+ * @private
2077
+ * @param {*} value The value to query.
2078
+ * @returns {string} Returns the `toStringTag`.
2079
+ */
2080
+ var getTag = _baseGetTag;
2081
+
2082
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2083
+ if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
2084
+ (_Map && getTag(new _Map) != mapTag) ||
2085
+ (_Promise && getTag(_Promise.resolve()) != promiseTag) ||
2086
+ (_Set && getTag(new _Set) != setTag) ||
2087
+ (_WeakMap && getTag(new _WeakMap) != weakMapTag)) {
2088
+ getTag = function(value) {
2089
+ var result = _baseGetTag(value),
2090
+ Ctor = result == objectTag$2 ? value.constructor : undefined,
2091
+ ctorString = Ctor ? _toSource(Ctor) : '';
2092
+
2093
+ if (ctorString) {
2094
+ switch (ctorString) {
2095
+ case dataViewCtorString: return dataViewTag;
2096
+ case mapCtorString: return mapTag;
2097
+ case promiseCtorString: return promiseTag;
2098
+ case setCtorString: return setTag;
2099
+ case weakMapCtorString: return weakMapTag;
2100
+ }
2101
+ }
2102
+ return result;
2103
+ };
2104
+ }
2105
+
2106
+ var _getTag = getTag;
2107
+
2108
+ /** Used to compose bitmasks for value comparisons. */
2109
+ var COMPARE_PARTIAL_FLAG = 1;
2110
+
2111
+ /** `Object#toString` result references. */
2112
+ var argsTag = '[object Arguments]',
2113
+ arrayTag = '[object Array]',
2114
+ objectTag$1 = '[object Object]';
2115
+
2116
+ /** Used for built-in method references. */
2117
+ var objectProto$3 = Object.prototype;
2118
+
2119
+ /** Used to check objects for own properties. */
2120
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
2121
+
2122
+ /**
2123
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
2124
+ * deep comparisons and tracks traversed objects enabling objects with circular
2125
+ * references to be compared.
2126
+ *
2127
+ * @private
2128
+ * @param {Object} object The object to compare.
2129
+ * @param {Object} other The other object to compare.
2130
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2131
+ * @param {Function} customizer The function to customize comparisons.
2132
+ * @param {Function} equalFunc The function to determine equivalents of values.
2133
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
2134
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2135
+ */
2136
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
2137
+ var objIsArr = isArray_1(object),
2138
+ othIsArr = isArray_1(other),
2139
+ objTag = objIsArr ? arrayTag : _getTag(object),
2140
+ othTag = othIsArr ? arrayTag : _getTag(other);
2141
+
2142
+ objTag = objTag == argsTag ? objectTag$1 : objTag;
2143
+ othTag = othTag == argsTag ? objectTag$1 : othTag;
2144
+
2145
+ var objIsObj = objTag == objectTag$1,
2146
+ othIsObj = othTag == objectTag$1,
2147
+ isSameTag = objTag == othTag;
2148
+
2149
+ if (isSameTag && isBuffer_1(object)) {
2150
+ if (!isBuffer_1(other)) {
2151
+ return false;
2152
+ }
2153
+ objIsArr = true;
2154
+ objIsObj = false;
2155
+ }
2156
+ if (isSameTag && !objIsObj) {
2157
+ stack || (stack = new _Stack);
2158
+ return (objIsArr || isTypedArray_1(object))
2159
+ ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
2160
+ : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
2161
+ }
2162
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
2163
+ var objIsWrapped = objIsObj && hasOwnProperty$3.call(object, '__wrapped__'),
2164
+ othIsWrapped = othIsObj && hasOwnProperty$3.call(other, '__wrapped__');
2165
+
2166
+ if (objIsWrapped || othIsWrapped) {
2167
+ var objUnwrapped = objIsWrapped ? object.value() : object,
2168
+ othUnwrapped = othIsWrapped ? other.value() : other;
2169
+
2170
+ stack || (stack = new _Stack);
2171
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
2172
+ }
2173
+ }
2174
+ if (!isSameTag) {
2175
+ return false;
2176
+ }
2177
+ stack || (stack = new _Stack);
2178
+ return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
2179
+ }
2180
+
2181
+ var _baseIsEqualDeep = baseIsEqualDeep;
2182
+
2183
+ /**
2184
+ * The base implementation of `_.isEqual` which supports partial comparisons
2185
+ * and tracks traversed objects.
2186
+ *
2187
+ * @private
2188
+ * @param {*} value The value to compare.
2189
+ * @param {*} other The other value to compare.
2190
+ * @param {boolean} bitmask The bitmask flags.
2191
+ * 1 - Unordered comparison
2192
+ * 2 - Partial comparison
2193
+ * @param {Function} [customizer] The function to customize comparisons.
2194
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
2195
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2196
+ */
2197
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
2198
+ if (value === other) {
2199
+ return true;
2200
+ }
2201
+ if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {
2202
+ return value !== value && other !== other;
2203
+ }
2204
+ return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
2205
+ }
2206
+
2207
+ var _baseIsEqual = baseIsEqual;
2208
+
2209
+ /**
2210
+ * Performs a deep comparison between two values to determine if they are
2211
+ * equivalent.
2212
+ *
2213
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
2214
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
2215
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
2216
+ * by their own, not inherited, enumerable properties. Functions and DOM
2217
+ * nodes are compared by strict equality, i.e. `===`.
2218
+ *
2219
+ * @static
2220
+ * @memberOf _
2221
+ * @since 0.1.0
2222
+ * @category Lang
2223
+ * @param {*} value The value to compare.
2224
+ * @param {*} other The other value to compare.
2225
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2226
+ * @example
2227
+ *
2228
+ * var object = { 'a': 1 };
2229
+ * var other = { 'a': 1 };
2230
+ *
2231
+ * _.isEqual(object, other);
2232
+ * // => true
2233
+ *
2234
+ * object === other;
2235
+ * // => false
2236
+ */
2237
+ function isEqual(value, other) {
2238
+ return _baseIsEqual(value, other);
2239
+ }
2240
+
2241
+ var isEqual_1 = isEqual;
2242
+
2243
+ var style$3 = {"select-input":"_d8lGc","disabled":"_3kjwO","wrap":"_dsTM2","select-input-inner":"_NQoX9","large":"_T8ZX8","small":"_1B72H","select-input-icon":"_g8QC-","placeholder":"_r3q69","overlay-content":"_zEqGe","overlay":"_ybN30"};
2244
+
2245
+ const _excluded$1 = ["children"];
2246
+ const numberToPx = val => {
2247
+ return typeof val === 'number' ? `${val}px` : val;
2248
+ };
2249
+ const pxToNumber = value => {
2250
+ if (!value) return 0;
2251
+ const match = value.match(/^\d*(\.\d*)?/);
2252
+ return match ? Number(match[0]) : 0;
2253
+ };
2254
+ const ModalContent = _ref => {
2255
+ let {
2256
+ children
2257
+ } = _ref,
2258
+ others = _objectWithoutPropertiesLoose(_ref, _excluded$1);
2259
+ const {
2260
+ open,
2261
+ value: propsValue
2262
+ } = others;
2263
+ const [value, setValue] = useState(propsValue);
2264
+ useEffect(() => {
2265
+ if (open && !isEqual_1(value, propsValue)) {
2266
+ setValue(propsValue);
2267
+ }
2268
+ }, [open]);
2269
+ const contextProps = Object.assign({}, others, {
2270
+ value,
2271
+ setValue,
2272
+ onComplete: () => others.setValue(value),
2273
+ onAdd: item => others.onAdd(item, setValue),
2274
+ onSelect: item => others.onSelect(item, setValue),
2275
+ onRemove: item => others.onRemove(item, setValue),
2276
+ children
2277
+ });
2278
+ return /*#__PURE__*/React.createElement(Provider, {
2279
+ value: contextProps
2280
+ }, children(contextProps));
2281
+ };
2282
+ const SelectInput = p => {
2283
+ const locale = Object.assign({}, {
2284
+ placeholder: '请选择',
2285
+ selectAll: '全选',
2286
+ selected: '已选',
2287
+ search: '搜索',
2288
+ numberOf: '%s个',
2289
+ maxLengthError: '最大数量不能超过%s',
2290
+ defaultChildren: '下拉内容,需要调用方实现'
2291
+ }, p.locale);
2292
+ const props = Object.assign({}, {
2293
+ children: () => locale.defaultChildren,
2294
+ maxLength: null,
2295
+ single: false,
2296
+ disabled: false,
2297
+ isPopup: true,
2298
+ defaultValue: [],
2299
+ placeholder: locale.placeholder,
2300
+ searchPlaceholder: locale.search,
2301
+ allowSelectedAll: false,
2302
+ selectedAllValue: {
2303
+ value: 'all',
2304
+ label: locale.selectAll
2305
+ },
2306
+ placement: 'bottomLeft',
2307
+ labelWrap: true,
2308
+ showSelectedTag: true,
2309
+ allowClear: true,
2310
+ extra: null,
2311
+ renderModal: contextProps => {
2312
+ const {
2313
+ props,
2314
+ open,
2315
+ onComplete,
2316
+ onOpenChange
2317
+ } = contextProps;
2318
+ const {
2319
+ placeholder,
2320
+ children
2321
+ } = props;
2322
+ return /*#__PURE__*/React.createElement(Modal, {
2323
+ width: 1000,
2324
+ open: open,
2325
+ title: placeholder,
2326
+ onCancel: () => {
2327
+ onOpenChange(false);
2328
+ },
2329
+ onOk: () => {
2330
+ onComplete();
2331
+ onOpenChange(false);
2332
+ }
2333
+ }, children(contextProps));
2334
+ }
2335
+ }, p, {
2336
+ locale
2337
+ });
2338
+ const [value, setValue] = useControlValue(props);
2339
+ const [searchText, setSearchText] = useState('');
2340
+ const [open, setOpen] = useState(false);
2341
+ const [hover, setHover] = useState(false);
2342
+ const [inputWidth, setInputWidth] = useState(0);
2343
+ const inputRef = useResize(el => {
2344
+ setInputWidth(el.clientWidth);
2345
+ });
2346
+ const {
2347
+ children,
2348
+ className,
2349
+ maxLength,
2350
+ overlayClassName,
2351
+ single,
2352
+ labelWrap,
2353
+ isPopup,
2354
+ allowClear,
2355
+ disabled,
2356
+ placeholder,
2357
+ selectedAllValue,
2358
+ overlayWidth,
2359
+ placement,
2360
+ renderModal
2361
+ } = props;
2362
+ const popupOverlayWidth = numberToPx(Math.max(inputWidth, pxToNumber(overlayWidth)));
2363
+ const {
2364
+ message
2365
+ } = App.useApp();
2366
+ const checkMaxLength = (value, maxLength) => {
2367
+ if (Number.isInteger(maxLength) && maxLength > 0 && value.length >= maxLength) {
2368
+ message.error(locale.maxLengthError.replace('%s', maxLength));
2369
+ return false;
2370
+ }
2371
+ return true;
2372
+ };
2373
+ const onRemove = (item, currentSetValue) => {
2374
+ (currentSetValue || setValue)(value => {
2375
+ const newValue = value.slice(0);
2376
+ const index = value.findIndex(currentItem => currentItem.value === item.value);
2377
+ if (index > -1) {
2378
+ newValue.splice(index, 1);
2379
+ }
2380
+ return newValue;
2381
+ });
2382
+ };
2383
+ const onAdd = (item, currentSetValue) => {
2384
+ (currentSetValue || setValue)(value => {
2385
+ if (checkMaxLength(value, maxLength)) {
2386
+ return value;
2387
+ }
2388
+ const newValue = value.slice(0);
2389
+ const index = value.findIndex(currentItem => currentItem.value === item.value);
2390
+ if (index === -1) {
2391
+ newValue.push(item);
2392
+ }
2393
+ return newValue;
2394
+ });
2395
+ };
2396
+ const onSelect = (item, currentSetValue) => {
2397
+ (currentSetValue || setValue)(value => {
2398
+ const newValue = value.slice(0);
2399
+ const index = value.findIndex(currentItem => currentItem.value === item.value);
2400
+ if (index === -1 && !checkMaxLength(value, maxLength)) {
2401
+ return value;
2402
+ }
2403
+ if (index === -1) {
2404
+ newValue.push(item);
2405
+ } else {
2406
+ newValue.splice(index, 1);
2407
+ }
2408
+ return newValue;
2409
+ });
2410
+ };
2411
+ const inputInnerRender = (props = {}) => /*#__PURE__*/React.createElement(Flex, _extends({}, props, {
2412
+ ref: inputRef,
2413
+ className: classnames(className, style$3['select-input'], 'select-input', {
2414
+ [style$3['wrap']]: labelWrap,
2415
+ [style$3['disabled']]: disabled
2416
+ }),
2417
+ justify: "space-between",
2418
+ onMouseOver: () => {
2419
+ setHover(true);
2420
+ },
2421
+ onMouseOut: () => {
2422
+ setHover(false);
2423
+ }
2424
+ }), /*#__PURE__*/React.createElement("div", {
2425
+ className: classnames(style$3['select-input-inner'], 'select-input-inner')
2426
+ }, (value || []).length > 0 ? single || value[0].value === selectedAllValue.value ? value[0].label : value.map(item => {
2427
+ return /*#__PURE__*/React.createElement(Tag, {
2428
+ key: item.value,
2429
+ closable: true,
2430
+ bordered: false,
2431
+ onClose: e => {
2432
+ e.preventDefault();
2433
+ onRemove(item);
2434
+ }
2435
+ }, item.label);
2436
+ }) : /*#__PURE__*/React.createElement("span", {
2437
+ className: classnames(style$3['placeholder'], 'select-input-placeholder')
2438
+ }, placeholder)), /*#__PURE__*/React.createElement("div", {
2439
+ className: classnames(style$3['select-input-icon'], 'select-input-icon')
2440
+ }, !disabled && allowClear && hover && (value || []).length > 0 ? /*#__PURE__*/React.createElement(CloseCircleFilled, {
2441
+ onClick: e => {
2442
+ e.stopPropagation();
2443
+ setValue([]);
2444
+ }
2445
+ }) : /*#__PURE__*/React.createElement(DownOutlined, null)));
2446
+ const contextProps = {
2447
+ props,
2448
+ value,
2449
+ setValue,
2450
+ searchText,
2451
+ setSearchText,
2452
+ hover,
2453
+ inputWidth,
2454
+ onAdd,
2455
+ onRemove,
2456
+ onSelect,
2457
+ open: !disabled && open,
2458
+ onOpenChange: setOpen,
2459
+ children
2460
+ };
2461
+ return /*#__PURE__*/React.createElement(Provider, {
2462
+ value: contextProps
2463
+ }, isPopup ? /*#__PURE__*/React.createElement(Popover, {
2464
+ open: !disabled && open,
2465
+ onOpenChange: setOpen,
2466
+ placement: placement,
2467
+ arrow: false,
2468
+ transitionName: "",
2469
+ overlayClassName: classnames(style$3['overlay'], overlayClassName),
2470
+ trigger: "click",
2471
+ content: /*#__PURE__*/React.createElement("div", {
2472
+ style: {
2473
+ '--overlay-width': popupOverlayWidth
2474
+ },
2475
+ className: classnames(style$3['overlay-content'], 'over-content'),
2476
+ onClick: e => {
2477
+ e.stopPropagation();
2478
+ }
2479
+ }, children(contextProps))
2480
+ }, /*#__PURE__*/React.createElement("span", null, inputInnerRender())) : /*#__PURE__*/React.createElement(React.Fragment, null, inputInnerRender({
2481
+ onClick: () => {
2482
+ setOpen(true);
2483
+ }
2484
+ }), /*#__PURE__*/React.createElement(ModalContent, contextProps, renderModal)));
2485
+ };
2486
+
2487
+ /** `Object#toString` result references. */
2488
+ var symbolTag = '[object Symbol]';
1070
2489
 
1071
2490
  /**
1072
- * Removes `key` and its value from the map.
2491
+ * Checks if `value` is classified as a `Symbol` primitive or object.
1073
2492
  *
1074
- * @private
1075
- * @name delete
1076
- * @memberOf MapCache
1077
- * @param {string} key The key of the value to remove.
1078
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1079
- */
1080
- function mapCacheDelete(key) {
1081
- var result = _getMapData(this, key)['delete'](key);
1082
- this.size -= result ? 1 : 0;
1083
- return result;
1084
- }
1085
-
1086
- var _mapCacheDelete = mapCacheDelete;
1087
-
1088
- /**
1089
- * Gets the map value for `key`.
2493
+ * @static
2494
+ * @memberOf _
2495
+ * @since 4.0.0
2496
+ * @category Lang
2497
+ * @param {*} value The value to check.
2498
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2499
+ * @example
1090
2500
  *
1091
- * @private
1092
- * @name get
1093
- * @memberOf MapCache
1094
- * @param {string} key The key of the value to get.
1095
- * @returns {*} Returns the entry value.
1096
- */
1097
- function mapCacheGet(key) {
1098
- return _getMapData(this, key).get(key);
1099
- }
1100
-
1101
- var _mapCacheGet = mapCacheGet;
1102
-
1103
- /**
1104
- * Checks if a map value for `key` exists.
2501
+ * _.isSymbol(Symbol.iterator);
2502
+ * // => true
1105
2503
  *
1106
- * @private
1107
- * @name has
1108
- * @memberOf MapCache
1109
- * @param {string} key The key of the entry to check.
1110
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2504
+ * _.isSymbol('abc');
2505
+ * // => false
1111
2506
  */
1112
- function mapCacheHas(key) {
1113
- return _getMapData(this, key).has(key);
2507
+ function isSymbol(value) {
2508
+ return typeof value == 'symbol' ||
2509
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
1114
2510
  }
1115
2511
 
1116
- var _mapCacheHas = mapCacheHas;
1117
-
1118
- /**
1119
- * Sets the map `key` to `value`.
1120
- *
1121
- * @private
1122
- * @name set
1123
- * @memberOf MapCache
1124
- * @param {string} key The key of the value to set.
1125
- * @param {*} value The value to set.
1126
- * @returns {Object} Returns the map cache instance.
1127
- */
1128
- function mapCacheSet(key, value) {
1129
- var data = _getMapData(this, key),
1130
- size = data.size;
1131
-
1132
- data.set(key, value);
1133
- this.size += data.size == size ? 0 : 1;
1134
- return this;
1135
- }
2512
+ var isSymbol_1 = isSymbol;
1136
2513
 
1137
- var _mapCacheSet = mapCacheSet;
2514
+ /** Used to match property names within property paths. */
2515
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2516
+ reIsPlainProp = /^\w*$/;
1138
2517
 
1139
2518
  /**
1140
- * Creates a map cache object to store key-value pairs.
2519
+ * Checks if `value` is a property name and not a property path.
1141
2520
  *
1142
2521
  * @private
1143
- * @constructor
1144
- * @param {Array} [entries] The key-value pairs to cache.
2522
+ * @param {*} value The value to check.
2523
+ * @param {Object} [object] The object to query keys on.
2524
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1145
2525
  */
1146
- function MapCache(entries) {
1147
- var index = -1,
1148
- length = entries == null ? 0 : entries.length;
1149
-
1150
- this.clear();
1151
- while (++index < length) {
1152
- var entry = entries[index];
1153
- this.set(entry[0], entry[1]);
2526
+ function isKey(value, object) {
2527
+ if (isArray_1(value)) {
2528
+ return false;
2529
+ }
2530
+ var type = typeof value;
2531
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2532
+ value == null || isSymbol_1(value)) {
2533
+ return true;
1154
2534
  }
2535
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2536
+ (object != null && value in Object(object));
1155
2537
  }
1156
2538
 
1157
- // Add methods to `MapCache`.
1158
- MapCache.prototype.clear = _mapCacheClear;
1159
- MapCache.prototype['delete'] = _mapCacheDelete;
1160
- MapCache.prototype.get = _mapCacheGet;
1161
- MapCache.prototype.has = _mapCacheHas;
1162
- MapCache.prototype.set = _mapCacheSet;
1163
-
1164
- var _MapCache = MapCache;
2539
+ var _isKey = isKey;
1165
2540
 
1166
2541
  /** Error message constants. */
1167
2542
  var FUNC_ERROR_TEXT = 'Expected a function';
@@ -1459,7 +2834,7 @@ function get(object, path, defaultValue) {
1459
2834
 
1460
2835
  var get_1 = get;
1461
2836
 
1462
- var style$2 = {"selected-all":"_prlgN","selected-all-outer":"_h6RBS"};
2837
+ var style$2 = {"selected-all":"_prlgN"};
1463
2838
 
1464
2839
  const SelectedAll = () => {
1465
2840
  const {
@@ -1475,11 +2850,9 @@ const SelectedAll = () => {
1475
2850
  unit: number => locale.numberOf.replace('%s', number)
1476
2851
  }, props);
1477
2852
  const isSelectedAll = computedIsSelectAll(value, selectedAllValue);
1478
- return /*#__PURE__*/React.createElement("div", {
1479
- className: style$2['selected-all-outer']
1480
- }, /*#__PURE__*/React.createElement(Flex, {
2853
+ return /*#__PURE__*/React.createElement(Flex, {
1481
2854
  justify: "space-between",
1482
- className: style$2['selected-all']
2855
+ className: classnames(style$2['selected-all'], 'selected-all')
1483
2856
  }, /*#__PURE__*/React.createElement(Flex, {
1484
2857
  gap: 8
1485
2858
  }, /*#__PURE__*/React.createElement("span", null, locale.selected, ":"), /*#__PURE__*/React.createElement("span", null, isSelectedAll ? selectedAllValue.label : typeof unit === 'function' ? unit(value.length) : value.length)), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Checkbox, {
@@ -1492,165 +2865,48 @@ const SelectedAll = () => {
1492
2865
  setValue([selectedAllValue]);
1493
2866
  }
1494
2867
  }
1495
- }, locale.selectAll))));
2868
+ }, locale.selectAll)));
1496
2869
  };
1497
2870
  const computedIsSelectAll = (value, selectedAllValue) => {
1498
2871
  return (value == null ? void 0 : value.length) === 1 && get_1(value, '[0].value') === selectedAllValue.value;
1499
2872
  };
1500
2873
 
1501
- var style$1 = {"label":"_l3KoW","tag-list":"_CCPzb","tag-list-outer":"_epbhk","tag-container":"_dKZHi","tag-container-inner":"_oijCI"};
1502
-
1503
- const SelectedTagList = () => {
1504
- const {
1505
- props,
1506
- value,
1507
- onRemove
1508
- } = useContext();
1509
- const {
1510
- locale,
1511
- single,
1512
- maxLength
1513
- } = Object.assign({}, props);
1514
- return /*#__PURE__*/React.createElement("div", {
1515
- className: style$1['tag-list-outer']
1516
- }, /*#__PURE__*/React.createElement(Flex, {
1517
- className: style$1['tag-list'],
1518
- gap: 8
1519
- }, /*#__PURE__*/React.createElement("div", {
1520
- className: style$1['label']
1521
- }, locale.selected, !single && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React.createElement(SimpleBar, {
1522
- className: style$1['tag-container']
1523
- }, /*#__PURE__*/React.createElement(Flex, {
1524
- gap: 8,
1525
- wrap: true,
1526
- className: style$1['tag-container-inner']
1527
- }, value.map(item => {
1528
- return /*#__PURE__*/React.createElement(Tag, {
1529
- key: item.value,
1530
- closable: true,
1531
- bordered: false,
1532
- onClose: e => {
1533
- e.preventDefault();
1534
- onRemove(item);
1535
- }
1536
- }, item.label);
1537
- })))));
1538
- };
1539
-
1540
- /**
1541
- * Removes all key-value entries from the stack.
1542
- *
1543
- * @private
1544
- * @name clear
1545
- * @memberOf Stack
1546
- */
1547
- function stackClear() {
1548
- this.__data__ = new _ListCache;
1549
- this.size = 0;
1550
- }
1551
-
1552
- var _stackClear = stackClear;
1553
-
1554
- /**
1555
- * Removes `key` and its value from the stack.
1556
- *
1557
- * @private
1558
- * @name delete
1559
- * @memberOf Stack
1560
- * @param {string} key The key of the value to remove.
1561
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1562
- */
1563
- function stackDelete(key) {
1564
- var data = this.__data__,
1565
- result = data['delete'](key);
1566
-
1567
- this.size = data.size;
1568
- return result;
1569
- }
1570
-
1571
- var _stackDelete = stackDelete;
1572
-
1573
- /**
1574
- * Gets the stack value for `key`.
1575
- *
1576
- * @private
1577
- * @name get
1578
- * @memberOf Stack
1579
- * @param {string} key The key of the value to get.
1580
- * @returns {*} Returns the entry value.
1581
- */
1582
- function stackGet(key) {
1583
- return this.__data__.get(key);
1584
- }
1585
-
1586
- var _stackGet = stackGet;
1587
-
1588
- /**
1589
- * Checks if a stack value for `key` exists.
1590
- *
1591
- * @private
1592
- * @name has
1593
- * @memberOf Stack
1594
- * @param {string} key The key of the entry to check.
1595
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1596
- */
1597
- function stackHas(key) {
1598
- return this.__data__.has(key);
1599
- }
1600
-
1601
- var _stackHas = stackHas;
1602
-
1603
- /** Used as the size to enable large array optimizations. */
1604
- var LARGE_ARRAY_SIZE = 200;
1605
-
1606
- /**
1607
- * Sets the stack `key` to `value`.
1608
- *
1609
- * @private
1610
- * @name set
1611
- * @memberOf Stack
1612
- * @param {string} key The key of the value to set.
1613
- * @param {*} value The value to set.
1614
- * @returns {Object} Returns the stack cache instance.
1615
- */
1616
- function stackSet(key, value) {
1617
- var data = this.__data__;
1618
- if (data instanceof _ListCache) {
1619
- var pairs = data.__data__;
1620
- if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1621
- pairs.push([key, value]);
1622
- this.size = ++data.size;
1623
- return this;
1624
- }
1625
- data = this.__data__ = new _MapCache(pairs);
1626
- }
1627
- data.set(key, value);
1628
- this.size = data.size;
1629
- return this;
1630
- }
1631
-
1632
- var _stackSet = stackSet;
1633
-
1634
- /**
1635
- * Creates a stack cache object to store key-value pairs.
1636
- *
1637
- * @private
1638
- * @constructor
1639
- * @param {Array} [entries] The key-value pairs to cache.
1640
- */
1641
- function Stack(entries) {
1642
- var data = this.__data__ = new _ListCache(entries);
1643
- this.size = data.size;
1644
- }
1645
-
1646
- // Add methods to `Stack`.
1647
- Stack.prototype.clear = _stackClear;
1648
- Stack.prototype['delete'] = _stackDelete;
1649
- Stack.prototype.get = _stackGet;
1650
- Stack.prototype.has = _stackHas;
1651
- Stack.prototype.set = _stackSet;
2874
+ var style$1 = {"label":"_l3KoW","tag-list":"_CCPzb","tag-container":"_dKZHi","tag-container-inner":"_oijCI"};
1652
2875
 
1653
- var _Stack = Stack;
2876
+ const SelectedTagList = () => {
2877
+ const {
2878
+ props,
2879
+ value,
2880
+ onRemove
2881
+ } = useContext();
2882
+ const {
2883
+ locale,
2884
+ single,
2885
+ maxLength
2886
+ } = Object.assign({}, props);
2887
+ return /*#__PURE__*/React.createElement(Flex, {
2888
+ className: classnames(style$1['tag-list'], 'selected-tag-list'),
2889
+ gap: 8
2890
+ }, /*#__PURE__*/React.createElement("div", {
2891
+ className: style$1['label']
2892
+ }, locale.selected, !single && value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React.createElement(SimpleBar, {
2893
+ className: style$1['tag-container']
2894
+ }, /*#__PURE__*/React.createElement(Flex, {
2895
+ gap: 8,
2896
+ wrap: true,
2897
+ className: style$1['tag-container-inner']
2898
+ }, value.map(item => {
2899
+ return /*#__PURE__*/React.createElement(Tag, {
2900
+ key: item.value,
2901
+ closable: true,
2902
+ bordered: false,
2903
+ onClose: e => {
2904
+ e.preventDefault();
2905
+ onRemove(item);
2906
+ }
2907
+ }, item.label);
2908
+ }))));
2909
+ };
1654
2910
 
1655
2911
  var defineProperty = (function() {
1656
2912
  try {
@@ -1781,11 +3037,6 @@ function cloneBuffer(buffer, isDeep) {
1781
3037
  module.exports = cloneBuffer;
1782
3038
  });
1783
3039
 
1784
- /** Built-in value references. */
1785
- var Uint8Array = _root.Uint8Array;
1786
-
1787
- var _Uint8Array = Uint8Array;
1788
-
1789
3040
  /**
1790
3041
  * Creates a clone of `arrayBuffer`.
1791
3042
  *
@@ -1866,46 +3117,11 @@ var baseCreate = (function() {
1866
3117
 
1867
3118
  var _baseCreate = baseCreate;
1868
3119
 
1869
- /**
1870
- * Creates a unary function that invokes `func` with its argument transformed.
1871
- *
1872
- * @private
1873
- * @param {Function} func The function to wrap.
1874
- * @param {Function} transform The argument transform.
1875
- * @returns {Function} Returns the new function.
1876
- */
1877
- function overArg(func, transform) {
1878
- return function(arg) {
1879
- return func(transform(arg));
1880
- };
1881
- }
1882
-
1883
- var _overArg = overArg;
1884
-
1885
3120
  /** Built-in value references. */
1886
3121
  var getPrototype = _overArg(Object.getPrototypeOf, Object);
1887
3122
 
1888
3123
  var _getPrototype = getPrototype;
1889
3124
 
1890
- /** Used for built-in method references. */
1891
- var objectProto$5 = Object.prototype;
1892
-
1893
- /**
1894
- * Checks if `value` is likely a prototype object.
1895
- *
1896
- * @private
1897
- * @param {*} value The value to check.
1898
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1899
- */
1900
- function isPrototype(value) {
1901
- var Ctor = value && value.constructor,
1902
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;
1903
-
1904
- return value === proto;
1905
- }
1906
-
1907
- var _isPrototype = isPrototype;
1908
-
1909
3125
  /**
1910
3126
  * Initializes an object clone.
1911
3127
  *
@@ -1915,229 +3131,55 @@ var _isPrototype = isPrototype;
1915
3131
  */
1916
3132
  function initCloneObject(object) {
1917
3133
  return (typeof object.constructor == 'function' && !_isPrototype(object))
1918
- ? _baseCreate(_getPrototype(object))
1919
- : {};
1920
- }
1921
-
1922
- var _initCloneObject = initCloneObject;
1923
-
1924
- /** `Object#toString` result references. */
1925
- var argsTag$1 = '[object Arguments]';
1926
-
1927
- /**
1928
- * The base implementation of `_.isArguments`.
1929
- *
1930
- * @private
1931
- * @param {*} value The value to check.
1932
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1933
- */
1934
- function baseIsArguments(value) {
1935
- return isObjectLike_1(value) && _baseGetTag(value) == argsTag$1;
1936
- }
1937
-
1938
- var _baseIsArguments = baseIsArguments;
1939
-
1940
- /** Used for built-in method references. */
1941
- var objectProto$4 = Object.prototype;
1942
-
1943
- /** Used to check objects for own properties. */
1944
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
1945
-
1946
- /** Built-in value references. */
1947
- var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
1948
-
1949
- /**
1950
- * Checks if `value` is likely an `arguments` object.
1951
- *
1952
- * @static
1953
- * @memberOf _
1954
- * @since 0.1.0
1955
- * @category Lang
1956
- * @param {*} value The value to check.
1957
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1958
- * else `false`.
1959
- * @example
1960
- *
1961
- * _.isArguments(function() { return arguments; }());
1962
- * // => true
1963
- *
1964
- * _.isArguments([1, 2, 3]);
1965
- * // => false
1966
- */
1967
- var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
1968
- return isObjectLike_1(value) && hasOwnProperty$4.call(value, 'callee') &&
1969
- !propertyIsEnumerable.call(value, 'callee');
1970
- };
1971
-
1972
- var isArguments_1 = isArguments;
1973
-
1974
- /** Used as references for various `Number` constants. */
1975
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
1976
-
1977
- /**
1978
- * Checks if `value` is a valid array-like length.
1979
- *
1980
- * **Note:** This method is loosely based on
1981
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1982
- *
1983
- * @static
1984
- * @memberOf _
1985
- * @since 4.0.0
1986
- * @category Lang
1987
- * @param {*} value The value to check.
1988
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1989
- * @example
1990
- *
1991
- * _.isLength(3);
1992
- * // => true
1993
- *
1994
- * _.isLength(Number.MIN_VALUE);
1995
- * // => false
1996
- *
1997
- * _.isLength(Infinity);
1998
- * // => false
1999
- *
2000
- * _.isLength('3');
2001
- * // => false
2002
- */
2003
- function isLength(value) {
2004
- return typeof value == 'number' &&
2005
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
2006
- }
2007
-
2008
- var isLength_1 = isLength;
2009
-
2010
- /**
2011
- * Checks if `value` is array-like. A value is considered array-like if it's
2012
- * not a function and has a `value.length` that's an integer greater than or
2013
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
2014
- *
2015
- * @static
2016
- * @memberOf _
2017
- * @since 4.0.0
2018
- * @category Lang
2019
- * @param {*} value The value to check.
2020
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
2021
- * @example
2022
- *
2023
- * _.isArrayLike([1, 2, 3]);
2024
- * // => true
2025
- *
2026
- * _.isArrayLike(document.body.children);
2027
- * // => true
2028
- *
2029
- * _.isArrayLike('abc');
2030
- * // => true
2031
- *
2032
- * _.isArrayLike(_.noop);
2033
- * // => false
2034
- */
2035
- function isArrayLike(value) {
2036
- return value != null && isLength_1(value.length) && !isFunction_1(value);
2037
- }
2038
-
2039
- var isArrayLike_1 = isArrayLike;
2040
-
2041
- /**
2042
- * This method is like `_.isArrayLike` except that it also checks if `value`
2043
- * is an object.
2044
- *
2045
- * @static
2046
- * @memberOf _
2047
- * @since 4.0.0
2048
- * @category Lang
2049
- * @param {*} value The value to check.
2050
- * @returns {boolean} Returns `true` if `value` is an array-like object,
2051
- * else `false`.
2052
- * @example
2053
- *
2054
- * _.isArrayLikeObject([1, 2, 3]);
2055
- * // => true
2056
- *
2057
- * _.isArrayLikeObject(document.body.children);
2058
- * // => true
2059
- *
2060
- * _.isArrayLikeObject('abc');
2061
- * // => false
2062
- *
2063
- * _.isArrayLikeObject(_.noop);
2064
- * // => false
2065
- */
2066
- function isArrayLikeObject(value) {
2067
- return isObjectLike_1(value) && isArrayLike_1(value);
2068
- }
2069
-
2070
- var isArrayLikeObject_1 = isArrayLikeObject;
2071
-
2072
- /**
2073
- * This method returns `false`.
2074
- *
2075
- * @static
2076
- * @memberOf _
2077
- * @since 4.13.0
2078
- * @category Util
2079
- * @returns {boolean} Returns `false`.
2080
- * @example
2081
- *
2082
- * _.times(2, _.stubFalse);
2083
- * // => [false, false]
2084
- */
2085
- function stubFalse() {
2086
- return false;
2087
- }
2088
-
2089
- var stubFalse_1 = stubFalse;
2090
-
2091
- var isBuffer_1 = createCommonjsModule(function (module, exports) {
2092
- /** Detect free variable `exports`. */
2093
- var freeExports = exports && !exports.nodeType && exports;
2094
-
2095
- /** Detect free variable `module`. */
2096
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
2097
-
2098
- /** Detect the popular CommonJS extension `module.exports`. */
2099
- var moduleExports = freeModule && freeModule.exports === freeExports;
2100
-
2101
- /** Built-in value references. */
2102
- var Buffer = moduleExports ? _root.Buffer : undefined;
3134
+ ? _baseCreate(_getPrototype(object))
3135
+ : {};
3136
+ }
2103
3137
 
2104
- /* Built-in method references for those with the same name as other `lodash` methods. */
2105
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
3138
+ var _initCloneObject = initCloneObject;
2106
3139
 
2107
3140
  /**
2108
- * Checks if `value` is a buffer.
3141
+ * This method is like `_.isArrayLike` except that it also checks if `value`
3142
+ * is an object.
2109
3143
  *
2110
3144
  * @static
2111
3145
  * @memberOf _
2112
- * @since 4.3.0
3146
+ * @since 4.0.0
2113
3147
  * @category Lang
2114
3148
  * @param {*} value The value to check.
2115
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
3149
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
3150
+ * else `false`.
2116
3151
  * @example
2117
3152
  *
2118
- * _.isBuffer(new Buffer(2));
3153
+ * _.isArrayLikeObject([1, 2, 3]);
2119
3154
  * // => true
2120
3155
  *
2121
- * _.isBuffer(new Uint8Array(2));
3156
+ * _.isArrayLikeObject(document.body.children);
3157
+ * // => true
3158
+ *
3159
+ * _.isArrayLikeObject('abc');
3160
+ * // => false
3161
+ *
3162
+ * _.isArrayLikeObject(_.noop);
2122
3163
  * // => false
2123
3164
  */
2124
- var isBuffer = nativeIsBuffer || stubFalse_1;
3165
+ function isArrayLikeObject(value) {
3166
+ return isObjectLike_1(value) && isArrayLike_1(value);
3167
+ }
2125
3168
 
2126
- module.exports = isBuffer;
2127
- });
3169
+ var isArrayLikeObject_1 = isArrayLikeObject;
2128
3170
 
2129
3171
  /** `Object#toString` result references. */
2130
- var objectTag$1 = '[object Object]';
3172
+ var objectTag = '[object Object]';
2131
3173
 
2132
3174
  /** Used for built-in method references. */
2133
3175
  var funcProto = Function.prototype,
2134
- objectProto$3 = Object.prototype;
3176
+ objectProto$2 = Object.prototype;
2135
3177
 
2136
3178
  /** Used to resolve the decompiled source of functions. */
2137
3179
  var funcToString = funcProto.toString;
2138
3180
 
2139
3181
  /** Used to check objects for own properties. */
2140
- var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
3182
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
2141
3183
 
2142
3184
  /** Used to infer the `Object` constructor. */
2143
3185
  var objectCtorString = funcToString.call(Object);
@@ -2171,147 +3213,20 @@ var objectCtorString = funcToString.call(Object);
2171
3213
  * // => true
2172
3214
  */
2173
3215
  function isPlainObject(value) {
2174
- if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag$1) {
3216
+ if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag) {
2175
3217
  return false;
2176
3218
  }
2177
3219
  var proto = _getPrototype(value);
2178
3220
  if (proto === null) {
2179
3221
  return true;
2180
3222
  }
2181
- var Ctor = hasOwnProperty$3.call(proto, 'constructor') && proto.constructor;
3223
+ var Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor;
2182
3224
  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
2183
3225
  funcToString.call(Ctor) == objectCtorString;
2184
3226
  }
2185
3227
 
2186
3228
  var isPlainObject_1 = isPlainObject;
2187
3229
 
2188
- /** `Object#toString` result references. */
2189
- var argsTag = '[object Arguments]',
2190
- arrayTag = '[object Array]',
2191
- boolTag = '[object Boolean]',
2192
- dateTag = '[object Date]',
2193
- errorTag = '[object Error]',
2194
- funcTag = '[object Function]',
2195
- mapTag = '[object Map]',
2196
- numberTag = '[object Number]',
2197
- objectTag = '[object Object]',
2198
- regexpTag = '[object RegExp]',
2199
- setTag = '[object Set]',
2200
- stringTag = '[object String]',
2201
- weakMapTag = '[object WeakMap]';
2202
-
2203
- var arrayBufferTag = '[object ArrayBuffer]',
2204
- dataViewTag = '[object DataView]',
2205
- float32Tag = '[object Float32Array]',
2206
- float64Tag = '[object Float64Array]',
2207
- int8Tag = '[object Int8Array]',
2208
- int16Tag = '[object Int16Array]',
2209
- int32Tag = '[object Int32Array]',
2210
- uint8Tag = '[object Uint8Array]',
2211
- uint8ClampedTag = '[object Uint8ClampedArray]',
2212
- uint16Tag = '[object Uint16Array]',
2213
- uint32Tag = '[object Uint32Array]';
2214
-
2215
- /** Used to identify `toStringTag` values of typed arrays. */
2216
- var typedArrayTags = {};
2217
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
2218
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
2219
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
2220
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
2221
- typedArrayTags[uint32Tag] = true;
2222
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
2223
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
2224
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
2225
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
2226
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
2227
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
2228
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
2229
- typedArrayTags[weakMapTag] = false;
2230
-
2231
- /**
2232
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
2233
- *
2234
- * @private
2235
- * @param {*} value The value to check.
2236
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2237
- */
2238
- function baseIsTypedArray(value) {
2239
- return isObjectLike_1(value) &&
2240
- isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
2241
- }
2242
-
2243
- var _baseIsTypedArray = baseIsTypedArray;
2244
-
2245
- /**
2246
- * The base implementation of `_.unary` without support for storing metadata.
2247
- *
2248
- * @private
2249
- * @param {Function} func The function to cap arguments for.
2250
- * @returns {Function} Returns the new capped function.
2251
- */
2252
- function baseUnary(func) {
2253
- return function(value) {
2254
- return func(value);
2255
- };
2256
- }
2257
-
2258
- var _baseUnary = baseUnary;
2259
-
2260
- var _nodeUtil = createCommonjsModule(function (module, exports) {
2261
- /** Detect free variable `exports`. */
2262
- var freeExports = exports && !exports.nodeType && exports;
2263
-
2264
- /** Detect free variable `module`. */
2265
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
2266
-
2267
- /** Detect the popular CommonJS extension `module.exports`. */
2268
- var moduleExports = freeModule && freeModule.exports === freeExports;
2269
-
2270
- /** Detect free variable `process` from Node.js. */
2271
- var freeProcess = moduleExports && _freeGlobal.process;
2272
-
2273
- /** Used to access faster Node.js helpers. */
2274
- var nodeUtil = (function() {
2275
- try {
2276
- // Use `util.types` for Node.js 10+.
2277
- var types = freeModule && freeModule.require && freeModule.require('util').types;
2278
-
2279
- if (types) {
2280
- return types;
2281
- }
2282
-
2283
- // Legacy `process.binding('util')` for Node.js < 10.
2284
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
2285
- } catch (e) {}
2286
- }());
2287
-
2288
- module.exports = nodeUtil;
2289
- });
2290
-
2291
- /* Node.js helper references. */
2292
- var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
2293
-
2294
- /**
2295
- * Checks if `value` is classified as a typed array.
2296
- *
2297
- * @static
2298
- * @memberOf _
2299
- * @since 3.0.0
2300
- * @category Lang
2301
- * @param {*} value The value to check.
2302
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2303
- * @example
2304
- *
2305
- * _.isTypedArray(new Uint8Array);
2306
- * // => true
2307
- *
2308
- * _.isTypedArray([]);
2309
- * // => false
2310
- */
2311
- var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
2312
-
2313
- var isTypedArray_1 = isTypedArray;
2314
-
2315
3230
  /**
2316
3231
  * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
2317
3232
  *
@@ -2335,10 +3250,10 @@ function safeGet(object, key) {
2335
3250
  var _safeGet = safeGet;
2336
3251
 
2337
3252
  /** Used for built-in method references. */
2338
- var objectProto$2 = Object.prototype;
3253
+ var objectProto$1 = Object.prototype;
2339
3254
 
2340
3255
  /** Used to check objects for own properties. */
2341
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
3256
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
2342
3257
 
2343
3258
  /**
2344
3259
  * Assigns `value` to `key` of `object` if the existing value is not equivalent
@@ -2352,7 +3267,7 @@ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
2352
3267
  */
2353
3268
  function assignValue(object, key, value) {
2354
3269
  var objValue = object[key];
2355
- if (!(hasOwnProperty$2.call(object, key) && eq_1(objValue, value)) ||
3270
+ if (!(hasOwnProperty$1.call(object, key) && eq_1(objValue, value)) ||
2356
3271
  (value === undefined && !(key in object))) {
2357
3272
  _baseAssignValue(object, key, value);
2358
3273
  }
@@ -2398,96 +3313,6 @@ function copyObject(source, props, object, customizer) {
2398
3313
 
2399
3314
  var _copyObject = copyObject;
2400
3315
 
2401
- /**
2402
- * The base implementation of `_.times` without support for iteratee shorthands
2403
- * or max array length checks.
2404
- *
2405
- * @private
2406
- * @param {number} n The number of times to invoke `iteratee`.
2407
- * @param {Function} iteratee The function invoked per iteration.
2408
- * @returns {Array} Returns the array of results.
2409
- */
2410
- function baseTimes(n, iteratee) {
2411
- var index = -1,
2412
- result = Array(n);
2413
-
2414
- while (++index < n) {
2415
- result[index] = iteratee(index);
2416
- }
2417
- return result;
2418
- }
2419
-
2420
- var _baseTimes = baseTimes;
2421
-
2422
- /** Used as references for various `Number` constants. */
2423
- var MAX_SAFE_INTEGER = 9007199254740991;
2424
-
2425
- /** Used to detect unsigned integer values. */
2426
- var reIsUint = /^(?:0|[1-9]\d*)$/;
2427
-
2428
- /**
2429
- * Checks if `value` is a valid array-like index.
2430
- *
2431
- * @private
2432
- * @param {*} value The value to check.
2433
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2434
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2435
- */
2436
- function isIndex(value, length) {
2437
- var type = typeof value;
2438
- length = length == null ? MAX_SAFE_INTEGER : length;
2439
-
2440
- return !!length &&
2441
- (type == 'number' ||
2442
- (type != 'symbol' && reIsUint.test(value))) &&
2443
- (value > -1 && value % 1 == 0 && value < length);
2444
- }
2445
-
2446
- var _isIndex = isIndex;
2447
-
2448
- /** Used for built-in method references. */
2449
- var objectProto$1 = Object.prototype;
2450
-
2451
- /** Used to check objects for own properties. */
2452
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
2453
-
2454
- /**
2455
- * Creates an array of the enumerable property names of the array-like `value`.
2456
- *
2457
- * @private
2458
- * @param {*} value The value to query.
2459
- * @param {boolean} inherited Specify returning inherited property names.
2460
- * @returns {Array} Returns the array of property names.
2461
- */
2462
- function arrayLikeKeys(value, inherited) {
2463
- var isArr = isArray_1(value),
2464
- isArg = !isArr && isArguments_1(value),
2465
- isBuff = !isArr && !isArg && isBuffer_1(value),
2466
- isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
2467
- skipIndexes = isArr || isArg || isBuff || isType,
2468
- result = skipIndexes ? _baseTimes(value.length, String) : [],
2469
- length = result.length;
2470
-
2471
- for (var key in value) {
2472
- if ((inherited || hasOwnProperty$1.call(value, key)) &&
2473
- !(skipIndexes && (
2474
- // Safari 9 has enumerable `arguments.length` in strict mode.
2475
- key == 'length' ||
2476
- // Node.js 0.10 has enumerable non-index properties on buffers.
2477
- (isBuff && (key == 'offset' || key == 'parent')) ||
2478
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
2479
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
2480
- // Skip index properties.
2481
- _isIndex(key, length)
2482
- ))) {
2483
- result.push(key);
2484
- }
2485
- }
2486
- return result;
2487
- }
2488
-
2489
- var _arrayLikeKeys = arrayLikeKeys;
2490
-
2491
3316
  /**
2492
3317
  * This function is like
2493
3318
  * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
@@ -2999,7 +3824,7 @@ var merge = _createAssigner(function(object, source, srcIndex) {
2999
3824
 
3000
3825
  var merge_1 = merge;
3001
3826
 
3002
- var style = {"list":"_IsXdU","default-list":"_QD1Mz","is-selected-all":"_M-mOy","item-label":"_LLTTB","list-item":"_PKNDm","default-list-item":"_KtOsz","is-selected":"_TQhBB","default-item-label":"_gLh9e","default-item-des":"_GodU-","single-checked":"_2rUrh","is-disabled":"_NbwX5","default-item-description":"_yjSTl"};
3827
+ var style = {"list":"_IsXdU","is-popup":"_-dvpa","default-list":"_QD1Mz","is-selected-all":"_M-mOy","item-label":"_LLTTB","list-item":"_PKNDm","default-list-item":"_KtOsz","is-selected":"_TQhBB","default-item-label":"_gLh9e","default-item-des":"_GodU-","single-checked":"_2rUrh","is-disabled":"_NbwX5","default-item-description":"_yjSTl","selected-all":"_vN2Fx","selected-tag":"_6oITk","select-search":"_iAH9D"};
3003
3828
 
3004
3829
  const _excluded = ["children"];
3005
3830
  const SelectList = _ref => {
@@ -3008,11 +3833,11 @@ const SelectList = _ref => {
3008
3833
  } = _ref,
3009
3834
  p = _objectWithoutPropertiesLoose(_ref, _excluded);
3010
3835
  const props = Object.assign({}, {
3011
- renderList: ({
3836
+ renderItem: ({
3837
+ item,
3012
3838
  props,
3013
3839
  isSelectedAll,
3014
3840
  value,
3015
- list,
3016
3841
  onSelect,
3017
3842
  setValue,
3018
3843
  onOpenChange
@@ -3021,50 +3846,61 @@ const SelectList = _ref => {
3021
3846
  single,
3022
3847
  isPopup
3023
3848
  } = props;
3849
+ const isChecked = value.some(target => target.value === item.value);
3850
+ return /*#__PURE__*/React.createElement(List.Item, {
3851
+ className: classnames(style['default-list-item'], {
3852
+ [style['is-selected']]: isChecked
3853
+ }),
3854
+ key: item.value,
3855
+ onClick: () => {
3856
+ if (item.disabled) {
3857
+ return;
3858
+ }
3859
+ if (isSelectedAll) {
3860
+ return;
3861
+ }
3862
+ if (single) {
3863
+ setValue([item]);
3864
+ } else {
3865
+ onSelect(item);
3866
+ }
3867
+ if (isPopup && single) {
3868
+ onOpenChange(false);
3869
+ }
3870
+ }
3871
+ }, !single && /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Checkbox, {
3872
+ checked: isSelectedAll || isChecked,
3873
+ disabled: isSelectedAll || item.disabled
3874
+ })), /*#__PURE__*/React.createElement(Flex, {
3875
+ vertical: true,
3876
+ gag: 8,
3877
+ flex: 1
3878
+ }, /*#__PURE__*/React.createElement("div", {
3879
+ className: style['default-item-label']
3880
+ }, item.label), item.description && /*#__PURE__*/React.createElement("div", {
3881
+ className: style['default-item-description']
3882
+ }, item.description)), single && /*#__PURE__*/React.createElement("div", {
3883
+ className: style['single-checked']
3884
+ }, isChecked && /*#__PURE__*/React.createElement(CheckOutlined, null)));
3885
+ },
3886
+ renderList: contextProps => {
3887
+ const {
3888
+ props,
3889
+ isSelectedAll,
3890
+ list
3891
+ } = contextProps;
3892
+ const {
3893
+ renderItem
3894
+ } = props;
3024
3895
  return /*#__PURE__*/React.createElement(List, {
3025
3896
  className: classnames(style['default-list'], {
3026
3897
  [style['is-selected-all']]: isSelectedAll
3027
3898
  }),
3028
3899
  size: "small",
3029
3900
  dataSource: list,
3030
- renderItem: item => {
3031
- const isChecked = value.some(target => target.value === item.value);
3032
- return /*#__PURE__*/React.createElement(List.Item, {
3033
- className: classnames(style['default-list-item'], {
3034
- [style['is-selected']]: isChecked
3035
- }),
3036
- key: item.value,
3037
- onClick: () => {
3038
- if (item.disabled) {
3039
- return;
3040
- }
3041
- if (isSelectedAll) {
3042
- return;
3043
- }
3044
- if (single) {
3045
- setValue([item]);
3046
- } else {
3047
- onSelect(item);
3048
- }
3049
- if (isPopup && single) {
3050
- onOpenChange(false);
3051
- }
3052
- }
3053
- }, !single && /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Checkbox, {
3054
- checked: isSelectedAll || isChecked,
3055
- disabled: isSelectedAll || item.disabled
3056
- })), /*#__PURE__*/React.createElement(Flex, {
3057
- vertical: true,
3058
- gag: 8,
3059
- flex: 1
3060
- }, /*#__PURE__*/React.createElement("div", {
3061
- className: style['default-item-label']
3062
- }, item.label), item.description && /*#__PURE__*/React.createElement("div", {
3063
- className: style['default-item-description']
3064
- }, item.description)), single && /*#__PURE__*/React.createElement("div", {
3065
- className: style['single-checked']
3066
- }, isChecked && /*#__PURE__*/React.createElement(CheckOutlined, null)));
3067
- }
3901
+ renderItem: item => renderItem(Object.assign({}, contextProps, {
3902
+ item
3903
+ }))
3068
3904
  });
3069
3905
  }
3070
3906
  }, p);
@@ -3092,6 +3928,9 @@ const SelectList = _ref => {
3092
3928
  } = props;
3093
3929
  const components = {
3094
3930
  search: (api && typeof getSearchProps === 'function' || options && typeof getSearchCallback === 'function') && /*#__PURE__*/React.createElement(SearchInput, {
3931
+ className: classnames(style['select-search'], 'select-search', {
3932
+ 'is-popup': isPopup
3933
+ }),
3095
3934
  placeholder: searchPlaceholder,
3096
3935
  value: searchText,
3097
3936
  onSearch: value => {
@@ -3100,9 +3939,15 @@ const SelectList = _ref => {
3100
3939
  simple: isPopup,
3101
3940
  showSearchButton: !isPopup
3102
3941
  }),
3103
- selectedAll: !single && allowSelectedAll && /*#__PURE__*/React.createElement(SelectedAll, null),
3942
+ selectedAll: !single && allowSelectedAll && /*#__PURE__*/React.createElement("div", {
3943
+ className: classnames(style['selected-all'], 'selected-all', {
3944
+ 'is-popup': isPopup
3945
+ })
3946
+ }, /*#__PURE__*/React.createElement(SelectedAll, null)),
3104
3947
  fetchList: /*#__PURE__*/React.createElement(FetchScrollLoader, _extends({}, props, {
3105
- className: style['list'],
3948
+ className: classnames(style['list'], 'select-list', {
3949
+ 'is-popup': isPopup
3950
+ }),
3106
3951
  api: Object.assign({}, options ? {
3107
3952
  data: {
3108
3953
  options,
@@ -3134,10 +3979,16 @@ const SelectList = _ref => {
3134
3979
  isSelectedAll
3135
3980
  }));
3136
3981
  }),
3137
- selectedTag: showSelectedTag && /*#__PURE__*/React.createElement(SelectedTagList, null)
3982
+ selectedTag: showSelectedTag && /*#__PURE__*/React.createElement("div", {
3983
+ className: classnames(style['selected-tag'], 'selected-tag', {
3984
+ 'is-popup': isPopup
3985
+ })
3986
+ }, /*#__PURE__*/React.createElement(SelectedTagList, null))
3138
3987
  };
3139
3988
  if (typeof children === 'function') {
3140
- return children(components);
3989
+ return children(Object.assign({}, targetProps, {
3990
+ components
3991
+ }));
3141
3992
  }
3142
3993
  return /*#__PURE__*/React.createElement(Flex, {
3143
3994
  vertical: true