@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.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { Component, useState,
|
|
1
|
+
import React__default, { Component, useState, createContext, createElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactDom from 'react-dom';
|
|
4
4
|
import Row from 'react-bootstrap/Row';
|
|
@@ -3814,7 +3814,7 @@ var DeckContent = function (_React$Component) {
|
|
|
3814
3814
|
data: _this.data,
|
|
3815
3815
|
dataKeptToCompareNewDatarecord: _this.data,
|
|
3816
3816
|
per: _this.params ? _this.params.to : 2,
|
|
3817
|
-
page: 1,
|
|
3817
|
+
page: _this.props.currentPage || 1,
|
|
3818
3818
|
from: _this.params ? _this.params.from : 0,
|
|
3819
3819
|
to: _this.params ? _this.params.to : 2,
|
|
3820
3820
|
total_pages: null,
|
|
@@ -3832,17 +3832,16 @@ var DeckContent = function (_React$Component) {
|
|
|
3832
3832
|
return {
|
|
3833
3833
|
page: page + 1,
|
|
3834
3834
|
from: from + per,
|
|
3835
|
-
to: to + per
|
|
3836
|
-
currentPage: currentPage + 1
|
|
3835
|
+
to: to + per
|
|
3837
3836
|
};
|
|
3838
3837
|
}, _this.loadData);
|
|
3839
|
-
},
|
|
3838
|
+
}, 0), _this.loadData = function () {
|
|
3840
3839
|
var _this$state = _this.state,
|
|
3841
3840
|
from = _this$state.from,
|
|
3842
3841
|
to = _this$state.to,
|
|
3843
3842
|
data = _this$state.data,
|
|
3844
3843
|
query = _this$state.query,
|
|
3845
|
-
|
|
3844
|
+
page = _this$state.page;
|
|
3846
3845
|
var client = _this.props.client;
|
|
3847
3846
|
|
|
3848
3847
|
|
|
@@ -3856,7 +3855,7 @@ var DeckContent = function (_React$Component) {
|
|
|
3856
3855
|
}
|
|
3857
3856
|
dataArr = dataArr.map(function (item) {
|
|
3858
3857
|
return _extends({}, item, {
|
|
3859
|
-
pageNumber:
|
|
3858
|
+
pageNumber: page
|
|
3860
3859
|
});
|
|
3861
3860
|
});
|
|
3862
3861
|
|
|
@@ -3892,13 +3891,21 @@ var DeckContent = function (_React$Component) {
|
|
|
3892
3891
|
var currentPage = _this.state.currentPage;
|
|
3893
3892
|
|
|
3894
3893
|
if (seoPaginate) {
|
|
3894
|
+
var newPath = pageNumber === 1 ? '' + router.pathname : router.pathname + '?page=' + pageNumber;
|
|
3895
3895
|
if (currentPage !== pageNumber) {
|
|
3896
|
+
console.error('currentPage:', currentPage);
|
|
3897
|
+
console.error('pageNumber:', pageNumber);
|
|
3896
3898
|
lib_3.refresh();
|
|
3897
3899
|
if (pageview) {
|
|
3898
|
-
|
|
3900
|
+
_this.setState({
|
|
3901
|
+
currentPage: pageNumber
|
|
3902
|
+
}, function () {
|
|
3903
|
+
pageview(newPath);
|
|
3904
|
+
});
|
|
3899
3905
|
}
|
|
3900
3906
|
}
|
|
3901
|
-
|
|
3907
|
+
|
|
3908
|
+
window.history.pushState(newPath, '', newPath);
|
|
3902
3909
|
}
|
|
3903
3910
|
}, _this.cardLoader = function (page, columns, variant) {
|
|
3904
3911
|
var mode = variant && variant === 'bottom' ? 'column-reverse' : 'column';
|
|
@@ -3917,12 +3924,14 @@ var DeckContent = function (_React$Component) {
|
|
|
3917
3924
|
lgVar = 6;
|
|
3918
3925
|
}
|
|
3919
3926
|
|
|
3927
|
+
var pageNumber = row.pageNumber || _this.state.page;
|
|
3928
|
+
|
|
3920
3929
|
return React__default.createElement(
|
|
3921
3930
|
VisibilitySensor,
|
|
3922
3931
|
{
|
|
3923
3932
|
key: itemCounter,
|
|
3924
3933
|
onChange: function onChange(isVisible) {
|
|
3925
|
-
isVisible && _this.changePageNumber(
|
|
3934
|
+
isVisible && _this.changePageNumber(pageNumber);
|
|
3926
3935
|
} },
|
|
3927
3936
|
React__default.createElement(
|
|
3928
3937
|
Col,
|
|
@@ -4076,6 +4085,993 @@ var DeckContent = function (_React$Component) {
|
|
|
4076
4085
|
|
|
4077
4086
|
var ContentCard = withRouter(DeckContent);
|
|
4078
4087
|
|
|
4088
|
+
/**
|
|
4089
|
+
* Checks if `value` is classified as an `Array` object.
|
|
4090
|
+
*
|
|
4091
|
+
* @static
|
|
4092
|
+
* @memberOf _
|
|
4093
|
+
* @since 0.1.0
|
|
4094
|
+
* @category Lang
|
|
4095
|
+
* @param {*} value The value to check.
|
|
4096
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
4097
|
+
* @example
|
|
4098
|
+
*
|
|
4099
|
+
* _.isArray([1, 2, 3]);
|
|
4100
|
+
* // => true
|
|
4101
|
+
*
|
|
4102
|
+
* _.isArray(document.body.children);
|
|
4103
|
+
* // => false
|
|
4104
|
+
*
|
|
4105
|
+
* _.isArray('abc');
|
|
4106
|
+
* // => false
|
|
4107
|
+
*
|
|
4108
|
+
* _.isArray(_.noop);
|
|
4109
|
+
* // => false
|
|
4110
|
+
*/
|
|
4111
|
+
var isArray = Array.isArray;
|
|
4112
|
+
|
|
4113
|
+
var isArray_1 = isArray;
|
|
4114
|
+
|
|
4115
|
+
/** Used to match property names within property paths. */
|
|
4116
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
4117
|
+
reIsPlainProp = /^\w*$/;
|
|
4118
|
+
|
|
4119
|
+
/**
|
|
4120
|
+
* Checks if `value` is a property name and not a property path.
|
|
4121
|
+
*
|
|
4122
|
+
* @private
|
|
4123
|
+
* @param {*} value The value to check.
|
|
4124
|
+
* @param {Object} [object] The object to query keys on.
|
|
4125
|
+
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
4126
|
+
*/
|
|
4127
|
+
function isKey(value, object) {
|
|
4128
|
+
if (isArray_1(value)) {
|
|
4129
|
+
return false;
|
|
4130
|
+
}
|
|
4131
|
+
var type = typeof value;
|
|
4132
|
+
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
4133
|
+
value == null || isSymbol_1(value)) {
|
|
4134
|
+
return true;
|
|
4135
|
+
}
|
|
4136
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
4137
|
+
(object != null && value in Object(object));
|
|
4138
|
+
}
|
|
4139
|
+
|
|
4140
|
+
var _isKey = isKey;
|
|
4141
|
+
|
|
4142
|
+
/** `Object#toString` result references. */
|
|
4143
|
+
var asyncTag = '[object AsyncFunction]',
|
|
4144
|
+
funcTag = '[object Function]',
|
|
4145
|
+
genTag = '[object GeneratorFunction]',
|
|
4146
|
+
proxyTag = '[object Proxy]';
|
|
4147
|
+
|
|
4148
|
+
/**
|
|
4149
|
+
* Checks if `value` is classified as a `Function` object.
|
|
4150
|
+
*
|
|
4151
|
+
* @static
|
|
4152
|
+
* @memberOf _
|
|
4153
|
+
* @since 0.1.0
|
|
4154
|
+
* @category Lang
|
|
4155
|
+
* @param {*} value The value to check.
|
|
4156
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
4157
|
+
* @example
|
|
4158
|
+
*
|
|
4159
|
+
* _.isFunction(_);
|
|
4160
|
+
* // => true
|
|
4161
|
+
*
|
|
4162
|
+
* _.isFunction(/abc/);
|
|
4163
|
+
* // => false
|
|
4164
|
+
*/
|
|
4165
|
+
function isFunction(value) {
|
|
4166
|
+
if (!isObject_1(value)) {
|
|
4167
|
+
return false;
|
|
4168
|
+
}
|
|
4169
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
4170
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
4171
|
+
var tag = _baseGetTag(value);
|
|
4172
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
4173
|
+
}
|
|
4174
|
+
|
|
4175
|
+
var isFunction_1 = isFunction;
|
|
4176
|
+
|
|
4177
|
+
/** Used to detect overreaching core-js shims. */
|
|
4178
|
+
var coreJsData = _root['__core-js_shared__'];
|
|
4179
|
+
|
|
4180
|
+
var _coreJsData = coreJsData;
|
|
4181
|
+
|
|
4182
|
+
/** Used to detect methods masquerading as native. */
|
|
4183
|
+
var maskSrcKey = (function() {
|
|
4184
|
+
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
4185
|
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
4186
|
+
}());
|
|
4187
|
+
|
|
4188
|
+
/**
|
|
4189
|
+
* Checks if `func` has its source masked.
|
|
4190
|
+
*
|
|
4191
|
+
* @private
|
|
4192
|
+
* @param {Function} func The function to check.
|
|
4193
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
4194
|
+
*/
|
|
4195
|
+
function isMasked(func) {
|
|
4196
|
+
return !!maskSrcKey && (maskSrcKey in func);
|
|
4197
|
+
}
|
|
4198
|
+
|
|
4199
|
+
var _isMasked = isMasked;
|
|
4200
|
+
|
|
4201
|
+
/** Used for built-in method references. */
|
|
4202
|
+
var funcProto = Function.prototype;
|
|
4203
|
+
|
|
4204
|
+
/** Used to resolve the decompiled source of functions. */
|
|
4205
|
+
var funcToString = funcProto.toString;
|
|
4206
|
+
|
|
4207
|
+
/**
|
|
4208
|
+
* Converts `func` to its source code.
|
|
4209
|
+
*
|
|
4210
|
+
* @private
|
|
4211
|
+
* @param {Function} func The function to convert.
|
|
4212
|
+
* @returns {string} Returns the source code.
|
|
4213
|
+
*/
|
|
4214
|
+
function toSource(func) {
|
|
4215
|
+
if (func != null) {
|
|
4216
|
+
try {
|
|
4217
|
+
return funcToString.call(func);
|
|
4218
|
+
} catch (e) {}
|
|
4219
|
+
try {
|
|
4220
|
+
return (func + '');
|
|
4221
|
+
} catch (e) {}
|
|
4222
|
+
}
|
|
4223
|
+
return '';
|
|
4224
|
+
}
|
|
4225
|
+
|
|
4226
|
+
var _toSource = toSource;
|
|
4227
|
+
|
|
4228
|
+
/**
|
|
4229
|
+
* Used to match `RegExp`
|
|
4230
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
4231
|
+
*/
|
|
4232
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
4233
|
+
|
|
4234
|
+
/** Used to detect host constructors (Safari). */
|
|
4235
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
4236
|
+
|
|
4237
|
+
/** Used for built-in method references. */
|
|
4238
|
+
var funcProto$1 = Function.prototype,
|
|
4239
|
+
objectProto$2 = Object.prototype;
|
|
4240
|
+
|
|
4241
|
+
/** Used to resolve the decompiled source of functions. */
|
|
4242
|
+
var funcToString$1 = funcProto$1.toString;
|
|
4243
|
+
|
|
4244
|
+
/** Used to check objects for own properties. */
|
|
4245
|
+
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
|
|
4246
|
+
|
|
4247
|
+
/** Used to detect if a method is native. */
|
|
4248
|
+
var reIsNative = RegExp('^' +
|
|
4249
|
+
funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&')
|
|
4250
|
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
4251
|
+
);
|
|
4252
|
+
|
|
4253
|
+
/**
|
|
4254
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
4255
|
+
*
|
|
4256
|
+
* @private
|
|
4257
|
+
* @param {*} value The value to check.
|
|
4258
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
4259
|
+
* else `false`.
|
|
4260
|
+
*/
|
|
4261
|
+
function baseIsNative(value) {
|
|
4262
|
+
if (!isObject_1(value) || _isMasked(value)) {
|
|
4263
|
+
return false;
|
|
4264
|
+
}
|
|
4265
|
+
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
4266
|
+
return pattern.test(_toSource(value));
|
|
4267
|
+
}
|
|
4268
|
+
|
|
4269
|
+
var _baseIsNative = baseIsNative;
|
|
4270
|
+
|
|
4271
|
+
/**
|
|
4272
|
+
* Gets the value at `key` of `object`.
|
|
4273
|
+
*
|
|
4274
|
+
* @private
|
|
4275
|
+
* @param {Object} [object] The object to query.
|
|
4276
|
+
* @param {string} key The key of the property to get.
|
|
4277
|
+
* @returns {*} Returns the property value.
|
|
4278
|
+
*/
|
|
4279
|
+
function getValue(object, key) {
|
|
4280
|
+
return object == null ? undefined : object[key];
|
|
4281
|
+
}
|
|
4282
|
+
|
|
4283
|
+
var _getValue = getValue;
|
|
4284
|
+
|
|
4285
|
+
/**
|
|
4286
|
+
* Gets the native function at `key` of `object`.
|
|
4287
|
+
*
|
|
4288
|
+
* @private
|
|
4289
|
+
* @param {Object} object The object to query.
|
|
4290
|
+
* @param {string} key The key of the method to get.
|
|
4291
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
4292
|
+
*/
|
|
4293
|
+
function getNative(object, key) {
|
|
4294
|
+
var value = _getValue(object, key);
|
|
4295
|
+
return _baseIsNative(value) ? value : undefined;
|
|
4296
|
+
}
|
|
4297
|
+
|
|
4298
|
+
var _getNative = getNative;
|
|
4299
|
+
|
|
4300
|
+
/* Built-in method references that are verified to be native. */
|
|
4301
|
+
var nativeCreate = _getNative(Object, 'create');
|
|
4302
|
+
|
|
4303
|
+
var _nativeCreate = nativeCreate;
|
|
4304
|
+
|
|
4305
|
+
/**
|
|
4306
|
+
* Removes all key-value entries from the hash.
|
|
4307
|
+
*
|
|
4308
|
+
* @private
|
|
4309
|
+
* @name clear
|
|
4310
|
+
* @memberOf Hash
|
|
4311
|
+
*/
|
|
4312
|
+
function hashClear() {
|
|
4313
|
+
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
4314
|
+
this.size = 0;
|
|
4315
|
+
}
|
|
4316
|
+
|
|
4317
|
+
var _hashClear = hashClear;
|
|
4318
|
+
|
|
4319
|
+
/**
|
|
4320
|
+
* Removes `key` and its value from the hash.
|
|
4321
|
+
*
|
|
4322
|
+
* @private
|
|
4323
|
+
* @name delete
|
|
4324
|
+
* @memberOf Hash
|
|
4325
|
+
* @param {Object} hash The hash to modify.
|
|
4326
|
+
* @param {string} key The key of the value to remove.
|
|
4327
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
4328
|
+
*/
|
|
4329
|
+
function hashDelete(key) {
|
|
4330
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
4331
|
+
this.size -= result ? 1 : 0;
|
|
4332
|
+
return result;
|
|
4333
|
+
}
|
|
4334
|
+
|
|
4335
|
+
var _hashDelete = hashDelete;
|
|
4336
|
+
|
|
4337
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
4338
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
4339
|
+
|
|
4340
|
+
/** Used for built-in method references. */
|
|
4341
|
+
var objectProto$3 = Object.prototype;
|
|
4342
|
+
|
|
4343
|
+
/** Used to check objects for own properties. */
|
|
4344
|
+
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
4345
|
+
|
|
4346
|
+
/**
|
|
4347
|
+
* Gets the hash value for `key`.
|
|
4348
|
+
*
|
|
4349
|
+
* @private
|
|
4350
|
+
* @name get
|
|
4351
|
+
* @memberOf Hash
|
|
4352
|
+
* @param {string} key The key of the value to get.
|
|
4353
|
+
* @returns {*} Returns the entry value.
|
|
4354
|
+
*/
|
|
4355
|
+
function hashGet(key) {
|
|
4356
|
+
var data = this.__data__;
|
|
4357
|
+
if (_nativeCreate) {
|
|
4358
|
+
var result = data[key];
|
|
4359
|
+
return result === HASH_UNDEFINED ? undefined : result;
|
|
4360
|
+
}
|
|
4361
|
+
return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
|
|
4362
|
+
}
|
|
4363
|
+
|
|
4364
|
+
var _hashGet = hashGet;
|
|
4365
|
+
|
|
4366
|
+
/** Used for built-in method references. */
|
|
4367
|
+
var objectProto$4 = Object.prototype;
|
|
4368
|
+
|
|
4369
|
+
/** Used to check objects for own properties. */
|
|
4370
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
4371
|
+
|
|
4372
|
+
/**
|
|
4373
|
+
* Checks if a hash value for `key` exists.
|
|
4374
|
+
*
|
|
4375
|
+
* @private
|
|
4376
|
+
* @name has
|
|
4377
|
+
* @memberOf Hash
|
|
4378
|
+
* @param {string} key The key of the entry to check.
|
|
4379
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
4380
|
+
*/
|
|
4381
|
+
function hashHas(key) {
|
|
4382
|
+
var data = this.__data__;
|
|
4383
|
+
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
|
|
4384
|
+
}
|
|
4385
|
+
|
|
4386
|
+
var _hashHas = hashHas;
|
|
4387
|
+
|
|
4388
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
4389
|
+
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
4390
|
+
|
|
4391
|
+
/**
|
|
4392
|
+
* Sets the hash `key` to `value`.
|
|
4393
|
+
*
|
|
4394
|
+
* @private
|
|
4395
|
+
* @name set
|
|
4396
|
+
* @memberOf Hash
|
|
4397
|
+
* @param {string} key The key of the value to set.
|
|
4398
|
+
* @param {*} value The value to set.
|
|
4399
|
+
* @returns {Object} Returns the hash instance.
|
|
4400
|
+
*/
|
|
4401
|
+
function hashSet(key, value) {
|
|
4402
|
+
var data = this.__data__;
|
|
4403
|
+
this.size += this.has(key) ? 0 : 1;
|
|
4404
|
+
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
|
|
4405
|
+
return this;
|
|
4406
|
+
}
|
|
4407
|
+
|
|
4408
|
+
var _hashSet = hashSet;
|
|
4409
|
+
|
|
4410
|
+
/**
|
|
4411
|
+
* Creates a hash object.
|
|
4412
|
+
*
|
|
4413
|
+
* @private
|
|
4414
|
+
* @constructor
|
|
4415
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
4416
|
+
*/
|
|
4417
|
+
function Hash(entries) {
|
|
4418
|
+
var index = -1,
|
|
4419
|
+
length = entries == null ? 0 : entries.length;
|
|
4420
|
+
|
|
4421
|
+
this.clear();
|
|
4422
|
+
while (++index < length) {
|
|
4423
|
+
var entry = entries[index];
|
|
4424
|
+
this.set(entry[0], entry[1]);
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
// Add methods to `Hash`.
|
|
4429
|
+
Hash.prototype.clear = _hashClear;
|
|
4430
|
+
Hash.prototype['delete'] = _hashDelete;
|
|
4431
|
+
Hash.prototype.get = _hashGet;
|
|
4432
|
+
Hash.prototype.has = _hashHas;
|
|
4433
|
+
Hash.prototype.set = _hashSet;
|
|
4434
|
+
|
|
4435
|
+
var _Hash = Hash;
|
|
4436
|
+
|
|
4437
|
+
/**
|
|
4438
|
+
* Removes all key-value entries from the list cache.
|
|
4439
|
+
*
|
|
4440
|
+
* @private
|
|
4441
|
+
* @name clear
|
|
4442
|
+
* @memberOf ListCache
|
|
4443
|
+
*/
|
|
4444
|
+
function listCacheClear() {
|
|
4445
|
+
this.__data__ = [];
|
|
4446
|
+
this.size = 0;
|
|
4447
|
+
}
|
|
4448
|
+
|
|
4449
|
+
var _listCacheClear = listCacheClear;
|
|
4450
|
+
|
|
4451
|
+
/**
|
|
4452
|
+
* Performs a
|
|
4453
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
4454
|
+
* comparison between two values to determine if they are equivalent.
|
|
4455
|
+
*
|
|
4456
|
+
* @static
|
|
4457
|
+
* @memberOf _
|
|
4458
|
+
* @since 4.0.0
|
|
4459
|
+
* @category Lang
|
|
4460
|
+
* @param {*} value The value to compare.
|
|
4461
|
+
* @param {*} other The other value to compare.
|
|
4462
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
4463
|
+
* @example
|
|
4464
|
+
*
|
|
4465
|
+
* var object = { 'a': 1 };
|
|
4466
|
+
* var other = { 'a': 1 };
|
|
4467
|
+
*
|
|
4468
|
+
* _.eq(object, object);
|
|
4469
|
+
* // => true
|
|
4470
|
+
*
|
|
4471
|
+
* _.eq(object, other);
|
|
4472
|
+
* // => false
|
|
4473
|
+
*
|
|
4474
|
+
* _.eq('a', 'a');
|
|
4475
|
+
* // => true
|
|
4476
|
+
*
|
|
4477
|
+
* _.eq('a', Object('a'));
|
|
4478
|
+
* // => false
|
|
4479
|
+
*
|
|
4480
|
+
* _.eq(NaN, NaN);
|
|
4481
|
+
* // => true
|
|
4482
|
+
*/
|
|
4483
|
+
function eq(value, other) {
|
|
4484
|
+
return value === other || (value !== value && other !== other);
|
|
4485
|
+
}
|
|
4486
|
+
|
|
4487
|
+
var eq_1 = eq;
|
|
4488
|
+
|
|
4489
|
+
/**
|
|
4490
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
4491
|
+
*
|
|
4492
|
+
* @private
|
|
4493
|
+
* @param {Array} array The array to inspect.
|
|
4494
|
+
* @param {*} key The key to search for.
|
|
4495
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
4496
|
+
*/
|
|
4497
|
+
function assocIndexOf(array, key) {
|
|
4498
|
+
var length = array.length;
|
|
4499
|
+
while (length--) {
|
|
4500
|
+
if (eq_1(array[length][0], key)) {
|
|
4501
|
+
return length;
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4504
|
+
return -1;
|
|
4505
|
+
}
|
|
4506
|
+
|
|
4507
|
+
var _assocIndexOf = assocIndexOf;
|
|
4508
|
+
|
|
4509
|
+
/** Used for built-in method references. */
|
|
4510
|
+
var arrayProto = Array.prototype;
|
|
4511
|
+
|
|
4512
|
+
/** Built-in value references. */
|
|
4513
|
+
var splice = arrayProto.splice;
|
|
4514
|
+
|
|
4515
|
+
/**
|
|
4516
|
+
* Removes `key` and its value from the list cache.
|
|
4517
|
+
*
|
|
4518
|
+
* @private
|
|
4519
|
+
* @name delete
|
|
4520
|
+
* @memberOf ListCache
|
|
4521
|
+
* @param {string} key The key of the value to remove.
|
|
4522
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
4523
|
+
*/
|
|
4524
|
+
function listCacheDelete(key) {
|
|
4525
|
+
var data = this.__data__,
|
|
4526
|
+
index = _assocIndexOf(data, key);
|
|
4527
|
+
|
|
4528
|
+
if (index < 0) {
|
|
4529
|
+
return false;
|
|
4530
|
+
}
|
|
4531
|
+
var lastIndex = data.length - 1;
|
|
4532
|
+
if (index == lastIndex) {
|
|
4533
|
+
data.pop();
|
|
4534
|
+
} else {
|
|
4535
|
+
splice.call(data, index, 1);
|
|
4536
|
+
}
|
|
4537
|
+
--this.size;
|
|
4538
|
+
return true;
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4541
|
+
var _listCacheDelete = listCacheDelete;
|
|
4542
|
+
|
|
4543
|
+
/**
|
|
4544
|
+
* Gets the list cache value for `key`.
|
|
4545
|
+
*
|
|
4546
|
+
* @private
|
|
4547
|
+
* @name get
|
|
4548
|
+
* @memberOf ListCache
|
|
4549
|
+
* @param {string} key The key of the value to get.
|
|
4550
|
+
* @returns {*} Returns the entry value.
|
|
4551
|
+
*/
|
|
4552
|
+
function listCacheGet(key) {
|
|
4553
|
+
var data = this.__data__,
|
|
4554
|
+
index = _assocIndexOf(data, key);
|
|
4555
|
+
|
|
4556
|
+
return index < 0 ? undefined : data[index][1];
|
|
4557
|
+
}
|
|
4558
|
+
|
|
4559
|
+
var _listCacheGet = listCacheGet;
|
|
4560
|
+
|
|
4561
|
+
/**
|
|
4562
|
+
* Checks if a list cache value for `key` exists.
|
|
4563
|
+
*
|
|
4564
|
+
* @private
|
|
4565
|
+
* @name has
|
|
4566
|
+
* @memberOf ListCache
|
|
4567
|
+
* @param {string} key The key of the entry to check.
|
|
4568
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
4569
|
+
*/
|
|
4570
|
+
function listCacheHas(key) {
|
|
4571
|
+
return _assocIndexOf(this.__data__, key) > -1;
|
|
4572
|
+
}
|
|
4573
|
+
|
|
4574
|
+
var _listCacheHas = listCacheHas;
|
|
4575
|
+
|
|
4576
|
+
/**
|
|
4577
|
+
* Sets the list cache `key` to `value`.
|
|
4578
|
+
*
|
|
4579
|
+
* @private
|
|
4580
|
+
* @name set
|
|
4581
|
+
* @memberOf ListCache
|
|
4582
|
+
* @param {string} key The key of the value to set.
|
|
4583
|
+
* @param {*} value The value to set.
|
|
4584
|
+
* @returns {Object} Returns the list cache instance.
|
|
4585
|
+
*/
|
|
4586
|
+
function listCacheSet(key, value) {
|
|
4587
|
+
var data = this.__data__,
|
|
4588
|
+
index = _assocIndexOf(data, key);
|
|
4589
|
+
|
|
4590
|
+
if (index < 0) {
|
|
4591
|
+
++this.size;
|
|
4592
|
+
data.push([key, value]);
|
|
4593
|
+
} else {
|
|
4594
|
+
data[index][1] = value;
|
|
4595
|
+
}
|
|
4596
|
+
return this;
|
|
4597
|
+
}
|
|
4598
|
+
|
|
4599
|
+
var _listCacheSet = listCacheSet;
|
|
4600
|
+
|
|
4601
|
+
/**
|
|
4602
|
+
* Creates an list cache object.
|
|
4603
|
+
*
|
|
4604
|
+
* @private
|
|
4605
|
+
* @constructor
|
|
4606
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
4607
|
+
*/
|
|
4608
|
+
function ListCache(entries) {
|
|
4609
|
+
var index = -1,
|
|
4610
|
+
length = entries == null ? 0 : entries.length;
|
|
4611
|
+
|
|
4612
|
+
this.clear();
|
|
4613
|
+
while (++index < length) {
|
|
4614
|
+
var entry = entries[index];
|
|
4615
|
+
this.set(entry[0], entry[1]);
|
|
4616
|
+
}
|
|
4617
|
+
}
|
|
4618
|
+
|
|
4619
|
+
// Add methods to `ListCache`.
|
|
4620
|
+
ListCache.prototype.clear = _listCacheClear;
|
|
4621
|
+
ListCache.prototype['delete'] = _listCacheDelete;
|
|
4622
|
+
ListCache.prototype.get = _listCacheGet;
|
|
4623
|
+
ListCache.prototype.has = _listCacheHas;
|
|
4624
|
+
ListCache.prototype.set = _listCacheSet;
|
|
4625
|
+
|
|
4626
|
+
var _ListCache = ListCache;
|
|
4627
|
+
|
|
4628
|
+
/* Built-in method references that are verified to be native. */
|
|
4629
|
+
var Map = _getNative(_root, 'Map');
|
|
4630
|
+
|
|
4631
|
+
var _Map = Map;
|
|
4632
|
+
|
|
4633
|
+
/**
|
|
4634
|
+
* Removes all key-value entries from the map.
|
|
4635
|
+
*
|
|
4636
|
+
* @private
|
|
4637
|
+
* @name clear
|
|
4638
|
+
* @memberOf MapCache
|
|
4639
|
+
*/
|
|
4640
|
+
function mapCacheClear() {
|
|
4641
|
+
this.size = 0;
|
|
4642
|
+
this.__data__ = {
|
|
4643
|
+
'hash': new _Hash,
|
|
4644
|
+
'map': new (_Map || _ListCache),
|
|
4645
|
+
'string': new _Hash
|
|
4646
|
+
};
|
|
4647
|
+
}
|
|
4648
|
+
|
|
4649
|
+
var _mapCacheClear = mapCacheClear;
|
|
4650
|
+
|
|
4651
|
+
/**
|
|
4652
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
4653
|
+
*
|
|
4654
|
+
* @private
|
|
4655
|
+
* @param {*} value The value to check.
|
|
4656
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
4657
|
+
*/
|
|
4658
|
+
function isKeyable(value) {
|
|
4659
|
+
var type = typeof value;
|
|
4660
|
+
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
4661
|
+
? (value !== '__proto__')
|
|
4662
|
+
: (value === null);
|
|
4663
|
+
}
|
|
4664
|
+
|
|
4665
|
+
var _isKeyable = isKeyable;
|
|
4666
|
+
|
|
4667
|
+
/**
|
|
4668
|
+
* Gets the data for `map`.
|
|
4669
|
+
*
|
|
4670
|
+
* @private
|
|
4671
|
+
* @param {Object} map The map to query.
|
|
4672
|
+
* @param {string} key The reference key.
|
|
4673
|
+
* @returns {*} Returns the map data.
|
|
4674
|
+
*/
|
|
4675
|
+
function getMapData(map, key) {
|
|
4676
|
+
var data = map.__data__;
|
|
4677
|
+
return _isKeyable(key)
|
|
4678
|
+
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
4679
|
+
: data.map;
|
|
4680
|
+
}
|
|
4681
|
+
|
|
4682
|
+
var _getMapData = getMapData;
|
|
4683
|
+
|
|
4684
|
+
/**
|
|
4685
|
+
* Removes `key` and its value from the map.
|
|
4686
|
+
*
|
|
4687
|
+
* @private
|
|
4688
|
+
* @name delete
|
|
4689
|
+
* @memberOf MapCache
|
|
4690
|
+
* @param {string} key The key of the value to remove.
|
|
4691
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
4692
|
+
*/
|
|
4693
|
+
function mapCacheDelete(key) {
|
|
4694
|
+
var result = _getMapData(this, key)['delete'](key);
|
|
4695
|
+
this.size -= result ? 1 : 0;
|
|
4696
|
+
return result;
|
|
4697
|
+
}
|
|
4698
|
+
|
|
4699
|
+
var _mapCacheDelete = mapCacheDelete;
|
|
4700
|
+
|
|
4701
|
+
/**
|
|
4702
|
+
* Gets the map value for `key`.
|
|
4703
|
+
*
|
|
4704
|
+
* @private
|
|
4705
|
+
* @name get
|
|
4706
|
+
* @memberOf MapCache
|
|
4707
|
+
* @param {string} key The key of the value to get.
|
|
4708
|
+
* @returns {*} Returns the entry value.
|
|
4709
|
+
*/
|
|
4710
|
+
function mapCacheGet(key) {
|
|
4711
|
+
return _getMapData(this, key).get(key);
|
|
4712
|
+
}
|
|
4713
|
+
|
|
4714
|
+
var _mapCacheGet = mapCacheGet;
|
|
4715
|
+
|
|
4716
|
+
/**
|
|
4717
|
+
* Checks if a map value for `key` exists.
|
|
4718
|
+
*
|
|
4719
|
+
* @private
|
|
4720
|
+
* @name has
|
|
4721
|
+
* @memberOf MapCache
|
|
4722
|
+
* @param {string} key The key of the entry to check.
|
|
4723
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
4724
|
+
*/
|
|
4725
|
+
function mapCacheHas(key) {
|
|
4726
|
+
return _getMapData(this, key).has(key);
|
|
4727
|
+
}
|
|
4728
|
+
|
|
4729
|
+
var _mapCacheHas = mapCacheHas;
|
|
4730
|
+
|
|
4731
|
+
/**
|
|
4732
|
+
* Sets the map `key` to `value`.
|
|
4733
|
+
*
|
|
4734
|
+
* @private
|
|
4735
|
+
* @name set
|
|
4736
|
+
* @memberOf MapCache
|
|
4737
|
+
* @param {string} key The key of the value to set.
|
|
4738
|
+
* @param {*} value The value to set.
|
|
4739
|
+
* @returns {Object} Returns the map cache instance.
|
|
4740
|
+
*/
|
|
4741
|
+
function mapCacheSet(key, value) {
|
|
4742
|
+
var data = _getMapData(this, key),
|
|
4743
|
+
size = data.size;
|
|
4744
|
+
|
|
4745
|
+
data.set(key, value);
|
|
4746
|
+
this.size += data.size == size ? 0 : 1;
|
|
4747
|
+
return this;
|
|
4748
|
+
}
|
|
4749
|
+
|
|
4750
|
+
var _mapCacheSet = mapCacheSet;
|
|
4751
|
+
|
|
4752
|
+
/**
|
|
4753
|
+
* Creates a map cache object to store key-value pairs.
|
|
4754
|
+
*
|
|
4755
|
+
* @private
|
|
4756
|
+
* @constructor
|
|
4757
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
4758
|
+
*/
|
|
4759
|
+
function MapCache(entries) {
|
|
4760
|
+
var index = -1,
|
|
4761
|
+
length = entries == null ? 0 : entries.length;
|
|
4762
|
+
|
|
4763
|
+
this.clear();
|
|
4764
|
+
while (++index < length) {
|
|
4765
|
+
var entry = entries[index];
|
|
4766
|
+
this.set(entry[0], entry[1]);
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
// Add methods to `MapCache`.
|
|
4771
|
+
MapCache.prototype.clear = _mapCacheClear;
|
|
4772
|
+
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
4773
|
+
MapCache.prototype.get = _mapCacheGet;
|
|
4774
|
+
MapCache.prototype.has = _mapCacheHas;
|
|
4775
|
+
MapCache.prototype.set = _mapCacheSet;
|
|
4776
|
+
|
|
4777
|
+
var _MapCache = MapCache;
|
|
4778
|
+
|
|
4779
|
+
/** Error message constants. */
|
|
4780
|
+
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
4781
|
+
|
|
4782
|
+
/**
|
|
4783
|
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
4784
|
+
* provided, it determines the cache key for storing the result based on the
|
|
4785
|
+
* arguments provided to the memoized function. By default, the first argument
|
|
4786
|
+
* provided to the memoized function is used as the map cache key. The `func`
|
|
4787
|
+
* is invoked with the `this` binding of the memoized function.
|
|
4788
|
+
*
|
|
4789
|
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
4790
|
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
4791
|
+
* constructor with one whose instances implement the
|
|
4792
|
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
4793
|
+
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
4794
|
+
*
|
|
4795
|
+
* @static
|
|
4796
|
+
* @memberOf _
|
|
4797
|
+
* @since 0.1.0
|
|
4798
|
+
* @category Function
|
|
4799
|
+
* @param {Function} func The function to have its output memoized.
|
|
4800
|
+
* @param {Function} [resolver] The function to resolve the cache key.
|
|
4801
|
+
* @returns {Function} Returns the new memoized function.
|
|
4802
|
+
* @example
|
|
4803
|
+
*
|
|
4804
|
+
* var object = { 'a': 1, 'b': 2 };
|
|
4805
|
+
* var other = { 'c': 3, 'd': 4 };
|
|
4806
|
+
*
|
|
4807
|
+
* var values = _.memoize(_.values);
|
|
4808
|
+
* values(object);
|
|
4809
|
+
* // => [1, 2]
|
|
4810
|
+
*
|
|
4811
|
+
* values(other);
|
|
4812
|
+
* // => [3, 4]
|
|
4813
|
+
*
|
|
4814
|
+
* object.a = 2;
|
|
4815
|
+
* values(object);
|
|
4816
|
+
* // => [1, 2]
|
|
4817
|
+
*
|
|
4818
|
+
* // Modify the result cache.
|
|
4819
|
+
* values.cache.set(object, ['a', 'b']);
|
|
4820
|
+
* values(object);
|
|
4821
|
+
* // => ['a', 'b']
|
|
4822
|
+
*
|
|
4823
|
+
* // Replace `_.memoize.Cache`.
|
|
4824
|
+
* _.memoize.Cache = WeakMap;
|
|
4825
|
+
*/
|
|
4826
|
+
function memoize(func, resolver) {
|
|
4827
|
+
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
4828
|
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
4829
|
+
}
|
|
4830
|
+
var memoized = function() {
|
|
4831
|
+
var args = arguments,
|
|
4832
|
+
key = resolver ? resolver.apply(this, args) : args[0],
|
|
4833
|
+
cache = memoized.cache;
|
|
4834
|
+
|
|
4835
|
+
if (cache.has(key)) {
|
|
4836
|
+
return cache.get(key);
|
|
4837
|
+
}
|
|
4838
|
+
var result = func.apply(this, args);
|
|
4839
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
4840
|
+
return result;
|
|
4841
|
+
};
|
|
4842
|
+
memoized.cache = new (memoize.Cache || _MapCache);
|
|
4843
|
+
return memoized;
|
|
4844
|
+
}
|
|
4845
|
+
|
|
4846
|
+
// Expose `MapCache`.
|
|
4847
|
+
memoize.Cache = _MapCache;
|
|
4848
|
+
|
|
4849
|
+
var memoize_1 = memoize;
|
|
4850
|
+
|
|
4851
|
+
/** Used as the maximum memoize cache size. */
|
|
4852
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
4853
|
+
|
|
4854
|
+
/**
|
|
4855
|
+
* A specialized version of `_.memoize` which clears the memoized function's
|
|
4856
|
+
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
4857
|
+
*
|
|
4858
|
+
* @private
|
|
4859
|
+
* @param {Function} func The function to have its output memoized.
|
|
4860
|
+
* @returns {Function} Returns the new memoized function.
|
|
4861
|
+
*/
|
|
4862
|
+
function memoizeCapped(func) {
|
|
4863
|
+
var result = memoize_1(func, function(key) {
|
|
4864
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
4865
|
+
cache.clear();
|
|
4866
|
+
}
|
|
4867
|
+
return key;
|
|
4868
|
+
});
|
|
4869
|
+
|
|
4870
|
+
var cache = result.cache;
|
|
4871
|
+
return result;
|
|
4872
|
+
}
|
|
4873
|
+
|
|
4874
|
+
var _memoizeCapped = memoizeCapped;
|
|
4875
|
+
|
|
4876
|
+
/** Used to match property names within property paths. */
|
|
4877
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
4878
|
+
|
|
4879
|
+
/** Used to match backslashes in property paths. */
|
|
4880
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
4881
|
+
|
|
4882
|
+
/**
|
|
4883
|
+
* Converts `string` to a property path array.
|
|
4884
|
+
*
|
|
4885
|
+
* @private
|
|
4886
|
+
* @param {string} string The string to convert.
|
|
4887
|
+
* @returns {Array} Returns the property path array.
|
|
4888
|
+
*/
|
|
4889
|
+
var stringToPath = _memoizeCapped(function(string) {
|
|
4890
|
+
var result = [];
|
|
4891
|
+
if (string.charCodeAt(0) === 46 /* . */) {
|
|
4892
|
+
result.push('');
|
|
4893
|
+
}
|
|
4894
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
4895
|
+
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
4896
|
+
});
|
|
4897
|
+
return result;
|
|
4898
|
+
});
|
|
4899
|
+
|
|
4900
|
+
var _stringToPath = stringToPath;
|
|
4901
|
+
|
|
4902
|
+
/**
|
|
4903
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
4904
|
+
* shorthands.
|
|
4905
|
+
*
|
|
4906
|
+
* @private
|
|
4907
|
+
* @param {Array} [array] The array to iterate over.
|
|
4908
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
4909
|
+
* @returns {Array} Returns the new mapped array.
|
|
4910
|
+
*/
|
|
4911
|
+
function arrayMap(array, iteratee) {
|
|
4912
|
+
var index = -1,
|
|
4913
|
+
length = array == null ? 0 : array.length,
|
|
4914
|
+
result = Array(length);
|
|
4915
|
+
|
|
4916
|
+
while (++index < length) {
|
|
4917
|
+
result[index] = iteratee(array[index], index, array);
|
|
4918
|
+
}
|
|
4919
|
+
return result;
|
|
4920
|
+
}
|
|
4921
|
+
|
|
4922
|
+
var _arrayMap = arrayMap;
|
|
4923
|
+
|
|
4924
|
+
/** Used as references for various `Number` constants. */
|
|
4925
|
+
var INFINITY = 1 / 0;
|
|
4926
|
+
|
|
4927
|
+
/** Used to convert symbols to primitives and strings. */
|
|
4928
|
+
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
4929
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
4930
|
+
|
|
4931
|
+
/**
|
|
4932
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
4933
|
+
* values to empty strings.
|
|
4934
|
+
*
|
|
4935
|
+
* @private
|
|
4936
|
+
* @param {*} value The value to process.
|
|
4937
|
+
* @returns {string} Returns the string.
|
|
4938
|
+
*/
|
|
4939
|
+
function baseToString(value) {
|
|
4940
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
4941
|
+
if (typeof value == 'string') {
|
|
4942
|
+
return value;
|
|
4943
|
+
}
|
|
4944
|
+
if (isArray_1(value)) {
|
|
4945
|
+
// Recursively convert values (susceptible to call stack limits).
|
|
4946
|
+
return _arrayMap(value, baseToString) + '';
|
|
4947
|
+
}
|
|
4948
|
+
if (isSymbol_1(value)) {
|
|
4949
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
4950
|
+
}
|
|
4951
|
+
var result = (value + '');
|
|
4952
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
4953
|
+
}
|
|
4954
|
+
|
|
4955
|
+
var _baseToString = baseToString;
|
|
4956
|
+
|
|
4957
|
+
/**
|
|
4958
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
4959
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
4960
|
+
*
|
|
4961
|
+
* @static
|
|
4962
|
+
* @memberOf _
|
|
4963
|
+
* @since 4.0.0
|
|
4964
|
+
* @category Lang
|
|
4965
|
+
* @param {*} value The value to convert.
|
|
4966
|
+
* @returns {string} Returns the converted string.
|
|
4967
|
+
* @example
|
|
4968
|
+
*
|
|
4969
|
+
* _.toString(null);
|
|
4970
|
+
* // => ''
|
|
4971
|
+
*
|
|
4972
|
+
* _.toString(-0);
|
|
4973
|
+
* // => '-0'
|
|
4974
|
+
*
|
|
4975
|
+
* _.toString([1, 2, 3]);
|
|
4976
|
+
* // => '1,2,3'
|
|
4977
|
+
*/
|
|
4978
|
+
function toString(value) {
|
|
4979
|
+
return value == null ? '' : _baseToString(value);
|
|
4980
|
+
}
|
|
4981
|
+
|
|
4982
|
+
var toString_1 = toString;
|
|
4983
|
+
|
|
4984
|
+
/**
|
|
4985
|
+
* Casts `value` to a path array if it's not one.
|
|
4986
|
+
*
|
|
4987
|
+
* @private
|
|
4988
|
+
* @param {*} value The value to inspect.
|
|
4989
|
+
* @param {Object} [object] The object to query keys on.
|
|
4990
|
+
* @returns {Array} Returns the cast property path array.
|
|
4991
|
+
*/
|
|
4992
|
+
function castPath(value, object) {
|
|
4993
|
+
if (isArray_1(value)) {
|
|
4994
|
+
return value;
|
|
4995
|
+
}
|
|
4996
|
+
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
4997
|
+
}
|
|
4998
|
+
|
|
4999
|
+
var _castPath = castPath;
|
|
5000
|
+
|
|
5001
|
+
/** Used as references for various `Number` constants. */
|
|
5002
|
+
var INFINITY$1 = 1 / 0;
|
|
5003
|
+
|
|
5004
|
+
/**
|
|
5005
|
+
* Converts `value` to a string key if it's not a string or symbol.
|
|
5006
|
+
*
|
|
5007
|
+
* @private
|
|
5008
|
+
* @param {*} value The value to inspect.
|
|
5009
|
+
* @returns {string|symbol} Returns the key.
|
|
5010
|
+
*/
|
|
5011
|
+
function toKey(value) {
|
|
5012
|
+
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
5013
|
+
return value;
|
|
5014
|
+
}
|
|
5015
|
+
var result = (value + '');
|
|
5016
|
+
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
5017
|
+
}
|
|
5018
|
+
|
|
5019
|
+
var _toKey = toKey;
|
|
5020
|
+
|
|
5021
|
+
/**
|
|
5022
|
+
* The base implementation of `_.get` without support for default values.
|
|
5023
|
+
*
|
|
5024
|
+
* @private
|
|
5025
|
+
* @param {Object} object The object to query.
|
|
5026
|
+
* @param {Array|string} path The path of the property to get.
|
|
5027
|
+
* @returns {*} Returns the resolved value.
|
|
5028
|
+
*/
|
|
5029
|
+
function baseGet(object, path) {
|
|
5030
|
+
path = _castPath(path, object);
|
|
5031
|
+
|
|
5032
|
+
var index = 0,
|
|
5033
|
+
length = path.length;
|
|
5034
|
+
|
|
5035
|
+
while (object != null && index < length) {
|
|
5036
|
+
object = object[_toKey(path[index++])];
|
|
5037
|
+
}
|
|
5038
|
+
return (index && index == length) ? object : undefined;
|
|
5039
|
+
}
|
|
5040
|
+
|
|
5041
|
+
var _baseGet = baseGet;
|
|
5042
|
+
|
|
5043
|
+
/**
|
|
5044
|
+
* Gets the value at `path` of `object`. If the resolved value is
|
|
5045
|
+
* `undefined`, the `defaultValue` is returned in its place.
|
|
5046
|
+
*
|
|
5047
|
+
* @static
|
|
5048
|
+
* @memberOf _
|
|
5049
|
+
* @since 3.7.0
|
|
5050
|
+
* @category Object
|
|
5051
|
+
* @param {Object} object The object to query.
|
|
5052
|
+
* @param {Array|string} path The path of the property to get.
|
|
5053
|
+
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
5054
|
+
* @returns {*} Returns the resolved value.
|
|
5055
|
+
* @example
|
|
5056
|
+
*
|
|
5057
|
+
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
5058
|
+
*
|
|
5059
|
+
* _.get(object, 'a[0].b.c');
|
|
5060
|
+
* // => 3
|
|
5061
|
+
*
|
|
5062
|
+
* _.get(object, ['a', '0', 'b', 'c']);
|
|
5063
|
+
* // => 3
|
|
5064
|
+
*
|
|
5065
|
+
* _.get(object, 'a.b.c', 'default');
|
|
5066
|
+
* // => 'default'
|
|
5067
|
+
*/
|
|
5068
|
+
function get$1(object, path, defaultValue) {
|
|
5069
|
+
var result = object == null ? undefined : _baseGet(object, path);
|
|
5070
|
+
return result === undefined ? defaultValue : result;
|
|
5071
|
+
}
|
|
5072
|
+
|
|
5073
|
+
var get_1 = get$1;
|
|
5074
|
+
|
|
4079
5075
|
var DeckQueue = function (_React$Component) {
|
|
4080
5076
|
inherits(DeckQueue, _React$Component);
|
|
4081
5077
|
|
|
@@ -4180,7 +5176,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
4180
5176
|
{ key: index, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
4181
5177
|
React__default.createElement(
|
|
4182
5178
|
Link,
|
|
4183
|
-
{ href: _this2.page + '/[url]', as: _this2.page + '/' + row
|
|
5179
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
4184
5180
|
React__default.createElement(
|
|
4185
5181
|
'a',
|
|
4186
5182
|
null,
|
|
@@ -4424,15 +5420,15 @@ var TaxonomyCard = function TaxonomyCard(props) {
|
|
|
4424
5420
|
);
|
|
4425
5421
|
};
|
|
4426
5422
|
|
|
4427
|
-
/*
|
|
4428
|
-
GROQ query -
|
|
4429
|
-
*[_type == "article" && references(*[_type == 'documentGroup' && name == 'test']._id)][0...10]{
|
|
4430
|
-
title,
|
|
4431
|
-
published,
|
|
4432
|
-
"thumbnail": thumbnail.asset->url,
|
|
4433
|
-
"url": url.current
|
|
4434
|
-
}
|
|
4435
|
-
|
|
5423
|
+
/*
|
|
5424
|
+
GROQ query -
|
|
5425
|
+
*[_type == "article" && references(*[_type == 'documentGroup' && name == 'test']._id)][0...10]{
|
|
5426
|
+
title,
|
|
5427
|
+
published,
|
|
5428
|
+
"thumbnail": thumbnail.asset->url,
|
|
5429
|
+
"url": url.current
|
|
5430
|
+
}
|
|
5431
|
+
|
|
4436
5432
|
*/
|
|
4437
5433
|
var GroupDeck = function GroupDeck(props) {
|
|
4438
5434
|
// Props should be an array of objects containing Thumbnail, title, and URL
|
|
@@ -6444,7 +7440,7 @@ var getYoutubeId = createCommonjsModule(function (module, exports) {
|
|
|
6444
7440
|
}));
|
|
6445
7441
|
});
|
|
6446
7442
|
|
|
6447
|
-
var isArray = Array.isArray;
|
|
7443
|
+
var isArray$1 = Array.isArray;
|
|
6448
7444
|
var keyList = Object.keys;
|
|
6449
7445
|
var hasProp = Object.prototype.hasOwnProperty;
|
|
6450
7446
|
|
|
@@ -6452,8 +7448,8 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
6452
7448
|
if (a === b) return true;
|
|
6453
7449
|
|
|
6454
7450
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
6455
|
-
var arrA = isArray(a)
|
|
6456
|
-
, arrB = isArray(b)
|
|
7451
|
+
var arrA = isArray$1(a)
|
|
7452
|
+
, arrB = isArray$1(b)
|
|
6457
7453
|
, i
|
|
6458
7454
|
, length
|
|
6459
7455
|
, key;
|
|
@@ -7686,7 +8682,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
7686
8682
|
// Check that value is an object with an inspect function on it
|
|
7687
8683
|
if (ctx.customInspect &&
|
|
7688
8684
|
value &&
|
|
7689
|
-
isFunction(value.inspect) &&
|
|
8685
|
+
isFunction$1(value.inspect) &&
|
|
7690
8686
|
// Filter out the util module, it's inspect function is special
|
|
7691
8687
|
value.inspect !== inspect &&
|
|
7692
8688
|
// Also filter out any prototype objects using the circular check.
|
|
@@ -7721,7 +8717,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
7721
8717
|
|
|
7722
8718
|
// Some type of object without properties can be shortcutted.
|
|
7723
8719
|
if (keys.length === 0) {
|
|
7724
|
-
if (isFunction(value)) {
|
|
8720
|
+
if (isFunction$1(value)) {
|
|
7725
8721
|
var name = value.name ? ': ' + value.name : '';
|
|
7726
8722
|
return ctx.stylize('[Function' + name + ']', 'special');
|
|
7727
8723
|
}
|
|
@@ -7739,13 +8735,13 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
7739
8735
|
var base = '', array = false, braces = ['{', '}'];
|
|
7740
8736
|
|
|
7741
8737
|
// Make Array say that they are Array
|
|
7742
|
-
if (isArray$
|
|
8738
|
+
if (isArray$2(value)) {
|
|
7743
8739
|
array = true;
|
|
7744
8740
|
braces = ['[', ']'];
|
|
7745
8741
|
}
|
|
7746
8742
|
|
|
7747
8743
|
// Make functions say that they are functions
|
|
7748
|
-
if (isFunction(value)) {
|
|
8744
|
+
if (isFunction$1(value)) {
|
|
7749
8745
|
var n = value.name ? ': ' + value.name : '';
|
|
7750
8746
|
base = ' [Function' + n + ']';
|
|
7751
8747
|
}
|
|
@@ -7821,7 +8817,7 @@ function formatError(value) {
|
|
|
7821
8817
|
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
7822
8818
|
var output = [];
|
|
7823
8819
|
for (var i = 0, l = value.length; i < l; ++i) {
|
|
7824
|
-
if (hasOwnProperty$
|
|
8820
|
+
if (hasOwnProperty$4(value, String(i))) {
|
|
7825
8821
|
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
7826
8822
|
String(i), true));
|
|
7827
8823
|
} else {
|
|
@@ -7852,7 +8848,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
|
7852
8848
|
str = ctx.stylize('[Setter]', 'special');
|
|
7853
8849
|
}
|
|
7854
8850
|
}
|
|
7855
|
-
if (!hasOwnProperty$
|
|
8851
|
+
if (!hasOwnProperty$4(visibleKeys, key)) {
|
|
7856
8852
|
name = '[' + key + ']';
|
|
7857
8853
|
}
|
|
7858
8854
|
if (!str) {
|
|
@@ -7918,7 +8914,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
7918
8914
|
|
|
7919
8915
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
7920
8916
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
7921
|
-
function isArray$
|
|
8917
|
+
function isArray$2(ar) {
|
|
7922
8918
|
return Array.isArray(ar);
|
|
7923
8919
|
}
|
|
7924
8920
|
|
|
@@ -7967,7 +8963,7 @@ function isError(e) {
|
|
|
7967
8963
|
(objectToString$1(e) === '[object Error]' || e instanceof Error);
|
|
7968
8964
|
}
|
|
7969
8965
|
|
|
7970
|
-
function isFunction(arg) {
|
|
8966
|
+
function isFunction$1(arg) {
|
|
7971
8967
|
return typeof arg === 'function';
|
|
7972
8968
|
}
|
|
7973
8969
|
|
|
@@ -8023,7 +9019,7 @@ function _extend(origin, add) {
|
|
|
8023
9019
|
}
|
|
8024
9020
|
return origin;
|
|
8025
9021
|
}
|
|
8026
|
-
function hasOwnProperty$
|
|
9022
|
+
function hasOwnProperty$4(obj, prop) {
|
|
8027
9023
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
8028
9024
|
}
|
|
8029
9025
|
|
|
@@ -8033,7 +9029,7 @@ var util = {
|
|
|
8033
9029
|
log: log,
|
|
8034
9030
|
isBuffer: isBuffer,
|
|
8035
9031
|
isPrimitive: isPrimitive,
|
|
8036
|
-
isFunction: isFunction,
|
|
9032
|
+
isFunction: isFunction$1,
|
|
8037
9033
|
isError: isError,
|
|
8038
9034
|
isDate: isDate,
|
|
8039
9035
|
isObject: isObject$1,
|
|
@@ -8045,7 +9041,7 @@ var util = {
|
|
|
8045
9041
|
isNullOrUndefined: isNullOrUndefined,
|
|
8046
9042
|
isNull: isNull,
|
|
8047
9043
|
isBoolean: isBoolean,
|
|
8048
|
-
isArray: isArray$
|
|
9044
|
+
isArray: isArray$2,
|
|
8049
9045
|
inspect: inspect,
|
|
8050
9046
|
deprecate: deprecate,
|
|
8051
9047
|
format: format,
|
|
@@ -9074,7 +10070,7 @@ object-assign
|
|
|
9074
10070
|
*/
|
|
9075
10071
|
/* eslint-disable no-unused-vars */
|
|
9076
10072
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
9077
|
-
var hasOwnProperty$
|
|
10073
|
+
var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
|
|
9078
10074
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
9079
10075
|
|
|
9080
10076
|
function toObject(val) {
|
|
@@ -9138,7 +10134,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
|
9138
10134
|
from = Object(arguments[s]);
|
|
9139
10135
|
|
|
9140
10136
|
for (var key in from) {
|
|
9141
|
-
if (hasOwnProperty$
|
|
10137
|
+
if (hasOwnProperty$5.call(from, key)) {
|
|
9142
10138
|
to[key] = from[key];
|
|
9143
10139
|
}
|
|
9144
10140
|
}
|