@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,2478 +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');
7
+ var lodash = require('lodash');
8
+ require('@babel/runtime/helpers/asyncToGenerator');
9
+ require('@babel/runtime/helpers/typeof');
10
+ require('@babel/runtime/regenerator');
6
11
  var PropTypes = require('prop-types');
7
12
  var Timeago = require('react-timeago');
8
13
  var dateFnsTz = require('date-fns-tz');
9
14
 
10
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
16
 
17
+ var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
12
18
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
19
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
14
20
  var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
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
- /**
168
- * Checks if `value` is classified as an `Array` object.
169
- *
170
- * @static
171
- * @memberOf _
172
- * @since 0.1.0
173
- * @category Lang
174
- * @param {*} value The value to check.
175
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
176
- * @example
177
- *
178
- * _.isArray([1, 2, 3]);
179
- * // => true
180
- *
181
- * _.isArray(document.body.children);
182
- * // => false
183
- *
184
- * _.isArray('abc');
185
- * // => false
186
- *
187
- * _.isArray(_.noop);
188
- * // => false
189
- */
190
- var isArray = Array.isArray;
191
-
192
- var isArray_1 = isArray;
193
-
194
- /** Detect free variable `global` from Node.js. */
195
-
196
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
197
-
198
- var _freeGlobal = freeGlobal;
199
-
200
- /** Detect free variable `self`. */
201
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
202
-
203
- /** Used as a reference to the global object. */
204
- var root = _freeGlobal || freeSelf || Function('return this')();
205
-
206
- var _root = root;
207
-
208
- /** Built-in value references. */
209
- var Symbol$1 = _root.Symbol;
210
-
211
- var _Symbol = Symbol$1;
212
-
213
- /** Used for built-in method references. */
214
- var objectProto$4 = Object.prototype;
215
-
216
- /** Used to check objects for own properties. */
217
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
218
-
219
- /**
220
- * Used to resolve the
221
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
222
- * of values.
223
- */
224
- var nativeObjectToString$1 = objectProto$4.toString;
225
-
226
- /** Built-in value references. */
227
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
228
-
229
- /**
230
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
231
- *
232
- * @private
233
- * @param {*} value The value to query.
234
- * @returns {string} Returns the raw `toStringTag`.
235
- */
236
- function getRawTag(value) {
237
- var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
238
- tag = value[symToStringTag$1];
239
-
240
- try {
241
- value[symToStringTag$1] = undefined;
242
- var unmasked = true;
243
- } catch (e) {}
244
-
245
- var result = nativeObjectToString$1.call(value);
246
- if (unmasked) {
247
- if (isOwn) {
248
- value[symToStringTag$1] = tag;
249
- } else {
250
- delete value[symToStringTag$1];
251
- }
252
- }
253
- return result;
254
- }
255
-
256
- var _getRawTag = getRawTag;
257
-
258
- /** Used for built-in method references. */
259
- var objectProto$3 = Object.prototype;
260
-
261
- /**
262
- * Used to resolve the
263
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
264
- * of values.
265
- */
266
- var nativeObjectToString = objectProto$3.toString;
267
-
268
- /**
269
- * Converts `value` to a string using `Object.prototype.toString`.
270
- *
271
- * @private
272
- * @param {*} value The value to convert.
273
- * @returns {string} Returns the converted string.
274
- */
275
- function objectToString(value) {
276
- return nativeObjectToString.call(value);
277
- }
278
-
279
- var _objectToString = objectToString;
280
-
281
- /** `Object#toString` result references. */
282
- var nullTag = '[object Null]',
283
- undefinedTag = '[object Undefined]';
284
-
285
- /** Built-in value references. */
286
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
287
-
288
- /**
289
- * The base implementation of `getTag` without fallbacks for buggy environments.
290
- *
291
- * @private
292
- * @param {*} value The value to query.
293
- * @returns {string} Returns the `toStringTag`.
294
- */
295
- function baseGetTag(value) {
296
- if (value == null) {
297
- return value === undefined ? undefinedTag : nullTag;
298
- }
299
- return (symToStringTag && symToStringTag in Object(value))
300
- ? _getRawTag(value)
301
- : _objectToString(value);
302
- }
303
-
304
- var _baseGetTag = baseGetTag;
305
-
306
- /**
307
- * Checks if `value` is object-like. A value is object-like if it's not `null`
308
- * and has a `typeof` result of "object".
309
- *
310
- * @static
311
- * @memberOf _
312
- * @since 4.0.0
313
- * @category Lang
314
- * @param {*} value The value to check.
315
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
316
- * @example
317
- *
318
- * _.isObjectLike({});
319
- * // => true
320
- *
321
- * _.isObjectLike([1, 2, 3]);
322
- * // => true
323
- *
324
- * _.isObjectLike(_.noop);
325
- * // => false
326
- *
327
- * _.isObjectLike(null);
328
- * // => false
329
- */
330
- function isObjectLike(value) {
331
- return value != null && typeof value == 'object';
332
- }
333
-
334
- var isObjectLike_1 = isObjectLike;
335
-
336
- /** `Object#toString` result references. */
337
- var symbolTag = '[object Symbol]';
338
-
339
- /**
340
- * Checks if `value` is classified as a `Symbol` primitive or object.
341
- *
342
- * @static
343
- * @memberOf _
344
- * @since 4.0.0
345
- * @category Lang
346
- * @param {*} value The value to check.
347
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
348
- * @example
349
- *
350
- * _.isSymbol(Symbol.iterator);
351
- * // => true
352
- *
353
- * _.isSymbol('abc');
354
- * // => false
355
- */
356
- function isSymbol(value) {
357
- return typeof value == 'symbol' ||
358
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
359
- }
360
-
361
- var isSymbol_1 = isSymbol;
362
-
363
- /** Used to match property names within property paths. */
364
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
365
- reIsPlainProp = /^\w*$/;
366
-
367
- /**
368
- * Checks if `value` is a property name and not a property path.
369
- *
370
- * @private
371
- * @param {*} value The value to check.
372
- * @param {Object} [object] The object to query keys on.
373
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
374
- */
375
- function isKey(value, object) {
376
- if (isArray_1(value)) {
377
- return false;
378
- }
379
- var type = typeof value;
380
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
381
- value == null || isSymbol_1(value)) {
382
- return true;
383
- }
384
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
385
- (object != null && value in Object(object));
386
- }
387
-
388
- var _isKey = isKey;
389
-
390
- /**
391
- * Checks if `value` is the
392
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
393
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
394
- *
395
- * @static
396
- * @memberOf _
397
- * @since 0.1.0
398
- * @category Lang
399
- * @param {*} value The value to check.
400
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
401
- * @example
402
- *
403
- * _.isObject({});
404
- * // => true
405
- *
406
- * _.isObject([1, 2, 3]);
407
- * // => true
408
- *
409
- * _.isObject(_.noop);
410
- * // => true
411
- *
412
- * _.isObject(null);
413
- * // => false
414
- */
415
- function isObject(value) {
416
- var type = typeof value;
417
- return value != null && (type == 'object' || type == 'function');
418
- }
419
-
420
- var isObject_1 = isObject;
421
-
422
- /** `Object#toString` result references. */
423
- var asyncTag = '[object AsyncFunction]',
424
- funcTag = '[object Function]',
425
- genTag = '[object GeneratorFunction]',
426
- proxyTag = '[object Proxy]';
427
-
428
- /**
429
- * Checks if `value` is classified as a `Function` object.
430
- *
431
- * @static
432
- * @memberOf _
433
- * @since 0.1.0
434
- * @category Lang
435
- * @param {*} value The value to check.
436
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
437
- * @example
438
- *
439
- * _.isFunction(_);
440
- * // => true
441
- *
442
- * _.isFunction(/abc/);
443
- * // => false
444
- */
445
- function isFunction(value) {
446
- if (!isObject_1(value)) {
447
- return false;
448
- }
449
- // The use of `Object#toString` avoids issues with the `typeof` operator
450
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
451
- var tag = _baseGetTag(value);
452
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
453
- }
454
-
455
- var isFunction_1 = isFunction;
456
-
457
- /** Used to detect overreaching core-js shims. */
458
- var coreJsData = _root['__core-js_shared__'];
459
-
460
- var _coreJsData = coreJsData;
461
-
462
- /** Used to detect methods masquerading as native. */
463
- var maskSrcKey = (function() {
464
- var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
465
- return uid ? ('Symbol(src)_1.' + uid) : '';
466
- }());
467
-
468
- /**
469
- * Checks if `func` has its source masked.
470
- *
471
- * @private
472
- * @param {Function} func The function to check.
473
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
474
- */
475
- function isMasked(func) {
476
- return !!maskSrcKey && (maskSrcKey in func);
477
- }
478
-
479
- var _isMasked = isMasked;
480
-
481
- /** Used for built-in method references. */
482
- var funcProto$1 = Function.prototype;
483
-
484
- /** Used to resolve the decompiled source of functions. */
485
- var funcToString$1 = funcProto$1.toString;
486
-
487
- /**
488
- * Converts `func` to its source code.
489
- *
490
- * @private
491
- * @param {Function} func The function to convert.
492
- * @returns {string} Returns the source code.
493
- */
494
- function toSource(func) {
495
- if (func != null) {
496
- try {
497
- return funcToString$1.call(func);
498
- } catch (e) {}
499
- try {
500
- return (func + '');
501
- } catch (e) {}
502
- }
503
- return '';
504
- }
505
-
506
- var _toSource = toSource;
507
-
508
- /**
509
- * Used to match `RegExp`
510
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
511
- */
512
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
513
-
514
- /** Used to detect host constructors (Safari). */
515
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
516
-
517
- /** Used for built-in method references. */
518
- var funcProto = Function.prototype,
519
- objectProto$2 = Object.prototype;
520
-
521
- /** Used to resolve the decompiled source of functions. */
522
- var funcToString = funcProto.toString;
523
-
524
- /** Used to check objects for own properties. */
525
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
526
-
527
- /** Used to detect if a method is native. */
528
- var reIsNative = RegExp('^' +
529
- funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
530
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
531
- );
532
-
533
- /**
534
- * The base implementation of `_.isNative` without bad shim checks.
535
- *
536
- * @private
537
- * @param {*} value The value to check.
538
- * @returns {boolean} Returns `true` if `value` is a native function,
539
- * else `false`.
540
- */
541
- function baseIsNative(value) {
542
- if (!isObject_1(value) || _isMasked(value)) {
543
- return false;
544
- }
545
- var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
546
- return pattern.test(_toSource(value));
547
- }
548
-
549
- var _baseIsNative = baseIsNative;
550
-
551
- /**
552
- * Gets the value at `key` of `object`.
553
- *
554
- * @private
555
- * @param {Object} [object] The object to query.
556
- * @param {string} key The key of the property to get.
557
- * @returns {*} Returns the property value.
558
- */
559
- function getValue(object, key) {
560
- return object == null ? undefined : object[key];
561
- }
562
-
563
- var _getValue = getValue;
564
-
565
- /**
566
- * Gets the native function at `key` of `object`.
567
- *
568
- * @private
569
- * @param {Object} object The object to query.
570
- * @param {string} key The key of the method to get.
571
- * @returns {*} Returns the function if it's native, else `undefined`.
572
- */
573
- function getNative(object, key) {
574
- var value = _getValue(object, key);
575
- return _baseIsNative(value) ? value : undefined;
576
- }
577
-
578
- var _getNative = getNative;
579
-
580
- /* Built-in method references that are verified to be native. */
581
- var nativeCreate = _getNative(Object, 'create');
582
-
583
- var _nativeCreate = nativeCreate;
584
-
585
- /**
586
- * Removes all key-value entries from the hash.
587
- *
588
- * @private
589
- * @name clear
590
- * @memberOf Hash
591
- */
592
- function hashClear() {
593
- this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
594
- this.size = 0;
595
- }
596
-
597
- var _hashClear = hashClear;
598
-
599
- /**
600
- * Removes `key` and its value from the hash.
601
- *
602
- * @private
603
- * @name delete
604
- * @memberOf Hash
605
- * @param {Object} hash The hash to modify.
606
- * @param {string} key The key of the value to remove.
607
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
608
- */
609
- function hashDelete(key) {
610
- var result = this.has(key) && delete this.__data__[key];
611
- this.size -= result ? 1 : 0;
612
- return result;
613
- }
614
-
615
- var _hashDelete = hashDelete;
616
-
617
- /** Used to stand-in for `undefined` hash values. */
618
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
619
-
620
- /** Used for built-in method references. */
621
- var objectProto$1 = Object.prototype;
622
-
623
- /** Used to check objects for own properties. */
624
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
625
-
626
- /**
627
- * Gets the hash value for `key`.
628
- *
629
- * @private
630
- * @name get
631
- * @memberOf Hash
632
- * @param {string} key The key of the value to get.
633
- * @returns {*} Returns the entry value.
634
- */
635
- function hashGet(key) {
636
- var data = this.__data__;
637
- if (_nativeCreate) {
638
- var result = data[key];
639
- return result === HASH_UNDEFINED$1 ? undefined : result;
640
- }
641
- return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
642
- }
643
-
644
- var _hashGet = hashGet;
645
-
646
- /** Used for built-in method references. */
647
- var objectProto = Object.prototype;
648
-
649
- /** Used to check objects for own properties. */
650
- var hasOwnProperty = objectProto.hasOwnProperty;
651
-
652
- /**
653
- * Checks if a hash value for `key` exists.
654
- *
655
- * @private
656
- * @name has
657
- * @memberOf Hash
658
- * @param {string} key The key of the entry to check.
659
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
660
- */
661
- function hashHas(key) {
662
- var data = this.__data__;
663
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
664
- }
665
-
666
- var _hashHas = hashHas;
667
-
668
- /** Used to stand-in for `undefined` hash values. */
669
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
670
-
671
- /**
672
- * Sets the hash `key` to `value`.
673
- *
674
- * @private
675
- * @name set
676
- * @memberOf Hash
677
- * @param {string} key The key of the value to set.
678
- * @param {*} value The value to set.
679
- * @returns {Object} Returns the hash instance.
680
- */
681
- function hashSet(key, value) {
682
- var data = this.__data__;
683
- this.size += this.has(key) ? 0 : 1;
684
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
685
- return this;
686
- }
687
-
688
- var _hashSet = hashSet;
689
-
690
- /**
691
- * Creates a hash object.
692
- *
693
- * @private
694
- * @constructor
695
- * @param {Array} [entries] The key-value pairs to cache.
696
- */
697
- function Hash(entries) {
698
- var index = -1,
699
- length = entries == null ? 0 : entries.length;
700
-
701
- this.clear();
702
- while (++index < length) {
703
- var entry = entries[index];
704
- this.set(entry[0], entry[1]);
705
- }
706
- }
707
-
708
- // Add methods to `Hash`.
709
- Hash.prototype.clear = _hashClear;
710
- Hash.prototype['delete'] = _hashDelete;
711
- Hash.prototype.get = _hashGet;
712
- Hash.prototype.has = _hashHas;
713
- Hash.prototype.set = _hashSet;
714
-
715
- var _Hash = Hash;
716
-
717
- /**
718
- * Removes all key-value entries from the list cache.
719
- *
720
- * @private
721
- * @name clear
722
- * @memberOf ListCache
723
- */
724
- function listCacheClear() {
725
- this.__data__ = [];
726
- this.size = 0;
727
- }
728
-
729
- var _listCacheClear = listCacheClear;
730
-
731
- /**
732
- * Performs a
733
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
734
- * comparison between two values to determine if they are equivalent.
735
- *
736
- * @static
737
- * @memberOf _
738
- * @since 4.0.0
739
- * @category Lang
740
- * @param {*} value The value to compare.
741
- * @param {*} other The other value to compare.
742
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
743
- * @example
744
- *
745
- * var object = { 'a': 1 };
746
- * var other = { 'a': 1 };
747
- *
748
- * _.eq(object, object);
749
- * // => true
750
- *
751
- * _.eq(object, other);
752
- * // => false
753
- *
754
- * _.eq('a', 'a');
755
- * // => true
756
- *
757
- * _.eq('a', Object('a'));
758
- * // => false
759
- *
760
- * _.eq(NaN, NaN);
761
- * // => true
762
- */
763
- function eq(value, other) {
764
- return value === other || (value !== value && other !== other);
765
- }
766
-
767
- var eq_1 = eq;
768
-
769
- /**
770
- * Gets the index at which the `key` is found in `array` of key-value pairs.
771
- *
772
- * @private
773
- * @param {Array} array The array to inspect.
774
- * @param {*} key The key to search for.
775
- * @returns {number} Returns the index of the matched value, else `-1`.
776
- */
777
- function assocIndexOf(array, key) {
778
- var length = array.length;
779
- while (length--) {
780
- if (eq_1(array[length][0], key)) {
781
- return length;
782
- }
783
- }
784
- return -1;
785
- }
786
-
787
- var _assocIndexOf = assocIndexOf;
788
-
789
- /** Used for built-in method references. */
790
- var arrayProto = Array.prototype;
791
-
792
- /** Built-in value references. */
793
- var splice = arrayProto.splice;
794
-
795
- /**
796
- * Removes `key` and its value from the list cache.
797
- *
798
- * @private
799
- * @name delete
800
- * @memberOf ListCache
801
- * @param {string} key The key of the value to remove.
802
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
803
- */
804
- function listCacheDelete(key) {
805
- var data = this.__data__,
806
- index = _assocIndexOf(data, key);
807
-
808
- if (index < 0) {
809
- return false;
810
- }
811
- var lastIndex = data.length - 1;
812
- if (index == lastIndex) {
813
- data.pop();
814
- } else {
815
- splice.call(data, index, 1);
816
- }
817
- --this.size;
818
- return true;
819
- }
820
-
821
- var _listCacheDelete = listCacheDelete;
822
-
823
- /**
824
- * Gets the list cache value for `key`.
825
- *
826
- * @private
827
- * @name get
828
- * @memberOf ListCache
829
- * @param {string} key The key of the value to get.
830
- * @returns {*} Returns the entry value.
831
- */
832
- function listCacheGet(key) {
833
- var data = this.__data__,
834
- index = _assocIndexOf(data, key);
835
-
836
- return index < 0 ? undefined : data[index][1];
837
- }
838
-
839
- var _listCacheGet = listCacheGet;
840
-
841
- /**
842
- * Checks if a list cache value for `key` exists.
843
- *
844
- * @private
845
- * @name has
846
- * @memberOf ListCache
847
- * @param {string} key The key of the entry to check.
848
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
849
- */
850
- function listCacheHas(key) {
851
- return _assocIndexOf(this.__data__, key) > -1;
852
- }
853
-
854
- var _listCacheHas = listCacheHas;
855
-
856
- /**
857
- * Sets the list cache `key` to `value`.
858
- *
859
- * @private
860
- * @name set
861
- * @memberOf ListCache
862
- * @param {string} key The key of the value to set.
863
- * @param {*} value The value to set.
864
- * @returns {Object} Returns the list cache instance.
865
- */
866
- function listCacheSet(key, value) {
867
- var data = this.__data__,
868
- index = _assocIndexOf(data, key);
869
-
870
- if (index < 0) {
871
- ++this.size;
872
- data.push([key, value]);
873
- } else {
874
- data[index][1] = value;
875
- }
876
- return this;
877
- }
878
-
879
- var _listCacheSet = listCacheSet;
880
-
881
- /**
882
- * Creates an list cache object.
883
- *
884
- * @private
885
- * @constructor
886
- * @param {Array} [entries] The key-value pairs to cache.
887
- */
888
- function ListCache(entries) {
889
- var index = -1,
890
- length = entries == null ? 0 : entries.length;
891
-
892
- this.clear();
893
- while (++index < length) {
894
- var entry = entries[index];
895
- this.set(entry[0], entry[1]);
896
- }
897
- }
898
-
899
- // Add methods to `ListCache`.
900
- ListCache.prototype.clear = _listCacheClear;
901
- ListCache.prototype['delete'] = _listCacheDelete;
902
- ListCache.prototype.get = _listCacheGet;
903
- ListCache.prototype.has = _listCacheHas;
904
- ListCache.prototype.set = _listCacheSet;
905
-
906
- var _ListCache = ListCache;
907
-
908
- /* Built-in method references that are verified to be native. */
909
- var Map = _getNative(_root, 'Map');
910
-
911
- var _Map = Map;
912
-
913
- /**
914
- * Removes all key-value entries from the map.
915
- *
916
- * @private
917
- * @name clear
918
- * @memberOf MapCache
919
- */
920
- function mapCacheClear() {
921
- this.size = 0;
922
- this.__data__ = {
923
- 'hash': new _Hash,
924
- 'map': new (_Map || _ListCache),
925
- 'string': new _Hash
926
- };
927
- }
928
-
929
- var _mapCacheClear = mapCacheClear;
930
-
931
- /**
932
- * Checks if `value` is suitable for use as unique object key.
933
- *
934
- * @private
935
- * @param {*} value The value to check.
936
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
937
- */
938
- function isKeyable(value) {
939
- var type = typeof value;
940
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
941
- ? (value !== '__proto__')
942
- : (value === null);
943
- }
944
-
945
- var _isKeyable = isKeyable;
946
-
947
- /**
948
- * Gets the data for `map`.
949
- *
950
- * @private
951
- * @param {Object} map The map to query.
952
- * @param {string} key The reference key.
953
- * @returns {*} Returns the map data.
954
- */
955
- function getMapData(map, key) {
956
- var data = map.__data__;
957
- return _isKeyable(key)
958
- ? data[typeof key == 'string' ? 'string' : 'hash']
959
- : data.map;
960
- }
961
-
962
- var _getMapData = getMapData;
963
-
964
- /**
965
- * Removes `key` and its value from the map.
966
- *
967
- * @private
968
- * @name delete
969
- * @memberOf MapCache
970
- * @param {string} key The key of the value to remove.
971
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
972
- */
973
- function mapCacheDelete(key) {
974
- var result = _getMapData(this, key)['delete'](key);
975
- this.size -= result ? 1 : 0;
976
- return result;
977
- }
978
-
979
- var _mapCacheDelete = mapCacheDelete;
980
-
981
- /**
982
- * Gets the map value for `key`.
983
- *
984
- * @private
985
- * @name get
986
- * @memberOf MapCache
987
- * @param {string} key The key of the value to get.
988
- * @returns {*} Returns the entry value.
989
- */
990
- function mapCacheGet(key) {
991
- return _getMapData(this, key).get(key);
992
- }
993
-
994
- var _mapCacheGet = mapCacheGet;
995
-
996
- /**
997
- * Checks if a map value for `key` exists.
998
- *
999
- * @private
1000
- * @name has
1001
- * @memberOf MapCache
1002
- * @param {string} key The key of the entry to check.
1003
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1004
- */
1005
- function mapCacheHas(key) {
1006
- return _getMapData(this, key).has(key);
1007
- }
1008
-
1009
- var _mapCacheHas = mapCacheHas;
1010
-
1011
- /**
1012
- * Sets the map `key` to `value`.
1013
- *
1014
- * @private
1015
- * @name set
1016
- * @memberOf MapCache
1017
- * @param {string} key The key of the value to set.
1018
- * @param {*} value The value to set.
1019
- * @returns {Object} Returns the map cache instance.
1020
- */
1021
- function mapCacheSet(key, value) {
1022
- var data = _getMapData(this, key),
1023
- size = data.size;
1024
-
1025
- data.set(key, value);
1026
- this.size += data.size == size ? 0 : 1;
1027
- return this;
1028
- }
1029
-
1030
- var _mapCacheSet = mapCacheSet;
1031
-
1032
- /**
1033
- * Creates a map cache object to store key-value pairs.
1034
- *
1035
- * @private
1036
- * @constructor
1037
- * @param {Array} [entries] The key-value pairs to cache.
1038
- */
1039
- function MapCache(entries) {
1040
- var index = -1,
1041
- length = entries == null ? 0 : entries.length;
1042
-
1043
- this.clear();
1044
- while (++index < length) {
1045
- var entry = entries[index];
1046
- this.set(entry[0], entry[1]);
1047
- }
1048
- }
1049
-
1050
- // Add methods to `MapCache`.
1051
- MapCache.prototype.clear = _mapCacheClear;
1052
- MapCache.prototype['delete'] = _mapCacheDelete;
1053
- MapCache.prototype.get = _mapCacheGet;
1054
- MapCache.prototype.has = _mapCacheHas;
1055
- MapCache.prototype.set = _mapCacheSet;
1056
-
1057
- var _MapCache = MapCache;
1058
-
1059
- /** Error message constants. */
1060
- var FUNC_ERROR_TEXT = 'Expected a function';
1061
-
1062
- /**
1063
- * Creates a function that memoizes the result of `func`. If `resolver` is
1064
- * provided, it determines the cache key for storing the result based on the
1065
- * arguments provided to the memoized function. By default, the first argument
1066
- * provided to the memoized function is used as the map cache key. The `func`
1067
- * is invoked with the `this` binding of the memoized function.
1068
- *
1069
- * **Note:** The cache is exposed as the `cache` property on the memoized
1070
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
1071
- * constructor with one whose instances implement the
1072
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1073
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1074
- *
1075
- * @static
1076
- * @memberOf _
1077
- * @since 0.1.0
1078
- * @category Function
1079
- * @param {Function} func The function to have its output memoized.
1080
- * @param {Function} [resolver] The function to resolve the cache key.
1081
- * @returns {Function} Returns the new memoized function.
1082
- * @example
1083
- *
1084
- * var object = { 'a': 1, 'b': 2 };
1085
- * var other = { 'c': 3, 'd': 4 };
1086
- *
1087
- * var values = _.memoize(_.values);
1088
- * values(object);
1089
- * // => [1, 2]
1090
- *
1091
- * values(other);
1092
- * // => [3, 4]
1093
- *
1094
- * object.a = 2;
1095
- * values(object);
1096
- * // => [1, 2]
1097
- *
1098
- * // Modify the result cache.
1099
- * values.cache.set(object, ['a', 'b']);
1100
- * values(object);
1101
- * // => ['a', 'b']
1102
- *
1103
- * // Replace `_.memoize.Cache`.
1104
- * _.memoize.Cache = WeakMap;
1105
- */
1106
- function memoize(func, resolver) {
1107
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1108
- throw new TypeError(FUNC_ERROR_TEXT);
1109
- }
1110
- var memoized = function() {
1111
- var args = arguments,
1112
- key = resolver ? resolver.apply(this, args) : args[0],
1113
- cache = memoized.cache;
1114
-
1115
- if (cache.has(key)) {
1116
- return cache.get(key);
1117
- }
1118
- var result = func.apply(this, args);
1119
- memoized.cache = cache.set(key, result) || cache;
1120
- return result;
1121
- };
1122
- memoized.cache = new (memoize.Cache || _MapCache);
1123
- return memoized;
1124
- }
1125
-
1126
- // Expose `MapCache`.
1127
- memoize.Cache = _MapCache;
1128
-
1129
- var memoize_1 = memoize;
1130
-
1131
- /** Used as the maximum memoize cache size. */
1132
- var MAX_MEMOIZE_SIZE = 500;
1133
-
1134
- /**
1135
- * A specialized version of `_.memoize` which clears the memoized function's
1136
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1137
- *
1138
- * @private
1139
- * @param {Function} func The function to have its output memoized.
1140
- * @returns {Function} Returns the new memoized function.
1141
- */
1142
- function memoizeCapped(func) {
1143
- var result = memoize_1(func, function(key) {
1144
- if (cache.size === MAX_MEMOIZE_SIZE) {
1145
- cache.clear();
1146
- }
1147
- return key;
1148
- });
1149
-
1150
- var cache = result.cache;
1151
- return result;
1152
- }
1153
-
1154
- var _memoizeCapped = memoizeCapped;
1155
-
1156
- /** Used to match property names within property paths. */
1157
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1158
-
1159
- /** Used to match backslashes in property paths. */
1160
- var reEscapeChar = /\\(\\)?/g;
1161
-
1162
- /**
1163
- * Converts `string` to a property path array.
1164
- *
1165
- * @private
1166
- * @param {string} string The string to convert.
1167
- * @returns {Array} Returns the property path array.
1168
- */
1169
- var stringToPath = _memoizeCapped(function(string) {
1170
- var result = [];
1171
- if (string.charCodeAt(0) === 46 /* . */) {
1172
- result.push('');
1173
- }
1174
- string.replace(rePropName, function(match, number, quote, subString) {
1175
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1176
- });
1177
- return result;
1178
- });
1179
-
1180
- var _stringToPath = stringToPath;
1181
-
1182
- /**
1183
- * A specialized version of `_.map` for arrays without support for iteratee
1184
- * shorthands.
1185
- *
1186
- * @private
1187
- * @param {Array} [array] The array to iterate over.
1188
- * @param {Function} iteratee The function invoked per iteration.
1189
- * @returns {Array} Returns the new mapped array.
1190
- */
1191
- function arrayMap(array, iteratee) {
1192
- var index = -1,
1193
- length = array == null ? 0 : array.length,
1194
- result = Array(length);
1195
-
1196
- while (++index < length) {
1197
- result[index] = iteratee(array[index], index, array);
1198
- }
1199
- return result;
1200
- }
1201
-
1202
- var _arrayMap = arrayMap;
1203
-
1204
- /** Used as references for various `Number` constants. */
1205
- var INFINITY$1 = 1 / 0;
1206
-
1207
- /** Used to convert symbols to primitives and strings. */
1208
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1209
- symbolToString = symbolProto ? symbolProto.toString : undefined;
1210
-
1211
- /**
1212
- * The base implementation of `_.toString` which doesn't convert nullish
1213
- * values to empty strings.
1214
- *
1215
- * @private
1216
- * @param {*} value The value to process.
1217
- * @returns {string} Returns the string.
1218
- */
1219
- function baseToString(value) {
1220
- // Exit early for strings to avoid a performance hit in some environments.
1221
- if (typeof value == 'string') {
1222
- return value;
1223
- }
1224
- if (isArray_1(value)) {
1225
- // Recursively convert values (susceptible to call stack limits).
1226
- return _arrayMap(value, baseToString) + '';
1227
- }
1228
- if (isSymbol_1(value)) {
1229
- return symbolToString ? symbolToString.call(value) : '';
1230
- }
1231
- var result = (value + '');
1232
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1233
- }
1234
-
1235
- var _baseToString = baseToString;
1236
-
1237
- /**
1238
- * Converts `value` to a string. An empty string is returned for `null`
1239
- * and `undefined` values. The sign of `-0` is preserved.
1240
- *
1241
- * @static
1242
- * @memberOf _
1243
- * @since 4.0.0
1244
- * @category Lang
1245
- * @param {*} value The value to convert.
1246
- * @returns {string} Returns the converted string.
1247
- * @example
1248
- *
1249
- * _.toString(null);
1250
- * // => ''
1251
- *
1252
- * _.toString(-0);
1253
- * // => '-0'
1254
- *
1255
- * _.toString([1, 2, 3]);
1256
- * // => '1,2,3'
1257
- */
1258
- function toString(value) {
1259
- return value == null ? '' : _baseToString(value);
1260
- }
1261
-
1262
- var toString_1 = toString;
1263
-
1264
- /**
1265
- * Casts `value` to a path array if it's not one.
1266
- *
1267
- * @private
1268
- * @param {*} value The value to inspect.
1269
- * @param {Object} [object] The object to query keys on.
1270
- * @returns {Array} Returns the cast property path array.
1271
- */
1272
- function castPath(value, object) {
1273
- if (isArray_1(value)) {
1274
- return value;
1275
- }
1276
- return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1277
- }
1278
-
1279
- var _castPath = castPath;
1280
-
1281
- /** Used as references for various `Number` constants. */
1282
- var INFINITY = 1 / 0;
1283
-
1284
- /**
1285
- * Converts `value` to a string key if it's not a string or symbol.
1286
- *
1287
- * @private
1288
- * @param {*} value The value to inspect.
1289
- * @returns {string|symbol} Returns the key.
1290
- */
1291
- function toKey(value) {
1292
- if (typeof value == 'string' || isSymbol_1(value)) {
1293
- return value;
1294
- }
1295
- var result = (value + '');
1296
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1297
- }
1298
-
1299
- var _toKey = toKey;
1300
-
1301
- /**
1302
- * The base implementation of `_.get` without support for default values.
1303
- *
1304
- * @private
1305
- * @param {Object} object The object to query.
1306
- * @param {Array|string} path The path of the property to get.
1307
- * @returns {*} Returns the resolved value.
1308
- */
1309
- function baseGet(object, path) {
1310
- path = _castPath(path, object);
1311
-
1312
- var index = 0,
1313
- length = path.length;
1314
-
1315
- while (object != null && index < length) {
1316
- object = object[_toKey(path[index++])];
1317
- }
1318
- return (index && index == length) ? object : undefined;
1319
- }
1320
-
1321
- var _baseGet = baseGet;
1322
-
1323
- /**
1324
- * Gets the value at `path` of `object`. If the resolved value is
1325
- * `undefined`, the `defaultValue` is returned in its place.
1326
- *
1327
- * @static
1328
- * @memberOf _
1329
- * @since 3.7.0
1330
- * @category Object
1331
- * @param {Object} object The object to query.
1332
- * @param {Array|string} path The path of the property to get.
1333
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1334
- * @returns {*} Returns the resolved value.
1335
- * @example
1336
- *
1337
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1338
- *
1339
- * _.get(object, 'a[0].b.c');
1340
- * // => 3
1341
- *
1342
- * _.get(object, ['a', '0', 'b', 'c']);
1343
- * // => 3
1344
- *
1345
- * _.get(object, 'a.b.c', 'default');
1346
- * // => 'default'
1347
- */
1348
- function get(object, path, defaultValue) {
1349
- var result = object == null ? undefined : _baseGet(object, path);
1350
- return result === undefined ? defaultValue : result;
1351
- }
1352
-
1353
- var get_1 = get;
1354
-
1355
22
  var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
1356
23
  var useStateValue = function useStateValue() {
1357
24
  return React.useContext(StateContext);
1358
25
  };
1359
26
 
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
- /**
2117
- * A specialized version of `_.reduce` for arrays without support for
2118
- * iteratee shorthands.
2119
- *
2120
- * @private
2121
- * @param {Array} [array] The array to iterate over.
2122
- * @param {Function} iteratee The function invoked per iteration.
2123
- * @param {*} [accumulator] The initial value.
2124
- * @param {boolean} [initAccum] Specify using the first element of `array` as
2125
- * the initial value.
2126
- * @returns {*} Returns the accumulated value.
2127
- */
2128
- function arrayReduce(array, iteratee, accumulator, initAccum) {
2129
- var index = -1,
2130
- length = array == null ? 0 : array.length;
2131
-
2132
- if (initAccum && length) {
2133
- accumulator = array[++index];
2134
- }
2135
- while (++index < length) {
2136
- accumulator = iteratee(accumulator, array[index], index, array);
2137
- }
2138
- return accumulator;
2139
- }
2140
-
2141
- var _arrayReduce = arrayReduce;
2142
-
2143
- /**
2144
- * The base implementation of `_.propertyOf` without support for deep paths.
2145
- *
2146
- * @private
2147
- * @param {Object} object The object to query.
2148
- * @returns {Function} Returns the new accessor function.
2149
- */
2150
- function basePropertyOf(object) {
2151
- return function(key) {
2152
- return object == null ? undefined : object[key];
2153
- };
2154
- }
2155
-
2156
- var _basePropertyOf = basePropertyOf;
2157
-
2158
- /** Used to map Latin Unicode letters to basic Latin letters. */
2159
- var deburredLetters = {
2160
- // Latin-1 Supplement block.
2161
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
2162
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
2163
- '\xc7': 'C', '\xe7': 'c',
2164
- '\xd0': 'D', '\xf0': 'd',
2165
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
2166
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
2167
- '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
2168
- '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
2169
- '\xd1': 'N', '\xf1': 'n',
2170
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
2171
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
2172
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
2173
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
2174
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
2175
- '\xc6': 'Ae', '\xe6': 'ae',
2176
- '\xde': 'Th', '\xfe': 'th',
2177
- '\xdf': 'ss',
2178
- // Latin Extended-A block.
2179
- '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
2180
- '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
2181
- '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
2182
- '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
2183
- '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
2184
- '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
2185
- '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
2186
- '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
2187
- '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
2188
- '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
2189
- '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
2190
- '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
2191
- '\u0134': 'J', '\u0135': 'j',
2192
- '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
2193
- '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
2194
- '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
2195
- '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
2196
- '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
2197
- '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
2198
- '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
2199
- '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
2200
- '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
2201
- '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
2202
- '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
2203
- '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
2204
- '\u0163': 't', '\u0165': 't', '\u0167': 't',
2205
- '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
2206
- '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
2207
- '\u0174': 'W', '\u0175': 'w',
2208
- '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
2209
- '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
2210
- '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
2211
- '\u0132': 'IJ', '\u0133': 'ij',
2212
- '\u0152': 'Oe', '\u0153': 'oe',
2213
- '\u0149': "'n", '\u017f': 's'
2214
- };
2215
-
2216
- /**
2217
- * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2218
- * letters to basic Latin letters.
2219
- *
2220
- * @private
2221
- * @param {string} letter The matched letter to deburr.
2222
- * @returns {string} Returns the deburred letter.
2223
- */
2224
- var deburrLetter = _basePropertyOf(deburredLetters);
2225
-
2226
- var _deburrLetter = deburrLetter;
2227
-
2228
- /** Used to match Latin Unicode letters (excluding mathematical operators). */
2229
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
2230
-
2231
- /** Used to compose unicode character classes. */
2232
- var rsComboMarksRange$1 = '\\u0300-\\u036f',
2233
- reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
2234
- rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
2235
- rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
2236
-
2237
- /** Used to compose unicode capture groups. */
2238
- var rsCombo$1 = '[' + rsComboRange$1 + ']';
2239
-
2240
- /**
2241
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
2242
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
2243
- */
2244
- var reComboMark = RegExp(rsCombo$1, 'g');
2245
-
2246
- /**
2247
- * Deburrs `string` by converting
2248
- * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
2249
- * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
2250
- * letters to basic Latin letters and removing
2251
- * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
2252
- *
2253
- * @static
2254
- * @memberOf _
2255
- * @since 3.0.0
2256
- * @category String
2257
- * @param {string} [string=''] The string to deburr.
2258
- * @returns {string} Returns the deburred string.
2259
- * @example
2260
- *
2261
- * _.deburr('déjà vu');
2262
- * // => 'deja vu'
2263
- */
2264
- function deburr(string) {
2265
- string = toString_1(string);
2266
- return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
2267
- }
2268
-
2269
- var deburr_1 = deburr;
2270
-
2271
- /** Used to match words composed of alphanumeric characters. */
2272
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
2273
-
2274
- /**
2275
- * Splits an ASCII `string` into an array of its words.
2276
- *
2277
- * @private
2278
- * @param {string} The string to inspect.
2279
- * @returns {Array} Returns the words of `string`.
2280
- */
2281
- function asciiWords(string) {
2282
- return string.match(reAsciiWord) || [];
2283
- }
2284
-
2285
- var _asciiWords = asciiWords;
2286
-
2287
- /** Used to detect strings that need a more robust regexp to match words. */
2288
- 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 ]/;
2289
-
2290
- /**
2291
- * Checks if `string` contains a word composed of Unicode symbols.
2292
- *
2293
- * @private
2294
- * @param {string} string The string to inspect.
2295
- * @returns {boolean} Returns `true` if a word is found, else `false`.
2296
- */
2297
- function hasUnicodeWord(string) {
2298
- return reHasUnicodeWord.test(string);
2299
- }
2300
-
2301
- var _hasUnicodeWord = hasUnicodeWord;
2302
-
2303
- /** Used to compose unicode character classes. */
2304
- var rsAstralRange = '\\ud800-\\udfff',
2305
- rsComboMarksRange = '\\u0300-\\u036f',
2306
- reComboHalfMarksRange = '\\ufe20-\\ufe2f',
2307
- rsComboSymbolsRange = '\\u20d0-\\u20ff',
2308
- rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
2309
- rsDingbatRange = '\\u2700-\\u27bf',
2310
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
2311
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
2312
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
2313
- rsPunctuationRange = '\\u2000-\\u206f',
2314
- 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',
2315
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
2316
- rsVarRange = '\\ufe0e\\ufe0f',
2317
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
2318
-
2319
- /** Used to compose unicode capture groups. */
2320
- var rsApos$1 = "['\u2019]",
2321
- rsBreak = '[' + rsBreakRange + ']',
2322
- rsCombo = '[' + rsComboRange + ']',
2323
- rsDigits = '\\d+',
2324
- rsDingbat = '[' + rsDingbatRange + ']',
2325
- rsLower = '[' + rsLowerRange + ']',
2326
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
2327
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
2328
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
2329
- rsNonAstral = '[^' + rsAstralRange + ']',
2330
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
2331
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
2332
- rsUpper = '[' + rsUpperRange + ']',
2333
- rsZWJ = '\\u200d';
2334
-
2335
- /** Used to compose unicode regexes. */
2336
- var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
2337
- rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
2338
- rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
2339
- rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
2340
- reOptMod = rsModifier + '?',
2341
- rsOptVar = '[' + rsVarRange + ']?',
2342
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
2343
- rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
2344
- rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
2345
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
2346
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
2347
-
2348
- /** Used to match complex or compound words. */
2349
- var reUnicodeWord = RegExp([
2350
- rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
2351
- rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
2352
- rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
2353
- rsUpper + '+' + rsOptContrUpper,
2354
- rsOrdUpper,
2355
- rsOrdLower,
2356
- rsDigits,
2357
- rsEmoji
2358
- ].join('|'), 'g');
2359
-
2360
- /**
2361
- * Splits a Unicode `string` into an array of its words.
2362
- *
2363
- * @private
2364
- * @param {string} The string to inspect.
2365
- * @returns {Array} Returns the words of `string`.
2366
- */
2367
- function unicodeWords(string) {
2368
- return string.match(reUnicodeWord) || [];
2369
- }
2370
-
2371
- var _unicodeWords = unicodeWords;
2372
-
2373
- /**
2374
- * Splits `string` into an array of its words.
2375
- *
2376
- * @static
2377
- * @memberOf _
2378
- * @since 3.0.0
2379
- * @category String
2380
- * @param {string} [string=''] The string to inspect.
2381
- * @param {RegExp|string} [pattern] The pattern to match words.
2382
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
2383
- * @returns {Array} Returns the words of `string`.
2384
- * @example
2385
- *
2386
- * _.words('fred, barney, & pebbles');
2387
- * // => ['fred', 'barney', 'pebbles']
2388
- *
2389
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
2390
- * // => ['fred', 'barney', '&', 'pebbles']
2391
- */
2392
- function words(string, pattern, guard) {
2393
- string = toString_1(string);
2394
- pattern = guard ? undefined : pattern;
2395
-
2396
- if (pattern === undefined) {
2397
- return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
2398
- }
2399
- return string.match(pattern) || [];
2400
- }
2401
-
2402
- var words_1 = words;
2403
-
2404
- /** Used to compose unicode capture groups. */
2405
- var rsApos = "['\u2019]";
2406
-
2407
- /** Used to match apostrophes. */
2408
- var reApos = RegExp(rsApos, 'g');
2409
-
2410
- /**
2411
- * Creates a function like `_.camelCase`.
2412
- *
2413
- * @private
2414
- * @param {Function} callback The function to combine each word.
2415
- * @returns {Function} Returns the new compounder function.
2416
- */
2417
- function createCompounder(callback) {
2418
- return function(string) {
2419
- return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
2420
- };
2421
- }
2422
-
2423
- var _createCompounder = createCompounder;
2424
-
2425
- /**
2426
- * Converts `string`, as space separated words, to upper case.
2427
- *
2428
- * @static
2429
- * @memberOf _
2430
- * @since 4.0.0
2431
- * @category String
2432
- * @param {string} [string=''] The string to convert.
2433
- * @returns {string} Returns the upper cased string.
2434
- * @example
2435
- *
2436
- * _.upperCase('--foo-bar');
2437
- * // => 'FOO BAR'
2438
- *
2439
- * _.upperCase('fooBar');
2440
- * // => 'FOO BAR'
2441
- *
2442
- * _.upperCase('__foo_bar__');
2443
- * // => 'FOO BAR'
2444
- */
2445
- var upperCase = _createCompounder(function(result, word, index) {
2446
- return result + (index ? ' ' : '') + word.toUpperCase();
2447
- });
2448
-
2449
- var upperCase_1 = upperCase;
2450
-
2451
- /**
2452
- * Converts `string`, as space separated words, to lower case.
2453
- *
2454
- * @static
2455
- * @memberOf _
2456
- * @since 4.0.0
2457
- * @category String
2458
- * @param {string} [string=''] The string to convert.
2459
- * @returns {string} Returns the lower cased string.
2460
- * @example
2461
- *
2462
- * _.lowerCase('--Foo-Bar--');
2463
- * // => 'foo bar'
2464
- *
2465
- * _.lowerCase('fooBar');
2466
- * // => 'foo bar'
2467
- *
2468
- * _.lowerCase('__FOO_BAR__');
2469
- * // => 'foo bar'
2470
- */
2471
- var lowerCase = _createCompounder(function(result, word, index) {
2472
- return result + (index ? ' ' : '') + word.toLowerCase();
2473
- });
2474
-
2475
- var lowerCase_1 = lowerCase;
2476
-
2477
27
  var timestampToFormat = function timestampToFormat(value, unit, suffix, timestamp) {
2478
28
  var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
2479
29
  var _config$showTime = config.showTime,
@@ -2493,7 +43,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
2493
43
  var localizedMonth = month;
2494
44
 
2495
45
  if (isUpperCase) {
2496
- localizedMonth = upperCase_1(month);
46
+ localizedMonth = lodash.upperCase(month);
2497
47
  }
2498
48
 
2499
49
  var year = dateTime.getFullYear();
@@ -2506,7 +56,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
2506
56
  var timetoShow;
2507
57
 
2508
58
  if (localizedMonths) {
2509
- localizedMonth = get_1(localizedMonths, [lowerCase_1(month)]) || month;
59
+ localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
2510
60
  }
2511
61
 
2512
62
  if (localizedMeridiem) {
@@ -2536,17 +86,17 @@ function formatter(value, unit, suffix, date, config) {
2536
86
  var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
2537
87
  // unit here refers to seconds, minute, minutes,...
2538
88
 
2539
- var localizedSuffix = get_1(config, ["localizedPublishTime", suffix]) || suffix;
89
+ var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
2540
90
  var localizedUnitOfTime;
2541
91
 
2542
92
  if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
2543
93
  return timestampToFormat(value, unit, suffix, date, config);
2544
94
  } else if (value > 1) {
2545
- localizedUnitOfTime = get_1(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
95
+ localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
2546
96
  return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
2547
97
  }
2548
98
 
2549
- localizedUnitOfTime = get_1(config, ["localizedPublishTime", unit]) || unit;
99
+ localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
2550
100
  return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
2551
101
  }
2552
102
 
@@ -2650,13 +200,13 @@ var TimeStamp = function TimeStamp(_ref) {
2650
200
  _ref$config = _ref.config,
2651
201
  config = _ref$config === void 0 ? {} : _ref$config;
2652
202
  var configState = useStateValue() || {};
2653
- var isTime = get_1(config, ["showTime"], get_1(configState, ["showTime"], true));
203
+ var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
2654
204
  var time = story["last-published-at"] || story["first-published-at"];
2655
205
  var isBottomClasses = isBottom ? "bottom-fix" : "";
2656
206
  var textColor = getTextColor(configState.theme);
2657
207
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
2658
208
  "data-test-id": "publish-time",
2659
- className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap)
209
+ className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap)
2660
210
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2661
211
  className: "timestamp-m_time-wrapper__3O2lM"
2662
212
  }, getTimeStamp(time, formatter, config))));