mario-education 2.2.2 → 2.2.7
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/dist/index.js
CHANGED
|
@@ -5228,10 +5228,6 @@ var CSVType;
|
|
|
5228
5228
|
})(CSVType || (CSVType = {}));
|
|
5229
5229
|
|
|
5230
5230
|
var buttons = [{
|
|
5231
|
-
text: "Import students",
|
|
5232
|
-
backgroundColor: "#0abde3",
|
|
5233
|
-
type: CSVType.Students
|
|
5234
|
-
}, {
|
|
5235
5231
|
text: "Import subjects",
|
|
5236
5232
|
backgroundColor: "#1dd1a1",
|
|
5237
5233
|
type: CSVType.Subjects
|
|
@@ -9934,12 +9930,13 @@ var useQuestionDetail = function useQuestionDetail(id) {
|
|
|
9934
9930
|
}, [questionDetail]);
|
|
9935
9931
|
var confirmData = React.useCallback(function (data) {
|
|
9936
9932
|
try {
|
|
9933
|
+
var _exit2 = false;
|
|
9934
|
+
|
|
9937
9935
|
var _temp7 = function _temp7(_result) {
|
|
9938
9936
|
if (_exit2) return _result;
|
|
9939
9937
|
dispatch(marioCore.setLoading(false));
|
|
9940
9938
|
};
|
|
9941
9939
|
|
|
9942
|
-
var _exit2 = false;
|
|
9943
9940
|
dispatch(marioCore.setLoading(true));
|
|
9944
9941
|
|
|
9945
9942
|
var _temp8 = _catch(function () {
|
|
@@ -17170,18 +17167,12 @@ var getQuantityReport = function getQuantityReport() {
|
|
|
17170
17167
|
var getLoginCountingReport = function getLoginCountingReport() {
|
|
17171
17168
|
return marioCore.api.get(REPORT_URL + "/logincouting");
|
|
17172
17169
|
};
|
|
17173
|
-
var getSkillReport = function getSkillReport() {
|
|
17174
|
-
return marioCore.api.get(REPORT_URL + "/skill");
|
|
17175
|
-
};
|
|
17176
17170
|
var getGoalProgressReport = function getGoalProgressReport() {
|
|
17177
17171
|
return marioCore.api.get(REPORT_URL + "/goalprogress");
|
|
17178
17172
|
};
|
|
17179
17173
|
var getHighImpactLearningStrategyReport = function getHighImpactLearningStrategyReport() {
|
|
17180
17174
|
return marioCore.api.get(REPORT_URL + "/highimpactlearningstrategy");
|
|
17181
17175
|
};
|
|
17182
|
-
var getTimeInSessionReport = function getTimeInSessionReport() {
|
|
17183
|
-
return marioCore.api.get(REPORT_URL + "/timeinsession");
|
|
17184
|
-
};
|
|
17185
17176
|
var getPerceivedImpactReport = function getPerceivedImpactReport() {
|
|
17186
17177
|
return marioCore.api.get(REPORT_URL + "/perceivedimpact");
|
|
17187
17178
|
};
|
|
@@ -17203,28 +17194,20 @@ var useDashboard = function useDashboard() {
|
|
|
17203
17194
|
setQuantity = _useState2[1];
|
|
17204
17195
|
|
|
17205
17196
|
var _useState3 = React.useState(null),
|
|
17206
|
-
|
|
17207
|
-
|
|
17197
|
+
goalProgress = _useState3[0],
|
|
17198
|
+
setGoalProgress = _useState3[1];
|
|
17208
17199
|
|
|
17209
17200
|
var _useState4 = React.useState(null),
|
|
17210
|
-
|
|
17211
|
-
|
|
17201
|
+
highImpact = _useState4[0],
|
|
17202
|
+
setHighImpact = _useState4[1];
|
|
17212
17203
|
|
|
17213
17204
|
var _useState5 = React.useState(null),
|
|
17214
|
-
|
|
17215
|
-
|
|
17205
|
+
perceivedImpact = _useState5[0],
|
|
17206
|
+
setPerceivedImpact = _useState5[1];
|
|
17216
17207
|
|
|
17217
17208
|
var _useState6 = React.useState(null),
|
|
17218
|
-
|
|
17219
|
-
|
|
17220
|
-
|
|
17221
|
-
var _useState7 = React.useState(null),
|
|
17222
|
-
timeInSession = _useState7[0],
|
|
17223
|
-
setTimeInSession = _useState7[1];
|
|
17224
|
-
|
|
17225
|
-
var _useState8 = React.useState(null),
|
|
17226
|
-
grade = _useState8[0],
|
|
17227
|
-
setGrade = _useState8[1];
|
|
17209
|
+
grade = _useState6[0],
|
|
17210
|
+
setGrade = _useState6[1];
|
|
17228
17211
|
|
|
17229
17212
|
var callApi = React.useCallback(function (apiCaller, setData, defaultData) {
|
|
17230
17213
|
try {
|
|
@@ -17251,7 +17234,7 @@ var useDashboard = function useDashboard() {
|
|
|
17251
17234
|
try {
|
|
17252
17235
|
document.title = TITLE$p;
|
|
17253
17236
|
dispatch(marioCore.setLoading(true));
|
|
17254
|
-
return Promise.resolve(Promise.any([callApi(getLoginCountingReport, setLoginCounting, []), callApi(getQuantityReport, setQuantity, {}), callApi(
|
|
17237
|
+
return Promise.resolve(Promise.any([callApi(getLoginCountingReport, setLoginCounting, []), callApi(getQuantityReport, setQuantity, {}), callApi(getGoalProgressReport, setGoalProgress, []), callApi(getHighImpactLearningStrategyReport, setHighImpact, {}), callApi(getPerceivedImpactReport, setPerceivedImpact, []), callApi(getGradeReport, setGrade, {})])).then(function () {
|
|
17255
17238
|
dispatch(marioCore.setLoading(false));
|
|
17256
17239
|
});
|
|
17257
17240
|
} catch (e) {
|
|
@@ -17264,11 +17247,9 @@ var useDashboard = function useDashboard() {
|
|
|
17264
17247
|
return {
|
|
17265
17248
|
loginCounting: loginCounting,
|
|
17266
17249
|
quantity: quantity,
|
|
17267
|
-
skill: skill,
|
|
17268
17250
|
goalProgress: goalProgress,
|
|
17269
17251
|
highImpact: highImpact,
|
|
17270
17252
|
perceivedImpact: perceivedImpact,
|
|
17271
|
-
timeInSession: timeInSession,
|
|
17272
17253
|
grade: grade
|
|
17273
17254
|
};
|
|
17274
17255
|
};
|
|
@@ -17287,107 +17268,6 @@ var DashboardCard = function DashboardCard(_ref) {
|
|
|
17287
17268
|
}, children));
|
|
17288
17269
|
};
|
|
17289
17270
|
|
|
17290
|
-
var colors = ["#1C77AC", "#00979B", "#8B0000", "#87E0E0", "#2EB82E"];
|
|
17291
|
-
var levels = [{
|
|
17292
|
-
name: "No progress",
|
|
17293
|
-
field: "noProgress"
|
|
17294
|
-
}, {
|
|
17295
|
-
name: "Slight",
|
|
17296
|
-
field: "slight"
|
|
17297
|
-
}, {
|
|
17298
|
-
name: "Moderate",
|
|
17299
|
-
field: "moderate"
|
|
17300
|
-
}, {
|
|
17301
|
-
name: "Significant",
|
|
17302
|
-
field: "significant"
|
|
17303
|
-
}, {
|
|
17304
|
-
name: "Achieved",
|
|
17305
|
-
field: "achieved"
|
|
17306
|
-
}];
|
|
17307
|
-
|
|
17308
|
-
var GoalProgressReport = function GoalProgressReport(_ref) {
|
|
17309
|
-
var data = _ref.data;
|
|
17310
|
-
var series = React.useMemo(function () {
|
|
17311
|
-
if (!data) return [];
|
|
17312
|
-
|
|
17313
|
-
try {
|
|
17314
|
-
return levels.map(function (level) {
|
|
17315
|
-
return {
|
|
17316
|
-
name: level.name,
|
|
17317
|
-
data: data.map(function (item) {
|
|
17318
|
-
return item[level.field];
|
|
17319
|
-
})
|
|
17320
|
-
};
|
|
17321
|
-
});
|
|
17322
|
-
} catch (_unused) {
|
|
17323
|
-
return [];
|
|
17324
|
-
}
|
|
17325
|
-
}, [data]);
|
|
17326
|
-
var categories = React.useMemo(function () {
|
|
17327
|
-
if (!data) return [];
|
|
17328
|
-
|
|
17329
|
-
try {
|
|
17330
|
-
return data.map(function (item) {
|
|
17331
|
-
return item.createdAt;
|
|
17332
|
-
});
|
|
17333
|
-
} catch (_unused2) {
|
|
17334
|
-
return [];
|
|
17335
|
-
}
|
|
17336
|
-
}, [data]);
|
|
17337
|
-
if (!data) return React__default.createElement(marioCore.Loading, null);
|
|
17338
|
-
var options = {
|
|
17339
|
-
chart: {
|
|
17340
|
-
type: "bar",
|
|
17341
|
-
height: 350,
|
|
17342
|
-
stacked: true,
|
|
17343
|
-
stackType: "100%",
|
|
17344
|
-
toolbar: {
|
|
17345
|
-
show: false
|
|
17346
|
-
}
|
|
17347
|
-
},
|
|
17348
|
-
plotOptions: {
|
|
17349
|
-
bar: {
|
|
17350
|
-
horizontal: false,
|
|
17351
|
-
columnWidth: "80%"
|
|
17352
|
-
}
|
|
17353
|
-
},
|
|
17354
|
-
colors: colors,
|
|
17355
|
-
responsive: [{
|
|
17356
|
-
breakpoint: 480,
|
|
17357
|
-
options: {
|
|
17358
|
-
legend: {
|
|
17359
|
-
position: "bottom",
|
|
17360
|
-
offsetX: -10,
|
|
17361
|
-
offsetY: 0
|
|
17362
|
-
}
|
|
17363
|
-
}
|
|
17364
|
-
}],
|
|
17365
|
-
xaxis: {
|
|
17366
|
-
categories: categories
|
|
17367
|
-
},
|
|
17368
|
-
fill: {
|
|
17369
|
-
opacity: 1
|
|
17370
|
-
},
|
|
17371
|
-
legend: {
|
|
17372
|
-
position: "right",
|
|
17373
|
-
offsetX: 0,
|
|
17374
|
-
offsetY: 50,
|
|
17375
|
-
onItemClick: {
|
|
17376
|
-
toggleDataSeries: false
|
|
17377
|
-
},
|
|
17378
|
-
onItemHover: {
|
|
17379
|
-
highlightDataSeries: false
|
|
17380
|
-
}
|
|
17381
|
-
}
|
|
17382
|
-
};
|
|
17383
|
-
return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
|
|
17384
|
-
options: options,
|
|
17385
|
-
series: series,
|
|
17386
|
-
type: "bar",
|
|
17387
|
-
height: 350
|
|
17388
|
-
}));
|
|
17389
|
-
};
|
|
17390
|
-
|
|
17391
17271
|
var Loading = function Loading() {
|
|
17392
17272
|
return React__default.createElement("div", {
|
|
17393
17273
|
className: "d-flex align-items-center justify-content-center"
|
|
@@ -17409,14 +17289,14 @@ var Loading = function Loading() {
|
|
|
17409
17289
|
}, "Loading...")));
|
|
17410
17290
|
};
|
|
17411
17291
|
|
|
17412
|
-
var colors
|
|
17292
|
+
var colors = ["rgba(129, 236, 236, 0.8)", "rgba(116, 185, 255, 0.8)", "rgba(250, 177, 160, 0.8)", "rgba(255, 234, 167, 0.8)", "rgba(178, 190, 195, 0.8)", "rgba(85, 239, 196, 0.8)", "rgba(120, 111, 166, 0.8)", "rgba(243, 166, 131, 0.8)"];
|
|
17413
17293
|
|
|
17414
17294
|
var getColors = function getColors(length) {
|
|
17415
|
-
if (colors
|
|
17416
|
-
var newColors = [].concat(colors
|
|
17295
|
+
if (colors.length >= length) return colors;
|
|
17296
|
+
var newColors = [].concat(colors);
|
|
17417
17297
|
|
|
17418
17298
|
while (newColors.length < length) {
|
|
17419
|
-
newColors = [].concat(newColors, colors
|
|
17299
|
+
newColors = [].concat(newColors, colors);
|
|
17420
17300
|
}
|
|
17421
17301
|
|
|
17422
17302
|
return newColors;
|
|
@@ -17507,7 +17387,7 @@ var HighImpact = function HighImpact(_ref) {
|
|
|
17507
17387
|
})));
|
|
17508
17388
|
};
|
|
17509
17389
|
|
|
17510
|
-
var colors$
|
|
17390
|
+
var colors$1 = ["#1abc9c", "#c0392b"];
|
|
17511
17391
|
|
|
17512
17392
|
var LoginCouting = function LoginCouting(_ref) {
|
|
17513
17393
|
var data = _ref.data;
|
|
@@ -17524,11 +17404,11 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17524
17404
|
var series = [{
|
|
17525
17405
|
name: "Teacher",
|
|
17526
17406
|
data: teacherCount,
|
|
17527
|
-
color: colors$
|
|
17407
|
+
color: colors$1[0]
|
|
17528
17408
|
}, {
|
|
17529
17409
|
name: "Student",
|
|
17530
17410
|
data: studentCount,
|
|
17531
|
-
color: colors$
|
|
17411
|
+
color: colors$1[1]
|
|
17532
17412
|
}];
|
|
17533
17413
|
var options = {
|
|
17534
17414
|
chart: {
|
|
@@ -17545,7 +17425,7 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17545
17425
|
markers: {
|
|
17546
17426
|
size: 4,
|
|
17547
17427
|
colors: ["#fff"],
|
|
17548
|
-
strokeColors: colors$
|
|
17428
|
+
strokeColors: colors$1,
|
|
17549
17429
|
strokeWidth: 2,
|
|
17550
17430
|
strokeOpacity: 0.9,
|
|
17551
17431
|
strokeDashArray: 0,
|
|
@@ -17577,7 +17457,7 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17577
17457
|
}));
|
|
17578
17458
|
};
|
|
17579
17459
|
|
|
17580
|
-
var colors$
|
|
17460
|
+
var colors$2 = ["#00cec9", "#00b894"];
|
|
17581
17461
|
|
|
17582
17462
|
var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
17583
17463
|
var data = _ref.data;
|
|
@@ -17604,7 +17484,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17604
17484
|
show: false
|
|
17605
17485
|
}
|
|
17606
17486
|
},
|
|
17607
|
-
colors: colors$
|
|
17487
|
+
colors: colors$2,
|
|
17608
17488
|
plotOptions: {
|
|
17609
17489
|
bar: {
|
|
17610
17490
|
horizontal: false,
|
|
@@ -17642,7 +17522,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17642
17522
|
}));
|
|
17643
17523
|
};
|
|
17644
17524
|
|
|
17645
|
-
var colors$
|
|
17525
|
+
var colors$3 = ["#00b894", "#00cec9", "#0984e3"];
|
|
17646
17526
|
|
|
17647
17527
|
var Quantity = function Quantity(_ref) {
|
|
17648
17528
|
var data = _ref.data;
|
|
@@ -17659,7 +17539,7 @@ var Quantity = function Quantity(_ref) {
|
|
|
17659
17539
|
type: "pie"
|
|
17660
17540
|
},
|
|
17661
17541
|
labels: ["Teachers", "Students", "Assistants"],
|
|
17662
|
-
colors: colors$
|
|
17542
|
+
colors: colors$3,
|
|
17663
17543
|
legend: {
|
|
17664
17544
|
show: false
|
|
17665
17545
|
},
|
|
@@ -17674,15 +17554,15 @@ var Quantity = function Quantity(_ref) {
|
|
|
17674
17554
|
};
|
|
17675
17555
|
var details = [{
|
|
17676
17556
|
label: "Teachers",
|
|
17677
|
-
color: colors$
|
|
17557
|
+
color: colors$3[0],
|
|
17678
17558
|
value: teacherPercentage
|
|
17679
17559
|
}, {
|
|
17680
17560
|
label: "Students",
|
|
17681
|
-
color: colors$
|
|
17561
|
+
color: colors$3[1],
|
|
17682
17562
|
value: studentPercentage
|
|
17683
17563
|
}, {
|
|
17684
17564
|
label: "Assistants",
|
|
17685
|
-
color: colors$
|
|
17565
|
+
color: colors$3[2],
|
|
17686
17566
|
value: assistantPercentage
|
|
17687
17567
|
}];
|
|
17688
17568
|
return React__default.createElement("div", {
|
|
@@ -17719,3858 +17599,24 @@ var Quantity = function Quantity(_ref) {
|
|
|
17719
17599
|
})));
|
|
17720
17600
|
};
|
|
17721
17601
|
|
|
17722
|
-
|
|
17723
|
-
|
|
17724
|
-
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17728
|
-
* @returns {Array} Returns `array`.
|
|
17729
|
-
*/
|
|
17730
|
-
function arrayPush(array, values) {
|
|
17731
|
-
var index = -1,
|
|
17732
|
-
length = values.length,
|
|
17733
|
-
offset = array.length;
|
|
17734
|
-
|
|
17735
|
-
while (++index < length) {
|
|
17736
|
-
array[offset + index] = values[index];
|
|
17737
|
-
}
|
|
17738
|
-
return array;
|
|
17739
|
-
}
|
|
17740
|
-
|
|
17741
|
-
var _arrayPush = arrayPush;
|
|
17742
|
-
|
|
17743
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17744
|
-
|
|
17745
|
-
function createCommonjsModule(fn, module) {
|
|
17746
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
17747
|
-
}
|
|
17748
|
-
|
|
17749
|
-
/** Detect free variable `global` from Node.js. */
|
|
17750
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
17751
|
-
|
|
17752
|
-
var _freeGlobal = freeGlobal;
|
|
17753
|
-
|
|
17754
|
-
/** Detect free variable `self`. */
|
|
17755
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
17756
|
-
|
|
17757
|
-
/** Used as a reference to the global object. */
|
|
17758
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
17759
|
-
|
|
17760
|
-
var _root = root;
|
|
17761
|
-
|
|
17762
|
-
/** Built-in value references. */
|
|
17763
|
-
var Symbol$1 = _root.Symbol;
|
|
17764
|
-
|
|
17765
|
-
var _Symbol = Symbol$1;
|
|
17766
|
-
|
|
17767
|
-
/** Used for built-in method references. */
|
|
17768
|
-
var objectProto = Object.prototype;
|
|
17769
|
-
|
|
17770
|
-
/** Used to check objects for own properties. */
|
|
17771
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
17772
|
-
|
|
17773
|
-
/**
|
|
17774
|
-
* Used to resolve the
|
|
17775
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
17776
|
-
* of values.
|
|
17777
|
-
*/
|
|
17778
|
-
var nativeObjectToString = objectProto.toString;
|
|
17779
|
-
|
|
17780
|
-
/** Built-in value references. */
|
|
17781
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
17782
|
-
|
|
17783
|
-
/**
|
|
17784
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
17785
|
-
*
|
|
17786
|
-
* @private
|
|
17787
|
-
* @param {*} value The value to query.
|
|
17788
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
17789
|
-
*/
|
|
17790
|
-
function getRawTag(value) {
|
|
17791
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
|
17792
|
-
tag = value[symToStringTag];
|
|
17793
|
-
|
|
17794
|
-
try {
|
|
17795
|
-
value[symToStringTag] = undefined;
|
|
17796
|
-
var unmasked = true;
|
|
17797
|
-
} catch (e) {}
|
|
17798
|
-
|
|
17799
|
-
var result = nativeObjectToString.call(value);
|
|
17800
|
-
if (unmasked) {
|
|
17801
|
-
if (isOwn) {
|
|
17802
|
-
value[symToStringTag] = tag;
|
|
17803
|
-
} else {
|
|
17804
|
-
delete value[symToStringTag];
|
|
17805
|
-
}
|
|
17806
|
-
}
|
|
17807
|
-
return result;
|
|
17808
|
-
}
|
|
17809
|
-
|
|
17810
|
-
var _getRawTag = getRawTag;
|
|
17811
|
-
|
|
17812
|
-
/** Used for built-in method references. */
|
|
17813
|
-
var objectProto$1 = Object.prototype;
|
|
17814
|
-
|
|
17815
|
-
/**
|
|
17816
|
-
* Used to resolve the
|
|
17817
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
17818
|
-
* of values.
|
|
17819
|
-
*/
|
|
17820
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
17821
|
-
|
|
17822
|
-
/**
|
|
17823
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
17824
|
-
*
|
|
17825
|
-
* @private
|
|
17826
|
-
* @param {*} value The value to convert.
|
|
17827
|
-
* @returns {string} Returns the converted string.
|
|
17828
|
-
*/
|
|
17829
|
-
function objectToString(value) {
|
|
17830
|
-
return nativeObjectToString$1.call(value);
|
|
17831
|
-
}
|
|
17832
|
-
|
|
17833
|
-
var _objectToString = objectToString;
|
|
17834
|
-
|
|
17835
|
-
/** `Object#toString` result references. */
|
|
17836
|
-
var nullTag = '[object Null]',
|
|
17837
|
-
undefinedTag = '[object Undefined]';
|
|
17838
|
-
|
|
17839
|
-
/** Built-in value references. */
|
|
17840
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
17841
|
-
|
|
17842
|
-
/**
|
|
17843
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
17844
|
-
*
|
|
17845
|
-
* @private
|
|
17846
|
-
* @param {*} value The value to query.
|
|
17847
|
-
* @returns {string} Returns the `toStringTag`.
|
|
17848
|
-
*/
|
|
17849
|
-
function baseGetTag(value) {
|
|
17850
|
-
if (value == null) {
|
|
17851
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
17852
|
-
}
|
|
17853
|
-
return (symToStringTag$1 && symToStringTag$1 in Object(value))
|
|
17854
|
-
? _getRawTag(value)
|
|
17855
|
-
: _objectToString(value);
|
|
17856
|
-
}
|
|
17857
|
-
|
|
17858
|
-
var _baseGetTag = baseGetTag;
|
|
17859
|
-
|
|
17860
|
-
/**
|
|
17861
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
17862
|
-
* and has a `typeof` result of "object".
|
|
17863
|
-
*
|
|
17864
|
-
* @static
|
|
17865
|
-
* @memberOf _
|
|
17866
|
-
* @since 4.0.0
|
|
17867
|
-
* @category Lang
|
|
17868
|
-
* @param {*} value The value to check.
|
|
17869
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
17870
|
-
* @example
|
|
17871
|
-
*
|
|
17872
|
-
* _.isObjectLike({});
|
|
17873
|
-
* // => true
|
|
17874
|
-
*
|
|
17875
|
-
* _.isObjectLike([1, 2, 3]);
|
|
17876
|
-
* // => true
|
|
17877
|
-
*
|
|
17878
|
-
* _.isObjectLike(_.noop);
|
|
17879
|
-
* // => false
|
|
17880
|
-
*
|
|
17881
|
-
* _.isObjectLike(null);
|
|
17882
|
-
* // => false
|
|
17883
|
-
*/
|
|
17884
|
-
function isObjectLike(value) {
|
|
17885
|
-
return value != null && typeof value == 'object';
|
|
17886
|
-
}
|
|
17887
|
-
|
|
17888
|
-
var isObjectLike_1 = isObjectLike;
|
|
17889
|
-
|
|
17890
|
-
/** `Object#toString` result references. */
|
|
17891
|
-
var argsTag = '[object Arguments]';
|
|
17892
|
-
|
|
17893
|
-
/**
|
|
17894
|
-
* The base implementation of `_.isArguments`.
|
|
17895
|
-
*
|
|
17896
|
-
* @private
|
|
17897
|
-
* @param {*} value The value to check.
|
|
17898
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
17899
|
-
*/
|
|
17900
|
-
function baseIsArguments(value) {
|
|
17901
|
-
return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
|
|
17902
|
-
}
|
|
17903
|
-
|
|
17904
|
-
var _baseIsArguments = baseIsArguments;
|
|
17905
|
-
|
|
17906
|
-
/** Used for built-in method references. */
|
|
17907
|
-
var objectProto$2 = Object.prototype;
|
|
17908
|
-
|
|
17909
|
-
/** Used to check objects for own properties. */
|
|
17910
|
-
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
|
|
17911
|
-
|
|
17912
|
-
/** Built-in value references. */
|
|
17913
|
-
var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
|
|
17914
|
-
|
|
17915
|
-
/**
|
|
17916
|
-
* Checks if `value` is likely an `arguments` object.
|
|
17917
|
-
*
|
|
17918
|
-
* @static
|
|
17919
|
-
* @memberOf _
|
|
17920
|
-
* @since 0.1.0
|
|
17921
|
-
* @category Lang
|
|
17922
|
-
* @param {*} value The value to check.
|
|
17923
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
17924
|
-
* else `false`.
|
|
17925
|
-
* @example
|
|
17926
|
-
*
|
|
17927
|
-
* _.isArguments(function() { return arguments; }());
|
|
17928
|
-
* // => true
|
|
17929
|
-
*
|
|
17930
|
-
* _.isArguments([1, 2, 3]);
|
|
17931
|
-
* // => false
|
|
17932
|
-
*/
|
|
17933
|
-
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
17934
|
-
return isObjectLike_1(value) && hasOwnProperty$1.call(value, 'callee') &&
|
|
17935
|
-
!propertyIsEnumerable.call(value, 'callee');
|
|
17936
|
-
};
|
|
17937
|
-
|
|
17938
|
-
var isArguments_1 = isArguments;
|
|
17939
|
-
|
|
17940
|
-
/**
|
|
17941
|
-
* Checks if `value` is classified as an `Array` object.
|
|
17942
|
-
*
|
|
17943
|
-
* @static
|
|
17944
|
-
* @memberOf _
|
|
17945
|
-
* @since 0.1.0
|
|
17946
|
-
* @category Lang
|
|
17947
|
-
* @param {*} value The value to check.
|
|
17948
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
17949
|
-
* @example
|
|
17950
|
-
*
|
|
17951
|
-
* _.isArray([1, 2, 3]);
|
|
17952
|
-
* // => true
|
|
17953
|
-
*
|
|
17954
|
-
* _.isArray(document.body.children);
|
|
17955
|
-
* // => false
|
|
17956
|
-
*
|
|
17957
|
-
* _.isArray('abc');
|
|
17958
|
-
* // => false
|
|
17959
|
-
*
|
|
17960
|
-
* _.isArray(_.noop);
|
|
17961
|
-
* // => false
|
|
17962
|
-
*/
|
|
17963
|
-
var isArray = Array.isArray;
|
|
17964
|
-
|
|
17965
|
-
var isArray_1 = isArray;
|
|
17966
|
-
|
|
17967
|
-
/** Built-in value references. */
|
|
17968
|
-
var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
|
|
17969
|
-
|
|
17970
|
-
/**
|
|
17971
|
-
* Checks if `value` is a flattenable `arguments` object or array.
|
|
17972
|
-
*
|
|
17973
|
-
* @private
|
|
17974
|
-
* @param {*} value The value to check.
|
|
17975
|
-
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
17976
|
-
*/
|
|
17977
|
-
function isFlattenable(value) {
|
|
17978
|
-
return isArray_1(value) || isArguments_1(value) ||
|
|
17979
|
-
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
17980
|
-
}
|
|
17981
|
-
|
|
17982
|
-
var _isFlattenable = isFlattenable;
|
|
17983
|
-
|
|
17984
|
-
/**
|
|
17985
|
-
* The base implementation of `_.flatten` with support for restricting flattening.
|
|
17986
|
-
*
|
|
17987
|
-
* @private
|
|
17988
|
-
* @param {Array} array The array to flatten.
|
|
17989
|
-
* @param {number} depth The maximum recursion depth.
|
|
17990
|
-
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
|
17991
|
-
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
|
17992
|
-
* @param {Array} [result=[]] The initial result value.
|
|
17993
|
-
* @returns {Array} Returns the new flattened array.
|
|
17994
|
-
*/
|
|
17995
|
-
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
17996
|
-
var index = -1,
|
|
17997
|
-
length = array.length;
|
|
17998
|
-
|
|
17999
|
-
predicate || (predicate = _isFlattenable);
|
|
18000
|
-
result || (result = []);
|
|
18001
|
-
|
|
18002
|
-
while (++index < length) {
|
|
18003
|
-
var value = array[index];
|
|
18004
|
-
if (depth > 0 && predicate(value)) {
|
|
18005
|
-
if (depth > 1) {
|
|
18006
|
-
// Recursively flatten arrays (susceptible to call stack limits).
|
|
18007
|
-
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
18008
|
-
} else {
|
|
18009
|
-
_arrayPush(result, value);
|
|
18010
|
-
}
|
|
18011
|
-
} else if (!isStrict) {
|
|
18012
|
-
result[result.length] = value;
|
|
18013
|
-
}
|
|
18014
|
-
}
|
|
18015
|
-
return result;
|
|
18016
|
-
}
|
|
18017
|
-
|
|
18018
|
-
var _baseFlatten = baseFlatten;
|
|
18019
|
-
|
|
18020
|
-
/**
|
|
18021
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
18022
|
-
* shorthands.
|
|
18023
|
-
*
|
|
18024
|
-
* @private
|
|
18025
|
-
* @param {Array} [array] The array to iterate over.
|
|
18026
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
18027
|
-
* @returns {Array} Returns the new mapped array.
|
|
18028
|
-
*/
|
|
18029
|
-
function arrayMap(array, iteratee) {
|
|
18030
|
-
var index = -1,
|
|
18031
|
-
length = array == null ? 0 : array.length,
|
|
18032
|
-
result = Array(length);
|
|
18033
|
-
|
|
18034
|
-
while (++index < length) {
|
|
18035
|
-
result[index] = iteratee(array[index], index, array);
|
|
18036
|
-
}
|
|
18037
|
-
return result;
|
|
18038
|
-
}
|
|
18039
|
-
|
|
18040
|
-
var _arrayMap = arrayMap;
|
|
18041
|
-
|
|
18042
|
-
/** `Object#toString` result references. */
|
|
18043
|
-
var symbolTag = '[object Symbol]';
|
|
18044
|
-
|
|
18045
|
-
/**
|
|
18046
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
18047
|
-
*
|
|
18048
|
-
* @static
|
|
18049
|
-
* @memberOf _
|
|
18050
|
-
* @since 4.0.0
|
|
18051
|
-
* @category Lang
|
|
18052
|
-
* @param {*} value The value to check.
|
|
18053
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
18054
|
-
* @example
|
|
18055
|
-
*
|
|
18056
|
-
* _.isSymbol(Symbol.iterator);
|
|
18057
|
-
* // => true
|
|
18058
|
-
*
|
|
18059
|
-
* _.isSymbol('abc');
|
|
18060
|
-
* // => false
|
|
18061
|
-
*/
|
|
18062
|
-
function isSymbol(value) {
|
|
18063
|
-
return typeof value == 'symbol' ||
|
|
18064
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
18065
|
-
}
|
|
18066
|
-
|
|
18067
|
-
var isSymbol_1 = isSymbol;
|
|
18068
|
-
|
|
18069
|
-
/** Used to match property names within property paths. */
|
|
18070
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
18071
|
-
reIsPlainProp = /^\w*$/;
|
|
18072
|
-
|
|
18073
|
-
/**
|
|
18074
|
-
* Checks if `value` is a property name and not a property path.
|
|
18075
|
-
*
|
|
18076
|
-
* @private
|
|
18077
|
-
* @param {*} value The value to check.
|
|
18078
|
-
* @param {Object} [object] The object to query keys on.
|
|
18079
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
18080
|
-
*/
|
|
18081
|
-
function isKey(value, object) {
|
|
18082
|
-
if (isArray_1(value)) {
|
|
18083
|
-
return false;
|
|
18084
|
-
}
|
|
18085
|
-
var type = typeof value;
|
|
18086
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
18087
|
-
value == null || isSymbol_1(value)) {
|
|
18088
|
-
return true;
|
|
18089
|
-
}
|
|
18090
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
18091
|
-
(object != null && value in Object(object));
|
|
18092
|
-
}
|
|
18093
|
-
|
|
18094
|
-
var _isKey = isKey;
|
|
18095
|
-
|
|
18096
|
-
/**
|
|
18097
|
-
* Checks if `value` is the
|
|
18098
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
18099
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
18100
|
-
*
|
|
18101
|
-
* @static
|
|
18102
|
-
* @memberOf _
|
|
18103
|
-
* @since 0.1.0
|
|
18104
|
-
* @category Lang
|
|
18105
|
-
* @param {*} value The value to check.
|
|
18106
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
18107
|
-
* @example
|
|
18108
|
-
*
|
|
18109
|
-
* _.isObject({});
|
|
18110
|
-
* // => true
|
|
18111
|
-
*
|
|
18112
|
-
* _.isObject([1, 2, 3]);
|
|
18113
|
-
* // => true
|
|
18114
|
-
*
|
|
18115
|
-
* _.isObject(_.noop);
|
|
18116
|
-
* // => true
|
|
18117
|
-
*
|
|
18118
|
-
* _.isObject(null);
|
|
18119
|
-
* // => false
|
|
18120
|
-
*/
|
|
18121
|
-
function isObject(value) {
|
|
18122
|
-
var type = typeof value;
|
|
18123
|
-
return value != null && (type == 'object' || type == 'function');
|
|
18124
|
-
}
|
|
18125
|
-
|
|
18126
|
-
var isObject_1 = isObject;
|
|
18127
|
-
|
|
18128
|
-
/** `Object#toString` result references. */
|
|
18129
|
-
var asyncTag = '[object AsyncFunction]',
|
|
18130
|
-
funcTag = '[object Function]',
|
|
18131
|
-
genTag = '[object GeneratorFunction]',
|
|
18132
|
-
proxyTag = '[object Proxy]';
|
|
18133
|
-
|
|
18134
|
-
/**
|
|
18135
|
-
* Checks if `value` is classified as a `Function` object.
|
|
18136
|
-
*
|
|
18137
|
-
* @static
|
|
18138
|
-
* @memberOf _
|
|
18139
|
-
* @since 0.1.0
|
|
18140
|
-
* @category Lang
|
|
18141
|
-
* @param {*} value The value to check.
|
|
18142
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
18143
|
-
* @example
|
|
18144
|
-
*
|
|
18145
|
-
* _.isFunction(_);
|
|
18146
|
-
* // => true
|
|
18147
|
-
*
|
|
18148
|
-
* _.isFunction(/abc/);
|
|
18149
|
-
* // => false
|
|
18150
|
-
*/
|
|
18151
|
-
function isFunction(value) {
|
|
18152
|
-
if (!isObject_1(value)) {
|
|
18153
|
-
return false;
|
|
18154
|
-
}
|
|
18155
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
18156
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
18157
|
-
var tag = _baseGetTag(value);
|
|
18158
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
18159
|
-
}
|
|
18160
|
-
|
|
18161
|
-
var isFunction_1 = isFunction;
|
|
18162
|
-
|
|
18163
|
-
/** Used to detect overreaching core-js shims. */
|
|
18164
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
18165
|
-
|
|
18166
|
-
var _coreJsData = coreJsData;
|
|
18167
|
-
|
|
18168
|
-
/** Used to detect methods masquerading as native. */
|
|
18169
|
-
var maskSrcKey = (function() {
|
|
18170
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
18171
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
18172
|
-
}());
|
|
18173
|
-
|
|
18174
|
-
/**
|
|
18175
|
-
* Checks if `func` has its source masked.
|
|
18176
|
-
*
|
|
18177
|
-
* @private
|
|
18178
|
-
* @param {Function} func The function to check.
|
|
18179
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
18180
|
-
*/
|
|
18181
|
-
function isMasked(func) {
|
|
18182
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
18183
|
-
}
|
|
18184
|
-
|
|
18185
|
-
var _isMasked = isMasked;
|
|
18186
|
-
|
|
18187
|
-
/** Used for built-in method references. */
|
|
18188
|
-
var funcProto = Function.prototype;
|
|
18189
|
-
|
|
18190
|
-
/** Used to resolve the decompiled source of functions. */
|
|
18191
|
-
var funcToString = funcProto.toString;
|
|
18192
|
-
|
|
18193
|
-
/**
|
|
18194
|
-
* Converts `func` to its source code.
|
|
18195
|
-
*
|
|
18196
|
-
* @private
|
|
18197
|
-
* @param {Function} func The function to convert.
|
|
18198
|
-
* @returns {string} Returns the source code.
|
|
18199
|
-
*/
|
|
18200
|
-
function toSource(func) {
|
|
18201
|
-
if (func != null) {
|
|
18202
|
-
try {
|
|
18203
|
-
return funcToString.call(func);
|
|
18204
|
-
} catch (e) {}
|
|
18205
|
-
try {
|
|
18206
|
-
return (func + '');
|
|
18207
|
-
} catch (e) {}
|
|
18208
|
-
}
|
|
18209
|
-
return '';
|
|
18210
|
-
}
|
|
18211
|
-
|
|
18212
|
-
var _toSource = toSource;
|
|
18213
|
-
|
|
18214
|
-
/**
|
|
18215
|
-
* Used to match `RegExp`
|
|
18216
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
18217
|
-
*/
|
|
18218
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
18219
|
-
|
|
18220
|
-
/** Used to detect host constructors (Safari). */
|
|
18221
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
18222
|
-
|
|
18223
|
-
/** Used for built-in method references. */
|
|
18224
|
-
var funcProto$1 = Function.prototype,
|
|
18225
|
-
objectProto$3 = Object.prototype;
|
|
18226
|
-
|
|
18227
|
-
/** Used to resolve the decompiled source of functions. */
|
|
18228
|
-
var funcToString$1 = funcProto$1.toString;
|
|
18229
|
-
|
|
18230
|
-
/** Used to check objects for own properties. */
|
|
18231
|
-
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
18232
|
-
|
|
18233
|
-
/** Used to detect if a method is native. */
|
|
18234
|
-
var reIsNative = RegExp('^' +
|
|
18235
|
-
funcToString$1.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
18236
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
18237
|
-
);
|
|
18238
|
-
|
|
18239
|
-
/**
|
|
18240
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
18241
|
-
*
|
|
18242
|
-
* @private
|
|
18243
|
-
* @param {*} value The value to check.
|
|
18244
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
18245
|
-
* else `false`.
|
|
18246
|
-
*/
|
|
18247
|
-
function baseIsNative(value) {
|
|
18248
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
18249
|
-
return false;
|
|
18250
|
-
}
|
|
18251
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
18252
|
-
return pattern.test(_toSource(value));
|
|
18253
|
-
}
|
|
18254
|
-
|
|
18255
|
-
var _baseIsNative = baseIsNative;
|
|
18256
|
-
|
|
18257
|
-
/**
|
|
18258
|
-
* Gets the value at `key` of `object`.
|
|
18259
|
-
*
|
|
18260
|
-
* @private
|
|
18261
|
-
* @param {Object} [object] The object to query.
|
|
18262
|
-
* @param {string} key The key of the property to get.
|
|
18263
|
-
* @returns {*} Returns the property value.
|
|
18264
|
-
*/
|
|
18265
|
-
function getValue(object, key) {
|
|
18266
|
-
return object == null ? undefined : object[key];
|
|
18267
|
-
}
|
|
18268
|
-
|
|
18269
|
-
var _getValue = getValue;
|
|
18270
|
-
|
|
18271
|
-
/**
|
|
18272
|
-
* Gets the native function at `key` of `object`.
|
|
18273
|
-
*
|
|
18274
|
-
* @private
|
|
18275
|
-
* @param {Object} object The object to query.
|
|
18276
|
-
* @param {string} key The key of the method to get.
|
|
18277
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
18278
|
-
*/
|
|
18279
|
-
function getNative(object, key) {
|
|
18280
|
-
var value = _getValue(object, key);
|
|
18281
|
-
return _baseIsNative(value) ? value : undefined;
|
|
18282
|
-
}
|
|
18283
|
-
|
|
18284
|
-
var _getNative = getNative;
|
|
18285
|
-
|
|
18286
|
-
/* Built-in method references that are verified to be native. */
|
|
18287
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
18288
|
-
|
|
18289
|
-
var _nativeCreate = nativeCreate;
|
|
18290
|
-
|
|
18291
|
-
/**
|
|
18292
|
-
* Removes all key-value entries from the hash.
|
|
18293
|
-
*
|
|
18294
|
-
* @private
|
|
18295
|
-
* @name clear
|
|
18296
|
-
* @memberOf Hash
|
|
18297
|
-
*/
|
|
18298
|
-
function hashClear() {
|
|
18299
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
18300
|
-
this.size = 0;
|
|
18301
|
-
}
|
|
18302
|
-
|
|
18303
|
-
var _hashClear = hashClear;
|
|
18304
|
-
|
|
18305
|
-
/**
|
|
18306
|
-
* Removes `key` and its value from the hash.
|
|
18307
|
-
*
|
|
18308
|
-
* @private
|
|
18309
|
-
* @name delete
|
|
18310
|
-
* @memberOf Hash
|
|
18311
|
-
* @param {Object} hash The hash to modify.
|
|
18312
|
-
* @param {string} key The key of the value to remove.
|
|
18313
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
18314
|
-
*/
|
|
18315
|
-
function hashDelete(key) {
|
|
18316
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
18317
|
-
this.size -= result ? 1 : 0;
|
|
18318
|
-
return result;
|
|
18319
|
-
}
|
|
18320
|
-
|
|
18321
|
-
var _hashDelete = hashDelete;
|
|
18322
|
-
|
|
18323
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
18324
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
18325
|
-
|
|
18326
|
-
/** Used for built-in method references. */
|
|
18327
|
-
var objectProto$4 = Object.prototype;
|
|
18328
|
-
|
|
18329
|
-
/** Used to check objects for own properties. */
|
|
18330
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
18331
|
-
|
|
18332
|
-
/**
|
|
18333
|
-
* Gets the hash value for `key`.
|
|
18334
|
-
*
|
|
18335
|
-
* @private
|
|
18336
|
-
* @name get
|
|
18337
|
-
* @memberOf Hash
|
|
18338
|
-
* @param {string} key The key of the value to get.
|
|
18339
|
-
* @returns {*} Returns the entry value.
|
|
18340
|
-
*/
|
|
18341
|
-
function hashGet(key) {
|
|
18342
|
-
var data = this.__data__;
|
|
18343
|
-
if (_nativeCreate) {
|
|
18344
|
-
var result = data[key];
|
|
18345
|
-
return result === HASH_UNDEFINED ? undefined : result;
|
|
18346
|
-
}
|
|
18347
|
-
return hasOwnProperty$3.call(data, key) ? data[key] : undefined;
|
|
18348
|
-
}
|
|
18349
|
-
|
|
18350
|
-
var _hashGet = hashGet;
|
|
18351
|
-
|
|
18352
|
-
/** Used for built-in method references. */
|
|
18353
|
-
var objectProto$5 = Object.prototype;
|
|
18354
|
-
|
|
18355
|
-
/** Used to check objects for own properties. */
|
|
18356
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
18357
|
-
|
|
18358
|
-
/**
|
|
18359
|
-
* Checks if a hash value for `key` exists.
|
|
18360
|
-
*
|
|
18361
|
-
* @private
|
|
18362
|
-
* @name has
|
|
18363
|
-
* @memberOf Hash
|
|
18364
|
-
* @param {string} key The key of the entry to check.
|
|
18365
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
18366
|
-
*/
|
|
18367
|
-
function hashHas(key) {
|
|
18368
|
-
var data = this.__data__;
|
|
18369
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
|
|
18370
|
-
}
|
|
18371
|
-
|
|
18372
|
-
var _hashHas = hashHas;
|
|
18373
|
-
|
|
18374
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
18375
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
18376
|
-
|
|
18377
|
-
/**
|
|
18378
|
-
* Sets the hash `key` to `value`.
|
|
18379
|
-
*
|
|
18380
|
-
* @private
|
|
18381
|
-
* @name set
|
|
18382
|
-
* @memberOf Hash
|
|
18383
|
-
* @param {string} key The key of the value to set.
|
|
18384
|
-
* @param {*} value The value to set.
|
|
18385
|
-
* @returns {Object} Returns the hash instance.
|
|
18386
|
-
*/
|
|
18387
|
-
function hashSet(key, value) {
|
|
18388
|
-
var data = this.__data__;
|
|
18389
|
-
this.size += this.has(key) ? 0 : 1;
|
|
18390
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
|
|
18391
|
-
return this;
|
|
18392
|
-
}
|
|
18393
|
-
|
|
18394
|
-
var _hashSet = hashSet;
|
|
18395
|
-
|
|
18396
|
-
/**
|
|
18397
|
-
* Creates a hash object.
|
|
18398
|
-
*
|
|
18399
|
-
* @private
|
|
18400
|
-
* @constructor
|
|
18401
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
18402
|
-
*/
|
|
18403
|
-
function Hash(entries) {
|
|
18404
|
-
var index = -1,
|
|
18405
|
-
length = entries == null ? 0 : entries.length;
|
|
18406
|
-
|
|
18407
|
-
this.clear();
|
|
18408
|
-
while (++index < length) {
|
|
18409
|
-
var entry = entries[index];
|
|
18410
|
-
this.set(entry[0], entry[1]);
|
|
18411
|
-
}
|
|
18412
|
-
}
|
|
18413
|
-
|
|
18414
|
-
// Add methods to `Hash`.
|
|
18415
|
-
Hash.prototype.clear = _hashClear;
|
|
18416
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
18417
|
-
Hash.prototype.get = _hashGet;
|
|
18418
|
-
Hash.prototype.has = _hashHas;
|
|
18419
|
-
Hash.prototype.set = _hashSet;
|
|
18420
|
-
|
|
18421
|
-
var _Hash = Hash;
|
|
18422
|
-
|
|
18423
|
-
/**
|
|
18424
|
-
* Removes all key-value entries from the list cache.
|
|
18425
|
-
*
|
|
18426
|
-
* @private
|
|
18427
|
-
* @name clear
|
|
18428
|
-
* @memberOf ListCache
|
|
18429
|
-
*/
|
|
18430
|
-
function listCacheClear() {
|
|
18431
|
-
this.__data__ = [];
|
|
18432
|
-
this.size = 0;
|
|
18433
|
-
}
|
|
18434
|
-
|
|
18435
|
-
var _listCacheClear = listCacheClear;
|
|
18436
|
-
|
|
18437
|
-
/**
|
|
18438
|
-
* Performs a
|
|
18439
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
18440
|
-
* comparison between two values to determine if they are equivalent.
|
|
18441
|
-
*
|
|
18442
|
-
* @static
|
|
18443
|
-
* @memberOf _
|
|
18444
|
-
* @since 4.0.0
|
|
18445
|
-
* @category Lang
|
|
18446
|
-
* @param {*} value The value to compare.
|
|
18447
|
-
* @param {*} other The other value to compare.
|
|
18448
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
18449
|
-
* @example
|
|
18450
|
-
*
|
|
18451
|
-
* var object = { 'a': 1 };
|
|
18452
|
-
* var other = { 'a': 1 };
|
|
18453
|
-
*
|
|
18454
|
-
* _.eq(object, object);
|
|
18455
|
-
* // => true
|
|
18456
|
-
*
|
|
18457
|
-
* _.eq(object, other);
|
|
18458
|
-
* // => false
|
|
18459
|
-
*
|
|
18460
|
-
* _.eq('a', 'a');
|
|
18461
|
-
* // => true
|
|
18462
|
-
*
|
|
18463
|
-
* _.eq('a', Object('a'));
|
|
18464
|
-
* // => false
|
|
18465
|
-
*
|
|
18466
|
-
* _.eq(NaN, NaN);
|
|
18467
|
-
* // => true
|
|
18468
|
-
*/
|
|
18469
|
-
function eq(value, other) {
|
|
18470
|
-
return value === other || (value !== value && other !== other);
|
|
18471
|
-
}
|
|
18472
|
-
|
|
18473
|
-
var eq_1 = eq;
|
|
18474
|
-
|
|
18475
|
-
/**
|
|
18476
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
18477
|
-
*
|
|
18478
|
-
* @private
|
|
18479
|
-
* @param {Array} array The array to inspect.
|
|
18480
|
-
* @param {*} key The key to search for.
|
|
18481
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
18482
|
-
*/
|
|
18483
|
-
function assocIndexOf(array, key) {
|
|
18484
|
-
var length = array.length;
|
|
18485
|
-
while (length--) {
|
|
18486
|
-
if (eq_1(array[length][0], key)) {
|
|
18487
|
-
return length;
|
|
18488
|
-
}
|
|
18489
|
-
}
|
|
18490
|
-
return -1;
|
|
18491
|
-
}
|
|
18492
|
-
|
|
18493
|
-
var _assocIndexOf = assocIndexOf;
|
|
18494
|
-
|
|
18495
|
-
/** Used for built-in method references. */
|
|
18496
|
-
var arrayProto = Array.prototype;
|
|
18497
|
-
|
|
18498
|
-
/** Built-in value references. */
|
|
18499
|
-
var splice = arrayProto.splice;
|
|
18500
|
-
|
|
18501
|
-
/**
|
|
18502
|
-
* Removes `key` and its value from the list cache.
|
|
18503
|
-
*
|
|
18504
|
-
* @private
|
|
18505
|
-
* @name delete
|
|
18506
|
-
* @memberOf ListCache
|
|
18507
|
-
* @param {string} key The key of the value to remove.
|
|
18508
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
18509
|
-
*/
|
|
18510
|
-
function listCacheDelete(key) {
|
|
18511
|
-
var data = this.__data__,
|
|
18512
|
-
index = _assocIndexOf(data, key);
|
|
18513
|
-
|
|
18514
|
-
if (index < 0) {
|
|
18515
|
-
return false;
|
|
18516
|
-
}
|
|
18517
|
-
var lastIndex = data.length - 1;
|
|
18518
|
-
if (index == lastIndex) {
|
|
18519
|
-
data.pop();
|
|
18520
|
-
} else {
|
|
18521
|
-
splice.call(data, index, 1);
|
|
18522
|
-
}
|
|
18523
|
-
--this.size;
|
|
18524
|
-
return true;
|
|
18525
|
-
}
|
|
18526
|
-
|
|
18527
|
-
var _listCacheDelete = listCacheDelete;
|
|
18528
|
-
|
|
18529
|
-
/**
|
|
18530
|
-
* Gets the list cache value for `key`.
|
|
18531
|
-
*
|
|
18532
|
-
* @private
|
|
18533
|
-
* @name get
|
|
18534
|
-
* @memberOf ListCache
|
|
18535
|
-
* @param {string} key The key of the value to get.
|
|
18536
|
-
* @returns {*} Returns the entry value.
|
|
18537
|
-
*/
|
|
18538
|
-
function listCacheGet(key) {
|
|
18539
|
-
var data = this.__data__,
|
|
18540
|
-
index = _assocIndexOf(data, key);
|
|
18541
|
-
|
|
18542
|
-
return index < 0 ? undefined : data[index][1];
|
|
18543
|
-
}
|
|
18544
|
-
|
|
18545
|
-
var _listCacheGet = listCacheGet;
|
|
18546
|
-
|
|
18547
|
-
/**
|
|
18548
|
-
* Checks if a list cache value for `key` exists.
|
|
18549
|
-
*
|
|
18550
|
-
* @private
|
|
18551
|
-
* @name has
|
|
18552
|
-
* @memberOf ListCache
|
|
18553
|
-
* @param {string} key The key of the entry to check.
|
|
18554
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
18555
|
-
*/
|
|
18556
|
-
function listCacheHas(key) {
|
|
18557
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
18558
|
-
}
|
|
18559
|
-
|
|
18560
|
-
var _listCacheHas = listCacheHas;
|
|
18561
|
-
|
|
18562
|
-
/**
|
|
18563
|
-
* Sets the list cache `key` to `value`.
|
|
18564
|
-
*
|
|
18565
|
-
* @private
|
|
18566
|
-
* @name set
|
|
18567
|
-
* @memberOf ListCache
|
|
18568
|
-
* @param {string} key The key of the value to set.
|
|
18569
|
-
* @param {*} value The value to set.
|
|
18570
|
-
* @returns {Object} Returns the list cache instance.
|
|
18571
|
-
*/
|
|
18572
|
-
function listCacheSet(key, value) {
|
|
18573
|
-
var data = this.__data__,
|
|
18574
|
-
index = _assocIndexOf(data, key);
|
|
18575
|
-
|
|
18576
|
-
if (index < 0) {
|
|
18577
|
-
++this.size;
|
|
18578
|
-
data.push([key, value]);
|
|
18579
|
-
} else {
|
|
18580
|
-
data[index][1] = value;
|
|
18581
|
-
}
|
|
18582
|
-
return this;
|
|
18583
|
-
}
|
|
18584
|
-
|
|
18585
|
-
var _listCacheSet = listCacheSet;
|
|
18586
|
-
|
|
18587
|
-
/**
|
|
18588
|
-
* Creates an list cache object.
|
|
18589
|
-
*
|
|
18590
|
-
* @private
|
|
18591
|
-
* @constructor
|
|
18592
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
18593
|
-
*/
|
|
18594
|
-
function ListCache(entries) {
|
|
18595
|
-
var index = -1,
|
|
18596
|
-
length = entries == null ? 0 : entries.length;
|
|
18597
|
-
|
|
18598
|
-
this.clear();
|
|
18599
|
-
while (++index < length) {
|
|
18600
|
-
var entry = entries[index];
|
|
18601
|
-
this.set(entry[0], entry[1]);
|
|
18602
|
-
}
|
|
18603
|
-
}
|
|
18604
|
-
|
|
18605
|
-
// Add methods to `ListCache`.
|
|
18606
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
18607
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
18608
|
-
ListCache.prototype.get = _listCacheGet;
|
|
18609
|
-
ListCache.prototype.has = _listCacheHas;
|
|
18610
|
-
ListCache.prototype.set = _listCacheSet;
|
|
18611
|
-
|
|
18612
|
-
var _ListCache = ListCache;
|
|
18613
|
-
|
|
18614
|
-
/* Built-in method references that are verified to be native. */
|
|
18615
|
-
var Map = _getNative(_root, 'Map');
|
|
18616
|
-
|
|
18617
|
-
var _Map = Map;
|
|
18618
|
-
|
|
18619
|
-
/**
|
|
18620
|
-
* Removes all key-value entries from the map.
|
|
18621
|
-
*
|
|
18622
|
-
* @private
|
|
18623
|
-
* @name clear
|
|
18624
|
-
* @memberOf MapCache
|
|
18625
|
-
*/
|
|
18626
|
-
function mapCacheClear() {
|
|
18627
|
-
this.size = 0;
|
|
18628
|
-
this.__data__ = {
|
|
18629
|
-
'hash': new _Hash,
|
|
18630
|
-
'map': new (_Map || _ListCache),
|
|
18631
|
-
'string': new _Hash
|
|
18632
|
-
};
|
|
18633
|
-
}
|
|
18634
|
-
|
|
18635
|
-
var _mapCacheClear = mapCacheClear;
|
|
18636
|
-
|
|
18637
|
-
/**
|
|
18638
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
18639
|
-
*
|
|
18640
|
-
* @private
|
|
18641
|
-
* @param {*} value The value to check.
|
|
18642
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
18643
|
-
*/
|
|
18644
|
-
function isKeyable(value) {
|
|
18645
|
-
var type = typeof value;
|
|
18646
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
18647
|
-
? (value !== '__proto__')
|
|
18648
|
-
: (value === null);
|
|
18649
|
-
}
|
|
18650
|
-
|
|
18651
|
-
var _isKeyable = isKeyable;
|
|
18652
|
-
|
|
18653
|
-
/**
|
|
18654
|
-
* Gets the data for `map`.
|
|
18655
|
-
*
|
|
18656
|
-
* @private
|
|
18657
|
-
* @param {Object} map The map to query.
|
|
18658
|
-
* @param {string} key The reference key.
|
|
18659
|
-
* @returns {*} Returns the map data.
|
|
18660
|
-
*/
|
|
18661
|
-
function getMapData(map, key) {
|
|
18662
|
-
var data = map.__data__;
|
|
18663
|
-
return _isKeyable(key)
|
|
18664
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
18665
|
-
: data.map;
|
|
18666
|
-
}
|
|
18667
|
-
|
|
18668
|
-
var _getMapData = getMapData;
|
|
18669
|
-
|
|
18670
|
-
/**
|
|
18671
|
-
* Removes `key` and its value from the map.
|
|
18672
|
-
*
|
|
18673
|
-
* @private
|
|
18674
|
-
* @name delete
|
|
18675
|
-
* @memberOf MapCache
|
|
18676
|
-
* @param {string} key The key of the value to remove.
|
|
18677
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
18678
|
-
*/
|
|
18679
|
-
function mapCacheDelete(key) {
|
|
18680
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
18681
|
-
this.size -= result ? 1 : 0;
|
|
18682
|
-
return result;
|
|
18683
|
-
}
|
|
18684
|
-
|
|
18685
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
18686
|
-
|
|
18687
|
-
/**
|
|
18688
|
-
* Gets the map value for `key`.
|
|
18689
|
-
*
|
|
18690
|
-
* @private
|
|
18691
|
-
* @name get
|
|
18692
|
-
* @memberOf MapCache
|
|
18693
|
-
* @param {string} key The key of the value to get.
|
|
18694
|
-
* @returns {*} Returns the entry value.
|
|
18695
|
-
*/
|
|
18696
|
-
function mapCacheGet(key) {
|
|
18697
|
-
return _getMapData(this, key).get(key);
|
|
18698
|
-
}
|
|
18699
|
-
|
|
18700
|
-
var _mapCacheGet = mapCacheGet;
|
|
18701
|
-
|
|
18702
|
-
/**
|
|
18703
|
-
* Checks if a map value for `key` exists.
|
|
18704
|
-
*
|
|
18705
|
-
* @private
|
|
18706
|
-
* @name has
|
|
18707
|
-
* @memberOf MapCache
|
|
18708
|
-
* @param {string} key The key of the entry to check.
|
|
18709
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
18710
|
-
*/
|
|
18711
|
-
function mapCacheHas(key) {
|
|
18712
|
-
return _getMapData(this, key).has(key);
|
|
18713
|
-
}
|
|
18714
|
-
|
|
18715
|
-
var _mapCacheHas = mapCacheHas;
|
|
18716
|
-
|
|
18717
|
-
/**
|
|
18718
|
-
* Sets the map `key` to `value`.
|
|
18719
|
-
*
|
|
18720
|
-
* @private
|
|
18721
|
-
* @name set
|
|
18722
|
-
* @memberOf MapCache
|
|
18723
|
-
* @param {string} key The key of the value to set.
|
|
18724
|
-
* @param {*} value The value to set.
|
|
18725
|
-
* @returns {Object} Returns the map cache instance.
|
|
18726
|
-
*/
|
|
18727
|
-
function mapCacheSet(key, value) {
|
|
18728
|
-
var data = _getMapData(this, key),
|
|
18729
|
-
size = data.size;
|
|
18730
|
-
|
|
18731
|
-
data.set(key, value);
|
|
18732
|
-
this.size += data.size == size ? 0 : 1;
|
|
18733
|
-
return this;
|
|
18734
|
-
}
|
|
18735
|
-
|
|
18736
|
-
var _mapCacheSet = mapCacheSet;
|
|
18737
|
-
|
|
18738
|
-
/**
|
|
18739
|
-
* Creates a map cache object to store key-value pairs.
|
|
18740
|
-
*
|
|
18741
|
-
* @private
|
|
18742
|
-
* @constructor
|
|
18743
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
18744
|
-
*/
|
|
18745
|
-
function MapCache(entries) {
|
|
18746
|
-
var index = -1,
|
|
18747
|
-
length = entries == null ? 0 : entries.length;
|
|
18748
|
-
|
|
18749
|
-
this.clear();
|
|
18750
|
-
while (++index < length) {
|
|
18751
|
-
var entry = entries[index];
|
|
18752
|
-
this.set(entry[0], entry[1]);
|
|
18753
|
-
}
|
|
18754
|
-
}
|
|
18755
|
-
|
|
18756
|
-
// Add methods to `MapCache`.
|
|
18757
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
18758
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
18759
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
18760
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
18761
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
18762
|
-
|
|
18763
|
-
var _MapCache = MapCache;
|
|
18764
|
-
|
|
18765
|
-
/** Error message constants. */
|
|
18766
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
18767
|
-
|
|
18768
|
-
/**
|
|
18769
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
18770
|
-
* provided, it determines the cache key for storing the result based on the
|
|
18771
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
18772
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
18773
|
-
* is invoked with the `this` binding of the memoized function.
|
|
18774
|
-
*
|
|
18775
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
18776
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
18777
|
-
* constructor with one whose instances implement the
|
|
18778
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
18779
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
18780
|
-
*
|
|
18781
|
-
* @static
|
|
18782
|
-
* @memberOf _
|
|
18783
|
-
* @since 0.1.0
|
|
18784
|
-
* @category Function
|
|
18785
|
-
* @param {Function} func The function to have its output memoized.
|
|
18786
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
18787
|
-
* @returns {Function} Returns the new memoized function.
|
|
18788
|
-
* @example
|
|
18789
|
-
*
|
|
18790
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
18791
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
18792
|
-
*
|
|
18793
|
-
* var values = _.memoize(_.values);
|
|
18794
|
-
* values(object);
|
|
18795
|
-
* // => [1, 2]
|
|
18796
|
-
*
|
|
18797
|
-
* values(other);
|
|
18798
|
-
* // => [3, 4]
|
|
18799
|
-
*
|
|
18800
|
-
* object.a = 2;
|
|
18801
|
-
* values(object);
|
|
18802
|
-
* // => [1, 2]
|
|
18803
|
-
*
|
|
18804
|
-
* // Modify the result cache.
|
|
18805
|
-
* values.cache.set(object, ['a', 'b']);
|
|
18806
|
-
* values(object);
|
|
18807
|
-
* // => ['a', 'b']
|
|
18808
|
-
*
|
|
18809
|
-
* // Replace `_.memoize.Cache`.
|
|
18810
|
-
* _.memoize.Cache = WeakMap;
|
|
18811
|
-
*/
|
|
18812
|
-
function memoize(func, resolver) {
|
|
18813
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
18814
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
18815
|
-
}
|
|
18816
|
-
var memoized = function() {
|
|
18817
|
-
var args = arguments,
|
|
18818
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
18819
|
-
cache = memoized.cache;
|
|
18820
|
-
|
|
18821
|
-
if (cache.has(key)) {
|
|
18822
|
-
return cache.get(key);
|
|
18823
|
-
}
|
|
18824
|
-
var result = func.apply(this, args);
|
|
18825
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
18826
|
-
return result;
|
|
18827
|
-
};
|
|
18828
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
18829
|
-
return memoized;
|
|
18830
|
-
}
|
|
18831
|
-
|
|
18832
|
-
// Expose `MapCache`.
|
|
18833
|
-
memoize.Cache = _MapCache;
|
|
18834
|
-
|
|
18835
|
-
var memoize_1 = memoize;
|
|
18836
|
-
|
|
18837
|
-
/** Used as the maximum memoize cache size. */
|
|
18838
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
18839
|
-
|
|
18840
|
-
/**
|
|
18841
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
18842
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
18843
|
-
*
|
|
18844
|
-
* @private
|
|
18845
|
-
* @param {Function} func The function to have its output memoized.
|
|
18846
|
-
* @returns {Function} Returns the new memoized function.
|
|
18847
|
-
*/
|
|
18848
|
-
function memoizeCapped(func) {
|
|
18849
|
-
var result = memoize_1(func, function(key) {
|
|
18850
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
18851
|
-
cache.clear();
|
|
18852
|
-
}
|
|
18853
|
-
return key;
|
|
18854
|
-
});
|
|
18855
|
-
|
|
18856
|
-
var cache = result.cache;
|
|
18857
|
-
return result;
|
|
18858
|
-
}
|
|
18859
|
-
|
|
18860
|
-
var _memoizeCapped = memoizeCapped;
|
|
18861
|
-
|
|
18862
|
-
/** Used to match property names within property paths. */
|
|
18863
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
18864
|
-
|
|
18865
|
-
/** Used to match backslashes in property paths. */
|
|
18866
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
18867
|
-
|
|
18868
|
-
/**
|
|
18869
|
-
* Converts `string` to a property path array.
|
|
18870
|
-
*
|
|
18871
|
-
* @private
|
|
18872
|
-
* @param {string} string The string to convert.
|
|
18873
|
-
* @returns {Array} Returns the property path array.
|
|
18874
|
-
*/
|
|
18875
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
18876
|
-
var result = [];
|
|
18877
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
18878
|
-
result.push('');
|
|
18879
|
-
}
|
|
18880
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
18881
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
18882
|
-
});
|
|
18883
|
-
return result;
|
|
18884
|
-
});
|
|
18885
|
-
|
|
18886
|
-
var _stringToPath = stringToPath;
|
|
18887
|
-
|
|
18888
|
-
/** Used as references for various `Number` constants. */
|
|
18889
|
-
var INFINITY = 1 / 0;
|
|
18890
|
-
|
|
18891
|
-
/** Used to convert symbols to primitives and strings. */
|
|
18892
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
18893
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
18894
|
-
|
|
18895
|
-
/**
|
|
18896
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
18897
|
-
* values to empty strings.
|
|
18898
|
-
*
|
|
18899
|
-
* @private
|
|
18900
|
-
* @param {*} value The value to process.
|
|
18901
|
-
* @returns {string} Returns the string.
|
|
18902
|
-
*/
|
|
18903
|
-
function baseToString(value) {
|
|
18904
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
18905
|
-
if (typeof value == 'string') {
|
|
18906
|
-
return value;
|
|
18907
|
-
}
|
|
18908
|
-
if (isArray_1(value)) {
|
|
18909
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
18910
|
-
return _arrayMap(value, baseToString) + '';
|
|
18911
|
-
}
|
|
18912
|
-
if (isSymbol_1(value)) {
|
|
18913
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
18914
|
-
}
|
|
18915
|
-
var result = (value + '');
|
|
18916
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
18917
|
-
}
|
|
18918
|
-
|
|
18919
|
-
var _baseToString = baseToString;
|
|
18920
|
-
|
|
18921
|
-
/**
|
|
18922
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
18923
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
18924
|
-
*
|
|
18925
|
-
* @static
|
|
18926
|
-
* @memberOf _
|
|
18927
|
-
* @since 4.0.0
|
|
18928
|
-
* @category Lang
|
|
18929
|
-
* @param {*} value The value to convert.
|
|
18930
|
-
* @returns {string} Returns the converted string.
|
|
18931
|
-
* @example
|
|
18932
|
-
*
|
|
18933
|
-
* _.toString(null);
|
|
18934
|
-
* // => ''
|
|
18935
|
-
*
|
|
18936
|
-
* _.toString(-0);
|
|
18937
|
-
* // => '-0'
|
|
18938
|
-
*
|
|
18939
|
-
* _.toString([1, 2, 3]);
|
|
18940
|
-
* // => '1,2,3'
|
|
18941
|
-
*/
|
|
18942
|
-
function toString(value) {
|
|
18943
|
-
return value == null ? '' : _baseToString(value);
|
|
18944
|
-
}
|
|
18945
|
-
|
|
18946
|
-
var toString_1 = toString;
|
|
18947
|
-
|
|
18948
|
-
/**
|
|
18949
|
-
* Casts `value` to a path array if it's not one.
|
|
18950
|
-
*
|
|
18951
|
-
* @private
|
|
18952
|
-
* @param {*} value The value to inspect.
|
|
18953
|
-
* @param {Object} [object] The object to query keys on.
|
|
18954
|
-
* @returns {Array} Returns the cast property path array.
|
|
18955
|
-
*/
|
|
18956
|
-
function castPath(value, object) {
|
|
18957
|
-
if (isArray_1(value)) {
|
|
18958
|
-
return value;
|
|
18959
|
-
}
|
|
18960
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
18961
|
-
}
|
|
18962
|
-
|
|
18963
|
-
var _castPath = castPath;
|
|
18964
|
-
|
|
18965
|
-
/** Used as references for various `Number` constants. */
|
|
18966
|
-
var INFINITY$1 = 1 / 0;
|
|
18967
|
-
|
|
18968
|
-
/**
|
|
18969
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
18970
|
-
*
|
|
18971
|
-
* @private
|
|
18972
|
-
* @param {*} value The value to inspect.
|
|
18973
|
-
* @returns {string|symbol} Returns the key.
|
|
18974
|
-
*/
|
|
18975
|
-
function toKey(value) {
|
|
18976
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
18977
|
-
return value;
|
|
18978
|
-
}
|
|
18979
|
-
var result = (value + '');
|
|
18980
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
18981
|
-
}
|
|
18982
|
-
|
|
18983
|
-
var _toKey = toKey;
|
|
18984
|
-
|
|
18985
|
-
/**
|
|
18986
|
-
* The base implementation of `_.get` without support for default values.
|
|
18987
|
-
*
|
|
18988
|
-
* @private
|
|
18989
|
-
* @param {Object} object The object to query.
|
|
18990
|
-
* @param {Array|string} path The path of the property to get.
|
|
18991
|
-
* @returns {*} Returns the resolved value.
|
|
18992
|
-
*/
|
|
18993
|
-
function baseGet(object, path) {
|
|
18994
|
-
path = _castPath(path, object);
|
|
18995
|
-
|
|
18996
|
-
var index = 0,
|
|
18997
|
-
length = path.length;
|
|
18998
|
-
|
|
18999
|
-
while (object != null && index < length) {
|
|
19000
|
-
object = object[_toKey(path[index++])];
|
|
19001
|
-
}
|
|
19002
|
-
return (index && index == length) ? object : undefined;
|
|
19003
|
-
}
|
|
17602
|
+
var Dashboard = function Dashboard() {
|
|
17603
|
+
var _useDashboard = useDashboard(),
|
|
17604
|
+
loginCounting = _useDashboard.loginCounting,
|
|
17605
|
+
quantity = _useDashboard.quantity,
|
|
17606
|
+
highImpact = _useDashboard.highImpact,
|
|
17607
|
+
perceivedImpact = _useDashboard.perceivedImpact;
|
|
19004
17608
|
|
|
19005
|
-
var
|
|
19006
|
-
|
|
19007
|
-
|
|
19008
|
-
|
|
19009
|
-
*
|
|
19010
|
-
* @private
|
|
19011
|
-
* @name clear
|
|
19012
|
-
* @memberOf Stack
|
|
19013
|
-
*/
|
|
19014
|
-
function stackClear() {
|
|
19015
|
-
this.__data__ = new _ListCache;
|
|
19016
|
-
this.size = 0;
|
|
19017
|
-
}
|
|
19018
|
-
|
|
19019
|
-
var _stackClear = stackClear;
|
|
19020
|
-
|
|
19021
|
-
/**
|
|
19022
|
-
* Removes `key` and its value from the stack.
|
|
19023
|
-
*
|
|
19024
|
-
* @private
|
|
19025
|
-
* @name delete
|
|
19026
|
-
* @memberOf Stack
|
|
19027
|
-
* @param {string} key The key of the value to remove.
|
|
19028
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
19029
|
-
*/
|
|
19030
|
-
function stackDelete(key) {
|
|
19031
|
-
var data = this.__data__,
|
|
19032
|
-
result = data['delete'](key);
|
|
19033
|
-
|
|
19034
|
-
this.size = data.size;
|
|
19035
|
-
return result;
|
|
19036
|
-
}
|
|
19037
|
-
|
|
19038
|
-
var _stackDelete = stackDelete;
|
|
19039
|
-
|
|
19040
|
-
/**
|
|
19041
|
-
* Gets the stack value for `key`.
|
|
19042
|
-
*
|
|
19043
|
-
* @private
|
|
19044
|
-
* @name get
|
|
19045
|
-
* @memberOf Stack
|
|
19046
|
-
* @param {string} key The key of the value to get.
|
|
19047
|
-
* @returns {*} Returns the entry value.
|
|
19048
|
-
*/
|
|
19049
|
-
function stackGet(key) {
|
|
19050
|
-
return this.__data__.get(key);
|
|
19051
|
-
}
|
|
19052
|
-
|
|
19053
|
-
var _stackGet = stackGet;
|
|
19054
|
-
|
|
19055
|
-
/**
|
|
19056
|
-
* Checks if a stack value for `key` exists.
|
|
19057
|
-
*
|
|
19058
|
-
* @private
|
|
19059
|
-
* @name has
|
|
19060
|
-
* @memberOf Stack
|
|
19061
|
-
* @param {string} key The key of the entry to check.
|
|
19062
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
19063
|
-
*/
|
|
19064
|
-
function stackHas(key) {
|
|
19065
|
-
return this.__data__.has(key);
|
|
19066
|
-
}
|
|
19067
|
-
|
|
19068
|
-
var _stackHas = stackHas;
|
|
19069
|
-
|
|
19070
|
-
/** Used as the size to enable large array optimizations. */
|
|
19071
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
19072
|
-
|
|
19073
|
-
/**
|
|
19074
|
-
* Sets the stack `key` to `value`.
|
|
19075
|
-
*
|
|
19076
|
-
* @private
|
|
19077
|
-
* @name set
|
|
19078
|
-
* @memberOf Stack
|
|
19079
|
-
* @param {string} key The key of the value to set.
|
|
19080
|
-
* @param {*} value The value to set.
|
|
19081
|
-
* @returns {Object} Returns the stack cache instance.
|
|
19082
|
-
*/
|
|
19083
|
-
function stackSet(key, value) {
|
|
19084
|
-
var data = this.__data__;
|
|
19085
|
-
if (data instanceof _ListCache) {
|
|
19086
|
-
var pairs = data.__data__;
|
|
19087
|
-
if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
19088
|
-
pairs.push([key, value]);
|
|
19089
|
-
this.size = ++data.size;
|
|
19090
|
-
return this;
|
|
19091
|
-
}
|
|
19092
|
-
data = this.__data__ = new _MapCache(pairs);
|
|
19093
|
-
}
|
|
19094
|
-
data.set(key, value);
|
|
19095
|
-
this.size = data.size;
|
|
19096
|
-
return this;
|
|
19097
|
-
}
|
|
19098
|
-
|
|
19099
|
-
var _stackSet = stackSet;
|
|
19100
|
-
|
|
19101
|
-
/**
|
|
19102
|
-
* Creates a stack cache object to store key-value pairs.
|
|
19103
|
-
*
|
|
19104
|
-
* @private
|
|
19105
|
-
* @constructor
|
|
19106
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
19107
|
-
*/
|
|
19108
|
-
function Stack(entries) {
|
|
19109
|
-
var data = this.__data__ = new _ListCache(entries);
|
|
19110
|
-
this.size = data.size;
|
|
19111
|
-
}
|
|
19112
|
-
|
|
19113
|
-
// Add methods to `Stack`.
|
|
19114
|
-
Stack.prototype.clear = _stackClear;
|
|
19115
|
-
Stack.prototype['delete'] = _stackDelete;
|
|
19116
|
-
Stack.prototype.get = _stackGet;
|
|
19117
|
-
Stack.prototype.has = _stackHas;
|
|
19118
|
-
Stack.prototype.set = _stackSet;
|
|
19119
|
-
|
|
19120
|
-
var _Stack = Stack;
|
|
19121
|
-
|
|
19122
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
19123
|
-
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
19124
|
-
|
|
19125
|
-
/**
|
|
19126
|
-
* Adds `value` to the array cache.
|
|
19127
|
-
*
|
|
19128
|
-
* @private
|
|
19129
|
-
* @name add
|
|
19130
|
-
* @memberOf SetCache
|
|
19131
|
-
* @alias push
|
|
19132
|
-
* @param {*} value The value to cache.
|
|
19133
|
-
* @returns {Object} Returns the cache instance.
|
|
19134
|
-
*/
|
|
19135
|
-
function setCacheAdd(value) {
|
|
19136
|
-
this.__data__.set(value, HASH_UNDEFINED$2);
|
|
19137
|
-
return this;
|
|
19138
|
-
}
|
|
19139
|
-
|
|
19140
|
-
var _setCacheAdd = setCacheAdd;
|
|
19141
|
-
|
|
19142
|
-
/**
|
|
19143
|
-
* Checks if `value` is in the array cache.
|
|
19144
|
-
*
|
|
19145
|
-
* @private
|
|
19146
|
-
* @name has
|
|
19147
|
-
* @memberOf SetCache
|
|
19148
|
-
* @param {*} value The value to search for.
|
|
19149
|
-
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
19150
|
-
*/
|
|
19151
|
-
function setCacheHas(value) {
|
|
19152
|
-
return this.__data__.has(value);
|
|
19153
|
-
}
|
|
19154
|
-
|
|
19155
|
-
var _setCacheHas = setCacheHas;
|
|
19156
|
-
|
|
19157
|
-
/**
|
|
19158
|
-
*
|
|
19159
|
-
* Creates an array cache object to store unique values.
|
|
19160
|
-
*
|
|
19161
|
-
* @private
|
|
19162
|
-
* @constructor
|
|
19163
|
-
* @param {Array} [values] The values to cache.
|
|
19164
|
-
*/
|
|
19165
|
-
function SetCache(values) {
|
|
19166
|
-
var index = -1,
|
|
19167
|
-
length = values == null ? 0 : values.length;
|
|
19168
|
-
|
|
19169
|
-
this.__data__ = new _MapCache;
|
|
19170
|
-
while (++index < length) {
|
|
19171
|
-
this.add(values[index]);
|
|
19172
|
-
}
|
|
19173
|
-
}
|
|
19174
|
-
|
|
19175
|
-
// Add methods to `SetCache`.
|
|
19176
|
-
SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
|
|
19177
|
-
SetCache.prototype.has = _setCacheHas;
|
|
19178
|
-
|
|
19179
|
-
var _SetCache = SetCache;
|
|
19180
|
-
|
|
19181
|
-
/**
|
|
19182
|
-
* A specialized version of `_.some` for arrays without support for iteratee
|
|
19183
|
-
* shorthands.
|
|
19184
|
-
*
|
|
19185
|
-
* @private
|
|
19186
|
-
* @param {Array} [array] The array to iterate over.
|
|
19187
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
19188
|
-
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
19189
|
-
* else `false`.
|
|
19190
|
-
*/
|
|
19191
|
-
function arraySome(array, predicate) {
|
|
19192
|
-
var index = -1,
|
|
19193
|
-
length = array == null ? 0 : array.length;
|
|
19194
|
-
|
|
19195
|
-
while (++index < length) {
|
|
19196
|
-
if (predicate(array[index], index, array)) {
|
|
19197
|
-
return true;
|
|
19198
|
-
}
|
|
19199
|
-
}
|
|
19200
|
-
return false;
|
|
19201
|
-
}
|
|
19202
|
-
|
|
19203
|
-
var _arraySome = arraySome;
|
|
19204
|
-
|
|
19205
|
-
/**
|
|
19206
|
-
* Checks if a `cache` value for `key` exists.
|
|
19207
|
-
*
|
|
19208
|
-
* @private
|
|
19209
|
-
* @param {Object} cache The cache to query.
|
|
19210
|
-
* @param {string} key The key of the entry to check.
|
|
19211
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
19212
|
-
*/
|
|
19213
|
-
function cacheHas(cache, key) {
|
|
19214
|
-
return cache.has(key);
|
|
19215
|
-
}
|
|
19216
|
-
|
|
19217
|
-
var _cacheHas = cacheHas;
|
|
19218
|
-
|
|
19219
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
19220
|
-
var COMPARE_PARTIAL_FLAG = 1,
|
|
19221
|
-
COMPARE_UNORDERED_FLAG = 2;
|
|
19222
|
-
|
|
19223
|
-
/**
|
|
19224
|
-
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
19225
|
-
* partial deep comparisons.
|
|
19226
|
-
*
|
|
19227
|
-
* @private
|
|
19228
|
-
* @param {Array} array The array to compare.
|
|
19229
|
-
* @param {Array} other The other array to compare.
|
|
19230
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
19231
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
19232
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
19233
|
-
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
19234
|
-
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
19235
|
-
*/
|
|
19236
|
-
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
19237
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
|
19238
|
-
arrLength = array.length,
|
|
19239
|
-
othLength = other.length;
|
|
19240
|
-
|
|
19241
|
-
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
19242
|
-
return false;
|
|
19243
|
-
}
|
|
19244
|
-
// Check that cyclic values are equal.
|
|
19245
|
-
var arrStacked = stack.get(array);
|
|
19246
|
-
var othStacked = stack.get(other);
|
|
19247
|
-
if (arrStacked && othStacked) {
|
|
19248
|
-
return arrStacked == other && othStacked == array;
|
|
19249
|
-
}
|
|
19250
|
-
var index = -1,
|
|
19251
|
-
result = true,
|
|
19252
|
-
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache : undefined;
|
|
19253
|
-
|
|
19254
|
-
stack.set(array, other);
|
|
19255
|
-
stack.set(other, array);
|
|
19256
|
-
|
|
19257
|
-
// Ignore non-index properties.
|
|
19258
|
-
while (++index < arrLength) {
|
|
19259
|
-
var arrValue = array[index],
|
|
19260
|
-
othValue = other[index];
|
|
19261
|
-
|
|
19262
|
-
if (customizer) {
|
|
19263
|
-
var compared = isPartial
|
|
19264
|
-
? customizer(othValue, arrValue, index, other, array, stack)
|
|
19265
|
-
: customizer(arrValue, othValue, index, array, other, stack);
|
|
19266
|
-
}
|
|
19267
|
-
if (compared !== undefined) {
|
|
19268
|
-
if (compared) {
|
|
19269
|
-
continue;
|
|
19270
|
-
}
|
|
19271
|
-
result = false;
|
|
19272
|
-
break;
|
|
19273
|
-
}
|
|
19274
|
-
// Recursively compare arrays (susceptible to call stack limits).
|
|
19275
|
-
if (seen) {
|
|
19276
|
-
if (!_arraySome(other, function(othValue, othIndex) {
|
|
19277
|
-
if (!_cacheHas(seen, othIndex) &&
|
|
19278
|
-
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
19279
|
-
return seen.push(othIndex);
|
|
19280
|
-
}
|
|
19281
|
-
})) {
|
|
19282
|
-
result = false;
|
|
19283
|
-
break;
|
|
19284
|
-
}
|
|
19285
|
-
} else if (!(
|
|
19286
|
-
arrValue === othValue ||
|
|
19287
|
-
equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
|
19288
|
-
)) {
|
|
19289
|
-
result = false;
|
|
19290
|
-
break;
|
|
19291
|
-
}
|
|
19292
|
-
}
|
|
19293
|
-
stack['delete'](array);
|
|
19294
|
-
stack['delete'](other);
|
|
19295
|
-
return result;
|
|
19296
|
-
}
|
|
19297
|
-
|
|
19298
|
-
var _equalArrays = equalArrays;
|
|
19299
|
-
|
|
19300
|
-
/** Built-in value references. */
|
|
19301
|
-
var Uint8Array = _root.Uint8Array;
|
|
19302
|
-
|
|
19303
|
-
var _Uint8Array = Uint8Array;
|
|
19304
|
-
|
|
19305
|
-
/**
|
|
19306
|
-
* Converts `map` to its key-value pairs.
|
|
19307
|
-
*
|
|
19308
|
-
* @private
|
|
19309
|
-
* @param {Object} map The map to convert.
|
|
19310
|
-
* @returns {Array} Returns the key-value pairs.
|
|
19311
|
-
*/
|
|
19312
|
-
function mapToArray(map) {
|
|
19313
|
-
var index = -1,
|
|
19314
|
-
result = Array(map.size);
|
|
19315
|
-
|
|
19316
|
-
map.forEach(function(value, key) {
|
|
19317
|
-
result[++index] = [key, value];
|
|
19318
|
-
});
|
|
19319
|
-
return result;
|
|
19320
|
-
}
|
|
19321
|
-
|
|
19322
|
-
var _mapToArray = mapToArray;
|
|
19323
|
-
|
|
19324
|
-
/**
|
|
19325
|
-
* Converts `set` to an array of its values.
|
|
19326
|
-
*
|
|
19327
|
-
* @private
|
|
19328
|
-
* @param {Object} set The set to convert.
|
|
19329
|
-
* @returns {Array} Returns the values.
|
|
19330
|
-
*/
|
|
19331
|
-
function setToArray(set) {
|
|
19332
|
-
var index = -1,
|
|
19333
|
-
result = Array(set.size);
|
|
19334
|
-
|
|
19335
|
-
set.forEach(function(value) {
|
|
19336
|
-
result[++index] = value;
|
|
19337
|
-
});
|
|
19338
|
-
return result;
|
|
19339
|
-
}
|
|
19340
|
-
|
|
19341
|
-
var _setToArray = setToArray;
|
|
19342
|
-
|
|
19343
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
19344
|
-
var COMPARE_PARTIAL_FLAG$1 = 1,
|
|
19345
|
-
COMPARE_UNORDERED_FLAG$1 = 2;
|
|
19346
|
-
|
|
19347
|
-
/** `Object#toString` result references. */
|
|
19348
|
-
var boolTag = '[object Boolean]',
|
|
19349
|
-
dateTag = '[object Date]',
|
|
19350
|
-
errorTag = '[object Error]',
|
|
19351
|
-
mapTag = '[object Map]',
|
|
19352
|
-
numberTag = '[object Number]',
|
|
19353
|
-
regexpTag = '[object RegExp]',
|
|
19354
|
-
setTag = '[object Set]',
|
|
19355
|
-
stringTag = '[object String]',
|
|
19356
|
-
symbolTag$1 = '[object Symbol]';
|
|
19357
|
-
|
|
19358
|
-
var arrayBufferTag = '[object ArrayBuffer]',
|
|
19359
|
-
dataViewTag = '[object DataView]';
|
|
19360
|
-
|
|
19361
|
-
/** Used to convert symbols to primitives and strings. */
|
|
19362
|
-
var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
|
|
19363
|
-
symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
|
|
19364
|
-
|
|
19365
|
-
/**
|
|
19366
|
-
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
19367
|
-
* the same `toStringTag`.
|
|
19368
|
-
*
|
|
19369
|
-
* **Note:** This function only supports comparing values with tags of
|
|
19370
|
-
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
19371
|
-
*
|
|
19372
|
-
* @private
|
|
19373
|
-
* @param {Object} object The object to compare.
|
|
19374
|
-
* @param {Object} other The other object to compare.
|
|
19375
|
-
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
19376
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
19377
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
19378
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
19379
|
-
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
19380
|
-
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
19381
|
-
*/
|
|
19382
|
-
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
19383
|
-
switch (tag) {
|
|
19384
|
-
case dataViewTag:
|
|
19385
|
-
if ((object.byteLength != other.byteLength) ||
|
|
19386
|
-
(object.byteOffset != other.byteOffset)) {
|
|
19387
|
-
return false;
|
|
19388
|
-
}
|
|
19389
|
-
object = object.buffer;
|
|
19390
|
-
other = other.buffer;
|
|
19391
|
-
|
|
19392
|
-
case arrayBufferTag:
|
|
19393
|
-
if ((object.byteLength != other.byteLength) ||
|
|
19394
|
-
!equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
|
|
19395
|
-
return false;
|
|
19396
|
-
}
|
|
19397
|
-
return true;
|
|
19398
|
-
|
|
19399
|
-
case boolTag:
|
|
19400
|
-
case dateTag:
|
|
19401
|
-
case numberTag:
|
|
19402
|
-
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
19403
|
-
// Invalid dates are coerced to `NaN`.
|
|
19404
|
-
return eq_1(+object, +other);
|
|
19405
|
-
|
|
19406
|
-
case errorTag:
|
|
19407
|
-
return object.name == other.name && object.message == other.message;
|
|
19408
|
-
|
|
19409
|
-
case regexpTag:
|
|
19410
|
-
case stringTag:
|
|
19411
|
-
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
19412
|
-
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
19413
|
-
// for more details.
|
|
19414
|
-
return object == (other + '');
|
|
19415
|
-
|
|
19416
|
-
case mapTag:
|
|
19417
|
-
var convert = _mapToArray;
|
|
19418
|
-
|
|
19419
|
-
case setTag:
|
|
19420
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1;
|
|
19421
|
-
convert || (convert = _setToArray);
|
|
19422
|
-
|
|
19423
|
-
if (object.size != other.size && !isPartial) {
|
|
19424
|
-
return false;
|
|
19425
|
-
}
|
|
19426
|
-
// Assume cyclic values are equal.
|
|
19427
|
-
var stacked = stack.get(object);
|
|
19428
|
-
if (stacked) {
|
|
19429
|
-
return stacked == other;
|
|
19430
|
-
}
|
|
19431
|
-
bitmask |= COMPARE_UNORDERED_FLAG$1;
|
|
19432
|
-
|
|
19433
|
-
// Recursively compare objects (susceptible to call stack limits).
|
|
19434
|
-
stack.set(object, other);
|
|
19435
|
-
var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
19436
|
-
stack['delete'](object);
|
|
19437
|
-
return result;
|
|
19438
|
-
|
|
19439
|
-
case symbolTag$1:
|
|
19440
|
-
if (symbolValueOf) {
|
|
19441
|
-
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
19442
|
-
}
|
|
19443
|
-
}
|
|
19444
|
-
return false;
|
|
19445
|
-
}
|
|
19446
|
-
|
|
19447
|
-
var _equalByTag = equalByTag;
|
|
19448
|
-
|
|
19449
|
-
/**
|
|
19450
|
-
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
19451
|
-
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
19452
|
-
* symbols of `object`.
|
|
19453
|
-
*
|
|
19454
|
-
* @private
|
|
19455
|
-
* @param {Object} object The object to query.
|
|
19456
|
-
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
19457
|
-
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
19458
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
19459
|
-
*/
|
|
19460
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
19461
|
-
var result = keysFunc(object);
|
|
19462
|
-
return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
|
|
19463
|
-
}
|
|
19464
|
-
|
|
19465
|
-
var _baseGetAllKeys = baseGetAllKeys;
|
|
19466
|
-
|
|
19467
|
-
/**
|
|
19468
|
-
* A specialized version of `_.filter` for arrays without support for
|
|
19469
|
-
* iteratee shorthands.
|
|
19470
|
-
*
|
|
19471
|
-
* @private
|
|
19472
|
-
* @param {Array} [array] The array to iterate over.
|
|
19473
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
19474
|
-
* @returns {Array} Returns the new filtered array.
|
|
19475
|
-
*/
|
|
19476
|
-
function arrayFilter(array, predicate) {
|
|
19477
|
-
var index = -1,
|
|
19478
|
-
length = array == null ? 0 : array.length,
|
|
19479
|
-
resIndex = 0,
|
|
19480
|
-
result = [];
|
|
19481
|
-
|
|
19482
|
-
while (++index < length) {
|
|
19483
|
-
var value = array[index];
|
|
19484
|
-
if (predicate(value, index, array)) {
|
|
19485
|
-
result[resIndex++] = value;
|
|
19486
|
-
}
|
|
19487
|
-
}
|
|
19488
|
-
return result;
|
|
19489
|
-
}
|
|
19490
|
-
|
|
19491
|
-
var _arrayFilter = arrayFilter;
|
|
19492
|
-
|
|
19493
|
-
/**
|
|
19494
|
-
* This method returns a new empty array.
|
|
19495
|
-
*
|
|
19496
|
-
* @static
|
|
19497
|
-
* @memberOf _
|
|
19498
|
-
* @since 4.13.0
|
|
19499
|
-
* @category Util
|
|
19500
|
-
* @returns {Array} Returns the new empty array.
|
|
19501
|
-
* @example
|
|
19502
|
-
*
|
|
19503
|
-
* var arrays = _.times(2, _.stubArray);
|
|
19504
|
-
*
|
|
19505
|
-
* console.log(arrays);
|
|
19506
|
-
* // => [[], []]
|
|
19507
|
-
*
|
|
19508
|
-
* console.log(arrays[0] === arrays[1]);
|
|
19509
|
-
* // => false
|
|
19510
|
-
*/
|
|
19511
|
-
function stubArray() {
|
|
19512
|
-
return [];
|
|
19513
|
-
}
|
|
19514
|
-
|
|
19515
|
-
var stubArray_1 = stubArray;
|
|
19516
|
-
|
|
19517
|
-
/** Used for built-in method references. */
|
|
19518
|
-
var objectProto$6 = Object.prototype;
|
|
19519
|
-
|
|
19520
|
-
/** Built-in value references. */
|
|
19521
|
-
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
19522
|
-
|
|
19523
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
19524
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
19525
|
-
|
|
19526
|
-
/**
|
|
19527
|
-
* Creates an array of the own enumerable symbols of `object`.
|
|
19528
|
-
*
|
|
19529
|
-
* @private
|
|
19530
|
-
* @param {Object} object The object to query.
|
|
19531
|
-
* @returns {Array} Returns the array of symbols.
|
|
19532
|
-
*/
|
|
19533
|
-
var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
|
|
19534
|
-
if (object == null) {
|
|
19535
|
-
return [];
|
|
19536
|
-
}
|
|
19537
|
-
object = Object(object);
|
|
19538
|
-
return _arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
19539
|
-
return propertyIsEnumerable$1.call(object, symbol);
|
|
19540
|
-
});
|
|
19541
|
-
};
|
|
19542
|
-
|
|
19543
|
-
var _getSymbols = getSymbols;
|
|
19544
|
-
|
|
19545
|
-
/**
|
|
19546
|
-
* The base implementation of `_.times` without support for iteratee shorthands
|
|
19547
|
-
* or max array length checks.
|
|
19548
|
-
*
|
|
19549
|
-
* @private
|
|
19550
|
-
* @param {number} n The number of times to invoke `iteratee`.
|
|
19551
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
19552
|
-
* @returns {Array} Returns the array of results.
|
|
19553
|
-
*/
|
|
19554
|
-
function baseTimes(n, iteratee) {
|
|
19555
|
-
var index = -1,
|
|
19556
|
-
result = Array(n);
|
|
19557
|
-
|
|
19558
|
-
while (++index < n) {
|
|
19559
|
-
result[index] = iteratee(index);
|
|
19560
|
-
}
|
|
19561
|
-
return result;
|
|
19562
|
-
}
|
|
19563
|
-
|
|
19564
|
-
var _baseTimes = baseTimes;
|
|
19565
|
-
|
|
19566
|
-
/**
|
|
19567
|
-
* This method returns `false`.
|
|
19568
|
-
*
|
|
19569
|
-
* @static
|
|
19570
|
-
* @memberOf _
|
|
19571
|
-
* @since 4.13.0
|
|
19572
|
-
* @category Util
|
|
19573
|
-
* @returns {boolean} Returns `false`.
|
|
19574
|
-
* @example
|
|
19575
|
-
*
|
|
19576
|
-
* _.times(2, _.stubFalse);
|
|
19577
|
-
* // => [false, false]
|
|
19578
|
-
*/
|
|
19579
|
-
function stubFalse() {
|
|
19580
|
-
return false;
|
|
19581
|
-
}
|
|
19582
|
-
|
|
19583
|
-
var stubFalse_1 = stubFalse;
|
|
19584
|
-
|
|
19585
|
-
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
19586
|
-
/** Detect free variable `exports`. */
|
|
19587
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
19588
|
-
|
|
19589
|
-
/** Detect free variable `module`. */
|
|
19590
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
19591
|
-
|
|
19592
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
19593
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
19594
|
-
|
|
19595
|
-
/** Built-in value references. */
|
|
19596
|
-
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
19597
|
-
|
|
19598
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
19599
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
19600
|
-
|
|
19601
|
-
/**
|
|
19602
|
-
* Checks if `value` is a buffer.
|
|
19603
|
-
*
|
|
19604
|
-
* @static
|
|
19605
|
-
* @memberOf _
|
|
19606
|
-
* @since 4.3.0
|
|
19607
|
-
* @category Lang
|
|
19608
|
-
* @param {*} value The value to check.
|
|
19609
|
-
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
19610
|
-
* @example
|
|
19611
|
-
*
|
|
19612
|
-
* _.isBuffer(new Buffer(2));
|
|
19613
|
-
* // => true
|
|
19614
|
-
*
|
|
19615
|
-
* _.isBuffer(new Uint8Array(2));
|
|
19616
|
-
* // => false
|
|
19617
|
-
*/
|
|
19618
|
-
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
19619
|
-
|
|
19620
|
-
module.exports = isBuffer;
|
|
19621
|
-
});
|
|
19622
|
-
|
|
19623
|
-
/** Used as references for various `Number` constants. */
|
|
19624
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
19625
|
-
|
|
19626
|
-
/** Used to detect unsigned integer values. */
|
|
19627
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
19628
|
-
|
|
19629
|
-
/**
|
|
19630
|
-
* Checks if `value` is a valid array-like index.
|
|
19631
|
-
*
|
|
19632
|
-
* @private
|
|
19633
|
-
* @param {*} value The value to check.
|
|
19634
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
19635
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
19636
|
-
*/
|
|
19637
|
-
function isIndex(value, length) {
|
|
19638
|
-
var type = typeof value;
|
|
19639
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
19640
|
-
|
|
19641
|
-
return !!length &&
|
|
19642
|
-
(type == 'number' ||
|
|
19643
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
19644
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
19645
|
-
}
|
|
19646
|
-
|
|
19647
|
-
var _isIndex = isIndex;
|
|
19648
|
-
|
|
19649
|
-
/** Used as references for various `Number` constants. */
|
|
19650
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
19651
|
-
|
|
19652
|
-
/**
|
|
19653
|
-
* Checks if `value` is a valid array-like length.
|
|
19654
|
-
*
|
|
19655
|
-
* **Note:** This method is loosely based on
|
|
19656
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
19657
|
-
*
|
|
19658
|
-
* @static
|
|
19659
|
-
* @memberOf _
|
|
19660
|
-
* @since 4.0.0
|
|
19661
|
-
* @category Lang
|
|
19662
|
-
* @param {*} value The value to check.
|
|
19663
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
19664
|
-
* @example
|
|
19665
|
-
*
|
|
19666
|
-
* _.isLength(3);
|
|
19667
|
-
* // => true
|
|
19668
|
-
*
|
|
19669
|
-
* _.isLength(Number.MIN_VALUE);
|
|
19670
|
-
* // => false
|
|
19671
|
-
*
|
|
19672
|
-
* _.isLength(Infinity);
|
|
19673
|
-
* // => false
|
|
19674
|
-
*
|
|
19675
|
-
* _.isLength('3');
|
|
19676
|
-
* // => false
|
|
19677
|
-
*/
|
|
19678
|
-
function isLength(value) {
|
|
19679
|
-
return typeof value == 'number' &&
|
|
19680
|
-
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
|
|
19681
|
-
}
|
|
19682
|
-
|
|
19683
|
-
var isLength_1 = isLength;
|
|
19684
|
-
|
|
19685
|
-
/** `Object#toString` result references. */
|
|
19686
|
-
var argsTag$1 = '[object Arguments]',
|
|
19687
|
-
arrayTag = '[object Array]',
|
|
19688
|
-
boolTag$1 = '[object Boolean]',
|
|
19689
|
-
dateTag$1 = '[object Date]',
|
|
19690
|
-
errorTag$1 = '[object Error]',
|
|
19691
|
-
funcTag$1 = '[object Function]',
|
|
19692
|
-
mapTag$1 = '[object Map]',
|
|
19693
|
-
numberTag$1 = '[object Number]',
|
|
19694
|
-
objectTag = '[object Object]',
|
|
19695
|
-
regexpTag$1 = '[object RegExp]',
|
|
19696
|
-
setTag$1 = '[object Set]',
|
|
19697
|
-
stringTag$1 = '[object String]',
|
|
19698
|
-
weakMapTag = '[object WeakMap]';
|
|
19699
|
-
|
|
19700
|
-
var arrayBufferTag$1 = '[object ArrayBuffer]',
|
|
19701
|
-
dataViewTag$1 = '[object DataView]',
|
|
19702
|
-
float32Tag = '[object Float32Array]',
|
|
19703
|
-
float64Tag = '[object Float64Array]',
|
|
19704
|
-
int8Tag = '[object Int8Array]',
|
|
19705
|
-
int16Tag = '[object Int16Array]',
|
|
19706
|
-
int32Tag = '[object Int32Array]',
|
|
19707
|
-
uint8Tag = '[object Uint8Array]',
|
|
19708
|
-
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
19709
|
-
uint16Tag = '[object Uint16Array]',
|
|
19710
|
-
uint32Tag = '[object Uint32Array]';
|
|
19711
|
-
|
|
19712
|
-
/** Used to identify `toStringTag` values of typed arrays. */
|
|
19713
|
-
var typedArrayTags = {};
|
|
19714
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
19715
|
-
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
19716
|
-
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
19717
|
-
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
19718
|
-
typedArrayTags[uint32Tag] = true;
|
|
19719
|
-
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
|
|
19720
|
-
typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] =
|
|
19721
|
-
typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag$1] =
|
|
19722
|
-
typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
|
|
19723
|
-
typedArrayTags[mapTag$1] = typedArrayTags[numberTag$1] =
|
|
19724
|
-
typedArrayTags[objectTag] = typedArrayTags[regexpTag$1] =
|
|
19725
|
-
typedArrayTags[setTag$1] = typedArrayTags[stringTag$1] =
|
|
19726
|
-
typedArrayTags[weakMapTag] = false;
|
|
19727
|
-
|
|
19728
|
-
/**
|
|
19729
|
-
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
19730
|
-
*
|
|
19731
|
-
* @private
|
|
19732
|
-
* @param {*} value The value to check.
|
|
19733
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
19734
|
-
*/
|
|
19735
|
-
function baseIsTypedArray(value) {
|
|
19736
|
-
return isObjectLike_1(value) &&
|
|
19737
|
-
isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
|
|
19738
|
-
}
|
|
19739
|
-
|
|
19740
|
-
var _baseIsTypedArray = baseIsTypedArray;
|
|
19741
|
-
|
|
19742
|
-
/**
|
|
19743
|
-
* The base implementation of `_.unary` without support for storing metadata.
|
|
19744
|
-
*
|
|
19745
|
-
* @private
|
|
19746
|
-
* @param {Function} func The function to cap arguments for.
|
|
19747
|
-
* @returns {Function} Returns the new capped function.
|
|
19748
|
-
*/
|
|
19749
|
-
function baseUnary(func) {
|
|
19750
|
-
return function(value) {
|
|
19751
|
-
return func(value);
|
|
19752
|
-
};
|
|
19753
|
-
}
|
|
19754
|
-
|
|
19755
|
-
var _baseUnary = baseUnary;
|
|
19756
|
-
|
|
19757
|
-
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
19758
|
-
/** Detect free variable `exports`. */
|
|
19759
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
19760
|
-
|
|
19761
|
-
/** Detect free variable `module`. */
|
|
19762
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
19763
|
-
|
|
19764
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
19765
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
19766
|
-
|
|
19767
|
-
/** Detect free variable `process` from Node.js. */
|
|
19768
|
-
var freeProcess = moduleExports && _freeGlobal.process;
|
|
19769
|
-
|
|
19770
|
-
/** Used to access faster Node.js helpers. */
|
|
19771
|
-
var nodeUtil = (function() {
|
|
19772
|
-
try {
|
|
19773
|
-
// Use `util.types` for Node.js 10+.
|
|
19774
|
-
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
19775
|
-
|
|
19776
|
-
if (types) {
|
|
19777
|
-
return types;
|
|
19778
|
-
}
|
|
19779
|
-
|
|
19780
|
-
// Legacy `process.binding('util')` for Node.js < 10.
|
|
19781
|
-
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
19782
|
-
} catch (e) {}
|
|
19783
|
-
}());
|
|
19784
|
-
|
|
19785
|
-
module.exports = nodeUtil;
|
|
19786
|
-
});
|
|
19787
|
-
|
|
19788
|
-
/* Node.js helper references. */
|
|
19789
|
-
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
19790
|
-
|
|
19791
|
-
/**
|
|
19792
|
-
* Checks if `value` is classified as a typed array.
|
|
19793
|
-
*
|
|
19794
|
-
* @static
|
|
19795
|
-
* @memberOf _
|
|
19796
|
-
* @since 3.0.0
|
|
19797
|
-
* @category Lang
|
|
19798
|
-
* @param {*} value The value to check.
|
|
19799
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
19800
|
-
* @example
|
|
19801
|
-
*
|
|
19802
|
-
* _.isTypedArray(new Uint8Array);
|
|
19803
|
-
* // => true
|
|
19804
|
-
*
|
|
19805
|
-
* _.isTypedArray([]);
|
|
19806
|
-
* // => false
|
|
19807
|
-
*/
|
|
19808
|
-
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
|
|
19809
|
-
|
|
19810
|
-
var isTypedArray_1 = isTypedArray;
|
|
19811
|
-
|
|
19812
|
-
/** Used for built-in method references. */
|
|
19813
|
-
var objectProto$7 = Object.prototype;
|
|
19814
|
-
|
|
19815
|
-
/** Used to check objects for own properties. */
|
|
19816
|
-
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
19817
|
-
|
|
19818
|
-
/**
|
|
19819
|
-
* Creates an array of the enumerable property names of the array-like `value`.
|
|
19820
|
-
*
|
|
19821
|
-
* @private
|
|
19822
|
-
* @param {*} value The value to query.
|
|
19823
|
-
* @param {boolean} inherited Specify returning inherited property names.
|
|
19824
|
-
* @returns {Array} Returns the array of property names.
|
|
19825
|
-
*/
|
|
19826
|
-
function arrayLikeKeys(value, inherited) {
|
|
19827
|
-
var isArr = isArray_1(value),
|
|
19828
|
-
isArg = !isArr && isArguments_1(value),
|
|
19829
|
-
isBuff = !isArr && !isArg && isBuffer_1(value),
|
|
19830
|
-
isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
|
|
19831
|
-
skipIndexes = isArr || isArg || isBuff || isType,
|
|
19832
|
-
result = skipIndexes ? _baseTimes(value.length, String) : [],
|
|
19833
|
-
length = result.length;
|
|
19834
|
-
|
|
19835
|
-
for (var key in value) {
|
|
19836
|
-
if ((inherited || hasOwnProperty$5.call(value, key)) &&
|
|
19837
|
-
!(skipIndexes && (
|
|
19838
|
-
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
19839
|
-
key == 'length' ||
|
|
19840
|
-
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
19841
|
-
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
19842
|
-
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
19843
|
-
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
19844
|
-
// Skip index properties.
|
|
19845
|
-
_isIndex(key, length)
|
|
19846
|
-
))) {
|
|
19847
|
-
result.push(key);
|
|
19848
|
-
}
|
|
19849
|
-
}
|
|
19850
|
-
return result;
|
|
19851
|
-
}
|
|
19852
|
-
|
|
19853
|
-
var _arrayLikeKeys = arrayLikeKeys;
|
|
19854
|
-
|
|
19855
|
-
/** Used for built-in method references. */
|
|
19856
|
-
var objectProto$8 = Object.prototype;
|
|
19857
|
-
|
|
19858
|
-
/**
|
|
19859
|
-
* Checks if `value` is likely a prototype object.
|
|
19860
|
-
*
|
|
19861
|
-
* @private
|
|
19862
|
-
* @param {*} value The value to check.
|
|
19863
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
19864
|
-
*/
|
|
19865
|
-
function isPrototype(value) {
|
|
19866
|
-
var Ctor = value && value.constructor,
|
|
19867
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$8;
|
|
19868
|
-
|
|
19869
|
-
return value === proto;
|
|
19870
|
-
}
|
|
19871
|
-
|
|
19872
|
-
var _isPrototype = isPrototype;
|
|
19873
|
-
|
|
19874
|
-
/**
|
|
19875
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
19876
|
-
*
|
|
19877
|
-
* @private
|
|
19878
|
-
* @param {Function} func The function to wrap.
|
|
19879
|
-
* @param {Function} transform The argument transform.
|
|
19880
|
-
* @returns {Function} Returns the new function.
|
|
19881
|
-
*/
|
|
19882
|
-
function overArg(func, transform) {
|
|
19883
|
-
return function(arg) {
|
|
19884
|
-
return func(transform(arg));
|
|
19885
|
-
};
|
|
19886
|
-
}
|
|
19887
|
-
|
|
19888
|
-
var _overArg = overArg;
|
|
19889
|
-
|
|
19890
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
19891
|
-
var nativeKeys = _overArg(Object.keys, Object);
|
|
19892
|
-
|
|
19893
|
-
var _nativeKeys = nativeKeys;
|
|
19894
|
-
|
|
19895
|
-
/** Used for built-in method references. */
|
|
19896
|
-
var objectProto$9 = Object.prototype;
|
|
19897
|
-
|
|
19898
|
-
/** Used to check objects for own properties. */
|
|
19899
|
-
var hasOwnProperty$6 = objectProto$9.hasOwnProperty;
|
|
19900
|
-
|
|
19901
|
-
/**
|
|
19902
|
-
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
19903
|
-
*
|
|
19904
|
-
* @private
|
|
19905
|
-
* @param {Object} object The object to query.
|
|
19906
|
-
* @returns {Array} Returns the array of property names.
|
|
19907
|
-
*/
|
|
19908
|
-
function baseKeys(object) {
|
|
19909
|
-
if (!_isPrototype(object)) {
|
|
19910
|
-
return _nativeKeys(object);
|
|
19911
|
-
}
|
|
19912
|
-
var result = [];
|
|
19913
|
-
for (var key in Object(object)) {
|
|
19914
|
-
if (hasOwnProperty$6.call(object, key) && key != 'constructor') {
|
|
19915
|
-
result.push(key);
|
|
19916
|
-
}
|
|
19917
|
-
}
|
|
19918
|
-
return result;
|
|
19919
|
-
}
|
|
19920
|
-
|
|
19921
|
-
var _baseKeys = baseKeys;
|
|
19922
|
-
|
|
19923
|
-
/**
|
|
19924
|
-
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
19925
|
-
* not a function and has a `value.length` that's an integer greater than or
|
|
19926
|
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
19927
|
-
*
|
|
19928
|
-
* @static
|
|
19929
|
-
* @memberOf _
|
|
19930
|
-
* @since 4.0.0
|
|
19931
|
-
* @category Lang
|
|
19932
|
-
* @param {*} value The value to check.
|
|
19933
|
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
19934
|
-
* @example
|
|
19935
|
-
*
|
|
19936
|
-
* _.isArrayLike([1, 2, 3]);
|
|
19937
|
-
* // => true
|
|
19938
|
-
*
|
|
19939
|
-
* _.isArrayLike(document.body.children);
|
|
19940
|
-
* // => true
|
|
19941
|
-
*
|
|
19942
|
-
* _.isArrayLike('abc');
|
|
19943
|
-
* // => true
|
|
19944
|
-
*
|
|
19945
|
-
* _.isArrayLike(_.noop);
|
|
19946
|
-
* // => false
|
|
19947
|
-
*/
|
|
19948
|
-
function isArrayLike(value) {
|
|
19949
|
-
return value != null && isLength_1(value.length) && !isFunction_1(value);
|
|
19950
|
-
}
|
|
19951
|
-
|
|
19952
|
-
var isArrayLike_1 = isArrayLike;
|
|
19953
|
-
|
|
19954
|
-
/**
|
|
19955
|
-
* Creates an array of the own enumerable property names of `object`.
|
|
19956
|
-
*
|
|
19957
|
-
* **Note:** Non-object values are coerced to objects. See the
|
|
19958
|
-
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
19959
|
-
* for more details.
|
|
19960
|
-
*
|
|
19961
|
-
* @static
|
|
19962
|
-
* @since 0.1.0
|
|
19963
|
-
* @memberOf _
|
|
19964
|
-
* @category Object
|
|
19965
|
-
* @param {Object} object The object to query.
|
|
19966
|
-
* @returns {Array} Returns the array of property names.
|
|
19967
|
-
* @example
|
|
19968
|
-
*
|
|
19969
|
-
* function Foo() {
|
|
19970
|
-
* this.a = 1;
|
|
19971
|
-
* this.b = 2;
|
|
19972
|
-
* }
|
|
19973
|
-
*
|
|
19974
|
-
* Foo.prototype.c = 3;
|
|
19975
|
-
*
|
|
19976
|
-
* _.keys(new Foo);
|
|
19977
|
-
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
19978
|
-
*
|
|
19979
|
-
* _.keys('hi');
|
|
19980
|
-
* // => ['0', '1']
|
|
19981
|
-
*/
|
|
19982
|
-
function keys(object) {
|
|
19983
|
-
return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
|
|
19984
|
-
}
|
|
19985
|
-
|
|
19986
|
-
var keys_1 = keys;
|
|
19987
|
-
|
|
19988
|
-
/**
|
|
19989
|
-
* Creates an array of own enumerable property names and symbols of `object`.
|
|
19990
|
-
*
|
|
19991
|
-
* @private
|
|
19992
|
-
* @param {Object} object The object to query.
|
|
19993
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
19994
|
-
*/
|
|
19995
|
-
function getAllKeys(object) {
|
|
19996
|
-
return _baseGetAllKeys(object, keys_1, _getSymbols);
|
|
19997
|
-
}
|
|
19998
|
-
|
|
19999
|
-
var _getAllKeys = getAllKeys;
|
|
20000
|
-
|
|
20001
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
20002
|
-
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
20003
|
-
|
|
20004
|
-
/** Used for built-in method references. */
|
|
20005
|
-
var objectProto$a = Object.prototype;
|
|
20006
|
-
|
|
20007
|
-
/** Used to check objects for own properties. */
|
|
20008
|
-
var hasOwnProperty$7 = objectProto$a.hasOwnProperty;
|
|
20009
|
-
|
|
20010
|
-
/**
|
|
20011
|
-
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
20012
|
-
* partial deep comparisons.
|
|
20013
|
-
*
|
|
20014
|
-
* @private
|
|
20015
|
-
* @param {Object} object The object to compare.
|
|
20016
|
-
* @param {Object} other The other object to compare.
|
|
20017
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
20018
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
20019
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
20020
|
-
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
20021
|
-
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
20022
|
-
*/
|
|
20023
|
-
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
20024
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2,
|
|
20025
|
-
objProps = _getAllKeys(object),
|
|
20026
|
-
objLength = objProps.length,
|
|
20027
|
-
othProps = _getAllKeys(other),
|
|
20028
|
-
othLength = othProps.length;
|
|
20029
|
-
|
|
20030
|
-
if (objLength != othLength && !isPartial) {
|
|
20031
|
-
return false;
|
|
20032
|
-
}
|
|
20033
|
-
var index = objLength;
|
|
20034
|
-
while (index--) {
|
|
20035
|
-
var key = objProps[index];
|
|
20036
|
-
if (!(isPartial ? key in other : hasOwnProperty$7.call(other, key))) {
|
|
20037
|
-
return false;
|
|
20038
|
-
}
|
|
20039
|
-
}
|
|
20040
|
-
// Check that cyclic values are equal.
|
|
20041
|
-
var objStacked = stack.get(object);
|
|
20042
|
-
var othStacked = stack.get(other);
|
|
20043
|
-
if (objStacked && othStacked) {
|
|
20044
|
-
return objStacked == other && othStacked == object;
|
|
20045
|
-
}
|
|
20046
|
-
var result = true;
|
|
20047
|
-
stack.set(object, other);
|
|
20048
|
-
stack.set(other, object);
|
|
20049
|
-
|
|
20050
|
-
var skipCtor = isPartial;
|
|
20051
|
-
while (++index < objLength) {
|
|
20052
|
-
key = objProps[index];
|
|
20053
|
-
var objValue = object[key],
|
|
20054
|
-
othValue = other[key];
|
|
20055
|
-
|
|
20056
|
-
if (customizer) {
|
|
20057
|
-
var compared = isPartial
|
|
20058
|
-
? customizer(othValue, objValue, key, other, object, stack)
|
|
20059
|
-
: customizer(objValue, othValue, key, object, other, stack);
|
|
20060
|
-
}
|
|
20061
|
-
// Recursively compare objects (susceptible to call stack limits).
|
|
20062
|
-
if (!(compared === undefined
|
|
20063
|
-
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
|
20064
|
-
: compared
|
|
20065
|
-
)) {
|
|
20066
|
-
result = false;
|
|
20067
|
-
break;
|
|
20068
|
-
}
|
|
20069
|
-
skipCtor || (skipCtor = key == 'constructor');
|
|
20070
|
-
}
|
|
20071
|
-
if (result && !skipCtor) {
|
|
20072
|
-
var objCtor = object.constructor,
|
|
20073
|
-
othCtor = other.constructor;
|
|
20074
|
-
|
|
20075
|
-
// Non `Object` object instances with different constructors are not equal.
|
|
20076
|
-
if (objCtor != othCtor &&
|
|
20077
|
-
('constructor' in object && 'constructor' in other) &&
|
|
20078
|
-
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
|
20079
|
-
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
|
20080
|
-
result = false;
|
|
20081
|
-
}
|
|
20082
|
-
}
|
|
20083
|
-
stack['delete'](object);
|
|
20084
|
-
stack['delete'](other);
|
|
20085
|
-
return result;
|
|
20086
|
-
}
|
|
20087
|
-
|
|
20088
|
-
var _equalObjects = equalObjects;
|
|
20089
|
-
|
|
20090
|
-
/* Built-in method references that are verified to be native. */
|
|
20091
|
-
var DataView = _getNative(_root, 'DataView');
|
|
20092
|
-
|
|
20093
|
-
var _DataView = DataView;
|
|
20094
|
-
|
|
20095
|
-
/* Built-in method references that are verified to be native. */
|
|
20096
|
-
var Promise$1 = _getNative(_root, 'Promise');
|
|
20097
|
-
|
|
20098
|
-
var _Promise = Promise$1;
|
|
20099
|
-
|
|
20100
|
-
/* Built-in method references that are verified to be native. */
|
|
20101
|
-
var Set$1 = _getNative(_root, 'Set');
|
|
20102
|
-
|
|
20103
|
-
var _Set = Set$1;
|
|
20104
|
-
|
|
20105
|
-
/* Built-in method references that are verified to be native. */
|
|
20106
|
-
var WeakMap = _getNative(_root, 'WeakMap');
|
|
20107
|
-
|
|
20108
|
-
var _WeakMap = WeakMap;
|
|
20109
|
-
|
|
20110
|
-
/** `Object#toString` result references. */
|
|
20111
|
-
var mapTag$2 = '[object Map]',
|
|
20112
|
-
objectTag$1 = '[object Object]',
|
|
20113
|
-
promiseTag = '[object Promise]',
|
|
20114
|
-
setTag$2 = '[object Set]',
|
|
20115
|
-
weakMapTag$1 = '[object WeakMap]';
|
|
20116
|
-
|
|
20117
|
-
var dataViewTag$2 = '[object DataView]';
|
|
20118
|
-
|
|
20119
|
-
/** Used to detect maps, sets, and weakmaps. */
|
|
20120
|
-
var dataViewCtorString = _toSource(_DataView),
|
|
20121
|
-
mapCtorString = _toSource(_Map),
|
|
20122
|
-
promiseCtorString = _toSource(_Promise),
|
|
20123
|
-
setCtorString = _toSource(_Set),
|
|
20124
|
-
weakMapCtorString = _toSource(_WeakMap);
|
|
20125
|
-
|
|
20126
|
-
/**
|
|
20127
|
-
* Gets the `toStringTag` of `value`.
|
|
20128
|
-
*
|
|
20129
|
-
* @private
|
|
20130
|
-
* @param {*} value The value to query.
|
|
20131
|
-
* @returns {string} Returns the `toStringTag`.
|
|
20132
|
-
*/
|
|
20133
|
-
var getTag = _baseGetTag;
|
|
20134
|
-
|
|
20135
|
-
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
20136
|
-
if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
|
|
20137
|
-
(_Map && getTag(new _Map) != mapTag$2) ||
|
|
20138
|
-
(_Promise && getTag(_Promise.resolve()) != promiseTag) ||
|
|
20139
|
-
(_Set && getTag(new _Set) != setTag$2) ||
|
|
20140
|
-
(_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {
|
|
20141
|
-
getTag = function(value) {
|
|
20142
|
-
var result = _baseGetTag(value),
|
|
20143
|
-
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
20144
|
-
ctorString = Ctor ? _toSource(Ctor) : '';
|
|
20145
|
-
|
|
20146
|
-
if (ctorString) {
|
|
20147
|
-
switch (ctorString) {
|
|
20148
|
-
case dataViewCtorString: return dataViewTag$2;
|
|
20149
|
-
case mapCtorString: return mapTag$2;
|
|
20150
|
-
case promiseCtorString: return promiseTag;
|
|
20151
|
-
case setCtorString: return setTag$2;
|
|
20152
|
-
case weakMapCtorString: return weakMapTag$1;
|
|
20153
|
-
}
|
|
20154
|
-
}
|
|
20155
|
-
return result;
|
|
20156
|
-
};
|
|
20157
|
-
}
|
|
20158
|
-
|
|
20159
|
-
var _getTag = getTag;
|
|
20160
|
-
|
|
20161
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
20162
|
-
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
20163
|
-
|
|
20164
|
-
/** `Object#toString` result references. */
|
|
20165
|
-
var argsTag$2 = '[object Arguments]',
|
|
20166
|
-
arrayTag$1 = '[object Array]',
|
|
20167
|
-
objectTag$2 = '[object Object]';
|
|
20168
|
-
|
|
20169
|
-
/** Used for built-in method references. */
|
|
20170
|
-
var objectProto$b = Object.prototype;
|
|
20171
|
-
|
|
20172
|
-
/** Used to check objects for own properties. */
|
|
20173
|
-
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
20174
|
-
|
|
20175
|
-
/**
|
|
20176
|
-
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
20177
|
-
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
20178
|
-
* references to be compared.
|
|
20179
|
-
*
|
|
20180
|
-
* @private
|
|
20181
|
-
* @param {Object} object The object to compare.
|
|
20182
|
-
* @param {Object} other The other object to compare.
|
|
20183
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
20184
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
20185
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
20186
|
-
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
20187
|
-
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
20188
|
-
*/
|
|
20189
|
-
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
20190
|
-
var objIsArr = isArray_1(object),
|
|
20191
|
-
othIsArr = isArray_1(other),
|
|
20192
|
-
objTag = objIsArr ? arrayTag$1 : _getTag(object),
|
|
20193
|
-
othTag = othIsArr ? arrayTag$1 : _getTag(other);
|
|
20194
|
-
|
|
20195
|
-
objTag = objTag == argsTag$2 ? objectTag$2 : objTag;
|
|
20196
|
-
othTag = othTag == argsTag$2 ? objectTag$2 : othTag;
|
|
20197
|
-
|
|
20198
|
-
var objIsObj = objTag == objectTag$2,
|
|
20199
|
-
othIsObj = othTag == objectTag$2,
|
|
20200
|
-
isSameTag = objTag == othTag;
|
|
20201
|
-
|
|
20202
|
-
if (isSameTag && isBuffer_1(object)) {
|
|
20203
|
-
if (!isBuffer_1(other)) {
|
|
20204
|
-
return false;
|
|
20205
|
-
}
|
|
20206
|
-
objIsArr = true;
|
|
20207
|
-
objIsObj = false;
|
|
20208
|
-
}
|
|
20209
|
-
if (isSameTag && !objIsObj) {
|
|
20210
|
-
stack || (stack = new _Stack);
|
|
20211
|
-
return (objIsArr || isTypedArray_1(object))
|
|
20212
|
-
? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
|
20213
|
-
: _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
20214
|
-
}
|
|
20215
|
-
if (!(bitmask & COMPARE_PARTIAL_FLAG$3)) {
|
|
20216
|
-
var objIsWrapped = objIsObj && hasOwnProperty$8.call(object, '__wrapped__'),
|
|
20217
|
-
othIsWrapped = othIsObj && hasOwnProperty$8.call(other, '__wrapped__');
|
|
20218
|
-
|
|
20219
|
-
if (objIsWrapped || othIsWrapped) {
|
|
20220
|
-
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
20221
|
-
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
20222
|
-
|
|
20223
|
-
stack || (stack = new _Stack);
|
|
20224
|
-
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
20225
|
-
}
|
|
20226
|
-
}
|
|
20227
|
-
if (!isSameTag) {
|
|
20228
|
-
return false;
|
|
20229
|
-
}
|
|
20230
|
-
stack || (stack = new _Stack);
|
|
20231
|
-
return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
20232
|
-
}
|
|
20233
|
-
|
|
20234
|
-
var _baseIsEqualDeep = baseIsEqualDeep;
|
|
20235
|
-
|
|
20236
|
-
/**
|
|
20237
|
-
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
20238
|
-
* and tracks traversed objects.
|
|
20239
|
-
*
|
|
20240
|
-
* @private
|
|
20241
|
-
* @param {*} value The value to compare.
|
|
20242
|
-
* @param {*} other The other value to compare.
|
|
20243
|
-
* @param {boolean} bitmask The bitmask flags.
|
|
20244
|
-
* 1 - Unordered comparison
|
|
20245
|
-
* 2 - Partial comparison
|
|
20246
|
-
* @param {Function} [customizer] The function to customize comparisons.
|
|
20247
|
-
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
20248
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
20249
|
-
*/
|
|
20250
|
-
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
20251
|
-
if (value === other) {
|
|
20252
|
-
return true;
|
|
20253
|
-
}
|
|
20254
|
-
if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {
|
|
20255
|
-
return value !== value && other !== other;
|
|
20256
|
-
}
|
|
20257
|
-
return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
20258
|
-
}
|
|
20259
|
-
|
|
20260
|
-
var _baseIsEqual = baseIsEqual;
|
|
20261
|
-
|
|
20262
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
20263
|
-
var COMPARE_PARTIAL_FLAG$4 = 1,
|
|
20264
|
-
COMPARE_UNORDERED_FLAG$2 = 2;
|
|
20265
|
-
|
|
20266
|
-
/**
|
|
20267
|
-
* The base implementation of `_.isMatch` without support for iteratee shorthands.
|
|
20268
|
-
*
|
|
20269
|
-
* @private
|
|
20270
|
-
* @param {Object} object The object to inspect.
|
|
20271
|
-
* @param {Object} source The object of property values to match.
|
|
20272
|
-
* @param {Array} matchData The property names, values, and compare flags to match.
|
|
20273
|
-
* @param {Function} [customizer] The function to customize comparisons.
|
|
20274
|
-
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
20275
|
-
*/
|
|
20276
|
-
function baseIsMatch(object, source, matchData, customizer) {
|
|
20277
|
-
var index = matchData.length,
|
|
20278
|
-
length = index,
|
|
20279
|
-
noCustomizer = !customizer;
|
|
20280
|
-
|
|
20281
|
-
if (object == null) {
|
|
20282
|
-
return !length;
|
|
20283
|
-
}
|
|
20284
|
-
object = Object(object);
|
|
20285
|
-
while (index--) {
|
|
20286
|
-
var data = matchData[index];
|
|
20287
|
-
if ((noCustomizer && data[2])
|
|
20288
|
-
? data[1] !== object[data[0]]
|
|
20289
|
-
: !(data[0] in object)
|
|
20290
|
-
) {
|
|
20291
|
-
return false;
|
|
20292
|
-
}
|
|
20293
|
-
}
|
|
20294
|
-
while (++index < length) {
|
|
20295
|
-
data = matchData[index];
|
|
20296
|
-
var key = data[0],
|
|
20297
|
-
objValue = object[key],
|
|
20298
|
-
srcValue = data[1];
|
|
20299
|
-
|
|
20300
|
-
if (noCustomizer && data[2]) {
|
|
20301
|
-
if (objValue === undefined && !(key in object)) {
|
|
20302
|
-
return false;
|
|
20303
|
-
}
|
|
20304
|
-
} else {
|
|
20305
|
-
var stack = new _Stack;
|
|
20306
|
-
if (customizer) {
|
|
20307
|
-
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
20308
|
-
}
|
|
20309
|
-
if (!(result === undefined
|
|
20310
|
-
? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$4 | COMPARE_UNORDERED_FLAG$2, customizer, stack)
|
|
20311
|
-
: result
|
|
20312
|
-
)) {
|
|
20313
|
-
return false;
|
|
20314
|
-
}
|
|
20315
|
-
}
|
|
20316
|
-
}
|
|
20317
|
-
return true;
|
|
20318
|
-
}
|
|
20319
|
-
|
|
20320
|
-
var _baseIsMatch = baseIsMatch;
|
|
20321
|
-
|
|
20322
|
-
/**
|
|
20323
|
-
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
|
20324
|
-
*
|
|
20325
|
-
* @private
|
|
20326
|
-
* @param {*} value The value to check.
|
|
20327
|
-
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
|
20328
|
-
* equality comparisons, else `false`.
|
|
20329
|
-
*/
|
|
20330
|
-
function isStrictComparable(value) {
|
|
20331
|
-
return value === value && !isObject_1(value);
|
|
20332
|
-
}
|
|
20333
|
-
|
|
20334
|
-
var _isStrictComparable = isStrictComparable;
|
|
20335
|
-
|
|
20336
|
-
/**
|
|
20337
|
-
* Gets the property names, values, and compare flags of `object`.
|
|
20338
|
-
*
|
|
20339
|
-
* @private
|
|
20340
|
-
* @param {Object} object The object to query.
|
|
20341
|
-
* @returns {Array} Returns the match data of `object`.
|
|
20342
|
-
*/
|
|
20343
|
-
function getMatchData(object) {
|
|
20344
|
-
var result = keys_1(object),
|
|
20345
|
-
length = result.length;
|
|
20346
|
-
|
|
20347
|
-
while (length--) {
|
|
20348
|
-
var key = result[length],
|
|
20349
|
-
value = object[key];
|
|
20350
|
-
|
|
20351
|
-
result[length] = [key, value, _isStrictComparable(value)];
|
|
20352
|
-
}
|
|
20353
|
-
return result;
|
|
20354
|
-
}
|
|
20355
|
-
|
|
20356
|
-
var _getMatchData = getMatchData;
|
|
20357
|
-
|
|
20358
|
-
/**
|
|
20359
|
-
* A specialized version of `matchesProperty` for source values suitable
|
|
20360
|
-
* for strict equality comparisons, i.e. `===`.
|
|
20361
|
-
*
|
|
20362
|
-
* @private
|
|
20363
|
-
* @param {string} key The key of the property to get.
|
|
20364
|
-
* @param {*} srcValue The value to match.
|
|
20365
|
-
* @returns {Function} Returns the new spec function.
|
|
20366
|
-
*/
|
|
20367
|
-
function matchesStrictComparable(key, srcValue) {
|
|
20368
|
-
return function(object) {
|
|
20369
|
-
if (object == null) {
|
|
20370
|
-
return false;
|
|
20371
|
-
}
|
|
20372
|
-
return object[key] === srcValue &&
|
|
20373
|
-
(srcValue !== undefined || (key in Object(object)));
|
|
20374
|
-
};
|
|
20375
|
-
}
|
|
20376
|
-
|
|
20377
|
-
var _matchesStrictComparable = matchesStrictComparable;
|
|
20378
|
-
|
|
20379
|
-
/**
|
|
20380
|
-
* The base implementation of `_.matches` which doesn't clone `source`.
|
|
20381
|
-
*
|
|
20382
|
-
* @private
|
|
20383
|
-
* @param {Object} source The object of property values to match.
|
|
20384
|
-
* @returns {Function} Returns the new spec function.
|
|
20385
|
-
*/
|
|
20386
|
-
function baseMatches(source) {
|
|
20387
|
-
var matchData = _getMatchData(source);
|
|
20388
|
-
if (matchData.length == 1 && matchData[0][2]) {
|
|
20389
|
-
return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
20390
|
-
}
|
|
20391
|
-
return function(object) {
|
|
20392
|
-
return object === source || _baseIsMatch(object, source, matchData);
|
|
20393
|
-
};
|
|
20394
|
-
}
|
|
20395
|
-
|
|
20396
|
-
var _baseMatches = baseMatches;
|
|
20397
|
-
|
|
20398
|
-
/**
|
|
20399
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
20400
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
20401
|
-
*
|
|
20402
|
-
* @static
|
|
20403
|
-
* @memberOf _
|
|
20404
|
-
* @since 3.7.0
|
|
20405
|
-
* @category Object
|
|
20406
|
-
* @param {Object} object The object to query.
|
|
20407
|
-
* @param {Array|string} path The path of the property to get.
|
|
20408
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
20409
|
-
* @returns {*} Returns the resolved value.
|
|
20410
|
-
* @example
|
|
20411
|
-
*
|
|
20412
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
20413
|
-
*
|
|
20414
|
-
* _.get(object, 'a[0].b.c');
|
|
20415
|
-
* // => 3
|
|
20416
|
-
*
|
|
20417
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
20418
|
-
* // => 3
|
|
20419
|
-
*
|
|
20420
|
-
* _.get(object, 'a.b.c', 'default');
|
|
20421
|
-
* // => 'default'
|
|
20422
|
-
*/
|
|
20423
|
-
function get$r(object, path, defaultValue) {
|
|
20424
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
20425
|
-
return result === undefined ? defaultValue : result;
|
|
20426
|
-
}
|
|
20427
|
-
|
|
20428
|
-
var get_1 = get$r;
|
|
20429
|
-
|
|
20430
|
-
/**
|
|
20431
|
-
* The base implementation of `_.hasIn` without support for deep paths.
|
|
20432
|
-
*
|
|
20433
|
-
* @private
|
|
20434
|
-
* @param {Object} [object] The object to query.
|
|
20435
|
-
* @param {Array|string} key The key to check.
|
|
20436
|
-
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
20437
|
-
*/
|
|
20438
|
-
function baseHasIn(object, key) {
|
|
20439
|
-
return object != null && key in Object(object);
|
|
20440
|
-
}
|
|
20441
|
-
|
|
20442
|
-
var _baseHasIn = baseHasIn;
|
|
20443
|
-
|
|
20444
|
-
/**
|
|
20445
|
-
* Checks if `path` exists on `object`.
|
|
20446
|
-
*
|
|
20447
|
-
* @private
|
|
20448
|
-
* @param {Object} object The object to query.
|
|
20449
|
-
* @param {Array|string} path The path to check.
|
|
20450
|
-
* @param {Function} hasFunc The function to check properties.
|
|
20451
|
-
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
20452
|
-
*/
|
|
20453
|
-
function hasPath(object, path, hasFunc) {
|
|
20454
|
-
path = _castPath(path, object);
|
|
20455
|
-
|
|
20456
|
-
var index = -1,
|
|
20457
|
-
length = path.length,
|
|
20458
|
-
result = false;
|
|
20459
|
-
|
|
20460
|
-
while (++index < length) {
|
|
20461
|
-
var key = _toKey(path[index]);
|
|
20462
|
-
if (!(result = object != null && hasFunc(object, key))) {
|
|
20463
|
-
break;
|
|
20464
|
-
}
|
|
20465
|
-
object = object[key];
|
|
20466
|
-
}
|
|
20467
|
-
if (result || ++index != length) {
|
|
20468
|
-
return result;
|
|
20469
|
-
}
|
|
20470
|
-
length = object == null ? 0 : object.length;
|
|
20471
|
-
return !!length && isLength_1(length) && _isIndex(key, length) &&
|
|
20472
|
-
(isArray_1(object) || isArguments_1(object));
|
|
20473
|
-
}
|
|
20474
|
-
|
|
20475
|
-
var _hasPath = hasPath;
|
|
20476
|
-
|
|
20477
|
-
/**
|
|
20478
|
-
* Checks if `path` is a direct or inherited property of `object`.
|
|
20479
|
-
*
|
|
20480
|
-
* @static
|
|
20481
|
-
* @memberOf _
|
|
20482
|
-
* @since 4.0.0
|
|
20483
|
-
* @category Object
|
|
20484
|
-
* @param {Object} object The object to query.
|
|
20485
|
-
* @param {Array|string} path The path to check.
|
|
20486
|
-
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
20487
|
-
* @example
|
|
20488
|
-
*
|
|
20489
|
-
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
20490
|
-
*
|
|
20491
|
-
* _.hasIn(object, 'a');
|
|
20492
|
-
* // => true
|
|
20493
|
-
*
|
|
20494
|
-
* _.hasIn(object, 'a.b');
|
|
20495
|
-
* // => true
|
|
20496
|
-
*
|
|
20497
|
-
* _.hasIn(object, ['a', 'b']);
|
|
20498
|
-
* // => true
|
|
20499
|
-
*
|
|
20500
|
-
* _.hasIn(object, 'b');
|
|
20501
|
-
* // => false
|
|
20502
|
-
*/
|
|
20503
|
-
function hasIn(object, path) {
|
|
20504
|
-
return object != null && _hasPath(object, path, _baseHasIn);
|
|
20505
|
-
}
|
|
20506
|
-
|
|
20507
|
-
var hasIn_1 = hasIn;
|
|
20508
|
-
|
|
20509
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
20510
|
-
var COMPARE_PARTIAL_FLAG$5 = 1,
|
|
20511
|
-
COMPARE_UNORDERED_FLAG$3 = 2;
|
|
20512
|
-
|
|
20513
|
-
/**
|
|
20514
|
-
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
|
20515
|
-
*
|
|
20516
|
-
* @private
|
|
20517
|
-
* @param {string} path The path of the property to get.
|
|
20518
|
-
* @param {*} srcValue The value to match.
|
|
20519
|
-
* @returns {Function} Returns the new spec function.
|
|
20520
|
-
*/
|
|
20521
|
-
function baseMatchesProperty(path, srcValue) {
|
|
20522
|
-
if (_isKey(path) && _isStrictComparable(srcValue)) {
|
|
20523
|
-
return _matchesStrictComparable(_toKey(path), srcValue);
|
|
20524
|
-
}
|
|
20525
|
-
return function(object) {
|
|
20526
|
-
var objValue = get_1(object, path);
|
|
20527
|
-
return (objValue === undefined && objValue === srcValue)
|
|
20528
|
-
? hasIn_1(object, path)
|
|
20529
|
-
: _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$5 | COMPARE_UNORDERED_FLAG$3);
|
|
20530
|
-
};
|
|
20531
|
-
}
|
|
20532
|
-
|
|
20533
|
-
var _baseMatchesProperty = baseMatchesProperty;
|
|
20534
|
-
|
|
20535
|
-
/**
|
|
20536
|
-
* This method returns the first argument it receives.
|
|
20537
|
-
*
|
|
20538
|
-
* @static
|
|
20539
|
-
* @since 0.1.0
|
|
20540
|
-
* @memberOf _
|
|
20541
|
-
* @category Util
|
|
20542
|
-
* @param {*} value Any value.
|
|
20543
|
-
* @returns {*} Returns `value`.
|
|
20544
|
-
* @example
|
|
20545
|
-
*
|
|
20546
|
-
* var object = { 'a': 1 };
|
|
20547
|
-
*
|
|
20548
|
-
* console.log(_.identity(object) === object);
|
|
20549
|
-
* // => true
|
|
20550
|
-
*/
|
|
20551
|
-
function identity(value) {
|
|
20552
|
-
return value;
|
|
20553
|
-
}
|
|
20554
|
-
|
|
20555
|
-
var identity_1 = identity;
|
|
20556
|
-
|
|
20557
|
-
/**
|
|
20558
|
-
* The base implementation of `_.property` without support for deep paths.
|
|
20559
|
-
*
|
|
20560
|
-
* @private
|
|
20561
|
-
* @param {string} key The key of the property to get.
|
|
20562
|
-
* @returns {Function} Returns the new accessor function.
|
|
20563
|
-
*/
|
|
20564
|
-
function baseProperty(key) {
|
|
20565
|
-
return function(object) {
|
|
20566
|
-
return object == null ? undefined : object[key];
|
|
20567
|
-
};
|
|
20568
|
-
}
|
|
20569
|
-
|
|
20570
|
-
var _baseProperty = baseProperty;
|
|
20571
|
-
|
|
20572
|
-
/**
|
|
20573
|
-
* A specialized version of `baseProperty` which supports deep paths.
|
|
20574
|
-
*
|
|
20575
|
-
* @private
|
|
20576
|
-
* @param {Array|string} path The path of the property to get.
|
|
20577
|
-
* @returns {Function} Returns the new accessor function.
|
|
20578
|
-
*/
|
|
20579
|
-
function basePropertyDeep(path) {
|
|
20580
|
-
return function(object) {
|
|
20581
|
-
return _baseGet(object, path);
|
|
20582
|
-
};
|
|
20583
|
-
}
|
|
20584
|
-
|
|
20585
|
-
var _basePropertyDeep = basePropertyDeep;
|
|
20586
|
-
|
|
20587
|
-
/**
|
|
20588
|
-
* Creates a function that returns the value at `path` of a given object.
|
|
20589
|
-
*
|
|
20590
|
-
* @static
|
|
20591
|
-
* @memberOf _
|
|
20592
|
-
* @since 2.4.0
|
|
20593
|
-
* @category Util
|
|
20594
|
-
* @param {Array|string} path The path of the property to get.
|
|
20595
|
-
* @returns {Function} Returns the new accessor function.
|
|
20596
|
-
* @example
|
|
20597
|
-
*
|
|
20598
|
-
* var objects = [
|
|
20599
|
-
* { 'a': { 'b': 2 } },
|
|
20600
|
-
* { 'a': { 'b': 1 } }
|
|
20601
|
-
* ];
|
|
20602
|
-
*
|
|
20603
|
-
* _.map(objects, _.property('a.b'));
|
|
20604
|
-
* // => [2, 1]
|
|
20605
|
-
*
|
|
20606
|
-
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
|
|
20607
|
-
* // => [1, 2]
|
|
20608
|
-
*/
|
|
20609
|
-
function property(path) {
|
|
20610
|
-
return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
|
|
20611
|
-
}
|
|
20612
|
-
|
|
20613
|
-
var property_1 = property;
|
|
20614
|
-
|
|
20615
|
-
/**
|
|
20616
|
-
* The base implementation of `_.iteratee`.
|
|
20617
|
-
*
|
|
20618
|
-
* @private
|
|
20619
|
-
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
20620
|
-
* @returns {Function} Returns the iteratee.
|
|
20621
|
-
*/
|
|
20622
|
-
function baseIteratee(value) {
|
|
20623
|
-
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
|
20624
|
-
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
|
20625
|
-
if (typeof value == 'function') {
|
|
20626
|
-
return value;
|
|
20627
|
-
}
|
|
20628
|
-
if (value == null) {
|
|
20629
|
-
return identity_1;
|
|
20630
|
-
}
|
|
20631
|
-
if (typeof value == 'object') {
|
|
20632
|
-
return isArray_1(value)
|
|
20633
|
-
? _baseMatchesProperty(value[0], value[1])
|
|
20634
|
-
: _baseMatches(value);
|
|
20635
|
-
}
|
|
20636
|
-
return property_1(value);
|
|
20637
|
-
}
|
|
20638
|
-
|
|
20639
|
-
var _baseIteratee = baseIteratee;
|
|
20640
|
-
|
|
20641
|
-
/**
|
|
20642
|
-
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
20643
|
-
*
|
|
20644
|
-
* @private
|
|
20645
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
20646
|
-
* @returns {Function} Returns the new base function.
|
|
20647
|
-
*/
|
|
20648
|
-
function createBaseFor(fromRight) {
|
|
20649
|
-
return function(object, iteratee, keysFunc) {
|
|
20650
|
-
var index = -1,
|
|
20651
|
-
iterable = Object(object),
|
|
20652
|
-
props = keysFunc(object),
|
|
20653
|
-
length = props.length;
|
|
20654
|
-
|
|
20655
|
-
while (length--) {
|
|
20656
|
-
var key = props[fromRight ? length : ++index];
|
|
20657
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
20658
|
-
break;
|
|
20659
|
-
}
|
|
20660
|
-
}
|
|
20661
|
-
return object;
|
|
20662
|
-
};
|
|
20663
|
-
}
|
|
20664
|
-
|
|
20665
|
-
var _createBaseFor = createBaseFor;
|
|
20666
|
-
|
|
20667
|
-
/**
|
|
20668
|
-
* The base implementation of `baseForOwn` which iterates over `object`
|
|
20669
|
-
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
20670
|
-
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
20671
|
-
*
|
|
20672
|
-
* @private
|
|
20673
|
-
* @param {Object} object The object to iterate over.
|
|
20674
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
20675
|
-
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
20676
|
-
* @returns {Object} Returns `object`.
|
|
20677
|
-
*/
|
|
20678
|
-
var baseFor = _createBaseFor();
|
|
20679
|
-
|
|
20680
|
-
var _baseFor = baseFor;
|
|
20681
|
-
|
|
20682
|
-
/**
|
|
20683
|
-
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
20684
|
-
*
|
|
20685
|
-
* @private
|
|
20686
|
-
* @param {Object} object The object to iterate over.
|
|
20687
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
20688
|
-
* @returns {Object} Returns `object`.
|
|
20689
|
-
*/
|
|
20690
|
-
function baseForOwn(object, iteratee) {
|
|
20691
|
-
return object && _baseFor(object, iteratee, keys_1);
|
|
20692
|
-
}
|
|
20693
|
-
|
|
20694
|
-
var _baseForOwn = baseForOwn;
|
|
20695
|
-
|
|
20696
|
-
/**
|
|
20697
|
-
* Creates a `baseEach` or `baseEachRight` function.
|
|
20698
|
-
*
|
|
20699
|
-
* @private
|
|
20700
|
-
* @param {Function} eachFunc The function to iterate over a collection.
|
|
20701
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
20702
|
-
* @returns {Function} Returns the new base function.
|
|
20703
|
-
*/
|
|
20704
|
-
function createBaseEach(eachFunc, fromRight) {
|
|
20705
|
-
return function(collection, iteratee) {
|
|
20706
|
-
if (collection == null) {
|
|
20707
|
-
return collection;
|
|
20708
|
-
}
|
|
20709
|
-
if (!isArrayLike_1(collection)) {
|
|
20710
|
-
return eachFunc(collection, iteratee);
|
|
20711
|
-
}
|
|
20712
|
-
var length = collection.length,
|
|
20713
|
-
index = fromRight ? length : -1,
|
|
20714
|
-
iterable = Object(collection);
|
|
20715
|
-
|
|
20716
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
20717
|
-
if (iteratee(iterable[index], index, iterable) === false) {
|
|
20718
|
-
break;
|
|
20719
|
-
}
|
|
20720
|
-
}
|
|
20721
|
-
return collection;
|
|
20722
|
-
};
|
|
20723
|
-
}
|
|
20724
|
-
|
|
20725
|
-
var _createBaseEach = createBaseEach;
|
|
20726
|
-
|
|
20727
|
-
/**
|
|
20728
|
-
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
|
20729
|
-
*
|
|
20730
|
-
* @private
|
|
20731
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
20732
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
20733
|
-
* @returns {Array|Object} Returns `collection`.
|
|
20734
|
-
*/
|
|
20735
|
-
var baseEach = _createBaseEach(_baseForOwn);
|
|
20736
|
-
|
|
20737
|
-
var _baseEach = baseEach;
|
|
20738
|
-
|
|
20739
|
-
/**
|
|
20740
|
-
* The base implementation of `_.map` without support for iteratee shorthands.
|
|
20741
|
-
*
|
|
20742
|
-
* @private
|
|
20743
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
20744
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
20745
|
-
* @returns {Array} Returns the new mapped array.
|
|
20746
|
-
*/
|
|
20747
|
-
function baseMap(collection, iteratee) {
|
|
20748
|
-
var index = -1,
|
|
20749
|
-
result = isArrayLike_1(collection) ? Array(collection.length) : [];
|
|
20750
|
-
|
|
20751
|
-
_baseEach(collection, function(value, key, collection) {
|
|
20752
|
-
result[++index] = iteratee(value, key, collection);
|
|
20753
|
-
});
|
|
20754
|
-
return result;
|
|
20755
|
-
}
|
|
20756
|
-
|
|
20757
|
-
var _baseMap = baseMap;
|
|
20758
|
-
|
|
20759
|
-
/**
|
|
20760
|
-
* The base implementation of `_.sortBy` which uses `comparer` to define the
|
|
20761
|
-
* sort order of `array` and replaces criteria objects with their corresponding
|
|
20762
|
-
* values.
|
|
20763
|
-
*
|
|
20764
|
-
* @private
|
|
20765
|
-
* @param {Array} array The array to sort.
|
|
20766
|
-
* @param {Function} comparer The function to define sort order.
|
|
20767
|
-
* @returns {Array} Returns `array`.
|
|
20768
|
-
*/
|
|
20769
|
-
function baseSortBy(array, comparer) {
|
|
20770
|
-
var length = array.length;
|
|
20771
|
-
|
|
20772
|
-
array.sort(comparer);
|
|
20773
|
-
while (length--) {
|
|
20774
|
-
array[length] = array[length].value;
|
|
20775
|
-
}
|
|
20776
|
-
return array;
|
|
20777
|
-
}
|
|
20778
|
-
|
|
20779
|
-
var _baseSortBy = baseSortBy;
|
|
20780
|
-
|
|
20781
|
-
/**
|
|
20782
|
-
* Compares values to sort them in ascending order.
|
|
20783
|
-
*
|
|
20784
|
-
* @private
|
|
20785
|
-
* @param {*} value The value to compare.
|
|
20786
|
-
* @param {*} other The other value to compare.
|
|
20787
|
-
* @returns {number} Returns the sort order indicator for `value`.
|
|
20788
|
-
*/
|
|
20789
|
-
function compareAscending(value, other) {
|
|
20790
|
-
if (value !== other) {
|
|
20791
|
-
var valIsDefined = value !== undefined,
|
|
20792
|
-
valIsNull = value === null,
|
|
20793
|
-
valIsReflexive = value === value,
|
|
20794
|
-
valIsSymbol = isSymbol_1(value);
|
|
20795
|
-
|
|
20796
|
-
var othIsDefined = other !== undefined,
|
|
20797
|
-
othIsNull = other === null,
|
|
20798
|
-
othIsReflexive = other === other,
|
|
20799
|
-
othIsSymbol = isSymbol_1(other);
|
|
20800
|
-
|
|
20801
|
-
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
|
|
20802
|
-
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
|
|
20803
|
-
(valIsNull && othIsDefined && othIsReflexive) ||
|
|
20804
|
-
(!valIsDefined && othIsReflexive) ||
|
|
20805
|
-
!valIsReflexive) {
|
|
20806
|
-
return 1;
|
|
20807
|
-
}
|
|
20808
|
-
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
|
|
20809
|
-
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
|
|
20810
|
-
(othIsNull && valIsDefined && valIsReflexive) ||
|
|
20811
|
-
(!othIsDefined && valIsReflexive) ||
|
|
20812
|
-
!othIsReflexive) {
|
|
20813
|
-
return -1;
|
|
20814
|
-
}
|
|
20815
|
-
}
|
|
20816
|
-
return 0;
|
|
20817
|
-
}
|
|
20818
|
-
|
|
20819
|
-
var _compareAscending = compareAscending;
|
|
20820
|
-
|
|
20821
|
-
/**
|
|
20822
|
-
* Used by `_.orderBy` to compare multiple properties of a value to another
|
|
20823
|
-
* and stable sort them.
|
|
20824
|
-
*
|
|
20825
|
-
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
|
|
20826
|
-
* specify an order of "desc" for descending or "asc" for ascending sort order
|
|
20827
|
-
* of corresponding values.
|
|
20828
|
-
*
|
|
20829
|
-
* @private
|
|
20830
|
-
* @param {Object} object The object to compare.
|
|
20831
|
-
* @param {Object} other The other object to compare.
|
|
20832
|
-
* @param {boolean[]|string[]} orders The order to sort by for each property.
|
|
20833
|
-
* @returns {number} Returns the sort order indicator for `object`.
|
|
20834
|
-
*/
|
|
20835
|
-
function compareMultiple(object, other, orders) {
|
|
20836
|
-
var index = -1,
|
|
20837
|
-
objCriteria = object.criteria,
|
|
20838
|
-
othCriteria = other.criteria,
|
|
20839
|
-
length = objCriteria.length,
|
|
20840
|
-
ordersLength = orders.length;
|
|
20841
|
-
|
|
20842
|
-
while (++index < length) {
|
|
20843
|
-
var result = _compareAscending(objCriteria[index], othCriteria[index]);
|
|
20844
|
-
if (result) {
|
|
20845
|
-
if (index >= ordersLength) {
|
|
20846
|
-
return result;
|
|
20847
|
-
}
|
|
20848
|
-
var order = orders[index];
|
|
20849
|
-
return result * (order == 'desc' ? -1 : 1);
|
|
20850
|
-
}
|
|
20851
|
-
}
|
|
20852
|
-
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
|
|
20853
|
-
// that causes it, under certain circumstances, to provide the same value for
|
|
20854
|
-
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
|
|
20855
|
-
// for more details.
|
|
20856
|
-
//
|
|
20857
|
-
// This also ensures a stable sort in V8 and other engines.
|
|
20858
|
-
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
|
|
20859
|
-
return object.index - other.index;
|
|
20860
|
-
}
|
|
20861
|
-
|
|
20862
|
-
var _compareMultiple = compareMultiple;
|
|
20863
|
-
|
|
20864
|
-
/**
|
|
20865
|
-
* The base implementation of `_.orderBy` without param guards.
|
|
20866
|
-
*
|
|
20867
|
-
* @private
|
|
20868
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
20869
|
-
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
|
|
20870
|
-
* @param {string[]} orders The sort orders of `iteratees`.
|
|
20871
|
-
* @returns {Array} Returns the new sorted array.
|
|
20872
|
-
*/
|
|
20873
|
-
function baseOrderBy(collection, iteratees, orders) {
|
|
20874
|
-
if (iteratees.length) {
|
|
20875
|
-
iteratees = _arrayMap(iteratees, function(iteratee) {
|
|
20876
|
-
if (isArray_1(iteratee)) {
|
|
20877
|
-
return function(value) {
|
|
20878
|
-
return _baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
20879
|
-
}
|
|
20880
|
-
}
|
|
20881
|
-
return iteratee;
|
|
20882
|
-
});
|
|
20883
|
-
} else {
|
|
20884
|
-
iteratees = [identity_1];
|
|
20885
|
-
}
|
|
20886
|
-
|
|
20887
|
-
var index = -1;
|
|
20888
|
-
iteratees = _arrayMap(iteratees, _baseUnary(_baseIteratee));
|
|
20889
|
-
|
|
20890
|
-
var result = _baseMap(collection, function(value, key, collection) {
|
|
20891
|
-
var criteria = _arrayMap(iteratees, function(iteratee) {
|
|
20892
|
-
return iteratee(value);
|
|
20893
|
-
});
|
|
20894
|
-
return { 'criteria': criteria, 'index': ++index, 'value': value };
|
|
20895
|
-
});
|
|
20896
|
-
|
|
20897
|
-
return _baseSortBy(result, function(object, other) {
|
|
20898
|
-
return _compareMultiple(object, other, orders);
|
|
20899
|
-
});
|
|
20900
|
-
}
|
|
20901
|
-
|
|
20902
|
-
var _baseOrderBy = baseOrderBy;
|
|
20903
|
-
|
|
20904
|
-
/**
|
|
20905
|
-
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
20906
|
-
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
20907
|
-
*
|
|
20908
|
-
* @private
|
|
20909
|
-
* @param {Function} func The function to invoke.
|
|
20910
|
-
* @param {*} thisArg The `this` binding of `func`.
|
|
20911
|
-
* @param {Array} args The arguments to invoke `func` with.
|
|
20912
|
-
* @returns {*} Returns the result of `func`.
|
|
20913
|
-
*/
|
|
20914
|
-
function apply(func, thisArg, args) {
|
|
20915
|
-
switch (args.length) {
|
|
20916
|
-
case 0: return func.call(thisArg);
|
|
20917
|
-
case 1: return func.call(thisArg, args[0]);
|
|
20918
|
-
case 2: return func.call(thisArg, args[0], args[1]);
|
|
20919
|
-
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
20920
|
-
}
|
|
20921
|
-
return func.apply(thisArg, args);
|
|
20922
|
-
}
|
|
20923
|
-
|
|
20924
|
-
var _apply = apply;
|
|
20925
|
-
|
|
20926
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
20927
|
-
var nativeMax = Math.max;
|
|
20928
|
-
|
|
20929
|
-
/**
|
|
20930
|
-
* A specialized version of `baseRest` which transforms the rest array.
|
|
20931
|
-
*
|
|
20932
|
-
* @private
|
|
20933
|
-
* @param {Function} func The function to apply a rest parameter to.
|
|
20934
|
-
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
20935
|
-
* @param {Function} transform The rest array transform.
|
|
20936
|
-
* @returns {Function} Returns the new function.
|
|
20937
|
-
*/
|
|
20938
|
-
function overRest(func, start, transform) {
|
|
20939
|
-
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
20940
|
-
return function() {
|
|
20941
|
-
var args = arguments,
|
|
20942
|
-
index = -1,
|
|
20943
|
-
length = nativeMax(args.length - start, 0),
|
|
20944
|
-
array = Array(length);
|
|
20945
|
-
|
|
20946
|
-
while (++index < length) {
|
|
20947
|
-
array[index] = args[start + index];
|
|
20948
|
-
}
|
|
20949
|
-
index = -1;
|
|
20950
|
-
var otherArgs = Array(start + 1);
|
|
20951
|
-
while (++index < start) {
|
|
20952
|
-
otherArgs[index] = args[index];
|
|
20953
|
-
}
|
|
20954
|
-
otherArgs[start] = transform(array);
|
|
20955
|
-
return _apply(func, this, otherArgs);
|
|
20956
|
-
};
|
|
20957
|
-
}
|
|
20958
|
-
|
|
20959
|
-
var _overRest = overRest;
|
|
20960
|
-
|
|
20961
|
-
/**
|
|
20962
|
-
* Creates a function that returns `value`.
|
|
20963
|
-
*
|
|
20964
|
-
* @static
|
|
20965
|
-
* @memberOf _
|
|
20966
|
-
* @since 2.4.0
|
|
20967
|
-
* @category Util
|
|
20968
|
-
* @param {*} value The value to return from the new function.
|
|
20969
|
-
* @returns {Function} Returns the new constant function.
|
|
20970
|
-
* @example
|
|
20971
|
-
*
|
|
20972
|
-
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
20973
|
-
*
|
|
20974
|
-
* console.log(objects);
|
|
20975
|
-
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
20976
|
-
*
|
|
20977
|
-
* console.log(objects[0] === objects[1]);
|
|
20978
|
-
* // => true
|
|
20979
|
-
*/
|
|
20980
|
-
function constant(value) {
|
|
20981
|
-
return function() {
|
|
20982
|
-
return value;
|
|
20983
|
-
};
|
|
20984
|
-
}
|
|
20985
|
-
|
|
20986
|
-
var constant_1 = constant;
|
|
20987
|
-
|
|
20988
|
-
var defineProperty = (function() {
|
|
20989
|
-
try {
|
|
20990
|
-
var func = _getNative(Object, 'defineProperty');
|
|
20991
|
-
func({}, '', {});
|
|
20992
|
-
return func;
|
|
20993
|
-
} catch (e) {}
|
|
20994
|
-
}());
|
|
20995
|
-
|
|
20996
|
-
var _defineProperty = defineProperty;
|
|
20997
|
-
|
|
20998
|
-
/**
|
|
20999
|
-
* The base implementation of `setToString` without support for hot loop shorting.
|
|
21000
|
-
*
|
|
21001
|
-
* @private
|
|
21002
|
-
* @param {Function} func The function to modify.
|
|
21003
|
-
* @param {Function} string The `toString` result.
|
|
21004
|
-
* @returns {Function} Returns `func`.
|
|
21005
|
-
*/
|
|
21006
|
-
var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
|
|
21007
|
-
return _defineProperty(func, 'toString', {
|
|
21008
|
-
'configurable': true,
|
|
21009
|
-
'enumerable': false,
|
|
21010
|
-
'value': constant_1(string),
|
|
21011
|
-
'writable': true
|
|
21012
|
-
});
|
|
21013
|
-
};
|
|
21014
|
-
|
|
21015
|
-
var _baseSetToString = baseSetToString;
|
|
21016
|
-
|
|
21017
|
-
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
21018
|
-
var HOT_COUNT = 800,
|
|
21019
|
-
HOT_SPAN = 16;
|
|
21020
|
-
|
|
21021
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
21022
|
-
var nativeNow = Date.now;
|
|
21023
|
-
|
|
21024
|
-
/**
|
|
21025
|
-
* Creates a function that'll short out and invoke `identity` instead
|
|
21026
|
-
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
21027
|
-
* milliseconds.
|
|
21028
|
-
*
|
|
21029
|
-
* @private
|
|
21030
|
-
* @param {Function} func The function to restrict.
|
|
21031
|
-
* @returns {Function} Returns the new shortable function.
|
|
21032
|
-
*/
|
|
21033
|
-
function shortOut(func) {
|
|
21034
|
-
var count = 0,
|
|
21035
|
-
lastCalled = 0;
|
|
21036
|
-
|
|
21037
|
-
return function() {
|
|
21038
|
-
var stamp = nativeNow(),
|
|
21039
|
-
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
21040
|
-
|
|
21041
|
-
lastCalled = stamp;
|
|
21042
|
-
if (remaining > 0) {
|
|
21043
|
-
if (++count >= HOT_COUNT) {
|
|
21044
|
-
return arguments[0];
|
|
21045
|
-
}
|
|
21046
|
-
} else {
|
|
21047
|
-
count = 0;
|
|
21048
|
-
}
|
|
21049
|
-
return func.apply(undefined, arguments);
|
|
21050
|
-
};
|
|
21051
|
-
}
|
|
21052
|
-
|
|
21053
|
-
var _shortOut = shortOut;
|
|
21054
|
-
|
|
21055
|
-
/**
|
|
21056
|
-
* Sets the `toString` method of `func` to return `string`.
|
|
21057
|
-
*
|
|
21058
|
-
* @private
|
|
21059
|
-
* @param {Function} func The function to modify.
|
|
21060
|
-
* @param {Function} string The `toString` result.
|
|
21061
|
-
* @returns {Function} Returns `func`.
|
|
21062
|
-
*/
|
|
21063
|
-
var setToString = _shortOut(_baseSetToString);
|
|
21064
|
-
|
|
21065
|
-
var _setToString = setToString;
|
|
21066
|
-
|
|
21067
|
-
/**
|
|
21068
|
-
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
21069
|
-
*
|
|
21070
|
-
* @private
|
|
21071
|
-
* @param {Function} func The function to apply a rest parameter to.
|
|
21072
|
-
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
21073
|
-
* @returns {Function} Returns the new function.
|
|
21074
|
-
*/
|
|
21075
|
-
function baseRest(func, start) {
|
|
21076
|
-
return _setToString(_overRest(func, start, identity_1), func + '');
|
|
21077
|
-
}
|
|
21078
|
-
|
|
21079
|
-
var _baseRest = baseRest;
|
|
21080
|
-
|
|
21081
|
-
/**
|
|
21082
|
-
* Checks if the given arguments are from an iteratee call.
|
|
21083
|
-
*
|
|
21084
|
-
* @private
|
|
21085
|
-
* @param {*} value The potential iteratee value argument.
|
|
21086
|
-
* @param {*} index The potential iteratee index or key argument.
|
|
21087
|
-
* @param {*} object The potential iteratee object argument.
|
|
21088
|
-
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
21089
|
-
* else `false`.
|
|
21090
|
-
*/
|
|
21091
|
-
function isIterateeCall(value, index, object) {
|
|
21092
|
-
if (!isObject_1(object)) {
|
|
21093
|
-
return false;
|
|
21094
|
-
}
|
|
21095
|
-
var type = typeof index;
|
|
21096
|
-
if (type == 'number'
|
|
21097
|
-
? (isArrayLike_1(object) && _isIndex(index, object.length))
|
|
21098
|
-
: (type == 'string' && index in object)
|
|
21099
|
-
) {
|
|
21100
|
-
return eq_1(object[index], value);
|
|
21101
|
-
}
|
|
21102
|
-
return false;
|
|
21103
|
-
}
|
|
21104
|
-
|
|
21105
|
-
var _isIterateeCall = isIterateeCall;
|
|
21106
|
-
|
|
21107
|
-
/**
|
|
21108
|
-
* Creates an array of elements, sorted in ascending order by the results of
|
|
21109
|
-
* running each element in a collection thru each iteratee. This method
|
|
21110
|
-
* performs a stable sort, that is, it preserves the original sort order of
|
|
21111
|
-
* equal elements. The iteratees are invoked with one argument: (value).
|
|
21112
|
-
*
|
|
21113
|
-
* @static
|
|
21114
|
-
* @memberOf _
|
|
21115
|
-
* @since 0.1.0
|
|
21116
|
-
* @category Collection
|
|
21117
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
21118
|
-
* @param {...(Function|Function[])} [iteratees=[_.identity]]
|
|
21119
|
-
* The iteratees to sort by.
|
|
21120
|
-
* @returns {Array} Returns the new sorted array.
|
|
21121
|
-
* @example
|
|
21122
|
-
*
|
|
21123
|
-
* var users = [
|
|
21124
|
-
* { 'user': 'fred', 'age': 48 },
|
|
21125
|
-
* { 'user': 'barney', 'age': 36 },
|
|
21126
|
-
* { 'user': 'fred', 'age': 30 },
|
|
21127
|
-
* { 'user': 'barney', 'age': 34 }
|
|
21128
|
-
* ];
|
|
21129
|
-
*
|
|
21130
|
-
* _.sortBy(users, [function(o) { return o.user; }]);
|
|
21131
|
-
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
|
|
21132
|
-
*
|
|
21133
|
-
* _.sortBy(users, ['user', 'age']);
|
|
21134
|
-
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
|
|
21135
|
-
*/
|
|
21136
|
-
var sortBy = _baseRest(function(collection, iteratees) {
|
|
21137
|
-
if (collection == null) {
|
|
21138
|
-
return [];
|
|
21139
|
-
}
|
|
21140
|
-
var length = iteratees.length;
|
|
21141
|
-
if (length > 1 && _isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
|
21142
|
-
iteratees = [];
|
|
21143
|
-
} else if (length > 2 && _isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
|
21144
|
-
iteratees = [iteratees[0]];
|
|
21145
|
-
}
|
|
21146
|
-
return _baseOrderBy(collection, _baseFlatten(iteratees, 1), []);
|
|
21147
|
-
});
|
|
21148
|
-
|
|
21149
|
-
var sortBy_1 = sortBy;
|
|
21150
|
-
|
|
21151
|
-
var MAX_SKILL_RATING = 7;
|
|
21152
|
-
|
|
21153
|
-
var getPercentageRating = function getPercentageRating(rating) {
|
|
21154
|
-
return Number((100 * rating / MAX_SKILL_RATING).toFixed(2));
|
|
21155
|
-
};
|
|
21156
|
-
|
|
21157
|
-
var getTimes = function getTimes(data) {
|
|
21158
|
-
try {
|
|
21159
|
-
var times = data.map(function (item) {
|
|
21160
|
-
return item.ratings.map(function (rating) {
|
|
21161
|
-
return rating.time;
|
|
21162
|
-
});
|
|
21163
|
-
}).flat();
|
|
21164
|
-
return times.filter(function (item, index) {
|
|
21165
|
-
return times.indexOf(item) === index;
|
|
21166
|
-
}).map(function (time) {
|
|
21167
|
-
return format(new Date(time), marioCore.DATE_FORMAT);
|
|
21168
|
-
}).sort();
|
|
21169
|
-
} catch (_unused) {
|
|
21170
|
-
return [];
|
|
21171
|
-
}
|
|
21172
|
-
};
|
|
21173
|
-
|
|
21174
|
-
var getRatings = function getRatings(ratings, times) {
|
|
21175
|
-
try {
|
|
21176
|
-
var formatRatings = sortBy_1(ratings.map(function (item) {
|
|
21177
|
-
return _extends({}, item, {
|
|
21178
|
-
time: format(new Date(item.time), marioCore.DATE_FORMAT),
|
|
21179
|
-
rating: getPercentageRating(item.rating)
|
|
21180
|
-
});
|
|
21181
|
-
}), "time");
|
|
21182
|
-
var results = [];
|
|
21183
|
-
|
|
21184
|
-
var _loop = function _loop(i) {
|
|
21185
|
-
var time = times[i];
|
|
21186
|
-
var rating = formatRatings.find(function (item) {
|
|
21187
|
-
return item.time === time;
|
|
21188
|
-
});
|
|
21189
|
-
|
|
21190
|
-
if (!rating) {
|
|
21191
|
-
results[i] = {
|
|
21192
|
-
value: i > 0 ? results[i - 1].value : 0,
|
|
21193
|
-
isDiscrete: true
|
|
21194
|
-
};
|
|
21195
|
-
return "continue";
|
|
21196
|
-
}
|
|
21197
|
-
|
|
21198
|
-
results[i] = {
|
|
21199
|
-
value: rating.rating,
|
|
21200
|
-
isDiscrete: false
|
|
21201
|
-
};
|
|
21202
|
-
};
|
|
21203
|
-
|
|
21204
|
-
for (var i = 0; i < times.length; i++) {
|
|
21205
|
-
var _ret = _loop(i);
|
|
21206
|
-
|
|
21207
|
-
if (_ret === "continue") continue;
|
|
21208
|
-
}
|
|
21209
|
-
|
|
21210
|
-
return results;
|
|
21211
|
-
} catch (_unused2) {
|
|
21212
|
-
return [];
|
|
21213
|
-
}
|
|
21214
|
-
};
|
|
21215
|
-
|
|
21216
|
-
var useSkillFormat = function useSkillFormat(data) {
|
|
21217
|
-
var _useState = React.useState([]),
|
|
21218
|
-
activeSkillNames = _useState[0],
|
|
21219
|
-
setActiveSkillNames = _useState[1];
|
|
21220
|
-
|
|
21221
|
-
var toggleSkillName = React.useCallback(function (name) {
|
|
21222
|
-
if (activeSkillNames.includes(name)) {
|
|
21223
|
-
setActiveSkillNames(activeSkillNames.filter(function (item) {
|
|
21224
|
-
return item !== name;
|
|
21225
|
-
}));
|
|
21226
|
-
return;
|
|
21227
|
-
}
|
|
21228
|
-
|
|
21229
|
-
setActiveSkillNames([].concat(activeSkillNames, [name]));
|
|
21230
|
-
}, [activeSkillNames]);
|
|
21231
|
-
var colors = React.useMemo(function () {
|
|
21232
|
-
if (!data) return [];
|
|
21233
|
-
|
|
21234
|
-
try {
|
|
21235
|
-
return getColors(data.length);
|
|
21236
|
-
} catch (_unused3) {
|
|
21237
|
-
return [];
|
|
21238
|
-
}
|
|
21239
|
-
}, [data]);
|
|
21240
|
-
var times = React.useMemo(function () {
|
|
21241
|
-
return getTimes(data);
|
|
21242
|
-
}, [data]);
|
|
21243
|
-
var series = React.useMemo(function () {
|
|
21244
|
-
if (!data) return [];
|
|
21245
|
-
|
|
21246
|
-
try {
|
|
21247
|
-
return data.map(function (item, index) {
|
|
21248
|
-
return {
|
|
21249
|
-
name: item.skillName,
|
|
21250
|
-
color: colors[index],
|
|
21251
|
-
data: getRatings(item.ratings, times).map(function (rating) {
|
|
21252
|
-
return rating.value;
|
|
21253
|
-
})
|
|
21254
|
-
};
|
|
21255
|
-
});
|
|
21256
|
-
} catch (_unused4) {
|
|
21257
|
-
return [];
|
|
21258
|
-
}
|
|
21259
|
-
}, [data, times]);
|
|
21260
|
-
var discrete = React.useMemo(function () {
|
|
21261
|
-
if (!data) return [];
|
|
21262
|
-
var results = [];
|
|
21263
|
-
|
|
21264
|
-
try {
|
|
21265
|
-
data.map(function (item, index) {
|
|
21266
|
-
var ratings = getRatings(item.ratings, times);
|
|
21267
|
-
ratings.map(function (rating, ratingIndex) {
|
|
21268
|
-
if (rating.isDiscrete) {
|
|
21269
|
-
results.push({
|
|
21270
|
-
seriesIndex: index,
|
|
21271
|
-
dataPointIndex: ratingIndex,
|
|
21272
|
-
size: 0
|
|
21273
|
-
});
|
|
21274
|
-
}
|
|
21275
|
-
});
|
|
21276
|
-
});
|
|
21277
|
-
return results;
|
|
21278
|
-
} catch (_unused5) {
|
|
21279
|
-
return [];
|
|
21280
|
-
}
|
|
21281
|
-
}, [data, times]);
|
|
21282
|
-
React.useEffect(function () {
|
|
21283
|
-
if (data) {
|
|
21284
|
-
try {
|
|
21285
|
-
setActiveSkillNames(data.map(function (item) {
|
|
21286
|
-
return item.skillName;
|
|
21287
|
-
}));
|
|
21288
|
-
} catch (_unused6) {}
|
|
21289
|
-
}
|
|
21290
|
-
}, [data]);
|
|
21291
|
-
return {
|
|
21292
|
-
colors: colors,
|
|
21293
|
-
activeSkillNames: activeSkillNames,
|
|
21294
|
-
times: times,
|
|
21295
|
-
series: series,
|
|
21296
|
-
discrete: discrete,
|
|
21297
|
-
toggleSkillName: toggleSkillName
|
|
21298
|
-
};
|
|
21299
|
-
};
|
|
21300
|
-
|
|
21301
|
-
var ICON_SIZE = 8;
|
|
21302
|
-
var ICON_COLOR = "#fff";
|
|
21303
|
-
|
|
21304
|
-
var CustomCheckbox = function CustomCheckbox(_ref) {
|
|
21305
|
-
var label = _ref.label,
|
|
21306
|
-
color = _ref.color,
|
|
21307
|
-
checked = _ref.checked,
|
|
21308
|
-
_onClick = _ref.onClick;
|
|
21309
|
-
return React__default.createElement("div", {
|
|
21310
|
-
className: "d-flex align-items-center"
|
|
21311
|
-
}, React__default.createElement("span", {
|
|
21312
|
-
className: "custom-checkbox-square d-flex align-items-center justify-content-center cursor-pointer",
|
|
21313
|
-
style: checked ? {
|
|
21314
|
-
backgroundColor: color
|
|
21315
|
-
} : {},
|
|
21316
|
-
onClick: function onClick(_e) {
|
|
21317
|
-
return _onClick();
|
|
21318
|
-
}
|
|
21319
|
-
}, checked && React__default.createElement(fa.FaCheck, {
|
|
21320
|
-
size: ICON_SIZE,
|
|
21321
|
-
color: ICON_COLOR
|
|
21322
|
-
})), React__default.createElement("span", {
|
|
21323
|
-
className: "ml-2"
|
|
21324
|
-
}, label));
|
|
21325
|
-
};
|
|
21326
|
-
|
|
21327
|
-
var Skill = function Skill(_ref) {
|
|
21328
|
-
var data = _ref.data;
|
|
21329
|
-
|
|
21330
|
-
var _useSkillFormat = useSkillFormat(data),
|
|
21331
|
-
colors = _useSkillFormat.colors,
|
|
21332
|
-
activeSkillNames = _useSkillFormat.activeSkillNames,
|
|
21333
|
-
series = _useSkillFormat.series,
|
|
21334
|
-
times = _useSkillFormat.times,
|
|
21335
|
-
discrete = _useSkillFormat.discrete,
|
|
21336
|
-
toggleSkillName = _useSkillFormat.toggleSkillName;
|
|
21337
|
-
|
|
21338
|
-
var options = {
|
|
21339
|
-
chart: {
|
|
21340
|
-
height: 350,
|
|
21341
|
-
type: "area",
|
|
21342
|
-
toolbar: {
|
|
21343
|
-
show: false
|
|
21344
|
-
}
|
|
21345
|
-
},
|
|
21346
|
-
dataLabels: {
|
|
21347
|
-
enabled: false
|
|
21348
|
-
},
|
|
21349
|
-
stroke: {
|
|
21350
|
-
width: 2,
|
|
21351
|
-
curve: "straight"
|
|
21352
|
-
},
|
|
21353
|
-
markers: {
|
|
21354
|
-
size: 4,
|
|
21355
|
-
colors: ["#fff"],
|
|
21356
|
-
strokeColors: colors,
|
|
21357
|
-
strokeWidth: 2,
|
|
21358
|
-
strokeOpacity: 0.9,
|
|
21359
|
-
strokeDashArray: 0,
|
|
21360
|
-
fillOpacity: 1,
|
|
21361
|
-
shape: "circle",
|
|
21362
|
-
radius: 2,
|
|
21363
|
-
offsetX: 0,
|
|
21364
|
-
offsetY: 0,
|
|
21365
|
-
onClick: undefined,
|
|
21366
|
-
onDblClick: undefined,
|
|
21367
|
-
showNullDataPoints: true,
|
|
21368
|
-
hover: {
|
|
21369
|
-
size: undefined,
|
|
21370
|
-
sizeOffset: 3
|
|
21371
|
-
},
|
|
21372
|
-
discrete: discrete
|
|
21373
|
-
},
|
|
21374
|
-
legend: {
|
|
21375
|
-
show: false
|
|
21376
|
-
},
|
|
21377
|
-
xaxis: {
|
|
21378
|
-
categories: times
|
|
21379
|
-
},
|
|
21380
|
-
yaxis: {
|
|
21381
|
-
min: 0,
|
|
21382
|
-
max: 100,
|
|
21383
|
-
labels: {
|
|
21384
|
-
formatter: function formatter(val) {
|
|
21385
|
-
return val + "%";
|
|
21386
|
-
}
|
|
21387
|
-
}
|
|
21388
|
-
},
|
|
21389
|
-
tooltip: {}
|
|
21390
|
-
};
|
|
21391
|
-
if (!data) return React__default.createElement(Loading, null);
|
|
21392
|
-
return React__default.createElement("div", null, series && React__default.createElement(React.Fragment, null, React__default.createElement("div", {
|
|
21393
|
-
className: "d-flex align-items-center flex-wrap"
|
|
21394
|
-
}, series.map(function (item, index) {
|
|
21395
|
-
return React__default.createElement("div", {
|
|
21396
|
-
key: item.name,
|
|
21397
|
-
className: "d-flex align-items-center mr-3"
|
|
21398
|
-
}, React__default.createElement(CustomCheckbox, {
|
|
21399
|
-
label: item.name,
|
|
21400
|
-
color: colors[index],
|
|
21401
|
-
checked: activeSkillNames.includes(item.name),
|
|
21402
|
-
onClick: function onClick() {
|
|
21403
|
-
return toggleSkillName && toggleSkillName(item.name);
|
|
21404
|
-
}
|
|
21405
|
-
}));
|
|
21406
|
-
})), React__default.createElement(ReactApexChart, {
|
|
21407
|
-
options: options,
|
|
21408
|
-
series: series.filter(function (item) {
|
|
21409
|
-
return activeSkillNames.includes(item.name);
|
|
21410
|
-
}),
|
|
21411
|
-
type: "area",
|
|
21412
|
-
height: 350
|
|
21413
|
-
})));
|
|
21414
|
-
};
|
|
21415
|
-
|
|
21416
|
-
var colors$5 = ["#c0392b", "#3498db"];
|
|
21417
|
-
|
|
21418
|
-
var TimeInSession = function TimeInSession(_ref) {
|
|
21419
|
-
var data = _ref.data;
|
|
21420
|
-
if (!data) return React__default.createElement(Loading, null);
|
|
21421
|
-
var series = [{
|
|
21422
|
-
name: "Teacher",
|
|
21423
|
-
data: data.map(function (item) {
|
|
21424
|
-
return item.teacherPerceivedImpact;
|
|
17609
|
+
var cards = [{
|
|
17610
|
+
label: "High-impact learning strategies of current school year",
|
|
17611
|
+
children: React__default.createElement(HighImpact, {
|
|
17612
|
+
data: highImpact
|
|
21425
17613
|
})
|
|
21426
17614
|
}, {
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
17615
|
+
label: "Learning strategies perceived impact",
|
|
17616
|
+
children: React__default.createElement(PerceivedImpact, {
|
|
17617
|
+
data: perceivedImpact
|
|
21430
17618
|
})
|
|
21431
|
-
}
|
|
21432
|
-
var categories = data.map(function (item) {
|
|
21433
|
-
return item.sessionCategory;
|
|
21434
|
-
});
|
|
21435
|
-
var options = {
|
|
21436
|
-
chart: {
|
|
21437
|
-
type: "bar",
|
|
21438
|
-
height: 350,
|
|
21439
|
-
toolbar: {
|
|
21440
|
-
show: false
|
|
21441
|
-
}
|
|
21442
|
-
},
|
|
21443
|
-
colors: colors$5,
|
|
21444
|
-
plotOptions: {
|
|
21445
|
-
bar: {
|
|
21446
|
-
horizontal: false,
|
|
21447
|
-
columnWidth: "55%"
|
|
21448
|
-
}
|
|
21449
|
-
},
|
|
21450
|
-
dataLabels: {
|
|
21451
|
-
enabled: false
|
|
21452
|
-
},
|
|
21453
|
-
stroke: {
|
|
21454
|
-
show: true,
|
|
21455
|
-
width: 2,
|
|
21456
|
-
colors: ["transparent"]
|
|
21457
|
-
},
|
|
21458
|
-
xaxis: {
|
|
21459
|
-
categories: categories
|
|
21460
|
-
},
|
|
21461
|
-
fill: {
|
|
21462
|
-
opacity: 1
|
|
21463
|
-
},
|
|
21464
|
-
legend: {
|
|
21465
|
-
onItemClick: {
|
|
21466
|
-
toggleDataSeries: false
|
|
21467
|
-
},
|
|
21468
|
-
onItemHover: {
|
|
21469
|
-
highlightDataSeries: false
|
|
21470
|
-
}
|
|
21471
|
-
}
|
|
21472
|
-
};
|
|
21473
|
-
return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
|
|
21474
|
-
options: options,
|
|
21475
|
-
series: series,
|
|
21476
|
-
type: "bar",
|
|
21477
|
-
height: 350
|
|
21478
|
-
}));
|
|
21479
|
-
};
|
|
21480
|
-
|
|
21481
|
-
var colors$6 = ["#f0932b", "#22a6b3", "#6ab04c"];
|
|
21482
|
-
var categories = ["Before intervention", "During intervention", "After intervention"];
|
|
21483
|
-
|
|
21484
|
-
var findGradeLabel = function findGradeLabel(value, bandScores) {
|
|
21485
|
-
var sortedBandScores = bandScores === null || bandScores === void 0 ? void 0 : bandScores.sort(function (item1, item2) {
|
|
21486
|
-
return item1.value - item2.value;
|
|
21487
|
-
});
|
|
21488
|
-
|
|
21489
|
-
if ((sortedBandScores === null || sortedBandScores === void 0 ? void 0 : sortedBandScores.length) > 0) {
|
|
21490
|
-
for (var i = 0; i < sortedBandScores.length; i++) {
|
|
21491
|
-
var _sortedBandScores$i, _sortedBandScores;
|
|
21492
|
-
|
|
21493
|
-
if (((_sortedBandScores$i = sortedBandScores[i]) === null || _sortedBandScores$i === void 0 ? void 0 : _sortedBandScores$i.value) <= value && value <= ((_sortedBandScores = sortedBandScores[i + 1]) === null || _sortedBandScores === void 0 ? void 0 : _sortedBandScores.value)) {
|
|
21494
|
-
var _sortedBandScores$i2, _sortedBandScores2, _sortedBandScores3;
|
|
21495
|
-
|
|
21496
|
-
if (value - ((_sortedBandScores$i2 = sortedBandScores[i]) === null || _sortedBandScores$i2 === void 0 ? void 0 : _sortedBandScores$i2.value) <= ((_sortedBandScores2 = sortedBandScores[i + 1]) === null || _sortedBandScores2 === void 0 ? void 0 : _sortedBandScores2.value) - value) {
|
|
21497
|
-
var _sortedBandScores$i3;
|
|
21498
|
-
|
|
21499
|
-
return (_sortedBandScores$i3 = sortedBandScores[i]) === null || _sortedBandScores$i3 === void 0 ? void 0 : _sortedBandScores$i3.label;
|
|
21500
|
-
}
|
|
21501
|
-
|
|
21502
|
-
return (_sortedBandScores3 = sortedBandScores[i + 1]) === null || _sortedBandScores3 === void 0 ? void 0 : _sortedBandScores3.label;
|
|
21503
|
-
}
|
|
21504
|
-
}
|
|
21505
|
-
}
|
|
21506
|
-
|
|
21507
|
-
return "";
|
|
21508
|
-
};
|
|
21509
|
-
|
|
21510
|
-
var Grade = function Grade(_ref) {
|
|
21511
|
-
var data = _ref.data;
|
|
21512
|
-
if (!data) return React__default.createElement(Loading, null);
|
|
21513
|
-
var series = [{
|
|
21514
|
-
data: [data.beforeIntervention, data.duringIntervention, data.afterIntervention]
|
|
21515
|
-
}];
|
|
21516
|
-
var options = {
|
|
21517
|
-
chart: {
|
|
21518
|
-
height: 350,
|
|
21519
|
-
type: "bar",
|
|
21520
|
-
toolbar: {
|
|
21521
|
-
show: false
|
|
21522
|
-
}
|
|
21523
|
-
},
|
|
21524
|
-
colors: colors$6,
|
|
21525
|
-
plotOptions: {
|
|
21526
|
-
bar: {
|
|
21527
|
-
columnWidth: "45%",
|
|
21528
|
-
distributed: true
|
|
21529
|
-
}
|
|
21530
|
-
},
|
|
21531
|
-
dataLabels: {
|
|
21532
|
-
enabled: false
|
|
21533
|
-
},
|
|
21534
|
-
legend: {
|
|
21535
|
-
show: false
|
|
21536
|
-
},
|
|
21537
|
-
xaxis: {
|
|
21538
|
-
categories: categories
|
|
21539
|
-
},
|
|
21540
|
-
yaxis: {
|
|
21541
|
-
max: Math.max.apply(Math, data.bandScores.map(function (item) {
|
|
21542
|
-
return item.value;
|
|
21543
|
-
})),
|
|
21544
|
-
min: Math.min.apply(Math, data.bandScores.map(function (item) {
|
|
21545
|
-
return item.value;
|
|
21546
|
-
})),
|
|
21547
|
-
labels: {
|
|
21548
|
-
formatter: function formatter(val) {
|
|
21549
|
-
return findGradeLabel(val, data.bandScores);
|
|
21550
|
-
}
|
|
21551
|
-
}
|
|
21552
|
-
}
|
|
21553
|
-
};
|
|
21554
|
-
return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
|
|
21555
|
-
options: options,
|
|
21556
|
-
series: series,
|
|
21557
|
-
type: "bar",
|
|
21558
|
-
height: 350
|
|
21559
|
-
}));
|
|
21560
|
-
};
|
|
21561
|
-
|
|
21562
|
-
var Dashboard = function Dashboard() {
|
|
21563
|
-
var _useDashboard = useDashboard(),
|
|
21564
|
-
loginCounting = _useDashboard.loginCounting,
|
|
21565
|
-
quantity = _useDashboard.quantity,
|
|
21566
|
-
skill = _useDashboard.skill,
|
|
21567
|
-
goalProgress = _useDashboard.goalProgress,
|
|
21568
|
-
highImpact = _useDashboard.highImpact,
|
|
21569
|
-
perceivedImpact = _useDashboard.perceivedImpact,
|
|
21570
|
-
timeInSession = _useDashboard.timeInSession,
|
|
21571
|
-
grade = _useDashboard.grade;
|
|
21572
|
-
|
|
21573
|
-
var cards = [{
|
|
17619
|
+
}, {
|
|
21574
17620
|
label: "Students & teachers login per day",
|
|
21575
17621
|
children: React__default.createElement(LoginCouting, {
|
|
21576
17622
|
data: loginCounting
|
|
@@ -21580,36 +17626,6 @@ var Dashboard = function Dashboard() {
|
|
|
21580
17626
|
children: React__default.createElement(Quantity, {
|
|
21581
17627
|
data: quantity
|
|
21582
17628
|
})
|
|
21583
|
-
}, {
|
|
21584
|
-
label: "MARIO skill",
|
|
21585
|
-
children: React__default.createElement(Skill, {
|
|
21586
|
-
data: skill
|
|
21587
|
-
})
|
|
21588
|
-
}, {
|
|
21589
|
-
label: "Goal progress",
|
|
21590
|
-
children: React__default.createElement(GoalProgressReport, {
|
|
21591
|
-
data: goalProgress
|
|
21592
|
-
})
|
|
21593
|
-
}, {
|
|
21594
|
-
label: "1-1 sessions perceived impact",
|
|
21595
|
-
children: React__default.createElement(TimeInSession, {
|
|
21596
|
-
data: timeInSession
|
|
21597
|
-
})
|
|
21598
|
-
}, {
|
|
21599
|
-
label: "Grades",
|
|
21600
|
-
children: React__default.createElement(Grade, {
|
|
21601
|
-
data: grade
|
|
21602
|
-
})
|
|
21603
|
-
}, {
|
|
21604
|
-
label: "High-impact learning strategies of current school year",
|
|
21605
|
-
children: React__default.createElement(HighImpact, {
|
|
21606
|
-
data: highImpact
|
|
21607
|
-
})
|
|
21608
|
-
}, {
|
|
21609
|
-
label: "Learning strategies perceived impact",
|
|
21610
|
-
children: React__default.createElement(PerceivedImpact, {
|
|
21611
|
-
data: perceivedImpact
|
|
21612
|
-
})
|
|
21613
17629
|
}];
|
|
21614
17630
|
return React__default.createElement("div", null, React__default.createElement("h4", {
|
|
21615
17631
|
className: "mb-5"
|