@quintype/arrow 3.15.1-fallback-support.1 → 3.15.1-perf.1

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 (167) hide show
  1. package/atoms/Author/index.js +2250 -0
  2. package/{Author → atoms/Author}/styles.arrow.css +0 -0
  3. package/atoms/AuthorWithTime/index.js +2954 -0
  4. package/{AuthorWithTime → atoms/AuthorWithTime}/styles.arrow.css +0 -0
  5. package/atoms/CollectionName/index.js +2334 -0
  6. package/{CollectionName → atoms/CollectionName}/styles.arrow.css +0 -0
  7. package/atoms/ExtendedLoadMore/index-2d713010.js +166 -0
  8. package/atoms/ExtendedLoadMore/index-4191a84c.js +240 -0
  9. package/atoms/ExtendedLoadMore/index-5a7900ba.js +181 -0
  10. package/atoms/ExtendedLoadMore/index-6cb56d1a.js +350 -0
  11. package/atoms/ExtendedLoadMore/index-6daa674c.js +282 -0
  12. package/atoms/ExtendedLoadMore/index-6f8c780e.js +243 -0
  13. package/atoms/ExtendedLoadMore/index-7eb05b3d.js +199 -0
  14. package/atoms/ExtendedLoadMore/index-8345922c.js +175 -0
  15. package/atoms/ExtendedLoadMore/index-99af722e.js +175 -0
  16. package/atoms/ExtendedLoadMore/index-aa8b8ab8.js +990 -0
  17. package/atoms/ExtendedLoadMore/index-c8f346d0.js +223 -0
  18. package/atoms/ExtendedLoadMore/index-e39b3ca8.js +3023 -0
  19. package/atoms/ExtendedLoadMore/index-f6e578e3.js +86 -0
  20. package/atoms/ExtendedLoadMore/index.js +5 -0
  21. package/atoms/ExtendedLoadMore/styles.arrow.css +1 -0
  22. package/atoms/Headline/index.js +2459 -0
  23. package/{Headline → atoms/Headline}/styles.arrow.css +0 -0
  24. package/atoms/HeroImage/index.js +2475 -0
  25. package/{HeroImage → atoms/HeroImage}/styles.arrow.css +0 -0
  26. package/atoms/LoadmoreButton/index.js +2268 -0
  27. package/{LoadmoreButton → atoms/LoadmoreButton}/styles.arrow.css +0 -0
  28. package/atoms/ScrollSnap/index.js +2531 -0
  29. package/{ScrollSnap → atoms/ScrollSnap}/styles.arrow.css +0 -0
  30. package/atoms/SectionTag/index.js +2220 -0
  31. package/{SectionTag → atoms/SectionTag}/styles.arrow.css +0 -0
  32. package/atoms/Subheadline/index.js +2200 -0
  33. package/{Subheadline → atoms/Subheadline}/styles.arrow.css +0 -0
  34. package/atoms/TimeStamp/index.js +2661 -0
  35. package/{TimeStamp → atoms/TimeStamp}/styles.arrow.css +0 -0
  36. package/molecules/KeyEvents/index.js +2968 -0
  37. package/{KeyEvents → molecules/KeyEvents}/styles.arrow.css +0 -0
  38. package/molecules/PageIntroductionCard/index.js +2676 -0
  39. package/{PageIntroductionCard → molecules/PageIntroductionCard}/styles.arrow.css +0 -0
  40. package/molecules/SocialShareTemplate/index.js +3093 -0
  41. package/{SocialShareTemplate → molecules/SocialShareTemplate}/styles.arrow.css +0 -0
  42. package/molecules/StoryCard/index.js +3938 -0
  43. package/{StoryCard → molecules/StoryCard}/styles.arrow.css +0 -0
  44. package/molecules/StoryElementCard/index.js +5832 -0
  45. package/{StoryElementCard → molecules/StoryElementCard}/styles.arrow.css +0 -0
  46. package/molecules/StorycardContent/index.js +3416 -0
  47. package/{StorycardContent → molecules/StorycardContent}/styles.arrow.css +0 -0
  48. package/package.json +1 -1
  49. package/rows/AlternateCollectionFilter/index.js +4744 -0
  50. package/{AlternateCollectionFilter → rows/AlternateCollectionFilter}/styles.arrow.css +0 -0
  51. package/rows/AsideCollection/index.js +4690 -0
  52. package/{AsideCollection → rows/AsideCollection}/styles.arrow.css +0 -0
  53. package/rows/AstrologyCollection/index.js +4661 -0
  54. package/{AstrologyCollection → rows/AstrologyCollection}/styles.arrow.css +0 -0
  55. package/rows/AuthorIntroductionCard/index.js +3520 -0
  56. package/{AuthorIntroductionCard → rows/AuthorIntroductionCard}/styles.arrow.css +0 -0
  57. package/rows/AuthorsList/index.js +3715 -0
  58. package/{AuthorsList → rows/AuthorsList}/styles.arrow.css +0 -0
  59. package/rows/CollectionFilter/index.js +4834 -0
  60. package/{CollectionFilter → rows/CollectionFilter}/styles.arrow.css +0 -0
  61. package/rows/ElevenStories/index.js +4638 -0
  62. package/{ElevenStories → rows/ElevenStories}/styles.arrow.css +0 -0
  63. package/rows/FourColFiveStories/index.js +4359 -0
  64. package/{FourColFiveStories → rows/FourColFiveStories}/styles.arrow.css +0 -0
  65. package/rows/FourColGrid/index.js +4584 -0
  66. package/{FourColGrid → rows/FourColGrid}/styles.arrow.css +0 -0
  67. package/rows/FourColPortraitStories/index.js +4617 -0
  68. package/{FourColPortraitStories → rows/FourColPortraitStories}/styles.arrow.css +0 -0
  69. package/rows/FourColSixteenStories/index.js +4375 -0
  70. package/{FourColSixteenStories → rows/FourColSixteenStories}/styles.arrow.css +0 -0
  71. package/rows/FourColTwelveStories/index.js +4335 -0
  72. package/{FourColTwelveStories → rows/FourColTwelveStories}/styles.arrow.css +0 -0
  73. package/rows/FourStorySlider/index.js +4743 -0
  74. package/{FourStorySlider → rows/FourStorySlider}/styles.arrow.css +0 -0
  75. package/rows/FourStorySliderPortrait/index.js +4746 -0
  76. package/{FourStorySliderPortrait → rows/FourStorySliderPortrait}/styles.arrow.css +1 -1
  77. package/rows/FourTabbedBigStorySlider/index.js +4505 -0
  78. package/{FourTabbedBigStorySlider → rows/FourTabbedBigStorySlider}/styles.arrow.css +0 -0
  79. package/rows/FullScreenSlider/index.js +4661 -0
  80. package/{FullScreenSlider → rows/FullScreenSlider}/styles.arrow.css +0 -0
  81. package/rows/HalfScreenSlider/index.js +4514 -0
  82. package/{HalfScreenSlider → rows/HalfScreenSlider}/styles.arrow.css +0 -0
  83. package/rows/ListComponent/index.js +4462 -0
  84. package/{ListComponent → rows/ListComponent}/styles.arrow.css +0 -0
  85. package/rows/Listicles/index.js +3131 -0
  86. package/{Listicles → rows/Listicles}/styles.arrow.css +0 -0
  87. package/rows/MagazineEditions/index.js +3142 -0
  88. package/{MagazineEditions → rows/MagazineEditions}/styles.arrow.css +0 -0
  89. package/rows/MagazineHeaderCard/index.js +3136 -0
  90. package/{MagazineHeaderCard → rows/MagazineHeaderCard}/styles.arrow.css +0 -0
  91. package/rows/MagazineWidget/index.js +4514 -0
  92. package/{MagazineWidget → rows/MagazineWidget}/styles.arrow.css +0 -0
  93. package/rows/OneColStoryList/index.js +4670 -0
  94. package/{OneColStoryList → rows/OneColStoryList}/styles.arrow.css +0 -0
  95. package/rows/OpinionCollection/index.js +4037 -0
  96. package/{OpinionCollection → rows/OpinionCollection}/styles.arrow.css +0 -0
  97. package/rows/SixColSixStories/index.js +4515 -0
  98. package/{SixColSixStories → rows/SixColSixStories}/styles.arrow.css +0 -0
  99. package/rows/StoryCollection/index.js +4690 -0
  100. package/{StoryCollection → rows/StoryCollection}/styles.arrow.css +0 -0
  101. package/rows/TagIntroductionCard/index.js +1901 -0
  102. package/{TagIntroductionCard → rows/TagIntroductionCard}/styles.arrow.css +0 -0
  103. package/rows/ThreeColFlexStories/index.js +4575 -0
  104. package/{ThreeColFlexStories → rows/ThreeColFlexStories}/styles.arrow.css +0 -0
  105. package/rows/ThreeColFourteenStories/index.js +4283 -0
  106. package/{ThreeColFourteenStories → rows/ThreeColFourteenStories}/styles.arrow.css +0 -0
  107. package/rows/ThreeColGrid/index.js +4605 -0
  108. package/{ThreeColGrid → rows/ThreeColGrid}/styles.arrow.css +0 -0
  109. package/rows/ThreeColSevenStory/index.js +4502 -0
  110. package/{ThreeColSevenStory → rows/ThreeColSevenStory}/styles.arrow.css +0 -0
  111. package/rows/ThreeColSixStories/index.js +4485 -0
  112. package/{ThreeColSixStories → rows/ThreeColSixStories}/styles.arrow.css +0 -0
  113. package/rows/ThreeColTwelveStories/index.js +4380 -0
  114. package/{ThreeColTwelveStories → rows/ThreeColTwelveStories}/styles.arrow.css +0 -0
  115. package/rows/TwoColFourStories/index.js +4463 -0
  116. package/{TwoColFourStories → rows/TwoColFourStories}/styles.arrow.css +0 -0
  117. package/rows/TwoColFourStoryHighlight/index.js +4456 -0
  118. package/{TwoColFourStoryHighlight → rows/TwoColFourStoryHighlight}/styles.arrow.css +0 -0
  119. package/rows/TwoColSevenStories/index.js +4490 -0
  120. package/{TwoColSevenStories → rows/TwoColSevenStories}/styles.arrow.css +0 -0
  121. package/rows/TwoColSixStories/index.js +4489 -0
  122. package/{TwoColSixStories → rows/TwoColSixStories}/styles.arrow.css +0 -0
  123. package/rows/TwoColTenStoriesSidebar/index.js +4549 -0
  124. package/{TwoColTenStoriesSidebar → rows/TwoColTenStoriesSidebar}/styles.arrow.css +0 -0
  125. package/rows/TwoColThreeStories/index.js +4436 -0
  126. package/{TwoColThreeStories → rows/TwoColThreeStories}/styles.arrow.css +0 -0
  127. package/story-elements/AlsoRead/index.js +2457 -0
  128. package/{AlsoRead → story-elements/AlsoRead}/styles.arrow.css +0 -0
  129. package/story-elements/Attachment/index.js +2013 -0
  130. package/{Attachment → story-elements/Attachment}/styles.arrow.css +0 -0
  131. package/story-elements/BigFact/index.js +1983 -0
  132. package/{BigFact → story-elements/BigFact}/styles.arrow.css +0 -0
  133. package/story-elements/BlockQuote/index.js +2431 -0
  134. package/{BlockQuote → story-elements/BlockQuote}/styles.arrow.css +0 -0
  135. package/story-elements/Blurb/index.js +2094 -0
  136. package/{Blurb → story-elements/Blurb}/styles.arrow.css +0 -0
  137. package/story-elements/Image/index.js +2711 -0
  138. package/{Image → story-elements/Image}/styles.arrow.css +0 -0
  139. package/story-elements/ImageGallery/index.js +2644 -0
  140. package/{ImageGallery → story-elements/ImageGallery}/styles.arrow.css +0 -0
  141. package/story-elements/ImageSlideshow/index.js +2955 -0
  142. package/{ImageSlideshow → story-elements/ImageSlideshow}/styles.arrow.css +0 -0
  143. package/story-elements/QuestionAnswer/index.js +2395 -0
  144. package/{QuestionAnswer → story-elements/QuestionAnswer}/styles.arrow.css +0 -0
  145. package/story-elements/Quote/index.js +2012 -0
  146. package/{Quote → story-elements/Quote}/styles.arrow.css +0 -0
  147. package/story-elements/Reference/index.js +2006 -0
  148. package/{Reference → story-elements/Reference}/styles.arrow.css +0 -0
  149. package/story-elements/StoryElement/index.js +1779 -0
  150. package/story-elements/Summary/index.js +2036 -0
  151. package/{Summary → story-elements/Summary}/styles.arrow.css +0 -0
  152. package/story-elements/Text/index.js +2293 -0
  153. package/{Text → story-elements/Text}/styles.arrow.css +0 -0
  154. package/story-elements/Video/index.js +1785 -0
  155. package/{Video → story-elements/Video}/styles.arrow.css +0 -0
  156. package/story-templates/ListicleStoryTemplate/index.js +8442 -0
  157. package/{ListicleStoryTemplate → story-templates/ListicleStoryTemplate}/styles.arrow.css +0 -0
  158. package/story-templates/LiveBlogStoryTemplate/index.js +8618 -0
  159. package/{LiveBlogStoryTemplate → story-templates/LiveBlogStoryTemplate}/styles.arrow.css +0 -0
  160. package/story-templates/PhotoStoryTemplate/index.js +8420 -0
  161. package/{PhotoStoryTemplate → story-templates/PhotoStoryTemplate}/styles.arrow.css +0 -0
  162. package/story-templates/TextStoryTemplate/index.js +8493 -0
  163. package/{TextStoryTemplate → story-templates/TextStoryTemplate}/styles.arrow.css +0 -0
  164. package/story-templates/VideoStoryTemplate/index.js +8352 -0
  165. package/{VideoStoryTemplate → story-templates/VideoStoryTemplate}/styles.arrow.css +0 -0
  166. package/cjs/index.js +0 -1
  167. package/esm/index.js +0 -1
@@ -0,0 +1,2968 @@
1
+ import React, { createContext, useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Timeago from 'react-timeago';
4
+ import { utcToZonedTime, format } from 'date-fns-tz';
5
+ import { LinkBase } from '@quintype/components';
6
+ import { useSelector } from 'react-redux';
7
+
8
+ function _arrayWithHoles(arr) {
9
+ if (Array.isArray(arr)) return arr;
10
+ }
11
+
12
+ function _iterableToArrayLimit(arr, i) {
13
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14
+
15
+ if (_i == null) return;
16
+ var _arr = [];
17
+ var _n = true;
18
+ var _d = false;
19
+
20
+ var _s, _e;
21
+
22
+ try {
23
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
24
+ _arr.push(_s.value);
25
+
26
+ if (i && _arr.length === i) break;
27
+ }
28
+ } catch (err) {
29
+ _d = true;
30
+ _e = err;
31
+ } finally {
32
+ try {
33
+ if (!_n && _i["return"] != null) _i["return"]();
34
+ } finally {
35
+ if (_d) throw _e;
36
+ }
37
+ }
38
+
39
+ return _arr;
40
+ }
41
+
42
+ function _arrayLikeToArray(arr, len) {
43
+ if (len == null || len > arr.length) len = arr.length;
44
+
45
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
46
+ arr2[i] = arr[i];
47
+ }
48
+
49
+ return arr2;
50
+ }
51
+
52
+ function _unsupportedIterableToArray(o, minLen) {
53
+ if (!o) return;
54
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
55
+ var n = Object.prototype.toString.call(o).slice(8, -1);
56
+ if (n === "Object" && o.constructor) n = o.constructor.name;
57
+ if (n === "Map" || n === "Set") return Array.from(o);
58
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
59
+ }
60
+
61
+ function _nonIterableRest() {
62
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
63
+ }
64
+
65
+ function _slicedToArray(arr, i) {
66
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
67
+ }
68
+
69
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
70
+
71
+ function getDefaultExportFromCjs (x) {
72
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
73
+ }
74
+
75
+ function createCommonjsModule(fn) {
76
+ var module = { exports: {} };
77
+ return fn(module, module.exports), module.exports;
78
+ }
79
+
80
+ var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
81
+
82
+ Object.defineProperty(exports, "__esModule", {
83
+ value: true
84
+ });
85
+ exports["default"] = void 0;
86
+ var optionsDefaults = {
87
+ attributeNames: {
88
+ styleName: 'className'
89
+ },
90
+ generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
91
+ handleMissingStyleName: 'throw'
92
+ };
93
+ var _default = optionsDefaults;
94
+ exports["default"] = _default;
95
+
96
+
97
+ });
98
+
99
+ var getClassName = createCommonjsModule(function (module, exports) {
100
+
101
+ Object.defineProperty(exports, "__esModule", {
102
+ value: true
103
+ });
104
+ exports["default"] = void 0;
105
+
106
+ var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
107
+
108
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
109
+
110
+ var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
111
+ return styleName.indexOf('.') !== -1;
112
+ };
113
+
114
+ var handleError = function handleError(message, handleMissingStyleName) {
115
+ if (handleMissingStyleName === 'throw') {
116
+ throw new Error(message);
117
+ } else if (handleMissingStyleName === 'warn') {
118
+ // eslint-disable-next-line no-console
119
+ console.warn(message);
120
+ }
121
+
122
+ return null;
123
+ };
124
+
125
+ var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
126
+ // Note:
127
+ // Do not use the desctructing syntax with Babel.
128
+ // Desctructing adds _slicedToArray helper.
129
+ var styleNameParts = styleName.split('.');
130
+ var importName = styleNameParts[0];
131
+ var moduleName = styleNameParts[1];
132
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
133
+
134
+ if (!moduleName) {
135
+ return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
136
+ }
137
+
138
+ if (!styleModuleImportMap[importName]) {
139
+ return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
140
+ }
141
+
142
+ if (!styleModuleImportMap[importName][moduleName]) {
143
+ return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
144
+ }
145
+
146
+ return styleModuleImportMap[importName][moduleName];
147
+ };
148
+
149
+ var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
150
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
151
+ var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
152
+ return styleModuleImportMap[importKey][styleName] && importKey;
153
+ }).filter(function (importKey) {
154
+ return importKey;
155
+ });
156
+
157
+ if (importKeysWithMatches.length > 1) {
158
+ 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');
159
+ }
160
+
161
+ if (importKeysWithMatches.length === 0) {
162
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
163
+ }
164
+
165
+ return styleModuleImportMap[importKeysWithMatches[0]][styleName];
166
+ };
167
+
168
+ var _default = function _default(styleNameValue, styleModuleImportMap, options) {
169
+ var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
170
+
171
+ var _ref = options || {},
172
+ _ref$handleMissingSty = _ref.handleMissingStyleName,
173
+ handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
174
+ _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
175
+ autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
176
+
177
+ if (!styleNameValue) {
178
+ return '';
179
+ }
180
+
181
+ return styleNameValue.split(' ').filter(function (styleName) {
182
+ return styleName;
183
+ }).map(function (styleName) {
184
+ if (isNamespacedStyleName(styleName)) {
185
+ return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
186
+ }
187
+
188
+ if (styleModuleImportMapKeys.length === 0) {
189
+ throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
190
+ }
191
+
192
+ if (styleModuleImportMapKeys.length > 1) {
193
+ if (!autoResolveMultipleImports) {
194
+ throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
195
+ }
196
+
197
+ return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
198
+ }
199
+
200
+ var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
201
+
202
+ if (!styleModuleMap[styleName]) {
203
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
204
+ }
205
+
206
+ return styleModuleMap[styleName];
207
+ }).filter(function (className) {
208
+ // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
209
+ return className;
210
+ }).join(' ');
211
+ };
212
+
213
+ exports["default"] = _default;
214
+
215
+
216
+ });
217
+
218
+ var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
219
+
220
+ /**
221
+ * Checks if `value` is classified as an `Array` object.
222
+ *
223
+ * @static
224
+ * @memberOf _
225
+ * @since 0.1.0
226
+ * @category Lang
227
+ * @param {*} value The value to check.
228
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
229
+ * @example
230
+ *
231
+ * _.isArray([1, 2, 3]);
232
+ * // => true
233
+ *
234
+ * _.isArray(document.body.children);
235
+ * // => false
236
+ *
237
+ * _.isArray('abc');
238
+ * // => false
239
+ *
240
+ * _.isArray(_.noop);
241
+ * // => false
242
+ */
243
+ var isArray = Array.isArray;
244
+
245
+ var isArray_1 = isArray;
246
+
247
+ /** Detect free variable `global` from Node.js. */
248
+
249
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
250
+
251
+ var _freeGlobal = freeGlobal;
252
+
253
+ /** Detect free variable `self`. */
254
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
255
+
256
+ /** Used as a reference to the global object. */
257
+ var root = _freeGlobal || freeSelf || Function('return this')();
258
+
259
+ var _root = root;
260
+
261
+ /** Built-in value references. */
262
+ var Symbol$1 = _root.Symbol;
263
+
264
+ var _Symbol = Symbol$1;
265
+
266
+ /** Used for built-in method references. */
267
+ var objectProto$4 = Object.prototype;
268
+
269
+ /** Used to check objects for own properties. */
270
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
271
+
272
+ /**
273
+ * Used to resolve the
274
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
275
+ * of values.
276
+ */
277
+ var nativeObjectToString$1 = objectProto$4.toString;
278
+
279
+ /** Built-in value references. */
280
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
281
+
282
+ /**
283
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
284
+ *
285
+ * @private
286
+ * @param {*} value The value to query.
287
+ * @returns {string} Returns the raw `toStringTag`.
288
+ */
289
+ function getRawTag(value) {
290
+ var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
291
+ tag = value[symToStringTag$1];
292
+
293
+ try {
294
+ value[symToStringTag$1] = undefined;
295
+ var unmasked = true;
296
+ } catch (e) {}
297
+
298
+ var result = nativeObjectToString$1.call(value);
299
+ if (unmasked) {
300
+ if (isOwn) {
301
+ value[symToStringTag$1] = tag;
302
+ } else {
303
+ delete value[symToStringTag$1];
304
+ }
305
+ }
306
+ return result;
307
+ }
308
+
309
+ var _getRawTag = getRawTag;
310
+
311
+ /** Used for built-in method references. */
312
+ var objectProto$3 = Object.prototype;
313
+
314
+ /**
315
+ * Used to resolve the
316
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
317
+ * of values.
318
+ */
319
+ var nativeObjectToString = objectProto$3.toString;
320
+
321
+ /**
322
+ * Converts `value` to a string using `Object.prototype.toString`.
323
+ *
324
+ * @private
325
+ * @param {*} value The value to convert.
326
+ * @returns {string} Returns the converted string.
327
+ */
328
+ function objectToString(value) {
329
+ return nativeObjectToString.call(value);
330
+ }
331
+
332
+ var _objectToString = objectToString;
333
+
334
+ /** `Object#toString` result references. */
335
+ var nullTag = '[object Null]',
336
+ undefinedTag = '[object Undefined]';
337
+
338
+ /** Built-in value references. */
339
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
340
+
341
+ /**
342
+ * The base implementation of `getTag` without fallbacks for buggy environments.
343
+ *
344
+ * @private
345
+ * @param {*} value The value to query.
346
+ * @returns {string} Returns the `toStringTag`.
347
+ */
348
+ function baseGetTag(value) {
349
+ if (value == null) {
350
+ return value === undefined ? undefinedTag : nullTag;
351
+ }
352
+ return (symToStringTag && symToStringTag in Object(value))
353
+ ? _getRawTag(value)
354
+ : _objectToString(value);
355
+ }
356
+
357
+ var _baseGetTag = baseGetTag;
358
+
359
+ /**
360
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
361
+ * and has a `typeof` result of "object".
362
+ *
363
+ * @static
364
+ * @memberOf _
365
+ * @since 4.0.0
366
+ * @category Lang
367
+ * @param {*} value The value to check.
368
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
369
+ * @example
370
+ *
371
+ * _.isObjectLike({});
372
+ * // => true
373
+ *
374
+ * _.isObjectLike([1, 2, 3]);
375
+ * // => true
376
+ *
377
+ * _.isObjectLike(_.noop);
378
+ * // => false
379
+ *
380
+ * _.isObjectLike(null);
381
+ * // => false
382
+ */
383
+ function isObjectLike(value) {
384
+ return value != null && typeof value == 'object';
385
+ }
386
+
387
+ var isObjectLike_1 = isObjectLike;
388
+
389
+ /** `Object#toString` result references. */
390
+ var symbolTag = '[object Symbol]';
391
+
392
+ /**
393
+ * Checks if `value` is classified as a `Symbol` primitive or object.
394
+ *
395
+ * @static
396
+ * @memberOf _
397
+ * @since 4.0.0
398
+ * @category Lang
399
+ * @param {*} value The value to check.
400
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
401
+ * @example
402
+ *
403
+ * _.isSymbol(Symbol.iterator);
404
+ * // => true
405
+ *
406
+ * _.isSymbol('abc');
407
+ * // => false
408
+ */
409
+ function isSymbol(value) {
410
+ return typeof value == 'symbol' ||
411
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
412
+ }
413
+
414
+ var isSymbol_1 = isSymbol;
415
+
416
+ /** Used to match property names within property paths. */
417
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
418
+ reIsPlainProp = /^\w*$/;
419
+
420
+ /**
421
+ * Checks if `value` is a property name and not a property path.
422
+ *
423
+ * @private
424
+ * @param {*} value The value to check.
425
+ * @param {Object} [object] The object to query keys on.
426
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
427
+ */
428
+ function isKey(value, object) {
429
+ if (isArray_1(value)) {
430
+ return false;
431
+ }
432
+ var type = typeof value;
433
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
434
+ value == null || isSymbol_1(value)) {
435
+ return true;
436
+ }
437
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
438
+ (object != null && value in Object(object));
439
+ }
440
+
441
+ var _isKey = isKey;
442
+
443
+ /**
444
+ * Checks if `value` is the
445
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
446
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
447
+ *
448
+ * @static
449
+ * @memberOf _
450
+ * @since 0.1.0
451
+ * @category Lang
452
+ * @param {*} value The value to check.
453
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
454
+ * @example
455
+ *
456
+ * _.isObject({});
457
+ * // => true
458
+ *
459
+ * _.isObject([1, 2, 3]);
460
+ * // => true
461
+ *
462
+ * _.isObject(_.noop);
463
+ * // => true
464
+ *
465
+ * _.isObject(null);
466
+ * // => false
467
+ */
468
+ function isObject(value) {
469
+ var type = typeof value;
470
+ return value != null && (type == 'object' || type == 'function');
471
+ }
472
+
473
+ var isObject_1 = isObject;
474
+
475
+ /** `Object#toString` result references. */
476
+ var asyncTag = '[object AsyncFunction]',
477
+ funcTag = '[object Function]',
478
+ genTag = '[object GeneratorFunction]',
479
+ proxyTag = '[object Proxy]';
480
+
481
+ /**
482
+ * Checks if `value` is classified as a `Function` object.
483
+ *
484
+ * @static
485
+ * @memberOf _
486
+ * @since 0.1.0
487
+ * @category Lang
488
+ * @param {*} value The value to check.
489
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
490
+ * @example
491
+ *
492
+ * _.isFunction(_);
493
+ * // => true
494
+ *
495
+ * _.isFunction(/abc/);
496
+ * // => false
497
+ */
498
+ function isFunction(value) {
499
+ if (!isObject_1(value)) {
500
+ return false;
501
+ }
502
+ // The use of `Object#toString` avoids issues with the `typeof` operator
503
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
504
+ var tag = _baseGetTag(value);
505
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
506
+ }
507
+
508
+ var isFunction_1 = isFunction;
509
+
510
+ /** Used to detect overreaching core-js shims. */
511
+ var coreJsData = _root['__core-js_shared__'];
512
+
513
+ var _coreJsData = coreJsData;
514
+
515
+ /** Used to detect methods masquerading as native. */
516
+ var maskSrcKey = (function() {
517
+ var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
518
+ return uid ? ('Symbol(src)_1.' + uid) : '';
519
+ }());
520
+
521
+ /**
522
+ * Checks if `func` has its source masked.
523
+ *
524
+ * @private
525
+ * @param {Function} func The function to check.
526
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
527
+ */
528
+ function isMasked(func) {
529
+ return !!maskSrcKey && (maskSrcKey in func);
530
+ }
531
+
532
+ var _isMasked = isMasked;
533
+
534
+ /** Used for built-in method references. */
535
+ var funcProto$1 = Function.prototype;
536
+
537
+ /** Used to resolve the decompiled source of functions. */
538
+ var funcToString$1 = funcProto$1.toString;
539
+
540
+ /**
541
+ * Converts `func` to its source code.
542
+ *
543
+ * @private
544
+ * @param {Function} func The function to convert.
545
+ * @returns {string} Returns the source code.
546
+ */
547
+ function toSource(func) {
548
+ if (func != null) {
549
+ try {
550
+ return funcToString$1.call(func);
551
+ } catch (e) {}
552
+ try {
553
+ return (func + '');
554
+ } catch (e) {}
555
+ }
556
+ return '';
557
+ }
558
+
559
+ var _toSource = toSource;
560
+
561
+ /**
562
+ * Used to match `RegExp`
563
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
564
+ */
565
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
566
+
567
+ /** Used to detect host constructors (Safari). */
568
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
569
+
570
+ /** Used for built-in method references. */
571
+ var funcProto = Function.prototype,
572
+ objectProto$2 = Object.prototype;
573
+
574
+ /** Used to resolve the decompiled source of functions. */
575
+ var funcToString = funcProto.toString;
576
+
577
+ /** Used to check objects for own properties. */
578
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
579
+
580
+ /** Used to detect if a method is native. */
581
+ var reIsNative = RegExp('^' +
582
+ funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
583
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
584
+ );
585
+
586
+ /**
587
+ * The base implementation of `_.isNative` without bad shim checks.
588
+ *
589
+ * @private
590
+ * @param {*} value The value to check.
591
+ * @returns {boolean} Returns `true` if `value` is a native function,
592
+ * else `false`.
593
+ */
594
+ function baseIsNative(value) {
595
+ if (!isObject_1(value) || _isMasked(value)) {
596
+ return false;
597
+ }
598
+ var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
599
+ return pattern.test(_toSource(value));
600
+ }
601
+
602
+ var _baseIsNative = baseIsNative;
603
+
604
+ /**
605
+ * Gets the value at `key` of `object`.
606
+ *
607
+ * @private
608
+ * @param {Object} [object] The object to query.
609
+ * @param {string} key The key of the property to get.
610
+ * @returns {*} Returns the property value.
611
+ */
612
+ function getValue(object, key) {
613
+ return object == null ? undefined : object[key];
614
+ }
615
+
616
+ var _getValue = getValue;
617
+
618
+ /**
619
+ * Gets the native function at `key` of `object`.
620
+ *
621
+ * @private
622
+ * @param {Object} object The object to query.
623
+ * @param {string} key The key of the method to get.
624
+ * @returns {*} Returns the function if it's native, else `undefined`.
625
+ */
626
+ function getNative(object, key) {
627
+ var value = _getValue(object, key);
628
+ return _baseIsNative(value) ? value : undefined;
629
+ }
630
+
631
+ var _getNative = getNative;
632
+
633
+ /* Built-in method references that are verified to be native. */
634
+ var nativeCreate = _getNative(Object, 'create');
635
+
636
+ var _nativeCreate = nativeCreate;
637
+
638
+ /**
639
+ * Removes all key-value entries from the hash.
640
+ *
641
+ * @private
642
+ * @name clear
643
+ * @memberOf Hash
644
+ */
645
+ function hashClear() {
646
+ this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
647
+ this.size = 0;
648
+ }
649
+
650
+ var _hashClear = hashClear;
651
+
652
+ /**
653
+ * Removes `key` and its value from the hash.
654
+ *
655
+ * @private
656
+ * @name delete
657
+ * @memberOf Hash
658
+ * @param {Object} hash The hash to modify.
659
+ * @param {string} key The key of the value to remove.
660
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
661
+ */
662
+ function hashDelete(key) {
663
+ var result = this.has(key) && delete this.__data__[key];
664
+ this.size -= result ? 1 : 0;
665
+ return result;
666
+ }
667
+
668
+ var _hashDelete = hashDelete;
669
+
670
+ /** Used to stand-in for `undefined` hash values. */
671
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
672
+
673
+ /** Used for built-in method references. */
674
+ var objectProto$1 = Object.prototype;
675
+
676
+ /** Used to check objects for own properties. */
677
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
678
+
679
+ /**
680
+ * Gets the hash value for `key`.
681
+ *
682
+ * @private
683
+ * @name get
684
+ * @memberOf Hash
685
+ * @param {string} key The key of the value to get.
686
+ * @returns {*} Returns the entry value.
687
+ */
688
+ function hashGet(key) {
689
+ var data = this.__data__;
690
+ if (_nativeCreate) {
691
+ var result = data[key];
692
+ return result === HASH_UNDEFINED$1 ? undefined : result;
693
+ }
694
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
695
+ }
696
+
697
+ var _hashGet = hashGet;
698
+
699
+ /** Used for built-in method references. */
700
+ var objectProto = Object.prototype;
701
+
702
+ /** Used to check objects for own properties. */
703
+ var hasOwnProperty = objectProto.hasOwnProperty;
704
+
705
+ /**
706
+ * Checks if a hash value for `key` exists.
707
+ *
708
+ * @private
709
+ * @name has
710
+ * @memberOf Hash
711
+ * @param {string} key The key of the entry to check.
712
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
713
+ */
714
+ function hashHas(key) {
715
+ var data = this.__data__;
716
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
717
+ }
718
+
719
+ var _hashHas = hashHas;
720
+
721
+ /** Used to stand-in for `undefined` hash values. */
722
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
723
+
724
+ /**
725
+ * Sets the hash `key` to `value`.
726
+ *
727
+ * @private
728
+ * @name set
729
+ * @memberOf Hash
730
+ * @param {string} key The key of the value to set.
731
+ * @param {*} value The value to set.
732
+ * @returns {Object} Returns the hash instance.
733
+ */
734
+ function hashSet(key, value) {
735
+ var data = this.__data__;
736
+ this.size += this.has(key) ? 0 : 1;
737
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
738
+ return this;
739
+ }
740
+
741
+ var _hashSet = hashSet;
742
+
743
+ /**
744
+ * Creates a hash object.
745
+ *
746
+ * @private
747
+ * @constructor
748
+ * @param {Array} [entries] The key-value pairs to cache.
749
+ */
750
+ function Hash(entries) {
751
+ var index = -1,
752
+ length = entries == null ? 0 : entries.length;
753
+
754
+ this.clear();
755
+ while (++index < length) {
756
+ var entry = entries[index];
757
+ this.set(entry[0], entry[1]);
758
+ }
759
+ }
760
+
761
+ // Add methods to `Hash`.
762
+ Hash.prototype.clear = _hashClear;
763
+ Hash.prototype['delete'] = _hashDelete;
764
+ Hash.prototype.get = _hashGet;
765
+ Hash.prototype.has = _hashHas;
766
+ Hash.prototype.set = _hashSet;
767
+
768
+ var _Hash = Hash;
769
+
770
+ /**
771
+ * Removes all key-value entries from the list cache.
772
+ *
773
+ * @private
774
+ * @name clear
775
+ * @memberOf ListCache
776
+ */
777
+ function listCacheClear() {
778
+ this.__data__ = [];
779
+ this.size = 0;
780
+ }
781
+
782
+ var _listCacheClear = listCacheClear;
783
+
784
+ /**
785
+ * Performs a
786
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
787
+ * comparison between two values to determine if they are equivalent.
788
+ *
789
+ * @static
790
+ * @memberOf _
791
+ * @since 4.0.0
792
+ * @category Lang
793
+ * @param {*} value The value to compare.
794
+ * @param {*} other The other value to compare.
795
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
796
+ * @example
797
+ *
798
+ * var object = { 'a': 1 };
799
+ * var other = { 'a': 1 };
800
+ *
801
+ * _.eq(object, object);
802
+ * // => true
803
+ *
804
+ * _.eq(object, other);
805
+ * // => false
806
+ *
807
+ * _.eq('a', 'a');
808
+ * // => true
809
+ *
810
+ * _.eq('a', Object('a'));
811
+ * // => false
812
+ *
813
+ * _.eq(NaN, NaN);
814
+ * // => true
815
+ */
816
+ function eq(value, other) {
817
+ return value === other || (value !== value && other !== other);
818
+ }
819
+
820
+ var eq_1 = eq;
821
+
822
+ /**
823
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
824
+ *
825
+ * @private
826
+ * @param {Array} array The array to inspect.
827
+ * @param {*} key The key to search for.
828
+ * @returns {number} Returns the index of the matched value, else `-1`.
829
+ */
830
+ function assocIndexOf(array, key) {
831
+ var length = array.length;
832
+ while (length--) {
833
+ if (eq_1(array[length][0], key)) {
834
+ return length;
835
+ }
836
+ }
837
+ return -1;
838
+ }
839
+
840
+ var _assocIndexOf = assocIndexOf;
841
+
842
+ /** Used for built-in method references. */
843
+ var arrayProto = Array.prototype;
844
+
845
+ /** Built-in value references. */
846
+ var splice = arrayProto.splice;
847
+
848
+ /**
849
+ * Removes `key` and its value from the list cache.
850
+ *
851
+ * @private
852
+ * @name delete
853
+ * @memberOf ListCache
854
+ * @param {string} key The key of the value to remove.
855
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
856
+ */
857
+ function listCacheDelete(key) {
858
+ var data = this.__data__,
859
+ index = _assocIndexOf(data, key);
860
+
861
+ if (index < 0) {
862
+ return false;
863
+ }
864
+ var lastIndex = data.length - 1;
865
+ if (index == lastIndex) {
866
+ data.pop();
867
+ } else {
868
+ splice.call(data, index, 1);
869
+ }
870
+ --this.size;
871
+ return true;
872
+ }
873
+
874
+ var _listCacheDelete = listCacheDelete;
875
+
876
+ /**
877
+ * Gets the list cache value for `key`.
878
+ *
879
+ * @private
880
+ * @name get
881
+ * @memberOf ListCache
882
+ * @param {string} key The key of the value to get.
883
+ * @returns {*} Returns the entry value.
884
+ */
885
+ function listCacheGet(key) {
886
+ var data = this.__data__,
887
+ index = _assocIndexOf(data, key);
888
+
889
+ return index < 0 ? undefined : data[index][1];
890
+ }
891
+
892
+ var _listCacheGet = listCacheGet;
893
+
894
+ /**
895
+ * Checks if a list cache value for `key` exists.
896
+ *
897
+ * @private
898
+ * @name has
899
+ * @memberOf ListCache
900
+ * @param {string} key The key of the entry to check.
901
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
902
+ */
903
+ function listCacheHas(key) {
904
+ return _assocIndexOf(this.__data__, key) > -1;
905
+ }
906
+
907
+ var _listCacheHas = listCacheHas;
908
+
909
+ /**
910
+ * Sets the list cache `key` to `value`.
911
+ *
912
+ * @private
913
+ * @name set
914
+ * @memberOf ListCache
915
+ * @param {string} key The key of the value to set.
916
+ * @param {*} value The value to set.
917
+ * @returns {Object} Returns the list cache instance.
918
+ */
919
+ function listCacheSet(key, value) {
920
+ var data = this.__data__,
921
+ index = _assocIndexOf(data, key);
922
+
923
+ if (index < 0) {
924
+ ++this.size;
925
+ data.push([key, value]);
926
+ } else {
927
+ data[index][1] = value;
928
+ }
929
+ return this;
930
+ }
931
+
932
+ var _listCacheSet = listCacheSet;
933
+
934
+ /**
935
+ * Creates an list cache object.
936
+ *
937
+ * @private
938
+ * @constructor
939
+ * @param {Array} [entries] The key-value pairs to cache.
940
+ */
941
+ function ListCache(entries) {
942
+ var index = -1,
943
+ length = entries == null ? 0 : entries.length;
944
+
945
+ this.clear();
946
+ while (++index < length) {
947
+ var entry = entries[index];
948
+ this.set(entry[0], entry[1]);
949
+ }
950
+ }
951
+
952
+ // Add methods to `ListCache`.
953
+ ListCache.prototype.clear = _listCacheClear;
954
+ ListCache.prototype['delete'] = _listCacheDelete;
955
+ ListCache.prototype.get = _listCacheGet;
956
+ ListCache.prototype.has = _listCacheHas;
957
+ ListCache.prototype.set = _listCacheSet;
958
+
959
+ var _ListCache = ListCache;
960
+
961
+ /* Built-in method references that are verified to be native. */
962
+ var Map = _getNative(_root, 'Map');
963
+
964
+ var _Map = Map;
965
+
966
+ /**
967
+ * Removes all key-value entries from the map.
968
+ *
969
+ * @private
970
+ * @name clear
971
+ * @memberOf MapCache
972
+ */
973
+ function mapCacheClear() {
974
+ this.size = 0;
975
+ this.__data__ = {
976
+ 'hash': new _Hash,
977
+ 'map': new (_Map || _ListCache),
978
+ 'string': new _Hash
979
+ };
980
+ }
981
+
982
+ var _mapCacheClear = mapCacheClear;
983
+
984
+ /**
985
+ * Checks if `value` is suitable for use as unique object key.
986
+ *
987
+ * @private
988
+ * @param {*} value The value to check.
989
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
990
+ */
991
+ function isKeyable(value) {
992
+ var type = typeof value;
993
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
994
+ ? (value !== '__proto__')
995
+ : (value === null);
996
+ }
997
+
998
+ var _isKeyable = isKeyable;
999
+
1000
+ /**
1001
+ * Gets the data for `map`.
1002
+ *
1003
+ * @private
1004
+ * @param {Object} map The map to query.
1005
+ * @param {string} key The reference key.
1006
+ * @returns {*} Returns the map data.
1007
+ */
1008
+ function getMapData(map, key) {
1009
+ var data = map.__data__;
1010
+ return _isKeyable(key)
1011
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1012
+ : data.map;
1013
+ }
1014
+
1015
+ var _getMapData = getMapData;
1016
+
1017
+ /**
1018
+ * Removes `key` and its value from the map.
1019
+ *
1020
+ * @private
1021
+ * @name delete
1022
+ * @memberOf MapCache
1023
+ * @param {string} key The key of the value to remove.
1024
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1025
+ */
1026
+ function mapCacheDelete(key) {
1027
+ var result = _getMapData(this, key)['delete'](key);
1028
+ this.size -= result ? 1 : 0;
1029
+ return result;
1030
+ }
1031
+
1032
+ var _mapCacheDelete = mapCacheDelete;
1033
+
1034
+ /**
1035
+ * Gets the map value for `key`.
1036
+ *
1037
+ * @private
1038
+ * @name get
1039
+ * @memberOf MapCache
1040
+ * @param {string} key The key of the value to get.
1041
+ * @returns {*} Returns the entry value.
1042
+ */
1043
+ function mapCacheGet(key) {
1044
+ return _getMapData(this, key).get(key);
1045
+ }
1046
+
1047
+ var _mapCacheGet = mapCacheGet;
1048
+
1049
+ /**
1050
+ * Checks if a map value for `key` exists.
1051
+ *
1052
+ * @private
1053
+ * @name has
1054
+ * @memberOf MapCache
1055
+ * @param {string} key The key of the entry to check.
1056
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1057
+ */
1058
+ function mapCacheHas(key) {
1059
+ return _getMapData(this, key).has(key);
1060
+ }
1061
+
1062
+ var _mapCacheHas = mapCacheHas;
1063
+
1064
+ /**
1065
+ * Sets the map `key` to `value`.
1066
+ *
1067
+ * @private
1068
+ * @name set
1069
+ * @memberOf MapCache
1070
+ * @param {string} key The key of the value to set.
1071
+ * @param {*} value The value to set.
1072
+ * @returns {Object} Returns the map cache instance.
1073
+ */
1074
+ function mapCacheSet(key, value) {
1075
+ var data = _getMapData(this, key),
1076
+ size = data.size;
1077
+
1078
+ data.set(key, value);
1079
+ this.size += data.size == size ? 0 : 1;
1080
+ return this;
1081
+ }
1082
+
1083
+ var _mapCacheSet = mapCacheSet;
1084
+
1085
+ /**
1086
+ * Creates a map cache object to store key-value pairs.
1087
+ *
1088
+ * @private
1089
+ * @constructor
1090
+ * @param {Array} [entries] The key-value pairs to cache.
1091
+ */
1092
+ function MapCache(entries) {
1093
+ var index = -1,
1094
+ length = entries == null ? 0 : entries.length;
1095
+
1096
+ this.clear();
1097
+ while (++index < length) {
1098
+ var entry = entries[index];
1099
+ this.set(entry[0], entry[1]);
1100
+ }
1101
+ }
1102
+
1103
+ // Add methods to `MapCache`.
1104
+ MapCache.prototype.clear = _mapCacheClear;
1105
+ MapCache.prototype['delete'] = _mapCacheDelete;
1106
+ MapCache.prototype.get = _mapCacheGet;
1107
+ MapCache.prototype.has = _mapCacheHas;
1108
+ MapCache.prototype.set = _mapCacheSet;
1109
+
1110
+ var _MapCache = MapCache;
1111
+
1112
+ /** Error message constants. */
1113
+ var FUNC_ERROR_TEXT = 'Expected a function';
1114
+
1115
+ /**
1116
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1117
+ * provided, it determines the cache key for storing the result based on the
1118
+ * arguments provided to the memoized function. By default, the first argument
1119
+ * provided to the memoized function is used as the map cache key. The `func`
1120
+ * is invoked with the `this` binding of the memoized function.
1121
+ *
1122
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1123
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1124
+ * constructor with one whose instances implement the
1125
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1126
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1127
+ *
1128
+ * @static
1129
+ * @memberOf _
1130
+ * @since 0.1.0
1131
+ * @category Function
1132
+ * @param {Function} func The function to have its output memoized.
1133
+ * @param {Function} [resolver] The function to resolve the cache key.
1134
+ * @returns {Function} Returns the new memoized function.
1135
+ * @example
1136
+ *
1137
+ * var object = { 'a': 1, 'b': 2 };
1138
+ * var other = { 'c': 3, 'd': 4 };
1139
+ *
1140
+ * var values = _.memoize(_.values);
1141
+ * values(object);
1142
+ * // => [1, 2]
1143
+ *
1144
+ * values(other);
1145
+ * // => [3, 4]
1146
+ *
1147
+ * object.a = 2;
1148
+ * values(object);
1149
+ * // => [1, 2]
1150
+ *
1151
+ * // Modify the result cache.
1152
+ * values.cache.set(object, ['a', 'b']);
1153
+ * values(object);
1154
+ * // => ['a', 'b']
1155
+ *
1156
+ * // Replace `_.memoize.Cache`.
1157
+ * _.memoize.Cache = WeakMap;
1158
+ */
1159
+ function memoize(func, resolver) {
1160
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1161
+ throw new TypeError(FUNC_ERROR_TEXT);
1162
+ }
1163
+ var memoized = function() {
1164
+ var args = arguments,
1165
+ key = resolver ? resolver.apply(this, args) : args[0],
1166
+ cache = memoized.cache;
1167
+
1168
+ if (cache.has(key)) {
1169
+ return cache.get(key);
1170
+ }
1171
+ var result = func.apply(this, args);
1172
+ memoized.cache = cache.set(key, result) || cache;
1173
+ return result;
1174
+ };
1175
+ memoized.cache = new (memoize.Cache || _MapCache);
1176
+ return memoized;
1177
+ }
1178
+
1179
+ // Expose `MapCache`.
1180
+ memoize.Cache = _MapCache;
1181
+
1182
+ var memoize_1 = memoize;
1183
+
1184
+ /** Used as the maximum memoize cache size. */
1185
+ var MAX_MEMOIZE_SIZE = 500;
1186
+
1187
+ /**
1188
+ * A specialized version of `_.memoize` which clears the memoized function's
1189
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1190
+ *
1191
+ * @private
1192
+ * @param {Function} func The function to have its output memoized.
1193
+ * @returns {Function} Returns the new memoized function.
1194
+ */
1195
+ function memoizeCapped(func) {
1196
+ var result = memoize_1(func, function(key) {
1197
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1198
+ cache.clear();
1199
+ }
1200
+ return key;
1201
+ });
1202
+
1203
+ var cache = result.cache;
1204
+ return result;
1205
+ }
1206
+
1207
+ var _memoizeCapped = memoizeCapped;
1208
+
1209
+ /** Used to match property names within property paths. */
1210
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1211
+
1212
+ /** Used to match backslashes in property paths. */
1213
+ var reEscapeChar = /\\(\\)?/g;
1214
+
1215
+ /**
1216
+ * Converts `string` to a property path array.
1217
+ *
1218
+ * @private
1219
+ * @param {string} string The string to convert.
1220
+ * @returns {Array} Returns the property path array.
1221
+ */
1222
+ var stringToPath = _memoizeCapped(function(string) {
1223
+ var result = [];
1224
+ if (string.charCodeAt(0) === 46 /* . */) {
1225
+ result.push('');
1226
+ }
1227
+ string.replace(rePropName, function(match, number, quote, subString) {
1228
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1229
+ });
1230
+ return result;
1231
+ });
1232
+
1233
+ var _stringToPath = stringToPath;
1234
+
1235
+ /**
1236
+ * A specialized version of `_.map` for arrays without support for iteratee
1237
+ * shorthands.
1238
+ *
1239
+ * @private
1240
+ * @param {Array} [array] The array to iterate over.
1241
+ * @param {Function} iteratee The function invoked per iteration.
1242
+ * @returns {Array} Returns the new mapped array.
1243
+ */
1244
+ function arrayMap(array, iteratee) {
1245
+ var index = -1,
1246
+ length = array == null ? 0 : array.length,
1247
+ result = Array(length);
1248
+
1249
+ while (++index < length) {
1250
+ result[index] = iteratee(array[index], index, array);
1251
+ }
1252
+ return result;
1253
+ }
1254
+
1255
+ var _arrayMap = arrayMap;
1256
+
1257
+ /** Used as references for various `Number` constants. */
1258
+ var INFINITY$1 = 1 / 0;
1259
+
1260
+ /** Used to convert symbols to primitives and strings. */
1261
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1262
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
1263
+
1264
+ /**
1265
+ * The base implementation of `_.toString` which doesn't convert nullish
1266
+ * values to empty strings.
1267
+ *
1268
+ * @private
1269
+ * @param {*} value The value to process.
1270
+ * @returns {string} Returns the string.
1271
+ */
1272
+ function baseToString(value) {
1273
+ // Exit early for strings to avoid a performance hit in some environments.
1274
+ if (typeof value == 'string') {
1275
+ return value;
1276
+ }
1277
+ if (isArray_1(value)) {
1278
+ // Recursively convert values (susceptible to call stack limits).
1279
+ return _arrayMap(value, baseToString) + '';
1280
+ }
1281
+ if (isSymbol_1(value)) {
1282
+ return symbolToString ? symbolToString.call(value) : '';
1283
+ }
1284
+ var result = (value + '');
1285
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1286
+ }
1287
+
1288
+ var _baseToString = baseToString;
1289
+
1290
+ /**
1291
+ * Converts `value` to a string. An empty string is returned for `null`
1292
+ * and `undefined` values. The sign of `-0` is preserved.
1293
+ *
1294
+ * @static
1295
+ * @memberOf _
1296
+ * @since 4.0.0
1297
+ * @category Lang
1298
+ * @param {*} value The value to convert.
1299
+ * @returns {string} Returns the converted string.
1300
+ * @example
1301
+ *
1302
+ * _.toString(null);
1303
+ * // => ''
1304
+ *
1305
+ * _.toString(-0);
1306
+ * // => '-0'
1307
+ *
1308
+ * _.toString([1, 2, 3]);
1309
+ * // => '1,2,3'
1310
+ */
1311
+ function toString(value) {
1312
+ return value == null ? '' : _baseToString(value);
1313
+ }
1314
+
1315
+ var toString_1 = toString;
1316
+
1317
+ /**
1318
+ * Casts `value` to a path array if it's not one.
1319
+ *
1320
+ * @private
1321
+ * @param {*} value The value to inspect.
1322
+ * @param {Object} [object] The object to query keys on.
1323
+ * @returns {Array} Returns the cast property path array.
1324
+ */
1325
+ function castPath(value, object) {
1326
+ if (isArray_1(value)) {
1327
+ return value;
1328
+ }
1329
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1330
+ }
1331
+
1332
+ var _castPath = castPath;
1333
+
1334
+ /** Used as references for various `Number` constants. */
1335
+ var INFINITY = 1 / 0;
1336
+
1337
+ /**
1338
+ * Converts `value` to a string key if it's not a string or symbol.
1339
+ *
1340
+ * @private
1341
+ * @param {*} value The value to inspect.
1342
+ * @returns {string|symbol} Returns the key.
1343
+ */
1344
+ function toKey(value) {
1345
+ if (typeof value == 'string' || isSymbol_1(value)) {
1346
+ return value;
1347
+ }
1348
+ var result = (value + '');
1349
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1350
+ }
1351
+
1352
+ var _toKey = toKey;
1353
+
1354
+ /**
1355
+ * The base implementation of `_.get` without support for default values.
1356
+ *
1357
+ * @private
1358
+ * @param {Object} object The object to query.
1359
+ * @param {Array|string} path The path of the property to get.
1360
+ * @returns {*} Returns the resolved value.
1361
+ */
1362
+ function baseGet(object, path) {
1363
+ path = _castPath(path, object);
1364
+
1365
+ var index = 0,
1366
+ length = path.length;
1367
+
1368
+ while (object != null && index < length) {
1369
+ object = object[_toKey(path[index++])];
1370
+ }
1371
+ return (index && index == length) ? object : undefined;
1372
+ }
1373
+
1374
+ var _baseGet = baseGet;
1375
+
1376
+ /**
1377
+ * Gets the value at `path` of `object`. If the resolved value is
1378
+ * `undefined`, the `defaultValue` is returned in its place.
1379
+ *
1380
+ * @static
1381
+ * @memberOf _
1382
+ * @since 3.7.0
1383
+ * @category Object
1384
+ * @param {Object} object The object to query.
1385
+ * @param {Array|string} path The path of the property to get.
1386
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1387
+ * @returns {*} Returns the resolved value.
1388
+ * @example
1389
+ *
1390
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1391
+ *
1392
+ * _.get(object, 'a[0].b.c');
1393
+ * // => 3
1394
+ *
1395
+ * _.get(object, ['a', '0', 'b', 'c']);
1396
+ * // => 3
1397
+ *
1398
+ * _.get(object, 'a.b.c', 'default');
1399
+ * // => 'default'
1400
+ */
1401
+ function get(object, path, defaultValue) {
1402
+ var result = object == null ? undefined : _baseGet(object, path);
1403
+ return result === undefined ? defaultValue : result;
1404
+ }
1405
+
1406
+ var get_1 = get;
1407
+
1408
+ var ClockIcon = function ClockIcon(_ref) {
1409
+ var _ref$color = _ref.color,
1410
+ color = _ref$color === void 0 ? "#333" : _ref$color;
1411
+ return /*#__PURE__*/React.createElement("svg", {
1412
+ xmlns: "http://www.w3.org/2000/svg",
1413
+ width: "24",
1414
+ height: "24",
1415
+ viewBox: "0 0 24 24"
1416
+ }, /*#__PURE__*/React.createElement("path", {
1417
+ fill: color,
1418
+ fillRule: "evenodd",
1419
+ d: "M12 19.75a7.513 7.513 0 003.875-1.047 7.832 7.832 0 002.828-2.828A7.513 7.513 0 0019.75 12a7.513 7.513 0 00-1.047-3.875c-.698-1.187-1.64-2.13-2.828-2.828S13.395 4.25 12 4.25a7.51 7.51 0 00-3.875 1.047c-1.188.698-2.13 1.64-2.828 2.828S4.25 10.605 4.25 12a7.51 7.51 0 001.047 3.875 7.824 7.824 0 002.828 2.828A7.513 7.513 0 0012 19.75zm.016-1a6.64 6.64 0 01-3.391-.906 6.716 6.716 0 01-2.469-2.453 6.563 6.563 0 01-.906-3.375c0-1.22.302-2.35.906-3.391A6.711 6.711 0 018.61 6.156a6.563 6.563 0 013.375-.906c1.22 0 2.35.302 3.391.906a6.716 6.716 0 012.469 2.453A6.592 6.592 0 0118.751 12a6.616 6.616 0 01-.906 3.375 6.716 6.716 0 01-2.453 2.469 6.563 6.563 0 01-3.375.906zm2.283-3.92l.076-.002a.343.343 0 00.25-.14l.25-.375a.365.365 0 00.078-.266.328.328 0 00-.14-.234l-2.22-1.625V7.625a.362.362 0 00-.109-.266.36.36 0 00-.265-.109h-.438a.357.357 0 00-.265.11.358.358 0 00-.11.265v5c0 .125.052.219.156.281l2.532 1.844a.383.383 0 00.281.078l-.076.001z"
1420
+ }));
1421
+ };
1422
+ ClockIcon.propTypes = {
1423
+ color: PropTypes.string
1424
+ };
1425
+
1426
+ /**
1427
+ * Copyright (c) 2014-present, Facebook, Inc.
1428
+ *
1429
+ * This source code is licensed under the MIT license found in the
1430
+ * LICENSE file in the root directory of this source tree.
1431
+ */
1432
+
1433
+ createCommonjsModule(function (module) {
1434
+ var runtime = (function (exports) {
1435
+
1436
+ var Op = Object.prototype;
1437
+ var hasOwn = Op.hasOwnProperty;
1438
+ var undefined$1; // More compressible than void 0.
1439
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
1440
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
1441
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
1442
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1443
+
1444
+ function define(obj, key, value) {
1445
+ Object.defineProperty(obj, key, {
1446
+ value: value,
1447
+ enumerable: true,
1448
+ configurable: true,
1449
+ writable: true
1450
+ });
1451
+ return obj[key];
1452
+ }
1453
+ try {
1454
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
1455
+ define({}, "");
1456
+ } catch (err) {
1457
+ define = function(obj, key, value) {
1458
+ return obj[key] = value;
1459
+ };
1460
+ }
1461
+
1462
+ function wrap(innerFn, outerFn, self, tryLocsList) {
1463
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1464
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1465
+ var generator = Object.create(protoGenerator.prototype);
1466
+ var context = new Context(tryLocsList || []);
1467
+
1468
+ // The ._invoke method unifies the implementations of the .next,
1469
+ // .throw, and .return methods.
1470
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
1471
+
1472
+ return generator;
1473
+ }
1474
+ exports.wrap = wrap;
1475
+
1476
+ // Try/catch helper to minimize deoptimizations. Returns a completion
1477
+ // record like context.tryEntries[i].completion. This interface could
1478
+ // have been (and was previously) designed to take a closure to be
1479
+ // invoked without arguments, but in all the cases we care about we
1480
+ // already have an existing method we want to call, so there's no need
1481
+ // to create a new function object. We can even get away with assuming
1482
+ // the method takes exactly one argument, since that happens to be true
1483
+ // in every case, so we don't have to touch the arguments object. The
1484
+ // only additional allocation required is the completion record, which
1485
+ // has a stable shape and so hopefully should be cheap to allocate.
1486
+ function tryCatch(fn, obj, arg) {
1487
+ try {
1488
+ return { type: "normal", arg: fn.call(obj, arg) };
1489
+ } catch (err) {
1490
+ return { type: "throw", arg: err };
1491
+ }
1492
+ }
1493
+
1494
+ var GenStateSuspendedStart = "suspendedStart";
1495
+ var GenStateSuspendedYield = "suspendedYield";
1496
+ var GenStateExecuting = "executing";
1497
+ var GenStateCompleted = "completed";
1498
+
1499
+ // Returning this object from the innerFn has the same effect as
1500
+ // breaking out of the dispatch switch statement.
1501
+ var ContinueSentinel = {};
1502
+
1503
+ // Dummy constructor functions that we use as the .constructor and
1504
+ // .constructor.prototype properties for functions that return Generator
1505
+ // objects. For full spec compliance, you may wish to configure your
1506
+ // minifier not to mangle the names of these two functions.
1507
+ function Generator() {}
1508
+ function GeneratorFunction() {}
1509
+ function GeneratorFunctionPrototype() {}
1510
+
1511
+ // This is a polyfill for %IteratorPrototype% for environments that
1512
+ // don't natively support it.
1513
+ var IteratorPrototype = {};
1514
+ define(IteratorPrototype, iteratorSymbol, function () {
1515
+ return this;
1516
+ });
1517
+
1518
+ var getProto = Object.getPrototypeOf;
1519
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1520
+ if (NativeIteratorPrototype &&
1521
+ NativeIteratorPrototype !== Op &&
1522
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1523
+ // This environment has a native %IteratorPrototype%; use it instead
1524
+ // of the polyfill.
1525
+ IteratorPrototype = NativeIteratorPrototype;
1526
+ }
1527
+
1528
+ var Gp = GeneratorFunctionPrototype.prototype =
1529
+ Generator.prototype = Object.create(IteratorPrototype);
1530
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
1531
+ define(Gp, "constructor", GeneratorFunctionPrototype);
1532
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
1533
+ GeneratorFunction.displayName = define(
1534
+ GeneratorFunctionPrototype,
1535
+ toStringTagSymbol,
1536
+ "GeneratorFunction"
1537
+ );
1538
+
1539
+ // Helper for defining the .next, .throw, and .return methods of the
1540
+ // Iterator interface in terms of a single ._invoke method.
1541
+ function defineIteratorMethods(prototype) {
1542
+ ["next", "throw", "return"].forEach(function(method) {
1543
+ define(prototype, method, function(arg) {
1544
+ return this._invoke(method, arg);
1545
+ });
1546
+ });
1547
+ }
1548
+
1549
+ exports.isGeneratorFunction = function(genFun) {
1550
+ var ctor = typeof genFun === "function" && genFun.constructor;
1551
+ return ctor
1552
+ ? ctor === GeneratorFunction ||
1553
+ // For the native GeneratorFunction constructor, the best we can
1554
+ // do is to check its .name property.
1555
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
1556
+ : false;
1557
+ };
1558
+
1559
+ exports.mark = function(genFun) {
1560
+ if (Object.setPrototypeOf) {
1561
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1562
+ } else {
1563
+ genFun.__proto__ = GeneratorFunctionPrototype;
1564
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
1565
+ }
1566
+ genFun.prototype = Object.create(Gp);
1567
+ return genFun;
1568
+ };
1569
+
1570
+ // Within the body of any async function, `await x` is transformed to
1571
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1572
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
1573
+ // meant to be awaited.
1574
+ exports.awrap = function(arg) {
1575
+ return { __await: arg };
1576
+ };
1577
+
1578
+ function AsyncIterator(generator, PromiseImpl) {
1579
+ function invoke(method, arg, resolve, reject) {
1580
+ var record = tryCatch(generator[method], generator, arg);
1581
+ if (record.type === "throw") {
1582
+ reject(record.arg);
1583
+ } else {
1584
+ var result = record.arg;
1585
+ var value = result.value;
1586
+ if (value &&
1587
+ typeof value === "object" &&
1588
+ hasOwn.call(value, "__await")) {
1589
+ return PromiseImpl.resolve(value.__await).then(function(value) {
1590
+ invoke("next", value, resolve, reject);
1591
+ }, function(err) {
1592
+ invoke("throw", err, resolve, reject);
1593
+ });
1594
+ }
1595
+
1596
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
1597
+ // When a yielded Promise is resolved, its final value becomes
1598
+ // the .value of the Promise<{value,done}> result for the
1599
+ // current iteration.
1600
+ result.value = unwrapped;
1601
+ resolve(result);
1602
+ }, function(error) {
1603
+ // If a rejected Promise was yielded, throw the rejection back
1604
+ // into the async generator function so it can be handled there.
1605
+ return invoke("throw", error, resolve, reject);
1606
+ });
1607
+ }
1608
+ }
1609
+
1610
+ var previousPromise;
1611
+
1612
+ function enqueue(method, arg) {
1613
+ function callInvokeWithMethodAndArg() {
1614
+ return new PromiseImpl(function(resolve, reject) {
1615
+ invoke(method, arg, resolve, reject);
1616
+ });
1617
+ }
1618
+
1619
+ return previousPromise =
1620
+ // If enqueue has been called before, then we want to wait until
1621
+ // all previous Promises have been resolved before calling invoke,
1622
+ // so that results are always delivered in the correct order. If
1623
+ // enqueue has not been called before, then it is important to
1624
+ // call invoke immediately, without waiting on a callback to fire,
1625
+ // so that the async generator function has the opportunity to do
1626
+ // any necessary setup in a predictable way. This predictability
1627
+ // is why the Promise constructor synchronously invokes its
1628
+ // executor callback, and why async functions synchronously
1629
+ // execute code before the first await. Since we implement simple
1630
+ // async functions in terms of async generators, it is especially
1631
+ // important to get this right, even though it requires care.
1632
+ previousPromise ? previousPromise.then(
1633
+ callInvokeWithMethodAndArg,
1634
+ // Avoid propagating failures to Promises returned by later
1635
+ // invocations of the iterator.
1636
+ callInvokeWithMethodAndArg
1637
+ ) : callInvokeWithMethodAndArg();
1638
+ }
1639
+
1640
+ // Define the unified helper method that is used to implement .next,
1641
+ // .throw, and .return (see defineIteratorMethods).
1642
+ this._invoke = enqueue;
1643
+ }
1644
+
1645
+ defineIteratorMethods(AsyncIterator.prototype);
1646
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
1647
+ return this;
1648
+ });
1649
+ exports.AsyncIterator = AsyncIterator;
1650
+
1651
+ // Note that simple async functions are implemented on top of
1652
+ // AsyncIterator objects; they just return a Promise for the value of
1653
+ // the final result produced by the iterator.
1654
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1655
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
1656
+
1657
+ var iter = new AsyncIterator(
1658
+ wrap(innerFn, outerFn, self, tryLocsList),
1659
+ PromiseImpl
1660
+ );
1661
+
1662
+ return exports.isGeneratorFunction(outerFn)
1663
+ ? iter // If outerFn is a generator, return the full iterator.
1664
+ : iter.next().then(function(result) {
1665
+ return result.done ? result.value : iter.next();
1666
+ });
1667
+ };
1668
+
1669
+ function makeInvokeMethod(innerFn, self, context) {
1670
+ var state = GenStateSuspendedStart;
1671
+
1672
+ return function invoke(method, arg) {
1673
+ if (state === GenStateExecuting) {
1674
+ throw new Error("Generator is already running");
1675
+ }
1676
+
1677
+ if (state === GenStateCompleted) {
1678
+ if (method === "throw") {
1679
+ throw arg;
1680
+ }
1681
+
1682
+ // Be forgiving, per 25.3.3.3.3 of the spec:
1683
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1684
+ return doneResult();
1685
+ }
1686
+
1687
+ context.method = method;
1688
+ context.arg = arg;
1689
+
1690
+ while (true) {
1691
+ var delegate = context.delegate;
1692
+ if (delegate) {
1693
+ var delegateResult = maybeInvokeDelegate(delegate, context);
1694
+ if (delegateResult) {
1695
+ if (delegateResult === ContinueSentinel) continue;
1696
+ return delegateResult;
1697
+ }
1698
+ }
1699
+
1700
+ if (context.method === "next") {
1701
+ // Setting context._sent for legacy support of Babel's
1702
+ // function.sent implementation.
1703
+ context.sent = context._sent = context.arg;
1704
+
1705
+ } else if (context.method === "throw") {
1706
+ if (state === GenStateSuspendedStart) {
1707
+ state = GenStateCompleted;
1708
+ throw context.arg;
1709
+ }
1710
+
1711
+ context.dispatchException(context.arg);
1712
+
1713
+ } else if (context.method === "return") {
1714
+ context.abrupt("return", context.arg);
1715
+ }
1716
+
1717
+ state = GenStateExecuting;
1718
+
1719
+ var record = tryCatch(innerFn, self, context);
1720
+ if (record.type === "normal") {
1721
+ // If an exception is thrown from innerFn, we leave state ===
1722
+ // GenStateExecuting and loop back for another invocation.
1723
+ state = context.done
1724
+ ? GenStateCompleted
1725
+ : GenStateSuspendedYield;
1726
+
1727
+ if (record.arg === ContinueSentinel) {
1728
+ continue;
1729
+ }
1730
+
1731
+ return {
1732
+ value: record.arg,
1733
+ done: context.done
1734
+ };
1735
+
1736
+ } else if (record.type === "throw") {
1737
+ state = GenStateCompleted;
1738
+ // Dispatch the exception by looping back around to the
1739
+ // context.dispatchException(context.arg) call above.
1740
+ context.method = "throw";
1741
+ context.arg = record.arg;
1742
+ }
1743
+ }
1744
+ };
1745
+ }
1746
+
1747
+ // Call delegate.iterator[context.method](context.arg) and handle the
1748
+ // result, either by returning a { value, done } result from the
1749
+ // delegate iterator, or by modifying context.method and context.arg,
1750
+ // setting context.delegate to null, and returning the ContinueSentinel.
1751
+ function maybeInvokeDelegate(delegate, context) {
1752
+ var method = delegate.iterator[context.method];
1753
+ if (method === undefined$1) {
1754
+ // A .throw or .return when the delegate iterator has no .throw
1755
+ // method always terminates the yield* loop.
1756
+ context.delegate = null;
1757
+
1758
+ if (context.method === "throw") {
1759
+ // Note: ["return"] must be used for ES3 parsing compatibility.
1760
+ if (delegate.iterator["return"]) {
1761
+ // If the delegate iterator has a return method, give it a
1762
+ // chance to clean up.
1763
+ context.method = "return";
1764
+ context.arg = undefined$1;
1765
+ maybeInvokeDelegate(delegate, context);
1766
+
1767
+ if (context.method === "throw") {
1768
+ // If maybeInvokeDelegate(context) changed context.method from
1769
+ // "return" to "throw", let that override the TypeError below.
1770
+ return ContinueSentinel;
1771
+ }
1772
+ }
1773
+
1774
+ context.method = "throw";
1775
+ context.arg = new TypeError(
1776
+ "The iterator does not provide a 'throw' method");
1777
+ }
1778
+
1779
+ return ContinueSentinel;
1780
+ }
1781
+
1782
+ var record = tryCatch(method, delegate.iterator, context.arg);
1783
+
1784
+ if (record.type === "throw") {
1785
+ context.method = "throw";
1786
+ context.arg = record.arg;
1787
+ context.delegate = null;
1788
+ return ContinueSentinel;
1789
+ }
1790
+
1791
+ var info = record.arg;
1792
+
1793
+ if (! info) {
1794
+ context.method = "throw";
1795
+ context.arg = new TypeError("iterator result is not an object");
1796
+ context.delegate = null;
1797
+ return ContinueSentinel;
1798
+ }
1799
+
1800
+ if (info.done) {
1801
+ // Assign the result of the finished delegate to the temporary
1802
+ // variable specified by delegate.resultName (see delegateYield).
1803
+ context[delegate.resultName] = info.value;
1804
+
1805
+ // Resume execution at the desired location (see delegateYield).
1806
+ context.next = delegate.nextLoc;
1807
+
1808
+ // If context.method was "throw" but the delegate handled the
1809
+ // exception, let the outer generator proceed normally. If
1810
+ // context.method was "next", forget context.arg since it has been
1811
+ // "consumed" by the delegate iterator. If context.method was
1812
+ // "return", allow the original .return call to continue in the
1813
+ // outer generator.
1814
+ if (context.method !== "return") {
1815
+ context.method = "next";
1816
+ context.arg = undefined$1;
1817
+ }
1818
+
1819
+ } else {
1820
+ // Re-yield the result returned by the delegate method.
1821
+ return info;
1822
+ }
1823
+
1824
+ // The delegate iterator is finished, so forget it and continue with
1825
+ // the outer generator.
1826
+ context.delegate = null;
1827
+ return ContinueSentinel;
1828
+ }
1829
+
1830
+ // Define Generator.prototype.{next,throw,return} in terms of the
1831
+ // unified ._invoke helper method.
1832
+ defineIteratorMethods(Gp);
1833
+
1834
+ define(Gp, toStringTagSymbol, "Generator");
1835
+
1836
+ // A Generator should always return itself as the iterator object when the
1837
+ // @@iterator function is called on it. Some browsers' implementations of the
1838
+ // iterator prototype chain incorrectly implement this, causing the Generator
1839
+ // object to not be returned from this call. This ensures that doesn't happen.
1840
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
1841
+ define(Gp, iteratorSymbol, function() {
1842
+ return this;
1843
+ });
1844
+
1845
+ define(Gp, "toString", function() {
1846
+ return "[object Generator]";
1847
+ });
1848
+
1849
+ function pushTryEntry(locs) {
1850
+ var entry = { tryLoc: locs[0] };
1851
+
1852
+ if (1 in locs) {
1853
+ entry.catchLoc = locs[1];
1854
+ }
1855
+
1856
+ if (2 in locs) {
1857
+ entry.finallyLoc = locs[2];
1858
+ entry.afterLoc = locs[3];
1859
+ }
1860
+
1861
+ this.tryEntries.push(entry);
1862
+ }
1863
+
1864
+ function resetTryEntry(entry) {
1865
+ var record = entry.completion || {};
1866
+ record.type = "normal";
1867
+ delete record.arg;
1868
+ entry.completion = record;
1869
+ }
1870
+
1871
+ function Context(tryLocsList) {
1872
+ // The root entry object (effectively a try statement without a catch
1873
+ // or a finally block) gives us a place to store values thrown from
1874
+ // locations where there is no enclosing try statement.
1875
+ this.tryEntries = [{ tryLoc: "root" }];
1876
+ tryLocsList.forEach(pushTryEntry, this);
1877
+ this.reset(true);
1878
+ }
1879
+
1880
+ exports.keys = function(object) {
1881
+ var keys = [];
1882
+ for (var key in object) {
1883
+ keys.push(key);
1884
+ }
1885
+ keys.reverse();
1886
+
1887
+ // Rather than returning an object with a next method, we keep
1888
+ // things simple and return the next function itself.
1889
+ return function next() {
1890
+ while (keys.length) {
1891
+ var key = keys.pop();
1892
+ if (key in object) {
1893
+ next.value = key;
1894
+ next.done = false;
1895
+ return next;
1896
+ }
1897
+ }
1898
+
1899
+ // To avoid creating an additional object, we just hang the .value
1900
+ // and .done properties off the next function object itself. This
1901
+ // also ensures that the minifier will not anonymize the function.
1902
+ next.done = true;
1903
+ return next;
1904
+ };
1905
+ };
1906
+
1907
+ function values(iterable) {
1908
+ if (iterable) {
1909
+ var iteratorMethod = iterable[iteratorSymbol];
1910
+ if (iteratorMethod) {
1911
+ return iteratorMethod.call(iterable);
1912
+ }
1913
+
1914
+ if (typeof iterable.next === "function") {
1915
+ return iterable;
1916
+ }
1917
+
1918
+ if (!isNaN(iterable.length)) {
1919
+ var i = -1, next = function next() {
1920
+ while (++i < iterable.length) {
1921
+ if (hasOwn.call(iterable, i)) {
1922
+ next.value = iterable[i];
1923
+ next.done = false;
1924
+ return next;
1925
+ }
1926
+ }
1927
+
1928
+ next.value = undefined$1;
1929
+ next.done = true;
1930
+
1931
+ return next;
1932
+ };
1933
+
1934
+ return next.next = next;
1935
+ }
1936
+ }
1937
+
1938
+ // Return an iterator with no values.
1939
+ return { next: doneResult };
1940
+ }
1941
+ exports.values = values;
1942
+
1943
+ function doneResult() {
1944
+ return { value: undefined$1, done: true };
1945
+ }
1946
+
1947
+ Context.prototype = {
1948
+ constructor: Context,
1949
+
1950
+ reset: function(skipTempReset) {
1951
+ this.prev = 0;
1952
+ this.next = 0;
1953
+ // Resetting context._sent for legacy support of Babel's
1954
+ // function.sent implementation.
1955
+ this.sent = this._sent = undefined$1;
1956
+ this.done = false;
1957
+ this.delegate = null;
1958
+
1959
+ this.method = "next";
1960
+ this.arg = undefined$1;
1961
+
1962
+ this.tryEntries.forEach(resetTryEntry);
1963
+
1964
+ if (!skipTempReset) {
1965
+ for (var name in this) {
1966
+ // Not sure about the optimal order of these conditions:
1967
+ if (name.charAt(0) === "t" &&
1968
+ hasOwn.call(this, name) &&
1969
+ !isNaN(+name.slice(1))) {
1970
+ this[name] = undefined$1;
1971
+ }
1972
+ }
1973
+ }
1974
+ },
1975
+
1976
+ stop: function() {
1977
+ this.done = true;
1978
+
1979
+ var rootEntry = this.tryEntries[0];
1980
+ var rootRecord = rootEntry.completion;
1981
+ if (rootRecord.type === "throw") {
1982
+ throw rootRecord.arg;
1983
+ }
1984
+
1985
+ return this.rval;
1986
+ },
1987
+
1988
+ dispatchException: function(exception) {
1989
+ if (this.done) {
1990
+ throw exception;
1991
+ }
1992
+
1993
+ var context = this;
1994
+ function handle(loc, caught) {
1995
+ record.type = "throw";
1996
+ record.arg = exception;
1997
+ context.next = loc;
1998
+
1999
+ if (caught) {
2000
+ // If the dispatched exception was caught by a catch block,
2001
+ // then let that catch block handle the exception normally.
2002
+ context.method = "next";
2003
+ context.arg = undefined$1;
2004
+ }
2005
+
2006
+ return !! caught;
2007
+ }
2008
+
2009
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2010
+ var entry = this.tryEntries[i];
2011
+ var record = entry.completion;
2012
+
2013
+ if (entry.tryLoc === "root") {
2014
+ // Exception thrown outside of any try block that could handle
2015
+ // it, so set the completion value of the entire function to
2016
+ // throw the exception.
2017
+ return handle("end");
2018
+ }
2019
+
2020
+ if (entry.tryLoc <= this.prev) {
2021
+ var hasCatch = hasOwn.call(entry, "catchLoc");
2022
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
2023
+
2024
+ if (hasCatch && hasFinally) {
2025
+ if (this.prev < entry.catchLoc) {
2026
+ return handle(entry.catchLoc, true);
2027
+ } else if (this.prev < entry.finallyLoc) {
2028
+ return handle(entry.finallyLoc);
2029
+ }
2030
+
2031
+ } else if (hasCatch) {
2032
+ if (this.prev < entry.catchLoc) {
2033
+ return handle(entry.catchLoc, true);
2034
+ }
2035
+
2036
+ } else if (hasFinally) {
2037
+ if (this.prev < entry.finallyLoc) {
2038
+ return handle(entry.finallyLoc);
2039
+ }
2040
+
2041
+ } else {
2042
+ throw new Error("try statement without catch or finally");
2043
+ }
2044
+ }
2045
+ }
2046
+ },
2047
+
2048
+ abrupt: function(type, arg) {
2049
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2050
+ var entry = this.tryEntries[i];
2051
+ if (entry.tryLoc <= this.prev &&
2052
+ hasOwn.call(entry, "finallyLoc") &&
2053
+ this.prev < entry.finallyLoc) {
2054
+ var finallyEntry = entry;
2055
+ break;
2056
+ }
2057
+ }
2058
+
2059
+ if (finallyEntry &&
2060
+ (type === "break" ||
2061
+ type === "continue") &&
2062
+ finallyEntry.tryLoc <= arg &&
2063
+ arg <= finallyEntry.finallyLoc) {
2064
+ // Ignore the finally entry if control is not jumping to a
2065
+ // location outside the try/catch block.
2066
+ finallyEntry = null;
2067
+ }
2068
+
2069
+ var record = finallyEntry ? finallyEntry.completion : {};
2070
+ record.type = type;
2071
+ record.arg = arg;
2072
+
2073
+ if (finallyEntry) {
2074
+ this.method = "next";
2075
+ this.next = finallyEntry.finallyLoc;
2076
+ return ContinueSentinel;
2077
+ }
2078
+
2079
+ return this.complete(record);
2080
+ },
2081
+
2082
+ complete: function(record, afterLoc) {
2083
+ if (record.type === "throw") {
2084
+ throw record.arg;
2085
+ }
2086
+
2087
+ if (record.type === "break" ||
2088
+ record.type === "continue") {
2089
+ this.next = record.arg;
2090
+ } else if (record.type === "return") {
2091
+ this.rval = this.arg = record.arg;
2092
+ this.method = "return";
2093
+ this.next = "end";
2094
+ } else if (record.type === "normal" && afterLoc) {
2095
+ this.next = afterLoc;
2096
+ }
2097
+
2098
+ return ContinueSentinel;
2099
+ },
2100
+
2101
+ finish: function(finallyLoc) {
2102
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2103
+ var entry = this.tryEntries[i];
2104
+ if (entry.finallyLoc === finallyLoc) {
2105
+ this.complete(entry.completion, entry.afterLoc);
2106
+ resetTryEntry(entry);
2107
+ return ContinueSentinel;
2108
+ }
2109
+ }
2110
+ },
2111
+
2112
+ "catch": function(tryLoc) {
2113
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2114
+ var entry = this.tryEntries[i];
2115
+ if (entry.tryLoc === tryLoc) {
2116
+ var record = entry.completion;
2117
+ if (record.type === "throw") {
2118
+ var thrown = record.arg;
2119
+ resetTryEntry(entry);
2120
+ }
2121
+ return thrown;
2122
+ }
2123
+ }
2124
+
2125
+ // The context.catch method must only be called with a location
2126
+ // argument that corresponds to a known catch block.
2127
+ throw new Error("illegal catch attempt");
2128
+ },
2129
+
2130
+ delegateYield: function(iterable, resultName, nextLoc) {
2131
+ this.delegate = {
2132
+ iterator: values(iterable),
2133
+ resultName: resultName,
2134
+ nextLoc: nextLoc
2135
+ };
2136
+
2137
+ if (this.method === "next") {
2138
+ // Deliberately forget the last sent value so that we don't
2139
+ // accidentally pass it on to the delegate.
2140
+ this.arg = undefined$1;
2141
+ }
2142
+
2143
+ return ContinueSentinel;
2144
+ }
2145
+ };
2146
+
2147
+ // Regardless of whether this script is executing as a CommonJS module
2148
+ // or not, return the runtime object so that we can declare the variable
2149
+ // regeneratorRuntime in the outer scope, which allows this module to be
2150
+ // injected easily by `bin/regenerator --include-runtime script.js`.
2151
+ return exports;
2152
+
2153
+ }(
2154
+ // If this script is executing as a CommonJS module, use module.exports
2155
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
2156
+ // object. Either way, the resulting object will be used to initialize
2157
+ // the regeneratorRuntime variable at the top of this file.
2158
+ module.exports
2159
+ ));
2160
+
2161
+ try {
2162
+ regeneratorRuntime = runtime;
2163
+ } catch (accidentalStrictMode) {
2164
+ // This module should not be running in strict mode, so the above
2165
+ // assignment should always work unless something is misconfigured. Just
2166
+ // in case runtime.js accidentally runs in strict mode, in modern engines
2167
+ // we can explicitly access globalThis. In older engines we can escape
2168
+ // strict mode using a global Function call. This could conceivably fail
2169
+ // if a Content Security Policy forbids using Function, but in that case
2170
+ // the proper solution is to fix the accidental strict mode problem. If
2171
+ // you've misconfigured your bundler to force strict mode and applied a
2172
+ // CSP to forbid Function, and you're not willing to fix either of those
2173
+ // problems, please detail your unique predicament in a GitHub issue.
2174
+ if (typeof globalThis === "object") {
2175
+ globalThis.regeneratorRuntime = runtime;
2176
+ } else {
2177
+ Function("r", "regeneratorRuntime = r")(runtime);
2178
+ }
2179
+ }
2180
+ });
2181
+
2182
+ /**
2183
+ * A specialized version of `_.reduce` for arrays without support for
2184
+ * iteratee shorthands.
2185
+ *
2186
+ * @private
2187
+ * @param {Array} [array] The array to iterate over.
2188
+ * @param {Function} iteratee The function invoked per iteration.
2189
+ * @param {*} [accumulator] The initial value.
2190
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
2191
+ * the initial value.
2192
+ * @returns {*} Returns the accumulated value.
2193
+ */
2194
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
2195
+ var index = -1,
2196
+ length = array == null ? 0 : array.length;
2197
+
2198
+ if (initAccum && length) {
2199
+ accumulator = array[++index];
2200
+ }
2201
+ while (++index < length) {
2202
+ accumulator = iteratee(accumulator, array[index], index, array);
2203
+ }
2204
+ return accumulator;
2205
+ }
2206
+
2207
+ var _arrayReduce = arrayReduce;
2208
+
2209
+ /**
2210
+ * The base implementation of `_.propertyOf` without support for deep paths.
2211
+ *
2212
+ * @private
2213
+ * @param {Object} object The object to query.
2214
+ * @returns {Function} Returns the new accessor function.
2215
+ */
2216
+ function basePropertyOf(object) {
2217
+ return function(key) {
2218
+ return object == null ? undefined : object[key];
2219
+ };
2220
+ }
2221
+
2222
+ var _basePropertyOf = basePropertyOf;
2223
+
2224
+ /** Used to map Latin Unicode letters to basic Latin letters. */
2225
+ var deburredLetters = {
2226
+ // Latin-1 Supplement block.
2227
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
2228
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
2229
+ '\xc7': 'C', '\xe7': 'c',
2230
+ '\xd0': 'D', '\xf0': 'd',
2231
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
2232
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
2233
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
2234
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
2235
+ '\xd1': 'N', '\xf1': 'n',
2236
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
2237
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
2238
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
2239
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
2240
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
2241
+ '\xc6': 'Ae', '\xe6': 'ae',
2242
+ '\xde': 'Th', '\xfe': 'th',
2243
+ '\xdf': 'ss',
2244
+ // Latin Extended-A block.
2245
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
2246
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
2247
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
2248
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
2249
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
2250
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
2251
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
2252
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
2253
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
2254
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
2255
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
2256
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
2257
+ '\u0134': 'J', '\u0135': 'j',
2258
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
2259
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
2260
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
2261
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
2262
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
2263
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
2264
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
2265
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
2266
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
2267
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
2268
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
2269
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
2270
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
2271
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
2272
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
2273
+ '\u0174': 'W', '\u0175': 'w',
2274
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
2275
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
2276
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
2277
+ '\u0132': 'IJ', '\u0133': 'ij',
2278
+ '\u0152': 'Oe', '\u0153': 'oe',
2279
+ '\u0149': "'n", '\u017f': 's'
2280
+ };
2281
+
2282
+ /**
2283
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2284
+ * letters to basic Latin letters.
2285
+ *
2286
+ * @private
2287
+ * @param {string} letter The matched letter to deburr.
2288
+ * @returns {string} Returns the deburred letter.
2289
+ */
2290
+ var deburrLetter = _basePropertyOf(deburredLetters);
2291
+
2292
+ var _deburrLetter = deburrLetter;
2293
+
2294
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
2295
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
2296
+
2297
+ /** Used to compose unicode character classes. */
2298
+ var rsComboMarksRange$1 = '\\u0300-\\u036f',
2299
+ reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
2300
+ rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
2301
+ rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
2302
+
2303
+ /** Used to compose unicode capture groups. */
2304
+ var rsCombo$1 = '[' + rsComboRange$1 + ']';
2305
+
2306
+ /**
2307
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
2308
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
2309
+ */
2310
+ var reComboMark = RegExp(rsCombo$1, 'g');
2311
+
2312
+ /**
2313
+ * Deburrs `string` by converting
2314
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
2315
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
2316
+ * letters to basic Latin letters and removing
2317
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
2318
+ *
2319
+ * @static
2320
+ * @memberOf _
2321
+ * @since 3.0.0
2322
+ * @category String
2323
+ * @param {string} [string=''] The string to deburr.
2324
+ * @returns {string} Returns the deburred string.
2325
+ * @example
2326
+ *
2327
+ * _.deburr('déjà vu');
2328
+ * // => 'deja vu'
2329
+ */
2330
+ function deburr(string) {
2331
+ string = toString_1(string);
2332
+ return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
2333
+ }
2334
+
2335
+ var deburr_1 = deburr;
2336
+
2337
+ /** Used to match words composed of alphanumeric characters. */
2338
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
2339
+
2340
+ /**
2341
+ * Splits an ASCII `string` into an array of its words.
2342
+ *
2343
+ * @private
2344
+ * @param {string} The string to inspect.
2345
+ * @returns {Array} Returns the words of `string`.
2346
+ */
2347
+ function asciiWords(string) {
2348
+ return string.match(reAsciiWord) || [];
2349
+ }
2350
+
2351
+ var _asciiWords = asciiWords;
2352
+
2353
+ /** Used to detect strings that need a more robust regexp to match words. */
2354
+ 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 ]/;
2355
+
2356
+ /**
2357
+ * Checks if `string` contains a word composed of Unicode symbols.
2358
+ *
2359
+ * @private
2360
+ * @param {string} string The string to inspect.
2361
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
2362
+ */
2363
+ function hasUnicodeWord(string) {
2364
+ return reHasUnicodeWord.test(string);
2365
+ }
2366
+
2367
+ var _hasUnicodeWord = hasUnicodeWord;
2368
+
2369
+ /** Used to compose unicode character classes. */
2370
+ var rsAstralRange = '\\ud800-\\udfff',
2371
+ rsComboMarksRange = '\\u0300-\\u036f',
2372
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
2373
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
2374
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
2375
+ rsDingbatRange = '\\u2700-\\u27bf',
2376
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
2377
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
2378
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
2379
+ rsPunctuationRange = '\\u2000-\\u206f',
2380
+ 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',
2381
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
2382
+ rsVarRange = '\\ufe0e\\ufe0f',
2383
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
2384
+
2385
+ /** Used to compose unicode capture groups. */
2386
+ var rsApos$1 = "['\u2019]",
2387
+ rsBreak = '[' + rsBreakRange + ']',
2388
+ rsCombo = '[' + rsComboRange + ']',
2389
+ rsDigits = '\\d+',
2390
+ rsDingbat = '[' + rsDingbatRange + ']',
2391
+ rsLower = '[' + rsLowerRange + ']',
2392
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
2393
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
2394
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
2395
+ rsNonAstral = '[^' + rsAstralRange + ']',
2396
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
2397
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
2398
+ rsUpper = '[' + rsUpperRange + ']',
2399
+ rsZWJ = '\\u200d';
2400
+
2401
+ /** Used to compose unicode regexes. */
2402
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
2403
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
2404
+ rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
2405
+ rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
2406
+ reOptMod = rsModifier + '?',
2407
+ rsOptVar = '[' + rsVarRange + ']?',
2408
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
2409
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
2410
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
2411
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
2412
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
2413
+
2414
+ /** Used to match complex or compound words. */
2415
+ var reUnicodeWord = RegExp([
2416
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
2417
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
2418
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
2419
+ rsUpper + '+' + rsOptContrUpper,
2420
+ rsOrdUpper,
2421
+ rsOrdLower,
2422
+ rsDigits,
2423
+ rsEmoji
2424
+ ].join('|'), 'g');
2425
+
2426
+ /**
2427
+ * Splits a Unicode `string` into an array of its words.
2428
+ *
2429
+ * @private
2430
+ * @param {string} The string to inspect.
2431
+ * @returns {Array} Returns the words of `string`.
2432
+ */
2433
+ function unicodeWords(string) {
2434
+ return string.match(reUnicodeWord) || [];
2435
+ }
2436
+
2437
+ var _unicodeWords = unicodeWords;
2438
+
2439
+ /**
2440
+ * Splits `string` into an array of its words.
2441
+ *
2442
+ * @static
2443
+ * @memberOf _
2444
+ * @since 3.0.0
2445
+ * @category String
2446
+ * @param {string} [string=''] The string to inspect.
2447
+ * @param {RegExp|string} [pattern] The pattern to match words.
2448
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
2449
+ * @returns {Array} Returns the words of `string`.
2450
+ * @example
2451
+ *
2452
+ * _.words('fred, barney, & pebbles');
2453
+ * // => ['fred', 'barney', 'pebbles']
2454
+ *
2455
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
2456
+ * // => ['fred', 'barney', '&', 'pebbles']
2457
+ */
2458
+ function words(string, pattern, guard) {
2459
+ string = toString_1(string);
2460
+ pattern = guard ? undefined : pattern;
2461
+
2462
+ if (pattern === undefined) {
2463
+ return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
2464
+ }
2465
+ return string.match(pattern) || [];
2466
+ }
2467
+
2468
+ var words_1 = words;
2469
+
2470
+ /** Used to compose unicode capture groups. */
2471
+ var rsApos = "['\u2019]";
2472
+
2473
+ /** Used to match apostrophes. */
2474
+ var reApos = RegExp(rsApos, 'g');
2475
+
2476
+ /**
2477
+ * Creates a function like `_.camelCase`.
2478
+ *
2479
+ * @private
2480
+ * @param {Function} callback The function to combine each word.
2481
+ * @returns {Function} Returns the new compounder function.
2482
+ */
2483
+ function createCompounder(callback) {
2484
+ return function(string) {
2485
+ return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
2486
+ };
2487
+ }
2488
+
2489
+ var _createCompounder = createCompounder;
2490
+
2491
+ /**
2492
+ * Converts `string`, as space separated words, to upper case.
2493
+ *
2494
+ * @static
2495
+ * @memberOf _
2496
+ * @since 4.0.0
2497
+ * @category String
2498
+ * @param {string} [string=''] The string to convert.
2499
+ * @returns {string} Returns the upper cased string.
2500
+ * @example
2501
+ *
2502
+ * _.upperCase('--foo-bar');
2503
+ * // => 'FOO BAR'
2504
+ *
2505
+ * _.upperCase('fooBar');
2506
+ * // => 'FOO BAR'
2507
+ *
2508
+ * _.upperCase('__foo_bar__');
2509
+ * // => 'FOO BAR'
2510
+ */
2511
+ var upperCase = _createCompounder(function(result, word, index) {
2512
+ return result + (index ? ' ' : '') + word.toUpperCase();
2513
+ });
2514
+
2515
+ var upperCase_1 = upperCase;
2516
+
2517
+ /**
2518
+ * Converts `string`, as space separated words, to lower case.
2519
+ *
2520
+ * @static
2521
+ * @memberOf _
2522
+ * @since 4.0.0
2523
+ * @category String
2524
+ * @param {string} [string=''] The string to convert.
2525
+ * @returns {string} Returns the lower cased string.
2526
+ * @example
2527
+ *
2528
+ * _.lowerCase('--Foo-Bar--');
2529
+ * // => 'foo bar'
2530
+ *
2531
+ * _.lowerCase('fooBar');
2532
+ * // => 'foo bar'
2533
+ *
2534
+ * _.lowerCase('__FOO_BAR__');
2535
+ * // => 'foo bar'
2536
+ */
2537
+ var lowerCase = _createCompounder(function(result, word, index) {
2538
+ return result + (index ? ' ' : '') + word.toLowerCase();
2539
+ });
2540
+
2541
+ var lowerCase_1 = lowerCase;
2542
+
2543
+ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestamp) {
2544
+ var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
2545
+ var _config$showTime = config.showTime,
2546
+ showTime = _config$showTime === void 0 ? false : _config$showTime,
2547
+ _config$isTimeFirst = config.isTimeFirst,
2548
+ isTimeFirst = _config$isTimeFirst === void 0 ? false : _config$isTimeFirst,
2549
+ _config$isUpperCase = config.isUpperCase,
2550
+ isUpperCase = _config$isUpperCase === void 0 ? false : _config$isUpperCase,
2551
+ _config$disableMeridi = config.disableMeridiem,
2552
+ disableMeridiem = _config$disableMeridi === void 0 ? false : _config$disableMeridi,
2553
+ _config$timeFormat = config.timeFormat,
2554
+ timeFormat = _config$timeFormat === void 0 ? "12hours" : _config$timeFormat;
2555
+ var monthList = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2556
+ var dateTime = new Date(timestamp);
2557
+ var date = dateTime.getDate().toString().padStart(2, 0);
2558
+ var month = monthList[dateTime.getMonth()];
2559
+ var localizedMonth = month;
2560
+
2561
+ if (isUpperCase) {
2562
+ localizedMonth = upperCase_1(month);
2563
+ }
2564
+
2565
+ var year = dateTime.getFullYear();
2566
+ var localizedMeridiem = config.localizedMeridiem,
2567
+ localizedMonths = config.localizedMonths,
2568
+ _config$direction = config.direction,
2569
+ direction = _config$direction === void 0 ? "ltr" : _config$direction;
2570
+ var time = formatAMPM(timestamp, timeFormat);
2571
+ var timeWithLocalizedMeridiem = time;
2572
+ var timetoShow;
2573
+
2574
+ if (localizedMonths) {
2575
+ localizedMonth = get_1(localizedMonths, [lowerCase_1(month)]) || month;
2576
+ }
2577
+
2578
+ if (localizedMeridiem) {
2579
+ var isAm = time.includes("am");
2580
+ var _localizedMeridiem$am = localizedMeridiem.am,
2581
+ am = _localizedMeridiem$am === void 0 ? "am" : _localizedMeridiem$am,
2582
+ _localizedMeridiem$pm = localizedMeridiem.pm,
2583
+ pm = _localizedMeridiem$pm === void 0 ? "pm" : _localizedMeridiem$pm;
2584
+ timeWithLocalizedMeridiem = (isAm ? time.replace("am", am) : time.replace("pm", pm)) || time;
2585
+ }
2586
+
2587
+ if (direction === "rtl") {
2588
+ timetoShow = showTime ? "".concat(timeWithLocalizedMeridiem) : "";
2589
+ return "".concat(date, " ").concat(localizedMonth, ", ").concat(year, " ").concat(timetoShow, " ");
2590
+ } else {
2591
+ if (disableMeridiem) {
2592
+ return "".concat(localizedMonth, " ").concat(date, ", ").concat(year);
2593
+ } else if (isTimeFirst) {
2594
+ return "".concat(timeWithLocalizedMeridiem, ", ").concat(date, " ").concat(localizedMonth, " ").concat(year);
2595
+ } else {
2596
+ timetoShow = showTime ? ", ".concat(timeWithLocalizedMeridiem) : "";
2597
+ return "".concat(date, " ").concat(localizedMonth, ", ").concat(year).concat(timetoShow);
2598
+ }
2599
+ }
2600
+ };
2601
+
2602
+ function formatAMPM(timestamp) {
2603
+ var timeFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "12hours";
2604
+ var dateTime = new Date(timestamp);
2605
+ var hours = dateTime.getHours();
2606
+ var minutes = dateTime.getMinutes();
2607
+ var ampm = hours >= 12 ? "pm" : "am";
2608
+ hours = hours % 12;
2609
+ hours = hours || 12;
2610
+ minutes = minutes < 10 ? "0" + minutes : minutes;
2611
+ var strTime = hours + ":" + minutes + " " + ampm;
2612
+
2613
+ if (timeFormat === "24hours") {
2614
+ return dateTime.toLocaleTimeString([], {
2615
+ hour: "2-digit",
2616
+ minute: "2-digit"
2617
+ });
2618
+ }
2619
+
2620
+ return strTime;
2621
+ }
2622
+
2623
+ var hexToRGB = function hexToRGB(hex) {
2624
+ var r = parseInt(hex.slice(1, 3), 16);
2625
+ var g = parseInt(hex.slice(3, 5), 16);
2626
+ var b = parseInt(hex.slice(5, 7), 16);
2627
+ return {
2628
+ r: r,
2629
+ g: g,
2630
+ b: b
2631
+ };
2632
+ };
2633
+ var getLuminanceOfColor = function getLuminanceOfColor(hex) {
2634
+ var _hexToRGB = hexToRGB(hex),
2635
+ r = _hexToRGB.r,
2636
+ g = _hexToRGB.g,
2637
+ b = _hexToRGB.b;
2638
+
2639
+ return r * 0.299 + g * 0.587 + b * 0.114;
2640
+ };
2641
+ var rgbToHex = function rgbToHex() {
2642
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
2643
+ var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
2644
+ return rgba && rgba.length === 4 ? "#" + ("0" + parseInt(rgba[1], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[2], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[3], 10).toString(16)).slice(-2) : color;
2645
+ };
2646
+ var getTextColor = function getTextColor() {
2647
+ var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
2648
+ var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
2649
+ var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
2650
+ var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
2651
+ return textColor;
2652
+ };
2653
+ var getSlug = function getSlug(collection) {
2654
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2655
+ var _config$magazineSlug = config.magazineSlug,
2656
+ magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
2657
+ _config$isArchivePage = config.isArchivePage,
2658
+ isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
2659
+
2660
+ if (isArchivePage) {
2661
+ return "/magazine/archive/".concat(magazineSlug);
2662
+ }
2663
+
2664
+ if (magazineSlug) {
2665
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2666
+ }
2667
+
2668
+ var isSection = collection.template === "section";
2669
+
2670
+ if (isSection) {
2671
+ var sectionId = get_1(collection, ["metadata", "section", "0", "id"], "");
2672
+ var sections = config.sections;
2673
+ var section = sections && sections.find(function (section) {
2674
+ return section.id === sectionId;
2675
+ });
2676
+ return section ? section["section-url"] : "/";
2677
+ }
2678
+
2679
+ return "/collection/".concat(collection.slug);
2680
+ };
2681
+ PropTypes.shape({
2682
+ "sketches-host": PropTypes.string,
2683
+ "cdn-name": PropTypes.string,
2684
+ "cdn-image": PropTypes.string
2685
+ });
2686
+ PropTypes.shape({
2687
+ headline: PropTypes.string,
2688
+ "last-published-at": PropTypes.number,
2689
+ subheadline: PropTypes.string
2690
+ });
2691
+ var generateNavigateSlug = function generateNavigateSlug() {
2692
+ var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2693
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2694
+ var customUrlPath = arguments.length > 2 ? arguments[2] : undefined;
2695
+
2696
+ if (customUrlPath) {
2697
+ return customUrlPath;
2698
+ }
2699
+
2700
+ var _config$magazineSlug2 = config.magazineSlug,
2701
+ magazineSlug = _config$magazineSlug2 === void 0 ? "" : _config$magazineSlug2,
2702
+ _config$isArchivePage2 = config.isArchivePage,
2703
+ isArchivePage = _config$isArchivePage2 === void 0 ? false : _config$isArchivePage2;
2704
+
2705
+ if (isArchivePage) {
2706
+ return "/magazine/archive/".concat(magazineSlug);
2707
+ }
2708
+
2709
+ if (magazineSlug) {
2710
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2711
+ }
2712
+
2713
+ if (collection) {
2714
+ return getSlug(collection, config);
2715
+ }
2716
+
2717
+ return "/";
2718
+ };
2719
+ var getTimeStamp = function getTimeStamp(date, _formatter) {
2720
+ var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2721
+ var template = arguments.length > 3 ? arguments[3] : undefined;
2722
+ var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
2723
+
2724
+ if (timezone && template === "story") {
2725
+ var zonedTime = timezone && utcToZonedTime(date, timezone);
2726
+ var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
2727
+ timeZone: timezone
2728
+ });
2729
+ var timeStamp = timestampToFormat("", "", "", date, config);
2730
+ return /*#__PURE__*/React.createElement("time", {
2731
+ dateTime: formatZonedTime
2732
+ }, timeStamp);
2733
+ }
2734
+
2735
+ return /*#__PURE__*/React.createElement(Timeago, {
2736
+ date: date,
2737
+ formatter: function formatter(value, unit, suffix, date) {
2738
+ return _formatter(value, unit, suffix, date, config);
2739
+ }
2740
+ });
2741
+ };
2742
+
2743
+ function _defineProperty(obj, key, value) {
2744
+ if (key in obj) {
2745
+ Object.defineProperty(obj, key, {
2746
+ value: value,
2747
+ enumerable: true,
2748
+ configurable: true,
2749
+ writable: true
2750
+ });
2751
+ } else {
2752
+ obj[key] = value;
2753
+ }
2754
+
2755
+ return obj;
2756
+ }
2757
+
2758
+ var _styleModuleImportMap$1 = {
2759
+ "./load-more.m.css": {
2760
+ "button": "load-more-m_button__1mmf1",
2761
+ "default": "load-more-m_default__2_k4V",
2762
+ "dark": "load-more-m_dark__3dfzb",
2763
+ "light": "load-more-m_light__ePZQI"
2764
+ }
2765
+ };
2766
+
2767
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2768
+
2769
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2770
+ var LoadmoreButton = function LoadmoreButton(_ref) {
2771
+ var _ref$config = _ref.config,
2772
+ config = _ref$config === void 0 ? {} : _ref$config,
2773
+ collection = _ref.collection,
2774
+ _ref$template = _ref.template,
2775
+ template = _ref$template === void 0 ? "SubsequentLoadCount" : _ref$template,
2776
+ onClick = _ref.onClick,
2777
+ navigate = _ref.navigate,
2778
+ qtConfig = _ref.qtConfig;
2779
+ var _config$showButton = config.showButton,
2780
+ showButton = _config$showButton === void 0 ? true : _config$showButton,
2781
+ _config$buttonText = config.buttonText,
2782
+ buttonText = _config$buttonText === void 0 ? "Read More" : _config$buttonText,
2783
+ _config$theme = config.theme,
2784
+ theme = _config$theme === void 0 ? "" : _config$theme,
2785
+ _config$customUrlPath = config.customUrlPath,
2786
+ customUrlPath = _config$customUrlPath === void 0 ? "" : _config$customUrlPath;
2787
+ if (!showButton) return null;
2788
+ var textColor = getTextColor(theme);
2789
+ var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
2790
+ return template === "SubsequentLoadCount" ? /*#__PURE__*/React.createElement("div", {
2791
+ onClick: onClick,
2792
+ "data-test-id": "load-more",
2793
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
2794
+ }, buttonText) : /*#__PURE__*/React.createElement(LinkBase, {
2795
+ href: slug,
2796
+ navigateTo: navigate,
2797
+ "data-test-id": "load-more",
2798
+ "aria-label": "load-more"
2799
+ }, /*#__PURE__*/React.createElement("div", {
2800
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
2801
+ }, buttonText));
2802
+ };
2803
+ LoadmoreButton.propTypes = {
2804
+ collection: PropTypes.object,
2805
+ template: PropTypes.string,
2806
+ config: PropTypes.object,
2807
+ onClick: PropTypes.func,
2808
+ navigate: PropTypes.func,
2809
+ qtConfig: PropTypes.object
2810
+ };
2811
+
2812
+ var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
2813
+
2814
+ var StateProvider = function StateProvider(RowComponent) {
2815
+ return function (props) {
2816
+ return (
2817
+ /*#__PURE__*/
2818
+ // eslint-disable-next-line react/prop-types
2819
+ React.createElement(StateContext.Provider, {
2820
+ value: props.config
2821
+ }, /*#__PURE__*/React.createElement(RowComponent, props))
2822
+ );
2823
+ };
2824
+ };
2825
+
2826
+ var _styleModuleImportMap = {
2827
+ "./key-events.m.css": {
2828
+ "container": "key-events-m_container__1slhR",
2829
+ "event-title": "key-events-m_event-title__u9bt3",
2830
+ "cards-wrapper": "key-events-m_cards-wrapper__3f8aB",
2831
+ "time-wrapper": "key-events-m_time-wrapper__2poXn",
2832
+ "dark": "key-events-m_dark__hrnAr",
2833
+ "light": "key-events-m_light__2gE0a",
2834
+ "borderNone": "key-events-m_borderNone__2tNUK",
2835
+ "fade-out": "key-events-m_fade-out__11jv_"
2836
+ }
2837
+ };
2838
+
2839
+ var KeyEventCards = function KeyEventCards(props) {
2840
+ var config = props.config,
2841
+ index = props.index,
2842
+ cardLength = props.cardLength,
2843
+ _props$card = props.card,
2844
+ card = _props$card === void 0 ? {} : _props$card,
2845
+ slug = props.slug,
2846
+ loadCards = props.loadCards,
2847
+ showLoadMore = props.showLoadMore;
2848
+ var cardAddedAt = card["card-added-at"],
2849
+ _card$storyElements = card["story-elements"],
2850
+ storyElements = _card$storyElements === void 0 ? [] : _card$storyElements,
2851
+ id = card.id;
2852
+ var theme = config.theme,
2853
+ _config$mountAt = config.mountAt,
2854
+ mountAt = _config$mountAt === void 0 ? "" : _config$mountAt;
2855
+ var textColor = getTextColor(theme);
2856
+ var dark = "#333";
2857
+ var light = "#fff";
2858
+ var updateColor = textColor === "dark" ? dark : light;
2859
+ var lastElement = index === cardLength - 1;
2860
+ var borderLeft = lastElement ? "borderNone" : "";
2861
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2862
+ className: _getClassName("time-wrapper ".concat(textColor), _styleModuleImportMap)
2863
+ }, /*#__PURE__*/React.createElement(ClockIcon, {
2864
+ color: updateColor
2865
+ }), getTimeStamp(cardAddedAt, timestampToFormat, {
2866
+ showTime: true,
2867
+ isTimeFirst: true
2868
+ })), /*#__PURE__*/React.createElement("a", {
2869
+ href: "".concat(mountAt, "/").concat(slug, "#").concat(id),
2870
+ "aria-label": "event-title"
2871
+ }, /*#__PURE__*/React.createElement("div", {
2872
+ className: _getClassName("event-title ".concat(textColor, " ").concat(borderLeft), _styleModuleImportMap)
2873
+ }, storyElements.map(function (element, index) {
2874
+ return element.type === "title" && /*#__PURE__*/React.createElement("h3", {
2875
+ key: index
2876
+ }, element.text);
2877
+ }), showLoadMore && lastElement && loadCards && /*#__PURE__*/React.createElement("div", {
2878
+ className: "key-events-m_fade-out__11jv_",
2879
+ style: {
2880
+ backgroundImage: "linear-gradient(to bottom, transparent, ".concat(theme, ")")
2881
+ }
2882
+ }))));
2883
+ };
2884
+
2885
+ KeyEventCards.propTypes = {
2886
+ card: PropTypes.shape({
2887
+ "card-added-at": PropTypes.number,
2888
+ "story-elements": PropTypes.array,
2889
+ id: PropTypes.string
2890
+ }),
2891
+ config: PropTypes.object,
2892
+ slug: PropTypes.string,
2893
+ story: PropTypes.object,
2894
+ elements: PropTypes.array,
2895
+ index: PropTypes.number,
2896
+ cardLength: PropTypes.number,
2897
+ loadCards: PropTypes.bool,
2898
+ showLoadMore: PropTypes.bool
2899
+ };
2900
+ var KeyEventsBase = function KeyEventsBase(_ref) {
2901
+ var _ref$story = _ref.story,
2902
+ story = _ref$story === void 0 ? {} : _ref$story,
2903
+ _ref$config = _ref.config,
2904
+ config = _ref$config === void 0 ? {} : _ref$config,
2905
+ _ref$showLoadMore = _ref.showLoadMore,
2906
+ showLoadMore = _ref$showLoadMore === void 0 ? true : _ref$showLoadMore;
2907
+ var cards = get_1(story, ["cards"], []);
2908
+ var theme = config.theme,
2909
+ _config$initialLoadCo = config.initialLoadCount,
2910
+ initialLoadCount = _config$initialLoadCo === void 0 ? 4 : _config$initialLoadCo;
2911
+ var textColor = getTextColor(theme);
2912
+
2913
+ var _useState = useState(initialLoadCount),
2914
+ _useState2 = _slicedToArray(_useState, 2),
2915
+ initialCount = _useState2[0],
2916
+ updatedCount = _useState2[1];
2917
+
2918
+ var cardsWithKeyEvents = cards.filter(function (card) {
2919
+ return get_1(card.metadata, ["attributes", "key-event"]);
2920
+ });
2921
+ var lastElement = cardsWithKeyEvents.length > initialCount;
2922
+ var qtConfig = useSelector(function (state) {
2923
+ return get_1(state, ["qt", "config"], {});
2924
+ });
2925
+
2926
+ var onClick = function onClick() {
2927
+ updatedCount(initialCount + initialLoadCount);
2928
+ };
2929
+
2930
+ if (cardsWithKeyEvents.length < 1) {
2931
+ return null;
2932
+ }
2933
+
2934
+ var showAllCards = !showLoadMore ? cardsWithKeyEvents.slice(0, 4) : cardsWithKeyEvents.slice(0, initialCount);
2935
+ var keyEvents = showAllCards.map(function (card, index, source) {
2936
+ return /*#__PURE__*/React.createElement(KeyEventCards, {
2937
+ cardLength: source.length,
2938
+ card: card,
2939
+ key: card.id,
2940
+ slug: story.slug,
2941
+ config: config,
2942
+ index: index,
2943
+ loadCards: lastElement,
2944
+ showLoadMore: showLoadMore
2945
+ });
2946
+ });
2947
+ return /*#__PURE__*/React.createElement("div", {
2948
+ style: {
2949
+ background: theme
2950
+ },
2951
+ className: "arrow-component " + _getClassName("container ".concat(textColor), _styleModuleImportMap)
2952
+ }, /*#__PURE__*/React.createElement("h3", null, "Key Events"), /*#__PURE__*/React.createElement("div", {
2953
+ className: "key-events-m_cards-wrapper__3f8aB"
2954
+ }, keyEvents), showLoadMore && lastElement && /*#__PURE__*/React.createElement(LoadmoreButton, {
2955
+ onClick: onClick,
2956
+ template: "SubsequentLoadCount",
2957
+ config: config,
2958
+ qtConfig: qtConfig
2959
+ }));
2960
+ };
2961
+ KeyEventsBase.propTypes = {
2962
+ story: PropTypes.object,
2963
+ config: PropTypes.object,
2964
+ showLoadMore: PropTypes.bool
2965
+ };
2966
+ var KeyEvents = StateProvider(KeyEventsBase);
2967
+
2968
+ export { KeyEvents, KeyEventsBase };