@kne/super-select 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +77 -2609
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +114 -2647
- package/dist/index.modern.js.map +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -3,8 +3,12 @@ var globalContext = require('@kne/global-context');
|
|
|
3
3
|
var useResize = require('@kne/use-resize');
|
|
4
4
|
var useControlValue = require('@kne/use-control-value');
|
|
5
5
|
var classnames = require('classnames');
|
|
6
|
+
var isEqual = require('lodash/isEqual');
|
|
7
|
+
var last = require('lodash/last');
|
|
6
8
|
var antd = require('antd');
|
|
7
9
|
var icons = require('@ant-design/icons');
|
|
10
|
+
var isEmpty = require('@kne/is-empty');
|
|
11
|
+
var get = require('lodash/get');
|
|
8
12
|
var SimpleBar = require('simplebar-react');
|
|
9
13
|
require('simplebar-react/dist/simplebar.min.css');
|
|
10
14
|
var SearchInput = require('@kne/search-input');
|
|
@@ -16,6 +20,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
16
20
|
var useResize__default = /*#__PURE__*/_interopDefaultLegacy(useResize);
|
|
17
21
|
var useControlValue__default = /*#__PURE__*/_interopDefaultLegacy(useControlValue);
|
|
18
22
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
23
|
+
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
24
|
+
var last__default = /*#__PURE__*/_interopDefaultLegacy(last);
|
|
25
|
+
var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
19
26
|
var SimpleBar__default = /*#__PURE__*/_interopDefaultLegacy(SimpleBar);
|
|
20
27
|
var SearchInput__default = /*#__PURE__*/_interopDefaultLegacy(SearchInput);
|
|
21
28
|
|
|
@@ -35,2211 +42,6 @@ const {
|
|
|
35
42
|
useContext
|
|
36
43
|
} = context;
|
|
37
44
|
|
|
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
|
-
}
|
|
49
|
-
|
|
50
|
-
var _listCacheClear = listCacheClear;
|
|
51
|
-
|
|
52
|
-
/**
|
|
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.
|
|
56
|
-
*
|
|
57
|
-
* @static
|
|
58
|
-
* @memberOf _
|
|
59
|
-
* @since 4.0.0
|
|
60
|
-
* @category Lang
|
|
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`.
|
|
64
|
-
* @example
|
|
65
|
-
*
|
|
66
|
-
* var object = { 'a': 1 };
|
|
67
|
-
* var other = { 'a': 1 };
|
|
68
|
-
*
|
|
69
|
-
* _.eq(object, object);
|
|
70
|
-
* // => true
|
|
71
|
-
*
|
|
72
|
-
* _.eq(object, other);
|
|
73
|
-
* // => false
|
|
74
|
-
*
|
|
75
|
-
* _.eq('a', 'a');
|
|
76
|
-
* // => true
|
|
77
|
-
*
|
|
78
|
-
* _.eq('a', Object('a'));
|
|
79
|
-
* // => false
|
|
80
|
-
*
|
|
81
|
-
* _.eq(NaN, NaN);
|
|
82
|
-
* // => true
|
|
83
|
-
*/
|
|
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;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/** Detect free variable `global` from Node.js. */
|
|
300
|
-
|
|
301
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
302
|
-
|
|
303
|
-
var _freeGlobal = freeGlobal;
|
|
304
|
-
|
|
305
|
-
/** Detect free variable `self`. */
|
|
306
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
307
|
-
|
|
308
|
-
/** Used as a reference to the global object. */
|
|
309
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
310
|
-
|
|
311
|
-
var _root = root;
|
|
312
|
-
|
|
313
|
-
/** Built-in value references. */
|
|
314
|
-
var Symbol = _root.Symbol;
|
|
315
|
-
|
|
316
|
-
var _Symbol = Symbol;
|
|
317
|
-
|
|
318
|
-
/** Used for built-in method references. */
|
|
319
|
-
var objectProto$b = Object.prototype;
|
|
320
|
-
|
|
321
|
-
/** Used to check objects for own properties. */
|
|
322
|
-
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Used to resolve the
|
|
326
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
327
|
-
* of values.
|
|
328
|
-
*/
|
|
329
|
-
var nativeObjectToString$1 = objectProto$b.toString;
|
|
330
|
-
|
|
331
|
-
/** Built-in value references. */
|
|
332
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
336
|
-
*
|
|
337
|
-
* @private
|
|
338
|
-
* @param {*} value The value to query.
|
|
339
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
340
|
-
*/
|
|
341
|
-
function getRawTag(value) {
|
|
342
|
-
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
|
|
343
|
-
tag = value[symToStringTag$1];
|
|
344
|
-
|
|
345
|
-
try {
|
|
346
|
-
value[symToStringTag$1] = undefined;
|
|
347
|
-
var unmasked = true;
|
|
348
|
-
} catch (e) {}
|
|
349
|
-
|
|
350
|
-
var result = nativeObjectToString$1.call(value);
|
|
351
|
-
if (unmasked) {
|
|
352
|
-
if (isOwn) {
|
|
353
|
-
value[symToStringTag$1] = tag;
|
|
354
|
-
} else {
|
|
355
|
-
delete value[symToStringTag$1];
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
return result;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
var _getRawTag = getRawTag;
|
|
362
|
-
|
|
363
|
-
/** Used for built-in method references. */
|
|
364
|
-
var objectProto$a = Object.prototype;
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Used to resolve the
|
|
368
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
369
|
-
* of values.
|
|
370
|
-
*/
|
|
371
|
-
var nativeObjectToString = objectProto$a.toString;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
375
|
-
*
|
|
376
|
-
* @private
|
|
377
|
-
* @param {*} value The value to convert.
|
|
378
|
-
* @returns {string} Returns the converted string.
|
|
379
|
-
*/
|
|
380
|
-
function objectToString(value) {
|
|
381
|
-
return nativeObjectToString.call(value);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
var _objectToString = objectToString;
|
|
385
|
-
|
|
386
|
-
/** `Object#toString` result references. */
|
|
387
|
-
var nullTag = '[object Null]',
|
|
388
|
-
undefinedTag = '[object Undefined]';
|
|
389
|
-
|
|
390
|
-
/** Built-in value references. */
|
|
391
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
395
|
-
*
|
|
396
|
-
* @private
|
|
397
|
-
* @param {*} value The value to query.
|
|
398
|
-
* @returns {string} Returns the `toStringTag`.
|
|
399
|
-
*/
|
|
400
|
-
function baseGetTag(value) {
|
|
401
|
-
if (value == null) {
|
|
402
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
403
|
-
}
|
|
404
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
405
|
-
? _getRawTag(value)
|
|
406
|
-
: _objectToString(value);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
var _baseGetTag = baseGetTag;
|
|
410
|
-
|
|
411
|
-
/**
|
|
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('')`)
|
|
415
|
-
*
|
|
416
|
-
* @static
|
|
417
|
-
* @memberOf _
|
|
418
|
-
* @since 0.1.0
|
|
419
|
-
* @category Lang
|
|
420
|
-
* @param {*} value The value to check.
|
|
421
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
422
|
-
* @example
|
|
423
|
-
*
|
|
424
|
-
* _.isObject({});
|
|
425
|
-
* // => true
|
|
426
|
-
*
|
|
427
|
-
* _.isObject([1, 2, 3]);
|
|
428
|
-
* // => true
|
|
429
|
-
*
|
|
430
|
-
* _.isObject(_.noop);
|
|
431
|
-
* // => true
|
|
432
|
-
*
|
|
433
|
-
* _.isObject(null);
|
|
434
|
-
* // => false
|
|
435
|
-
*/
|
|
436
|
-
function isObject(value) {
|
|
437
|
-
var type = typeof value;
|
|
438
|
-
return value != null && (type == 'object' || type == 'function');
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
var isObject_1 = isObject;
|
|
442
|
-
|
|
443
|
-
/** `Object#toString` result references. */
|
|
444
|
-
var asyncTag = '[object AsyncFunction]',
|
|
445
|
-
funcTag$1 = '[object Function]',
|
|
446
|
-
genTag = '[object GeneratorFunction]',
|
|
447
|
-
proxyTag = '[object Proxy]';
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* Checks if `value` is classified as a `Function` object.
|
|
451
|
-
*
|
|
452
|
-
* @static
|
|
453
|
-
* @memberOf _
|
|
454
|
-
* @since 0.1.0
|
|
455
|
-
* @category Lang
|
|
456
|
-
* @param {*} value The value to check.
|
|
457
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
458
|
-
* @example
|
|
459
|
-
*
|
|
460
|
-
* _.isFunction(_);
|
|
461
|
-
* // => true
|
|
462
|
-
*
|
|
463
|
-
* _.isFunction(/abc/);
|
|
464
|
-
* // => false
|
|
465
|
-
*/
|
|
466
|
-
function isFunction(value) {
|
|
467
|
-
if (!isObject_1(value)) {
|
|
468
|
-
return false;
|
|
469
|
-
}
|
|
470
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
471
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
472
|
-
var tag = _baseGetTag(value);
|
|
473
|
-
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
var isFunction_1 = isFunction;
|
|
477
|
-
|
|
478
|
-
/** Used to detect overreaching core-js shims. */
|
|
479
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
480
|
-
|
|
481
|
-
var _coreJsData = coreJsData;
|
|
482
|
-
|
|
483
|
-
/** Used to detect methods masquerading as native. */
|
|
484
|
-
var maskSrcKey = (function() {
|
|
485
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
486
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
487
|
-
}());
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* Checks if `func` has its source masked.
|
|
491
|
-
*
|
|
492
|
-
* @private
|
|
493
|
-
* @param {Function} func The function to check.
|
|
494
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
495
|
-
*/
|
|
496
|
-
function isMasked(func) {
|
|
497
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
var _isMasked = isMasked;
|
|
501
|
-
|
|
502
|
-
/** Used for built-in method references. */
|
|
503
|
-
var funcProto$1 = Function.prototype;
|
|
504
|
-
|
|
505
|
-
/** Used to resolve the decompiled source of functions. */
|
|
506
|
-
var funcToString$1 = funcProto$1.toString;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Converts `func` to its source code.
|
|
510
|
-
*
|
|
511
|
-
* @private
|
|
512
|
-
* @param {Function} func The function to convert.
|
|
513
|
-
* @returns {string} Returns the source code.
|
|
514
|
-
*/
|
|
515
|
-
function toSource(func) {
|
|
516
|
-
if (func != null) {
|
|
517
|
-
try {
|
|
518
|
-
return funcToString$1.call(func);
|
|
519
|
-
} catch (e) {}
|
|
520
|
-
try {
|
|
521
|
-
return (func + '');
|
|
522
|
-
} catch (e) {}
|
|
523
|
-
}
|
|
524
|
-
return '';
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
var _toSource = toSource;
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* Used to match `RegExp`
|
|
531
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
532
|
-
*/
|
|
533
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
534
|
-
|
|
535
|
-
/** Used to detect host constructors (Safari). */
|
|
536
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
537
|
-
|
|
538
|
-
/** Used for built-in method references. */
|
|
539
|
-
var funcProto = Function.prototype,
|
|
540
|
-
objectProto$9 = Object.prototype;
|
|
541
|
-
|
|
542
|
-
/** Used to resolve the decompiled source of functions. */
|
|
543
|
-
var funcToString = funcProto.toString;
|
|
544
|
-
|
|
545
|
-
/** Used to check objects for own properties. */
|
|
546
|
-
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
547
|
-
|
|
548
|
-
/** Used to detect if a method is native. */
|
|
549
|
-
var reIsNative = RegExp('^' +
|
|
550
|
-
funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
|
|
551
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
552
|
-
);
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
556
|
-
*
|
|
557
|
-
* @private
|
|
558
|
-
* @param {*} value The value to check.
|
|
559
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
560
|
-
* else `false`.
|
|
561
|
-
*/
|
|
562
|
-
function baseIsNative(value) {
|
|
563
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
564
|
-
return false;
|
|
565
|
-
}
|
|
566
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
567
|
-
return pattern.test(_toSource(value));
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
var _baseIsNative = baseIsNative;
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* Gets the value at `key` of `object`.
|
|
574
|
-
*
|
|
575
|
-
* @private
|
|
576
|
-
* @param {Object} [object] The object to query.
|
|
577
|
-
* @param {string} key The key of the property to get.
|
|
578
|
-
* @returns {*} Returns the property value.
|
|
579
|
-
*/
|
|
580
|
-
function getValue(object, key) {
|
|
581
|
-
return object == null ? undefined : object[key];
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
var _getValue = getValue;
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Gets the native function at `key` of `object`.
|
|
588
|
-
*
|
|
589
|
-
* @private
|
|
590
|
-
* @param {Object} object The object to query.
|
|
591
|
-
* @param {string} key The key of the method to get.
|
|
592
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
593
|
-
*/
|
|
594
|
-
function getNative(object, key) {
|
|
595
|
-
var value = _getValue(object, key);
|
|
596
|
-
return _baseIsNative(value) ? value : undefined;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
var _getNative = getNative;
|
|
600
|
-
|
|
601
|
-
/* Built-in method references that are verified to be native. */
|
|
602
|
-
var Map = _getNative(_root, 'Map');
|
|
603
|
-
|
|
604
|
-
var _Map = Map;
|
|
605
|
-
|
|
606
|
-
/* Built-in method references that are verified to be native. */
|
|
607
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
608
|
-
|
|
609
|
-
var _nativeCreate = nativeCreate;
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* Removes all key-value entries from the hash.
|
|
613
|
-
*
|
|
614
|
-
* @private
|
|
615
|
-
* @name clear
|
|
616
|
-
* @memberOf Hash
|
|
617
|
-
*/
|
|
618
|
-
function hashClear() {
|
|
619
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
620
|
-
this.size = 0;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
var _hashClear = hashClear;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Removes `key` and its value from the hash.
|
|
627
|
-
*
|
|
628
|
-
* @private
|
|
629
|
-
* @name delete
|
|
630
|
-
* @memberOf Hash
|
|
631
|
-
* @param {Object} hash The hash to modify.
|
|
632
|
-
* @param {string} key The key of the value to remove.
|
|
633
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
634
|
-
*/
|
|
635
|
-
function hashDelete(key) {
|
|
636
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
637
|
-
this.size -= result ? 1 : 0;
|
|
638
|
-
return result;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
var _hashDelete = hashDelete;
|
|
642
|
-
|
|
643
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
644
|
-
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
645
|
-
|
|
646
|
-
/** Used for built-in method references. */
|
|
647
|
-
var objectProto$8 = Object.prototype;
|
|
648
|
-
|
|
649
|
-
/** Used to check objects for own properties. */
|
|
650
|
-
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Gets the hash value for `key`.
|
|
654
|
-
*
|
|
655
|
-
* @private
|
|
656
|
-
* @name get
|
|
657
|
-
* @memberOf Hash
|
|
658
|
-
* @param {string} key The key of the value to get.
|
|
659
|
-
* @returns {*} Returns the entry value.
|
|
660
|
-
*/
|
|
661
|
-
function hashGet(key) {
|
|
662
|
-
var data = this.__data__;
|
|
663
|
-
if (_nativeCreate) {
|
|
664
|
-
var result = data[key];
|
|
665
|
-
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
666
|
-
}
|
|
667
|
-
return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
var _hashGet = hashGet;
|
|
671
|
-
|
|
672
|
-
/** Used for built-in method references. */
|
|
673
|
-
var objectProto$7 = Object.prototype;
|
|
674
|
-
|
|
675
|
-
/** Used to check objects for own properties. */
|
|
676
|
-
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* Checks if a hash value for `key` exists.
|
|
680
|
-
*
|
|
681
|
-
* @private
|
|
682
|
-
* @name has
|
|
683
|
-
* @memberOf Hash
|
|
684
|
-
* @param {string} key The key of the entry to check.
|
|
685
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
686
|
-
*/
|
|
687
|
-
function hashHas(key) {
|
|
688
|
-
var data = this.__data__;
|
|
689
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$5.call(data, key);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
var _hashHas = hashHas;
|
|
693
|
-
|
|
694
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
695
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Sets the hash `key` to `value`.
|
|
699
|
-
*
|
|
700
|
-
* @private
|
|
701
|
-
* @name set
|
|
702
|
-
* @memberOf Hash
|
|
703
|
-
* @param {string} key The key of the value to set.
|
|
704
|
-
* @param {*} value The value to set.
|
|
705
|
-
* @returns {Object} Returns the hash instance.
|
|
706
|
-
*/
|
|
707
|
-
function hashSet(key, value) {
|
|
708
|
-
var data = this.__data__;
|
|
709
|
-
this.size += this.has(key) ? 0 : 1;
|
|
710
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
|
|
711
|
-
return this;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
var _hashSet = hashSet;
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* Creates a hash object.
|
|
718
|
-
*
|
|
719
|
-
* @private
|
|
720
|
-
* @constructor
|
|
721
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
722
|
-
*/
|
|
723
|
-
function Hash(entries) {
|
|
724
|
-
var index = -1,
|
|
725
|
-
length = entries == null ? 0 : entries.length;
|
|
726
|
-
|
|
727
|
-
this.clear();
|
|
728
|
-
while (++index < length) {
|
|
729
|
-
var entry = entries[index];
|
|
730
|
-
this.set(entry[0], entry[1]);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
// Add methods to `Hash`.
|
|
735
|
-
Hash.prototype.clear = _hashClear;
|
|
736
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
737
|
-
Hash.prototype.get = _hashGet;
|
|
738
|
-
Hash.prototype.has = _hashHas;
|
|
739
|
-
Hash.prototype.set = _hashSet;
|
|
740
|
-
|
|
741
|
-
var _Hash = Hash;
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* Removes all key-value entries from the map.
|
|
745
|
-
*
|
|
746
|
-
* @private
|
|
747
|
-
* @name clear
|
|
748
|
-
* @memberOf MapCache
|
|
749
|
-
*/
|
|
750
|
-
function mapCacheClear() {
|
|
751
|
-
this.size = 0;
|
|
752
|
-
this.__data__ = {
|
|
753
|
-
'hash': new _Hash,
|
|
754
|
-
'map': new (_Map || _ListCache),
|
|
755
|
-
'string': new _Hash
|
|
756
|
-
};
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
var _mapCacheClear = mapCacheClear;
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
763
|
-
*
|
|
764
|
-
* @private
|
|
765
|
-
* @param {*} value The value to check.
|
|
766
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
767
|
-
*/
|
|
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);
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
var _isKeyable = isKeyable;
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* Gets the data for `map`.
|
|
779
|
-
*
|
|
780
|
-
* @private
|
|
781
|
-
* @param {Object} map The map to query.
|
|
782
|
-
* @param {string} key The reference key.
|
|
783
|
-
* @returns {*} Returns the map data.
|
|
784
|
-
*/
|
|
785
|
-
function getMapData(map, key) {
|
|
786
|
-
var data = map.__data__;
|
|
787
|
-
return _isKeyable(key)
|
|
788
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
789
|
-
: data.map;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
var _getMapData = getMapData;
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* Removes `key` and its value from the map.
|
|
796
|
-
*
|
|
797
|
-
* @private
|
|
798
|
-
* @name delete
|
|
799
|
-
* @memberOf MapCache
|
|
800
|
-
* @param {string} key The key of the value to remove.
|
|
801
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
802
|
-
*/
|
|
803
|
-
function mapCacheDelete(key) {
|
|
804
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
805
|
-
this.size -= result ? 1 : 0;
|
|
806
|
-
return result;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* Gets the map value for `key`.
|
|
813
|
-
*
|
|
814
|
-
* @private
|
|
815
|
-
* @name get
|
|
816
|
-
* @memberOf MapCache
|
|
817
|
-
* @param {string} key The key of the value to get.
|
|
818
|
-
* @returns {*} Returns the entry value.
|
|
819
|
-
*/
|
|
820
|
-
function mapCacheGet(key) {
|
|
821
|
-
return _getMapData(this, key).get(key);
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
var _mapCacheGet = mapCacheGet;
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
* Checks if a map value for `key` exists.
|
|
828
|
-
*
|
|
829
|
-
* @private
|
|
830
|
-
* @name has
|
|
831
|
-
* @memberOf MapCache
|
|
832
|
-
* @param {string} key The key of the entry to check.
|
|
833
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
834
|
-
*/
|
|
835
|
-
function mapCacheHas(key) {
|
|
836
|
-
return _getMapData(this, key).has(key);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
var _mapCacheHas = mapCacheHas;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* Sets the map `key` to `value`.
|
|
843
|
-
*
|
|
844
|
-
* @private
|
|
845
|
-
* @name set
|
|
846
|
-
* @memberOf MapCache
|
|
847
|
-
* @param {string} key The key of the value to set.
|
|
848
|
-
* @param {*} value The value to set.
|
|
849
|
-
* @returns {Object} Returns the map cache instance.
|
|
850
|
-
*/
|
|
851
|
-
function mapCacheSet(key, value) {
|
|
852
|
-
var data = _getMapData(this, key),
|
|
853
|
-
size = data.size;
|
|
854
|
-
|
|
855
|
-
data.set(key, value);
|
|
856
|
-
this.size += data.size == size ? 0 : 1;
|
|
857
|
-
return this;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
var _mapCacheSet = mapCacheSet;
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Creates a map cache object to store key-value pairs.
|
|
864
|
-
*
|
|
865
|
-
* @private
|
|
866
|
-
* @constructor
|
|
867
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
868
|
-
*/
|
|
869
|
-
function MapCache(entries) {
|
|
870
|
-
var index = -1,
|
|
871
|
-
length = entries == null ? 0 : entries.length;
|
|
872
|
-
|
|
873
|
-
this.clear();
|
|
874
|
-
while (++index < length) {
|
|
875
|
-
var entry = entries[index];
|
|
876
|
-
this.set(entry[0], entry[1]);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
|
|
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;
|
|
886
|
-
|
|
887
|
-
var _MapCache = MapCache;
|
|
888
|
-
|
|
889
|
-
/** Used as the size to enable large array optimizations. */
|
|
890
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
891
|
-
|
|
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;
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* Creates a stack cache object to store key-value pairs.
|
|
922
|
-
*
|
|
923
|
-
* @private
|
|
924
|
-
* @constructor
|
|
925
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
926
|
-
*/
|
|
927
|
-
function Stack(entries) {
|
|
928
|
-
var data = this.__data__ = new _ListCache(entries);
|
|
929
|
-
this.size = data.size;
|
|
930
|
-
}
|
|
931
|
-
|
|
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__';
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* Adds `value` to the array cache.
|
|
946
|
-
*
|
|
947
|
-
* @private
|
|
948
|
-
* @name add
|
|
949
|
-
* @memberOf SetCache
|
|
950
|
-
* @alias push
|
|
951
|
-
* @param {*} value The value to cache.
|
|
952
|
-
* @returns {Object} Returns the cache instance.
|
|
953
|
-
*/
|
|
954
|
-
function setCacheAdd(value) {
|
|
955
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
956
|
-
return this;
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
var _setCacheAdd = setCacheAdd;
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* Checks if `value` is in the array cache.
|
|
963
|
-
*
|
|
964
|
-
* @private
|
|
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`.
|
|
969
|
-
*/
|
|
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;
|
|
1285
|
-
}
|
|
1286
|
-
|
|
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$6 = Object.prototype;
|
|
1386
|
-
|
|
1387
|
-
/** Built-in value references. */
|
|
1388
|
-
var propertyIsEnumerable$1 = objectProto$6.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$5 = Object.prototype;
|
|
1481
|
-
|
|
1482
|
-
/** Used to check objects for own properties. */
|
|
1483
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
1484
|
-
|
|
1485
|
-
/** Built-in value references. */
|
|
1486
|
-
var propertyIsEnumerable = objectProto$5.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$4.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$2 = '[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$2] = 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$4 = Object.prototype;
|
|
1761
|
-
|
|
1762
|
-
/** Used to check objects for own properties. */
|
|
1763
|
-
var hasOwnProperty$3 = objectProto$4.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$3.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$3 = 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$3;
|
|
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$2 = Object.prototype;
|
|
1844
|
-
|
|
1845
|
-
/** Used to check objects for own properties. */
|
|
1846
|
-
var hasOwnProperty$2 = objectProto$2.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$2.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$1 = Object.prototype;
|
|
1953
|
-
|
|
1954
|
-
/** Used to check objects for own properties. */
|
|
1955
|
-
var hasOwnProperty$1 = objectProto$1.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$1.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$1 = '[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$1 ? 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 = '[object Object]';
|
|
2115
|
-
|
|
2116
|
-
/** Used for built-in method references. */
|
|
2117
|
-
var objectProto = Object.prototype;
|
|
2118
|
-
|
|
2119
|
-
/** Used to check objects for own properties. */
|
|
2120
|
-
var hasOwnProperty = objectProto.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 : objTag;
|
|
2143
|
-
othTag = othTag == argsTag ? objectTag : othTag;
|
|
2144
|
-
|
|
2145
|
-
var objIsObj = objTag == objectTag,
|
|
2146
|
-
othIsObj = othTag == objectTag,
|
|
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.call(object, '__wrapped__'),
|
|
2164
|
-
othIsWrapped = othIsObj && hasOwnProperty.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
45
|
var style$4 = {"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","select-input-prefix":"_4Pw75","select-input-suffix":"_Wd4pE"};
|
|
2244
46
|
|
|
2245
47
|
const numberToPx = val => {
|
|
@@ -2264,7 +66,7 @@ const ModalContent = _ref => {
|
|
|
2264
66
|
} = others;
|
|
2265
67
|
const [value, setValue] = React.useState(propsValue);
|
|
2266
68
|
React.useEffect(() => {
|
|
2267
|
-
if (open && !
|
|
69
|
+
if (open && !isEqual__default["default"](value, propsValue)) {
|
|
2268
70
|
setValue(propsValue);
|
|
2269
71
|
}
|
|
2270
72
|
}, [open]);
|
|
@@ -2308,7 +110,7 @@ const SelectInput = React.forwardRef((p, ref) => {
|
|
|
2308
110
|
label: locale.selectAll
|
|
2309
111
|
},
|
|
2310
112
|
placement: 'bottomLeft',
|
|
2311
|
-
labelWrap:
|
|
113
|
+
labelWrap: false,
|
|
2312
114
|
showSelectedTag: true,
|
|
2313
115
|
allowClear: true,
|
|
2314
116
|
prefix: null,
|
|
@@ -2345,15 +147,6 @@ const SelectInput = React.forwardRef((p, ref) => {
|
|
|
2345
147
|
[props.valueKey]: props.selectedAllValue.value,
|
|
2346
148
|
[props.labelKey]: props.selectedAllValue.label
|
|
2347
149
|
};
|
|
2348
|
-
const [stateValue, setValue] = useControlValue__default["default"](props);
|
|
2349
|
-
const value = stateValue || [];
|
|
2350
|
-
const [searchText, setSearchText] = React.useState('');
|
|
2351
|
-
const [open, setOpen] = React.useState(false);
|
|
2352
|
-
const [hover, setHover] = React.useState(false);
|
|
2353
|
-
const [inputWidth, setInputWidth] = React.useState(0);
|
|
2354
|
-
const inputRef = useResize__default["default"](el => {
|
|
2355
|
-
setInputWidth(el.clientWidth);
|
|
2356
|
-
});
|
|
2357
150
|
const {
|
|
2358
151
|
children,
|
|
2359
152
|
prefix,
|
|
@@ -2374,6 +167,29 @@ const SelectInput = React.forwardRef((p, ref) => {
|
|
|
2374
167
|
labelKey,
|
|
2375
168
|
valueKey
|
|
2376
169
|
} = props;
|
|
170
|
+
const transformValue = value => {
|
|
171
|
+
if (single) {
|
|
172
|
+
return isEmpty.isNotEmpty(value) ? [value] : [];
|
|
173
|
+
} else {
|
|
174
|
+
return Array.isArray(value) ? value : [];
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const [value, setValue] = useControlValue__default["default"](Object.assign({}, props, {
|
|
178
|
+
onChange: value => {
|
|
179
|
+
props.onChange && props.onChange(props.single ? last__default["default"](value) : value);
|
|
180
|
+
}
|
|
181
|
+
}, 'value' in props ? {
|
|
182
|
+
value: transformValue(props.value)
|
|
183
|
+
} : {
|
|
184
|
+
defaultValue: transformValue(props.defaultValue)
|
|
185
|
+
}));
|
|
186
|
+
const [searchProps, setSearchProps] = React.useState({});
|
|
187
|
+
const [open, setOpen] = React.useState(false);
|
|
188
|
+
const [hover, setHover] = React.useState(false);
|
|
189
|
+
const [inputWidth, setInputWidth] = React.useState(0);
|
|
190
|
+
const inputRef = useResize__default["default"](el => {
|
|
191
|
+
setInputWidth(el.clientWidth);
|
|
192
|
+
});
|
|
2377
193
|
const popupOverlayWidth = numberToPx(Math.max(inputWidth, pxToNumber(overlayWidth)));
|
|
2378
194
|
const {
|
|
2379
195
|
message
|
|
@@ -2423,10 +239,28 @@ const SelectInput = React.forwardRef((p, ref) => {
|
|
|
2423
239
|
return newValue;
|
|
2424
240
|
});
|
|
2425
241
|
};
|
|
242
|
+
const contextProps = {
|
|
243
|
+
props,
|
|
244
|
+
value: value,
|
|
245
|
+
setValue,
|
|
246
|
+
searchProps,
|
|
247
|
+
setSearchProps,
|
|
248
|
+
hover,
|
|
249
|
+
inputWidth,
|
|
250
|
+
onAdd,
|
|
251
|
+
onRemove,
|
|
252
|
+
onSelect,
|
|
253
|
+
open: !disabled && open,
|
|
254
|
+
onOpenChange: setOpen,
|
|
255
|
+
children
|
|
256
|
+
};
|
|
2426
257
|
const inputInnerRender = function (props) {
|
|
2427
258
|
if (props === void 0) {
|
|
2428
259
|
props = {};
|
|
2429
260
|
}
|
|
261
|
+
if (typeof contextProps.props.inputRender === 'function') {
|
|
262
|
+
return contextProps.props.inputRender(props, contextProps);
|
|
263
|
+
}
|
|
2430
264
|
return /*#__PURE__*/React__default["default"].createElement(antd.Flex, _extends({}, props, {
|
|
2431
265
|
ref: inputRef,
|
|
2432
266
|
className: classnames__default["default"](className, style$4['select-input'], 'select-input', {
|
|
@@ -2479,21 +313,6 @@ const SelectInput = React.forwardRef((p, ref) => {
|
|
|
2479
313
|
}, current);
|
|
2480
314
|
})());
|
|
2481
315
|
};
|
|
2482
|
-
const contextProps = {
|
|
2483
|
-
props,
|
|
2484
|
-
value: value,
|
|
2485
|
-
setValue,
|
|
2486
|
-
searchText,
|
|
2487
|
-
setSearchText,
|
|
2488
|
-
hover,
|
|
2489
|
-
inputWidth,
|
|
2490
|
-
onAdd,
|
|
2491
|
-
onRemove,
|
|
2492
|
-
onSelect,
|
|
2493
|
-
open: !disabled && open,
|
|
2494
|
-
onOpenChange: setOpen,
|
|
2495
|
-
children
|
|
2496
|
-
};
|
|
2497
316
|
React.useImperativeHandle(ref, () => {
|
|
2498
317
|
return contextProps;
|
|
2499
318
|
});
|
|
@@ -2522,356 +341,6 @@ const SelectInput = React.forwardRef((p, ref) => {
|
|
|
2522
341
|
}), /*#__PURE__*/React__default["default"].createElement(ModalContent, contextProps, renderModal)));
|
|
2523
342
|
});
|
|
2524
343
|
|
|
2525
|
-
/** `Object#toString` result references. */
|
|
2526
|
-
var symbolTag = '[object Symbol]';
|
|
2527
|
-
|
|
2528
|
-
/**
|
|
2529
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
2530
|
-
*
|
|
2531
|
-
* @static
|
|
2532
|
-
* @memberOf _
|
|
2533
|
-
* @since 4.0.0
|
|
2534
|
-
* @category Lang
|
|
2535
|
-
* @param {*} value The value to check.
|
|
2536
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
2537
|
-
* @example
|
|
2538
|
-
*
|
|
2539
|
-
* _.isSymbol(Symbol.iterator);
|
|
2540
|
-
* // => true
|
|
2541
|
-
*
|
|
2542
|
-
* _.isSymbol('abc');
|
|
2543
|
-
* // => false
|
|
2544
|
-
*/
|
|
2545
|
-
function isSymbol(value) {
|
|
2546
|
-
return typeof value == 'symbol' ||
|
|
2547
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
2548
|
-
}
|
|
2549
|
-
|
|
2550
|
-
var isSymbol_1 = isSymbol;
|
|
2551
|
-
|
|
2552
|
-
/** Used to match property names within property paths. */
|
|
2553
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
2554
|
-
reIsPlainProp = /^\w*$/;
|
|
2555
|
-
|
|
2556
|
-
/**
|
|
2557
|
-
* Checks if `value` is a property name and not a property path.
|
|
2558
|
-
*
|
|
2559
|
-
* @private
|
|
2560
|
-
* @param {*} value The value to check.
|
|
2561
|
-
* @param {Object} [object] The object to query keys on.
|
|
2562
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
2563
|
-
*/
|
|
2564
|
-
function isKey(value, object) {
|
|
2565
|
-
if (isArray_1(value)) {
|
|
2566
|
-
return false;
|
|
2567
|
-
}
|
|
2568
|
-
var type = typeof value;
|
|
2569
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
2570
|
-
value == null || isSymbol_1(value)) {
|
|
2571
|
-
return true;
|
|
2572
|
-
}
|
|
2573
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
2574
|
-
(object != null && value in Object(object));
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
var _isKey = isKey;
|
|
2578
|
-
|
|
2579
|
-
/** Error message constants. */
|
|
2580
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
2581
|
-
|
|
2582
|
-
/**
|
|
2583
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
2584
|
-
* provided, it determines the cache key for storing the result based on the
|
|
2585
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
2586
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
2587
|
-
* is invoked with the `this` binding of the memoized function.
|
|
2588
|
-
*
|
|
2589
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
2590
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
2591
|
-
* constructor with one whose instances implement the
|
|
2592
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
2593
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
2594
|
-
*
|
|
2595
|
-
* @static
|
|
2596
|
-
* @memberOf _
|
|
2597
|
-
* @since 0.1.0
|
|
2598
|
-
* @category Function
|
|
2599
|
-
* @param {Function} func The function to have its output memoized.
|
|
2600
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
2601
|
-
* @returns {Function} Returns the new memoized function.
|
|
2602
|
-
* @example
|
|
2603
|
-
*
|
|
2604
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
2605
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
2606
|
-
*
|
|
2607
|
-
* var values = _.memoize(_.values);
|
|
2608
|
-
* values(object);
|
|
2609
|
-
* // => [1, 2]
|
|
2610
|
-
*
|
|
2611
|
-
* values(other);
|
|
2612
|
-
* // => [3, 4]
|
|
2613
|
-
*
|
|
2614
|
-
* object.a = 2;
|
|
2615
|
-
* values(object);
|
|
2616
|
-
* // => [1, 2]
|
|
2617
|
-
*
|
|
2618
|
-
* // Modify the result cache.
|
|
2619
|
-
* values.cache.set(object, ['a', 'b']);
|
|
2620
|
-
* values(object);
|
|
2621
|
-
* // => ['a', 'b']
|
|
2622
|
-
*
|
|
2623
|
-
* // Replace `_.memoize.Cache`.
|
|
2624
|
-
* _.memoize.Cache = WeakMap;
|
|
2625
|
-
*/
|
|
2626
|
-
function memoize(func, resolver) {
|
|
2627
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
2628
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2629
|
-
}
|
|
2630
|
-
var memoized = function() {
|
|
2631
|
-
var args = arguments,
|
|
2632
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
2633
|
-
cache = memoized.cache;
|
|
2634
|
-
|
|
2635
|
-
if (cache.has(key)) {
|
|
2636
|
-
return cache.get(key);
|
|
2637
|
-
}
|
|
2638
|
-
var result = func.apply(this, args);
|
|
2639
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
2640
|
-
return result;
|
|
2641
|
-
};
|
|
2642
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
2643
|
-
return memoized;
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
// Expose `MapCache`.
|
|
2647
|
-
memoize.Cache = _MapCache;
|
|
2648
|
-
|
|
2649
|
-
var memoize_1 = memoize;
|
|
2650
|
-
|
|
2651
|
-
/** Used as the maximum memoize cache size. */
|
|
2652
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
2653
|
-
|
|
2654
|
-
/**
|
|
2655
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
2656
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
2657
|
-
*
|
|
2658
|
-
* @private
|
|
2659
|
-
* @param {Function} func The function to have its output memoized.
|
|
2660
|
-
* @returns {Function} Returns the new memoized function.
|
|
2661
|
-
*/
|
|
2662
|
-
function memoizeCapped(func) {
|
|
2663
|
-
var result = memoize_1(func, function(key) {
|
|
2664
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
2665
|
-
cache.clear();
|
|
2666
|
-
}
|
|
2667
|
-
return key;
|
|
2668
|
-
});
|
|
2669
|
-
|
|
2670
|
-
var cache = result.cache;
|
|
2671
|
-
return result;
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
var _memoizeCapped = memoizeCapped;
|
|
2675
|
-
|
|
2676
|
-
/** Used to match property names within property paths. */
|
|
2677
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
2678
|
-
|
|
2679
|
-
/** Used to match backslashes in property paths. */
|
|
2680
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
2681
|
-
|
|
2682
|
-
/**
|
|
2683
|
-
* Converts `string` to a property path array.
|
|
2684
|
-
*
|
|
2685
|
-
* @private
|
|
2686
|
-
* @param {string} string The string to convert.
|
|
2687
|
-
* @returns {Array} Returns the property path array.
|
|
2688
|
-
*/
|
|
2689
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
2690
|
-
var result = [];
|
|
2691
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
2692
|
-
result.push('');
|
|
2693
|
-
}
|
|
2694
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
2695
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
2696
|
-
});
|
|
2697
|
-
return result;
|
|
2698
|
-
});
|
|
2699
|
-
|
|
2700
|
-
var _stringToPath = stringToPath;
|
|
2701
|
-
|
|
2702
|
-
/**
|
|
2703
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
2704
|
-
* shorthands.
|
|
2705
|
-
*
|
|
2706
|
-
* @private
|
|
2707
|
-
* @param {Array} [array] The array to iterate over.
|
|
2708
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2709
|
-
* @returns {Array} Returns the new mapped array.
|
|
2710
|
-
*/
|
|
2711
|
-
function arrayMap(array, iteratee) {
|
|
2712
|
-
var index = -1,
|
|
2713
|
-
length = array == null ? 0 : array.length,
|
|
2714
|
-
result = Array(length);
|
|
2715
|
-
|
|
2716
|
-
while (++index < length) {
|
|
2717
|
-
result[index] = iteratee(array[index], index, array);
|
|
2718
|
-
}
|
|
2719
|
-
return result;
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
var _arrayMap = arrayMap;
|
|
2723
|
-
|
|
2724
|
-
/** Used as references for various `Number` constants. */
|
|
2725
|
-
var INFINITY$1 = 1 / 0;
|
|
2726
|
-
|
|
2727
|
-
/** Used to convert symbols to primitives and strings. */
|
|
2728
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
2729
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
2730
|
-
|
|
2731
|
-
/**
|
|
2732
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
2733
|
-
* values to empty strings.
|
|
2734
|
-
*
|
|
2735
|
-
* @private
|
|
2736
|
-
* @param {*} value The value to process.
|
|
2737
|
-
* @returns {string} Returns the string.
|
|
2738
|
-
*/
|
|
2739
|
-
function baseToString(value) {
|
|
2740
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
2741
|
-
if (typeof value == 'string') {
|
|
2742
|
-
return value;
|
|
2743
|
-
}
|
|
2744
|
-
if (isArray_1(value)) {
|
|
2745
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
2746
|
-
return _arrayMap(value, baseToString) + '';
|
|
2747
|
-
}
|
|
2748
|
-
if (isSymbol_1(value)) {
|
|
2749
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
2750
|
-
}
|
|
2751
|
-
var result = (value + '');
|
|
2752
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
var _baseToString = baseToString;
|
|
2756
|
-
|
|
2757
|
-
/**
|
|
2758
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
2759
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
2760
|
-
*
|
|
2761
|
-
* @static
|
|
2762
|
-
* @memberOf _
|
|
2763
|
-
* @since 4.0.0
|
|
2764
|
-
* @category Lang
|
|
2765
|
-
* @param {*} value The value to convert.
|
|
2766
|
-
* @returns {string} Returns the converted string.
|
|
2767
|
-
* @example
|
|
2768
|
-
*
|
|
2769
|
-
* _.toString(null);
|
|
2770
|
-
* // => ''
|
|
2771
|
-
*
|
|
2772
|
-
* _.toString(-0);
|
|
2773
|
-
* // => '-0'
|
|
2774
|
-
*
|
|
2775
|
-
* _.toString([1, 2, 3]);
|
|
2776
|
-
* // => '1,2,3'
|
|
2777
|
-
*/
|
|
2778
|
-
function toString(value) {
|
|
2779
|
-
return value == null ? '' : _baseToString(value);
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2782
|
-
var toString_1 = toString;
|
|
2783
|
-
|
|
2784
|
-
/**
|
|
2785
|
-
* Casts `value` to a path array if it's not one.
|
|
2786
|
-
*
|
|
2787
|
-
* @private
|
|
2788
|
-
* @param {*} value The value to inspect.
|
|
2789
|
-
* @param {Object} [object] The object to query keys on.
|
|
2790
|
-
* @returns {Array} Returns the cast property path array.
|
|
2791
|
-
*/
|
|
2792
|
-
function castPath(value, object) {
|
|
2793
|
-
if (isArray_1(value)) {
|
|
2794
|
-
return value;
|
|
2795
|
-
}
|
|
2796
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
var _castPath = castPath;
|
|
2800
|
-
|
|
2801
|
-
/** Used as references for various `Number` constants. */
|
|
2802
|
-
var INFINITY = 1 / 0;
|
|
2803
|
-
|
|
2804
|
-
/**
|
|
2805
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
2806
|
-
*
|
|
2807
|
-
* @private
|
|
2808
|
-
* @param {*} value The value to inspect.
|
|
2809
|
-
* @returns {string|symbol} Returns the key.
|
|
2810
|
-
*/
|
|
2811
|
-
function toKey(value) {
|
|
2812
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
2813
|
-
return value;
|
|
2814
|
-
}
|
|
2815
|
-
var result = (value + '');
|
|
2816
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
var _toKey = toKey;
|
|
2820
|
-
|
|
2821
|
-
/**
|
|
2822
|
-
* The base implementation of `_.get` without support for default values.
|
|
2823
|
-
*
|
|
2824
|
-
* @private
|
|
2825
|
-
* @param {Object} object The object to query.
|
|
2826
|
-
* @param {Array|string} path The path of the property to get.
|
|
2827
|
-
* @returns {*} Returns the resolved value.
|
|
2828
|
-
*/
|
|
2829
|
-
function baseGet(object, path) {
|
|
2830
|
-
path = _castPath(path, object);
|
|
2831
|
-
|
|
2832
|
-
var index = 0,
|
|
2833
|
-
length = path.length;
|
|
2834
|
-
|
|
2835
|
-
while (object != null && index < length) {
|
|
2836
|
-
object = object[_toKey(path[index++])];
|
|
2837
|
-
}
|
|
2838
|
-
return (index && index == length) ? object : undefined;
|
|
2839
|
-
}
|
|
2840
|
-
|
|
2841
|
-
var _baseGet = baseGet;
|
|
2842
|
-
|
|
2843
|
-
/**
|
|
2844
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
2845
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
2846
|
-
*
|
|
2847
|
-
* @static
|
|
2848
|
-
* @memberOf _
|
|
2849
|
-
* @since 3.7.0
|
|
2850
|
-
* @category Object
|
|
2851
|
-
* @param {Object} object The object to query.
|
|
2852
|
-
* @param {Array|string} path The path of the property to get.
|
|
2853
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
2854
|
-
* @returns {*} Returns the resolved value.
|
|
2855
|
-
* @example
|
|
2856
|
-
*
|
|
2857
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
2858
|
-
*
|
|
2859
|
-
* _.get(object, 'a[0].b.c');
|
|
2860
|
-
* // => 3
|
|
2861
|
-
*
|
|
2862
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
2863
|
-
* // => 3
|
|
2864
|
-
*
|
|
2865
|
-
* _.get(object, 'a.b.c', 'default');
|
|
2866
|
-
* // => 'default'
|
|
2867
|
-
*/
|
|
2868
|
-
function get(object, path, defaultValue) {
|
|
2869
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
2870
|
-
return result === undefined ? defaultValue : result;
|
|
2871
|
-
}
|
|
2872
|
-
|
|
2873
|
-
var get_1 = get;
|
|
2874
|
-
|
|
2875
344
|
var style$3 = {"selected-all":"_prlgN"};
|
|
2876
345
|
|
|
2877
346
|
const SelectedAll = () => {
|
|
@@ -2910,7 +379,7 @@ const computedIsSelectAll = function (value, selectedAllValue, valueKey) {
|
|
|
2910
379
|
if (valueKey === void 0) {
|
|
2911
380
|
valueKey = 'value';
|
|
2912
381
|
}
|
|
2913
|
-
return value?.length === 1 &&
|
|
382
|
+
return value?.length === 1 && get__default["default"](value, `[0][${valueKey}]`) === selectedAllValue[valueKey];
|
|
2914
383
|
};
|
|
2915
384
|
|
|
2916
385
|
var style$2 = {"label":"_l3KoW","tag-list":"_CCPzb","tag-container":"_dKZHi","tag-container-inner":"_oijCI","tag":"_WmnnS","tag-inner":"_TMcFl"};
|
|
@@ -3055,8 +524,8 @@ const SelectList = React.forwardRef((_ref, ref) => {
|
|
|
3055
524
|
const {
|
|
3056
525
|
props,
|
|
3057
526
|
value,
|
|
3058
|
-
|
|
3059
|
-
|
|
527
|
+
searchProps,
|
|
528
|
+
setSearchProps
|
|
3060
529
|
} = targetProps;
|
|
3061
530
|
const {
|
|
3062
531
|
isPopup,
|
|
@@ -3078,9 +547,11 @@ const SelectList = React.forwardRef((_ref, ref) => {
|
|
|
3078
547
|
'is-popup': isPopup
|
|
3079
548
|
}),
|
|
3080
549
|
placeholder: searchPlaceholder,
|
|
3081
|
-
value: searchText,
|
|
550
|
+
value: searchProps.searchText,
|
|
3082
551
|
onSearch: value => {
|
|
3083
|
-
|
|
552
|
+
setSearchProps(searchProps => Object.assign({}, searchProps, {
|
|
553
|
+
searchText: value
|
|
554
|
+
}));
|
|
3084
555
|
},
|
|
3085
556
|
simple: isPopup,
|
|
3086
557
|
showSearchButton: !isPopup
|
|
@@ -3094,14 +565,12 @@ const SelectList = React.forwardRef((_ref, ref) => {
|
|
|
3094
565
|
className: classnames__default["default"](style$1['list'], 'select-list-scroll-list', {
|
|
3095
566
|
'is-popup': isPopup
|
|
3096
567
|
}),
|
|
3097
|
-
searchProps:
|
|
3098
|
-
searchText
|
|
3099
|
-
},
|
|
568
|
+
searchProps: searchProps,
|
|
3100
569
|
getSearchProps: getSearchProps,
|
|
3101
570
|
api: Object.assign({}, options ? {
|
|
3102
571
|
data: {
|
|
3103
572
|
options,
|
|
3104
|
-
|
|
573
|
+
searchProps
|
|
3105
574
|
},
|
|
3106
575
|
loader: _ref3 => {
|
|
3107
576
|
let {
|
|
@@ -3109,10 +578,10 @@ const SelectList = React.forwardRef((_ref, ref) => {
|
|
|
3109
578
|
} = _ref3;
|
|
3110
579
|
const {
|
|
3111
580
|
options,
|
|
3112
|
-
|
|
581
|
+
searchProps
|
|
3113
582
|
} = data;
|
|
3114
583
|
if (typeof getSearchCallback === 'function') {
|
|
3115
|
-
const newOptions = options.filter(item => getSearchCallback(
|
|
584
|
+
const newOptions = options.filter(item => getSearchCallback(searchProps, item));
|
|
3116
585
|
return {
|
|
3117
586
|
pageData: newOptions
|
|
3118
587
|
};
|
|
@@ -3148,15 +617,14 @@ const SelectList = React.forwardRef((_ref, ref) => {
|
|
|
3148
617
|
var style = {"list":"_DrEYJ","is-popup":"_KgWTX","header":"_Vmbrg","col":"_dJmfs","body":"_704J1","is-selected-all":"_qU5zU","is-selected":"_MzyWg","is-disabled":"_5luTv","right-options":"_UXi-g","no-padding-btn":"_iaCir","tag":"_JkYqS","tag-inner":"_VZlBL","single-checked":"_Eiz-u","select-search":"_temy6","tags-search":"_7phL2","descriptions":"_ttNK9","descriptions-col-label":"_xU-i7","descriptions-col-content":"_SvfzQ"};
|
|
3149
618
|
|
|
3150
619
|
const SelectTableList = React.forwardRef((p, ref) => {
|
|
3151
|
-
const [filter, setFilter] = React.useState({});
|
|
3152
620
|
const [tagSearchText, setTagSearchText] = React.useState('');
|
|
3153
621
|
const props = Object.assign({}, {
|
|
3154
622
|
overlayWidth: '600px',
|
|
3155
623
|
filterRender: contextProps => {
|
|
3156
624
|
const {
|
|
3157
625
|
props,
|
|
3158
|
-
|
|
3159
|
-
|
|
626
|
+
searchProps,
|
|
627
|
+
setSearchProps
|
|
3160
628
|
} = contextProps;
|
|
3161
629
|
const {
|
|
3162
630
|
isPopup,
|
|
@@ -3175,9 +643,9 @@ const SelectTableList = React.forwardRef((p, ref) => {
|
|
|
3175
643
|
'is-popup': isPopup
|
|
3176
644
|
}),
|
|
3177
645
|
placeholder: searchPlaceholder,
|
|
3178
|
-
value:
|
|
646
|
+
value: searchProps.searchText || '',
|
|
3179
647
|
onSearch: value => {
|
|
3180
|
-
|
|
648
|
+
setSearchProps(searchProps => Object.assign({}, searchProps, {
|
|
3181
649
|
searchText: value
|
|
3182
650
|
}));
|
|
3183
651
|
},
|
|
@@ -3226,7 +694,8 @@ const SelectTableList = React.forwardRef((p, ref) => {
|
|
|
3226
694
|
searchPlaceholder,
|
|
3227
695
|
allowSelectedAll,
|
|
3228
696
|
labelKey,
|
|
3229
|
-
valueKey
|
|
697
|
+
valueKey,
|
|
698
|
+
searchProps
|
|
3230
699
|
} = props;
|
|
3231
700
|
const isSelectedAll = computedIsSelectAll(value, selectedAllValue, valueKey);
|
|
3232
701
|
return /*#__PURE__*/React__default["default"].createElement(antd.Row, {
|
|
@@ -3234,10 +703,7 @@ const SelectTableList = React.forwardRef((p, ref) => {
|
|
|
3234
703
|
ref: bodyRef
|
|
3235
704
|
}, /*#__PURE__*/React__default["default"].createElement(antd.Col, {
|
|
3236
705
|
span: single ? 24 : 16
|
|
3237
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", null, filterRender(Object.assign({}, targetProps, {
|
|
3238
|
-
filter,
|
|
3239
|
-
setFilter
|
|
3240
|
-
}))), /*#__PURE__*/React__default["default"].createElement(antd.Row, {
|
|
706
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, filterRender(Object.assign({}, targetProps))), /*#__PURE__*/React__default["default"].createElement(antd.Row, {
|
|
3241
707
|
wrap: false,
|
|
3242
708
|
className: classnames__default["default"](style['header'], 'select-table-list-header')
|
|
3243
709
|
}, !single && /*#__PURE__*/React__default["default"].createElement(antd.Col, {
|
|
@@ -3275,12 +741,12 @@ const SelectTableList = React.forwardRef((p, ref) => {
|
|
|
3275
741
|
className: classnames__default["default"](style['list'], 'select-table-list-scroll-list', {
|
|
3276
742
|
'is-popup': isPopup
|
|
3277
743
|
}),
|
|
3278
|
-
searchProps:
|
|
744
|
+
searchProps: searchProps,
|
|
3279
745
|
getSearchProps: getSearchProps,
|
|
3280
746
|
api: Object.assign({}, options ? {
|
|
3281
747
|
data: {
|
|
3282
748
|
options,
|
|
3283
|
-
|
|
749
|
+
searchProps
|
|
3284
750
|
},
|
|
3285
751
|
loader: _ref => {
|
|
3286
752
|
let {
|
|
@@ -3288,10 +754,10 @@ const SelectTableList = React.forwardRef((p, ref) => {
|
|
|
3288
754
|
} = _ref;
|
|
3289
755
|
const {
|
|
3290
756
|
options,
|
|
3291
|
-
|
|
757
|
+
searchProps
|
|
3292
758
|
} = data;
|
|
3293
759
|
if (typeof getSearchCallback === 'function') {
|
|
3294
|
-
const newOptions = options.filter(item => getSearchCallback(
|
|
760
|
+
const newOptions = options.filter(item => getSearchCallback(searchProps, item, targetProps));
|
|
3295
761
|
return {
|
|
3296
762
|
pageData: newOptions
|
|
3297
763
|
};
|
|
@@ -3353,13 +819,15 @@ const SelectTableList = React.forwardRef((p, ref) => {
|
|
|
3353
819
|
key: name,
|
|
3354
820
|
span: span,
|
|
3355
821
|
className: classnames__default["default"](style['col'], 'select-table-list-col')
|
|
3356
|
-
}, typeof getValueOf === 'function' ? getValueOf(item, contextProps) :
|
|
822
|
+
}, typeof getValueOf === 'function' ? getValueOf(item, contextProps) : get__default["default"](item, name));
|
|
3357
823
|
}))), single && /*#__PURE__*/React__default["default"].createElement(antd.Col, {
|
|
3358
824
|
className: classnames__default["default"](style['col'], style['single-checked'], 'select-table-list-col')
|
|
3359
825
|
}, isChecked && /*#__PURE__*/React__default["default"].createElement(icons.CheckOutlined, null)));
|
|
3360
826
|
});
|
|
3361
827
|
})), !single && /*#__PURE__*/React__default["default"].createElement(antd.Col, {
|
|
3362
|
-
className: classnames__default["default"](style['right-options']
|
|
828
|
+
className: classnames__default["default"](style['right-options'], {
|
|
829
|
+
'is-popup': isPopup
|
|
830
|
+
}),
|
|
3363
831
|
span: 8
|
|
3364
832
|
}, /*#__PURE__*/React__default["default"].createElement(SearchInput__default["default"], {
|
|
3365
833
|
className: style['tags-search'],
|
|
@@ -3410,7 +878,7 @@ const SelectTableList = React.forwardRef((p, ref) => {
|
|
|
3410
878
|
}, title), /*#__PURE__*/React__default["default"].createElement(antd.Col, {
|
|
3411
879
|
className: style['descriptions-col-content'],
|
|
3412
880
|
span: 16
|
|
3413
|
-
}, typeof getValueOf === 'function' ? getValueOf(item, targetProps) :
|
|
881
|
+
}, typeof getValueOf === 'function' ? getValueOf(item, targetProps) : get__default["default"](item, name)));
|
|
3414
882
|
}))
|
|
3415
883
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3416
884
|
className: style['tag-inner']
|