@mjhls/mjh-framework 1.0.55 → 1.0.57
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 +170 -170
- package/dist/index.es.js +1032 -36
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1031 -35
- package/dist/index.js.map +1 -1
- package/package.json +80 -80
package/dist/index.js
CHANGED
|
@@ -3821,7 +3821,7 @@ var DeckContent = function (_React$Component) {
|
|
|
3821
3821
|
data: _this.data,
|
|
3822
3822
|
dataKeptToCompareNewDatarecord: _this.data,
|
|
3823
3823
|
per: _this.params ? _this.params.to : 2,
|
|
3824
|
-
page: 1,
|
|
3824
|
+
page: _this.props.currentPage || 1,
|
|
3825
3825
|
from: _this.params ? _this.params.from : 0,
|
|
3826
3826
|
to: _this.params ? _this.params.to : 2,
|
|
3827
3827
|
total_pages: null,
|
|
@@ -3839,17 +3839,16 @@ var DeckContent = function (_React$Component) {
|
|
|
3839
3839
|
return {
|
|
3840
3840
|
page: page + 1,
|
|
3841
3841
|
from: from + per,
|
|
3842
|
-
to: to + per
|
|
3843
|
-
currentPage: currentPage + 1
|
|
3842
|
+
to: to + per
|
|
3844
3843
|
};
|
|
3845
3844
|
}, _this.loadData);
|
|
3846
|
-
},
|
|
3845
|
+
}, 0), _this.loadData = function () {
|
|
3847
3846
|
var _this$state = _this.state,
|
|
3848
3847
|
from = _this$state.from,
|
|
3849
3848
|
to = _this$state.to,
|
|
3850
3849
|
data = _this$state.data,
|
|
3851
3850
|
query = _this$state.query,
|
|
3852
|
-
|
|
3851
|
+
page = _this$state.page;
|
|
3853
3852
|
var client = _this.props.client;
|
|
3854
3853
|
|
|
3855
3854
|
|
|
@@ -3863,7 +3862,7 @@ var DeckContent = function (_React$Component) {
|
|
|
3863
3862
|
}
|
|
3864
3863
|
dataArr = dataArr.map(function (item) {
|
|
3865
3864
|
return _extends({}, item, {
|
|
3866
|
-
pageNumber:
|
|
3865
|
+
pageNumber: page
|
|
3867
3866
|
});
|
|
3868
3867
|
});
|
|
3869
3868
|
|
|
@@ -3899,13 +3898,21 @@ var DeckContent = function (_React$Component) {
|
|
|
3899
3898
|
var currentPage = _this.state.currentPage;
|
|
3900
3899
|
|
|
3901
3900
|
if (seoPaginate) {
|
|
3901
|
+
var newPath = pageNumber === 1 ? '' + router$$1.pathname : router$$1.pathname + '?page=' + pageNumber;
|
|
3902
3902
|
if (currentPage !== pageNumber) {
|
|
3903
|
+
console.error('currentPage:', currentPage);
|
|
3904
|
+
console.error('pageNumber:', pageNumber);
|
|
3903
3905
|
lib_3.refresh();
|
|
3904
3906
|
if (pageview) {
|
|
3905
|
-
|
|
3907
|
+
_this.setState({
|
|
3908
|
+
currentPage: pageNumber
|
|
3909
|
+
}, function () {
|
|
3910
|
+
pageview(newPath);
|
|
3911
|
+
});
|
|
3906
3912
|
}
|
|
3907
3913
|
}
|
|
3908
|
-
|
|
3914
|
+
|
|
3915
|
+
window.history.pushState(newPath, '', newPath);
|
|
3909
3916
|
}
|
|
3910
3917
|
}, _this.cardLoader = function (page, columns, variant) {
|
|
3911
3918
|
var mode = variant && variant === 'bottom' ? 'column-reverse' : 'column';
|
|
@@ -3924,12 +3931,14 @@ var DeckContent = function (_React$Component) {
|
|
|
3924
3931
|
lgVar = 6;
|
|
3925
3932
|
}
|
|
3926
3933
|
|
|
3934
|
+
var pageNumber = row.pageNumber || _this.state.page;
|
|
3935
|
+
|
|
3927
3936
|
return React__default.createElement(
|
|
3928
3937
|
VisibilitySensor,
|
|
3929
3938
|
{
|
|
3930
3939
|
key: itemCounter,
|
|
3931
3940
|
onChange: function onChange(isVisible) {
|
|
3932
|
-
isVisible && _this.changePageNumber(
|
|
3941
|
+
isVisible && _this.changePageNumber(pageNumber);
|
|
3933
3942
|
} },
|
|
3934
3943
|
React__default.createElement(
|
|
3935
3944
|
Col,
|
|
@@ -4083,6 +4092,993 @@ var DeckContent = function (_React$Component) {
|
|
|
4083
4092
|
|
|
4084
4093
|
var ContentCard = router.withRouter(DeckContent);
|
|
4085
4094
|
|
|
4095
|
+
/**
|
|
4096
|
+
* Checks if `value` is classified as an `Array` object.
|
|
4097
|
+
*
|
|
4098
|
+
* @static
|
|
4099
|
+
* @memberOf _
|
|
4100
|
+
* @since 0.1.0
|
|
4101
|
+
* @category Lang
|
|
4102
|
+
* @param {*} value The value to check.
|
|
4103
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
4104
|
+
* @example
|
|
4105
|
+
*
|
|
4106
|
+
* _.isArray([1, 2, 3]);
|
|
4107
|
+
* // => true
|
|
4108
|
+
*
|
|
4109
|
+
* _.isArray(document.body.children);
|
|
4110
|
+
* // => false
|
|
4111
|
+
*
|
|
4112
|
+
* _.isArray('abc');
|
|
4113
|
+
* // => false
|
|
4114
|
+
*
|
|
4115
|
+
* _.isArray(_.noop);
|
|
4116
|
+
* // => false
|
|
4117
|
+
*/
|
|
4118
|
+
var isArray = Array.isArray;
|
|
4119
|
+
|
|
4120
|
+
var isArray_1 = isArray;
|
|
4121
|
+
|
|
4122
|
+
/** Used to match property names within property paths. */
|
|
4123
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
4124
|
+
reIsPlainProp = /^\w*$/;
|
|
4125
|
+
|
|
4126
|
+
/**
|
|
4127
|
+
* Checks if `value` is a property name and not a property path.
|
|
4128
|
+
*
|
|
4129
|
+
* @private
|
|
4130
|
+
* @param {*} value The value to check.
|
|
4131
|
+
* @param {Object} [object] The object to query keys on.
|
|
4132
|
+
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
4133
|
+
*/
|
|
4134
|
+
function isKey(value, object) {
|
|
4135
|
+
if (isArray_1(value)) {
|
|
4136
|
+
return false;
|
|
4137
|
+
}
|
|
4138
|
+
var type = typeof value;
|
|
4139
|
+
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
4140
|
+
value == null || isSymbol_1(value)) {
|
|
4141
|
+
return true;
|
|
4142
|
+
}
|
|
4143
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
4144
|
+
(object != null && value in Object(object));
|
|
4145
|
+
}
|
|
4146
|
+
|
|
4147
|
+
var _isKey = isKey;
|
|
4148
|
+
|
|
4149
|
+
/** `Object#toString` result references. */
|
|
4150
|
+
var asyncTag = '[object AsyncFunction]',
|
|
4151
|
+
funcTag = '[object Function]',
|
|
4152
|
+
genTag = '[object GeneratorFunction]',
|
|
4153
|
+
proxyTag = '[object Proxy]';
|
|
4154
|
+
|
|
4155
|
+
/**
|
|
4156
|
+
* Checks if `value` is classified as a `Function` object.
|
|
4157
|
+
*
|
|
4158
|
+
* @static
|
|
4159
|
+
* @memberOf _
|
|
4160
|
+
* @since 0.1.0
|
|
4161
|
+
* @category Lang
|
|
4162
|
+
* @param {*} value The value to check.
|
|
4163
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
4164
|
+
* @example
|
|
4165
|
+
*
|
|
4166
|
+
* _.isFunction(_);
|
|
4167
|
+
* // => true
|
|
4168
|
+
*
|
|
4169
|
+
* _.isFunction(/abc/);
|
|
4170
|
+
* // => false
|
|
4171
|
+
*/
|
|
4172
|
+
function isFunction(value) {
|
|
4173
|
+
if (!isObject_1(value)) {
|
|
4174
|
+
return false;
|
|
4175
|
+
}
|
|
4176
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
4177
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
4178
|
+
var tag = _baseGetTag(value);
|
|
4179
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
var isFunction_1 = isFunction;
|
|
4183
|
+
|
|
4184
|
+
/** Used to detect overreaching core-js shims. */
|
|
4185
|
+
var coreJsData = _root['__core-js_shared__'];
|
|
4186
|
+
|
|
4187
|
+
var _coreJsData = coreJsData;
|
|
4188
|
+
|
|
4189
|
+
/** Used to detect methods masquerading as native. */
|
|
4190
|
+
var maskSrcKey = (function() {
|
|
4191
|
+
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
4192
|
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
4193
|
+
}());
|
|
4194
|
+
|
|
4195
|
+
/**
|
|
4196
|
+
* Checks if `func` has its source masked.
|
|
4197
|
+
*
|
|
4198
|
+
* @private
|
|
4199
|
+
* @param {Function} func The function to check.
|
|
4200
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
4201
|
+
*/
|
|
4202
|
+
function isMasked(func) {
|
|
4203
|
+
return !!maskSrcKey && (maskSrcKey in func);
|
|
4204
|
+
}
|
|
4205
|
+
|
|
4206
|
+
var _isMasked = isMasked;
|
|
4207
|
+
|
|
4208
|
+
/** Used for built-in method references. */
|
|
4209
|
+
var funcProto = Function.prototype;
|
|
4210
|
+
|
|
4211
|
+
/** Used to resolve the decompiled source of functions. */
|
|
4212
|
+
var funcToString = funcProto.toString;
|
|
4213
|
+
|
|
4214
|
+
/**
|
|
4215
|
+
* Converts `func` to its source code.
|
|
4216
|
+
*
|
|
4217
|
+
* @private
|
|
4218
|
+
* @param {Function} func The function to convert.
|
|
4219
|
+
* @returns {string} Returns the source code.
|
|
4220
|
+
*/
|
|
4221
|
+
function toSource(func) {
|
|
4222
|
+
if (func != null) {
|
|
4223
|
+
try {
|
|
4224
|
+
return funcToString.call(func);
|
|
4225
|
+
} catch (e) {}
|
|
4226
|
+
try {
|
|
4227
|
+
return (func + '');
|
|
4228
|
+
} catch (e) {}
|
|
4229
|
+
}
|
|
4230
|
+
return '';
|
|
4231
|
+
}
|
|
4232
|
+
|
|
4233
|
+
var _toSource = toSource;
|
|
4234
|
+
|
|
4235
|
+
/**
|
|
4236
|
+
* Used to match `RegExp`
|
|
4237
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
4238
|
+
*/
|
|
4239
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
4240
|
+
|
|
4241
|
+
/** Used to detect host constructors (Safari). */
|
|
4242
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
4243
|
+
|
|
4244
|
+
/** Used for built-in method references. */
|
|
4245
|
+
var funcProto$1 = Function.prototype,
|
|
4246
|
+
objectProto$2 = Object.prototype;
|
|
4247
|
+
|
|
4248
|
+
/** Used to resolve the decompiled source of functions. */
|
|
4249
|
+
var funcToString$1 = funcProto$1.toString;
|
|
4250
|
+
|
|
4251
|
+
/** Used to check objects for own properties. */
|
|
4252
|
+
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
|
|
4253
|
+
|
|
4254
|
+
/** Used to detect if a method is native. */
|
|
4255
|
+
var reIsNative = RegExp('^' +
|
|
4256
|
+
funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&')
|
|
4257
|
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
4258
|
+
);
|
|
4259
|
+
|
|
4260
|
+
/**
|
|
4261
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
4262
|
+
*
|
|
4263
|
+
* @private
|
|
4264
|
+
* @param {*} value The value to check.
|
|
4265
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
4266
|
+
* else `false`.
|
|
4267
|
+
*/
|
|
4268
|
+
function baseIsNative(value) {
|
|
4269
|
+
if (!isObject_1(value) || _isMasked(value)) {
|
|
4270
|
+
return false;
|
|
4271
|
+
}
|
|
4272
|
+
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
4273
|
+
return pattern.test(_toSource(value));
|
|
4274
|
+
}
|
|
4275
|
+
|
|
4276
|
+
var _baseIsNative = baseIsNative;
|
|
4277
|
+
|
|
4278
|
+
/**
|
|
4279
|
+
* Gets the value at `key` of `object`.
|
|
4280
|
+
*
|
|
4281
|
+
* @private
|
|
4282
|
+
* @param {Object} [object] The object to query.
|
|
4283
|
+
* @param {string} key The key of the property to get.
|
|
4284
|
+
* @returns {*} Returns the property value.
|
|
4285
|
+
*/
|
|
4286
|
+
function getValue(object, key) {
|
|
4287
|
+
return object == null ? undefined : object[key];
|
|
4288
|
+
}
|
|
4289
|
+
|
|
4290
|
+
var _getValue = getValue;
|
|
4291
|
+
|
|
4292
|
+
/**
|
|
4293
|
+
* Gets the native function at `key` of `object`.
|
|
4294
|
+
*
|
|
4295
|
+
* @private
|
|
4296
|
+
* @param {Object} object The object to query.
|
|
4297
|
+
* @param {string} key The key of the method to get.
|
|
4298
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
4299
|
+
*/
|
|
4300
|
+
function getNative(object, key) {
|
|
4301
|
+
var value = _getValue(object, key);
|
|
4302
|
+
return _baseIsNative(value) ? value : undefined;
|
|
4303
|
+
}
|
|
4304
|
+
|
|
4305
|
+
var _getNative = getNative;
|
|
4306
|
+
|
|
4307
|
+
/* Built-in method references that are verified to be native. */
|
|
4308
|
+
var nativeCreate = _getNative(Object, 'create');
|
|
4309
|
+
|
|
4310
|
+
var _nativeCreate = nativeCreate;
|
|
4311
|
+
|
|
4312
|
+
/**
|
|
4313
|
+
* Removes all key-value entries from the hash.
|
|
4314
|
+
*
|
|
4315
|
+
* @private
|
|
4316
|
+
* @name clear
|
|
4317
|
+
* @memberOf Hash
|
|
4318
|
+
*/
|
|
4319
|
+
function hashClear() {
|
|
4320
|
+
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
4321
|
+
this.size = 0;
|
|
4322
|
+
}
|
|
4323
|
+
|
|
4324
|
+
var _hashClear = hashClear;
|
|
4325
|
+
|
|
4326
|
+
/**
|
|
4327
|
+
* Removes `key` and its value from the hash.
|
|
4328
|
+
*
|
|
4329
|
+
* @private
|
|
4330
|
+
* @name delete
|
|
4331
|
+
* @memberOf Hash
|
|
4332
|
+
* @param {Object} hash The hash to modify.
|
|
4333
|
+
* @param {string} key The key of the value to remove.
|
|
4334
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
4335
|
+
*/
|
|
4336
|
+
function hashDelete(key) {
|
|
4337
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
4338
|
+
this.size -= result ? 1 : 0;
|
|
4339
|
+
return result;
|
|
4340
|
+
}
|
|
4341
|
+
|
|
4342
|
+
var _hashDelete = hashDelete;
|
|
4343
|
+
|
|
4344
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
4345
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
4346
|
+
|
|
4347
|
+
/** Used for built-in method references. */
|
|
4348
|
+
var objectProto$3 = Object.prototype;
|
|
4349
|
+
|
|
4350
|
+
/** Used to check objects for own properties. */
|
|
4351
|
+
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
4352
|
+
|
|
4353
|
+
/**
|
|
4354
|
+
* Gets the hash value for `key`.
|
|
4355
|
+
*
|
|
4356
|
+
* @private
|
|
4357
|
+
* @name get
|
|
4358
|
+
* @memberOf Hash
|
|
4359
|
+
* @param {string} key The key of the value to get.
|
|
4360
|
+
* @returns {*} Returns the entry value.
|
|
4361
|
+
*/
|
|
4362
|
+
function hashGet(key) {
|
|
4363
|
+
var data = this.__data__;
|
|
4364
|
+
if (_nativeCreate) {
|
|
4365
|
+
var result = data[key];
|
|
4366
|
+
return result === HASH_UNDEFINED ? undefined : result;
|
|
4367
|
+
}
|
|
4368
|
+
return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
|
|
4369
|
+
}
|
|
4370
|
+
|
|
4371
|
+
var _hashGet = hashGet;
|
|
4372
|
+
|
|
4373
|
+
/** Used for built-in method references. */
|
|
4374
|
+
var objectProto$4 = Object.prototype;
|
|
4375
|
+
|
|
4376
|
+
/** Used to check objects for own properties. */
|
|
4377
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
4378
|
+
|
|
4379
|
+
/**
|
|
4380
|
+
* Checks if a hash value for `key` exists.
|
|
4381
|
+
*
|
|
4382
|
+
* @private
|
|
4383
|
+
* @name has
|
|
4384
|
+
* @memberOf Hash
|
|
4385
|
+
* @param {string} key The key of the entry to check.
|
|
4386
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
4387
|
+
*/
|
|
4388
|
+
function hashHas(key) {
|
|
4389
|
+
var data = this.__data__;
|
|
4390
|
+
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
|
|
4391
|
+
}
|
|
4392
|
+
|
|
4393
|
+
var _hashHas = hashHas;
|
|
4394
|
+
|
|
4395
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
4396
|
+
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
4397
|
+
|
|
4398
|
+
/**
|
|
4399
|
+
* Sets the hash `key` to `value`.
|
|
4400
|
+
*
|
|
4401
|
+
* @private
|
|
4402
|
+
* @name set
|
|
4403
|
+
* @memberOf Hash
|
|
4404
|
+
* @param {string} key The key of the value to set.
|
|
4405
|
+
* @param {*} value The value to set.
|
|
4406
|
+
* @returns {Object} Returns the hash instance.
|
|
4407
|
+
*/
|
|
4408
|
+
function hashSet(key, value) {
|
|
4409
|
+
var data = this.__data__;
|
|
4410
|
+
this.size += this.has(key) ? 0 : 1;
|
|
4411
|
+
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
|
|
4412
|
+
return this;
|
|
4413
|
+
}
|
|
4414
|
+
|
|
4415
|
+
var _hashSet = hashSet;
|
|
4416
|
+
|
|
4417
|
+
/**
|
|
4418
|
+
* Creates a hash object.
|
|
4419
|
+
*
|
|
4420
|
+
* @private
|
|
4421
|
+
* @constructor
|
|
4422
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
4423
|
+
*/
|
|
4424
|
+
function Hash(entries) {
|
|
4425
|
+
var index = -1,
|
|
4426
|
+
length = entries == null ? 0 : entries.length;
|
|
4427
|
+
|
|
4428
|
+
this.clear();
|
|
4429
|
+
while (++index < length) {
|
|
4430
|
+
var entry = entries[index];
|
|
4431
|
+
this.set(entry[0], entry[1]);
|
|
4432
|
+
}
|
|
4433
|
+
}
|
|
4434
|
+
|
|
4435
|
+
// Add methods to `Hash`.
|
|
4436
|
+
Hash.prototype.clear = _hashClear;
|
|
4437
|
+
Hash.prototype['delete'] = _hashDelete;
|
|
4438
|
+
Hash.prototype.get = _hashGet;
|
|
4439
|
+
Hash.prototype.has = _hashHas;
|
|
4440
|
+
Hash.prototype.set = _hashSet;
|
|
4441
|
+
|
|
4442
|
+
var _Hash = Hash;
|
|
4443
|
+
|
|
4444
|
+
/**
|
|
4445
|
+
* Removes all key-value entries from the list cache.
|
|
4446
|
+
*
|
|
4447
|
+
* @private
|
|
4448
|
+
* @name clear
|
|
4449
|
+
* @memberOf ListCache
|
|
4450
|
+
*/
|
|
4451
|
+
function listCacheClear() {
|
|
4452
|
+
this.__data__ = [];
|
|
4453
|
+
this.size = 0;
|
|
4454
|
+
}
|
|
4455
|
+
|
|
4456
|
+
var _listCacheClear = listCacheClear;
|
|
4457
|
+
|
|
4458
|
+
/**
|
|
4459
|
+
* Performs a
|
|
4460
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
4461
|
+
* comparison between two values to determine if they are equivalent.
|
|
4462
|
+
*
|
|
4463
|
+
* @static
|
|
4464
|
+
* @memberOf _
|
|
4465
|
+
* @since 4.0.0
|
|
4466
|
+
* @category Lang
|
|
4467
|
+
* @param {*} value The value to compare.
|
|
4468
|
+
* @param {*} other The other value to compare.
|
|
4469
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
4470
|
+
* @example
|
|
4471
|
+
*
|
|
4472
|
+
* var object = { 'a': 1 };
|
|
4473
|
+
* var other = { 'a': 1 };
|
|
4474
|
+
*
|
|
4475
|
+
* _.eq(object, object);
|
|
4476
|
+
* // => true
|
|
4477
|
+
*
|
|
4478
|
+
* _.eq(object, other);
|
|
4479
|
+
* // => false
|
|
4480
|
+
*
|
|
4481
|
+
* _.eq('a', 'a');
|
|
4482
|
+
* // => true
|
|
4483
|
+
*
|
|
4484
|
+
* _.eq('a', Object('a'));
|
|
4485
|
+
* // => false
|
|
4486
|
+
*
|
|
4487
|
+
* _.eq(NaN, NaN);
|
|
4488
|
+
* // => true
|
|
4489
|
+
*/
|
|
4490
|
+
function eq(value, other) {
|
|
4491
|
+
return value === other || (value !== value && other !== other);
|
|
4492
|
+
}
|
|
4493
|
+
|
|
4494
|
+
var eq_1 = eq;
|
|
4495
|
+
|
|
4496
|
+
/**
|
|
4497
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
4498
|
+
*
|
|
4499
|
+
* @private
|
|
4500
|
+
* @param {Array} array The array to inspect.
|
|
4501
|
+
* @param {*} key The key to search for.
|
|
4502
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
4503
|
+
*/
|
|
4504
|
+
function assocIndexOf(array, key) {
|
|
4505
|
+
var length = array.length;
|
|
4506
|
+
while (length--) {
|
|
4507
|
+
if (eq_1(array[length][0], key)) {
|
|
4508
|
+
return length;
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
return -1;
|
|
4512
|
+
}
|
|
4513
|
+
|
|
4514
|
+
var _assocIndexOf = assocIndexOf;
|
|
4515
|
+
|
|
4516
|
+
/** Used for built-in method references. */
|
|
4517
|
+
var arrayProto = Array.prototype;
|
|
4518
|
+
|
|
4519
|
+
/** Built-in value references. */
|
|
4520
|
+
var splice = arrayProto.splice;
|
|
4521
|
+
|
|
4522
|
+
/**
|
|
4523
|
+
* Removes `key` and its value from the list cache.
|
|
4524
|
+
*
|
|
4525
|
+
* @private
|
|
4526
|
+
* @name delete
|
|
4527
|
+
* @memberOf ListCache
|
|
4528
|
+
* @param {string} key The key of the value to remove.
|
|
4529
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
4530
|
+
*/
|
|
4531
|
+
function listCacheDelete(key) {
|
|
4532
|
+
var data = this.__data__,
|
|
4533
|
+
index = _assocIndexOf(data, key);
|
|
4534
|
+
|
|
4535
|
+
if (index < 0) {
|
|
4536
|
+
return false;
|
|
4537
|
+
}
|
|
4538
|
+
var lastIndex = data.length - 1;
|
|
4539
|
+
if (index == lastIndex) {
|
|
4540
|
+
data.pop();
|
|
4541
|
+
} else {
|
|
4542
|
+
splice.call(data, index, 1);
|
|
4543
|
+
}
|
|
4544
|
+
--this.size;
|
|
4545
|
+
return true;
|
|
4546
|
+
}
|
|
4547
|
+
|
|
4548
|
+
var _listCacheDelete = listCacheDelete;
|
|
4549
|
+
|
|
4550
|
+
/**
|
|
4551
|
+
* Gets the list cache value for `key`.
|
|
4552
|
+
*
|
|
4553
|
+
* @private
|
|
4554
|
+
* @name get
|
|
4555
|
+
* @memberOf ListCache
|
|
4556
|
+
* @param {string} key The key of the value to get.
|
|
4557
|
+
* @returns {*} Returns the entry value.
|
|
4558
|
+
*/
|
|
4559
|
+
function listCacheGet(key) {
|
|
4560
|
+
var data = this.__data__,
|
|
4561
|
+
index = _assocIndexOf(data, key);
|
|
4562
|
+
|
|
4563
|
+
return index < 0 ? undefined : data[index][1];
|
|
4564
|
+
}
|
|
4565
|
+
|
|
4566
|
+
var _listCacheGet = listCacheGet;
|
|
4567
|
+
|
|
4568
|
+
/**
|
|
4569
|
+
* Checks if a list cache value for `key` exists.
|
|
4570
|
+
*
|
|
4571
|
+
* @private
|
|
4572
|
+
* @name has
|
|
4573
|
+
* @memberOf ListCache
|
|
4574
|
+
* @param {string} key The key of the entry to check.
|
|
4575
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
4576
|
+
*/
|
|
4577
|
+
function listCacheHas(key) {
|
|
4578
|
+
return _assocIndexOf(this.__data__, key) > -1;
|
|
4579
|
+
}
|
|
4580
|
+
|
|
4581
|
+
var _listCacheHas = listCacheHas;
|
|
4582
|
+
|
|
4583
|
+
/**
|
|
4584
|
+
* Sets the list cache `key` to `value`.
|
|
4585
|
+
*
|
|
4586
|
+
* @private
|
|
4587
|
+
* @name set
|
|
4588
|
+
* @memberOf ListCache
|
|
4589
|
+
* @param {string} key The key of the value to set.
|
|
4590
|
+
* @param {*} value The value to set.
|
|
4591
|
+
* @returns {Object} Returns the list cache instance.
|
|
4592
|
+
*/
|
|
4593
|
+
function listCacheSet(key, value) {
|
|
4594
|
+
var data = this.__data__,
|
|
4595
|
+
index = _assocIndexOf(data, key);
|
|
4596
|
+
|
|
4597
|
+
if (index < 0) {
|
|
4598
|
+
++this.size;
|
|
4599
|
+
data.push([key, value]);
|
|
4600
|
+
} else {
|
|
4601
|
+
data[index][1] = value;
|
|
4602
|
+
}
|
|
4603
|
+
return this;
|
|
4604
|
+
}
|
|
4605
|
+
|
|
4606
|
+
var _listCacheSet = listCacheSet;
|
|
4607
|
+
|
|
4608
|
+
/**
|
|
4609
|
+
* Creates an list cache object.
|
|
4610
|
+
*
|
|
4611
|
+
* @private
|
|
4612
|
+
* @constructor
|
|
4613
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
4614
|
+
*/
|
|
4615
|
+
function ListCache(entries) {
|
|
4616
|
+
var index = -1,
|
|
4617
|
+
length = entries == null ? 0 : entries.length;
|
|
4618
|
+
|
|
4619
|
+
this.clear();
|
|
4620
|
+
while (++index < length) {
|
|
4621
|
+
var entry = entries[index];
|
|
4622
|
+
this.set(entry[0], entry[1]);
|
|
4623
|
+
}
|
|
4624
|
+
}
|
|
4625
|
+
|
|
4626
|
+
// Add methods to `ListCache`.
|
|
4627
|
+
ListCache.prototype.clear = _listCacheClear;
|
|
4628
|
+
ListCache.prototype['delete'] = _listCacheDelete;
|
|
4629
|
+
ListCache.prototype.get = _listCacheGet;
|
|
4630
|
+
ListCache.prototype.has = _listCacheHas;
|
|
4631
|
+
ListCache.prototype.set = _listCacheSet;
|
|
4632
|
+
|
|
4633
|
+
var _ListCache = ListCache;
|
|
4634
|
+
|
|
4635
|
+
/* Built-in method references that are verified to be native. */
|
|
4636
|
+
var Map = _getNative(_root, 'Map');
|
|
4637
|
+
|
|
4638
|
+
var _Map = Map;
|
|
4639
|
+
|
|
4640
|
+
/**
|
|
4641
|
+
* Removes all key-value entries from the map.
|
|
4642
|
+
*
|
|
4643
|
+
* @private
|
|
4644
|
+
* @name clear
|
|
4645
|
+
* @memberOf MapCache
|
|
4646
|
+
*/
|
|
4647
|
+
function mapCacheClear() {
|
|
4648
|
+
this.size = 0;
|
|
4649
|
+
this.__data__ = {
|
|
4650
|
+
'hash': new _Hash,
|
|
4651
|
+
'map': new (_Map || _ListCache),
|
|
4652
|
+
'string': new _Hash
|
|
4653
|
+
};
|
|
4654
|
+
}
|
|
4655
|
+
|
|
4656
|
+
var _mapCacheClear = mapCacheClear;
|
|
4657
|
+
|
|
4658
|
+
/**
|
|
4659
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
4660
|
+
*
|
|
4661
|
+
* @private
|
|
4662
|
+
* @param {*} value The value to check.
|
|
4663
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
4664
|
+
*/
|
|
4665
|
+
function isKeyable(value) {
|
|
4666
|
+
var type = typeof value;
|
|
4667
|
+
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
4668
|
+
? (value !== '__proto__')
|
|
4669
|
+
: (value === null);
|
|
4670
|
+
}
|
|
4671
|
+
|
|
4672
|
+
var _isKeyable = isKeyable;
|
|
4673
|
+
|
|
4674
|
+
/**
|
|
4675
|
+
* Gets the data for `map`.
|
|
4676
|
+
*
|
|
4677
|
+
* @private
|
|
4678
|
+
* @param {Object} map The map to query.
|
|
4679
|
+
* @param {string} key The reference key.
|
|
4680
|
+
* @returns {*} Returns the map data.
|
|
4681
|
+
*/
|
|
4682
|
+
function getMapData(map, key) {
|
|
4683
|
+
var data = map.__data__;
|
|
4684
|
+
return _isKeyable(key)
|
|
4685
|
+
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
4686
|
+
: data.map;
|
|
4687
|
+
}
|
|
4688
|
+
|
|
4689
|
+
var _getMapData = getMapData;
|
|
4690
|
+
|
|
4691
|
+
/**
|
|
4692
|
+
* Removes `key` and its value from the map.
|
|
4693
|
+
*
|
|
4694
|
+
* @private
|
|
4695
|
+
* @name delete
|
|
4696
|
+
* @memberOf MapCache
|
|
4697
|
+
* @param {string} key The key of the value to remove.
|
|
4698
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
4699
|
+
*/
|
|
4700
|
+
function mapCacheDelete(key) {
|
|
4701
|
+
var result = _getMapData(this, key)['delete'](key);
|
|
4702
|
+
this.size -= result ? 1 : 0;
|
|
4703
|
+
return result;
|
|
4704
|
+
}
|
|
4705
|
+
|
|
4706
|
+
var _mapCacheDelete = mapCacheDelete;
|
|
4707
|
+
|
|
4708
|
+
/**
|
|
4709
|
+
* Gets the map value for `key`.
|
|
4710
|
+
*
|
|
4711
|
+
* @private
|
|
4712
|
+
* @name get
|
|
4713
|
+
* @memberOf MapCache
|
|
4714
|
+
* @param {string} key The key of the value to get.
|
|
4715
|
+
* @returns {*} Returns the entry value.
|
|
4716
|
+
*/
|
|
4717
|
+
function mapCacheGet(key) {
|
|
4718
|
+
return _getMapData(this, key).get(key);
|
|
4719
|
+
}
|
|
4720
|
+
|
|
4721
|
+
var _mapCacheGet = mapCacheGet;
|
|
4722
|
+
|
|
4723
|
+
/**
|
|
4724
|
+
* Checks if a map value for `key` exists.
|
|
4725
|
+
*
|
|
4726
|
+
* @private
|
|
4727
|
+
* @name has
|
|
4728
|
+
* @memberOf MapCache
|
|
4729
|
+
* @param {string} key The key of the entry to check.
|
|
4730
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
4731
|
+
*/
|
|
4732
|
+
function mapCacheHas(key) {
|
|
4733
|
+
return _getMapData(this, key).has(key);
|
|
4734
|
+
}
|
|
4735
|
+
|
|
4736
|
+
var _mapCacheHas = mapCacheHas;
|
|
4737
|
+
|
|
4738
|
+
/**
|
|
4739
|
+
* Sets the map `key` to `value`.
|
|
4740
|
+
*
|
|
4741
|
+
* @private
|
|
4742
|
+
* @name set
|
|
4743
|
+
* @memberOf MapCache
|
|
4744
|
+
* @param {string} key The key of the value to set.
|
|
4745
|
+
* @param {*} value The value to set.
|
|
4746
|
+
* @returns {Object} Returns the map cache instance.
|
|
4747
|
+
*/
|
|
4748
|
+
function mapCacheSet(key, value) {
|
|
4749
|
+
var data = _getMapData(this, key),
|
|
4750
|
+
size = data.size;
|
|
4751
|
+
|
|
4752
|
+
data.set(key, value);
|
|
4753
|
+
this.size += data.size == size ? 0 : 1;
|
|
4754
|
+
return this;
|
|
4755
|
+
}
|
|
4756
|
+
|
|
4757
|
+
var _mapCacheSet = mapCacheSet;
|
|
4758
|
+
|
|
4759
|
+
/**
|
|
4760
|
+
* Creates a map cache object to store key-value pairs.
|
|
4761
|
+
*
|
|
4762
|
+
* @private
|
|
4763
|
+
* @constructor
|
|
4764
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
4765
|
+
*/
|
|
4766
|
+
function MapCache(entries) {
|
|
4767
|
+
var index = -1,
|
|
4768
|
+
length = entries == null ? 0 : entries.length;
|
|
4769
|
+
|
|
4770
|
+
this.clear();
|
|
4771
|
+
while (++index < length) {
|
|
4772
|
+
var entry = entries[index];
|
|
4773
|
+
this.set(entry[0], entry[1]);
|
|
4774
|
+
}
|
|
4775
|
+
}
|
|
4776
|
+
|
|
4777
|
+
// Add methods to `MapCache`.
|
|
4778
|
+
MapCache.prototype.clear = _mapCacheClear;
|
|
4779
|
+
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
4780
|
+
MapCache.prototype.get = _mapCacheGet;
|
|
4781
|
+
MapCache.prototype.has = _mapCacheHas;
|
|
4782
|
+
MapCache.prototype.set = _mapCacheSet;
|
|
4783
|
+
|
|
4784
|
+
var _MapCache = MapCache;
|
|
4785
|
+
|
|
4786
|
+
/** Error message constants. */
|
|
4787
|
+
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
4788
|
+
|
|
4789
|
+
/**
|
|
4790
|
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
4791
|
+
* provided, it determines the cache key for storing the result based on the
|
|
4792
|
+
* arguments provided to the memoized function. By default, the first argument
|
|
4793
|
+
* provided to the memoized function is used as the map cache key. The `func`
|
|
4794
|
+
* is invoked with the `this` binding of the memoized function.
|
|
4795
|
+
*
|
|
4796
|
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
4797
|
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
4798
|
+
* constructor with one whose instances implement the
|
|
4799
|
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
4800
|
+
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
4801
|
+
*
|
|
4802
|
+
* @static
|
|
4803
|
+
* @memberOf _
|
|
4804
|
+
* @since 0.1.0
|
|
4805
|
+
* @category Function
|
|
4806
|
+
* @param {Function} func The function to have its output memoized.
|
|
4807
|
+
* @param {Function} [resolver] The function to resolve the cache key.
|
|
4808
|
+
* @returns {Function} Returns the new memoized function.
|
|
4809
|
+
* @example
|
|
4810
|
+
*
|
|
4811
|
+
* var object = { 'a': 1, 'b': 2 };
|
|
4812
|
+
* var other = { 'c': 3, 'd': 4 };
|
|
4813
|
+
*
|
|
4814
|
+
* var values = _.memoize(_.values);
|
|
4815
|
+
* values(object);
|
|
4816
|
+
* // => [1, 2]
|
|
4817
|
+
*
|
|
4818
|
+
* values(other);
|
|
4819
|
+
* // => [3, 4]
|
|
4820
|
+
*
|
|
4821
|
+
* object.a = 2;
|
|
4822
|
+
* values(object);
|
|
4823
|
+
* // => [1, 2]
|
|
4824
|
+
*
|
|
4825
|
+
* // Modify the result cache.
|
|
4826
|
+
* values.cache.set(object, ['a', 'b']);
|
|
4827
|
+
* values(object);
|
|
4828
|
+
* // => ['a', 'b']
|
|
4829
|
+
*
|
|
4830
|
+
* // Replace `_.memoize.Cache`.
|
|
4831
|
+
* _.memoize.Cache = WeakMap;
|
|
4832
|
+
*/
|
|
4833
|
+
function memoize(func, resolver) {
|
|
4834
|
+
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
4835
|
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
4836
|
+
}
|
|
4837
|
+
var memoized = function() {
|
|
4838
|
+
var args = arguments,
|
|
4839
|
+
key = resolver ? resolver.apply(this, args) : args[0],
|
|
4840
|
+
cache = memoized.cache;
|
|
4841
|
+
|
|
4842
|
+
if (cache.has(key)) {
|
|
4843
|
+
return cache.get(key);
|
|
4844
|
+
}
|
|
4845
|
+
var result = func.apply(this, args);
|
|
4846
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
4847
|
+
return result;
|
|
4848
|
+
};
|
|
4849
|
+
memoized.cache = new (memoize.Cache || _MapCache);
|
|
4850
|
+
return memoized;
|
|
4851
|
+
}
|
|
4852
|
+
|
|
4853
|
+
// Expose `MapCache`.
|
|
4854
|
+
memoize.Cache = _MapCache;
|
|
4855
|
+
|
|
4856
|
+
var memoize_1 = memoize;
|
|
4857
|
+
|
|
4858
|
+
/** Used as the maximum memoize cache size. */
|
|
4859
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
4860
|
+
|
|
4861
|
+
/**
|
|
4862
|
+
* A specialized version of `_.memoize` which clears the memoized function's
|
|
4863
|
+
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
4864
|
+
*
|
|
4865
|
+
* @private
|
|
4866
|
+
* @param {Function} func The function to have its output memoized.
|
|
4867
|
+
* @returns {Function} Returns the new memoized function.
|
|
4868
|
+
*/
|
|
4869
|
+
function memoizeCapped(func) {
|
|
4870
|
+
var result = memoize_1(func, function(key) {
|
|
4871
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
4872
|
+
cache.clear();
|
|
4873
|
+
}
|
|
4874
|
+
return key;
|
|
4875
|
+
});
|
|
4876
|
+
|
|
4877
|
+
var cache = result.cache;
|
|
4878
|
+
return result;
|
|
4879
|
+
}
|
|
4880
|
+
|
|
4881
|
+
var _memoizeCapped = memoizeCapped;
|
|
4882
|
+
|
|
4883
|
+
/** Used to match property names within property paths. */
|
|
4884
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
4885
|
+
|
|
4886
|
+
/** Used to match backslashes in property paths. */
|
|
4887
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
4888
|
+
|
|
4889
|
+
/**
|
|
4890
|
+
* Converts `string` to a property path array.
|
|
4891
|
+
*
|
|
4892
|
+
* @private
|
|
4893
|
+
* @param {string} string The string to convert.
|
|
4894
|
+
* @returns {Array} Returns the property path array.
|
|
4895
|
+
*/
|
|
4896
|
+
var stringToPath = _memoizeCapped(function(string) {
|
|
4897
|
+
var result = [];
|
|
4898
|
+
if (string.charCodeAt(0) === 46 /* . */) {
|
|
4899
|
+
result.push('');
|
|
4900
|
+
}
|
|
4901
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
4902
|
+
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
4903
|
+
});
|
|
4904
|
+
return result;
|
|
4905
|
+
});
|
|
4906
|
+
|
|
4907
|
+
var _stringToPath = stringToPath;
|
|
4908
|
+
|
|
4909
|
+
/**
|
|
4910
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
4911
|
+
* shorthands.
|
|
4912
|
+
*
|
|
4913
|
+
* @private
|
|
4914
|
+
* @param {Array} [array] The array to iterate over.
|
|
4915
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
4916
|
+
* @returns {Array} Returns the new mapped array.
|
|
4917
|
+
*/
|
|
4918
|
+
function arrayMap(array, iteratee) {
|
|
4919
|
+
var index = -1,
|
|
4920
|
+
length = array == null ? 0 : array.length,
|
|
4921
|
+
result = Array(length);
|
|
4922
|
+
|
|
4923
|
+
while (++index < length) {
|
|
4924
|
+
result[index] = iteratee(array[index], index, array);
|
|
4925
|
+
}
|
|
4926
|
+
return result;
|
|
4927
|
+
}
|
|
4928
|
+
|
|
4929
|
+
var _arrayMap = arrayMap;
|
|
4930
|
+
|
|
4931
|
+
/** Used as references for various `Number` constants. */
|
|
4932
|
+
var INFINITY = 1 / 0;
|
|
4933
|
+
|
|
4934
|
+
/** Used to convert symbols to primitives and strings. */
|
|
4935
|
+
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
4936
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
4937
|
+
|
|
4938
|
+
/**
|
|
4939
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
4940
|
+
* values to empty strings.
|
|
4941
|
+
*
|
|
4942
|
+
* @private
|
|
4943
|
+
* @param {*} value The value to process.
|
|
4944
|
+
* @returns {string} Returns the string.
|
|
4945
|
+
*/
|
|
4946
|
+
function baseToString(value) {
|
|
4947
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
4948
|
+
if (typeof value == 'string') {
|
|
4949
|
+
return value;
|
|
4950
|
+
}
|
|
4951
|
+
if (isArray_1(value)) {
|
|
4952
|
+
// Recursively convert values (susceptible to call stack limits).
|
|
4953
|
+
return _arrayMap(value, baseToString) + '';
|
|
4954
|
+
}
|
|
4955
|
+
if (isSymbol_1(value)) {
|
|
4956
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
4957
|
+
}
|
|
4958
|
+
var result = (value + '');
|
|
4959
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
4960
|
+
}
|
|
4961
|
+
|
|
4962
|
+
var _baseToString = baseToString;
|
|
4963
|
+
|
|
4964
|
+
/**
|
|
4965
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
4966
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
4967
|
+
*
|
|
4968
|
+
* @static
|
|
4969
|
+
* @memberOf _
|
|
4970
|
+
* @since 4.0.0
|
|
4971
|
+
* @category Lang
|
|
4972
|
+
* @param {*} value The value to convert.
|
|
4973
|
+
* @returns {string} Returns the converted string.
|
|
4974
|
+
* @example
|
|
4975
|
+
*
|
|
4976
|
+
* _.toString(null);
|
|
4977
|
+
* // => ''
|
|
4978
|
+
*
|
|
4979
|
+
* _.toString(-0);
|
|
4980
|
+
* // => '-0'
|
|
4981
|
+
*
|
|
4982
|
+
* _.toString([1, 2, 3]);
|
|
4983
|
+
* // => '1,2,3'
|
|
4984
|
+
*/
|
|
4985
|
+
function toString(value) {
|
|
4986
|
+
return value == null ? '' : _baseToString(value);
|
|
4987
|
+
}
|
|
4988
|
+
|
|
4989
|
+
var toString_1 = toString;
|
|
4990
|
+
|
|
4991
|
+
/**
|
|
4992
|
+
* Casts `value` to a path array if it's not one.
|
|
4993
|
+
*
|
|
4994
|
+
* @private
|
|
4995
|
+
* @param {*} value The value to inspect.
|
|
4996
|
+
* @param {Object} [object] The object to query keys on.
|
|
4997
|
+
* @returns {Array} Returns the cast property path array.
|
|
4998
|
+
*/
|
|
4999
|
+
function castPath(value, object) {
|
|
5000
|
+
if (isArray_1(value)) {
|
|
5001
|
+
return value;
|
|
5002
|
+
}
|
|
5003
|
+
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
5004
|
+
}
|
|
5005
|
+
|
|
5006
|
+
var _castPath = castPath;
|
|
5007
|
+
|
|
5008
|
+
/** Used as references for various `Number` constants. */
|
|
5009
|
+
var INFINITY$1 = 1 / 0;
|
|
5010
|
+
|
|
5011
|
+
/**
|
|
5012
|
+
* Converts `value` to a string key if it's not a string or symbol.
|
|
5013
|
+
*
|
|
5014
|
+
* @private
|
|
5015
|
+
* @param {*} value The value to inspect.
|
|
5016
|
+
* @returns {string|symbol} Returns the key.
|
|
5017
|
+
*/
|
|
5018
|
+
function toKey(value) {
|
|
5019
|
+
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
5020
|
+
return value;
|
|
5021
|
+
}
|
|
5022
|
+
var result = (value + '');
|
|
5023
|
+
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
5024
|
+
}
|
|
5025
|
+
|
|
5026
|
+
var _toKey = toKey;
|
|
5027
|
+
|
|
5028
|
+
/**
|
|
5029
|
+
* The base implementation of `_.get` without support for default values.
|
|
5030
|
+
*
|
|
5031
|
+
* @private
|
|
5032
|
+
* @param {Object} object The object to query.
|
|
5033
|
+
* @param {Array|string} path The path of the property to get.
|
|
5034
|
+
* @returns {*} Returns the resolved value.
|
|
5035
|
+
*/
|
|
5036
|
+
function baseGet(object, path) {
|
|
5037
|
+
path = _castPath(path, object);
|
|
5038
|
+
|
|
5039
|
+
var index = 0,
|
|
5040
|
+
length = path.length;
|
|
5041
|
+
|
|
5042
|
+
while (object != null && index < length) {
|
|
5043
|
+
object = object[_toKey(path[index++])];
|
|
5044
|
+
}
|
|
5045
|
+
return (index && index == length) ? object : undefined;
|
|
5046
|
+
}
|
|
5047
|
+
|
|
5048
|
+
var _baseGet = baseGet;
|
|
5049
|
+
|
|
5050
|
+
/**
|
|
5051
|
+
* Gets the value at `path` of `object`. If the resolved value is
|
|
5052
|
+
* `undefined`, the `defaultValue` is returned in its place.
|
|
5053
|
+
*
|
|
5054
|
+
* @static
|
|
5055
|
+
* @memberOf _
|
|
5056
|
+
* @since 3.7.0
|
|
5057
|
+
* @category Object
|
|
5058
|
+
* @param {Object} object The object to query.
|
|
5059
|
+
* @param {Array|string} path The path of the property to get.
|
|
5060
|
+
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
5061
|
+
* @returns {*} Returns the resolved value.
|
|
5062
|
+
* @example
|
|
5063
|
+
*
|
|
5064
|
+
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
5065
|
+
*
|
|
5066
|
+
* _.get(object, 'a[0].b.c');
|
|
5067
|
+
* // => 3
|
|
5068
|
+
*
|
|
5069
|
+
* _.get(object, ['a', '0', 'b', 'c']);
|
|
5070
|
+
* // => 3
|
|
5071
|
+
*
|
|
5072
|
+
* _.get(object, 'a.b.c', 'default');
|
|
5073
|
+
* // => 'default'
|
|
5074
|
+
*/
|
|
5075
|
+
function get$1(object, path, defaultValue) {
|
|
5076
|
+
var result = object == null ? undefined : _baseGet(object, path);
|
|
5077
|
+
return result === undefined ? defaultValue : result;
|
|
5078
|
+
}
|
|
5079
|
+
|
|
5080
|
+
var get_1 = get$1;
|
|
5081
|
+
|
|
4086
5082
|
var DeckQueue = function (_React$Component) {
|
|
4087
5083
|
inherits(DeckQueue, _React$Component);
|
|
4088
5084
|
|
|
@@ -4187,7 +5183,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
4187
5183
|
{ key: index, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
4188
5184
|
React__default.createElement(
|
|
4189
5185
|
Link,
|
|
4190
|
-
{ href: _this2.page + '/[url]', as: _this2.page + '/' + row
|
|
5186
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
4191
5187
|
React__default.createElement(
|
|
4192
5188
|
'a',
|
|
4193
5189
|
null,
|
|
@@ -4431,15 +5427,15 @@ var TaxonomyCard = function TaxonomyCard(props) {
|
|
|
4431
5427
|
);
|
|
4432
5428
|
};
|
|
4433
5429
|
|
|
4434
|
-
/*
|
|
4435
|
-
GROQ query -
|
|
4436
|
-
*[_type == "article" && references(*[_type == 'documentGroup' && name == 'test']._id)][0...10]{
|
|
4437
|
-
title,
|
|
4438
|
-
published,
|
|
4439
|
-
"thumbnail": thumbnail.asset->url,
|
|
4440
|
-
"url": url.current
|
|
4441
|
-
}
|
|
4442
|
-
|
|
5430
|
+
/*
|
|
5431
|
+
GROQ query -
|
|
5432
|
+
*[_type == "article" && references(*[_type == 'documentGroup' && name == 'test']._id)][0...10]{
|
|
5433
|
+
title,
|
|
5434
|
+
published,
|
|
5435
|
+
"thumbnail": thumbnail.asset->url,
|
|
5436
|
+
"url": url.current
|
|
5437
|
+
}
|
|
5438
|
+
|
|
4443
5439
|
*/
|
|
4444
5440
|
var GroupDeck = function GroupDeck(props) {
|
|
4445
5441
|
// Props should be an array of objects containing Thumbnail, title, and URL
|
|
@@ -6451,7 +7447,7 @@ var getYoutubeId = createCommonjsModule(function (module, exports) {
|
|
|
6451
7447
|
}));
|
|
6452
7448
|
});
|
|
6453
7449
|
|
|
6454
|
-
var isArray = Array.isArray;
|
|
7450
|
+
var isArray$1 = Array.isArray;
|
|
6455
7451
|
var keyList = Object.keys;
|
|
6456
7452
|
var hasProp = Object.prototype.hasOwnProperty;
|
|
6457
7453
|
|
|
@@ -6459,8 +7455,8 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
6459
7455
|
if (a === b) return true;
|
|
6460
7456
|
|
|
6461
7457
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
6462
|
-
var arrA = isArray(a)
|
|
6463
|
-
, arrB = isArray(b)
|
|
7458
|
+
var arrA = isArray$1(a)
|
|
7459
|
+
, arrB = isArray$1(b)
|
|
6464
7460
|
, i
|
|
6465
7461
|
, length
|
|
6466
7462
|
, key;
|
|
@@ -7693,7 +8689,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
7693
8689
|
// Check that value is an object with an inspect function on it
|
|
7694
8690
|
if (ctx.customInspect &&
|
|
7695
8691
|
value &&
|
|
7696
|
-
isFunction(value.inspect) &&
|
|
8692
|
+
isFunction$1(value.inspect) &&
|
|
7697
8693
|
// Filter out the util module, it's inspect function is special
|
|
7698
8694
|
value.inspect !== inspect &&
|
|
7699
8695
|
// Also filter out any prototype objects using the circular check.
|
|
@@ -7728,7 +8724,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
7728
8724
|
|
|
7729
8725
|
// Some type of object without properties can be shortcutted.
|
|
7730
8726
|
if (keys.length === 0) {
|
|
7731
|
-
if (isFunction(value)) {
|
|
8727
|
+
if (isFunction$1(value)) {
|
|
7732
8728
|
var name = value.name ? ': ' + value.name : '';
|
|
7733
8729
|
return ctx.stylize('[Function' + name + ']', 'special');
|
|
7734
8730
|
}
|
|
@@ -7746,13 +8742,13 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
7746
8742
|
var base = '', array = false, braces = ['{', '}'];
|
|
7747
8743
|
|
|
7748
8744
|
// Make Array say that they are Array
|
|
7749
|
-
if (isArray$
|
|
8745
|
+
if (isArray$2(value)) {
|
|
7750
8746
|
array = true;
|
|
7751
8747
|
braces = ['[', ']'];
|
|
7752
8748
|
}
|
|
7753
8749
|
|
|
7754
8750
|
// Make functions say that they are functions
|
|
7755
|
-
if (isFunction(value)) {
|
|
8751
|
+
if (isFunction$1(value)) {
|
|
7756
8752
|
var n = value.name ? ': ' + value.name : '';
|
|
7757
8753
|
base = ' [Function' + n + ']';
|
|
7758
8754
|
}
|
|
@@ -7828,7 +8824,7 @@ function formatError(value) {
|
|
|
7828
8824
|
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
7829
8825
|
var output = [];
|
|
7830
8826
|
for (var i = 0, l = value.length; i < l; ++i) {
|
|
7831
|
-
if (hasOwnProperty$
|
|
8827
|
+
if (hasOwnProperty$4(value, String(i))) {
|
|
7832
8828
|
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
7833
8829
|
String(i), true));
|
|
7834
8830
|
} else {
|
|
@@ -7859,7 +8855,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
|
7859
8855
|
str = ctx.stylize('[Setter]', 'special');
|
|
7860
8856
|
}
|
|
7861
8857
|
}
|
|
7862
|
-
if (!hasOwnProperty$
|
|
8858
|
+
if (!hasOwnProperty$4(visibleKeys, key)) {
|
|
7863
8859
|
name = '[' + key + ']';
|
|
7864
8860
|
}
|
|
7865
8861
|
if (!str) {
|
|
@@ -7925,7 +8921,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
7925
8921
|
|
|
7926
8922
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
7927
8923
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
7928
|
-
function isArray$
|
|
8924
|
+
function isArray$2(ar) {
|
|
7929
8925
|
return Array.isArray(ar);
|
|
7930
8926
|
}
|
|
7931
8927
|
|
|
@@ -7974,7 +8970,7 @@ function isError(e) {
|
|
|
7974
8970
|
(objectToString$1(e) === '[object Error]' || e instanceof Error);
|
|
7975
8971
|
}
|
|
7976
8972
|
|
|
7977
|
-
function isFunction(arg) {
|
|
8973
|
+
function isFunction$1(arg) {
|
|
7978
8974
|
return typeof arg === 'function';
|
|
7979
8975
|
}
|
|
7980
8976
|
|
|
@@ -8030,7 +9026,7 @@ function _extend(origin, add) {
|
|
|
8030
9026
|
}
|
|
8031
9027
|
return origin;
|
|
8032
9028
|
}
|
|
8033
|
-
function hasOwnProperty$
|
|
9029
|
+
function hasOwnProperty$4(obj, prop) {
|
|
8034
9030
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
8035
9031
|
}
|
|
8036
9032
|
|
|
@@ -8040,7 +9036,7 @@ var util = {
|
|
|
8040
9036
|
log: log,
|
|
8041
9037
|
isBuffer: isBuffer,
|
|
8042
9038
|
isPrimitive: isPrimitive,
|
|
8043
|
-
isFunction: isFunction,
|
|
9039
|
+
isFunction: isFunction$1,
|
|
8044
9040
|
isError: isError,
|
|
8045
9041
|
isDate: isDate,
|
|
8046
9042
|
isObject: isObject$1,
|
|
@@ -8052,7 +9048,7 @@ var util = {
|
|
|
8052
9048
|
isNullOrUndefined: isNullOrUndefined,
|
|
8053
9049
|
isNull: isNull,
|
|
8054
9050
|
isBoolean: isBoolean,
|
|
8055
|
-
isArray: isArray$
|
|
9051
|
+
isArray: isArray$2,
|
|
8056
9052
|
inspect: inspect,
|
|
8057
9053
|
deprecate: deprecate,
|
|
8058
9054
|
format: format,
|
|
@@ -9081,7 +10077,7 @@ object-assign
|
|
|
9081
10077
|
*/
|
|
9082
10078
|
/* eslint-disable no-unused-vars */
|
|
9083
10079
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
9084
|
-
var hasOwnProperty$
|
|
10080
|
+
var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
|
|
9085
10081
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
9086
10082
|
|
|
9087
10083
|
function toObject(val) {
|
|
@@ -9145,7 +10141,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
|
9145
10141
|
from = Object(arguments[s]);
|
|
9146
10142
|
|
|
9147
10143
|
for (var key in from) {
|
|
9148
|
-
if (hasOwnProperty$
|
|
10144
|
+
if (hasOwnProperty$5.call(from, key)) {
|
|
9149
10145
|
to[key] = from[key];
|
|
9150
10146
|
}
|
|
9151
10147
|
}
|