@quintype/arrow 3.15.1-perf.1 → 3.15.1-perf.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +48 -2128
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +116 -2556
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +48 -2127
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-6f8c780e.js → index-0f809dd9.js} +73 -62
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-2d713010.js → index-37a9ccff.js} +63 -47
- package/atoms/ExtendedLoadMore/{index-8345922c.js → index-446679c8.js} +67 -51
- package/atoms/ExtendedLoadMore/{index-6daa674c.js → index-44f97338.js} +86 -68
- package/atoms/ExtendedLoadMore/{index-c8f346d0.js → index-57dd4870.js} +80 -64
- package/atoms/ExtendedLoadMore/{index-7eb05b3d.js → index-66dd4dbd.js} +70 -54
- package/atoms/ExtendedLoadMore/{index-6cb56d1a.js → index-8462c597.js} +93 -80
- package/atoms/ExtendedLoadMore/{index-aa8b8ab8.js → index-93cb06d1.js} +252 -226
- package/atoms/ExtendedLoadMore/index-afd44863.js +95 -0
- package/atoms/ExtendedLoadMore/{index-5a7900ba.js → index-b5754c5d.js} +67 -53
- package/atoms/ExtendedLoadMore/{index-4191a84c.js → index-bbaf526e.js} +78 -62
- package/atoms/ExtendedLoadMore/{index-99af722e.js → index-cfb262ef.js} +65 -48
- package/atoms/ExtendedLoadMore/index.js +20 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +95 -2175
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +91 -2230
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +40 -2133
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +89 -2241
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +40 -2120
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +35 -2115
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +43 -2483
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +95 -2606
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +59 -2487
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +213 -2800
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +308 -2816
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +611 -3352
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +218 -2658
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +438 -2993
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +432 -2987
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +411 -2966
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +183 -2890
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +217 -2936
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +453 -3008
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +439 -2959
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +374 -2872
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +426 -2927
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +430 -2931
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +368 -2894
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +387 -2900
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +443 -2963
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +444 -2964
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +403 -2923
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +422 -2942
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +390 -2910
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +398 -2918
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +189 -2375
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +128 -2580
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +125 -2577
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +408 -2928
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +439 -2940
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +308 -2800
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +405 -2906
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +432 -2987
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +35 -1833
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +421 -2922
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +358 -2871
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +428 -2929
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +406 -2926
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +400 -2920
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +383 -2909
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +395 -2915
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +398 -2924
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +400 -2920
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +398 -2924
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +418 -2938
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +392 -2912
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +92 -2229
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +53 -1899
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +49 -1895
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +79 -2206
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +52 -1957
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +147 -2329
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +135 -2317
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +173 -2355
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +79 -2207
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +52 -1898
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +53 -1899
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +34 -1738
- package/story-elements/Summary/index.js +56 -1902
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +48 -2176
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +35 -1739
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +1182 -4038
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +1377 -4233
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +1162 -4018
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +1277 -4133
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +1231 -4087
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e39b3ca8.js +0 -3023
- package/atoms/ExtendedLoadMore/index-f6e578e3.js +0 -86
|
@@ -1,2273 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
var Op = Object.prototype;
|
|
30
|
-
var hasOwn = Op.hasOwnProperty;
|
|
31
|
-
var undefined$1; // More compressible than void 0.
|
|
32
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
33
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
34
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
35
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
36
|
-
|
|
37
|
-
function define(obj, key, value) {
|
|
38
|
-
Object.defineProperty(obj, key, {
|
|
39
|
-
value: value,
|
|
40
|
-
enumerable: true,
|
|
41
|
-
configurable: true,
|
|
42
|
-
writable: true
|
|
43
|
-
});
|
|
44
|
-
return obj[key];
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
48
|
-
define({}, "");
|
|
49
|
-
} catch (err) {
|
|
50
|
-
define = function(obj, key, value) {
|
|
51
|
-
return obj[key] = value;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
56
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
57
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
58
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
59
|
-
var context = new Context(tryLocsList || []);
|
|
60
|
-
|
|
61
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
62
|
-
// .throw, and .return methods.
|
|
63
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
64
|
-
|
|
65
|
-
return generator;
|
|
66
|
-
}
|
|
67
|
-
exports.wrap = wrap;
|
|
68
|
-
|
|
69
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
70
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
71
|
-
// have been (and was previously) designed to take a closure to be
|
|
72
|
-
// invoked without arguments, but in all the cases we care about we
|
|
73
|
-
// already have an existing method we want to call, so there's no need
|
|
74
|
-
// to create a new function object. We can even get away with assuming
|
|
75
|
-
// the method takes exactly one argument, since that happens to be true
|
|
76
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
77
|
-
// only additional allocation required is the completion record, which
|
|
78
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
79
|
-
function tryCatch(fn, obj, arg) {
|
|
80
|
-
try {
|
|
81
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
82
|
-
} catch (err) {
|
|
83
|
-
return { type: "throw", arg: err };
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
88
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
89
|
-
var GenStateExecuting = "executing";
|
|
90
|
-
var GenStateCompleted = "completed";
|
|
91
|
-
|
|
92
|
-
// Returning this object from the innerFn has the same effect as
|
|
93
|
-
// breaking out of the dispatch switch statement.
|
|
94
|
-
var ContinueSentinel = {};
|
|
95
|
-
|
|
96
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
97
|
-
// .constructor.prototype properties for functions that return Generator
|
|
98
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
99
|
-
// minifier not to mangle the names of these two functions.
|
|
100
|
-
function Generator() {}
|
|
101
|
-
function GeneratorFunction() {}
|
|
102
|
-
function GeneratorFunctionPrototype() {}
|
|
103
|
-
|
|
104
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
105
|
-
// don't natively support it.
|
|
106
|
-
var IteratorPrototype = {};
|
|
107
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
108
|
-
return this;
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
var getProto = Object.getPrototypeOf;
|
|
112
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
113
|
-
if (NativeIteratorPrototype &&
|
|
114
|
-
NativeIteratorPrototype !== Op &&
|
|
115
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
116
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
117
|
-
// of the polyfill.
|
|
118
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
122
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
123
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
124
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
125
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
126
|
-
GeneratorFunction.displayName = define(
|
|
127
|
-
GeneratorFunctionPrototype,
|
|
128
|
-
toStringTagSymbol,
|
|
129
|
-
"GeneratorFunction"
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
133
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
134
|
-
function defineIteratorMethods(prototype) {
|
|
135
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
136
|
-
define(prototype, method, function(arg) {
|
|
137
|
-
return this._invoke(method, arg);
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
143
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
144
|
-
return ctor
|
|
145
|
-
? ctor === GeneratorFunction ||
|
|
146
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
147
|
-
// do is to check its .name property.
|
|
148
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
149
|
-
: false;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
exports.mark = function(genFun) {
|
|
153
|
-
if (Object.setPrototypeOf) {
|
|
154
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
155
|
-
} else {
|
|
156
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
157
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
158
|
-
}
|
|
159
|
-
genFun.prototype = Object.create(Gp);
|
|
160
|
-
return genFun;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
// Within the body of any async function, `await x` is transformed to
|
|
164
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
165
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
166
|
-
// meant to be awaited.
|
|
167
|
-
exports.awrap = function(arg) {
|
|
168
|
-
return { __await: arg };
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
172
|
-
function invoke(method, arg, resolve, reject) {
|
|
173
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
174
|
-
if (record.type === "throw") {
|
|
175
|
-
reject(record.arg);
|
|
176
|
-
} else {
|
|
177
|
-
var result = record.arg;
|
|
178
|
-
var value = result.value;
|
|
179
|
-
if (value &&
|
|
180
|
-
typeof value === "object" &&
|
|
181
|
-
hasOwn.call(value, "__await")) {
|
|
182
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
183
|
-
invoke("next", value, resolve, reject);
|
|
184
|
-
}, function(err) {
|
|
185
|
-
invoke("throw", err, resolve, reject);
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
190
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
191
|
-
// the .value of the Promise<{value,done}> result for the
|
|
192
|
-
// current iteration.
|
|
193
|
-
result.value = unwrapped;
|
|
194
|
-
resolve(result);
|
|
195
|
-
}, function(error) {
|
|
196
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
197
|
-
// into the async generator function so it can be handled there.
|
|
198
|
-
return invoke("throw", error, resolve, reject);
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
var previousPromise;
|
|
204
|
-
|
|
205
|
-
function enqueue(method, arg) {
|
|
206
|
-
function callInvokeWithMethodAndArg() {
|
|
207
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
208
|
-
invoke(method, arg, resolve, reject);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
return previousPromise =
|
|
213
|
-
// If enqueue has been called before, then we want to wait until
|
|
214
|
-
// all previous Promises have been resolved before calling invoke,
|
|
215
|
-
// so that results are always delivered in the correct order. If
|
|
216
|
-
// enqueue has not been called before, then it is important to
|
|
217
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
218
|
-
// so that the async generator function has the opportunity to do
|
|
219
|
-
// any necessary setup in a predictable way. This predictability
|
|
220
|
-
// is why the Promise constructor synchronously invokes its
|
|
221
|
-
// executor callback, and why async functions synchronously
|
|
222
|
-
// execute code before the first await. Since we implement simple
|
|
223
|
-
// async functions in terms of async generators, it is especially
|
|
224
|
-
// important to get this right, even though it requires care.
|
|
225
|
-
previousPromise ? previousPromise.then(
|
|
226
|
-
callInvokeWithMethodAndArg,
|
|
227
|
-
// Avoid propagating failures to Promises returned by later
|
|
228
|
-
// invocations of the iterator.
|
|
229
|
-
callInvokeWithMethodAndArg
|
|
230
|
-
) : callInvokeWithMethodAndArg();
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Define the unified helper method that is used to implement .next,
|
|
234
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
235
|
-
this._invoke = enqueue;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
239
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
240
|
-
return this;
|
|
241
|
-
});
|
|
242
|
-
exports.AsyncIterator = AsyncIterator;
|
|
243
|
-
|
|
244
|
-
// Note that simple async functions are implemented on top of
|
|
245
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
246
|
-
// the final result produced by the iterator.
|
|
247
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
248
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
249
|
-
|
|
250
|
-
var iter = new AsyncIterator(
|
|
251
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
252
|
-
PromiseImpl
|
|
253
|
-
);
|
|
254
|
-
|
|
255
|
-
return exports.isGeneratorFunction(outerFn)
|
|
256
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
257
|
-
: iter.next().then(function(result) {
|
|
258
|
-
return result.done ? result.value : iter.next();
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
263
|
-
var state = GenStateSuspendedStart;
|
|
264
|
-
|
|
265
|
-
return function invoke(method, arg) {
|
|
266
|
-
if (state === GenStateExecuting) {
|
|
267
|
-
throw new Error("Generator is already running");
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (state === GenStateCompleted) {
|
|
271
|
-
if (method === "throw") {
|
|
272
|
-
throw arg;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
276
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
277
|
-
return doneResult();
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
context.method = method;
|
|
281
|
-
context.arg = arg;
|
|
282
|
-
|
|
283
|
-
while (true) {
|
|
284
|
-
var delegate = context.delegate;
|
|
285
|
-
if (delegate) {
|
|
286
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
287
|
-
if (delegateResult) {
|
|
288
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
289
|
-
return delegateResult;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
if (context.method === "next") {
|
|
294
|
-
// Setting context._sent for legacy support of Babel's
|
|
295
|
-
// function.sent implementation.
|
|
296
|
-
context.sent = context._sent = context.arg;
|
|
297
|
-
|
|
298
|
-
} else if (context.method === "throw") {
|
|
299
|
-
if (state === GenStateSuspendedStart) {
|
|
300
|
-
state = GenStateCompleted;
|
|
301
|
-
throw context.arg;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
context.dispatchException(context.arg);
|
|
305
|
-
|
|
306
|
-
} else if (context.method === "return") {
|
|
307
|
-
context.abrupt("return", context.arg);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
state = GenStateExecuting;
|
|
311
|
-
|
|
312
|
-
var record = tryCatch(innerFn, self, context);
|
|
313
|
-
if (record.type === "normal") {
|
|
314
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
315
|
-
// GenStateExecuting and loop back for another invocation.
|
|
316
|
-
state = context.done
|
|
317
|
-
? GenStateCompleted
|
|
318
|
-
: GenStateSuspendedYield;
|
|
319
|
-
|
|
320
|
-
if (record.arg === ContinueSentinel) {
|
|
321
|
-
continue;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
return {
|
|
325
|
-
value: record.arg,
|
|
326
|
-
done: context.done
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
} else if (record.type === "throw") {
|
|
330
|
-
state = GenStateCompleted;
|
|
331
|
-
// Dispatch the exception by looping back around to the
|
|
332
|
-
// context.dispatchException(context.arg) call above.
|
|
333
|
-
context.method = "throw";
|
|
334
|
-
context.arg = record.arg;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
341
|
-
// result, either by returning a { value, done } result from the
|
|
342
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
343
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
344
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
345
|
-
var method = delegate.iterator[context.method];
|
|
346
|
-
if (method === undefined$1) {
|
|
347
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
348
|
-
// method always terminates the yield* loop.
|
|
349
|
-
context.delegate = null;
|
|
350
|
-
|
|
351
|
-
if (context.method === "throw") {
|
|
352
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
353
|
-
if (delegate.iterator["return"]) {
|
|
354
|
-
// If the delegate iterator has a return method, give it a
|
|
355
|
-
// chance to clean up.
|
|
356
|
-
context.method = "return";
|
|
357
|
-
context.arg = undefined$1;
|
|
358
|
-
maybeInvokeDelegate(delegate, context);
|
|
359
|
-
|
|
360
|
-
if (context.method === "throw") {
|
|
361
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
362
|
-
// "return" to "throw", let that override the TypeError below.
|
|
363
|
-
return ContinueSentinel;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
context.method = "throw";
|
|
368
|
-
context.arg = new TypeError(
|
|
369
|
-
"The iterator does not provide a 'throw' method");
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
return ContinueSentinel;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
376
|
-
|
|
377
|
-
if (record.type === "throw") {
|
|
378
|
-
context.method = "throw";
|
|
379
|
-
context.arg = record.arg;
|
|
380
|
-
context.delegate = null;
|
|
381
|
-
return ContinueSentinel;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
var info = record.arg;
|
|
385
|
-
|
|
386
|
-
if (! info) {
|
|
387
|
-
context.method = "throw";
|
|
388
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
389
|
-
context.delegate = null;
|
|
390
|
-
return ContinueSentinel;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
if (info.done) {
|
|
394
|
-
// Assign the result of the finished delegate to the temporary
|
|
395
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
396
|
-
context[delegate.resultName] = info.value;
|
|
397
|
-
|
|
398
|
-
// Resume execution at the desired location (see delegateYield).
|
|
399
|
-
context.next = delegate.nextLoc;
|
|
400
|
-
|
|
401
|
-
// If context.method was "throw" but the delegate handled the
|
|
402
|
-
// exception, let the outer generator proceed normally. If
|
|
403
|
-
// context.method was "next", forget context.arg since it has been
|
|
404
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
405
|
-
// "return", allow the original .return call to continue in the
|
|
406
|
-
// outer generator.
|
|
407
|
-
if (context.method !== "return") {
|
|
408
|
-
context.method = "next";
|
|
409
|
-
context.arg = undefined$1;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
} else {
|
|
413
|
-
// Re-yield the result returned by the delegate method.
|
|
414
|
-
return info;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
418
|
-
// the outer generator.
|
|
419
|
-
context.delegate = null;
|
|
420
|
-
return ContinueSentinel;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
424
|
-
// unified ._invoke helper method.
|
|
425
|
-
defineIteratorMethods(Gp);
|
|
426
|
-
|
|
427
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
428
|
-
|
|
429
|
-
// A Generator should always return itself as the iterator object when the
|
|
430
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
431
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
432
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
433
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
434
|
-
define(Gp, iteratorSymbol, function() {
|
|
435
|
-
return this;
|
|
436
|
-
});
|
|
437
|
-
|
|
438
|
-
define(Gp, "toString", function() {
|
|
439
|
-
return "[object Generator]";
|
|
440
|
-
});
|
|
441
|
-
|
|
442
|
-
function pushTryEntry(locs) {
|
|
443
|
-
var entry = { tryLoc: locs[0] };
|
|
444
|
-
|
|
445
|
-
if (1 in locs) {
|
|
446
|
-
entry.catchLoc = locs[1];
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
if (2 in locs) {
|
|
450
|
-
entry.finallyLoc = locs[2];
|
|
451
|
-
entry.afterLoc = locs[3];
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
this.tryEntries.push(entry);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
function resetTryEntry(entry) {
|
|
458
|
-
var record = entry.completion || {};
|
|
459
|
-
record.type = "normal";
|
|
460
|
-
delete record.arg;
|
|
461
|
-
entry.completion = record;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
function Context(tryLocsList) {
|
|
465
|
-
// The root entry object (effectively a try statement without a catch
|
|
466
|
-
// or a finally block) gives us a place to store values thrown from
|
|
467
|
-
// locations where there is no enclosing try statement.
|
|
468
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
469
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
470
|
-
this.reset(true);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
exports.keys = function(object) {
|
|
474
|
-
var keys = [];
|
|
475
|
-
for (var key in object) {
|
|
476
|
-
keys.push(key);
|
|
477
|
-
}
|
|
478
|
-
keys.reverse();
|
|
479
|
-
|
|
480
|
-
// Rather than returning an object with a next method, we keep
|
|
481
|
-
// things simple and return the next function itself.
|
|
482
|
-
return function next() {
|
|
483
|
-
while (keys.length) {
|
|
484
|
-
var key = keys.pop();
|
|
485
|
-
if (key in object) {
|
|
486
|
-
next.value = key;
|
|
487
|
-
next.done = false;
|
|
488
|
-
return next;
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
// To avoid creating an additional object, we just hang the .value
|
|
493
|
-
// and .done properties off the next function object itself. This
|
|
494
|
-
// also ensures that the minifier will not anonymize the function.
|
|
495
|
-
next.done = true;
|
|
496
|
-
return next;
|
|
497
|
-
};
|
|
498
|
-
};
|
|
499
|
-
|
|
500
|
-
function values(iterable) {
|
|
501
|
-
if (iterable) {
|
|
502
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
503
|
-
if (iteratorMethod) {
|
|
504
|
-
return iteratorMethod.call(iterable);
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
if (typeof iterable.next === "function") {
|
|
508
|
-
return iterable;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
if (!isNaN(iterable.length)) {
|
|
512
|
-
var i = -1, next = function next() {
|
|
513
|
-
while (++i < iterable.length) {
|
|
514
|
-
if (hasOwn.call(iterable, i)) {
|
|
515
|
-
next.value = iterable[i];
|
|
516
|
-
next.done = false;
|
|
517
|
-
return next;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
next.value = undefined$1;
|
|
522
|
-
next.done = true;
|
|
523
|
-
|
|
524
|
-
return next;
|
|
525
|
-
};
|
|
526
|
-
|
|
527
|
-
return next.next = next;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
// Return an iterator with no values.
|
|
532
|
-
return { next: doneResult };
|
|
533
|
-
}
|
|
534
|
-
exports.values = values;
|
|
535
|
-
|
|
536
|
-
function doneResult() {
|
|
537
|
-
return { value: undefined$1, done: true };
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
Context.prototype = {
|
|
541
|
-
constructor: Context,
|
|
542
|
-
|
|
543
|
-
reset: function(skipTempReset) {
|
|
544
|
-
this.prev = 0;
|
|
545
|
-
this.next = 0;
|
|
546
|
-
// Resetting context._sent for legacy support of Babel's
|
|
547
|
-
// function.sent implementation.
|
|
548
|
-
this.sent = this._sent = undefined$1;
|
|
549
|
-
this.done = false;
|
|
550
|
-
this.delegate = null;
|
|
551
|
-
|
|
552
|
-
this.method = "next";
|
|
553
|
-
this.arg = undefined$1;
|
|
554
|
-
|
|
555
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
556
|
-
|
|
557
|
-
if (!skipTempReset) {
|
|
558
|
-
for (var name in this) {
|
|
559
|
-
// Not sure about the optimal order of these conditions:
|
|
560
|
-
if (name.charAt(0) === "t" &&
|
|
561
|
-
hasOwn.call(this, name) &&
|
|
562
|
-
!isNaN(+name.slice(1))) {
|
|
563
|
-
this[name] = undefined$1;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
},
|
|
568
|
-
|
|
569
|
-
stop: function() {
|
|
570
|
-
this.done = true;
|
|
571
|
-
|
|
572
|
-
var rootEntry = this.tryEntries[0];
|
|
573
|
-
var rootRecord = rootEntry.completion;
|
|
574
|
-
if (rootRecord.type === "throw") {
|
|
575
|
-
throw rootRecord.arg;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
return this.rval;
|
|
579
|
-
},
|
|
580
|
-
|
|
581
|
-
dispatchException: function(exception) {
|
|
582
|
-
if (this.done) {
|
|
583
|
-
throw exception;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
var context = this;
|
|
587
|
-
function handle(loc, caught) {
|
|
588
|
-
record.type = "throw";
|
|
589
|
-
record.arg = exception;
|
|
590
|
-
context.next = loc;
|
|
591
|
-
|
|
592
|
-
if (caught) {
|
|
593
|
-
// If the dispatched exception was caught by a catch block,
|
|
594
|
-
// then let that catch block handle the exception normally.
|
|
595
|
-
context.method = "next";
|
|
596
|
-
context.arg = undefined$1;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
return !! caught;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
603
|
-
var entry = this.tryEntries[i];
|
|
604
|
-
var record = entry.completion;
|
|
605
|
-
|
|
606
|
-
if (entry.tryLoc === "root") {
|
|
607
|
-
// Exception thrown outside of any try block that could handle
|
|
608
|
-
// it, so set the completion value of the entire function to
|
|
609
|
-
// throw the exception.
|
|
610
|
-
return handle("end");
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
if (entry.tryLoc <= this.prev) {
|
|
614
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
615
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
616
|
-
|
|
617
|
-
if (hasCatch && hasFinally) {
|
|
618
|
-
if (this.prev < entry.catchLoc) {
|
|
619
|
-
return handle(entry.catchLoc, true);
|
|
620
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
621
|
-
return handle(entry.finallyLoc);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
} else if (hasCatch) {
|
|
625
|
-
if (this.prev < entry.catchLoc) {
|
|
626
|
-
return handle(entry.catchLoc, true);
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
} else if (hasFinally) {
|
|
630
|
-
if (this.prev < entry.finallyLoc) {
|
|
631
|
-
return handle(entry.finallyLoc);
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
} else {
|
|
635
|
-
throw new Error("try statement without catch or finally");
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
},
|
|
640
|
-
|
|
641
|
-
abrupt: function(type, arg) {
|
|
642
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
643
|
-
var entry = this.tryEntries[i];
|
|
644
|
-
if (entry.tryLoc <= this.prev &&
|
|
645
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
646
|
-
this.prev < entry.finallyLoc) {
|
|
647
|
-
var finallyEntry = entry;
|
|
648
|
-
break;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
if (finallyEntry &&
|
|
653
|
-
(type === "break" ||
|
|
654
|
-
type === "continue") &&
|
|
655
|
-
finallyEntry.tryLoc <= arg &&
|
|
656
|
-
arg <= finallyEntry.finallyLoc) {
|
|
657
|
-
// Ignore the finally entry if control is not jumping to a
|
|
658
|
-
// location outside the try/catch block.
|
|
659
|
-
finallyEntry = null;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
663
|
-
record.type = type;
|
|
664
|
-
record.arg = arg;
|
|
665
|
-
|
|
666
|
-
if (finallyEntry) {
|
|
667
|
-
this.method = "next";
|
|
668
|
-
this.next = finallyEntry.finallyLoc;
|
|
669
|
-
return ContinueSentinel;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
return this.complete(record);
|
|
673
|
-
},
|
|
674
|
-
|
|
675
|
-
complete: function(record, afterLoc) {
|
|
676
|
-
if (record.type === "throw") {
|
|
677
|
-
throw record.arg;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
if (record.type === "break" ||
|
|
681
|
-
record.type === "continue") {
|
|
682
|
-
this.next = record.arg;
|
|
683
|
-
} else if (record.type === "return") {
|
|
684
|
-
this.rval = this.arg = record.arg;
|
|
685
|
-
this.method = "return";
|
|
686
|
-
this.next = "end";
|
|
687
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
688
|
-
this.next = afterLoc;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
return ContinueSentinel;
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
finish: function(finallyLoc) {
|
|
695
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
696
|
-
var entry = this.tryEntries[i];
|
|
697
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
698
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
699
|
-
resetTryEntry(entry);
|
|
700
|
-
return ContinueSentinel;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
|
|
705
|
-
"catch": function(tryLoc) {
|
|
706
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
707
|
-
var entry = this.tryEntries[i];
|
|
708
|
-
if (entry.tryLoc === tryLoc) {
|
|
709
|
-
var record = entry.completion;
|
|
710
|
-
if (record.type === "throw") {
|
|
711
|
-
var thrown = record.arg;
|
|
712
|
-
resetTryEntry(entry);
|
|
713
|
-
}
|
|
714
|
-
return thrown;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
// The context.catch method must only be called with a location
|
|
719
|
-
// argument that corresponds to a known catch block.
|
|
720
|
-
throw new Error("illegal catch attempt");
|
|
721
|
-
},
|
|
722
|
-
|
|
723
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
724
|
-
this.delegate = {
|
|
725
|
-
iterator: values(iterable),
|
|
726
|
-
resultName: resultName,
|
|
727
|
-
nextLoc: nextLoc
|
|
728
|
-
};
|
|
729
|
-
|
|
730
|
-
if (this.method === "next") {
|
|
731
|
-
// Deliberately forget the last sent value so that we don't
|
|
732
|
-
// accidentally pass it on to the delegate.
|
|
733
|
-
this.arg = undefined$1;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
return ContinueSentinel;
|
|
737
|
-
}
|
|
738
|
-
};
|
|
739
|
-
|
|
740
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
741
|
-
// or not, return the runtime object so that we can declare the variable
|
|
742
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
743
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
744
|
-
return exports;
|
|
745
|
-
|
|
746
|
-
}(
|
|
747
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
748
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
749
|
-
// object. Either way, the resulting object will be used to initialize
|
|
750
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
751
|
-
module.exports
|
|
752
|
-
));
|
|
753
|
-
|
|
754
|
-
try {
|
|
755
|
-
regeneratorRuntime = runtime;
|
|
756
|
-
} catch (accidentalStrictMode) {
|
|
757
|
-
// This module should not be running in strict mode, so the above
|
|
758
|
-
// assignment should always work unless something is misconfigured. Just
|
|
759
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
760
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
761
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
762
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
763
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
764
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
765
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
766
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
767
|
-
if (typeof globalThis === "object") {
|
|
768
|
-
globalThis.regeneratorRuntime = runtime;
|
|
769
|
-
} else {
|
|
770
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
});
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* Checks if `value` is classified as an `Array` object.
|
|
777
|
-
*
|
|
778
|
-
* @static
|
|
779
|
-
* @memberOf _
|
|
780
|
-
* @since 0.1.0
|
|
781
|
-
* @category Lang
|
|
782
|
-
* @param {*} value The value to check.
|
|
783
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
784
|
-
* @example
|
|
785
|
-
*
|
|
786
|
-
* _.isArray([1, 2, 3]);
|
|
787
|
-
* // => true
|
|
788
|
-
*
|
|
789
|
-
* _.isArray(document.body.children);
|
|
790
|
-
* // => false
|
|
791
|
-
*
|
|
792
|
-
* _.isArray('abc');
|
|
793
|
-
* // => false
|
|
794
|
-
*
|
|
795
|
-
* _.isArray(_.noop);
|
|
796
|
-
* // => false
|
|
797
|
-
*/
|
|
798
|
-
var isArray = Array.isArray;
|
|
799
|
-
|
|
800
|
-
var isArray_1 = isArray;
|
|
801
|
-
|
|
802
|
-
/** Detect free variable `global` from Node.js. */
|
|
803
|
-
|
|
804
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
805
|
-
|
|
806
|
-
var _freeGlobal = freeGlobal;
|
|
807
|
-
|
|
808
|
-
/** Detect free variable `self`. */
|
|
809
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
810
|
-
|
|
811
|
-
/** Used as a reference to the global object. */
|
|
812
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
813
|
-
|
|
814
|
-
var _root = root;
|
|
815
|
-
|
|
816
|
-
/** Built-in value references. */
|
|
817
|
-
var Symbol$1 = _root.Symbol;
|
|
818
|
-
|
|
819
|
-
var _Symbol = Symbol$1;
|
|
820
|
-
|
|
821
|
-
/** Used for built-in method references. */
|
|
822
|
-
var objectProto$4 = Object.prototype;
|
|
823
|
-
|
|
824
|
-
/** Used to check objects for own properties. */
|
|
825
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* Used to resolve the
|
|
829
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
830
|
-
* of values.
|
|
831
|
-
*/
|
|
832
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
833
|
-
|
|
834
|
-
/** Built-in value references. */
|
|
835
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
839
|
-
*
|
|
840
|
-
* @private
|
|
841
|
-
* @param {*} value The value to query.
|
|
842
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
843
|
-
*/
|
|
844
|
-
function getRawTag(value) {
|
|
845
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
846
|
-
tag = value[symToStringTag$1];
|
|
847
|
-
|
|
848
|
-
try {
|
|
849
|
-
value[symToStringTag$1] = undefined;
|
|
850
|
-
var unmasked = true;
|
|
851
|
-
} catch (e) {}
|
|
852
|
-
|
|
853
|
-
var result = nativeObjectToString$1.call(value);
|
|
854
|
-
if (unmasked) {
|
|
855
|
-
if (isOwn) {
|
|
856
|
-
value[symToStringTag$1] = tag;
|
|
857
|
-
} else {
|
|
858
|
-
delete value[symToStringTag$1];
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
return result;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
var _getRawTag = getRawTag;
|
|
865
|
-
|
|
866
|
-
/** Used for built-in method references. */
|
|
867
|
-
var objectProto$3 = Object.prototype;
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* Used to resolve the
|
|
871
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
872
|
-
* of values.
|
|
873
|
-
*/
|
|
874
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
875
|
-
|
|
876
|
-
/**
|
|
877
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
878
|
-
*
|
|
879
|
-
* @private
|
|
880
|
-
* @param {*} value The value to convert.
|
|
881
|
-
* @returns {string} Returns the converted string.
|
|
882
|
-
*/
|
|
883
|
-
function objectToString(value) {
|
|
884
|
-
return nativeObjectToString.call(value);
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
var _objectToString = objectToString;
|
|
888
|
-
|
|
889
|
-
/** `Object#toString` result references. */
|
|
890
|
-
var nullTag = '[object Null]',
|
|
891
|
-
undefinedTag = '[object Undefined]';
|
|
892
|
-
|
|
893
|
-
/** Built-in value references. */
|
|
894
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
898
|
-
*
|
|
899
|
-
* @private
|
|
900
|
-
* @param {*} value The value to query.
|
|
901
|
-
* @returns {string} Returns the `toStringTag`.
|
|
902
|
-
*/
|
|
903
|
-
function baseGetTag(value) {
|
|
904
|
-
if (value == null) {
|
|
905
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
906
|
-
}
|
|
907
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
908
|
-
? _getRawTag(value)
|
|
909
|
-
: _objectToString(value);
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
var _baseGetTag = baseGetTag;
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
916
|
-
* and has a `typeof` result of "object".
|
|
917
|
-
*
|
|
918
|
-
* @static
|
|
919
|
-
* @memberOf _
|
|
920
|
-
* @since 4.0.0
|
|
921
|
-
* @category Lang
|
|
922
|
-
* @param {*} value The value to check.
|
|
923
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
924
|
-
* @example
|
|
925
|
-
*
|
|
926
|
-
* _.isObjectLike({});
|
|
927
|
-
* // => true
|
|
928
|
-
*
|
|
929
|
-
* _.isObjectLike([1, 2, 3]);
|
|
930
|
-
* // => true
|
|
931
|
-
*
|
|
932
|
-
* _.isObjectLike(_.noop);
|
|
933
|
-
* // => false
|
|
934
|
-
*
|
|
935
|
-
* _.isObjectLike(null);
|
|
936
|
-
* // => false
|
|
937
|
-
*/
|
|
938
|
-
function isObjectLike(value) {
|
|
939
|
-
return value != null && typeof value == 'object';
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
var isObjectLike_1 = isObjectLike;
|
|
943
|
-
|
|
944
|
-
/** `Object#toString` result references. */
|
|
945
|
-
var symbolTag = '[object Symbol]';
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
949
|
-
*
|
|
950
|
-
* @static
|
|
951
|
-
* @memberOf _
|
|
952
|
-
* @since 4.0.0
|
|
953
|
-
* @category Lang
|
|
954
|
-
* @param {*} value The value to check.
|
|
955
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
956
|
-
* @example
|
|
957
|
-
*
|
|
958
|
-
* _.isSymbol(Symbol.iterator);
|
|
959
|
-
* // => true
|
|
960
|
-
*
|
|
961
|
-
* _.isSymbol('abc');
|
|
962
|
-
* // => false
|
|
963
|
-
*/
|
|
964
|
-
function isSymbol(value) {
|
|
965
|
-
return typeof value == 'symbol' ||
|
|
966
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
var isSymbol_1 = isSymbol;
|
|
970
|
-
|
|
971
|
-
/** Used to match property names within property paths. */
|
|
972
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
973
|
-
reIsPlainProp = /^\w*$/;
|
|
974
|
-
|
|
975
|
-
/**
|
|
976
|
-
* Checks if `value` is a property name and not a property path.
|
|
977
|
-
*
|
|
978
|
-
* @private
|
|
979
|
-
* @param {*} value The value to check.
|
|
980
|
-
* @param {Object} [object] The object to query keys on.
|
|
981
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
982
|
-
*/
|
|
983
|
-
function isKey(value, object) {
|
|
984
|
-
if (isArray_1(value)) {
|
|
985
|
-
return false;
|
|
986
|
-
}
|
|
987
|
-
var type = typeof value;
|
|
988
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
989
|
-
value == null || isSymbol_1(value)) {
|
|
990
|
-
return true;
|
|
991
|
-
}
|
|
992
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
993
|
-
(object != null && value in Object(object));
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
var _isKey = isKey;
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* Checks if `value` is the
|
|
1000
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1001
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1002
|
-
*
|
|
1003
|
-
* @static
|
|
1004
|
-
* @memberOf _
|
|
1005
|
-
* @since 0.1.0
|
|
1006
|
-
* @category Lang
|
|
1007
|
-
* @param {*} value The value to check.
|
|
1008
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1009
|
-
* @example
|
|
1010
|
-
*
|
|
1011
|
-
* _.isObject({});
|
|
1012
|
-
* // => true
|
|
1013
|
-
*
|
|
1014
|
-
* _.isObject([1, 2, 3]);
|
|
1015
|
-
* // => true
|
|
1016
|
-
*
|
|
1017
|
-
* _.isObject(_.noop);
|
|
1018
|
-
* // => true
|
|
1019
|
-
*
|
|
1020
|
-
* _.isObject(null);
|
|
1021
|
-
* // => false
|
|
1022
|
-
*/
|
|
1023
|
-
function isObject(value) {
|
|
1024
|
-
var type = typeof value;
|
|
1025
|
-
return value != null && (type == 'object' || type == 'function');
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
var isObject_1 = isObject;
|
|
1029
|
-
|
|
1030
|
-
/** `Object#toString` result references. */
|
|
1031
|
-
var asyncTag = '[object AsyncFunction]',
|
|
1032
|
-
funcTag = '[object Function]',
|
|
1033
|
-
genTag = '[object GeneratorFunction]',
|
|
1034
|
-
proxyTag = '[object Proxy]';
|
|
1035
|
-
|
|
1036
|
-
/**
|
|
1037
|
-
* Checks if `value` is classified as a `Function` object.
|
|
1038
|
-
*
|
|
1039
|
-
* @static
|
|
1040
|
-
* @memberOf _
|
|
1041
|
-
* @since 0.1.0
|
|
1042
|
-
* @category Lang
|
|
1043
|
-
* @param {*} value The value to check.
|
|
1044
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1045
|
-
* @example
|
|
1046
|
-
*
|
|
1047
|
-
* _.isFunction(_);
|
|
1048
|
-
* // => true
|
|
1049
|
-
*
|
|
1050
|
-
* _.isFunction(/abc/);
|
|
1051
|
-
* // => false
|
|
1052
|
-
*/
|
|
1053
|
-
function isFunction(value) {
|
|
1054
|
-
if (!isObject_1(value)) {
|
|
1055
|
-
return false;
|
|
1056
|
-
}
|
|
1057
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1058
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1059
|
-
var tag = _baseGetTag(value);
|
|
1060
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
var isFunction_1 = isFunction;
|
|
1064
|
-
|
|
1065
|
-
/** Used to detect overreaching core-js shims. */
|
|
1066
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
1067
|
-
|
|
1068
|
-
var _coreJsData = coreJsData;
|
|
1069
|
-
|
|
1070
|
-
/** Used to detect methods masquerading as native. */
|
|
1071
|
-
var maskSrcKey = (function() {
|
|
1072
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
1073
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1074
|
-
}());
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* Checks if `func` has its source masked.
|
|
1078
|
-
*
|
|
1079
|
-
* @private
|
|
1080
|
-
* @param {Function} func The function to check.
|
|
1081
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1082
|
-
*/
|
|
1083
|
-
function isMasked(func) {
|
|
1084
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
var _isMasked = isMasked;
|
|
1088
|
-
|
|
1089
|
-
/** Used for built-in method references. */
|
|
1090
|
-
var funcProto$1 = Function.prototype;
|
|
1091
|
-
|
|
1092
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1093
|
-
var funcToString$1 = funcProto$1.toString;
|
|
1094
|
-
|
|
1095
|
-
/**
|
|
1096
|
-
* Converts `func` to its source code.
|
|
1097
|
-
*
|
|
1098
|
-
* @private
|
|
1099
|
-
* @param {Function} func The function to convert.
|
|
1100
|
-
* @returns {string} Returns the source code.
|
|
1101
|
-
*/
|
|
1102
|
-
function toSource(func) {
|
|
1103
|
-
if (func != null) {
|
|
1104
|
-
try {
|
|
1105
|
-
return funcToString$1.call(func);
|
|
1106
|
-
} catch (e) {}
|
|
1107
|
-
try {
|
|
1108
|
-
return (func + '');
|
|
1109
|
-
} catch (e) {}
|
|
1110
|
-
}
|
|
1111
|
-
return '';
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
var _toSource = toSource;
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* Used to match `RegExp`
|
|
1118
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1119
|
-
*/
|
|
1120
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1121
|
-
|
|
1122
|
-
/** Used to detect host constructors (Safari). */
|
|
1123
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1124
|
-
|
|
1125
|
-
/** Used for built-in method references. */
|
|
1126
|
-
var funcProto = Function.prototype,
|
|
1127
|
-
objectProto$2 = Object.prototype;
|
|
1128
|
-
|
|
1129
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1130
|
-
var funcToString = funcProto.toString;
|
|
1131
|
-
|
|
1132
|
-
/** Used to check objects for own properties. */
|
|
1133
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1134
|
-
|
|
1135
|
-
/** Used to detect if a method is native. */
|
|
1136
|
-
var reIsNative = RegExp('^' +
|
|
1137
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
1138
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1139
|
-
);
|
|
1140
|
-
|
|
1141
|
-
/**
|
|
1142
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
1143
|
-
*
|
|
1144
|
-
* @private
|
|
1145
|
-
* @param {*} value The value to check.
|
|
1146
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1147
|
-
* else `false`.
|
|
1148
|
-
*/
|
|
1149
|
-
function baseIsNative(value) {
|
|
1150
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
1151
|
-
return false;
|
|
1152
|
-
}
|
|
1153
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
1154
|
-
return pattern.test(_toSource(value));
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
var _baseIsNative = baseIsNative;
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* Gets the value at `key` of `object`.
|
|
1161
|
-
*
|
|
1162
|
-
* @private
|
|
1163
|
-
* @param {Object} [object] The object to query.
|
|
1164
|
-
* @param {string} key The key of the property to get.
|
|
1165
|
-
* @returns {*} Returns the property value.
|
|
1166
|
-
*/
|
|
1167
|
-
function getValue(object, key) {
|
|
1168
|
-
return object == null ? undefined : object[key];
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
var _getValue = getValue;
|
|
1172
|
-
|
|
1173
|
-
/**
|
|
1174
|
-
* Gets the native function at `key` of `object`.
|
|
1175
|
-
*
|
|
1176
|
-
* @private
|
|
1177
|
-
* @param {Object} object The object to query.
|
|
1178
|
-
* @param {string} key The key of the method to get.
|
|
1179
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1180
|
-
*/
|
|
1181
|
-
function getNative(object, key) {
|
|
1182
|
-
var value = _getValue(object, key);
|
|
1183
|
-
return _baseIsNative(value) ? value : undefined;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
var _getNative = getNative;
|
|
1187
|
-
|
|
1188
|
-
/* Built-in method references that are verified to be native. */
|
|
1189
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
1190
|
-
|
|
1191
|
-
var _nativeCreate = nativeCreate;
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* Removes all key-value entries from the hash.
|
|
1195
|
-
*
|
|
1196
|
-
* @private
|
|
1197
|
-
* @name clear
|
|
1198
|
-
* @memberOf Hash
|
|
1199
|
-
*/
|
|
1200
|
-
function hashClear() {
|
|
1201
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1202
|
-
this.size = 0;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
var _hashClear = hashClear;
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* Removes `key` and its value from the hash.
|
|
1209
|
-
*
|
|
1210
|
-
* @private
|
|
1211
|
-
* @name delete
|
|
1212
|
-
* @memberOf Hash
|
|
1213
|
-
* @param {Object} hash The hash to modify.
|
|
1214
|
-
* @param {string} key The key of the value to remove.
|
|
1215
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1216
|
-
*/
|
|
1217
|
-
function hashDelete(key) {
|
|
1218
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
1219
|
-
this.size -= result ? 1 : 0;
|
|
1220
|
-
return result;
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
var _hashDelete = hashDelete;
|
|
1224
|
-
|
|
1225
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1226
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
1227
|
-
|
|
1228
|
-
/** Used for built-in method references. */
|
|
1229
|
-
var objectProto$1 = Object.prototype;
|
|
1230
|
-
|
|
1231
|
-
/** Used to check objects for own properties. */
|
|
1232
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1233
|
-
|
|
1234
|
-
/**
|
|
1235
|
-
* Gets the hash value for `key`.
|
|
1236
|
-
*
|
|
1237
|
-
* @private
|
|
1238
|
-
* @name get
|
|
1239
|
-
* @memberOf Hash
|
|
1240
|
-
* @param {string} key The key of the value to get.
|
|
1241
|
-
* @returns {*} Returns the entry value.
|
|
1242
|
-
*/
|
|
1243
|
-
function hashGet(key) {
|
|
1244
|
-
var data = this.__data__;
|
|
1245
|
-
if (_nativeCreate) {
|
|
1246
|
-
var result = data[key];
|
|
1247
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1248
|
-
}
|
|
1249
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
var _hashGet = hashGet;
|
|
1253
|
-
|
|
1254
|
-
/** Used for built-in method references. */
|
|
1255
|
-
var objectProto = Object.prototype;
|
|
1256
|
-
|
|
1257
|
-
/** Used to check objects for own properties. */
|
|
1258
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1259
|
-
|
|
1260
|
-
/**
|
|
1261
|
-
* Checks if a hash value for `key` exists.
|
|
1262
|
-
*
|
|
1263
|
-
* @private
|
|
1264
|
-
* @name has
|
|
1265
|
-
* @memberOf Hash
|
|
1266
|
-
* @param {string} key The key of the entry to check.
|
|
1267
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1268
|
-
*/
|
|
1269
|
-
function hashHas(key) {
|
|
1270
|
-
var data = this.__data__;
|
|
1271
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
var _hashHas = hashHas;
|
|
1275
|
-
|
|
1276
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1277
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1278
|
-
|
|
1279
|
-
/**
|
|
1280
|
-
* Sets the hash `key` to `value`.
|
|
1281
|
-
*
|
|
1282
|
-
* @private
|
|
1283
|
-
* @name set
|
|
1284
|
-
* @memberOf Hash
|
|
1285
|
-
* @param {string} key The key of the value to set.
|
|
1286
|
-
* @param {*} value The value to set.
|
|
1287
|
-
* @returns {Object} Returns the hash instance.
|
|
1288
|
-
*/
|
|
1289
|
-
function hashSet(key, value) {
|
|
1290
|
-
var data = this.__data__;
|
|
1291
|
-
this.size += this.has(key) ? 0 : 1;
|
|
1292
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1293
|
-
return this;
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
var _hashSet = hashSet;
|
|
1297
|
-
|
|
1298
|
-
/**
|
|
1299
|
-
* Creates a hash object.
|
|
1300
|
-
*
|
|
1301
|
-
* @private
|
|
1302
|
-
* @constructor
|
|
1303
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1304
|
-
*/
|
|
1305
|
-
function Hash(entries) {
|
|
1306
|
-
var index = -1,
|
|
1307
|
-
length = entries == null ? 0 : entries.length;
|
|
1308
|
-
|
|
1309
|
-
this.clear();
|
|
1310
|
-
while (++index < length) {
|
|
1311
|
-
var entry = entries[index];
|
|
1312
|
-
this.set(entry[0], entry[1]);
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
// Add methods to `Hash`.
|
|
1317
|
-
Hash.prototype.clear = _hashClear;
|
|
1318
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
1319
|
-
Hash.prototype.get = _hashGet;
|
|
1320
|
-
Hash.prototype.has = _hashHas;
|
|
1321
|
-
Hash.prototype.set = _hashSet;
|
|
1322
|
-
|
|
1323
|
-
var _Hash = Hash;
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
* Removes all key-value entries from the list cache.
|
|
1327
|
-
*
|
|
1328
|
-
* @private
|
|
1329
|
-
* @name clear
|
|
1330
|
-
* @memberOf ListCache
|
|
1331
|
-
*/
|
|
1332
|
-
function listCacheClear() {
|
|
1333
|
-
this.__data__ = [];
|
|
1334
|
-
this.size = 0;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
var _listCacheClear = listCacheClear;
|
|
1338
|
-
|
|
1339
|
-
/**
|
|
1340
|
-
* Performs a
|
|
1341
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1342
|
-
* comparison between two values to determine if they are equivalent.
|
|
1343
|
-
*
|
|
1344
|
-
* @static
|
|
1345
|
-
* @memberOf _
|
|
1346
|
-
* @since 4.0.0
|
|
1347
|
-
* @category Lang
|
|
1348
|
-
* @param {*} value The value to compare.
|
|
1349
|
-
* @param {*} other The other value to compare.
|
|
1350
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1351
|
-
* @example
|
|
1352
|
-
*
|
|
1353
|
-
* var object = { 'a': 1 };
|
|
1354
|
-
* var other = { 'a': 1 };
|
|
1355
|
-
*
|
|
1356
|
-
* _.eq(object, object);
|
|
1357
|
-
* // => true
|
|
1358
|
-
*
|
|
1359
|
-
* _.eq(object, other);
|
|
1360
|
-
* // => false
|
|
1361
|
-
*
|
|
1362
|
-
* _.eq('a', 'a');
|
|
1363
|
-
* // => true
|
|
1364
|
-
*
|
|
1365
|
-
* _.eq('a', Object('a'));
|
|
1366
|
-
* // => false
|
|
1367
|
-
*
|
|
1368
|
-
* _.eq(NaN, NaN);
|
|
1369
|
-
* // => true
|
|
1370
|
-
*/
|
|
1371
|
-
function eq(value, other) {
|
|
1372
|
-
return value === other || (value !== value && other !== other);
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
var eq_1 = eq;
|
|
1376
|
-
|
|
1377
|
-
/**
|
|
1378
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1379
|
-
*
|
|
1380
|
-
* @private
|
|
1381
|
-
* @param {Array} array The array to inspect.
|
|
1382
|
-
* @param {*} key The key to search for.
|
|
1383
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1384
|
-
*/
|
|
1385
|
-
function assocIndexOf(array, key) {
|
|
1386
|
-
var length = array.length;
|
|
1387
|
-
while (length--) {
|
|
1388
|
-
if (eq_1(array[length][0], key)) {
|
|
1389
|
-
return length;
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
return -1;
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
var _assocIndexOf = assocIndexOf;
|
|
1396
|
-
|
|
1397
|
-
/** Used for built-in method references. */
|
|
1398
|
-
var arrayProto = Array.prototype;
|
|
1399
|
-
|
|
1400
|
-
/** Built-in value references. */
|
|
1401
|
-
var splice = arrayProto.splice;
|
|
1402
|
-
|
|
1403
|
-
/**
|
|
1404
|
-
* Removes `key` and its value from the list cache.
|
|
1405
|
-
*
|
|
1406
|
-
* @private
|
|
1407
|
-
* @name delete
|
|
1408
|
-
* @memberOf ListCache
|
|
1409
|
-
* @param {string} key The key of the value to remove.
|
|
1410
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1411
|
-
*/
|
|
1412
|
-
function listCacheDelete(key) {
|
|
1413
|
-
var data = this.__data__,
|
|
1414
|
-
index = _assocIndexOf(data, key);
|
|
1415
|
-
|
|
1416
|
-
if (index < 0) {
|
|
1417
|
-
return false;
|
|
1418
|
-
}
|
|
1419
|
-
var lastIndex = data.length - 1;
|
|
1420
|
-
if (index == lastIndex) {
|
|
1421
|
-
data.pop();
|
|
1422
|
-
} else {
|
|
1423
|
-
splice.call(data, index, 1);
|
|
1424
|
-
}
|
|
1425
|
-
--this.size;
|
|
1426
|
-
return true;
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
var _listCacheDelete = listCacheDelete;
|
|
1430
|
-
|
|
1431
|
-
/**
|
|
1432
|
-
* Gets the list cache value for `key`.
|
|
1433
|
-
*
|
|
1434
|
-
* @private
|
|
1435
|
-
* @name get
|
|
1436
|
-
* @memberOf ListCache
|
|
1437
|
-
* @param {string} key The key of the value to get.
|
|
1438
|
-
* @returns {*} Returns the entry value.
|
|
1439
|
-
*/
|
|
1440
|
-
function listCacheGet(key) {
|
|
1441
|
-
var data = this.__data__,
|
|
1442
|
-
index = _assocIndexOf(data, key);
|
|
1443
|
-
|
|
1444
|
-
return index < 0 ? undefined : data[index][1];
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
var _listCacheGet = listCacheGet;
|
|
1448
|
-
|
|
1449
|
-
/**
|
|
1450
|
-
* Checks if a list cache value for `key` exists.
|
|
1451
|
-
*
|
|
1452
|
-
* @private
|
|
1453
|
-
* @name has
|
|
1454
|
-
* @memberOf ListCache
|
|
1455
|
-
* @param {string} key The key of the entry to check.
|
|
1456
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1457
|
-
*/
|
|
1458
|
-
function listCacheHas(key) {
|
|
1459
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
var _listCacheHas = listCacheHas;
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* Sets the list cache `key` to `value`.
|
|
1466
|
-
*
|
|
1467
|
-
* @private
|
|
1468
|
-
* @name set
|
|
1469
|
-
* @memberOf ListCache
|
|
1470
|
-
* @param {string} key The key of the value to set.
|
|
1471
|
-
* @param {*} value The value to set.
|
|
1472
|
-
* @returns {Object} Returns the list cache instance.
|
|
1473
|
-
*/
|
|
1474
|
-
function listCacheSet(key, value) {
|
|
1475
|
-
var data = this.__data__,
|
|
1476
|
-
index = _assocIndexOf(data, key);
|
|
1477
|
-
|
|
1478
|
-
if (index < 0) {
|
|
1479
|
-
++this.size;
|
|
1480
|
-
data.push([key, value]);
|
|
1481
|
-
} else {
|
|
1482
|
-
data[index][1] = value;
|
|
1483
|
-
}
|
|
1484
|
-
return this;
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
var _listCacheSet = listCacheSet;
|
|
1488
|
-
|
|
1489
|
-
/**
|
|
1490
|
-
* Creates an list cache object.
|
|
1491
|
-
*
|
|
1492
|
-
* @private
|
|
1493
|
-
* @constructor
|
|
1494
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1495
|
-
*/
|
|
1496
|
-
function ListCache(entries) {
|
|
1497
|
-
var index = -1,
|
|
1498
|
-
length = entries == null ? 0 : entries.length;
|
|
1499
|
-
|
|
1500
|
-
this.clear();
|
|
1501
|
-
while (++index < length) {
|
|
1502
|
-
var entry = entries[index];
|
|
1503
|
-
this.set(entry[0], entry[1]);
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
// Add methods to `ListCache`.
|
|
1508
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
1509
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1510
|
-
ListCache.prototype.get = _listCacheGet;
|
|
1511
|
-
ListCache.prototype.has = _listCacheHas;
|
|
1512
|
-
ListCache.prototype.set = _listCacheSet;
|
|
1513
|
-
|
|
1514
|
-
var _ListCache = ListCache;
|
|
1515
|
-
|
|
1516
|
-
/* Built-in method references that are verified to be native. */
|
|
1517
|
-
var Map = _getNative(_root, 'Map');
|
|
1518
|
-
|
|
1519
|
-
var _Map = Map;
|
|
1520
|
-
|
|
1521
|
-
/**
|
|
1522
|
-
* Removes all key-value entries from the map.
|
|
1523
|
-
*
|
|
1524
|
-
* @private
|
|
1525
|
-
* @name clear
|
|
1526
|
-
* @memberOf MapCache
|
|
1527
|
-
*/
|
|
1528
|
-
function mapCacheClear() {
|
|
1529
|
-
this.size = 0;
|
|
1530
|
-
this.__data__ = {
|
|
1531
|
-
'hash': new _Hash,
|
|
1532
|
-
'map': new (_Map || _ListCache),
|
|
1533
|
-
'string': new _Hash
|
|
1534
|
-
};
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
var _mapCacheClear = mapCacheClear;
|
|
1538
|
-
|
|
1539
|
-
/**
|
|
1540
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
1541
|
-
*
|
|
1542
|
-
* @private
|
|
1543
|
-
* @param {*} value The value to check.
|
|
1544
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1545
|
-
*/
|
|
1546
|
-
function isKeyable(value) {
|
|
1547
|
-
var type = typeof value;
|
|
1548
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1549
|
-
? (value !== '__proto__')
|
|
1550
|
-
: (value === null);
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
var _isKeyable = isKeyable;
|
|
1554
|
-
|
|
1555
|
-
/**
|
|
1556
|
-
* Gets the data for `map`.
|
|
1557
|
-
*
|
|
1558
|
-
* @private
|
|
1559
|
-
* @param {Object} map The map to query.
|
|
1560
|
-
* @param {string} key The reference key.
|
|
1561
|
-
* @returns {*} Returns the map data.
|
|
1562
|
-
*/
|
|
1563
|
-
function getMapData(map, key) {
|
|
1564
|
-
var data = map.__data__;
|
|
1565
|
-
return _isKeyable(key)
|
|
1566
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1567
|
-
: data.map;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
var _getMapData = getMapData;
|
|
1571
|
-
|
|
1572
|
-
/**
|
|
1573
|
-
* Removes `key` and its value from the map.
|
|
1574
|
-
*
|
|
1575
|
-
* @private
|
|
1576
|
-
* @name delete
|
|
1577
|
-
* @memberOf MapCache
|
|
1578
|
-
* @param {string} key The key of the value to remove.
|
|
1579
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1580
|
-
*/
|
|
1581
|
-
function mapCacheDelete(key) {
|
|
1582
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1583
|
-
this.size -= result ? 1 : 0;
|
|
1584
|
-
return result;
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
1588
|
-
|
|
1589
|
-
/**
|
|
1590
|
-
* Gets the map value for `key`.
|
|
1591
|
-
*
|
|
1592
|
-
* @private
|
|
1593
|
-
* @name get
|
|
1594
|
-
* @memberOf MapCache
|
|
1595
|
-
* @param {string} key The key of the value to get.
|
|
1596
|
-
* @returns {*} Returns the entry value.
|
|
1597
|
-
*/
|
|
1598
|
-
function mapCacheGet(key) {
|
|
1599
|
-
return _getMapData(this, key).get(key);
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
var _mapCacheGet = mapCacheGet;
|
|
1603
|
-
|
|
1604
|
-
/**
|
|
1605
|
-
* Checks if a map value for `key` exists.
|
|
1606
|
-
*
|
|
1607
|
-
* @private
|
|
1608
|
-
* @name has
|
|
1609
|
-
* @memberOf MapCache
|
|
1610
|
-
* @param {string} key The key of the entry to check.
|
|
1611
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1612
|
-
*/
|
|
1613
|
-
function mapCacheHas(key) {
|
|
1614
|
-
return _getMapData(this, key).has(key);
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
var _mapCacheHas = mapCacheHas;
|
|
1618
|
-
|
|
1619
|
-
/**
|
|
1620
|
-
* Sets the map `key` to `value`.
|
|
1621
|
-
*
|
|
1622
|
-
* @private
|
|
1623
|
-
* @name set
|
|
1624
|
-
* @memberOf MapCache
|
|
1625
|
-
* @param {string} key The key of the value to set.
|
|
1626
|
-
* @param {*} value The value to set.
|
|
1627
|
-
* @returns {Object} Returns the map cache instance.
|
|
1628
|
-
*/
|
|
1629
|
-
function mapCacheSet(key, value) {
|
|
1630
|
-
var data = _getMapData(this, key),
|
|
1631
|
-
size = data.size;
|
|
1632
|
-
|
|
1633
|
-
data.set(key, value);
|
|
1634
|
-
this.size += data.size == size ? 0 : 1;
|
|
1635
|
-
return this;
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
var _mapCacheSet = mapCacheSet;
|
|
1639
|
-
|
|
1640
|
-
/**
|
|
1641
|
-
* Creates a map cache object to store key-value pairs.
|
|
1642
|
-
*
|
|
1643
|
-
* @private
|
|
1644
|
-
* @constructor
|
|
1645
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1646
|
-
*/
|
|
1647
|
-
function MapCache(entries) {
|
|
1648
|
-
var index = -1,
|
|
1649
|
-
length = entries == null ? 0 : entries.length;
|
|
1650
|
-
|
|
1651
|
-
this.clear();
|
|
1652
|
-
while (++index < length) {
|
|
1653
|
-
var entry = entries[index];
|
|
1654
|
-
this.set(entry[0], entry[1]);
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
// Add methods to `MapCache`.
|
|
1659
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1660
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1661
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1662
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1663
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1664
|
-
|
|
1665
|
-
var _MapCache = MapCache;
|
|
1666
|
-
|
|
1667
|
-
/** Error message constants. */
|
|
1668
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1669
|
-
|
|
1670
|
-
/**
|
|
1671
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1672
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1673
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1674
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1675
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1676
|
-
*
|
|
1677
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1678
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1679
|
-
* constructor with one whose instances implement the
|
|
1680
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1681
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1682
|
-
*
|
|
1683
|
-
* @static
|
|
1684
|
-
* @memberOf _
|
|
1685
|
-
* @since 0.1.0
|
|
1686
|
-
* @category Function
|
|
1687
|
-
* @param {Function} func The function to have its output memoized.
|
|
1688
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1689
|
-
* @returns {Function} Returns the new memoized function.
|
|
1690
|
-
* @example
|
|
1691
|
-
*
|
|
1692
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1693
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1694
|
-
*
|
|
1695
|
-
* var values = _.memoize(_.values);
|
|
1696
|
-
* values(object);
|
|
1697
|
-
* // => [1, 2]
|
|
1698
|
-
*
|
|
1699
|
-
* values(other);
|
|
1700
|
-
* // => [3, 4]
|
|
1701
|
-
*
|
|
1702
|
-
* object.a = 2;
|
|
1703
|
-
* values(object);
|
|
1704
|
-
* // => [1, 2]
|
|
1705
|
-
*
|
|
1706
|
-
* // Modify the result cache.
|
|
1707
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1708
|
-
* values(object);
|
|
1709
|
-
* // => ['a', 'b']
|
|
1710
|
-
*
|
|
1711
|
-
* // Replace `_.memoize.Cache`.
|
|
1712
|
-
* _.memoize.Cache = WeakMap;
|
|
1713
|
-
*/
|
|
1714
|
-
function memoize(func, resolver) {
|
|
1715
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1716
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1717
|
-
}
|
|
1718
|
-
var memoized = function() {
|
|
1719
|
-
var args = arguments,
|
|
1720
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1721
|
-
cache = memoized.cache;
|
|
1722
|
-
|
|
1723
|
-
if (cache.has(key)) {
|
|
1724
|
-
return cache.get(key);
|
|
1725
|
-
}
|
|
1726
|
-
var result = func.apply(this, args);
|
|
1727
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1728
|
-
return result;
|
|
1729
|
-
};
|
|
1730
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1731
|
-
return memoized;
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
// Expose `MapCache`.
|
|
1735
|
-
memoize.Cache = _MapCache;
|
|
1736
|
-
|
|
1737
|
-
var memoize_1 = memoize;
|
|
1738
|
-
|
|
1739
|
-
/** Used as the maximum memoize cache size. */
|
|
1740
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1741
|
-
|
|
1742
|
-
/**
|
|
1743
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1744
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1745
|
-
*
|
|
1746
|
-
* @private
|
|
1747
|
-
* @param {Function} func The function to have its output memoized.
|
|
1748
|
-
* @returns {Function} Returns the new memoized function.
|
|
1749
|
-
*/
|
|
1750
|
-
function memoizeCapped(func) {
|
|
1751
|
-
var result = memoize_1(func, function(key) {
|
|
1752
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1753
|
-
cache.clear();
|
|
1754
|
-
}
|
|
1755
|
-
return key;
|
|
1756
|
-
});
|
|
1757
|
-
|
|
1758
|
-
var cache = result.cache;
|
|
1759
|
-
return result;
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
var _memoizeCapped = memoizeCapped;
|
|
1763
|
-
|
|
1764
|
-
/** Used to match property names within property paths. */
|
|
1765
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1766
|
-
|
|
1767
|
-
/** Used to match backslashes in property paths. */
|
|
1768
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1769
|
-
|
|
1770
|
-
/**
|
|
1771
|
-
* Converts `string` to a property path array.
|
|
1772
|
-
*
|
|
1773
|
-
* @private
|
|
1774
|
-
* @param {string} string The string to convert.
|
|
1775
|
-
* @returns {Array} Returns the property path array.
|
|
1776
|
-
*/
|
|
1777
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1778
|
-
var result = [];
|
|
1779
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1780
|
-
result.push('');
|
|
1781
|
-
}
|
|
1782
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1783
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1784
|
-
});
|
|
1785
|
-
return result;
|
|
1786
|
-
});
|
|
1787
|
-
|
|
1788
|
-
var _stringToPath = stringToPath;
|
|
1789
|
-
|
|
1790
|
-
/**
|
|
1791
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1792
|
-
* shorthands.
|
|
1793
|
-
*
|
|
1794
|
-
* @private
|
|
1795
|
-
* @param {Array} [array] The array to iterate over.
|
|
1796
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1797
|
-
* @returns {Array} Returns the new mapped array.
|
|
1798
|
-
*/
|
|
1799
|
-
function arrayMap(array, iteratee) {
|
|
1800
|
-
var index = -1,
|
|
1801
|
-
length = array == null ? 0 : array.length,
|
|
1802
|
-
result = Array(length);
|
|
1803
|
-
|
|
1804
|
-
while (++index < length) {
|
|
1805
|
-
result[index] = iteratee(array[index], index, array);
|
|
1806
|
-
}
|
|
1807
|
-
return result;
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
var _arrayMap = arrayMap;
|
|
1811
|
-
|
|
1812
|
-
/** Used as references for various `Number` constants. */
|
|
1813
|
-
var INFINITY$1 = 1 / 0;
|
|
1814
|
-
|
|
1815
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1816
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1817
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1821
|
-
* values to empty strings.
|
|
1822
|
-
*
|
|
1823
|
-
* @private
|
|
1824
|
-
* @param {*} value The value to process.
|
|
1825
|
-
* @returns {string} Returns the string.
|
|
1826
|
-
*/
|
|
1827
|
-
function baseToString(value) {
|
|
1828
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1829
|
-
if (typeof value == 'string') {
|
|
1830
|
-
return value;
|
|
1831
|
-
}
|
|
1832
|
-
if (isArray_1(value)) {
|
|
1833
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
1834
|
-
return _arrayMap(value, baseToString) + '';
|
|
1835
|
-
}
|
|
1836
|
-
if (isSymbol_1(value)) {
|
|
1837
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
1838
|
-
}
|
|
1839
|
-
var result = (value + '');
|
|
1840
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
var _baseToString = baseToString;
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
1847
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1848
|
-
*
|
|
1849
|
-
* @static
|
|
1850
|
-
* @memberOf _
|
|
1851
|
-
* @since 4.0.0
|
|
1852
|
-
* @category Lang
|
|
1853
|
-
* @param {*} value The value to convert.
|
|
1854
|
-
* @returns {string} Returns the converted string.
|
|
1855
|
-
* @example
|
|
1856
|
-
*
|
|
1857
|
-
* _.toString(null);
|
|
1858
|
-
* // => ''
|
|
1859
|
-
*
|
|
1860
|
-
* _.toString(-0);
|
|
1861
|
-
* // => '-0'
|
|
1862
|
-
*
|
|
1863
|
-
* _.toString([1, 2, 3]);
|
|
1864
|
-
* // => '1,2,3'
|
|
1865
|
-
*/
|
|
1866
|
-
function toString(value) {
|
|
1867
|
-
return value == null ? '' : _baseToString(value);
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
var toString_1 = toString;
|
|
1871
|
-
|
|
1872
|
-
/**
|
|
1873
|
-
* Casts `value` to a path array if it's not one.
|
|
1874
|
-
*
|
|
1875
|
-
* @private
|
|
1876
|
-
* @param {*} value The value to inspect.
|
|
1877
|
-
* @param {Object} [object] The object to query keys on.
|
|
1878
|
-
* @returns {Array} Returns the cast property path array.
|
|
1879
|
-
*/
|
|
1880
|
-
function castPath(value, object) {
|
|
1881
|
-
if (isArray_1(value)) {
|
|
1882
|
-
return value;
|
|
1883
|
-
}
|
|
1884
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
var _castPath = castPath;
|
|
1888
|
-
|
|
1889
|
-
/** Used as references for various `Number` constants. */
|
|
1890
|
-
var INFINITY = 1 / 0;
|
|
1891
|
-
|
|
1892
|
-
/**
|
|
1893
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
1894
|
-
*
|
|
1895
|
-
* @private
|
|
1896
|
-
* @param {*} value The value to inspect.
|
|
1897
|
-
* @returns {string|symbol} Returns the key.
|
|
1898
|
-
*/
|
|
1899
|
-
function toKey(value) {
|
|
1900
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1901
|
-
return value;
|
|
1902
|
-
}
|
|
1903
|
-
var result = (value + '');
|
|
1904
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
var _toKey = toKey;
|
|
1908
|
-
|
|
1909
|
-
/**
|
|
1910
|
-
* The base implementation of `_.get` without support for default values.
|
|
1911
|
-
*
|
|
1912
|
-
* @private
|
|
1913
|
-
* @param {Object} object The object to query.
|
|
1914
|
-
* @param {Array|string} path The path of the property to get.
|
|
1915
|
-
* @returns {*} Returns the resolved value.
|
|
1916
|
-
*/
|
|
1917
|
-
function baseGet(object, path) {
|
|
1918
|
-
path = _castPath(path, object);
|
|
1919
|
-
|
|
1920
|
-
var index = 0,
|
|
1921
|
-
length = path.length;
|
|
1922
|
-
|
|
1923
|
-
while (object != null && index < length) {
|
|
1924
|
-
object = object[_toKey(path[index++])];
|
|
1925
|
-
}
|
|
1926
|
-
return (index && index == length) ? object : undefined;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
var _baseGet = baseGet;
|
|
1930
|
-
|
|
1931
|
-
/**
|
|
1932
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
1933
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
1934
|
-
*
|
|
1935
|
-
* @static
|
|
1936
|
-
* @memberOf _
|
|
1937
|
-
* @since 3.7.0
|
|
1938
|
-
* @category Object
|
|
1939
|
-
* @param {Object} object The object to query.
|
|
1940
|
-
* @param {Array|string} path The path of the property to get.
|
|
1941
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
1942
|
-
* @returns {*} Returns the resolved value.
|
|
1943
|
-
* @example
|
|
1944
|
-
*
|
|
1945
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
1946
|
-
*
|
|
1947
|
-
* _.get(object, 'a[0].b.c');
|
|
1948
|
-
* // => 3
|
|
1949
|
-
*
|
|
1950
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
1951
|
-
* // => 3
|
|
1952
|
-
*
|
|
1953
|
-
* _.get(object, 'a.b.c', 'default');
|
|
1954
|
-
* // => 'default'
|
|
1955
|
-
*/
|
|
1956
|
-
function get(object, path, defaultValue) {
|
|
1957
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
1958
|
-
return result === undefined ? defaultValue : result;
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
var get_1 = get;
|
|
1962
|
-
|
|
1963
|
-
/**
|
|
1964
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
1965
|
-
* iteratee shorthands.
|
|
1966
|
-
*
|
|
1967
|
-
* @private
|
|
1968
|
-
* @param {Array} [array] The array to iterate over.
|
|
1969
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1970
|
-
* @param {*} [accumulator] The initial value.
|
|
1971
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
1972
|
-
* the initial value.
|
|
1973
|
-
* @returns {*} Returns the accumulated value.
|
|
1974
|
-
*/
|
|
1975
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
1976
|
-
var index = -1,
|
|
1977
|
-
length = array == null ? 0 : array.length;
|
|
1978
|
-
|
|
1979
|
-
if (initAccum && length) {
|
|
1980
|
-
accumulator = array[++index];
|
|
1981
|
-
}
|
|
1982
|
-
while (++index < length) {
|
|
1983
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
1984
|
-
}
|
|
1985
|
-
return accumulator;
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
var _arrayReduce = arrayReduce;
|
|
1989
|
-
|
|
1990
|
-
/**
|
|
1991
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
1992
|
-
*
|
|
1993
|
-
* @private
|
|
1994
|
-
* @param {Object} object The object to query.
|
|
1995
|
-
* @returns {Function} Returns the new accessor function.
|
|
1996
|
-
*/
|
|
1997
|
-
function basePropertyOf(object) {
|
|
1998
|
-
return function(key) {
|
|
1999
|
-
return object == null ? undefined : object[key];
|
|
2000
|
-
};
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
var _basePropertyOf = basePropertyOf;
|
|
2004
|
-
|
|
2005
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2006
|
-
var deburredLetters = {
|
|
2007
|
-
// Latin-1 Supplement block.
|
|
2008
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2009
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2010
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2011
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2012
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2013
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2014
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2015
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2016
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2017
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2018
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2019
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2020
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2021
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2022
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2023
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2024
|
-
'\xdf': 'ss',
|
|
2025
|
-
// Latin Extended-A block.
|
|
2026
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2027
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2028
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2029
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2030
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2031
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2032
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2033
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2034
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2035
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2036
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2037
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2038
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2039
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2040
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2041
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2042
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2043
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2044
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2045
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2046
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2047
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2048
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2049
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2050
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2051
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2052
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2053
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2054
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2055
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2056
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2057
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2058
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2059
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2060
|
-
'\u0149': "'n", '\u017f': 's'
|
|
2061
|
-
};
|
|
2062
|
-
|
|
2063
|
-
/**
|
|
2064
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2065
|
-
* letters to basic Latin letters.
|
|
2066
|
-
*
|
|
2067
|
-
* @private
|
|
2068
|
-
* @param {string} letter The matched letter to deburr.
|
|
2069
|
-
* @returns {string} Returns the deburred letter.
|
|
2070
|
-
*/
|
|
2071
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2072
|
-
|
|
2073
|
-
var _deburrLetter = deburrLetter;
|
|
2074
|
-
|
|
2075
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2076
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2077
|
-
|
|
2078
|
-
/** Used to compose unicode character classes. */
|
|
2079
|
-
var rsComboMarksRange$3 = '\\u0300-\\u036f',
|
|
2080
|
-
reComboHalfMarksRange$3 = '\\ufe20-\\ufe2f',
|
|
2081
|
-
rsComboSymbolsRange$3 = '\\u20d0-\\u20ff',
|
|
2082
|
-
rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
|
|
2083
|
-
|
|
2084
|
-
/** Used to compose unicode capture groups. */
|
|
2085
|
-
var rsCombo$2 = '[' + rsComboRange$3 + ']';
|
|
2086
|
-
|
|
2087
|
-
/**
|
|
2088
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2089
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2090
|
-
*/
|
|
2091
|
-
var reComboMark = RegExp(rsCombo$2, 'g');
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* Deburrs `string` by converting
|
|
2095
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2096
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2097
|
-
* letters to basic Latin letters and removing
|
|
2098
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2099
|
-
*
|
|
2100
|
-
* @static
|
|
2101
|
-
* @memberOf _
|
|
2102
|
-
* @since 3.0.0
|
|
2103
|
-
* @category String
|
|
2104
|
-
* @param {string} [string=''] The string to deburr.
|
|
2105
|
-
* @returns {string} Returns the deburred string.
|
|
2106
|
-
* @example
|
|
2107
|
-
*
|
|
2108
|
-
* _.deburr('déjà vu');
|
|
2109
|
-
* // => 'deja vu'
|
|
2110
|
-
*/
|
|
2111
|
-
function deburr(string) {
|
|
2112
|
-
string = toString_1(string);
|
|
2113
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
var deburr_1 = deburr;
|
|
2117
|
-
|
|
2118
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2119
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2120
|
-
|
|
2121
|
-
/**
|
|
2122
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2123
|
-
*
|
|
2124
|
-
* @private
|
|
2125
|
-
* @param {string} The string to inspect.
|
|
2126
|
-
* @returns {Array} Returns the words of `string`.
|
|
2127
|
-
*/
|
|
2128
|
-
function asciiWords(string) {
|
|
2129
|
-
return string.match(reAsciiWord) || [];
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
var _asciiWords = asciiWords;
|
|
2133
|
-
|
|
2134
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2135
|
-
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 ]/;
|
|
2136
|
-
|
|
2137
|
-
/**
|
|
2138
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2139
|
-
*
|
|
2140
|
-
* @private
|
|
2141
|
-
* @param {string} string The string to inspect.
|
|
2142
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2143
|
-
*/
|
|
2144
|
-
function hasUnicodeWord(string) {
|
|
2145
|
-
return reHasUnicodeWord.test(string);
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2149
|
-
|
|
2150
|
-
/** Used to compose unicode character classes. */
|
|
2151
|
-
var rsAstralRange$2 = '\\ud800-\\udfff',
|
|
2152
|
-
rsComboMarksRange$2 = '\\u0300-\\u036f',
|
|
2153
|
-
reComboHalfMarksRange$2 = '\\ufe20-\\ufe2f',
|
|
2154
|
-
rsComboSymbolsRange$2 = '\\u20d0-\\u20ff',
|
|
2155
|
-
rsComboRange$2 = rsComboMarksRange$2 + reComboHalfMarksRange$2 + rsComboSymbolsRange$2,
|
|
2156
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2157
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2158
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2159
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2160
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2161
|
-
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',
|
|
2162
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2163
|
-
rsVarRange$2 = '\\ufe0e\\ufe0f',
|
|
2164
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2165
|
-
|
|
2166
|
-
/** Used to compose unicode capture groups. */
|
|
2167
|
-
var rsApos$1 = "['\u2019]",
|
|
2168
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2169
|
-
rsCombo$1 = '[' + rsComboRange$2 + ']',
|
|
2170
|
-
rsDigits = '\\d+',
|
|
2171
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2172
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2173
|
-
rsMisc = '[^' + rsAstralRange$2 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2174
|
-
rsFitz$1 = '\\ud83c[\\udffb-\\udfff]',
|
|
2175
|
-
rsModifier$1 = '(?:' + rsCombo$1 + '|' + rsFitz$1 + ')',
|
|
2176
|
-
rsNonAstral$1 = '[^' + rsAstralRange$2 + ']',
|
|
2177
|
-
rsRegional$1 = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2178
|
-
rsSurrPair$1 = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2179
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2180
|
-
rsZWJ$2 = '\\u200d';
|
|
2181
|
-
|
|
2182
|
-
/** Used to compose unicode regexes. */
|
|
2183
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2184
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2185
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2186
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2187
|
-
reOptMod$1 = rsModifier$1 + '?',
|
|
2188
|
-
rsOptVar$1 = '[' + rsVarRange$2 + ']?',
|
|
2189
|
-
rsOptJoin$1 = '(?:' + rsZWJ$2 + '(?:' + [rsNonAstral$1, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsOptVar$1 + reOptMod$1 + ')*',
|
|
2190
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2191
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2192
|
-
rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1,
|
|
2193
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsSeq$1;
|
|
2194
|
-
|
|
2195
|
-
/** Used to match complex or compound words. */
|
|
2196
|
-
var reUnicodeWord = RegExp([
|
|
2197
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2198
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2199
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2200
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2201
|
-
rsOrdUpper,
|
|
2202
|
-
rsOrdLower,
|
|
2203
|
-
rsDigits,
|
|
2204
|
-
rsEmoji
|
|
2205
|
-
].join('|'), 'g');
|
|
2206
|
-
|
|
2207
|
-
/**
|
|
2208
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2209
|
-
*
|
|
2210
|
-
* @private
|
|
2211
|
-
* @param {string} The string to inspect.
|
|
2212
|
-
* @returns {Array} Returns the words of `string`.
|
|
2213
|
-
*/
|
|
2214
|
-
function unicodeWords(string) {
|
|
2215
|
-
return string.match(reUnicodeWord) || [];
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
var _unicodeWords = unicodeWords;
|
|
2219
|
-
|
|
2220
|
-
/**
|
|
2221
|
-
* Splits `string` into an array of its words.
|
|
2222
|
-
*
|
|
2223
|
-
* @static
|
|
2224
|
-
* @memberOf _
|
|
2225
|
-
* @since 3.0.0
|
|
2226
|
-
* @category String
|
|
2227
|
-
* @param {string} [string=''] The string to inspect.
|
|
2228
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2229
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2230
|
-
* @returns {Array} Returns the words of `string`.
|
|
2231
|
-
* @example
|
|
2232
|
-
*
|
|
2233
|
-
* _.words('fred, barney, & pebbles');
|
|
2234
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2235
|
-
*
|
|
2236
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2237
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2238
|
-
*/
|
|
2239
|
-
function words(string, pattern, guard) {
|
|
2240
|
-
string = toString_1(string);
|
|
2241
|
-
pattern = guard ? undefined : pattern;
|
|
2242
|
-
|
|
2243
|
-
if (pattern === undefined) {
|
|
2244
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2245
|
-
}
|
|
2246
|
-
return string.match(pattern) || [];
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
var words_1 = words;
|
|
2250
|
-
|
|
2251
|
-
/** Used to compose unicode capture groups. */
|
|
2252
|
-
var rsApos = "['\u2019]";
|
|
2253
|
-
|
|
2254
|
-
/** Used to match apostrophes. */
|
|
2255
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2256
|
-
|
|
2257
|
-
/**
|
|
2258
|
-
* Creates a function like `_.camelCase`.
|
|
2259
|
-
*
|
|
2260
|
-
* @private
|
|
2261
|
-
* @param {Function} callback The function to combine each word.
|
|
2262
|
-
* @returns {Function} Returns the new compounder function.
|
|
2263
|
-
*/
|
|
2264
|
-
function createCompounder(callback) {
|
|
2265
|
-
return function(string) {
|
|
2266
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2267
|
-
};
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
var _createCompounder = createCompounder;
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var components = require('@quintype/components');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
9
|
+
require('@babel/runtime/helpers/typeof');
|
|
10
|
+
require('@babel/runtime/regenerator');
|
|
11
|
+
var lodash = require('lodash');
|
|
12
|
+
require('react-timeago');
|
|
13
|
+
require('date-fns-tz');
|
|
14
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
15
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
16
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
17
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
18
|
+
var reactRedux = require('react-redux');
|
|
19
|
+
|
|
20
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
+
|
|
22
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
25
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
26
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
27
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
2271
28
|
|
|
2272
29
|
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
2273
30
|
var sharePageUrl = canUseDOM && window.location.href;
|
|
@@ -2300,10 +57,10 @@ var clientWidths = {
|
|
|
2300
57
|
tablet: 1024
|
|
2301
58
|
};
|
|
2302
59
|
var clientWidth = function clientWidth(device) {
|
|
2303
|
-
var foundDeviceWidth =
|
|
60
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2304
61
|
|
|
2305
62
|
if (foundDeviceWidth) {
|
|
2306
|
-
return
|
|
63
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2307
64
|
}
|
|
2308
65
|
|
|
2309
66
|
return false;
|
|
@@ -2333,7 +90,7 @@ var getSlug = function getSlug(collection) {
|
|
|
2333
90
|
var isSection = collection.template === "section";
|
|
2334
91
|
|
|
2335
92
|
if (isSection) {
|
|
2336
|
-
var sectionId =
|
|
93
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
2337
94
|
var sections = config.sections;
|
|
2338
95
|
var section = sections && sections.find(function (section) {
|
|
2339
96
|
return section.id === sectionId;
|
|
@@ -2343,15 +100,15 @@ var getSlug = function getSlug(collection) {
|
|
|
2343
100
|
|
|
2344
101
|
return "/collection/".concat(collection.slug);
|
|
2345
102
|
};
|
|
2346
|
-
|
|
2347
|
-
"sketches-host":
|
|
2348
|
-
"cdn-name":
|
|
2349
|
-
"cdn-image":
|
|
103
|
+
PropTypes__default["default"].shape({
|
|
104
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
105
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
106
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2350
107
|
});
|
|
2351
|
-
|
|
2352
|
-
headline:
|
|
2353
|
-
"last-published-at":
|
|
2354
|
-
subheadline:
|
|
108
|
+
PropTypes__default["default"].shape({
|
|
109
|
+
headline: PropTypes__default["default"].string,
|
|
110
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
111
|
+
subheadline: PropTypes__default["default"].string
|
|
2355
112
|
});
|
|
2356
113
|
var generateNavigateSlug = function generateNavigateSlug() {
|
|
2357
114
|
var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -2382,161 +139,6 @@ var generateNavigateSlug = function generateNavigateSlug() {
|
|
|
2382
139
|
return "/";
|
|
2383
140
|
};
|
|
2384
141
|
|
|
2385
|
-
function _defineProperty(obj, key, value) {
|
|
2386
|
-
if (key in obj) {
|
|
2387
|
-
Object.defineProperty(obj, key, {
|
|
2388
|
-
value: value,
|
|
2389
|
-
enumerable: true,
|
|
2390
|
-
configurable: true,
|
|
2391
|
-
writable: true
|
|
2392
|
-
});
|
|
2393
|
-
} else {
|
|
2394
|
-
obj[key] = value;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
return obj;
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
|
|
2401
|
-
|
|
2402
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2403
|
-
value: true
|
|
2404
|
-
});
|
|
2405
|
-
exports["default"] = void 0;
|
|
2406
|
-
var optionsDefaults = {
|
|
2407
|
-
attributeNames: {
|
|
2408
|
-
styleName: 'className'
|
|
2409
|
-
},
|
|
2410
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
2411
|
-
handleMissingStyleName: 'throw'
|
|
2412
|
-
};
|
|
2413
|
-
var _default = optionsDefaults;
|
|
2414
|
-
exports["default"] = _default;
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
});
|
|
2418
|
-
|
|
2419
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
2420
|
-
|
|
2421
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2422
|
-
value: true
|
|
2423
|
-
});
|
|
2424
|
-
exports["default"] = void 0;
|
|
2425
|
-
|
|
2426
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
2427
|
-
|
|
2428
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
2429
|
-
|
|
2430
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
2431
|
-
return styleName.indexOf('.') !== -1;
|
|
2432
|
-
};
|
|
2433
|
-
|
|
2434
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
2435
|
-
if (handleMissingStyleName === 'throw') {
|
|
2436
|
-
throw new Error(message);
|
|
2437
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
2438
|
-
// eslint-disable-next-line no-console
|
|
2439
|
-
console.warn(message);
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
return null;
|
|
2443
|
-
};
|
|
2444
|
-
|
|
2445
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
2446
|
-
// Note:
|
|
2447
|
-
// Do not use the desctructing syntax with Babel.
|
|
2448
|
-
// Desctructing adds _slicedToArray helper.
|
|
2449
|
-
var styleNameParts = styleName.split('.');
|
|
2450
|
-
var importName = styleNameParts[0];
|
|
2451
|
-
var moduleName = styleNameParts[1];
|
|
2452
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
2453
|
-
|
|
2454
|
-
if (!moduleName) {
|
|
2455
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
if (!styleModuleImportMap[importName]) {
|
|
2459
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
2463
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
return styleModuleImportMap[importName][moduleName];
|
|
2467
|
-
};
|
|
2468
|
-
|
|
2469
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
2470
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
2471
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
2472
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
2473
|
-
}).filter(function (importKey) {
|
|
2474
|
-
return importKey;
|
|
2475
|
-
});
|
|
2476
|
-
|
|
2477
|
-
if (importKeysWithMatches.length > 1) {
|
|
2478
|
-
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');
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
if (importKeysWithMatches.length === 0) {
|
|
2482
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
2483
|
-
}
|
|
2484
|
-
|
|
2485
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
2486
|
-
};
|
|
2487
|
-
|
|
2488
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
2489
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
2490
|
-
|
|
2491
|
-
var _ref = options || {},
|
|
2492
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
2493
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
2494
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
2495
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
2496
|
-
|
|
2497
|
-
if (!styleNameValue) {
|
|
2498
|
-
return '';
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
2502
|
-
return styleName;
|
|
2503
|
-
}).map(function (styleName) {
|
|
2504
|
-
if (isNamespacedStyleName(styleName)) {
|
|
2505
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
2506
|
-
}
|
|
2507
|
-
|
|
2508
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
2509
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
2513
|
-
if (!autoResolveMultipleImports) {
|
|
2514
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2520
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
2521
|
-
|
|
2522
|
-
if (!styleModuleMap[styleName]) {
|
|
2523
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
return styleModuleMap[styleName];
|
|
2527
|
-
}).filter(function (className) {
|
|
2528
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
2529
|
-
return className;
|
|
2530
|
-
}).join(' ');
|
|
2531
|
-
};
|
|
2532
|
-
|
|
2533
|
-
exports["default"] = _default;
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
});
|
|
2537
|
-
|
|
2538
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
2539
|
-
|
|
2540
142
|
var _styleModuleImportMap$4 = {
|
|
2541
143
|
"./load-more.m.css": {
|
|
2542
144
|
"button": "load-more-m_button__1mmf1",
|
|
@@ -2548,7 +150,7 @@ var _styleModuleImportMap$4 = {
|
|
|
2548
150
|
|
|
2549
151
|
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; }
|
|
2550
152
|
|
|
2551
|
-
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) {
|
|
153
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2552
154
|
var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
2553
155
|
var _ref$config = _ref.config,
|
|
2554
156
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -2569,26 +171,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
2569
171
|
if (!showButton) return null;
|
|
2570
172
|
var textColor = getTextColor(theme);
|
|
2571
173
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
2572
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
174
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2573
175
|
onClick: onClick,
|
|
2574
176
|
"data-test-id": "load-more",
|
|
2575
|
-
className: "arr--button " +
|
|
2576
|
-
}, buttonText) : /*#__PURE__*/
|
|
177
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$4)
|
|
178
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
2577
179
|
href: slug,
|
|
2578
180
|
navigateTo: navigate,
|
|
2579
181
|
"data-test-id": "load-more",
|
|
2580
182
|
"aria-label": "load-more"
|
|
2581
|
-
}, /*#__PURE__*/
|
|
2582
|
-
className: "arr--button " +
|
|
183
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
184
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$4)
|
|
2583
185
|
}, buttonText));
|
|
2584
186
|
};
|
|
2585
187
|
LoadmoreButton.propTypes = {
|
|
2586
|
-
collection:
|
|
2587
|
-
template:
|
|
2588
|
-
config:
|
|
2589
|
-
onClick:
|
|
2590
|
-
navigate:
|
|
2591
|
-
qtConfig:
|
|
188
|
+
collection: PropTypes__default["default"].object,
|
|
189
|
+
template: PropTypes__default["default"].string,
|
|
190
|
+
config: PropTypes__default["default"].object,
|
|
191
|
+
onClick: PropTypes__default["default"].func,
|
|
192
|
+
navigate: PropTypes__default["default"].func,
|
|
193
|
+
qtConfig: PropTypes__default["default"].object
|
|
2592
194
|
};
|
|
2593
195
|
|
|
2594
196
|
var UserFallbackIcon = function UserFallbackIcon(_ref) {
|
|
@@ -2596,20 +198,20 @@ var UserFallbackIcon = function UserFallbackIcon(_ref) {
|
|
|
2596
198
|
width = _ref$width === void 0 ? 120 : _ref$width,
|
|
2597
199
|
_ref$height = _ref.height,
|
|
2598
200
|
height = _ref$height === void 0 ? 120 : _ref$height;
|
|
2599
|
-
return /*#__PURE__*/
|
|
201
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2600
202
|
width: width,
|
|
2601
203
|
height: height,
|
|
2602
204
|
viewBox: "0 0 120 120",
|
|
2603
205
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2604
|
-
}, /*#__PURE__*/
|
|
206
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2605
207
|
d: "M93.28 108.98c-1.055-17.675-15.47-31.678-33.098-31.678-17.708 0-32.173 14.129-33.11 31.916 9.415 6.311 20.741 9.993 32.927 9.993 12.338 0 23.795-3.774 33.28-10.23l.001-.001zM58.584 73.283c9.928 0 17.977-8.275 17.977-18.483 0-10.209-8.049-18.484-17.977-18.484-9.929 0-17.977 8.275-17.977 18.484 0 10.208 8.048 18.483 17.977 18.483zM60 120C26.863 120 0 93.137 0 60S26.863 0 60 0s60 26.863 60 60-26.863 60-60 60z",
|
|
2606
208
|
fill: "#DADADA",
|
|
2607
209
|
fillRule: "nonzero"
|
|
2608
210
|
}));
|
|
2609
211
|
};
|
|
2610
212
|
UserFallbackIcon.propTypes = {
|
|
2611
|
-
width:
|
|
2612
|
-
height:
|
|
213
|
+
width: PropTypes__default["default"].object,
|
|
214
|
+
height: PropTypes__default["default"].object
|
|
2613
215
|
};
|
|
2614
216
|
|
|
2615
217
|
var _styleModuleImportMap$3 = {
|
|
@@ -2629,12 +231,12 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
2629
231
|
var avatarUrl = author["avatar-url"],
|
|
2630
232
|
avatarS3Key = author["avatar-s3-key"],
|
|
2631
233
|
name = author.name;
|
|
2632
|
-
return /*#__PURE__*/
|
|
234
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2633
235
|
"data-test-id": "author-image",
|
|
2634
|
-
className: "arr--author-image " +
|
|
2635
|
-
}, /*#__PURE__*/
|
|
236
|
+
className: "arr--author-image " + _getClassName__default["default"]("author-image ".concat(templateStyle), _styleModuleImportMap$3)
|
|
237
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2636
238
|
className: "author-image-m_image-container__19WNd"
|
|
2637
|
-
}, avatarS3Key ? /*#__PURE__*/
|
|
239
|
+
}, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
2638
240
|
slug: avatarS3Key,
|
|
2639
241
|
alt: name,
|
|
2640
242
|
defaultWidth: 250,
|
|
@@ -2644,9 +246,9 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
2644
246
|
imgParams: {
|
|
2645
247
|
auto: ["format", "compress"]
|
|
2646
248
|
}
|
|
2647
|
-
}) : avatarUrl ? /*#__PURE__*/
|
|
249
|
+
}) : avatarUrl ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2648
250
|
src: avatarUrl
|
|
2649
|
-
}) : /*#__PURE__*/
|
|
251
|
+
}) : /*#__PURE__*/React__default["default"].createElement(UserFallbackIcon, null)));
|
|
2650
252
|
};
|
|
2651
253
|
|
|
2652
254
|
var AuthorImage = function AuthorImage(_ref) {
|
|
@@ -2660,202 +262,123 @@ var AuthorImage = function AuthorImage(_ref) {
|
|
|
2660
262
|
var mountAt = config.mountAt || "";
|
|
2661
263
|
var templateStyle = "";
|
|
2662
264
|
if (template === "smallerCircle") templateStyle = "smaller-circle";else if (template === "smallCircle") templateStyle = "small-circle";else if (template === "square") templateStyle = "square";
|
|
2663
|
-
if (slug) return /*#__PURE__*/
|
|
265
|
+
if (slug) return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2664
266
|
href: "".concat(mountAt, "/author/") + slug
|
|
2665
267
|
}, authorWithImage(author, templateStyle));else return authorWithImage(author, templateStyle);
|
|
2666
268
|
};
|
|
2667
269
|
|
|
2668
270
|
AuthorImage.propTypes = {
|
|
2669
|
-
author:
|
|
2670
|
-
"avatar-url":
|
|
2671
|
-
"avatar-s3-key":
|
|
2672
|
-
name:
|
|
2673
|
-
slug:
|
|
271
|
+
author: PropTypes__default["default"].shape({
|
|
272
|
+
"avatar-url": PropTypes__default["default"].string,
|
|
273
|
+
"avatar-s3-key": PropTypes__default["default"].string,
|
|
274
|
+
name: PropTypes__default["default"].string,
|
|
275
|
+
slug: PropTypes__default["default"].string
|
|
2674
276
|
}),
|
|
2675
|
-
template:
|
|
277
|
+
template: PropTypes__default["default"].string
|
|
2676
278
|
};
|
|
2677
279
|
|
|
2678
|
-
function _extends() {
|
|
2679
|
-
_extends = Object.assign || function (target) {
|
|
2680
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2681
|
-
var source = arguments[i];
|
|
2682
|
-
|
|
2683
|
-
for (var key in source) {
|
|
2684
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2685
|
-
target[key] = source[key];
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
2688
|
-
}
|
|
2689
|
-
|
|
2690
|
-
return target;
|
|
2691
|
-
};
|
|
2692
|
-
|
|
2693
|
-
return _extends.apply(this, arguments);
|
|
2694
|
-
}
|
|
2695
|
-
|
|
2696
|
-
function _arrayWithHoles(arr) {
|
|
2697
|
-
if (Array.isArray(arr)) return arr;
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2701
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2702
|
-
|
|
2703
|
-
if (_i == null) return;
|
|
2704
|
-
var _arr = [];
|
|
2705
|
-
var _n = true;
|
|
2706
|
-
var _d = false;
|
|
2707
|
-
|
|
2708
|
-
var _s, _e;
|
|
2709
|
-
|
|
2710
|
-
try {
|
|
2711
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2712
|
-
_arr.push(_s.value);
|
|
2713
|
-
|
|
2714
|
-
if (i && _arr.length === i) break;
|
|
2715
|
-
}
|
|
2716
|
-
} catch (err) {
|
|
2717
|
-
_d = true;
|
|
2718
|
-
_e = err;
|
|
2719
|
-
} finally {
|
|
2720
|
-
try {
|
|
2721
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
2722
|
-
} finally {
|
|
2723
|
-
if (_d) throw _e;
|
|
2724
|
-
}
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
return _arr;
|
|
2728
|
-
}
|
|
2729
|
-
|
|
2730
|
-
function _arrayLikeToArray(arr, len) {
|
|
2731
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2732
|
-
|
|
2733
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2734
|
-
arr2[i] = arr[i];
|
|
2735
|
-
}
|
|
2736
|
-
|
|
2737
|
-
return arr2;
|
|
2738
|
-
}
|
|
2739
|
-
|
|
2740
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
2741
|
-
if (!o) return;
|
|
2742
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
2743
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2744
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2745
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
2746
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
2747
|
-
}
|
|
2748
|
-
|
|
2749
|
-
function _nonIterableRest() {
|
|
2750
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
function _slicedToArray(arr, i) {
|
|
2754
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
2755
|
-
}
|
|
2756
|
-
|
|
2757
280
|
var Twitter = function Twitter(_ref) {
|
|
2758
281
|
var _ref$color = _ref.color,
|
|
2759
282
|
color = _ref$color === void 0 ? "#1CB7EB" : _ref$color;
|
|
2760
|
-
return /*#__PURE__*/
|
|
283
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2761
284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2762
285
|
width: "24",
|
|
2763
286
|
height: "24",
|
|
2764
287
|
viewBox: "0 0 24 24"
|
|
2765
|
-
}, /*#__PURE__*/
|
|
288
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2766
289
|
fill: color,
|
|
2767
290
|
d: "M19.137 8.594c.023.094.035.246.035.457 0 1.687-.41 3.316-1.23 4.887-.844 1.664-2.028 2.988-3.551 3.972-1.664 1.102-3.575 1.652-5.73 1.652-2.063 0-3.95-.55-5.661-1.652.258.024.55.035.879.035 1.71 0 3.246-.527 4.605-1.582-.82 0-1.54-.24-2.162-.72a3.673 3.673 0 01-1.283-1.811c.234.023.457.035.668.035.328 0 .656-.035.984-.105a3.724 3.724 0 01-2.109-1.301 3.542 3.542 0 01-.844-2.32v-.07a3.493 3.493 0 001.653.492 4.097 4.097 0 01-1.196-1.336 3.557 3.557 0 01-.457-1.776c0-.644.176-1.26.528-1.845a10.188 10.188 0 003.357 2.742 10.222 10.222 0 004.236 1.125 5.122 5.122 0 01-.07-.844c0-.656.164-1.272.492-1.846a3.615 3.615 0 011.336-1.353 3.568 3.568 0 011.828-.492c.54 0 1.037.105 1.494.316.457.21.862.492 1.213.844a7.479 7.479 0 002.356-.88c-.281.868-.82 1.548-1.617 2.04A7.926 7.926 0 0021 6.66a8.132 8.132 0 01-1.863 1.934z"
|
|
2768
291
|
}));
|
|
2769
292
|
};
|
|
2770
293
|
Twitter.propTypes = {
|
|
2771
|
-
color:
|
|
294
|
+
color: PropTypes__default["default"].string
|
|
2772
295
|
};
|
|
2773
296
|
|
|
2774
297
|
var Facebook = function Facebook(_ref) {
|
|
2775
298
|
var _ref$color = _ref.color,
|
|
2776
299
|
color = _ref$color === void 0 ? "#3B5998" : _ref$color;
|
|
2777
|
-
return /*#__PURE__*/
|
|
300
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2778
301
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2779
302
|
width: "24",
|
|
2780
303
|
height: "24",
|
|
2781
304
|
viewBox: "0 0 24 24"
|
|
2782
|
-
}, /*#__PURE__*/
|
|
305
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2783
306
|
fill: color,
|
|
2784
307
|
d: "M9.906 20v-7.156H7.5V10h2.406V7.75c0-1.187.334-2.11 1-2.766.667-.656 1.552-.984 2.656-.984.896 0 1.625.042 2.188.125v2.531h-1.5c-.563 0-.948.125-1.156.375-.167.209-.25.542-.25 1V10H15.5l-.375 2.844h-2.281V20H9.906z"
|
|
2785
308
|
}));
|
|
2786
309
|
};
|
|
2787
310
|
Facebook.propTypes = {
|
|
2788
|
-
color:
|
|
311
|
+
color: PropTypes__default["default"].string
|
|
2789
312
|
};
|
|
2790
313
|
|
|
2791
314
|
var LinkedIn = function LinkedIn(_ref) {
|
|
2792
315
|
var _ref$color = _ref.color,
|
|
2793
316
|
color = _ref$color === void 0 ? "#0077B5" : _ref$color;
|
|
2794
|
-
return /*#__PURE__*/
|
|
317
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2795
318
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2796
319
|
width: "24",
|
|
2797
320
|
height: "24",
|
|
2798
321
|
viewBox: "0 0 24 24"
|
|
2799
|
-
}, /*#__PURE__*/
|
|
322
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2800
323
|
fill: color,
|
|
2801
324
|
d: "M6.71 19H3.26V7.904h3.45V19zM5.005 6.383a1.926 1.926 0 01-1.41-.594A1.923 1.923 0 013 4.38c0-.544.198-1.014.594-1.41a1.926 1.926 0 011.41-.594c.544 0 1.014.198 1.41.594.396.396.594.866.594 1.41 0 .544-.198 1.014-.594 1.41a1.926 1.926 0 01-1.41.594zM19.625 19h-3.451v-5.418c0-.89-.074-1.534-.223-1.93-.272-.668-.804-1.002-1.596-1.002-.791 0-1.348.297-1.67.891-.247.445-.37 1.1-.37 1.967V19H8.9V7.904h3.303v1.522h.037c.248-.495.643-.903 1.188-1.225.593-.396 1.286-.594 2.078-.594 1.608 0 2.734.508 3.377 1.522.495.816.742 2.078.742 3.785V19z"
|
|
2802
325
|
}));
|
|
2803
326
|
};
|
|
2804
327
|
LinkedIn.propTypes = {
|
|
2805
|
-
color:
|
|
328
|
+
color: PropTypes__default["default"].string
|
|
2806
329
|
};
|
|
2807
330
|
|
|
2808
331
|
var WhatsApp = function WhatsApp(_ref) {
|
|
2809
332
|
var _ref$color = _ref.color,
|
|
2810
333
|
color = _ref$color === void 0 ? "#4AC959" : _ref$color;
|
|
2811
|
-
return /*#__PURE__*/
|
|
334
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2812
335
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2813
336
|
width: "24",
|
|
2814
337
|
height: "24",
|
|
2815
338
|
viewBox: "0 0 24 24"
|
|
2816
|
-
}, /*#__PURE__*/
|
|
339
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2817
340
|
fill: color,
|
|
2818
341
|
fillRule: "evenodd",
|
|
2819
342
|
d: "M18.404 5.505a9.457 9.457 0 012.02 2.96 8.587 8.587 0 01.715 3.449 8.665 8.665 0 01-1.245 4.53 9.282 9.282 0 01-3.347 3.307 8.894 8.894 0 01-4.552 1.225 8.835 8.835 0 01-4.327-1.102l-4.817 1.265 1.307-4.694a8.775 8.775 0 01-1.225-4.531 8.77 8.77 0 011.225-4.531 9.17 9.17 0 013.306-3.307 8.781 8.781 0 014.531-1.224c1.198 0 2.347.23 3.45.693a9.515 9.515 0 012.959 1.96zm-6.409 13.96c1.36 0 2.626-.34 3.797-1.02a7.75 7.75 0 002.796-2.756 7.202 7.202 0 001.04-3.775c0-.98-.203-1.933-.612-2.858a8.088 8.088 0 00-1.694-2.47 7.565 7.565 0 00-2.449-1.653 7.405 7.405 0 00-2.878-.571c-1.36 0-2.62.34-3.776 1.02a7.646 7.646 0 00-2.755 2.756 7.316 7.316 0 00-1.02 3.776c0 1.442.394 2.775 1.183 4l.164.286-.776 2.775 2.857-.734.286.163a7.275 7.275 0 003.837 1.061zm4.123-5.674l.123.082c.19.082.299.15.326.204.027.054.034.19.02.408a2.11 2.11 0 01-.163.674c-.095.231-.313.462-.653.694-.34.231-.633.36-.878.388-.38.054-.748.054-1.102 0-.408-.082-.952-.273-1.632-.572-1.388-.599-2.654-1.714-3.797-3.347l-.081-.082c-.6-.843-.898-1.62-.898-2.327 0-.707.244-1.32.734-1.837l.041-.04c.19-.19.395-.286.612-.286h.49c.11 0 .198.02.266.061.068.041.129.143.183.306l.694 1.674c.082.163.095.3.041.408a2.832 2.832 0 01-.53.735.917.917 0 00-.205.265c-.027.068 0 .143.082.225.38.707.83 1.265 1.347 1.673.381.3.952.64 1.714 1.02.218.11.381.096.49-.04.354-.408.599-.707.735-.898.054-.109.123-.163.204-.163.082 0 .177.013.286.04.218.082.735.327 1.551.735z"
|
|
2820
343
|
}));
|
|
2821
344
|
};
|
|
2822
345
|
WhatsApp.propTypes = {
|
|
2823
|
-
color:
|
|
346
|
+
color: PropTypes__default["default"].string
|
|
2824
347
|
};
|
|
2825
348
|
|
|
2826
349
|
var getSocialIcons = function getSocialIcons(color, iconType) {
|
|
2827
350
|
switch (iconType) {
|
|
2828
351
|
case "plain-color-svg":
|
|
2829
352
|
return {
|
|
2830
|
-
facebook: /*#__PURE__*/
|
|
353
|
+
facebook: /*#__PURE__*/React__default["default"].createElement(Facebook, {
|
|
2831
354
|
key: iconType
|
|
2832
355
|
}),
|
|
2833
|
-
twitter: /*#__PURE__*/
|
|
356
|
+
twitter: /*#__PURE__*/React__default["default"].createElement(Twitter, {
|
|
2834
357
|
key: iconType
|
|
2835
358
|
}),
|
|
2836
|
-
linkedin: /*#__PURE__*/
|
|
359
|
+
linkedin: /*#__PURE__*/React__default["default"].createElement(LinkedIn, {
|
|
2837
360
|
key: iconType
|
|
2838
361
|
}),
|
|
2839
|
-
whatsapp: /*#__PURE__*/
|
|
362
|
+
whatsapp: /*#__PURE__*/React__default["default"].createElement(WhatsApp, {
|
|
2840
363
|
key: iconType
|
|
2841
364
|
})
|
|
2842
365
|
};
|
|
2843
366
|
|
|
2844
367
|
default:
|
|
2845
368
|
return {
|
|
2846
|
-
facebook: /*#__PURE__*/
|
|
369
|
+
facebook: /*#__PURE__*/React__default["default"].createElement(Facebook, {
|
|
2847
370
|
color: color,
|
|
2848
371
|
key: iconType
|
|
2849
372
|
}),
|
|
2850
|
-
twitter: /*#__PURE__*/
|
|
373
|
+
twitter: /*#__PURE__*/React__default["default"].createElement(Twitter, {
|
|
2851
374
|
color: color,
|
|
2852
375
|
key: iconType
|
|
2853
376
|
}),
|
|
2854
|
-
linkedin: /*#__PURE__*/
|
|
377
|
+
linkedin: /*#__PURE__*/React__default["default"].createElement(LinkedIn, {
|
|
2855
378
|
color: color,
|
|
2856
379
|
key: iconType
|
|
2857
380
|
}),
|
|
2858
|
-
whatsapp: /*#__PURE__*/
|
|
381
|
+
whatsapp: /*#__PURE__*/React__default["default"].createElement(WhatsApp, {
|
|
2859
382
|
color: color,
|
|
2860
383
|
key: iconType
|
|
2861
384
|
})
|
|
@@ -2911,22 +434,22 @@ var socialShareData = function socialShareData(_ref) {
|
|
|
2911
434
|
var CloseIcon = function CloseIcon(_ref) {
|
|
2912
435
|
var _ref$color = _ref.color,
|
|
2913
436
|
color = _ref$color === void 0 ? "#333" : _ref$color;
|
|
2914
|
-
return /*#__PURE__*/
|
|
437
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2915
438
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2916
439
|
width: "24",
|
|
2917
440
|
height: "24",
|
|
2918
441
|
viewBox: "0 0 24 24"
|
|
2919
|
-
}, /*#__PURE__*/
|
|
442
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2920
443
|
fill: "none",
|
|
2921
444
|
stroke: color,
|
|
2922
445
|
strokeLinecap: "square",
|
|
2923
446
|
strokeWidth: "2"
|
|
2924
|
-
}, /*#__PURE__*/
|
|
447
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2925
448
|
d: "M16.95 6.914l-9.9 9.9M16.95 17.107l-9.9-9.9"
|
|
2926
449
|
})));
|
|
2927
450
|
};
|
|
2928
451
|
CloseIcon.propTypes = {
|
|
2929
|
-
color:
|
|
452
|
+
color: PropTypes__default["default"].string
|
|
2930
453
|
};
|
|
2931
454
|
|
|
2932
455
|
var _styleModuleImportMap$2 = {
|
|
@@ -2947,17 +470,17 @@ var _styleModuleImportMap$2 = {
|
|
|
2947
470
|
};
|
|
2948
471
|
|
|
2949
472
|
var popupSocialShareItem = function popupSocialShareItem(url, icon, text, index) {
|
|
2950
|
-
return url ? /*#__PURE__*/
|
|
473
|
+
return url ? /*#__PURE__*/React__default["default"].createElement("li", {
|
|
2951
474
|
className: "social-share-popup-m_social-icon-wrapper__36jyV",
|
|
2952
475
|
"data-testid": text,
|
|
2953
476
|
key: "popup-item-".concat(index)
|
|
2954
|
-
}, /*#__PURE__*/
|
|
477
|
+
}, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
2955
478
|
href: url,
|
|
2956
479
|
target: "_blank",
|
|
2957
480
|
rel: "noopener noreferrer",
|
|
2958
481
|
className: "social-share-popup-m_social-wrapper__1lPzr",
|
|
2959
482
|
"aria-label": "social-icon"
|
|
2960
|
-
}, icon, /*#__PURE__*/
|
|
483
|
+
}, icon, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2961
484
|
className: "social-share-popup-m_social-text__1QPXb"
|
|
2962
485
|
}, text))) : null;
|
|
2963
486
|
};
|
|
@@ -2987,20 +510,20 @@ var SocialSharePopup = function SocialSharePopup(_ref) {
|
|
|
2987
510
|
iconType: iconType
|
|
2988
511
|
};
|
|
2989
512
|
var popupItemsList = socialShareData(options);
|
|
2990
|
-
return /*#__PURE__*/
|
|
2991
|
-
className:
|
|
2992
|
-
}, /*#__PURE__*/
|
|
513
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
514
|
+
className: _getClassName__default["default"]("share-popup-wrapper ".concat(textColor), _styleModuleImportMap$2)
|
|
515
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2993
516
|
className: "social-share-popup-m_share-popup__QRt3l social-share-popup-m_share-popup-wrapper__GEJqD"
|
|
2994
|
-
}, /*#__PURE__*/
|
|
517
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2995
518
|
className: "social-share-popup-m_top-bar__174Um"
|
|
2996
|
-
}, /*#__PURE__*/
|
|
519
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2997
520
|
className: "social-share-popup-m_share-text__19E-F"
|
|
2998
|
-
}, "Share via"), /*#__PURE__*/
|
|
521
|
+
}, "Share via"), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2999
522
|
className: "social-share-popup-m_close__3k-Hj",
|
|
3000
523
|
onClick: closePopup
|
|
3001
|
-
}, /*#__PURE__*/
|
|
524
|
+
}, /*#__PURE__*/React__default["default"].createElement(CloseIcon, {
|
|
3002
525
|
color: iconColor
|
|
3003
|
-
}))), /*#__PURE__*/
|
|
526
|
+
}))), /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
3004
527
|
className: "social-share-popup-m_wrapper__3Ytce"
|
|
3005
528
|
}, popupItemsList.map(function (_ref2, index) {
|
|
3006
529
|
var url = _ref2.url,
|
|
@@ -3012,278 +535,35 @@ var SocialSharePopup = function SocialSharePopup(_ref) {
|
|
|
3012
535
|
}))));
|
|
3013
536
|
};
|
|
3014
537
|
SocialSharePopup.propTypes = {
|
|
3015
|
-
fbUrl:
|
|
3016
|
-
twitterUrl:
|
|
3017
|
-
linkedinUrl:
|
|
3018
|
-
whatsappUrl:
|
|
3019
|
-
grey:
|
|
3020
|
-
primaryColor:
|
|
3021
|
-
closePopup:
|
|
3022
|
-
theme:
|
|
3023
|
-
iconType:
|
|
538
|
+
fbUrl: PropTypes__default["default"].string,
|
|
539
|
+
twitterUrl: PropTypes__default["default"].string,
|
|
540
|
+
linkedinUrl: PropTypes__default["default"].string,
|
|
541
|
+
whatsappUrl: PropTypes__default["default"].string,
|
|
542
|
+
grey: PropTypes__default["default"].string,
|
|
543
|
+
primaryColor: PropTypes__default["default"].string,
|
|
544
|
+
closePopup: PropTypes__default["default"].bool,
|
|
545
|
+
theme: PropTypes__default["default"].string,
|
|
546
|
+
iconType: PropTypes__default["default"].string
|
|
3024
547
|
};
|
|
3025
548
|
|
|
3026
549
|
var ShareIcon = function ShareIcon(_ref) {
|
|
3027
550
|
var _ref$color = _ref.color,
|
|
3028
551
|
color = _ref$color === void 0 ? "#0D0D0D" : _ref$color;
|
|
3029
|
-
return /*#__PURE__*/
|
|
552
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3030
553
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3031
554
|
width: "24",
|
|
3032
555
|
height: "24",
|
|
3033
556
|
viewBox: "0 0 24 24"
|
|
3034
|
-
}, /*#__PURE__*/
|
|
557
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3035
558
|
fill: color,
|
|
3036
559
|
fillRule: "evenodd",
|
|
3037
560
|
d: "M15.843 3.189c-1.478 0-2.689 1.239-2.689 2.75 0 .293.046.58.13.846L8.844 9.31a2.638 2.638 0 00-1.687-.621c-1.477 0-2.688 1.238-2.688 2.75 0 1.51 1.21 2.75 2.688 2.75.638 0 1.224-.231 1.687-.615l4.446 2.525a2.778 2.778 0 00-.136.84c0 1.51 1.211 2.75 2.689 2.75 1.477 0 2.688-1.24 2.688-2.75 0-1.512-1.21-2.75-2.688-2.75-.742 0-1.419.317-1.907.82l-4.323-2.46a2.763 2.763 0 000-2.221l4.317-2.459c.488.506 1.168.82 1.913.82 1.477 0 2.688-1.239 2.688-2.75s-1.21-2.75-2.688-2.75z"
|
|
3038
561
|
}));
|
|
3039
562
|
};
|
|
3040
563
|
ShareIcon.propTypes = {
|
|
3041
|
-
color:
|
|
564
|
+
color: PropTypes__default["default"].string
|
|
3042
565
|
};
|
|
3043
566
|
|
|
3044
|
-
/**
|
|
3045
|
-
* The base implementation of `_.slice` without an iteratee call guard.
|
|
3046
|
-
*
|
|
3047
|
-
* @private
|
|
3048
|
-
* @param {Array} array The array to slice.
|
|
3049
|
-
* @param {number} [start=0] The start position.
|
|
3050
|
-
* @param {number} [end=array.length] The end position.
|
|
3051
|
-
* @returns {Array} Returns the slice of `array`.
|
|
3052
|
-
*/
|
|
3053
|
-
function baseSlice(array, start, end) {
|
|
3054
|
-
var index = -1,
|
|
3055
|
-
length = array.length;
|
|
3056
|
-
|
|
3057
|
-
if (start < 0) {
|
|
3058
|
-
start = -start > length ? 0 : (length + start);
|
|
3059
|
-
}
|
|
3060
|
-
end = end > length ? length : end;
|
|
3061
|
-
if (end < 0) {
|
|
3062
|
-
end += length;
|
|
3063
|
-
}
|
|
3064
|
-
length = start > end ? 0 : ((end - start) >>> 0);
|
|
3065
|
-
start >>>= 0;
|
|
3066
|
-
|
|
3067
|
-
var result = Array(length);
|
|
3068
|
-
while (++index < length) {
|
|
3069
|
-
result[index] = array[index + start];
|
|
3070
|
-
}
|
|
3071
|
-
return result;
|
|
3072
|
-
}
|
|
3073
|
-
|
|
3074
|
-
var _baseSlice = baseSlice;
|
|
3075
|
-
|
|
3076
|
-
/**
|
|
3077
|
-
* Casts `array` to a slice if it's needed.
|
|
3078
|
-
*
|
|
3079
|
-
* @private
|
|
3080
|
-
* @param {Array} array The array to inspect.
|
|
3081
|
-
* @param {number} start The start position.
|
|
3082
|
-
* @param {number} [end=array.length] The end position.
|
|
3083
|
-
* @returns {Array} Returns the cast slice.
|
|
3084
|
-
*/
|
|
3085
|
-
function castSlice(array, start, end) {
|
|
3086
|
-
var length = array.length;
|
|
3087
|
-
end = end === undefined ? length : end;
|
|
3088
|
-
return (!start && end >= length) ? array : _baseSlice(array, start, end);
|
|
3089
|
-
}
|
|
3090
|
-
|
|
3091
|
-
var _castSlice = castSlice;
|
|
3092
|
-
|
|
3093
|
-
/** Used to compose unicode character classes. */
|
|
3094
|
-
var rsAstralRange$1 = '\\ud800-\\udfff',
|
|
3095
|
-
rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
3096
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
3097
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
3098
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
|
|
3099
|
-
rsVarRange$1 = '\\ufe0e\\ufe0f';
|
|
3100
|
-
|
|
3101
|
-
/** Used to compose unicode capture groups. */
|
|
3102
|
-
var rsZWJ$1 = '\\u200d';
|
|
3103
|
-
|
|
3104
|
-
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
3105
|
-
var reHasUnicode = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + ']');
|
|
3106
|
-
|
|
3107
|
-
/**
|
|
3108
|
-
* Checks if `string` contains Unicode symbols.
|
|
3109
|
-
*
|
|
3110
|
-
* @private
|
|
3111
|
-
* @param {string} string The string to inspect.
|
|
3112
|
-
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
3113
|
-
*/
|
|
3114
|
-
function hasUnicode(string) {
|
|
3115
|
-
return reHasUnicode.test(string);
|
|
3116
|
-
}
|
|
3117
|
-
|
|
3118
|
-
var _hasUnicode = hasUnicode;
|
|
3119
|
-
|
|
3120
|
-
/**
|
|
3121
|
-
* Converts an ASCII `string` to an array.
|
|
3122
|
-
*
|
|
3123
|
-
* @private
|
|
3124
|
-
* @param {string} string The string to convert.
|
|
3125
|
-
* @returns {Array} Returns the converted array.
|
|
3126
|
-
*/
|
|
3127
|
-
function asciiToArray(string) {
|
|
3128
|
-
return string.split('');
|
|
3129
|
-
}
|
|
3130
|
-
|
|
3131
|
-
var _asciiToArray = asciiToArray;
|
|
3132
|
-
|
|
3133
|
-
/** Used to compose unicode character classes. */
|
|
3134
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
3135
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
3136
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
3137
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
3138
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
3139
|
-
rsVarRange = '\\ufe0e\\ufe0f';
|
|
3140
|
-
|
|
3141
|
-
/** Used to compose unicode capture groups. */
|
|
3142
|
-
var rsAstral = '[' + rsAstralRange + ']',
|
|
3143
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
3144
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
3145
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
3146
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
3147
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
3148
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
3149
|
-
rsZWJ = '\\u200d';
|
|
3150
|
-
|
|
3151
|
-
/** Used to compose unicode regexes. */
|
|
3152
|
-
var reOptMod = rsModifier + '?',
|
|
3153
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
3154
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
3155
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
3156
|
-
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
3157
|
-
|
|
3158
|
-
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
3159
|
-
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
3160
|
-
|
|
3161
|
-
/**
|
|
3162
|
-
* Converts a Unicode `string` to an array.
|
|
3163
|
-
*
|
|
3164
|
-
* @private
|
|
3165
|
-
* @param {string} string The string to convert.
|
|
3166
|
-
* @returns {Array} Returns the converted array.
|
|
3167
|
-
*/
|
|
3168
|
-
function unicodeToArray(string) {
|
|
3169
|
-
return string.match(reUnicode) || [];
|
|
3170
|
-
}
|
|
3171
|
-
|
|
3172
|
-
var _unicodeToArray = unicodeToArray;
|
|
3173
|
-
|
|
3174
|
-
/**
|
|
3175
|
-
* Converts `string` to an array.
|
|
3176
|
-
*
|
|
3177
|
-
* @private
|
|
3178
|
-
* @param {string} string The string to convert.
|
|
3179
|
-
* @returns {Array} Returns the converted array.
|
|
3180
|
-
*/
|
|
3181
|
-
function stringToArray(string) {
|
|
3182
|
-
return _hasUnicode(string)
|
|
3183
|
-
? _unicodeToArray(string)
|
|
3184
|
-
: _asciiToArray(string);
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
var _stringToArray = stringToArray;
|
|
3188
|
-
|
|
3189
|
-
/**
|
|
3190
|
-
* Creates a function like `_.lowerFirst`.
|
|
3191
|
-
*
|
|
3192
|
-
* @private
|
|
3193
|
-
* @param {string} methodName The name of the `String` case method to use.
|
|
3194
|
-
* @returns {Function} Returns the new case function.
|
|
3195
|
-
*/
|
|
3196
|
-
function createCaseFirst(methodName) {
|
|
3197
|
-
return function(string) {
|
|
3198
|
-
string = toString_1(string);
|
|
3199
|
-
|
|
3200
|
-
var strSymbols = _hasUnicode(string)
|
|
3201
|
-
? _stringToArray(string)
|
|
3202
|
-
: undefined;
|
|
3203
|
-
|
|
3204
|
-
var chr = strSymbols
|
|
3205
|
-
? strSymbols[0]
|
|
3206
|
-
: string.charAt(0);
|
|
3207
|
-
|
|
3208
|
-
var trailing = strSymbols
|
|
3209
|
-
? _castSlice(strSymbols, 1).join('')
|
|
3210
|
-
: string.slice(1);
|
|
3211
|
-
|
|
3212
|
-
return chr[methodName]() + trailing;
|
|
3213
|
-
};
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3216
|
-
var _createCaseFirst = createCaseFirst;
|
|
3217
|
-
|
|
3218
|
-
/**
|
|
3219
|
-
* Converts the first character of `string` to upper case.
|
|
3220
|
-
*
|
|
3221
|
-
* @static
|
|
3222
|
-
* @memberOf _
|
|
3223
|
-
* @since 4.0.0
|
|
3224
|
-
* @category String
|
|
3225
|
-
* @param {string} [string=''] The string to convert.
|
|
3226
|
-
* @returns {string} Returns the converted string.
|
|
3227
|
-
* @example
|
|
3228
|
-
*
|
|
3229
|
-
* _.upperFirst('fred');
|
|
3230
|
-
* // => 'Fred'
|
|
3231
|
-
*
|
|
3232
|
-
* _.upperFirst('FRED');
|
|
3233
|
-
* // => 'FRED'
|
|
3234
|
-
*/
|
|
3235
|
-
var upperFirst = _createCaseFirst('toUpperCase');
|
|
3236
|
-
|
|
3237
|
-
var upperFirst_1 = upperFirst;
|
|
3238
|
-
|
|
3239
|
-
/**
|
|
3240
|
-
* Converts the first character of `string` to upper case and the remaining
|
|
3241
|
-
* to lower case.
|
|
3242
|
-
*
|
|
3243
|
-
* @static
|
|
3244
|
-
* @memberOf _
|
|
3245
|
-
* @since 3.0.0
|
|
3246
|
-
* @category String
|
|
3247
|
-
* @param {string} [string=''] The string to capitalize.
|
|
3248
|
-
* @returns {string} Returns the capitalized string.
|
|
3249
|
-
* @example
|
|
3250
|
-
*
|
|
3251
|
-
* _.capitalize('FRED');
|
|
3252
|
-
* // => 'Fred'
|
|
3253
|
-
*/
|
|
3254
|
-
function capitalize(string) {
|
|
3255
|
-
return upperFirst_1(toString_1(string).toLowerCase());
|
|
3256
|
-
}
|
|
3257
|
-
|
|
3258
|
-
var capitalize_1 = capitalize;
|
|
3259
|
-
|
|
3260
|
-
/**
|
|
3261
|
-
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
3262
|
-
*
|
|
3263
|
-
* @static
|
|
3264
|
-
* @memberOf _
|
|
3265
|
-
* @since 3.0.0
|
|
3266
|
-
* @category String
|
|
3267
|
-
* @param {string} [string=''] The string to convert.
|
|
3268
|
-
* @returns {string} Returns the camel cased string.
|
|
3269
|
-
* @example
|
|
3270
|
-
*
|
|
3271
|
-
* _.camelCase('Foo Bar');
|
|
3272
|
-
* // => 'fooBar'
|
|
3273
|
-
*
|
|
3274
|
-
* _.camelCase('--foo-bar--');
|
|
3275
|
-
* // => 'fooBar'
|
|
3276
|
-
*
|
|
3277
|
-
* _.camelCase('__FOO_BAR__');
|
|
3278
|
-
* // => 'fooBar'
|
|
3279
|
-
*/
|
|
3280
|
-
var camelCase = _createCompounder(function(result, word, index) {
|
|
3281
|
-
word = word.toLowerCase();
|
|
3282
|
-
return result + (index ? capitalize_1(word) : word);
|
|
3283
|
-
});
|
|
3284
|
-
|
|
3285
|
-
var camelCase_1 = camelCase;
|
|
3286
|
-
|
|
3287
567
|
var _styleModuleImportMap$1 = {
|
|
3288
568
|
"./social-share-template.m.css": {
|
|
3289
569
|
"desktop-view": "social-share-template-m_desktop-view__3TmkO",
|
|
@@ -3307,10 +587,10 @@ var ShareItem = function ShareItem(_ref) {
|
|
|
3307
587
|
url = _ref.url,
|
|
3308
588
|
icon = _ref.icon,
|
|
3309
589
|
dataTestId = _ref.dataTestId;
|
|
3310
|
-
return url ? /*#__PURE__*/
|
|
590
|
+
return url ? /*#__PURE__*/React__default["default"].createElement("li", {
|
|
3311
591
|
"data-testid": dataTestId,
|
|
3312
592
|
className: "social-share-template-m_icon__1Mnu5"
|
|
3313
|
-
}, /*#__PURE__*/
|
|
593
|
+
}, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
3314
594
|
href: url,
|
|
3315
595
|
target: "_blank",
|
|
3316
596
|
rel: "noopener noreferrer",
|
|
@@ -3320,17 +600,17 @@ var ShareItem = function ShareItem(_ref) {
|
|
|
3320
600
|
};
|
|
3321
601
|
|
|
3322
602
|
ShareItem.propTypes = {
|
|
3323
|
-
name:
|
|
3324
|
-
url:
|
|
3325
|
-
icon:
|
|
3326
|
-
dataTestId:
|
|
603
|
+
name: PropTypes__default["default"].string,
|
|
604
|
+
url: PropTypes__default["default"].string,
|
|
605
|
+
icon: PropTypes__default["default"].node,
|
|
606
|
+
dataTestId: PropTypes__default["default"].string
|
|
3327
607
|
};
|
|
3328
608
|
|
|
3329
609
|
function getActionIcon(open, color) {
|
|
3330
|
-
if (!open) return /*#__PURE__*/
|
|
610
|
+
if (!open) return /*#__PURE__*/React__default["default"].createElement(ShareIcon, {
|
|
3331
611
|
color: color
|
|
3332
612
|
});
|
|
3333
|
-
return /*#__PURE__*/
|
|
613
|
+
return /*#__PURE__*/React__default["default"].createElement(CloseIcon, {
|
|
3334
614
|
color: color
|
|
3335
615
|
});
|
|
3336
616
|
}
|
|
@@ -3364,21 +644,21 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
3364
644
|
};
|
|
3365
645
|
var iconsList = socialShareData(options);
|
|
3366
646
|
|
|
3367
|
-
var _useState = useState(open),
|
|
3368
|
-
_useState2 =
|
|
647
|
+
var _useState = React.useState(open),
|
|
648
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
3369
649
|
isOpen = _useState2[0],
|
|
3370
650
|
setIsOpen = _useState2[1];
|
|
3371
651
|
|
|
3372
652
|
var verticalShare = vertical ? "vertical" : "horizontal";
|
|
3373
|
-
useEffect(function () {
|
|
653
|
+
React.useEffect(function () {
|
|
3374
654
|
return setIsOpen(open);
|
|
3375
655
|
}, [open]);
|
|
3376
656
|
|
|
3377
657
|
var shareIcon = function shareIcon() {
|
|
3378
|
-
return /*#__PURE__*/
|
|
658
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
3379
659
|
className: "social-share-template-m_icon__1Mnu5",
|
|
3380
660
|
key: "horizontal-0"
|
|
3381
|
-
}, /*#__PURE__*/
|
|
661
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3382
662
|
onClick: clickHandler
|
|
3383
663
|
}, getActionIcon(isOpen, iconColor)));
|
|
3384
664
|
};
|
|
@@ -3388,16 +668,16 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
3388
668
|
};
|
|
3389
669
|
|
|
3390
670
|
var popUpWrapper = function popUpWrapper() {
|
|
3391
|
-
return /*#__PURE__*/
|
|
671
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3392
672
|
className: "social-share-template-m_tablet-view__kATzi"
|
|
3393
|
-
}, !isOpen && /*#__PURE__*/
|
|
3394
|
-
className:
|
|
3395
|
-
}, shareIcon()), isOpen && /*#__PURE__*/
|
|
673
|
+
}, !isOpen && /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
674
|
+
className: _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$1)
|
|
675
|
+
}, shareIcon()), isOpen && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3396
676
|
className: "social-share-template-m_overlay__1nBp-",
|
|
3397
677
|
onClick: clickHandler
|
|
3398
|
-
}, /*#__PURE__*/
|
|
3399
|
-
className: "arr--popup " +
|
|
3400
|
-
}, /*#__PURE__*/
|
|
678
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
679
|
+
className: "arr--popup " + _getClassName__default["default"]("popup-wrapper ".concat(isOpen ? "popup-open" : ""), _styleModuleImportMap$1)
|
|
680
|
+
}, /*#__PURE__*/React__default["default"].createElement(SocialSharePopup, {
|
|
3401
681
|
fbUrl: fbUrl,
|
|
3402
682
|
twitterUrl: twitterUrl,
|
|
3403
683
|
linkedinUrl: linkedinUrl,
|
|
@@ -3411,76 +691,76 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
3411
691
|
};
|
|
3412
692
|
|
|
3413
693
|
var popupStyle = !isOpen && vertical ? "tablet-view-popup" : "";
|
|
3414
|
-
return /*#__PURE__*/
|
|
694
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3415
695
|
"data-test-id": verticalShare,
|
|
3416
|
-
className: "arr--share " +
|
|
3417
|
-
}, /*#__PURE__*/
|
|
696
|
+
className: "arr--share " + _getClassName__default["default"]("".concat(iconShade, " ").concat(verticalShare, " ").concat(popupStyle), _styleModuleImportMap$1)
|
|
697
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3418
698
|
className: "social-share-template-m_desktop-view__3TmkO"
|
|
3419
|
-
}, /*#__PURE__*/
|
|
3420
|
-
"data-test-id":
|
|
3421
|
-
className: "desktop-share-wrapper " +
|
|
699
|
+
}, /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
700
|
+
"data-test-id": lodash.camelCase(iconType),
|
|
701
|
+
className: "desktop-share-wrapper " + _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$1)
|
|
3422
702
|
}, shareIcon(), iconsList.map(function (iconData, index) {
|
|
3423
|
-
return /*#__PURE__*/
|
|
703
|
+
return /*#__PURE__*/React__default["default"].createElement(ShareItem, _extends__default["default"]({}, iconData, {
|
|
3424
704
|
key: iconData.name,
|
|
3425
705
|
dataTestId: "card-share-".concat(index)
|
|
3426
706
|
}));
|
|
3427
707
|
}))), popUpWrapper());
|
|
3428
708
|
};
|
|
3429
709
|
SocialShareTemplate.propTypes = {
|
|
3430
|
-
fbUrl:
|
|
3431
|
-
twitterUrl:
|
|
3432
|
-
linkedinUrl:
|
|
3433
|
-
whatsappUrl:
|
|
3434
|
-
vertical:
|
|
3435
|
-
theme:
|
|
3436
|
-
iconType:
|
|
3437
|
-
open:
|
|
710
|
+
fbUrl: PropTypes__default["default"].string,
|
|
711
|
+
twitterUrl: PropTypes__default["default"].string,
|
|
712
|
+
linkedinUrl: PropTypes__default["default"].string,
|
|
713
|
+
whatsappUrl: PropTypes__default["default"].string,
|
|
714
|
+
vertical: PropTypes__default["default"].bool,
|
|
715
|
+
theme: PropTypes__default["default"].string,
|
|
716
|
+
iconType: PropTypes__default["default"].string,
|
|
717
|
+
open: PropTypes__default["default"]["boolean"]
|
|
3438
718
|
};
|
|
3439
719
|
|
|
3440
720
|
var Youtube = function Youtube(_ref) {
|
|
3441
721
|
var _ref$color = _ref.color,
|
|
3442
722
|
color = _ref$color === void 0 ? "#F61C0D" : _ref$color;
|
|
3443
|
-
return /*#__PURE__*/
|
|
723
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3444
724
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3445
725
|
width: "24",
|
|
3446
726
|
height: "24",
|
|
3447
727
|
viewBox: "0 0 24 24"
|
|
3448
|
-
}, /*#__PURE__*/
|
|
728
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3449
729
|
fill: color,
|
|
3450
730
|
fillRule: "evenodd",
|
|
3451
731
|
d: "M22.077 6.844c.18.703.308 1.77.385 3.203L22.5 12l-.038 1.953c-.077 1.458-.206 2.54-.385 3.242a2.733 2.733 0 01-.692 1.172 2.654 2.654 0 01-1.193.703c-.666.183-2.23.313-4.692.39l-3.5.04-3.5-.04c-2.462-.077-4.026-.207-4.692-.39a2.657 2.657 0 01-1.193-.703 2.733 2.733 0 01-.692-1.172c-.18-.703-.308-1.784-.385-3.242L1.5 12c0-.573.013-1.224.038-1.953.077-1.432.206-2.5.385-3.203A2.718 2.718 0 013.808 4.93c.666-.183 2.23-.313 4.692-.39L12 4.5l3.5.04c2.462.077 4.026.207 4.692.39a2.718 2.718 0 011.885 1.914zm-12.23 8.36l5.5-3.204-5.5-3.164v6.367z"
|
|
3452
732
|
}));
|
|
3453
733
|
};
|
|
3454
734
|
Youtube.propTypes = {
|
|
3455
|
-
color:
|
|
735
|
+
color: PropTypes__default["default"].string
|
|
3456
736
|
};
|
|
3457
737
|
|
|
3458
738
|
var Instagram = function Instagram() {
|
|
3459
|
-
return /*#__PURE__*/
|
|
739
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3460
740
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3461
741
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
3462
742
|
width: "24",
|
|
3463
743
|
height: "24",
|
|
3464
744
|
viewBox: "0 0 24 24"
|
|
3465
|
-
}, /*#__PURE__*/
|
|
745
|
+
}, /*#__PURE__*/React__default["default"].createElement("defs", null, /*#__PURE__*/React__default["default"].createElement("linearGradient", {
|
|
3466
746
|
id: "prefix__b",
|
|
3467
747
|
x1: "0%",
|
|
3468
748
|
x2: "110.694%",
|
|
3469
749
|
y1: "0%",
|
|
3470
750
|
y2: "109.202%"
|
|
3471
|
-
}, /*#__PURE__*/
|
|
751
|
+
}, /*#__PURE__*/React__default["default"].createElement("stop", {
|
|
3472
752
|
offset: "0%",
|
|
3473
753
|
stopColor: "#724AC6"
|
|
3474
|
-
}), /*#__PURE__*/
|
|
754
|
+
}), /*#__PURE__*/React__default["default"].createElement("stop", {
|
|
3475
755
|
offset: "53.59%",
|
|
3476
756
|
stopColor: "#E5375E"
|
|
3477
|
-
}), /*#__PURE__*/
|
|
757
|
+
}), /*#__PURE__*/React__default["default"].createElement("stop", {
|
|
3478
758
|
offset: "100%",
|
|
3479
759
|
stopColor: "#FC9949"
|
|
3480
|
-
})), /*#__PURE__*/
|
|
760
|
+
})), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3481
761
|
id: "prefix__a",
|
|
3482
762
|
d: "M9 4.636c.784 0 1.512.196 2.182.588.67.392 1.202.924 1.594 1.594.392.67.588 1.398.588 2.182s-.196 1.512-.588 2.182a4.382 4.382 0 01-1.594 1.594c-.67.392-1.398.588-2.182.588s-1.512-.196-2.182-.588a4.382 4.382 0 01-1.594-1.594c-.392-.67-.588-1.398-.588-2.182s.196-1.512.588-2.182a4.382 4.382 0 011.594-1.594A4.247 4.247 0 019 4.636zm0 7.21c.784 0 1.455-.278 2.011-.835.557-.556.835-1.227.835-2.011s-.278-1.455-.835-2.011c-.556-.557-1.227-.835-2.011-.835s-1.455.278-2.011.835c-.557.556-.835 1.227-.835 2.011s.278 1.455.835 2.011A2.739 2.739 0 009 11.846zm5.578-7.4a1.181 1.181 0 01-.322.721.923.923 0 01-.702.304.981.981 0 01-.721-.304.98.98 0 01-.304-.72c0-.279.101-.52.304-.722a.984.984 0 01.72-.303c.279 0 .52.101.722.303a.987.987 0 01.303.721zm2.884 1.025c.025.708.038 1.885.038 3.529s-.019 2.827-.057 3.548c-.038.721-.145 1.347-.322 1.878a4.425 4.425 0 01-1.044 1.651 4.429 4.429 0 01-1.65 1.044c-.532.177-1.158.284-1.879.322-.721.038-1.904.057-3.548.057-1.644 0-2.827-.019-3.548-.057-.721-.038-1.347-.158-1.878-.36a4.05 4.05 0 01-1.651-1.006 4.429 4.429 0 01-1.044-1.65c-.177-.532-.284-1.158-.322-1.879C.519 11.827.5 10.644.5 9c0-1.644.019-2.827.057-3.548.038-.721.145-1.347.322-1.878a4.425 4.425 0 011.044-1.651A4.429 4.429 0 013.573.879C4.106.702 4.732.595 5.453.557 6.173.519 7.356.5 9 .5c1.644 0 2.827.019 3.548.057.721.038 1.347.145 1.878.322a4.425 4.425 0 011.651 1.044 4.429 4.429 0 011.044 1.65c.177.532.29 1.164.341 1.898zm-1.821 8.538c.151-.43.253-1.113.303-2.05.025-.556.038-1.34.038-2.352V8.393a54.22 54.22 0 00-.038-2.353c-.05-.961-.152-1.644-.303-2.049a2.743 2.743 0 00-1.632-1.632c-.405-.151-1.088-.253-2.05-.303a55.796 55.796 0 00-2.352-.038H8.393c-1.012 0-1.796.013-2.353.038-.936.05-1.619.152-2.049.303a2.743 2.743 0 00-1.632 1.632c-.151.405-.253 1.088-.303 2.05-.025.556-.038 1.34-.038 2.352v1.214c0 1.012.013 1.796.038 2.353.05.936.152 1.619.303 2.049.33.784.873 1.328 1.632 1.632.43.151 1.113.253 2.05.303.556.025 1.34.038 2.352.038h1.214a54.22 54.22 0 002.353-.038c.961-.05 1.644-.152 2.049-.303.784-.33 1.328-.873 1.632-1.632z"
|
|
3483
|
-
})), /*#__PURE__*/
|
|
763
|
+
})), /*#__PURE__*/React__default["default"].createElement("use", {
|
|
3484
764
|
fill: "url(#prefix__b)",
|
|
3485
765
|
fillRule: "nonzero",
|
|
3486
766
|
transform: "translate(3 3)",
|
|
@@ -3489,12 +769,12 @@ var Instagram = function Instagram() {
|
|
|
3489
769
|
};
|
|
3490
770
|
|
|
3491
771
|
var Pinterest = function Pinterest() {
|
|
3492
|
-
return /*#__PURE__*/
|
|
772
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3493
773
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3494
774
|
width: "24",
|
|
3495
775
|
height: "24",
|
|
3496
776
|
viewBox: "0 0 24 24"
|
|
3497
|
-
}, /*#__PURE__*/
|
|
777
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3498
778
|
fill: "#E60023",
|
|
3499
779
|
d: "M21.5 12a9.209 9.209 0 01-1.283 4.75 9.6 9.6 0 01-3.467 3.467A9.209 9.209 0 0112 21.5c-.97 0-1.903-.14-2.796-.421.613-1.022.996-1.852 1.149-2.49l.613-2.26c.153.306.434.561.842.766.41.204.856.306 1.341.306.92 0 1.756-.262 2.51-.785.753-.524 1.34-1.232 1.761-2.126.422-.894.632-1.87.632-2.93s-.255-2.012-.766-2.854a5.318 5.318 0 00-2.107-1.973c-.893-.473-1.89-.709-2.987-.709-1.303 0-2.452.268-3.448.805a5.465 5.465 0 00-2.088 2.087 5.704 5.704 0 00-.747 2.854c0 .74.185 1.475.556 2.203.37.728.836 1.22 1.398 1.475.179.076.28.038.306-.115l.268-1.073a.266.266 0 00-.076-.268 3.048 3.048 0 01-.498-.977 3.908 3.908 0 01-.192-1.207c0-.715.173-1.385.518-2.01a3.99 3.99 0 011.474-1.514c.664-.408 1.43-.613 2.299-.613 1.174 0 2.132.364 2.873 1.092.74.728 1.11 1.654 1.11 2.777 0 1.277-.287 2.324-.861 3.141-.575.818-1.284 1.226-2.126 1.226-.486 0-.869-.172-1.15-.517-.28-.345-.37-.747-.268-1.207.051-.28.166-.689.345-1.225.281-.945.421-1.603.421-1.973 0-.37-.102-.677-.306-.92-.204-.242-.498-.363-.881-.363-.485 0-.894.217-1.226.65-.332.435-.498.984-.498 1.648 0 .562.09 1.034.268 1.417L8.591 18.13c-.154.638-.166 1.545-.039 2.72-1.813-.69-3.275-1.839-4.386-3.448C3.056 15.792 2.5 13.991 2.5 12c0-1.711.428-3.294 1.283-4.75A9.6 9.6 0 017.25 3.783 9.209 9.209 0 0112 2.5c1.711 0 3.294.428 4.75 1.283a9.6 9.6 0 013.467 3.467A9.209 9.209 0 0121.5 12z"
|
|
3500
780
|
}));
|
|
@@ -3552,60 +832,60 @@ var AuthorIntroductionCard = function AuthorIntroductionCard(_ref) {
|
|
|
3552
832
|
var getIcon = function getIcon(item) {
|
|
3553
833
|
switch (item) {
|
|
3554
834
|
case "twitter":
|
|
3555
|
-
return /*#__PURE__*/
|
|
835
|
+
return /*#__PURE__*/React__default["default"].createElement(Twitter, null);
|
|
3556
836
|
|
|
3557
837
|
case "facebook":
|
|
3558
|
-
return /*#__PURE__*/
|
|
838
|
+
return /*#__PURE__*/React__default["default"].createElement(Facebook, null);
|
|
3559
839
|
|
|
3560
840
|
case "youtube":
|
|
3561
|
-
return /*#__PURE__*/
|
|
841
|
+
return /*#__PURE__*/React__default["default"].createElement(Youtube, null);
|
|
3562
842
|
|
|
3563
843
|
case "linkedin":
|
|
3564
|
-
return /*#__PURE__*/
|
|
844
|
+
return /*#__PURE__*/React__default["default"].createElement(LinkedIn, null);
|
|
3565
845
|
|
|
3566
846
|
case "whatsapp":
|
|
3567
|
-
return /*#__PURE__*/
|
|
847
|
+
return /*#__PURE__*/React__default["default"].createElement(WhatsApp, {
|
|
3568
848
|
color: "#4AC959"
|
|
3569
849
|
});
|
|
3570
850
|
|
|
3571
851
|
case "instagram":
|
|
3572
|
-
return /*#__PURE__*/
|
|
852
|
+
return /*#__PURE__*/React__default["default"].createElement(Instagram, null);
|
|
3573
853
|
|
|
3574
854
|
case "pinterest":
|
|
3575
|
-
return /*#__PURE__*/
|
|
855
|
+
return /*#__PURE__*/React__default["default"].createElement(Pinterest, null);
|
|
3576
856
|
}
|
|
3577
857
|
};
|
|
3578
858
|
|
|
3579
|
-
return /*#__PURE__*/
|
|
859
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3580
860
|
"data-test-id": "author-intro",
|
|
3581
861
|
style: {
|
|
3582
862
|
backgroundColor: theme,
|
|
3583
863
|
color: textColor
|
|
3584
864
|
},
|
|
3585
|
-
className: ("".concat(isFullWidth, " arrow-component arr--author-intro-card") ? "".concat(isFullWidth, " arrow-component arr--author-intro-card") + " " : "") +
|
|
3586
|
-
}, /*#__PURE__*/
|
|
3587
|
-
className: "arrow-author-intro-wrapper " +
|
|
3588
|
-
}, /*#__PURE__*/
|
|
865
|
+
className: ("".concat(isFullWidth, " arrow-component arr--author-intro-card") ? "".concat(isFullWidth, " arrow-component arr--author-intro-card") + " " : "") + _getClassName__default["default"]("".concat(authorCardStyle, " ").concat(supportBorder, " ").concat(textColor), _styleModuleImportMap)
|
|
866
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
867
|
+
className: "arrow-author-intro-wrapper " + _getClassName__default["default"]("wrapper ".concat(textColor), _styleModuleImportMap)
|
|
868
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3589
869
|
className: "arrow-author-introduction-card author-intro-m_introduction-card__1kdGt"
|
|
3590
|
-
}, isSmallCircle && isMobile ? null : /*#__PURE__*/
|
|
3591
|
-
className:
|
|
3592
|
-
}, name), enableBio && bio && /*#__PURE__*/
|
|
870
|
+
}, isSmallCircle && isMobile ? null : /*#__PURE__*/React__default["default"].createElement("h2", {
|
|
871
|
+
className: _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap)
|
|
872
|
+
}, name), enableBio && bio && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3593
873
|
"data-test-id": "author-bio",
|
|
3594
|
-
className:
|
|
3595
|
-
}, bio, isSmallCircle && /*#__PURE__*/
|
|
874
|
+
className: _getClassName__default["default"]("author-description ".concat(textColor), _styleModuleImportMap)
|
|
875
|
+
}, bio, isSmallCircle && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3596
876
|
className: "author-intro-m_fade-out__1EBqd",
|
|
3597
877
|
style: {
|
|
3598
878
|
backgroundImage: "linear-gradient(to right, transparent, ".concat(theme, ")")
|
|
3599
879
|
}
|
|
3600
|
-
})), /*#__PURE__*/
|
|
880
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3601
881
|
className: "author-intro-m_social-wrapper__1F9jD"
|
|
3602
|
-
}, /*#__PURE__*/
|
|
882
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3603
883
|
className: "author-intro-m_social-connect-wrapper__2B0QA"
|
|
3604
|
-
}, enableSocialLinks && social && /*#__PURE__*/
|
|
3605
|
-
className:
|
|
884
|
+
}, enableSocialLinks && social && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, template !== "smallCircle" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
885
|
+
className: _getClassName__default["default"]("connect ".concat(textColor), _styleModuleImportMap)
|
|
3606
886
|
}, "Connect :"), Object.entries(social).map(function (item, index) {
|
|
3607
887
|
return item.length > 0 && item[1] ? // can add Social Networks without the url so adding an additional check below
|
|
3608
|
-
item[1].url ? /*#__PURE__*/
|
|
888
|
+
item[1].url ? /*#__PURE__*/React__default["default"].createElement("a", {
|
|
3609
889
|
"data-test-id": "social-link",
|
|
3610
890
|
href: item[1].url,
|
|
3611
891
|
key: "".concat(item, "-").concat(index),
|
|
@@ -3613,46 +893,46 @@ var AuthorIntroductionCard = function AuthorIntroductionCard(_ref) {
|
|
|
3613
893
|
target: "_blank",
|
|
3614
894
|
className: "author-intro-m_social-share__f5EpE"
|
|
3615
895
|
}, getIcon(item[0])) : null : null;
|
|
3616
|
-
}))), !isSmallCircle && /*#__PURE__*/
|
|
896
|
+
}))), !isSmallCircle && /*#__PURE__*/React__default["default"].createElement(components.SocialShare, {
|
|
3617
897
|
template: SocialShareTemplate,
|
|
3618
898
|
fullUrl: sharePageUrl,
|
|
3619
899
|
title: name,
|
|
3620
900
|
theme: theme,
|
|
3621
901
|
iconType: "plain-svg"
|
|
3622
|
-
}))), /*#__PURE__*/
|
|
902
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3623
903
|
className: "arrow-author-image author-intro-m_author-image__2jRxy"
|
|
3624
|
-
}, /*#__PURE__*/
|
|
904
|
+
}, /*#__PURE__*/React__default["default"].createElement(AuthorImage, {
|
|
3625
905
|
author: data,
|
|
3626
906
|
template: template
|
|
3627
|
-
}), isSmallCircle && isMobile && /*#__PURE__*/
|
|
3628
|
-
className:
|
|
907
|
+
}), isSmallCircle && isMobile && /*#__PURE__*/React__default["default"].createElement("h2", {
|
|
908
|
+
className: _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap)
|
|
3629
909
|
}, name))));
|
|
3630
910
|
};
|
|
3631
911
|
AuthorIntroductionCard.propTypes = {
|
|
3632
|
-
data:
|
|
3633
|
-
name:
|
|
3634
|
-
bio:
|
|
3635
|
-
social:
|
|
912
|
+
data: PropTypes__default["default"].shape({
|
|
913
|
+
name: PropTypes__default["default"].string,
|
|
914
|
+
bio: PropTypes__default["default"].string,
|
|
915
|
+
social: PropTypes__default["default"].object
|
|
3636
916
|
}),
|
|
3637
|
-
config:
|
|
3638
|
-
theme:
|
|
3639
|
-
enableBio:
|
|
3640
|
-
enableSocialLinks:
|
|
3641
|
-
borderSupport:
|
|
917
|
+
config: PropTypes__default["default"].shape({
|
|
918
|
+
theme: PropTypes__default["default"].string,
|
|
919
|
+
enableBio: PropTypes__default["default"].bool,
|
|
920
|
+
enableSocialLinks: PropTypes__default["default"].bool,
|
|
921
|
+
borderSupport: PropTypes__default["default"].bool
|
|
3642
922
|
}),
|
|
3643
|
-
template:
|
|
923
|
+
template: PropTypes__default["default"].string
|
|
3644
924
|
};
|
|
3645
925
|
|
|
3646
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
926
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
3647
927
|
|
|
3648
928
|
var StateProvider = function StateProvider(RowComponent) {
|
|
3649
929
|
return function (props) {
|
|
3650
930
|
return (
|
|
3651
931
|
/*#__PURE__*/
|
|
3652
932
|
// eslint-disable-next-line react/prop-types
|
|
3653
|
-
|
|
933
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
3654
934
|
value: props.config
|
|
3655
|
-
}, /*#__PURE__*/
|
|
935
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
3656
936
|
);
|
|
3657
937
|
};
|
|
3658
938
|
};
|
|
@@ -3670,30 +950,30 @@ var AuthorsListBase = function AuthorsListBase(_ref) {
|
|
|
3670
950
|
var theme = config.theme;
|
|
3671
951
|
var textColor = getTextColor(theme);
|
|
3672
952
|
var mountAt = config.mountAt || "";
|
|
3673
|
-
var qtConfig = useSelector(function (state) {
|
|
3674
|
-
return
|
|
953
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
954
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
3675
955
|
});
|
|
3676
|
-
return /*#__PURE__*/
|
|
956
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3677
957
|
"data-test-id": "authors-list",
|
|
3678
958
|
className: "full-width-with-padding arrow-component arr--authors-list",
|
|
3679
959
|
style: {
|
|
3680
960
|
background: theme,
|
|
3681
961
|
color: textColor
|
|
3682
962
|
}
|
|
3683
|
-
}, /*#__PURE__*/
|
|
963
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3684
964
|
className: "authors-list-m_wrapper__6y3He"
|
|
3685
965
|
}, data.slice(0, limit).map(function (author, index) {
|
|
3686
|
-
return /*#__PURE__*/
|
|
966
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3687
967
|
href: "".concat(mountAt, "/author/") + author.slug,
|
|
3688
968
|
key: "author-list-".concat(index),
|
|
3689
969
|
className: "authors-list-m_linkWrapper__1ZhOs",
|
|
3690
970
|
"aria-label": "author"
|
|
3691
|
-
}, /*#__PURE__*/
|
|
971
|
+
}, /*#__PURE__*/React__default["default"].createElement(AuthorIntroductionCard, {
|
|
3692
972
|
data: author,
|
|
3693
973
|
config: config,
|
|
3694
974
|
template: "smallCircle"
|
|
3695
975
|
}));
|
|
3696
|
-
})), !hideLoadmore && /*#__PURE__*/
|
|
976
|
+
})), !hideLoadmore && /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
3697
977
|
onClick: getMoreData,
|
|
3698
978
|
template: "SubsequentLoadCount",
|
|
3699
979
|
config: config,
|
|
@@ -3701,15 +981,16 @@ var AuthorsListBase = function AuthorsListBase(_ref) {
|
|
|
3701
981
|
}));
|
|
3702
982
|
};
|
|
3703
983
|
AuthorsListBase.propTypes = {
|
|
3704
|
-
data:
|
|
3705
|
-
config:
|
|
3706
|
-
enableBio:
|
|
3707
|
-
theme:
|
|
984
|
+
data: PropTypes__default["default"].array,
|
|
985
|
+
config: PropTypes__default["default"].shape({
|
|
986
|
+
enableBio: PropTypes__default["default"].bool,
|
|
987
|
+
theme: PropTypes__default["default"].string
|
|
3708
988
|
}),
|
|
3709
|
-
getMoreData:
|
|
3710
|
-
limit:
|
|
3711
|
-
hideLoadmore:
|
|
989
|
+
getMoreData: PropTypes__default["default"].object.isRequired,
|
|
990
|
+
limit: PropTypes__default["default"].number,
|
|
991
|
+
hideLoadmore: PropTypes__default["default"].bool
|
|
3712
992
|
};
|
|
3713
993
|
var AuthorsList = StateProvider(AuthorsListBase);
|
|
3714
994
|
|
|
3715
|
-
|
|
995
|
+
exports.AuthorsList = AuthorsList;
|
|
996
|
+
exports.AuthorsListBase = AuthorsListBase;
|