@quintype/arrow 3.15.1-perf.3 → 3.15.1-perf.4
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/atoms/Author/index.js +14 -2103
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +32 -2482
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +12 -2101
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-b22f1843.js → index-0f809dd9.js} +10 -7
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-bc129cb8.js → index-37a9ccff.js} +18 -10
- package/atoms/ExtendedLoadMore/{index-6e083738.js → index-446679c8.js} +20 -12
- package/atoms/ExtendedLoadMore/{index-9e0d32b7.js → index-44f97338.js} +19 -9
- package/atoms/ExtendedLoadMore/{index-b5936059.js → index-57dd4870.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-fee73a14.js → index-66dd4dbd.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-5c8eda4a.js → index-8462c597.js} +21 -16
- package/atoms/ExtendedLoadMore/{index-3c4ac692.js → index-93cb06d1.js} +42 -51
- package/atoms/ExtendedLoadMore/{index-4ddfe28d.js → index-afd44863.js} +6 -4
- package/atoms/ExtendedLoadMore/{index-3976fac4.js → index-b5754c5d.js} +20 -14
- package/atoms/ExtendedLoadMore/{index-a5c95f84.js → index-bbaf526e.js} +16 -8
- package/atoms/ExtendedLoadMore/{index-6ecceae4.js → index-cfb262ef.js} +18 -9
- package/atoms/ExtendedLoadMore/index.js +8 -1
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +14 -2103
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +22 -2170
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +12 -2114
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +17 -2178
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +10 -2099
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +8 -2097
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +13 -2463
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +23 -2545
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +17 -2454
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +144 -2740
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +64 -2582
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +123 -2893
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +45 -2495
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +92 -2659
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +92 -2659
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +89 -2656
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +27 -2743
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +34 -2763
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +91 -2658
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +81 -2612
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +75 -2603
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +92 -2623
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +91 -2622
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +80 -2617
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +72 -2596
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +84 -2615
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +84 -2615
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +80 -2611
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +85 -2616
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +81 -2612
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +75 -2606
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +38 -2235
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +24 -2487
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +26 -2489
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +81 -2612
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +92 -2623
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +61 -2583
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +91 -2622
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +92 -2659
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +9 -1816
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +91 -2622
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +72 -2596
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +94 -2625
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +84 -2615
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +76 -2607
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +80 -2617
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +78 -2609
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +80 -2617
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +77 -2608
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +82 -2619
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +79 -2610
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +75 -2606
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +24 -2170
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +15 -1870
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +16 -1871
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +20 -2157
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +18 -1932
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +42 -2251
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +45 -2254
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +48 -2257
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +26 -2163
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +17 -1872
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +15 -1870
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +12 -1725
- package/story-elements/Summary/index.js +18 -1873
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +16 -2153
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +12 -1725
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +282 -3167
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +504 -3389
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +287 -3172
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +416 -3301
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +382 -3267
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
|
@@ -2,2484 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
5
6
|
var React = require('react');
|
|
7
|
+
var lodash = require('lodash');
|
|
6
8
|
var components = require('@quintype/components');
|
|
9
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
10
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
11
|
+
require('@babel/runtime/regenerator');
|
|
7
12
|
var PropTypes = require('prop-types');
|
|
8
13
|
var Timeago = require('react-timeago');
|
|
9
14
|
var dateFnsTz = require('date-fns-tz');
|
|
10
15
|
var reactRedux = require('react-redux');
|
|
16
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
17
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
18
|
|
|
12
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
20
|
|
|
21
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
14
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
15
24
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
16
25
|
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
function getDefaultExportFromCjs (x) {
|
|
21
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function createCommonjsModule(fn) {
|
|
25
|
-
var module = { exports: {} };
|
|
26
|
-
return fn(module, module.exports), module.exports;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
|
|
30
|
-
|
|
31
|
-
Object.defineProperty(exports, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
});
|
|
34
|
-
exports["default"] = void 0;
|
|
35
|
-
var optionsDefaults = {
|
|
36
|
-
attributeNames: {
|
|
37
|
-
styleName: 'className'
|
|
38
|
-
},
|
|
39
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
40
|
-
handleMissingStyleName: 'throw'
|
|
41
|
-
};
|
|
42
|
-
var _default = optionsDefaults;
|
|
43
|
-
exports["default"] = _default;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
49
|
-
|
|
50
|
-
Object.defineProperty(exports, "__esModule", {
|
|
51
|
-
value: true
|
|
52
|
-
});
|
|
53
|
-
exports["default"] = void 0;
|
|
54
|
-
|
|
55
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
56
|
-
|
|
57
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
58
|
-
|
|
59
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
60
|
-
return styleName.indexOf('.') !== -1;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
64
|
-
if (handleMissingStyleName === 'throw') {
|
|
65
|
-
throw new Error(message);
|
|
66
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
67
|
-
// eslint-disable-next-line no-console
|
|
68
|
-
console.warn(message);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return null;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
75
|
-
// Note:
|
|
76
|
-
// Do not use the desctructing syntax with Babel.
|
|
77
|
-
// Desctructing adds _slicedToArray helper.
|
|
78
|
-
var styleNameParts = styleName.split('.');
|
|
79
|
-
var importName = styleNameParts[0];
|
|
80
|
-
var moduleName = styleNameParts[1];
|
|
81
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
82
|
-
|
|
83
|
-
if (!moduleName) {
|
|
84
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (!styleModuleImportMap[importName]) {
|
|
88
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
92
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return styleModuleImportMap[importName][moduleName];
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
99
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
100
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
101
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
102
|
-
}).filter(function (importKey) {
|
|
103
|
-
return importKey;
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
if (importKeysWithMatches.length > 1) {
|
|
107
|
-
throw new Error('Cannot resolve styleName "' + styleName + '" because it is present in multiple imports:' + '\n\n\t' + importKeysWithMatches.join('\n\t') + '\n\nYou can resolve this by using a named import, e.g:' + '\n\n\timport foo from "' + importKeysWithMatches[0] + '";' + '\n\t<div styleName="foo.' + styleName + '" />' + '\n\n');
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (importKeysWithMatches.length === 0) {
|
|
111
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
118
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
119
|
-
|
|
120
|
-
var _ref = options || {},
|
|
121
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
122
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
123
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
124
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
125
|
-
|
|
126
|
-
if (!styleNameValue) {
|
|
127
|
-
return '';
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
131
|
-
return styleName;
|
|
132
|
-
}).map(function (styleName) {
|
|
133
|
-
if (isNamespacedStyleName(styleName)) {
|
|
134
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
138
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
142
|
-
if (!autoResolveMultipleImports) {
|
|
143
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
150
|
-
|
|
151
|
-
if (!styleModuleMap[styleName]) {
|
|
152
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return styleModuleMap[styleName];
|
|
156
|
-
}).filter(function (className) {
|
|
157
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
158
|
-
return className;
|
|
159
|
-
}).join(' ');
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
exports["default"] = _default;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Checks if `value` is classified as an `Array` object.
|
|
171
|
-
*
|
|
172
|
-
* @static
|
|
173
|
-
* @memberOf _
|
|
174
|
-
* @since 0.1.0
|
|
175
|
-
* @category Lang
|
|
176
|
-
* @param {*} value The value to check.
|
|
177
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
178
|
-
* @example
|
|
179
|
-
*
|
|
180
|
-
* _.isArray([1, 2, 3]);
|
|
181
|
-
* // => true
|
|
182
|
-
*
|
|
183
|
-
* _.isArray(document.body.children);
|
|
184
|
-
* // => false
|
|
185
|
-
*
|
|
186
|
-
* _.isArray('abc');
|
|
187
|
-
* // => false
|
|
188
|
-
*
|
|
189
|
-
* _.isArray(_.noop);
|
|
190
|
-
* // => false
|
|
191
|
-
*/
|
|
192
|
-
var isArray = Array.isArray;
|
|
193
|
-
|
|
194
|
-
var isArray_1 = isArray;
|
|
195
|
-
|
|
196
|
-
/** Detect free variable `global` from Node.js. */
|
|
197
|
-
|
|
198
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
199
|
-
|
|
200
|
-
var _freeGlobal = freeGlobal;
|
|
201
|
-
|
|
202
|
-
/** Detect free variable `self`. */
|
|
203
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
204
|
-
|
|
205
|
-
/** Used as a reference to the global object. */
|
|
206
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
207
|
-
|
|
208
|
-
var _root = root;
|
|
209
|
-
|
|
210
|
-
/** Built-in value references. */
|
|
211
|
-
var Symbol$1 = _root.Symbol;
|
|
212
|
-
|
|
213
|
-
var _Symbol = Symbol$1;
|
|
214
|
-
|
|
215
|
-
/** Used for built-in method references. */
|
|
216
|
-
var objectProto$4 = Object.prototype;
|
|
217
|
-
|
|
218
|
-
/** Used to check objects for own properties. */
|
|
219
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Used to resolve the
|
|
223
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
224
|
-
* of values.
|
|
225
|
-
*/
|
|
226
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
227
|
-
|
|
228
|
-
/** Built-in value references. */
|
|
229
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
233
|
-
*
|
|
234
|
-
* @private
|
|
235
|
-
* @param {*} value The value to query.
|
|
236
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
237
|
-
*/
|
|
238
|
-
function getRawTag(value) {
|
|
239
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
240
|
-
tag = value[symToStringTag$1];
|
|
241
|
-
|
|
242
|
-
try {
|
|
243
|
-
value[symToStringTag$1] = undefined;
|
|
244
|
-
var unmasked = true;
|
|
245
|
-
} catch (e) {}
|
|
246
|
-
|
|
247
|
-
var result = nativeObjectToString$1.call(value);
|
|
248
|
-
if (unmasked) {
|
|
249
|
-
if (isOwn) {
|
|
250
|
-
value[symToStringTag$1] = tag;
|
|
251
|
-
} else {
|
|
252
|
-
delete value[symToStringTag$1];
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return result;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
var _getRawTag = getRawTag;
|
|
259
|
-
|
|
260
|
-
/** Used for built-in method references. */
|
|
261
|
-
var objectProto$3 = Object.prototype;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Used to resolve the
|
|
265
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
266
|
-
* of values.
|
|
267
|
-
*/
|
|
268
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
272
|
-
*
|
|
273
|
-
* @private
|
|
274
|
-
* @param {*} value The value to convert.
|
|
275
|
-
* @returns {string} Returns the converted string.
|
|
276
|
-
*/
|
|
277
|
-
function objectToString(value) {
|
|
278
|
-
return nativeObjectToString.call(value);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
var _objectToString = objectToString;
|
|
282
|
-
|
|
283
|
-
/** `Object#toString` result references. */
|
|
284
|
-
var nullTag = '[object Null]',
|
|
285
|
-
undefinedTag = '[object Undefined]';
|
|
286
|
-
|
|
287
|
-
/** Built-in value references. */
|
|
288
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
292
|
-
*
|
|
293
|
-
* @private
|
|
294
|
-
* @param {*} value The value to query.
|
|
295
|
-
* @returns {string} Returns the `toStringTag`.
|
|
296
|
-
*/
|
|
297
|
-
function baseGetTag(value) {
|
|
298
|
-
if (value == null) {
|
|
299
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
300
|
-
}
|
|
301
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
302
|
-
? _getRawTag(value)
|
|
303
|
-
: _objectToString(value);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
var _baseGetTag = baseGetTag;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
310
|
-
* and has a `typeof` result of "object".
|
|
311
|
-
*
|
|
312
|
-
* @static
|
|
313
|
-
* @memberOf _
|
|
314
|
-
* @since 4.0.0
|
|
315
|
-
* @category Lang
|
|
316
|
-
* @param {*} value The value to check.
|
|
317
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
318
|
-
* @example
|
|
319
|
-
*
|
|
320
|
-
* _.isObjectLike({});
|
|
321
|
-
* // => true
|
|
322
|
-
*
|
|
323
|
-
* _.isObjectLike([1, 2, 3]);
|
|
324
|
-
* // => true
|
|
325
|
-
*
|
|
326
|
-
* _.isObjectLike(_.noop);
|
|
327
|
-
* // => false
|
|
328
|
-
*
|
|
329
|
-
* _.isObjectLike(null);
|
|
330
|
-
* // => false
|
|
331
|
-
*/
|
|
332
|
-
function isObjectLike(value) {
|
|
333
|
-
return value != null && typeof value == 'object';
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
var isObjectLike_1 = isObjectLike;
|
|
337
|
-
|
|
338
|
-
/** `Object#toString` result references. */
|
|
339
|
-
var symbolTag = '[object Symbol]';
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
343
|
-
*
|
|
344
|
-
* @static
|
|
345
|
-
* @memberOf _
|
|
346
|
-
* @since 4.0.0
|
|
347
|
-
* @category Lang
|
|
348
|
-
* @param {*} value The value to check.
|
|
349
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
350
|
-
* @example
|
|
351
|
-
*
|
|
352
|
-
* _.isSymbol(Symbol.iterator);
|
|
353
|
-
* // => true
|
|
354
|
-
*
|
|
355
|
-
* _.isSymbol('abc');
|
|
356
|
-
* // => false
|
|
357
|
-
*/
|
|
358
|
-
function isSymbol(value) {
|
|
359
|
-
return typeof value == 'symbol' ||
|
|
360
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
var isSymbol_1 = isSymbol;
|
|
364
|
-
|
|
365
|
-
/** Used to match property names within property paths. */
|
|
366
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
367
|
-
reIsPlainProp = /^\w*$/;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Checks if `value` is a property name and not a property path.
|
|
371
|
-
*
|
|
372
|
-
* @private
|
|
373
|
-
* @param {*} value The value to check.
|
|
374
|
-
* @param {Object} [object] The object to query keys on.
|
|
375
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
376
|
-
*/
|
|
377
|
-
function isKey(value, object) {
|
|
378
|
-
if (isArray_1(value)) {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
381
|
-
var type = typeof value;
|
|
382
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
383
|
-
value == null || isSymbol_1(value)) {
|
|
384
|
-
return true;
|
|
385
|
-
}
|
|
386
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
387
|
-
(object != null && value in Object(object));
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
var _isKey = isKey;
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Checks if `value` is the
|
|
394
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
395
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
396
|
-
*
|
|
397
|
-
* @static
|
|
398
|
-
* @memberOf _
|
|
399
|
-
* @since 0.1.0
|
|
400
|
-
* @category Lang
|
|
401
|
-
* @param {*} value The value to check.
|
|
402
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
403
|
-
* @example
|
|
404
|
-
*
|
|
405
|
-
* _.isObject({});
|
|
406
|
-
* // => true
|
|
407
|
-
*
|
|
408
|
-
* _.isObject([1, 2, 3]);
|
|
409
|
-
* // => true
|
|
410
|
-
*
|
|
411
|
-
* _.isObject(_.noop);
|
|
412
|
-
* // => true
|
|
413
|
-
*
|
|
414
|
-
* _.isObject(null);
|
|
415
|
-
* // => false
|
|
416
|
-
*/
|
|
417
|
-
function isObject(value) {
|
|
418
|
-
var type = typeof value;
|
|
419
|
-
return value != null && (type == 'object' || type == 'function');
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
var isObject_1 = isObject;
|
|
423
|
-
|
|
424
|
-
/** `Object#toString` result references. */
|
|
425
|
-
var asyncTag = '[object AsyncFunction]',
|
|
426
|
-
funcTag = '[object Function]',
|
|
427
|
-
genTag = '[object GeneratorFunction]',
|
|
428
|
-
proxyTag = '[object Proxy]';
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Checks if `value` is classified as a `Function` object.
|
|
432
|
-
*
|
|
433
|
-
* @static
|
|
434
|
-
* @memberOf _
|
|
435
|
-
* @since 0.1.0
|
|
436
|
-
* @category Lang
|
|
437
|
-
* @param {*} value The value to check.
|
|
438
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
439
|
-
* @example
|
|
440
|
-
*
|
|
441
|
-
* _.isFunction(_);
|
|
442
|
-
* // => true
|
|
443
|
-
*
|
|
444
|
-
* _.isFunction(/abc/);
|
|
445
|
-
* // => false
|
|
446
|
-
*/
|
|
447
|
-
function isFunction(value) {
|
|
448
|
-
if (!isObject_1(value)) {
|
|
449
|
-
return false;
|
|
450
|
-
}
|
|
451
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
452
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
453
|
-
var tag = _baseGetTag(value);
|
|
454
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
var isFunction_1 = isFunction;
|
|
458
|
-
|
|
459
|
-
/** Used to detect overreaching core-js shims. */
|
|
460
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
461
|
-
|
|
462
|
-
var _coreJsData = coreJsData;
|
|
463
|
-
|
|
464
|
-
/** Used to detect methods masquerading as native. */
|
|
465
|
-
var maskSrcKey = (function() {
|
|
466
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
467
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
468
|
-
}());
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Checks if `func` has its source masked.
|
|
472
|
-
*
|
|
473
|
-
* @private
|
|
474
|
-
* @param {Function} func The function to check.
|
|
475
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
476
|
-
*/
|
|
477
|
-
function isMasked(func) {
|
|
478
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
var _isMasked = isMasked;
|
|
482
|
-
|
|
483
|
-
/** Used for built-in method references. */
|
|
484
|
-
var funcProto$1 = Function.prototype;
|
|
485
|
-
|
|
486
|
-
/** Used to resolve the decompiled source of functions. */
|
|
487
|
-
var funcToString$1 = funcProto$1.toString;
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* Converts `func` to its source code.
|
|
491
|
-
*
|
|
492
|
-
* @private
|
|
493
|
-
* @param {Function} func The function to convert.
|
|
494
|
-
* @returns {string} Returns the source code.
|
|
495
|
-
*/
|
|
496
|
-
function toSource(func) {
|
|
497
|
-
if (func != null) {
|
|
498
|
-
try {
|
|
499
|
-
return funcToString$1.call(func);
|
|
500
|
-
} catch (e) {}
|
|
501
|
-
try {
|
|
502
|
-
return (func + '');
|
|
503
|
-
} catch (e) {}
|
|
504
|
-
}
|
|
505
|
-
return '';
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
var _toSource = toSource;
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* Used to match `RegExp`
|
|
512
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
513
|
-
*/
|
|
514
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
515
|
-
|
|
516
|
-
/** Used to detect host constructors (Safari). */
|
|
517
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
518
|
-
|
|
519
|
-
/** Used for built-in method references. */
|
|
520
|
-
var funcProto = Function.prototype,
|
|
521
|
-
objectProto$2 = Object.prototype;
|
|
522
|
-
|
|
523
|
-
/** Used to resolve the decompiled source of functions. */
|
|
524
|
-
var funcToString = funcProto.toString;
|
|
525
|
-
|
|
526
|
-
/** Used to check objects for own properties. */
|
|
527
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
528
|
-
|
|
529
|
-
/** Used to detect if a method is native. */
|
|
530
|
-
var reIsNative = RegExp('^' +
|
|
531
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
532
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
533
|
-
);
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
537
|
-
*
|
|
538
|
-
* @private
|
|
539
|
-
* @param {*} value The value to check.
|
|
540
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
541
|
-
* else `false`.
|
|
542
|
-
*/
|
|
543
|
-
function baseIsNative(value) {
|
|
544
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
545
|
-
return false;
|
|
546
|
-
}
|
|
547
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
548
|
-
return pattern.test(_toSource(value));
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
var _baseIsNative = baseIsNative;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Gets the value at `key` of `object`.
|
|
555
|
-
*
|
|
556
|
-
* @private
|
|
557
|
-
* @param {Object} [object] The object to query.
|
|
558
|
-
* @param {string} key The key of the property to get.
|
|
559
|
-
* @returns {*} Returns the property value.
|
|
560
|
-
*/
|
|
561
|
-
function getValue(object, key) {
|
|
562
|
-
return object == null ? undefined : object[key];
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
var _getValue = getValue;
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Gets the native function at `key` of `object`.
|
|
569
|
-
*
|
|
570
|
-
* @private
|
|
571
|
-
* @param {Object} object The object to query.
|
|
572
|
-
* @param {string} key The key of the method to get.
|
|
573
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
574
|
-
*/
|
|
575
|
-
function getNative(object, key) {
|
|
576
|
-
var value = _getValue(object, key);
|
|
577
|
-
return _baseIsNative(value) ? value : undefined;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
var _getNative = getNative;
|
|
581
|
-
|
|
582
|
-
/* Built-in method references that are verified to be native. */
|
|
583
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
584
|
-
|
|
585
|
-
var _nativeCreate = nativeCreate;
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Removes all key-value entries from the hash.
|
|
589
|
-
*
|
|
590
|
-
* @private
|
|
591
|
-
* @name clear
|
|
592
|
-
* @memberOf Hash
|
|
593
|
-
*/
|
|
594
|
-
function hashClear() {
|
|
595
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
596
|
-
this.size = 0;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
var _hashClear = hashClear;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Removes `key` and its value from the hash.
|
|
603
|
-
*
|
|
604
|
-
* @private
|
|
605
|
-
* @name delete
|
|
606
|
-
* @memberOf Hash
|
|
607
|
-
* @param {Object} hash The hash to modify.
|
|
608
|
-
* @param {string} key The key of the value to remove.
|
|
609
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
610
|
-
*/
|
|
611
|
-
function hashDelete(key) {
|
|
612
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
613
|
-
this.size -= result ? 1 : 0;
|
|
614
|
-
return result;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
var _hashDelete = hashDelete;
|
|
618
|
-
|
|
619
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
620
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
621
|
-
|
|
622
|
-
/** Used for built-in method references. */
|
|
623
|
-
var objectProto$1 = Object.prototype;
|
|
624
|
-
|
|
625
|
-
/** Used to check objects for own properties. */
|
|
626
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* Gets the hash value for `key`.
|
|
630
|
-
*
|
|
631
|
-
* @private
|
|
632
|
-
* @name get
|
|
633
|
-
* @memberOf Hash
|
|
634
|
-
* @param {string} key The key of the value to get.
|
|
635
|
-
* @returns {*} Returns the entry value.
|
|
636
|
-
*/
|
|
637
|
-
function hashGet(key) {
|
|
638
|
-
var data = this.__data__;
|
|
639
|
-
if (_nativeCreate) {
|
|
640
|
-
var result = data[key];
|
|
641
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
642
|
-
}
|
|
643
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
var _hashGet = hashGet;
|
|
647
|
-
|
|
648
|
-
/** Used for built-in method references. */
|
|
649
|
-
var objectProto = Object.prototype;
|
|
650
|
-
|
|
651
|
-
/** Used to check objects for own properties. */
|
|
652
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* Checks if a hash value for `key` exists.
|
|
656
|
-
*
|
|
657
|
-
* @private
|
|
658
|
-
* @name has
|
|
659
|
-
* @memberOf Hash
|
|
660
|
-
* @param {string} key The key of the entry to check.
|
|
661
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
662
|
-
*/
|
|
663
|
-
function hashHas(key) {
|
|
664
|
-
var data = this.__data__;
|
|
665
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
var _hashHas = hashHas;
|
|
669
|
-
|
|
670
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
671
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Sets the hash `key` to `value`.
|
|
675
|
-
*
|
|
676
|
-
* @private
|
|
677
|
-
* @name set
|
|
678
|
-
* @memberOf Hash
|
|
679
|
-
* @param {string} key The key of the value to set.
|
|
680
|
-
* @param {*} value The value to set.
|
|
681
|
-
* @returns {Object} Returns the hash instance.
|
|
682
|
-
*/
|
|
683
|
-
function hashSet(key, value) {
|
|
684
|
-
var data = this.__data__;
|
|
685
|
-
this.size += this.has(key) ? 0 : 1;
|
|
686
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
687
|
-
return this;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
var _hashSet = hashSet;
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* Creates a hash object.
|
|
694
|
-
*
|
|
695
|
-
* @private
|
|
696
|
-
* @constructor
|
|
697
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
698
|
-
*/
|
|
699
|
-
function Hash(entries) {
|
|
700
|
-
var index = -1,
|
|
701
|
-
length = entries == null ? 0 : entries.length;
|
|
702
|
-
|
|
703
|
-
this.clear();
|
|
704
|
-
while (++index < length) {
|
|
705
|
-
var entry = entries[index];
|
|
706
|
-
this.set(entry[0], entry[1]);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
// Add methods to `Hash`.
|
|
711
|
-
Hash.prototype.clear = _hashClear;
|
|
712
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
713
|
-
Hash.prototype.get = _hashGet;
|
|
714
|
-
Hash.prototype.has = _hashHas;
|
|
715
|
-
Hash.prototype.set = _hashSet;
|
|
716
|
-
|
|
717
|
-
var _Hash = Hash;
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
* Removes all key-value entries from the list cache.
|
|
721
|
-
*
|
|
722
|
-
* @private
|
|
723
|
-
* @name clear
|
|
724
|
-
* @memberOf ListCache
|
|
725
|
-
*/
|
|
726
|
-
function listCacheClear() {
|
|
727
|
-
this.__data__ = [];
|
|
728
|
-
this.size = 0;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
var _listCacheClear = listCacheClear;
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* Performs a
|
|
735
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
736
|
-
* comparison between two values to determine if they are equivalent.
|
|
737
|
-
*
|
|
738
|
-
* @static
|
|
739
|
-
* @memberOf _
|
|
740
|
-
* @since 4.0.0
|
|
741
|
-
* @category Lang
|
|
742
|
-
* @param {*} value The value to compare.
|
|
743
|
-
* @param {*} other The other value to compare.
|
|
744
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
745
|
-
* @example
|
|
746
|
-
*
|
|
747
|
-
* var object = { 'a': 1 };
|
|
748
|
-
* var other = { 'a': 1 };
|
|
749
|
-
*
|
|
750
|
-
* _.eq(object, object);
|
|
751
|
-
* // => true
|
|
752
|
-
*
|
|
753
|
-
* _.eq(object, other);
|
|
754
|
-
* // => false
|
|
755
|
-
*
|
|
756
|
-
* _.eq('a', 'a');
|
|
757
|
-
* // => true
|
|
758
|
-
*
|
|
759
|
-
* _.eq('a', Object('a'));
|
|
760
|
-
* // => false
|
|
761
|
-
*
|
|
762
|
-
* _.eq(NaN, NaN);
|
|
763
|
-
* // => true
|
|
764
|
-
*/
|
|
765
|
-
function eq(value, other) {
|
|
766
|
-
return value === other || (value !== value && other !== other);
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
var eq_1 = eq;
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
773
|
-
*
|
|
774
|
-
* @private
|
|
775
|
-
* @param {Array} array The array to inspect.
|
|
776
|
-
* @param {*} key The key to search for.
|
|
777
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
778
|
-
*/
|
|
779
|
-
function assocIndexOf(array, key) {
|
|
780
|
-
var length = array.length;
|
|
781
|
-
while (length--) {
|
|
782
|
-
if (eq_1(array[length][0], key)) {
|
|
783
|
-
return length;
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
return -1;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
var _assocIndexOf = assocIndexOf;
|
|
790
|
-
|
|
791
|
-
/** Used for built-in method references. */
|
|
792
|
-
var arrayProto = Array.prototype;
|
|
793
|
-
|
|
794
|
-
/** Built-in value references. */
|
|
795
|
-
var splice = arrayProto.splice;
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* Removes `key` and its value from the list cache.
|
|
799
|
-
*
|
|
800
|
-
* @private
|
|
801
|
-
* @name delete
|
|
802
|
-
* @memberOf ListCache
|
|
803
|
-
* @param {string} key The key of the value to remove.
|
|
804
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
805
|
-
*/
|
|
806
|
-
function listCacheDelete(key) {
|
|
807
|
-
var data = this.__data__,
|
|
808
|
-
index = _assocIndexOf(data, key);
|
|
809
|
-
|
|
810
|
-
if (index < 0) {
|
|
811
|
-
return false;
|
|
812
|
-
}
|
|
813
|
-
var lastIndex = data.length - 1;
|
|
814
|
-
if (index == lastIndex) {
|
|
815
|
-
data.pop();
|
|
816
|
-
} else {
|
|
817
|
-
splice.call(data, index, 1);
|
|
818
|
-
}
|
|
819
|
-
--this.size;
|
|
820
|
-
return true;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
var _listCacheDelete = listCacheDelete;
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* Gets the list cache value for `key`.
|
|
827
|
-
*
|
|
828
|
-
* @private
|
|
829
|
-
* @name get
|
|
830
|
-
* @memberOf ListCache
|
|
831
|
-
* @param {string} key The key of the value to get.
|
|
832
|
-
* @returns {*} Returns the entry value.
|
|
833
|
-
*/
|
|
834
|
-
function listCacheGet(key) {
|
|
835
|
-
var data = this.__data__,
|
|
836
|
-
index = _assocIndexOf(data, key);
|
|
837
|
-
|
|
838
|
-
return index < 0 ? undefined : data[index][1];
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
var _listCacheGet = listCacheGet;
|
|
842
|
-
|
|
843
|
-
/**
|
|
844
|
-
* Checks if a list cache value for `key` exists.
|
|
845
|
-
*
|
|
846
|
-
* @private
|
|
847
|
-
* @name has
|
|
848
|
-
* @memberOf ListCache
|
|
849
|
-
* @param {string} key The key of the entry to check.
|
|
850
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
851
|
-
*/
|
|
852
|
-
function listCacheHas(key) {
|
|
853
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
var _listCacheHas = listCacheHas;
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* Sets the list cache `key` to `value`.
|
|
860
|
-
*
|
|
861
|
-
* @private
|
|
862
|
-
* @name set
|
|
863
|
-
* @memberOf ListCache
|
|
864
|
-
* @param {string} key The key of the value to set.
|
|
865
|
-
* @param {*} value The value to set.
|
|
866
|
-
* @returns {Object} Returns the list cache instance.
|
|
867
|
-
*/
|
|
868
|
-
function listCacheSet(key, value) {
|
|
869
|
-
var data = this.__data__,
|
|
870
|
-
index = _assocIndexOf(data, key);
|
|
871
|
-
|
|
872
|
-
if (index < 0) {
|
|
873
|
-
++this.size;
|
|
874
|
-
data.push([key, value]);
|
|
875
|
-
} else {
|
|
876
|
-
data[index][1] = value;
|
|
877
|
-
}
|
|
878
|
-
return this;
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
var _listCacheSet = listCacheSet;
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* Creates an list cache object.
|
|
885
|
-
*
|
|
886
|
-
* @private
|
|
887
|
-
* @constructor
|
|
888
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
889
|
-
*/
|
|
890
|
-
function ListCache(entries) {
|
|
891
|
-
var index = -1,
|
|
892
|
-
length = entries == null ? 0 : entries.length;
|
|
893
|
-
|
|
894
|
-
this.clear();
|
|
895
|
-
while (++index < length) {
|
|
896
|
-
var entry = entries[index];
|
|
897
|
-
this.set(entry[0], entry[1]);
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
// Add methods to `ListCache`.
|
|
902
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
903
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
904
|
-
ListCache.prototype.get = _listCacheGet;
|
|
905
|
-
ListCache.prototype.has = _listCacheHas;
|
|
906
|
-
ListCache.prototype.set = _listCacheSet;
|
|
907
|
-
|
|
908
|
-
var _ListCache = ListCache;
|
|
909
|
-
|
|
910
|
-
/* Built-in method references that are verified to be native. */
|
|
911
|
-
var Map = _getNative(_root, 'Map');
|
|
912
|
-
|
|
913
|
-
var _Map = Map;
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* Removes all key-value entries from the map.
|
|
917
|
-
*
|
|
918
|
-
* @private
|
|
919
|
-
* @name clear
|
|
920
|
-
* @memberOf MapCache
|
|
921
|
-
*/
|
|
922
|
-
function mapCacheClear() {
|
|
923
|
-
this.size = 0;
|
|
924
|
-
this.__data__ = {
|
|
925
|
-
'hash': new _Hash,
|
|
926
|
-
'map': new (_Map || _ListCache),
|
|
927
|
-
'string': new _Hash
|
|
928
|
-
};
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
var _mapCacheClear = mapCacheClear;
|
|
932
|
-
|
|
933
|
-
/**
|
|
934
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
935
|
-
*
|
|
936
|
-
* @private
|
|
937
|
-
* @param {*} value The value to check.
|
|
938
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
939
|
-
*/
|
|
940
|
-
function isKeyable(value) {
|
|
941
|
-
var type = typeof value;
|
|
942
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
943
|
-
? (value !== '__proto__')
|
|
944
|
-
: (value === null);
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
var _isKeyable = isKeyable;
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* Gets the data for `map`.
|
|
951
|
-
*
|
|
952
|
-
* @private
|
|
953
|
-
* @param {Object} map The map to query.
|
|
954
|
-
* @param {string} key The reference key.
|
|
955
|
-
* @returns {*} Returns the map data.
|
|
956
|
-
*/
|
|
957
|
-
function getMapData(map, key) {
|
|
958
|
-
var data = map.__data__;
|
|
959
|
-
return _isKeyable(key)
|
|
960
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
961
|
-
: data.map;
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
var _getMapData = getMapData;
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* Removes `key` and its value from the map.
|
|
968
|
-
*
|
|
969
|
-
* @private
|
|
970
|
-
* @name delete
|
|
971
|
-
* @memberOf MapCache
|
|
972
|
-
* @param {string} key The key of the value to remove.
|
|
973
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
974
|
-
*/
|
|
975
|
-
function mapCacheDelete(key) {
|
|
976
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
977
|
-
this.size -= result ? 1 : 0;
|
|
978
|
-
return result;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* Gets the map value for `key`.
|
|
985
|
-
*
|
|
986
|
-
* @private
|
|
987
|
-
* @name get
|
|
988
|
-
* @memberOf MapCache
|
|
989
|
-
* @param {string} key The key of the value to get.
|
|
990
|
-
* @returns {*} Returns the entry value.
|
|
991
|
-
*/
|
|
992
|
-
function mapCacheGet(key) {
|
|
993
|
-
return _getMapData(this, key).get(key);
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
var _mapCacheGet = mapCacheGet;
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* Checks if a map value for `key` exists.
|
|
1000
|
-
*
|
|
1001
|
-
* @private
|
|
1002
|
-
* @name has
|
|
1003
|
-
* @memberOf MapCache
|
|
1004
|
-
* @param {string} key The key of the entry to check.
|
|
1005
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1006
|
-
*/
|
|
1007
|
-
function mapCacheHas(key) {
|
|
1008
|
-
return _getMapData(this, key).has(key);
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
var _mapCacheHas = mapCacheHas;
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Sets the map `key` to `value`.
|
|
1015
|
-
*
|
|
1016
|
-
* @private
|
|
1017
|
-
* @name set
|
|
1018
|
-
* @memberOf MapCache
|
|
1019
|
-
* @param {string} key The key of the value to set.
|
|
1020
|
-
* @param {*} value The value to set.
|
|
1021
|
-
* @returns {Object} Returns the map cache instance.
|
|
1022
|
-
*/
|
|
1023
|
-
function mapCacheSet(key, value) {
|
|
1024
|
-
var data = _getMapData(this, key),
|
|
1025
|
-
size = data.size;
|
|
1026
|
-
|
|
1027
|
-
data.set(key, value);
|
|
1028
|
-
this.size += data.size == size ? 0 : 1;
|
|
1029
|
-
return this;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
var _mapCacheSet = mapCacheSet;
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* Creates a map cache object to store key-value pairs.
|
|
1036
|
-
*
|
|
1037
|
-
* @private
|
|
1038
|
-
* @constructor
|
|
1039
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1040
|
-
*/
|
|
1041
|
-
function MapCache(entries) {
|
|
1042
|
-
var index = -1,
|
|
1043
|
-
length = entries == null ? 0 : entries.length;
|
|
1044
|
-
|
|
1045
|
-
this.clear();
|
|
1046
|
-
while (++index < length) {
|
|
1047
|
-
var entry = entries[index];
|
|
1048
|
-
this.set(entry[0], entry[1]);
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
// Add methods to `MapCache`.
|
|
1053
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1054
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1055
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1056
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1057
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1058
|
-
|
|
1059
|
-
var _MapCache = MapCache;
|
|
1060
|
-
|
|
1061
|
-
/** Error message constants. */
|
|
1062
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1066
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1067
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1068
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1069
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1070
|
-
*
|
|
1071
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1072
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1073
|
-
* constructor with one whose instances implement the
|
|
1074
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1075
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1076
|
-
*
|
|
1077
|
-
* @static
|
|
1078
|
-
* @memberOf _
|
|
1079
|
-
* @since 0.1.0
|
|
1080
|
-
* @category Function
|
|
1081
|
-
* @param {Function} func The function to have its output memoized.
|
|
1082
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1083
|
-
* @returns {Function} Returns the new memoized function.
|
|
1084
|
-
* @example
|
|
1085
|
-
*
|
|
1086
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1087
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1088
|
-
*
|
|
1089
|
-
* var values = _.memoize(_.values);
|
|
1090
|
-
* values(object);
|
|
1091
|
-
* // => [1, 2]
|
|
1092
|
-
*
|
|
1093
|
-
* values(other);
|
|
1094
|
-
* // => [3, 4]
|
|
1095
|
-
*
|
|
1096
|
-
* object.a = 2;
|
|
1097
|
-
* values(object);
|
|
1098
|
-
* // => [1, 2]
|
|
1099
|
-
*
|
|
1100
|
-
* // Modify the result cache.
|
|
1101
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1102
|
-
* values(object);
|
|
1103
|
-
* // => ['a', 'b']
|
|
1104
|
-
*
|
|
1105
|
-
* // Replace `_.memoize.Cache`.
|
|
1106
|
-
* _.memoize.Cache = WeakMap;
|
|
1107
|
-
*/
|
|
1108
|
-
function memoize(func, resolver) {
|
|
1109
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1110
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1111
|
-
}
|
|
1112
|
-
var memoized = function() {
|
|
1113
|
-
var args = arguments,
|
|
1114
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1115
|
-
cache = memoized.cache;
|
|
1116
|
-
|
|
1117
|
-
if (cache.has(key)) {
|
|
1118
|
-
return cache.get(key);
|
|
1119
|
-
}
|
|
1120
|
-
var result = func.apply(this, args);
|
|
1121
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1122
|
-
return result;
|
|
1123
|
-
};
|
|
1124
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1125
|
-
return memoized;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
// Expose `MapCache`.
|
|
1129
|
-
memoize.Cache = _MapCache;
|
|
1130
|
-
|
|
1131
|
-
var memoize_1 = memoize;
|
|
1132
|
-
|
|
1133
|
-
/** Used as the maximum memoize cache size. */
|
|
1134
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1135
|
-
|
|
1136
|
-
/**
|
|
1137
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1138
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1139
|
-
*
|
|
1140
|
-
* @private
|
|
1141
|
-
* @param {Function} func The function to have its output memoized.
|
|
1142
|
-
* @returns {Function} Returns the new memoized function.
|
|
1143
|
-
*/
|
|
1144
|
-
function memoizeCapped(func) {
|
|
1145
|
-
var result = memoize_1(func, function(key) {
|
|
1146
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1147
|
-
cache.clear();
|
|
1148
|
-
}
|
|
1149
|
-
return key;
|
|
1150
|
-
});
|
|
1151
|
-
|
|
1152
|
-
var cache = result.cache;
|
|
1153
|
-
return result;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
var _memoizeCapped = memoizeCapped;
|
|
1157
|
-
|
|
1158
|
-
/** Used to match property names within property paths. */
|
|
1159
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1160
|
-
|
|
1161
|
-
/** Used to match backslashes in property paths. */
|
|
1162
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1163
|
-
|
|
1164
|
-
/**
|
|
1165
|
-
* Converts `string` to a property path array.
|
|
1166
|
-
*
|
|
1167
|
-
* @private
|
|
1168
|
-
* @param {string} string The string to convert.
|
|
1169
|
-
* @returns {Array} Returns the property path array.
|
|
1170
|
-
*/
|
|
1171
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1172
|
-
var result = [];
|
|
1173
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1174
|
-
result.push('');
|
|
1175
|
-
}
|
|
1176
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1177
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1178
|
-
});
|
|
1179
|
-
return result;
|
|
1180
|
-
});
|
|
1181
|
-
|
|
1182
|
-
var _stringToPath = stringToPath;
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1186
|
-
* shorthands.
|
|
1187
|
-
*
|
|
1188
|
-
* @private
|
|
1189
|
-
* @param {Array} [array] The array to iterate over.
|
|
1190
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1191
|
-
* @returns {Array} Returns the new mapped array.
|
|
1192
|
-
*/
|
|
1193
|
-
function arrayMap(array, iteratee) {
|
|
1194
|
-
var index = -1,
|
|
1195
|
-
length = array == null ? 0 : array.length,
|
|
1196
|
-
result = Array(length);
|
|
1197
|
-
|
|
1198
|
-
while (++index < length) {
|
|
1199
|
-
result[index] = iteratee(array[index], index, array);
|
|
1200
|
-
}
|
|
1201
|
-
return result;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
var _arrayMap = arrayMap;
|
|
1205
|
-
|
|
1206
|
-
/** Used as references for various `Number` constants. */
|
|
1207
|
-
var INFINITY$1 = 1 / 0;
|
|
1208
|
-
|
|
1209
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1210
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1211
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1212
|
-
|
|
1213
|
-
/**
|
|
1214
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1215
|
-
* values to empty strings.
|
|
1216
|
-
*
|
|
1217
|
-
* @private
|
|
1218
|
-
* @param {*} value The value to process.
|
|
1219
|
-
* @returns {string} Returns the string.
|
|
1220
|
-
*/
|
|
1221
|
-
function baseToString(value) {
|
|
1222
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1223
|
-
if (typeof value == 'string') {
|
|
1224
|
-
return value;
|
|
1225
|
-
}
|
|
1226
|
-
if (isArray_1(value)) {
|
|
1227
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
1228
|
-
return _arrayMap(value, baseToString) + '';
|
|
1229
|
-
}
|
|
1230
|
-
if (isSymbol_1(value)) {
|
|
1231
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
1232
|
-
}
|
|
1233
|
-
var result = (value + '');
|
|
1234
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
var _baseToString = baseToString;
|
|
1238
|
-
|
|
1239
|
-
/**
|
|
1240
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
1241
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1242
|
-
*
|
|
1243
|
-
* @static
|
|
1244
|
-
* @memberOf _
|
|
1245
|
-
* @since 4.0.0
|
|
1246
|
-
* @category Lang
|
|
1247
|
-
* @param {*} value The value to convert.
|
|
1248
|
-
* @returns {string} Returns the converted string.
|
|
1249
|
-
* @example
|
|
1250
|
-
*
|
|
1251
|
-
* _.toString(null);
|
|
1252
|
-
* // => ''
|
|
1253
|
-
*
|
|
1254
|
-
* _.toString(-0);
|
|
1255
|
-
* // => '-0'
|
|
1256
|
-
*
|
|
1257
|
-
* _.toString([1, 2, 3]);
|
|
1258
|
-
* // => '1,2,3'
|
|
1259
|
-
*/
|
|
1260
|
-
function toString(value) {
|
|
1261
|
-
return value == null ? '' : _baseToString(value);
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
var toString_1 = toString;
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* Casts `value` to a path array if it's not one.
|
|
1268
|
-
*
|
|
1269
|
-
* @private
|
|
1270
|
-
* @param {*} value The value to inspect.
|
|
1271
|
-
* @param {Object} [object] The object to query keys on.
|
|
1272
|
-
* @returns {Array} Returns the cast property path array.
|
|
1273
|
-
*/
|
|
1274
|
-
function castPath(value, object) {
|
|
1275
|
-
if (isArray_1(value)) {
|
|
1276
|
-
return value;
|
|
1277
|
-
}
|
|
1278
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
var _castPath = castPath;
|
|
1282
|
-
|
|
1283
|
-
/** Used as references for various `Number` constants. */
|
|
1284
|
-
var INFINITY = 1 / 0;
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
1288
|
-
*
|
|
1289
|
-
* @private
|
|
1290
|
-
* @param {*} value The value to inspect.
|
|
1291
|
-
* @returns {string|symbol} Returns the key.
|
|
1292
|
-
*/
|
|
1293
|
-
function toKey(value) {
|
|
1294
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1295
|
-
return value;
|
|
1296
|
-
}
|
|
1297
|
-
var result = (value + '');
|
|
1298
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
var _toKey = toKey;
|
|
1302
|
-
|
|
1303
|
-
/**
|
|
1304
|
-
* The base implementation of `_.get` without support for default values.
|
|
1305
|
-
*
|
|
1306
|
-
* @private
|
|
1307
|
-
* @param {Object} object The object to query.
|
|
1308
|
-
* @param {Array|string} path The path of the property to get.
|
|
1309
|
-
* @returns {*} Returns the resolved value.
|
|
1310
|
-
*/
|
|
1311
|
-
function baseGet(object, path) {
|
|
1312
|
-
path = _castPath(path, object);
|
|
1313
|
-
|
|
1314
|
-
var index = 0,
|
|
1315
|
-
length = path.length;
|
|
1316
|
-
|
|
1317
|
-
while (object != null && index < length) {
|
|
1318
|
-
object = object[_toKey(path[index++])];
|
|
1319
|
-
}
|
|
1320
|
-
return (index && index == length) ? object : undefined;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
var _baseGet = baseGet;
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
1327
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
1328
|
-
*
|
|
1329
|
-
* @static
|
|
1330
|
-
* @memberOf _
|
|
1331
|
-
* @since 3.7.0
|
|
1332
|
-
* @category Object
|
|
1333
|
-
* @param {Object} object The object to query.
|
|
1334
|
-
* @param {Array|string} path The path of the property to get.
|
|
1335
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
1336
|
-
* @returns {*} Returns the resolved value.
|
|
1337
|
-
* @example
|
|
1338
|
-
*
|
|
1339
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
1340
|
-
*
|
|
1341
|
-
* _.get(object, 'a[0].b.c');
|
|
1342
|
-
* // => 3
|
|
1343
|
-
*
|
|
1344
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
1345
|
-
* // => 3
|
|
1346
|
-
*
|
|
1347
|
-
* _.get(object, 'a.b.c', 'default');
|
|
1348
|
-
* // => 'default'
|
|
1349
|
-
*/
|
|
1350
|
-
function get(object, path, defaultValue) {
|
|
1351
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
1352
|
-
return result === undefined ? defaultValue : result;
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
var get_1 = get;
|
|
1356
|
-
|
|
1357
|
-
function _typeof(obj) {
|
|
1358
|
-
"@babel/helpers - typeof";
|
|
1359
|
-
|
|
1360
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1361
|
-
return typeof obj;
|
|
1362
|
-
} : function (obj) {
|
|
1363
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1364
|
-
}, _typeof(obj);
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
/**
|
|
1368
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
1369
|
-
*
|
|
1370
|
-
* This source code is licensed under the MIT license found in the
|
|
1371
|
-
* LICENSE file in the root directory of this source tree.
|
|
1372
|
-
*/
|
|
1373
|
-
|
|
1374
|
-
createCommonjsModule(function (module) {
|
|
1375
|
-
var runtime = (function (exports) {
|
|
1376
|
-
|
|
1377
|
-
var Op = Object.prototype;
|
|
1378
|
-
var hasOwn = Op.hasOwnProperty;
|
|
1379
|
-
var undefined$1; // More compressible than void 0.
|
|
1380
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
1381
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
1382
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
1383
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
1384
|
-
|
|
1385
|
-
function define(obj, key, value) {
|
|
1386
|
-
Object.defineProperty(obj, key, {
|
|
1387
|
-
value: value,
|
|
1388
|
-
enumerable: true,
|
|
1389
|
-
configurable: true,
|
|
1390
|
-
writable: true
|
|
1391
|
-
});
|
|
1392
|
-
return obj[key];
|
|
1393
|
-
}
|
|
1394
|
-
try {
|
|
1395
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
1396
|
-
define({}, "");
|
|
1397
|
-
} catch (err) {
|
|
1398
|
-
define = function(obj, key, value) {
|
|
1399
|
-
return obj[key] = value;
|
|
1400
|
-
};
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
1404
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
1405
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
1406
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
1407
|
-
var context = new Context(tryLocsList || []);
|
|
1408
|
-
|
|
1409
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
1410
|
-
// .throw, and .return methods.
|
|
1411
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
1412
|
-
|
|
1413
|
-
return generator;
|
|
1414
|
-
}
|
|
1415
|
-
exports.wrap = wrap;
|
|
1416
|
-
|
|
1417
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
1418
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
1419
|
-
// have been (and was previously) designed to take a closure to be
|
|
1420
|
-
// invoked without arguments, but in all the cases we care about we
|
|
1421
|
-
// already have an existing method we want to call, so there's no need
|
|
1422
|
-
// to create a new function object. We can even get away with assuming
|
|
1423
|
-
// the method takes exactly one argument, since that happens to be true
|
|
1424
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
1425
|
-
// only additional allocation required is the completion record, which
|
|
1426
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
1427
|
-
function tryCatch(fn, obj, arg) {
|
|
1428
|
-
try {
|
|
1429
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
1430
|
-
} catch (err) {
|
|
1431
|
-
return { type: "throw", arg: err };
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
1436
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
1437
|
-
var GenStateExecuting = "executing";
|
|
1438
|
-
var GenStateCompleted = "completed";
|
|
1439
|
-
|
|
1440
|
-
// Returning this object from the innerFn has the same effect as
|
|
1441
|
-
// breaking out of the dispatch switch statement.
|
|
1442
|
-
var ContinueSentinel = {};
|
|
1443
|
-
|
|
1444
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
1445
|
-
// .constructor.prototype properties for functions that return Generator
|
|
1446
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
1447
|
-
// minifier not to mangle the names of these two functions.
|
|
1448
|
-
function Generator() {}
|
|
1449
|
-
function GeneratorFunction() {}
|
|
1450
|
-
function GeneratorFunctionPrototype() {}
|
|
1451
|
-
|
|
1452
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
1453
|
-
// don't natively support it.
|
|
1454
|
-
var IteratorPrototype = {};
|
|
1455
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
1456
|
-
return this;
|
|
1457
|
-
});
|
|
1458
|
-
|
|
1459
|
-
var getProto = Object.getPrototypeOf;
|
|
1460
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
1461
|
-
if (NativeIteratorPrototype &&
|
|
1462
|
-
NativeIteratorPrototype !== Op &&
|
|
1463
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
1464
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
1465
|
-
// of the polyfill.
|
|
1466
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
1470
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
1471
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
1472
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
1473
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
1474
|
-
GeneratorFunction.displayName = define(
|
|
1475
|
-
GeneratorFunctionPrototype,
|
|
1476
|
-
toStringTagSymbol,
|
|
1477
|
-
"GeneratorFunction"
|
|
1478
|
-
);
|
|
1479
|
-
|
|
1480
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
1481
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
1482
|
-
function defineIteratorMethods(prototype) {
|
|
1483
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
1484
|
-
define(prototype, method, function(arg) {
|
|
1485
|
-
return this._invoke(method, arg);
|
|
1486
|
-
});
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
1491
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
1492
|
-
return ctor
|
|
1493
|
-
? ctor === GeneratorFunction ||
|
|
1494
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
1495
|
-
// do is to check its .name property.
|
|
1496
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
1497
|
-
: false;
|
|
1498
|
-
};
|
|
1499
|
-
|
|
1500
|
-
exports.mark = function(genFun) {
|
|
1501
|
-
if (Object.setPrototypeOf) {
|
|
1502
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
1503
|
-
} else {
|
|
1504
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
1505
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
1506
|
-
}
|
|
1507
|
-
genFun.prototype = Object.create(Gp);
|
|
1508
|
-
return genFun;
|
|
1509
|
-
};
|
|
1510
|
-
|
|
1511
|
-
// Within the body of any async function, `await x` is transformed to
|
|
1512
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
1513
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
1514
|
-
// meant to be awaited.
|
|
1515
|
-
exports.awrap = function(arg) {
|
|
1516
|
-
return { __await: arg };
|
|
1517
|
-
};
|
|
1518
|
-
|
|
1519
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
1520
|
-
function invoke(method, arg, resolve, reject) {
|
|
1521
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
1522
|
-
if (record.type === "throw") {
|
|
1523
|
-
reject(record.arg);
|
|
1524
|
-
} else {
|
|
1525
|
-
var result = record.arg;
|
|
1526
|
-
var value = result.value;
|
|
1527
|
-
if (value &&
|
|
1528
|
-
typeof value === "object" &&
|
|
1529
|
-
hasOwn.call(value, "__await")) {
|
|
1530
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
1531
|
-
invoke("next", value, resolve, reject);
|
|
1532
|
-
}, function(err) {
|
|
1533
|
-
invoke("throw", err, resolve, reject);
|
|
1534
|
-
});
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
1538
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
1539
|
-
// the .value of the Promise<{value,done}> result for the
|
|
1540
|
-
// current iteration.
|
|
1541
|
-
result.value = unwrapped;
|
|
1542
|
-
resolve(result);
|
|
1543
|
-
}, function(error) {
|
|
1544
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
1545
|
-
// into the async generator function so it can be handled there.
|
|
1546
|
-
return invoke("throw", error, resolve, reject);
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
var previousPromise;
|
|
1552
|
-
|
|
1553
|
-
function enqueue(method, arg) {
|
|
1554
|
-
function callInvokeWithMethodAndArg() {
|
|
1555
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
1556
|
-
invoke(method, arg, resolve, reject);
|
|
1557
|
-
});
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
return previousPromise =
|
|
1561
|
-
// If enqueue has been called before, then we want to wait until
|
|
1562
|
-
// all previous Promises have been resolved before calling invoke,
|
|
1563
|
-
// so that results are always delivered in the correct order. If
|
|
1564
|
-
// enqueue has not been called before, then it is important to
|
|
1565
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
1566
|
-
// so that the async generator function has the opportunity to do
|
|
1567
|
-
// any necessary setup in a predictable way. This predictability
|
|
1568
|
-
// is why the Promise constructor synchronously invokes its
|
|
1569
|
-
// executor callback, and why async functions synchronously
|
|
1570
|
-
// execute code before the first await. Since we implement simple
|
|
1571
|
-
// async functions in terms of async generators, it is especially
|
|
1572
|
-
// important to get this right, even though it requires care.
|
|
1573
|
-
previousPromise ? previousPromise.then(
|
|
1574
|
-
callInvokeWithMethodAndArg,
|
|
1575
|
-
// Avoid propagating failures to Promises returned by later
|
|
1576
|
-
// invocations of the iterator.
|
|
1577
|
-
callInvokeWithMethodAndArg
|
|
1578
|
-
) : callInvokeWithMethodAndArg();
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
// Define the unified helper method that is used to implement .next,
|
|
1582
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
1583
|
-
this._invoke = enqueue;
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
1587
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
1588
|
-
return this;
|
|
1589
|
-
});
|
|
1590
|
-
exports.AsyncIterator = AsyncIterator;
|
|
1591
|
-
|
|
1592
|
-
// Note that simple async functions are implemented on top of
|
|
1593
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
1594
|
-
// the final result produced by the iterator.
|
|
1595
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
1596
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
1597
|
-
|
|
1598
|
-
var iter = new AsyncIterator(
|
|
1599
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
1600
|
-
PromiseImpl
|
|
1601
|
-
);
|
|
1602
|
-
|
|
1603
|
-
return exports.isGeneratorFunction(outerFn)
|
|
1604
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
1605
|
-
: iter.next().then(function(result) {
|
|
1606
|
-
return result.done ? result.value : iter.next();
|
|
1607
|
-
});
|
|
1608
|
-
};
|
|
1609
|
-
|
|
1610
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
1611
|
-
var state = GenStateSuspendedStart;
|
|
1612
|
-
|
|
1613
|
-
return function invoke(method, arg) {
|
|
1614
|
-
if (state === GenStateExecuting) {
|
|
1615
|
-
throw new Error("Generator is already running");
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
if (state === GenStateCompleted) {
|
|
1619
|
-
if (method === "throw") {
|
|
1620
|
-
throw arg;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
1624
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
1625
|
-
return doneResult();
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
context.method = method;
|
|
1629
|
-
context.arg = arg;
|
|
1630
|
-
|
|
1631
|
-
while (true) {
|
|
1632
|
-
var delegate = context.delegate;
|
|
1633
|
-
if (delegate) {
|
|
1634
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
1635
|
-
if (delegateResult) {
|
|
1636
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
1637
|
-
return delegateResult;
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
if (context.method === "next") {
|
|
1642
|
-
// Setting context._sent for legacy support of Babel's
|
|
1643
|
-
// function.sent implementation.
|
|
1644
|
-
context.sent = context._sent = context.arg;
|
|
1645
|
-
|
|
1646
|
-
} else if (context.method === "throw") {
|
|
1647
|
-
if (state === GenStateSuspendedStart) {
|
|
1648
|
-
state = GenStateCompleted;
|
|
1649
|
-
throw context.arg;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
context.dispatchException(context.arg);
|
|
1653
|
-
|
|
1654
|
-
} else if (context.method === "return") {
|
|
1655
|
-
context.abrupt("return", context.arg);
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
state = GenStateExecuting;
|
|
1659
|
-
|
|
1660
|
-
var record = tryCatch(innerFn, self, context);
|
|
1661
|
-
if (record.type === "normal") {
|
|
1662
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
1663
|
-
// GenStateExecuting and loop back for another invocation.
|
|
1664
|
-
state = context.done
|
|
1665
|
-
? GenStateCompleted
|
|
1666
|
-
: GenStateSuspendedYield;
|
|
1667
|
-
|
|
1668
|
-
if (record.arg === ContinueSentinel) {
|
|
1669
|
-
continue;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
return {
|
|
1673
|
-
value: record.arg,
|
|
1674
|
-
done: context.done
|
|
1675
|
-
};
|
|
1676
|
-
|
|
1677
|
-
} else if (record.type === "throw") {
|
|
1678
|
-
state = GenStateCompleted;
|
|
1679
|
-
// Dispatch the exception by looping back around to the
|
|
1680
|
-
// context.dispatchException(context.arg) call above.
|
|
1681
|
-
context.method = "throw";
|
|
1682
|
-
context.arg = record.arg;
|
|
1683
|
-
}
|
|
1684
|
-
}
|
|
1685
|
-
};
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
1689
|
-
// result, either by returning a { value, done } result from the
|
|
1690
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
1691
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
1692
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
1693
|
-
var method = delegate.iterator[context.method];
|
|
1694
|
-
if (method === undefined$1) {
|
|
1695
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
1696
|
-
// method always terminates the yield* loop.
|
|
1697
|
-
context.delegate = null;
|
|
1698
|
-
|
|
1699
|
-
if (context.method === "throw") {
|
|
1700
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
1701
|
-
if (delegate.iterator["return"]) {
|
|
1702
|
-
// If the delegate iterator has a return method, give it a
|
|
1703
|
-
// chance to clean up.
|
|
1704
|
-
context.method = "return";
|
|
1705
|
-
context.arg = undefined$1;
|
|
1706
|
-
maybeInvokeDelegate(delegate, context);
|
|
1707
|
-
|
|
1708
|
-
if (context.method === "throw") {
|
|
1709
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
1710
|
-
// "return" to "throw", let that override the TypeError below.
|
|
1711
|
-
return ContinueSentinel;
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
context.method = "throw";
|
|
1716
|
-
context.arg = new TypeError(
|
|
1717
|
-
"The iterator does not provide a 'throw' method");
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
return ContinueSentinel;
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
1724
|
-
|
|
1725
|
-
if (record.type === "throw") {
|
|
1726
|
-
context.method = "throw";
|
|
1727
|
-
context.arg = record.arg;
|
|
1728
|
-
context.delegate = null;
|
|
1729
|
-
return ContinueSentinel;
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
var info = record.arg;
|
|
1733
|
-
|
|
1734
|
-
if (! info) {
|
|
1735
|
-
context.method = "throw";
|
|
1736
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
1737
|
-
context.delegate = null;
|
|
1738
|
-
return ContinueSentinel;
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
if (info.done) {
|
|
1742
|
-
// Assign the result of the finished delegate to the temporary
|
|
1743
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
1744
|
-
context[delegate.resultName] = info.value;
|
|
1745
|
-
|
|
1746
|
-
// Resume execution at the desired location (see delegateYield).
|
|
1747
|
-
context.next = delegate.nextLoc;
|
|
1748
|
-
|
|
1749
|
-
// If context.method was "throw" but the delegate handled the
|
|
1750
|
-
// exception, let the outer generator proceed normally. If
|
|
1751
|
-
// context.method was "next", forget context.arg since it has been
|
|
1752
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
1753
|
-
// "return", allow the original .return call to continue in the
|
|
1754
|
-
// outer generator.
|
|
1755
|
-
if (context.method !== "return") {
|
|
1756
|
-
context.method = "next";
|
|
1757
|
-
context.arg = undefined$1;
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
} else {
|
|
1761
|
-
// Re-yield the result returned by the delegate method.
|
|
1762
|
-
return info;
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
1766
|
-
// the outer generator.
|
|
1767
|
-
context.delegate = null;
|
|
1768
|
-
return ContinueSentinel;
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
1772
|
-
// unified ._invoke helper method.
|
|
1773
|
-
defineIteratorMethods(Gp);
|
|
1774
|
-
|
|
1775
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
1776
|
-
|
|
1777
|
-
// A Generator should always return itself as the iterator object when the
|
|
1778
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
1779
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
1780
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1781
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1782
|
-
define(Gp, iteratorSymbol, function() {
|
|
1783
|
-
return this;
|
|
1784
|
-
});
|
|
1785
|
-
|
|
1786
|
-
define(Gp, "toString", function() {
|
|
1787
|
-
return "[object Generator]";
|
|
1788
|
-
});
|
|
1789
|
-
|
|
1790
|
-
function pushTryEntry(locs) {
|
|
1791
|
-
var entry = { tryLoc: locs[0] };
|
|
1792
|
-
|
|
1793
|
-
if (1 in locs) {
|
|
1794
|
-
entry.catchLoc = locs[1];
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
if (2 in locs) {
|
|
1798
|
-
entry.finallyLoc = locs[2];
|
|
1799
|
-
entry.afterLoc = locs[3];
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
this.tryEntries.push(entry);
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
function resetTryEntry(entry) {
|
|
1806
|
-
var record = entry.completion || {};
|
|
1807
|
-
record.type = "normal";
|
|
1808
|
-
delete record.arg;
|
|
1809
|
-
entry.completion = record;
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
function Context(tryLocsList) {
|
|
1813
|
-
// The root entry object (effectively a try statement without a catch
|
|
1814
|
-
// or a finally block) gives us a place to store values thrown from
|
|
1815
|
-
// locations where there is no enclosing try statement.
|
|
1816
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
1817
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
1818
|
-
this.reset(true);
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
exports.keys = function(object) {
|
|
1822
|
-
var keys = [];
|
|
1823
|
-
for (var key in object) {
|
|
1824
|
-
keys.push(key);
|
|
1825
|
-
}
|
|
1826
|
-
keys.reverse();
|
|
1827
|
-
|
|
1828
|
-
// Rather than returning an object with a next method, we keep
|
|
1829
|
-
// things simple and return the next function itself.
|
|
1830
|
-
return function next() {
|
|
1831
|
-
while (keys.length) {
|
|
1832
|
-
var key = keys.pop();
|
|
1833
|
-
if (key in object) {
|
|
1834
|
-
next.value = key;
|
|
1835
|
-
next.done = false;
|
|
1836
|
-
return next;
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
// To avoid creating an additional object, we just hang the .value
|
|
1841
|
-
// and .done properties off the next function object itself. This
|
|
1842
|
-
// also ensures that the minifier will not anonymize the function.
|
|
1843
|
-
next.done = true;
|
|
1844
|
-
return next;
|
|
1845
|
-
};
|
|
1846
|
-
};
|
|
1847
|
-
|
|
1848
|
-
function values(iterable) {
|
|
1849
|
-
if (iterable) {
|
|
1850
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
1851
|
-
if (iteratorMethod) {
|
|
1852
|
-
return iteratorMethod.call(iterable);
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
if (typeof iterable.next === "function") {
|
|
1856
|
-
return iterable;
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
if (!isNaN(iterable.length)) {
|
|
1860
|
-
var i = -1, next = function next() {
|
|
1861
|
-
while (++i < iterable.length) {
|
|
1862
|
-
if (hasOwn.call(iterable, i)) {
|
|
1863
|
-
next.value = iterable[i];
|
|
1864
|
-
next.done = false;
|
|
1865
|
-
return next;
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
next.value = undefined$1;
|
|
1870
|
-
next.done = true;
|
|
1871
|
-
|
|
1872
|
-
return next;
|
|
1873
|
-
};
|
|
1874
|
-
|
|
1875
|
-
return next.next = next;
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
|
-
// Return an iterator with no values.
|
|
1880
|
-
return { next: doneResult };
|
|
1881
|
-
}
|
|
1882
|
-
exports.values = values;
|
|
1883
|
-
|
|
1884
|
-
function doneResult() {
|
|
1885
|
-
return { value: undefined$1, done: true };
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
Context.prototype = {
|
|
1889
|
-
constructor: Context,
|
|
1890
|
-
|
|
1891
|
-
reset: function(skipTempReset) {
|
|
1892
|
-
this.prev = 0;
|
|
1893
|
-
this.next = 0;
|
|
1894
|
-
// Resetting context._sent for legacy support of Babel's
|
|
1895
|
-
// function.sent implementation.
|
|
1896
|
-
this.sent = this._sent = undefined$1;
|
|
1897
|
-
this.done = false;
|
|
1898
|
-
this.delegate = null;
|
|
1899
|
-
|
|
1900
|
-
this.method = "next";
|
|
1901
|
-
this.arg = undefined$1;
|
|
1902
|
-
|
|
1903
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
1904
|
-
|
|
1905
|
-
if (!skipTempReset) {
|
|
1906
|
-
for (var name in this) {
|
|
1907
|
-
// Not sure about the optimal order of these conditions:
|
|
1908
|
-
if (name.charAt(0) === "t" &&
|
|
1909
|
-
hasOwn.call(this, name) &&
|
|
1910
|
-
!isNaN(+name.slice(1))) {
|
|
1911
|
-
this[name] = undefined$1;
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
},
|
|
1916
|
-
|
|
1917
|
-
stop: function() {
|
|
1918
|
-
this.done = true;
|
|
1919
|
-
|
|
1920
|
-
var rootEntry = this.tryEntries[0];
|
|
1921
|
-
var rootRecord = rootEntry.completion;
|
|
1922
|
-
if (rootRecord.type === "throw") {
|
|
1923
|
-
throw rootRecord.arg;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
return this.rval;
|
|
1927
|
-
},
|
|
1928
|
-
|
|
1929
|
-
dispatchException: function(exception) {
|
|
1930
|
-
if (this.done) {
|
|
1931
|
-
throw exception;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
var context = this;
|
|
1935
|
-
function handle(loc, caught) {
|
|
1936
|
-
record.type = "throw";
|
|
1937
|
-
record.arg = exception;
|
|
1938
|
-
context.next = loc;
|
|
1939
|
-
|
|
1940
|
-
if (caught) {
|
|
1941
|
-
// If the dispatched exception was caught by a catch block,
|
|
1942
|
-
// then let that catch block handle the exception normally.
|
|
1943
|
-
context.method = "next";
|
|
1944
|
-
context.arg = undefined$1;
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
return !! caught;
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1951
|
-
var entry = this.tryEntries[i];
|
|
1952
|
-
var record = entry.completion;
|
|
1953
|
-
|
|
1954
|
-
if (entry.tryLoc === "root") {
|
|
1955
|
-
// Exception thrown outside of any try block that could handle
|
|
1956
|
-
// it, so set the completion value of the entire function to
|
|
1957
|
-
// throw the exception.
|
|
1958
|
-
return handle("end");
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
if (entry.tryLoc <= this.prev) {
|
|
1962
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
1963
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
1964
|
-
|
|
1965
|
-
if (hasCatch && hasFinally) {
|
|
1966
|
-
if (this.prev < entry.catchLoc) {
|
|
1967
|
-
return handle(entry.catchLoc, true);
|
|
1968
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
1969
|
-
return handle(entry.finallyLoc);
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
} else if (hasCatch) {
|
|
1973
|
-
if (this.prev < entry.catchLoc) {
|
|
1974
|
-
return handle(entry.catchLoc, true);
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
} else if (hasFinally) {
|
|
1978
|
-
if (this.prev < entry.finallyLoc) {
|
|
1979
|
-
return handle(entry.finallyLoc);
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
} else {
|
|
1983
|
-
throw new Error("try statement without catch or finally");
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
},
|
|
1988
|
-
|
|
1989
|
-
abrupt: function(type, arg) {
|
|
1990
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1991
|
-
var entry = this.tryEntries[i];
|
|
1992
|
-
if (entry.tryLoc <= this.prev &&
|
|
1993
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
1994
|
-
this.prev < entry.finallyLoc) {
|
|
1995
|
-
var finallyEntry = entry;
|
|
1996
|
-
break;
|
|
1997
|
-
}
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
if (finallyEntry &&
|
|
2001
|
-
(type === "break" ||
|
|
2002
|
-
type === "continue") &&
|
|
2003
|
-
finallyEntry.tryLoc <= arg &&
|
|
2004
|
-
arg <= finallyEntry.finallyLoc) {
|
|
2005
|
-
// Ignore the finally entry if control is not jumping to a
|
|
2006
|
-
// location outside the try/catch block.
|
|
2007
|
-
finallyEntry = null;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
2011
|
-
record.type = type;
|
|
2012
|
-
record.arg = arg;
|
|
2013
|
-
|
|
2014
|
-
if (finallyEntry) {
|
|
2015
|
-
this.method = "next";
|
|
2016
|
-
this.next = finallyEntry.finallyLoc;
|
|
2017
|
-
return ContinueSentinel;
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
return this.complete(record);
|
|
2021
|
-
},
|
|
2022
|
-
|
|
2023
|
-
complete: function(record, afterLoc) {
|
|
2024
|
-
if (record.type === "throw") {
|
|
2025
|
-
throw record.arg;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
if (record.type === "break" ||
|
|
2029
|
-
record.type === "continue") {
|
|
2030
|
-
this.next = record.arg;
|
|
2031
|
-
} else if (record.type === "return") {
|
|
2032
|
-
this.rval = this.arg = record.arg;
|
|
2033
|
-
this.method = "return";
|
|
2034
|
-
this.next = "end";
|
|
2035
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2036
|
-
this.next = afterLoc;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
return ContinueSentinel;
|
|
2040
|
-
},
|
|
2041
|
-
|
|
2042
|
-
finish: function(finallyLoc) {
|
|
2043
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2044
|
-
var entry = this.tryEntries[i];
|
|
2045
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2046
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2047
|
-
resetTryEntry(entry);
|
|
2048
|
-
return ContinueSentinel;
|
|
2049
|
-
}
|
|
2050
|
-
}
|
|
2051
|
-
},
|
|
2052
|
-
|
|
2053
|
-
"catch": function(tryLoc) {
|
|
2054
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2055
|
-
var entry = this.tryEntries[i];
|
|
2056
|
-
if (entry.tryLoc === tryLoc) {
|
|
2057
|
-
var record = entry.completion;
|
|
2058
|
-
if (record.type === "throw") {
|
|
2059
|
-
var thrown = record.arg;
|
|
2060
|
-
resetTryEntry(entry);
|
|
2061
|
-
}
|
|
2062
|
-
return thrown;
|
|
2063
|
-
}
|
|
2064
|
-
}
|
|
2065
|
-
|
|
2066
|
-
// The context.catch method must only be called with a location
|
|
2067
|
-
// argument that corresponds to a known catch block.
|
|
2068
|
-
throw new Error("illegal catch attempt");
|
|
2069
|
-
},
|
|
2070
|
-
|
|
2071
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2072
|
-
this.delegate = {
|
|
2073
|
-
iterator: values(iterable),
|
|
2074
|
-
resultName: resultName,
|
|
2075
|
-
nextLoc: nextLoc
|
|
2076
|
-
};
|
|
2077
|
-
|
|
2078
|
-
if (this.method === "next") {
|
|
2079
|
-
// Deliberately forget the last sent value so that we don't
|
|
2080
|
-
// accidentally pass it on to the delegate.
|
|
2081
|
-
this.arg = undefined$1;
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
return ContinueSentinel;
|
|
2085
|
-
}
|
|
2086
|
-
};
|
|
2087
|
-
|
|
2088
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
2089
|
-
// or not, return the runtime object so that we can declare the variable
|
|
2090
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
2091
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
2092
|
-
return exports;
|
|
2093
|
-
|
|
2094
|
-
}(
|
|
2095
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
2096
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
2097
|
-
// object. Either way, the resulting object will be used to initialize
|
|
2098
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
2099
|
-
module.exports
|
|
2100
|
-
));
|
|
2101
|
-
|
|
2102
|
-
try {
|
|
2103
|
-
regeneratorRuntime = runtime;
|
|
2104
|
-
} catch (accidentalStrictMode) {
|
|
2105
|
-
// This module should not be running in strict mode, so the above
|
|
2106
|
-
// assignment should always work unless something is misconfigured. Just
|
|
2107
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
2108
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
2109
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
2110
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
2111
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
2112
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
2113
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
2114
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
2115
|
-
if (typeof globalThis === "object") {
|
|
2116
|
-
globalThis.regeneratorRuntime = runtime;
|
|
2117
|
-
} else {
|
|
2118
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
});
|
|
2122
|
-
|
|
2123
|
-
/**
|
|
2124
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
2125
|
-
* iteratee shorthands.
|
|
2126
|
-
*
|
|
2127
|
-
* @private
|
|
2128
|
-
* @param {Array} [array] The array to iterate over.
|
|
2129
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2130
|
-
* @param {*} [accumulator] The initial value.
|
|
2131
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
2132
|
-
* the initial value.
|
|
2133
|
-
* @returns {*} Returns the accumulated value.
|
|
2134
|
-
*/
|
|
2135
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
2136
|
-
var index = -1,
|
|
2137
|
-
length = array == null ? 0 : array.length;
|
|
2138
|
-
|
|
2139
|
-
if (initAccum && length) {
|
|
2140
|
-
accumulator = array[++index];
|
|
2141
|
-
}
|
|
2142
|
-
while (++index < length) {
|
|
2143
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
2144
|
-
}
|
|
2145
|
-
return accumulator;
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
var _arrayReduce = arrayReduce;
|
|
2149
|
-
|
|
2150
|
-
/**
|
|
2151
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
2152
|
-
*
|
|
2153
|
-
* @private
|
|
2154
|
-
* @param {Object} object The object to query.
|
|
2155
|
-
* @returns {Function} Returns the new accessor function.
|
|
2156
|
-
*/
|
|
2157
|
-
function basePropertyOf(object) {
|
|
2158
|
-
return function(key) {
|
|
2159
|
-
return object == null ? undefined : object[key];
|
|
2160
|
-
};
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
var _basePropertyOf = basePropertyOf;
|
|
2164
|
-
|
|
2165
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2166
|
-
var deburredLetters = {
|
|
2167
|
-
// Latin-1 Supplement block.
|
|
2168
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2169
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2170
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2171
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2172
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2173
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2174
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2175
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2176
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2177
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2178
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2179
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2180
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2181
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2182
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2183
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2184
|
-
'\xdf': 'ss',
|
|
2185
|
-
// Latin Extended-A block.
|
|
2186
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2187
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2188
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2189
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2190
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2191
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2192
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2193
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2194
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2195
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2196
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2197
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2198
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2199
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2200
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2201
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2202
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2203
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2204
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2205
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2206
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2207
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2208
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2209
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2210
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2211
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2212
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2213
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2214
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2215
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2216
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2217
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2218
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2219
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2220
|
-
'\u0149': "'n", '\u017f': 's'
|
|
2221
|
-
};
|
|
2222
|
-
|
|
2223
|
-
/**
|
|
2224
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2225
|
-
* letters to basic Latin letters.
|
|
2226
|
-
*
|
|
2227
|
-
* @private
|
|
2228
|
-
* @param {string} letter The matched letter to deburr.
|
|
2229
|
-
* @returns {string} Returns the deburred letter.
|
|
2230
|
-
*/
|
|
2231
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2232
|
-
|
|
2233
|
-
var _deburrLetter = deburrLetter;
|
|
2234
|
-
|
|
2235
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2236
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2237
|
-
|
|
2238
|
-
/** Used to compose unicode character classes. */
|
|
2239
|
-
var rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
2240
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
2241
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
2242
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
|
|
2243
|
-
|
|
2244
|
-
/** Used to compose unicode capture groups. */
|
|
2245
|
-
var rsCombo$1 = '[' + rsComboRange$1 + ']';
|
|
2246
|
-
|
|
2247
|
-
/**
|
|
2248
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2249
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2250
|
-
*/
|
|
2251
|
-
var reComboMark = RegExp(rsCombo$1, 'g');
|
|
2252
|
-
|
|
2253
|
-
/**
|
|
2254
|
-
* Deburrs `string` by converting
|
|
2255
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2256
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2257
|
-
* letters to basic Latin letters and removing
|
|
2258
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2259
|
-
*
|
|
2260
|
-
* @static
|
|
2261
|
-
* @memberOf _
|
|
2262
|
-
* @since 3.0.0
|
|
2263
|
-
* @category String
|
|
2264
|
-
* @param {string} [string=''] The string to deburr.
|
|
2265
|
-
* @returns {string} Returns the deburred string.
|
|
2266
|
-
* @example
|
|
2267
|
-
*
|
|
2268
|
-
* _.deburr('déjà vu');
|
|
2269
|
-
* // => 'deja vu'
|
|
2270
|
-
*/
|
|
2271
|
-
function deburr(string) {
|
|
2272
|
-
string = toString_1(string);
|
|
2273
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
var deburr_1 = deburr;
|
|
2277
|
-
|
|
2278
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2279
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2280
|
-
|
|
2281
|
-
/**
|
|
2282
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2283
|
-
*
|
|
2284
|
-
* @private
|
|
2285
|
-
* @param {string} The string to inspect.
|
|
2286
|
-
* @returns {Array} Returns the words of `string`.
|
|
2287
|
-
*/
|
|
2288
|
-
function asciiWords(string) {
|
|
2289
|
-
return string.match(reAsciiWord) || [];
|
|
2290
|
-
}
|
|
2291
|
-
|
|
2292
|
-
var _asciiWords = asciiWords;
|
|
2293
|
-
|
|
2294
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2295
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
2296
|
-
|
|
2297
|
-
/**
|
|
2298
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2299
|
-
*
|
|
2300
|
-
* @private
|
|
2301
|
-
* @param {string} string The string to inspect.
|
|
2302
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2303
|
-
*/
|
|
2304
|
-
function hasUnicodeWord(string) {
|
|
2305
|
-
return reHasUnicodeWord.test(string);
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2309
|
-
|
|
2310
|
-
/** Used to compose unicode character classes. */
|
|
2311
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
2312
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
2313
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
2314
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
2315
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
2316
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2317
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2318
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2319
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2320
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2321
|
-
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
2322
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2323
|
-
rsVarRange = '\\ufe0e\\ufe0f',
|
|
2324
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2325
|
-
|
|
2326
|
-
/** Used to compose unicode capture groups. */
|
|
2327
|
-
var rsApos$1 = "['\u2019]",
|
|
2328
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2329
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
2330
|
-
rsDigits = '\\d+',
|
|
2331
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2332
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2333
|
-
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2334
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
2335
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
2336
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
2337
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2338
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2339
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2340
|
-
rsZWJ = '\\u200d';
|
|
2341
|
-
|
|
2342
|
-
/** Used to compose unicode regexes. */
|
|
2343
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2344
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2345
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2346
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2347
|
-
reOptMod = rsModifier + '?',
|
|
2348
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
2349
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
2350
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2351
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2352
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
2353
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
|
2354
|
-
|
|
2355
|
-
/** Used to match complex or compound words. */
|
|
2356
|
-
var reUnicodeWord = RegExp([
|
|
2357
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2358
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2359
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2360
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2361
|
-
rsOrdUpper,
|
|
2362
|
-
rsOrdLower,
|
|
2363
|
-
rsDigits,
|
|
2364
|
-
rsEmoji
|
|
2365
|
-
].join('|'), 'g');
|
|
2366
|
-
|
|
2367
|
-
/**
|
|
2368
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2369
|
-
*
|
|
2370
|
-
* @private
|
|
2371
|
-
* @param {string} The string to inspect.
|
|
2372
|
-
* @returns {Array} Returns the words of `string`.
|
|
2373
|
-
*/
|
|
2374
|
-
function unicodeWords(string) {
|
|
2375
|
-
return string.match(reUnicodeWord) || [];
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
|
-
var _unicodeWords = unicodeWords;
|
|
2379
|
-
|
|
2380
|
-
/**
|
|
2381
|
-
* Splits `string` into an array of its words.
|
|
2382
|
-
*
|
|
2383
|
-
* @static
|
|
2384
|
-
* @memberOf _
|
|
2385
|
-
* @since 3.0.0
|
|
2386
|
-
* @category String
|
|
2387
|
-
* @param {string} [string=''] The string to inspect.
|
|
2388
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2389
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2390
|
-
* @returns {Array} Returns the words of `string`.
|
|
2391
|
-
* @example
|
|
2392
|
-
*
|
|
2393
|
-
* _.words('fred, barney, & pebbles');
|
|
2394
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2395
|
-
*
|
|
2396
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2397
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2398
|
-
*/
|
|
2399
|
-
function words(string, pattern, guard) {
|
|
2400
|
-
string = toString_1(string);
|
|
2401
|
-
pattern = guard ? undefined : pattern;
|
|
2402
|
-
|
|
2403
|
-
if (pattern === undefined) {
|
|
2404
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2405
|
-
}
|
|
2406
|
-
return string.match(pattern) || [];
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
|
-
var words_1 = words;
|
|
2410
|
-
|
|
2411
|
-
/** Used to compose unicode capture groups. */
|
|
2412
|
-
var rsApos = "['\u2019]";
|
|
2413
|
-
|
|
2414
|
-
/** Used to match apostrophes. */
|
|
2415
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2416
|
-
|
|
2417
|
-
/**
|
|
2418
|
-
* Creates a function like `_.camelCase`.
|
|
2419
|
-
*
|
|
2420
|
-
* @private
|
|
2421
|
-
* @param {Function} callback The function to combine each word.
|
|
2422
|
-
* @returns {Function} Returns the new compounder function.
|
|
2423
|
-
*/
|
|
2424
|
-
function createCompounder(callback) {
|
|
2425
|
-
return function(string) {
|
|
2426
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2427
|
-
};
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
|
-
var _createCompounder = createCompounder;
|
|
2431
|
-
|
|
2432
|
-
/**
|
|
2433
|
-
* Converts `string`, as space separated words, to upper case.
|
|
2434
|
-
*
|
|
2435
|
-
* @static
|
|
2436
|
-
* @memberOf _
|
|
2437
|
-
* @since 4.0.0
|
|
2438
|
-
* @category String
|
|
2439
|
-
* @param {string} [string=''] The string to convert.
|
|
2440
|
-
* @returns {string} Returns the upper cased string.
|
|
2441
|
-
* @example
|
|
2442
|
-
*
|
|
2443
|
-
* _.upperCase('--foo-bar');
|
|
2444
|
-
* // => 'FOO BAR'
|
|
2445
|
-
*
|
|
2446
|
-
* _.upperCase('fooBar');
|
|
2447
|
-
* // => 'FOO BAR'
|
|
2448
|
-
*
|
|
2449
|
-
* _.upperCase('__foo_bar__');
|
|
2450
|
-
* // => 'FOO BAR'
|
|
2451
|
-
*/
|
|
2452
|
-
var upperCase = _createCompounder(function(result, word, index) {
|
|
2453
|
-
return result + (index ? ' ' : '') + word.toUpperCase();
|
|
2454
|
-
});
|
|
2455
|
-
|
|
2456
|
-
var upperCase_1 = upperCase;
|
|
2457
|
-
|
|
2458
|
-
/**
|
|
2459
|
-
* Converts `string`, as space separated words, to lower case.
|
|
2460
|
-
*
|
|
2461
|
-
* @static
|
|
2462
|
-
* @memberOf _
|
|
2463
|
-
* @since 4.0.0
|
|
2464
|
-
* @category String
|
|
2465
|
-
* @param {string} [string=''] The string to convert.
|
|
2466
|
-
* @returns {string} Returns the lower cased string.
|
|
2467
|
-
* @example
|
|
2468
|
-
*
|
|
2469
|
-
* _.lowerCase('--Foo-Bar--');
|
|
2470
|
-
* // => 'foo bar'
|
|
2471
|
-
*
|
|
2472
|
-
* _.lowerCase('fooBar');
|
|
2473
|
-
* // => 'foo bar'
|
|
2474
|
-
*
|
|
2475
|
-
* _.lowerCase('__FOO_BAR__');
|
|
2476
|
-
* // => 'foo bar'
|
|
2477
|
-
*/
|
|
2478
|
-
var lowerCase = _createCompounder(function(result, word, index) {
|
|
2479
|
-
return result + (index ? ' ' : '') + word.toLowerCase();
|
|
2480
|
-
});
|
|
2481
|
-
|
|
2482
|
-
var lowerCase_1 = lowerCase;
|
|
26
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
27
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
2483
28
|
|
|
2484
29
|
function truncate() {
|
|
2485
30
|
var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
@@ -2507,7 +52,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2507
52
|
var localizedMonth = month;
|
|
2508
53
|
|
|
2509
54
|
if (isUpperCase) {
|
|
2510
|
-
localizedMonth =
|
|
55
|
+
localizedMonth = lodash.upperCase(month);
|
|
2511
56
|
}
|
|
2512
57
|
|
|
2513
58
|
var year = dateTime.getFullYear();
|
|
@@ -2520,7 +65,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2520
65
|
var timetoShow;
|
|
2521
66
|
|
|
2522
67
|
if (localizedMonths) {
|
|
2523
|
-
localizedMonth =
|
|
68
|
+
localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
|
|
2524
69
|
}
|
|
2525
70
|
|
|
2526
71
|
if (localizedMeridiem) {
|
|
@@ -2550,17 +95,17 @@ function formatter(value, unit, suffix, date, config) {
|
|
|
2550
95
|
var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
|
|
2551
96
|
// unit here refers to seconds, minute, minutes,...
|
|
2552
97
|
|
|
2553
|
-
var localizedSuffix =
|
|
98
|
+
var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
|
|
2554
99
|
var localizedUnitOfTime;
|
|
2555
100
|
|
|
2556
101
|
if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
|
|
2557
102
|
return timestampToFormat(value, unit, suffix, date, config);
|
|
2558
103
|
} else if (value > 1) {
|
|
2559
|
-
localizedUnitOfTime =
|
|
104
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
|
|
2560
105
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
|
|
2561
106
|
}
|
|
2562
107
|
|
|
2563
|
-
localizedUnitOfTime =
|
|
108
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
|
|
2564
109
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
|
|
2565
110
|
}
|
|
2566
111
|
|
|
@@ -2613,10 +158,10 @@ var clientWidths = {
|
|
|
2613
158
|
tablet: 1024
|
|
2614
159
|
};
|
|
2615
160
|
var clientWidth = function clientWidth(device) {
|
|
2616
|
-
var foundDeviceWidth =
|
|
161
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2617
162
|
|
|
2618
163
|
if (foundDeviceWidth) {
|
|
2619
|
-
return
|
|
164
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2620
165
|
}
|
|
2621
166
|
|
|
2622
167
|
return false;
|
|
@@ -2658,7 +203,7 @@ var getSlug = function getSlug(collection) {
|
|
|
2658
203
|
var isSection = collection.template === "section";
|
|
2659
204
|
|
|
2660
205
|
if (isSection) {
|
|
2661
|
-
var sectionId =
|
|
206
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
2662
207
|
var sections = config.sections;
|
|
2663
208
|
var section = sections && sections.find(function (section) {
|
|
2664
209
|
return section.id === sectionId;
|
|
@@ -2674,11 +219,11 @@ function isExternalStory() {
|
|
|
2674
219
|
storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
|
|
2675
220
|
_story$metadata = story.metadata,
|
|
2676
221
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2677
|
-
return storyTemplate === "news-elsewhere" ?
|
|
222
|
+
return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
|
|
2678
223
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2679
224
|
var isEmpty = function isEmpty(value) {
|
|
2680
225
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2681
|
-
|
|
226
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2682
227
|
};
|
|
2683
228
|
PropTypes__default["default"].shape({
|
|
2684
229
|
"sketches-host": PropTypes__default["default"].string,
|
|
@@ -2692,7 +237,7 @@ PropTypes__default["default"].shape({
|
|
|
2692
237
|
});
|
|
2693
238
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2694
239
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
2695
|
-
return
|
|
240
|
+
return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
|
|
2696
241
|
};
|
|
2697
242
|
var navigateTo = function navigateTo(dispatch) {
|
|
2698
243
|
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2792,7 +337,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2792
337
|
_ref$navigate = _ref.navigate,
|
|
2793
338
|
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
2794
339
|
var collectionTitle = useStateValue() || {};
|
|
2795
|
-
var showRowTitle =
|
|
340
|
+
var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
|
|
2796
341
|
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
2797
342
|
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
2798
343
|
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
@@ -2868,7 +413,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2868
413
|
borderBottom: borderBottomFullStyle
|
|
2869
414
|
},
|
|
2870
415
|
"data-test-id": "collection-name",
|
|
2871
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") +
|
|
416
|
+
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$e)
|
|
2872
417
|
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2873
418
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2874
419
|
style: {
|
|
@@ -2905,7 +450,7 @@ CollectionNameBase.defaultProps = {
|
|
|
2905
450
|
|
|
2906
451
|
function mapStateToProps$1(state) {
|
|
2907
452
|
return {
|
|
2908
|
-
config:
|
|
453
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
2909
454
|
};
|
|
2910
455
|
}
|
|
2911
456
|
|
|
@@ -3145,8 +690,8 @@ var Headline = function Headline(_ref) {
|
|
|
3145
690
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
|
|
3146
691
|
_premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
|
|
3147
692
|
showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
|
|
3148
|
-
var alternateHeadline =
|
|
3149
|
-
var premiumStory = enablePremiumStoryIcon &&
|
|
693
|
+
var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
|
|
694
|
+
var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
|
|
3150
695
|
var headline = alternateHeadline || story.headline;
|
|
3151
696
|
var HeaderTag = "h" + headerLevel;
|
|
3152
697
|
|
|
@@ -3172,10 +717,10 @@ var Headline = function Headline(_ref) {
|
|
|
3172
717
|
var textColor = getTextColor(configData.theme);
|
|
3173
718
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3174
719
|
var iconSize = "24px";
|
|
3175
|
-
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !
|
|
720
|
+
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
|
|
3176
721
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3177
722
|
"data-test-id": "headline",
|
|
3178
|
-
className: "arrow-component arr--headline " +
|
|
723
|
+
className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$d)
|
|
3179
724
|
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3180
725
|
width: iconSize,
|
|
3181
726
|
height: iconSize,
|
|
@@ -3187,9 +732,9 @@ var Headline = function Headline(_ref) {
|
|
|
3187
732
|
externalLink: isExternalStory(story),
|
|
3188
733
|
"aria-label": "headline"
|
|
3189
734
|
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3190
|
-
className:
|
|
735
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
3191
736
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3192
|
-
className:
|
|
737
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
3193
738
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3194
739
|
};
|
|
3195
740
|
Headline.propTypes = {
|
|
@@ -3227,7 +772,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3227
772
|
forceShowAtom = _ref.forceShowAtom,
|
|
3228
773
|
showFullContent = _ref.showFullContent;
|
|
3229
774
|
var config = useStateValue() || {};
|
|
3230
|
-
var subheadline = forceShowAtom ||
|
|
775
|
+
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
3231
776
|
if (!subheadline) return null;
|
|
3232
777
|
var textColor = getTextColor(config.theme);
|
|
3233
778
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -3235,7 +780,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3235
780
|
WebkitLineClamp: lineClamp
|
|
3236
781
|
},
|
|
3237
782
|
"data-test-id": "subheadline",
|
|
3238
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") +
|
|
783
|
+
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName__default["default"]("subheadline ".concat(textColor), _styleModuleImportMap$c)
|
|
3239
784
|
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
3240
785
|
};
|
|
3241
786
|
Subheadline.propTypes = {
|
|
@@ -3270,13 +815,13 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3270
815
|
_ref$config = _ref.config,
|
|
3271
816
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3272
817
|
var configState = useStateValue() || {};
|
|
3273
|
-
var isTime =
|
|
818
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
3274
819
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3275
820
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3276
821
|
var textColor = getTextColor(configState.theme);
|
|
3277
822
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3278
823
|
"data-test-id": "publish-time",
|
|
3279
|
-
className: "time arr--publish-time " +
|
|
824
|
+
className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$b)
|
|
3280
825
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3281
826
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3282
827
|
}, getTimeStamp(time, formatter, config))));
|
|
@@ -3311,9 +856,9 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3311
856
|
_ref$config = _ref.config,
|
|
3312
857
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3313
858
|
var configData = useStateValue() || {};
|
|
3314
|
-
var isAuthor =
|
|
859
|
+
var isAuthor = lodash.get(configData, ["showAuthor"], true);
|
|
3315
860
|
|
|
3316
|
-
var _get =
|
|
861
|
+
var _get = lodash.get(story, ["authors", "0"], ""),
|
|
3317
862
|
avatarUrl = _get["avatar-url"],
|
|
3318
863
|
avatarS3Key = _get["avatar-s3-key"],
|
|
3319
864
|
authorName = _get.name,
|
|
@@ -3321,7 +866,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3321
866
|
|
|
3322
867
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3323
868
|
var textColor = getTextColor(configData.theme);
|
|
3324
|
-
var mountAt =
|
|
869
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
3325
870
|
|
|
3326
871
|
var authorImage = function authorImage(dir) {
|
|
3327
872
|
if (!avatarUrl && !avatarS3Key) {
|
|
@@ -3330,7 +875,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3330
875
|
|
|
3331
876
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3332
877
|
"data-test-id": "author-image",
|
|
3333
|
-
className:
|
|
878
|
+
className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap$a)
|
|
3334
879
|
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3335
880
|
slug: avatarS3Key,
|
|
3336
881
|
"aspect-ratio": [1, 1],
|
|
@@ -3347,7 +892,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3347
892
|
var isPrefix = function isPrefix(dir) {
|
|
3348
893
|
if (prefix) {
|
|
3349
894
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3350
|
-
className: "arr-author-prefix " +
|
|
895
|
+
className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap$a)
|
|
3351
896
|
}, prefix);
|
|
3352
897
|
}
|
|
3353
898
|
|
|
@@ -3357,16 +902,16 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3357
902
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3358
903
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3359
904
|
"aria-label": "author-name",
|
|
3360
|
-
className: "author-name arr-author-name arrow-component " +
|
|
905
|
+
className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap$a)
|
|
3361
906
|
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3362
907
|
"data-test-id": "author-name",
|
|
3363
|
-
className: "author-name " +
|
|
908
|
+
className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap$a)
|
|
3364
909
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
3365
910
|
};
|
|
3366
911
|
|
|
3367
912
|
function mapStateToProps(state) {
|
|
3368
913
|
return {
|
|
3369
|
-
config:
|
|
914
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3370
915
|
};
|
|
3371
916
|
}
|
|
3372
917
|
|
|
@@ -3403,7 +948,7 @@ var Dot = function Dot(_ref) {
|
|
|
3403
948
|
_ref$color = _ref.color,
|
|
3404
949
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3405
950
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3406
|
-
className:
|
|
951
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$9)
|
|
3407
952
|
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3408
953
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3409
954
|
width: width,
|
|
@@ -3439,7 +984,7 @@ var Divider = function Divider(_ref) {
|
|
|
3439
984
|
_ref$color = _ref.color,
|
|
3440
985
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3441
986
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3442
|
-
className:
|
|
987
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$8)
|
|
3443
988
|
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3444
989
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3445
990
|
width: width,
|
|
@@ -3471,14 +1016,14 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3471
1016
|
_ref$isLightTheme = _ref.isLightTheme,
|
|
3472
1017
|
isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
|
|
3473
1018
|
var config = useStateValue() || {};
|
|
3474
|
-
var showReadTime =
|
|
3475
|
-
var readTime =
|
|
1019
|
+
var showReadTime = lodash.get(config, ["showReadTime"]) || lodash.get(opts, ["showReadTime"], true);
|
|
1020
|
+
var readTime = lodash.get(story, ["read-time"], 0);
|
|
3476
1021
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3477
1022
|
if (!showReadTime || !readTime) return null;
|
|
3478
|
-
var timeToRead =
|
|
1023
|
+
var timeToRead = lodash.get(opts, ["localizedTimeToRead"]) || "min read";
|
|
3479
1024
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3480
1025
|
"data-test-id": "read-time",
|
|
3481
|
-
className: "arrow-component arr--read-time " +
|
|
1026
|
+
className: "arrow-component arr--read-time " + _getClassName__default["default"]("read-time-wrapper ".concat(textColor), _styleModuleImportMap$7)
|
|
3482
1027
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3483
1028
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3484
1029
|
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
@@ -3514,9 +1059,9 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3514
1059
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
3515
1060
|
isLightTheme = _ref.isLightTheme;
|
|
3516
1061
|
var configState = useStateValue() || {};
|
|
3517
|
-
var isAuthor =
|
|
3518
|
-
var isTime =
|
|
3519
|
-
var isReadTime =
|
|
1062
|
+
var isAuthor = lodash.get(config, ["showAuthor"], lodash.get(configState, ["showAuthor"], true));
|
|
1063
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
1064
|
+
var isReadTime = lodash.get(configState, ["showReadTime"], true);
|
|
3520
1065
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3521
1066
|
var seperatorStyle = separator === "dot" ? "dot" : "dash";
|
|
3522
1067
|
var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
|
|
@@ -3536,7 +1081,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3536
1081
|
var getTimeStamp = function getTimeStamp() {
|
|
3537
1082
|
if (!isTime) return null;
|
|
3538
1083
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3539
|
-
className: "arr-separator " +
|
|
1084
|
+
className: "arr-separator " + _getClassName__default["default"]("".concat(seperatorStyle), _styleModuleImportMap$6)
|
|
3540
1085
|
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3541
1086
|
story: story,
|
|
3542
1087
|
config: config
|
|
@@ -3548,7 +1093,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3548
1093
|
};
|
|
3549
1094
|
|
|
3550
1095
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3551
|
-
className: "arr--author-time " +
|
|
1096
|
+
className: "arr--author-time " + _getClassName__default["default"]("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$6)
|
|
3552
1097
|
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3553
1098
|
story: story,
|
|
3554
1099
|
isBottom: true,
|
|
@@ -3579,67 +1124,6 @@ AuthorWithTime.defaultProps = {
|
|
|
3579
1124
|
isLightTheme: false
|
|
3580
1125
|
};
|
|
3581
1126
|
|
|
3582
|
-
function _arrayWithHoles(arr) {
|
|
3583
|
-
if (Array.isArray(arr)) return arr;
|
|
3584
|
-
}
|
|
3585
|
-
|
|
3586
|
-
function _iterableToArrayLimit(arr, i) {
|
|
3587
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3588
|
-
|
|
3589
|
-
if (_i == null) return;
|
|
3590
|
-
var _arr = [];
|
|
3591
|
-
var _n = true;
|
|
3592
|
-
var _d = false;
|
|
3593
|
-
|
|
3594
|
-
var _s, _e;
|
|
3595
|
-
|
|
3596
|
-
try {
|
|
3597
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
3598
|
-
_arr.push(_s.value);
|
|
3599
|
-
|
|
3600
|
-
if (i && _arr.length === i) break;
|
|
3601
|
-
}
|
|
3602
|
-
} catch (err) {
|
|
3603
|
-
_d = true;
|
|
3604
|
-
_e = err;
|
|
3605
|
-
} finally {
|
|
3606
|
-
try {
|
|
3607
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3608
|
-
} finally {
|
|
3609
|
-
if (_d) throw _e;
|
|
3610
|
-
}
|
|
3611
|
-
}
|
|
3612
|
-
|
|
3613
|
-
return _arr;
|
|
3614
|
-
}
|
|
3615
|
-
|
|
3616
|
-
function _arrayLikeToArray(arr, len) {
|
|
3617
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3618
|
-
|
|
3619
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
3620
|
-
arr2[i] = arr[i];
|
|
3621
|
-
}
|
|
3622
|
-
|
|
3623
|
-
return arr2;
|
|
3624
|
-
}
|
|
3625
|
-
|
|
3626
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
3627
|
-
if (!o) return;
|
|
3628
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
3629
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3630
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3631
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
3632
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
3633
|
-
}
|
|
3634
|
-
|
|
3635
|
-
function _nonIterableRest() {
|
|
3636
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3637
|
-
}
|
|
3638
|
-
|
|
3639
|
-
function _slicedToArray(arr, i) {
|
|
3640
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
3641
|
-
}
|
|
3642
|
-
|
|
3643
1127
|
var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
3644
1128
|
var _ref$width = _ref.width,
|
|
3645
1129
|
width = _ref$width === void 0 ? 40 : _ref$width,
|
|
@@ -3780,7 +1264,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3780
1264
|
return null;
|
|
3781
1265
|
} : _config$StoryTemplate;
|
|
3782
1266
|
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3783
|
-
return
|
|
1267
|
+
return lodash.get(state, ["qt", "config", "showPlaceholder"]);
|
|
3784
1268
|
});
|
|
3785
1269
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
3786
1270
|
var fullBleed = FullBleed ? "" : "with-padding";
|
|
@@ -3789,7 +1273,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3789
1273
|
var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
|
|
3790
1274
|
|
|
3791
1275
|
var getPadding = function getPadding(aspectRatio) {
|
|
3792
|
-
var _aspectRatio =
|
|
1276
|
+
var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3793
1277
|
height = _aspectRatio[0],
|
|
3794
1278
|
width = _aspectRatio[1];
|
|
3795
1279
|
|
|
@@ -3801,7 +1285,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3801
1285
|
return 0;
|
|
3802
1286
|
};
|
|
3803
1287
|
|
|
3804
|
-
var _aspectRatio2 =
|
|
1288
|
+
var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3805
1289
|
mobileAspectRatio = _aspectRatio2[0],
|
|
3806
1290
|
_aspectRatio2$ = _aspectRatio2[1],
|
|
3807
1291
|
desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
|
|
@@ -3809,8 +1293,8 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3809
1293
|
var isMobile = clientWidth("mobile");
|
|
3810
1294
|
var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
|
|
3811
1295
|
var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
|
|
3812
|
-
var slug =
|
|
3813
|
-
var hyperLink =
|
|
1296
|
+
var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
|
|
1297
|
+
var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
|
|
3814
1298
|
|
|
3815
1299
|
var fallbackImage = function fallbackImage() {
|
|
3816
1300
|
if (!slug) {
|
|
@@ -3819,7 +1303,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3819
1303
|
style: {
|
|
3820
1304
|
paddingTop: imagePadding + "%"
|
|
3821
1305
|
},
|
|
3822
|
-
className: "arr--responsive-hero-image " +
|
|
1306
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3823
1307
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3824
1308
|
className: "qt-image",
|
|
3825
1309
|
"data-src": "".concat(fallbackImageUrl),
|
|
@@ -3832,7 +1316,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3832
1316
|
style: {
|
|
3833
1317
|
paddingTop: imagePadding + "%"
|
|
3834
1318
|
},
|
|
3835
|
-
className: "arr--fallback-hero-image " +
|
|
1319
|
+
className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3836
1320
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3837
1321
|
storyTemplate: story["story-template"]
|
|
3838
1322
|
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
@@ -3842,7 +1326,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3842
1326
|
style: {
|
|
3843
1327
|
paddingTop: imagePadding + "%"
|
|
3844
1328
|
},
|
|
3845
|
-
className: "arr--responsive-hero-image " +
|
|
1329
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3846
1330
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3847
1331
|
storyTemplate: story["story-template"]
|
|
3848
1332
|
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
@@ -3861,13 +1345,13 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3861
1345
|
|
|
3862
1346
|
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3863
1347
|
"data-test-id": "arr--hero-image",
|
|
3864
|
-
className: "arr--hero-image " +
|
|
1348
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$5)
|
|
3865
1349
|
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3866
1350
|
"data-test-id": "arr--hero-image",
|
|
3867
1351
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3868
1352
|
externalLink: isExternalStory(story),
|
|
3869
1353
|
"aria-label": "fallback-hero-image",
|
|
3870
|
-
className: "arr--hero-image " +
|
|
1354
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$5)
|
|
3871
1355
|
}, fallbackImage()));
|
|
3872
1356
|
};
|
|
3873
1357
|
HeroImage.propTypes = {
|
|
@@ -3930,9 +1414,9 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3930
1414
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
|
|
3931
1415
|
isLightTheme = _ref.isLightTheme;
|
|
3932
1416
|
var config = useStateValue() || {};
|
|
3933
|
-
var isSection =
|
|
3934
|
-
var templateFromRowContext =
|
|
3935
|
-
var section =
|
|
1417
|
+
var isSection = lodash.get(config, ["showSection"], true);
|
|
1418
|
+
var templateFromRowContext = lodash.get(config, ["sectionTagTemplate"]);
|
|
1419
|
+
var section = lodash.get(story, ["sections", 0], "");
|
|
3936
1420
|
var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
|
|
3937
1421
|
var getUrl = section ? section["section-url"] : "/";
|
|
3938
1422
|
var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
|
|
@@ -3954,7 +1438,7 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3954
1438
|
style: {
|
|
3955
1439
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3956
1440
|
},
|
|
3957
|
-
className: "section-tag arrow-component " +
|
|
1441
|
+
className: "section-tag arrow-component " + _getClassName__default["default"]("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$4)
|
|
3958
1442
|
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3959
1443
|
className: "section-m_border-left__2oUyp",
|
|
3960
1444
|
style: {
|
|
@@ -4054,7 +1538,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4054
1538
|
backgroundColor: theme,
|
|
4055
1539
|
color: textColor
|
|
4056
1540
|
},
|
|
4057
|
-
className: "arr--story-card " +
|
|
1541
|
+
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$3)
|
|
4058
1542
|
}, children || defaultStorycard);
|
|
4059
1543
|
};
|
|
4060
1544
|
|
|
@@ -4095,7 +1579,7 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4095
1579
|
isHorizontalMobile: isHorizontalMobile,
|
|
4096
1580
|
aspectRatio: aspectRatio
|
|
4097
1581
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4098
|
-
className: "arr--story-content " +
|
|
1582
|
+
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap$3)
|
|
4099
1583
|
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4100
1584
|
story: story,
|
|
4101
1585
|
borderColor: SectionTagborderColor
|
|
@@ -4200,7 +1684,7 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
4200
1684
|
backgroundColor: theme,
|
|
4201
1685
|
color: textColor
|
|
4202
1686
|
},
|
|
4203
|
-
className: "arr--content-wrapper " +
|
|
1687
|
+
className: "arr--content-wrapper " + _getClassName__default["default"]("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$2)
|
|
4204
1688
|
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
4205
1689
|
story: story,
|
|
4206
1690
|
headerLevel: headerLevel,
|
|
@@ -4252,21 +1736,6 @@ StorycardContent.propTypes = {
|
|
|
4252
1736
|
config: PropTypes__default["default"].object
|
|
4253
1737
|
};
|
|
4254
1738
|
|
|
4255
|
-
function _defineProperty(obj, key, value) {
|
|
4256
|
-
if (key in obj) {
|
|
4257
|
-
Object.defineProperty(obj, key, {
|
|
4258
|
-
value: value,
|
|
4259
|
-
enumerable: true,
|
|
4260
|
-
configurable: true,
|
|
4261
|
-
writable: true
|
|
4262
|
-
});
|
|
4263
|
-
} else {
|
|
4264
|
-
obj[key] = value;
|
|
4265
|
-
}
|
|
4266
|
-
|
|
4267
|
-
return obj;
|
|
4268
|
-
}
|
|
4269
|
-
|
|
4270
1739
|
var _styleModuleImportMap$1 = {
|
|
4271
1740
|
"./load-more.m.css": {
|
|
4272
1741
|
"button": "load-more-m_button__1mmf1",
|
|
@@ -4278,7 +1747,7 @@ var _styleModuleImportMap$1 = {
|
|
|
4278
1747
|
|
|
4279
1748
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4280
1749
|
|
|
4281
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
1750
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4282
1751
|
var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
4283
1752
|
var _ref$config = _ref.config,
|
|
4284
1753
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -4302,14 +1771,14 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4302
1771
|
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4303
1772
|
onClick: onClick,
|
|
4304
1773
|
"data-test-id": "load-more",
|
|
4305
|
-
className: "arr--button " +
|
|
1774
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
4306
1775
|
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4307
1776
|
href: slug,
|
|
4308
1777
|
navigateTo: navigate,
|
|
4309
1778
|
"data-test-id": "load-more",
|
|
4310
1779
|
"aria-label": "load-more"
|
|
4311
1780
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4312
|
-
className: "arr--button " +
|
|
1781
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
4313
1782
|
}, buttonText));
|
|
4314
1783
|
};
|
|
4315
1784
|
LoadmoreButton.propTypes = {
|
|
@@ -4363,7 +1832,7 @@ var ThreeColSevenStoryBase = function ThreeColSevenStoryBase(_ref) {
|
|
|
4363
1832
|
navigate = _config$navigate === void 0 ? true : _config$navigate;
|
|
4364
1833
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
4365
1834
|
|
|
4366
|
-
var _get =
|
|
1835
|
+
var _get = lodash.get(slotConfig, [0], {}),
|
|
4367
1836
|
_get$type = _get.type,
|
|
4368
1837
|
type = _get$type === void 0 ? "story" : _get$type,
|
|
4369
1838
|
component = _get.component;
|
|
@@ -4372,7 +1841,7 @@ var ThreeColSevenStoryBase = function ThreeColSevenStoryBase(_ref) {
|
|
|
4372
1841
|
var lastCardBorderBottom = slotConfig === "ad" ? "border-unset" : "";
|
|
4373
1842
|
var dispatch = reactRedux.useDispatch();
|
|
4374
1843
|
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4375
|
-
return
|
|
1844
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
4376
1845
|
});
|
|
4377
1846
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4378
1847
|
|
|
@@ -4418,12 +1887,12 @@ var ThreeColSevenStoryBase = function ThreeColSevenStoryBase(_ref) {
|
|
|
4418
1887
|
return /*#__PURE__*/React__default["default"].createElement("div", null, storyItems.slice(5, 6).map(function (story, index) {
|
|
4419
1888
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4420
1889
|
key: "default-".concat(index),
|
|
4421
|
-
className:
|
|
1890
|
+
className: _getClassName__default["default"]("".concat(borderBottomStyle), _styleModuleImportMap)
|
|
4422
1891
|
}, storyCardComponent(story));
|
|
4423
1892
|
}), storyItems.slice(6, 7).map(function (story, index) {
|
|
4424
1893
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4425
1894
|
key: "default-".concat(index),
|
|
4426
|
-
className:
|
|
1895
|
+
className: _getClassName__default["default"]("".concat(borderBottomStyle), _styleModuleImportMap)
|
|
4427
1896
|
}, storyCardWidthoutBorder(story));
|
|
4428
1897
|
}));
|
|
4429
1898
|
};
|
|
@@ -4450,11 +1919,11 @@ var ThreeColSevenStoryBase = function ThreeColSevenStoryBase(_ref) {
|
|
|
4450
1919
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4451
1920
|
className: "three-col-seven-story-m_three-col-five-stories__7aVjy"
|
|
4452
1921
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4453
|
-
className:
|
|
1922
|
+
className: _getClassName__default["default"]("".concat(Cards), _styleModuleImportMap)
|
|
4454
1923
|
}, storyItems.slice(0, 1).map(function (story, index) {
|
|
4455
1924
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4456
1925
|
key: "default-".concat(index),
|
|
4457
|
-
className:
|
|
1926
|
+
className: _getClassName__default["default"]("".concat(borderBottomStyle), _styleModuleImportMap)
|
|
4458
1927
|
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4459
1928
|
story: story,
|
|
4460
1929
|
theme: theme,
|
|
@@ -4464,21 +1933,21 @@ var ThreeColSevenStoryBase = function ThreeColSevenStoryBase(_ref) {
|
|
|
4464
1933
|
config: config
|
|
4465
1934
|
}));
|
|
4466
1935
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4467
|
-
className:
|
|
1936
|
+
className: _getClassName__default["default"]("".concat(Cards), _styleModuleImportMap)
|
|
4468
1937
|
}, storyItems.slice(1, 3).map(function (story, index) {
|
|
4469
1938
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4470
1939
|
key: "default-".concat(index),
|
|
4471
|
-
className:
|
|
1940
|
+
className: _getClassName__default["default"]("".concat(borderBottomStyle), _styleModuleImportMap)
|
|
4472
1941
|
}, storyCardComponent(story));
|
|
4473
1942
|
}), storyItems.slice(3, 4).map(function (story, index) {
|
|
4474
1943
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4475
1944
|
key: "default-".concat(index),
|
|
4476
|
-
className:
|
|
1945
|
+
className: _getClassName__default["default"]("".concat(borderBottomStyle), _styleModuleImportMap)
|
|
4477
1946
|
}, storyCardWidthoutBorder(story));
|
|
4478
1947
|
})), /*#__PURE__*/React__default["default"].createElement("div", null, storyItems.slice(4, 5).map(function (story, index) {
|
|
4479
1948
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4480
1949
|
key: "default-".concat(index),
|
|
4481
|
-
className:
|
|
1950
|
+
className: _getClassName__default["default"]("".concat(borderBottomStyle, " ").concat(lastCardBorderBottom), _styleModuleImportMap)
|
|
4482
1951
|
}, storyCardComponent(story));
|
|
4483
1952
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4484
1953
|
className: "three-col-seven-story-m_ads__2YttJ"
|