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