@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.
Files changed (166) hide show
  1. package/atoms/Author/index.js +14 -2103
  2. package/atoms/Author/styles.arrow.css +1 -1
  3. package/atoms/AuthorWithTime/index.js +32 -2482
  4. package/atoms/AuthorWithTime/styles.arrow.css +1 -1
  5. package/atoms/CollectionName/index.js +12 -2101
  6. package/atoms/CollectionName/styles.arrow.css +1 -1
  7. package/atoms/ExtendedLoadMore/{index-b22f1843.js → index-0f809dd9.js} +10 -7
  8. package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
  9. package/atoms/ExtendedLoadMore/{index-bc129cb8.js → index-37a9ccff.js} +18 -10
  10. package/atoms/ExtendedLoadMore/{index-6e083738.js → index-446679c8.js} +20 -12
  11. package/atoms/ExtendedLoadMore/{index-9e0d32b7.js → index-44f97338.js} +19 -9
  12. package/atoms/ExtendedLoadMore/{index-b5936059.js → index-57dd4870.js} +15 -7
  13. package/atoms/ExtendedLoadMore/{index-fee73a14.js → index-66dd4dbd.js} +15 -7
  14. package/atoms/ExtendedLoadMore/{index-5c8eda4a.js → index-8462c597.js} +21 -16
  15. package/atoms/ExtendedLoadMore/{index-3c4ac692.js → index-93cb06d1.js} +42 -51
  16. package/atoms/ExtendedLoadMore/{index-4ddfe28d.js → index-afd44863.js} +6 -4
  17. package/atoms/ExtendedLoadMore/{index-3976fac4.js → index-b5754c5d.js} +20 -14
  18. package/atoms/ExtendedLoadMore/{index-a5c95f84.js → index-bbaf526e.js} +16 -8
  19. package/atoms/ExtendedLoadMore/{index-6ecceae4.js → index-cfb262ef.js} +18 -9
  20. package/atoms/ExtendedLoadMore/index.js +8 -1
  21. package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
  22. package/atoms/Headline/index.js +14 -2103
  23. package/atoms/Headline/styles.arrow.css +1 -1
  24. package/atoms/HeroImage/index.js +22 -2170
  25. package/atoms/HeroImage/styles.arrow.css +1 -1
  26. package/atoms/LoadmoreButton/index.js +12 -2114
  27. package/atoms/LoadmoreButton/styles.arrow.css +1 -1
  28. package/atoms/ScrollSnap/index.js +17 -2178
  29. package/atoms/ScrollSnap/styles.arrow.css +1 -1
  30. package/atoms/SectionTag/index.js +10 -2099
  31. package/atoms/SectionTag/styles.arrow.css +1 -1
  32. package/atoms/Subheadline/index.js +8 -2097
  33. package/atoms/Subheadline/styles.arrow.css +1 -1
  34. package/atoms/TimeStamp/index.js +13 -2463
  35. package/atoms/TimeStamp/styles.arrow.css +1 -1
  36. package/molecules/KeyEvents/index.js +23 -2545
  37. package/molecules/KeyEvents/styles.arrow.css +1 -1
  38. package/molecules/PageIntroductionCard/index.js +17 -2454
  39. package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
  40. package/molecules/SocialShareTemplate/index.js +144 -2740
  41. package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
  42. package/molecules/StoryCard/index.js +64 -2582
  43. package/molecules/StoryCard/styles.arrow.css +1 -1
  44. package/molecules/StoryElementCard/index.js +123 -2893
  45. package/molecules/StoryElementCard/styles.arrow.css +1 -1
  46. package/molecules/StorycardContent/index.js +45 -2495
  47. package/molecules/StorycardContent/styles.arrow.css +1 -1
  48. package/package.json +1 -1
  49. package/rows/AlternateCollectionFilter/index.js +92 -2659
  50. package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
  51. package/rows/AsideCollection/index.js +92 -2659
  52. package/rows/AsideCollection/styles.arrow.css +1 -1
  53. package/rows/AstrologyCollection/index.js +89 -2656
  54. package/rows/AstrologyCollection/styles.arrow.css +1 -1
  55. package/rows/AuthorIntroductionCard/index.js +27 -2743
  56. package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
  57. package/rows/AuthorsList/index.js +34 -2763
  58. package/rows/AuthorsList/styles.arrow.css +1 -1
  59. package/rows/CollectionFilter/index.js +91 -2658
  60. package/rows/CollectionFilter/styles.arrow.css +1 -1
  61. package/rows/ElevenStories/index.js +81 -2612
  62. package/rows/ElevenStories/styles.arrow.css +1 -1
  63. package/rows/FourColFiveStories/index.js +75 -2603
  64. package/rows/FourColFiveStories/styles.arrow.css +1 -1
  65. package/rows/FourColGrid/index.js +92 -2623
  66. package/rows/FourColGrid/styles.arrow.css +1 -1
  67. package/rows/FourColPortraitStories/index.js +91 -2622
  68. package/rows/FourColPortraitStories/styles.arrow.css +1 -1
  69. package/rows/FourColSixteenStories/index.js +80 -2617
  70. package/rows/FourColSixteenStories/styles.arrow.css +1 -1
  71. package/rows/FourColTwelveStories/index.js +72 -2596
  72. package/rows/FourColTwelveStories/styles.arrow.css +1 -1
  73. package/rows/FourStorySlider/index.js +84 -2615
  74. package/rows/FourStorySlider/styles.arrow.css +1 -1
  75. package/rows/FourStorySliderPortrait/index.js +84 -2615
  76. package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
  77. package/rows/FourTabbedBigStorySlider/index.js +80 -2611
  78. package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
  79. package/rows/FullScreenSlider/index.js +85 -2616
  80. package/rows/FullScreenSlider/styles.arrow.css +1 -1
  81. package/rows/HalfScreenSlider/index.js +81 -2612
  82. package/rows/HalfScreenSlider/styles.arrow.css +1 -1
  83. package/rows/ListComponent/index.js +75 -2606
  84. package/rows/ListComponent/styles.arrow.css +1 -1
  85. package/rows/Listicles/index.js +38 -2235
  86. package/rows/Listicles/styles.arrow.css +1 -1
  87. package/rows/MagazineEditions/index.js +24 -2487
  88. package/rows/MagazineEditions/styles.arrow.css +1 -1
  89. package/rows/MagazineHeaderCard/index.js +26 -2489
  90. package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
  91. package/rows/MagazineWidget/index.js +81 -2612
  92. package/rows/MagazineWidget/styles.arrow.css +1 -1
  93. package/rows/OneColStoryList/index.js +92 -2623
  94. package/rows/OneColStoryList/styles.arrow.css +1 -1
  95. package/rows/OpinionCollection/index.js +61 -2583
  96. package/rows/OpinionCollection/styles.arrow.css +1 -1
  97. package/rows/SixColSixStories/index.js +91 -2622
  98. package/rows/SixColSixStories/styles.arrow.css +1 -1
  99. package/rows/StoryCollection/index.js +92 -2659
  100. package/rows/StoryCollection/styles.arrow.css +1 -1
  101. package/rows/TagIntroductionCard/index.js +9 -1816
  102. package/rows/TagIntroductionCard/styles.arrow.css +1 -1
  103. package/rows/ThreeColFlexStories/index.js +91 -2622
  104. package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
  105. package/rows/ThreeColFourteenStories/index.js +72 -2596
  106. package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
  107. package/rows/ThreeColGrid/index.js +94 -2625
  108. package/rows/ThreeColGrid/styles.arrow.css +1 -1
  109. package/rows/ThreeColSevenStory/index.js +84 -2615
  110. package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
  111. package/rows/ThreeColSixStories/index.js +76 -2607
  112. package/rows/ThreeColSixStories/styles.arrow.css +1 -1
  113. package/rows/ThreeColTwelveStories/index.js +80 -2617
  114. package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
  115. package/rows/TwoColFourStories/index.js +78 -2609
  116. package/rows/TwoColFourStories/styles.arrow.css +1 -1
  117. package/rows/TwoColFourStoryHighlight/index.js +80 -2617
  118. package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
  119. package/rows/TwoColSevenStories/index.js +77 -2608
  120. package/rows/TwoColSevenStories/styles.arrow.css +1 -1
  121. package/rows/TwoColSixStories/index.js +82 -2619
  122. package/rows/TwoColSixStories/styles.arrow.css +1 -1
  123. package/rows/TwoColTenStoriesSidebar/index.js +79 -2610
  124. package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
  125. package/rows/TwoColThreeStories/index.js +75 -2606
  126. package/rows/TwoColThreeStories/styles.arrow.css +1 -1
  127. package/story-elements/AlsoRead/index.js +24 -2170
  128. package/story-elements/AlsoRead/styles.arrow.css +1 -1
  129. package/story-elements/Attachment/index.js +15 -1870
  130. package/story-elements/Attachment/styles.arrow.css +1 -1
  131. package/story-elements/BigFact/index.js +16 -1871
  132. package/story-elements/BigFact/styles.arrow.css +1 -1
  133. package/story-elements/BlockQuote/index.js +20 -2157
  134. package/story-elements/BlockQuote/styles.arrow.css +1 -1
  135. package/story-elements/Blurb/index.js +18 -1932
  136. package/story-elements/Blurb/styles.arrow.css +1 -1
  137. package/story-elements/Image/index.js +42 -2251
  138. package/story-elements/Image/styles.arrow.css +1 -1
  139. package/story-elements/ImageGallery/index.js +45 -2254
  140. package/story-elements/ImageGallery/styles.arrow.css +1 -1
  141. package/story-elements/ImageSlideshow/index.js +48 -2257
  142. package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
  143. package/story-elements/QuestionAnswer/index.js +26 -2163
  144. package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
  145. package/story-elements/Quote/index.js +17 -1872
  146. package/story-elements/Quote/styles.arrow.css +1 -1
  147. package/story-elements/Reference/index.js +15 -1870
  148. package/story-elements/Reference/styles.arrow.css +1 -1
  149. package/story-elements/StoryElement/index.js +12 -1725
  150. package/story-elements/Summary/index.js +18 -1873
  151. package/story-elements/Summary/styles.arrow.css +1 -1
  152. package/story-elements/Text/index.js +16 -2153
  153. package/story-elements/Text/styles.arrow.css +1 -1
  154. package/story-elements/Video/index.js +12 -1725
  155. package/story-elements/Video/styles.arrow.css +1 -1
  156. package/story-templates/ListicleStoryTemplate/index.js +282 -3167
  157. package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
  158. package/story-templates/LiveBlogStoryTemplate/index.js +504 -3389
  159. package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
  160. package/story-templates/PhotoStoryTemplate/index.js +287 -3172
  161. package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
  162. package/story-templates/TextStoryTemplate/index.js +416 -3301
  163. package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
  164. package/story-templates/VideoStoryTemplate/index.js +382 -3267
  165. package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
  166. package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
@@ -2,2117 +2,28 @@
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');
6
7
  var PropTypes = require('prop-types');
7
8
  var components = require('@quintype/components');
9
+ var lodash = require('lodash');
10
+ require('@babel/runtime/helpers/asyncToGenerator');
11
+ require('@babel/runtime/helpers/typeof');
12
+ require('@babel/runtime/regenerator');
8
13
  require('react-timeago');
9
14
  require('date-fns-tz');
10
15
 
11
16
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
17
 
18
+ var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
13
19
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
20
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
15
21
 
16
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17
-
18
- function getDefaultExportFromCjs (x) {
19
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
20
- }
21
-
22
- function createCommonjsModule(fn) {
23
- var module = { exports: {} };
24
- return fn(module, module.exports), module.exports;
25
- }
26
-
27
- var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
28
-
29
- Object.defineProperty(exports, "__esModule", {
30
- value: true
31
- });
32
- exports["default"] = void 0;
33
- var optionsDefaults = {
34
- attributeNames: {
35
- styleName: 'className'
36
- },
37
- generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
38
- handleMissingStyleName: 'throw'
39
- };
40
- var _default = optionsDefaults;
41
- exports["default"] = _default;
42
-
43
-
44
- });
45
-
46
- var getClassName = createCommonjsModule(function (module, exports) {
47
-
48
- Object.defineProperty(exports, "__esModule", {
49
- value: true
50
- });
51
- exports["default"] = void 0;
52
-
53
- var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
54
-
55
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
56
-
57
- var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
58
- return styleName.indexOf('.') !== -1;
59
- };
60
-
61
- var handleError = function handleError(message, handleMissingStyleName) {
62
- if (handleMissingStyleName === 'throw') {
63
- throw new Error(message);
64
- } else if (handleMissingStyleName === 'warn') {
65
- // eslint-disable-next-line no-console
66
- console.warn(message);
67
- }
68
-
69
- return null;
70
- };
71
-
72
- var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
73
- // Note:
74
- // Do not use the desctructing syntax with Babel.
75
- // Desctructing adds _slicedToArray helper.
76
- var styleNameParts = styleName.split('.');
77
- var importName = styleNameParts[0];
78
- var moduleName = styleNameParts[1];
79
- var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
80
-
81
- if (!moduleName) {
82
- return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
83
- }
84
-
85
- if (!styleModuleImportMap[importName]) {
86
- return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
87
- }
88
-
89
- if (!styleModuleImportMap[importName][moduleName]) {
90
- return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
91
- }
92
-
93
- return styleModuleImportMap[importName][moduleName];
94
- };
95
-
96
- var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
97
- var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
98
- var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
99
- return styleModuleImportMap[importKey][styleName] && importKey;
100
- }).filter(function (importKey) {
101
- return importKey;
102
- });
103
-
104
- if (importKeysWithMatches.length > 1) {
105
- 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');
106
- }
107
-
108
- if (importKeysWithMatches.length === 0) {
109
- return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
110
- }
111
-
112
- return styleModuleImportMap[importKeysWithMatches[0]][styleName];
113
- };
114
-
115
- var _default = function _default(styleNameValue, styleModuleImportMap, options) {
116
- var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
117
-
118
- var _ref = options || {},
119
- _ref$handleMissingSty = _ref.handleMissingStyleName,
120
- handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
121
- _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
122
- autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
123
-
124
- if (!styleNameValue) {
125
- return '';
126
- }
127
-
128
- return styleNameValue.split(' ').filter(function (styleName) {
129
- return styleName;
130
- }).map(function (styleName) {
131
- if (isNamespacedStyleName(styleName)) {
132
- return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
133
- }
134
-
135
- if (styleModuleImportMapKeys.length === 0) {
136
- throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
137
- }
138
-
139
- if (styleModuleImportMapKeys.length > 1) {
140
- if (!autoResolveMultipleImports) {
141
- throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
142
- }
143
-
144
- return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
145
- }
146
-
147
- var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
148
-
149
- if (!styleModuleMap[styleName]) {
150
- return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
151
- }
152
-
153
- return styleModuleMap[styleName];
154
- }).filter(function (className) {
155
- // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
156
- return className;
157
- }).join(' ');
158
- };
159
-
160
- exports["default"] = _default;
161
-
162
-
163
- });
164
-
165
- var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
166
-
167
22
  var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
168
23
  var useStateValue = function useStateValue() {
169
24
  return React.useContext(StateContext);
170
25
  };
171
26
 
172
- /**
173
- * Checks if `value` is classified as an `Array` object.
174
- *
175
- * @static
176
- * @memberOf _
177
- * @since 0.1.0
178
- * @category Lang
179
- * @param {*} value The value to check.
180
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
181
- * @example
182
- *
183
- * _.isArray([1, 2, 3]);
184
- * // => true
185
- *
186
- * _.isArray(document.body.children);
187
- * // => false
188
- *
189
- * _.isArray('abc');
190
- * // => false
191
- *
192
- * _.isArray(_.noop);
193
- * // => false
194
- */
195
- var isArray = Array.isArray;
196
-
197
- var isArray_1 = isArray;
198
-
199
- /** Detect free variable `global` from Node.js. */
200
-
201
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
202
-
203
- var _freeGlobal = freeGlobal;
204
-
205
- /** Detect free variable `self`. */
206
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
207
-
208
- /** Used as a reference to the global object. */
209
- var root = _freeGlobal || freeSelf || Function('return this')();
210
-
211
- var _root = root;
212
-
213
- /** Built-in value references. */
214
- var Symbol$1 = _root.Symbol;
215
-
216
- var _Symbol = Symbol$1;
217
-
218
- /** Used for built-in method references. */
219
- var objectProto$4 = Object.prototype;
220
-
221
- /** Used to check objects for own properties. */
222
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
223
-
224
- /**
225
- * Used to resolve the
226
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
227
- * of values.
228
- */
229
- var nativeObjectToString$1 = objectProto$4.toString;
230
-
231
- /** Built-in value references. */
232
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
233
-
234
- /**
235
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
236
- *
237
- * @private
238
- * @param {*} value The value to query.
239
- * @returns {string} Returns the raw `toStringTag`.
240
- */
241
- function getRawTag(value) {
242
- var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
243
- tag = value[symToStringTag$1];
244
-
245
- try {
246
- value[symToStringTag$1] = undefined;
247
- var unmasked = true;
248
- } catch (e) {}
249
-
250
- var result = nativeObjectToString$1.call(value);
251
- if (unmasked) {
252
- if (isOwn) {
253
- value[symToStringTag$1] = tag;
254
- } else {
255
- delete value[symToStringTag$1];
256
- }
257
- }
258
- return result;
259
- }
260
-
261
- var _getRawTag = getRawTag;
262
-
263
- /** Used for built-in method references. */
264
- var objectProto$3 = Object.prototype;
265
-
266
- /**
267
- * Used to resolve the
268
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
269
- * of values.
270
- */
271
- var nativeObjectToString = objectProto$3.toString;
272
-
273
- /**
274
- * Converts `value` to a string using `Object.prototype.toString`.
275
- *
276
- * @private
277
- * @param {*} value The value to convert.
278
- * @returns {string} Returns the converted string.
279
- */
280
- function objectToString(value) {
281
- return nativeObjectToString.call(value);
282
- }
283
-
284
- var _objectToString = objectToString;
285
-
286
- /** `Object#toString` result references. */
287
- var nullTag = '[object Null]',
288
- undefinedTag = '[object Undefined]';
289
-
290
- /** Built-in value references. */
291
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
292
-
293
- /**
294
- * The base implementation of `getTag` without fallbacks for buggy environments.
295
- *
296
- * @private
297
- * @param {*} value The value to query.
298
- * @returns {string} Returns the `toStringTag`.
299
- */
300
- function baseGetTag(value) {
301
- if (value == null) {
302
- return value === undefined ? undefinedTag : nullTag;
303
- }
304
- return (symToStringTag && symToStringTag in Object(value))
305
- ? _getRawTag(value)
306
- : _objectToString(value);
307
- }
308
-
309
- var _baseGetTag = baseGetTag;
310
-
311
- /**
312
- * Checks if `value` is object-like. A value is object-like if it's not `null`
313
- * and has a `typeof` result of "object".
314
- *
315
- * @static
316
- * @memberOf _
317
- * @since 4.0.0
318
- * @category Lang
319
- * @param {*} value The value to check.
320
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
321
- * @example
322
- *
323
- * _.isObjectLike({});
324
- * // => true
325
- *
326
- * _.isObjectLike([1, 2, 3]);
327
- * // => true
328
- *
329
- * _.isObjectLike(_.noop);
330
- * // => false
331
- *
332
- * _.isObjectLike(null);
333
- * // => false
334
- */
335
- function isObjectLike(value) {
336
- return value != null && typeof value == 'object';
337
- }
338
-
339
- var isObjectLike_1 = isObjectLike;
340
-
341
- /** `Object#toString` result references. */
342
- var symbolTag = '[object Symbol]';
343
-
344
- /**
345
- * Checks if `value` is classified as a `Symbol` primitive or object.
346
- *
347
- * @static
348
- * @memberOf _
349
- * @since 4.0.0
350
- * @category Lang
351
- * @param {*} value The value to check.
352
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
353
- * @example
354
- *
355
- * _.isSymbol(Symbol.iterator);
356
- * // => true
357
- *
358
- * _.isSymbol('abc');
359
- * // => false
360
- */
361
- function isSymbol(value) {
362
- return typeof value == 'symbol' ||
363
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
364
- }
365
-
366
- var isSymbol_1 = isSymbol;
367
-
368
- /** Used to match property names within property paths. */
369
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
370
- reIsPlainProp = /^\w*$/;
371
-
372
- /**
373
- * Checks if `value` is a property name and not a property path.
374
- *
375
- * @private
376
- * @param {*} value The value to check.
377
- * @param {Object} [object] The object to query keys on.
378
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
379
- */
380
- function isKey(value, object) {
381
- if (isArray_1(value)) {
382
- return false;
383
- }
384
- var type = typeof value;
385
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
386
- value == null || isSymbol_1(value)) {
387
- return true;
388
- }
389
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
390
- (object != null && value in Object(object));
391
- }
392
-
393
- var _isKey = isKey;
394
-
395
- /**
396
- * Checks if `value` is the
397
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
398
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
399
- *
400
- * @static
401
- * @memberOf _
402
- * @since 0.1.0
403
- * @category Lang
404
- * @param {*} value The value to check.
405
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
406
- * @example
407
- *
408
- * _.isObject({});
409
- * // => true
410
- *
411
- * _.isObject([1, 2, 3]);
412
- * // => true
413
- *
414
- * _.isObject(_.noop);
415
- * // => true
416
- *
417
- * _.isObject(null);
418
- * // => false
419
- */
420
- function isObject(value) {
421
- var type = typeof value;
422
- return value != null && (type == 'object' || type == 'function');
423
- }
424
-
425
- var isObject_1 = isObject;
426
-
427
- /** `Object#toString` result references. */
428
- var asyncTag = '[object AsyncFunction]',
429
- funcTag = '[object Function]',
430
- genTag = '[object GeneratorFunction]',
431
- proxyTag = '[object Proxy]';
432
-
433
- /**
434
- * Checks if `value` is classified as a `Function` object.
435
- *
436
- * @static
437
- * @memberOf _
438
- * @since 0.1.0
439
- * @category Lang
440
- * @param {*} value The value to check.
441
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
442
- * @example
443
- *
444
- * _.isFunction(_);
445
- * // => true
446
- *
447
- * _.isFunction(/abc/);
448
- * // => false
449
- */
450
- function isFunction(value) {
451
- if (!isObject_1(value)) {
452
- return false;
453
- }
454
- // The use of `Object#toString` avoids issues with the `typeof` operator
455
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
456
- var tag = _baseGetTag(value);
457
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
458
- }
459
-
460
- var isFunction_1 = isFunction;
461
-
462
- /** Used to detect overreaching core-js shims. */
463
- var coreJsData = _root['__core-js_shared__'];
464
-
465
- var _coreJsData = coreJsData;
466
-
467
- /** Used to detect methods masquerading as native. */
468
- var maskSrcKey = (function() {
469
- var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
470
- return uid ? ('Symbol(src)_1.' + uid) : '';
471
- }());
472
-
473
- /**
474
- * Checks if `func` has its source masked.
475
- *
476
- * @private
477
- * @param {Function} func The function to check.
478
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
479
- */
480
- function isMasked(func) {
481
- return !!maskSrcKey && (maskSrcKey in func);
482
- }
483
-
484
- var _isMasked = isMasked;
485
-
486
- /** Used for built-in method references. */
487
- var funcProto$1 = Function.prototype;
488
-
489
- /** Used to resolve the decompiled source of functions. */
490
- var funcToString$1 = funcProto$1.toString;
491
-
492
- /**
493
- * Converts `func` to its source code.
494
- *
495
- * @private
496
- * @param {Function} func The function to convert.
497
- * @returns {string} Returns the source code.
498
- */
499
- function toSource(func) {
500
- if (func != null) {
501
- try {
502
- return funcToString$1.call(func);
503
- } catch (e) {}
504
- try {
505
- return (func + '');
506
- } catch (e) {}
507
- }
508
- return '';
509
- }
510
-
511
- var _toSource = toSource;
512
-
513
- /**
514
- * Used to match `RegExp`
515
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
516
- */
517
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
518
-
519
- /** Used to detect host constructors (Safari). */
520
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
521
-
522
- /** Used for built-in method references. */
523
- var funcProto = Function.prototype,
524
- objectProto$2 = Object.prototype;
525
-
526
- /** Used to resolve the decompiled source of functions. */
527
- var funcToString = funcProto.toString;
528
-
529
- /** Used to check objects for own properties. */
530
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
531
-
532
- /** Used to detect if a method is native. */
533
- var reIsNative = RegExp('^' +
534
- funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
535
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
536
- );
537
-
538
- /**
539
- * The base implementation of `_.isNative` without bad shim checks.
540
- *
541
- * @private
542
- * @param {*} value The value to check.
543
- * @returns {boolean} Returns `true` if `value` is a native function,
544
- * else `false`.
545
- */
546
- function baseIsNative(value) {
547
- if (!isObject_1(value) || _isMasked(value)) {
548
- return false;
549
- }
550
- var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
551
- return pattern.test(_toSource(value));
552
- }
553
-
554
- var _baseIsNative = baseIsNative;
555
-
556
- /**
557
- * Gets the value at `key` of `object`.
558
- *
559
- * @private
560
- * @param {Object} [object] The object to query.
561
- * @param {string} key The key of the property to get.
562
- * @returns {*} Returns the property value.
563
- */
564
- function getValue(object, key) {
565
- return object == null ? undefined : object[key];
566
- }
567
-
568
- var _getValue = getValue;
569
-
570
- /**
571
- * Gets the native function at `key` of `object`.
572
- *
573
- * @private
574
- * @param {Object} object The object to query.
575
- * @param {string} key The key of the method to get.
576
- * @returns {*} Returns the function if it's native, else `undefined`.
577
- */
578
- function getNative(object, key) {
579
- var value = _getValue(object, key);
580
- return _baseIsNative(value) ? value : undefined;
581
- }
582
-
583
- var _getNative = getNative;
584
-
585
- /* Built-in method references that are verified to be native. */
586
- var nativeCreate = _getNative(Object, 'create');
587
-
588
- var _nativeCreate = nativeCreate;
589
-
590
- /**
591
- * Removes all key-value entries from the hash.
592
- *
593
- * @private
594
- * @name clear
595
- * @memberOf Hash
596
- */
597
- function hashClear() {
598
- this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
599
- this.size = 0;
600
- }
601
-
602
- var _hashClear = hashClear;
603
-
604
- /**
605
- * Removes `key` and its value from the hash.
606
- *
607
- * @private
608
- * @name delete
609
- * @memberOf Hash
610
- * @param {Object} hash The hash to modify.
611
- * @param {string} key The key of the value to remove.
612
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
613
- */
614
- function hashDelete(key) {
615
- var result = this.has(key) && delete this.__data__[key];
616
- this.size -= result ? 1 : 0;
617
- return result;
618
- }
619
-
620
- var _hashDelete = hashDelete;
621
-
622
- /** Used to stand-in for `undefined` hash values. */
623
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
624
-
625
- /** Used for built-in method references. */
626
- var objectProto$1 = Object.prototype;
627
-
628
- /** Used to check objects for own properties. */
629
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
630
-
631
- /**
632
- * Gets the hash value for `key`.
633
- *
634
- * @private
635
- * @name get
636
- * @memberOf Hash
637
- * @param {string} key The key of the value to get.
638
- * @returns {*} Returns the entry value.
639
- */
640
- function hashGet(key) {
641
- var data = this.__data__;
642
- if (_nativeCreate) {
643
- var result = data[key];
644
- return result === HASH_UNDEFINED$1 ? undefined : result;
645
- }
646
- return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
647
- }
648
-
649
- var _hashGet = hashGet;
650
-
651
- /** Used for built-in method references. */
652
- var objectProto = Object.prototype;
653
-
654
- /** Used to check objects for own properties. */
655
- var hasOwnProperty = objectProto.hasOwnProperty;
656
-
657
- /**
658
- * Checks if a hash value for `key` exists.
659
- *
660
- * @private
661
- * @name has
662
- * @memberOf Hash
663
- * @param {string} key The key of the entry to check.
664
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
665
- */
666
- function hashHas(key) {
667
- var data = this.__data__;
668
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
669
- }
670
-
671
- var _hashHas = hashHas;
672
-
673
- /** Used to stand-in for `undefined` hash values. */
674
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
675
-
676
- /**
677
- * Sets the hash `key` to `value`.
678
- *
679
- * @private
680
- * @name set
681
- * @memberOf Hash
682
- * @param {string} key The key of the value to set.
683
- * @param {*} value The value to set.
684
- * @returns {Object} Returns the hash instance.
685
- */
686
- function hashSet(key, value) {
687
- var data = this.__data__;
688
- this.size += this.has(key) ? 0 : 1;
689
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
690
- return this;
691
- }
692
-
693
- var _hashSet = hashSet;
694
-
695
- /**
696
- * Creates a hash object.
697
- *
698
- * @private
699
- * @constructor
700
- * @param {Array} [entries] The key-value pairs to cache.
701
- */
702
- function Hash(entries) {
703
- var index = -1,
704
- length = entries == null ? 0 : entries.length;
705
-
706
- this.clear();
707
- while (++index < length) {
708
- var entry = entries[index];
709
- this.set(entry[0], entry[1]);
710
- }
711
- }
712
-
713
- // Add methods to `Hash`.
714
- Hash.prototype.clear = _hashClear;
715
- Hash.prototype['delete'] = _hashDelete;
716
- Hash.prototype.get = _hashGet;
717
- Hash.prototype.has = _hashHas;
718
- Hash.prototype.set = _hashSet;
719
-
720
- var _Hash = Hash;
721
-
722
- /**
723
- * Removes all key-value entries from the list cache.
724
- *
725
- * @private
726
- * @name clear
727
- * @memberOf ListCache
728
- */
729
- function listCacheClear() {
730
- this.__data__ = [];
731
- this.size = 0;
732
- }
733
-
734
- var _listCacheClear = listCacheClear;
735
-
736
- /**
737
- * Performs a
738
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
739
- * comparison between two values to determine if they are equivalent.
740
- *
741
- * @static
742
- * @memberOf _
743
- * @since 4.0.0
744
- * @category Lang
745
- * @param {*} value The value to compare.
746
- * @param {*} other The other value to compare.
747
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
748
- * @example
749
- *
750
- * var object = { 'a': 1 };
751
- * var other = { 'a': 1 };
752
- *
753
- * _.eq(object, object);
754
- * // => true
755
- *
756
- * _.eq(object, other);
757
- * // => false
758
- *
759
- * _.eq('a', 'a');
760
- * // => true
761
- *
762
- * _.eq('a', Object('a'));
763
- * // => false
764
- *
765
- * _.eq(NaN, NaN);
766
- * // => true
767
- */
768
- function eq(value, other) {
769
- return value === other || (value !== value && other !== other);
770
- }
771
-
772
- var eq_1 = eq;
773
-
774
- /**
775
- * Gets the index at which the `key` is found in `array` of key-value pairs.
776
- *
777
- * @private
778
- * @param {Array} array The array to inspect.
779
- * @param {*} key The key to search for.
780
- * @returns {number} Returns the index of the matched value, else `-1`.
781
- */
782
- function assocIndexOf(array, key) {
783
- var length = array.length;
784
- while (length--) {
785
- if (eq_1(array[length][0], key)) {
786
- return length;
787
- }
788
- }
789
- return -1;
790
- }
791
-
792
- var _assocIndexOf = assocIndexOf;
793
-
794
- /** Used for built-in method references. */
795
- var arrayProto = Array.prototype;
796
-
797
- /** Built-in value references. */
798
- var splice = arrayProto.splice;
799
-
800
- /**
801
- * Removes `key` and its value from the list cache.
802
- *
803
- * @private
804
- * @name delete
805
- * @memberOf ListCache
806
- * @param {string} key The key of the value to remove.
807
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
808
- */
809
- function listCacheDelete(key) {
810
- var data = this.__data__,
811
- index = _assocIndexOf(data, key);
812
-
813
- if (index < 0) {
814
- return false;
815
- }
816
- var lastIndex = data.length - 1;
817
- if (index == lastIndex) {
818
- data.pop();
819
- } else {
820
- splice.call(data, index, 1);
821
- }
822
- --this.size;
823
- return true;
824
- }
825
-
826
- var _listCacheDelete = listCacheDelete;
827
-
828
- /**
829
- * Gets the list cache value for `key`.
830
- *
831
- * @private
832
- * @name get
833
- * @memberOf ListCache
834
- * @param {string} key The key of the value to get.
835
- * @returns {*} Returns the entry value.
836
- */
837
- function listCacheGet(key) {
838
- var data = this.__data__,
839
- index = _assocIndexOf(data, key);
840
-
841
- return index < 0 ? undefined : data[index][1];
842
- }
843
-
844
- var _listCacheGet = listCacheGet;
845
-
846
- /**
847
- * Checks if a list cache value for `key` exists.
848
- *
849
- * @private
850
- * @name has
851
- * @memberOf ListCache
852
- * @param {string} key The key of the entry to check.
853
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
854
- */
855
- function listCacheHas(key) {
856
- return _assocIndexOf(this.__data__, key) > -1;
857
- }
858
-
859
- var _listCacheHas = listCacheHas;
860
-
861
- /**
862
- * Sets the list cache `key` to `value`.
863
- *
864
- * @private
865
- * @name set
866
- * @memberOf ListCache
867
- * @param {string} key The key of the value to set.
868
- * @param {*} value The value to set.
869
- * @returns {Object} Returns the list cache instance.
870
- */
871
- function listCacheSet(key, value) {
872
- var data = this.__data__,
873
- index = _assocIndexOf(data, key);
874
-
875
- if (index < 0) {
876
- ++this.size;
877
- data.push([key, value]);
878
- } else {
879
- data[index][1] = value;
880
- }
881
- return this;
882
- }
883
-
884
- var _listCacheSet = listCacheSet;
885
-
886
- /**
887
- * Creates an list cache object.
888
- *
889
- * @private
890
- * @constructor
891
- * @param {Array} [entries] The key-value pairs to cache.
892
- */
893
- function ListCache(entries) {
894
- var index = -1,
895
- length = entries == null ? 0 : entries.length;
896
-
897
- this.clear();
898
- while (++index < length) {
899
- var entry = entries[index];
900
- this.set(entry[0], entry[1]);
901
- }
902
- }
903
-
904
- // Add methods to `ListCache`.
905
- ListCache.prototype.clear = _listCacheClear;
906
- ListCache.prototype['delete'] = _listCacheDelete;
907
- ListCache.prototype.get = _listCacheGet;
908
- ListCache.prototype.has = _listCacheHas;
909
- ListCache.prototype.set = _listCacheSet;
910
-
911
- var _ListCache = ListCache;
912
-
913
- /* Built-in method references that are verified to be native. */
914
- var Map = _getNative(_root, 'Map');
915
-
916
- var _Map = Map;
917
-
918
- /**
919
- * Removes all key-value entries from the map.
920
- *
921
- * @private
922
- * @name clear
923
- * @memberOf MapCache
924
- */
925
- function mapCacheClear() {
926
- this.size = 0;
927
- this.__data__ = {
928
- 'hash': new _Hash,
929
- 'map': new (_Map || _ListCache),
930
- 'string': new _Hash
931
- };
932
- }
933
-
934
- var _mapCacheClear = mapCacheClear;
935
-
936
- /**
937
- * Checks if `value` is suitable for use as unique object key.
938
- *
939
- * @private
940
- * @param {*} value The value to check.
941
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
942
- */
943
- function isKeyable(value) {
944
- var type = typeof value;
945
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
946
- ? (value !== '__proto__')
947
- : (value === null);
948
- }
949
-
950
- var _isKeyable = isKeyable;
951
-
952
- /**
953
- * Gets the data for `map`.
954
- *
955
- * @private
956
- * @param {Object} map The map to query.
957
- * @param {string} key The reference key.
958
- * @returns {*} Returns the map data.
959
- */
960
- function getMapData(map, key) {
961
- var data = map.__data__;
962
- return _isKeyable(key)
963
- ? data[typeof key == 'string' ? 'string' : 'hash']
964
- : data.map;
965
- }
966
-
967
- var _getMapData = getMapData;
968
-
969
- /**
970
- * Removes `key` and its value from the map.
971
- *
972
- * @private
973
- * @name delete
974
- * @memberOf MapCache
975
- * @param {string} key The key of the value to remove.
976
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
977
- */
978
- function mapCacheDelete(key) {
979
- var result = _getMapData(this, key)['delete'](key);
980
- this.size -= result ? 1 : 0;
981
- return result;
982
- }
983
-
984
- var _mapCacheDelete = mapCacheDelete;
985
-
986
- /**
987
- * Gets the map value for `key`.
988
- *
989
- * @private
990
- * @name get
991
- * @memberOf MapCache
992
- * @param {string} key The key of the value to get.
993
- * @returns {*} Returns the entry value.
994
- */
995
- function mapCacheGet(key) {
996
- return _getMapData(this, key).get(key);
997
- }
998
-
999
- var _mapCacheGet = mapCacheGet;
1000
-
1001
- /**
1002
- * Checks if a map value for `key` exists.
1003
- *
1004
- * @private
1005
- * @name has
1006
- * @memberOf MapCache
1007
- * @param {string} key The key of the entry to check.
1008
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1009
- */
1010
- function mapCacheHas(key) {
1011
- return _getMapData(this, key).has(key);
1012
- }
1013
-
1014
- var _mapCacheHas = mapCacheHas;
1015
-
1016
- /**
1017
- * Sets the map `key` to `value`.
1018
- *
1019
- * @private
1020
- * @name set
1021
- * @memberOf MapCache
1022
- * @param {string} key The key of the value to set.
1023
- * @param {*} value The value to set.
1024
- * @returns {Object} Returns the map cache instance.
1025
- */
1026
- function mapCacheSet(key, value) {
1027
- var data = _getMapData(this, key),
1028
- size = data.size;
1029
-
1030
- data.set(key, value);
1031
- this.size += data.size == size ? 0 : 1;
1032
- return this;
1033
- }
1034
-
1035
- var _mapCacheSet = mapCacheSet;
1036
-
1037
- /**
1038
- * Creates a map cache object to store key-value pairs.
1039
- *
1040
- * @private
1041
- * @constructor
1042
- * @param {Array} [entries] The key-value pairs to cache.
1043
- */
1044
- function MapCache(entries) {
1045
- var index = -1,
1046
- length = entries == null ? 0 : entries.length;
1047
-
1048
- this.clear();
1049
- while (++index < length) {
1050
- var entry = entries[index];
1051
- this.set(entry[0], entry[1]);
1052
- }
1053
- }
1054
-
1055
- // Add methods to `MapCache`.
1056
- MapCache.prototype.clear = _mapCacheClear;
1057
- MapCache.prototype['delete'] = _mapCacheDelete;
1058
- MapCache.prototype.get = _mapCacheGet;
1059
- MapCache.prototype.has = _mapCacheHas;
1060
- MapCache.prototype.set = _mapCacheSet;
1061
-
1062
- var _MapCache = MapCache;
1063
-
1064
- /** Error message constants. */
1065
- var FUNC_ERROR_TEXT = 'Expected a function';
1066
-
1067
- /**
1068
- * Creates a function that memoizes the result of `func`. If `resolver` is
1069
- * provided, it determines the cache key for storing the result based on the
1070
- * arguments provided to the memoized function. By default, the first argument
1071
- * provided to the memoized function is used as the map cache key. The `func`
1072
- * is invoked with the `this` binding of the memoized function.
1073
- *
1074
- * **Note:** The cache is exposed as the `cache` property on the memoized
1075
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
1076
- * constructor with one whose instances implement the
1077
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1078
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1079
- *
1080
- * @static
1081
- * @memberOf _
1082
- * @since 0.1.0
1083
- * @category Function
1084
- * @param {Function} func The function to have its output memoized.
1085
- * @param {Function} [resolver] The function to resolve the cache key.
1086
- * @returns {Function} Returns the new memoized function.
1087
- * @example
1088
- *
1089
- * var object = { 'a': 1, 'b': 2 };
1090
- * var other = { 'c': 3, 'd': 4 };
1091
- *
1092
- * var values = _.memoize(_.values);
1093
- * values(object);
1094
- * // => [1, 2]
1095
- *
1096
- * values(other);
1097
- * // => [3, 4]
1098
- *
1099
- * object.a = 2;
1100
- * values(object);
1101
- * // => [1, 2]
1102
- *
1103
- * // Modify the result cache.
1104
- * values.cache.set(object, ['a', 'b']);
1105
- * values(object);
1106
- * // => ['a', 'b']
1107
- *
1108
- * // Replace `_.memoize.Cache`.
1109
- * _.memoize.Cache = WeakMap;
1110
- */
1111
- function memoize(func, resolver) {
1112
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1113
- throw new TypeError(FUNC_ERROR_TEXT);
1114
- }
1115
- var memoized = function() {
1116
- var args = arguments,
1117
- key = resolver ? resolver.apply(this, args) : args[0],
1118
- cache = memoized.cache;
1119
-
1120
- if (cache.has(key)) {
1121
- return cache.get(key);
1122
- }
1123
- var result = func.apply(this, args);
1124
- memoized.cache = cache.set(key, result) || cache;
1125
- return result;
1126
- };
1127
- memoized.cache = new (memoize.Cache || _MapCache);
1128
- return memoized;
1129
- }
1130
-
1131
- // Expose `MapCache`.
1132
- memoize.Cache = _MapCache;
1133
-
1134
- var memoize_1 = memoize;
1135
-
1136
- /** Used as the maximum memoize cache size. */
1137
- var MAX_MEMOIZE_SIZE = 500;
1138
-
1139
- /**
1140
- * A specialized version of `_.memoize` which clears the memoized function's
1141
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1142
- *
1143
- * @private
1144
- * @param {Function} func The function to have its output memoized.
1145
- * @returns {Function} Returns the new memoized function.
1146
- */
1147
- function memoizeCapped(func) {
1148
- var result = memoize_1(func, function(key) {
1149
- if (cache.size === MAX_MEMOIZE_SIZE) {
1150
- cache.clear();
1151
- }
1152
- return key;
1153
- });
1154
-
1155
- var cache = result.cache;
1156
- return result;
1157
- }
1158
-
1159
- var _memoizeCapped = memoizeCapped;
1160
-
1161
- /** Used to match property names within property paths. */
1162
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1163
-
1164
- /** Used to match backslashes in property paths. */
1165
- var reEscapeChar = /\\(\\)?/g;
1166
-
1167
- /**
1168
- * Converts `string` to a property path array.
1169
- *
1170
- * @private
1171
- * @param {string} string The string to convert.
1172
- * @returns {Array} Returns the property path array.
1173
- */
1174
- var stringToPath = _memoizeCapped(function(string) {
1175
- var result = [];
1176
- if (string.charCodeAt(0) === 46 /* . */) {
1177
- result.push('');
1178
- }
1179
- string.replace(rePropName, function(match, number, quote, subString) {
1180
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1181
- });
1182
- return result;
1183
- });
1184
-
1185
- var _stringToPath = stringToPath;
1186
-
1187
- /**
1188
- * A specialized version of `_.map` for arrays without support for iteratee
1189
- * shorthands.
1190
- *
1191
- * @private
1192
- * @param {Array} [array] The array to iterate over.
1193
- * @param {Function} iteratee The function invoked per iteration.
1194
- * @returns {Array} Returns the new mapped array.
1195
- */
1196
- function arrayMap(array, iteratee) {
1197
- var index = -1,
1198
- length = array == null ? 0 : array.length,
1199
- result = Array(length);
1200
-
1201
- while (++index < length) {
1202
- result[index] = iteratee(array[index], index, array);
1203
- }
1204
- return result;
1205
- }
1206
-
1207
- var _arrayMap = arrayMap;
1208
-
1209
- /** Used as references for various `Number` constants. */
1210
- var INFINITY$1 = 1 / 0;
1211
-
1212
- /** Used to convert symbols to primitives and strings. */
1213
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1214
- symbolToString = symbolProto ? symbolProto.toString : undefined;
1215
-
1216
- /**
1217
- * The base implementation of `_.toString` which doesn't convert nullish
1218
- * values to empty strings.
1219
- *
1220
- * @private
1221
- * @param {*} value The value to process.
1222
- * @returns {string} Returns the string.
1223
- */
1224
- function baseToString(value) {
1225
- // Exit early for strings to avoid a performance hit in some environments.
1226
- if (typeof value == 'string') {
1227
- return value;
1228
- }
1229
- if (isArray_1(value)) {
1230
- // Recursively convert values (susceptible to call stack limits).
1231
- return _arrayMap(value, baseToString) + '';
1232
- }
1233
- if (isSymbol_1(value)) {
1234
- return symbolToString ? symbolToString.call(value) : '';
1235
- }
1236
- var result = (value + '');
1237
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1238
- }
1239
-
1240
- var _baseToString = baseToString;
1241
-
1242
- /**
1243
- * Converts `value` to a string. An empty string is returned for `null`
1244
- * and `undefined` values. The sign of `-0` is preserved.
1245
- *
1246
- * @static
1247
- * @memberOf _
1248
- * @since 4.0.0
1249
- * @category Lang
1250
- * @param {*} value The value to convert.
1251
- * @returns {string} Returns the converted string.
1252
- * @example
1253
- *
1254
- * _.toString(null);
1255
- * // => ''
1256
- *
1257
- * _.toString(-0);
1258
- * // => '-0'
1259
- *
1260
- * _.toString([1, 2, 3]);
1261
- * // => '1,2,3'
1262
- */
1263
- function toString(value) {
1264
- return value == null ? '' : _baseToString(value);
1265
- }
1266
-
1267
- var toString_1 = toString;
1268
-
1269
- /**
1270
- * Casts `value` to a path array if it's not one.
1271
- *
1272
- * @private
1273
- * @param {*} value The value to inspect.
1274
- * @param {Object} [object] The object to query keys on.
1275
- * @returns {Array} Returns the cast property path array.
1276
- */
1277
- function castPath(value, object) {
1278
- if (isArray_1(value)) {
1279
- return value;
1280
- }
1281
- return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1282
- }
1283
-
1284
- var _castPath = castPath;
1285
-
1286
- /** Used as references for various `Number` constants. */
1287
- var INFINITY = 1 / 0;
1288
-
1289
- /**
1290
- * Converts `value` to a string key if it's not a string or symbol.
1291
- *
1292
- * @private
1293
- * @param {*} value The value to inspect.
1294
- * @returns {string|symbol} Returns the key.
1295
- */
1296
- function toKey(value) {
1297
- if (typeof value == 'string' || isSymbol_1(value)) {
1298
- return value;
1299
- }
1300
- var result = (value + '');
1301
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1302
- }
1303
-
1304
- var _toKey = toKey;
1305
-
1306
- /**
1307
- * The base implementation of `_.get` without support for default values.
1308
- *
1309
- * @private
1310
- * @param {Object} object The object to query.
1311
- * @param {Array|string} path The path of the property to get.
1312
- * @returns {*} Returns the resolved value.
1313
- */
1314
- function baseGet(object, path) {
1315
- path = _castPath(path, object);
1316
-
1317
- var index = 0,
1318
- length = path.length;
1319
-
1320
- while (object != null && index < length) {
1321
- object = object[_toKey(path[index++])];
1322
- }
1323
- return (index && index == length) ? object : undefined;
1324
- }
1325
-
1326
- var _baseGet = baseGet;
1327
-
1328
- /**
1329
- * Gets the value at `path` of `object`. If the resolved value is
1330
- * `undefined`, the `defaultValue` is returned in its place.
1331
- *
1332
- * @static
1333
- * @memberOf _
1334
- * @since 3.7.0
1335
- * @category Object
1336
- * @param {Object} object The object to query.
1337
- * @param {Array|string} path The path of the property to get.
1338
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1339
- * @returns {*} Returns the resolved value.
1340
- * @example
1341
- *
1342
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1343
- *
1344
- * _.get(object, 'a[0].b.c');
1345
- * // => 3
1346
- *
1347
- * _.get(object, ['a', '0', 'b', 'c']);
1348
- * // => 3
1349
- *
1350
- * _.get(object, 'a.b.c', 'default');
1351
- * // => 'default'
1352
- */
1353
- function get(object, path, defaultValue) {
1354
- var result = object == null ? undefined : _baseGet(object, path);
1355
- return result === undefined ? defaultValue : result;
1356
- }
1357
-
1358
- var get_1 = get;
1359
-
1360
- /**
1361
- * Copyright (c) 2014-present, Facebook, Inc.
1362
- *
1363
- * This source code is licensed under the MIT license found in the
1364
- * LICENSE file in the root directory of this source tree.
1365
- */
1366
-
1367
- createCommonjsModule(function (module) {
1368
- var runtime = (function (exports) {
1369
-
1370
- var Op = Object.prototype;
1371
- var hasOwn = Op.hasOwnProperty;
1372
- var undefined$1; // More compressible than void 0.
1373
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
1374
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
1375
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
1376
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1377
-
1378
- function define(obj, key, value) {
1379
- Object.defineProperty(obj, key, {
1380
- value: value,
1381
- enumerable: true,
1382
- configurable: true,
1383
- writable: true
1384
- });
1385
- return obj[key];
1386
- }
1387
- try {
1388
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
1389
- define({}, "");
1390
- } catch (err) {
1391
- define = function(obj, key, value) {
1392
- return obj[key] = value;
1393
- };
1394
- }
1395
-
1396
- function wrap(innerFn, outerFn, self, tryLocsList) {
1397
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1398
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1399
- var generator = Object.create(protoGenerator.prototype);
1400
- var context = new Context(tryLocsList || []);
1401
-
1402
- // The ._invoke method unifies the implementations of the .next,
1403
- // .throw, and .return methods.
1404
- generator._invoke = makeInvokeMethod(innerFn, self, context);
1405
-
1406
- return generator;
1407
- }
1408
- exports.wrap = wrap;
1409
-
1410
- // Try/catch helper to minimize deoptimizations. Returns a completion
1411
- // record like context.tryEntries[i].completion. This interface could
1412
- // have been (and was previously) designed to take a closure to be
1413
- // invoked without arguments, but in all the cases we care about we
1414
- // already have an existing method we want to call, so there's no need
1415
- // to create a new function object. We can even get away with assuming
1416
- // the method takes exactly one argument, since that happens to be true
1417
- // in every case, so we don't have to touch the arguments object. The
1418
- // only additional allocation required is the completion record, which
1419
- // has a stable shape and so hopefully should be cheap to allocate.
1420
- function tryCatch(fn, obj, arg) {
1421
- try {
1422
- return { type: "normal", arg: fn.call(obj, arg) };
1423
- } catch (err) {
1424
- return { type: "throw", arg: err };
1425
- }
1426
- }
1427
-
1428
- var GenStateSuspendedStart = "suspendedStart";
1429
- var GenStateSuspendedYield = "suspendedYield";
1430
- var GenStateExecuting = "executing";
1431
- var GenStateCompleted = "completed";
1432
-
1433
- // Returning this object from the innerFn has the same effect as
1434
- // breaking out of the dispatch switch statement.
1435
- var ContinueSentinel = {};
1436
-
1437
- // Dummy constructor functions that we use as the .constructor and
1438
- // .constructor.prototype properties for functions that return Generator
1439
- // objects. For full spec compliance, you may wish to configure your
1440
- // minifier not to mangle the names of these two functions.
1441
- function Generator() {}
1442
- function GeneratorFunction() {}
1443
- function GeneratorFunctionPrototype() {}
1444
-
1445
- // This is a polyfill for %IteratorPrototype% for environments that
1446
- // don't natively support it.
1447
- var IteratorPrototype = {};
1448
- define(IteratorPrototype, iteratorSymbol, function () {
1449
- return this;
1450
- });
1451
-
1452
- var getProto = Object.getPrototypeOf;
1453
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1454
- if (NativeIteratorPrototype &&
1455
- NativeIteratorPrototype !== Op &&
1456
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1457
- // This environment has a native %IteratorPrototype%; use it instead
1458
- // of the polyfill.
1459
- IteratorPrototype = NativeIteratorPrototype;
1460
- }
1461
-
1462
- var Gp = GeneratorFunctionPrototype.prototype =
1463
- Generator.prototype = Object.create(IteratorPrototype);
1464
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
1465
- define(Gp, "constructor", GeneratorFunctionPrototype);
1466
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
1467
- GeneratorFunction.displayName = define(
1468
- GeneratorFunctionPrototype,
1469
- toStringTagSymbol,
1470
- "GeneratorFunction"
1471
- );
1472
-
1473
- // Helper for defining the .next, .throw, and .return methods of the
1474
- // Iterator interface in terms of a single ._invoke method.
1475
- function defineIteratorMethods(prototype) {
1476
- ["next", "throw", "return"].forEach(function(method) {
1477
- define(prototype, method, function(arg) {
1478
- return this._invoke(method, arg);
1479
- });
1480
- });
1481
- }
1482
-
1483
- exports.isGeneratorFunction = function(genFun) {
1484
- var ctor = typeof genFun === "function" && genFun.constructor;
1485
- return ctor
1486
- ? ctor === GeneratorFunction ||
1487
- // For the native GeneratorFunction constructor, the best we can
1488
- // do is to check its .name property.
1489
- (ctor.displayName || ctor.name) === "GeneratorFunction"
1490
- : false;
1491
- };
1492
-
1493
- exports.mark = function(genFun) {
1494
- if (Object.setPrototypeOf) {
1495
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1496
- } else {
1497
- genFun.__proto__ = GeneratorFunctionPrototype;
1498
- define(genFun, toStringTagSymbol, "GeneratorFunction");
1499
- }
1500
- genFun.prototype = Object.create(Gp);
1501
- return genFun;
1502
- };
1503
-
1504
- // Within the body of any async function, `await x` is transformed to
1505
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1506
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
1507
- // meant to be awaited.
1508
- exports.awrap = function(arg) {
1509
- return { __await: arg };
1510
- };
1511
-
1512
- function AsyncIterator(generator, PromiseImpl) {
1513
- function invoke(method, arg, resolve, reject) {
1514
- var record = tryCatch(generator[method], generator, arg);
1515
- if (record.type === "throw") {
1516
- reject(record.arg);
1517
- } else {
1518
- var result = record.arg;
1519
- var value = result.value;
1520
- if (value &&
1521
- typeof value === "object" &&
1522
- hasOwn.call(value, "__await")) {
1523
- return PromiseImpl.resolve(value.__await).then(function(value) {
1524
- invoke("next", value, resolve, reject);
1525
- }, function(err) {
1526
- invoke("throw", err, resolve, reject);
1527
- });
1528
- }
1529
-
1530
- return PromiseImpl.resolve(value).then(function(unwrapped) {
1531
- // When a yielded Promise is resolved, its final value becomes
1532
- // the .value of the Promise<{value,done}> result for the
1533
- // current iteration.
1534
- result.value = unwrapped;
1535
- resolve(result);
1536
- }, function(error) {
1537
- // If a rejected Promise was yielded, throw the rejection back
1538
- // into the async generator function so it can be handled there.
1539
- return invoke("throw", error, resolve, reject);
1540
- });
1541
- }
1542
- }
1543
-
1544
- var previousPromise;
1545
-
1546
- function enqueue(method, arg) {
1547
- function callInvokeWithMethodAndArg() {
1548
- return new PromiseImpl(function(resolve, reject) {
1549
- invoke(method, arg, resolve, reject);
1550
- });
1551
- }
1552
-
1553
- return previousPromise =
1554
- // If enqueue has been called before, then we want to wait until
1555
- // all previous Promises have been resolved before calling invoke,
1556
- // so that results are always delivered in the correct order. If
1557
- // enqueue has not been called before, then it is important to
1558
- // call invoke immediately, without waiting on a callback to fire,
1559
- // so that the async generator function has the opportunity to do
1560
- // any necessary setup in a predictable way. This predictability
1561
- // is why the Promise constructor synchronously invokes its
1562
- // executor callback, and why async functions synchronously
1563
- // execute code before the first await. Since we implement simple
1564
- // async functions in terms of async generators, it is especially
1565
- // important to get this right, even though it requires care.
1566
- previousPromise ? previousPromise.then(
1567
- callInvokeWithMethodAndArg,
1568
- // Avoid propagating failures to Promises returned by later
1569
- // invocations of the iterator.
1570
- callInvokeWithMethodAndArg
1571
- ) : callInvokeWithMethodAndArg();
1572
- }
1573
-
1574
- // Define the unified helper method that is used to implement .next,
1575
- // .throw, and .return (see defineIteratorMethods).
1576
- this._invoke = enqueue;
1577
- }
1578
-
1579
- defineIteratorMethods(AsyncIterator.prototype);
1580
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
1581
- return this;
1582
- });
1583
- exports.AsyncIterator = AsyncIterator;
1584
-
1585
- // Note that simple async functions are implemented on top of
1586
- // AsyncIterator objects; they just return a Promise for the value of
1587
- // the final result produced by the iterator.
1588
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1589
- if (PromiseImpl === void 0) PromiseImpl = Promise;
1590
-
1591
- var iter = new AsyncIterator(
1592
- wrap(innerFn, outerFn, self, tryLocsList),
1593
- PromiseImpl
1594
- );
1595
-
1596
- return exports.isGeneratorFunction(outerFn)
1597
- ? iter // If outerFn is a generator, return the full iterator.
1598
- : iter.next().then(function(result) {
1599
- return result.done ? result.value : iter.next();
1600
- });
1601
- };
1602
-
1603
- function makeInvokeMethod(innerFn, self, context) {
1604
- var state = GenStateSuspendedStart;
1605
-
1606
- return function invoke(method, arg) {
1607
- if (state === GenStateExecuting) {
1608
- throw new Error("Generator is already running");
1609
- }
1610
-
1611
- if (state === GenStateCompleted) {
1612
- if (method === "throw") {
1613
- throw arg;
1614
- }
1615
-
1616
- // Be forgiving, per 25.3.3.3.3 of the spec:
1617
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1618
- return doneResult();
1619
- }
1620
-
1621
- context.method = method;
1622
- context.arg = arg;
1623
-
1624
- while (true) {
1625
- var delegate = context.delegate;
1626
- if (delegate) {
1627
- var delegateResult = maybeInvokeDelegate(delegate, context);
1628
- if (delegateResult) {
1629
- if (delegateResult === ContinueSentinel) continue;
1630
- return delegateResult;
1631
- }
1632
- }
1633
-
1634
- if (context.method === "next") {
1635
- // Setting context._sent for legacy support of Babel's
1636
- // function.sent implementation.
1637
- context.sent = context._sent = context.arg;
1638
-
1639
- } else if (context.method === "throw") {
1640
- if (state === GenStateSuspendedStart) {
1641
- state = GenStateCompleted;
1642
- throw context.arg;
1643
- }
1644
-
1645
- context.dispatchException(context.arg);
1646
-
1647
- } else if (context.method === "return") {
1648
- context.abrupt("return", context.arg);
1649
- }
1650
-
1651
- state = GenStateExecuting;
1652
-
1653
- var record = tryCatch(innerFn, self, context);
1654
- if (record.type === "normal") {
1655
- // If an exception is thrown from innerFn, we leave state ===
1656
- // GenStateExecuting and loop back for another invocation.
1657
- state = context.done
1658
- ? GenStateCompleted
1659
- : GenStateSuspendedYield;
1660
-
1661
- if (record.arg === ContinueSentinel) {
1662
- continue;
1663
- }
1664
-
1665
- return {
1666
- value: record.arg,
1667
- done: context.done
1668
- };
1669
-
1670
- } else if (record.type === "throw") {
1671
- state = GenStateCompleted;
1672
- // Dispatch the exception by looping back around to the
1673
- // context.dispatchException(context.arg) call above.
1674
- context.method = "throw";
1675
- context.arg = record.arg;
1676
- }
1677
- }
1678
- };
1679
- }
1680
-
1681
- // Call delegate.iterator[context.method](context.arg) and handle the
1682
- // result, either by returning a { value, done } result from the
1683
- // delegate iterator, or by modifying context.method and context.arg,
1684
- // setting context.delegate to null, and returning the ContinueSentinel.
1685
- function maybeInvokeDelegate(delegate, context) {
1686
- var method = delegate.iterator[context.method];
1687
- if (method === undefined$1) {
1688
- // A .throw or .return when the delegate iterator has no .throw
1689
- // method always terminates the yield* loop.
1690
- context.delegate = null;
1691
-
1692
- if (context.method === "throw") {
1693
- // Note: ["return"] must be used for ES3 parsing compatibility.
1694
- if (delegate.iterator["return"]) {
1695
- // If the delegate iterator has a return method, give it a
1696
- // chance to clean up.
1697
- context.method = "return";
1698
- context.arg = undefined$1;
1699
- maybeInvokeDelegate(delegate, context);
1700
-
1701
- if (context.method === "throw") {
1702
- // If maybeInvokeDelegate(context) changed context.method from
1703
- // "return" to "throw", let that override the TypeError below.
1704
- return ContinueSentinel;
1705
- }
1706
- }
1707
-
1708
- context.method = "throw";
1709
- context.arg = new TypeError(
1710
- "The iterator does not provide a 'throw' method");
1711
- }
1712
-
1713
- return ContinueSentinel;
1714
- }
1715
-
1716
- var record = tryCatch(method, delegate.iterator, context.arg);
1717
-
1718
- if (record.type === "throw") {
1719
- context.method = "throw";
1720
- context.arg = record.arg;
1721
- context.delegate = null;
1722
- return ContinueSentinel;
1723
- }
1724
-
1725
- var info = record.arg;
1726
-
1727
- if (! info) {
1728
- context.method = "throw";
1729
- context.arg = new TypeError("iterator result is not an object");
1730
- context.delegate = null;
1731
- return ContinueSentinel;
1732
- }
1733
-
1734
- if (info.done) {
1735
- // Assign the result of the finished delegate to the temporary
1736
- // variable specified by delegate.resultName (see delegateYield).
1737
- context[delegate.resultName] = info.value;
1738
-
1739
- // Resume execution at the desired location (see delegateYield).
1740
- context.next = delegate.nextLoc;
1741
-
1742
- // If context.method was "throw" but the delegate handled the
1743
- // exception, let the outer generator proceed normally. If
1744
- // context.method was "next", forget context.arg since it has been
1745
- // "consumed" by the delegate iterator. If context.method was
1746
- // "return", allow the original .return call to continue in the
1747
- // outer generator.
1748
- if (context.method !== "return") {
1749
- context.method = "next";
1750
- context.arg = undefined$1;
1751
- }
1752
-
1753
- } else {
1754
- // Re-yield the result returned by the delegate method.
1755
- return info;
1756
- }
1757
-
1758
- // The delegate iterator is finished, so forget it and continue with
1759
- // the outer generator.
1760
- context.delegate = null;
1761
- return ContinueSentinel;
1762
- }
1763
-
1764
- // Define Generator.prototype.{next,throw,return} in terms of the
1765
- // unified ._invoke helper method.
1766
- defineIteratorMethods(Gp);
1767
-
1768
- define(Gp, toStringTagSymbol, "Generator");
1769
-
1770
- // A Generator should always return itself as the iterator object when the
1771
- // @@iterator function is called on it. Some browsers' implementations of the
1772
- // iterator prototype chain incorrectly implement this, causing the Generator
1773
- // object to not be returned from this call. This ensures that doesn't happen.
1774
- // See https://github.com/facebook/regenerator/issues/274 for more details.
1775
- define(Gp, iteratorSymbol, function() {
1776
- return this;
1777
- });
1778
-
1779
- define(Gp, "toString", function() {
1780
- return "[object Generator]";
1781
- });
1782
-
1783
- function pushTryEntry(locs) {
1784
- var entry = { tryLoc: locs[0] };
1785
-
1786
- if (1 in locs) {
1787
- entry.catchLoc = locs[1];
1788
- }
1789
-
1790
- if (2 in locs) {
1791
- entry.finallyLoc = locs[2];
1792
- entry.afterLoc = locs[3];
1793
- }
1794
-
1795
- this.tryEntries.push(entry);
1796
- }
1797
-
1798
- function resetTryEntry(entry) {
1799
- var record = entry.completion || {};
1800
- record.type = "normal";
1801
- delete record.arg;
1802
- entry.completion = record;
1803
- }
1804
-
1805
- function Context(tryLocsList) {
1806
- // The root entry object (effectively a try statement without a catch
1807
- // or a finally block) gives us a place to store values thrown from
1808
- // locations where there is no enclosing try statement.
1809
- this.tryEntries = [{ tryLoc: "root" }];
1810
- tryLocsList.forEach(pushTryEntry, this);
1811
- this.reset(true);
1812
- }
1813
-
1814
- exports.keys = function(object) {
1815
- var keys = [];
1816
- for (var key in object) {
1817
- keys.push(key);
1818
- }
1819
- keys.reverse();
1820
-
1821
- // Rather than returning an object with a next method, we keep
1822
- // things simple and return the next function itself.
1823
- return function next() {
1824
- while (keys.length) {
1825
- var key = keys.pop();
1826
- if (key in object) {
1827
- next.value = key;
1828
- next.done = false;
1829
- return next;
1830
- }
1831
- }
1832
-
1833
- // To avoid creating an additional object, we just hang the .value
1834
- // and .done properties off the next function object itself. This
1835
- // also ensures that the minifier will not anonymize the function.
1836
- next.done = true;
1837
- return next;
1838
- };
1839
- };
1840
-
1841
- function values(iterable) {
1842
- if (iterable) {
1843
- var iteratorMethod = iterable[iteratorSymbol];
1844
- if (iteratorMethod) {
1845
- return iteratorMethod.call(iterable);
1846
- }
1847
-
1848
- if (typeof iterable.next === "function") {
1849
- return iterable;
1850
- }
1851
-
1852
- if (!isNaN(iterable.length)) {
1853
- var i = -1, next = function next() {
1854
- while (++i < iterable.length) {
1855
- if (hasOwn.call(iterable, i)) {
1856
- next.value = iterable[i];
1857
- next.done = false;
1858
- return next;
1859
- }
1860
- }
1861
-
1862
- next.value = undefined$1;
1863
- next.done = true;
1864
-
1865
- return next;
1866
- };
1867
-
1868
- return next.next = next;
1869
- }
1870
- }
1871
-
1872
- // Return an iterator with no values.
1873
- return { next: doneResult };
1874
- }
1875
- exports.values = values;
1876
-
1877
- function doneResult() {
1878
- return { value: undefined$1, done: true };
1879
- }
1880
-
1881
- Context.prototype = {
1882
- constructor: Context,
1883
-
1884
- reset: function(skipTempReset) {
1885
- this.prev = 0;
1886
- this.next = 0;
1887
- // Resetting context._sent for legacy support of Babel's
1888
- // function.sent implementation.
1889
- this.sent = this._sent = undefined$1;
1890
- this.done = false;
1891
- this.delegate = null;
1892
-
1893
- this.method = "next";
1894
- this.arg = undefined$1;
1895
-
1896
- this.tryEntries.forEach(resetTryEntry);
1897
-
1898
- if (!skipTempReset) {
1899
- for (var name in this) {
1900
- // Not sure about the optimal order of these conditions:
1901
- if (name.charAt(0) === "t" &&
1902
- hasOwn.call(this, name) &&
1903
- !isNaN(+name.slice(1))) {
1904
- this[name] = undefined$1;
1905
- }
1906
- }
1907
- }
1908
- },
1909
-
1910
- stop: function() {
1911
- this.done = true;
1912
-
1913
- var rootEntry = this.tryEntries[0];
1914
- var rootRecord = rootEntry.completion;
1915
- if (rootRecord.type === "throw") {
1916
- throw rootRecord.arg;
1917
- }
1918
-
1919
- return this.rval;
1920
- },
1921
-
1922
- dispatchException: function(exception) {
1923
- if (this.done) {
1924
- throw exception;
1925
- }
1926
-
1927
- var context = this;
1928
- function handle(loc, caught) {
1929
- record.type = "throw";
1930
- record.arg = exception;
1931
- context.next = loc;
1932
-
1933
- if (caught) {
1934
- // If the dispatched exception was caught by a catch block,
1935
- // then let that catch block handle the exception normally.
1936
- context.method = "next";
1937
- context.arg = undefined$1;
1938
- }
1939
-
1940
- return !! caught;
1941
- }
1942
-
1943
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1944
- var entry = this.tryEntries[i];
1945
- var record = entry.completion;
1946
-
1947
- if (entry.tryLoc === "root") {
1948
- // Exception thrown outside of any try block that could handle
1949
- // it, so set the completion value of the entire function to
1950
- // throw the exception.
1951
- return handle("end");
1952
- }
1953
-
1954
- if (entry.tryLoc <= this.prev) {
1955
- var hasCatch = hasOwn.call(entry, "catchLoc");
1956
- var hasFinally = hasOwn.call(entry, "finallyLoc");
1957
-
1958
- if (hasCatch && hasFinally) {
1959
- if (this.prev < entry.catchLoc) {
1960
- return handle(entry.catchLoc, true);
1961
- } else if (this.prev < entry.finallyLoc) {
1962
- return handle(entry.finallyLoc);
1963
- }
1964
-
1965
- } else if (hasCatch) {
1966
- if (this.prev < entry.catchLoc) {
1967
- return handle(entry.catchLoc, true);
1968
- }
1969
-
1970
- } else if (hasFinally) {
1971
- if (this.prev < entry.finallyLoc) {
1972
- return handle(entry.finallyLoc);
1973
- }
1974
-
1975
- } else {
1976
- throw new Error("try statement without catch or finally");
1977
- }
1978
- }
1979
- }
1980
- },
1981
-
1982
- abrupt: function(type, arg) {
1983
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1984
- var entry = this.tryEntries[i];
1985
- if (entry.tryLoc <= this.prev &&
1986
- hasOwn.call(entry, "finallyLoc") &&
1987
- this.prev < entry.finallyLoc) {
1988
- var finallyEntry = entry;
1989
- break;
1990
- }
1991
- }
1992
-
1993
- if (finallyEntry &&
1994
- (type === "break" ||
1995
- type === "continue") &&
1996
- finallyEntry.tryLoc <= arg &&
1997
- arg <= finallyEntry.finallyLoc) {
1998
- // Ignore the finally entry if control is not jumping to a
1999
- // location outside the try/catch block.
2000
- finallyEntry = null;
2001
- }
2002
-
2003
- var record = finallyEntry ? finallyEntry.completion : {};
2004
- record.type = type;
2005
- record.arg = arg;
2006
-
2007
- if (finallyEntry) {
2008
- this.method = "next";
2009
- this.next = finallyEntry.finallyLoc;
2010
- return ContinueSentinel;
2011
- }
2012
-
2013
- return this.complete(record);
2014
- },
2015
-
2016
- complete: function(record, afterLoc) {
2017
- if (record.type === "throw") {
2018
- throw record.arg;
2019
- }
2020
-
2021
- if (record.type === "break" ||
2022
- record.type === "continue") {
2023
- this.next = record.arg;
2024
- } else if (record.type === "return") {
2025
- this.rval = this.arg = record.arg;
2026
- this.method = "return";
2027
- this.next = "end";
2028
- } else if (record.type === "normal" && afterLoc) {
2029
- this.next = afterLoc;
2030
- }
2031
-
2032
- return ContinueSentinel;
2033
- },
2034
-
2035
- finish: function(finallyLoc) {
2036
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2037
- var entry = this.tryEntries[i];
2038
- if (entry.finallyLoc === finallyLoc) {
2039
- this.complete(entry.completion, entry.afterLoc);
2040
- resetTryEntry(entry);
2041
- return ContinueSentinel;
2042
- }
2043
- }
2044
- },
2045
-
2046
- "catch": function(tryLoc) {
2047
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2048
- var entry = this.tryEntries[i];
2049
- if (entry.tryLoc === tryLoc) {
2050
- var record = entry.completion;
2051
- if (record.type === "throw") {
2052
- var thrown = record.arg;
2053
- resetTryEntry(entry);
2054
- }
2055
- return thrown;
2056
- }
2057
- }
2058
-
2059
- // The context.catch method must only be called with a location
2060
- // argument that corresponds to a known catch block.
2061
- throw new Error("illegal catch attempt");
2062
- },
2063
-
2064
- delegateYield: function(iterable, resultName, nextLoc) {
2065
- this.delegate = {
2066
- iterator: values(iterable),
2067
- resultName: resultName,
2068
- nextLoc: nextLoc
2069
- };
2070
-
2071
- if (this.method === "next") {
2072
- // Deliberately forget the last sent value so that we don't
2073
- // accidentally pass it on to the delegate.
2074
- this.arg = undefined$1;
2075
- }
2076
-
2077
- return ContinueSentinel;
2078
- }
2079
- };
2080
-
2081
- // Regardless of whether this script is executing as a CommonJS module
2082
- // or not, return the runtime object so that we can declare the variable
2083
- // regeneratorRuntime in the outer scope, which allows this module to be
2084
- // injected easily by `bin/regenerator --include-runtime script.js`.
2085
- return exports;
2086
-
2087
- }(
2088
- // If this script is executing as a CommonJS module, use module.exports
2089
- // as the regeneratorRuntime namespace. Otherwise create a new empty
2090
- // object. Either way, the resulting object will be used to initialize
2091
- // the regeneratorRuntime variable at the top of this file.
2092
- module.exports
2093
- ));
2094
-
2095
- try {
2096
- regeneratorRuntime = runtime;
2097
- } catch (accidentalStrictMode) {
2098
- // This module should not be running in strict mode, so the above
2099
- // assignment should always work unless something is misconfigured. Just
2100
- // in case runtime.js accidentally runs in strict mode, in modern engines
2101
- // we can explicitly access globalThis. In older engines we can escape
2102
- // strict mode using a global Function call. This could conceivably fail
2103
- // if a Content Security Policy forbids using Function, but in that case
2104
- // the proper solution is to fix the accidental strict mode problem. If
2105
- // you've misconfigured your bundler to force strict mode and applied a
2106
- // CSP to forbid Function, and you're not willing to fix either of those
2107
- // problems, please detail your unique predicament in a GitHub issue.
2108
- if (typeof globalThis === "object") {
2109
- globalThis.regeneratorRuntime = runtime;
2110
- } else {
2111
- Function("r", "regeneratorRuntime = r")(runtime);
2112
- }
2113
- }
2114
- });
2115
-
2116
27
  var hexToRGB = function hexToRGB(hex) {
2117
28
  var r = parseInt(hex.slice(1, 3), 16);
2118
29
  var g = parseInt(hex.slice(3, 5), 16);
@@ -2149,7 +60,7 @@ function isExternalStory() {
2149
60
  storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
2150
61
  _story$metadata = story.metadata,
2151
62
  metadata = _story$metadata === void 0 ? {} : _story$metadata;
2152
- return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
63
+ return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
2153
64
  } // Adds target='_blank' attribute to anchor tags if not present
2154
65
  PropTypes__default["default"].shape({
2155
66
  "sketches-host": PropTypes__default["default"].string,
@@ -2163,7 +74,7 @@ PropTypes__default["default"].shape({
2163
74
  });
2164
75
  var getStoryUrl = function getStoryUrl(story) {
2165
76
  var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
2166
- return get_1(story, ["story-template"]) === "news-elsewhere" ? get_1(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
77
+ return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
2167
78
  };
2168
79
 
2169
80
  var CrownIcon = function CrownIcon(_ref) {
@@ -2400,8 +311,8 @@ var Headline = function Headline(_ref) {
2400
311
  enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
2401
312
  _premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
2402
313
  showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
2403
- var alternateHeadline = get_1(story, ["alternative", "home", "default", "headline"]);
2404
- var premiumStory = enablePremiumStoryIcon && get_1(story, ["access"]) === "subscription";
314
+ var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
315
+ var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
2405
316
  var headline = alternateHeadline || story.headline;
2406
317
  var HeaderTag = "h" + headerLevel;
2407
318
 
@@ -2427,10 +338,10 @@ var Headline = function Headline(_ref) {
2427
338
  var textColor = getTextColor(configData.theme);
2428
339
  var wrapperClass = premiumStory ? "wrapper" : "";
2429
340
  var iconSize = "24px";
2430
- var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
341
+ var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
2431
342
  return /*#__PURE__*/React__default["default"].createElement("div", {
2432
343
  "data-test-id": "headline",
2433
- className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap)
344
+ className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap)
2434
345
  }, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
2435
346
  width: iconSize,
2436
347
  height: iconSize,
@@ -2442,9 +353,9 @@ var Headline = function Headline(_ref) {
2442
353
  externalLink: isExternalStory(story),
2443
354
  "aria-label": "headline"
2444
355
  }, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
2445
- className: _getClassName("headline ".concat(textColor), _styleModuleImportMap)
356
+ className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap)
2446
357
  }, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
2447
- className: _getClassName("headline ".concat(textColor), _styleModuleImportMap)
358
+ className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap)
2448
359
  }, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
2449
360
  };
2450
361
  Headline.propTypes = {