@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,4661 @@
1
+ import React, { useContext, createContext, useState, useEffect } from 'react';
2
+ import axios from 'axios';
3
+ import PropTypes, { PropTypes as PropTypes$1 } from 'prop-types';
4
+ import { connect, useSelector, useDispatch } from 'react-redux';
5
+ import { Link, LinkBase, ResponsiveImage, ResponsiveHeroImage, collectionToStories } from '@quintype/components';
6
+ import Timeago from 'react-timeago';
7
+ import { utcToZonedTime, format } from 'date-fns-tz';
8
+
9
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
10
+ try {
11
+ var info = gen[key](arg);
12
+ var value = info.value;
13
+ } catch (error) {
14
+ reject(error);
15
+ return;
16
+ }
17
+
18
+ if (info.done) {
19
+ resolve(value);
20
+ } else {
21
+ Promise.resolve(value).then(_next, _throw);
22
+ }
23
+ }
24
+
25
+ function _asyncToGenerator(fn) {
26
+ return function () {
27
+ var self = this,
28
+ args = arguments;
29
+ return new Promise(function (resolve, reject) {
30
+ var gen = fn.apply(self, args);
31
+
32
+ function _next(value) {
33
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
34
+ }
35
+
36
+ function _throw(err) {
37
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
38
+ }
39
+
40
+ _next(undefined);
41
+ });
42
+ };
43
+ }
44
+
45
+ function _defineProperty(obj, key, value) {
46
+ if (key in obj) {
47
+ Object.defineProperty(obj, key, {
48
+ value: value,
49
+ enumerable: true,
50
+ configurable: true,
51
+ writable: true
52
+ });
53
+ } else {
54
+ obj[key] = value;
55
+ }
56
+
57
+ return obj;
58
+ }
59
+
60
+ function _arrayWithHoles(arr) {
61
+ if (Array.isArray(arr)) return arr;
62
+ }
63
+
64
+ function _iterableToArrayLimit(arr, i) {
65
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
66
+
67
+ if (_i == null) return;
68
+ var _arr = [];
69
+ var _n = true;
70
+ var _d = false;
71
+
72
+ var _s, _e;
73
+
74
+ try {
75
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
76
+ _arr.push(_s.value);
77
+
78
+ if (i && _arr.length === i) break;
79
+ }
80
+ } catch (err) {
81
+ _d = true;
82
+ _e = err;
83
+ } finally {
84
+ try {
85
+ if (!_n && _i["return"] != null) _i["return"]();
86
+ } finally {
87
+ if (_d) throw _e;
88
+ }
89
+ }
90
+
91
+ return _arr;
92
+ }
93
+
94
+ function _arrayLikeToArray(arr, len) {
95
+ if (len == null || len > arr.length) len = arr.length;
96
+
97
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
98
+ arr2[i] = arr[i];
99
+ }
100
+
101
+ return arr2;
102
+ }
103
+
104
+ function _unsupportedIterableToArray(o, minLen) {
105
+ if (!o) return;
106
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
107
+ var n = Object.prototype.toString.call(o).slice(8, -1);
108
+ if (n === "Object" && o.constructor) n = o.constructor.name;
109
+ if (n === "Map" || n === "Set") return Array.from(o);
110
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
111
+ }
112
+
113
+ function _nonIterableRest() {
114
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
115
+ }
116
+
117
+ function _slicedToArray(arr, i) {
118
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
119
+ }
120
+
121
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
122
+
123
+ function getDefaultExportFromCjs (x) {
124
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
125
+ }
126
+
127
+ function createCommonjsModule(fn) {
128
+ var module = { exports: {} };
129
+ return fn(module, module.exports), module.exports;
130
+ }
131
+
132
+ /**
133
+ * Copyright (c) 2014-present, Facebook, Inc.
134
+ *
135
+ * This source code is licensed under the MIT license found in the
136
+ * LICENSE file in the root directory of this source tree.
137
+ */
138
+
139
+ var runtime_1 = createCommonjsModule(function (module) {
140
+ var runtime = (function (exports) {
141
+
142
+ var Op = Object.prototype;
143
+ var hasOwn = Op.hasOwnProperty;
144
+ var undefined$1; // More compressible than void 0.
145
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
146
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
147
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
148
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
149
+
150
+ function define(obj, key, value) {
151
+ Object.defineProperty(obj, key, {
152
+ value: value,
153
+ enumerable: true,
154
+ configurable: true,
155
+ writable: true
156
+ });
157
+ return obj[key];
158
+ }
159
+ try {
160
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
161
+ define({}, "");
162
+ } catch (err) {
163
+ define = function(obj, key, value) {
164
+ return obj[key] = value;
165
+ };
166
+ }
167
+
168
+ function wrap(innerFn, outerFn, self, tryLocsList) {
169
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
170
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
171
+ var generator = Object.create(protoGenerator.prototype);
172
+ var context = new Context(tryLocsList || []);
173
+
174
+ // The ._invoke method unifies the implementations of the .next,
175
+ // .throw, and .return methods.
176
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
177
+
178
+ return generator;
179
+ }
180
+ exports.wrap = wrap;
181
+
182
+ // Try/catch helper to minimize deoptimizations. Returns a completion
183
+ // record like context.tryEntries[i].completion. This interface could
184
+ // have been (and was previously) designed to take a closure to be
185
+ // invoked without arguments, but in all the cases we care about we
186
+ // already have an existing method we want to call, so there's no need
187
+ // to create a new function object. We can even get away with assuming
188
+ // the method takes exactly one argument, since that happens to be true
189
+ // in every case, so we don't have to touch the arguments object. The
190
+ // only additional allocation required is the completion record, which
191
+ // has a stable shape and so hopefully should be cheap to allocate.
192
+ function tryCatch(fn, obj, arg) {
193
+ try {
194
+ return { type: "normal", arg: fn.call(obj, arg) };
195
+ } catch (err) {
196
+ return { type: "throw", arg: err };
197
+ }
198
+ }
199
+
200
+ var GenStateSuspendedStart = "suspendedStart";
201
+ var GenStateSuspendedYield = "suspendedYield";
202
+ var GenStateExecuting = "executing";
203
+ var GenStateCompleted = "completed";
204
+
205
+ // Returning this object from the innerFn has the same effect as
206
+ // breaking out of the dispatch switch statement.
207
+ var ContinueSentinel = {};
208
+
209
+ // Dummy constructor functions that we use as the .constructor and
210
+ // .constructor.prototype properties for functions that return Generator
211
+ // objects. For full spec compliance, you may wish to configure your
212
+ // minifier not to mangle the names of these two functions.
213
+ function Generator() {}
214
+ function GeneratorFunction() {}
215
+ function GeneratorFunctionPrototype() {}
216
+
217
+ // This is a polyfill for %IteratorPrototype% for environments that
218
+ // don't natively support it.
219
+ var IteratorPrototype = {};
220
+ define(IteratorPrototype, iteratorSymbol, function () {
221
+ return this;
222
+ });
223
+
224
+ var getProto = Object.getPrototypeOf;
225
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
226
+ if (NativeIteratorPrototype &&
227
+ NativeIteratorPrototype !== Op &&
228
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
229
+ // This environment has a native %IteratorPrototype%; use it instead
230
+ // of the polyfill.
231
+ IteratorPrototype = NativeIteratorPrototype;
232
+ }
233
+
234
+ var Gp = GeneratorFunctionPrototype.prototype =
235
+ Generator.prototype = Object.create(IteratorPrototype);
236
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
237
+ define(Gp, "constructor", GeneratorFunctionPrototype);
238
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
239
+ GeneratorFunction.displayName = define(
240
+ GeneratorFunctionPrototype,
241
+ toStringTagSymbol,
242
+ "GeneratorFunction"
243
+ );
244
+
245
+ // Helper for defining the .next, .throw, and .return methods of the
246
+ // Iterator interface in terms of a single ._invoke method.
247
+ function defineIteratorMethods(prototype) {
248
+ ["next", "throw", "return"].forEach(function(method) {
249
+ define(prototype, method, function(arg) {
250
+ return this._invoke(method, arg);
251
+ });
252
+ });
253
+ }
254
+
255
+ exports.isGeneratorFunction = function(genFun) {
256
+ var ctor = typeof genFun === "function" && genFun.constructor;
257
+ return ctor
258
+ ? ctor === GeneratorFunction ||
259
+ // For the native GeneratorFunction constructor, the best we can
260
+ // do is to check its .name property.
261
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
262
+ : false;
263
+ };
264
+
265
+ exports.mark = function(genFun) {
266
+ if (Object.setPrototypeOf) {
267
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
268
+ } else {
269
+ genFun.__proto__ = GeneratorFunctionPrototype;
270
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
271
+ }
272
+ genFun.prototype = Object.create(Gp);
273
+ return genFun;
274
+ };
275
+
276
+ // Within the body of any async function, `await x` is transformed to
277
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
278
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
279
+ // meant to be awaited.
280
+ exports.awrap = function(arg) {
281
+ return { __await: arg };
282
+ };
283
+
284
+ function AsyncIterator(generator, PromiseImpl) {
285
+ function invoke(method, arg, resolve, reject) {
286
+ var record = tryCatch(generator[method], generator, arg);
287
+ if (record.type === "throw") {
288
+ reject(record.arg);
289
+ } else {
290
+ var result = record.arg;
291
+ var value = result.value;
292
+ if (value &&
293
+ typeof value === "object" &&
294
+ hasOwn.call(value, "__await")) {
295
+ return PromiseImpl.resolve(value.__await).then(function(value) {
296
+ invoke("next", value, resolve, reject);
297
+ }, function(err) {
298
+ invoke("throw", err, resolve, reject);
299
+ });
300
+ }
301
+
302
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
303
+ // When a yielded Promise is resolved, its final value becomes
304
+ // the .value of the Promise<{value,done}> result for the
305
+ // current iteration.
306
+ result.value = unwrapped;
307
+ resolve(result);
308
+ }, function(error) {
309
+ // If a rejected Promise was yielded, throw the rejection back
310
+ // into the async generator function so it can be handled there.
311
+ return invoke("throw", error, resolve, reject);
312
+ });
313
+ }
314
+ }
315
+
316
+ var previousPromise;
317
+
318
+ function enqueue(method, arg) {
319
+ function callInvokeWithMethodAndArg() {
320
+ return new PromiseImpl(function(resolve, reject) {
321
+ invoke(method, arg, resolve, reject);
322
+ });
323
+ }
324
+
325
+ return previousPromise =
326
+ // If enqueue has been called before, then we want to wait until
327
+ // all previous Promises have been resolved before calling invoke,
328
+ // so that results are always delivered in the correct order. If
329
+ // enqueue has not been called before, then it is important to
330
+ // call invoke immediately, without waiting on a callback to fire,
331
+ // so that the async generator function has the opportunity to do
332
+ // any necessary setup in a predictable way. This predictability
333
+ // is why the Promise constructor synchronously invokes its
334
+ // executor callback, and why async functions synchronously
335
+ // execute code before the first await. Since we implement simple
336
+ // async functions in terms of async generators, it is especially
337
+ // important to get this right, even though it requires care.
338
+ previousPromise ? previousPromise.then(
339
+ callInvokeWithMethodAndArg,
340
+ // Avoid propagating failures to Promises returned by later
341
+ // invocations of the iterator.
342
+ callInvokeWithMethodAndArg
343
+ ) : callInvokeWithMethodAndArg();
344
+ }
345
+
346
+ // Define the unified helper method that is used to implement .next,
347
+ // .throw, and .return (see defineIteratorMethods).
348
+ this._invoke = enqueue;
349
+ }
350
+
351
+ defineIteratorMethods(AsyncIterator.prototype);
352
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
353
+ return this;
354
+ });
355
+ exports.AsyncIterator = AsyncIterator;
356
+
357
+ // Note that simple async functions are implemented on top of
358
+ // AsyncIterator objects; they just return a Promise for the value of
359
+ // the final result produced by the iterator.
360
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
361
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
362
+
363
+ var iter = new AsyncIterator(
364
+ wrap(innerFn, outerFn, self, tryLocsList),
365
+ PromiseImpl
366
+ );
367
+
368
+ return exports.isGeneratorFunction(outerFn)
369
+ ? iter // If outerFn is a generator, return the full iterator.
370
+ : iter.next().then(function(result) {
371
+ return result.done ? result.value : iter.next();
372
+ });
373
+ };
374
+
375
+ function makeInvokeMethod(innerFn, self, context) {
376
+ var state = GenStateSuspendedStart;
377
+
378
+ return function invoke(method, arg) {
379
+ if (state === GenStateExecuting) {
380
+ throw new Error("Generator is already running");
381
+ }
382
+
383
+ if (state === GenStateCompleted) {
384
+ if (method === "throw") {
385
+ throw arg;
386
+ }
387
+
388
+ // Be forgiving, per 25.3.3.3.3 of the spec:
389
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
390
+ return doneResult();
391
+ }
392
+
393
+ context.method = method;
394
+ context.arg = arg;
395
+
396
+ while (true) {
397
+ var delegate = context.delegate;
398
+ if (delegate) {
399
+ var delegateResult = maybeInvokeDelegate(delegate, context);
400
+ if (delegateResult) {
401
+ if (delegateResult === ContinueSentinel) continue;
402
+ return delegateResult;
403
+ }
404
+ }
405
+
406
+ if (context.method === "next") {
407
+ // Setting context._sent for legacy support of Babel's
408
+ // function.sent implementation.
409
+ context.sent = context._sent = context.arg;
410
+
411
+ } else if (context.method === "throw") {
412
+ if (state === GenStateSuspendedStart) {
413
+ state = GenStateCompleted;
414
+ throw context.arg;
415
+ }
416
+
417
+ context.dispatchException(context.arg);
418
+
419
+ } else if (context.method === "return") {
420
+ context.abrupt("return", context.arg);
421
+ }
422
+
423
+ state = GenStateExecuting;
424
+
425
+ var record = tryCatch(innerFn, self, context);
426
+ if (record.type === "normal") {
427
+ // If an exception is thrown from innerFn, we leave state ===
428
+ // GenStateExecuting and loop back for another invocation.
429
+ state = context.done
430
+ ? GenStateCompleted
431
+ : GenStateSuspendedYield;
432
+
433
+ if (record.arg === ContinueSentinel) {
434
+ continue;
435
+ }
436
+
437
+ return {
438
+ value: record.arg,
439
+ done: context.done
440
+ };
441
+
442
+ } else if (record.type === "throw") {
443
+ state = GenStateCompleted;
444
+ // Dispatch the exception by looping back around to the
445
+ // context.dispatchException(context.arg) call above.
446
+ context.method = "throw";
447
+ context.arg = record.arg;
448
+ }
449
+ }
450
+ };
451
+ }
452
+
453
+ // Call delegate.iterator[context.method](context.arg) and handle the
454
+ // result, either by returning a { value, done } result from the
455
+ // delegate iterator, or by modifying context.method and context.arg,
456
+ // setting context.delegate to null, and returning the ContinueSentinel.
457
+ function maybeInvokeDelegate(delegate, context) {
458
+ var method = delegate.iterator[context.method];
459
+ if (method === undefined$1) {
460
+ // A .throw or .return when the delegate iterator has no .throw
461
+ // method always terminates the yield* loop.
462
+ context.delegate = null;
463
+
464
+ if (context.method === "throw") {
465
+ // Note: ["return"] must be used for ES3 parsing compatibility.
466
+ if (delegate.iterator["return"]) {
467
+ // If the delegate iterator has a return method, give it a
468
+ // chance to clean up.
469
+ context.method = "return";
470
+ context.arg = undefined$1;
471
+ maybeInvokeDelegate(delegate, context);
472
+
473
+ if (context.method === "throw") {
474
+ // If maybeInvokeDelegate(context) changed context.method from
475
+ // "return" to "throw", let that override the TypeError below.
476
+ return ContinueSentinel;
477
+ }
478
+ }
479
+
480
+ context.method = "throw";
481
+ context.arg = new TypeError(
482
+ "The iterator does not provide a 'throw' method");
483
+ }
484
+
485
+ return ContinueSentinel;
486
+ }
487
+
488
+ var record = tryCatch(method, delegate.iterator, context.arg);
489
+
490
+ if (record.type === "throw") {
491
+ context.method = "throw";
492
+ context.arg = record.arg;
493
+ context.delegate = null;
494
+ return ContinueSentinel;
495
+ }
496
+
497
+ var info = record.arg;
498
+
499
+ if (! info) {
500
+ context.method = "throw";
501
+ context.arg = new TypeError("iterator result is not an object");
502
+ context.delegate = null;
503
+ return ContinueSentinel;
504
+ }
505
+
506
+ if (info.done) {
507
+ // Assign the result of the finished delegate to the temporary
508
+ // variable specified by delegate.resultName (see delegateYield).
509
+ context[delegate.resultName] = info.value;
510
+
511
+ // Resume execution at the desired location (see delegateYield).
512
+ context.next = delegate.nextLoc;
513
+
514
+ // If context.method was "throw" but the delegate handled the
515
+ // exception, let the outer generator proceed normally. If
516
+ // context.method was "next", forget context.arg since it has been
517
+ // "consumed" by the delegate iterator. If context.method was
518
+ // "return", allow the original .return call to continue in the
519
+ // outer generator.
520
+ if (context.method !== "return") {
521
+ context.method = "next";
522
+ context.arg = undefined$1;
523
+ }
524
+
525
+ } else {
526
+ // Re-yield the result returned by the delegate method.
527
+ return info;
528
+ }
529
+
530
+ // The delegate iterator is finished, so forget it and continue with
531
+ // the outer generator.
532
+ context.delegate = null;
533
+ return ContinueSentinel;
534
+ }
535
+
536
+ // Define Generator.prototype.{next,throw,return} in terms of the
537
+ // unified ._invoke helper method.
538
+ defineIteratorMethods(Gp);
539
+
540
+ define(Gp, toStringTagSymbol, "Generator");
541
+
542
+ // A Generator should always return itself as the iterator object when the
543
+ // @@iterator function is called on it. Some browsers' implementations of the
544
+ // iterator prototype chain incorrectly implement this, causing the Generator
545
+ // object to not be returned from this call. This ensures that doesn't happen.
546
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
547
+ define(Gp, iteratorSymbol, function() {
548
+ return this;
549
+ });
550
+
551
+ define(Gp, "toString", function() {
552
+ return "[object Generator]";
553
+ });
554
+
555
+ function pushTryEntry(locs) {
556
+ var entry = { tryLoc: locs[0] };
557
+
558
+ if (1 in locs) {
559
+ entry.catchLoc = locs[1];
560
+ }
561
+
562
+ if (2 in locs) {
563
+ entry.finallyLoc = locs[2];
564
+ entry.afterLoc = locs[3];
565
+ }
566
+
567
+ this.tryEntries.push(entry);
568
+ }
569
+
570
+ function resetTryEntry(entry) {
571
+ var record = entry.completion || {};
572
+ record.type = "normal";
573
+ delete record.arg;
574
+ entry.completion = record;
575
+ }
576
+
577
+ function Context(tryLocsList) {
578
+ // The root entry object (effectively a try statement without a catch
579
+ // or a finally block) gives us a place to store values thrown from
580
+ // locations where there is no enclosing try statement.
581
+ this.tryEntries = [{ tryLoc: "root" }];
582
+ tryLocsList.forEach(pushTryEntry, this);
583
+ this.reset(true);
584
+ }
585
+
586
+ exports.keys = function(object) {
587
+ var keys = [];
588
+ for (var key in object) {
589
+ keys.push(key);
590
+ }
591
+ keys.reverse();
592
+
593
+ // Rather than returning an object with a next method, we keep
594
+ // things simple and return the next function itself.
595
+ return function next() {
596
+ while (keys.length) {
597
+ var key = keys.pop();
598
+ if (key in object) {
599
+ next.value = key;
600
+ next.done = false;
601
+ return next;
602
+ }
603
+ }
604
+
605
+ // To avoid creating an additional object, we just hang the .value
606
+ // and .done properties off the next function object itself. This
607
+ // also ensures that the minifier will not anonymize the function.
608
+ next.done = true;
609
+ return next;
610
+ };
611
+ };
612
+
613
+ function values(iterable) {
614
+ if (iterable) {
615
+ var iteratorMethod = iterable[iteratorSymbol];
616
+ if (iteratorMethod) {
617
+ return iteratorMethod.call(iterable);
618
+ }
619
+
620
+ if (typeof iterable.next === "function") {
621
+ return iterable;
622
+ }
623
+
624
+ if (!isNaN(iterable.length)) {
625
+ var i = -1, next = function next() {
626
+ while (++i < iterable.length) {
627
+ if (hasOwn.call(iterable, i)) {
628
+ next.value = iterable[i];
629
+ next.done = false;
630
+ return next;
631
+ }
632
+ }
633
+
634
+ next.value = undefined$1;
635
+ next.done = true;
636
+
637
+ return next;
638
+ };
639
+
640
+ return next.next = next;
641
+ }
642
+ }
643
+
644
+ // Return an iterator with no values.
645
+ return { next: doneResult };
646
+ }
647
+ exports.values = values;
648
+
649
+ function doneResult() {
650
+ return { value: undefined$1, done: true };
651
+ }
652
+
653
+ Context.prototype = {
654
+ constructor: Context,
655
+
656
+ reset: function(skipTempReset) {
657
+ this.prev = 0;
658
+ this.next = 0;
659
+ // Resetting context._sent for legacy support of Babel's
660
+ // function.sent implementation.
661
+ this.sent = this._sent = undefined$1;
662
+ this.done = false;
663
+ this.delegate = null;
664
+
665
+ this.method = "next";
666
+ this.arg = undefined$1;
667
+
668
+ this.tryEntries.forEach(resetTryEntry);
669
+
670
+ if (!skipTempReset) {
671
+ for (var name in this) {
672
+ // Not sure about the optimal order of these conditions:
673
+ if (name.charAt(0) === "t" &&
674
+ hasOwn.call(this, name) &&
675
+ !isNaN(+name.slice(1))) {
676
+ this[name] = undefined$1;
677
+ }
678
+ }
679
+ }
680
+ },
681
+
682
+ stop: function() {
683
+ this.done = true;
684
+
685
+ var rootEntry = this.tryEntries[0];
686
+ var rootRecord = rootEntry.completion;
687
+ if (rootRecord.type === "throw") {
688
+ throw rootRecord.arg;
689
+ }
690
+
691
+ return this.rval;
692
+ },
693
+
694
+ dispatchException: function(exception) {
695
+ if (this.done) {
696
+ throw exception;
697
+ }
698
+
699
+ var context = this;
700
+ function handle(loc, caught) {
701
+ record.type = "throw";
702
+ record.arg = exception;
703
+ context.next = loc;
704
+
705
+ if (caught) {
706
+ // If the dispatched exception was caught by a catch block,
707
+ // then let that catch block handle the exception normally.
708
+ context.method = "next";
709
+ context.arg = undefined$1;
710
+ }
711
+
712
+ return !! caught;
713
+ }
714
+
715
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
716
+ var entry = this.tryEntries[i];
717
+ var record = entry.completion;
718
+
719
+ if (entry.tryLoc === "root") {
720
+ // Exception thrown outside of any try block that could handle
721
+ // it, so set the completion value of the entire function to
722
+ // throw the exception.
723
+ return handle("end");
724
+ }
725
+
726
+ if (entry.tryLoc <= this.prev) {
727
+ var hasCatch = hasOwn.call(entry, "catchLoc");
728
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
729
+
730
+ if (hasCatch && hasFinally) {
731
+ if (this.prev < entry.catchLoc) {
732
+ return handle(entry.catchLoc, true);
733
+ } else if (this.prev < entry.finallyLoc) {
734
+ return handle(entry.finallyLoc);
735
+ }
736
+
737
+ } else if (hasCatch) {
738
+ if (this.prev < entry.catchLoc) {
739
+ return handle(entry.catchLoc, true);
740
+ }
741
+
742
+ } else if (hasFinally) {
743
+ if (this.prev < entry.finallyLoc) {
744
+ return handle(entry.finallyLoc);
745
+ }
746
+
747
+ } else {
748
+ throw new Error("try statement without catch or finally");
749
+ }
750
+ }
751
+ }
752
+ },
753
+
754
+ abrupt: function(type, arg) {
755
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
756
+ var entry = this.tryEntries[i];
757
+ if (entry.tryLoc <= this.prev &&
758
+ hasOwn.call(entry, "finallyLoc") &&
759
+ this.prev < entry.finallyLoc) {
760
+ var finallyEntry = entry;
761
+ break;
762
+ }
763
+ }
764
+
765
+ if (finallyEntry &&
766
+ (type === "break" ||
767
+ type === "continue") &&
768
+ finallyEntry.tryLoc <= arg &&
769
+ arg <= finallyEntry.finallyLoc) {
770
+ // Ignore the finally entry if control is not jumping to a
771
+ // location outside the try/catch block.
772
+ finallyEntry = null;
773
+ }
774
+
775
+ var record = finallyEntry ? finallyEntry.completion : {};
776
+ record.type = type;
777
+ record.arg = arg;
778
+
779
+ if (finallyEntry) {
780
+ this.method = "next";
781
+ this.next = finallyEntry.finallyLoc;
782
+ return ContinueSentinel;
783
+ }
784
+
785
+ return this.complete(record);
786
+ },
787
+
788
+ complete: function(record, afterLoc) {
789
+ if (record.type === "throw") {
790
+ throw record.arg;
791
+ }
792
+
793
+ if (record.type === "break" ||
794
+ record.type === "continue") {
795
+ this.next = record.arg;
796
+ } else if (record.type === "return") {
797
+ this.rval = this.arg = record.arg;
798
+ this.method = "return";
799
+ this.next = "end";
800
+ } else if (record.type === "normal" && afterLoc) {
801
+ this.next = afterLoc;
802
+ }
803
+
804
+ return ContinueSentinel;
805
+ },
806
+
807
+ finish: function(finallyLoc) {
808
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
809
+ var entry = this.tryEntries[i];
810
+ if (entry.finallyLoc === finallyLoc) {
811
+ this.complete(entry.completion, entry.afterLoc);
812
+ resetTryEntry(entry);
813
+ return ContinueSentinel;
814
+ }
815
+ }
816
+ },
817
+
818
+ "catch": function(tryLoc) {
819
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
820
+ var entry = this.tryEntries[i];
821
+ if (entry.tryLoc === tryLoc) {
822
+ var record = entry.completion;
823
+ if (record.type === "throw") {
824
+ var thrown = record.arg;
825
+ resetTryEntry(entry);
826
+ }
827
+ return thrown;
828
+ }
829
+ }
830
+
831
+ // The context.catch method must only be called with a location
832
+ // argument that corresponds to a known catch block.
833
+ throw new Error("illegal catch attempt");
834
+ },
835
+
836
+ delegateYield: function(iterable, resultName, nextLoc) {
837
+ this.delegate = {
838
+ iterator: values(iterable),
839
+ resultName: resultName,
840
+ nextLoc: nextLoc
841
+ };
842
+
843
+ if (this.method === "next") {
844
+ // Deliberately forget the last sent value so that we don't
845
+ // accidentally pass it on to the delegate.
846
+ this.arg = undefined$1;
847
+ }
848
+
849
+ return ContinueSentinel;
850
+ }
851
+ };
852
+
853
+ // Regardless of whether this script is executing as a CommonJS module
854
+ // or not, return the runtime object so that we can declare the variable
855
+ // regeneratorRuntime in the outer scope, which allows this module to be
856
+ // injected easily by `bin/regenerator --include-runtime script.js`.
857
+ return exports;
858
+
859
+ }(
860
+ // If this script is executing as a CommonJS module, use module.exports
861
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
862
+ // object. Either way, the resulting object will be used to initialize
863
+ // the regeneratorRuntime variable at the top of this file.
864
+ module.exports
865
+ ));
866
+
867
+ try {
868
+ regeneratorRuntime = runtime;
869
+ } catch (accidentalStrictMode) {
870
+ // This module should not be running in strict mode, so the above
871
+ // assignment should always work unless something is misconfigured. Just
872
+ // in case runtime.js accidentally runs in strict mode, in modern engines
873
+ // we can explicitly access globalThis. In older engines we can escape
874
+ // strict mode using a global Function call. This could conceivably fail
875
+ // if a Content Security Policy forbids using Function, but in that case
876
+ // the proper solution is to fix the accidental strict mode problem. If
877
+ // you've misconfigured your bundler to force strict mode and applied a
878
+ // CSP to forbid Function, and you're not willing to fix either of those
879
+ // problems, please detail your unique predicament in a GitHub issue.
880
+ if (typeof globalThis === "object") {
881
+ globalThis.regeneratorRuntime = runtime;
882
+ } else {
883
+ Function("r", "regeneratorRuntime = r")(runtime);
884
+ }
885
+ }
886
+ });
887
+
888
+ var regenerator = runtime_1;
889
+
890
+ var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
891
+
892
+ Object.defineProperty(exports, "__esModule", {
893
+ value: true
894
+ });
895
+ exports["default"] = void 0;
896
+ var optionsDefaults = {
897
+ attributeNames: {
898
+ styleName: 'className'
899
+ },
900
+ generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
901
+ handleMissingStyleName: 'throw'
902
+ };
903
+ var _default = optionsDefaults;
904
+ exports["default"] = _default;
905
+
906
+
907
+ });
908
+
909
+ var getClassName = createCommonjsModule(function (module, exports) {
910
+
911
+ Object.defineProperty(exports, "__esModule", {
912
+ value: true
913
+ });
914
+ exports["default"] = void 0;
915
+
916
+ var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
917
+
918
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
919
+
920
+ var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
921
+ return styleName.indexOf('.') !== -1;
922
+ };
923
+
924
+ var handleError = function handleError(message, handleMissingStyleName) {
925
+ if (handleMissingStyleName === 'throw') {
926
+ throw new Error(message);
927
+ } else if (handleMissingStyleName === 'warn') {
928
+ // eslint-disable-next-line no-console
929
+ console.warn(message);
930
+ }
931
+
932
+ return null;
933
+ };
934
+
935
+ var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
936
+ // Note:
937
+ // Do not use the desctructing syntax with Babel.
938
+ // Desctructing adds _slicedToArray helper.
939
+ var styleNameParts = styleName.split('.');
940
+ var importName = styleNameParts[0];
941
+ var moduleName = styleNameParts[1];
942
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
943
+
944
+ if (!moduleName) {
945
+ return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
946
+ }
947
+
948
+ if (!styleModuleImportMap[importName]) {
949
+ return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
950
+ }
951
+
952
+ if (!styleModuleImportMap[importName][moduleName]) {
953
+ return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
954
+ }
955
+
956
+ return styleModuleImportMap[importName][moduleName];
957
+ };
958
+
959
+ var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
960
+ var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
961
+ var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
962
+ return styleModuleImportMap[importKey][styleName] && importKey;
963
+ }).filter(function (importKey) {
964
+ return importKey;
965
+ });
966
+
967
+ if (importKeysWithMatches.length > 1) {
968
+ 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');
969
+ }
970
+
971
+ if (importKeysWithMatches.length === 0) {
972
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
973
+ }
974
+
975
+ return styleModuleImportMap[importKeysWithMatches[0]][styleName];
976
+ };
977
+
978
+ var _default = function _default(styleNameValue, styleModuleImportMap, options) {
979
+ var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
980
+
981
+ var _ref = options || {},
982
+ _ref$handleMissingSty = _ref.handleMissingStyleName,
983
+ handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
984
+ _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
985
+ autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
986
+
987
+ if (!styleNameValue) {
988
+ return '';
989
+ }
990
+
991
+ return styleNameValue.split(' ').filter(function (styleName) {
992
+ return styleName;
993
+ }).map(function (styleName) {
994
+ if (isNamespacedStyleName(styleName)) {
995
+ return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
996
+ }
997
+
998
+ if (styleModuleImportMapKeys.length === 0) {
999
+ throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
1000
+ }
1001
+
1002
+ if (styleModuleImportMapKeys.length > 1) {
1003
+ if (!autoResolveMultipleImports) {
1004
+ throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
1005
+ }
1006
+
1007
+ return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
1008
+ }
1009
+
1010
+ var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
1011
+
1012
+ if (!styleModuleMap[styleName]) {
1013
+ return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
1014
+ }
1015
+
1016
+ return styleModuleMap[styleName];
1017
+ }).filter(function (className) {
1018
+ // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
1019
+ return className;
1020
+ }).join(' ');
1021
+ };
1022
+
1023
+ exports["default"] = _default;
1024
+
1025
+
1026
+ });
1027
+
1028
+ var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
1029
+
1030
+ /**
1031
+ * Checks if `value` is classified as an `Array` object.
1032
+ *
1033
+ * @static
1034
+ * @memberOf _
1035
+ * @since 0.1.0
1036
+ * @category Lang
1037
+ * @param {*} value The value to check.
1038
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1039
+ * @example
1040
+ *
1041
+ * _.isArray([1, 2, 3]);
1042
+ * // => true
1043
+ *
1044
+ * _.isArray(document.body.children);
1045
+ * // => false
1046
+ *
1047
+ * _.isArray('abc');
1048
+ * // => false
1049
+ *
1050
+ * _.isArray(_.noop);
1051
+ * // => false
1052
+ */
1053
+ var isArray = Array.isArray;
1054
+
1055
+ var isArray_1 = isArray;
1056
+
1057
+ /** Detect free variable `global` from Node.js. */
1058
+
1059
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
1060
+
1061
+ var _freeGlobal = freeGlobal;
1062
+
1063
+ /** Detect free variable `self`. */
1064
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
1065
+
1066
+ /** Used as a reference to the global object. */
1067
+ var root = _freeGlobal || freeSelf || Function('return this')();
1068
+
1069
+ var _root = root;
1070
+
1071
+ /** Built-in value references. */
1072
+ var Symbol$1 = _root.Symbol;
1073
+
1074
+ var _Symbol = Symbol$1;
1075
+
1076
+ /** Used for built-in method references. */
1077
+ var objectProto$4 = Object.prototype;
1078
+
1079
+ /** Used to check objects for own properties. */
1080
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1081
+
1082
+ /**
1083
+ * Used to resolve the
1084
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1085
+ * of values.
1086
+ */
1087
+ var nativeObjectToString$1 = objectProto$4.toString;
1088
+
1089
+ /** Built-in value references. */
1090
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
1091
+
1092
+ /**
1093
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
1094
+ *
1095
+ * @private
1096
+ * @param {*} value The value to query.
1097
+ * @returns {string} Returns the raw `toStringTag`.
1098
+ */
1099
+ function getRawTag(value) {
1100
+ var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
1101
+ tag = value[symToStringTag$1];
1102
+
1103
+ try {
1104
+ value[symToStringTag$1] = undefined;
1105
+ var unmasked = true;
1106
+ } catch (e) {}
1107
+
1108
+ var result = nativeObjectToString$1.call(value);
1109
+ if (unmasked) {
1110
+ if (isOwn) {
1111
+ value[symToStringTag$1] = tag;
1112
+ } else {
1113
+ delete value[symToStringTag$1];
1114
+ }
1115
+ }
1116
+ return result;
1117
+ }
1118
+
1119
+ var _getRawTag = getRawTag;
1120
+
1121
+ /** Used for built-in method references. */
1122
+ var objectProto$3 = Object.prototype;
1123
+
1124
+ /**
1125
+ * Used to resolve the
1126
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1127
+ * of values.
1128
+ */
1129
+ var nativeObjectToString = objectProto$3.toString;
1130
+
1131
+ /**
1132
+ * Converts `value` to a string using `Object.prototype.toString`.
1133
+ *
1134
+ * @private
1135
+ * @param {*} value The value to convert.
1136
+ * @returns {string} Returns the converted string.
1137
+ */
1138
+ function objectToString(value) {
1139
+ return nativeObjectToString.call(value);
1140
+ }
1141
+
1142
+ var _objectToString = objectToString;
1143
+
1144
+ /** `Object#toString` result references. */
1145
+ var nullTag = '[object Null]',
1146
+ undefinedTag = '[object Undefined]';
1147
+
1148
+ /** Built-in value references. */
1149
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
1150
+
1151
+ /**
1152
+ * The base implementation of `getTag` without fallbacks for buggy environments.
1153
+ *
1154
+ * @private
1155
+ * @param {*} value The value to query.
1156
+ * @returns {string} Returns the `toStringTag`.
1157
+ */
1158
+ function baseGetTag(value) {
1159
+ if (value == null) {
1160
+ return value === undefined ? undefinedTag : nullTag;
1161
+ }
1162
+ return (symToStringTag && symToStringTag in Object(value))
1163
+ ? _getRawTag(value)
1164
+ : _objectToString(value);
1165
+ }
1166
+
1167
+ var _baseGetTag = baseGetTag;
1168
+
1169
+ /**
1170
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1171
+ * and has a `typeof` result of "object".
1172
+ *
1173
+ * @static
1174
+ * @memberOf _
1175
+ * @since 4.0.0
1176
+ * @category Lang
1177
+ * @param {*} value The value to check.
1178
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1179
+ * @example
1180
+ *
1181
+ * _.isObjectLike({});
1182
+ * // => true
1183
+ *
1184
+ * _.isObjectLike([1, 2, 3]);
1185
+ * // => true
1186
+ *
1187
+ * _.isObjectLike(_.noop);
1188
+ * // => false
1189
+ *
1190
+ * _.isObjectLike(null);
1191
+ * // => false
1192
+ */
1193
+ function isObjectLike(value) {
1194
+ return value != null && typeof value == 'object';
1195
+ }
1196
+
1197
+ var isObjectLike_1 = isObjectLike;
1198
+
1199
+ /** `Object#toString` result references. */
1200
+ var symbolTag = '[object Symbol]';
1201
+
1202
+ /**
1203
+ * Checks if `value` is classified as a `Symbol` primitive or object.
1204
+ *
1205
+ * @static
1206
+ * @memberOf _
1207
+ * @since 4.0.0
1208
+ * @category Lang
1209
+ * @param {*} value The value to check.
1210
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
1211
+ * @example
1212
+ *
1213
+ * _.isSymbol(Symbol.iterator);
1214
+ * // => true
1215
+ *
1216
+ * _.isSymbol('abc');
1217
+ * // => false
1218
+ */
1219
+ function isSymbol(value) {
1220
+ return typeof value == 'symbol' ||
1221
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
1222
+ }
1223
+
1224
+ var isSymbol_1 = isSymbol;
1225
+
1226
+ /** Used to match property names within property paths. */
1227
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1228
+ reIsPlainProp = /^\w*$/;
1229
+
1230
+ /**
1231
+ * Checks if `value` is a property name and not a property path.
1232
+ *
1233
+ * @private
1234
+ * @param {*} value The value to check.
1235
+ * @param {Object} [object] The object to query keys on.
1236
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1237
+ */
1238
+ function isKey(value, object) {
1239
+ if (isArray_1(value)) {
1240
+ return false;
1241
+ }
1242
+ var type = typeof value;
1243
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
1244
+ value == null || isSymbol_1(value)) {
1245
+ return true;
1246
+ }
1247
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
1248
+ (object != null && value in Object(object));
1249
+ }
1250
+
1251
+ var _isKey = isKey;
1252
+
1253
+ /**
1254
+ * Checks if `value` is the
1255
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1256
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1257
+ *
1258
+ * @static
1259
+ * @memberOf _
1260
+ * @since 0.1.0
1261
+ * @category Lang
1262
+ * @param {*} value The value to check.
1263
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1264
+ * @example
1265
+ *
1266
+ * _.isObject({});
1267
+ * // => true
1268
+ *
1269
+ * _.isObject([1, 2, 3]);
1270
+ * // => true
1271
+ *
1272
+ * _.isObject(_.noop);
1273
+ * // => true
1274
+ *
1275
+ * _.isObject(null);
1276
+ * // => false
1277
+ */
1278
+ function isObject(value) {
1279
+ var type = typeof value;
1280
+ return value != null && (type == 'object' || type == 'function');
1281
+ }
1282
+
1283
+ var isObject_1 = isObject;
1284
+
1285
+ /** `Object#toString` result references. */
1286
+ var asyncTag = '[object AsyncFunction]',
1287
+ funcTag = '[object Function]',
1288
+ genTag = '[object GeneratorFunction]',
1289
+ proxyTag = '[object Proxy]';
1290
+
1291
+ /**
1292
+ * Checks if `value` is classified as a `Function` object.
1293
+ *
1294
+ * @static
1295
+ * @memberOf _
1296
+ * @since 0.1.0
1297
+ * @category Lang
1298
+ * @param {*} value The value to check.
1299
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1300
+ * @example
1301
+ *
1302
+ * _.isFunction(_);
1303
+ * // => true
1304
+ *
1305
+ * _.isFunction(/abc/);
1306
+ * // => false
1307
+ */
1308
+ function isFunction(value) {
1309
+ if (!isObject_1(value)) {
1310
+ return false;
1311
+ }
1312
+ // The use of `Object#toString` avoids issues with the `typeof` operator
1313
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
1314
+ var tag = _baseGetTag(value);
1315
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1316
+ }
1317
+
1318
+ var isFunction_1 = isFunction;
1319
+
1320
+ /** Used to detect overreaching core-js shims. */
1321
+ var coreJsData = _root['__core-js_shared__'];
1322
+
1323
+ var _coreJsData = coreJsData;
1324
+
1325
+ /** Used to detect methods masquerading as native. */
1326
+ var maskSrcKey = (function() {
1327
+ var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
1328
+ return uid ? ('Symbol(src)_1.' + uid) : '';
1329
+ }());
1330
+
1331
+ /**
1332
+ * Checks if `func` has its source masked.
1333
+ *
1334
+ * @private
1335
+ * @param {Function} func The function to check.
1336
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1337
+ */
1338
+ function isMasked(func) {
1339
+ return !!maskSrcKey && (maskSrcKey in func);
1340
+ }
1341
+
1342
+ var _isMasked = isMasked;
1343
+
1344
+ /** Used for built-in method references. */
1345
+ var funcProto$1 = Function.prototype;
1346
+
1347
+ /** Used to resolve the decompiled source of functions. */
1348
+ var funcToString$1 = funcProto$1.toString;
1349
+
1350
+ /**
1351
+ * Converts `func` to its source code.
1352
+ *
1353
+ * @private
1354
+ * @param {Function} func The function to convert.
1355
+ * @returns {string} Returns the source code.
1356
+ */
1357
+ function toSource(func) {
1358
+ if (func != null) {
1359
+ try {
1360
+ return funcToString$1.call(func);
1361
+ } catch (e) {}
1362
+ try {
1363
+ return (func + '');
1364
+ } catch (e) {}
1365
+ }
1366
+ return '';
1367
+ }
1368
+
1369
+ var _toSource = toSource;
1370
+
1371
+ /**
1372
+ * Used to match `RegExp`
1373
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1374
+ */
1375
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1376
+
1377
+ /** Used to detect host constructors (Safari). */
1378
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
1379
+
1380
+ /** Used for built-in method references. */
1381
+ var funcProto = Function.prototype,
1382
+ objectProto$2 = Object.prototype;
1383
+
1384
+ /** Used to resolve the decompiled source of functions. */
1385
+ var funcToString = funcProto.toString;
1386
+
1387
+ /** Used to check objects for own properties. */
1388
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1389
+
1390
+ /** Used to detect if a method is native. */
1391
+ var reIsNative = RegExp('^' +
1392
+ funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
1393
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1394
+ );
1395
+
1396
+ /**
1397
+ * The base implementation of `_.isNative` without bad shim checks.
1398
+ *
1399
+ * @private
1400
+ * @param {*} value The value to check.
1401
+ * @returns {boolean} Returns `true` if `value` is a native function,
1402
+ * else `false`.
1403
+ */
1404
+ function baseIsNative(value) {
1405
+ if (!isObject_1(value) || _isMasked(value)) {
1406
+ return false;
1407
+ }
1408
+ var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
1409
+ return pattern.test(_toSource(value));
1410
+ }
1411
+
1412
+ var _baseIsNative = baseIsNative;
1413
+
1414
+ /**
1415
+ * Gets the value at `key` of `object`.
1416
+ *
1417
+ * @private
1418
+ * @param {Object} [object] The object to query.
1419
+ * @param {string} key The key of the property to get.
1420
+ * @returns {*} Returns the property value.
1421
+ */
1422
+ function getValue(object, key) {
1423
+ return object == null ? undefined : object[key];
1424
+ }
1425
+
1426
+ var _getValue = getValue;
1427
+
1428
+ /**
1429
+ * Gets the native function at `key` of `object`.
1430
+ *
1431
+ * @private
1432
+ * @param {Object} object The object to query.
1433
+ * @param {string} key The key of the method to get.
1434
+ * @returns {*} Returns the function if it's native, else `undefined`.
1435
+ */
1436
+ function getNative(object, key) {
1437
+ var value = _getValue(object, key);
1438
+ return _baseIsNative(value) ? value : undefined;
1439
+ }
1440
+
1441
+ var _getNative = getNative;
1442
+
1443
+ /* Built-in method references that are verified to be native. */
1444
+ var nativeCreate = _getNative(Object, 'create');
1445
+
1446
+ var _nativeCreate = nativeCreate;
1447
+
1448
+ /**
1449
+ * Removes all key-value entries from the hash.
1450
+ *
1451
+ * @private
1452
+ * @name clear
1453
+ * @memberOf Hash
1454
+ */
1455
+ function hashClear() {
1456
+ this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
1457
+ this.size = 0;
1458
+ }
1459
+
1460
+ var _hashClear = hashClear;
1461
+
1462
+ /**
1463
+ * Removes `key` and its value from the hash.
1464
+ *
1465
+ * @private
1466
+ * @name delete
1467
+ * @memberOf Hash
1468
+ * @param {Object} hash The hash to modify.
1469
+ * @param {string} key The key of the value to remove.
1470
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1471
+ */
1472
+ function hashDelete(key) {
1473
+ var result = this.has(key) && delete this.__data__[key];
1474
+ this.size -= result ? 1 : 0;
1475
+ return result;
1476
+ }
1477
+
1478
+ var _hashDelete = hashDelete;
1479
+
1480
+ /** Used to stand-in for `undefined` hash values. */
1481
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1482
+
1483
+ /** Used for built-in method references. */
1484
+ var objectProto$1 = Object.prototype;
1485
+
1486
+ /** Used to check objects for own properties. */
1487
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1488
+
1489
+ /**
1490
+ * Gets the hash value for `key`.
1491
+ *
1492
+ * @private
1493
+ * @name get
1494
+ * @memberOf Hash
1495
+ * @param {string} key The key of the value to get.
1496
+ * @returns {*} Returns the entry value.
1497
+ */
1498
+ function hashGet(key) {
1499
+ var data = this.__data__;
1500
+ if (_nativeCreate) {
1501
+ var result = data[key];
1502
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1503
+ }
1504
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
1505
+ }
1506
+
1507
+ var _hashGet = hashGet;
1508
+
1509
+ /** Used for built-in method references. */
1510
+ var objectProto = Object.prototype;
1511
+
1512
+ /** Used to check objects for own properties. */
1513
+ var hasOwnProperty = objectProto.hasOwnProperty;
1514
+
1515
+ /**
1516
+ * Checks if a hash value for `key` exists.
1517
+ *
1518
+ * @private
1519
+ * @name has
1520
+ * @memberOf Hash
1521
+ * @param {string} key The key of the entry to check.
1522
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1523
+ */
1524
+ function hashHas(key) {
1525
+ var data = this.__data__;
1526
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
1527
+ }
1528
+
1529
+ var _hashHas = hashHas;
1530
+
1531
+ /** Used to stand-in for `undefined` hash values. */
1532
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1533
+
1534
+ /**
1535
+ * Sets the hash `key` to `value`.
1536
+ *
1537
+ * @private
1538
+ * @name set
1539
+ * @memberOf Hash
1540
+ * @param {string} key The key of the value to set.
1541
+ * @param {*} value The value to set.
1542
+ * @returns {Object} Returns the hash instance.
1543
+ */
1544
+ function hashSet(key, value) {
1545
+ var data = this.__data__;
1546
+ this.size += this.has(key) ? 0 : 1;
1547
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1548
+ return this;
1549
+ }
1550
+
1551
+ var _hashSet = hashSet;
1552
+
1553
+ /**
1554
+ * Creates a hash object.
1555
+ *
1556
+ * @private
1557
+ * @constructor
1558
+ * @param {Array} [entries] The key-value pairs to cache.
1559
+ */
1560
+ function Hash(entries) {
1561
+ var index = -1,
1562
+ length = entries == null ? 0 : entries.length;
1563
+
1564
+ this.clear();
1565
+ while (++index < length) {
1566
+ var entry = entries[index];
1567
+ this.set(entry[0], entry[1]);
1568
+ }
1569
+ }
1570
+
1571
+ // Add methods to `Hash`.
1572
+ Hash.prototype.clear = _hashClear;
1573
+ Hash.prototype['delete'] = _hashDelete;
1574
+ Hash.prototype.get = _hashGet;
1575
+ Hash.prototype.has = _hashHas;
1576
+ Hash.prototype.set = _hashSet;
1577
+
1578
+ var _Hash = Hash;
1579
+
1580
+ /**
1581
+ * Removes all key-value entries from the list cache.
1582
+ *
1583
+ * @private
1584
+ * @name clear
1585
+ * @memberOf ListCache
1586
+ */
1587
+ function listCacheClear() {
1588
+ this.__data__ = [];
1589
+ this.size = 0;
1590
+ }
1591
+
1592
+ var _listCacheClear = listCacheClear;
1593
+
1594
+ /**
1595
+ * Performs a
1596
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1597
+ * comparison between two values to determine if they are equivalent.
1598
+ *
1599
+ * @static
1600
+ * @memberOf _
1601
+ * @since 4.0.0
1602
+ * @category Lang
1603
+ * @param {*} value The value to compare.
1604
+ * @param {*} other The other value to compare.
1605
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1606
+ * @example
1607
+ *
1608
+ * var object = { 'a': 1 };
1609
+ * var other = { 'a': 1 };
1610
+ *
1611
+ * _.eq(object, object);
1612
+ * // => true
1613
+ *
1614
+ * _.eq(object, other);
1615
+ * // => false
1616
+ *
1617
+ * _.eq('a', 'a');
1618
+ * // => true
1619
+ *
1620
+ * _.eq('a', Object('a'));
1621
+ * // => false
1622
+ *
1623
+ * _.eq(NaN, NaN);
1624
+ * // => true
1625
+ */
1626
+ function eq(value, other) {
1627
+ return value === other || (value !== value && other !== other);
1628
+ }
1629
+
1630
+ var eq_1 = eq;
1631
+
1632
+ /**
1633
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1634
+ *
1635
+ * @private
1636
+ * @param {Array} array The array to inspect.
1637
+ * @param {*} key The key to search for.
1638
+ * @returns {number} Returns the index of the matched value, else `-1`.
1639
+ */
1640
+ function assocIndexOf(array, key) {
1641
+ var length = array.length;
1642
+ while (length--) {
1643
+ if (eq_1(array[length][0], key)) {
1644
+ return length;
1645
+ }
1646
+ }
1647
+ return -1;
1648
+ }
1649
+
1650
+ var _assocIndexOf = assocIndexOf;
1651
+
1652
+ /** Used for built-in method references. */
1653
+ var arrayProto = Array.prototype;
1654
+
1655
+ /** Built-in value references. */
1656
+ var splice = arrayProto.splice;
1657
+
1658
+ /**
1659
+ * Removes `key` and its value from the list cache.
1660
+ *
1661
+ * @private
1662
+ * @name delete
1663
+ * @memberOf ListCache
1664
+ * @param {string} key The key of the value to remove.
1665
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1666
+ */
1667
+ function listCacheDelete(key) {
1668
+ var data = this.__data__,
1669
+ index = _assocIndexOf(data, key);
1670
+
1671
+ if (index < 0) {
1672
+ return false;
1673
+ }
1674
+ var lastIndex = data.length - 1;
1675
+ if (index == lastIndex) {
1676
+ data.pop();
1677
+ } else {
1678
+ splice.call(data, index, 1);
1679
+ }
1680
+ --this.size;
1681
+ return true;
1682
+ }
1683
+
1684
+ var _listCacheDelete = listCacheDelete;
1685
+
1686
+ /**
1687
+ * Gets the list cache value for `key`.
1688
+ *
1689
+ * @private
1690
+ * @name get
1691
+ * @memberOf ListCache
1692
+ * @param {string} key The key of the value to get.
1693
+ * @returns {*} Returns the entry value.
1694
+ */
1695
+ function listCacheGet(key) {
1696
+ var data = this.__data__,
1697
+ index = _assocIndexOf(data, key);
1698
+
1699
+ return index < 0 ? undefined : data[index][1];
1700
+ }
1701
+
1702
+ var _listCacheGet = listCacheGet;
1703
+
1704
+ /**
1705
+ * Checks if a list cache value for `key` exists.
1706
+ *
1707
+ * @private
1708
+ * @name has
1709
+ * @memberOf ListCache
1710
+ * @param {string} key The key of the entry to check.
1711
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1712
+ */
1713
+ function listCacheHas(key) {
1714
+ return _assocIndexOf(this.__data__, key) > -1;
1715
+ }
1716
+
1717
+ var _listCacheHas = listCacheHas;
1718
+
1719
+ /**
1720
+ * Sets the list cache `key` to `value`.
1721
+ *
1722
+ * @private
1723
+ * @name set
1724
+ * @memberOf ListCache
1725
+ * @param {string} key The key of the value to set.
1726
+ * @param {*} value The value to set.
1727
+ * @returns {Object} Returns the list cache instance.
1728
+ */
1729
+ function listCacheSet(key, value) {
1730
+ var data = this.__data__,
1731
+ index = _assocIndexOf(data, key);
1732
+
1733
+ if (index < 0) {
1734
+ ++this.size;
1735
+ data.push([key, value]);
1736
+ } else {
1737
+ data[index][1] = value;
1738
+ }
1739
+ return this;
1740
+ }
1741
+
1742
+ var _listCacheSet = listCacheSet;
1743
+
1744
+ /**
1745
+ * Creates an list cache object.
1746
+ *
1747
+ * @private
1748
+ * @constructor
1749
+ * @param {Array} [entries] The key-value pairs to cache.
1750
+ */
1751
+ function ListCache(entries) {
1752
+ var index = -1,
1753
+ length = entries == null ? 0 : entries.length;
1754
+
1755
+ this.clear();
1756
+ while (++index < length) {
1757
+ var entry = entries[index];
1758
+ this.set(entry[0], entry[1]);
1759
+ }
1760
+ }
1761
+
1762
+ // Add methods to `ListCache`.
1763
+ ListCache.prototype.clear = _listCacheClear;
1764
+ ListCache.prototype['delete'] = _listCacheDelete;
1765
+ ListCache.prototype.get = _listCacheGet;
1766
+ ListCache.prototype.has = _listCacheHas;
1767
+ ListCache.prototype.set = _listCacheSet;
1768
+
1769
+ var _ListCache = ListCache;
1770
+
1771
+ /* Built-in method references that are verified to be native. */
1772
+ var Map = _getNative(_root, 'Map');
1773
+
1774
+ var _Map = Map;
1775
+
1776
+ /**
1777
+ * Removes all key-value entries from the map.
1778
+ *
1779
+ * @private
1780
+ * @name clear
1781
+ * @memberOf MapCache
1782
+ */
1783
+ function mapCacheClear() {
1784
+ this.size = 0;
1785
+ this.__data__ = {
1786
+ 'hash': new _Hash,
1787
+ 'map': new (_Map || _ListCache),
1788
+ 'string': new _Hash
1789
+ };
1790
+ }
1791
+
1792
+ var _mapCacheClear = mapCacheClear;
1793
+
1794
+ /**
1795
+ * Checks if `value` is suitable for use as unique object key.
1796
+ *
1797
+ * @private
1798
+ * @param {*} value The value to check.
1799
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1800
+ */
1801
+ function isKeyable(value) {
1802
+ var type = typeof value;
1803
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1804
+ ? (value !== '__proto__')
1805
+ : (value === null);
1806
+ }
1807
+
1808
+ var _isKeyable = isKeyable;
1809
+
1810
+ /**
1811
+ * Gets the data for `map`.
1812
+ *
1813
+ * @private
1814
+ * @param {Object} map The map to query.
1815
+ * @param {string} key The reference key.
1816
+ * @returns {*} Returns the map data.
1817
+ */
1818
+ function getMapData(map, key) {
1819
+ var data = map.__data__;
1820
+ return _isKeyable(key)
1821
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1822
+ : data.map;
1823
+ }
1824
+
1825
+ var _getMapData = getMapData;
1826
+
1827
+ /**
1828
+ * Removes `key` and its value from the map.
1829
+ *
1830
+ * @private
1831
+ * @name delete
1832
+ * @memberOf MapCache
1833
+ * @param {string} key The key of the value to remove.
1834
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1835
+ */
1836
+ function mapCacheDelete(key) {
1837
+ var result = _getMapData(this, key)['delete'](key);
1838
+ this.size -= result ? 1 : 0;
1839
+ return result;
1840
+ }
1841
+
1842
+ var _mapCacheDelete = mapCacheDelete;
1843
+
1844
+ /**
1845
+ * Gets the map value for `key`.
1846
+ *
1847
+ * @private
1848
+ * @name get
1849
+ * @memberOf MapCache
1850
+ * @param {string} key The key of the value to get.
1851
+ * @returns {*} Returns the entry value.
1852
+ */
1853
+ function mapCacheGet(key) {
1854
+ return _getMapData(this, key).get(key);
1855
+ }
1856
+
1857
+ var _mapCacheGet = mapCacheGet;
1858
+
1859
+ /**
1860
+ * Checks if a map value for `key` exists.
1861
+ *
1862
+ * @private
1863
+ * @name has
1864
+ * @memberOf MapCache
1865
+ * @param {string} key The key of the entry to check.
1866
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1867
+ */
1868
+ function mapCacheHas(key) {
1869
+ return _getMapData(this, key).has(key);
1870
+ }
1871
+
1872
+ var _mapCacheHas = mapCacheHas;
1873
+
1874
+ /**
1875
+ * Sets the map `key` to `value`.
1876
+ *
1877
+ * @private
1878
+ * @name set
1879
+ * @memberOf MapCache
1880
+ * @param {string} key The key of the value to set.
1881
+ * @param {*} value The value to set.
1882
+ * @returns {Object} Returns the map cache instance.
1883
+ */
1884
+ function mapCacheSet(key, value) {
1885
+ var data = _getMapData(this, key),
1886
+ size = data.size;
1887
+
1888
+ data.set(key, value);
1889
+ this.size += data.size == size ? 0 : 1;
1890
+ return this;
1891
+ }
1892
+
1893
+ var _mapCacheSet = mapCacheSet;
1894
+
1895
+ /**
1896
+ * Creates a map cache object to store key-value pairs.
1897
+ *
1898
+ * @private
1899
+ * @constructor
1900
+ * @param {Array} [entries] The key-value pairs to cache.
1901
+ */
1902
+ function MapCache(entries) {
1903
+ var index = -1,
1904
+ length = entries == null ? 0 : entries.length;
1905
+
1906
+ this.clear();
1907
+ while (++index < length) {
1908
+ var entry = entries[index];
1909
+ this.set(entry[0], entry[1]);
1910
+ }
1911
+ }
1912
+
1913
+ // Add methods to `MapCache`.
1914
+ MapCache.prototype.clear = _mapCacheClear;
1915
+ MapCache.prototype['delete'] = _mapCacheDelete;
1916
+ MapCache.prototype.get = _mapCacheGet;
1917
+ MapCache.prototype.has = _mapCacheHas;
1918
+ MapCache.prototype.set = _mapCacheSet;
1919
+
1920
+ var _MapCache = MapCache;
1921
+
1922
+ /** Error message constants. */
1923
+ var FUNC_ERROR_TEXT = 'Expected a function';
1924
+
1925
+ /**
1926
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1927
+ * provided, it determines the cache key for storing the result based on the
1928
+ * arguments provided to the memoized function. By default, the first argument
1929
+ * provided to the memoized function is used as the map cache key. The `func`
1930
+ * is invoked with the `this` binding of the memoized function.
1931
+ *
1932
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1933
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1934
+ * constructor with one whose instances implement the
1935
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1936
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1937
+ *
1938
+ * @static
1939
+ * @memberOf _
1940
+ * @since 0.1.0
1941
+ * @category Function
1942
+ * @param {Function} func The function to have its output memoized.
1943
+ * @param {Function} [resolver] The function to resolve the cache key.
1944
+ * @returns {Function} Returns the new memoized function.
1945
+ * @example
1946
+ *
1947
+ * var object = { 'a': 1, 'b': 2 };
1948
+ * var other = { 'c': 3, 'd': 4 };
1949
+ *
1950
+ * var values = _.memoize(_.values);
1951
+ * values(object);
1952
+ * // => [1, 2]
1953
+ *
1954
+ * values(other);
1955
+ * // => [3, 4]
1956
+ *
1957
+ * object.a = 2;
1958
+ * values(object);
1959
+ * // => [1, 2]
1960
+ *
1961
+ * // Modify the result cache.
1962
+ * values.cache.set(object, ['a', 'b']);
1963
+ * values(object);
1964
+ * // => ['a', 'b']
1965
+ *
1966
+ * // Replace `_.memoize.Cache`.
1967
+ * _.memoize.Cache = WeakMap;
1968
+ */
1969
+ function memoize(func, resolver) {
1970
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1971
+ throw new TypeError(FUNC_ERROR_TEXT);
1972
+ }
1973
+ var memoized = function() {
1974
+ var args = arguments,
1975
+ key = resolver ? resolver.apply(this, args) : args[0],
1976
+ cache = memoized.cache;
1977
+
1978
+ if (cache.has(key)) {
1979
+ return cache.get(key);
1980
+ }
1981
+ var result = func.apply(this, args);
1982
+ memoized.cache = cache.set(key, result) || cache;
1983
+ return result;
1984
+ };
1985
+ memoized.cache = new (memoize.Cache || _MapCache);
1986
+ return memoized;
1987
+ }
1988
+
1989
+ // Expose `MapCache`.
1990
+ memoize.Cache = _MapCache;
1991
+
1992
+ var memoize_1 = memoize;
1993
+
1994
+ /** Used as the maximum memoize cache size. */
1995
+ var MAX_MEMOIZE_SIZE = 500;
1996
+
1997
+ /**
1998
+ * A specialized version of `_.memoize` which clears the memoized function's
1999
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
2000
+ *
2001
+ * @private
2002
+ * @param {Function} func The function to have its output memoized.
2003
+ * @returns {Function} Returns the new memoized function.
2004
+ */
2005
+ function memoizeCapped(func) {
2006
+ var result = memoize_1(func, function(key) {
2007
+ if (cache.size === MAX_MEMOIZE_SIZE) {
2008
+ cache.clear();
2009
+ }
2010
+ return key;
2011
+ });
2012
+
2013
+ var cache = result.cache;
2014
+ return result;
2015
+ }
2016
+
2017
+ var _memoizeCapped = memoizeCapped;
2018
+
2019
+ /** Used to match property names within property paths. */
2020
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2021
+
2022
+ /** Used to match backslashes in property paths. */
2023
+ var reEscapeChar = /\\(\\)?/g;
2024
+
2025
+ /**
2026
+ * Converts `string` to a property path array.
2027
+ *
2028
+ * @private
2029
+ * @param {string} string The string to convert.
2030
+ * @returns {Array} Returns the property path array.
2031
+ */
2032
+ var stringToPath = _memoizeCapped(function(string) {
2033
+ var result = [];
2034
+ if (string.charCodeAt(0) === 46 /* . */) {
2035
+ result.push('');
2036
+ }
2037
+ string.replace(rePropName, function(match, number, quote, subString) {
2038
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
2039
+ });
2040
+ return result;
2041
+ });
2042
+
2043
+ var _stringToPath = stringToPath;
2044
+
2045
+ /**
2046
+ * A specialized version of `_.map` for arrays without support for iteratee
2047
+ * shorthands.
2048
+ *
2049
+ * @private
2050
+ * @param {Array} [array] The array to iterate over.
2051
+ * @param {Function} iteratee The function invoked per iteration.
2052
+ * @returns {Array} Returns the new mapped array.
2053
+ */
2054
+ function arrayMap(array, iteratee) {
2055
+ var index = -1,
2056
+ length = array == null ? 0 : array.length,
2057
+ result = Array(length);
2058
+
2059
+ while (++index < length) {
2060
+ result[index] = iteratee(array[index], index, array);
2061
+ }
2062
+ return result;
2063
+ }
2064
+
2065
+ var _arrayMap = arrayMap;
2066
+
2067
+ /** Used as references for various `Number` constants. */
2068
+ var INFINITY$1 = 1 / 0;
2069
+
2070
+ /** Used to convert symbols to primitives and strings. */
2071
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
2072
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
2073
+
2074
+ /**
2075
+ * The base implementation of `_.toString` which doesn't convert nullish
2076
+ * values to empty strings.
2077
+ *
2078
+ * @private
2079
+ * @param {*} value The value to process.
2080
+ * @returns {string} Returns the string.
2081
+ */
2082
+ function baseToString(value) {
2083
+ // Exit early for strings to avoid a performance hit in some environments.
2084
+ if (typeof value == 'string') {
2085
+ return value;
2086
+ }
2087
+ if (isArray_1(value)) {
2088
+ // Recursively convert values (susceptible to call stack limits).
2089
+ return _arrayMap(value, baseToString) + '';
2090
+ }
2091
+ if (isSymbol_1(value)) {
2092
+ return symbolToString ? symbolToString.call(value) : '';
2093
+ }
2094
+ var result = (value + '');
2095
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
2096
+ }
2097
+
2098
+ var _baseToString = baseToString;
2099
+
2100
+ /**
2101
+ * Converts `value` to a string. An empty string is returned for `null`
2102
+ * and `undefined` values. The sign of `-0` is preserved.
2103
+ *
2104
+ * @static
2105
+ * @memberOf _
2106
+ * @since 4.0.0
2107
+ * @category Lang
2108
+ * @param {*} value The value to convert.
2109
+ * @returns {string} Returns the converted string.
2110
+ * @example
2111
+ *
2112
+ * _.toString(null);
2113
+ * // => ''
2114
+ *
2115
+ * _.toString(-0);
2116
+ * // => '-0'
2117
+ *
2118
+ * _.toString([1, 2, 3]);
2119
+ * // => '1,2,3'
2120
+ */
2121
+ function toString(value) {
2122
+ return value == null ? '' : _baseToString(value);
2123
+ }
2124
+
2125
+ var toString_1 = toString;
2126
+
2127
+ /**
2128
+ * Casts `value` to a path array if it's not one.
2129
+ *
2130
+ * @private
2131
+ * @param {*} value The value to inspect.
2132
+ * @param {Object} [object] The object to query keys on.
2133
+ * @returns {Array} Returns the cast property path array.
2134
+ */
2135
+ function castPath(value, object) {
2136
+ if (isArray_1(value)) {
2137
+ return value;
2138
+ }
2139
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
2140
+ }
2141
+
2142
+ var _castPath = castPath;
2143
+
2144
+ /** Used as references for various `Number` constants. */
2145
+ var INFINITY = 1 / 0;
2146
+
2147
+ /**
2148
+ * Converts `value` to a string key if it's not a string or symbol.
2149
+ *
2150
+ * @private
2151
+ * @param {*} value The value to inspect.
2152
+ * @returns {string|symbol} Returns the key.
2153
+ */
2154
+ function toKey(value) {
2155
+ if (typeof value == 'string' || isSymbol_1(value)) {
2156
+ return value;
2157
+ }
2158
+ var result = (value + '');
2159
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2160
+ }
2161
+
2162
+ var _toKey = toKey;
2163
+
2164
+ /**
2165
+ * The base implementation of `_.get` without support for default values.
2166
+ *
2167
+ * @private
2168
+ * @param {Object} object The object to query.
2169
+ * @param {Array|string} path The path of the property to get.
2170
+ * @returns {*} Returns the resolved value.
2171
+ */
2172
+ function baseGet(object, path) {
2173
+ path = _castPath(path, object);
2174
+
2175
+ var index = 0,
2176
+ length = path.length;
2177
+
2178
+ while (object != null && index < length) {
2179
+ object = object[_toKey(path[index++])];
2180
+ }
2181
+ return (index && index == length) ? object : undefined;
2182
+ }
2183
+
2184
+ var _baseGet = baseGet;
2185
+
2186
+ /**
2187
+ * Gets the value at `path` of `object`. If the resolved value is
2188
+ * `undefined`, the `defaultValue` is returned in its place.
2189
+ *
2190
+ * @static
2191
+ * @memberOf _
2192
+ * @since 3.7.0
2193
+ * @category Object
2194
+ * @param {Object} object The object to query.
2195
+ * @param {Array|string} path The path of the property to get.
2196
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
2197
+ * @returns {*} Returns the resolved value.
2198
+ * @example
2199
+ *
2200
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2201
+ *
2202
+ * _.get(object, 'a[0].b.c');
2203
+ * // => 3
2204
+ *
2205
+ * _.get(object, ['a', '0', 'b', 'c']);
2206
+ * // => 3
2207
+ *
2208
+ * _.get(object, 'a.b.c', 'default');
2209
+ * // => 'default'
2210
+ */
2211
+ function get(object, path, defaultValue) {
2212
+ var result = object == null ? undefined : _baseGet(object, path);
2213
+ return result === undefined ? defaultValue : result;
2214
+ }
2215
+
2216
+ var get_1 = get;
2217
+
2218
+ var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
2219
+
2220
+ var StateProvider = function StateProvider(RowComponent) {
2221
+ return function (props) {
2222
+ return (
2223
+ /*#__PURE__*/
2224
+ // eslint-disable-next-line react/prop-types
2225
+ React.createElement(StateContext.Provider, {
2226
+ value: props.config
2227
+ }, /*#__PURE__*/React.createElement(RowComponent, props))
2228
+ );
2229
+ };
2230
+ };
2231
+ var useStateValue = function useStateValue() {
2232
+ return useContext(StateContext);
2233
+ };
2234
+
2235
+ function _typeof(obj) {
2236
+ "@babel/helpers - typeof";
2237
+
2238
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2239
+ return typeof obj;
2240
+ } : function (obj) {
2241
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2242
+ }, _typeof(obj);
2243
+ }
2244
+
2245
+ /**
2246
+ * A specialized version of `_.reduce` for arrays without support for
2247
+ * iteratee shorthands.
2248
+ *
2249
+ * @private
2250
+ * @param {Array} [array] The array to iterate over.
2251
+ * @param {Function} iteratee The function invoked per iteration.
2252
+ * @param {*} [accumulator] The initial value.
2253
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
2254
+ * the initial value.
2255
+ * @returns {*} Returns the accumulated value.
2256
+ */
2257
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
2258
+ var index = -1,
2259
+ length = array == null ? 0 : array.length;
2260
+
2261
+ if (initAccum && length) {
2262
+ accumulator = array[++index];
2263
+ }
2264
+ while (++index < length) {
2265
+ accumulator = iteratee(accumulator, array[index], index, array);
2266
+ }
2267
+ return accumulator;
2268
+ }
2269
+
2270
+ var _arrayReduce = arrayReduce;
2271
+
2272
+ /**
2273
+ * The base implementation of `_.propertyOf` without support for deep paths.
2274
+ *
2275
+ * @private
2276
+ * @param {Object} object The object to query.
2277
+ * @returns {Function} Returns the new accessor function.
2278
+ */
2279
+ function basePropertyOf(object) {
2280
+ return function(key) {
2281
+ return object == null ? undefined : object[key];
2282
+ };
2283
+ }
2284
+
2285
+ var _basePropertyOf = basePropertyOf;
2286
+
2287
+ /** Used to map Latin Unicode letters to basic Latin letters. */
2288
+ var deburredLetters = {
2289
+ // Latin-1 Supplement block.
2290
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
2291
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
2292
+ '\xc7': 'C', '\xe7': 'c',
2293
+ '\xd0': 'D', '\xf0': 'd',
2294
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
2295
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
2296
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
2297
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
2298
+ '\xd1': 'N', '\xf1': 'n',
2299
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
2300
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
2301
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
2302
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
2303
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
2304
+ '\xc6': 'Ae', '\xe6': 'ae',
2305
+ '\xde': 'Th', '\xfe': 'th',
2306
+ '\xdf': 'ss',
2307
+ // Latin Extended-A block.
2308
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
2309
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
2310
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
2311
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
2312
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
2313
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
2314
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
2315
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
2316
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
2317
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
2318
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
2319
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
2320
+ '\u0134': 'J', '\u0135': 'j',
2321
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
2322
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
2323
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
2324
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
2325
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
2326
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
2327
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
2328
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
2329
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
2330
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
2331
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
2332
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
2333
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
2334
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
2335
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
2336
+ '\u0174': 'W', '\u0175': 'w',
2337
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
2338
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
2339
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
2340
+ '\u0132': 'IJ', '\u0133': 'ij',
2341
+ '\u0152': 'Oe', '\u0153': 'oe',
2342
+ '\u0149': "'n", '\u017f': 's'
2343
+ };
2344
+
2345
+ /**
2346
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2347
+ * letters to basic Latin letters.
2348
+ *
2349
+ * @private
2350
+ * @param {string} letter The matched letter to deburr.
2351
+ * @returns {string} Returns the deburred letter.
2352
+ */
2353
+ var deburrLetter = _basePropertyOf(deburredLetters);
2354
+
2355
+ var _deburrLetter = deburrLetter;
2356
+
2357
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
2358
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
2359
+
2360
+ /** Used to compose unicode character classes. */
2361
+ var rsComboMarksRange$1 = '\\u0300-\\u036f',
2362
+ reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
2363
+ rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
2364
+ rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
2365
+
2366
+ /** Used to compose unicode capture groups. */
2367
+ var rsCombo$1 = '[' + rsComboRange$1 + ']';
2368
+
2369
+ /**
2370
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
2371
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
2372
+ */
2373
+ var reComboMark = RegExp(rsCombo$1, 'g');
2374
+
2375
+ /**
2376
+ * Deburrs `string` by converting
2377
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
2378
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
2379
+ * letters to basic Latin letters and removing
2380
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
2381
+ *
2382
+ * @static
2383
+ * @memberOf _
2384
+ * @since 3.0.0
2385
+ * @category String
2386
+ * @param {string} [string=''] The string to deburr.
2387
+ * @returns {string} Returns the deburred string.
2388
+ * @example
2389
+ *
2390
+ * _.deburr('déjà vu');
2391
+ * // => 'deja vu'
2392
+ */
2393
+ function deburr(string) {
2394
+ string = toString_1(string);
2395
+ return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
2396
+ }
2397
+
2398
+ var deburr_1 = deburr;
2399
+
2400
+ /** Used to match words composed of alphanumeric characters. */
2401
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
2402
+
2403
+ /**
2404
+ * Splits an ASCII `string` into an array of its words.
2405
+ *
2406
+ * @private
2407
+ * @param {string} The string to inspect.
2408
+ * @returns {Array} Returns the words of `string`.
2409
+ */
2410
+ function asciiWords(string) {
2411
+ return string.match(reAsciiWord) || [];
2412
+ }
2413
+
2414
+ var _asciiWords = asciiWords;
2415
+
2416
+ /** Used to detect strings that need a more robust regexp to match words. */
2417
+ 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 ]/;
2418
+
2419
+ /**
2420
+ * Checks if `string` contains a word composed of Unicode symbols.
2421
+ *
2422
+ * @private
2423
+ * @param {string} string The string to inspect.
2424
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
2425
+ */
2426
+ function hasUnicodeWord(string) {
2427
+ return reHasUnicodeWord.test(string);
2428
+ }
2429
+
2430
+ var _hasUnicodeWord = hasUnicodeWord;
2431
+
2432
+ /** Used to compose unicode character classes. */
2433
+ var rsAstralRange = '\\ud800-\\udfff',
2434
+ rsComboMarksRange = '\\u0300-\\u036f',
2435
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
2436
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
2437
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
2438
+ rsDingbatRange = '\\u2700-\\u27bf',
2439
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
2440
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
2441
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
2442
+ rsPunctuationRange = '\\u2000-\\u206f',
2443
+ 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',
2444
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
2445
+ rsVarRange = '\\ufe0e\\ufe0f',
2446
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
2447
+
2448
+ /** Used to compose unicode capture groups. */
2449
+ var rsApos$1 = "['\u2019]",
2450
+ rsBreak = '[' + rsBreakRange + ']',
2451
+ rsCombo = '[' + rsComboRange + ']',
2452
+ rsDigits = '\\d+',
2453
+ rsDingbat = '[' + rsDingbatRange + ']',
2454
+ rsLower = '[' + rsLowerRange + ']',
2455
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
2456
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
2457
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
2458
+ rsNonAstral = '[^' + rsAstralRange + ']',
2459
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
2460
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
2461
+ rsUpper = '[' + rsUpperRange + ']',
2462
+ rsZWJ = '\\u200d';
2463
+
2464
+ /** Used to compose unicode regexes. */
2465
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
2466
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
2467
+ rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
2468
+ rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
2469
+ reOptMod = rsModifier + '?',
2470
+ rsOptVar = '[' + rsVarRange + ']?',
2471
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
2472
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
2473
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
2474
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
2475
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
2476
+
2477
+ /** Used to match complex or compound words. */
2478
+ var reUnicodeWord = RegExp([
2479
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
2480
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
2481
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
2482
+ rsUpper + '+' + rsOptContrUpper,
2483
+ rsOrdUpper,
2484
+ rsOrdLower,
2485
+ rsDigits,
2486
+ rsEmoji
2487
+ ].join('|'), 'g');
2488
+
2489
+ /**
2490
+ * Splits a Unicode `string` into an array of its words.
2491
+ *
2492
+ * @private
2493
+ * @param {string} The string to inspect.
2494
+ * @returns {Array} Returns the words of `string`.
2495
+ */
2496
+ function unicodeWords(string) {
2497
+ return string.match(reUnicodeWord) || [];
2498
+ }
2499
+
2500
+ var _unicodeWords = unicodeWords;
2501
+
2502
+ /**
2503
+ * Splits `string` into an array of its words.
2504
+ *
2505
+ * @static
2506
+ * @memberOf _
2507
+ * @since 3.0.0
2508
+ * @category String
2509
+ * @param {string} [string=''] The string to inspect.
2510
+ * @param {RegExp|string} [pattern] The pattern to match words.
2511
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
2512
+ * @returns {Array} Returns the words of `string`.
2513
+ * @example
2514
+ *
2515
+ * _.words('fred, barney, & pebbles');
2516
+ * // => ['fred', 'barney', 'pebbles']
2517
+ *
2518
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
2519
+ * // => ['fred', 'barney', '&', 'pebbles']
2520
+ */
2521
+ function words(string, pattern, guard) {
2522
+ string = toString_1(string);
2523
+ pattern = guard ? undefined : pattern;
2524
+
2525
+ if (pattern === undefined) {
2526
+ return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
2527
+ }
2528
+ return string.match(pattern) || [];
2529
+ }
2530
+
2531
+ var words_1 = words;
2532
+
2533
+ /** Used to compose unicode capture groups. */
2534
+ var rsApos = "['\u2019]";
2535
+
2536
+ /** Used to match apostrophes. */
2537
+ var reApos = RegExp(rsApos, 'g');
2538
+
2539
+ /**
2540
+ * Creates a function like `_.camelCase`.
2541
+ *
2542
+ * @private
2543
+ * @param {Function} callback The function to combine each word.
2544
+ * @returns {Function} Returns the new compounder function.
2545
+ */
2546
+ function createCompounder(callback) {
2547
+ return function(string) {
2548
+ return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
2549
+ };
2550
+ }
2551
+
2552
+ var _createCompounder = createCompounder;
2553
+
2554
+ /**
2555
+ * Converts `string`, as space separated words, to upper case.
2556
+ *
2557
+ * @static
2558
+ * @memberOf _
2559
+ * @since 4.0.0
2560
+ * @category String
2561
+ * @param {string} [string=''] The string to convert.
2562
+ * @returns {string} Returns the upper cased string.
2563
+ * @example
2564
+ *
2565
+ * _.upperCase('--foo-bar');
2566
+ * // => 'FOO BAR'
2567
+ *
2568
+ * _.upperCase('fooBar');
2569
+ * // => 'FOO BAR'
2570
+ *
2571
+ * _.upperCase('__foo_bar__');
2572
+ * // => 'FOO BAR'
2573
+ */
2574
+ var upperCase = _createCompounder(function(result, word, index) {
2575
+ return result + (index ? ' ' : '') + word.toUpperCase();
2576
+ });
2577
+
2578
+ var upperCase_1 = upperCase;
2579
+
2580
+ /**
2581
+ * Converts `string`, as space separated words, to lower case.
2582
+ *
2583
+ * @static
2584
+ * @memberOf _
2585
+ * @since 4.0.0
2586
+ * @category String
2587
+ * @param {string} [string=''] The string to convert.
2588
+ * @returns {string} Returns the lower cased string.
2589
+ * @example
2590
+ *
2591
+ * _.lowerCase('--Foo-Bar--');
2592
+ * // => 'foo bar'
2593
+ *
2594
+ * _.lowerCase('fooBar');
2595
+ * // => 'foo bar'
2596
+ *
2597
+ * _.lowerCase('__FOO_BAR__');
2598
+ * // => 'foo bar'
2599
+ */
2600
+ var lowerCase = _createCompounder(function(result, word, index) {
2601
+ return result + (index ? ' ' : '') + word.toLowerCase();
2602
+ });
2603
+
2604
+ var lowerCase_1 = lowerCase;
2605
+
2606
+ function truncate() {
2607
+ var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
2608
+ var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
2609
+ var ellipsis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2610
+ var putEllipsis = ellipsis ? " ..." : "";
2611
+ return typeof string === "string" && string.length > limit ? string.substring(0, limit) + putEllipsis : string;
2612
+ }
2613
+ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestamp) {
2614
+ var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
2615
+ var _config$showTime = config.showTime,
2616
+ showTime = _config$showTime === void 0 ? false : _config$showTime,
2617
+ _config$isTimeFirst = config.isTimeFirst,
2618
+ isTimeFirst = _config$isTimeFirst === void 0 ? false : _config$isTimeFirst,
2619
+ _config$isUpperCase = config.isUpperCase,
2620
+ isUpperCase = _config$isUpperCase === void 0 ? false : _config$isUpperCase,
2621
+ _config$disableMeridi = config.disableMeridiem,
2622
+ disableMeridiem = _config$disableMeridi === void 0 ? false : _config$disableMeridi,
2623
+ _config$timeFormat = config.timeFormat,
2624
+ timeFormat = _config$timeFormat === void 0 ? "12hours" : _config$timeFormat;
2625
+ var monthList = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2626
+ var dateTime = new Date(timestamp);
2627
+ var date = dateTime.getDate().toString().padStart(2, 0);
2628
+ var month = monthList[dateTime.getMonth()];
2629
+ var localizedMonth = month;
2630
+
2631
+ if (isUpperCase) {
2632
+ localizedMonth = upperCase_1(month);
2633
+ }
2634
+
2635
+ var year = dateTime.getFullYear();
2636
+ var localizedMeridiem = config.localizedMeridiem,
2637
+ localizedMonths = config.localizedMonths,
2638
+ _config$direction = config.direction,
2639
+ direction = _config$direction === void 0 ? "ltr" : _config$direction;
2640
+ var time = formatAMPM(timestamp, timeFormat);
2641
+ var timeWithLocalizedMeridiem = time;
2642
+ var timetoShow;
2643
+
2644
+ if (localizedMonths) {
2645
+ localizedMonth = get_1(localizedMonths, [lowerCase_1(month)]) || month;
2646
+ }
2647
+
2648
+ if (localizedMeridiem) {
2649
+ var isAm = time.includes("am");
2650
+ var _localizedMeridiem$am = localizedMeridiem.am,
2651
+ am = _localizedMeridiem$am === void 0 ? "am" : _localizedMeridiem$am,
2652
+ _localizedMeridiem$pm = localizedMeridiem.pm,
2653
+ pm = _localizedMeridiem$pm === void 0 ? "pm" : _localizedMeridiem$pm;
2654
+ timeWithLocalizedMeridiem = (isAm ? time.replace("am", am) : time.replace("pm", pm)) || time;
2655
+ }
2656
+
2657
+ if (direction === "rtl") {
2658
+ timetoShow = showTime ? "".concat(timeWithLocalizedMeridiem) : "";
2659
+ return "".concat(date, " ").concat(localizedMonth, ", ").concat(year, " ").concat(timetoShow, " ");
2660
+ } else {
2661
+ if (disableMeridiem) {
2662
+ return "".concat(localizedMonth, " ").concat(date, ", ").concat(year);
2663
+ } else if (isTimeFirst) {
2664
+ return "".concat(timeWithLocalizedMeridiem, ", ").concat(date, " ").concat(localizedMonth, " ").concat(year);
2665
+ } else {
2666
+ timetoShow = showTime ? ", ".concat(timeWithLocalizedMeridiem) : "";
2667
+ return "".concat(date, " ").concat(localizedMonth, ", ").concat(year).concat(timetoShow);
2668
+ }
2669
+ }
2670
+ };
2671
+ function formatter(value, unit, suffix, date, config) {
2672
+ var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
2673
+ // unit here refers to seconds, minute, minutes,...
2674
+
2675
+ var localizedSuffix = get_1(config, ["localizedPublishTime", suffix]) || suffix;
2676
+ var localizedUnitOfTime;
2677
+
2678
+ if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
2679
+ return timestampToFormat(value, unit, suffix, date, config);
2680
+ } else if (value > 1) {
2681
+ localizedUnitOfTime = get_1(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
2682
+ return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
2683
+ }
2684
+
2685
+ localizedUnitOfTime = get_1(config, ["localizedPublishTime", unit]) || unit;
2686
+ return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
2687
+ }
2688
+
2689
+ function formatAMPM(timestamp) {
2690
+ var timeFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "12hours";
2691
+ var dateTime = new Date(timestamp);
2692
+ var hours = dateTime.getHours();
2693
+ var minutes = dateTime.getMinutes();
2694
+ var ampm = hours >= 12 ? "pm" : "am";
2695
+ hours = hours % 12;
2696
+ hours = hours || 12;
2697
+ minutes = minutes < 10 ? "0" + minutes : minutes;
2698
+ var strTime = hours + ":" + minutes + " " + ampm;
2699
+
2700
+ if (timeFormat === "24hours") {
2701
+ return dateTime.toLocaleTimeString([], {
2702
+ hour: "2-digit",
2703
+ minute: "2-digit"
2704
+ });
2705
+ }
2706
+
2707
+ return strTime;
2708
+ }
2709
+
2710
+ var hexToRGB = function hexToRGB(hex) {
2711
+ var r = parseInt(hex.slice(1, 3), 16);
2712
+ var g = parseInt(hex.slice(3, 5), 16);
2713
+ var b = parseInt(hex.slice(5, 7), 16);
2714
+ return {
2715
+ r: r,
2716
+ g: g,
2717
+ b: b
2718
+ };
2719
+ };
2720
+ var getLuminanceOfColor = function getLuminanceOfColor(hex) {
2721
+ var _hexToRGB = hexToRGB(hex),
2722
+ r = _hexToRGB.r,
2723
+ g = _hexToRGB.g,
2724
+ b = _hexToRGB.b;
2725
+
2726
+ return r * 0.299 + g * 0.587 + b * 0.114;
2727
+ };
2728
+ var rgbToHex = function rgbToHex() {
2729
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
2730
+ var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
2731
+ 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;
2732
+ };
2733
+ var clientWidths = {
2734
+ mobile: 767,
2735
+ tablet: 1024
2736
+ };
2737
+ var clientWidth = function clientWidth(device) {
2738
+ var foundDeviceWidth = get_1(clientWidths, device);
2739
+
2740
+ if (foundDeviceWidth) {
2741
+ return get_1(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
2742
+ }
2743
+
2744
+ return false;
2745
+ };
2746
+ var getTextColor = function getTextColor() {
2747
+ var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
2748
+ var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
2749
+ var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
2750
+ var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
2751
+ return textColor;
2752
+ };
2753
+ var getSlot = function getSlot(type, component, storyCallback, collectionCallback) {
2754
+ switch (type) {
2755
+ case "story":
2756
+ return storyCallback();
2757
+
2758
+ case "collection":
2759
+ return collectionCallback();
2760
+
2761
+ default:
2762
+ return component ? component() : null;
2763
+ }
2764
+ };
2765
+ var getSlug = function getSlug(collection) {
2766
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2767
+ var _config$magazineSlug = config.magazineSlug,
2768
+ magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
2769
+ _config$isArchivePage = config.isArchivePage,
2770
+ isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
2771
+
2772
+ if (isArchivePage) {
2773
+ return "/magazine/archive/".concat(magazineSlug);
2774
+ }
2775
+
2776
+ if (magazineSlug) {
2777
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2778
+ }
2779
+
2780
+ var isSection = collection.template === "section";
2781
+
2782
+ if (isSection) {
2783
+ var sectionId = get_1(collection, ["metadata", "section", "0", "id"], "");
2784
+ var sections = config.sections;
2785
+ var section = sections && sections.find(function (section) {
2786
+ return section.id === sectionId;
2787
+ });
2788
+ return section ? section["section-url"] : "/";
2789
+ }
2790
+
2791
+ return "/collection/".concat(collection.slug);
2792
+ };
2793
+ function isExternalStory() {
2794
+ var story = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2795
+ var _story$storyTemplate = story["story-template"],
2796
+ storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
2797
+ _story$metadata = story.metadata,
2798
+ metadata = _story$metadata === void 0 ? {} : _story$metadata;
2799
+ return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
2800
+ } // Adds target='_blank' attribute to anchor tags if not present
2801
+ var isEmpty = function isEmpty(value) {
2802
+ return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
2803
+ _typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
2804
+ };
2805
+ PropTypes.shape({
2806
+ "sketches-host": PropTypes.string,
2807
+ "cdn-name": PropTypes.string,
2808
+ "cdn-image": PropTypes.string
2809
+ });
2810
+ PropTypes.shape({
2811
+ headline: PropTypes.string,
2812
+ "last-published-at": PropTypes.number,
2813
+ subheadline: PropTypes.string
2814
+ });
2815
+ var getStoryUrl = function getStoryUrl(story) {
2816
+ var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
2817
+ return get_1(story, ["story-template"]) === "news-elsewhere" ? get_1(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
2818
+ };
2819
+ var navigateTo = function navigateTo(dispatch) {
2820
+ var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
2821
+ global.app.navigateToPage(dispatch, url);
2822
+ };
2823
+ var generateNavigateSlug = function generateNavigateSlug() {
2824
+ var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2825
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2826
+ var customUrlPath = arguments.length > 2 ? arguments[2] : undefined;
2827
+
2828
+ if (customUrlPath) {
2829
+ return customUrlPath;
2830
+ }
2831
+
2832
+ var _config$magazineSlug2 = config.magazineSlug,
2833
+ magazineSlug = _config$magazineSlug2 === void 0 ? "" : _config$magazineSlug2,
2834
+ _config$isArchivePage2 = config.isArchivePage,
2835
+ isArchivePage = _config$isArchivePage2 === void 0 ? false : _config$isArchivePage2;
2836
+
2837
+ if (isArchivePage) {
2838
+ return "/magazine/archive/".concat(magazineSlug);
2839
+ }
2840
+
2841
+ if (magazineSlug) {
2842
+ return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2843
+ }
2844
+
2845
+ if (collection) {
2846
+ return getSlug(collection, config);
2847
+ }
2848
+
2849
+ return "/";
2850
+ };
2851
+ var getTimeStamp = function getTimeStamp(date, _formatter) {
2852
+ var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2853
+ var template = arguments.length > 3 ? arguments[3] : undefined;
2854
+ var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
2855
+
2856
+ if (timezone && template === "story") {
2857
+ var zonedTime = timezone && utcToZonedTime(date, timezone);
2858
+ var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
2859
+ timeZone: timezone
2860
+ });
2861
+ var timeStamp = timestampToFormat("", "", "", date, config);
2862
+ return /*#__PURE__*/React.createElement("time", {
2863
+ dateTime: formatZonedTime
2864
+ }, timeStamp);
2865
+ }
2866
+
2867
+ return /*#__PURE__*/React.createElement(Timeago, {
2868
+ date: date,
2869
+ formatter: function formatter(value, unit, suffix, date) {
2870
+ return _formatter(value, unit, suffix, date, config);
2871
+ }
2872
+ });
2873
+ };
2874
+
2875
+ var _styleModuleImportMap$d = {
2876
+ "./collection-name.m.css": {
2877
+ "collection": "collection-name-m_collection__JD6sx",
2878
+ "collection-borderLeft": "collection-name-m_collection-borderLeft__3Dznk",
2879
+ "border-left": "collection-name-m_border-left__3_pYw",
2880
+ "collection-borderBottomFull": "collection-name-m_collection-borderBottomFull__Dkq3K",
2881
+ "collection-borderBottom": "collection-name-m_collection-borderBottom__2rdQM",
2882
+ "collection-crossLine": "collection-name-m_collection-crossLine__1sIpN",
2883
+ "border-bottom": "collection-name-m_border-bottom__1MnlV",
2884
+ "dark": "collection-name-m_dark__nMe5H",
2885
+ "light": "collection-name-m_light__1vFDN"
2886
+ }
2887
+ };
2888
+ var CollectionNameBase = function CollectionNameBase(_ref) {
2889
+ var _ref$collectionNameBo = _ref.collectionNameBorderColor,
2890
+ collectionNameBorderColor = _ref$collectionNameBo === void 0 ? "" : _ref$collectionNameBo,
2891
+ collection = _ref.collection,
2892
+ config = _ref.config,
2893
+ collectionNameTemplate = _ref.collectionNameTemplate,
2894
+ headerLevel = _ref.headerLevel,
2895
+ _ref$customCollection = _ref.customCollectionName,
2896
+ customCollectionName = _ref$customCollection === void 0 ? "" : _ref$customCollection,
2897
+ _ref$navigate = _ref.navigate,
2898
+ navigate = _ref$navigate === void 0 ? true : _ref$navigate;
2899
+ var collectionTitle = useStateValue() || {};
2900
+ var showRowTitle = get_1(collectionTitle, ["showRowTitle"], true);
2901
+ var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
2902
+ var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
2903
+ var slug = navigate && collection && getSlug(collection, config) || "";
2904
+ var collectionName = customCollectionName || collection.name || "";
2905
+ var textColor = getTextColor(collectionTitle.theme);
2906
+ var HeaderTag = "h" + headerLevel;
2907
+ var CollectionNameBorderColor = rgbToHex(collectionNameBorderColor);
2908
+ var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
2909
+
2910
+ var borderBottomStyle = function borderBottomStyle() {
2911
+ return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React.createElement("div", {
2912
+ className: "collection-name-m_border-bottom__1MnlV",
2913
+ style: {
2914
+ borderBottom: "4px solid ".concat(CollectionNameBorderColor)
2915
+ }
2916
+ }) : "";
2917
+ };
2918
+
2919
+ var isMobile = clientWidth("mobile");
2920
+
2921
+ var getBorderHeight = function getBorderHeight() {
2922
+ if (isMobile) {
2923
+ switch (headerLevel) {
2924
+ case "1":
2925
+ return "32px";
2926
+
2927
+ case "2":
2928
+ return "24px";
2929
+
2930
+ case "3":
2931
+ return "20px";
2932
+
2933
+ case "4":
2934
+ return "18px";
2935
+
2936
+ case "5":
2937
+ return "16px";
2938
+
2939
+ case "6":
2940
+ return "16px";
2941
+
2942
+ default:
2943
+ return "20px";
2944
+ }
2945
+ }
2946
+
2947
+ switch (headerLevel) {
2948
+ case "1":
2949
+ return "40px";
2950
+
2951
+ case "2":
2952
+ return "32px";
2953
+
2954
+ case "3":
2955
+ return "24px";
2956
+
2957
+ case "4":
2958
+ return "20px";
2959
+
2960
+ case "5":
2961
+ return "18px";
2962
+
2963
+ case "6":
2964
+ return "16px";
2965
+
2966
+ default:
2967
+ return "24px";
2968
+ }
2969
+ };
2970
+
2971
+ return /*#__PURE__*/React.createElement(React.Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React.createElement("div", {
2972
+ style: {
2973
+ borderBottom: borderBottomFullStyle
2974
+ },
2975
+ "data-test-id": "collection-name",
2976
+ className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$d)
2977
+ }, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React.createElement("span", {
2978
+ className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
2979
+ style: {
2980
+ color: CollectionNameBorderColor,
2981
+ fontSize: getBorderHeight()
2982
+ }
2983
+ }), slug && !slug.includes(undefined) ? /*#__PURE__*/React.createElement(Link, {
2984
+ href: slug,
2985
+ "aria-label": "collection-name"
2986
+ }, /*#__PURE__*/React.createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React.createElement(HeaderTag, null, collectionName), borderBottomStyle()));
2987
+ };
2988
+ CollectionNameBase.propTypes = {
2989
+ /** Collection name border color */
2990
+ collectionNameBorderColor: PropTypes$1.string,
2991
+
2992
+ /** The Collection Object from the API response */
2993
+ collection: PropTypes$1.object,
2994
+
2995
+ /** The publisher config from the API response */
2996
+ config: PropTypes$1.object,
2997
+
2998
+ /** The style template for the component */
2999
+ collectionNameTemplate: PropTypes$1.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
3000
+
3001
+ /** Header tags ranging h1-h6, where h[headerLevel] */
3002
+ headerLevel: PropTypes$1.string,
3003
+ customCollectionName: PropTypes$1.string,
3004
+ navigate: PropTypes$1.bool
3005
+ };
3006
+ CollectionNameBase.defaultProps = {
3007
+ collectionNameTemplate: "",
3008
+ headerLevel: "3"
3009
+ };
3010
+
3011
+ function mapStateToProps$1(state) {
3012
+ return {
3013
+ config: get_1(state, ["qt", "config"], {})
3014
+ };
3015
+ }
3016
+
3017
+ var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
3018
+
3019
+ var CrownIcon = function CrownIcon(_ref) {
3020
+ var height = _ref.height,
3021
+ width = _ref.width,
3022
+ _ref$color = _ref.color,
3023
+ color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
3024
+ positionTop = _ref.positionTop;
3025
+ return /*#__PURE__*/React.createElement("svg", {
3026
+ xmlns: "http://www.w3.org/2000/svg",
3027
+ width: width,
3028
+ height: height,
3029
+ viewBox: "0 0 40 40",
3030
+ style: {
3031
+ position: "relative",
3032
+ top: positionTop
3033
+ }
3034
+ }, /*#__PURE__*/React.createElement("g", {
3035
+ fill: "none",
3036
+ fillRule: "evenodd",
3037
+ stroke: "none",
3038
+ strokeWidth: "1"
3039
+ }, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("g", {
3040
+ transform: "translate(8 8)"
3041
+ }, /*#__PURE__*/React.createElement("path", {
3042
+ d: "M0 0H24V24H0z"
3043
+ }), /*#__PURE__*/React.createElement("g", {
3044
+ fill: color,
3045
+ fillRule: "nonzero",
3046
+ transform: "translate(0 2)"
3047
+ }, /*#__PURE__*/React.createElement("path", {
3048
+ d: "M21.043 19.553c0-.743-.601-1.344-1.344-1.344h-15.4a1.343 1.343 0 100 2.688h15.4c.743 0 1.344-.603 1.344-1.344zM1.598 8.673c.022 0 .042 0 .064-.003l2.131 7.713h16.411l2.132-7.713c.022 0 .041.003.063.003a1.599 1.599 0 10-1.52-1.108L17.025 9.82 12.882 2.95a1.599 1.599 0 10-1.765 0L6.976 9.82 3.121 7.565a1.599 1.599 0 10-1.523 1.107z"
3049
+ }))))));
3050
+ };
3051
+ CrownIcon.propTypes = {
3052
+ height: PropTypes.string,
3053
+ width: PropTypes.string,
3054
+ color: PropTypes.string,
3055
+ positionTop: PropTypes.string
3056
+ };
3057
+
3058
+ var KeyIcon = function KeyIcon(_ref) {
3059
+ var height = _ref.height,
3060
+ width = _ref.width,
3061
+ _ref$color = _ref.color,
3062
+ color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
3063
+ positionTop = _ref.positionTop;
3064
+ return /*#__PURE__*/React.createElement("svg", {
3065
+ xmlns: "http://www.w3.org/2000/svg",
3066
+ width: width,
3067
+ height: height,
3068
+ viewBox: "0 0 40 40",
3069
+ style: {
3070
+ position: "relative",
3071
+ top: positionTop
3072
+ }
3073
+ }, /*#__PURE__*/React.createElement("g", {
3074
+ fill: "none",
3075
+ fillRule: "evenodd",
3076
+ stroke: "none",
3077
+ strokeWidth: "1"
3078
+ }, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("g", {
3079
+ transform: "translate(8 8)"
3080
+ }, /*#__PURE__*/React.createElement("path", {
3081
+ d: "M0 0H24V24H0z"
3082
+ }), /*#__PURE__*/React.createElement("path", {
3083
+ fill: color,
3084
+ fillRule: "nonzero",
3085
+ d: "M12.71 4.364A6.54 6.54 0 000 6.545a6.54 6.54 0 0012.71 2.182h4.745v4.364h4.363V8.727H24V4.364H12.71zM6.544 8.727a2.181 2.181 0 110-4.362 2.181 2.181 0 010 4.362z",
3086
+ transform: "translate(0 5)"
3087
+ })))));
3088
+ };
3089
+ KeyIcon.propTypes = {
3090
+ height: PropTypes.string,
3091
+ width: PropTypes.string,
3092
+ color: PropTypes.string,
3093
+ positionTop: PropTypes.string
3094
+ };
3095
+
3096
+ var LockIcon = function LockIcon(_ref) {
3097
+ var height = _ref.height,
3098
+ width = _ref.width,
3099
+ _ref$color = _ref.color,
3100
+ color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
3101
+ positionTop = _ref.positionTop;
3102
+ return /*#__PURE__*/React.createElement("svg", {
3103
+ xmlns: "http://www.w3.org/2000/svg",
3104
+ width: width,
3105
+ height: height,
3106
+ viewBox: "0 0 40 40",
3107
+ style: {
3108
+ position: "relative",
3109
+ top: positionTop
3110
+ }
3111
+ }, /*#__PURE__*/React.createElement("g", {
3112
+ fill: "none",
3113
+ fillRule: "evenodd",
3114
+ stroke: "none",
3115
+ strokeWidth: "1"
3116
+ }, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("g", {
3117
+ transform: "translate(8 8)"
3118
+ }, /*#__PURE__*/React.createElement("path", {
3119
+ d: "M0 0H24V24H0z"
3120
+ }), /*#__PURE__*/React.createElement("g", {
3121
+ fill: color,
3122
+ fillRule: "nonzero",
3123
+ transform: "translate(3)"
3124
+ }, /*#__PURE__*/React.createElement("path", {
3125
+ d: "M15.692 9h-.747V6c0-3.31-2.681-6-5.978-6C5.67 0 2.989 2.69 2.989 6v3h-.747A2.249 2.249 0 000 11.25v10.5A2.249 2.249 0 002.242 24h13.45a2.249 2.249 0 002.242-2.25v-10.5A2.249 2.249 0 0015.692 9zM4.982 6c0-2.206 1.787-4 3.985-4s3.985 1.794 3.985 4v3h-7.97V6z"
3126
+ }))))));
3127
+ };
3128
+ LockIcon.propTypes = {
3129
+ height: PropTypes.string,
3130
+ width: PropTypes.string,
3131
+ color: PropTypes.string,
3132
+ positionTop: PropTypes.string
3133
+ };
3134
+
3135
+ var StarIcon = function StarIcon(_ref) {
3136
+ var width = _ref.width,
3137
+ height = _ref.height,
3138
+ _ref$color = _ref.color,
3139
+ color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
3140
+ _ref$positionTop = _ref.positionTop,
3141
+ positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
3142
+ return /*#__PURE__*/React.createElement("svg", {
3143
+ xmlns: "http://www.w3.org/2000/svg",
3144
+ width: width,
3145
+ height: height,
3146
+ viewBox: "0 0 40 40",
3147
+ style: {
3148
+ position: "relative",
3149
+ top: positionTop
3150
+ }
3151
+ }, /*#__PURE__*/React.createElement("g", {
3152
+ fill: "none",
3153
+ fillRule: "evenodd",
3154
+ stroke: "none",
3155
+ strokeWidth: "1"
3156
+ }, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
3157
+ fill: color,
3158
+ d: "M20 26L12.946577 29.7082039 14.2936609 21.854102 8.5873218 16.2917961 16.4732885 15.145898 20 8 23.5267115 15.145898 31.4126782 16.2917961 25.7063391 21.854102 27.053423 29.7082039z"
3159
+ }))));
3160
+ };
3161
+ StarIcon.propTypes = {
3162
+ height: PropTypes.string,
3163
+ width: PropTypes.string,
3164
+ color: PropTypes.string,
3165
+ positionTop: PropTypes.string
3166
+ };
3167
+
3168
+ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
3169
+ var width = _ref.width,
3170
+ height = _ref.height,
3171
+ color = _ref.color,
3172
+ iconType = _ref.iconType,
3173
+ positionTop = _ref.positionTop;
3174
+
3175
+ switch (iconType) {
3176
+ case "crown":
3177
+ return /*#__PURE__*/React.createElement(CrownIcon, {
3178
+ width: width,
3179
+ height: height,
3180
+ color: color,
3181
+ positionTop: positionTop
3182
+ });
3183
+
3184
+ case "lock":
3185
+ return /*#__PURE__*/React.createElement(LockIcon, {
3186
+ width: width,
3187
+ height: height,
3188
+ color: color,
3189
+ positionTop: positionTop
3190
+ });
3191
+
3192
+ case "key":
3193
+ return /*#__PURE__*/React.createElement(KeyIcon, {
3194
+ width: width,
3195
+ height: height,
3196
+ color: color,
3197
+ positionTop: positionTop
3198
+ });
3199
+
3200
+ default:
3201
+ return /*#__PURE__*/React.createElement(StarIcon, {
3202
+ width: width,
3203
+ height: height,
3204
+ color: color,
3205
+ positionTop: positionTop
3206
+ });
3207
+ }
3208
+ };
3209
+ PremiumStoryIcon.propTypes = {
3210
+ width: PropTypes.string,
3211
+ height: PropTypes.string,
3212
+ color: PropTypes.string,
3213
+ iconType: PropTypes.string,
3214
+ positionTop: PropTypes.string
3215
+ };
3216
+
3217
+ function LiveIcon() {
3218
+ return /*#__PURE__*/React.createElement("svg", {
3219
+ className: "live-icon",
3220
+ xmlns: "http://www.w3.org/2000/svg",
3221
+ width: "25",
3222
+ height: "24",
3223
+ viewBox: "0 0 25 24"
3224
+ }, /*#__PURE__*/React.createElement("path", {
3225
+ fill: "#ff5858",
3226
+ d: "M12 18a6 6 0 110-12 6 6 0 010 12zm0 2.5a8.5 8.5 0 110-17 8.5 8.5 0 010 17zm0-1a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"
3227
+ }));
3228
+ }
3229
+
3230
+ var _styleModuleImportMap$c = {
3231
+ "./headline.m.css": {
3232
+ "wrapper": "headline-m_wrapper__3nUmh",
3233
+ "headline": "headline-m_headline__3_NhV",
3234
+ "dark": "headline-m_dark__en3hW",
3235
+ "light": "headline-m_light__3lKJB"
3236
+ }
3237
+ };
3238
+ var Headline = function Headline(_ref) {
3239
+ var story = _ref.story,
3240
+ headerLevel = _ref.headerLevel,
3241
+ _ref$premiumStoryIcon = _ref.premiumStoryIconConfig,
3242
+ premiumStoryIconConfig = _ref$premiumStoryIcon === void 0 ? {} : _ref$premiumStoryIcon,
3243
+ isLink = _ref.isLink;
3244
+ var configData = useStateValue() || {};
3245
+ var _premiumStoryIconConf = premiumStoryIconConfig.iconColor,
3246
+ iconColor = _premiumStoryIconConf === void 0 ? "#F7B500" : _premiumStoryIconConf,
3247
+ _premiumStoryIconConf2 = premiumStoryIconConfig.iconStyle,
3248
+ iconStyle = _premiumStoryIconConf2 === void 0 ? "star" : _premiumStoryIconConf2,
3249
+ _premiumStoryIconConf3 = premiumStoryIconConfig.enablePremiumStoryIcon,
3250
+ enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
3251
+ _premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
3252
+ showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
3253
+ var alternateHeadline = get_1(story, ["alternative", "home", "default", "headline"]);
3254
+ var premiumStory = enablePremiumStoryIcon && get_1(story, ["access"]) === "subscription";
3255
+ var headline = alternateHeadline || story.headline;
3256
+ var HeaderTag = "h" + headerLevel;
3257
+
3258
+ var positionHeadline = function positionHeadline() {
3259
+ switch (parseInt(headerLevel)) {
3260
+ case 1:
3261
+ return "-2px";
3262
+
3263
+ case 2:
3264
+ return "2px";
3265
+
3266
+ case 3:
3267
+ return "4px";
3268
+
3269
+ case 4:
3270
+ return "5px";
3271
+
3272
+ default:
3273
+ return "6px";
3274
+ }
3275
+ };
3276
+
3277
+ var textColor = getTextColor(configData.theme);
3278
+ var wrapperClass = premiumStory ? "wrapper" : "";
3279
+ var iconSize = "24px";
3280
+ var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
3281
+ return /*#__PURE__*/React.createElement("div", {
3282
+ "data-test-id": "headline",
3283
+ className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$c)
3284
+ }, premiumStory && /*#__PURE__*/React.createElement(PremiumStoryIcon, {
3285
+ width: iconSize,
3286
+ height: iconSize,
3287
+ color: iconColor,
3288
+ iconType: iconStyle,
3289
+ positionTop: positionHeadline()
3290
+ }), isLink ? /*#__PURE__*/React.createElement(Link, {
3291
+ href: getStoryUrl(story, "/".concat(story.slug)),
3292
+ externalLink: isExternalStory(story),
3293
+ "aria-label": "headline"
3294
+ }, /*#__PURE__*/React.createElement(HeaderTag, {
3295
+ className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
3296
+ }, enableLiveIcon && /*#__PURE__*/React.createElement(LiveIcon, null), headline)) : /*#__PURE__*/React.createElement(HeaderTag, {
3297
+ className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
3298
+ }, enableLiveIcon && /*#__PURE__*/React.createElement(LiveIcon, null), headline));
3299
+ };
3300
+ Headline.propTypes = {
3301
+ /** The Story Object from the API response */
3302
+ story: PropTypes.object.isRequired,
3303
+
3304
+ /** Header tags ranging h1-h6, where h[headerLevel] */
3305
+ headerLevel: PropTypes.string,
3306
+ premiumStoryIconConfig: PropTypes.shape({
3307
+ iconColor: PropTypes.string,
3308
+ iconType: PropTypes.string,
3309
+ enablePremiumStoryIcon: PropTypes.bool
3310
+ }),
3311
+ isLink: PropTypes.bool
3312
+ };
3313
+ Headline.defaultProps = {
3314
+ headerLevel: "6",
3315
+ isLink: true
3316
+ };
3317
+
3318
+ var _styleModuleImportMap$b = {
3319
+ "./load-more.m.css": {
3320
+ "button": "load-more-m_button__1mmf1",
3321
+ "default": "load-more-m_default__2_k4V",
3322
+ "dark": "load-more-m_dark__3dfzb",
3323
+ "light": "load-more-m_light__ePZQI"
3324
+ }
3325
+ };
3326
+
3327
+ function ownKeys$1(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; }
3328
+
3329
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3330
+ var LoadmoreButton = function LoadmoreButton(_ref) {
3331
+ var _ref$config = _ref.config,
3332
+ config = _ref$config === void 0 ? {} : _ref$config,
3333
+ collection = _ref.collection,
3334
+ _ref$template = _ref.template,
3335
+ template = _ref$template === void 0 ? "SubsequentLoadCount" : _ref$template,
3336
+ onClick = _ref.onClick,
3337
+ navigate = _ref.navigate,
3338
+ qtConfig = _ref.qtConfig;
3339
+ var _config$showButton = config.showButton,
3340
+ showButton = _config$showButton === void 0 ? true : _config$showButton,
3341
+ _config$buttonText = config.buttonText,
3342
+ buttonText = _config$buttonText === void 0 ? "Read More" : _config$buttonText,
3343
+ _config$theme = config.theme,
3344
+ theme = _config$theme === void 0 ? "" : _config$theme,
3345
+ _config$customUrlPath = config.customUrlPath,
3346
+ customUrlPath = _config$customUrlPath === void 0 ? "" : _config$customUrlPath;
3347
+ if (!showButton) return null;
3348
+ var textColor = getTextColor(theme);
3349
+ var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
3350
+ return template === "SubsequentLoadCount" ? /*#__PURE__*/React.createElement("div", {
3351
+ onClick: onClick,
3352
+ "data-test-id": "load-more",
3353
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$b)
3354
+ }, buttonText) : /*#__PURE__*/React.createElement(LinkBase, {
3355
+ href: slug,
3356
+ navigateTo: navigate,
3357
+ "data-test-id": "load-more",
3358
+ "aria-label": "load-more"
3359
+ }, /*#__PURE__*/React.createElement("div", {
3360
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$b)
3361
+ }, buttonText));
3362
+ };
3363
+ LoadmoreButton.propTypes = {
3364
+ collection: PropTypes.object,
3365
+ template: PropTypes.string,
3366
+ config: PropTypes.object,
3367
+ onClick: PropTypes.func,
3368
+ navigate: PropTypes.func,
3369
+ qtConfig: PropTypes.object
3370
+ };
3371
+
3372
+ var _styleModuleImportMap$a = {
3373
+ "./subheadline.m.css": {
3374
+ "subheadline": "subheadline-m_subheadline__3fd7z",
3375
+ "dark": "subheadline-m_dark__28u00",
3376
+ "light": "subheadline-m_light__2YUOe"
3377
+ }
3378
+ };
3379
+ var Subheadline = function Subheadline(_ref) {
3380
+ var story = _ref.story,
3381
+ _ref$truncateChars = _ref.truncateChars,
3382
+ truncateChars = _ref$truncateChars === void 0 ? 200 : _ref$truncateChars,
3383
+ lineClamp = _ref.lineClamp,
3384
+ _ref$clazzName = _ref.clazzName,
3385
+ clazzName = _ref$clazzName === void 0 ? "" : _ref$clazzName,
3386
+ forceShowAtom = _ref.forceShowAtom,
3387
+ showFullContent = _ref.showFullContent;
3388
+ var config = useStateValue() || {};
3389
+ var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
3390
+ if (!subheadline) return null;
3391
+ var textColor = getTextColor(config.theme);
3392
+ return /*#__PURE__*/React.createElement("div", {
3393
+ style: {
3394
+ WebkitLineClamp: lineClamp
3395
+ },
3396
+ "data-test-id": "subheadline",
3397
+ className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName("subheadline ".concat(textColor), _styleModuleImportMap$a)
3398
+ }, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
3399
+ };
3400
+ Subheadline.propTypes = {
3401
+ /** The Story Object from the API response */
3402
+ story: PropTypes.object.isRequired,
3403
+ // Restricts the number of lines for subheadline.
3404
+ lineClamp: PropTypes.number,
3405
+
3406
+ /** Number of characters to truncate the subheadline */
3407
+ truncateChars: PropTypes.number,
3408
+ clazzName: PropTypes.string,
3409
+ forceShowAtom: PropTypes.bool,
3410
+ showFullContent: PropTypes.bool
3411
+ };
3412
+ Subheadline.defaultProps = {
3413
+ forceShowAtom: false,
3414
+ showFullContent: false
3415
+ };
3416
+
3417
+ var _styleModuleImportMap$9 = {
3418
+ "./timestamp.m.css": {
3419
+ "time": "timestamp-m_time__2v46i",
3420
+ "time-wrapper": "timestamp-m_time-wrapper__3O2lM",
3421
+ "bottom-fix": "timestamp-m_bottom-fix__1Zh8r",
3422
+ "dark": "timestamp-m_dark__2lk9E",
3423
+ "light": "timestamp-m_light__2QlrI"
3424
+ }
3425
+ };
3426
+ var TimeStamp = function TimeStamp(_ref) {
3427
+ var story = _ref.story,
3428
+ isBottom = _ref.isBottom,
3429
+ _ref$config = _ref.config,
3430
+ config = _ref$config === void 0 ? {} : _ref$config;
3431
+ var configState = useStateValue() || {};
3432
+ var isTime = get_1(config, ["showTime"], get_1(configState, ["showTime"], true));
3433
+ var time = story["last-published-at"] || story["first-published-at"];
3434
+ var isBottomClasses = isBottom ? "bottom-fix" : "";
3435
+ var textColor = getTextColor(configState.theme);
3436
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isTime && /*#__PURE__*/React.createElement("div", {
3437
+ "data-test-id": "publish-time",
3438
+ className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$9)
3439
+ }, /*#__PURE__*/React.createElement("div", {
3440
+ className: "timestamp-m_time-wrapper__3O2lM"
3441
+ }, getTimeStamp(time, formatter, config))));
3442
+ };
3443
+ TimeStamp.propTypes = {
3444
+ /** The Story Object from the API response */
3445
+ story: PropTypes.object,
3446
+ isBottom: PropTypes.bool,
3447
+ config: PropTypes.object
3448
+ };
3449
+
3450
+ var _styleModuleImportMap$8 = {
3451
+ "./author.m.css": {
3452
+ "author": "author-m_author__WRuLm",
3453
+ "author-image": "author-m_author-image__3q2oc",
3454
+ "author-name": "author-m_author-name__3WP-O",
3455
+ "bottom-fix": "author-m_bottom-fix__223TT",
3456
+ "prefix": "author-m_prefix__YSInK",
3457
+ "rtl-image": "author-m_rtl-image__2nglD",
3458
+ "ltr-image": "author-m_ltr-image__3bc0L",
3459
+ "dark": "author-m_dark__2TTlp",
3460
+ "light": "author-m_light__3y8_x"
3461
+ }
3462
+ };
3463
+
3464
+ var AuthorBase = function AuthorBase(_ref) {
3465
+ var story = _ref.story,
3466
+ hideAuthorImage = _ref.hideAuthorImage,
3467
+ isBottom = _ref.isBottom,
3468
+ _ref$prefix = _ref.prefix,
3469
+ prefix = _ref$prefix === void 0 ? "" : _ref$prefix,
3470
+ _ref$config = _ref.config,
3471
+ config = _ref$config === void 0 ? {} : _ref$config;
3472
+ var configData = useStateValue() || {};
3473
+ var isAuthor = get_1(configData, ["showAuthor"], true);
3474
+
3475
+ var _get = get_1(story, ["authors", "0"], ""),
3476
+ avatarUrl = _get["avatar-url"],
3477
+ avatarS3Key = _get["avatar-s3-key"],
3478
+ authorName = _get.name,
3479
+ slug = _get.slug;
3480
+
3481
+ var isBottomClasses = isBottom ? "bottom-fix" : "";
3482
+ var textColor = getTextColor(configData.theme);
3483
+ var mountAt = get_1(config, ["mountAt"], "");
3484
+
3485
+ var authorImage = function authorImage(dir) {
3486
+ if (!avatarUrl && !avatarS3Key) {
3487
+ return null;
3488
+ }
3489
+
3490
+ return /*#__PURE__*/React.createElement("div", {
3491
+ "data-test-id": "author-image",
3492
+ className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$8)
3493
+ }, /*#__PURE__*/React.createElement("figure", null, avatarS3Key ? /*#__PURE__*/React.createElement(ResponsiveImage, {
3494
+ slug: avatarS3Key,
3495
+ "aspect-ratio": [1, 1],
3496
+ defaultWidth: 400,
3497
+ imgParams: {
3498
+ auto: ["format", "compress"]
3499
+ },
3500
+ alt: authorName
3501
+ }) : /*#__PURE__*/React.createElement("img", {
3502
+ src: avatarUrl
3503
+ })));
3504
+ };
3505
+
3506
+ var isPrefix = function isPrefix(dir) {
3507
+ if (prefix) {
3508
+ return /*#__PURE__*/React.createElement("div", {
3509
+ className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$8)
3510
+ }, prefix);
3511
+ }
3512
+
3513
+ return !hideAuthorImage && authorImage(dir);
3514
+ };
3515
+
3516
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isAuthor && /*#__PURE__*/React.createElement(Link, {
3517
+ href: "".concat(mountAt, "/author/") + slug,
3518
+ "aria-label": "author-name",
3519
+ className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$8)
3520
+ }, isPrefix("ltr"), /*#__PURE__*/React.createElement("div", {
3521
+ "data-test-id": "author-name",
3522
+ className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$8)
3523
+ }, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
3524
+ };
3525
+
3526
+ function mapStateToProps(state) {
3527
+ return {
3528
+ config: get_1(state, ["qt", "config"], {})
3529
+ };
3530
+ }
3531
+
3532
+ var Author = connect(mapStateToProps)(AuthorBase);
3533
+ AuthorBase.propTypes = {
3534
+ /** The Story Object from the API response */
3535
+ story: PropTypes.object.isRequired,
3536
+
3537
+ /** Hide Author Avatar Image */
3538
+ hideAuthorImage: PropTypes.bool,
3539
+ // fix Author bottom of the storyCard
3540
+ isBottom: PropTypes.bool,
3541
+ // fix prefix before the author name
3542
+ prefix: PropTypes.string,
3543
+ config: PropTypes.object
3544
+ };
3545
+ AuthorBase.defaultProps = {
3546
+ hideAuthorImage: false,
3547
+ isBottom: false,
3548
+ prefix: ""
3549
+ };
3550
+
3551
+ var _styleModuleImportMap$7 = {
3552
+ "./dot.m.css": {
3553
+ "dark": "dot-m_dark__1Njxl",
3554
+ "light": "dot-m_light__27IA3"
3555
+ }
3556
+ };
3557
+ var Dot = function Dot(_ref) {
3558
+ var _ref$width = _ref.width,
3559
+ width = _ref$width === void 0 ? "3px" : _ref$width,
3560
+ _ref$height = _ref.height,
3561
+ height = _ref$height === void 0 ? "3px" : _ref$height,
3562
+ _ref$color = _ref.color,
3563
+ color = _ref$color === void 0 ? "light" : _ref$color;
3564
+ return /*#__PURE__*/React.createElement("div", {
3565
+ className: _getClassName(color, _styleModuleImportMap$7)
3566
+ }, /*#__PURE__*/React.createElement("svg", {
3567
+ xmlns: "http://www.w3.org/2000/svg",
3568
+ width: width,
3569
+ height: height,
3570
+ viewBox: "0 0 3 3"
3571
+ }, /*#__PURE__*/React.createElement("circle", {
3572
+ cx: "87",
3573
+ cy: "9",
3574
+ r: "1",
3575
+ fill: "inherit",
3576
+ fillRule: "nonzero",
3577
+ transform: "translate(-86 -8)"
3578
+ })));
3579
+ };
3580
+ Dot.propTypes = {
3581
+ /** height , width and color of the dot icon */
3582
+ color: PropTypes.string,
3583
+ width: PropTypes.string,
3584
+ height: PropTypes.string
3585
+ };
3586
+
3587
+ var _styleModuleImportMap$6 = {
3588
+ "./divider.m.css": {
3589
+ "dark": "divider-m_dark__26FRi",
3590
+ "light": "divider-m_light__w-7sy"
3591
+ }
3592
+ };
3593
+ var Divider = function Divider(_ref) {
3594
+ var _ref$width = _ref.width,
3595
+ width = _ref$width === void 0 ? "1" : _ref$width,
3596
+ _ref$height = _ref.height,
3597
+ height = _ref$height === void 0 ? "10" : _ref$height,
3598
+ _ref$color = _ref.color,
3599
+ color = _ref$color === void 0 ? "light" : _ref$color;
3600
+ return /*#__PURE__*/React.createElement("div", {
3601
+ className: _getClassName(color, _styleModuleImportMap$6)
3602
+ }, /*#__PURE__*/React.createElement("svg", {
3603
+ xmlns: "http://www.w3.org/2000/svg",
3604
+ width: width,
3605
+ height: height
3606
+ }, /*#__PURE__*/React.createElement("path", {
3607
+ fill: "inherit",
3608
+ d: "M0 0h1v10H0z"
3609
+ })));
3610
+ };
3611
+ Divider.propTypes = {
3612
+ /** height , width and color of the dot icon */
3613
+ color: PropTypes.string,
3614
+ width: PropTypes.string,
3615
+ height: PropTypes.string
3616
+ };
3617
+
3618
+ var _styleModuleImportMap$5 = {
3619
+ "./read-time.m.css": {
3620
+ "read-time-wrapper": "read-time-m_read-time-wrapper__3GyC_",
3621
+ "dot-indicator": "read-time-m_dot-indicator__3Sqh2",
3622
+ "dark": "read-time-m_dark__3yRaK",
3623
+ "light": "read-time-m_light__1GAZu"
3624
+ }
3625
+ };
3626
+ var ReadTime = function ReadTime(_ref) {
3627
+ var story = _ref.story,
3628
+ _ref$opts = _ref.opts,
3629
+ opts = _ref$opts === void 0 ? {} : _ref$opts,
3630
+ _ref$isLightTheme = _ref.isLightTheme,
3631
+ isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
3632
+ var config = useStateValue() || {};
3633
+ var showReadTime = get_1(config, ["showReadTime"]) || get_1(opts, ["showReadTime"], true);
3634
+ var readTime = get_1(story, ["read-time"], 0);
3635
+ var textColor = isLightTheme ? "light" : getTextColor(config.theme);
3636
+ if (!showReadTime || !readTime) return null;
3637
+ var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
3638
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
3639
+ "data-test-id": "read-time",
3640
+ className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$5)
3641
+ }, /*#__PURE__*/React.createElement("span", {
3642
+ className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
3643
+ }, /*#__PURE__*/React.createElement(Dot, {
3644
+ color: textColor
3645
+ })), /*#__PURE__*/React.createElement("span", null, readTime, " ", timeToRead)));
3646
+ };
3647
+ ReadTime.propTypes = {
3648
+ story: PropTypes.shape({
3649
+ "read-time": PropTypes.number
3650
+ }),
3651
+ opts: PropTypes.shape({
3652
+ showReadTime: PropTypes.bool
3653
+ }),
3654
+ isLightTheme: PropTypes.bool
3655
+ };
3656
+
3657
+ var _styleModuleImportMap$4 = {
3658
+ "./author-with-timestamp.m.css": {
3659
+ "author-time-wrapper": "author-with-timestamp-m_author-time-wrapper__G7_eI",
3660
+ "author-image": "author-with-timestamp-m_author-image__24xrD",
3661
+ "dot": "author-with-timestamp-m_dot__1LHXD",
3662
+ "bottom-fix": "author-with-timestamp-m_bottom-fix__1rWGv",
3663
+ "dash": "author-with-timestamp-m_dash__2L5XC"
3664
+ }
3665
+ };
3666
+ var AuthorWithTime = function AuthorWithTime(_ref) {
3667
+ var story = _ref.story,
3668
+ separator = _ref.separator,
3669
+ isBottom = _ref.isBottom,
3670
+ hideAuthorImage = _ref.hideAuthorImage,
3671
+ prefix = _ref.prefix,
3672
+ _ref$config = _ref.config,
3673
+ config = _ref$config === void 0 ? {} : _ref$config,
3674
+ isLightTheme = _ref.isLightTheme;
3675
+ var configState = useStateValue() || {};
3676
+ var isAuthor = get_1(config, ["showAuthor"], get_1(configState, ["showAuthor"], true));
3677
+ var isTime = get_1(config, ["showTime"], get_1(configState, ["showTime"], true));
3678
+ var isReadTime = get_1(configState, ["showReadTime"], true);
3679
+ var isBottomClasses = isBottom ? "bottom-fix" : "";
3680
+ var seperatorStyle = separator === "dot" ? "dot" : "dash";
3681
+ var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
3682
+
3683
+ var getSeparator = function getSeparator() {
3684
+ if (separator === "divider") {
3685
+ return /*#__PURE__*/React.createElement(Divider, {
3686
+ color: textColor
3687
+ });
3688
+ }
3689
+
3690
+ return /*#__PURE__*/React.createElement(Dot, {
3691
+ color: textColor
3692
+ });
3693
+ };
3694
+
3695
+ var getTimeStamp = function getTimeStamp() {
3696
+ if (!isTime) return null;
3697
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isAuthor && /*#__PURE__*/React.createElement("span", {
3698
+ className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$4)
3699
+ }, getSeparator()), /*#__PURE__*/React.createElement(TimeStamp, {
3700
+ story: story,
3701
+ config: config
3702
+ }), isReadTime && /*#__PURE__*/React.createElement(ReadTime, {
3703
+ story: story,
3704
+ opts: config,
3705
+ isLightTheme: isLightTheme
3706
+ }));
3707
+ };
3708
+
3709
+ return /*#__PURE__*/React.createElement("div", {
3710
+ className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$4)
3711
+ }, isAuthor ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Author, {
3712
+ story: story,
3713
+ isBottom: true,
3714
+ hideAuthorImage: hideAuthorImage,
3715
+ prefix: prefix
3716
+ }), getTimeStamp()) : getTimeStamp());
3717
+ };
3718
+ AuthorWithTime.propTypes = {
3719
+ story: PropTypes.object,
3720
+
3721
+ /** Style of separator between the Author & Timestamp */
3722
+ separator: PropTypes.oneOf(["dot", "divider"]),
3723
+
3724
+ /** hide the author image */
3725
+ hideAuthorImage: PropTypes.bool,
3726
+ // fix author and time at the end
3727
+ isBottom: PropTypes.bool,
3728
+ // fix prefix before the author name
3729
+ prefix: PropTypes.string,
3730
+ config: PropTypes.object,
3731
+ isLightTheme: PropTypes.bool
3732
+ };
3733
+ AuthorWithTime.defaultProps = {
3734
+ separator: "dot",
3735
+ isBottom: false,
3736
+ hideAuthorImage: true,
3737
+ prefix: "",
3738
+ isLightTheme: false
3739
+ };
3740
+
3741
+ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
3742
+ var _ref$width = _ref.width,
3743
+ width = _ref$width === void 0 ? 40 : _ref$width,
3744
+ _ref$height = _ref.height,
3745
+ height = _ref$height === void 0 ? 30 : _ref$height,
3746
+ _ref$iconColor = _ref.iconColor,
3747
+ iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
3748
+ return /*#__PURE__*/React.createElement("svg", {
3749
+ width: width,
3750
+ height: height,
3751
+ viewBox: "0 0 102 76",
3752
+ version: "1.1"
3753
+ }, /*#__PURE__*/React.createElement("g", {
3754
+ id: "demo-home-copy",
3755
+ stroke: "none",
3756
+ strokeWidth: "1",
3757
+ fill: "none",
3758
+ fillRule: "evenodd",
3759
+ transform: "translate(-377.000000, -314.000000)"
3760
+ }, /*#__PURE__*/React.createElement("g", {
3761
+ id: "Group-13",
3762
+ transform: "translate(377.000000, 314.000000)"
3763
+ }, /*#__PURE__*/React.createElement("path", {
3764
+ d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
3765
+ id: "Combined-Shape",
3766
+ fill: iconColor,
3767
+ fillRule: "nonzero"
3768
+ }), /*#__PURE__*/React.createElement("rect", {
3769
+ id: "Rectangle-19",
3770
+ stroke: iconColor,
3771
+ strokeWidth: "3",
3772
+ x: "1.5",
3773
+ y: "1.5",
3774
+ width: "99",
3775
+ height: "73",
3776
+ rx: "3"
3777
+ }))));
3778
+ };
3779
+ ImageFallbackIcon.propTypes = {
3780
+ width: PropTypes.object,
3781
+ height: PropTypes.object,
3782
+ iconColor: PropTypes.object
3783
+ };
3784
+
3785
+ var imageFallback = function imageFallback() {
3786
+ return /*#__PURE__*/React.createElement("div", {
3787
+ className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
3788
+ }, /*#__PURE__*/React.createElement("figure", {
3789
+ className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
3790
+ }, /*#__PURE__*/React.createElement(ImageFallbackIcon, null)));
3791
+ };
3792
+
3793
+ var FallbackImage = function FallbackImage(_ref) {
3794
+ var slug = _ref.slug;
3795
+
3796
+ if (slug) {
3797
+ return /*#__PURE__*/React.createElement(Link, {
3798
+ href: slug,
3799
+ "aria-label": "image-fallback"
3800
+ }, imageFallback());
3801
+ } else {
3802
+ return imageFallback();
3803
+ }
3804
+ };
3805
+ FallbackImage.propTypes = {
3806
+ slug: PropTypes.string
3807
+ };
3808
+
3809
+ var HyperLinkIcon = function HyperLinkIcon() {
3810
+ return /*#__PURE__*/React.createElement("svg", {
3811
+ xmlns: "http://www.w3.org/2000/svg",
3812
+ width: "36",
3813
+ height: "28"
3814
+ }, /*#__PURE__*/React.createElement("g", {
3815
+ fill: "none",
3816
+ fillRule: "evenodd"
3817
+ }, /*#__PURE__*/React.createElement("rect", {
3818
+ width: "36",
3819
+ height: "28",
3820
+ fill: "#3D6FCF",
3821
+ rx: "4"
3822
+ }), /*#__PURE__*/React.createElement("path", {
3823
+ stroke: "#FFF",
3824
+ strokeLinecap: "round",
3825
+ strokeLinejoin: "round",
3826
+ strokeWidth: "2",
3827
+ d: "M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"
3828
+ })));
3829
+ };
3830
+
3831
+ var HyperLink = function HyperLink(_ref) {
3832
+ var _ref$hyperLink = _ref.hyperLink,
3833
+ hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
3834
+ if (!hyperLink) return null;
3835
+ return /*#__PURE__*/React.createElement(Link, {
3836
+ href: hyperLink,
3837
+ "aria-label": "hyperlink-button",
3838
+ className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
3839
+ target: "_blank",
3840
+ rel: "noopener noreferrer"
3841
+ }, /*#__PURE__*/React.createElement(HyperLinkIcon, null));
3842
+ };
3843
+ HyperLink.propTypes = {
3844
+ hyperLink: PropTypes.string
3845
+ };
3846
+
3847
+ var _styleModuleImportMap$3 = {
3848
+ "./hero-image.m.css": {
3849
+ "hero-image": "hero-image-m_hero-image__3lraV",
3850
+ "right-padding": "hero-image-m_right-padding__1LkCe",
3851
+ "left-padding": "hero-image-m_left-padding__pYRAj",
3852
+ "right-padding-mob": "hero-image-m_right-padding-mob__3-uOU",
3853
+ "placeholder": "hero-image-m_placeholder__1omCm",
3854
+ "hero-image-mob": "hero-image-m_hero-image-mob__13JJp",
3855
+ "with-padding": "hero-image-m_with-padding__324G_",
3856
+ "image": "hero-image-m_image__1mz0U"
3857
+ }
3858
+ };
3859
+ var HeroImage = function HeroImage(_ref) {
3860
+ var story = _ref.story,
3861
+ FullBleed = _ref.FullBleed,
3862
+ aspectRatio = _ref.aspectRatio,
3863
+ defaultWidth = _ref.defaultWidth,
3864
+ widths = _ref.widths,
3865
+ isHorizontal = _ref.isHorizontal,
3866
+ isHorizontalMobile = _ref.isHorizontalMobile,
3867
+ isHorizontalWithImageLast = _ref.isHorizontalWithImageLast,
3868
+ defaultFallback = _ref.defaultFallback,
3869
+ isStoryPageImage = _ref.isStoryPageImage,
3870
+ config = _ref.config;
3871
+
3872
+ var _ref2 = useStateValue() || {},
3873
+ _ref2$fallbackImageUr = _ref2.fallbackImageUrl,
3874
+ fallbackImageUrl = _ref2$fallbackImageUr === void 0 ? "" : _ref2$fallbackImageUr;
3875
+
3876
+ var _config$StoryTemplate = config.StoryTemplateIcon,
3877
+ StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
3878
+ return null;
3879
+ } : _config$StoryTemplate;
3880
+ var showImagePlaceholder = useSelector(function (state) {
3881
+ return get_1(state, ["qt", "config", "showPlaceholder"]);
3882
+ });
3883
+ var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
3884
+ var fullBleed = FullBleed ? "" : "with-padding";
3885
+ var heroImageClass = "hero-image";
3886
+ if (isHorizontal) heroImageClass = "right-padding";else if (isHorizontalWithImageLast) heroImageClass = "left-padding";
3887
+ var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
3888
+
3889
+ var getPadding = function getPadding(aspectRatio) {
3890
+ var _aspectRatio = _slicedToArray(aspectRatio, 2),
3891
+ height = _aspectRatio[0],
3892
+ width = _aspectRatio[1];
3893
+
3894
+ if (height > 0 && width > 0) {
3895
+ var padding = width / height * 100;
3896
+ return padding;
3897
+ }
3898
+
3899
+ return 0;
3900
+ };
3901
+
3902
+ var _aspectRatio2 = _slicedToArray(aspectRatio, 2),
3903
+ mobileAspectRatio = _aspectRatio2[0],
3904
+ _aspectRatio2$ = _aspectRatio2[1],
3905
+ desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
3906
+
3907
+ var isMobile = clientWidth("mobile");
3908
+ var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
3909
+ var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
3910
+ var slug = get_1(story, ["hero-image-s3-key"]) || get_1(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
3911
+ var hyperLink = get_1(story, ["hero-image-hyperlink"], "");
3912
+
3913
+ var fallbackImage = function fallbackImage() {
3914
+ if (!slug) {
3915
+ if (fallbackImageUrl && !isStoryPageImage) {
3916
+ return /*#__PURE__*/React.createElement("figure", {
3917
+ style: {
3918
+ paddingTop: imagePadding + "%"
3919
+ },
3920
+ className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$3)
3921
+ }, /*#__PURE__*/React.createElement("img", {
3922
+ className: "qt-image",
3923
+ "data-src": "".concat(fallbackImageUrl),
3924
+ alt: "image-fallback"
3925
+ }));
3926
+ }
3927
+
3928
+ return /*#__PURE__*/React.createElement(React.Fragment, null, defaultFallback ? /*#__PURE__*/React.createElement("div", {
3929
+ "data-test-id": "arr--fallback-hero-image",
3930
+ style: {
3931
+ paddingTop: imagePadding + "%"
3932
+ },
3933
+ className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$3)
3934
+ }, /*#__PURE__*/React.createElement(StoryTemplateIcon, {
3935
+ storyTemplate: story["story-template"]
3936
+ }), /*#__PURE__*/React.createElement(FallbackImage, null)) : null);
3937
+ }
3938
+
3939
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("figure", {
3940
+ style: {
3941
+ paddingTop: imagePadding + "%"
3942
+ },
3943
+ className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$3)
3944
+ }, /*#__PURE__*/React.createElement(StoryTemplateIcon, {
3945
+ storyTemplate: story["story-template"]
3946
+ }), /*#__PURE__*/React.createElement(ResponsiveHeroImage, {
3947
+ story: story,
3948
+ aspectRatio: imageAspectRatio,
3949
+ defaultWidth: defaultWidth,
3950
+ widths: widths,
3951
+ imgParams: {
3952
+ auto: ["format", "compress"],
3953
+ fit: "max"
3954
+ }
3955
+ })), isStoryPageImage && hyperLink && /*#__PURE__*/React.createElement(HyperLink, {
3956
+ hyperLink: hyperLink
3957
+ }));
3958
+ };
3959
+
3960
+ return story && (isStoryPageImage ? /*#__PURE__*/React.createElement("div", {
3961
+ "data-test-id": "arr--hero-image",
3962
+ className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$3)
3963
+ }, fallbackImage()) : /*#__PURE__*/React.createElement(Link, {
3964
+ "data-test-id": "arr--hero-image",
3965
+ href: getStoryUrl(story, "/".concat(story.slug)),
3966
+ externalLink: isExternalStory(story),
3967
+ "aria-label": "fallback-hero-image",
3968
+ className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$3)
3969
+ }, fallbackImage()));
3970
+ };
3971
+ HeroImage.propTypes = {
3972
+ /** The Story Object from the API response */
3973
+ story: PropTypes.object.isRequired,
3974
+
3975
+ /** Removes the Hero Image padding for the image to bleed over the margin */
3976
+ FullBleed: PropTypes.bool,
3977
+
3978
+ /** The default width for the image, in case the browser does not support srcset */
3979
+ defaultWidth: PropTypes.number,
3980
+
3981
+ /** The list of available widths */
3982
+ widths: PropTypes.array,
3983
+ // fatch the correct hero image
3984
+ aspectRatio: PropTypes.array,
3985
+ // Hints for the browser to choose the best size
3986
+
3987
+ /** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
3988
+ isHorizontal: PropTypes.bool,
3989
+
3990
+ /** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
3991
+ isHorizontalMobile: PropTypes.bool,
3992
+ // this prop is responsive for rendering fallback image on story page
3993
+ defaultFallback: PropTypes.bool,
3994
+ isHorizontalWithImageLast: PropTypes.bool,
3995
+ isStoryPageImage: PropTypes.bool,
3996
+ config: PropTypes.object
3997
+ };
3998
+ HeroImage.defaultProps = {
3999
+ FullBleed: true,
4000
+ aspectRatio: [[1, 1], [16, 9]],
4001
+ defaultWidth: 480,
4002
+ widths: [250, 480, 640],
4003
+ isHorizontal: false,
4004
+ isHorizontalMobile: false,
4005
+ defaultFallback: true,
4006
+ isStoryPageImage: false,
4007
+ isHorizontalWithImageLast: false,
4008
+ config: {}
4009
+ };
4010
+
4011
+ var _styleModuleImportMap$2 = {
4012
+ "./section.m.css": {
4013
+ "section": "section-m_section__2N4S3",
4014
+ "section-borderBottomSml": "section-m_section-borderBottomSml__2GNbo",
4015
+ "border-bottom": "section-m_border-bottom__3cRoD",
4016
+ "section-borderLeft": "section-m_section-borderLeft__3hKVj",
4017
+ "border-left": "section-m_border-left__2oUyp",
4018
+ "section-solid": "section-m_section-solid__1vB1Q",
4019
+ "dark": "section-m_dark__1r3C4",
4020
+ "light": "section-m_light__306hW"
4021
+ }
4022
+ };
4023
+ var SectionTag = function SectionTag(_ref) {
4024
+ var story = _ref.story,
4025
+ _ref$template = _ref.template,
4026
+ template = _ref$template === void 0 ? "" : _ref$template,
4027
+ _ref$borderColor = _ref.borderColor,
4028
+ borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
4029
+ isLightTheme = _ref.isLightTheme;
4030
+ var config = useStateValue() || {};
4031
+ var isSection = get_1(config, ["showSection"], true);
4032
+ var templateFromRowContext = get_1(config, ["sectionTagTemplate"]);
4033
+ var section = get_1(story, ["sections", 0], "");
4034
+ var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
4035
+ var getUrl = section ? section["section-url"] : "/";
4036
+ var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
4037
+ var textColor = isLightTheme ? "light" : getTextColor(colorToApplyContrast);
4038
+ var sectionTagBorderColor = rgbToHex(borderColor);
4039
+ var templateStyle = supportedTemplates.includes(template) ? "section section-".concat(template) : "section";
4040
+
4041
+ if (templateFromRowContext) {
4042
+ templateStyle = supportedTemplates.includes(templateFromRowContext) ? "section section-".concat(templateFromRowContext) : "section";
4043
+ }
4044
+
4045
+ if (!isSection) return null;
4046
+ return /*#__PURE__*/React.createElement(Link, {
4047
+ href: getUrl,
4048
+ className: "arrow-component arr--section-name",
4049
+ "aria-label": "section-name"
4050
+ }, /*#__PURE__*/React.createElement("div", {
4051
+ "data-test-id": "sectionTag",
4052
+ style: {
4053
+ backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
4054
+ },
4055
+ className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$2)
4056
+ }, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React.createElement("span", {
4057
+ className: "section-m_border-left__2oUyp",
4058
+ style: {
4059
+ color: sectionTagBorderColor
4060
+ }
4061
+ }), section["display-name"] || section["name"], /*#__PURE__*/React.createElement("div", {
4062
+ className: "section-m_border-bottom__3cRoD",
4063
+ style: {
4064
+ backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
4065
+ }
4066
+ })));
4067
+ };
4068
+ SectionTag.propTypes = {
4069
+ /** The Story Object from the API response */
4070
+ story: PropTypes.object.isRequired,
4071
+
4072
+ /** The style template for section tag */
4073
+ template: PropTypes.oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
4074
+ borderColor: PropTypes.string,
4075
+ solidBorderColor: PropTypes.string,
4076
+ isLightTheme: PropTypes.bool
4077
+ };
4078
+ SectionTag.defaultProps = {
4079
+ template: "",
4080
+ isLightTheme: false
4081
+ };
4082
+
4083
+ var _styleModuleImportMap$1 = {
4084
+ "./storycard.m.css": {
4085
+ "author-timestamp-wrapper": "storycard-m_author-timestamp-wrapper__20yjp",
4086
+ "default-card": "storycard-m_default-card__1-POn",
4087
+ "horizontal-card": "storycard-m_horizontal-card___7afz",
4088
+ "backgroung-img": "storycard-m_backgroung-img__1FMJT",
4089
+ "content-overlap": "storycard-m_content-overlap__1yNHR",
4090
+ "border-full": "storycard-m_border-full__1nhy7",
4091
+ "light": "storycard-m_light__3EhXN",
4092
+ "dark": "storycard-m_dark__2wCTq",
4093
+ "border-bottom": "storycard-m_border-bottom__2_E-I",
4094
+ "border-boxShadow": "storycard-m_border-boxShadow__2-k3Z",
4095
+ "center-align": "storycard-m_center-align__1Sn8-",
4096
+ "content-bottom": "storycard-m_content-bottom__1QHeC",
4097
+ "content-full": "storycard-m_content-full__2zJmU",
4098
+ "content-boxShadow": "storycard-m_content-boxShadow__2IAWZ",
4099
+ "hero-image": "storycard-m_hero-image__1H3MB",
4100
+ "right-padding": "storycard-m_right-padding__12-lQ",
4101
+ "horizontal-mob": "storycard-m_horizontal-mob__17JG2",
4102
+ "content": "storycard-m_content__1Q9vq",
4103
+ "border-default": "storycard-m_border-default__PEZ1x",
4104
+ "card": "storycard-m_card__KJwRa",
4105
+ "horizontal-image-last": "storycard-m_horizontal-image-last__3o6LY"
4106
+ }
4107
+ };
4108
+ var StoryCard = function StoryCard(_ref) {
4109
+ var story = _ref.story,
4110
+ children = _ref.children,
4111
+ isHorizontal = _ref.isHorizontal,
4112
+ aspectRatio = _ref.aspectRatio,
4113
+ border = _ref.border,
4114
+ useImageAsBackground = _ref.useImageAsBackground,
4115
+ bgImgContentOverlap = _ref.bgImgContentOverlap,
4116
+ theme = _ref.theme,
4117
+ borderColor = _ref.borderColor,
4118
+ isHorizontalMobile = _ref.isHorizontalMobile,
4119
+ centerAlign = _ref.centerAlign,
4120
+ headerLevel = _ref.headerLevel,
4121
+ hideAuthorImage = _ref.hideAuthorImage,
4122
+ prefix = _ref.prefix,
4123
+ config = _ref.config,
4124
+ isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
4125
+ if (!story || isEmpty(story)) return /*#__PURE__*/React.createElement("div", null);
4126
+ var borderOptions = ["default", "full", "bottom", "boxShadow"];
4127
+ var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
4128
+
4129
+ var horizontalCardStyle = "default-card";
4130
+ if (isHorizontal) horizontalCardStyle = "horizontal-card";else if (isHorizontalWithImageLast) horizontalCardStyle = "horizontal-image-last";
4131
+ var bgImageClasses = useImageAsBackground ? "backgroung-img" : "";
4132
+ var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
4133
+ var textColor = getTextColor(theme);
4134
+ var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
4135
+ var defaultStorycard = /*#__PURE__*/React.createElement(DefaultStoryCard, {
4136
+ story: story,
4137
+ aspectRatio: aspectRatio,
4138
+ border: border,
4139
+ isHorizontalMobile: isHorizontalMobile,
4140
+ isHorizontal: isHorizontal,
4141
+ centerAlign: centerAlign,
4142
+ headerLevel: headerLevel,
4143
+ borderColor: borderColor,
4144
+ hideAuthorImage: hideAuthorImage,
4145
+ prefix: prefix,
4146
+ config: config,
4147
+ isHorizontalWithImageLast: isHorizontalWithImageLast
4148
+ });
4149
+ return /*#__PURE__*/React.createElement("div", {
4150
+ "data-test-id": "story-card",
4151
+ style: {
4152
+ backgroundColor: theme,
4153
+ color: textColor
4154
+ },
4155
+ className: "arr--story-card " + _getClassName("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$1)
4156
+ }, children || defaultStorycard);
4157
+ };
4158
+
4159
+ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
4160
+ var story = _ref2.story;
4161
+ _ref2.border;
4162
+ var isHorizontal = _ref2.isHorizontal,
4163
+ aspectRatio = _ref2.aspectRatio,
4164
+ headerLevel = _ref2.headerLevel,
4165
+ _ref2$isHorizontalMob = _ref2.isHorizontalMobile,
4166
+ isHorizontalMobile = _ref2$isHorizontalMob === void 0 ? false : _ref2$isHorizontalMob,
4167
+ _ref2$centerAlign = _ref2.centerAlign,
4168
+ centerAlign = _ref2$centerAlign === void 0 ? false : _ref2$centerAlign,
4169
+ borderColor = _ref2.borderColor,
4170
+ hideAuthorImage = _ref2.hideAuthorImage,
4171
+ prefix = _ref2.prefix,
4172
+ isHorizontalWithImageLast = _ref2.isHorizontalWithImageLast,
4173
+ config = _ref2.config;
4174
+ var alignment = centerAlign ? "center-align" : "";
4175
+ var SectionTagborderColor = rgbToHex(borderColor);
4176
+ var _config$localizationC = config.localizationConfig,
4177
+ localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
4178
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isHorizontal ? /*#__PURE__*/React.createElement(HeroImage, {
4179
+ config: config,
4180
+ story: story,
4181
+ isHorizontal: true,
4182
+ isHorizontalMobile: isHorizontalMobile,
4183
+ aspectRatio: aspectRatio
4184
+ }) : isHorizontalWithImageLast ? /*#__PURE__*/React.createElement(HeroImage, {
4185
+ config: config,
4186
+ story: story,
4187
+ isHorizontalWithImageLast: true,
4188
+ isHorizontalMobile: isHorizontalMobile,
4189
+ aspectRatio: aspectRatio
4190
+ }) : /*#__PURE__*/React.createElement(HeroImage, {
4191
+ story: story,
4192
+ config: config,
4193
+ isHorizontalMobile: isHorizontalMobile,
4194
+ aspectRatio: aspectRatio
4195
+ }), /*#__PURE__*/React.createElement("div", {
4196
+ className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$1)
4197
+ }, /*#__PURE__*/React.createElement(SectionTag, {
4198
+ story: story,
4199
+ borderColor: SectionTagborderColor
4200
+ }), /*#__PURE__*/React.createElement(Headline, {
4201
+ story: story,
4202
+ headerLevel: headerLevel,
4203
+ premiumStoryIconConfig: config
4204
+ }), /*#__PURE__*/React.createElement(AuthorWithTime, {
4205
+ config: localizationConfig,
4206
+ story: story,
4207
+ isBottom: true,
4208
+ prefix: prefix,
4209
+ hideAuthorImage: hideAuthorImage
4210
+ }), /*#__PURE__*/React.createElement(Subheadline, {
4211
+ story: story
4212
+ })));
4213
+ };
4214
+
4215
+ DefaultStoryCard.propTypes = {
4216
+ story: PropTypes.object.isRequired,
4217
+ border: PropTypes.oneOfType([PropTypes.string]),
4218
+ isBottom: PropTypes.bool,
4219
+ isHorizontal: PropTypes.bool,
4220
+ aspectRatio: PropTypes.oneOfType([PropTypes.array]),
4221
+ isHorizontalMobile: PropTypes.bool,
4222
+ centerAlign: PropTypes.bool,
4223
+ headerLevel: PropTypes.string,
4224
+ borderColor: PropTypes.string,
4225
+ hideAuthorImage: PropTypes.bool,
4226
+ prefix: PropTypes.string,
4227
+ config: PropTypes.object,
4228
+ isHorizontalWithImageLast: PropTypes.bool
4229
+ };
4230
+ StoryCard.propTypes = {
4231
+ /** The Story Object from the API response */
4232
+ story: PropTypes.object.isRequired,
4233
+ children: PropTypes.node,
4234
+
4235
+ /** Flip the Story Card to Horizonal mode */
4236
+ isHorizontal: PropTypes.bool,
4237
+
4238
+ /** Add border to the Story Card */
4239
+ border: PropTypes.oneOfType([PropTypes.string]),
4240
+ // story card with background image
4241
+ useImageAsBackground: PropTypes.bool,
4242
+ // story card content overlap with image
4243
+ bgImgContentOverlap: PropTypes.bool,
4244
+
4245
+ /** add aspect ratio for hero image */
4246
+ aspectRatio: PropTypes.oneOfType([PropTypes.array]),
4247
+
4248
+ /** add theme(dark /light/custom color) for storycard */
4249
+ theme: PropTypes.string,
4250
+
4251
+ /** flip the story card mobile design horizontal */
4252
+ isHorizontalMobile: PropTypes.bool,
4253
+ // make content center align in desktop and left align in mobile
4254
+ centerAlign: PropTypes.bool,
4255
+ headerLevel: PropTypes.string,
4256
+ borderColor: PropTypes.string,
4257
+ // handle author image through storycard
4258
+ hideAuthorImage: PropTypes.bool,
4259
+ // handle author prefix through storycard
4260
+ prefix: PropTypes.string,
4261
+ config: PropTypes.object,
4262
+ isHorizontalWithImageLast: PropTypes.bool
4263
+ };
4264
+ StoryCard.defaultProps = {
4265
+ isHorizontal: false,
4266
+ isHorizontalMobile: false,
4267
+ border: "default",
4268
+ theme: "",
4269
+ centerAlign: false,
4270
+ borderColor: "",
4271
+ isHorizontalWithImageLast: false
4272
+ };
4273
+
4274
+ var Loading = function Loading(_ref) {
4275
+ _ref.width;
4276
+ _ref.height;
4277
+ _ref.iconColor;
4278
+ return /*#__PURE__*/React.createElement("div", {
4279
+ className: "loading-m_loading-indicator__2Dlst"
4280
+ }, /*#__PURE__*/React.createElement("svg", {
4281
+ width: "40",
4282
+ height: "40",
4283
+ xmlns: "http://www.w3.org/2000/svg",
4284
+ viewBox: "0 0 100 100",
4285
+ preserveAspectRatio: "xMidYMid"
4286
+ }, /*#__PURE__*/React.createElement("circle", {
4287
+ cx: "84",
4288
+ cy: "50",
4289
+ r: "0",
4290
+ fill: "currentColor"
4291
+ }, /*#__PURE__*/React.createElement("animate", {
4292
+ attributeName: "r",
4293
+ values: "10;0;0;0;0",
4294
+ keyTimes: "0;0.25;0.5;0.75;1",
4295
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4296
+ calcMode: "spline",
4297
+ dur: "2s",
4298
+ repeatCount: "indefinite",
4299
+ begin: "0s"
4300
+ }), /*#__PURE__*/React.createElement("animate", {
4301
+ attributeName: "cx",
4302
+ values: "84;84;84;84;84",
4303
+ keyTimes: "0;0.25;0.5;0.75;1",
4304
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4305
+ calcMode: "spline",
4306
+ dur: "2s",
4307
+ repeatCount: "indefinite",
4308
+ begin: "0s"
4309
+ })), /*#__PURE__*/React.createElement("circle", {
4310
+ cx: "84",
4311
+ cy: "50",
4312
+ r: ".709",
4313
+ fill: "currentColor"
4314
+ }, /*#__PURE__*/React.createElement("animate", {
4315
+ attributeName: "r",
4316
+ values: "0;10;10;10;0",
4317
+ keyTimes: "0;0.25;0.5;0.75;1",
4318
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4319
+ calcMode: "spline",
4320
+ dur: "2s",
4321
+ repeatCount: "indefinite",
4322
+ begin: "-1s"
4323
+ }), /*#__PURE__*/React.createElement("animate", {
4324
+ attributeName: "cx",
4325
+ values: "16;16;50;84;84",
4326
+ keyTimes: "0;0.25;0.5;0.75;1",
4327
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4328
+ calcMode: "spline",
4329
+ dur: "2s",
4330
+ repeatCount: "indefinite",
4331
+ begin: "-1s"
4332
+ })), /*#__PURE__*/React.createElement("circle", {
4333
+ cx: "81.59",
4334
+ cy: "50",
4335
+ r: "10",
4336
+ fill: "currentColor"
4337
+ }, /*#__PURE__*/React.createElement("animate", {
4338
+ attributeName: "r",
4339
+ values: "0;10;10;10;0",
4340
+ keyTimes: "0;0.25;0.5;0.75;1",
4341
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4342
+ calcMode: "spline",
4343
+ dur: "2s",
4344
+ repeatCount: "indefinite",
4345
+ begin: "-0.5s"
4346
+ }), /*#__PURE__*/React.createElement("animate", {
4347
+ attributeName: "cx",
4348
+ values: "16;16;50;84;84",
4349
+ keyTimes: "0;0.25;0.5;0.75;1",
4350
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4351
+ calcMode: "spline",
4352
+ dur: "2s",
4353
+ repeatCount: "indefinite",
4354
+ begin: "-0.5s"
4355
+ })), /*#__PURE__*/React.createElement("circle", {
4356
+ cx: "47.59",
4357
+ cy: "50",
4358
+ r: "10",
4359
+ fill: "currentColor"
4360
+ }, /*#__PURE__*/React.createElement("animate", {
4361
+ attributeName: "r",
4362
+ values: "0;10;10;10;0",
4363
+ keyTimes: "0;0.25;0.5;0.75;1",
4364
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4365
+ calcMode: "spline",
4366
+ dur: "2s",
4367
+ repeatCount: "indefinite",
4368
+ begin: "0s"
4369
+ }), /*#__PURE__*/React.createElement("animate", {
4370
+ attributeName: "cx",
4371
+ values: "16;16;50;84;84",
4372
+ keyTimes: "0;0.25;0.5;0.75;1",
4373
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4374
+ calcMode: "spline",
4375
+ dur: "2s",
4376
+ repeatCount: "indefinite",
4377
+ begin: "0s"
4378
+ })), /*#__PURE__*/React.createElement("circle", {
4379
+ cx: "16",
4380
+ cy: "50",
4381
+ r: "9.291",
4382
+ fill: "currentColor"
4383
+ }, /*#__PURE__*/React.createElement("animate", {
4384
+ attributeName: "r",
4385
+ values: "0;0;10;10;10",
4386
+ keyTimes: "0;0.25;0.5;0.75;1",
4387
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4388
+ calcMode: "spline",
4389
+ dur: "2s",
4390
+ repeatCount: "indefinite",
4391
+ begin: "0s"
4392
+ }), /*#__PURE__*/React.createElement("animate", {
4393
+ attributeName: "cx",
4394
+ values: "16;16;16;50;84",
4395
+ keyTimes: "0;0.25;0.5;0.75;1",
4396
+ keySplines: "0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",
4397
+ calcMode: "spline",
4398
+ dur: "2s",
4399
+ repeatCount: "indefinite",
4400
+ begin: "0s"
4401
+ }))));
4402
+ };
4403
+ Loading.propTypes = {
4404
+ width: PropTypes.object,
4405
+ height: PropTypes.object,
4406
+ iconColor: PropTypes.object
4407
+ };
4408
+
4409
+ var _styleModuleImportMap = {
4410
+ "./astrology-collection.m.css": {
4411
+ "wrapper": "astrology-collection-m_wrapper__ywsE4",
4412
+ "collection-borderBottom": "astrology-collection-m_collection-borderBottom__14ao3",
4413
+ "collection-borderLeft": "astrology-collection-m_collection-borderLeft__2mK72",
4414
+ "collection-summary": "astrology-collection-m_collection-summary__1FPnb",
4415
+ "tab": "astrology-collection-m_tab__23HlB",
4416
+ "child-collections": "astrology-collection-m_child-collections__2RMob",
4417
+ "child-collection": "astrology-collection-m_child-collection__28kAh",
4418
+ "dark": "astrology-collection-m_dark__36rM-",
4419
+ "light": "astrology-collection-m_light__3iJtV",
4420
+ "open-subchild": "astrology-collection-m_open-subchild__HAXhU",
4421
+ "main-wrapper": "astrology-collection-m_main-wrapper__iLjDo",
4422
+ "main-wrapper-container": "astrology-collection-m_main-wrapper-container__14hWe",
4423
+ "subCollection-stories": "astrology-collection-m_subCollection-stories__2CcHk",
4424
+ "fadeIn": "astrology-collection-m_fadeIn__3nv3m",
4425
+ "card": "astrology-collection-m_card__20FnI",
4426
+ "nomore-stories": "astrology-collection-m_nomore-stories__1Rxb8",
4427
+ "ads": "astrology-collection-m_ads__2XMEk"
4428
+ }
4429
+ };
4430
+
4431
+ 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; }
4432
+
4433
+ 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; }
4434
+ var AstrologyCollectionBase = function AstrologyCollectionBase(_ref) {
4435
+ var collection = _ref.collection,
4436
+ _ref$config = _ref.config,
4437
+ config = _ref$config === void 0 ? {} : _ref$config;
4438
+ var _config$collectionNam = config.collectionNameBorderColor,
4439
+ collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
4440
+ _config$theme = config.theme,
4441
+ theme = _config$theme === void 0 ? "" : _config$theme,
4442
+ _config$border = config.border,
4443
+ border = _config$border === void 0 ? "" : _config$border,
4444
+ _config$collectionNam2 = config.collectionNameTemplate,
4445
+ collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
4446
+ _config$footerButton = config.footerButton,
4447
+ footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
4448
+ _config$slotConfig = config.slotConfig,
4449
+ slotConfig = _config$slotConfig === void 0 ? [] : _config$slotConfig;
4450
+
4451
+ var _useState = useState([]),
4452
+ _useState2 = _slicedToArray(_useState, 2),
4453
+ subCollectionStories = _useState2[0],
4454
+ handleApiData = _useState2[1];
4455
+
4456
+ var _useState3 = useState({}),
4457
+ _useState4 = _slicedToArray(_useState3, 2),
4458
+ cachedStories = _useState4[0],
4459
+ updateCachedStories = _useState4[1];
4460
+
4461
+ var _useState5 = useState(0),
4462
+ _useState6 = _slicedToArray(_useState5, 2),
4463
+ active = _useState6[0],
4464
+ handleActive = _useState6[1];
4465
+
4466
+ var _useState7 = useState(true),
4467
+ _useState8 = _slicedToArray(_useState7, 2),
4468
+ loading = _useState8[0],
4469
+ handleLoading = _useState8[1];
4470
+
4471
+ var _get = get_1(slotConfig, [0], {}),
4472
+ _get$type = _get.type,
4473
+ type = _get$type === void 0 ? "story" : _get$type,
4474
+ component = _get.component;
4475
+
4476
+ var isAdWidgetEnabled = type === "ad" || type === "widget";
4477
+ var adWidgetSlot = isAdWidgetEnabled ? getSlot(type, component) : null;
4478
+ var getFilteredCollection = get_1(collection, ["items"], []).filter(function (collections) {
4479
+ return collections.type === "collection";
4480
+ });
4481
+
4482
+ if (getFilteredCollection.length < 1) {
4483
+ return null;
4484
+ }
4485
+
4486
+ var filteredCollectionids = getFilteredCollection.map(function (subCol) {
4487
+ return subCol.id;
4488
+ });
4489
+
4490
+ var memoizeStories = function memoizeStories(id, data) {
4491
+ updateCachedStories(function (cachedStories) {
4492
+ return _objectSpread(_objectSpread({}, cachedStories), {}, _defineProperty({}, id, data));
4493
+ });
4494
+ };
4495
+
4496
+ function fetchSubCollectionData() {
4497
+ return _fetchSubCollectionData.apply(this, arguments);
4498
+ }
4499
+
4500
+ function _fetchSubCollectionData() {
4501
+ _fetchSubCollectionData = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
4502
+ var id,
4503
+ data,
4504
+ res,
4505
+ childCollectionItems,
4506
+ _args = arguments;
4507
+ return regenerator.wrap(function _callee$(_context) {
4508
+ while (1) {
4509
+ switch (_context.prev = _context.next) {
4510
+ case 0:
4511
+ id = _args.length > 0 && _args[0] !== undefined ? _args[0] : filteredCollectionids[0];
4512
+ handleLoading(true);
4513
+ _context.prev = 2;
4514
+ data = {};
4515
+
4516
+ if (id in cachedStories) {
4517
+ _context.next = 11;
4518
+ break;
4519
+ }
4520
+
4521
+ _context.next = 7;
4522
+ return axios.get("/api/v1/collections/".concat(id, "?limit=7"));
4523
+
4524
+ case 7:
4525
+ res = _context.sent;
4526
+ data = res.data;
4527
+ _context.next = 12;
4528
+ break;
4529
+
4530
+ case 11:
4531
+ data = cachedStories[id];
4532
+
4533
+ case 12:
4534
+ memoizeStories(id, data);
4535
+ childCollectionItems = collectionToStories(data);
4536
+ handleLoading(false);
4537
+ handleApiData(childCollectionItems);
4538
+ _context.next = 21;
4539
+ break;
4540
+
4541
+ case 18:
4542
+ _context.prev = 18;
4543
+ _context.t0 = _context["catch"](2);
4544
+ // eslint-disable-next-line no-console
4545
+ console.error("API call failed", _context.t0);
4546
+
4547
+ case 21:
4548
+ case "end":
4549
+ return _context.stop();
4550
+ }
4551
+ }
4552
+ }, _callee, null, [[2, 18]]);
4553
+ }));
4554
+ return _fetchSubCollectionData.apply(this, arguments);
4555
+ }
4556
+
4557
+ useEffect(function (id) {
4558
+ fetchSubCollectionData(id);
4559
+ }, []);
4560
+ var dispatch = useDispatch();
4561
+ var qtConfig = useSelector(function (state) {
4562
+ return get_1(state, ["qt", "config"], {});
4563
+ });
4564
+ var url = generateNavigateSlug(getFilteredCollection[active], qtConfig);
4565
+ var items = subCollectionStories.slice(0, 12);
4566
+ var textColor = getTextColor(theme);
4567
+
4568
+ var openChildCollectionItems = function openChildCollectionItems(event, index, slug) {
4569
+ event.stopPropagation();
4570
+ fetchSubCollectionData(slug);
4571
+ var activeIndex = active === index ? 0 : index;
4572
+ handleActive(activeIndex);
4573
+ };
4574
+
4575
+ return /*#__PURE__*/React.createElement("div", {
4576
+ className: "full-width-with-padding arrow-component",
4577
+ "data-test-id": "astrology-collection",
4578
+ style: {
4579
+ backgroundColor: theme,
4580
+ color: textColor
4581
+ }
4582
+ }, /*#__PURE__*/React.createElement("div", {
4583
+ className: "astrology-collection-m_wrapper__ywsE4"
4584
+ }, /*#__PURE__*/React.createElement(CollectionName, {
4585
+ collection: collection,
4586
+ collectionNameTemplate: collectionNameTemplate,
4587
+ collectionNameBorderColor: collectionNameBorderColor
4588
+ }), collection.summary && /*#__PURE__*/React.createElement("div", {
4589
+ "data-test-id": "astrology-collection-summary",
4590
+ className: _getClassName("collection-summary ".concat(textColor), _styleModuleImportMap)
4591
+ }, collection.summary), /*#__PURE__*/React.createElement("div", {
4592
+ className: "astrology-collection-m_tab__23HlB",
4593
+ "data-test-id": "collection-tab"
4594
+ }, /*#__PURE__*/React.createElement("ul", {
4595
+ className: "astrology-collection-m_child-collections__2RMob"
4596
+ }, getFilteredCollection.map(function (subCollections, index) {
4597
+ return /*#__PURE__*/React.createElement("li", {
4598
+ key: "tab-".concat(index),
4599
+ onClick: function onClick(event) {
4600
+ return openChildCollectionItems(event, index, subCollections.id);
4601
+ },
4602
+ "data-test-id": subCollections.name,
4603
+ className: _getClassName("child-collection ".concat(textColor, " ").concat(index === active ? "open-subchild" : ""), _styleModuleImportMap)
4604
+ }, subCollections.name);
4605
+ }))), /*#__PURE__*/React.createElement("div", {
4606
+ className: _getClassName(isAdWidgetEnabled ? "main-wrapper" : "main-wrapper-container", _styleModuleImportMap)
4607
+ }, /*#__PURE__*/React.createElement("div", null, loading ? /*#__PURE__*/React.createElement(Loading, null) : /*#__PURE__*/React.createElement("div", {
4608
+ className: "astrology-collection-m_subCollection-stories__2CcHk"
4609
+ }, items.length === 0 && /*#__PURE__*/React.createElement("p", {
4610
+ className: "astrology-collection-m_nomore-stories__1Rxb8"
4611
+ }, "No more stories to load."), items.map(function (story, index) {
4612
+ return /*#__PURE__*/React.createElement("div", {
4613
+ className: "astrology-collection-m_card__20FnI",
4614
+ key: "card-".concat(index)
4615
+ }, /*#__PURE__*/React.createElement(StoryCard, {
4616
+ story: story,
4617
+ border: border,
4618
+ theme: theme,
4619
+ config: config
4620
+ }, /*#__PURE__*/React.createElement(HeroImage, {
4621
+ story: story,
4622
+ aspectRatio: [[1, 1]]
4623
+ }), /*#__PURE__*/React.createElement(Headline, {
4624
+ story: story,
4625
+ headerLevel: 6,
4626
+ premiumStoryIconConfig: config
4627
+ })));
4628
+ }))), isAdWidgetEnabled && /*#__PURE__*/React.createElement("div", {
4629
+ className: "astrology-collection-m_ads__2XMEk"
4630
+ }, " ", adWidgetSlot)), items.length >= 12 && /*#__PURE__*/React.createElement(LoadmoreButton, {
4631
+ collection: getFilteredCollection[active],
4632
+ template: footerButton,
4633
+ config: config,
4634
+ navigate: function navigate() {
4635
+ return navigateTo(dispatch, url);
4636
+ },
4637
+ qtConfig: qtConfig
4638
+ })));
4639
+ };
4640
+ AstrologyCollectionBase.propTypes = {
4641
+ /** collection is the array of objects which is returning by API */
4642
+ collection: PropTypes.object.isRequired,
4643
+
4644
+ /** The config for the Row */
4645
+ config: PropTypes.shape({
4646
+ // background color of the row
4647
+ theme: PropTypes.string,
4648
+ border: PropTypes.string,
4649
+ collectionNameTemplate: PropTypes.string,
4650
+ footerButton: PropTypes.string,
4651
+ collectionNameBorderColor: PropTypes.string
4652
+ })
4653
+ };
4654
+ AstrologyCollectionBase.defaultProps = {
4655
+ theme: "#ffffff",
4656
+ slotConfig: "story",
4657
+ border: ""
4658
+ };
4659
+ var AstrologyCollection = StateProvider(AstrologyCollectionBase);
4660
+
4661
+ export { AstrologyCollection, AstrologyCollectionBase };